Add Structured Roadmap Inputs and Enhance Goal Analysis Features
Deploy Development / deploy (push) Successful in 45s
Test Suite / pytest-backend (push) Successful in 43s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 14s
Test Suite / k6 /health Baseline (push) Successful in 33s
Test Suite / playwright-tests (push) Successful in 1m14s
Deploy Development / deploy (push) Successful in 45s
Test Suite / pytest-backend (push) Successful in 43s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 14s
Test Suite / k6 /health Baseline (push) Successful in 33s
Test Suite / playwright-tests (push) Successful in 1m14s
- Introduced `RoadmapStructuredInput` to encapsulate structured inputs for start situation, target state, and roadmap notes. - Updated `ProgressionPathSuggestRequest` to include new fields for structured roadmap inputs. - Implemented parsing logic for goal queries to extract start and target states, enhancing the goal analysis process. - Enhanced `build_goal_analysis` to utilize structured inputs, improving the clarity and relevance of generated goals. - Updated the `ExerciseProgressionPathBuilder` component to support new structured input fields, enhancing user experience. - Incremented application version to 0.8.210 to reflect these changes.
This commit is contained in:
1 parent
87f258be38
commit
9dd44ce3ca
5 files changed
+428
-18
No files matched your search
@@ -54,6 +54,7 @@ from planning_progression_roadmap import (
|
||||
MajorStep,
|
||||
ProgressionRoadmapContext,
|
||||
RoadmapOverridePayload,
|
||||
RoadmapStructuredInput,
|
||||
StageSpecArtifact,
|
||||
build_roadmap_unfilled_gap_specs,
|
||||
progression_roadmap_to_api_dict,
|
||||
@@ -78,10 +79,26 @@ class ProgressionPathSuggestRequest(BaseModel):
|
||||
roadmap_first: bool = False
|
||||
roadmap_only: bool = False
|
||||
roadmap_override: Optional[RoadmapOverridePayload] = None
|
||||
start_situation: Optional[str] = Field(default=None, max_length=2000)
|
||||
target_state: Optional[str] = Field(default=None, max_length=2000)
|
||||
roadmap_notes: Optional[str] = Field(default=None, max_length=2000)
|
||||
progression_graph_id: Optional[int] = Field(default=None, ge=1)
|
||||
exercise_kind_any: Optional[List[str]] = None
|
||||
|
||||
|
||||
def _roadmap_structured_from_body(body: ProgressionPathSuggestRequest) -> Optional[RoadmapStructuredInput]:
|
||||
start = (body.start_situation or "").strip() or None
|
||||
target = (body.target_state or "").strip() or None
|
||||
notes = (body.roadmap_notes or "").strip() or None
|
||||
if not any([start, target, notes]):
|
||||
return None
|
||||
return RoadmapStructuredInput(
|
||||
start_situation=start,
|
||||
target_state=target,
|
||||
roadmap_notes=notes,
|
||||
)
|
||||
|
||||
|
||||
def _pick_best_path_hit(
|
||||
hits: List[Dict[str, Any]],
|
||||
used_exercise_ids: Set[int],
|
||||
@@ -502,6 +519,7 @@ def suggest_progression_path(
|
||||
progression_roadmap: Optional[Dict[str, Any]] = None
|
||||
roadmap_ctx: Optional[ProgressionRoadmapContext] = None
|
||||
roadmap_edited = False
|
||||
roadmap_structured = _roadmap_structured_from_body(body)
|
||||
|
||||
if body.roadmap_override is not None:
|
||||
try:
|
||||
@@ -510,6 +528,7 @@ def suggest_progression_path(
|
||||
max_steps=max_steps,
|
||||
semantic_brief=semantic_brief,
|
||||
override=body.roadmap_override,
|
||||
structured=roadmap_structured,
|
||||
)
|
||||
except ValueError as exc:
|
||||
raise HTTPException(status_code=400, detail=str(exc)) from exc
|
||||
@@ -525,6 +544,7 @@ def suggest_progression_path(
|
||||
semantic_brief=semantic_brief,
|
||||
cur=cur,
|
||||
include_llm_roadmap=body.include_llm_roadmap,
|
||||
structured=roadmap_structured,
|
||||
)
|
||||
progression_roadmap = progression_roadmap_to_api_dict(roadmap_ctx)
|
||||
|
||||
|
||||
Reference in new issue
Block a user