@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
|
@@ -1,128 +1,167 @@
|
|
|
1
|
-
import { g as
|
|
2
|
-
import
|
|
3
|
-
import { message as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { R as
|
|
8
|
-
import { R as mr, a as jr } from "./ThunderboltOutlined-nH_FO_4A.js";
|
|
1
|
+
import { g as ar, c as nr, f as lr, j as o, e as dr, h as cr, d as pr, i as gr } from "./CaseDetailContent-DT5nCtRT.js";
|
|
2
|
+
import xr, { useRef as W, useState as u, useEffect as A, useCallback as j } from "react";
|
|
3
|
+
import { message as M, Button as b, Tooltip as X, Input as yr } from "antd";
|
|
4
|
+
import { u as P, m, A as fr } from "./StrategyLabPlugin-DUqZYctQ.js";
|
|
5
|
+
import { c as ur, d as br } from "./TrainingModelContainer-yi8W6KFl.js";
|
|
6
|
+
import { R as q } from "./UndoOutlined-Dw6_9_OL.js";
|
|
7
|
+
import { R as mr, a as jr } from "./ThunderboltOutlined-DDQFi5Cv.js";
|
|
9
8
|
const hr = {
|
|
10
9
|
adversarial: { icon: /* @__PURE__ */ o.jsx(jr, {}), label: "对抗推演", color: "#f5222d" },
|
|
11
10
|
collaborative: { icon: /* @__PURE__ */ o.jsx(q, {}), label: "群体决策", color: "#1890ff" },
|
|
12
|
-
"stress-test": { icon: /* @__PURE__ */ o.jsx(
|
|
13
|
-
},
|
|
11
|
+
"stress-test": { icon: /* @__PURE__ */ o.jsx(br, {}), label: "压力测试", color: "#faad14" }
|
|
12
|
+
}, Rr = ({
|
|
14
13
|
stepId: h,
|
|
15
|
-
mode:
|
|
16
|
-
originalDecision:
|
|
17
|
-
characters:
|
|
18
|
-
scenario:
|
|
14
|
+
mode: d,
|
|
15
|
+
originalDecision: E,
|
|
16
|
+
characters: g,
|
|
17
|
+
scenario: B,
|
|
19
18
|
theme: r,
|
|
20
|
-
currentUser:
|
|
21
|
-
onSkip:
|
|
22
|
-
onRequestAdjust:
|
|
19
|
+
currentUser: Q,
|
|
20
|
+
onSkip: O,
|
|
21
|
+
onRequestAdjust: Z
|
|
23
22
|
}) => {
|
|
24
23
|
var K;
|
|
25
|
-
const
|
|
24
|
+
const L = P((e) => e.saveStrategyLab), rr = W(P.getState().getStrategyLab(h)), [f, T] = u(""), [x, S] = u(""), [v, H] = u(!1), [or, F] = u("dialogue"), [k, er] = u({}), [n, N] = u(((K = rr.current) == null ? void 0 : K.characterDialogues) || {}), _ = W(null), w = W(null), I = ar("ACTOR_AGENT"), { token: C } = nr(I, Q), l = hr[d], y = xr.useMemo(() => {
|
|
26
25
|
const e = [];
|
|
27
|
-
return
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
return d === "adversarial" && g.adversary ? e.push(g.adversary) : d === "collaborative" && g.stakeholders ? g.stakeholders.forEach((s) => {
|
|
27
|
+
var t;
|
|
28
|
+
s.character ? e.push(s.character) : s.name && e.push({
|
|
29
|
+
name: s.name,
|
|
30
|
+
personality: [],
|
|
31
|
+
background: s.interests || "",
|
|
32
|
+
dialogue: "",
|
|
33
|
+
stance: ((t = s.concerns) == null ? void 0 : t.join(";")) || s.interests || ""
|
|
34
|
+
});
|
|
35
|
+
}) : d === "stress-test" && g.narrator && e.push(g.narrator), e;
|
|
36
|
+
}, [d, g]);
|
|
31
37
|
A(() => {
|
|
32
|
-
!
|
|
33
|
-
}, [
|
|
38
|
+
!f && y.length > 0 && T(y[0].name);
|
|
39
|
+
}, [y, f]), A(() => {
|
|
34
40
|
if (Object.keys(n).length > 0) {
|
|
35
|
-
const e =
|
|
36
|
-
|
|
41
|
+
const e = P.getState().getStrategyLab(h);
|
|
42
|
+
L(h, {
|
|
37
43
|
...e,
|
|
38
44
|
characterDialogues: n,
|
|
39
45
|
isInCharacterDialogue: !0
|
|
40
46
|
});
|
|
41
47
|
}
|
|
42
|
-
}, [n, h,
|
|
48
|
+
}, [n, h, L]), A(() => {
|
|
43
49
|
var e;
|
|
44
|
-
(e =
|
|
45
|
-
}, [n,
|
|
46
|
-
const R = j(() =>
|
|
50
|
+
(e = _.current) == null || e.scrollIntoView({ behavior: "smooth" });
|
|
51
|
+
}, [n, f]);
|
|
52
|
+
const R = j(() => y.find((e) => e.name === f), [y, f]), G = j((e, s, t) => {
|
|
47
53
|
var a;
|
|
48
|
-
|
|
49
|
-
|
|
54
|
+
if (t.length === 0) {
|
|
55
|
+
const c = d === "adversarial" ? `【对话策略】
|
|
56
|
+
你是反对者,对用户的决策方案持反对态度。
|
|
57
|
+
- 指出决策方案的潜在风险和漏洞
|
|
58
|
+
- 提出替代方案或改进建议
|
|
59
|
+
- 质疑方案的可行性、时间表、预算等
|
|
60
|
+
- 可以逐步从"强烈反对"转向"有条件支持"
|
|
61
|
+
- 至少经过2-3轮对话后再考虑调整立场` : d === "collaborative" ? `【对话策略】
|
|
62
|
+
你是利益相关者,有自己的诉求和关注点。
|
|
63
|
+
- 表达自己的核心诉求和关注点
|
|
64
|
+
- 对影响自身利益的部分提出具体要求
|
|
65
|
+
- 愿意妥协,但有底线
|
|
66
|
+
- 寻求双赢的解决方案` : `【对话策略】
|
|
67
|
+
你是叙事者,客观描述极端情境。
|
|
68
|
+
- 用叙事的方式描述极端情境
|
|
69
|
+
- 营造紧张感和压力感
|
|
70
|
+
- 客观呈现方案在极端条件下的表现
|
|
71
|
+
- 不带个人情感,保持观察者视角`;
|
|
72
|
+
return `【角色设定】
|
|
73
|
+
你是${e.name},性格特征:${(a = e.personality) == null ? void 0 : a.join("、")}
|
|
50
74
|
背景故事:${e.background}
|
|
51
75
|
当前立场:${e.stance}
|
|
52
76
|
|
|
53
77
|
【场景背景】
|
|
54
|
-
${
|
|
78
|
+
${B}
|
|
55
79
|
|
|
56
80
|
【用户决策方案】
|
|
57
|
-
${
|
|
81
|
+
${E}
|
|
58
82
|
|
|
59
83
|
【你的初始态度】
|
|
60
84
|
${e.dialogue}
|
|
61
85
|
|
|
86
|
+
${c}
|
|
87
|
+
|
|
88
|
+
【输出格式】
|
|
89
|
+
直接返回角色的对话内容(纯文本,50-200字),不需要返回JSON格式。
|
|
90
|
+
保持立场一致性,理性表达,针对具体问题提出质疑或关注,态度可渐进调整但不要突然转变。
|
|
91
|
+
|
|
62
92
|
【任务】
|
|
63
93
|
用户现在想与你对话,试图说服你或了解你的想法。请保持角色一致性,自然回应用户的问题或观点。
|
|
64
94
|
|
|
65
95
|
【用户消息】
|
|
66
|
-
${
|
|
67
|
-
|
|
96
|
+
${s}`;
|
|
97
|
+
} else
|
|
98
|
+
return s;
|
|
99
|
+
}, [B, E, d]), Y = j(async () => {
|
|
68
100
|
var U;
|
|
69
|
-
if (!
|
|
101
|
+
if (!x.trim()) return;
|
|
102
|
+
if (!C) {
|
|
103
|
+
M.warning("AI 服务正在连接,请稍后再试");
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
70
106
|
const e = R();
|
|
71
|
-
if (!e)
|
|
72
|
-
|
|
73
|
-
|
|
107
|
+
if (!e) {
|
|
108
|
+
M.warning("未找到可对话的角色");
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
const s = e.name, t = n[s] || { messages: [], conversationId: null }, a = x.trim(), c = { role: "user", content: a, timestamp: Date.now() };
|
|
112
|
+
N((p) => {
|
|
74
113
|
var $;
|
|
75
114
|
return {
|
|
76
|
-
...
|
|
77
|
-
[
|
|
78
|
-
...
|
|
79
|
-
messages: [...(($ =
|
|
115
|
+
...p,
|
|
116
|
+
[s]: {
|
|
117
|
+
...p[s] || { messages: [], conversationId: null },
|
|
118
|
+
messages: [...(($ = p[s]) == null ? void 0 : $.messages) || [], c]
|
|
80
119
|
}
|
|
81
120
|
};
|
|
82
|
-
}), S(""),
|
|
121
|
+
}), S(""), H(!0);
|
|
83
122
|
try {
|
|
84
|
-
const
|
|
123
|
+
const p = G(e, a, t.messages), { response: $, conversationId: tr } = await lr({
|
|
85
124
|
botId: I,
|
|
86
|
-
prompt:
|
|
125
|
+
prompt: p,
|
|
87
126
|
token: C,
|
|
88
127
|
conversationId: t.conversationId || void 0,
|
|
89
128
|
autoSaveHistory: !0
|
|
90
129
|
});
|
|
91
|
-
|
|
130
|
+
N((D) => {
|
|
92
131
|
var V;
|
|
93
132
|
return {
|
|
94
133
|
...D,
|
|
95
|
-
[
|
|
96
|
-
...D[
|
|
134
|
+
[s]: {
|
|
135
|
+
...D[s],
|
|
97
136
|
messages: [
|
|
98
|
-
...((V = D[
|
|
137
|
+
...((V = D[s]) == null ? void 0 : V.messages) || [],
|
|
99
138
|
{ role: "character", content: $, timestamp: Date.now() }
|
|
100
139
|
],
|
|
101
|
-
conversationId:
|
|
140
|
+
conversationId: tr
|
|
102
141
|
}
|
|
103
142
|
};
|
|
104
143
|
});
|
|
105
|
-
} catch (
|
|
106
|
-
console.error("[CharacterDialoguePanel] 发送消息失败:",
|
|
144
|
+
} catch (p) {
|
|
145
|
+
console.error("[CharacterDialoguePanel] 发送消息失败:", p), M.error(p.message || "发送消息失败");
|
|
107
146
|
} finally {
|
|
108
|
-
|
|
147
|
+
H(!1), (U = w.current) == null || U.focus();
|
|
109
148
|
}
|
|
110
|
-
}, [
|
|
149
|
+
}, [x, C, R, n, G, I]), J = j(() => {
|
|
111
150
|
const e = {};
|
|
112
|
-
for (const [
|
|
151
|
+
for (const [s, t] of Object.entries(n)) {
|
|
113
152
|
if (!t.messages || t.messages.length < 2) continue;
|
|
114
|
-
const a = [...t.messages].reverse().find((
|
|
115
|
-
a && (e[
|
|
153
|
+
const a = [...t.messages].reverse().find((c) => c.role === "character");
|
|
154
|
+
a && (e[s] = a.content.length > 200 ? a.content.substring(0, 200) + "..." : a.content);
|
|
116
155
|
}
|
|
117
156
|
return e;
|
|
118
|
-
}, [n]),
|
|
119
|
-
const e =
|
|
120
|
-
|
|
121
|
-
}, [
|
|
157
|
+
}, [n]), sr = j(() => {
|
|
158
|
+
const e = J();
|
|
159
|
+
er(e), F("summary");
|
|
160
|
+
}, [J]), ir = Object.values(n).some(
|
|
122
161
|
(e) => e.messages && e.messages.length >= 2
|
|
123
|
-
),
|
|
162
|
+
), i = R(), z = i ? n[i.name] || { messages: [] } : { messages: [] };
|
|
124
163
|
return /* @__PURE__ */ o.jsxs(
|
|
125
|
-
|
|
164
|
+
m.div,
|
|
126
165
|
{
|
|
127
166
|
initial: { opacity: 0 },
|
|
128
167
|
animate: { opacity: 1 },
|
|
@@ -153,7 +192,7 @@ ${i}` : i;
|
|
|
153
192
|
pointerEvents: "none"
|
|
154
193
|
} }),
|
|
155
194
|
/* @__PURE__ */ o.jsxs(
|
|
156
|
-
|
|
195
|
+
m.div,
|
|
157
196
|
{
|
|
158
197
|
initial: { y: 40, opacity: 0, scale: 0.97 },
|
|
159
198
|
animate: { y: 0, opacity: 1, scale: 1 },
|
|
@@ -201,11 +240,11 @@ ${i}` : i;
|
|
|
201
240
|
] })
|
|
202
241
|
] }),
|
|
203
242
|
/* @__PURE__ */ o.jsx(
|
|
204
|
-
|
|
243
|
+
b,
|
|
205
244
|
{
|
|
206
245
|
type: "text",
|
|
207
|
-
icon: /* @__PURE__ */ o.jsx(
|
|
208
|
-
onClick:
|
|
246
|
+
icon: /* @__PURE__ */ o.jsx(ur, {}),
|
|
247
|
+
onClick: O,
|
|
209
248
|
style: {
|
|
210
249
|
color: r.colors.textMuted,
|
|
211
250
|
fontSize: 16,
|
|
@@ -219,7 +258,7 @@ ${i}` : i;
|
|
|
219
258
|
}
|
|
220
259
|
)
|
|
221
260
|
] }),
|
|
222
|
-
|
|
261
|
+
y.length > 1 && /* @__PURE__ */ o.jsx("div", { style: {
|
|
223
262
|
display: "flex",
|
|
224
263
|
gap: 4,
|
|
225
264
|
padding: "10px 24px",
|
|
@@ -227,39 +266,39 @@ ${i}` : i;
|
|
|
227
266
|
background: `${r.colors.bgSecondary}80`,
|
|
228
267
|
overflowX: "auto",
|
|
229
268
|
flexShrink: 0
|
|
230
|
-
}, children:
|
|
231
|
-
var a,
|
|
232
|
-
const
|
|
269
|
+
}, children: y.map((e) => {
|
|
270
|
+
var a, c;
|
|
271
|
+
const s = e.name === f, t = ((c = (a = n[e.name]) == null ? void 0 : a.messages) == null ? void 0 : c.length) || 0;
|
|
233
272
|
return /* @__PURE__ */ o.jsxs(
|
|
234
273
|
"button",
|
|
235
274
|
{
|
|
236
|
-
onClick: () =>
|
|
275
|
+
onClick: () => T(e.name),
|
|
237
276
|
style: {
|
|
238
277
|
display: "flex",
|
|
239
278
|
alignItems: "center",
|
|
240
279
|
gap: 8,
|
|
241
280
|
padding: "8px 16px",
|
|
242
281
|
borderRadius: 8,
|
|
243
|
-
border:
|
|
244
|
-
background:
|
|
245
|
-
color:
|
|
282
|
+
border: s ? `1px solid ${r.colors.primary}60` : "1px solid transparent",
|
|
283
|
+
background: s ? `${r.colors.primary}15` : "transparent",
|
|
284
|
+
color: s ? r.colors.primary : r.colors.textSecondary,
|
|
246
285
|
cursor: "pointer",
|
|
247
286
|
transition: "all 0.2s ease",
|
|
248
287
|
whiteSpace: "nowrap",
|
|
249
288
|
fontSize: 13,
|
|
250
|
-
fontWeight:
|
|
289
|
+
fontWeight: s ? 600 : 400
|
|
251
290
|
},
|
|
252
291
|
children: [
|
|
253
292
|
/* @__PURE__ */ o.jsx("div", { style: {
|
|
254
293
|
width: 26,
|
|
255
294
|
height: 26,
|
|
256
295
|
borderRadius: "50%",
|
|
257
|
-
background:
|
|
258
|
-
border: `1.5px solid ${
|
|
296
|
+
background: s ? r.colors.primary : r.colors.bgCard,
|
|
297
|
+
border: `1.5px solid ${s ? r.colors.primary : r.colors.border}`,
|
|
259
298
|
display: "flex",
|
|
260
299
|
alignItems: "center",
|
|
261
300
|
justifyContent: "center",
|
|
262
|
-
color:
|
|
301
|
+
color: s ? "#fff" : r.colors.textMuted,
|
|
263
302
|
fontSize: 12,
|
|
264
303
|
fontWeight: 600
|
|
265
304
|
}, children: e.name.charAt(0) }),
|
|
@@ -268,15 +307,15 @@ ${i}` : i;
|
|
|
268
307
|
fontSize: 11,
|
|
269
308
|
padding: "1px 6px",
|
|
270
309
|
borderRadius: 10,
|
|
271
|
-
background:
|
|
272
|
-
color:
|
|
310
|
+
background: s ? `${r.colors.primary}25` : `${r.colors.textMuted}20`,
|
|
311
|
+
color: s ? r.colors.primary : r.colors.textMuted
|
|
273
312
|
}, children: t })
|
|
274
313
|
]
|
|
275
314
|
},
|
|
276
315
|
e.name
|
|
277
316
|
);
|
|
278
317
|
}) }),
|
|
279
|
-
|
|
318
|
+
i && /* @__PURE__ */ o.jsxs("div", { style: {
|
|
280
319
|
padding: "16px 24px",
|
|
281
320
|
borderBottom: `1px solid ${r.colors.border}`,
|
|
282
321
|
background: `linear-gradient(135deg, ${r.colors.bgSecondary}60 0%, transparent 100%)`,
|
|
@@ -295,14 +334,14 @@ ${i}` : i;
|
|
|
295
334
|
justifyContent: "center",
|
|
296
335
|
flexShrink: 0
|
|
297
336
|
}, children: [
|
|
298
|
-
|
|
337
|
+
i.avatar ? /* @__PURE__ */ o.jsx(
|
|
299
338
|
"img",
|
|
300
339
|
{
|
|
301
|
-
src:
|
|
302
|
-
alt:
|
|
340
|
+
src: i.avatar,
|
|
341
|
+
alt: i.name,
|
|
303
342
|
style: { width: 48, height: 48, borderRadius: 12, objectFit: "cover" }
|
|
304
343
|
}
|
|
305
|
-
) : /* @__PURE__ */ o.jsx("span", { style: { fontSize: 22, fontWeight: 700, color: r.colors.primary }, children:
|
|
344
|
+
) : /* @__PURE__ */ o.jsx("span", { style: { fontSize: 22, fontWeight: 700, color: r.colors.primary }, children: i.name.charAt(0) }),
|
|
306
345
|
/* @__PURE__ */ o.jsx("div", { style: {
|
|
307
346
|
position: "absolute",
|
|
308
347
|
bottom: -2,
|
|
@@ -316,11 +355,11 @@ ${i}` : i;
|
|
|
316
355
|
] }),
|
|
317
356
|
/* @__PURE__ */ o.jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
318
357
|
/* @__PURE__ */ o.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 8, marginBottom: 4 }, children: [
|
|
319
|
-
/* @__PURE__ */ o.jsx("span", { style: { fontSize: 16, fontWeight: 600, color: r.colors.textPrimary }, children:
|
|
320
|
-
|
|
358
|
+
/* @__PURE__ */ o.jsx("span", { style: { fontSize: 16, fontWeight: 600, color: r.colors.textPrimary }, children: i.name }),
|
|
359
|
+
i.stance && /* @__PURE__ */ o.jsx(
|
|
321
360
|
X,
|
|
322
361
|
{
|
|
323
|
-
title:
|
|
362
|
+
title: i.stance.length > 20 ? i.stance : void 0,
|
|
324
363
|
placement: "bottomLeft",
|
|
325
364
|
overlayStyle: { maxWidth: 360 },
|
|
326
365
|
children: /* @__PURE__ */ o.jsx("span", { style: {
|
|
@@ -330,22 +369,22 @@ ${i}` : i;
|
|
|
330
369
|
background: `${l.color}15`,
|
|
331
370
|
color: l.color,
|
|
332
371
|
border: `1px solid ${l.color}30`,
|
|
333
|
-
cursor:
|
|
334
|
-
}, children:
|
|
372
|
+
cursor: i.stance.length > 20 ? "pointer" : "default"
|
|
373
|
+
}, children: i.stance.length > 20 ? i.stance.substring(0, 20) + "..." : i.stance })
|
|
335
374
|
}
|
|
336
375
|
)
|
|
337
376
|
] }),
|
|
338
|
-
|
|
377
|
+
i.personality && i.personality.length > 0 && /* @__PURE__ */ o.jsx("div", { style: { display: "flex", gap: 4, flexWrap: "wrap" }, children: i.personality.map((e, s) => /* @__PURE__ */ o.jsx("span", { style: {
|
|
339
378
|
fontSize: 11,
|
|
340
379
|
padding: "1px 8px",
|
|
341
380
|
borderRadius: 3,
|
|
342
381
|
background: `${r.colors.primary}12`,
|
|
343
382
|
color: r.colors.textSecondary,
|
|
344
383
|
border: `1px solid ${r.colors.border}`
|
|
345
|
-
}, children: e },
|
|
384
|
+
}, children: e }, s)) })
|
|
346
385
|
] })
|
|
347
386
|
] }),
|
|
348
|
-
|
|
387
|
+
i.background && /* @__PURE__ */ o.jsx("div", { style: {
|
|
349
388
|
marginTop: 10,
|
|
350
389
|
padding: "8px 12px",
|
|
351
390
|
borderRadius: 8,
|
|
@@ -354,7 +393,7 @@ ${i}` : i;
|
|
|
354
393
|
fontSize: 12,
|
|
355
394
|
color: r.colors.textMuted,
|
|
356
395
|
lineHeight: 1.6
|
|
357
|
-
}, children:
|
|
396
|
+
}, children: i.background })
|
|
358
397
|
] }),
|
|
359
398
|
/* @__PURE__ */ o.jsxs(
|
|
360
399
|
"div",
|
|
@@ -369,8 +408,8 @@ ${i}` : i;
|
|
|
369
408
|
},
|
|
370
409
|
className: "dialogue-messages-scroll",
|
|
371
410
|
children: [
|
|
372
|
-
z.messages.length === 0 &&
|
|
373
|
-
|
|
411
|
+
z.messages.length === 0 && i && /* @__PURE__ */ o.jsxs(
|
|
412
|
+
m.div,
|
|
374
413
|
{
|
|
375
414
|
initial: { opacity: 0, y: 16 },
|
|
376
415
|
animate: { opacity: 1, y: 0 },
|
|
@@ -390,7 +429,7 @@ ${i}` : i;
|
|
|
390
429
|
fontSize: 32,
|
|
391
430
|
fontWeight: 700,
|
|
392
431
|
color: r.colors.primary
|
|
393
|
-
}, children:
|
|
432
|
+
}, children: i.name.charAt(0) }),
|
|
394
433
|
/* @__PURE__ */ o.jsxs("h3", { style: {
|
|
395
434
|
fontSize: 18,
|
|
396
435
|
fontWeight: 600,
|
|
@@ -398,7 +437,7 @@ ${i}` : i;
|
|
|
398
437
|
margin: "0 0 8px 0"
|
|
399
438
|
}, children: [
|
|
400
439
|
"与 ",
|
|
401
|
-
|
|
440
|
+
i.name,
|
|
402
441
|
" 开始对话"
|
|
403
442
|
] }),
|
|
404
443
|
/* @__PURE__ */ o.jsx("p", { style: {
|
|
@@ -407,12 +446,12 @@ ${i}` : i;
|
|
|
407
446
|
lineHeight: 1.6,
|
|
408
447
|
maxWidth: 360,
|
|
409
448
|
margin: "0 auto"
|
|
410
|
-
}, children:
|
|
449
|
+
}, children: i.dialogue || "尝试向对方表达你的观点,了解不同立场的看法" }),
|
|
411
450
|
/* @__PURE__ */ o.jsx("div", { style: { display: "flex", gap: 8, justifyContent: "center", flexWrap: "wrap", marginTop: 20 }, children: [
|
|
412
451
|
"请介绍一下你的立场",
|
|
413
452
|
"你对这个方案怎么看?",
|
|
414
453
|
"你最大的顾虑是什么?"
|
|
415
|
-
].map((e,
|
|
454
|
+
].map((e, s) => /* @__PURE__ */ o.jsx(
|
|
416
455
|
"button",
|
|
417
456
|
{
|
|
418
457
|
onClick: () => {
|
|
@@ -431,15 +470,15 @@ ${i}` : i;
|
|
|
431
470
|
},
|
|
432
471
|
children: e
|
|
433
472
|
},
|
|
434
|
-
|
|
473
|
+
s
|
|
435
474
|
)) })
|
|
436
475
|
]
|
|
437
476
|
}
|
|
438
477
|
),
|
|
439
|
-
/* @__PURE__ */ o.jsx(
|
|
478
|
+
/* @__PURE__ */ o.jsx(fr, { initial: !1, children: z.messages.map((e, s) => {
|
|
440
479
|
const t = e.role === "user";
|
|
441
480
|
return /* @__PURE__ */ o.jsxs(
|
|
442
|
-
|
|
481
|
+
m.div,
|
|
443
482
|
{
|
|
444
483
|
initial: { opacity: 0, y: 12, scale: 0.98 },
|
|
445
484
|
animate: { opacity: 1, y: 0, scale: 1 },
|
|
@@ -464,7 +503,7 @@ ${i}` : i;
|
|
|
464
503
|
color: t ? "#fff" : r.colors.primary,
|
|
465
504
|
fontSize: t ? 14 : 15,
|
|
466
505
|
fontWeight: 600
|
|
467
|
-
}, children: t ? /* @__PURE__ */ o.jsx(
|
|
506
|
+
}, children: t ? /* @__PURE__ */ o.jsx(dr, {}) : i == null ? void 0 : i.name.charAt(0) }),
|
|
468
507
|
/* @__PURE__ */ o.jsx("div", { style: {
|
|
469
508
|
maxWidth: "72%",
|
|
470
509
|
padding: "10px 16px",
|
|
@@ -480,11 +519,11 @@ ${i}` : i;
|
|
|
480
519
|
}, children: e.content })
|
|
481
520
|
]
|
|
482
521
|
},
|
|
483
|
-
`${e.timestamp}-${
|
|
522
|
+
`${e.timestamp}-${s}`
|
|
484
523
|
);
|
|
485
524
|
}) }),
|
|
486
525
|
v && /* @__PURE__ */ o.jsxs(
|
|
487
|
-
|
|
526
|
+
m.div,
|
|
488
527
|
{
|
|
489
528
|
initial: { opacity: 0, y: 8 },
|
|
490
529
|
animate: { opacity: 1, y: 0 },
|
|
@@ -507,7 +546,7 @@ ${i}` : i;
|
|
|
507
546
|
color: r.colors.primary,
|
|
508
547
|
fontSize: 15,
|
|
509
548
|
fontWeight: 600
|
|
510
|
-
}, children:
|
|
549
|
+
}, children: i == null ? void 0 : i.name.charAt(0) }),
|
|
511
550
|
/* @__PURE__ */ o.jsxs("div", { style: {
|
|
512
551
|
padding: "12px 18px",
|
|
513
552
|
borderRadius: "4px 14px 14px 14px",
|
|
@@ -517,16 +556,16 @@ ${i}` : i;
|
|
|
517
556
|
alignItems: "center",
|
|
518
557
|
gap: 8
|
|
519
558
|
}, children: [
|
|
520
|
-
/* @__PURE__ */ o.jsx(
|
|
559
|
+
/* @__PURE__ */ o.jsx(cr, { style: { color: r.colors.primary, fontSize: 14 }, spin: !0 }),
|
|
521
560
|
/* @__PURE__ */ o.jsxs("span", { style: { fontSize: 13, color: r.colors.textMuted }, children: [
|
|
522
|
-
|
|
561
|
+
i == null ? void 0 : i.name,
|
|
523
562
|
" 正在思考..."
|
|
524
563
|
] })
|
|
525
564
|
] })
|
|
526
565
|
]
|
|
527
566
|
}
|
|
528
567
|
),
|
|
529
|
-
/* @__PURE__ */ o.jsx("div", { ref:
|
|
568
|
+
/* @__PURE__ */ o.jsx("div", { ref: _ })
|
|
530
569
|
]
|
|
531
570
|
}
|
|
532
571
|
),
|
|
@@ -536,7 +575,7 @@ ${i}` : i;
|
|
|
536
575
|
background: `${r.colors.bgSecondary}90`,
|
|
537
576
|
backdropFilter: "blur(12px)",
|
|
538
577
|
flexShrink: 0
|
|
539
|
-
}, children:
|
|
578
|
+
}, children: or === "dialogue" ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
540
579
|
/* @__PURE__ */ o.jsxs("div", { style: {
|
|
541
580
|
display: "flex",
|
|
542
581
|
alignItems: "flex-end",
|
|
@@ -548,15 +587,15 @@ ${i}` : i;
|
|
|
548
587
|
transition: "border-color 0.2s ease"
|
|
549
588
|
}, children: [
|
|
550
589
|
/* @__PURE__ */ o.jsx(
|
|
551
|
-
|
|
590
|
+
yr.TextArea,
|
|
552
591
|
{
|
|
553
592
|
ref: w,
|
|
554
|
-
value:
|
|
593
|
+
value: x,
|
|
555
594
|
onChange: (e) => S(e.target.value),
|
|
556
595
|
onPressEnter: (e) => {
|
|
557
|
-
e.shiftKey || (e.preventDefault(),
|
|
596
|
+
e.shiftKey || (e.preventDefault(), Y());
|
|
558
597
|
},
|
|
559
|
-
placeholder:
|
|
598
|
+
placeholder: i ? `向 ${i.name} 发送消息...` : "输入消息...",
|
|
560
599
|
disabled: v,
|
|
561
600
|
autoSize: { minRows: 1, maxRows: 4 },
|
|
562
601
|
style: {
|
|
@@ -572,13 +611,13 @@ ${i}` : i;
|
|
|
572
611
|
}
|
|
573
612
|
),
|
|
574
613
|
/* @__PURE__ */ o.jsx(
|
|
575
|
-
|
|
614
|
+
b,
|
|
576
615
|
{
|
|
577
616
|
type: "primary",
|
|
578
|
-
icon: /* @__PURE__ */ o.jsx(
|
|
579
|
-
onClick:
|
|
617
|
+
icon: /* @__PURE__ */ o.jsx(pr, {}),
|
|
618
|
+
onClick: Y,
|
|
580
619
|
loading: v,
|
|
581
|
-
disabled: !
|
|
620
|
+
disabled: !x.trim(),
|
|
582
621
|
style: {
|
|
583
622
|
borderRadius: 10,
|
|
584
623
|
height: 38,
|
|
@@ -587,9 +626,9 @@ ${i}` : i;
|
|
|
587
626
|
display: "flex",
|
|
588
627
|
alignItems: "center",
|
|
589
628
|
justifyContent: "center",
|
|
590
|
-
background:
|
|
629
|
+
background: x.trim() ? `linear-gradient(135deg, ${r.colors.primary} 0%, ${r.colors.primaryDark} 100%)` : r.colors.bgSecondary,
|
|
591
630
|
border: "none",
|
|
592
|
-
boxShadow:
|
|
631
|
+
boxShadow: x.trim() ? `0 2px 8px ${r.colors.primary}40` : "none",
|
|
593
632
|
transition: "all 0.2s ease"
|
|
594
633
|
}
|
|
595
634
|
}
|
|
@@ -609,13 +648,13 @@ ${i}` : i;
|
|
|
609
648
|
z.messages.length,
|
|
610
649
|
" 条"
|
|
611
650
|
] }),
|
|
612
|
-
|
|
613
|
-
|
|
651
|
+
ir && /* @__PURE__ */ o.jsx(
|
|
652
|
+
b,
|
|
614
653
|
{
|
|
615
654
|
type: "text",
|
|
616
655
|
size: "small",
|
|
617
|
-
icon: /* @__PURE__ */ o.jsx(
|
|
618
|
-
onClick:
|
|
656
|
+
icon: /* @__PURE__ */ o.jsx(gr, {}),
|
|
657
|
+
onClick: sr,
|
|
619
658
|
style: {
|
|
620
659
|
fontSize: 12,
|
|
621
660
|
color: r.colors.primary,
|
|
@@ -631,7 +670,7 @@ ${i}` : i;
|
|
|
631
670
|
] }) : (
|
|
632
671
|
/* 立场总结阶段 */
|
|
633
672
|
/* @__PURE__ */ o.jsxs(
|
|
634
|
-
|
|
673
|
+
m.div,
|
|
635
674
|
{
|
|
636
675
|
initial: { opacity: 0, y: 10 },
|
|
637
676
|
animate: { opacity: 1, y: 0 },
|
|
@@ -657,7 +696,7 @@ ${i}` : i;
|
|
|
657
696
|
overflowY: "auto",
|
|
658
697
|
marginBottom: 16
|
|
659
698
|
}, children: [
|
|
660
|
-
Object.entries(k).map(([e,
|
|
699
|
+
Object.entries(k).map(([e, s]) => /* @__PURE__ */ o.jsxs("div", { style: {
|
|
661
700
|
display: "flex",
|
|
662
701
|
alignItems: "flex-start",
|
|
663
702
|
gap: 10,
|
|
@@ -682,7 +721,7 @@ ${i}` : i;
|
|
|
682
721
|
}, children: e.charAt(0) }),
|
|
683
722
|
/* @__PURE__ */ o.jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
684
723
|
/* @__PURE__ */ o.jsx("div", { style: { fontSize: 13, fontWeight: 600, color: r.colors.textPrimary, marginBottom: 2 }, children: e }),
|
|
685
|
-
/* @__PURE__ */ o.jsx(X, { title:
|
|
724
|
+
/* @__PURE__ */ o.jsx(X, { title: s, placement: "topLeft", overlayStyle: { maxWidth: 400 }, children: /* @__PURE__ */ o.jsx("div", { style: {
|
|
686
725
|
fontSize: 12,
|
|
687
726
|
color: r.colors.textSecondary,
|
|
688
727
|
lineHeight: 1.5,
|
|
@@ -692,18 +731,18 @@ ${i}` : i;
|
|
|
692
731
|
WebkitLineClamp: 2,
|
|
693
732
|
WebkitBoxOrient: "vertical",
|
|
694
733
|
cursor: "pointer"
|
|
695
|
-
}, children:
|
|
734
|
+
}, children: s }) })
|
|
696
735
|
] })
|
|
697
736
|
] }, e)),
|
|
698
737
|
Object.keys(k).length === 0 && /* @__PURE__ */ o.jsx("div", { style: { fontSize: 12, color: r.colors.textMuted, textAlign: "center", padding: 12 }, children: "暂无角色立场记录" })
|
|
699
738
|
] }),
|
|
700
739
|
/* @__PURE__ */ o.jsxs("div", { style: { display: "flex", gap: 10, justifyContent: "flex-end" }, children: [
|
|
701
740
|
/* @__PURE__ */ o.jsx(
|
|
702
|
-
|
|
741
|
+
b,
|
|
703
742
|
{
|
|
704
743
|
ghost: !0,
|
|
705
744
|
onClick: () => {
|
|
706
|
-
|
|
745
|
+
F("dialogue");
|
|
707
746
|
},
|
|
708
747
|
style: {
|
|
709
748
|
borderRadius: 8,
|
|
@@ -715,10 +754,10 @@ ${i}` : i;
|
|
|
715
754
|
}
|
|
716
755
|
),
|
|
717
756
|
/* @__PURE__ */ o.jsx(
|
|
718
|
-
|
|
757
|
+
b,
|
|
719
758
|
{
|
|
720
759
|
ghost: !0,
|
|
721
|
-
onClick:
|
|
760
|
+
onClick: O,
|
|
722
761
|
style: {
|
|
723
762
|
borderRadius: 8,
|
|
724
763
|
borderColor: r.colors.border,
|
|
@@ -729,11 +768,11 @@ ${i}` : i;
|
|
|
729
768
|
}
|
|
730
769
|
),
|
|
731
770
|
/* @__PURE__ */ o.jsx(
|
|
732
|
-
|
|
771
|
+
b,
|
|
733
772
|
{
|
|
734
773
|
type: "primary",
|
|
735
774
|
icon: /* @__PURE__ */ o.jsx(mr, {}),
|
|
736
|
-
onClick: () =>
|
|
775
|
+
onClick: () => Z(k),
|
|
737
776
|
style: {
|
|
738
777
|
borderRadius: 8,
|
|
739
778
|
height: 36,
|
|
@@ -772,5 +811,5 @@ ${i}` : i;
|
|
|
772
811
|
);
|
|
773
812
|
};
|
|
774
813
|
export {
|
|
775
|
-
|
|
814
|
+
Rr as default
|
|
776
815
|
};
|