Enhance Progression Graph Editor with Skills Catalog and AI Draft Handling
Deploy Development / deploy (push) Successful in 44s
Test Suite / pytest-backend (push) Successful in 44s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 13s
Test Suite / k6 /health Baseline (push) Successful in 34s
Test Suite / playwright-tests (push) Successful in 1m21s
Deploy Development / deploy (push) Successful in 44s
Test Suite / pytest-backend (push) Successful in 44s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 13s
Test Suite / k6 /health Baseline (push) Successful in 34s
Test Suite / playwright-tests (push) Successful in 1m21s
- Introduced skills catalog management in the `ProgressionGraphEditor`, allowing for improved context in AI suggestions. - Updated the loading mechanism to fetch both focus areas and skills catalog concurrently, enhancing performance. - Implemented `ensureQuickCreateDraftFromAiSuggestion` utility to streamline the creation of drafts from AI suggestions. - Enhanced slot management by integrating AI context into the gap fill preparation process, improving user experience. - Incremented application version to reflect these updates.
This commit is contained in:
1 parent
e0ddfa6ce5
commit
3b483346de
2 files changed
+111
-46
No files matched your search
@@ -166,6 +166,24 @@ export function describeAiSkillRowForPreview(row, skillsCatalog) {
|
||||
}
|
||||
|
||||
/** KI-Vorschau → bearbeitbarer Entwurf (Rich-Text-Felder). */
|
||||
/** Rohes API-ai_suggestion oder bereits bearbeiteter Entwurf → Preview-Entwurf. */
|
||||
export function ensureQuickCreateDraftFromAiSuggestion(
|
||||
aiSuggestion,
|
||||
{ title = '', focusAreaId = '', sketchPlain = '' } = {},
|
||||
) {
|
||||
if (!aiSuggestion || typeof aiSuggestion !== 'object') return null
|
||||
if (aiSuggestion.instructionFields) return aiSuggestion
|
||||
const preview = buildQuickCreateAiPreview(aiSuggestion, { sketchPlain })
|
||||
if (
|
||||
!preview.hasSummaryProposal &&
|
||||
!preview.hasInstructionChoices &&
|
||||
!preview.hasSkillChoices
|
||||
) {
|
||||
return null
|
||||
}
|
||||
return aiPreviewToQuickCreateDraft(preview, { title, focusAreaId, sketchPlain })
|
||||
}
|
||||
|
||||
export function aiPreviewToQuickCreateDraft(preview, { title, focusAreaId, sketchPlain }) {
|
||||
const sketchHtml = aiPlainTextToMinimalHtml(sketchPlain)
|
||||
const instructionFields = {
|
||||
|
||||
Reference in new issue
Block a user