@memberjunction/ng-core-entity-forms 6.2.0-edge.0 → 6.2.0-edge.2
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/lib/custom/AIAgentCategories/ai-agent-category-overview.panel.d.ts +1 -1
- package/dist/lib/custom/AIAgentCategories/ai-agent-category-overview.panel.js +2 -2
- package/dist/lib/custom/AIAgentCategories/ai-agent-category-overview.panel.js.map +1 -1
- package/dist/lib/custom/AIAgentSessions/ai-agent-session-form.component.js.map +1 -1
- package/dist/lib/custom/AIAgents/add-action-dialog.component.d.ts +90 -16
- package/dist/lib/custom/AIAgents/add-action-dialog.component.d.ts.map +1 -1
- package/dist/lib/custom/AIAgents/add-action-dialog.component.js +218 -70
- package/dist/lib/custom/AIAgents/add-action-dialog.component.js.map +1 -1
- package/dist/lib/custom/AIAgents/agent-form-tabs.d.ts +1 -0
- package/dist/lib/custom/AIAgents/agent-form-tabs.d.ts.map +1 -1
- package/dist/lib/custom/AIAgents/agent-form-tabs.js +2 -0
- package/dist/lib/custom/AIAgents/agent-form-tabs.js.map +1 -1
- package/dist/lib/custom/AIAgents/agent-prompt-advanced-settings-dialog.component.d.ts +80 -16
- package/dist/lib/custom/AIAgents/agent-prompt-advanced-settings-dialog.component.d.ts.map +1 -1
- package/dist/lib/custom/AIAgents/agent-prompt-advanced-settings-dialog.component.js +146 -46
- package/dist/lib/custom/AIAgents/agent-prompt-advanced-settings-dialog.component.js.map +1 -1
- package/dist/lib/custom/AIAgents/ai-agent-form.component.d.ts +329 -27
- package/dist/lib/custom/AIAgents/ai-agent-form.component.d.ts.map +1 -1
- package/dist/lib/custom/AIAgents/ai-agent-form.component.js +1322 -783
- package/dist/lib/custom/AIAgents/ai-agent-form.component.js.map +1 -1
- package/dist/lib/custom/AIAgents/ai-agent-management.service.d.ts +76 -0
- package/dist/lib/custom/AIAgents/ai-agent-management.service.d.ts.map +1 -1
- package/dist/lib/custom/AIAgents/ai-agent-management.service.js +77 -33
- package/dist/lib/custom/AIAgents/ai-agent-management.service.js.map +1 -1
- package/dist/lib/custom/AIAgents/create-prompt-dialog.component.d.ts +69 -15
- package/dist/lib/custom/AIAgents/create-prompt-dialog.component.d.ts.map +1 -1
- package/dist/lib/custom/AIAgents/create-prompt-dialog.component.js +182 -74
- package/dist/lib/custom/AIAgents/create-prompt-dialog.component.js.map +1 -1
- package/dist/lib/custom/AIAgents/create-sub-agent-dialog.component.d.ts +105 -25
- package/dist/lib/custom/AIAgents/create-sub-agent-dialog.component.d.ts.map +1 -1
- package/dist/lib/custom/AIAgents/create-sub-agent-dialog.component.js +272 -112
- package/dist/lib/custom/AIAgents/create-sub-agent-dialog.component.js.map +1 -1
- package/dist/lib/custom/AIAgents/new-agent-dialog.component.d.ts +32 -6
- package/dist/lib/custom/AIAgents/new-agent-dialog.component.d.ts.map +1 -1
- package/dist/lib/custom/AIAgents/new-agent-dialog.component.js +71 -19
- package/dist/lib/custom/AIAgents/new-agent-dialog.component.js.map +1 -1
- package/dist/lib/custom/AIAgents/new-agent-dialog.service.d.ts +10 -0
- package/dist/lib/custom/AIAgents/new-agent-dialog.service.d.ts.map +1 -1
- package/dist/lib/custom/AIAgents/new-agent-dialog.service.js +27 -7
- package/dist/lib/custom/AIAgents/new-agent-dialog.service.js.map +1 -1
- package/dist/lib/custom/AIAgents/prompt-selector-dialog.component.d.ts +65 -15
- package/dist/lib/custom/AIAgents/prompt-selector-dialog.component.d.ts.map +1 -1
- package/dist/lib/custom/AIAgents/prompt-selector-dialog.component.js +152 -52
- package/dist/lib/custom/AIAgents/prompt-selector-dialog.component.js.map +1 -1
- package/dist/lib/custom/AIAgents/sub-agent-advanced-settings-dialog.component.d.ts +81 -15
- package/dist/lib/custom/AIAgents/sub-agent-advanced-settings-dialog.component.d.ts.map +1 -1
- package/dist/lib/custom/AIAgents/sub-agent-advanced-settings-dialog.component.js +145 -45
- package/dist/lib/custom/AIAgents/sub-agent-advanced-settings-dialog.component.js.map +1 -1
- package/dist/lib/custom/AIAgents/sub-agent-selector-dialog.component.d.ts +71 -17
- 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 +175 -67
- package/dist/lib/custom/AIAgents/sub-agent-selector-dialog.component.js.map +1 -1
- package/dist/lib/custom/AIPromptRuns/ai-prompt-run-form.component.d.ts +173 -27
- package/dist/lib/custom/AIPromptRuns/ai-prompt-run-form.component.d.ts.map +1 -1
- package/dist/lib/custom/AIPromptRuns/ai-prompt-run-form.component.js +385 -93
- package/dist/lib/custom/AIPromptRuns/ai-prompt-run-form.component.js.map +1 -1
- package/dist/lib/custom/AIPromptRuns/chat-message-viewer.component.d.ts +64 -4
- package/dist/lib/custom/AIPromptRuns/chat-message-viewer.component.d.ts.map +1 -1
- package/dist/lib/custom/AIPromptRuns/chat-message-viewer.component.js +129 -29
- package/dist/lib/custom/AIPromptRuns/chat-message-viewer.component.js.map +1 -1
- package/dist/lib/custom/AIPrompts/ai-prompt-form.component.d.ts +260 -27
- package/dist/lib/custom/AIPrompts/ai-prompt-form.component.d.ts.map +1 -1
- package/dist/lib/custom/AIPrompts/ai-prompt-form.component.js +694 -252
- package/dist/lib/custom/AIPrompts/ai-prompt-form.component.js.map +1 -1
- package/dist/lib/custom/AIPrompts/ai-prompt-management.service.d.ts +10 -0
- package/dist/lib/custom/AIPrompts/ai-prompt-management.service.d.ts.map +1 -1
- package/dist/lib/custom/AIPrompts/ai-prompt-management.service.js +17 -9
- package/dist/lib/custom/AIPrompts/ai-prompt-management.service.js.map +1 -1
- package/dist/lib/custom/AIPrompts/pending-records.d.ts +11 -0
- package/dist/lib/custom/AIPrompts/pending-records.d.ts.map +1 -0
- package/dist/lib/custom/AIPrompts/pending-records.js +21 -0
- package/dist/lib/custom/AIPrompts/pending-records.js.map +1 -0
- package/dist/lib/custom/AIPrompts/template-selector-dialog.component.d.ts +74 -16
- package/dist/lib/custom/AIPrompts/template-selector-dialog.component.d.ts.map +1 -1
- package/dist/lib/custom/AIPrompts/template-selector-dialog.component.js +174 -58
- package/dist/lib/custom/AIPrompts/template-selector-dialog.component.js.map +1 -1
- package/dist/lib/custom/Actions/action-execution-log-form.component.d.ts +108 -14
- package/dist/lib/custom/Actions/action-execution-log-form.component.d.ts.map +1 -1
- package/dist/lib/custom/Actions/action-execution-log-form.component.js +258 -70
- package/dist/lib/custom/Actions/action-execution-log-form.component.js.map +1 -1
- package/dist/lib/custom/Actions/action-form.component.d.ts +198 -14
- package/dist/lib/custom/Actions/action-form.component.d.ts.map +1 -1
- package/dist/lib/custom/Actions/action-form.component.js +387 -107
- package/dist/lib/custom/Actions/action-form.component.js.map +1 -1
- package/dist/lib/custom/BridgeProviders/bridge-provider-features.d.ts +12 -6
- package/dist/lib/custom/BridgeProviders/bridge-provider-features.d.ts.map +1 -1
- package/dist/lib/custom/BridgeProviders/bridge-provider-features.js +41 -29
- package/dist/lib/custom/BridgeProviders/bridge-provider-features.js.map +1 -1
- package/dist/lib/custom/BridgeProviders/bridge-provider-form.component.js +14 -14
- package/dist/lib/custom/BridgeProviders/bridge-provider-form.component.js.map +1 -1
- package/dist/lib/custom/Companies/company-overview.panel.d.ts +1 -1
- package/dist/lib/custom/Companies/company-overview.panel.js +2 -2
- package/dist/lib/custom/Companies/company-overview.panel.js.map +1 -1
- package/dist/lib/custom/Conversations/conversation-overview.panel.d.ts +1 -1
- package/dist/lib/custom/Conversations/conversation-overview.panel.js +2 -2
- package/dist/lib/custom/Conversations/conversation-overview.panel.js.map +1 -1
- package/dist/lib/custom/Employees/employee-overview.panel.d.ts +1 -1
- package/dist/lib/custom/Employees/employee-overview.panel.js +2 -2
- package/dist/lib/custom/Employees/employee-overview.panel.js.map +1 -1
- package/dist/lib/custom/Entities/entity-form.component.d.ts +217 -29
- package/dist/lib/custom/Entities/entity-form.component.d.ts.map +1 -1
- package/dist/lib/custom/Entities/entity-form.component.js +734 -285
- package/dist/lib/custom/Entities/entity-form.component.js.map +1 -1
- package/dist/lib/custom/EntityActions/entityaction.form.component.d.ts +5 -1
- package/dist/lib/custom/EntityActions/entityaction.form.component.d.ts.map +1 -1
- package/dist/lib/custom/EntityActions/entityaction.form.component.js +10 -2
- package/dist/lib/custom/EntityActions/entityaction.form.component.js.map +1 -1
- package/dist/lib/custom/Files/file-form.component.d.ts +1 -1
- package/dist/lib/custom/Files/file-form.component.js +2 -2
- package/dist/lib/custom/Files/file-form.component.js.map +1 -1
- package/dist/lib/custom/Lists/list-form.component.d.ts +300 -36
- package/dist/lib/custom/Lists/list-form.component.d.ts.map +1 -1
- package/dist/lib/custom/Lists/list-form.component.js +664 -208
- package/dist/lib/custom/Lists/list-form.component.js.map +1 -1
- package/dist/lib/custom/MLModels/ml-model-view-models.d.ts +31 -0
- package/dist/lib/custom/MLModels/ml-model-view-models.d.ts.map +1 -1
- package/dist/lib/custom/MLModels/ml-model-view-models.js +52 -16
- package/dist/lib/custom/MLModels/ml-model-view-models.js.map +1 -1
- package/dist/lib/custom/MLModels/ps-model-detail.component.d.ts +107 -10
- package/dist/lib/custom/MLModels/ps-model-detail.component.d.ts.map +1 -1
- package/dist/lib/custom/MLModels/ps-model-detail.component.js +291 -101
- package/dist/lib/custom/MLModels/ps-model-detail.component.js.map +1 -1
- package/dist/lib/custom/Queries/query-form.component.d.ts +201 -26
- package/dist/lib/custom/Queries/query-form.component.d.ts.map +1 -1
- package/dist/lib/custom/Queries/query-form.component.js +429 -109
- package/dist/lib/custom/Queries/query-form.component.js.map +1 -1
- package/dist/lib/custom/Queries/query-run-dialog.component.d.ts +107 -14
- package/dist/lib/custom/Queries/query-run-dialog.component.d.ts.map +1 -1
- package/dist/lib/custom/Queries/query-run-dialog.component.js +249 -79
- package/dist/lib/custom/Queries/query-run-dialog.component.js.map +1 -1
- package/dist/lib/custom/RecordProcesses/record-process-form.component.d.ts +129 -4
- package/dist/lib/custom/RecordProcesses/record-process-form.component.d.ts.map +1 -1
- package/dist/lib/custom/RecordProcesses/record-process-form.component.js +904 -90
- package/dist/lib/custom/RecordProcesses/record-process-form.component.js.map +1 -1
- package/dist/lib/custom/Rubrics/evaluation-form.component.d.ts +37 -0
- package/dist/lib/custom/Rubrics/evaluation-form.component.d.ts.map +1 -0
- package/dist/lib/custom/Rubrics/evaluation-form.component.js +399 -0
- package/dist/lib/custom/Rubrics/evaluation-form.component.js.map +1 -0
- package/dist/lib/custom/Rubrics/record-forms.component.d.ts +69 -0
- package/dist/lib/custom/Rubrics/record-forms.component.d.ts.map +1 -0
- package/dist/lib/custom/Rubrics/record-forms.component.js +587 -0
- package/dist/lib/custom/Rubrics/record-forms.component.js.map +1 -0
- package/dist/lib/custom/Rubrics/rubric-form.component.d.ts +67 -0
- package/dist/lib/custom/Rubrics/rubric-form.component.d.ts.map +1 -0
- package/dist/lib/custom/Rubrics/rubric-form.component.js +534 -0
- package/dist/lib/custom/Rubrics/rubric-form.component.js.map +1 -0
- package/dist/lib/custom/Rubrics/rubric-form.panels.d.ts +25 -0
- package/dist/lib/custom/Rubrics/rubric-form.panels.d.ts.map +1 -0
- package/dist/lib/custom/Rubrics/rubric-form.panels.js +299 -0
- package/dist/lib/custom/Rubrics/rubric-form.panels.js.map +1 -0
- package/dist/lib/custom/Rubrics/scale-form.component.d.ts +31 -0
- package/dist/lib/custom/Rubrics/scale-form.component.d.ts.map +1 -0
- package/dist/lib/custom/Rubrics/scale-form.component.js +395 -0
- package/dist/lib/custom/Rubrics/scale-form.component.js.map +1 -0
- package/dist/lib/custom/SearchScopes/searchscope-form.component.d.ts +1 -1
- package/dist/lib/custom/SearchScopes/searchscope-form.component.js +4 -4
- package/dist/lib/custom/SearchScopes/searchscope-form.component.js.map +1 -1
- package/dist/lib/custom/SessionBridges/session-bridge-form.component.js.map +1 -1
- package/dist/lib/custom/Templates/template-param-dialog.component.d.ts +77 -13
- package/dist/lib/custom/Templates/template-param-dialog.component.d.ts.map +1 -1
- package/dist/lib/custom/Templates/template-param-dialog.component.js +196 -78
- package/dist/lib/custom/Templates/template-param-dialog.component.js.map +1 -1
- package/dist/lib/custom/Templates/template-params-grid.component.d.ts +49 -7
- package/dist/lib/custom/Templates/template-params-grid.component.d.ts.map +1 -1
- package/dist/lib/custom/Templates/template-params-grid.component.js +132 -44
- package/dist/lib/custom/Templates/template-params-grid.component.js.map +1 -1
- package/dist/lib/custom/Templates/templates-form.component.d.ts +153 -19
- package/dist/lib/custom/Templates/templates-form.component.d.ts.map +1 -1
- package/dist/lib/custom/Templates/templates-form.component.js +434 -217
- package/dist/lib/custom/Templates/templates-form.component.js.map +1 -1
- package/dist/lib/custom/Tests/entity-link-pill.component.d.ts +24 -4
- package/dist/lib/custom/Tests/entity-link-pill.component.d.ts.map +1 -1
- package/dist/lib/custom/Tests/entity-link-pill.component.js +64 -20
- package/dist/lib/custom/Tests/entity-link-pill.component.js.map +1 -1
- package/dist/lib/custom/Tests/test-form.component.d.ts +223 -27
- package/dist/lib/custom/Tests/test-form.component.d.ts.map +1 -1
- package/dist/lib/custom/Tests/test-form.component.js +951 -530
- package/dist/lib/custom/Tests/test-form.component.js.map +1 -1
- package/dist/lib/custom/Tests/test-run-checks.d.ts +2 -0
- package/dist/lib/custom/Tests/test-run-checks.d.ts.map +1 -1
- package/dist/lib/custom/Tests/test-run-checks.js +5 -1
- package/dist/lib/custom/Tests/test-run-checks.js.map +1 -1
- package/dist/lib/custom/Tests/test-run-feedback-form.component.d.ts +2 -0
- package/dist/lib/custom/Tests/test-run-feedback-form.component.d.ts.map +1 -1
- package/dist/lib/custom/Tests/test-run-feedback-form.component.js +5 -1
- package/dist/lib/custom/Tests/test-run-feedback-form.component.js.map +1 -1
- package/dist/lib/custom/Tests/test-run-form.component.d.ts +146 -18
- package/dist/lib/custom/Tests/test-run-form.component.d.ts.map +1 -1
- package/dist/lib/custom/Tests/test-run-form.component.js +362 -106
- package/dist/lib/custom/Tests/test-run-form.component.js.map +1 -1
- package/dist/lib/custom/Tests/test-suite-form.component.d.ts +395 -47
- package/dist/lib/custom/Tests/test-suite-form.component.d.ts.map +1 -1
- package/dist/lib/custom/Tests/test-suite-form.component.js +1719 -1007
- package/dist/lib/custom/Tests/test-suite-form.component.js.map +1 -1
- package/dist/lib/custom/Tests/test-suite-run-form.component.d.ts +214 -26
- package/dist/lib/custom/Tests/test-suite-run-form.component.d.ts.map +1 -1
- package/dist/lib/custom/Tests/test-suite-run-form.component.js +535 -159
- package/dist/lib/custom/Tests/test-suite-run-form.component.js.map +1 -1
- package/dist/lib/custom/Users/user-overview.panel.d.ts +1 -1
- package/dist/lib/custom/Users/user-overview.panel.js +3 -3
- package/dist/lib/custom/Users/user-overview.panel.js.map +1 -1
- package/dist/lib/custom/ai-agent-run/ai-agent-run-analytics.component.d.ts +208 -29
- package/dist/lib/custom/ai-agent-run/ai-agent-run-analytics.component.d.ts.map +1 -1
- package/dist/lib/custom/ai-agent-run/ai-agent-run-analytics.component.js +446 -138
- 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-cost.service.d.ts +6 -0
- package/dist/lib/custom/ai-agent-run/ai-agent-run-cost.service.d.ts.map +1 -1
- package/dist/lib/custom/ai-agent-run/ai-agent-run-cost.service.js +16 -4
- package/dist/lib/custom/ai-agent-run/ai-agent-run-cost.service.js.map +1 -1
- package/dist/lib/custom/ai-agent-run/ai-agent-run-data.service.d.ts +50 -6
- package/dist/lib/custom/ai-agent-run/ai-agent-run-data.service.d.ts.map +1 -1
- package/dist/lib/custom/ai-agent-run/ai-agent-run-data.service.js +84 -12
- package/dist/lib/custom/ai-agent-run/ai-agent-run-data.service.js.map +1 -1
- package/dist/lib/custom/ai-agent-run/ai-agent-run-step-detail.component.d.ts +89 -5
- package/dist/lib/custom/ai-agent-run/ai-agent-run-step-detail.component.d.ts.map +1 -1
- package/dist/lib/custom/ai-agent-run/ai-agent-run-step-detail.component.js +216 -70
- 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-step-node.component.d.ts +62 -3
- package/dist/lib/custom/ai-agent-run/ai-agent-run-step-node.component.d.ts.map +1 -1
- package/dist/lib/custom/ai-agent-run/ai-agent-run-step-node.component.js +140 -42
- package/dist/lib/custom/ai-agent-run/ai-agent-run-step-node.component.js.map +1 -1
- package/dist/lib/custom/ai-agent-run/ai-agent-run-timeline.component.d.ts +81 -10
- package/dist/lib/custom/ai-agent-run/ai-agent-run-timeline.component.d.ts.map +1 -1
- package/dist/lib/custom/ai-agent-run/ai-agent-run-timeline.component.js +165 -37
- 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 +140 -15
- 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 +326 -100
- 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 +101 -15
- package/dist/lib/custom/ai-agent-run/flow/agent-run-flow.component.d.ts.map +1 -1
- package/dist/lib/custom/ai-agent-run/flow/agent-run-flow.component.js +281 -97
- package/dist/lib/custom/ai-agent-run/flow/agent-run-flow.component.js.map +1 -1
- package/dist/lib/custom/ai-agent-run/flow/agent-run-flow.model.d.ts +43 -25
- package/dist/lib/custom/ai-agent-run/flow/agent-run-flow.model.d.ts.map +1 -1
- package/dist/lib/custom/ai-agent-run/flow/agent-run-flow.model.js +100 -64
- package/dist/lib/custom/ai-agent-run/flow/agent-run-flow.model.js.map +1 -1
- package/dist/lib/custom/ai-agent-run/flow/constellation.component.d.ts +14 -2
- package/dist/lib/custom/ai-agent-run/flow/constellation.component.d.ts.map +1 -1
- package/dist/lib/custom/ai-agent-run/flow/constellation.component.js +71 -53
- package/dist/lib/custom/ai-agent-run/flow/constellation.component.js.map +1 -1
- package/dist/lib/custom/ai-agent-run/flow/flame-cascade.component.d.ts +14 -2
- package/dist/lib/custom/ai-agent-run/flow/flame-cascade.component.d.ts.map +1 -1
- package/dist/lib/custom/ai-agent-run/flow/flame-cascade.component.js +70 -52
- package/dist/lib/custom/ai-agent-run/flow/flame-cascade.component.js.map +1 -1
- package/dist/lib/custom/ai-agent-run/flow/flow-svg.util.d.ts +8 -0
- package/dist/lib/custom/ai-agent-run/flow/flow-svg.util.d.ts.map +1 -1
- package/dist/lib/custom/ai-agent-run/flow/flow-svg.util.js +22 -6
- package/dist/lib/custom/ai-agent-run/flow/flow-svg.util.js.map +1 -1
- package/dist/lib/custom/ai-agent-run/flow/flowchart.component.d.ts +24 -2
- package/dist/lib/custom/ai-agent-run/flow/flowchart.component.d.ts.map +1 -1
- package/dist/lib/custom/ai-agent-run/flow/flowchart.component.js +91 -59
- package/dist/lib/custom/ai-agent-run/flow/flowchart.component.js.map +1 -1
- package/dist/lib/custom/ai-agent-run/flow/pan-zoom.d.ts +10 -2
- package/dist/lib/custom/ai-agent-run/flow/pan-zoom.d.ts.map +1 -1
- package/dist/lib/custom/ai-agent-run/flow/pan-zoom.js +33 -17
- package/dist/lib/custom/ai-agent-run/flow/pan-zoom.js.map +1 -1
- package/dist/lib/custom/ai-agent-run/flow/run-tree-flow-projection.d.ts +2 -0
- package/dist/lib/custom/ai-agent-run/flow/run-tree-flow-projection.d.ts.map +1 -1
- package/dist/lib/custom/ai-agent-run/flow/run-tree-flow-projection.js +34 -30
- package/dist/lib/custom/ai-agent-run/flow/run-tree-flow-projection.js.map +1 -1
- package/dist/lib/custom/ai-agent-run/flow/subway-lines.component.d.ts +14 -2
- package/dist/lib/custom/ai-agent-run/flow/subway-lines.component.d.ts.map +1 -1
- package/dist/lib/custom/ai-agent-run/flow/subway-lines.component.js +69 -51
- package/dist/lib/custom/ai-agent-run/flow/subway-lines.component.js.map +1 -1
- package/dist/lib/custom/custom-forms.module.d.ts +56 -48
- package/dist/lib/custom/custom-forms.module.d.ts.map +1 -1
- package/dist/lib/custom/custom-forms.module.js +60 -0
- package/dist/lib/custom/custom-forms.module.js.map +1 -1
- package/dist/lib/custom/shared/entity-selector-dialog.component.d.ts +38 -12
- package/dist/lib/custom/shared/entity-selector-dialog.component.d.ts.map +1 -1
- package/dist/lib/custom/shared/entity-selector-dialog.component.js +103 -51
- 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 +61 -43
- package/dist/lib/generated/Entities/MJAIAgent/mjaiagent.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJAIAgentRubric/mjaiagentrubric.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJAIAgentRubric/mjaiagentrubric.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJAIAgentRubric/mjaiagentrubric.form.component.js +74 -0
- package/dist/lib/generated/Entities/MJAIAgentRubric/mjaiagentrubric.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJAIAgentRun/mjaiagentrun.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJAIAgentRun/mjaiagentrun.form.component.js +37 -19
- package/dist/lib/generated/Entities/MJAIAgentRun/mjaiagentrun.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 +78 -52
- package/dist/lib/generated/Entities/MJAIPromptRun/mjaipromptrun.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJAIVendor/mjaivendor.form.component.js +76 -74
- package/dist/lib/generated/Entities/MJAIVendor/mjaivendor.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 +156 -84
- package/dist/lib/generated/Entities/MJEntity/mjentity.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJFeaturePipelineType/mjfeaturepipelinetype.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJFeaturePipelineType/mjfeaturepipelinetype.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJFeaturePipelineType/mjfeaturepipelinetype.form.component.js +62 -0
- package/dist/lib/generated/Entities/MJFeaturePipelineType/mjfeaturepipelinetype.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJProcessRun/mjprocessrun.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJProcessRun/mjprocessrun.form.component.js +24 -6
- package/dist/lib/generated/Entities/MJProcessRun/mjprocessrun.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJProject/mjproject.form.component.js +27 -25
- package/dist/lib/generated/Entities/MJProject/mjproject.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJRecordChange/mjrecordchange.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJRecordChange/mjrecordchange.form.component.js +24 -16
- package/dist/lib/generated/Entities/MJRecordChange/mjrecordchange.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJRecordCloneLog/mjrecordclonelog.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJRecordCloneLog/mjrecordclonelog.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJRecordCloneLog/mjrecordclonelog.form.component.js +107 -0
- package/dist/lib/generated/Entities/MJRecordCloneLog/mjrecordclonelog.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJRecordCloneLogItem/mjrecordclonelogitem.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJRecordCloneLogItem/mjrecordclonelogitem.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJRecordCloneLogItem/mjrecordclonelogitem.form.component.js +74 -0
- package/dist/lib/generated/Entities/MJRecordCloneLogItem/mjrecordclonelogitem.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJRubric/mjrubric.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJRubric/mjrubric.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJRubric/mjrubric.form.component.js +135 -0
- package/dist/lib/generated/Entities/MJRubric/mjrubric.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJRubricBand/mjrubricband.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJRubricBand/mjrubricband.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJRubricBand/mjrubricband.form.component.js +87 -0
- package/dist/lib/generated/Entities/MJRubricBand/mjrubricband.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJRubricCategory/mjrubriccategory.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJRubricCategory/mjrubriccategory.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJRubricCategory/mjrubriccategory.form.component.js +107 -0
- package/dist/lib/generated/Entities/MJRubricCategory/mjrubriccategory.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJRubricCriterion/mjrubriccriterion.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJRubricCriterion/mjrubriccriterion.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJRubricCriterion/mjrubriccriterion.form.component.js +155 -0
- package/dist/lib/generated/Entities/MJRubricCriterion/mjrubriccriterion.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJRubricCriterionLevel/mjrubriccriterionlevel.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJRubricCriterionLevel/mjrubriccriterionlevel.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJRubricCriterionLevel/mjrubriccriterionlevel.form.component.js +62 -0
- package/dist/lib/generated/Entities/MJRubricCriterionLevel/mjrubriccriterionlevel.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJRubricEvaluation/mjrubricevaluation.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJRubricEvaluation/mjrubricevaluation.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJRubricEvaluation/mjrubricevaluation.form.component.js +183 -0
- package/dist/lib/generated/Entities/MJRubricEvaluation/mjrubricevaluation.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJRubricEvaluationScore/mjrubricevaluationscore.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJRubricEvaluationScore/mjrubricevaluationscore.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJRubricEvaluationScore/mjrubricevaluationscore.form.component.js +120 -0
- package/dist/lib/generated/Entities/MJRubricEvaluationScore/mjrubricevaluationscore.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJRubricScale/mjrubricscale.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJRubricScale/mjrubricscale.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJRubricScale/mjrubricscale.form.component.js +107 -0
- package/dist/lib/generated/Entities/MJRubricScale/mjrubricscale.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJRubricScaleLevel/mjrubricscalelevel.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJRubricScaleLevel/mjrubricscalelevel.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJRubricScaleLevel/mjrubricscalelevel.form.component.js +103 -0
- package/dist/lib/generated/Entities/MJRubricScaleLevel/mjrubricscalelevel.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJRubricVersion/mjrubricversion.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/MJRubricVersion/mjrubricversion.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/MJRubricVersion/mjrubricversion.form.component.js +171 -0
- package/dist/lib/generated/Entities/MJRubricVersion/mjrubricversion.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/MJTest/mjtest.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJTest/mjtest.form.component.js +24 -16
- package/dist/lib/generated/Entities/MJTest/mjtest.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJTestSuite/mjtestsuite.form.component.js +27 -25
- package/dist/lib/generated/Entities/MJTestSuite/mjtestsuite.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJTestSuiteRun/mjtestsuiterun.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJTestSuiteRun/mjtestsuiterun.form.component.js +19 -11
- package/dist/lib/generated/Entities/MJTestSuiteRun/mjtestsuiterun.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJUser/mjuser.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJUser/mjuser.form.component.js +209 -119
- package/dist/lib/generated/Entities/MJUser/mjuser.form.component.js.map +1 -1
- package/dist/lib/generated/generated-forms.module.d.ts +436 -422
- package/dist/lib/generated/generated-forms.module.d.ts.map +1 -1
- package/dist/lib/generated/generated-forms.module.js +44 -2
- package/dist/lib/generated/generated-forms.module.js.map +1 -1
- package/dist/lib/panels/ai-skill-sharing/ai-skill-sharing-panel.component.d.ts +5 -1
- package/dist/lib/panels/ai-skill-sharing/ai-skill-sharing-panel.component.d.ts.map +1 -1
- package/dist/lib/panels/ai-skill-sharing/ai-skill-sharing-panel.component.js +11 -3
- package/dist/lib/panels/ai-skill-sharing/ai-skill-sharing-panel.component.js.map +1 -1
- package/dist/lib/panels/content-sources/tag-pipeline-configuration.panel.d.ts +2 -0
- package/dist/lib/panels/content-sources/tag-pipeline-configuration.panel.d.ts.map +1 -1
- package/dist/lib/panels/content-sources/tag-pipeline-configuration.panel.js +16 -12
- package/dist/lib/panels/content-sources/tag-pipeline-configuration.panel.js.map +1 -1
- package/dist/lib/panels/content-sources/website-crawler-settings.panel.d.ts +1 -1
- package/dist/lib/panels/content-sources/website-crawler-settings.panel.js +2 -2
- package/dist/lib/panels/content-sources/website-crawler-settings.panel.js.map +1 -1
- package/dist/lib/panels/model-predictions/model-prediction.logic.d.ts +45 -19
- package/dist/lib/panels/model-predictions/model-prediction.logic.d.ts.map +1 -1
- package/dist/lib/panels/model-predictions/model-prediction.logic.js +95 -43
- package/dist/lib/panels/model-predictions/model-prediction.logic.js.map +1 -1
- package/dist/lib/panels/model-predictions/model-prediction.panel.d.ts +20 -16
- package/dist/lib/panels/model-predictions/model-prediction.panel.d.ts.map +1 -1
- package/dist/lib/panels/model-predictions/model-prediction.panel.js +73 -65
- package/dist/lib/panels/model-predictions/model-prediction.panel.js.map +1 -1
- package/dist/lib/panels/record-clone/entity-clone-config-editor.component.d.ts +116 -0
- package/dist/lib/panels/record-clone/entity-clone-config-editor.component.d.ts.map +1 -0
- package/dist/lib/panels/record-clone/entity-clone-config-editor.component.js +820 -0
- package/dist/lib/panels/record-clone/entity-clone-config-editor.component.js.map +1 -0
- package/dist/lib/shared/components/template-editor.component.d.ts +158 -15
- package/dist/lib/shared/components/template-editor.component.d.ts.map +1 -1
- package/dist/lib/shared/components/template-editor.component.js +389 -127
- package/dist/lib/shared/components/template-editor.component.js.map +1 -1
- package/dist/public-api.d.ts +5 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +5 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +47 -42
|
@@ -179,6 +179,14 @@ function AIAgentRunTimelineComponent_ng_template_5_Template(rf, ctx) { if (rf &
|
|
|
179
179
|
*/
|
|
180
180
|
const LOOP_KINDS = new Set(['ForEach', 'While']);
|
|
181
181
|
export class AIAgentRunTimelineComponent extends BaseAngularComponent {
|
|
182
|
+
/** @deprecated Use {@link AiAgentRunId}. */
|
|
183
|
+
set aiAgentRunId(value) {
|
|
184
|
+
this.AiAgentRunId = value;
|
|
185
|
+
}
|
|
186
|
+
/** @deprecated Use {@link AiAgentRunId}. */
|
|
187
|
+
get aiAgentRunId() {
|
|
188
|
+
return this.AiAgentRunId;
|
|
189
|
+
}
|
|
182
190
|
/**
|
|
183
191
|
* The run's execution tree, loaded ONCE by the form and shared with every tab.
|
|
184
192
|
*
|
|
@@ -199,13 +207,93 @@ export class AIAgentRunTimelineComponent extends BaseAngularComponent {
|
|
|
199
207
|
get RunTree() {
|
|
200
208
|
return this.runTree;
|
|
201
209
|
}
|
|
210
|
+
/** @deprecated Use {@link DataHelper}. */
|
|
211
|
+
set dataHelper(value) {
|
|
212
|
+
this.DataHelper = value;
|
|
213
|
+
}
|
|
214
|
+
/** @deprecated Use {@link DataHelper}. */
|
|
215
|
+
get dataHelper() {
|
|
216
|
+
return this.DataHelper;
|
|
217
|
+
} // Data helper passed from parent
|
|
218
|
+
/** @deprecated Use {@link Steps$}. */
|
|
219
|
+
get steps$() {
|
|
220
|
+
return this.Steps$;
|
|
221
|
+
}
|
|
222
|
+
/** @deprecated Use {@link Steps$}. */
|
|
223
|
+
set steps$(value) {
|
|
224
|
+
this.Steps$ = value;
|
|
225
|
+
}
|
|
226
|
+
/** @deprecated Use {@link SubRuns$}. */
|
|
227
|
+
get subRuns$() {
|
|
228
|
+
return this.SubRuns$;
|
|
229
|
+
}
|
|
230
|
+
/** @deprecated Use {@link SubRuns$}. */
|
|
231
|
+
set subRuns$(value) {
|
|
232
|
+
this.SubRuns$ = value;
|
|
233
|
+
}
|
|
234
|
+
/** @deprecated Use {@link ActionLogs$}. */
|
|
235
|
+
get actionLogs$() {
|
|
236
|
+
return this.ActionLogs$;
|
|
237
|
+
}
|
|
238
|
+
/** @deprecated Use {@link ActionLogs$}. */
|
|
239
|
+
set actionLogs$(value) {
|
|
240
|
+
this.ActionLogs$ = value;
|
|
241
|
+
}
|
|
242
|
+
/** @deprecated Use {@link PromptRuns$}. */
|
|
243
|
+
get promptRuns$() {
|
|
244
|
+
return this.PromptRuns$;
|
|
245
|
+
}
|
|
246
|
+
/** @deprecated Use {@link PromptRuns$}. */
|
|
247
|
+
set promptRuns$(value) {
|
|
248
|
+
this.PromptRuns$ = value;
|
|
249
|
+
}
|
|
250
|
+
/** @deprecated Use {@link TimelineItems$}. */
|
|
251
|
+
get timelineItems$() {
|
|
252
|
+
return this.TimelineItems$;
|
|
253
|
+
}
|
|
254
|
+
/** @deprecated Use {@link TimelineItems$}. */
|
|
255
|
+
set timelineItems$(value) {
|
|
256
|
+
this.TimelineItems$ = value;
|
|
257
|
+
}
|
|
258
|
+
/** @deprecated Use {@link Loading}. */
|
|
259
|
+
get loading() {
|
|
260
|
+
return this.Loading;
|
|
261
|
+
}
|
|
262
|
+
/** @deprecated Use {@link Loading}. */
|
|
263
|
+
set loading(value) {
|
|
264
|
+
this.Loading = value;
|
|
265
|
+
}
|
|
266
|
+
/** @deprecated Use {@link SelectedItem}. */
|
|
267
|
+
get selectedItem() {
|
|
268
|
+
return this.SelectedItem;
|
|
269
|
+
}
|
|
270
|
+
/** @deprecated Use {@link SelectedItem}. */
|
|
271
|
+
set selectedItem(value) {
|
|
272
|
+
this.SelectedItem = value;
|
|
273
|
+
}
|
|
202
274
|
constructor(cdr) {
|
|
203
275
|
super();
|
|
204
276
|
this.cdr = cdr;
|
|
205
277
|
this.runTree = null;
|
|
206
278
|
this.runTree$ = new BehaviorSubject(null);
|
|
207
|
-
this.
|
|
208
|
-
|
|
279
|
+
this.ItemSelected = new EventEmitter();
|
|
280
|
+
/**
|
|
281
|
+
* @deprecated Use {@link ItemSelected}.
|
|
282
|
+
*
|
|
283
|
+
* The same emitter under the old binding name, so a template still binding
|
|
284
|
+
* (itemSelected) keeps working. Must stay AFTER ItemSelected: class fields
|
|
285
|
+
* initialise in order, and the other way round this captures undefined.
|
|
286
|
+
*/
|
|
287
|
+
this.itemSelected = this.ItemSelected;
|
|
288
|
+
this.NavigateToEntity = new EventEmitter();
|
|
289
|
+
/**
|
|
290
|
+
* @deprecated Use {@link NavigateToEntity}.
|
|
291
|
+
*
|
|
292
|
+
* The same emitter under the old binding name, so a template still binding
|
|
293
|
+
* (navigateToEntity) keeps working. Must stay AFTER NavigateToEntity: class fields
|
|
294
|
+
* initialise in order, and the other way round this captures undefined.
|
|
295
|
+
*/
|
|
296
|
+
this.navigateToEntity = this.NavigateToEntity;
|
|
209
297
|
this.destroy$ = new Subject();
|
|
210
298
|
/** Resolved once the action cache is warm, so a first paint without icons can be re-rendered with them. */
|
|
211
299
|
this.actionsReady = false;
|
|
@@ -217,9 +305,9 @@ export class AIAgentRunTimelineComponent extends BaseAngularComponent {
|
|
|
217
305
|
* already fetched by id.
|
|
218
306
|
*/
|
|
219
307
|
this.actionIDByLogID = new Map();
|
|
220
|
-
this.
|
|
308
|
+
this.Loading = true;
|
|
221
309
|
this.error = null;
|
|
222
|
-
this.
|
|
310
|
+
this.SelectedItem = null;
|
|
223
311
|
/** Graph steps currently being expanded, so a second click cannot start a second load. */
|
|
224
312
|
this.expandingGraphIDs = new Set();
|
|
225
313
|
}
|
|
@@ -239,20 +327,20 @@ export class AIAgentRunTimelineComponent extends BaseAngularComponent {
|
|
|
239
327
|
this.actionsReady = false;
|
|
240
328
|
}
|
|
241
329
|
// Initialize observables from the data helper
|
|
242
|
-
this.
|
|
243
|
-
this.
|
|
244
|
-
this.
|
|
245
|
-
this.
|
|
330
|
+
this.Steps$ = this.DataHelper.steps$;
|
|
331
|
+
this.SubRuns$ = this.DataHelper.subRuns$;
|
|
332
|
+
this.ActionLogs$ = this.DataHelper.actionLogs$;
|
|
333
|
+
this.PromptRuns$ = this.DataHelper.promptRuns$;
|
|
246
334
|
// Combine all data sources to build timeline.
|
|
247
335
|
// Skip emissions where steps are empty but data is still loading —
|
|
248
336
|
// the BehaviorSubjects initialise with [] so combineLatest fires
|
|
249
337
|
// immediately with an empty array before the real data arrives.
|
|
250
|
-
this.
|
|
251
|
-
this.
|
|
252
|
-
this.
|
|
253
|
-
this.
|
|
254
|
-
this.
|
|
255
|
-
this.
|
|
338
|
+
this.TimelineItems$ = combineLatest([
|
|
339
|
+
this.Steps$,
|
|
340
|
+
this.SubRuns$,
|
|
341
|
+
this.ActionLogs$,
|
|
342
|
+
this.PromptRuns$,
|
|
343
|
+
this.DataHelper.loading$,
|
|
256
344
|
this.runTree$
|
|
257
345
|
]).pipe(filter(([steps, _subRuns, _actionLogs, _promptRuns, isLoading]) => {
|
|
258
346
|
// While loading, suppress the empty-array emission so the
|
|
@@ -268,11 +356,11 @@ export class AIAgentRunTimelineComponent extends BaseAngularComponent {
|
|
|
268
356
|
}), shareReplay(1));
|
|
269
357
|
// Data loading is now handled by the parent component through the helper
|
|
270
358
|
// Subscribe to loading state from helper
|
|
271
|
-
this.
|
|
272
|
-
this.
|
|
359
|
+
this.DataHelper.loading$.pipe(takeUntil(this.destroy$)).subscribe(loading => {
|
|
360
|
+
this.Loading = loading;
|
|
273
361
|
this.cdr.markForCheck();
|
|
274
362
|
});
|
|
275
|
-
this.
|
|
363
|
+
this.DataHelper.error$.pipe(takeUntil(this.destroy$)).subscribe(error => {
|
|
276
364
|
this.error = error;
|
|
277
365
|
this.cdr.markForCheck();
|
|
278
366
|
});
|
|
@@ -283,10 +371,10 @@ export class AIAgentRunTimelineComponent extends BaseAngularComponent {
|
|
|
283
371
|
}
|
|
284
372
|
// This method is now just for compatibility - actual loading is done by parent
|
|
285
373
|
async loadData() {
|
|
286
|
-
if (!this.
|
|
374
|
+
if (!this.AiAgentRunId)
|
|
287
375
|
return;
|
|
288
376
|
// The parent component should handle data loading through the helper
|
|
289
|
-
return this.
|
|
377
|
+
return this.DataHelper.loadAgentRunData(this.AiAgentRunId);
|
|
290
378
|
}
|
|
291
379
|
buildTimelineItems(steps, subRuns, actionLogs, promptRuns) {
|
|
292
380
|
return this.buildHierarchicalItems(steps, 0, promptRuns);
|
|
@@ -394,7 +482,7 @@ export class AIAgentRunTimelineComponent extends BaseAngularComponent {
|
|
|
394
482
|
// finished while the page header said "Workflow still running".
|
|
395
483
|
const graph = step.StepType === 'TaskGraph' ? this.graphNodeForStep(step.ID) : null;
|
|
396
484
|
if (graph) {
|
|
397
|
-
subtitle = `${subtitle} · dispatched in ${this.
|
|
485
|
+
subtitle = `${subtitle} · dispatched in ${this.CalculateDuration(step.StartedAt, step.CompletedAt)}`;
|
|
398
486
|
}
|
|
399
487
|
return {
|
|
400
488
|
id: step.ID,
|
|
@@ -407,8 +495,8 @@ export class AIAgentRunTimelineComponent extends BaseAngularComponent {
|
|
|
407
495
|
// A graph that has not started yet has no duration of its own — the submission's stands in,
|
|
408
496
|
// and the subtitle says which it is either way.
|
|
409
497
|
duration: graph?.StartedAt
|
|
410
|
-
? this.
|
|
411
|
-
: this.
|
|
498
|
+
? this.CalculateDuration(graph.StartedAt, graph.CompletedAt)
|
|
499
|
+
: this.CalculateDuration(step.StartedAt, step.CompletedAt),
|
|
412
500
|
icon: iconInfo.icon,
|
|
413
501
|
logoUrl: iconInfo.logoUrl,
|
|
414
502
|
color: this.getStatusColor(graph ? NormalizeStatus(graph.Status) : step.Status),
|
|
@@ -480,7 +568,7 @@ export class AIAgentRunTimelineComponent extends BaseAngularComponent {
|
|
|
480
568
|
};
|
|
481
569
|
return colorMap[status] || 'secondary';
|
|
482
570
|
}
|
|
483
|
-
|
|
571
|
+
CalculateDuration(start, end) {
|
|
484
572
|
if (!end)
|
|
485
573
|
return 'Running...';
|
|
486
574
|
const startTime = new Date(start).getTime();
|
|
@@ -494,11 +582,19 @@ export class AIAgentRunTimelineComponent extends BaseAngularComponent {
|
|
|
494
582
|
return `${Math.floor(duration / 60000)}m ${Math.floor((duration % 60000) / 1000)}s`;
|
|
495
583
|
return `${Math.floor(duration / 3600000)}h ${Math.floor((duration % 3600000) / 60000)}m`;
|
|
496
584
|
}
|
|
585
|
+
/** @deprecated Use {@link CalculateDuration}. */
|
|
586
|
+
calculateDuration(start, end) {
|
|
587
|
+
return this.CalculateDuration(start, end);
|
|
588
|
+
}
|
|
589
|
+
SelectItem(item) {
|
|
590
|
+
this.SelectedItem = item;
|
|
591
|
+
this.ItemSelected.emit(item);
|
|
592
|
+
}
|
|
593
|
+
/** @deprecated Use {@link SelectItem}. */
|
|
497
594
|
selectItem(item) {
|
|
498
|
-
this.
|
|
499
|
-
this.itemSelected.emit(item);
|
|
595
|
+
return this.SelectItem(item);
|
|
500
596
|
}
|
|
501
|
-
async
|
|
597
|
+
async ToggleItemExpansion(item, event) {
|
|
502
598
|
event.stopPropagation();
|
|
503
599
|
// Toggle expansion state
|
|
504
600
|
item.isExpanded = !item.isExpanded;
|
|
@@ -515,6 +611,10 @@ export class AIAgentRunTimelineComponent extends BaseAngularComponent {
|
|
|
515
611
|
// Just toggle - no additional loading needed since we already have all steps from the run
|
|
516
612
|
// The children were already attached in buildTimelineItems()
|
|
517
613
|
}
|
|
614
|
+
/** @deprecated Use {@link ToggleItemExpansion}. */
|
|
615
|
+
async toggleItemExpansion(item, event) {
|
|
616
|
+
return this.ToggleItemExpansion(item, event);
|
|
617
|
+
}
|
|
518
618
|
async loadSubAgentChildren(item) {
|
|
519
619
|
try {
|
|
520
620
|
const subAgentRunId = item.data?.TargetLogID;
|
|
@@ -525,7 +625,7 @@ export class AIAgentRunTimelineComponent extends BaseAngularComponent {
|
|
|
525
625
|
return;
|
|
526
626
|
}
|
|
527
627
|
// Load sub-agent data through service
|
|
528
|
-
const data = await this.
|
|
628
|
+
const data = await this.DataHelper.loadSubAgentData(subAgentRunId);
|
|
529
629
|
if (!data.steps || data.steps.length === 0) {
|
|
530
630
|
item.hasNoChildren = true;
|
|
531
631
|
item.children = [];
|
|
@@ -547,17 +647,29 @@ export class AIAgentRunTimelineComponent extends BaseAngularComponent {
|
|
|
547
647
|
this.cdr.markForCheck();
|
|
548
648
|
}
|
|
549
649
|
}
|
|
650
|
+
NavigateToSubRun(runId, event) {
|
|
651
|
+
event.stopPropagation();
|
|
652
|
+
this.NavigateToEntity.emit({ entityName: 'MJ: AI Agent Runs', recordId: runId });
|
|
653
|
+
}
|
|
654
|
+
/** @deprecated Use {@link NavigateToSubRun}. */
|
|
550
655
|
navigateToSubRun(runId, event) {
|
|
656
|
+
return this.NavigateToSubRun(runId, event);
|
|
657
|
+
}
|
|
658
|
+
NavigateToActionLog(logId, event) {
|
|
551
659
|
event.stopPropagation();
|
|
552
|
-
this.
|
|
660
|
+
this.NavigateToEntity.emit({ entityName: 'MJ: Action Execution Logs', recordId: logId });
|
|
553
661
|
}
|
|
662
|
+
/** @deprecated Use {@link NavigateToActionLog}. */
|
|
554
663
|
navigateToActionLog(logId, event) {
|
|
664
|
+
return this.NavigateToActionLog(logId, event);
|
|
665
|
+
}
|
|
666
|
+
NavigateToPromptRun(runId, event) {
|
|
555
667
|
event.stopPropagation();
|
|
556
|
-
this.
|
|
668
|
+
this.NavigateToEntity.emit({ entityName: 'MJ: AI Prompt Runs', recordId: runId });
|
|
557
669
|
}
|
|
670
|
+
/** @deprecated Use {@link NavigateToPromptRun}. */
|
|
558
671
|
navigateToPromptRun(runId, event) {
|
|
559
|
-
|
|
560
|
-
this.navigateToEntity.emit({ entityName: 'MJ: AI Prompt Runs', recordId: runId });
|
|
672
|
+
return this.NavigateToPromptRun(runId, event);
|
|
561
673
|
}
|
|
562
674
|
/**
|
|
563
675
|
* TrackBy function for timeline items
|
|
@@ -593,11 +705,11 @@ export class AIAgentRunTimelineComponent extends BaseAngularComponent {
|
|
|
593
705
|
OnGraphNodeSelected(event) {
|
|
594
706
|
const agentRunID = event.Task?.AgentRunID;
|
|
595
707
|
if (agentRunID) {
|
|
596
|
-
this.
|
|
708
|
+
this.NavigateToEntity.emit({ entityName: 'MJ: AI Agent Runs', recordId: agentRunID });
|
|
597
709
|
return;
|
|
598
710
|
}
|
|
599
711
|
if (event.Task?.ActionID) {
|
|
600
|
-
this.
|
|
712
|
+
this.NavigateToEntity.emit({ entityName: 'MJ: Tasks', recordId: event.TaskID });
|
|
601
713
|
}
|
|
602
714
|
}
|
|
603
715
|
/**
|
|
@@ -641,15 +753,23 @@ export class AIAgentRunTimelineComponent extends BaseAngularComponent {
|
|
|
641
753
|
IsExpandingGraph(item) {
|
|
642
754
|
return this.expandingGraphIDs.has(item.id);
|
|
643
755
|
}
|
|
644
|
-
|
|
756
|
+
TrackByItemId(index, item) {
|
|
645
757
|
return item.id;
|
|
646
758
|
}
|
|
647
|
-
|
|
759
|
+
/** @deprecated Use {@link TrackByItemId}. */
|
|
760
|
+
trackByItemId(index, item) {
|
|
761
|
+
return this.TrackByItemId(index, item);
|
|
762
|
+
}
|
|
763
|
+
CreateSubRunDataHelper() {
|
|
648
764
|
// Create a new data helper instance for sub-runs to prevent caching conflicts
|
|
649
765
|
return new AIAgentRunDataHelper();
|
|
650
766
|
}
|
|
767
|
+
/** @deprecated Use {@link CreateSubRunDataHelper}. */
|
|
768
|
+
createSubRunDataHelper() {
|
|
769
|
+
return this.CreateSubRunDataHelper();
|
|
770
|
+
}
|
|
651
771
|
static { this.ɵfac = function AIAgentRunTimelineComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || AIAgentRunTimelineComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); }; }
|
|
652
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AIAgentRunTimelineComponent, selectors: [["mj-ai-agent-run-timeline"]], inputs: { aiAgentRunId: "aiAgentRunId", RunTree: "RunTree", dataHelper: "dataHelper" }, outputs: { itemSelected: "itemSelected", navigateToEntity: "navigateToEntity" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 7, vars: 4, consts: [["recursiveSteps", ""], [1, "loading-state"], [1, "timeline-container"], ["Variant", "error", 3, "Message"], ["text", "Loading run steps...", "size", "medium"], [1, "timeline"], ["Icon", "fa-solid fa-stream", "Title", "No execution steps found"], [3, "itemClick", "expandToggle", "navigateToEntity", "item", "isSelected"], [1, "loading-children"], [1, "no-children"], [3, "aiAgentRunId", "dataHelper", "autoRefresh"], [1, "fas", "fa-spinner", "fa-spin"], [1, "fas", "fa-info-circle"], [4, "ngTemplateOutlet", "ngTemplateOutletContext"], [3, "itemSelected", "navigateToEntity", "aiAgentRunId", "dataHelper", "autoRefresh"]], template: function AIAgentRunTimelineComponent_Template(rf, ctx) { if (rf & 1) {
|
|
772
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AIAgentRunTimelineComponent, selectors: [["mj-ai-agent-run-timeline"]], inputs: { AiAgentRunId: "AiAgentRunId", aiAgentRunId: "aiAgentRunId", RunTree: "RunTree", DataHelper: "DataHelper", dataHelper: "dataHelper" }, outputs: { ItemSelected: "ItemSelected", itemSelected: "itemSelected", NavigateToEntity: "NavigateToEntity", navigateToEntity: "navigateToEntity" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 7, vars: 4, consts: [["recursiveSteps", ""], [1, "loading-state"], [1, "timeline-container"], ["Variant", "error", 3, "Message"], ["text", "Loading run steps...", "size", "medium"], [1, "timeline"], ["Icon", "fa-solid fa-stream", "Title", "No execution steps found"], [3, "itemClick", "expandToggle", "navigateToEntity", "item", "isSelected"], [1, "loading-children"], [1, "no-children"], [3, "aiAgentRunId", "dataHelper", "autoRefresh"], [1, "fas", "fa-spinner", "fa-spin"], [1, "fas", "fa-info-circle"], [4, "ngTemplateOutlet", "ngTemplateOutletContext"], [3, "itemSelected", "navigateToEntity", "aiAgentRunId", "dataHelper", "autoRefresh"]], template: function AIAgentRunTimelineComponent_Template(rf, ctx) { if (rf & 1) {
|
|
653
773
|
i0.ɵɵconditionalCreate(0, AIAgentRunTimelineComponent_Conditional_0_Template, 2, 0, "div", 1);
|
|
654
774
|
i0.ɵɵpipe(1, "async");
|
|
655
775
|
i0.ɵɵconditionalBranchCreate(2, AIAgentRunTimelineComponent_Conditional_2_Template, 3, 2, "div", 2)(3, AIAgentRunTimelineComponent_Conditional_3_Template, 2, 0, "div", 1);
|
|
@@ -665,14 +785,22 @@ export class AIAgentRunTimelineComponent extends BaseAngularComponent {
|
|
|
665
785
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AIAgentRunTimelineComponent, [{
|
|
666
786
|
type: Component,
|
|
667
787
|
args: [{ standalone: false, selector: 'mj-ai-agent-run-timeline', changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (loading) {\n <div class=\"loading-state\">\n <mj-loading text=\"Loading run steps...\" size=\"medium\"></mj-loading>\n </div>\n} @else if (timelineItems$ | async; as items) {\n <div class=\"timeline-container\">\n @if (items.length > 0) {\n <div class=\"timeline\">\n @for (item of items; track trackByItemId($index, item)) {\n <!-- Main Timeline Item -->\n <mj-ai-agent-run-step-node\n [item]=\"item\"\n [isSelected]=\"selectedItem?.id === item.id\"\n (itemClick)=\"selectItem(item)\"\n (expandToggle)=\"toggleItemExpansion(item, $event)\"\n (navigateToEntity)=\"navigateToEntity.emit($event)\">\n </mj-ai-agent-run-step-node>\n <!-- Children Container (for both Sub-Agent and ParentID relationships) -->\n @if (item.isExpanded) {\n <!-- Show loading indicator while loading Sub-Agent children -->\n @if (item.type === 'step' && item.data?.StepType === 'Sub-Agent' && !item.childrenLoaded) {\n <div class=\"loading-children\">\n <i class=\"fas fa-spinner fa-spin\"></i> Loading sub-agent steps...\n </div>\n }\n <!-- Show no children message for Sub-Agents -->\n @if (item.type === 'step' && item.data?.StepType === 'Sub-Agent' && item.childrenLoaded && item.hasNoChildren) {\n <div class=\"no-children\">\n <i class=\"fas fa-info-circle\"></i> No sub-agent steps found\n </div>\n }\n <!-- Render children recursively (works for both Sub-Agent and ParentID children) -->\n @if (item.children && item.children.length > 0) {\n <ng-container *ngTemplateOutlet=\"recursiveSteps; context: { $implicit: item.children }\"></ng-container>\n }\n <!-- A TaskGraph step stands in for a whole graph of Task rows. Its steps render as\n ORDINARY ROWS, colour-coded for provenance \u2014 they are steps, and squeezing a diagram\n into the column made them the only work in a run that could not be read, selected or\n navigated like everything else. The canvas lives in the detail panel, where edges\n (which branch was taken, and why) have the room they need. -->\n @if (item.type === 'step' && item.data?.StepType === 'TaskGraph') {\n @if (IsExpandingGraph(item)) {\n <div class=\"loading-children\">\n <i class=\"fas fa-spinner fa-spin\"></i> Loading workflow steps...\n </div>\n } @else if (!GetGraphParentTaskID(item)) {\n <div class=\"no-children\">\n <i class=\"fas fa-info-circle\"></i>\n This workflow was recorded but never reached the dispatcher.\n </div>\n } @else if (item.childrenLoaded && item.hasNoChildren) {\n <div class=\"no-children\">\n <i class=\"fas fa-info-circle\"></i> This workflow has no steps yet.\n </div>\n }\n }\n <!-- For actual sub-run items (from the initial load) - legacy support -->\n @if (item.type === 'subrun' && item.data?.ID) {\n <mj-ai-agent-run-timeline\n [aiAgentRunId]=\"item.data.ID\"\n [dataHelper]=\"createSubRunDataHelper()\"\n [autoRefresh]=\"false\"\n (itemSelected)=\"selectItem($event)\"\n (navigateToEntity)=\"navigateToEntity.emit($event)\">\n </mj-ai-agent-run-timeline>\n }\n }\n }\n </div>\n }\n @if (items.length === 0) {\n <mj-empty-state\n Icon=\"fa-solid fa-stream\"\n Title=\"No execution steps found\" />\n }\n </div>\n} @else {\n <!-- timelineItems$ hasn't emitted yet -->\n <div class=\"loading-state\">\n <mj-loading text=\"Loading run steps...\" size=\"medium\"></mj-loading>\n </div>\n}\n\n@if (error) {\n <mj-empty-state\n Variant=\"error\"\n [Message]=\"error\" />\n}\n\n<!-- Recursive template for rendering nested children (ParentID relationships) -->\n<ng-template #recursiveSteps let-steps>\n @for (step of steps; track trackByItemId($index, step)) {\n <mj-ai-agent-run-step-node\n [item]=\"step\"\n [isSelected]=\"selectedItem?.id === step.id\"\n (itemClick)=\"selectItem(step)\"\n (expandToggle)=\"toggleItemExpansion(step, $event)\"\n (navigateToEntity)=\"navigateToEntity.emit($event)\">\n </mj-ai-agent-run-step-node>\n <!-- Recursively render this step's children if expanded -->\n @if (step.isExpanded && step.children && step.children.length > 0) {\n <ng-container *ngTemplateOutlet=\"recursiveSteps; context: { $implicit: step.children }\"></ng-container>\n }\n }\n</ng-template>", styles: [".timeline-container {\n height: 100%;\n overflow-y: auto;\n padding: 20px;\n}\n\n.timeline {\n position: relative;\n padding-left: 40px; /* Add padding to accommodate expand buttons */\n}\n\n.sub-timeline {\n margin-left: 24px;\n margin-top: 8px;\n padding-left: 12px;\n border-left: 2px dashed var(--mj-border-default);\n}\n\n/* State Displays */\n.loading-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n height: 100%;\n color: var(--mj-text-muted);\n gap: 16px;\n}\n\n/* Empty / error placeholders fill the container vertically */\n.timeline-container mj-empty-state,\n:host > mj-empty-state {\n flex: 1;\n min-height: 200px;\n}\n\n/* Loading and No Children States */\n.loading-children,\n.no-children {\n padding: 12px 20px;\n margin-left: 60px;\n color: var(--mj-text-muted);\n font-size: 13px;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.loading-children i {\n color: var(--mj-brand-primary);\n}\n\n.no-children {\n color: var(--mj-text-disabled);\n font-style: italic;\n}\n\n.no-children i {\n color: var(--mj-text-disabled);\n}\n\n/* Sub-run steps container */\n.sub-run-steps {\n margin-left: 20px;\n padding-left: 20px;\n border-left: 2px solid var(--mj-border-default);\n margin-top: 8px;\n}"] }]
|
|
668
|
-
}], () => [{ type: i0.ChangeDetectorRef }], {
|
|
788
|
+
}], () => [{ type: i0.ChangeDetectorRef }], { AiAgentRunId: [{
|
|
789
|
+
type: Input
|
|
790
|
+
}], aiAgentRunId: [{
|
|
669
791
|
type: Input
|
|
670
792
|
}], RunTree: [{
|
|
671
793
|
type: Input
|
|
794
|
+
}], DataHelper: [{
|
|
795
|
+
type: Input
|
|
672
796
|
}], dataHelper: [{
|
|
673
797
|
type: Input
|
|
798
|
+
}], ItemSelected: [{
|
|
799
|
+
type: Output
|
|
674
800
|
}], itemSelected: [{
|
|
675
801
|
type: Output
|
|
802
|
+
}], NavigateToEntity: [{
|
|
803
|
+
type: Output
|
|
676
804
|
}], navigateToEntity: [{
|
|
677
805
|
type: Output
|
|
678
806
|
}] }); })();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-agent-run-timeline.component.js","sourceRoot":"","sources":["../../../../src/lib/custom/ai-agent-run/ai-agent-run-timeline.component.ts","../../../../src/lib/custom/ai-agent-run/ai-agent-run-timeline.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAqB,uBAAuB,EAAqB,MAAM,eAAe,CAAC;A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AS,CAAC;YACT,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACvC,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC;QAC1B,CAAC;IACH,CAAC;IAED,2EAA2E;IAC3E,gBAAgB,CAAC,IAAkB;QACjC,OAAO,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC7C,CAAC;IAED,aAAa,CAAC,KAAa,EAAE,IAAkB;QAC7C,OAAO,IAAI,CAAC,EAAE,CAAC;IACjB,CAAC;IAED,sBAAsB;QACpB,8EAA8E;QAC9E,OAAO,IAAI,oBAAoB,EAAE,CAAC;IACpC,CAAC;4HA/hBU,2BAA2B;oEAA3B,2BAA2B;YCzExC,6FAAe;;YA4Eb,AAxEA,mGAA6C,uEAwEtC;YAOT,wGAAa;YAOb,6HAAuC;;;YA1FvC,yGAiFC;YAED,eAIC;YAJD,oCAIC;;;iFDdY,2BAA2B;cAPvC,SAAS;6BACI,KAAK,YACP,0BAA0B,mBAGnB,uBAAuB,CAAC,MAAM;;kBAG9C,KAAK;;kBAeL,KAAK;;kBAUL,KAAK;;kBACL,MAAM;;kBACN,MAAM;;kFA5BI,2BAA2B","sourcesContent":["import { Component, Input, Output, EventEmitter, OnInit, OnDestroy, ChangeDetectionStrategy, ChangeDetectorRef } from '@angular/core';\nimport { Subject, Observable, combineLatest, BehaviorSubject } from 'rxjs';\nimport { takeUntil, map, shareReplay, filter } from 'rxjs/operators';\nimport { MJAIAgentRunEntity, MJAIAgentRunStepEntity, MJActionExecutionLogEntity, MJAIPromptRunEntity, MJTaskEntity } from '@memberjunction/core-entities';\nimport { AIAgentRunDataHelper } from './ai-agent-run-data.service';\nimport { AIEngineBase } from '@memberjunction/ai-engine-base';\nimport { UUIDsEqual } from '@memberjunction/global';\n\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport { FindAgentRunTreeNodes, type AgentRunTreeNode } from '@memberjunction/ai-core-plus';\nimport { NormalizeStatus, ProjectRunTreeToTimeline } from './run-tree-timeline-projection';\nimport { SortAgentRunStepsByExecutionOrder } from './agent-run-step-order';\nimport { ActionEngineBase } from '@memberjunction/actions-base';\n\n/**\n * Node kinds whose row is a LOOP, not the work inside it.\n *\n * A ForEach carries the ActionID of the action it repeats, so resolving an icon from it would draw\n * \"a Google search\" on a row that is a loop over five of them — losing the one distinction the row\n * exists to make.\n */\nconst LOOP_KINDS: ReadonlySet<string> = new Set(['ForEach', 'While']);\nexport interface TimelineItem {\n id: string;\n /**\n * What the row represents.\n *\n * `taskgraph` and `task` are dispatcher work — a graph that outlives the run that submitted it,\n * and the steps inside it. They are rendered as ordinary rows rather than as an embedded diagram,\n * and colour-coded so their provenance is visible without opening anything.\n */\n type: 'step' | 'subrun' | 'action' | 'prompt' | 'taskgraph' | 'task';\n /**\n * Where this row's work ran, when that is not obvious from its type.\n *\n * `'workflow'` means it ran on the task-graph dispatcher and outlives the agent run that\n * submitted it. Kept separate from `type` on purpose: a workflow step that runs an action IS an\n * action and should render as one — provenance styles it, it does not redefine it.\n */\n provenance?: 'workflow';\n title: string;\n subtitle: string;\n status: string;\n /**\n * When this row started, or NULL when it has not.\n *\n * Nullable on purpose. A projection that needed \"sorts last\" once filled this with the maximum\n * Date, and every unstarted row then displayed that sentinel as a real clock time — identical on\n * every row and indistinguishable from data. Ordering belongs to whatever produced the rows; a row\n * that has not run has no start time, and says so by having none.\n */\n startTime: Date | null;\n endTime?: Date;\n duration?: string;\n icon: string;\n logoUrl?: string;\n color: string;\n data: any;\n children?: TimelineItem[];\n level: number;\n parentId?: string;\n isExpanded?: boolean;\n childrenLoaded?: boolean;\n hasNoChildren?: boolean;\n}\n\n@Component({\n standalone: false,\n selector: 'mj-ai-agent-run-timeline',\n templateUrl: './ai-agent-run-timeline.component.html',\n styleUrls: ['./ai-agent-run-timeline.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class AIAgentRunTimelineComponent extends BaseAngularComponent implements OnInit, OnDestroy {\n @Input() aiAgentRunId!: string;\n\n /**\n * The run's execution tree, loaded ONCE by the form and shared with every tab.\n *\n * Received rather than fetched: three tabs need the same structure, and letting each load its own\n * issues the same recursive query three times AND lets the tabs disagree — a tab that loaded a\n * second earlier shows a different run than the one beside it.\n */\n /**\n * Setter, not a plain field: a TaskGraph step's row takes its STATUS from the graph (see\n * `graphNodeForStep`), and the tree usually arrives after the step rows have already been built.\n * Republishing rebuilds them, so a dispatched workflow stops reading Completed the moment the\n * tree says it is still running.\n */\n @Input()\n public set RunTree(value: AgentRunTreeNode | null) {\n this.runTree = value;\n this.runTree$.next(value);\n }\n public get RunTree(): AgentRunTreeNode | null {\n return this.runTree;\n }\n private runTree: AgentRunTreeNode | null = null;\n private runTree$ = new BehaviorSubject<AgentRunTreeNode | null>(null);\n @Input() dataHelper!: AIAgentRunDataHelper; // Data helper passed from parent\n @Output() itemSelected = new EventEmitter<TimelineItem>();\n @Output() navigateToEntity = new EventEmitter<{ entityName: string; recordId: string }>();\n\n private destroy$ = new Subject<void>();\n /** Resolved once the action cache is warm, so a first paint without icons can be re-rendered with them. */\n private actionsReady = false;\n /**\n * Execution-log id → action id, for the RUN-STEP path only.\n *\n * The tree path needs none of this — it carries `ActionID` outright. A run step of type `Actions`\n * still names only its log, so this map stays for that case, built from logs the data service has\n * already fetched by id.\n */\n private actionIDByLogID = new Map<string, string>();\n \n // Public observables from data helper\n steps$!: Observable<MJAIAgentRunStepEntity[]>;\n subRuns$!: Observable<MJAIAgentRunEntity[]>;\n actionLogs$!: Observable<MJActionExecutionLogEntity[]>;\n promptRuns$!: Observable<MJAIPromptRunEntity[]>;\n \n timelineItems$!: Observable<TimelineItem[]>;\n \n loading = true;\n error: string | null = null;\n selectedItem: TimelineItem | null = null;\n\n /** Graph steps currently being expanded, so a second click cannot start a second load. */\n private expandingGraphIDs = new Set<string>();\n\n constructor(\n private cdr: ChangeDetectorRef\n ) {\n super();}\n \n async ngOnInit() {\n // AIEngineBase is deferred at startup; ensure it's loaded before timeline\n // items render — getStepIconInfo / sub-agent lookups read .Agents synchronously.\n await AIEngineBase.Instance.EnsureLoaded();\n // Same reason, for the same kind of read: `resolveActionIcon` looks up `.Actions` synchronously\n // inside the projection. Cheap when another surface already warmed it, and a no-op on reload.\n try {\n await ActionEngineBase.Instance.EnsureLoaded();\n this.actionsReady = true;\n } catch {\n // An action cache that will not load costs icons, not rows — every action keeps the generic\n // glyph it had before. Never worth failing a run view over.\n this.actionsReady = false;\n }\n\n // Initialize observables from the data helper\n this.steps$ = this.dataHelper.steps$;\n this.subRuns$ = this.dataHelper.subRuns$;\n this.actionLogs$ = this.dataHelper.actionLogs$;\n this.promptRuns$ = this.dataHelper.promptRuns$;\n \n // Combine all data sources to build timeline.\n // Skip emissions where steps are empty but data is still loading —\n // the BehaviorSubjects initialise with [] so combineLatest fires\n // immediately with an empty array before the real data arrives.\n this.timelineItems$ = combineLatest([\n this.steps$,\n this.subRuns$,\n this.actionLogs$,\n this.promptRuns$,\n this.dataHelper.loading$,\n this.runTree$\n ]).pipe(\n filter(([steps, _subRuns, _actionLogs, _promptRuns, isLoading]) => {\n // While loading, suppress the empty-array emission so the\n // template keeps showing the mj-loading indicator.\n return !(isLoading && steps.length === 0);\n }),\n map(([steps, subRuns, actionLogs, promptRuns]) => {\n // Built here rather than on demand: this is where the logs arrive, and the resolver runs\n // synchronously inside the projection, which cannot await anything.\n this.actionIDByLogID = new Map(\n (actionLogs ?? [])\n .filter((log) => log.ID && log.ActionID)\n .map((log) => [log.ID.toLowerCase(), log.ActionID]),\n );\n return this.buildTimelineItems(steps, subRuns, actionLogs, promptRuns);\n }),\n shareReplay(1)\n );\n \n // Data loading is now handled by the parent component through the helper\n // Subscribe to loading state from helper\n this.dataHelper.loading$.pipe(takeUntil(this.destroy$)).subscribe(loading => {\n this.loading = loading;\n this.cdr.markForCheck();\n });\n\n this.dataHelper.error$.pipe(takeUntil(this.destroy$)).subscribe(error => {\n this.error = error;\n this.cdr.markForCheck();\n });\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n // This method is now just for compatibility - actual loading is done by parent\n async loadData() {\n if (!this.aiAgentRunId) return;\n // The parent component should handle data loading through the helper\n return this.dataHelper.loadAgentRunData(this.aiAgentRunId);\n }\n \n private buildTimelineItems(\n steps: MJAIAgentRunStepEntity[],\n subRuns: MJAIAgentRunEntity[],\n actionLogs: MJActionExecutionLogEntity[],\n promptRuns: MJAIPromptRunEntity[]\n ): TimelineItem[] {\n return this.buildHierarchicalItems(steps, 0, promptRuns);\n }\n\n private buildHierarchicalItems(\n steps: MJAIAgentRunStepEntity[],\n baseLevel: number,\n promptRuns?: MJAIPromptRunEntity[]\n ): TimelineItem[] {\n // Walk in execution order, not persist order. Children are pushed in this walk, so a\n // loop's iterations and root siblings both inherit the sort. Query OrderBy is the\n // same pair; this is the belt for a caller that handed us an unsorted array.\n const ordered = SortAgentRunStepsByExecutionOrder(steps);\n\n // Create a map of all timeline items by step ID\n const itemMap = new Map<string, TimelineItem>();\n\n // First pass: create all timeline items\n ordered.forEach(step => {\n const item = this.createTimelineItemFromStep(step, baseLevel, promptRuns);\n itemMap.set(step.ID, item);\n });\n\n // Second pass: build parent-child relationships based on ParentID\n ordered.forEach(step => {\n if (step.ParentID) {\n const parentItem = itemMap.get(step.ParentID);\n const childItem = itemMap.get(step.ID);\n\n if (parentItem && childItem) {\n // Initialize children array if needed\n if (!parentItem.children) {\n parentItem.children = [];\n }\n\n // Set child's level based on parent's level\n childItem.level = parentItem.level + 1;\n\n // Add child to parent's children array\n parentItem.children.push(childItem);\n }\n }\n });\n\n // Return only root-level items (those without a ParentID)\n const rootItems: TimelineItem[] = [];\n ordered.forEach(step => {\n if (!step.ParentID) {\n const item = itemMap.get(step.ID);\n if (item) {\n rootItems.push(item);\n }\n }\n });\n\n return rootItems;\n }\n \n /**\n * Font Awesome class for a node that runs a known action or agent, or null to keep the default.\n *\n * **Why the row kind is the wrong answer.** The same action reaches this timeline through two\n * arms of the run-tree query — as a graph Task and as a loop pass — and each arm had its own\n * generic glyph, so one Google Custom Search drew a lightning bolt and the next a paper plane.\n * What the step IS does not change with where it ran.\n *\n * **No hop.** The tree carries `ActionID` and `AgentID` directly (a task holds them as columns;\n * a pass takes them from the log it expanded from), so this is one cache read. The first version\n * of this went through the execution log and silently resolved NOTHING for graph steps, because\n * the logs it consulted are only loaded for run steps of type `Actions` — of which a dispatched\n * workflow has none.\n *\n * **Loops keep their own icon.** A ForEach carries the ActionID of the action it repeats, and\n * drawing that action's mark on the loop row would say \"this is a Google search\" about a row that\n * is a loop over five of them. The distinction the loop icon carries is worth more.\n */\n private resolveActionIcon(node: AgentRunTreeNode): string | null {\n if (LOOP_KINDS.has(node.SourceKind ?? '')) return null;\n\n if (node.ActionID) {\n const action = ActionEngineBase.Instance.Actions?.find((a) => UUIDsEqual(a.ID, node.ActionID!));\n if (action?.IconClass) return action.IconClass;\n }\n if (node.AgentID) {\n const agent = AIEngineBase.Instance.Agents?.find((a) => UUIDsEqual(a.ID, node.AgentID!));\n if (agent?.IconClass) return agent.IconClass;\n }\n return null;\n }\n\n\n\n /**\n * The graph a TaskGraph step dispatched, from the run tree.\n *\n * Null until the tree arrives (the setter above republishes then) and null for a submission that\n * produced no graph — a failed submit, where the step's own status IS the story.\n */\n private graphNodeForStep(stepID: string): AgentRunTreeNode | null {\n if (!this.runTree) return null;\n const stepNode = FindAgentRunTreeNodes(this.runTree, (n) => UUIDsEqual(n.NodeID, stepID))[0] ?? null;\n return stepNode?.Children.find((c) => c.NodeType === 'TaskGraph') ?? null;\n }\n\n private createTimelineItemFromStep(step: MJAIAgentRunStepEntity, level: number, promptRuns?: MJAIPromptRunEntity[]): TimelineItem {\n let subtitle = `Type: ${step.StepType}`;\n\n // For prompt steps, try to find the associated prompt run to get model/vendor info\n if (step.StepType === 'Prompt' && step.TargetLogID && promptRuns) {\n const promptRun = promptRuns.find(pr => UUIDsEqual(pr.ID, step.TargetLogID));\n if (promptRun) {\n subtitle = `Model: ${promptRun.Model || 'Unknown'} | Vendor: ${promptRun.Vendor || 'Unknown'}`;\n }\n }\n\n // Get icon and logoUrl based on step type\n const iconInfo = this.getStepIconInfo(step);\n\n // A dispatched workflow's row describes the WORKFLOW, not the handoff that started it. The\n // step's own status is about submission — Completed in ~300ms, correctly — and showing that\n // under a title naming the workflow is how the timeline came to report a running graph as\n // finished while the page header said \"Workflow still running\".\n const graph = step.StepType === 'TaskGraph' ? this.graphNodeForStep(step.ID) : null;\n if (graph) {\n subtitle = `${subtitle} · dispatched in ${this.calculateDuration(step.StartedAt, step.CompletedAt)}`;\n }\n\n return {\n id: step.ID,\n type: 'step',\n title: step.StepName || `Step ${step.StepNumber}`,\n subtitle: subtitle,\n status: graph ? NormalizeStatus(graph.Status) : step.Status,\n startTime: step.StartedAt,\n endTime: (graph ? graph.CompletedAt : step.CompletedAt) || undefined,\n // A graph that has not started yet has no duration of its own — the submission's stands in,\n // and the subtitle says which it is either way.\n duration: graph?.StartedAt\n ? this.calculateDuration(graph.StartedAt, graph.CompletedAt)\n : this.calculateDuration(step.StartedAt, step.CompletedAt),\n icon: iconInfo.icon,\n logoUrl: iconInfo.logoUrl,\n color: this.getStatusColor(graph ? NormalizeStatus(graph.Status) : step.Status),\n data: step,\n children: [],\n level,\n isExpanded: false\n };\n }\n \n\n private getStepIconInfo(step: MJAIAgentRunStepEntity): { icon: string; logoUrl?: string } {\n // For sub-agents, try to get agent-specific icon/logo\n if (step.StepType === 'Sub-Agent' && step.TargetID) {\n const agent = AIEngineBase.Instance.Agents.find(a => UUIDsEqual(a.ID, step.TargetID));\n if (agent) {\n // Prefer LogoURL - if present, use it with robot as fallback icon (icon won't be shown when logoUrl exists)\n if (agent.LogoURL) {\n return { icon: 'fa-robot', logoUrl: agent.LogoURL };\n }\n // Next preference: IconClass from agent metadata\n else if (agent.IconClass) {\n return { icon: agent.IconClass };\n }\n // Agent exists but has no custom icon or logo - use default robot icon\n else {\n return { icon: 'fa-robot' };\n }\n }\n }\n\n // An action step draws its OWN action's icon, exactly as a sub-agent step draws its agent's —\n // the two cases are the same idea, and only one of them was implemented. `TargetLogID` names\n // the execution log this run already loaded; that log names the action, whose IconClass is in\n // ActionEngineBase's cache. A step whose action cannot be resolved (an action with no icon, a\n // cache that did not load) falls through to the step-type default below, which is the same\n // lightning bolt it drew before.\n if (step.StepType === 'Actions' && step.TargetLogID) {\n const actionID = this.actionIDByLogID.get(step.TargetLogID.toLowerCase());\n const action = actionID\n ? ActionEngineBase.Instance.Actions?.find((a) => UUIDsEqual(a.ID, actionID))\n : undefined;\n if (action?.IconClass) return { icon: action.IconClass };\n }\n\n // Default icons for each step type (includes fa-robot for sub-agents without agent metadata)\n const icon = this.getStepIcon(step.StepType);\n return { icon };\n }\n\n private getStepIcon(stepType: string): string {\n const iconMap: Record<string, string> = {\n 'Prompt': 'fa-brain',\n 'Tool': 'fa-tools',\n 'Sub-Agent': 'fa-robot',\n 'Decision': 'fa-code-branch',\n 'Actions': 'fa-wrench',\n 'Validation': 'fa-square-check',\n 'ForEach': 'fa-repeat',\n 'While': 'fa-rotate',\n 'Skill': 'fa-wand-magic-sparkles',\n 'Plan': 'fa-clipboard-check'\n };\n return iconMap[stepType] || 'fa-circle';\n }\n \n private getStatusColor(status: string): string {\n const colorMap: Record<string, string> = {\n 'Running': 'info',\n 'Completed': 'success',\n 'Failed': 'error',\n 'Cancelled': 'warning',\n 'Paused': 'secondary'\n };\n return colorMap[status] || 'secondary';\n }\n \n calculateDuration(start: Date, end?: Date | null): string {\n if (!end) return 'Running...';\n \n const startTime = new Date(start).getTime();\n const endTime = new Date(end).getTime();\n const duration = endTime - startTime;\n \n if (duration < 1000) return `${duration}ms`;\n if (duration < 60000) return `${(duration / 1000).toFixed(1)}s`;\n if (duration < 3600000) return `${Math.floor(duration / 60000)}m ${Math.floor((duration % 60000) / 1000)}s`;\n return `${Math.floor(duration / 3600000)}h ${Math.floor((duration % 3600000) / 60000)}m`;\n }\n \n selectItem(item: TimelineItem) {\n this.selectedItem = item;\n this.itemSelected.emit(item);\n }\n \n async toggleItemExpansion(item: TimelineItem, event: Event) {\n event.stopPropagation();\n\n // Toggle expansion state\n item.isExpanded = !item.isExpanded;\n\n // For Sub-Agent steps, load their run data on demand (requires DB query)\n if (item.isExpanded && !item.childrenLoaded && item.type === 'step' && item.data?.StepType === 'Sub-Agent') {\n await this.loadSubAgentChildren(item);\n }\n\n // A TaskGraph step expands into the graph's own steps — one query for the whole subtree, so it\n // never shows a per-level loading state the way the sub-agent path has to.\n if (item.isExpanded && item.type === 'step' && item.data?.StepType === 'TaskGraph') {\n await this.ExpandTaskGraph(item);\n }\n\n // For parent steps (loop containers like ForEach/While), children are already loaded via ParentID\n // Just toggle - no additional loading needed since we already have all steps from the run\n // The children were already attached in buildTimelineItems()\n }\n \n private async loadSubAgentChildren(item: TimelineItem) {\n try {\n const subAgentRunId = item.data?.TargetLogID;\n\n if (!subAgentRunId) {\n item.hasNoChildren = true;\n item.children = [];\n item.childrenLoaded = true;\n return;\n }\n\n // Load sub-agent data through service\n const data = await this.dataHelper.loadSubAgentData(subAgentRunId);\n\n if (!data.steps || data.steps.length === 0) {\n item.hasNoChildren = true;\n item.children = [];\n item.childrenLoaded = true;\n return;\n }\n\n // Build hierarchical timeline items with ParentID relationships\n // This ensures that loop steps (ForEach/While) within sub-agents also show their children\n item.children = this.buildHierarchicalItems(data.steps, item.level + 1, data.promptRuns);\n\n item.childrenLoaded = true;\n // Trigger change detection after updating the data\n this.cdr.markForCheck();\n } catch (error) {\n console.error('🔄 Timeline: Error loading sub-agent children:', error);\n item.hasNoChildren = true;\n item.childrenLoaded = true;\n // Trigger change detection for error state\n this.cdr.markForCheck();\n }\n }\n \n navigateToSubRun(runId: string, event: Event) {\n event.stopPropagation();\n this.navigateToEntity.emit({ entityName: 'MJ: AI Agent Runs', recordId: runId });\n }\n \n navigateToActionLog(logId: string, event: Event) {\n event.stopPropagation();\n this.navigateToEntity.emit({ entityName: 'MJ: Action Execution Logs', recordId: logId });\n }\n \n navigateToPromptRun(runId: string, event: Event) {\n event.stopPropagation();\n this.navigateToEntity.emit({ entityName: 'MJ: AI Prompt Runs', recordId: runId });\n }\n \n /**\n * TrackBy function for timeline items\n */\n /**\n * The graph a TaskGraph step submitted, read from the step's own output.\n *\n * `executeTasksStep` records `parentTaskID` there whether or not submission succeeded, because a\n * rejected graph is the case where forensics matter most. A step with no id therefore means the\n * graph never reached the dispatcher — a real state the caller renders differently, which is why\n * this returns null rather than an empty string.\n */\n GetGraphParentTaskID(item: TimelineItem): string | null {\n const raw = item?.data?.OutputData;\n if (!raw) return null;\n try {\n const parsed = typeof raw === 'string' ? JSON.parse(raw) : raw;\n const id = parsed?.parentTaskID;\n return typeof id === 'string' && id.length > 0 ? id : null;\n } catch {\n return null;\n }\n }\n\n /**\n * A step inside the graph was selected.\n *\n * An Agent node carries the run it started, so selecting one offers the same navigation a\n * Sub-Agent step already does — that link is the seam between the two views, and without it a\n * dispatched sub-agent run is unreachable from the run that caused it.\n */\n OnGraphNodeSelected(event: { TaskID: string; Task: MJTaskEntity | null }): void {\n const agentRunID = event.Task?.AgentRunID;\n if (agentRunID) {\n this.navigateToEntity.emit({ entityName: 'MJ: AI Agent Runs', recordId: agentRunID });\n return;\n }\n if (event.Task?.ActionID) {\n this.navigateToEntity.emit({ entityName: 'MJ: Tasks', recordId: event.TaskID });\n }\n }\n\n /**\n * Expands a task-graph step into the graph's own steps, as ordinary timeline rows.\n *\n * **The graph's steps are steps.** They used to appear as an embedded canvas inside the list — a\n * diagram wedged into a vertical column, in a different visual language from everything around it,\n * and the only work in a run that could not be read, selected or navigated the same way as the\n * rest. They are rows now, colour-coded so their provenance is obvious, with the canvas moved to\n * the detail panel where edges have room to be seen.\n *\n * One query rather than a walk: the whole subtree arrives at once, so there is no\n * \"Loading sub-agent steps…\" and no per-level round trip.\n */\n async ExpandTaskGraph(item: TimelineItem): Promise<void> {\n if (item.childrenLoaded || this.expandingGraphIDs.has(item.id)) return;\n\n this.expandingGraphIDs.add(item.id);\n this.cdr.markForCheck();\n try {\n if (!this.RunTree) {\n this.error = 'The run tree is not loaded yet, so this workflow cannot be expanded.';\n return;\n }\n\n // The graph hangs off THIS step in the tree, so the subtree to splice in is the node whose id\n // matches the step — not the whole run, which is already on screen above it.\n const stepNode = FindAgentRunTreeNodes(this.RunTree, (n) => n.NodeID === item.id)[0] ?? null;\n\n item.children = ProjectRunTreeToTimeline(stepNode, item.level + 1, true, (n) => this.resolveActionIcon(n));\n item.childrenLoaded = true;\n item.hasNoChildren = item.children.length === 0;\n } catch (e) {\n this.error = e instanceof Error ? e.message : String(e);\n } finally {\n this.expandingGraphIDs.delete(item.id);\n this.cdr.markForCheck();\n }\n }\n\n /** True while a graph's steps are being fetched, so the row can say so. */\n IsExpandingGraph(item: TimelineItem): boolean {\n return this.expandingGraphIDs.has(item.id);\n }\n\n trackByItemId(index: number, item: TimelineItem): string {\n return item.id;\n }\n \n createSubRunDataHelper(): AIAgentRunDataHelper {\n // Create a new data helper instance for sub-runs to prevent caching conflicts\n return new AIAgentRunDataHelper();\n }\n}","@if (loading) {\n <div class=\"loading-state\">\n <mj-loading text=\"Loading run steps...\" size=\"medium\"></mj-loading>\n </div>\n} @else if (timelineItems$ | async; as items) {\n <div class=\"timeline-container\">\n @if (items.length > 0) {\n <div class=\"timeline\">\n @for (item of items; track trackByItemId($index, item)) {\n <!-- Main Timeline Item -->\n <mj-ai-agent-run-step-node\n [item]=\"item\"\n [isSelected]=\"selectedItem?.id === item.id\"\n (itemClick)=\"selectItem(item)\"\n (expandToggle)=\"toggleItemExpansion(item, $event)\"\n (navigateToEntity)=\"navigateToEntity.emit($event)\">\n </mj-ai-agent-run-step-node>\n <!-- Children Container (for both Sub-Agent and ParentID relationships) -->\n @if (item.isExpanded) {\n <!-- Show loading indicator while loading Sub-Agent children -->\n @if (item.type === 'step' && item.data?.StepType === 'Sub-Agent' && !item.childrenLoaded) {\n <div class=\"loading-children\">\n <i class=\"fas fa-spinner fa-spin\"></i> Loading sub-agent steps...\n </div>\n }\n <!-- Show no children message for Sub-Agents -->\n @if (item.type === 'step' && item.data?.StepType === 'Sub-Agent' && item.childrenLoaded && item.hasNoChildren) {\n <div class=\"no-children\">\n <i class=\"fas fa-info-circle\"></i> No sub-agent steps found\n </div>\n }\n <!-- Render children recursively (works for both Sub-Agent and ParentID children) -->\n @if (item.children && item.children.length > 0) {\n <ng-container *ngTemplateOutlet=\"recursiveSteps; context: { $implicit: item.children }\"></ng-container>\n }\n <!-- A TaskGraph step stands in for a whole graph of Task rows. Its steps render as\n ORDINARY ROWS, colour-coded for provenance — they are steps, and squeezing a diagram\n into the column made them the only work in a run that could not be read, selected or\n navigated like everything else. The canvas lives in the detail panel, where edges\n (which branch was taken, and why) have the room they need. -->\n @if (item.type === 'step' && item.data?.StepType === 'TaskGraph') {\n @if (IsExpandingGraph(item)) {\n <div class=\"loading-children\">\n <i class=\"fas fa-spinner fa-spin\"></i> Loading workflow steps...\n </div>\n } @else if (!GetGraphParentTaskID(item)) {\n <div class=\"no-children\">\n <i class=\"fas fa-info-circle\"></i>\n This workflow was recorded but never reached the dispatcher.\n </div>\n } @else if (item.childrenLoaded && item.hasNoChildren) {\n <div class=\"no-children\">\n <i class=\"fas fa-info-circle\"></i> This workflow has no steps yet.\n </div>\n }\n }\n <!-- For actual sub-run items (from the initial load) - legacy support -->\n @if (item.type === 'subrun' && item.data?.ID) {\n <mj-ai-agent-run-timeline\n [aiAgentRunId]=\"item.data.ID\"\n [dataHelper]=\"createSubRunDataHelper()\"\n [autoRefresh]=\"false\"\n (itemSelected)=\"selectItem($event)\"\n (navigateToEntity)=\"navigateToEntity.emit($event)\">\n </mj-ai-agent-run-timeline>\n }\n }\n }\n </div>\n }\n @if (items.length === 0) {\n <mj-empty-state\n Icon=\"fa-solid fa-stream\"\n Title=\"No execution steps found\" />\n }\n </div>\n} @else {\n <!-- timelineItems$ hasn't emitted yet -->\n <div class=\"loading-state\">\n <mj-loading text=\"Loading run steps...\" size=\"medium\"></mj-loading>\n </div>\n}\n\n@if (error) {\n <mj-empty-state\n Variant=\"error\"\n [Message]=\"error\" />\n}\n\n<!-- Recursive template for rendering nested children (ParentID relationships) -->\n<ng-template #recursiveSteps let-steps>\n @for (step of steps; track trackByItemId($index, step)) {\n <mj-ai-agent-run-step-node\n [item]=\"step\"\n [isSelected]=\"selectedItem?.id === step.id\"\n (itemClick)=\"selectItem(step)\"\n (expandToggle)=\"toggleItemExpansion(step, $event)\"\n (navigateToEntity)=\"navigateToEntity.emit($event)\">\n </mj-ai-agent-run-step-node>\n <!-- Recursively render this step's children if expanded -->\n @if (step.isExpanded && step.children && step.children.length > 0) {\n <ng-container *ngTemplateOutlet=\"recursiveSteps; context: { $implicit: step.children }\"></ng-container>\n }\n }\n</ng-template>"]}
|
|
1
|
+
{"version":3,"file":"ai-agent-run-timeline.component.js","sourceRoot":"","sources":["../../../../src/lib/custom/ai-agent-run/ai-agent-run-timeline.component.ts","../../../../src/lib/custom/ai-agent-run/ai-agent-run-timeline.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAqB,uBAAuB,EAAqB,MAAM,eAAe,CAAC;AACtI,OAAO,EAAE,OAAO,EAAc,aAAa,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAC3E,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAErE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAyB,MAAM,8BAA8B,CAAC;AAC5F,OAAO,EAAE,eA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,IAAI,CAAC,EAAE,CAAC;IACjB,CAAC;IAED,6CAA6C;IAC7C,aAAa,CAAC,KAAa,EAAE,IAAkB;QAC7C,OAAO,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACzC,CAAC;IAED,sBAAsB;QACpB,8EAA8E;QAC9E,OAAO,IAAI,oBAAoB,EAAE,CAAC;IACpC,CAAC;IAED,sDAAsD;IACtD,sBAAsB;QACpB,OAAO,IAAI,CAAC,sBAAsB,EAAE,CAAC;IACvC,CAAC;4HA1qBU,2BAA2B;oEAA3B,2BAA2B;YCzExC,6FAAe;;YA4Eb,AAxEA,mGAA6C,uEAwEtC;YAOT,wGAAa;YAOb,6HAAuC;;;YA1FvC,yGAiFC;YAED,eAIC;YAJD,oCAIC;;;iFDdY,2BAA2B;cAPvC,SAAS;6BACI,KAAK,YACP,0BAA0B,mBAGnB,uBAAuB,CAAC,MAAM;;kBAG9C,KAAK;;kBAGL,KAAK;;kBAqBL,KAAK;;kBAUL,KAAK;;kBAGL,KAAK;;kBAOL,MAAM;;kBASN,MAAM;;kBACN,MAAM;;kBASN,MAAM;;kFAhEI,2BAA2B","sourcesContent":["import { Component, Input, Output, EventEmitter, OnInit, OnDestroy, ChangeDetectionStrategy, ChangeDetectorRef } from '@angular/core';\nimport { Subject, Observable, combineLatest, BehaviorSubject } from 'rxjs';\nimport { takeUntil, map, shareReplay, filter } from 'rxjs/operators';\nimport { MJAIAgentRunEntity, MJAIAgentRunStepEntity, MJActionExecutionLogEntity, MJAIPromptRunEntity, MJTaskEntity } from '@memberjunction/core-entities';\nimport { AIAgentRunDataHelper } from './ai-agent-run-data.service';\nimport { AIEngineBase } from '@memberjunction/ai-engine-base';\nimport { UUIDsEqual } from '@memberjunction/global';\n\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport { FindAgentRunTreeNodes, type AgentRunTreeNode } from '@memberjunction/ai-core-plus';\nimport { NormalizeStatus, ProjectRunTreeToTimeline } from './run-tree-timeline-projection';\nimport { SortAgentRunStepsByExecutionOrder } from './agent-run-step-order';\nimport { ActionEngineBase } from '@memberjunction/actions-base';\n\n/**\n * Node kinds whose row is a LOOP, not the work inside it.\n *\n * A ForEach carries the ActionID of the action it repeats, so resolving an icon from it would draw\n * \"a Google search\" on a row that is a loop over five of them — losing the one distinction the row\n * exists to make.\n */\nconst LOOP_KINDS: ReadonlySet<string> = new Set(['ForEach', 'While']);\nexport interface TimelineItem {\n id: string; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /**\n * What the row represents.\n *\n * `taskgraph` and `task` are dispatcher work — a graph that outlives the run that submitted it,\n * and the steps inside it. They are rendered as ordinary rows rather than as an embedded diagram,\n * and colour-coded so their provenance is visible without opening anything.\n */\n type: 'step' | 'subrun' | 'action' | 'prompt' | 'taskgraph' | 'task'; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /**\n * Where this row's work ran, when that is not obvious from its type.\n *\n * `'workflow'` means it ran on the task-graph dispatcher and outlives the agent run that\n * submitted it. Kept separate from `type` on purpose: a workflow step that runs an action IS an\n * action and should render as one — provenance styles it, it does not redefine it.\n */\n provenance?: 'workflow'; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n title: string; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n subtitle: string; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n status: string; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n /**\n * When this row started, or NULL when it has not.\n *\n * Nullable on purpose. A projection that needed \"sorts last\" once filled this with the maximum\n * Date, and every unstarted row then displayed that sentinel as a real clock time — identical on\n * every row and indistinguishable from data. Ordering belongs to whatever produced the rows; a row\n * that has not run has no start time, and says so by having none.\n */\n startTime: Date | null; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n endTime?: Date; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n duration?: string; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n icon: string; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n logoUrl?: string; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n color: string; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n data: any; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n children?: TimelineItem[]; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n level: number; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n parentId?: string; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n isExpanded?: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n childrenLoaded?: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n hasNoChildren?: boolean; // case-violation-ok-legacy-back-compat: the type is named in an exported signature, so consumers build object literals against it; an interface has no runtime carrier for a stub\n}\n\n@Component({\n standalone: false,\n selector: 'mj-ai-agent-run-timeline',\n templateUrl: './ai-agent-run-timeline.component.html',\n styleUrls: ['./ai-agent-run-timeline.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class AIAgentRunTimelineComponent extends BaseAngularComponent implements OnInit, OnDestroy {\n @Input() AiAgentRunId!: string;\n\n /** @deprecated Use {@link AiAgentRunId}. */\n @Input() set aiAgentRunId(value: string) {\n this.AiAgentRunId = value;\n }\n /** @deprecated Use {@link AiAgentRunId}. */\n get aiAgentRunId(): string {\n return this.AiAgentRunId;\n }\n\n /**\n * The run's execution tree, loaded ONCE by the form and shared with every tab.\n *\n * Received rather than fetched: three tabs need the same structure, and letting each load its own\n * issues the same recursive query three times AND lets the tabs disagree — a tab that loaded a\n * second earlier shows a different run than the one beside it.\n */\n /**\n * Setter, not a plain field: a TaskGraph step's row takes its STATUS from the graph (see\n * `graphNodeForStep`), and the tree usually arrives after the step rows have already been built.\n * Republishing rebuilds them, so a dispatched workflow stops reading Completed the moment the\n * tree says it is still running.\n */\n @Input()\n public set RunTree(value: AgentRunTreeNode | null) {\n this.runTree = value;\n this.runTree$.next(value);\n }\n public get RunTree(): AgentRunTreeNode | null {\n return this.runTree;\n }\n private runTree: AgentRunTreeNode | null = null;\n private runTree$ = new BehaviorSubject<AgentRunTreeNode | null>(null);\n @Input() DataHelper!: AIAgentRunDataHelper;\n\n /** @deprecated Use {@link DataHelper}. */\n @Input() set dataHelper(value: AIAgentRunDataHelper) {\n this.DataHelper = value;\n }\n /** @deprecated Use {@link DataHelper}. */\n get dataHelper(): AIAgentRunDataHelper {\n return this.DataHelper;\n } // Data helper passed from parent\n @Output() ItemSelected = new EventEmitter<TimelineItem>();\n\n /**\n * @deprecated Use {@link ItemSelected}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (itemSelected) keeps working. Must stay AFTER ItemSelected: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() itemSelected = this.ItemSelected;\n @Output() NavigateToEntity = new EventEmitter<{ entityName: string; recordId: string }>();\n\n /**\n * @deprecated Use {@link NavigateToEntity}.\n *\n * The same emitter under the old binding name, so a template still binding\n * (navigateToEntity) keeps working. Must stay AFTER NavigateToEntity: class fields\n * initialise in order, and the other way round this captures undefined.\n */\n @Output() navigateToEntity = this.NavigateToEntity;\n\n private destroy$ = new Subject<void>();\n /** Resolved once the action cache is warm, so a first paint without icons can be re-rendered with them. */\n private actionsReady = false;\n /**\n * Execution-log id → action id, for the RUN-STEP path only.\n *\n * The tree path needs none of this — it carries `ActionID` outright. A run step of type `Actions`\n * still names only its log, so this map stays for that case, built from logs the data service has\n * already fetched by id.\n */\n private actionIDByLogID = new Map<string, string>();\n \n // Public observables from data helper\n Steps$!: Observable<MJAIAgentRunStepEntity[]>;\n\n /** @deprecated Use {@link Steps$}. */\n get steps$(): Observable<MJAIAgentRunStepEntity[]> {\n return this.Steps$;\n }\n /** @deprecated Use {@link Steps$}. */\n set steps$(value: Observable<MJAIAgentRunStepEntity[]>) {\n this.Steps$ = value;\n }\n SubRuns$!: Observable<MJAIAgentRunEntity[]>;\n\n /** @deprecated Use {@link SubRuns$}. */\n get subRuns$(): Observable<MJAIAgentRunEntity[]> {\n return this.SubRuns$;\n }\n /** @deprecated Use {@link SubRuns$}. */\n set subRuns$(value: Observable<MJAIAgentRunEntity[]>) {\n this.SubRuns$ = value;\n }\n ActionLogs$!: Observable<MJActionExecutionLogEntity[]>;\n\n /** @deprecated Use {@link ActionLogs$}. */\n get actionLogs$(): Observable<MJActionExecutionLogEntity[]> {\n return this.ActionLogs$;\n }\n /** @deprecated Use {@link ActionLogs$}. */\n set actionLogs$(value: Observable<MJActionExecutionLogEntity[]>) {\n this.ActionLogs$ = value;\n }\n PromptRuns$!: Observable<MJAIPromptRunEntity[]>;\n\n /** @deprecated Use {@link PromptRuns$}. */\n get promptRuns$(): Observable<MJAIPromptRunEntity[]> {\n return this.PromptRuns$;\n }\n /** @deprecated Use {@link PromptRuns$}. */\n set promptRuns$(value: Observable<MJAIPromptRunEntity[]>) {\n this.PromptRuns$ = value;\n }\n \n TimelineItems$!: Observable<TimelineItem[]>;\n\n /** @deprecated Use {@link TimelineItems$}. */\n get timelineItems$(): Observable<TimelineItem[]> {\n return this.TimelineItems$;\n }\n /** @deprecated Use {@link TimelineItems$}. */\n set timelineItems$(value: Observable<TimelineItem[]>) {\n this.TimelineItems$ = value;\n }\n \n Loading = true;\n\n /** @deprecated Use {@link Loading}. */\n get loading() {\n return this.Loading;\n }\n /** @deprecated Use {@link Loading}. */\n set loading(value) {\n this.Loading = value;\n }\n error: string | null = null;\n SelectedItem: TimelineItem | null = null;\n\n /** @deprecated Use {@link SelectedItem}. */\n get selectedItem(): TimelineItem | null {\n return this.SelectedItem;\n }\n /** @deprecated Use {@link SelectedItem}. */\n set selectedItem(value: TimelineItem | null) {\n this.SelectedItem = value;\n }\n\n /** Graph steps currently being expanded, so a second click cannot start a second load. */\n private expandingGraphIDs = new Set<string>();\n\n constructor(\n private cdr: ChangeDetectorRef\n ) {\n super();}\n \n async ngOnInit() {\n // AIEngineBase is deferred at startup; ensure it's loaded before timeline\n // items render — getStepIconInfo / sub-agent lookups read .Agents synchronously.\n await AIEngineBase.Instance.EnsureLoaded();\n // Same reason, for the same kind of read: `resolveActionIcon` looks up `.Actions` synchronously\n // inside the projection. Cheap when another surface already warmed it, and a no-op on reload.\n try {\n await ActionEngineBase.Instance.EnsureLoaded();\n this.actionsReady = true;\n } catch {\n // An action cache that will not load costs icons, not rows — every action keeps the generic\n // glyph it had before. Never worth failing a run view over.\n this.actionsReady = false;\n }\n\n // Initialize observables from the data helper\n this.Steps$ = this.DataHelper.steps$;\n this.SubRuns$ = this.DataHelper.subRuns$;\n this.ActionLogs$ = this.DataHelper.actionLogs$;\n this.PromptRuns$ = this.DataHelper.promptRuns$;\n \n // Combine all data sources to build timeline.\n // Skip emissions where steps are empty but data is still loading —\n // the BehaviorSubjects initialise with [] so combineLatest fires\n // immediately with an empty array before the real data arrives.\n this.TimelineItems$ = combineLatest([\n this.Steps$,\n this.SubRuns$,\n this.ActionLogs$,\n this.PromptRuns$,\n this.DataHelper.loading$,\n this.runTree$\n ]).pipe(\n filter(([steps, _subRuns, _actionLogs, _promptRuns, isLoading]) => {\n // While loading, suppress the empty-array emission so the\n // template keeps showing the mj-loading indicator.\n return !(isLoading && steps.length === 0);\n }),\n map(([steps, subRuns, actionLogs, promptRuns]) => {\n // Built here rather than on demand: this is where the logs arrive, and the resolver runs\n // synchronously inside the projection, which cannot await anything.\n this.actionIDByLogID = new Map(\n (actionLogs ?? [])\n .filter((log) => log.ID && log.ActionID)\n .map((log) => [log.ID.toLowerCase(), log.ActionID]),\n );\n return this.buildTimelineItems(steps, subRuns, actionLogs, promptRuns);\n }),\n shareReplay(1)\n );\n \n // Data loading is now handled by the parent component through the helper\n // Subscribe to loading state from helper\n this.DataHelper.loading$.pipe(takeUntil(this.destroy$)).subscribe(loading => {\n this.Loading = loading;\n this.cdr.markForCheck();\n });\n\n this.DataHelper.error$.pipe(takeUntil(this.destroy$)).subscribe(error => {\n this.error = error;\n this.cdr.markForCheck();\n });\n }\n\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n // This method is now just for compatibility - actual loading is done by parent\n async loadData() {\n if (!this.AiAgentRunId) return;\n // The parent component should handle data loading through the helper\n return this.DataHelper.loadAgentRunData(this.AiAgentRunId);\n }\n \n private buildTimelineItems(\n steps: MJAIAgentRunStepEntity[],\n subRuns: MJAIAgentRunEntity[],\n actionLogs: MJActionExecutionLogEntity[],\n promptRuns: MJAIPromptRunEntity[]\n ): TimelineItem[] {\n return this.buildHierarchicalItems(steps, 0, promptRuns);\n }\n\n private buildHierarchicalItems(\n steps: MJAIAgentRunStepEntity[],\n baseLevel: number,\n promptRuns?: MJAIPromptRunEntity[]\n ): TimelineItem[] {\n // Walk in execution order, not persist order. Children are pushed in this walk, so a\n // loop's iterations and root siblings both inherit the sort. Query OrderBy is the\n // same pair; this is the belt for a caller that handed us an unsorted array.\n const ordered = SortAgentRunStepsByExecutionOrder(steps);\n\n // Create a map of all timeline items by step ID\n const itemMap = new Map<string, TimelineItem>();\n\n // First pass: create all timeline items\n ordered.forEach(step => {\n const item = this.createTimelineItemFromStep(step, baseLevel, promptRuns);\n itemMap.set(step.ID, item);\n });\n\n // Second pass: build parent-child relationships based on ParentID\n ordered.forEach(step => {\n if (step.ParentID) {\n const parentItem = itemMap.get(step.ParentID);\n const childItem = itemMap.get(step.ID);\n\n if (parentItem && childItem) {\n // Initialize children array if needed\n if (!parentItem.children) {\n parentItem.children = [];\n }\n\n // Set child's level based on parent's level\n childItem.level = parentItem.level + 1;\n\n // Add child to parent's children array\n parentItem.children.push(childItem);\n }\n }\n });\n\n // Return only root-level items (those without a ParentID)\n const rootItems: TimelineItem[] = [];\n ordered.forEach(step => {\n if (!step.ParentID) {\n const item = itemMap.get(step.ID);\n if (item) {\n rootItems.push(item);\n }\n }\n });\n\n return rootItems;\n }\n \n /**\n * Font Awesome class for a node that runs a known action or agent, or null to keep the default.\n *\n * **Why the row kind is the wrong answer.** The same action reaches this timeline through two\n * arms of the run-tree query — as a graph Task and as a loop pass — and each arm had its own\n * generic glyph, so one Google Custom Search drew a lightning bolt and the next a paper plane.\n * What the step IS does not change with where it ran.\n *\n * **No hop.** The tree carries `ActionID` and `AgentID` directly (a task holds them as columns;\n * a pass takes them from the log it expanded from), so this is one cache read. The first version\n * of this went through the execution log and silently resolved NOTHING for graph steps, because\n * the logs it consulted are only loaded for run steps of type `Actions` — of which a dispatched\n * workflow has none.\n *\n * **Loops keep their own icon.** A ForEach carries the ActionID of the action it repeats, and\n * drawing that action's mark on the loop row would say \"this is a Google search\" about a row that\n * is a loop over five of them. The distinction the loop icon carries is worth more.\n */\n private resolveActionIcon(node: AgentRunTreeNode): string | null {\n if (LOOP_KINDS.has(node.SourceKind ?? '')) return null;\n\n if (node.ActionID) {\n const action = ActionEngineBase.Instance.Actions?.find((a) => UUIDsEqual(a.ID, node.ActionID!));\n if (action?.IconClass) return action.IconClass;\n }\n if (node.AgentID) {\n const agent = AIEngineBase.Instance.Agents?.find((a) => UUIDsEqual(a.ID, node.AgentID!));\n if (agent?.IconClass) return agent.IconClass;\n }\n return null;\n }\n\n\n\n /**\n * The graph a TaskGraph step dispatched, from the run tree.\n *\n * Null until the tree arrives (the setter above republishes then) and null for a submission that\n * produced no graph — a failed submit, where the step's own status IS the story.\n */\n private graphNodeForStep(stepID: string): AgentRunTreeNode | null {\n if (!this.runTree) return null;\n const stepNode = FindAgentRunTreeNodes(this.runTree, (n) => UUIDsEqual(n.NodeID, stepID))[0] ?? null;\n return stepNode?.Children.find((c) => c.NodeType === 'TaskGraph') ?? null;\n }\n\n private createTimelineItemFromStep(step: MJAIAgentRunStepEntity, level: number, promptRuns?: MJAIPromptRunEntity[]): TimelineItem {\n let subtitle = `Type: ${step.StepType}`;\n\n // For prompt steps, try to find the associated prompt run to get model/vendor info\n if (step.StepType === 'Prompt' && step.TargetLogID && promptRuns) {\n const promptRun = promptRuns.find(pr => UUIDsEqual(pr.ID, step.TargetLogID));\n if (promptRun) {\n subtitle = `Model: ${promptRun.Model || 'Unknown'} | Vendor: ${promptRun.Vendor || 'Unknown'}`;\n }\n }\n\n // Get icon and logoUrl based on step type\n const iconInfo = this.getStepIconInfo(step);\n\n // A dispatched workflow's row describes the WORKFLOW, not the handoff that started it. The\n // step's own status is about submission — Completed in ~300ms, correctly — and showing that\n // under a title naming the workflow is how the timeline came to report a running graph as\n // finished while the page header said \"Workflow still running\".\n const graph = step.StepType === 'TaskGraph' ? this.graphNodeForStep(step.ID) : null;\n if (graph) {\n subtitle = `${subtitle} · dispatched in ${this.CalculateDuration(step.StartedAt, step.CompletedAt)}`;\n }\n\n return {\n id: step.ID,\n type: 'step',\n title: step.StepName || `Step ${step.StepNumber}`,\n subtitle: subtitle,\n status: graph ? NormalizeStatus(graph.Status) : step.Status,\n startTime: step.StartedAt,\n endTime: (graph ? graph.CompletedAt : step.CompletedAt) || undefined,\n // A graph that has not started yet has no duration of its own — the submission's stands in,\n // and the subtitle says which it is either way.\n duration: graph?.StartedAt\n ? this.CalculateDuration(graph.StartedAt, graph.CompletedAt)\n : this.CalculateDuration(step.StartedAt, step.CompletedAt),\n icon: iconInfo.icon,\n logoUrl: iconInfo.logoUrl,\n color: this.getStatusColor(graph ? NormalizeStatus(graph.Status) : step.Status),\n data: step,\n children: [],\n level,\n isExpanded: false\n };\n }\n \n\n private getStepIconInfo(step: MJAIAgentRunStepEntity): { icon: string; logoUrl?: string } {\n // For sub-agents, try to get agent-specific icon/logo\n if (step.StepType === 'Sub-Agent' && step.TargetID) {\n const agent = AIEngineBase.Instance.Agents.find(a => UUIDsEqual(a.ID, step.TargetID));\n if (agent) {\n // Prefer LogoURL - if present, use it with robot as fallback icon (icon won't be shown when logoUrl exists)\n if (agent.LogoURL) {\n return { icon: 'fa-robot', logoUrl: agent.LogoURL };\n }\n // Next preference: IconClass from agent metadata\n else if (agent.IconClass) {\n return { icon: agent.IconClass };\n }\n // Agent exists but has no custom icon or logo - use default robot icon\n else {\n return { icon: 'fa-robot' };\n }\n }\n }\n\n // An action step draws its OWN action's icon, exactly as a sub-agent step draws its agent's —\n // the two cases are the same idea, and only one of them was implemented. `TargetLogID` names\n // the execution log this run already loaded; that log names the action, whose IconClass is in\n // ActionEngineBase's cache. A step whose action cannot be resolved (an action with no icon, a\n // cache that did not load) falls through to the step-type default below, which is the same\n // lightning bolt it drew before.\n if (step.StepType === 'Actions' && step.TargetLogID) {\n const actionID = this.actionIDByLogID.get(step.TargetLogID.toLowerCase());\n const action = actionID\n ? ActionEngineBase.Instance.Actions?.find((a) => UUIDsEqual(a.ID, actionID))\n : undefined;\n if (action?.IconClass) return { icon: action.IconClass };\n }\n\n // Default icons for each step type (includes fa-robot for sub-agents without agent metadata)\n const icon = this.getStepIcon(step.StepType);\n return { icon };\n }\n\n private getStepIcon(stepType: string): string {\n const iconMap: Record<string, string> = {\n 'Prompt': 'fa-brain',\n 'Tool': 'fa-tools',\n 'Sub-Agent': 'fa-robot',\n 'Decision': 'fa-code-branch',\n 'Actions': 'fa-wrench',\n 'Validation': 'fa-square-check',\n 'ForEach': 'fa-repeat',\n 'While': 'fa-rotate',\n 'Skill': 'fa-wand-magic-sparkles',\n 'Plan': 'fa-clipboard-check'\n };\n return iconMap[stepType] || 'fa-circle';\n }\n \n private getStatusColor(status: string): string {\n const colorMap: Record<string, string> = {\n 'Running': 'info',\n 'Completed': 'success',\n 'Failed': 'error',\n 'Cancelled': 'warning',\n 'Paused': 'secondary'\n };\n return colorMap[status] || 'secondary';\n }\n \n CalculateDuration(start: Date, end?: Date | null): string {\n if (!end) return 'Running...';\n \n const startTime = new Date(start).getTime();\n const endTime = new Date(end).getTime();\n const duration = endTime - startTime;\n \n if (duration < 1000) return `${duration}ms`;\n if (duration < 60000) return `${(duration / 1000).toFixed(1)}s`;\n if (duration < 3600000) return `${Math.floor(duration / 60000)}m ${Math.floor((duration % 60000) / 1000)}s`;\n return `${Math.floor(duration / 3600000)}h ${Math.floor((duration % 3600000) / 60000)}m`;\n }\n\n /** @deprecated Use {@link CalculateDuration}. */\n calculateDuration(start: Date, end?: Date | null): string {\n return this.CalculateDuration(start, end);\n }\n \n SelectItem(item: TimelineItem) {\n this.SelectedItem = item;\n this.ItemSelected.emit(item);\n }\n\n /** @deprecated Use {@link SelectItem}. */\n selectItem(item: TimelineItem) {\n return this.SelectItem(item);\n }\n \n async ToggleItemExpansion(item: TimelineItem, event: Event) {\n event.stopPropagation();\n\n // Toggle expansion state\n item.isExpanded = !item.isExpanded;\n\n // For Sub-Agent steps, load their run data on demand (requires DB query)\n if (item.isExpanded && !item.childrenLoaded && item.type === 'step' && item.data?.StepType === 'Sub-Agent') {\n await this.loadSubAgentChildren(item);\n }\n\n // A TaskGraph step expands into the graph's own steps — one query for the whole subtree, so it\n // never shows a per-level loading state the way the sub-agent path has to.\n if (item.isExpanded && item.type === 'step' && item.data?.StepType === 'TaskGraph') {\n await this.ExpandTaskGraph(item);\n }\n\n // For parent steps (loop containers like ForEach/While), children are already loaded via ParentID\n // Just toggle - no additional loading needed since we already have all steps from the run\n // The children were already attached in buildTimelineItems()\n }\n\n /** @deprecated Use {@link ToggleItemExpansion}. */\n async toggleItemExpansion(item: TimelineItem, event: Event) {\n return this.ToggleItemExpansion(item, event);\n }\n \n private async loadSubAgentChildren(item: TimelineItem) {\n try {\n const subAgentRunId = item.data?.TargetLogID;\n\n if (!subAgentRunId) {\n item.hasNoChildren = true;\n item.children = [];\n item.childrenLoaded = true;\n return;\n }\n\n // Load sub-agent data through service\n const data = await this.DataHelper.loadSubAgentData(subAgentRunId);\n\n if (!data.steps || data.steps.length === 0) {\n item.hasNoChildren = true;\n item.children = [];\n item.childrenLoaded = true;\n return;\n }\n\n // Build hierarchical timeline items with ParentID relationships\n // This ensures that loop steps (ForEach/While) within sub-agents also show their children\n item.children = this.buildHierarchicalItems(data.steps, item.level + 1, data.promptRuns);\n\n item.childrenLoaded = true;\n // Trigger change detection after updating the data\n this.cdr.markForCheck();\n } catch (error) {\n console.error('🔄 Timeline: Error loading sub-agent children:', error);\n item.hasNoChildren = true;\n item.childrenLoaded = true;\n // Trigger change detection for error state\n this.cdr.markForCheck();\n }\n }\n \n NavigateToSubRun(runId: string, event: Event) {\n event.stopPropagation();\n this.NavigateToEntity.emit({ entityName: 'MJ: AI Agent Runs', recordId: runId });\n }\n\n /** @deprecated Use {@link NavigateToSubRun}. */\n navigateToSubRun(runId: string, event: Event) {\n return this.NavigateToSubRun(runId, event);\n }\n \n NavigateToActionLog(logId: string, event: Event) {\n event.stopPropagation();\n this.NavigateToEntity.emit({ entityName: 'MJ: Action Execution Logs', recordId: logId });\n }\n\n /** @deprecated Use {@link NavigateToActionLog}. */\n navigateToActionLog(logId: string, event: Event) {\n return this.NavigateToActionLog(logId, event);\n }\n \n NavigateToPromptRun(runId: string, event: Event) {\n event.stopPropagation();\n this.NavigateToEntity.emit({ entityName: 'MJ: AI Prompt Runs', recordId: runId });\n }\n\n /** @deprecated Use {@link NavigateToPromptRun}. */\n navigateToPromptRun(runId: string, event: Event) {\n return this.NavigateToPromptRun(runId, event);\n }\n \n /**\n * TrackBy function for timeline items\n */\n /**\n * The graph a TaskGraph step submitted, read from the step's own output.\n *\n * `executeTasksStep` records `parentTaskID` there whether or not submission succeeded, because a\n * rejected graph is the case where forensics matter most. A step with no id therefore means the\n * graph never reached the dispatcher — a real state the caller renders differently, which is why\n * this returns null rather than an empty string.\n */\n GetGraphParentTaskID(item: TimelineItem): string | null {\n const raw = item?.data?.OutputData;\n if (!raw) return null;\n try {\n const parsed = typeof raw === 'string' ? JSON.parse(raw) : raw;\n const id = parsed?.parentTaskID;\n return typeof id === 'string' && id.length > 0 ? id : null;\n } catch {\n return null;\n }\n }\n\n /**\n * A step inside the graph was selected.\n *\n * An Agent node carries the run it started, so selecting one offers the same navigation a\n * Sub-Agent step already does — that link is the seam between the two views, and without it a\n * dispatched sub-agent run is unreachable from the run that caused it.\n */\n OnGraphNodeSelected(event: { TaskID: string; Task: MJTaskEntity | null }): void {\n const agentRunID = event.Task?.AgentRunID;\n if (agentRunID) {\n this.NavigateToEntity.emit({ entityName: 'MJ: AI Agent Runs', recordId: agentRunID });\n return;\n }\n if (event.Task?.ActionID) {\n this.NavigateToEntity.emit({ entityName: 'MJ: Tasks', recordId: event.TaskID });\n }\n }\n\n /**\n * Expands a task-graph step into the graph's own steps, as ordinary timeline rows.\n *\n * **The graph's steps are steps.** They used to appear as an embedded canvas inside the list — a\n * diagram wedged into a vertical column, in a different visual language from everything around it,\n * and the only work in a run that could not be read, selected or navigated the same way as the\n * rest. They are rows now, colour-coded so their provenance is obvious, with the canvas moved to\n * the detail panel where edges have room to be seen.\n *\n * One query rather than a walk: the whole subtree arrives at once, so there is no\n * \"Loading sub-agent steps…\" and no per-level round trip.\n */\n async ExpandTaskGraph(item: TimelineItem): Promise<void> {\n if (item.childrenLoaded || this.expandingGraphIDs.has(item.id)) return;\n\n this.expandingGraphIDs.add(item.id);\n this.cdr.markForCheck();\n try {\n if (!this.RunTree) {\n this.error = 'The run tree is not loaded yet, so this workflow cannot be expanded.';\n return;\n }\n\n // The graph hangs off THIS step in the tree, so the subtree to splice in is the node whose id\n // matches the step — not the whole run, which is already on screen above it.\n const stepNode = FindAgentRunTreeNodes(this.RunTree, (n) => n.NodeID === item.id)[0] ?? null;\n\n item.children = ProjectRunTreeToTimeline(stepNode, item.level + 1, true, (n) => this.resolveActionIcon(n));\n item.childrenLoaded = true;\n item.hasNoChildren = item.children.length === 0;\n } catch (e) {\n this.error = e instanceof Error ? e.message : String(e);\n } finally {\n this.expandingGraphIDs.delete(item.id);\n this.cdr.markForCheck();\n }\n }\n\n /** True while a graph's steps are being fetched, so the row can say so. */\n IsExpandingGraph(item: TimelineItem): boolean {\n return this.expandingGraphIDs.has(item.id);\n }\n\n TrackByItemId(index: number, item: TimelineItem): string {\n return item.id;\n }\n\n /** @deprecated Use {@link TrackByItemId}. */\n trackByItemId(index: number, item: TimelineItem): string {\n return this.TrackByItemId(index, item);\n }\n \n CreateSubRunDataHelper(): AIAgentRunDataHelper {\n // Create a new data helper instance for sub-runs to prevent caching conflicts\n return new AIAgentRunDataHelper();\n }\n\n /** @deprecated Use {@link CreateSubRunDataHelper}. */\n createSubRunDataHelper(): AIAgentRunDataHelper {\n return this.CreateSubRunDataHelper();\n }\n}","@if (loading) {\n <div class=\"loading-state\">\n <mj-loading text=\"Loading run steps...\" size=\"medium\"></mj-loading>\n </div>\n} @else if (timelineItems$ | async; as items) {\n <div class=\"timeline-container\">\n @if (items.length > 0) {\n <div class=\"timeline\">\n @for (item of items; track trackByItemId($index, item)) {\n <!-- Main Timeline Item -->\n <mj-ai-agent-run-step-node\n [item]=\"item\"\n [isSelected]=\"selectedItem?.id === item.id\"\n (itemClick)=\"selectItem(item)\"\n (expandToggle)=\"toggleItemExpansion(item, $event)\"\n (navigateToEntity)=\"navigateToEntity.emit($event)\">\n </mj-ai-agent-run-step-node>\n <!-- Children Container (for both Sub-Agent and ParentID relationships) -->\n @if (item.isExpanded) {\n <!-- Show loading indicator while loading Sub-Agent children -->\n @if (item.type === 'step' && item.data?.StepType === 'Sub-Agent' && !item.childrenLoaded) {\n <div class=\"loading-children\">\n <i class=\"fas fa-spinner fa-spin\"></i> Loading sub-agent steps...\n </div>\n }\n <!-- Show no children message for Sub-Agents -->\n @if (item.type === 'step' && item.data?.StepType === 'Sub-Agent' && item.childrenLoaded && item.hasNoChildren) {\n <div class=\"no-children\">\n <i class=\"fas fa-info-circle\"></i> No sub-agent steps found\n </div>\n }\n <!-- Render children recursively (works for both Sub-Agent and ParentID children) -->\n @if (item.children && item.children.length > 0) {\n <ng-container *ngTemplateOutlet=\"recursiveSteps; context: { $implicit: item.children }\"></ng-container>\n }\n <!-- A TaskGraph step stands in for a whole graph of Task rows. Its steps render as\n ORDINARY ROWS, colour-coded for provenance — they are steps, and squeezing a diagram\n into the column made them the only work in a run that could not be read, selected or\n navigated like everything else. The canvas lives in the detail panel, where edges\n (which branch was taken, and why) have the room they need. -->\n @if (item.type === 'step' && item.data?.StepType === 'TaskGraph') {\n @if (IsExpandingGraph(item)) {\n <div class=\"loading-children\">\n <i class=\"fas fa-spinner fa-spin\"></i> Loading workflow steps...\n </div>\n } @else if (!GetGraphParentTaskID(item)) {\n <div class=\"no-children\">\n <i class=\"fas fa-info-circle\"></i>\n This workflow was recorded but never reached the dispatcher.\n </div>\n } @else if (item.childrenLoaded && item.hasNoChildren) {\n <div class=\"no-children\">\n <i class=\"fas fa-info-circle\"></i> This workflow has no steps yet.\n </div>\n }\n }\n <!-- For actual sub-run items (from the initial load) - legacy support -->\n @if (item.type === 'subrun' && item.data?.ID) {\n <mj-ai-agent-run-timeline\n [aiAgentRunId]=\"item.data.ID\"\n [dataHelper]=\"createSubRunDataHelper()\"\n [autoRefresh]=\"false\"\n (itemSelected)=\"selectItem($event)\"\n (navigateToEntity)=\"navigateToEntity.emit($event)\">\n </mj-ai-agent-run-timeline>\n }\n }\n }\n </div>\n }\n @if (items.length === 0) {\n <mj-empty-state\n Icon=\"fa-solid fa-stream\"\n Title=\"No execution steps found\" />\n }\n </div>\n} @else {\n <!-- timelineItems$ hasn't emitted yet -->\n <div class=\"loading-state\">\n <mj-loading text=\"Loading run steps...\" size=\"medium\"></mj-loading>\n </div>\n}\n\n@if (error) {\n <mj-empty-state\n Variant=\"error\"\n [Message]=\"error\" />\n}\n\n<!-- Recursive template for rendering nested children (ParentID relationships) -->\n<ng-template #recursiveSteps let-steps>\n @for (step of steps; track trackByItemId($index, step)) {\n <mj-ai-agent-run-step-node\n [item]=\"step\"\n [isSelected]=\"selectedItem?.id === step.id\"\n (itemClick)=\"selectItem(step)\"\n (expandToggle)=\"toggleItemExpansion(step, $event)\"\n (navigateToEntity)=\"navigateToEntity.emit($event)\">\n </mj-ai-agent-run-step-node>\n <!-- Recursively render this step's children if expanded -->\n @if (step.isExpanded && step.children && step.children.length > 0) {\n <ng-container *ngTemplateOutlet=\"recursiveSteps; context: { $implicit: step.children }\"></ng-container>\n }\n }\n</ng-template>"]}
|