@sim-design/training 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +481 -15
- package/dist/{ArrowLeftOutlined-CiSQq3bL.js → ArrowLeftOutlined-BxA84GXs.js} +1 -1
- package/dist/ArrowLeftOutlined-D785XjyB.js +12 -0
- package/dist/{AssessmentPlugin-Bx4VrBdV.js → AssessmentPlugin-D_iesmyg.js} +7 -7
- package/dist/AssessmentPlugin-zRr-IsdA.js +607 -0
- package/dist/CaseAnalysisPlugin-CXuQpkPd.js +2196 -0
- package/dist/CaseAnalysisPlugin-DytlXsRD.js +2196 -0
- package/dist/CaseDetailContent-DT5nCtRT.js +28613 -0
- package/dist/CaseDetailContent-Y7Q430MG.js +28595 -0
- package/dist/{CharacterDialoguePanel-Bvdab3qj.js → CharacterDialoguePanel-CdtUl-Sv.js} +178 -139
- package/dist/CharacterDialoguePanel-D_4YNFZv.js +815 -0
- package/dist/{CheckCircleFilled-Byo8CDfW.js → CheckCircleFilled-CnslIY7j.js} +1 -1
- package/dist/CheckCircleFilled-NvZaC2sk.js +12 -0
- package/dist/DecisionMakingPlugin-B_KQUFzW.js +1385 -0
- package/dist/DecisionMakingPlugin-ILLGek3S.js +1385 -0
- package/dist/{DecisionSelectPlugin-DtQ2KV34.js → DecisionSelectPlugin-BGQiHGBK.js} +20 -11
- package/dist/DecisionSelectPlugin-Bqmh6XGh.js +872 -0
- package/dist/{DecisionShared-Dh9oeQFT.js → DecisionShared-BHq1lEqt.js} +2 -2
- package/dist/DecisionShared-Be-zKZLT.js +65 -0
- package/dist/DeleteOutlined-BvMjU7m5.js +12 -0
- package/dist/DeleteOutlined-Dqy6M2LH.js +12 -0
- package/dist/{CustomLayoutRenderer--rnQrqQ2.js → DialogueFormPlugin-BpCeFadt.js} +22724 -21631
- package/dist/DialogueFormPlugin-CXlbxX-z.js +123617 -0
- package/dist/DialoguePlugin-CO7Nzv0K.js +596 -0
- package/dist/DialoguePlugin-DDNdsylz.js +596 -0
- package/dist/DocumentReviewPlugin-2CnKQwVG.js +1967 -0
- package/dist/DocumentReviewPlugin-qYYrnjvE.js +1967 -0
- package/dist/{EyeOutlined-XvOAKlLs.js → EyeOutlined-BrKCNjui.js} +1 -1
- package/dist/EyeOutlined-CW0tYV0f.js +12 -0
- package/dist/FormFillingPlugin-C3h8ySOZ.js +969 -0
- package/dist/FormFillingPlugin-CPmd76Qr.js +969 -0
- package/dist/HolderOutlined-CH0tShWu.js +12 -0
- package/dist/HolderOutlined-Dm6TBtqf.js +12 -0
- package/dist/ModelEditor-BjEbFloQ.js +11753 -0
- package/dist/ModelEditor-CwR67DFQ.js +11753 -0
- package/dist/{ProcessOperationPlugin-IijngDlX.js → ProcessOperationPlugin-1Lz431aC.js} +12 -12
- package/dist/ProcessOperationPlugin-BkmdG3ch.js +88 -0
- package/dist/QAPlugin-0C4kpq3J.js +172 -0
- package/dist/QAPlugin-UC8uywcg.js +172 -0
- package/dist/{ReloadOutlined-Daor2m11.js → ReloadOutlined-BZ92nlYF.js} +1 -1
- package/dist/ReloadOutlined-CYoPOwLl.js +12 -0
- package/dist/{SettingOutlined-CLEOgXB-.js → SettingOutlined-F466s0Ti.js} +33 -65
- package/dist/SettingOutlined-c2hikCfN.js +60 -0
- package/dist/StarFilled-Bilmj6UK.js +28 -0
- package/dist/StarFilled-CtH30fL0.js +28 -0
- package/dist/StrategyLabPlugin-CvO07sXV.js +12445 -0
- package/dist/StrategyLabPlugin-DUqZYctQ.js +12445 -0
- package/dist/ThunderboltOutlined-BpmoCKdV.js +28 -0
- package/dist/ThunderboltOutlined-DDQFi5Cv.js +28 -0
- package/dist/TrainingModelContainer-DqCsdC7C.js +11241 -0
- package/dist/TrainingModelContainer-yi8W6KFl.js +11241 -0
- package/dist/{UndoOutlined-ChUQYUul.js → UndoOutlined-6JZVzmdX.js} +26 -42
- package/dist/UndoOutlined-Dw6_9_OL.js +68 -0
- package/dist/{WarningFilled-1Rc4hr0C.js → WarningFilled-Cy1tvuQy.js} +1 -1
- package/dist/WarningFilled-lkr453eh.js +12 -0
- package/dist/{adapters-D1FFZFoA.js → adapters-BbCnXSYo.js} +2 -2
- package/dist/{analysisTools-CXyOvSZT.js → analysisTools-Cp5-3DaU.js} +59 -12
- package/dist/creator.js +4 -2
- package/dist/designTokens-walF_QkZ.js +23 -0
- package/dist/images/healthcare/bg.jpg +0 -0
- package/dist/{index-CYjdXPgc.js → index-C71iHgSs.js} +2640 -2722
- package/dist/{index-XuBVjlmu.js → index-CBvqcbIU.js} +7214 -7643
- package/dist/index-D94YNWTb.js +433 -0
- package/dist/index-DSYmOXnQ.js +6486 -0
- package/dist/index-fP97rKeQ.js +433 -0
- package/dist/index.js +8 -6
- package/dist/judgement-xTGXlDcn.js +29 -0
- package/dist/runtime.js +1 -1
- package/dist/sortable.esm-bm_c5vmI.js +3307 -0
- package/dist/types.js +1 -1
- package/dist/useDialogueLogic-D1lkUKUZ.js +576 -0
- package/dist/useDialogueLogic-vOJ9XRNP.js +576 -0
- package/dist-types/client/src/admin/CaseDataEditor.d.ts +20 -0
- package/dist-types/client/src/admin/CaseEditor.d.ts +19 -0
- package/dist-types/client/src/admin/DialogueFormCheckRulesEditor.d.ts +11 -0
- package/dist-types/client/src/admin/DialogueFormInitDataEditor.d.ts +31 -0
- package/dist-types/client/src/admin/InitDataEditors.d.ts +7 -0
- package/dist-types/client/src/admin/ModelEditor.d.ts +11 -0
- package/dist-types/client/src/admin/ModelPreview.d.ts +13 -0
- package/dist-types/client/src/admin/OptionSelector.d.ts +32 -0
- package/dist-types/client/src/admin/StageStepEditor.d.ts +20 -0
- package/dist-types/client/src/admin/StepAnswerKeyEditor.d.ts +19 -0
- package/dist-types/client/src/admin/StepByStepCreator.d.ts +27 -0
- package/dist-types/client/src/admin/components/AbilityMapEditor.d.ts +12 -0
- package/dist-types/client/src/admin/components/CasePreview.d.ts +8 -0
- package/dist-types/client/src/admin/components/StepAbilitySelector.d.ts +9 -0
- package/dist-types/client/src/admin/constants/creatorConstants.d.ts +39 -0
- package/dist-types/client/src/admin/editors/CaseAnalysisEditor.d.ts +11 -0
- package/dist-types/client/src/admin/editors/DecisionMakingEditor.d.ts +7 -0
- package/dist-types/client/src/admin/editors/DialogueEditor.d.ts +12 -0
- package/dist-types/client/src/admin/editors/DocumentReviewEditor.d.ts +7 -0
- package/dist-types/client/src/admin/editors/DocumentReviewRuntimeRulesEditor.d.ts +15 -0
- package/dist-types/client/src/admin/editors/FormFillingEditor.d.ts +33 -0
- package/dist-types/client/src/admin/editors/ModelUIConfigEditor.d.ts +5 -0
- package/dist-types/client/src/admin/editors/QAEditor.d.ts +6 -0
- package/dist-types/client/src/admin/editors/RouterEditors.d.ts +18 -0
- package/dist-types/client/src/admin/editors/StepBriefingEditor.d.ts +14 -0
- package/dist-types/client/src/admin/editors/StrategyLabEditor.d.ts +24 -0
- package/dist-types/client/src/admin/editors/decisionEditorParts.d.ts +18 -0
- package/dist-types/client/src/admin/editors/index.d.ts +8 -0
- package/dist-types/client/src/admin/editors/shared.d.ts +17 -0
- package/dist-types/client/src/admin/hooks/useStep1Intent.d.ts +16 -0
- package/dist-types/client/src/admin/hooks/useStep2Outline.d.ts +41 -0
- package/dist-types/client/src/admin/hooks/useStep3Details.d.ts +123 -0
- package/dist-types/client/src/admin/hooks/useStep4Cases.d.ts +48 -0
- package/dist-types/client/src/admin/hooks/useStep5Validation.d.ts +16 -0
- package/dist-types/client/src/admin/landingValidation.d.ts +74 -0
- package/dist-types/client/src/admin/schemaFieldUtils.d.ts +55 -0
- package/dist-types/client/src/admin/services.d.ts +461 -0
- package/dist-types/client/src/admin/shared-editors.d.ts +31 -0
- package/dist-types/client/src/admin/types/creatorArtifacts.d.ts +140 -0
- package/dist-types/client/src/components/AbilityMapView.d.ts +15 -0
- package/dist-types/client/src/components/CaseDetail/CaseDetailContent.d.ts +12 -0
- package/dist-types/client/src/components/ConversationalDataCollector/IntentConfirmPanel.d.ts +20 -0
- package/dist-types/client/src/components/ConversationalDataCollector/index.d.ts +7 -0
- package/dist-types/client/src/components/ConversationalDataCollector/intentState.d.ts +24 -0
- package/dist-types/client/src/components/ConversationalDataCollector/types.d.ts +95 -0
- package/dist-types/client/src/components/ConversationalDataCollector/utils.d.ts +62 -0
- package/dist-types/client/src/components/CustomLayoutRenderer.d.ts +8 -0
- package/dist-types/client/src/components/MarkdownRenderer.d.ts +15 -0
- package/dist-types/client/src/components/StrategyLabScene/VisualInputComponents.d.ts +85 -0
- package/dist-types/client/src/components/StrategyLabScene/components/AdversarialView.d.ts +18 -0
- package/dist-types/client/src/components/StrategyLabScene/components/BottomBar.d.ts +22 -0
- package/dist-types/client/src/components/StrategyLabScene/components/CharacterCard.d.ts +14 -0
- package/dist-types/client/src/components/StrategyLabScene/components/CharacterDialoguePanel.d.ts +32 -0
- package/dist-types/client/src/components/StrategyLabScene/components/CollaborativeView.d.ts +20 -0
- package/dist-types/client/src/components/StrategyLabScene/components/ComparisonView.d.ts +16 -0
- package/dist-types/client/src/components/StrategyLabScene/components/DecisionInput.d.ts +27 -0
- package/dist-types/client/src/components/StrategyLabScene/components/DecisionSwitcher.d.ts +14 -0
- package/dist-types/client/src/components/StrategyLabScene/components/EvaluationReport.d.ts +13 -0
- package/dist-types/client/src/components/StrategyLabScene/components/NodeChainPanels.d.ts +32 -0
- package/dist-types/client/src/components/StrategyLabScene/components/ProgressSteps.d.ts +15 -0
- package/dist-types/client/src/components/StrategyLabScene/components/SandboxView.d.ts +19 -0
- package/dist-types/client/src/components/StrategyLabScene/components/ScenarioPanel.d.ts +17 -0
- package/dist-types/client/src/components/StrategyLabScene/components/SimulationAnimation.d.ts +13 -0
- package/dist-types/client/src/components/StrategyLabScene/components/SimulationResult.d.ts +15 -0
- package/dist-types/client/src/components/StrategyLabScene/components/StressTestView.d.ts +22 -0
- package/dist-types/client/src/components/StrategyLabScene/themeMatching.d.ts +21 -0
- package/dist-types/client/src/components/StrategyLabScene/themes/education.d.ts +45 -0
- package/dist-types/client/src/components/StrategyLabScene/themes/healthcare.d.ts +7 -0
- package/dist-types/client/src/components/StrategyLabScene/themes/index.d.ts +22 -0
- package/dist-types/client/src/components/StrategyLabScene/themes/professional.d.ts +7 -0
- package/dist-types/client/src/components/StrategyLabScene/themes/technology.d.ts +7 -0
- package/dist-types/client/src/components/StrategyLabScene/types.d.ts +82 -0
- package/dist-types/client/src/components/StrategyLabScene/views/UnifiedStrategyLabView.d.ts +72 -0
- package/dist-types/client/src/components/TrainingEngine/BriefingQAChat.d.ts +19 -0
- package/dist-types/client/src/components/TrainingEngine/CaseInfoModal.d.ts +12 -0
- package/dist-types/client/src/components/TrainingEngine/CaseSelector.d.ts +15 -0
- package/dist-types/client/src/components/TrainingEngine/ClassicView.d.ts +7 -0
- package/dist-types/client/src/components/TrainingEngine/DashboardHomePage.d.ts +7 -0
- package/dist-types/client/src/components/TrainingEngine/EnhancedStudentProfilePanel.d.ts +9 -0
- package/dist-types/client/src/components/TrainingEngine/EvaluationPanel.d.ts +8 -0
- package/dist-types/client/src/components/TrainingEngine/GlobalQAPanel.d.ts +34 -0
- package/dist-types/client/src/components/TrainingEngine/GuidanceHistoryDrawer.d.ts +7 -0
- package/dist-types/client/src/components/TrainingEngine/GuidancePanel.d.ts +3 -0
- package/dist-types/client/src/components/TrainingEngine/ImmersiveGameView.d.ts +7 -0
- package/dist-types/client/src/components/TrainingEngine/PluginRenderer.d.ts +15 -0
- package/dist-types/client/src/components/TrainingEngine/ProgressTracker.d.ts +3 -0
- package/dist-types/client/src/components/TrainingEngine/StageAssessingOverlay.d.ts +17 -0
- package/dist-types/client/src/components/TrainingEngine/StageAssessmentPanel.d.ts +10 -0
- package/dist-types/client/src/components/TrainingEngine/StepExecutor.d.ts +20 -0
- package/dist-types/client/src/components/TrainingEngine/StepNodeMap.d.ts +15 -0
- package/dist-types/client/src/components/TrainingEngine/StudentProfilePanel.d.ts +6 -0
- package/dist-types/client/src/components/TrainingEngine/ThemeContext.d.ts +8 -0
- package/dist-types/client/src/components/TrainingEngine/TrainingMaterialsSidebar.d.ts +21 -0
- package/dist-types/client/src/components/TrainingEngine/TrainingModelContainer.d.ts +42 -0
- package/dist-types/client/src/components/TrainingEngine/ViewProps.d.ts +37 -0
- package/dist-types/client/src/components/TrainingEngine/profileDataSelectors.d.ts +23 -0
- package/dist-types/client/src/components/TrainingEngine/stepInitData.d.ts +42 -0
- package/dist-types/client/src/components/TrainingEngine/targetAbilityUtils.d.ts +11 -0
- package/dist-types/client/src/components/VisualizationRenderer/ChartRenderer.d.ts +12 -0
- package/dist-types/client/src/components/VisualizationRenderer/types.d.ts +41 -0
- package/dist-types/client/src/config/appConfig.d.ts +15 -0
- package/dist-types/client/src/configs/agentConfig.d.ts +66 -0
- package/dist-types/client/src/configs/intentDiscoveryConfig.d.ts +22 -0
- package/dist-types/client/src/data/mockTrainingModel.d.ts +10 -0
- package/dist-types/client/src/hooks/useAIService.d.ts +17 -0
- package/dist-types/client/src/hooks/useDialogueLogic.d.ts +53 -0
- package/dist-types/client/src/hooks/useFormFillingLogic.d.ts +26 -0
- package/dist-types/client/src/hooks/useFormRealtimeGuidance.d.ts +45 -0
- package/dist-types/client/src/hooks/useRealtimeGuidance.d.ts +66 -0
- package/dist-types/client/src/hooks/useStageAssessment.d.ts +8 -0
- package/dist-types/client/src/hooks/useStepExecution.d.ts +14 -0
- package/dist-types/client/src/hooks/useTrainingModel.d.ts +30 -0
- package/dist-types/client/src/lib/creator.d.ts +1 -0
- package/dist-types/client/src/lib/index.d.ts +1 -0
- package/dist-types/client/src/lib/types.d.ts +113 -22
- package/dist-types/client/src/plugins/AssessmentPlugin.d.ts +8 -0
- package/dist-types/client/src/plugins/CaseAnalysisPlugin.d.ts +9 -0
- package/dist-types/client/src/plugins/CaseAnalysisPluginView.d.ts +26 -0
- package/dist-types/client/src/plugins/DecisionSelectPlugin.d.ts +8 -0
- package/dist-types/client/src/plugins/DialogueFormPlugin.d.ts +9 -0
- package/dist-types/client/src/plugins/DialogueFormPluginView.d.ts +37 -0
- package/dist-types/client/src/plugins/DialoguePlugin.d.ts +8 -0
- package/dist-types/client/src/plugins/DialoguePluginView.d.ts +44 -0
- package/dist-types/client/src/plugins/DocumentReview/DocumentCard.d.ts +47 -0
- package/dist-types/client/src/plugins/DocumentReview/LayoutComponents.d.ts +47 -0
- package/dist-types/client/src/plugins/DocumentReview/MarkListPanel.d.ts +51 -0
- package/dist-types/client/src/plugins/DocumentReview/MarkModal.d.ts +37 -0
- package/dist-types/client/src/plugins/DocumentReview/ResultPanel.d.ts +32 -0
- package/dist-types/client/src/plugins/DocumentReview/Toolbar.d.ts +31 -0
- package/dist-types/client/src/plugins/DocumentReview/designTokens.d.ts +76 -0
- package/dist-types/client/src/plugins/DocumentReviewPlugin.d.ts +14 -0
- package/dist-types/client/src/plugins/ProcessOperationPlugin.d.ts +8 -0
- package/dist-types/client/src/plugins/QAPlugin.d.ts +9 -0
- package/dist-types/client/src/plugins/StrategyLabPlugin.d.ts +7 -0
- package/dist-types/client/src/plugins/decision-making/DecisionMakingPlugin.d.ts +4 -0
- package/dist-types/client/src/plugins/decision-making/DecisionWorkspace.d.ts +23 -0
- package/dist-types/client/src/plugins/decision-making/MaterialsPanel.d.ts +18 -0
- package/dist-types/client/src/plugins/decision-making/logic.d.ts +46 -0
- package/dist-types/client/src/plugins/decision-making/scoring.d.ts +79 -0
- package/dist-types/client/src/plugins/decision-making/styles.d.ts +743 -0
- package/dist-types/client/src/plugins/decision-making/types.d.ts +179 -0
- package/dist-types/client/src/plugins/form-filling/DocumentFormLayout.d.ts +22 -0
- package/dist-types/client/src/plugins/form-filling/FormAssistPanel.d.ts +20 -0
- package/dist-types/client/src/plugins/form-filling/FormFillingPlugin.d.ts +15 -0
- package/dist-types/client/src/plugins/form-filling/forms.d.ts +28 -0
- package/dist-types/client/src/plugins/form-filling/scoring.d.ts +86 -0
- package/dist-types/client/src/plugins/form-filling/useFormFilling.d.ts +42 -0
- package/dist-types/client/src/plugins/form-filling/validationRules.d.ts +26 -0
- package/dist-types/client/src/plugins/shared/DecisionShared.d.ts +54 -0
- package/dist-types/client/src/plugins/shared/FrameworkWidget.d.ts +19 -0
- package/dist-types/client/src/plugins/shared/PluginFooter.d.ts +4 -0
- package/dist-types/client/src/plugins/shared/PluginHeader.d.ts +4 -0
- package/dist-types/client/src/plugins/shared/analysisTools.d.ts +30 -0
- package/dist-types/client/src/plugins/shared/disturbanceUtils.d.ts +5 -0
- package/dist-types/client/src/plugins/shared/index.d.ts +5 -0
- package/dist-types/client/src/plugins/shared/jsonRepair.d.ts +39 -0
- package/dist-types/client/src/plugins/shared/judgement.d.ts +46 -0
- package/dist-types/client/src/plugins/shared/nodeChain.d.ts +15 -0
- package/dist-types/client/src/plugins/shared/renderFieldGrid.d.ts +16 -0
- package/dist-types/client/src/plugins/shared/reportBlocks.d.ts +33 -0
- package/dist-types/client/src/plugins/shared/reportEvaluation.d.ts +30 -0
- package/dist-types/client/src/plugins/shared/reportExport.d.ts +12 -0
- package/dist-types/client/src/plugins/shared/reportWorkbench/BlockPropertiesPanel.d.ts +9 -0
- package/dist-types/client/src/plugins/shared/reportWorkbench/BlockToolbox.d.ts +11 -0
- package/dist-types/client/src/plugins/shared/reportWorkbench/ReportWorkbench.d.ts +20 -0
- package/dist-types/client/src/plugins/shared/reportWorkbench/SortableBlock.d.ts +15 -0
- package/dist-types/client/src/plugins/shared/reportWorkbench/factory.d.ts +14 -0
- package/dist-types/client/src/plugins/shared/reportWorkbench/outlineDraft.d.ts +7 -0
- package/dist-types/client/src/plugins/shared/simulationEngine.d.ts +112 -0
- package/dist-types/client/src/plugins/shared/simulationModes.d.ts +21 -0
- package/dist-types/client/src/plugins/shared/themes.d.ts +5 -0
- package/dist-types/client/src/plugins/shared/types.d.ts +1247 -0
- package/dist-types/client/src/services/AICommandHandler.d.ts +68 -0
- package/dist-types/client/src/services/cozeApiClient.d.ts +44 -0
- package/dist-types/client/src/services/mockApi.d.ts +48 -0
- package/dist-types/client/src/services/storageService.d.ts +88 -0
- package/dist-types/client/src/stores/abilityStore.d.ts +33 -0
- package/dist-types/client/src/stores/dialogueStore.d.ts +30 -0
- package/dist-types/client/src/stores/formRegistryStore.d.ts +45 -0
- package/dist-types/client/src/stores/guidanceStore.d.ts +17 -0
- package/dist-types/client/src/stores/stepEvidenceStore.d.ts +14 -0
- package/dist-types/client/src/stores/strategyLabStore.d.ts +46 -0
- package/dist-types/client/src/stores/trainingStore.d.ts +84 -0
- package/dist-types/client/src/types/ai-commands.d.ts +144 -0
- package/dist-types/client/src/types.d.ts +17 -0
- package/dist-types/client/src/utils/abilityMapGenerator.d.ts +27 -0
- package/dist-types/client/src/utils/formUtils.d.ts +66 -0
- package/dist-types/client/src/utils/rule-engine.d.ts +36 -0
- package/dist-types/shared/types/index.d.ts +592 -0
- package/package.json +5 -3
- package/dist/CaseAnalysisPlugin-CQvF9_zr.js +0 -416
- package/dist/DialogueFormPlugin-C9ssnVMr.js +0 -959
- package/dist/DialoguePlugin-DU00QpmQ.js +0 -416
- package/dist/DocumentReviewPlugin-HNOZY1T4.js +0 -977
- package/dist/FormFillingPlugin-DURWsioi.js +0 -445
- package/dist/ModelEditor-BPJsPR0S.js +0 -8264
- package/dist/PluginHeader-B-GESJmT.js +0 -87
- package/dist/QAPlugin-Bh_UjK1N.js +0 -184
- package/dist/RadarChart-C5ZM0kWt.js +0 -24963
- package/dist/StrategyLabPlugin-DGeZsr_7.js +0 -14361
- package/dist/ThunderboltOutlined-nH_FO_4A.js +0 -44
- package/dist/ToolOutlined-DtuNJDB2.js +0 -28
- package/dist/TrainingModelContainer-DpW-uB8O.js +0 -11883
- package/dist/WarningOutlined-5g1d66hO.js +0 -164
- package/dist/judgement-D_9i7x9S.js +0 -20
- package/dist/useDialogueLogic-IHELcN3X.js +0 -368
package/README.md
CHANGED
|
@@ -1,33 +1,499 @@
|
|
|
1
1
|
# @sim-design/training
|
|
2
2
|
|
|
3
|
-
React
|
|
3
|
+
实训教学平台组件库。把「运行训练模型 / 创建模型 / 编辑模型」三类能力以 React 组件形式提供给外部宿主工程集成。
|
|
4
|
+
|
|
5
|
+
- `@sim-design/training/runtime` — 运行时:渲染并驱动一份训练模型(学员端)
|
|
6
|
+
- `@sim-design/training/creator` — 创建向导 `StepByStepCreator` + 模型编辑器 `ModelEditor`(教师 / 运营端)
|
|
7
|
+
- `@sim-design/training/types` — 稳定契约类型与宿主注入适配器(仅类型 + 少量工具函数)
|
|
8
|
+
|
|
9
|
+
> 技术栈:React 18 + TypeScript + Ant Design 5 + Zustand。包为纯 ESM(`"type": "module"`)。
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## ⚠️ 重要前置(先读这一段)
|
|
14
|
+
|
|
15
|
+
1. **必须由宿主安装的 4 个依赖**(库不打包它们):`react@^18.2`、`react-dom@^18.2`、`antd@^5.29`、`@coze/api`。前三者是 `peerDependencies`,`@coze/api` 需一并安装。
|
|
16
|
+
2. **其余依赖随包自带**(`echarts`/`recharts`/`framer-motion`/`zustand`/`@dnd-kit/*`/`@monaco-editor/react`/`@babel/standalone`/`json-rules-engine`/`react-live`/`react-markdown` 等),宿主无需也不应单独安装。代价是解包体积约 **10MB**(其中 `DialogueFormPlugin` 单 chunk ≈ 4.65MB),建议在路由层对各页面做**懒加载**以避免一次性加载大 chunk。
|
|
17
|
+
3. **浏览器环境**:运行时依赖 `localStorage` / `sessionStorage`(会话恢复与 token 缓存)。SSR 场景需确保**仅客户端渲染**。
|
|
18
|
+
4. **AI 能力依赖扣子(Coze)平台**:角色对话、实时指导、智能答疑、AI 评估,以及创建向导的全部生成步骤都要调用 Coze。纯「运行已有模型 + 确定性评分」可不接 Coze(详见《Coze / AI 接入前置》一章)。
|
|
19
|
+
5. **无需引入任何 CSS 文件**:组件以内联样式 + antd 的 CSS-in-JS 为主,产物不产出独立 `.css`,集成时**不要**去 `import` 样式文件。
|
|
20
|
+
|
|
21
|
+
---
|
|
4
22
|
|
|
5
23
|
## 安装
|
|
6
24
|
|
|
7
25
|
```bash
|
|
8
26
|
npm install @sim-design/training
|
|
27
|
+
# 宿主自备 peer 依赖
|
|
28
|
+
npm install react react-dom antd @coze/api
|
|
9
29
|
```
|
|
10
30
|
|
|
11
|
-
##
|
|
31
|
+
## 导出子路径
|
|
32
|
+
|
|
33
|
+
| 子路径 | 主要导出 | 提供能力 |
|
|
34
|
+
|---|---|---|
|
|
35
|
+
| `@sim-design/training` | 下列全部 + 适配器 / 工具函数 | 聚合根入口 |
|
|
36
|
+
| `@sim-design/training/runtime` | `TrainingRuntime`,类型 `TrainingEngineProps` / `TrainingResult` | 运行时组件 |
|
|
37
|
+
| `@sim-design/training/creator` | `StepByStepCreator`、`ModelEditor`、`setTokenInvalidHandler` | 创建 / 编辑组件 |
|
|
38
|
+
| `@sim-design/training/types` | 全部契约类型 + 适配器函数 | 仅类型 + 适配器(无 React 组件) |
|
|
12
39
|
|
|
13
40
|
```ts
|
|
14
|
-
import { TrainingRuntime } from '@sim-design/training/runtime'
|
|
15
|
-
import { StepByStepCreator, ModelEditor } from '@sim-design/training/creator'
|
|
16
|
-
import type { TrainingModel, StepByStepCreatorProps } from '@sim-design/training/types'
|
|
41
|
+
import { TrainingRuntime } from '@sim-design/training/runtime';
|
|
42
|
+
import { StepByStepCreator, ModelEditor } from '@sim-design/training/creator';
|
|
43
|
+
import type { TrainingModel, StepByStepCreatorProps } from '@sim-design/training/types';
|
|
44
|
+
import {
|
|
45
|
+
createLocalStorageCreatorPersistence,
|
|
46
|
+
setTokenInvalidHandler,
|
|
47
|
+
} from '@sim-design/training';
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## 快速开始:运行一份训练模型
|
|
53
|
+
|
|
54
|
+
```tsx
|
|
55
|
+
import { ConfigProvider } from 'antd';
|
|
56
|
+
import zhCN from 'antd/locale/zh_CN';
|
|
57
|
+
import { TrainingRuntime, type TrainingResult } from '@sim-design/training/runtime';
|
|
58
|
+
import type { TrainingModel, Case } from '@sim-design/training';
|
|
59
|
+
|
|
60
|
+
export default function TrainingPage({
|
|
61
|
+
model, // 完整 TrainingModel 对象(推荐直接传,见下方“取数优先级”)
|
|
62
|
+
selectedCase, // 从 model.cases 中挑选的一个案例
|
|
63
|
+
}: {
|
|
64
|
+
model: TrainingModel;
|
|
65
|
+
selectedCase?: Case;
|
|
66
|
+
}) {
|
|
67
|
+
return (
|
|
68
|
+
<ConfigProvider locale={zhCN}>
|
|
69
|
+
<TrainingRuntime
|
|
70
|
+
trainingModel={model}
|
|
71
|
+
selectedCase={selectedCase}
|
|
72
|
+
studentId="stu-2026-001"
|
|
73
|
+
currentUser={{ userId: 'u-1001', name: '张三' }}
|
|
74
|
+
onComplete={(r: TrainingResult) => console.log('训练完成,平均分:', r.totalScore)}
|
|
75
|
+
onStepComplete={(s) => console.log('单步完成:', s)}
|
|
76
|
+
onError={(e) => console.error('运行时错误:', e.message)}
|
|
77
|
+
/>
|
|
78
|
+
</ConfigProvider>
|
|
79
|
+
);
|
|
80
|
+
}
|
|
17
81
|
```
|
|
18
82
|
|
|
19
|
-
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## 运行时组件 `TrainingRuntime`
|
|
86
|
+
|
|
87
|
+
`@sim-design/training/runtime` 的 `TrainingRuntime` 即容器组件 `TrainingModelContainer` 的别名导出。它根据传入的训练模型 + 选中案例,渲染「阶段 → 步骤」流程,逐步驱动各插件、收集学员操作、产出评估并回调宿主。
|
|
88
|
+
|
|
89
|
+
### Props(`TrainingEngineProps`)
|
|
90
|
+
|
|
91
|
+
| 字段 | 类型 | 必填 | 说明 |
|
|
92
|
+
|---|---|---|---|
|
|
93
|
+
| `trainingModel` | `TrainingModel` | 否¹ | 直接传入的完整模型,运行时主数据 |
|
|
94
|
+
| `modelId` | `string` | 否¹ | 模型 ID;无 `trainingModel` 时据此异步加载(见下方注意) |
|
|
95
|
+
| `selectedCase` | `Case` | 否 | 当前选中案例,注入业务数据 / 角色池;切换会清空已填数据、对话与能力缓存 |
|
|
96
|
+
| `studentId` | `string` | **是** | 学员标识,用于会话归属、能力画像初始化、结果回填 |
|
|
97
|
+
| `currentUser` | `{ userId: string; name: string }` | **是** | 当前用户;`userId` 用于换取 Coze token |
|
|
98
|
+
| `onComplete` | `(result: TrainingResult) => void` | 否 | 最后一步产生评估后触发,回传整场结果 |
|
|
99
|
+
| `onStepComplete` | `(stepResult: StudentOperationResult) => void` | 否 | 每步评估产生时触发 |
|
|
100
|
+
| `onError` | `(error: Error) => void` | 否 | 模型加载失败等错误时触发 |
|
|
101
|
+
|
|
102
|
+
¹ `trainingModel` 与 `modelId` **至少提供其一**,否则渲染「配置错误」提示。
|
|
103
|
+
|
|
104
|
+
> **运行时还接收 `botId` 与 `onSwitchCase` 两个 prop**(`botId`:覆盖 `model.botId` 的 Coze 智能体;`onSwitchCase`:视图内切换案例的回调),它们运行时生效,但**未列入导出的 `TrainingEngineProps` 类型**。如需类型安全地传入,可参考 `@sim-design/training/types` 中的 `TrainingRuntimeProps`(它额外包含这两个字段),但运行时入口真正导出、用于编译校验的类型是 `TrainingEngineProps`。
|
|
105
|
+
|
|
106
|
+
### `trainingModel` / `modelId` 取数优先级
|
|
107
|
+
|
|
108
|
+
- 优先级:**`trainingModel`(对象)> `modelId`(字符串)**;二者皆空 → 渲染错误提示。
|
|
109
|
+
- 传 `trainingModel`:直接使用,**不发起任何网络请求**。**生产环境推荐这种方式**——由宿主自行从后端取模型后整对象传入。
|
|
110
|
+
- 传 `modelId`:当 store 内还没有模型时触发内置 `loadModel(modelId)`。**注意:当前该路径走的是内置 mock(仅 `modelId === 'banking-personal-001'` 有数据,其它 ID 抛 `Training model not found`)**,并非真实后端。除非你替换数据源,否则**不要依赖 `modelId` 路径**,请直接传 `trainingModel`。
|
|
111
|
+
- `selectedCase` 由宿主从 `model.cases` 中挑选传入;容器**不会**根据 `model.defaultCaseId` 自动选默认案例,需宿主自行据此挑初值。`selectedCase.caseId` 变化时会清空 FormRegistry 已填数据、对话缓存、证据与能力数据并重建能力图谱。
|
|
112
|
+
|
|
113
|
+
### 回调触发时机与参数
|
|
114
|
+
|
|
115
|
+
- **`onStepComplete(stepResult)`**:每当产生新的步骤评估时触发。`stepResult` 为 `StudentOperationResult`,其中 `operationData` 即该步的 `EvaluationReport`。
|
|
116
|
+
- **`onComplete(result)`**:在「最后一步且已产生评估且会话已建立」时触发。`result: TrainingResult`,`totalScore` 为各步评估的平均分。注意 `completedStages` 取的是**总阶段数**,`startTime`/`endTime` 为**回调瞬时时间**(非真实起止);若需精确时长,宿主请自行记录。
|
|
117
|
+
- **`onError(error)`**:模型加载失败等错误时触发,参数为标准 `Error`。
|
|
118
|
+
|
|
119
|
+
### 宿主接入前提
|
|
120
|
+
|
|
121
|
+
- **antd ConfigProvider**:非强制,但推荐在外层包一层 `<ConfigProvider locale={zhCN}>` 以统一主题与中文文案、挂载 `message` 容器。组件自身主题由 `model.uiConfig.theme` 解析,与 antd 主题相互独立。
|
|
122
|
+
- **视图模式**:运行时支持 `classic` / `immersive` / `dashboard` 三种视图,默认 `dashboard`。当前通过内部 `appConfig` 控制(`updateAppConfig` 尚未在公共入口导出,如需切换请联系库维护方暴露该入口)。
|
|
123
|
+
- **Coze token**:运行时 AI 调用由内置 `tokenManager` 基于 `currentUser.userId` 自动换取短期 token(OAuth jwt-bearer 流程),**宿主无需手动传 Coze token**,但必须保证 `tokenManager` 依赖的 JWT 签发后端在宿主环境可用,且配置了有效 `botId`(见《Coze / AI 接入前置》)。
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## 创建向导 `StepByStepCreator`
|
|
128
|
+
|
|
129
|
+
五步式向导,通过对话 + AI 生成产出一份完整 `TrainingModel`。宿主通过 props 注入 token、持久化与通知能力。
|
|
130
|
+
|
|
131
|
+
### Props(`StepByStepCreatorProps`)
|
|
132
|
+
|
|
133
|
+
| 字段 | 类型 | 必填 | 说明 |
|
|
134
|
+
|---|---|---|---|
|
|
135
|
+
| `cozeToken` | `string` | 否¹ | 静态 Coze Token(**无法刷新**,无自愈能力) |
|
|
136
|
+
| `getToken` | `TokenProvider` | 否¹ | 动态 token 提供器 `(forceRefresh?: boolean) => string \| Promise<string>`,**优先级高于 `cozeToken`** |
|
|
137
|
+
| `persistence` | `CreatorPersistenceAdapter` | 否 | 进度持久化;**不传时回退到 `createLocalStorageCreatorPersistence()`**(localStorage,默认 30 分钟过期) |
|
|
138
|
+
| `notify` | `CreatorNotifyAdapter` | 否 | 通知适配器;**不传时回退到 antd `message`** |
|
|
139
|
+
| `onComplete` | `(model: TrainingModel) => void` | **是** | 五步走完、全局验收 `pass` 且终检通过后回调,返回完整模型 |
|
|
140
|
+
| `onCancel` | `() => void` | **是** | 用户取消时回调(取消前会弹二次确认,进度已自动保存可续编) |
|
|
141
|
+
|
|
142
|
+
¹ `cozeToken` 与 `getToken` **至少传其一**,否则首次取 token 时抛「缺少 Coze Token」。
|
|
143
|
+
|
|
144
|
+
### token:静态 vs 动态 + 4101 自愈
|
|
20
145
|
|
|
21
|
-
- `
|
|
22
|
-
- `
|
|
23
|
-
-
|
|
146
|
+
- **`getToken` 优先于 `cozeToken`**。`cozeToken` 是一次性静态串,即使上层 `forceRefresh=true` 也只能返回旧值(**无自愈**)。
|
|
147
|
+
- `getToken(forceRefresh?)`:`forceRefresh=true` 表示「清缓存并重新换取」,用于 token 失效自愈。
|
|
148
|
+
- **4101 自愈需宿主注册一次**:底层在扣子返回 4101(Bearer token 不合法)时,会回退到模块级回调换新 token 重试一次。该回调**不由组件自动注册**,宿主须在应用入口调用:
|
|
149
|
+
|
|
150
|
+
```ts
|
|
151
|
+
import { setTokenInvalidHandler } from '@sim-design/training/creator';
|
|
152
|
+
|
|
153
|
+
useEffect(() => {
|
|
154
|
+
setTokenInvalidHandler(() => getToken(true)); // 开启全局 4101 自愈
|
|
155
|
+
return () => setTokenInvalidHandler(null);
|
|
156
|
+
}, [getToken]);
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
> 用静态 `cozeToken` 时无此自愈能力;若创建流程耗时较长可能跨越 token 生命周期,请改用 `getToken` 并注册上面的 handler。
|
|
160
|
+
|
|
161
|
+
### 五步流程概览
|
|
162
|
+
|
|
163
|
+
1. **意图收集** — 对话式收集训练蓝图,完成后自动触发大纲生成
|
|
164
|
+
2. **流程大纲** — AI 生成阶段 / 步骤骨架与能力图谱,支持对话式迭代修改
|
|
165
|
+
3. **步骤细节** — 两段式:环节一生成阶段契约 + 步骤任务包 + 字段声明(待确认);确认后环节二把各插件配置「落地」为 `initData` / `runtimeRules` / `evaluationRules`
|
|
166
|
+
4. **案例生成** — 先生成案例变体包,再生成案例实例数据(含逐案例答案键 `stepAnswers`)
|
|
167
|
+
5. **全局验收** — 产出发布门禁 `pass` / `block` 与验收报告;仅 `pass` 才允许完成
|
|
168
|
+
|
|
169
|
+
`onComplete(model)` 返回的是合并好基本信息、能力图谱、`caseSchema`、`cases` 的完整 `TrainingModel`,可直接持久化或投入运行时。
|
|
170
|
+
|
|
171
|
+
### 最小接入
|
|
172
|
+
|
|
173
|
+
```tsx
|
|
174
|
+
import { StepByStepCreator } from '@sim-design/training/creator';
|
|
175
|
+
|
|
176
|
+
<StepByStepCreator
|
|
177
|
+
getToken={getToken} // 或最简:cozeToken="xxxx"
|
|
178
|
+
onComplete={(model) => saveModel(model)}
|
|
179
|
+
onCancel={() => history.back()}
|
|
180
|
+
/>
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## 模型编辑器 `ModelEditor`
|
|
186
|
+
|
|
187
|
+
对一份**已存在的 `TrainingModel`** 做可视化编辑(多 Tab 面板),最终把改好的完整模型经 `onSave` 交回宿主。
|
|
188
|
+
|
|
189
|
+
### Props(`ModelEditorProps`)
|
|
190
|
+
|
|
191
|
+
| 字段 | 类型 | 必填 | 说明 |
|
|
192
|
+
|---|---|---|---|
|
|
193
|
+
| `model` | `TrainingModel` | **是** | 待编辑的完整模型(初始状态) |
|
|
194
|
+
| `onSave` | `(model: TrainingModel) => void` | **是** | 点「保存」且本地校验通过后触发,参数为编辑后的完整模型 |
|
|
195
|
+
| `onCancel` | `() => void` | **是** | 点「返回」触发 |
|
|
196
|
+
| `getToken` | `TokenProvider` | 否 | 仅在面板内使用 **AI 辅助编辑**时需要;纯手动编辑可不传 |
|
|
197
|
+
| `notify` | `CreatorNotifyAdapter` | 否 | ⚠️ **当前实现未消费**——提示统一走 antd `message`,传入不改变行为 |
|
|
198
|
+
| `children` | `ReactNode` | 否 | ⚠️ **当前实现未渲染**——预留扩展位 |
|
|
199
|
+
|
|
200
|
+
> 诚实提示:`notify` 与 `children` 虽在契约中声明,但当前 `ModelEditor` 实现并未实际使用,请勿据此预期效果。
|
|
201
|
+
|
|
202
|
+
### 可编辑面板
|
|
203
|
+
|
|
204
|
+
基本信息 / 全局规则 / 阶段与步骤(含各步骤 `initData`·`runtimeRules`·`evaluationRules`·`jumpRules`,按插件类型路由到专用编辑器)/ 案例库 / 案例字段结构(`caseSchema`)/ 能力图谱 / 预览 / 外观配置(`uiConfig`)/ 原始 JSON。
|
|
205
|
+
|
|
206
|
+
### onSave 语义
|
|
207
|
+
|
|
208
|
+
- **保存完全由宿主接管**:组件内部无任何持久化逻辑,仅做本地格式校验(`modelId`/`name`/`domain`/`stages` 等必填),通过后才回调 `onSave(editedModel)`。
|
|
209
|
+
- **`onSave` 是同步回调**:组件调用后立即提示「保存成功」,**不会 `await`**,也不读返回值。若宿主保存是异步且可能失败,需在 `onSave` 内自行处理错误与提示。
|
|
210
|
+
- 回传的是一份完整 `TrainingModel`(保留 `modelId`、`createdAt` 等未编辑字段)。
|
|
211
|
+
|
|
212
|
+
```tsx
|
|
213
|
+
import { ModelEditor } from '@sim-design/training/creator';
|
|
214
|
+
|
|
215
|
+
<ModelEditor
|
|
216
|
+
model={model}
|
|
217
|
+
getToken={getToken} // 仅 AI 辅助编辑时用到
|
|
218
|
+
onSave={async (edited) => {
|
|
219
|
+
try { await api.updateModel(edited); } catch (e) { /* 自行兜底 */ }
|
|
220
|
+
}}
|
|
221
|
+
onCancel={() => history.back()}
|
|
222
|
+
/>
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
## 宿主注入适配器
|
|
228
|
+
|
|
229
|
+
从 `@sim-design/training`(或 `/types`)导出,用于把宿主的 token / 存储 / 通知能力注入创建器。
|
|
230
|
+
|
|
231
|
+
```ts
|
|
232
|
+
import {
|
|
233
|
+
createLocalStorageCreatorPersistence,
|
|
234
|
+
resolveTokenProvider,
|
|
235
|
+
resolveCreatorNotify,
|
|
236
|
+
} from '@sim-design/training';
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
- **`TokenProvider`** = `(forceRefresh?: boolean) => string | Promise<string>`。`forceRefresh=true` → 清缓存强制重取。
|
|
240
|
+
- **`CreatorPersistenceAdapter`** = `{ load(): CreatorContext | null; save(ctx): void; clear(): void }`(均可返回 Promise)。
|
|
241
|
+
- `createLocalStorageCreatorPersistence({ storageKey?, expireMs? })`:默认 key `admin_creator_context`、过期 30 分钟;超期 `load()` 返回 `null`。
|
|
242
|
+
- **`CreatorNotifyAdapter`** = `{ success(msg); error(msg); warning(msg); info?(msg) }`。不传则回退 antd `message`。
|
|
243
|
+
- **`setTokenInvalidHandler(handler | null)`**:注册 / 清除模块级 4101 token 失效自愈回调(见上文创建器章节)。
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
## 核心数据契约 `TrainingModel`
|
|
248
|
+
|
|
249
|
+
权威类型来自 `@sim-design/training/types`。一个 `TrainingModel` 是一次实训的完整描述:声明业务领域、全局通过线、案例数据结构、案例库、能力图谱,以及由「阶段 → 步骤」构成的训练流程树。
|
|
250
|
+
|
|
251
|
+
### 顶层结构
|
|
252
|
+
|
|
253
|
+
| 字段 | 类型 | 必填 | 含义 |
|
|
254
|
+
|---|---|---|---|
|
|
255
|
+
| `modelId` | `string` | 是 | 模型唯一 ID |
|
|
256
|
+
| `name` | `string` | 是 | 模型名称 |
|
|
257
|
+
| `domain` | `'banking' \| 'insurance' \| 'trade'` | 是 | 专业领域:银行 / 保险 / 外贸 |
|
|
258
|
+
| `businessType` | `string` | 否 | 业务类型 |
|
|
259
|
+
| `targetPosition` | `string` | 否 | 目标岗位 |
|
|
260
|
+
| `description` | `string` | 是 | 模型描述 |
|
|
261
|
+
| `learningObjectives` | `string` | 否 | 学习目标(顶层为整段文本,区别于 Stage/Step 的 `string[]`) |
|
|
262
|
+
| `trainingLevel` | `'undergraduate' \| 'vocational' \| 'technical'` | 否 | 实训层次 |
|
|
263
|
+
| `trainingType` | `string` | 否 | 实训类型 |
|
|
264
|
+
| `ideologicalElements` / `ideologicalRatio` | `string` / `number` | 否 | 思政元素 / 占比(0–100) |
|
|
265
|
+
| `botId` | `string` | 否 | 运行时对话 Coze 智能体 ID;运行时取值 `model.botId \|\| props.botId` |
|
|
266
|
+
| `uiConfig` | `ModelUIConfig` | 否 | 模型级 UI 配置(参与「模型级 → 插件分区 → 步骤级」三层合并) |
|
|
267
|
+
| `globalRules` | `GlobalRules` | **是** | `{ stagePassScore; stepPassScore; timeout(秒) }` |
|
|
268
|
+
| `caseSchema` | `CaseSchema` | 否 | 案例数据结构定义,约束所有 `cases[]` 字段形态 |
|
|
269
|
+
| `cases` | `Case[]` | 否 | 案例库 |
|
|
270
|
+
| `defaultCaseId` | `string` | 否 | 默认案例 ID |
|
|
271
|
+
| `abilityMap` | `AbilityMap` | 否 | 岗位能力图谱 |
|
|
272
|
+
| `stages` | `Stage[]` | **是** | 阶段列表,训练流程主干 |
|
|
273
|
+
| `createdAt` / `updatedAt` | `Date` | 否 | 时间戳 |
|
|
274
|
+
|
|
275
|
+
### 层级:TrainingModel → Stage[] → Step[]
|
|
276
|
+
|
|
277
|
+
**Stage** 关键字段:`stageId` / `stageName` / `description` / `businessType` / `order`(必填),`stageGoal` / `deliverables` / `entryCriteria` / `completionCriteria` / `commonMistakes`(可选),`stageAssessment`(阶段评估配置:跨步一致性检查 / 交付物核验 / 目标判据 / `passPolicy.stepWeights` 加权通过),`steps: Step[]`。
|
|
278
|
+
|
|
279
|
+
**Step** 关键字段与**职责三分类**:
|
|
280
|
+
|
|
281
|
+
| 字段 | 必填 | 职责 |
|
|
282
|
+
|---|---|---|
|
|
283
|
+
| `stepId` / `stepName` / `pluginId` / `order` | 是 | 标识与排序 |
|
|
284
|
+
| `pluginType` | 是 | **插件类型**,决定渲染哪个插件(见枚举表) |
|
|
285
|
+
| `initData` | 是 | **初始数据** —— 学员看到什么 / 初始态(题面、表单结构、决策题组、推演节点…),形态随 `pluginType` 变化 |
|
|
286
|
+
| `runtimeRules` | 是 | **运行时规则** —— 过程中怎么约束 / 响应(实时校验、对话扰动 / 阶段 / 分支 / 阻力、流程门禁、单据判分基准…) |
|
|
287
|
+
| `evaluationRules` | 否 | **评估规则** —— 结束后怎么打分(`dimensions` 维度、`businessRules`、`referenceAnswer` / `requiredPoints`) |
|
|
288
|
+
| `jumpRules` | 否 | 条件跳转 |
|
|
289
|
+
| `entryAnimation` | 否 | 进入动画 `{ type; narration }` |
|
|
290
|
+
| `targetAbilities` | 否 | 关联 `abilityMap` 的目标能力 `{ abilityId; targetLevel; weight }` |
|
|
291
|
+
|
|
292
|
+
> 速记:**initData = 看什么 / 初始态**;**runtimeRules = 过程怎么约束 / 响应**;**evaluationRules = 结束怎么打分**。三者互不重叠。
|
|
293
|
+
|
|
294
|
+
**PluginType 九个枚举值**:
|
|
295
|
+
|
|
296
|
+
| 枚举 | 字面量 | 插件 |
|
|
297
|
+
|---|---|---|
|
|
298
|
+
| `FORM_FILLING` | `form-filling` | 表单填写(单据 / 合同,多表单 + 实时校验 + 实时指导 + 高保真布局) |
|
|
299
|
+
| `DIALOGUE` | `dialogue` | 对话交互(客户沟通,支持运行时扰动 / 阶段 / 分支 / 阻力) |
|
|
300
|
+
| `DIALOGUE_FORM` | `dialogue-form` | 对话式表单(边聊边填) |
|
|
301
|
+
| `PROCESS_OPERATION` | `process-operation` | 流程操作 |
|
|
302
|
+
| `DOCUMENT_REVIEW` | `document-review` | 单据审核(标记不符点,自带规则判分) |
|
|
303
|
+
| `DECISION_MAKING` | `decision-making` | 决策判断(标注 → 决策 → 理由两栏式) |
|
|
304
|
+
| `CASE_ANALYSIS` | `case-analysis` | 案例分析 / 方案设计(产出文档报告,自带评估) |
|
|
305
|
+
| `STRATEGY_LAB` | `strategy-lab` | 策略实验室(决策模拟 + 多节点推演) |
|
|
306
|
+
| `KNOWLEDGE_LEARNING` | `knowledge-learning` | 知识学习 |
|
|
307
|
+
|
|
308
|
+
### Case 与 CaseSchema
|
|
309
|
+
|
|
310
|
+
- **`CaseSchemaField`**:`path`(运行时按**精确路径**取值,如 `customerInfo.年龄`、`角色池.role-1.客户类型`——必须与案例对象实际键路径一致)/ `type` / `label` / `purpose` / `usage`(`'display'` | `'evaluation'`)/ 可选 `rule`、`enumValues`、`maxLength`、`children`。
|
|
311
|
+
- **`CaseSchemaConstraint`**:字段间约束(`derived` / `consistent` / `conditional`),用于案例生成与一致性校验。
|
|
312
|
+
- **`Case`**:`caseId` / `name` / `description` / `difficulty` / `scenario`(必填),`customerInfo` / `businessData`(业务数据,结构由 CaseSchema 驱动;顶层领域中文键也可能是真正承载者,应 schema 驱动取值),`角色池: Record<角色编号, RoleConfig>`,可选 `riskPoints`、`stepAnswers`。
|
|
313
|
+
- **`Case.stepAnswers`(逐案例答案键)**:`Record<stepId, 答案键>`。分工——**Step 出「考卷 + 评分标准」**(案例无关基线,放 `evaluationRules`/`runtimeRules`);**Case 出「答案键」**(案例特定正确答案)。运行时按 `stepId` 取 `Case.stepAnswers[stepId]`,存在则覆盖 Step 基线。答案字符串支持 `{路径}` / `[表达式]`,运行时按当前案例解析。
|
|
314
|
+
|
|
315
|
+
### 评估与结果类型
|
|
316
|
+
|
|
317
|
+
- **`EvaluationReport`**(单步评估):`totalScore` / `dimensions: DimensionResult[]` / `highlights` / `improvements` / `nextStepAdvice` / `pass` / `stepId?`。
|
|
318
|
+
- **`DimensionResult`**:`name` / `score` / `feedback` / `errors?` / `suggestions?`。
|
|
319
|
+
- **`StageAssessmentReport`**(阶段评估产出):`stageId` / `totalScore` / `pass` / `stepBreakdown` / `consistencyIssues` / `deliverableResults` / `goalAchievement` / `highlights` / `improvements`。
|
|
320
|
+
- **`StudentOperationResult`**(单步操作产出):`stepId` / `operationType` / `operationData` / `operationLog` / `timestamp` / `evidenceSummary?`。
|
|
321
|
+
- **`EvidenceSummary`**(跨步骤传递的摘要证据):`sourceStepId` / `title` / `summary` / `keyFacts[{label,value}]` / `riskFlags?` / `conclusion?` / `rawRef?`。
|
|
322
|
+
- **`TrainingResult`**(整场结果,`onComplete` 回传):`sessionId` / `studentId` / `modelId` / `completedStages` / `totalScore` / `evaluationHistory: EvaluationReport[]` / `operationLog` / `startTime` / `endTime`。
|
|
323
|
+
|
|
324
|
+
### AbilityMap 能力图谱
|
|
325
|
+
|
|
326
|
+
`AbilityMap = { targetPosition; version; abilities: AbilityNode[]; totalWeight }`。`AbilityNode = { id; name; category('basic'|'core'|'comprehensive'); weight; description?; children?; relatedSteps? }`。关联回路:`Step.targetAbilities[].abilityId` ↔ `AbilityNode.id`,`AbilityNode.relatedSteps[]` ↔ `Step.stepId`。
|
|
327
|
+
|
|
328
|
+
### 最小可运行 JSON 骨架(1 stage / 1 step / 1 case)
|
|
329
|
+
|
|
330
|
+
```json
|
|
331
|
+
{
|
|
332
|
+
"modelId": "model-demo-001",
|
|
333
|
+
"name": "养老规划师·客户面谈示范",
|
|
334
|
+
"domain": "insurance",
|
|
335
|
+
"businessType": "养老规划面谈",
|
|
336
|
+
"targetPosition": "养老规划师",
|
|
337
|
+
"description": "演示用最小模型",
|
|
338
|
+
"botId": "7300000000000000000",
|
|
339
|
+
"globalRules": { "stagePassScore": 60, "stepPassScore": 60, "timeout": 1800 },
|
|
340
|
+
"caseSchema": {
|
|
341
|
+
"fields": [
|
|
342
|
+
{ "path": "customerInfo.姓名", "type": "string", "label": "客户姓名", "purpose": "标识服务对象身份", "usage": ["display"] },
|
|
343
|
+
{ "path": "customerInfo.年龄", "type": "number", "label": "客户年龄", "purpose": "评估养老规划适配性", "usage": ["display", "evaluation"], "rule": "45-60 临退休人群" }
|
|
344
|
+
],
|
|
345
|
+
"constraints": []
|
|
346
|
+
},
|
|
347
|
+
"cases": [
|
|
348
|
+
{
|
|
349
|
+
"caseId": "case-001", "name": "临退休张先生", "description": "55 岁临退休客户的养老规划诉求",
|
|
350
|
+
"difficulty": "medium", "scenario": "张先生即将退休,关心养老金缺口与稳健配置。",
|
|
351
|
+
"customerInfo": { "姓名": "张建国", "年龄": 55 }, "businessData": {},
|
|
352
|
+
"riskPoints": ["养老金替代率不足"],
|
|
353
|
+
"角色池": { "role-1": { "角色编号": "role-1", "角色名称": "临退休客户张先生", "角色类型": "客户", "沟通风格": "谨慎、关注本金安全" } },
|
|
354
|
+
"stepAnswers": { "step-001": { "referenceAnswer": "应识别养老金缺口并提出稳健型配置建议", "requiredPoints": ["测算替代率", "强调本金安全", "给出补充方案"] } }
|
|
355
|
+
}
|
|
356
|
+
],
|
|
357
|
+
"defaultCaseId": "case-001",
|
|
358
|
+
"abilityMap": {
|
|
359
|
+
"targetPosition": "养老规划师", "version": "1.0", "totalWeight": 1,
|
|
360
|
+
"abilities": [ { "id": "ab-needs", "name": "需求挖掘", "category": "core", "weight": 1, "relatedSteps": ["step-001"] } ]
|
|
361
|
+
},
|
|
362
|
+
"stages": [
|
|
363
|
+
{
|
|
364
|
+
"stageId": "stage-001", "stageName": "面谈与方案建议", "description": "完成客户面谈并产出方案建议",
|
|
365
|
+
"businessType": "养老规划面谈", "stageGoal": "准确识别客户养老需求并给出合规建议", "order": 1,
|
|
366
|
+
"stageAssessment": {
|
|
367
|
+
"consistencyChecks": [],
|
|
368
|
+
"deliverableChecks": [ { "deliverable": "方案建议", "criteria": ["覆盖养老金缺口测算"] } ],
|
|
369
|
+
"goalCriteria": ["需求识别准确", "建议合规稳健"],
|
|
370
|
+
"passPolicy": { "stepWeights": { "step-001": 1 }, "passScore": 60 }
|
|
371
|
+
},
|
|
372
|
+
"steps": [
|
|
373
|
+
{
|
|
374
|
+
"stepId": "step-001", "stepName": "撰写养老规划方案", "pluginId": "case-analysis",
|
|
375
|
+
"pluginType": "case-analysis", "order": 1,
|
|
376
|
+
"initData": { "title": "养老规划方案设计", "materials": ["客户基本信息", "现有资产概况"] },
|
|
377
|
+
"runtimeRules": {},
|
|
378
|
+
"evaluationRules": {
|
|
379
|
+
"dimensions": [ { "name": "需求识别准确性", "weight": 0.5, "checkPoints": ["替代率测算"] }, { "name": "建议合规性", "weight": 0.5 } ],
|
|
380
|
+
"businessRules": ["不得承诺保本高收益"],
|
|
381
|
+
"referenceAnswer": "应识别养老金缺口并提出稳健型配置建议",
|
|
382
|
+
"requiredPoints": ["测算替代率", "强调本金安全"]
|
|
383
|
+
},
|
|
384
|
+
"entryAnimation": { "type": "scene-change", "narration": "你坐在张先生对面,面谈即将开始……" },
|
|
385
|
+
"targetAbilities": [ { "abilityId": "ab-needs", "targetLevel": 80, "weight": 1 } ]
|
|
386
|
+
}
|
|
387
|
+
]
|
|
388
|
+
}
|
|
389
|
+
]
|
|
390
|
+
}
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
> 各插件 `initData` / `runtimeRules` 内部结构随 `pluginType` 而定,顶层契约保持稳定、插件内部以 `any` 灵活承载——这是有意为之。
|
|
394
|
+
|
|
395
|
+
---
|
|
396
|
+
|
|
397
|
+
## Coze / AI 接入前置
|
|
398
|
+
|
|
399
|
+
运行时 AI 评估、创建向导生成、角色对话 / 指导 / 答疑等能力均依赖**扣子(Coze 国内版,`https://api.coze.cn`)**。
|
|
400
|
+
|
|
401
|
+
### Token 形态与流向
|
|
402
|
+
|
|
403
|
+
库内置 `tokenManager` 走 **JWT-Bearer OAuth** 流程(非长期 PAT):宿主后端用应用私钥签发 RS256 JWT → 前端拿 JWT 换取**短期 `access_token`(约 1 天有效)** → 注入所有 Coze 调用,缓存于 `localStorage` 并到期前主动刷新。
|
|
404
|
+
|
|
405
|
+
- 运行时:由容器基于 `currentUser.userId` 自动获取,宿主无需手动传 token,但需保证 JWT 签发后端可用。
|
|
406
|
+
- 创建器 / 编辑器:宿主传 `getToken`(推荐)或 `cozeToken`。
|
|
407
|
+
- **4101 自愈**:扣子返回 4101 时自动换新 token 重试一次;模块级兜底需宿主注册 `setTokenInvalidHandler(() => getToken(true))`(见创建器章节)。
|
|
408
|
+
|
|
409
|
+
### 需在扣子平台预置的智能体(bot)
|
|
410
|
+
|
|
411
|
+
智能体 `botId` 集中在 `configs/agentConfig.ts`,系统提示词见 `docs/coze-prompts/`。按用途:
|
|
412
|
+
|
|
413
|
+
- **创建类**:`INTENT_DISCOVERY`(意图)、`MODEL_OUTLINE`(大纲)、`MODEL_DETAIL`(细节契约)、`CASE_VARIANT_GENERATOR`(案例变体)、`CASE_INSTANCE_GENERATOR`(案例实例 + 答案键)。
|
|
414
|
+
- **落地类**(创建环节二,按插件各一):`LANDING_DIALOGUE` / `LANDING_DIALOGUE_FORM` / `LANDING_FORM_FILLING` / `LANDING_CASE_ANALYSIS` / `LANDING_DOCUMENT_REVIEW` / `LANDING_DECISION_MAKING` / `LANDING_STRATEGY_LAB` / `LANDING_GENERIC`(兜底,`botId` 为空需自配)。
|
|
415
|
+
- **运行时 / 评估类**:`ACTOR_AGENT`(角色扮演)、`EVALUATOR_AGENT`(评估)、`COACH_AGENT`(实时指导)、`TUTOR_AGENT`(答疑)、`STAGE_EVALUATOR_AGENT`(阶段评估)、`STRATEGY_LAB`(推演)、`FORM_LAYOUT_GENERATOR`(表单布局生成)等。
|
|
416
|
+
|
|
417
|
+
> `agentConfig.ts` 中的 `botId` **硬编码指向当前部署的扣子工作空间**。宿主接入须在自己的工作空间新建 / 替换 bot 并回填 `botId`,同时把对应系统提示词同步到扣子平台。运行时主对话 bot 写入各 `TrainingModel.botId`。
|
|
418
|
+
|
|
419
|
+
### 宿主最小前置清单
|
|
420
|
+
|
|
421
|
+
1. 开通扣子平台并完成 API 访问开通;
|
|
422
|
+
2. 按上表新建 bot、配置系统提示词、回填 `botId`;
|
|
423
|
+
3. 搭建可签发 RS256 JWT 的 token 后端(或自管 token 直接提供 `cozeToken` / `getToken`);
|
|
424
|
+
4. 把 token 注入组件,并在入口注册 `setTokenInvalidHandler`。
|
|
425
|
+
|
|
426
|
+
### 不接 Coze 的能力边界
|
|
427
|
+
|
|
428
|
+
- **可用**:运行已有模型(步骤渲染、插件交互、学员填写 / 操作、声明式实时校验、确定性评分如表达式 / 答案键比对)、后台对已有模型的手工查看与编辑。
|
|
429
|
+
- **不可用**:创建向导的全部 AI 生成、运行时的角色对话 / 实时指导 / 智能答疑 / AI 维度评估 / 阶段评估 / 策略推演 / 表单布局 AI 生成。
|
|
430
|
+
|
|
431
|
+
---
|
|
432
|
+
|
|
433
|
+
## 打包结构与依赖策略
|
|
434
|
+
|
|
435
|
+
- **入口**:`vite.lib.config.ts` 以 4 个入口(`index`/`runtime`/`creator`/`types`)做 ESM 库构建,输出 `dist/*.js`;类型由 `tsconfig.build.json`(`emitDeclarationOnly`)输出到 `dist-types/`。
|
|
436
|
+
- **外置依赖**(不打包,宿主提供):`react`、`react-dom`、`antd`、`@coze/api`。
|
|
437
|
+
- **随包自带**:上述 4 项之外的全部依赖打进产物(换取宿主零额外安装,代价是约 10MB 解包体积)。
|
|
438
|
+
- **样式**:lib 构建未启用 tailwind;以内联样式 + antd CSS-in-JS 为主,**无独立 `.css`**。
|
|
439
|
+
- **静态资源**:`dist/images/healthcare/bg.jpg` 随包(被运行时容器与策略实验室引用)。
|
|
440
|
+
- **`files`**:`["dist", "dist-types", "README.md"]`——确保 JS、图片、完整 193 个 `.d.ts` 与说明随包,源码 / 测试 / 配置不进包。
|
|
441
|
+
|
|
442
|
+
---
|
|
443
|
+
|
|
444
|
+
## 本地构建与发布
|
|
445
|
+
|
|
446
|
+
| 命令 | 作用 |
|
|
447
|
+
|---|---|
|
|
448
|
+
| `npm run build:lib` | 库构建:`vite build --config vite.lib.config.ts && tsc -p tsconfig.build.json` |
|
|
449
|
+
| `npm run pack:lib` | 构建 + `npm pack`,本地打 `.tgz` 自检(不上传) |
|
|
450
|
+
| `npm run publish:lib` | 构建 + `npm publish --access public` |
|
|
451
|
+
| `prepublishOnly` | `npm publish` / `npm pack` 前自动触发 `build:lib` |
|
|
452
|
+
|
|
453
|
+
**发布 runbook**:
|
|
454
|
+
|
|
455
|
+
```bash
|
|
456
|
+
# 1. 升版本号(scoped 包同版本号不可重复发布)
|
|
457
|
+
npm version patch # 或 minor / major
|
|
458
|
+
|
|
459
|
+
# 2. 登录 npm(scoped 包需有 @sim-design 组织发布权限)
|
|
460
|
+
npm login # npm whoami 验证
|
|
461
|
+
|
|
462
|
+
# 3. 构建并自检进包内容
|
|
463
|
+
npm run build:lib
|
|
464
|
+
npm pack # tar -tf <包名>-<版本>.tgz 核对:4 入口 JS + 图片 + 完整 dist-types + README
|
|
465
|
+
|
|
466
|
+
# 4. 正式发布
|
|
467
|
+
npm publish --access public
|
|
468
|
+
|
|
469
|
+
# 5. 校验
|
|
470
|
+
npm view @sim-design/training version
|
|
471
|
+
```
|
|
472
|
+
|
|
473
|
+
---
|
|
474
|
+
|
|
475
|
+
## 已知限制 / 注意事项
|
|
476
|
+
|
|
477
|
+
- **`modelId` 路径走内置 mock**:运行时仅 `banking-personal-001` 有 mock 数据,生产请直接传 `trainingModel` 对象。
|
|
478
|
+
- **运行时无 `externalToken` prop**:运行时 AI token 由内置 `tokenManager`(依赖 JWT 签发后端)管理,当前无法通过 prop 直接注入外部 token。
|
|
479
|
+
- **`ModelEditor` 的 `notify` / `children` 未被消费**:传入无效果。
|
|
480
|
+
- **`updateAppConfig` 未公开导出**:视图模式(classic/immersive/dashboard)切换入口当前未暴露。
|
|
481
|
+
- **包体积约 10MB**:建议对接入页面做路由级懒加载。
|
|
482
|
+
- **仅浏览器环境**:依赖 `localStorage` / `sessionStorage`,SSR 需仅客户端渲染。
|
|
483
|
+
|
|
484
|
+
---
|
|
485
|
+
|
|
486
|
+
## 本地开发(库维护方)
|
|
487
|
+
|
|
488
|
+
```bash
|
|
489
|
+
cd client
|
|
490
|
+
npm install
|
|
491
|
+
npm run dev # 启动应用态开发服务器(端口 3000)
|
|
492
|
+
npm run test # vitest
|
|
493
|
+
npm run build:lib # 产出库
|
|
494
|
+
```
|
|
24
495
|
|
|
25
|
-
|
|
496
|
+
> 注:`client/.npmrc` 若存在编码异常(UTF-16)会在 npm 命令时产生无害告警,建议删除或以 UTF-8 重写。
|
|
26
497
|
|
|
27
|
-
`StepByStepCreator` 支持宿主系统注入:
|
|
28
498
|
|
|
29
|
-
- `cozeToken` 或 `getToken`
|
|
30
|
-
- `persistence`
|
|
31
|
-
- `notify`
|
|
32
499
|
|
|
33
|
-
`ModelEditor` 的保存动作完全由宿主系统通过 `onSave` 接管。
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as a, _ as o } from "./
|
|
1
|
+
import { I as a, _ as o } from "./CaseDetailContent-Y7Q430MG.js";
|
|
2
2
|
import * as e from "react";
|
|
3
3
|
var n = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z" } }] }, name: "arrow-left", theme: "outlined" }, c = function(r, t) {
|
|
4
4
|
return /* @__PURE__ */ e.createElement(a, o({}, r, {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { I as a, _ as o } from "./CaseDetailContent-DT5nCtRT.js";
|
|
2
|
+
import * as e from "react";
|
|
3
|
+
var n = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z" } }] }, name: "arrow-left", theme: "outlined" }, c = function(r, t) {
|
|
4
|
+
return /* @__PURE__ */ e.createElement(a, o({}, r, {
|
|
5
|
+
ref: t,
|
|
6
|
+
icon: n
|
|
7
|
+
}));
|
|
8
|
+
}, f = /* @__PURE__ */ e.forwardRef(c);
|
|
9
|
+
process.env.NODE_ENV !== "production" && (f.displayName = "ArrowLeftOutlined");
|
|
10
|
+
export {
|
|
11
|
+
f as R
|
|
12
|
+
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { u as U, a as Z, r as S, j as s, R as D, b as ee } from "./
|
|
1
|
+
import { u as U, a as Z, r as S, j as s, R as D, b as ee } from "./CaseDetailContent-DT5nCtRT.js";
|
|
2
2
|
import se, { useState as Q, useMemo as u } from "react";
|
|
3
3
|
import { Radio as X, Space as re } from "antd";
|
|
4
|
-
import { n as oe, a as te } from "./judgement-
|
|
5
|
-
import { b as ne, g as H } from "./DecisionShared-
|
|
6
|
-
import { R } from "./CheckCircleFilled-
|
|
7
|
-
import { R as le } from "./ArrowLeftOutlined-
|
|
8
|
-
import { R as ie } from "./
|
|
4
|
+
import { n as oe, a as te } from "./judgement-xTGXlDcn.js";
|
|
5
|
+
import { b as ne, g as H } from "./DecisionShared-BHq1lEqt.js";
|
|
6
|
+
import { R } from "./CheckCircleFilled-CnslIY7j.js";
|
|
7
|
+
import { R as le } from "./ArrowLeftOutlined-D785XjyB.js";
|
|
8
|
+
import { R as ie } from "./TrainingModelContainer-yi8W6KFl.js";
|
|
9
9
|
function t(r, L) {
|
|
10
10
|
const f = (r.startsWith("#") ? r.slice(1, 7) : r).slice(0, 6);
|
|
11
11
|
if (f.length !== 6) return r;
|
|
12
12
|
const p = parseInt(f.slice(0, 2), 16), z = parseInt(f.slice(2, 4), 16), i = parseInt(f.slice(4, 6), 16);
|
|
13
13
|
return `rgba(${p},${z},${i},${L})`;
|
|
14
14
|
}
|
|
15
|
-
const ye = ({ initData: r,
|
|
15
|
+
const ye = ({ initData: r, runtimeRules: L, onFinish: f }) => {
|
|
16
16
|
var N, q, K, Y;
|
|
17
17
|
const [p, z] = Q({}), [i, I] = Q(0), { currentCase: T } = U(), h = Z((o) => o.filledData), e = u(() => {
|
|
18
18
|
var o;
|