@memberjunction/ng-core-entity-forms 5.42.0 → 5.44.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/dist/__tests__/model-prediction.logic.test.d.ts +2 -0
- package/dist/__tests__/model-prediction.logic.test.d.ts.map +1 -0
- package/dist/__tests__/model-prediction.logic.test.js +140 -0
- package/dist/__tests__/model-prediction.logic.test.js.map +1 -0
- package/dist/lib/custom/AIAgentSessions/ai-agent-session-form.component.js +79 -105
- package/dist/lib/custom/AIAgentSessions/ai-agent-session-form.component.js.map +1 -1
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-agent-form-section.component.js +7 -10
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-agent-form-section.component.js.map +1 -1
- package/dist/lib/custom/AIAgents/add-action-dialog.component.d.ts.map +1 -1
- package/dist/lib/custom/AIAgents/add-action-dialog.component.js +46 -51
- package/dist/lib/custom/AIAgents/add-action-dialog.component.js.map +1 -1
- package/dist/lib/custom/AIAgents/ai-agent-form.component.d.ts +2 -0
- package/dist/lib/custom/AIAgents/ai-agent-form.component.d.ts.map +1 -1
- package/dist/lib/custom/AIAgents/ai-agent-form.component.js +300 -378
- package/dist/lib/custom/AIAgents/ai-agent-form.component.js.map +1 -1
- package/dist/lib/custom/AIAgents/create-sub-agent-dialog.component.js +22 -29
- package/dist/lib/custom/AIAgents/create-sub-agent-dialog.component.js.map +1 -1
- package/dist/lib/custom/AIAgents/new-agent-dialog.component.js +15 -17
- package/dist/lib/custom/AIAgents/new-agent-dialog.component.js.map +1 -1
- package/dist/lib/custom/AIAgents/prompt-selector-dialog.component.js +27 -34
- package/dist/lib/custom/AIAgents/prompt-selector-dialog.component.js.map +1 -1
- package/dist/lib/custom/AIAgents/sub-agent-selector-dialog.component.d.ts +11 -0
- package/dist/lib/custom/AIAgents/sub-agent-selector-dialog.component.d.ts.map +1 -1
- package/dist/lib/custom/AIAgents/sub-agent-selector-dialog.component.js +48 -47
- package/dist/lib/custom/AIAgents/sub-agent-selector-dialog.component.js.map +1 -1
- package/dist/lib/custom/AIPromptRuns/ai-prompt-run-form.component.js +438 -454
- package/dist/lib/custom/AIPromptRuns/ai-prompt-run-form.component.js.map +1 -1
- package/dist/lib/custom/AIPromptRuns/chat-message-viewer.component.js +48 -51
- package/dist/lib/custom/AIPromptRuns/chat-message-viewer.component.js.map +1 -1
- package/dist/lib/custom/AIPrompts/ai-prompt-form.component.js +253 -282
- package/dist/lib/custom/AIPrompts/ai-prompt-form.component.js.map +1 -1
- package/dist/lib/custom/Actions/action-execution-log-form.component.js +24 -33
- package/dist/lib/custom/Actions/action-execution-log-form.component.js.map +1 -1
- package/dist/lib/custom/Actions/action-form.component.js +263 -311
- package/dist/lib/custom/Actions/action-form.component.js.map +1 -1
- package/dist/lib/custom/Entities/entity-form.component.d.ts +6 -0
- package/dist/lib/custom/Entities/entity-form.component.d.ts.map +1 -1
- package/dist/lib/custom/Entities/entity-form.component.js +475 -493
- package/dist/lib/custom/Entities/entity-form.component.js.map +1 -1
- package/dist/lib/custom/Lists/list-form.component.js +122 -173
- package/dist/lib/custom/Lists/list-form.component.js.map +1 -1
- package/dist/lib/custom/Queries/query-form.component.js +190 -248
- package/dist/lib/custom/Queries/query-form.component.js.map +1 -1
- package/dist/lib/custom/Queries/query-run-dialog.component.js +19 -23
- package/dist/lib/custom/Queries/query-run-dialog.component.js.map +1 -1
- package/dist/lib/custom/RecordProcesses/record-process-form.component.d.ts +16 -0
- package/dist/lib/custom/RecordProcesses/record-process-form.component.d.ts.map +1 -0
- package/dist/lib/custom/RecordProcesses/record-process-form.component.js +54 -0
- package/dist/lib/custom/RecordProcesses/record-process-form.component.js.map +1 -0
- package/dist/lib/custom/SearchScopes/searchscopeprovider-form.component.js +23 -24
- package/dist/lib/custom/SearchScopes/searchscopeprovider-form.component.js.map +1 -1
- package/dist/lib/custom/Templates/template-param-dialog.component.d.ts.map +1 -1
- package/dist/lib/custom/Templates/template-param-dialog.component.js +25 -46
- package/dist/lib/custom/Templates/template-param-dialog.component.js.map +1 -1
- package/dist/lib/custom/Tests/test-form.component.js +100 -130
- package/dist/lib/custom/Tests/test-form.component.js.map +1 -1
- package/dist/lib/custom/Tests/test-run-form.component.js +187 -205
- package/dist/lib/custom/Tests/test-run-form.component.js.map +1 -1
- package/dist/lib/custom/Tests/test-suite-form.component.d.ts +8 -0
- package/dist/lib/custom/Tests/test-suite-form.component.d.ts.map +1 -1
- package/dist/lib/custom/Tests/test-suite-form.component.js +412 -489
- package/dist/lib/custom/Tests/test-suite-form.component.js.map +1 -1
- package/dist/lib/custom/Tests/test-suite-run-form.component.js +100 -126
- package/dist/lib/custom/Tests/test-suite-run-form.component.js.map +1 -1
- package/dist/lib/custom/ai-agent-run/ai-agent-run-analytics.component.js +166 -184
- package/dist/lib/custom/ai-agent-run/ai-agent-run-analytics.component.js.map +1 -1
- package/dist/lib/custom/ai-agent-run/ai-agent-run-step-detail.component.js +42 -61
- package/dist/lib/custom/ai-agent-run/ai-agent-run-step-detail.component.js.map +1 -1
- package/dist/lib/custom/ai-agent-run/ai-agent-run-timeline.component.js +8 -17
- package/dist/lib/custom/ai-agent-run/ai-agent-run-timeline.component.js.map +1 -1
- package/dist/lib/custom/ai-agent-run/ai-agent-run.component.d.ts +0 -2
- package/dist/lib/custom/ai-agent-run/ai-agent-run.component.d.ts.map +1 -1
- package/dist/lib/custom/ai-agent-run/ai-agent-run.component.js +183 -188
- package/dist/lib/custom/ai-agent-run/ai-agent-run.component.js.map +1 -1
- package/dist/lib/custom/ai-agent-run/flow/agent-run-flow.component.d.ts +108 -0
- package/dist/lib/custom/ai-agent-run/flow/agent-run-flow.component.d.ts.map +1 -0
- package/dist/lib/custom/ai-agent-run/flow/agent-run-flow.component.js +665 -0
- package/dist/lib/custom/ai-agent-run/flow/agent-run-flow.component.js.map +1 -0
- package/dist/lib/custom/ai-agent-run/flow/agent-run-flow.model.d.ts +94 -0
- package/dist/lib/custom/ai-agent-run/flow/agent-run-flow.model.d.ts.map +1 -0
- package/dist/lib/custom/ai-agent-run/flow/agent-run-flow.model.js +257 -0
- package/dist/lib/custom/ai-agent-run/flow/agent-run-flow.model.js.map +1 -0
- package/dist/lib/custom/ai-agent-run/flow/constellation.component.d.ts +38 -0
- package/dist/lib/custom/ai-agent-run/flow/constellation.component.d.ts.map +1 -0
- package/dist/lib/custom/ai-agent-run/flow/constellation.component.js +200 -0
- package/dist/lib/custom/ai-agent-run/flow/constellation.component.js.map +1 -0
- package/dist/lib/custom/ai-agent-run/flow/flame-cascade.component.d.ts +44 -0
- package/dist/lib/custom/ai-agent-run/flow/flame-cascade.component.d.ts.map +1 -0
- package/dist/lib/custom/ai-agent-run/flow/flame-cascade.component.js +180 -0
- package/dist/lib/custom/ai-agent-run/flow/flame-cascade.component.js.map +1 -0
- package/dist/lib/custom/ai-agent-run/flow/flow-svg.util.d.ts +12 -0
- package/dist/lib/custom/ai-agent-run/flow/flow-svg.util.d.ts.map +1 -0
- package/dist/lib/custom/ai-agent-run/flow/flow-svg.util.js +46 -0
- package/dist/lib/custom/ai-agent-run/flow/flow-svg.util.js.map +1 -0
- package/dist/lib/custom/ai-agent-run/flow/flowchart.component.d.ts +64 -0
- package/dist/lib/custom/ai-agent-run/flow/flowchart.component.d.ts.map +1 -0
- package/dist/lib/custom/ai-agent-run/flow/flowchart.component.js +267 -0
- package/dist/lib/custom/ai-agent-run/flow/flowchart.component.js.map +1 -0
- package/dist/lib/custom/ai-agent-run/flow/pan-zoom.d.ts +53 -0
- package/dist/lib/custom/ai-agent-run/flow/pan-zoom.d.ts.map +1 -0
- package/dist/lib/custom/ai-agent-run/flow/pan-zoom.js +111 -0
- package/dist/lib/custom/ai-agent-run/flow/pan-zoom.js.map +1 -0
- package/dist/lib/custom/ai-agent-run/flow/subway-lines.component.d.ts +42 -0
- package/dist/lib/custom/ai-agent-run/flow/subway-lines.component.d.ts.map +1 -0
- package/dist/lib/custom/ai-agent-run/flow/subway-lines.component.js +193 -0
- package/dist/lib/custom/ai-agent-run/flow/subway-lines.component.js.map +1 -0
- package/dist/lib/custom/custom-forms.module.d.ts +58 -49
- package/dist/lib/custom/custom-forms.module.d.ts.map +1 -1
- package/dist/lib/custom/custom-forms.module.js +64 -16
- package/dist/lib/custom/custom-forms.module.js.map +1 -1
- package/dist/lib/custom/shared/entity-selector-dialog.component.d.ts +2 -0
- package/dist/lib/custom/shared/entity-selector-dialog.component.d.ts.map +1 -1
- package/dist/lib/custom/shared/entity-selector-dialog.component.js +25 -25
- package/dist/lib/custom/shared/entity-selector-dialog.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJAIAgent/mjaiagent.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJAIAgent/mjaiagent.form.component.js +280 -216
- package/dist/lib/generated/Entities/MJAIAgent/mjaiagent.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJAIAgentChannel/mjaiagentchannel.form.component.js +25 -21
- package/dist/lib/generated/Entities/MJAIAgentChannel/mjaiagentchannel.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJAIAgentRun/mjaiagentrun.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJAIAgentRun/mjaiagentrun.form.component.js +68 -14
- package/dist/lib/generated/Entities/MJAIAgentRun/mjaiagentrun.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJAIAgentSession/mjaiagentsession.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJAIAgentSession/mjaiagentsession.form.component.js +44 -32
- package/dist/lib/generated/Entities/MJAIAgentSession/mjaiagentsession.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJAIAgentSkill/mjaiagentskill.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJAIAgentSkill/mjaiagentskill.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJAIAgentSkill/mjaiagentskill.form.component.js +66 -0
- package/dist/lib/generated/Entities/MJAIAgentSkill/mjaiagentskill.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJAIPrompt/mjaiprompt.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJAIPrompt/mjaiprompt.form.component.js +55 -19
- package/dist/lib/generated/Entities/MJAIPrompt/mjaiprompt.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJAIPromptRun/mjaipromptrun.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJAIPromptRun/mjaipromptrun.form.component.js +28 -10
- package/dist/lib/generated/Entities/MJAIPromptRun/mjaipromptrun.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJAISkill/mjaiskill.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJAISkill/mjaiskill.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJAISkill/mjaiskill.form.component.js +167 -0
- package/dist/lib/generated/Entities/MJAISkill/mjaiskill.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJAISkillAction/mjaiskillaction.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJAISkillAction/mjaiskillaction.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJAISkillAction/mjaiskillaction.form.component.js +64 -0
- package/dist/lib/generated/Entities/MJAISkillAction/mjaiskillaction.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJAISkillPermission/mjaiskillpermission.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJAISkillPermission/mjaiskillpermission.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJAISkillPermission/mjaiskillpermission.form.component.js +82 -0
- package/dist/lib/generated/Entities/MJAISkillPermission/mjaiskillpermission.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJAISkillSubAgent/mjaiskillsubagent.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJAISkillSubAgent/mjaiskillsubagent.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJAISkillSubAgent/mjaiskillsubagent.form.component.js +64 -0
- package/dist/lib/generated/Entities/MJAISkillSubAgent/mjaiskillsubagent.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJAction/mjaction.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJAction/mjaction.form.component.js +35 -17
- package/dist/lib/generated/Entities/MJAction/mjaction.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJApplication/mjapplication.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJApplication/mjapplication.form.component.js +59 -51
- package/dist/lib/generated/Entities/MJApplication/mjapplication.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJCollection/mjcollection.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJCollection/mjcollection.form.component.js +25 -7
- package/dist/lib/generated/Entities/MJCollection/mjcollection.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJCollectionArtifact/mjcollectionartifact.form.component.js +11 -7
- package/dist/lib/generated/Entities/MJCollectionArtifact/mjcollectionartifact.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJConversation/mjconversation.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJConversation/mjconversation.form.component.js +56 -46
- package/dist/lib/generated/Entities/MJConversation/mjconversation.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJConversationDetail/mjconversationdetail.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJConversationDetail/mjconversationdetail.form.component.js +73 -59
- package/dist/lib/generated/Entities/MJConversationDetail/mjconversationdetail.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJDuplicateRunDetailMatch/mjduplicaterundetailmatch.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJDuplicateRunDetailMatch/mjduplicaterundetailmatch.form.component.js +24 -4
- package/dist/lib/generated/Entities/MJDuplicateRunDetailMatch/mjduplicaterundetailmatch.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJEntity/mjentity.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJEntity/mjentity.form.component.js +137 -87
- package/dist/lib/generated/Entities/MJEntity/mjentity.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJEntityActionInvocation/mjentityactioninvocation.form.component.js +10 -8
- package/dist/lib/generated/Entities/MJEntityActionInvocation/mjentityactioninvocation.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJEntityDocument/mjentitydocument.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJEntityDocument/mjentitydocument.form.component.js +47 -29
- package/dist/lib/generated/Entities/MJEntityDocument/mjentitydocument.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJExperiment/mjexperiment.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJExperiment/mjexperiment.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJExperiment/mjexperiment.form.component.js +99 -0
- package/dist/lib/generated/Entities/MJExperiment/mjexperiment.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJExperimentSession/mjexperimentsession.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJExperimentSession/mjexperimentsession.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJExperimentSession/mjexperimentsession.form.component.js +101 -0
- package/dist/lib/generated/Entities/MJExperimentSession/mjexperimentsession.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJExperimentSessionIteration/mjexperimentsessioniteration.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJExperimentSessionIteration/mjexperimentsessioniteration.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJExperimentSessionIteration/mjexperimentsessioniteration.form.component.js +115 -0
- package/dist/lib/generated/Entities/MJExperimentSessionIteration/mjexperimentsessioniteration.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJFile/mjfile.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJFile/mjfile.form.component.js +63 -9
- package/dist/lib/generated/Entities/MJFile/mjfile.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJFileStorageProvider/mjfilestorageprovider.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJFileStorageProvider/mjfilestorageprovider.form.component.js +32 -14
- package/dist/lib/generated/Entities/MJFileStorageProvider/mjfilestorageprovider.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJMLAlgorithm/mjmlalgorithm.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJMLAlgorithm/mjmlalgorithm.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJMLAlgorithm/mjmlalgorithm.form.component.js +161 -0
- package/dist/lib/generated/Entities/MJMLAlgorithm/mjmlalgorithm.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJMLAlgorithmUseCase/mjmlalgorithmusecase.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJMLAlgorithmUseCase/mjmlalgorithmusecase.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJMLAlgorithmUseCase/mjmlalgorithmusecase.form.component.js +89 -0
- package/dist/lib/generated/Entities/MJMLAlgorithmUseCase/mjmlalgorithmusecase.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJMLAlgorithmUseCaseRanking/mjmlalgorithmusecaseranking.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJMLAlgorithmUseCaseRanking/mjmlalgorithmusecaseranking.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJMLAlgorithmUseCaseRanking/mjmlalgorithmusecaseranking.form.component.js +76 -0
- package/dist/lib/generated/Entities/MJMLAlgorithmUseCaseRanking/mjmlalgorithmusecaseranking.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJMLModel/mjmlmodel.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJMLModel/mjmlmodel.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJMLModel/mjmlmodel.form.component.js +141 -0
- package/dist/lib/generated/Entities/MJMLModel/mjmlmodel.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJMLModelScoringBinding/mjmlmodelscoringbinding.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJMLModelScoringBinding/mjmlmodelscoringbinding.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJMLModelScoringBinding/mjmlmodelscoringbinding.form.component.js +88 -0
- package/dist/lib/generated/Entities/MJMLModelScoringBinding/mjmlmodelscoringbinding.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJMLTrainingPipeline/mjmltrainingpipeline.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJMLTrainingPipeline/mjmltrainingpipeline.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJMLTrainingPipeline/mjmltrainingpipeline.form.component.js +143 -0
- package/dist/lib/generated/Entities/MJMLTrainingPipeline/mjmltrainingpipeline.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJMLTrainingRun/mjmltrainingrun.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJMLTrainingRun/mjmltrainingrun.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJMLTrainingRun/mjmltrainingrun.form.component.js +110 -0
- package/dist/lib/generated/Entities/MJMLTrainingRun/mjmltrainingrun.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJOpenApp/mjopenapp.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJOpenApp/mjopenapp.form.component.js +56 -24
- package/dist/lib/generated/Entities/MJOpenApp/mjopenapp.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJProcessRun/mjprocessrun.form.component.js +19 -17
- package/dist/lib/generated/Entities/MJProcessRun/mjprocessrun.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJRecordProcess/mjrecordprocess.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJRecordProcess/mjrecordprocess.form.component.js +46 -26
- package/dist/lib/generated/Entities/MJRecordProcess/mjrecordprocess.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJRemoteOperation/mjremoteoperation.form.component.js +12 -6
- package/dist/lib/generated/Entities/MJRemoteOperation/mjremoteoperation.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJRole/mjrole.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJRole/mjrole.form.component.js +36 -18
- package/dist/lib/generated/Entities/MJRole/mjrole.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJSchemaInfo/mjschemainfo.form.component.js +8 -6
- package/dist/lib/generated/Entities/MJSchemaInfo/mjschemainfo.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJScopedPromptPart/mjscopedpromptpart.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJScopedPromptPart/mjscopedpromptpart.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJScopedPromptPart/mjscopedpromptpart.form.component.js +78 -0
- package/dist/lib/generated/Entities/MJScopedPromptPart/mjscopedpromptpart.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJUser/mjuser.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJUser/mjuser.form.component.js +145 -109
- package/dist/lib/generated/Entities/MJUser/mjuser.form.component.js.map +1 -1
- package/dist/lib/generated/generated-forms.module.d.ts +356 -335
- package/dist/lib/generated/generated-forms.module.d.ts.map +1 -1
- package/dist/lib/generated/generated-forms.module.js +304 -226
- package/dist/lib/generated/generated-forms.module.js.map +1 -1
- package/dist/lib/panels/ai-agents/agent-realtime.panel.js +44 -44
- package/dist/lib/panels/ai-agents/agent-realtime.panel.js.map +1 -1
- package/dist/lib/panels/ai-skill-sharing/ai-skill-sharing-panel.component.d.ts +43 -0
- package/dist/lib/panels/ai-skill-sharing/ai-skill-sharing-panel.component.d.ts.map +1 -0
- package/dist/lib/panels/ai-skill-sharing/ai-skill-sharing-panel.component.js +240 -0
- package/dist/lib/panels/ai-skill-sharing/ai-skill-sharing-panel.component.js.map +1 -0
- package/dist/lib/panels/model-predictions/model-prediction.logic.d.ts +69 -0
- package/dist/lib/panels/model-predictions/model-prediction.logic.d.ts.map +1 -0
- package/dist/lib/panels/model-predictions/model-prediction.logic.js +130 -0
- package/dist/lib/panels/model-predictions/model-prediction.logic.js.map +1 -0
- package/dist/lib/panels/model-predictions/model-prediction.panel.d.ts +83 -0
- package/dist/lib/panels/model-predictions/model-prediction.panel.d.ts.map +1 -0
- package/dist/lib/panels/model-predictions/model-prediction.panel.js +293 -0
- package/dist/lib/panels/model-predictions/model-prediction.panel.js.map +1 -0
- package/package.json +38 -36
- package/dist/lib/custom/ai-agent-run/ai-agent-run-visualization.component.d.ts +0 -82
- package/dist/lib/custom/ai-agent-run/ai-agent-run-visualization.component.d.ts.map +0 -1
- package/dist/lib/custom/ai-agent-run/ai-agent-run-visualization.component.js +0 -1033
- package/dist/lib/custom/ai-agent-run/ai-agent-run-visualization.component.js.map +0 -1
|
@@ -1,1033 +0,0 @@
|
|
|
1
|
-
import { Component, Input, ViewChild, ChangeDetectionStrategy } from '@angular/core';
|
|
2
|
-
import { Subject, combineLatest } from 'rxjs';
|
|
3
|
-
import { takeUntil } from 'rxjs/operators';
|
|
4
|
-
import { UUIDsEqual } from '@memberjunction/global';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
import * as i1 from "angular-split";
|
|
7
|
-
import * as i2 from "./ai-agent-run-step-detail.component";
|
|
8
|
-
const _c0 = ["svgContainer"];
|
|
9
|
-
function AIAgentRunVisualizationComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
10
|
-
i0.ɵɵelementStart(0, "div", 2);
|
|
11
|
-
i0.ɵɵelement(1, "i", 4);
|
|
12
|
-
i0.ɵɵelementStart(2, "span");
|
|
13
|
-
i0.ɵɵtext(3);
|
|
14
|
-
i0.ɵɵelementEnd()();
|
|
15
|
-
} if (rf & 2) {
|
|
16
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
17
|
-
i0.ɵɵadvance(3);
|
|
18
|
-
i0.ɵɵtextInterpolate(ctx_r0.error);
|
|
19
|
-
} }
|
|
20
|
-
function AIAgentRunVisualizationComponent_Conditional_2_Conditional_17_Template(rf, ctx) { if (rf & 1) {
|
|
21
|
-
i0.ɵɵelementStart(0, "div", 18);
|
|
22
|
-
i0.ɵɵelement(1, "i", 20);
|
|
23
|
-
i0.ɵɵelementStart(2, "span");
|
|
24
|
-
i0.ɵɵtext(3, "Loading visualization...");
|
|
25
|
-
i0.ɵɵelementEnd()();
|
|
26
|
-
} }
|
|
27
|
-
function AIAgentRunVisualizationComponent_Conditional_2_Conditional_18_Template(rf, ctx) { if (rf & 1) {
|
|
28
|
-
const _r3 = i0.ɵɵgetCurrentView();
|
|
29
|
-
i0.ɵɵelementStart(0, "as-split-area", 19)(1, "mj-ai-agent-run-step-detail", 21);
|
|
30
|
-
i0.ɵɵlistener("closePanel", function AIAgentRunVisualizationComponent_Conditional_2_Conditional_18_Template_mj_ai_agent_run_step_detail_closePanel_1_listener() { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.closeDetailPane()); })("navigateToActionLog", function AIAgentRunVisualizationComponent_Conditional_2_Conditional_18_Template_mj_ai_agent_run_step_detail_navigateToActionLog_1_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.navigateToActionLog($event)); })("copyToClipboard", function AIAgentRunVisualizationComponent_Conditional_2_Conditional_18_Template_mj_ai_agent_run_step_detail_copyToClipboard_1_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.copyToClipboard($event)); });
|
|
31
|
-
i0.ɵɵelementEnd()();
|
|
32
|
-
} if (rf & 2) {
|
|
33
|
-
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
34
|
-
i0.ɵɵproperty("size", 30)("minSize", 20)("maxSize", 50);
|
|
35
|
-
i0.ɵɵadvance();
|
|
36
|
-
i0.ɵɵproperty("selectedTimelineItem", ctx_r0.selectedItem);
|
|
37
|
-
} }
|
|
38
|
-
function AIAgentRunVisualizationComponent_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
39
|
-
const _r2 = i0.ɵɵgetCurrentView();
|
|
40
|
-
i0.ɵɵelementStart(0, "as-split", 3)(1, "as-split-area", 5)(2, "div", 6, 0)(4, "div", 7)(5, "div", 8);
|
|
41
|
-
i0.ɵɵelement(6, "i", 9);
|
|
42
|
-
i0.ɵɵtext(7, " Agent Execution Flow ");
|
|
43
|
-
i0.ɵɵelementEnd();
|
|
44
|
-
i0.ɵɵelementStart(8, "div", 10)(9, "button", 11);
|
|
45
|
-
i0.ɵɵlistener("click", function AIAgentRunVisualizationComponent_Conditional_2_Template_button_click_9_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.zoomIn()); });
|
|
46
|
-
i0.ɵɵelement(10, "i", 12);
|
|
47
|
-
i0.ɵɵelementEnd();
|
|
48
|
-
i0.ɵɵelementStart(11, "button", 13);
|
|
49
|
-
i0.ɵɵlistener("click", function AIAgentRunVisualizationComponent_Conditional_2_Template_button_click_11_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.zoomOut()); });
|
|
50
|
-
i0.ɵɵelement(12, "i", 14);
|
|
51
|
-
i0.ɵɵelementEnd();
|
|
52
|
-
i0.ɵɵelementStart(13, "button", 15);
|
|
53
|
-
i0.ɵɵlistener("click", function AIAgentRunVisualizationComponent_Conditional_2_Template_button_click_13_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.resetZoom()); });
|
|
54
|
-
i0.ɵɵelement(14, "i", 16);
|
|
55
|
-
i0.ɵɵelementEnd();
|
|
56
|
-
i0.ɵɵelementStart(15, "span", 17);
|
|
57
|
-
i0.ɵɵtext(16);
|
|
58
|
-
i0.ɵɵelementEnd()()();
|
|
59
|
-
i0.ɵɵconditionalCreate(17, AIAgentRunVisualizationComponent_Conditional_2_Conditional_17_Template, 4, 0, "div", 18);
|
|
60
|
-
i0.ɵɵelementEnd()();
|
|
61
|
-
i0.ɵɵconditionalCreate(18, AIAgentRunVisualizationComponent_Conditional_2_Conditional_18_Template, 2, 4, "as-split-area", 19);
|
|
62
|
-
i0.ɵɵelementEnd();
|
|
63
|
-
} if (rf & 2) {
|
|
64
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
65
|
-
i0.ɵɵadvance();
|
|
66
|
-
i0.ɵɵproperty("size", ctx_r0.selectedItem ? 70 : 100);
|
|
67
|
-
i0.ɵɵadvance(15);
|
|
68
|
-
i0.ɵɵtextInterpolate1("", (ctx_r0.panZoom.scale * 100).toFixed(0), "%");
|
|
69
|
-
i0.ɵɵadvance();
|
|
70
|
-
i0.ɵɵconditional(ctx_r0.loading ? 17 : -1);
|
|
71
|
-
i0.ɵɵadvance();
|
|
72
|
-
i0.ɵɵconditional(ctx_r0.selectedItem ? 18 : -1);
|
|
73
|
-
} }
|
|
74
|
-
export class AIAgentRunVisualizationComponent {
|
|
75
|
-
/** Remove timeout from tracking array */
|
|
76
|
-
removeTimeoutFromTracking(timeoutId) {
|
|
77
|
-
const index = this.activeTimeouts.indexOf(timeoutId);
|
|
78
|
-
if (index > -1) {
|
|
79
|
-
this.activeTimeouts.splice(index, 1);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
constructor(cdr) {
|
|
83
|
-
this.cdr = cdr;
|
|
84
|
-
this.destroy$ = new Subject();
|
|
85
|
-
this.viewInitialized = false;
|
|
86
|
-
/** Track active timeouts for cleanup */
|
|
87
|
-
this.activeTimeouts = [];
|
|
88
|
-
this.pendingData = null;
|
|
89
|
-
this.loading = false; // Start with false so the container renders
|
|
90
|
-
this.error = null;
|
|
91
|
-
this.dataLoading = false; // Track data loading state from service
|
|
92
|
-
this.selectedItem = null;
|
|
93
|
-
// Node management
|
|
94
|
-
this.nodes = new Map();
|
|
95
|
-
this.scopes = new Map();
|
|
96
|
-
this.connections = [];
|
|
97
|
-
// Pan and zoom state
|
|
98
|
-
this.panZoom = {
|
|
99
|
-
scale: 1,
|
|
100
|
-
translateX: 0,
|
|
101
|
-
translateY: 0,
|
|
102
|
-
isPanning: false,
|
|
103
|
-
startX: 0,
|
|
104
|
-
startY: 0
|
|
105
|
-
};
|
|
106
|
-
// Drag state
|
|
107
|
-
this.dragState = {
|
|
108
|
-
isDragging: false,
|
|
109
|
-
element: null,
|
|
110
|
-
nodeId: null,
|
|
111
|
-
startX: 0,
|
|
112
|
-
startY: 0,
|
|
113
|
-
startTransform: { x: 0, y: 0 }
|
|
114
|
-
};
|
|
115
|
-
// Pan state
|
|
116
|
-
this.panState = {
|
|
117
|
-
isPanning: false,
|
|
118
|
-
startX: 0,
|
|
119
|
-
startY: 0,
|
|
120
|
-
initialTranslateX: 0,
|
|
121
|
-
initialTranslateY: 0
|
|
122
|
-
};
|
|
123
|
-
// Animation frame ID for cleanup
|
|
124
|
-
this.animationFrameId = null;
|
|
125
|
-
// Bound event handlers for proper cleanup
|
|
126
|
-
this.boundOnWheel = this.onWheel.bind(this);
|
|
127
|
-
this.boundOnSvgMouseDown = this.onSvgMouseDown.bind(this);
|
|
128
|
-
this.boundOnSvgMouseMove = this.onSvgMouseMove.bind(this);
|
|
129
|
-
this.boundOnSvgMouseUp = this.onSvgMouseUp.bind(this);
|
|
130
|
-
this.onMouseMove = (event) => {
|
|
131
|
-
if (!this.dragState.isDragging || !this.dragState.element)
|
|
132
|
-
return;
|
|
133
|
-
const svg = this.dragState.element.ownerSVGElement;
|
|
134
|
-
if (!svg)
|
|
135
|
-
return;
|
|
136
|
-
const pt = svg.createSVGPoint();
|
|
137
|
-
pt.x = event.clientX;
|
|
138
|
-
pt.y = event.clientY;
|
|
139
|
-
const svgP = pt.matrixTransform(svg.getScreenCTM()?.inverse());
|
|
140
|
-
const dx = svgP.x - this.dragState.startX;
|
|
141
|
-
const dy = svgP.y - this.dragState.startY;
|
|
142
|
-
const newX = this.dragState.startTransform.x + dx;
|
|
143
|
-
const newY = this.dragState.startTransform.y + dy;
|
|
144
|
-
// Update element position
|
|
145
|
-
this.dragState.element.setAttribute('transform', `translate(${newX}, ${newY})`);
|
|
146
|
-
// Update node data
|
|
147
|
-
const node = this.nodes.get(this.dragState.nodeId);
|
|
148
|
-
if (node) {
|
|
149
|
-
node.x = newX;
|
|
150
|
-
node.y = newY;
|
|
151
|
-
}
|
|
152
|
-
// Update connections
|
|
153
|
-
this.drawConnections();
|
|
154
|
-
};
|
|
155
|
-
this.onMouseUp = (event) => {
|
|
156
|
-
if (!this.dragState.isDragging || !this.dragState.element)
|
|
157
|
-
return;
|
|
158
|
-
this.dragState.element.classList.remove('dragging');
|
|
159
|
-
// Clean up
|
|
160
|
-
this.dragState = {
|
|
161
|
-
isDragging: false,
|
|
162
|
-
element: null,
|
|
163
|
-
nodeId: null,
|
|
164
|
-
startX: 0,
|
|
165
|
-
startY: 0,
|
|
166
|
-
startTransform: { x: 0, y: 0 }
|
|
167
|
-
};
|
|
168
|
-
document.removeEventListener('mousemove', this.onMouseMove);
|
|
169
|
-
document.removeEventListener('mouseup', this.onMouseUp);
|
|
170
|
-
};
|
|
171
|
-
}
|
|
172
|
-
ngOnInit() {
|
|
173
|
-
if (this.aiAgentRunId) {
|
|
174
|
-
// Subscribe to data from helper
|
|
175
|
-
combineLatest([
|
|
176
|
-
this.dataHelper.steps$,
|
|
177
|
-
this.dataHelper.subRuns$,
|
|
178
|
-
this.dataHelper.actionLogs$,
|
|
179
|
-
this.dataHelper.promptRuns$,
|
|
180
|
-
this.dataHelper.loading$
|
|
181
|
-
]).pipe(takeUntil(this.destroy$)).subscribe(([steps, subRuns, actionLogs, promptRuns, loading]) => {
|
|
182
|
-
this.dataLoading = loading;
|
|
183
|
-
if (!loading && steps && steps.length > 0) {
|
|
184
|
-
console.log('Visualization: Received data from service', {
|
|
185
|
-
steps: steps.length,
|
|
186
|
-
subRuns: subRuns.length,
|
|
187
|
-
viewInitialized: this.viewInitialized
|
|
188
|
-
});
|
|
189
|
-
if (this.viewInitialized && this.svgContainer?.nativeElement) {
|
|
190
|
-
// View is ready, build immediately
|
|
191
|
-
this.buildVisualization(steps, subRuns, actionLogs, promptRuns);
|
|
192
|
-
}
|
|
193
|
-
else {
|
|
194
|
-
// Store data for when view is ready
|
|
195
|
-
console.log('View not ready, storing data for later');
|
|
196
|
-
this.pendingData = { steps, subRuns, actionLogs, promptRuns };
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
else if (!loading && (!steps || steps.length === 0)) {
|
|
200
|
-
console.log('Visualization: No steps available');
|
|
201
|
-
this.error = null;
|
|
202
|
-
}
|
|
203
|
-
});
|
|
204
|
-
// Subscribe to error state
|
|
205
|
-
this.dataHelper.error$.pipe(takeUntil(this.destroy$)).subscribe((error) => {
|
|
206
|
-
if (error) {
|
|
207
|
-
this.error = error;
|
|
208
|
-
this.loading = false;
|
|
209
|
-
}
|
|
210
|
-
});
|
|
211
|
-
}
|
|
212
|
-
else {
|
|
213
|
-
console.error('Visualization: No agent run ID provided');
|
|
214
|
-
this.error = 'No agent run ID provided';
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
ngAfterViewInit() {
|
|
218
|
-
console.log('Visualization ngAfterViewInit');
|
|
219
|
-
this.viewInitialized = true;
|
|
220
|
-
// Initialize SVG
|
|
221
|
-
if (this.svgContainer && this.svgContainer.nativeElement) {
|
|
222
|
-
this.initializeSVG();
|
|
223
|
-
// If we have pending data, process it now
|
|
224
|
-
if (this.pendingData) {
|
|
225
|
-
console.log('Processing pending data after view init');
|
|
226
|
-
this.buildVisualization(this.pendingData.steps, this.pendingData.subRuns, this.pendingData.actionLogs, this.pendingData.promptRuns);
|
|
227
|
-
this.pendingData = null;
|
|
228
|
-
}
|
|
229
|
-
this.cdr.detectChanges();
|
|
230
|
-
}
|
|
231
|
-
else {
|
|
232
|
-
console.error('SVG container not found in ngAfterViewInit');
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
ngOnDestroy() {
|
|
236
|
-
// Signal all subscriptions to complete
|
|
237
|
-
this.destroy$.next();
|
|
238
|
-
this.destroy$.complete();
|
|
239
|
-
// Clear all active timeouts
|
|
240
|
-
this.activeTimeouts.forEach(timeoutId => {
|
|
241
|
-
clearTimeout(timeoutId);
|
|
242
|
-
});
|
|
243
|
-
this.activeTimeouts.length = 0;
|
|
244
|
-
// Clean up document-level event listeners
|
|
245
|
-
document.removeEventListener('mousemove', this.onMouseMove);
|
|
246
|
-
document.removeEventListener('mouseup', this.onMouseUp);
|
|
247
|
-
// Clean up SVG and all its event listeners
|
|
248
|
-
if (this.svgContainer?.nativeElement) {
|
|
249
|
-
const svg = this.svgContainer.nativeElement.querySelector('svg');
|
|
250
|
-
if (svg) {
|
|
251
|
-
// Remove all SVG event listeners with bound handlers
|
|
252
|
-
svg.removeEventListener('wheel', this.boundOnWheel);
|
|
253
|
-
svg.removeEventListener('mousedown', this.boundOnSvgMouseDown);
|
|
254
|
-
svg.removeEventListener('mousemove', this.boundOnSvgMouseMove);
|
|
255
|
-
svg.removeEventListener('mouseup', this.boundOnSvgMouseUp);
|
|
256
|
-
// Remove all node and scope event listeners
|
|
257
|
-
// We can't remove specific listeners if we don't have references to them
|
|
258
|
-
// The best approach is to clone and replace the elements, which removes all listeners
|
|
259
|
-
svg.querySelectorAll('g[id^="node-"], g[id^="scope-"]').forEach(element => {
|
|
260
|
-
const clone = element.cloneNode(true);
|
|
261
|
-
element.parentNode?.replaceChild(clone, element);
|
|
262
|
-
});
|
|
263
|
-
// Remove expand button listeners
|
|
264
|
-
svg.querySelectorAll('.expand-button').forEach(button => {
|
|
265
|
-
const clone = button.cloneNode(true);
|
|
266
|
-
button.parentNode?.replaceChild(clone, button);
|
|
267
|
-
});
|
|
268
|
-
// Clear all SVG content
|
|
269
|
-
while (svg.firstChild) {
|
|
270
|
-
svg.removeChild(svg.firstChild);
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
// Clear data structures
|
|
275
|
-
this.nodes.clear();
|
|
276
|
-
this.scopes.clear();
|
|
277
|
-
this.connections = [];
|
|
278
|
-
// Clear any pending animation frames
|
|
279
|
-
if (this.animationFrameId) {
|
|
280
|
-
cancelAnimationFrame(this.animationFrameId);
|
|
281
|
-
this.animationFrameId = null;
|
|
282
|
-
}
|
|
283
|
-
// Reset state
|
|
284
|
-
this.dragState = {
|
|
285
|
-
isDragging: false,
|
|
286
|
-
element: null,
|
|
287
|
-
nodeId: null,
|
|
288
|
-
startX: 0,
|
|
289
|
-
startY: 0,
|
|
290
|
-
startTransform: { x: 0, y: 0 }
|
|
291
|
-
};
|
|
292
|
-
this.panState = {
|
|
293
|
-
isPanning: false,
|
|
294
|
-
startX: 0,
|
|
295
|
-
startY: 0,
|
|
296
|
-
initialTranslateX: 0,
|
|
297
|
-
initialTranslateY: 0
|
|
298
|
-
};
|
|
299
|
-
}
|
|
300
|
-
initializeSVG() {
|
|
301
|
-
const container = this.svgContainer?.nativeElement;
|
|
302
|
-
if (!container) {
|
|
303
|
-
console.error('SVG container element not found');
|
|
304
|
-
return;
|
|
305
|
-
}
|
|
306
|
-
// Create SVG element if it doesn't exist
|
|
307
|
-
let svg = container.querySelector('svg');
|
|
308
|
-
if (!svg) {
|
|
309
|
-
svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
|
|
310
|
-
svg.setAttribute('class', 'visualization-svg');
|
|
311
|
-
svg.setAttribute('width', '100%');
|
|
312
|
-
svg.setAttribute('height', '100%');
|
|
313
|
-
// Add event listeners with bound handlers
|
|
314
|
-
svg.addEventListener('wheel', this.boundOnWheel);
|
|
315
|
-
svg.addEventListener('mousedown', this.boundOnSvgMouseDown);
|
|
316
|
-
svg.addEventListener('mousemove', this.boundOnSvgMouseMove);
|
|
317
|
-
svg.addEventListener('mouseup', this.boundOnSvgMouseUp);
|
|
318
|
-
container.appendChild(svg);
|
|
319
|
-
}
|
|
320
|
-
// Add arrow marker definition
|
|
321
|
-
const defs = document.createElementNS('http://www.w3.org/2000/svg', 'defs');
|
|
322
|
-
const marker = document.createElementNS('http://www.w3.org/2000/svg', 'marker');
|
|
323
|
-
marker.setAttribute('id', 'arrowhead-viz');
|
|
324
|
-
marker.setAttribute('markerWidth', '10');
|
|
325
|
-
marker.setAttribute('markerHeight', '7');
|
|
326
|
-
marker.setAttribute('refX', '9');
|
|
327
|
-
marker.setAttribute('refY', '3.5');
|
|
328
|
-
marker.setAttribute('orient', 'auto');
|
|
329
|
-
const polygon = document.createElementNS('http://www.w3.org/2000/svg', 'polygon');
|
|
330
|
-
polygon.setAttribute('points', '0 0, 10 3.5, 0 7');
|
|
331
|
-
polygon.setAttribute('class', 'arrowhead-polygon');
|
|
332
|
-
marker.appendChild(polygon);
|
|
333
|
-
defs.appendChild(marker);
|
|
334
|
-
svg.appendChild(defs);
|
|
335
|
-
console.log('SVG initialized successfully');
|
|
336
|
-
}
|
|
337
|
-
async buildVisualization(steps, subRuns, actionLogs, promptRuns) {
|
|
338
|
-
console.log('buildVisualization called', {
|
|
339
|
-
steps: steps?.length || 0,
|
|
340
|
-
hasContainer: !!this.svgContainer,
|
|
341
|
-
containerElement: this.svgContainer?.nativeElement
|
|
342
|
-
});
|
|
343
|
-
if (!this.svgContainer || !this.svgContainer.nativeElement) {
|
|
344
|
-
console.error('SVG container not available');
|
|
345
|
-
this.loading = false;
|
|
346
|
-
this.error = 'Visualization container not ready';
|
|
347
|
-
return;
|
|
348
|
-
}
|
|
349
|
-
// If no steps, show empty state
|
|
350
|
-
if (!steps || steps.length === 0) {
|
|
351
|
-
console.log('No steps to visualize');
|
|
352
|
-
this.loading = false;
|
|
353
|
-
this.error = null;
|
|
354
|
-
return;
|
|
355
|
-
}
|
|
356
|
-
this.loading = true;
|
|
357
|
-
this.error = null;
|
|
358
|
-
try {
|
|
359
|
-
// Wait a tick for the view to be fully ready
|
|
360
|
-
await new Promise(resolve => {
|
|
361
|
-
const timeoutId = setTimeout(() => {
|
|
362
|
-
this.removeTimeoutFromTracking(timeoutId);
|
|
363
|
-
resolve(undefined);
|
|
364
|
-
}, 0);
|
|
365
|
-
this.activeTimeouts.push(timeoutId);
|
|
366
|
-
});
|
|
367
|
-
// Clear existing elements
|
|
368
|
-
this.clearVisualization();
|
|
369
|
-
// Build nodes and scopes
|
|
370
|
-
await this.buildNodesAndScopes(steps, subRuns, promptRuns);
|
|
371
|
-
// Arrange layout
|
|
372
|
-
this.arrangeLayout();
|
|
373
|
-
// Draw connections
|
|
374
|
-
this.drawConnections();
|
|
375
|
-
// Fit to view
|
|
376
|
-
this.fitToView();
|
|
377
|
-
this.loading = false;
|
|
378
|
-
console.log('Visualization built successfully');
|
|
379
|
-
// Trigger change detection since we're using OnPush
|
|
380
|
-
this.cdr.markForCheck();
|
|
381
|
-
}
|
|
382
|
-
catch (error) {
|
|
383
|
-
this.error = 'Failed to build visualization';
|
|
384
|
-
console.error('Visualization error:', error);
|
|
385
|
-
this.loading = false;
|
|
386
|
-
// Trigger change detection since we're using OnPush
|
|
387
|
-
this.cdr.markForCheck();
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
clearVisualization() {
|
|
391
|
-
const svg = this.svgContainer?.nativeElement?.querySelector('svg');
|
|
392
|
-
if (!svg)
|
|
393
|
-
return;
|
|
394
|
-
const mainGroup = svg.querySelector('.main-group');
|
|
395
|
-
if (mainGroup) {
|
|
396
|
-
// Remove all child elements except defs
|
|
397
|
-
while (mainGroup.firstChild) {
|
|
398
|
-
mainGroup.removeChild(mainGroup.firstChild);
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
this.nodes.clear();
|
|
402
|
-
this.scopes.clear();
|
|
403
|
-
this.connections = [];
|
|
404
|
-
}
|
|
405
|
-
async buildNodesAndScopes(steps, subRuns, promptRuns) {
|
|
406
|
-
const svg = this.svgContainer?.nativeElement?.querySelector('svg');
|
|
407
|
-
if (!svg)
|
|
408
|
-
return;
|
|
409
|
-
let mainGroup = svg.querySelector('.main-group');
|
|
410
|
-
if (!mainGroup) {
|
|
411
|
-
mainGroup = document.createElementNS('http://www.w3.org/2000/svg', 'g');
|
|
412
|
-
mainGroup.setAttribute('class', 'main-group');
|
|
413
|
-
svg.appendChild(mainGroup);
|
|
414
|
-
}
|
|
415
|
-
// Create nodes for each step
|
|
416
|
-
for (let i = 0; i < steps.length; i++) {
|
|
417
|
-
const step = steps[i];
|
|
418
|
-
if (step.StepType === 'Sub-Agent' && step.TargetLogID) {
|
|
419
|
-
// Create a scope for sub-agent
|
|
420
|
-
const subRun = subRuns.find(sr => UUIDsEqual(sr.ID, step.TargetLogID));
|
|
421
|
-
const scopeElement = await this.createScopeElement(step, subRun);
|
|
422
|
-
mainGroup.appendChild(scopeElement);
|
|
423
|
-
const scope = {
|
|
424
|
-
id: step.ID,
|
|
425
|
-
name: subRun?.Agent || 'Sub-Agent',
|
|
426
|
-
x: 0,
|
|
427
|
-
y: 0,
|
|
428
|
-
width: 300,
|
|
429
|
-
height: 200,
|
|
430
|
-
expanded: false,
|
|
431
|
-
nodes: [],
|
|
432
|
-
element: scopeElement
|
|
433
|
-
};
|
|
434
|
-
this.scopes.set(step.ID, scope);
|
|
435
|
-
}
|
|
436
|
-
else {
|
|
437
|
-
// Create regular node
|
|
438
|
-
const nodeElement = this.createNodeElement(step, promptRuns);
|
|
439
|
-
mainGroup.appendChild(nodeElement);
|
|
440
|
-
const nodeData = {
|
|
441
|
-
step: step,
|
|
442
|
-
x: 0,
|
|
443
|
-
y: 0,
|
|
444
|
-
width: 180,
|
|
445
|
-
height: 80,
|
|
446
|
-
element: nodeElement
|
|
447
|
-
};
|
|
448
|
-
this.nodes.set(step.ID, nodeData);
|
|
449
|
-
}
|
|
450
|
-
// Add connection info
|
|
451
|
-
if (i > 0) {
|
|
452
|
-
this.connections.push({
|
|
453
|
-
from: steps[i - 1].ID,
|
|
454
|
-
to: step.ID
|
|
455
|
-
});
|
|
456
|
-
}
|
|
457
|
-
}
|
|
458
|
-
}
|
|
459
|
-
createNodeElement(step, promptRuns) {
|
|
460
|
-
const g = document.createElementNS('http://www.w3.org/2000/svg', 'g');
|
|
461
|
-
g.setAttribute('class', 'step-node');
|
|
462
|
-
g.setAttribute('data-step-id', step.ID);
|
|
463
|
-
g.setAttribute('data-type', this.getStepDataType(step.StepType));
|
|
464
|
-
// Add event handlers
|
|
465
|
-
g.addEventListener('click', (e) => this.onNodeClick(e, step));
|
|
466
|
-
g.addEventListener('mousedown', (e) => this.onNodeMouseDown(e, step.ID));
|
|
467
|
-
g.style.cursor = 'pointer';
|
|
468
|
-
const nodeWidth = 180;
|
|
469
|
-
const nodeHeight = 80;
|
|
470
|
-
// Background rectangle
|
|
471
|
-
const rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect');
|
|
472
|
-
rect.setAttribute('width', nodeWidth.toString());
|
|
473
|
-
rect.setAttribute('height', nodeHeight.toString());
|
|
474
|
-
rect.setAttribute('rx', '8');
|
|
475
|
-
rect.setAttribute('class', 'node-bg');
|
|
476
|
-
rect.setAttribute('stroke', this.getStepColor(step));
|
|
477
|
-
rect.setAttribute('stroke-width', '2');
|
|
478
|
-
g.appendChild(rect);
|
|
479
|
-
// Status indicator
|
|
480
|
-
const statusCircle = document.createElementNS('http://www.w3.org/2000/svg', 'circle');
|
|
481
|
-
statusCircle.setAttribute('cx', '12');
|
|
482
|
-
statusCircle.setAttribute('cy', '12');
|
|
483
|
-
statusCircle.setAttribute('r', '6');
|
|
484
|
-
statusCircle.setAttribute('fill', this.getStatusColor(step.Status));
|
|
485
|
-
g.appendChild(statusCircle);
|
|
486
|
-
// Icon
|
|
487
|
-
const icon = document.createElementNS('http://www.w3.org/2000/svg', 'text');
|
|
488
|
-
icon.setAttribute('x', '35');
|
|
489
|
-
icon.setAttribute('y', '20');
|
|
490
|
-
icon.setAttribute('font-size', '18');
|
|
491
|
-
icon.setAttribute('fill', this.getStepColor(step));
|
|
492
|
-
icon.textContent = this.getStepEmoji(step.StepType);
|
|
493
|
-
g.appendChild(icon);
|
|
494
|
-
// Title
|
|
495
|
-
const title = document.createElementNS('http://www.w3.org/2000/svg', 'text');
|
|
496
|
-
title.setAttribute('x', '60');
|
|
497
|
-
title.setAttribute('y', '20');
|
|
498
|
-
title.setAttribute('font-size', '14');
|
|
499
|
-
title.setAttribute('font-weight', '600');
|
|
500
|
-
title.setAttribute('class', 'node-title');
|
|
501
|
-
title.textContent = this.truncateText(step.StepName || `Step ${step.StepNumber}`, 15);
|
|
502
|
-
g.appendChild(title);
|
|
503
|
-
// Step type
|
|
504
|
-
const type = document.createElementNS('http://www.w3.org/2000/svg', 'text');
|
|
505
|
-
type.setAttribute('x', '12');
|
|
506
|
-
type.setAttribute('y', '40');
|
|
507
|
-
type.setAttribute('font-size', '12');
|
|
508
|
-
type.setAttribute('class', 'node-subtitle');
|
|
509
|
-
type.textContent = step.StepType;
|
|
510
|
-
g.appendChild(type);
|
|
511
|
-
// Model info for prompts
|
|
512
|
-
if (step.StepType === 'Prompt' && step.TargetLogID && promptRuns) {
|
|
513
|
-
const promptRun = promptRuns.find(pr => UUIDsEqual(pr.ID, step.TargetLogID));
|
|
514
|
-
if (promptRun) {
|
|
515
|
-
const model = document.createElementNS('http://www.w3.org/2000/svg', 'text');
|
|
516
|
-
model.setAttribute('x', '12');
|
|
517
|
-
model.setAttribute('y', '55');
|
|
518
|
-
model.setAttribute('font-size', '11');
|
|
519
|
-
model.setAttribute('class', 'node-meta');
|
|
520
|
-
model.textContent = `${promptRun.Model || 'Unknown'}`;
|
|
521
|
-
g.appendChild(model);
|
|
522
|
-
}
|
|
523
|
-
}
|
|
524
|
-
// Duration
|
|
525
|
-
if (step.CompletedAt) {
|
|
526
|
-
const duration = this.calculateDuration(step.StartedAt, step.CompletedAt);
|
|
527
|
-
const durationText = document.createElementNS('http://www.w3.org/2000/svg', 'text');
|
|
528
|
-
durationText.setAttribute('x', '12');
|
|
529
|
-
durationText.setAttribute('y', '70');
|
|
530
|
-
durationText.setAttribute('font-size', '11');
|
|
531
|
-
durationText.setAttribute('class', 'node-meta');
|
|
532
|
-
durationText.textContent = `⏱️ ${duration}`;
|
|
533
|
-
g.appendChild(durationText);
|
|
534
|
-
}
|
|
535
|
-
return g;
|
|
536
|
-
}
|
|
537
|
-
async createScopeElement(step, subRun) {
|
|
538
|
-
const g = document.createElementNS('http://www.w3.org/2000/svg', 'g');
|
|
539
|
-
g.setAttribute('class', 'scope-container');
|
|
540
|
-
g.setAttribute('data-scope-id', step.ID);
|
|
541
|
-
const scopeWidth = 300;
|
|
542
|
-
const scopeHeight = 200;
|
|
543
|
-
const headerHeight = 40;
|
|
544
|
-
// Background
|
|
545
|
-
const bg = document.createElementNS('http://www.w3.org/2000/svg', 'rect');
|
|
546
|
-
bg.setAttribute('width', scopeWidth.toString());
|
|
547
|
-
bg.setAttribute('height', scopeHeight.toString());
|
|
548
|
-
bg.setAttribute('rx', '12');
|
|
549
|
-
bg.setAttribute('class', 'scope-bg');
|
|
550
|
-
bg.setAttribute('stroke-width', '2');
|
|
551
|
-
bg.setAttribute('stroke-dasharray', '5,5');
|
|
552
|
-
g.appendChild(bg);
|
|
553
|
-
// Header background
|
|
554
|
-
const headerBg = document.createElementNS('http://www.w3.org/2000/svg', 'rect');
|
|
555
|
-
headerBg.setAttribute('width', scopeWidth.toString());
|
|
556
|
-
headerBg.setAttribute('height', headerHeight.toString());
|
|
557
|
-
headerBg.setAttribute('rx', '12');
|
|
558
|
-
headerBg.setAttribute('class', 'scope-header');
|
|
559
|
-
g.appendChild(headerBg);
|
|
560
|
-
// Fix bottom corners
|
|
561
|
-
const headerFix = document.createElementNS('http://www.w3.org/2000/svg', 'rect');
|
|
562
|
-
headerFix.setAttribute('y', (headerHeight - 12).toString());
|
|
563
|
-
headerFix.setAttribute('width', scopeWidth.toString());
|
|
564
|
-
headerFix.setAttribute('height', '12');
|
|
565
|
-
headerFix.setAttribute('class', 'scope-header');
|
|
566
|
-
g.appendChild(headerFix);
|
|
567
|
-
// Robot icon
|
|
568
|
-
const icon = document.createElementNS('http://www.w3.org/2000/svg', 'text');
|
|
569
|
-
icon.setAttribute('x', '12');
|
|
570
|
-
icon.setAttribute('y', '26');
|
|
571
|
-
icon.setAttribute('font-size', '20');
|
|
572
|
-
icon.textContent = '🤖';
|
|
573
|
-
g.appendChild(icon);
|
|
574
|
-
// Title
|
|
575
|
-
const title = document.createElementNS('http://www.w3.org/2000/svg', 'text');
|
|
576
|
-
title.setAttribute('x', '40');
|
|
577
|
-
title.setAttribute('y', '26');
|
|
578
|
-
title.setAttribute('font-size', '14');
|
|
579
|
-
title.setAttribute('font-weight', '600');
|
|
580
|
-
title.setAttribute('class', 'scope-title');
|
|
581
|
-
title.textContent = subRun?.Agent || 'Sub-Agent';
|
|
582
|
-
g.appendChild(title);
|
|
583
|
-
// Expand/collapse button
|
|
584
|
-
const expandBtn = document.createElementNS('http://www.w3.org/2000/svg', 'g');
|
|
585
|
-
expandBtn.setAttribute('class', 'expand-button');
|
|
586
|
-
expandBtn.style.cursor = 'pointer';
|
|
587
|
-
expandBtn.setAttribute('transform', `translate(${scopeWidth - 30}, 10)`);
|
|
588
|
-
const expandBg = document.createElementNS('http://www.w3.org/2000/svg', 'circle');
|
|
589
|
-
expandBg.setAttribute('cx', '10');
|
|
590
|
-
expandBg.setAttribute('cy', '10');
|
|
591
|
-
expandBg.setAttribute('r', '10');
|
|
592
|
-
expandBg.setAttribute('class', 'expand-bg');
|
|
593
|
-
expandBtn.appendChild(expandBg);
|
|
594
|
-
const expandIcon = document.createElementNS('http://www.w3.org/2000/svg', 'text');
|
|
595
|
-
expandIcon.setAttribute('x', '10');
|
|
596
|
-
expandIcon.setAttribute('y', '15');
|
|
597
|
-
expandIcon.setAttribute('text-anchor', 'middle');
|
|
598
|
-
expandIcon.setAttribute('font-size', '12');
|
|
599
|
-
expandIcon.setAttribute('class', 'expand-icon');
|
|
600
|
-
expandIcon.textContent = '+';
|
|
601
|
-
expandBtn.appendChild(expandIcon);
|
|
602
|
-
expandBtn.addEventListener('click', (e) => this.onScopeExpandClick(e, step.ID));
|
|
603
|
-
g.appendChild(expandBtn);
|
|
604
|
-
// Click handler for scope
|
|
605
|
-
g.addEventListener('click', (e) => {
|
|
606
|
-
if (!e.target.closest('.expand-button')) {
|
|
607
|
-
this.onNodeClick(e, step);
|
|
608
|
-
}
|
|
609
|
-
});
|
|
610
|
-
return g;
|
|
611
|
-
}
|
|
612
|
-
arrangeLayout() {
|
|
613
|
-
const nodeSpacingX = 250;
|
|
614
|
-
const nodeSpacingY = 120;
|
|
615
|
-
const startX = 50;
|
|
616
|
-
const startY = 50;
|
|
617
|
-
let currentY = startY;
|
|
618
|
-
let index = 0;
|
|
619
|
-
// Arrange nodes and scopes sequentially
|
|
620
|
-
const allItems = [...this.nodes.values(), ...Array.from(this.scopes.values()).map(s => ({
|
|
621
|
-
step: { ID: s.id },
|
|
622
|
-
x: 0,
|
|
623
|
-
y: 0,
|
|
624
|
-
width: s.width,
|
|
625
|
-
height: s.height
|
|
626
|
-
}))];
|
|
627
|
-
// Sort by step number if available
|
|
628
|
-
allItems.sort((a, b) => {
|
|
629
|
-
const aStep = a.step;
|
|
630
|
-
const bStep = b.step;
|
|
631
|
-
return (aStep.StepNumber || 0) - (bStep.StepNumber || 0);
|
|
632
|
-
});
|
|
633
|
-
for (const item of allItems) {
|
|
634
|
-
const nodeData = this.nodes.get(item.step.ID);
|
|
635
|
-
const scopeData = this.scopes.get(item.step.ID);
|
|
636
|
-
if (nodeData) {
|
|
637
|
-
nodeData.x = startX;
|
|
638
|
-
nodeData.y = currentY;
|
|
639
|
-
if (nodeData.element) {
|
|
640
|
-
nodeData.element.setAttribute('transform', `translate(${nodeData.x}, ${nodeData.y})`);
|
|
641
|
-
}
|
|
642
|
-
currentY += nodeSpacingY;
|
|
643
|
-
}
|
|
644
|
-
else if (scopeData) {
|
|
645
|
-
scopeData.x = startX;
|
|
646
|
-
scopeData.y = currentY;
|
|
647
|
-
if (scopeData.element) {
|
|
648
|
-
scopeData.element.setAttribute('transform', `translate(${scopeData.x}, ${scopeData.y})`);
|
|
649
|
-
}
|
|
650
|
-
currentY += scopeData.height + nodeSpacingY;
|
|
651
|
-
}
|
|
652
|
-
}
|
|
653
|
-
}
|
|
654
|
-
drawConnections() {
|
|
655
|
-
const svg = this.svgContainer?.nativeElement?.querySelector('svg');
|
|
656
|
-
if (!svg)
|
|
657
|
-
return;
|
|
658
|
-
const mainGroup = svg.querySelector('.main-group');
|
|
659
|
-
if (!mainGroup)
|
|
660
|
-
return;
|
|
661
|
-
// Create connections group if not exists
|
|
662
|
-
let connectionsGroup = mainGroup.querySelector('.connections-group');
|
|
663
|
-
if (!connectionsGroup) {
|
|
664
|
-
connectionsGroup = document.createElementNS('http://www.w3.org/2000/svg', 'g');
|
|
665
|
-
connectionsGroup.setAttribute('class', 'connections-group');
|
|
666
|
-
mainGroup.insertBefore(connectionsGroup, mainGroup.firstChild);
|
|
667
|
-
}
|
|
668
|
-
// Clear existing connections
|
|
669
|
-
while (connectionsGroup.firstChild) {
|
|
670
|
-
connectionsGroup.removeChild(connectionsGroup.firstChild);
|
|
671
|
-
}
|
|
672
|
-
// Draw each connection
|
|
673
|
-
for (const conn of this.connections) {
|
|
674
|
-
const fromNode = this.nodes.get(conn.from);
|
|
675
|
-
const fromScope = this.scopes.get(conn.from);
|
|
676
|
-
const toNode = this.nodes.get(conn.to);
|
|
677
|
-
const toScope = this.scopes.get(conn.to);
|
|
678
|
-
let fromX = 0, fromY = 0, toX = 0, toY = 0;
|
|
679
|
-
if (fromNode) {
|
|
680
|
-
fromX = fromNode.x + fromNode.width / 2;
|
|
681
|
-
fromY = fromNode.y + fromNode.height;
|
|
682
|
-
}
|
|
683
|
-
else if (fromScope) {
|
|
684
|
-
fromX = fromScope.x + fromScope.width / 2;
|
|
685
|
-
fromY = fromScope.y + fromScope.height;
|
|
686
|
-
}
|
|
687
|
-
if (toNode) {
|
|
688
|
-
toX = toNode.x + toNode.width / 2;
|
|
689
|
-
toY = toNode.y;
|
|
690
|
-
}
|
|
691
|
-
else if (toScope) {
|
|
692
|
-
toX = toScope.x + toScope.width / 2;
|
|
693
|
-
toY = toScope.y;
|
|
694
|
-
}
|
|
695
|
-
if (fromX && fromY && toX && toY) {
|
|
696
|
-
const path = document.createElementNS('http://www.w3.org/2000/svg', 'path');
|
|
697
|
-
const d = `M ${fromX} ${fromY} L ${toX} ${toY}`;
|
|
698
|
-
path.setAttribute('d', d);
|
|
699
|
-
path.setAttribute('fill', 'none');
|
|
700
|
-
path.setAttribute('class', 'connection-line');
|
|
701
|
-
path.setAttribute('stroke-width', '2');
|
|
702
|
-
path.setAttribute('marker-end', 'url(#arrowhead-viz)');
|
|
703
|
-
connectionsGroup.appendChild(path);
|
|
704
|
-
conn.path = path;
|
|
705
|
-
}
|
|
706
|
-
}
|
|
707
|
-
}
|
|
708
|
-
fitToView() {
|
|
709
|
-
const svg = this.svgContainer?.nativeElement?.querySelector('svg');
|
|
710
|
-
const mainGroup = svg?.querySelector('.main-group');
|
|
711
|
-
if (!svg || !mainGroup)
|
|
712
|
-
return;
|
|
713
|
-
const bbox = mainGroup.getBBox();
|
|
714
|
-
const padding = 50;
|
|
715
|
-
const viewBox = `${bbox.x - padding} ${bbox.y - padding} ${bbox.width + 2 * padding} ${bbox.height + 2 * padding}`;
|
|
716
|
-
svg.setAttribute('viewBox', viewBox);
|
|
717
|
-
}
|
|
718
|
-
getStepColor(step) {
|
|
719
|
-
const colorMap = {
|
|
720
|
-
'Prompt': '#2196f3',
|
|
721
|
-
'Actions': '#4caf50',
|
|
722
|
-
'Sub-Agent': '#ff9800',
|
|
723
|
-
'Tool': '#9c27b0',
|
|
724
|
-
'Decision': '#f44336'
|
|
725
|
-
};
|
|
726
|
-
return colorMap[step.StepType] || '#757575';
|
|
727
|
-
}
|
|
728
|
-
getStepEmoji(stepType) {
|
|
729
|
-
const emojiMap = {
|
|
730
|
-
'Prompt': '💬',
|
|
731
|
-
'Actions': '⚙️',
|
|
732
|
-
'Sub-Agent': '🤖',
|
|
733
|
-
'Tool': '🔧',
|
|
734
|
-
'Decision': '🔀',
|
|
735
|
-
'ForEach': '🔁',
|
|
736
|
-
'While': '🔄'
|
|
737
|
-
};
|
|
738
|
-
return emojiMap[stepType] || '⚪';
|
|
739
|
-
}
|
|
740
|
-
getStatusColor(status) {
|
|
741
|
-
const colorMap = {
|
|
742
|
-
'Running': '#1976d2',
|
|
743
|
-
'Completed': '#388e3c',
|
|
744
|
-
'Failed': '#d32f2f',
|
|
745
|
-
'Cancelled': '#f57c00',
|
|
746
|
-
'Paused': '#757575'
|
|
747
|
-
};
|
|
748
|
-
return colorMap[status] || '#9e9e9e';
|
|
749
|
-
}
|
|
750
|
-
getStepDataType(stepType) {
|
|
751
|
-
const typeMap = {
|
|
752
|
-
'Prompt': 'prompt',
|
|
753
|
-
'Actions': 'action',
|
|
754
|
-
'Sub-Agent': 'subagent',
|
|
755
|
-
'Tool': 'tool',
|
|
756
|
-
'Decision': 'decision',
|
|
757
|
-
'ForEach': 'foreach',
|
|
758
|
-
'While': 'while'
|
|
759
|
-
};
|
|
760
|
-
return typeMap[stepType] || 'default';
|
|
761
|
-
}
|
|
762
|
-
truncateText(text, maxLength) {
|
|
763
|
-
if (text.length <= maxLength)
|
|
764
|
-
return text;
|
|
765
|
-
return text.substring(0, maxLength - 3) + '...';
|
|
766
|
-
}
|
|
767
|
-
calculateDuration(start, end) {
|
|
768
|
-
if (!end)
|
|
769
|
-
return 'Running...';
|
|
770
|
-
const ms = new Date(end).getTime() - new Date(start).getTime();
|
|
771
|
-
if (ms < 1000)
|
|
772
|
-
return `${ms}ms`;
|
|
773
|
-
if (ms < 60000)
|
|
774
|
-
return `${(ms / 1000).toFixed(1)}s`;
|
|
775
|
-
if (ms < 3600000)
|
|
776
|
-
return `${Math.floor(ms / 60000)}m ${Math.floor((ms % 60000) / 1000)}s`;
|
|
777
|
-
return `${Math.floor(ms / 3600000)}h ${Math.floor((ms % 3600000) / 60000)}m`;
|
|
778
|
-
}
|
|
779
|
-
// Event handlers
|
|
780
|
-
onNodeClick(event, step) {
|
|
781
|
-
event.stopPropagation();
|
|
782
|
-
// Create timeline item from step
|
|
783
|
-
const item = {
|
|
784
|
-
id: step.ID,
|
|
785
|
-
type: 'step',
|
|
786
|
-
title: step.StepName || `Step ${step.StepNumber}`,
|
|
787
|
-
subtitle: `Type: ${step.StepType}`,
|
|
788
|
-
status: step.Status,
|
|
789
|
-
startTime: step.StartedAt,
|
|
790
|
-
endTime: step.CompletedAt || undefined,
|
|
791
|
-
duration: this.calculateDuration(step.StartedAt, step.CompletedAt),
|
|
792
|
-
icon: this.getStepIcon(step.StepType),
|
|
793
|
-
color: this.getStatusColorName(step.Status),
|
|
794
|
-
data: step,
|
|
795
|
-
level: 0
|
|
796
|
-
};
|
|
797
|
-
this.selectedItem = item;
|
|
798
|
-
this.cdr.detectChanges();
|
|
799
|
-
}
|
|
800
|
-
getStepIcon(stepType) {
|
|
801
|
-
const iconMap = {
|
|
802
|
-
'Prompt': 'fa-microchip',
|
|
803
|
-
'Tool': 'fa-tools',
|
|
804
|
-
'Sub-Agent': 'fa-robot',
|
|
805
|
-
'Decision': 'fa-code-branch',
|
|
806
|
-
'Actions': 'fa-cog',
|
|
807
|
-
'ForEach': 'fa-repeat',
|
|
808
|
-
'While': 'fa-rotate'
|
|
809
|
-
};
|
|
810
|
-
return iconMap[stepType] || 'fa-circle';
|
|
811
|
-
}
|
|
812
|
-
getStatusColorName(status) {
|
|
813
|
-
const colorMap = {
|
|
814
|
-
'Running': 'info',
|
|
815
|
-
'Completed': 'success',
|
|
816
|
-
'Failed': 'error',
|
|
817
|
-
'Cancelled': 'warning',
|
|
818
|
-
'Paused': 'secondary'
|
|
819
|
-
};
|
|
820
|
-
return colorMap[status] || 'secondary';
|
|
821
|
-
}
|
|
822
|
-
async onScopeExpandClick(event, scopeId) {
|
|
823
|
-
event.stopPropagation();
|
|
824
|
-
const scope = this.scopes.get(scopeId);
|
|
825
|
-
if (!scope)
|
|
826
|
-
return;
|
|
827
|
-
scope.expanded = !scope.expanded;
|
|
828
|
-
if (scope.expanded) {
|
|
829
|
-
// Load sub-agent steps
|
|
830
|
-
await this.loadScopeContents(scopeId);
|
|
831
|
-
}
|
|
832
|
-
// Update UI
|
|
833
|
-
this.updateScopeVisual(scope);
|
|
834
|
-
this.arrangeLayout();
|
|
835
|
-
this.drawConnections();
|
|
836
|
-
}
|
|
837
|
-
async loadScopeContents(scopeId) {
|
|
838
|
-
const scope = this.scopes.get(scopeId);
|
|
839
|
-
if (!scope)
|
|
840
|
-
return;
|
|
841
|
-
// Find the step
|
|
842
|
-
const step = Array.from(this.nodes.values()).find(n => UUIDsEqual(n.step.ID, scopeId))?.step
|
|
843
|
-
|| Array.from(this.scopes.values()).find(s => s.id === scopeId);
|
|
844
|
-
if (!step || !step.TargetLogID)
|
|
845
|
-
return;
|
|
846
|
-
const targetLogId = step.TargetLogID;
|
|
847
|
-
try {
|
|
848
|
-
// Load sub-agent data through service
|
|
849
|
-
const data = await this.dataHelper.loadSubAgentData(targetLogId);
|
|
850
|
-
if (data.steps && data.steps.length > 0) {
|
|
851
|
-
// Create nodes from data
|
|
852
|
-
this.createScopeNodes(scope, data.steps, data.promptRuns);
|
|
853
|
-
}
|
|
854
|
-
}
|
|
855
|
-
catch (error) {
|
|
856
|
-
console.error('Failed to load scope contents:', error);
|
|
857
|
-
}
|
|
858
|
-
}
|
|
859
|
-
createScopeNodes(scope, steps, promptRuns) {
|
|
860
|
-
const svg = this.svgContainer?.nativeElement?.querySelector('svg');
|
|
861
|
-
if (!svg)
|
|
862
|
-
return;
|
|
863
|
-
const mainGroup = svg.querySelector('.main-group');
|
|
864
|
-
if (!mainGroup || !scope.element)
|
|
865
|
-
return;
|
|
866
|
-
// Create nodes inside scope
|
|
867
|
-
const nodeSpacingY = 60;
|
|
868
|
-
const startX = 20;
|
|
869
|
-
const startY = 60;
|
|
870
|
-
for (let i = 0; i < steps.length; i++) {
|
|
871
|
-
const step = steps[i];
|
|
872
|
-
const nodeElement = this.createNodeElement(step, promptRuns);
|
|
873
|
-
// Add node to scope group
|
|
874
|
-
scope.element.appendChild(nodeElement);
|
|
875
|
-
const nodeData = {
|
|
876
|
-
step: step,
|
|
877
|
-
x: startX,
|
|
878
|
-
y: startY + i * nodeSpacingY,
|
|
879
|
-
width: 160,
|
|
880
|
-
height: 60,
|
|
881
|
-
element: nodeElement
|
|
882
|
-
};
|
|
883
|
-
nodeElement.setAttribute('transform', `translate(${nodeData.x}, ${nodeData.y})`);
|
|
884
|
-
scope.nodes.push(nodeData);
|
|
885
|
-
this.nodes.set(step.ID, nodeData);
|
|
886
|
-
}
|
|
887
|
-
// Update scope height
|
|
888
|
-
scope.height = Math.max(200, startY + steps.length * nodeSpacingY + 20);
|
|
889
|
-
}
|
|
890
|
-
updateScopeVisual(scope) {
|
|
891
|
-
if (!scope.element)
|
|
892
|
-
return;
|
|
893
|
-
// Update background height
|
|
894
|
-
const bg = scope.element.querySelector('rect');
|
|
895
|
-
if (bg) {
|
|
896
|
-
bg.setAttribute('height', scope.height.toString());
|
|
897
|
-
}
|
|
898
|
-
// Update expand button
|
|
899
|
-
const expandIcon = scope.element.querySelector('.expand-button text');
|
|
900
|
-
if (expandIcon) {
|
|
901
|
-
expandIcon.textContent = scope.expanded ? '−' : '+';
|
|
902
|
-
}
|
|
903
|
-
}
|
|
904
|
-
// Drag handling
|
|
905
|
-
onNodeMouseDown(event, nodeId) {
|
|
906
|
-
event.preventDefault();
|
|
907
|
-
event.stopPropagation();
|
|
908
|
-
const node = this.nodes.get(nodeId);
|
|
909
|
-
if (!node || !node.element)
|
|
910
|
-
return;
|
|
911
|
-
// Get current transform
|
|
912
|
-
const transform = node.element.getAttribute('transform');
|
|
913
|
-
const match = transform?.match(/translate\(([-\d.]+),\s*([-\d.]+)\)/);
|
|
914
|
-
if (!match)
|
|
915
|
-
return;
|
|
916
|
-
// Get SVG coordinates
|
|
917
|
-
const svg = node.element.ownerSVGElement;
|
|
918
|
-
if (!svg)
|
|
919
|
-
return;
|
|
920
|
-
const pt = svg.createSVGPoint();
|
|
921
|
-
pt.x = event.clientX;
|
|
922
|
-
pt.y = event.clientY;
|
|
923
|
-
const svgP = pt.matrixTransform(svg.getScreenCTM()?.inverse());
|
|
924
|
-
this.dragState = {
|
|
925
|
-
isDragging: true,
|
|
926
|
-
element: node.element,
|
|
927
|
-
nodeId: nodeId,
|
|
928
|
-
startX: svgP.x,
|
|
929
|
-
startY: svgP.y,
|
|
930
|
-
startTransform: {
|
|
931
|
-
x: parseFloat(match[1]),
|
|
932
|
-
y: parseFloat(match[2])
|
|
933
|
-
}
|
|
934
|
-
};
|
|
935
|
-
node.element.classList.add('dragging');
|
|
936
|
-
// Add document-level event listeners
|
|
937
|
-
document.addEventListener('mousemove', this.onMouseMove);
|
|
938
|
-
document.addEventListener('mouseup', this.onMouseUp);
|
|
939
|
-
}
|
|
940
|
-
// Pan and zoom
|
|
941
|
-
onWheel(event) {
|
|
942
|
-
event.preventDefault();
|
|
943
|
-
const delta = event.deltaY > 0 ? 0.9 : 1.1;
|
|
944
|
-
this.panZoom.scale = Math.max(0.3, Math.min(3, this.panZoom.scale * delta));
|
|
945
|
-
this.updateTransform();
|
|
946
|
-
}
|
|
947
|
-
onSvgMouseDown(event) {
|
|
948
|
-
if (event.button === 0 && event.target === event.currentTarget) {
|
|
949
|
-
this.panZoom.isPanning = true;
|
|
950
|
-
this.panZoom.startX = event.clientX - this.panZoom.translateX;
|
|
951
|
-
this.panZoom.startY = event.clientY - this.panZoom.translateY;
|
|
952
|
-
event.preventDefault();
|
|
953
|
-
}
|
|
954
|
-
}
|
|
955
|
-
onSvgMouseMove(event) {
|
|
956
|
-
if (this.panZoom.isPanning) {
|
|
957
|
-
this.panZoom.translateX = event.clientX - this.panZoom.startX;
|
|
958
|
-
this.panZoom.translateY = event.clientY - this.panZoom.startY;
|
|
959
|
-
this.updateTransform();
|
|
960
|
-
}
|
|
961
|
-
}
|
|
962
|
-
onSvgMouseUp(event) {
|
|
963
|
-
this.panZoom.isPanning = false;
|
|
964
|
-
}
|
|
965
|
-
updateTransform() {
|
|
966
|
-
const svg = this.svgContainer?.nativeElement?.querySelector('svg');
|
|
967
|
-
if (svg) {
|
|
968
|
-
const mainGroup = svg.querySelector('.main-group');
|
|
969
|
-
if (mainGroup) {
|
|
970
|
-
mainGroup.setAttribute('transform', `translate(${this.panZoom.translateX}, ${this.panZoom.translateY}) scale(${this.panZoom.scale})`);
|
|
971
|
-
}
|
|
972
|
-
}
|
|
973
|
-
}
|
|
974
|
-
// Toolbar actions
|
|
975
|
-
zoomIn() {
|
|
976
|
-
this.panZoom.scale = Math.min(this.panZoom.scale * 1.2, 3);
|
|
977
|
-
this.updateTransform();
|
|
978
|
-
}
|
|
979
|
-
zoomOut() {
|
|
980
|
-
this.panZoom.scale = Math.max(this.panZoom.scale / 1.2, 0.3);
|
|
981
|
-
this.updateTransform();
|
|
982
|
-
}
|
|
983
|
-
resetZoom() {
|
|
984
|
-
this.panZoom.scale = 1;
|
|
985
|
-
this.panZoom.translateX = 0;
|
|
986
|
-
this.panZoom.translateY = 0;
|
|
987
|
-
this.updateTransform();
|
|
988
|
-
}
|
|
989
|
-
// Detail pane handlers
|
|
990
|
-
closeDetailPane() {
|
|
991
|
-
this.selectedItem = null;
|
|
992
|
-
this.cdr.detectChanges();
|
|
993
|
-
}
|
|
994
|
-
navigateToActionLog(logId) {
|
|
995
|
-
// Emit event to parent component
|
|
996
|
-
// Parent will handle navigation
|
|
997
|
-
}
|
|
998
|
-
async copyToClipboard(text) {
|
|
999
|
-
try {
|
|
1000
|
-
await navigator.clipboard.writeText(text);
|
|
1001
|
-
}
|
|
1002
|
-
catch (err) {
|
|
1003
|
-
console.error('Failed to copy to clipboard:', err);
|
|
1004
|
-
}
|
|
1005
|
-
}
|
|
1006
|
-
static { this.ɵfac = function AIAgentRunVisualizationComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || AIAgentRunVisualizationComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); }; }
|
|
1007
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AIAgentRunVisualizationComponent, selectors: [["mj-ai-agent-run-visualization"]], viewQuery: function AIAgentRunVisualizationComponent_Query(rf, ctx) { if (rf & 1) {
|
|
1008
|
-
i0.ɵɵviewQuery(_c0, 5);
|
|
1009
|
-
} if (rf & 2) {
|
|
1010
|
-
let _t;
|
|
1011
|
-
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.svgContainer = _t.first);
|
|
1012
|
-
} }, inputs: { aiAgentRunId: "aiAgentRunId", dataHelper: "dataHelper" }, standalone: false, decls: 3, vars: 1, consts: [["svgContainer", ""], [1, "visualization-container"], [1, "error-state"], ["direction", "horizontal", 2, "height", "100%"], [1, "fa-solid", "fa-exclamation-triangle"], [3, "size"], [1, "diagram-container"], [1, "diagram-toolbar"], [1, "toolbar-title"], [1, "fa-solid", "fa-diagram-project"], [1, "zoom-controls"], ["title", "Zoom in", "aria-label", "Zoom in visualization", 3, "click"], ["aria-hidden", "true", 1, "fa-solid", "fa-search-plus"], ["title", "Zoom out", "aria-label", "Zoom out visualization", 3, "click"], ["aria-hidden", "true", 1, "fa-solid", "fa-search-minus"], ["title", "Reset zoom", "aria-label", "Reset zoom visualization", 3, "click"], ["aria-hidden", "true", 1, "fa-solid", "fa-compress"], [1, "zoom-level"], [1, "loading-overlay"], [3, "size", "minSize", "maxSize"], [1, "fa-solid", "fa-spinner", "fa-spin"], [3, "closePanel", "navigateToActionLog", "copyToClipboard", "selectedTimelineItem"]], template: function AIAgentRunVisualizationComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1013
|
-
i0.ɵɵelementStart(0, "div", 1);
|
|
1014
|
-
i0.ɵɵconditionalCreate(1, AIAgentRunVisualizationComponent_Conditional_1_Template, 4, 1, "div", 2)(2, AIAgentRunVisualizationComponent_Conditional_2_Template, 19, 4, "as-split", 3);
|
|
1015
|
-
i0.ɵɵelementEnd();
|
|
1016
|
-
} if (rf & 2) {
|
|
1017
|
-
i0.ɵɵadvance();
|
|
1018
|
-
i0.ɵɵconditional(ctx.error ? 1 : 2);
|
|
1019
|
-
} }, dependencies: [i1.SplitComponent, i1.SplitAreaComponent, i2.AIAgentRunStepDetailComponent], styles: [".visualization-container[_ngcontent-%COMP%] {\n width: 100%;\n height: 100%;\n position: relative;\n background: var(--mj-bg-surface-sunken);\n border: 1px solid var(--mj-border-default);\n border-radius: 4px;\n overflow: hidden;\n}\n\n.loading-state[_ngcontent-%COMP%], .error-state[_ngcontent-%COMP%], .empty-state[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n gap: 0.5rem;\n color: var(--mj-text-muted);\n}\n\n.error-state[_ngcontent-%COMP%] {\n color: var(--mj-status-error);\n}\n\n.empty-state[_ngcontent-%COMP%] {\n flex-direction: column;\n gap: 1rem;\n}\n\n.empty-state[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 2rem;\n opacity: 0.5;\n}\n\n.loading-overlay[_ngcontent-%COMP%] {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n display: flex;\n align-items: center;\n gap: 0.5rem;\n background: color-mix(in srgb, var(--mj-bg-surface) 90%, transparent);\n padding: 1rem 2rem;\n border-radius: 4px;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\n z-index: 10;\n}\n\n.diagram-container[_ngcontent-%COMP%] {\n width: 100%;\n height: 100%;\n position: relative;\n overflow: hidden;\n background: var(--mj-bg-surface-sunken);\n}\n\n.diagram-toolbar[_ngcontent-%COMP%] {\n position: absolute;\n top: 10px;\n right: 10px;\n left: 10px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n background: var(--mj-bg-surface);\n padding: 8px 12px;\n border-radius: 4px;\n box-shadow: 0 2px 4px rgba(0,0,0,0.1);\n z-index: 10;\n}\n\n.toolbar-title[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 14px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n\n.zoom-controls[_ngcontent-%COMP%] {\n display: flex;\n gap: 4px;\n align-items: center;\n}\n\n.zoom-controls[_ngcontent-%COMP%] button[_ngcontent-%COMP%] {\n padding: 6px 10px;\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n border-radius: 3px;\n cursor: pointer;\n font-size: 12px;\n display: flex;\n align-items: center;\n transition: all 0.2s;\n}\n\n.zoom-controls[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover {\n background: var(--mj-bg-surface-sunken);\n border-color: var(--mj-brand-primary);\n}\n\n.zoom-level[_ngcontent-%COMP%] {\n font-size: 12px;\n color: var(--mj-text-muted);\n margin-left: 8px;\n font-family: monospace;\n}\n\n.visualization-svg[_ngcontent-%COMP%] {\n width: 100%;\n height: 100%;\n cursor: grab;\n}\n\n.visualization-svg[_ngcontent-%COMP%]:active {\n cursor: grabbing;\n}\n\n\n\n[_nghost-%COMP%] .step-node {\n cursor: pointer;\n}\n\n[_nghost-%COMP%] .step-node.dragging {\n opacity: 0.8;\n cursor: move;\n}\n\n[_nghost-%COMP%] .step-node rect {\n filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));\n}\n\n[_nghost-%COMP%] .step-node:hover rect {\n filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));\n}\n\n\n\n[_nghost-%COMP%] .node-bg {\n fill: var(--mj-bg-surface-card);\n}\n\n[_nghost-%COMP%] .node-title {\n fill: var(--mj-text-primary);\n}\n\n[_nghost-%COMP%] .node-subtitle {\n fill: var(--mj-text-secondary);\n}\n\n[_nghost-%COMP%] .node-meta {\n fill: var(--mj-text-muted);\n}\n\n[_nghost-%COMP%] .connection-line {\n stroke: var(--mj-text-secondary);\n opacity: 0.5;\n}\n\n[_nghost-%COMP%] .arrowhead-polygon {\n fill: var(--mj-text-secondary);\n}\n\n[_nghost-%COMP%] .scope-bg {\n fill: var(--mj-bg-surface-sunken);\n stroke: var(--mj-brand-primary);\n}\n\n[_nghost-%COMP%] .scope-header {\n fill: color-mix(in srgb, var(--mj-brand-primary) 15%, var(--mj-bg-surface));\n}\n\n[_nghost-%COMP%] .scope-title {\n fill: var(--mj-brand-primary);\n}\n\n[_nghost-%COMP%] .expand-button .expand-bg {\n fill: var(--mj-bg-surface-card);\n stroke: var(--mj-brand-primary);\n}\n\n[_nghost-%COMP%] .expand-button .expand-icon {\n fill: var(--mj-brand-primary);\n}\n\n[_nghost-%COMP%] .scope-container {\n cursor: pointer;\n}\n\n[_nghost-%COMP%] .scope-container rect {\n filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));\n}\n\n[_nghost-%COMP%] .expand-button:hover circle {\n fill: color-mix(in srgb, var(--mj-brand-primary) 15%, var(--mj-bg-surface));\n}\n\n[_nghost-%COMP%] .connections-group path {\n transition: stroke-width 0.2s;\n}\n\n[_nghost-%COMP%] .connections-group path:hover {\n stroke-width: 3;\n}\n\n\n\n[_nghost-%COMP%] .k-splitter {\n border: none;\n}\n\n[_nghost-%COMP%] .k-splitter-pane {\n overflow: visible;\n}\n\n[_nghost-%COMP%] .k-splitbar {\n background: var(--mj-border-default);\n width: 4px;\n}\n\n[_nghost-%COMP%] .k-splitbar:hover {\n background: var(--mj-border-strong);\n}\n\n[_nghost-%COMP%] .k-splitbar-draggable-horizontal {\n cursor: col-resize;\n}\n\n\n\n[_nghost-%COMP%] .step-node[data-type=\"prompt\"] rect {\n fill: color-mix(in srgb, var(--mj-brand-primary) 15%, var(--mj-bg-surface));\n}\n\n[_nghost-%COMP%] .step-node[data-type=\"action\"] rect {\n fill: color-mix(in srgb, var(--mj-status-success) 15%, var(--mj-bg-surface));\n}\n\n[_nghost-%COMP%] .step-node[data-type=\"subagent\"] rect {\n fill: color-mix(in srgb, var(--mj-status-warning) 15%, var(--mj-bg-surface));\n}\n\n[_nghost-%COMP%] .step-node[data-type=\"tool\"] rect {\n fill: color-mix(in srgb, var(--mj-brand-primary) 15%, var(--mj-bg-surface));\n}\n\n[_nghost-%COMP%] .step-node[data-type=\"decision\"] rect {\n fill: color-mix(in srgb, var(--mj-status-error) 15%, var(--mj-bg-surface));\n}"], changeDetection: 0 }); }
|
|
1020
|
-
}
|
|
1021
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AIAgentRunVisualizationComponent, [{
|
|
1022
|
-
type: Component,
|
|
1023
|
-
args: [{ standalone: false, selector: 'mj-ai-agent-run-visualization', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"visualization-container\">\n @if (error) {\n <div class=\"error-state\">\n <i class=\"fa-solid fa-exclamation-triangle\"></i>\n <span>{{ error }}</span>\n </div>\n } @else {\n <as-split direction=\"horizontal\" style=\"height: 100%;\">\n <!-- Diagram Pane -->\n <as-split-area [size]=\"selectedItem ? 70 : 100\">\n <div class=\"diagram-container\" #svgContainer>\n <div class=\"diagram-toolbar\">\n <div class=\"toolbar-title\">\n <i class=\"fa-solid fa-diagram-project\"></i>\n Agent Execution Flow\n </div>\n <div class=\"zoom-controls\">\n <button (click)=\"zoomIn()\" title=\"Zoom in\" aria-label=\"Zoom in visualization\">\n <i class=\"fa-solid fa-search-plus\" aria-hidden=\"true\"></i>\n </button>\n <button (click)=\"zoomOut()\" title=\"Zoom out\" aria-label=\"Zoom out visualization\">\n <i class=\"fa-solid fa-search-minus\" aria-hidden=\"true\"></i>\n </button>\n <button (click)=\"resetZoom()\" title=\"Reset zoom\" aria-label=\"Reset zoom visualization\">\n <i class=\"fa-solid fa-compress\" aria-hidden=\"true\"></i>\n </button>\n <span class=\"zoom-level\">{{ (panZoom.scale * 100).toFixed(0) }}%</span>\n </div>\n </div>\n @if (loading) {\n <div class=\"loading-overlay\">\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n <span>Loading visualization...</span>\n </div>\n }\n </div>\n </as-split-area>\n\n <!-- Detail Pane -->\n @if (selectedItem) {\n <as-split-area [size]=\"30\" [minSize]=\"20\" [maxSize]=\"50\">\n <mj-ai-agent-run-step-detail\n [selectedTimelineItem]=\"selectedItem\"\n (closePanel)=\"closeDetailPane()\"\n (navigateToActionLog)=\"navigateToActionLog($event)\"\n (copyToClipboard)=\"copyToClipboard($event)\">\n </mj-ai-agent-run-step-detail>\n </as-split-area>\n }\n </as-split>\n }\n</div>", styles: [".visualization-container {\n width: 100%;\n height: 100%;\n position: relative;\n background: var(--mj-bg-surface-sunken);\n border: 1px solid var(--mj-border-default);\n border-radius: 4px;\n overflow: hidden;\n}\n\n.loading-state, .error-state, .empty-state {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n gap: 0.5rem;\n color: var(--mj-text-muted);\n}\n\n.error-state {\n color: var(--mj-status-error);\n}\n\n.empty-state {\n flex-direction: column;\n gap: 1rem;\n}\n\n.empty-state i {\n font-size: 2rem;\n opacity: 0.5;\n}\n\n.loading-overlay {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n display: flex;\n align-items: center;\n gap: 0.5rem;\n background: color-mix(in srgb, var(--mj-bg-surface) 90%, transparent);\n padding: 1rem 2rem;\n border-radius: 4px;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\n z-index: 10;\n}\n\n.diagram-container {\n width: 100%;\n height: 100%;\n position: relative;\n overflow: hidden;\n background: var(--mj-bg-surface-sunken);\n}\n\n.diagram-toolbar {\n position: absolute;\n top: 10px;\n right: 10px;\n left: 10px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n background: var(--mj-bg-surface);\n padding: 8px 12px;\n border-radius: 4px;\n box-shadow: 0 2px 4px rgba(0,0,0,0.1);\n z-index: 10;\n}\n\n.toolbar-title {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 14px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n\n.zoom-controls {\n display: flex;\n gap: 4px;\n align-items: center;\n}\n\n.zoom-controls button {\n padding: 6px 10px;\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n border-radius: 3px;\n cursor: pointer;\n font-size: 12px;\n display: flex;\n align-items: center;\n transition: all 0.2s;\n}\n\n.zoom-controls button:hover {\n background: var(--mj-bg-surface-sunken);\n border-color: var(--mj-brand-primary);\n}\n\n.zoom-level {\n font-size: 12px;\n color: var(--mj-text-muted);\n margin-left: 8px;\n font-family: monospace;\n}\n\n.visualization-svg {\n width: 100%;\n height: 100%;\n cursor: grab;\n}\n\n.visualization-svg:active {\n cursor: grabbing;\n}\n\n/* SVG Styles */\n:host ::ng-deep .step-node {\n cursor: pointer;\n}\n\n:host ::ng-deep .step-node.dragging {\n opacity: 0.8;\n cursor: move;\n}\n\n:host ::ng-deep .step-node rect {\n filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));\n}\n\n:host ::ng-deep .step-node:hover rect {\n filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));\n}\n\n/* SVG structural colors \u2014 adapt to light/dark theme via CSS classes */\n:host ::ng-deep .node-bg {\n fill: var(--mj-bg-surface-card);\n}\n\n:host ::ng-deep .node-title {\n fill: var(--mj-text-primary);\n}\n\n:host ::ng-deep .node-subtitle {\n fill: var(--mj-text-secondary);\n}\n\n:host ::ng-deep .node-meta {\n fill: var(--mj-text-muted);\n}\n\n:host ::ng-deep .connection-line {\n stroke: var(--mj-text-secondary);\n opacity: 0.5;\n}\n\n:host ::ng-deep .arrowhead-polygon {\n fill: var(--mj-text-secondary);\n}\n\n:host ::ng-deep .scope-bg {\n fill: var(--mj-bg-surface-sunken);\n stroke: var(--mj-brand-primary);\n}\n\n:host ::ng-deep .scope-header {\n fill: color-mix(in srgb, var(--mj-brand-primary) 15%, var(--mj-bg-surface));\n}\n\n:host ::ng-deep .scope-title {\n fill: var(--mj-brand-primary);\n}\n\n:host ::ng-deep .expand-button .expand-bg {\n fill: var(--mj-bg-surface-card);\n stroke: var(--mj-brand-primary);\n}\n\n:host ::ng-deep .expand-button .expand-icon {\n fill: var(--mj-brand-primary);\n}\n\n:host ::ng-deep .scope-container {\n cursor: pointer;\n}\n\n:host ::ng-deep .scope-container rect {\n filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));\n}\n\n:host ::ng-deep .expand-button:hover circle {\n fill: color-mix(in srgb, var(--mj-brand-primary) 15%, var(--mj-bg-surface));\n}\n\n:host ::ng-deep .connections-group path {\n transition: stroke-width 0.2s;\n}\n\n:host ::ng-deep .connections-group path:hover {\n stroke-width: 3;\n}\n\n/* Splitter customization */\n:host ::ng-deep .k-splitter {\n border: none;\n}\n\n:host ::ng-deep .k-splitter-pane {\n overflow: visible;\n}\n\n:host ::ng-deep .k-splitbar {\n background: var(--mj-border-default);\n width: 4px;\n}\n\n:host ::ng-deep .k-splitbar:hover {\n background: var(--mj-border-strong);\n}\n\n:host ::ng-deep .k-splitbar-draggable-horizontal {\n cursor: col-resize;\n}\n\n/* Node type colors */\n:host ::ng-deep .step-node[data-type=\"prompt\"] rect {\n fill: color-mix(in srgb, var(--mj-brand-primary) 15%, var(--mj-bg-surface));\n}\n\n:host ::ng-deep .step-node[data-type=\"action\"] rect {\n fill: color-mix(in srgb, var(--mj-status-success) 15%, var(--mj-bg-surface));\n}\n\n:host ::ng-deep .step-node[data-type=\"subagent\"] rect {\n fill: color-mix(in srgb, var(--mj-status-warning) 15%, var(--mj-bg-surface));\n}\n\n:host ::ng-deep .step-node[data-type=\"tool\"] rect {\n fill: color-mix(in srgb, var(--mj-brand-primary) 15%, var(--mj-bg-surface));\n}\n\n:host ::ng-deep .step-node[data-type=\"decision\"] rect {\n fill: color-mix(in srgb, var(--mj-status-error) 15%, var(--mj-bg-surface));\n}"] }]
|
|
1024
|
-
}], () => [{ type: i0.ChangeDetectorRef }], { svgContainer: [{
|
|
1025
|
-
type: ViewChild,
|
|
1026
|
-
args: ['svgContainer', { static: false }]
|
|
1027
|
-
}], aiAgentRunId: [{
|
|
1028
|
-
type: Input
|
|
1029
|
-
}], dataHelper: [{
|
|
1030
|
-
type: Input
|
|
1031
|
-
}] }); })();
|
|
1032
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(AIAgentRunVisualizationComponent, { className: "AIAgentRunVisualizationComponent", filePath: "src/lib/custom/ai-agent-run/ai-agent-run-visualization.component.ts", lineNumber: 37 }); })();
|
|
1033
|
-
//# sourceMappingURL=ai-agent-run-visualization.component.js.map
|