@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
|
@@ -0,0 +1,596 @@
|
|
|
1
|
+
import { k as Z, j as e, l as ne, i as re, a as te, r as N } from "./CaseDetailContent-DT5nCtRT.js";
|
|
2
|
+
import { Drawer as se, Segmented as de, Empty as J, Badge as k, Tooltip as U, Input as ie, Button as G, message as ae } from "antd";
|
|
3
|
+
import { u as ce } from "./useDialogueLogic-vOJ9XRNP.js";
|
|
4
|
+
import { a as fe } from "./judgement-xTGXlDcn.js";
|
|
5
|
+
import ge, { useState as P, useRef as xe, useEffect as pe, useMemo as A } from "react";
|
|
6
|
+
import { a as D, e as he, f as ue, r as be } from "./TrainingModelContainer-yi8W6KFl.js";
|
|
7
|
+
const ye = {
|
|
8
|
+
info: {
|
|
9
|
+
color: "#1677ff",
|
|
10
|
+
bg: "#e6f4ff",
|
|
11
|
+
border: "#91caff",
|
|
12
|
+
icon: /* @__PURE__ */ e.jsx(ne, {}),
|
|
13
|
+
label: "提示"
|
|
14
|
+
},
|
|
15
|
+
warning: {
|
|
16
|
+
color: "#faad14",
|
|
17
|
+
bg: "#fffbe6",
|
|
18
|
+
border: "#ffe58f",
|
|
19
|
+
icon: /* @__PURE__ */ e.jsx(ue, {}),
|
|
20
|
+
label: "警告"
|
|
21
|
+
},
|
|
22
|
+
error: {
|
|
23
|
+
color: "#ff4d4f",
|
|
24
|
+
bg: "#fff2f0",
|
|
25
|
+
border: "#ffccc7",
|
|
26
|
+
icon: /* @__PURE__ */ e.jsx(he, {}),
|
|
27
|
+
label: "错误"
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
function me(o) {
|
|
31
|
+
const r = new Date(o);
|
|
32
|
+
return `${r.getHours().toString().padStart(2, "0")}:${r.getMinutes().toString().padStart(2, "0")}:${r.getSeconds().toString().padStart(2, "0")}`;
|
|
33
|
+
}
|
|
34
|
+
const je = ({
|
|
35
|
+
item: o,
|
|
36
|
+
index: r,
|
|
37
|
+
total: f
|
|
38
|
+
}) => {
|
|
39
|
+
const i = ye[o.severity], u = r === f - 1;
|
|
40
|
+
return /* @__PURE__ */ e.jsxs("div", { style: { display: "flex", gap: 12, paddingBottom: u ? 0 : 20 }, children: [
|
|
41
|
+
/* @__PURE__ */ e.jsxs("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", flexShrink: 0 }, children: [
|
|
42
|
+
/* @__PURE__ */ e.jsx(
|
|
43
|
+
"div",
|
|
44
|
+
{
|
|
45
|
+
style: {
|
|
46
|
+
width: 28,
|
|
47
|
+
height: 28,
|
|
48
|
+
borderRadius: "50%",
|
|
49
|
+
background: i.bg,
|
|
50
|
+
border: `1.5px solid ${i.border}`,
|
|
51
|
+
display: "flex",
|
|
52
|
+
alignItems: "center",
|
|
53
|
+
justifyContent: "center",
|
|
54
|
+
color: i.color,
|
|
55
|
+
fontSize: 13,
|
|
56
|
+
flexShrink: 0
|
|
57
|
+
},
|
|
58
|
+
children: i.icon
|
|
59
|
+
}
|
|
60
|
+
),
|
|
61
|
+
!u && /* @__PURE__ */ e.jsx(
|
|
62
|
+
"div",
|
|
63
|
+
{
|
|
64
|
+
style: {
|
|
65
|
+
width: 1,
|
|
66
|
+
flex: 1,
|
|
67
|
+
marginTop: 4,
|
|
68
|
+
background: "#f0f0f0",
|
|
69
|
+
minHeight: 16
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
)
|
|
73
|
+
] }),
|
|
74
|
+
/* @__PURE__ */ e.jsxs("div", { style: { flex: 1, minWidth: 0, paddingTop: 4 }, children: [
|
|
75
|
+
/* @__PURE__ */ e.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 8, marginBottom: 8 }, children: [
|
|
76
|
+
/* @__PURE__ */ e.jsx(
|
|
77
|
+
"span",
|
|
78
|
+
{
|
|
79
|
+
style: {
|
|
80
|
+
fontSize: 12,
|
|
81
|
+
padding: "2px 9px",
|
|
82
|
+
borderRadius: 4,
|
|
83
|
+
background: i.bg,
|
|
84
|
+
color: i.color,
|
|
85
|
+
border: `1px solid ${i.border}`,
|
|
86
|
+
fontWeight: 600
|
|
87
|
+
},
|
|
88
|
+
children: i.label
|
|
89
|
+
}
|
|
90
|
+
),
|
|
91
|
+
o.fieldName && /* @__PURE__ */ e.jsx(
|
|
92
|
+
"span",
|
|
93
|
+
{
|
|
94
|
+
style: {
|
|
95
|
+
fontSize: 12,
|
|
96
|
+
padding: "2px 9px",
|
|
97
|
+
borderRadius: 4,
|
|
98
|
+
background: "#f5f5f5",
|
|
99
|
+
color: "#595959",
|
|
100
|
+
border: "1px solid #d9d9d9"
|
|
101
|
+
},
|
|
102
|
+
children: o.fieldName
|
|
103
|
+
}
|
|
104
|
+
),
|
|
105
|
+
/* @__PURE__ */ e.jsx("span", { style: { fontSize: 12, color: "#bfbfbf", marginLeft: "auto" }, children: me(o.timestamp) })
|
|
106
|
+
] }),
|
|
107
|
+
/* @__PURE__ */ e.jsxs(
|
|
108
|
+
"div",
|
|
109
|
+
{
|
|
110
|
+
style: {
|
|
111
|
+
padding: "12px 14px",
|
|
112
|
+
borderRadius: 8,
|
|
113
|
+
background: o.dismissed ? "#fafafa" : "#fff",
|
|
114
|
+
border: `1px solid ${o.dismissed ? "#f0f0f0" : i.border}`,
|
|
115
|
+
opacity: o.dismissed ? 0.6 : 1
|
|
116
|
+
},
|
|
117
|
+
children: [
|
|
118
|
+
/* @__PURE__ */ e.jsx(
|
|
119
|
+
"div",
|
|
120
|
+
{
|
|
121
|
+
style: {
|
|
122
|
+
fontSize: 16,
|
|
123
|
+
color: "#1f1f1f",
|
|
124
|
+
lineHeight: 1.7,
|
|
125
|
+
marginBottom: o.suggestion ? 8 : 0
|
|
126
|
+
},
|
|
127
|
+
children: o.message
|
|
128
|
+
}
|
|
129
|
+
),
|
|
130
|
+
o.suggestion && /* @__PURE__ */ e.jsxs(
|
|
131
|
+
"div",
|
|
132
|
+
{
|
|
133
|
+
style: {
|
|
134
|
+
fontSize: 15,
|
|
135
|
+
color: "#3f10ebff",
|
|
136
|
+
lineHeight: 1.65,
|
|
137
|
+
paddingTop: 8,
|
|
138
|
+
borderTop: "1px dashed #f0f0f0"
|
|
139
|
+
},
|
|
140
|
+
children: [
|
|
141
|
+
"💡 ",
|
|
142
|
+
o.suggestion
|
|
143
|
+
]
|
|
144
|
+
}
|
|
145
|
+
)
|
|
146
|
+
]
|
|
147
|
+
}
|
|
148
|
+
)
|
|
149
|
+
] })
|
|
150
|
+
] });
|
|
151
|
+
}, ve = ({ open: o, onClose: r }) => {
|
|
152
|
+
const f = Z((s) => s.items), [i, u] = P("all"), g = {
|
|
153
|
+
all: f.length,
|
|
154
|
+
info: f.filter((s) => s.severity === "info").length,
|
|
155
|
+
warning: f.filter((s) => s.severity === "warning").length,
|
|
156
|
+
error: f.filter((s) => s.severity === "error").length
|
|
157
|
+
}, b = i === "all" ? [...f].reverse() : [...f].filter((s) => s.severity === i).reverse(), w = [
|
|
158
|
+
{ label: /* @__PURE__ */ e.jsxs("span", { children: [
|
|
159
|
+
"全部 ",
|
|
160
|
+
/* @__PURE__ */ e.jsx(k, { count: g.all, size: "small", style: { backgroundColor: "#8c8c8c" } })
|
|
161
|
+
] }), value: "all" },
|
|
162
|
+
{ label: /* @__PURE__ */ e.jsxs("span", { children: [
|
|
163
|
+
"提示 ",
|
|
164
|
+
/* @__PURE__ */ e.jsx(k, { count: g.info, size: "small", style: { backgroundColor: "#1677ff" } })
|
|
165
|
+
] }), value: "info" },
|
|
166
|
+
{ label: /* @__PURE__ */ e.jsxs("span", { children: [
|
|
167
|
+
"警告 ",
|
|
168
|
+
/* @__PURE__ */ e.jsx(k, { count: g.warning, size: "small", style: { backgroundColor: "#faad14" } })
|
|
169
|
+
] }), value: "warning" },
|
|
170
|
+
{ label: /* @__PURE__ */ e.jsxs("span", { children: [
|
|
171
|
+
"错误 ",
|
|
172
|
+
/* @__PURE__ */ e.jsx(k, { count: g.error, size: "small", style: { backgroundColor: "#ff4d4f" } })
|
|
173
|
+
] }), value: "error" }
|
|
174
|
+
];
|
|
175
|
+
return /* @__PURE__ */ e.jsxs(
|
|
176
|
+
se,
|
|
177
|
+
{
|
|
178
|
+
title: /* @__PURE__ */ e.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
179
|
+
/* @__PURE__ */ e.jsx(D, { style: { color: "#faad14" } }),
|
|
180
|
+
/* @__PURE__ */ e.jsx("span", { children: "实时指导记录" }),
|
|
181
|
+
/* @__PURE__ */ e.jsx(
|
|
182
|
+
k,
|
|
183
|
+
{
|
|
184
|
+
count: g.all,
|
|
185
|
+
style: { backgroundColor: "#1677ff", marginLeft: 4 }
|
|
186
|
+
}
|
|
187
|
+
)
|
|
188
|
+
] }),
|
|
189
|
+
placement: "right",
|
|
190
|
+
width: 420,
|
|
191
|
+
open: o,
|
|
192
|
+
onClose: r,
|
|
193
|
+
styles: {
|
|
194
|
+
body: { padding: "20px 24px" },
|
|
195
|
+
header: { borderBottom: "1px solid #f0f0f0" }
|
|
196
|
+
},
|
|
197
|
+
children: [
|
|
198
|
+
/* @__PURE__ */ e.jsx("div", { style: { marginBottom: 16 }, children: /* @__PURE__ */ e.jsx(
|
|
199
|
+
de,
|
|
200
|
+
{
|
|
201
|
+
options: w,
|
|
202
|
+
value: i,
|
|
203
|
+
onChange: (s) => u(s),
|
|
204
|
+
size: "small",
|
|
205
|
+
style: { width: "100%" }
|
|
206
|
+
}
|
|
207
|
+
) }),
|
|
208
|
+
b.length === 0 ? /* @__PURE__ */ e.jsx(
|
|
209
|
+
J,
|
|
210
|
+
{
|
|
211
|
+
image: J.PRESENTED_IMAGE_SIMPLE,
|
|
212
|
+
description: /* @__PURE__ */ e.jsx("span", { style: { fontSize: 14, color: "#8c8c8c" }, children: g.all === 0 ? "暂无指导记录" : "该类型暂无记录" }),
|
|
213
|
+
style: { marginTop: 40 }
|
|
214
|
+
}
|
|
215
|
+
) : /* @__PURE__ */ e.jsx("div", { children: b.map((s, a) => /* @__PURE__ */ e.jsx(
|
|
216
|
+
je,
|
|
217
|
+
{
|
|
218
|
+
item: s,
|
|
219
|
+
index: a,
|
|
220
|
+
total: b.length
|
|
221
|
+
},
|
|
222
|
+
s.id
|
|
223
|
+
)) })
|
|
224
|
+
]
|
|
225
|
+
}
|
|
226
|
+
);
|
|
227
|
+
}, { TextArea: Se } = ie;
|
|
228
|
+
function X(o) {
|
|
229
|
+
const r = new Date(o);
|
|
230
|
+
return `${r.getHours().toString().padStart(2, "0")}:${r.getMinutes().toString().padStart(2, "0")}`;
|
|
231
|
+
}
|
|
232
|
+
function ke(o) {
|
|
233
|
+
switch (o) {
|
|
234
|
+
case "happy":
|
|
235
|
+
return { bg: "#f0fdf4", border: "#bbf7d0" };
|
|
236
|
+
case "confused":
|
|
237
|
+
return { bg: "#fff7ed", border: "#fed7aa" };
|
|
238
|
+
case "angry":
|
|
239
|
+
return { bg: "#fef2f2", border: "#fca5a5" };
|
|
240
|
+
default:
|
|
241
|
+
return { bg: "#f6f7f9", border: "#e8e8e8" };
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
function we(o) {
|
|
245
|
+
switch (o) {
|
|
246
|
+
case "happy":
|
|
247
|
+
return { val: 16, label: "平静", color: "#16a34a", bg: "#dcfce7" };
|
|
248
|
+
case "confused":
|
|
249
|
+
return { val: 60, label: "困惑", color: "#f59e0b", bg: "#fff7ed" };
|
|
250
|
+
case "angry":
|
|
251
|
+
return { val: 90, label: "不满", color: "#ef4444", bg: "#fef2f2" };
|
|
252
|
+
default:
|
|
253
|
+
return { val: 38, label: "平和", color: "#16a34a", bg: "#dcfce7" };
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
function ze(o) {
|
|
257
|
+
switch (o) {
|
|
258
|
+
case "excellent":
|
|
259
|
+
return { label: "优秀", color: "#16a34a", bg: "#f0fdf4", badgeBg: "#dcfce7" };
|
|
260
|
+
case "good":
|
|
261
|
+
return { label: "良好", color: "#16a34a", bg: "#f0fdf4", badgeBg: "#dcfce7" };
|
|
262
|
+
case "average":
|
|
263
|
+
return { label: "合格", color: "#ea580c", bg: "#fff7ed", badgeBg: "#fed7aa" };
|
|
264
|
+
case "poor":
|
|
265
|
+
return { label: "待改进", color: "#dc2626", bg: "#fef2f2", badgeBg: "#fecaca" };
|
|
266
|
+
default:
|
|
267
|
+
return { label: "已点评", color: "#ea580c", bg: "#fff7ed", badgeBg: "#fed7aa" };
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
const Ie = ({
|
|
271
|
+
messages: o,
|
|
272
|
+
input: r,
|
|
273
|
+
aiResponding: f,
|
|
274
|
+
aiError: i,
|
|
275
|
+
dialogueLogCount: u,
|
|
276
|
+
scenario: g,
|
|
277
|
+
dialogueGoals: b,
|
|
278
|
+
tellerRoleName: w,
|
|
279
|
+
customerRoleName: s,
|
|
280
|
+
customerProfile: a,
|
|
281
|
+
tellerProfile: y,
|
|
282
|
+
uiConfig: x,
|
|
283
|
+
onInputChange: I,
|
|
284
|
+
onSend: T,
|
|
285
|
+
onComplete: R,
|
|
286
|
+
phases: p,
|
|
287
|
+
currentPhaseId: j,
|
|
288
|
+
phaseHistory: t = []
|
|
289
|
+
}) => {
|
|
290
|
+
var Q;
|
|
291
|
+
const M = be(x.theme), d = x.tellerBubbleColor || M.primaryColor, z = x.showAvatar !== !1, C = x.showTimestamp !== !1, W = x.inputPlaceholder || "输入你的回复,Enter 发送 / Shift+Enter 换行...", $ = x.submitButtonText || "完成对话", [h, B] = P(!1), v = Z((l) => l.items.length), q = xe(null);
|
|
292
|
+
pe(() => {
|
|
293
|
+
var l;
|
|
294
|
+
(l = q.current) == null || l.scrollIntoView({ behavior: "smooth" });
|
|
295
|
+
}, [o, f]);
|
|
296
|
+
const S = (a == null ? void 0 : a.name) || s, H = (y == null ? void 0 : y.name) || w, V = A(() => {
|
|
297
|
+
var l;
|
|
298
|
+
if (p && p.length) {
|
|
299
|
+
const c = p.findIndex((m) => m.id === j), n = c >= 0 ? p[c] : p[0];
|
|
300
|
+
return ((l = n == null ? void 0 : n.goals) == null ? void 0 : l.join(";")) || "";
|
|
301
|
+
}
|
|
302
|
+
return (b == null ? void 0 : b.join(";")) || "";
|
|
303
|
+
}, [p, j, b]), ee = /* @__PURE__ */ e.jsxs("div", { style: { flex: "0 0 64%", display: "flex", flexDirection: "column", background: "#fff", borderRight: "1px solid #e8e8e8", minWidth: 0 }, children: [
|
|
304
|
+
/* @__PURE__ */ e.jsxs("div", { style: { padding: "12px 20px", background: "#fafbfc", borderBottom: "1px solid #e8e8e8", display: "flex", alignItems: "center", gap: 12, flexShrink: 0 }, children: [
|
|
305
|
+
/* @__PURE__ */ e.jsx("span", { style: { background: d, color: "#fff", padding: "3px 12px", borderRadius: 12, fontSize: 12, fontWeight: 600, flexShrink: 0 }, children: "场景" }),
|
|
306
|
+
/* @__PURE__ */ e.jsx(U, { title: g || "对话场景", placement: "bottomLeft", children: /* @__PURE__ */ e.jsx("span", { style: { fontSize: 15, fontWeight: 600, color: "#1a1a2e", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", minWidth: 0 }, children: g || "对话场景" }) })
|
|
307
|
+
] }),
|
|
308
|
+
/* @__PURE__ */ e.jsxs("div", { className: "dialogue-chat-area", style: { flex: 1, overflowY: "auto", padding: 24, display: "flex", flexDirection: "column", gap: 16, minHeight: 0 }, children: [
|
|
309
|
+
o.map((l, c) => {
|
|
310
|
+
const n = l.role === "teller", m = ke(l.emotion);
|
|
311
|
+
return /* @__PURE__ */ e.jsxs("div", { style: { display: "flex", gap: 10, alignItems: "flex-start", maxWidth: "86%", alignSelf: n ? "flex-end" : "flex-start", flexDirection: n ? "row-reverse" : "row" }, children: [
|
|
312
|
+
z && /* @__PURE__ */ e.jsx("div", { style: { width: 40, height: 40, borderRadius: "50%", flexShrink: 0, display: "flex", alignItems: "center", justifyContent: "center", fontSize: 15, fontWeight: 700, color: "#fff", background: n ? d : "#f59e0b" }, children: (n ? H : S)[0] }),
|
|
313
|
+
/* @__PURE__ */ e.jsxs("div", { style: { minWidth: 0 }, children: [
|
|
314
|
+
/* @__PURE__ */ e.jsx("div", { style: {
|
|
315
|
+
padding: "11px 16px",
|
|
316
|
+
fontSize: 15,
|
|
317
|
+
lineHeight: 1.7,
|
|
318
|
+
color: "#1a1a2e",
|
|
319
|
+
wordBreak: "break-word",
|
|
320
|
+
background: n ? `${d}14` : m.bg,
|
|
321
|
+
border: n ? `1px solid ${d}33` : `1px solid ${m.border}`,
|
|
322
|
+
borderRadius: 8,
|
|
323
|
+
borderBottomRightRadius: n ? 2 : 8,
|
|
324
|
+
borderBottomLeftRadius: n ? 8 : 2,
|
|
325
|
+
animation: "dlgFadeIn 0.3s ease both"
|
|
326
|
+
}, children: l.content }),
|
|
327
|
+
/* @__PURE__ */ e.jsxs("div", { style: { fontSize: 12, color: "#bbb", marginTop: 4, textAlign: n ? "right" : "left" }, children: [
|
|
328
|
+
n ? H : S,
|
|
329
|
+
C ? ` · ${X(l.timestamp)}` : ""
|
|
330
|
+
] })
|
|
331
|
+
] })
|
|
332
|
+
] }, c);
|
|
333
|
+
}),
|
|
334
|
+
f && /* @__PURE__ */ e.jsxs("div", { style: { display: "flex", gap: 10, alignItems: "flex-start", alignSelf: "flex-start" }, children: [
|
|
335
|
+
z && /* @__PURE__ */ e.jsx("div", { style: { width: 40, height: 40, borderRadius: "50%", flexShrink: 0, display: "flex", alignItems: "center", justifyContent: "center", fontSize: 15, fontWeight: 700, color: "#fff", background: "#f59e0b" }, children: S[0] }),
|
|
336
|
+
/* @__PURE__ */ e.jsx("div", { style: { padding: "12px 18px", borderRadius: "8px 8px 8px 2px", background: "#fff", border: "1px solid #e8e8e8" }, children: /* @__PURE__ */ e.jsx("div", { style: { display: "flex", gap: 4 }, children: [0, 1, 2].map((l) => /* @__PURE__ */ e.jsx("span", { style: { width: 7, height: 7, borderRadius: "50%", background: d, opacity: 0.4, display: "inline-block", animation: `dlgTyping 1.4s infinite ${l * 0.2}s` } }, l)) }) })
|
|
337
|
+
] }),
|
|
338
|
+
/* @__PURE__ */ e.jsx("div", { ref: q })
|
|
339
|
+
] }),
|
|
340
|
+
i && /* @__PURE__ */ e.jsxs("div", { style: { margin: "0 20px 8px", padding: "8px 12px", background: "#fff7ed", border: "1px solid #fed7aa", borderRadius: 8, fontSize: 13, color: "#92400e", flexShrink: 0 }, children: [
|
|
341
|
+
"⚠️ AI服务异常:",
|
|
342
|
+
i,
|
|
343
|
+
"(将使用模拟回复)"
|
|
344
|
+
] }),
|
|
345
|
+
V && /* @__PURE__ */ e.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 12, padding: "10px 20px", background: `${d}0d`, borderTop: `1px solid ${d}1f`, borderBottom: `1px solid ${d}1f`, flexShrink: 0 }, children: [
|
|
346
|
+
/* @__PURE__ */ e.jsx("div", { style: { width: 32, height: 32, borderRadius: 8, background: `${d}1f`, display: "flex", alignItems: "center", justifyContent: "center", fontSize: 16, flexShrink: 0 }, children: "🎯" }),
|
|
347
|
+
/* @__PURE__ */ e.jsxs("div", { style: { minWidth: 0 }, children: [
|
|
348
|
+
/* @__PURE__ */ e.jsx("div", { style: { fontSize: 11, color: d, fontWeight: 700, letterSpacing: 0.5 }, children: "当前环节目标" }),
|
|
349
|
+
/* @__PURE__ */ e.jsx("div", { style: { fontSize: 14, color: "#1a1a2e", fontWeight: 500 }, children: V })
|
|
350
|
+
] })
|
|
351
|
+
] }),
|
|
352
|
+
/* @__PURE__ */ e.jsx("div", { style: { padding: "16px 20px", borderTop: "1px solid #e8e8e8", flexShrink: 0 }, children: /* @__PURE__ */ e.jsxs("div", { style: { display: "flex", gap: 10, alignItems: "flex-end" }, children: [
|
|
353
|
+
/* @__PURE__ */ e.jsx(
|
|
354
|
+
Se,
|
|
355
|
+
{
|
|
356
|
+
value: r,
|
|
357
|
+
onChange: (l) => I(l.target.value),
|
|
358
|
+
onPressEnter: (l) => {
|
|
359
|
+
l.shiftKey || (l.preventDefault(), T());
|
|
360
|
+
},
|
|
361
|
+
placeholder: W,
|
|
362
|
+
autoSize: { minRows: 1, maxRows: 4 },
|
|
363
|
+
disabled: f,
|
|
364
|
+
style: { flex: 1, fontSize: 15, lineHeight: 1.5, padding: "9px 14px", borderRadius: 8, resize: "none" }
|
|
365
|
+
}
|
|
366
|
+
),
|
|
367
|
+
/* @__PURE__ */ e.jsx(
|
|
368
|
+
G,
|
|
369
|
+
{
|
|
370
|
+
type: "primary",
|
|
371
|
+
onClick: T,
|
|
372
|
+
disabled: !r.trim() || f,
|
|
373
|
+
loading: f,
|
|
374
|
+
style: { height: "auto", padding: "9px 24px", fontSize: 15, fontWeight: 600, lineHeight: 1.5, borderRadius: 8, background: d, borderColor: d },
|
|
375
|
+
children: "发送"
|
|
376
|
+
}
|
|
377
|
+
),
|
|
378
|
+
/* @__PURE__ */ e.jsx(k, { count: v, size: "small", offset: [-6, 2], children: /* @__PURE__ */ e.jsx(
|
|
379
|
+
G,
|
|
380
|
+
{
|
|
381
|
+
icon: /* @__PURE__ */ e.jsx(D, {}),
|
|
382
|
+
onClick: () => B(!0),
|
|
383
|
+
title: "查看指导记录",
|
|
384
|
+
style: { height: "auto", padding: "9px 16px", fontSize: 15, lineHeight: 1.5, borderRadius: 8, color: "#8c8c8c", borderColor: "#d9d9d9" },
|
|
385
|
+
children: "指导记录"
|
|
386
|
+
}
|
|
387
|
+
) })
|
|
388
|
+
] }) })
|
|
389
|
+
] }), oe = A(() => {
|
|
390
|
+
for (let l = o.length - 1; l >= 0; l--)
|
|
391
|
+
if (o[l].role === "customer") return o[l].emotion;
|
|
392
|
+
}, [o]), E = we(oe), Y = f || ((Q = o[o.length - 1]) == null ? void 0 : Q.role) === "customer", K = A(() => {
|
|
393
|
+
const l = [];
|
|
394
|
+
for (let c = 0; c < o.length; c++) {
|
|
395
|
+
const n = o[c];
|
|
396
|
+
if (n.role === "customer" && n.feedback) {
|
|
397
|
+
let m = "";
|
|
398
|
+
for (let L = c - 1; L >= 0; L--)
|
|
399
|
+
if (o[L].role === "teller") {
|
|
400
|
+
m = o[L].content;
|
|
401
|
+
break;
|
|
402
|
+
}
|
|
403
|
+
l.push({ tellerText: m, feedback: n.feedback, quality: n.talkQuality, time: n.timestamp });
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
return l.reverse();
|
|
407
|
+
}, [o]), F = A(() => !p || p.length === 0 ? [] : p.map((l, c) => {
|
|
408
|
+
const n = l.id === j || !j && c === 0, m = t.includes(l.id) && !n;
|
|
409
|
+
return { id: l.id, name: l.name, goals: l.goals, status: m ? "done" : n ? "active" : "pending" };
|
|
410
|
+
}), [p, j, t]), O = { background: "#fff", borderRadius: 12, padding: 16, boxShadow: "0 2px 8px rgba(0,0,0,0.06)" }, _ = (l, c) => /* @__PURE__ */ e.jsxs("div", { style: { fontSize: 15, fontWeight: 700, color: "#1a1a2e", marginBottom: 12, display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
411
|
+
/* @__PURE__ */ e.jsx("span", { style: { fontSize: 18 }, children: l }),
|
|
412
|
+
c
|
|
413
|
+
] }), le = /* @__PURE__ */ e.jsxs("div", { style: { flex: "0 0 36%", background: "#f8f9fa", display: "flex", flexDirection: "column", minWidth: 0, minHeight: 0 }, children: [
|
|
414
|
+
/* @__PURE__ */ e.jsxs("div", { className: "dialogue-info-panel", style: { flex: 1, overflowY: "auto", padding: 14, display: "flex", flexDirection: "column", gap: 12, minHeight: 0 }, children: [
|
|
415
|
+
/* @__PURE__ */ e.jsxs("div", { style: O, children: [
|
|
416
|
+
_("👥", "角色与情绪"),
|
|
417
|
+
/* @__PURE__ */ e.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 10 }, children: [
|
|
418
|
+
/* @__PURE__ */ e.jsxs("div", { style: { display: "flex", alignItems: "flex-start", gap: 12, padding: 12, background: "#fafbfc", borderRadius: 8 }, children: [
|
|
419
|
+
/* @__PURE__ */ e.jsx("div", { style: { width: 46, height: 46, borderRadius: "50%", background: "#f59e0b", color: "#fff", display: "flex", alignItems: "center", justifyContent: "center", fontSize: 19, fontWeight: 700, flexShrink: 0 }, children: S[0] }),
|
|
420
|
+
/* @__PURE__ */ e.jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
421
|
+
/* @__PURE__ */ e.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 6, flexWrap: "wrap" }, children: [
|
|
422
|
+
/* @__PURE__ */ e.jsx("span", { style: { fontSize: 15, fontWeight: 700, color: "#1a1a2e" }, children: S }),
|
|
423
|
+
/* @__PURE__ */ e.jsx("span", { style: { fontSize: 11, color: "#ea580c", background: "#fff7ed", padding: "1px 8px", borderRadius: 10, fontWeight: 600 }, children: "AI 角色" }),
|
|
424
|
+
(a == null ? void 0 : a.trait) && /* @__PURE__ */ e.jsx("span", { style: { fontSize: 11, color: "#4f46e5", background: "#eef2ff", padding: "1px 8px", borderRadius: 10, fontWeight: 600 }, children: a.trait })
|
|
425
|
+
] }),
|
|
426
|
+
(a == null ? void 0 : a.desc) && /* @__PURE__ */ e.jsx("div", { style: { fontSize: 12, color: "#888", marginTop: 4, lineHeight: 1.5 }, children: a.desc }),
|
|
427
|
+
/* @__PURE__ */ e.jsx("div", { style: { display: "inline-flex", alignItems: "center", gap: 4, fontSize: 12, padding: "3px 8px", borderRadius: 4, marginTop: 6, background: Y ? "#dcfce7" : "#f1f5f9", color: Y ? "#16a34a" : "#64748b" }, children: Y ? "正在发言" : "等待回应" })
|
|
428
|
+
] })
|
|
429
|
+
] }),
|
|
430
|
+
/* @__PURE__ */ e.jsxs("div", { style: { display: "flex", alignItems: "flex-start", gap: 12, padding: 12, background: "#fafbfc", borderRadius: 8 }, children: [
|
|
431
|
+
/* @__PURE__ */ e.jsx("div", { style: { width: 46, height: 46, borderRadius: "50%", background: d, color: "#fff", display: "flex", alignItems: "center", justifyContent: "center", fontSize: 19, fontWeight: 700, flexShrink: 0 }, children: H[0] }),
|
|
432
|
+
/* @__PURE__ */ e.jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
433
|
+
/* @__PURE__ */ e.jsxs("div", { style: { fontSize: 15, fontWeight: 700, color: "#1a1a2e" }, children: [
|
|
434
|
+
"你 — ",
|
|
435
|
+
H
|
|
436
|
+
] }),
|
|
437
|
+
(y == null ? void 0 : y.desc) && /* @__PURE__ */ e.jsx("div", { style: { fontSize: 12, color: "#888", marginTop: 4, lineHeight: 1.5 }, children: y.desc })
|
|
438
|
+
] })
|
|
439
|
+
] })
|
|
440
|
+
] }),
|
|
441
|
+
/* @__PURE__ */ e.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 8, marginTop: 12, paddingTop: 12, borderTop: "1px solid #e8e8e8" }, children: [
|
|
442
|
+
/* @__PURE__ */ e.jsxs("span", { style: { fontSize: 13, fontWeight: 600, color: "#f59e0b", flexShrink: 0 }, children: [
|
|
443
|
+
S,
|
|
444
|
+
"情绪"
|
|
445
|
+
] }),
|
|
446
|
+
/* @__PURE__ */ e.jsx("span", { style: { fontSize: 11, color: "#888", flexShrink: 0 }, children: "平静" }),
|
|
447
|
+
/* @__PURE__ */ e.jsx("div", { style: { flex: 1, height: 8, background: "#e5e7eb", borderRadius: 4, overflow: "hidden" }, children: /* @__PURE__ */ e.jsx("div", { style: { height: "100%", borderRadius: 4, width: `${E.val}%`, background: "linear-gradient(90deg,#22c55e,#eab308,#f59e0b,#ef4444)", transition: "width 0.5s ease" } }) }),
|
|
448
|
+
/* @__PURE__ */ e.jsx("span", { style: { fontSize: 11, color: "#888", flexShrink: 0 }, children: "愤怒" }),
|
|
449
|
+
/* @__PURE__ */ e.jsx("span", { style: { fontSize: 12, fontWeight: 600, padding: "2px 6px", borderRadius: 4, minWidth: 32, textAlign: "center", color: E.color, background: E.bg, flexShrink: 0 }, children: E.label })
|
|
450
|
+
] })
|
|
451
|
+
] }),
|
|
452
|
+
F.length > 0 && /* @__PURE__ */ e.jsxs("div", { style: O, children: [
|
|
453
|
+
_("🎯", "对话进程"),
|
|
454
|
+
/* @__PURE__ */ e.jsx("div", { style: { display: "flex", alignItems: "flex-start", padding: "4px 0" }, children: F.map((l, c) => {
|
|
455
|
+
var n;
|
|
456
|
+
return /* @__PURE__ */ e.jsxs(ge.Fragment, { children: [
|
|
457
|
+
/* @__PURE__ */ e.jsx(U, { title: ((n = l.goals) == null ? void 0 : n.join("、")) || "", children: /* @__PURE__ */ e.jsxs("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", gap: 7, flex: "0 0 auto", minWidth: 56 }, children: [
|
|
458
|
+
/* @__PURE__ */ e.jsx("div", { style: {
|
|
459
|
+
width: 34,
|
|
460
|
+
height: 34,
|
|
461
|
+
borderRadius: "50%",
|
|
462
|
+
display: "flex",
|
|
463
|
+
alignItems: "center",
|
|
464
|
+
justifyContent: "center",
|
|
465
|
+
fontSize: 14,
|
|
466
|
+
fontWeight: 700,
|
|
467
|
+
transition: "all 0.3s",
|
|
468
|
+
background: l.status === "done" ? "#16a34a" : l.status === "active" ? d : "#fff",
|
|
469
|
+
color: l.status === "pending" ? "#888" : "#fff",
|
|
470
|
+
border: l.status === "pending" ? "2px solid #d1d5db" : "none",
|
|
471
|
+
boxShadow: l.status === "active" ? `0 0 0 4px ${d}26` : "none"
|
|
472
|
+
}, children: l.status === "done" ? "✓" : c + 1 }),
|
|
473
|
+
/* @__PURE__ */ e.jsx("div", { style: { fontSize: 12, textAlign: "center", lineHeight: 1.3, maxWidth: 60, fontWeight: l.status === "active" ? 700 : 500, color: l.status === "done" ? "#16a34a" : l.status === "active" ? d : "#888" }, children: l.name })
|
|
474
|
+
] }) }),
|
|
475
|
+
c < F.length - 1 && /* @__PURE__ */ e.jsx("div", { style: { flex: 1, height: 3, marginTop: 16, minWidth: 16, borderRadius: 2, background: l.status === "done" ? "#16a34a" : "#e5e7eb" } })
|
|
476
|
+
] }, l.id);
|
|
477
|
+
}) })
|
|
478
|
+
] }),
|
|
479
|
+
/* @__PURE__ */ e.jsxs("div", { style: { ...O, flex: 1, display: "flex", flexDirection: "column", minHeight: 160 }, children: [
|
|
480
|
+
_("💬", "逐句评价"),
|
|
481
|
+
/* @__PURE__ */ e.jsx("div", { style: { flex: 1, overflowY: "auto", display: "flex", flexDirection: "column", gap: 8 }, children: K.length === 0 ? /* @__PURE__ */ e.jsx("div", { style: { textAlign: "center", color: "#888", fontSize: 13, padding: "20px 0" }, children: "对话开始后,系统将对你的每句话实时点评" }) : K.map((l, c) => {
|
|
482
|
+
const n = ze(l.quality);
|
|
483
|
+
return /* @__PURE__ */ e.jsxs("div", { style: { padding: "10px 12px", borderRadius: 8, fontSize: 13, lineHeight: 1.5, background: n.bg, borderLeft: `3px solid ${n.color}` }, children: [
|
|
484
|
+
/* @__PURE__ */ e.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 8, marginBottom: 4 }, children: [
|
|
485
|
+
/* @__PURE__ */ e.jsx("span", { style: { fontSize: 11, fontWeight: 700, color: n.color, background: n.badgeBg, padding: "1px 8px", borderRadius: 4 }, children: n.label }),
|
|
486
|
+
/* @__PURE__ */ e.jsx("span", { style: { fontSize: 11, color: "#888", marginLeft: "auto" }, children: X(l.time) })
|
|
487
|
+
] }),
|
|
488
|
+
l.tellerText && /* @__PURE__ */ e.jsxs("div", { style: { color: "#888", fontSize: 12, margin: "2px 0" }, children: [
|
|
489
|
+
"「",
|
|
490
|
+
l.tellerText.length > 28 ? `${l.tellerText.slice(0, 28)}…` : l.tellerText,
|
|
491
|
+
"」"
|
|
492
|
+
] }),
|
|
493
|
+
/* @__PURE__ */ e.jsx("div", { style: { color: "#555" }, children: l.feedback })
|
|
494
|
+
] }, c);
|
|
495
|
+
}) })
|
|
496
|
+
] })
|
|
497
|
+
] }),
|
|
498
|
+
/* @__PURE__ */ e.jsx("div", { style: { padding: "12px 14px", borderTop: "1px solid #e8e8e8", background: "#fff", flexShrink: 0 }, children: /* @__PURE__ */ e.jsx(G, { type: "primary", block: !0, icon: /* @__PURE__ */ e.jsx(re, {}), onClick: R, disabled: u === 0, style: { height: 42, borderRadius: 8, background: d, borderColor: d, fontWeight: 600 }, children: $ }) })
|
|
499
|
+
] });
|
|
500
|
+
return /* @__PURE__ */ e.jsxs("div", { style: { display: "flex", height: "100%", minHeight: 560, background: "#f0f2f5", overflow: "hidden", ...x.styleOverrides }, children: [
|
|
501
|
+
ee,
|
|
502
|
+
le,
|
|
503
|
+
/* @__PURE__ */ e.jsx(ve, { open: h, onClose: () => B(!1) }),
|
|
504
|
+
/* @__PURE__ */ e.jsx("style", { children: `
|
|
505
|
+
@keyframes dlgTyping { 0%, 60%, 100% { opacity: 0.3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-4px); } }
|
|
506
|
+
@keyframes dlgFadeIn { 0% { opacity: 0; transform: translateY(6px); } 100% { opacity: 1; transform: translateY(0); } }
|
|
507
|
+
.dialogue-chat-area::-webkit-scrollbar, .dialogue-info-panel::-webkit-scrollbar { width: 6px; }
|
|
508
|
+
.dialogue-chat-area::-webkit-scrollbar-thumb, .dialogue-info-panel::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
|
|
509
|
+
.dialogue-chat-area, .dialogue-info-panel { scrollbar-width: thin; }
|
|
510
|
+
` })
|
|
511
|
+
] });
|
|
512
|
+
}, He = ({
|
|
513
|
+
initData: o,
|
|
514
|
+
runtimeRules: r,
|
|
515
|
+
onFinish: f,
|
|
516
|
+
onRealtimeData: i
|
|
517
|
+
}) => {
|
|
518
|
+
var d, z, C, W, $;
|
|
519
|
+
const u = (o == null ? void 0 : o.tellerRoleName) || (o == null ? void 0 : o.targetPosition) || "柜员", g = ((d = o == null ? void 0 : o.roleConfig) == null ? void 0 : d.角色名称) || (o == null ? void 0 : o.customerRoleName) || "客户", b = (o == null ? void 0 : o.uiConfig) || {}, w = o == null ? void 0 : o.caseData, { filledData: s } = te(), a = { ...w || {}, ...o || {} }, y = N((o == null ? void 0 : o.scenario) || "", a, s), x = r == null ? void 0 : r.phases, I = x != null && x.length ? x.flatMap((h) => h.goals || []).map((h) => N(h, a, s)) : (z = o == null ? void 0 : o.dialogueGoals) == null ? void 0 : z.map((h) => N(h, a, s)), T = (o == null ? void 0 : o.roleConfig) || {}, R = (h) => {
|
|
520
|
+
for (const B of h) {
|
|
521
|
+
const v = T[B];
|
|
522
|
+
if (v != null && v !== "" && typeof v != "object") return String(v);
|
|
523
|
+
}
|
|
524
|
+
}, p = {
|
|
525
|
+
name: g,
|
|
526
|
+
trait: R(["性格", "性格特点", "情绪状态", "态度", "情绪"]),
|
|
527
|
+
desc: R(["背景", "人物背景", "角色背景", "描述", "简介", "身份"]) || N(
|
|
528
|
+
((W = (C = o == null ? void 0 : o.caseData) == null ? void 0 : C.customerInfo) == null ? void 0 : W.purpose) || (($ = o == null ? void 0 : o.customerInfo) == null ? void 0 : $.purpose) || "",
|
|
529
|
+
a,
|
|
530
|
+
s
|
|
531
|
+
) || void 0
|
|
532
|
+
}, j = {
|
|
533
|
+
name: u,
|
|
534
|
+
desc: `本次对话中你扮演「${u}」,需主导沟通、达成对话目标`
|
|
535
|
+
}, t = ce(o, {
|
|
536
|
+
onRealtimeData: i,
|
|
537
|
+
enableRealtimeGuidance: !0,
|
|
538
|
+
runtimeRules: r,
|
|
539
|
+
dialogueGoals: I
|
|
540
|
+
}), M = () => {
|
|
541
|
+
const h = t.checkCompletion(r);
|
|
542
|
+
if (!h.canComplete) {
|
|
543
|
+
ae.warning(h.reason || "请完成所有必要对话");
|
|
544
|
+
return;
|
|
545
|
+
}
|
|
546
|
+
f({
|
|
547
|
+
stepId: (o == null ? void 0 : o.stepId) || "unknown",
|
|
548
|
+
operationType: "dialogue",
|
|
549
|
+
operationData: {
|
|
550
|
+
dialogueHistory: t.messages,
|
|
551
|
+
dialogueLog: t.dialogueLog,
|
|
552
|
+
totalMessages: t.messages.length,
|
|
553
|
+
mustConfirmResult: r != null && r.mustConfirm ? t.isConfirmed() : void 0
|
|
554
|
+
},
|
|
555
|
+
operationLog: t.dialogueLog,
|
|
556
|
+
timestamp: Date.now(),
|
|
557
|
+
evidenceSummary: fe({
|
|
558
|
+
sourceStepId: (o == null ? void 0 : o.stepId) || "unknown",
|
|
559
|
+
sourceStepName: (o == null ? void 0 : o.stepName) || "对话交互",
|
|
560
|
+
sourceType: "dialogue",
|
|
561
|
+
title: `${(o == null ? void 0 : o.stepName) || "对话交互"}摘要`,
|
|
562
|
+
summary: `完成 ${t.messages.length} 条消息的对话交互。`,
|
|
563
|
+
keyFacts: [
|
|
564
|
+
{ label: "消息总数", value: String(t.messages.length) },
|
|
565
|
+
{ label: "对话轮数", value: String(Math.ceil(t.messages.length / 2)) }
|
|
566
|
+
]
|
|
567
|
+
})
|
|
568
|
+
});
|
|
569
|
+
};
|
|
570
|
+
return /* @__PURE__ */ e.jsx(
|
|
571
|
+
Ie,
|
|
572
|
+
{
|
|
573
|
+
messages: t.messages,
|
|
574
|
+
input: t.input,
|
|
575
|
+
aiResponding: t.aiResponding,
|
|
576
|
+
aiError: t.aiError,
|
|
577
|
+
dialogueLogCount: t.dialogueLog.length,
|
|
578
|
+
scenario: y,
|
|
579
|
+
dialogueGoals: I,
|
|
580
|
+
tellerRoleName: u,
|
|
581
|
+
customerRoleName: g,
|
|
582
|
+
customerProfile: p,
|
|
583
|
+
tellerProfile: j,
|
|
584
|
+
uiConfig: b,
|
|
585
|
+
onInputChange: t.setInput,
|
|
586
|
+
onSend: t.handleSend,
|
|
587
|
+
onComplete: M,
|
|
588
|
+
phases: t.phases,
|
|
589
|
+
currentPhaseId: t.currentPhaseId,
|
|
590
|
+
phaseHistory: t.phaseHistory
|
|
591
|
+
}
|
|
592
|
+
);
|
|
593
|
+
};
|
|
594
|
+
export {
|
|
595
|
+
He as default
|
|
596
|
+
};
|