Enhance Planning Exercise Profiles and Context Handling
Deploy Development / deploy (push) Successful in 44s
Test Suite / pytest-backend (push) Successful in 43s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 12s
Test Suite / k6 /health Baseline (push) Successful in 33s
Test Suite / playwright-tests (push) Successful in 1m14s
Deploy Development / deploy (push) Successful in 44s
Test Suite / pytest-backend (push) Successful in 43s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 12s
Test Suite / k6 /health Baseline (push) Successful in 33s
Test Suite / playwright-tests (push) Successful in 1m14s
- Introduced new functions to generate skill profiles from exercise IDs, improving the ability to summarize skills for both units and sections. - Updated the planning target profile to incorporate section-specific exercise IDs, allowing for more granular skill tracking and context. - Enhanced the ExercisePickerModal and related pages to support section context, including titles, guidance notes, and exercise counts. - Implemented expectation mode handling in the planning target pipeline to differentiate between planning references and query-only scenarios. - Incremented version to 0.8.174 and updated changelog to reflect these enhancements in planning AI capabilities.
This commit is contained in:
1 parent
8e68261bc1
commit
04cc77d501
8 files changed
+361
-18
No files matched your search
@@ -104,6 +104,13 @@ export default function ExercisePickerModal({
|
||||
const base = {
|
||||
groupId: Number.isFinite(groupId) && groupId > 0 ? groupId : null,
|
||||
sectionOrderIndex: planningContext?.sectionOrderIndex ?? 0,
|
||||
sectionTitle: planningContext?.sectionTitle ?? null,
|
||||
sectionGuidanceNotes: planningContext?.sectionGuidanceNotes ?? null,
|
||||
sectionPlannedExerciseIds: Array.isArray(planningContext?.sectionPlannedExerciseIds)
|
||||
? planningContext.sectionPlannedExerciseIds
|
||||
: [],
|
||||
sectionExerciseCount: planningContext?.sectionExerciseCount ?? null,
|
||||
lastExerciseTitle: planningContext?.lastExerciseTitle ?? null,
|
||||
phaseOrderIndex: planningContext?.phaseOrderIndex ?? null,
|
||||
parallelStreamOrderIndex: planningContext?.parallelStreamOrderIndex ?? null,
|
||||
anchorExerciseId: planningContext?.anchorExerciseId ?? null,
|
||||
@@ -424,10 +431,24 @@ export default function ExercisePickerModal({
|
||||
if (resolvedPlanningUnitId) {
|
||||
requestBody.unit_id = Number(resolvedPlanningUnitId)
|
||||
}
|
||||
if (activePlanningContext.groupId) {
|
||||
requestBody.group_id = Number(activePlanningContext.groupId)
|
||||
}
|
||||
const res = await api.suggestPlanningExercises(requestBody)
|
||||
if (activePlanningContext.groupId) {
|
||||
requestBody.group_id = Number(activePlanningContext.groupId)
|
||||
}
|
||||
if (activePlanningContext.sectionTitle) {
|
||||
requestBody.section_title = String(activePlanningContext.sectionTitle)
|
||||
}
|
||||
if (activePlanningContext.sectionGuidanceNotes) {
|
||||
requestBody.section_guidance_notes = String(activePlanningContext.sectionGuidanceNotes)
|
||||
}
|
||||
if (
|
||||
Array.isArray(activePlanningContext.sectionPlannedExerciseIds) &&
|
||||
activePlanningContext.sectionPlannedExerciseIds.length > 0
|
||||
) {
|
||||
requestBody.section_planned_exercise_ids = activePlanningContext.sectionPlannedExerciseIds
|
||||
.map((x) => Number(x))
|
||||
.filter((x) => Number.isFinite(x) && x > 0)
|
||||
}
|
||||
const res = await api.suggestPlanningExercises(requestBody)
|
||||
setPlanningContextSummary(res?.context_summary || null)
|
||||
setPlanningTargetProfileSummary(res?.target_profile_summary || null)
|
||||
setPlanningLlmRankApplied(Boolean(res?.llm_rank_applied))
|
||||
@@ -662,6 +683,16 @@ export default function ExercisePickerModal({
|
||||
{planningContextSummary.section_title ? (
|
||||
<span className="exercise-tag">{planningContextSummary.section_title}</span>
|
||||
) : null}
|
||||
{planningContextSummary.section_exercise_count != null ? (
|
||||
<span className="exercise-tag">
|
||||
{planningContextSummary.section_exercise_count} Übungen im Abschnitt
|
||||
</span>
|
||||
) : null}
|
||||
{planningContextSummary.last_section_exercise_title ? (
|
||||
<span className="exercise-tag">
|
||||
Letzte: {planningContextSummary.last_section_exercise_title}
|
||||
</span>
|
||||
) : null}
|
||||
{planningContextSummary.planned_count != null ? (
|
||||
<span className="exercise-tag">{planningContextSummary.planned_count} Übungen im Plan</span>
|
||||
) : null}
|
||||
@@ -687,6 +718,19 @@ export default function ExercisePickerModal({
|
||||
))
|
||||
: null}
|
||||
</div>
|
||||
{planningContextSummary.section_guidance_notes ? (
|
||||
<p style={{ margin: '6px 0 0', fontSize: '11px', color: 'var(--text2)' }}>
|
||||
Abschnitt: {planningContextSummary.section_guidance_notes}
|
||||
</p>
|
||||
) : null}
|
||||
{planningContextSummary.expectation_mode ? (
|
||||
<p style={{ margin: '4px 0 0', fontSize: '11px', color: 'var(--text3)' }}>
|
||||
Erwartungsprofil:{' '}
|
||||
{planningContextSummary.expectation_mode === 'query_only'
|
||||
? 'nur Suchtext'
|
||||
: 'Planung + optional Suchtext'}
|
||||
</p>
|
||||
) : null}
|
||||
{planningTargetProfileSummary?.has_skill_gap ? (
|
||||
<p style={{ margin: '6px 0 0', fontSize: '11px', color: 'var(--text3)' }}>
|
||||
Skill-Lücke zum bisherigen Plan berücksichtigt
|
||||
|
||||
Reference in new issue
Block a user