@memberjunction/ng-core-entity-forms 6.1.0-edge.1 → 6.1.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/AIAgents/FlowAgentType/flow-agent-form-section.component.d.ts +19 -2
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-agent-form-section.component.d.ts.map +1 -1
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-agent-form-section.component.js +50 -9
- package/dist/lib/custom/AIAgents/FlowAgentType/flow-agent-form-section.component.js.map +1 -1
- package/dist/lib/custom/AIAgents/agent-form-tabs.d.ts +59 -0
- package/dist/lib/custom/AIAgents/agent-form-tabs.d.ts.map +1 -0
- package/dist/lib/custom/AIAgents/agent-form-tabs.js +53 -0
- package/dist/lib/custom/AIAgents/agent-form-tabs.js.map +1 -0
- package/dist/lib/custom/AIAgents/ai-agent-form.component.d.ts +54 -0
- package/dist/lib/custom/AIAgents/ai-agent-form.component.d.ts.map +1 -1
- package/dist/lib/custom/AIAgents/ai-agent-form.component.js +1300 -1143
- package/dist/lib/custom/AIAgents/ai-agent-form.component.js.map +1 -1
- package/dist/lib/custom/ai-agent-run/ai-agent-run-analytics.component.d.ts +25 -1
- 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 +228 -170
- package/dist/lib/custom/ai-agent-run/ai-agent-run-analytics.component.js.map +1 -1
- package/dist/lib/custom/ai-agent-run/ai-agent-run-step-detail.component.d.ts +31 -1
- 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 +229 -157
- 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 +9 -0
- 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 +86 -51
- 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 +73 -4
- 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 +133 -7
- 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 +49 -1
- 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 +383 -264
- 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 +10 -1
- 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 +25 -3
- 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 +21 -1
- 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 +11 -0
- package/dist/lib/custom/ai-agent-run/flow/agent-run-flow.model.js.map +1 -1
- package/dist/lib/custom/ai-agent-run/flow/run-tree-flow-projection.d.ts +28 -0
- package/dist/lib/custom/ai-agent-run/flow/run-tree-flow-projection.d.ts.map +1 -0
- package/dist/lib/custom/ai-agent-run/flow/run-tree-flow-projection.js +120 -0
- package/dist/lib/custom/ai-agent-run/flow/run-tree-flow-projection.js.map +1 -0
- package/dist/lib/custom/ai-agent-run/run-tree-timeline-projection.d.ts +90 -0
- package/dist/lib/custom/ai-agent-run/run-tree-timeline-projection.d.ts.map +1 -0
- package/dist/lib/custom/ai-agent-run/run-tree-timeline-projection.js +326 -0
- package/dist/lib/custom/ai-agent-run/run-tree-timeline-projection.js.map +1 -0
- package/dist/lib/custom/custom-forms.module.d.ts +1 -1
- package/dist/lib/custom/custom-forms.module.d.ts.map +1 -1
- package/dist/lib/custom/custom-forms.module.js +4 -1
- package/dist/lib/custom/custom-forms.module.js.map +1 -1
- package/dist/lib/generated/Entities/MJAIAgentRequest/mjaiagentrequest.form.component.js +8 -6
- package/dist/lib/generated/Entities/MJAIAgentRequest/mjaiagentrequest.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJAIModel/mjaimodel.form.component.js +171 -169
- package/dist/lib/generated/Entities/MJAIModel/mjaimodel.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJAIModelType/mjaimodeltype.form.component.js +25 -23
- package/dist/lib/generated/Entities/MJAIModelType/mjaimodeltype.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJAIModelVendor/mjaimodelvendor.form.component.js +15 -13
- package/dist/lib/generated/Entities/MJAIModelVendor/mjaimodelvendor.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJAIPrompt/mjaiprompt.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJAIPrompt/mjaiprompt.form.component.js +43 -25
- package/dist/lib/generated/Entities/MJAIPrompt/mjaiprompt.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJAction/mjaction.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJAction/mjaction.form.component.js +35 -17
- package/dist/lib/generated/Entities/MJAction/mjaction.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJActionExecutionLog/mjactionexecutionlog.form.component.js +11 -11
- package/dist/lib/generated/Entities/MJActionExecutionLog/mjactionexecutionlog.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJEntityAction/mjentityaction.form.component.js +38 -36
- package/dist/lib/generated/Entities/MJEntityAction/mjentityaction.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJEntityActionParam/mjentityactionparam.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJEntityActionParam/mjentityactionparam.form.component.js +7 -13
- package/dist/lib/generated/Entities/MJEntityActionParam/mjentityactionparam.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJTask/mjtask.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJTask/mjtask.form.component.js +52 -26
- package/dist/lib/generated/Entities/MJTask/mjtask.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/MJTaskDependency/mjtaskdependency.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/MJTaskDependency/mjtaskdependency.form.component.js +16 -4
- package/dist/lib/generated/Entities/MJTaskDependency/mjtaskdependency.form.component.js.map +1 -1
- package/package.json +40 -40
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-agent-run-step-node.component.js","sourceRoot":"","sources":["../../../../src/lib/custom/ai-agent-run/ai-agent-run-step-node.component.ts","../../../../src/lib/custom/ai-agent-run/ai-agent-run-step-node.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;;;;;;ICSnE,kCAEyC;IADvC,qMAAS,iCAA0B,KAAC;IAEpC,wBAE8C;IAChD,iBAAS;;;;IAFL,cAA2C;IAC7C,AADE,2DAA2C,2CACJ;;;;IAOzC,+BAIkC;IAAhC,kMAAS,0BAAmB,KAAC;IAJ/B,iBAIkC;;;IAFhC,AADA,2DAAoB,0BACF;;;IAKpB,uBAAyC;;;IAA1B,0CAAqB;;;IAcpC,8BAAsC;IACpC,YACF;IAAA,iBAAM;;;IADJ,cACF;IADE,2DACF;;;IAMI,gCAAwG;IACtG,wBAA0C;IAC1C,YACA;IAAA,gCAA8B;IAAA,YAA0D;IAC1F,AAD0F,iBAAO,EAC1F;;;;IAJ8D,0DAAkC;;IAErG,eACA;IADA,iDACA;IAA8B,eAA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YAOpB,2FAAqB;YAGvB,iBAAM;YAKF,AADF,AADF,8BAA8B,aACC,SACvB;YAAA,YAAgB;YAAA,iBAAK;YACzB,+BAA4B;YAAA,aAA2C;;YACzE,AADyE,iBAAO,EAC1E;YAEN,+BAA+B;YAAA,aAAmB;YAAA,iBAAM;YAExD,+FAA2B;YAM3B,gGAAmC;YAYnC,gCAA2B;YACzB,iGAAqB;YAKrB,iCAAsD;YACpD,wBAA0D;YAC1D,aACF;YAEJ,AADE,AADE,iBAAO,EACH,EACF;YAGN,gCAA8B;YAC5B,mGAA2B;YAS/B,AADE,iBAAM,EACF;;YA/EJ,wDAAwC;YAHxC,0CAA6B;;YAO7B,cAQC;YARD,wCAQC;YAG4B,cAA8B;;YACzD,cAMC;YAND,2CAMC;YACD,cAEC;YAFD,4CAEC;YAMK,eAAgB;YAAhB,oCAAgB;YACQ,eAA2C;YAA3C,iFAA2C;YAG1C,eAAmB;YAAnB,uCAAmB;YAElD,cAIC;YAJD,mDAIC;YAED,cAUC;YAVD,2DAUC;YAGC,eAIC;YAJD,6CAIC;YACoB,cAAgC;;YACpC,cAAsC;YAAtC,4DAAsC;YACrD,cACF;YADE,gDACF;YAMF,eAOC;YAPD,mDAOC;;;iFDvEQ,2BAA2B;cANvC,SAAS;6BACI,KAAK,YACP,2BAA2B;;kBAKpC,KAAK;;kBACL,KAAK;;kBACL,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kFALI,2BAA2B","sourcesContent":["import { Component, Input, Output, EventEmitter } from '@angular/core';\nimport { MJAIAgentRunStepEntity_AgentSkillInvocation } from '@memberjunction/core-entities';\nimport { TimelineItem } from './ai-agent-run-timeline.component';\n\n@Component({\n standalone: false,\n selector: 'mj-ai-agent-run-step-node',\n templateUrl: './ai-agent-run-step-node.component.html',\n styleUrls: ['./ai-agent-run-step-node.component.css']\n})\nexport class AIAgentRunStepNodeComponent {\n @Input() item!: TimelineItem;\n @Input() isSelected = false;\n @Output() itemClick = new EventEmitter<TimelineItem>();\n @Output() expandToggle = new EventEmitter<Event>();\n @Output() navigateToEntity = new EventEmitter<{ entityName: string; recordId: string }>();\n\n get hasChildren(): boolean {\n return !!this.item.children && this.item.children.length > 0;\n }\n\n get isSubAgent(): boolean {\n return this.item.type === 'subrun' || (this.item.type === 'step' && this.item.data?.StepType === 'Sub-Agent');\n }\n\n get isParentStep(): boolean {\n // Check if this step has children via ParentID relationships (non-Sub-Agent hierarchy)\n return this.item.type === 'step' &&\n this.item.data?.StepType !== 'Sub-Agent' &&\n this.hasChildren;\n }\n\n get canExpand(): boolean {\n // Can expand if it's a sub-agent OR if it's a parent step with children\n return this.isSubAgent || this.isParentStep;\n }\n\n get canNavigateToEntity(): boolean {\n // For steps, check if it's a type that has a target and if TargetLogID exists\n if (this.item.type === 'step' && this.item.data) {\n const stepType = this.item.data.StepType;\n return (stepType === 'Actions' || stepType === 'Prompt' || stepType === 'Sub-Agent') \n && !!this.item.data.TargetLogID;\n }\n return false;\n }\n\n get entityNavigationText(): string {\n // For step types, check the StepType\n if (this.item.type === 'step' && this.item.data) {\n const stepType = this.item.data.StepType;\n switch (stepType.trim().toLowerCase()) {\n case 'actions':\n return 'View Action Log';\n case 'prompt':\n return 'View Prompt Run';\n case 'sub-agent':\n return 'View Agent Run';\n default:\n return 'View Details';\n }\n }\n\n return \"\";\n }\n\n getStatusIcon(status: string): string {\n const iconMap: Record<string, string> = {\n 'Running': 'fa-circle-notch fa-spin',\n 'Completed': 'fa-check-circle',\n 'Failed': 'fa-times-circle',\n 'Cancelled': 'fa-ban',\n 'Paused': 'fa-pause-circle'\n };\n return iconMap[status] || 'fa-question-circle';\n }\n\n handleClick() {\n this.itemClick.emit(this.item);\n }\n\n handleExpandToggle(event: Event) {\n if (this.canExpand) {\n this.expandToggle.emit(event);\n }\n }\n\n navigateToRecord(event: Event) {\n event.stopPropagation();\n \n if (!this.canNavigateToEntity) return;\n\n let entityName = '';\n let recordId = '';\n\n // For step types, use TargetLogID and determine entity based on StepType\n if (this.item.type === 'step' && this.item.data) {\n recordId = this.item.data.TargetLogID;\n const stepType = this.item.data.StepType;\n \n switch (stepType.trim().toLowerCase()) {\n case 'actions':\n entityName = 'MJ: Action Execution Logs';\n break;\n case 'prompt':\n entityName = 'MJ: AI Prompt Runs';\n break;\n case 'sub-agent':\n entityName = 'MJ: AI Agent Runs';\n break;\n }\n } else {\n // For direct types, use the item ID\n recordId = this.item.id;\n \n switch (this.item.type.trim().toLowerCase()) {\n case 'actions':\n entityName = 'MJ: Action Execution Logs';\n break;\n case 'prompt':\n entityName = 'MJ: AI Prompt Runs';\n break;\n case 'sub-agent':\n entityName = 'MJ: AI Agent Runs';\n break;\n }\n }\n\n if (entityName && recordId) {\n this.navigateToEntity.emit({ entityName, recordId });\n }\n }\n\n /**\n * Skill-invocation records associated with this step (parsed from `AIAgentRunStep.Skills`).\n * Non-empty on Skill steps (the activation performed), Prompt steps (skills in effect for\n * the turn), and Actions/Sub-Agent steps whose tool was granted by a skill rather than a\n * native agent grant.\n */\n get SkillInvocations(): MJAIAgentRunStepEntity_AgentSkillInvocation[] {\n const raw = this.item.type === 'step' ? this.item.data?.Skills : null;\n if (!raw) return [];\n try {\n const parsed = typeof raw === 'string' ? JSON.parse(raw) : raw;\n return Array.isArray(parsed) ? parsed : [];\n } catch {\n return [];\n }\n }\n\n /** Tooltip summarizing an invocation's provenance for the badge hover. */\n public GetSkillChipTooltip(inv: MJAIAgentRunStepEntity_AgentSkillInvocation): string {\n const who = inv.ActivationType === 'requested' ? 'requested by the user (/skill mention)' : 'self-activated by the agent';\n const reason = inv.Reason ? ` — ${inv.Reason}` : '';\n return `${inv.SkillName}: ${who}${reason}`;\n }\n\n getAdditionalInfo(): string {\n if (this.item.type === 'step' && this.item.data) {\n const step = this.item.data;\n const parts = [];\n\n if (step.TargetActionName) {\n parts.push(`Action: ${step.TargetActionName}`);\n }\n if (step.Error) {\n parts.push('Error occurred');\n }\n\n return parts.join(' • ');\n }\n\n if (this.item.type === 'action' && this.item.data) {\n const log = this.item.data;\n if (log.Message) {\n return log.Message.substring(0, 100) + (log.Message.length > 100 ? '...' : '');\n }\n }\n\n return '';\n }\n\n onLogoError(event: Event): void {\n // Hide the broken image and show the icon instead by clearing logoUrl\n const imgElement = event.target as HTMLImageElement;\n imgElement.style.display = 'none';\n this.item.logoUrl = undefined;\n }\n}","<div class=\"timeline-item\"\n [class.selected]=\"isSelected\"\n [attr.data-status]=\"item.status\"\n [attr.data-type]=\"item.type\"\n [style.margin-left.px]=\"item.level * 24\"\n (click)=\"handleClick()\">\n\n <!-- Expand/Collapse Button for Sub-Agents and Parent Steps -->\n @if (canExpand) {\n <button class=\"expand-toggle\"\n (click)=\"handleExpandToggle($event)\"\n [attr.aria-expanded]=\"item.isExpanded\">\n <i class=\"fas\"\n [class.fa-chevron-right]=\"!item.isExpanded\"\n [class.fa-chevron-down]=\"item.isExpanded\"></i>\n </button>\n }\n\n <!-- Timeline Marker -->\n <div class=\"timeline-marker\" [attr.data-color]=\"item.color\">\n @if (item.logoUrl) {\n <img\n [src]=\"item.logoUrl\"\n [alt]=\"item.title\"\n class=\"timeline-marker-logo\"\n (error)=\"onLogoError($event)\" />\n }\n @if (!item.logoUrl) {\n <i class=\"fas\" [ngClass]=\"item.icon\"></i>\n }\n </div>\n\n <!-- Timeline Content -->\n <div class=\"timeline-content\">\n <div class=\"timeline-header\">\n <h4>{{ item.title }}</h4>\n <span class=\"timeline-time\">{{ item.startTime | date:'h:mm:ss.SSS a' }}</span>\n </div>\n\n <div class=\"timeline-subtitle\">{{ item.subtitle }}</div>\n\n @if (getAdditionalInfo()) {\n <div class=\"timeline-additional-info\">\n {{ getAdditionalInfo() }}\n </div>\n }\n\n @if (SkillInvocations.length > 0) {\n <div class=\"timeline-skills\">\n @for (inv of SkillInvocations; track inv.SkillID) {\n <span class=\"skill-chip\" [attr.data-activation]=\"inv.ActivationType\" [title]=\"GetSkillChipTooltip(inv)\">\n <i class=\"fas fa-wand-magic-sparkles\"></i>\n {{ inv.SkillName }}\n <span class=\"skill-chip-mode\">{{ inv.ActivationType === 'requested' ? 'user' : 'auto' }}</span>\n </span>\n }\n </div>\n }\n\n <div class=\"timeline-meta\">\n @if (item.duration) {\n <span class=\"duration\">\n <i class=\"fas fa-clock\"></i> {{ item.duration }}\n </span>\n }\n <span class=\"status\" [attr.data-status]=\"item.status\">\n <i class=\"fas\" [ngClass]=\"getStatusIcon(item.status)\"></i>\n {{ item.status }}\n </span>\n </div>\n </div>\n\n <!-- Timeline Actions -->\n <div class=\"timeline-actions\">\n @if (canNavigateToEntity) {\n <button class=\"btn-link\"\n (click)=\"navigateToRecord($event)\"\n [title]=\"entityNavigationText\">\n <i class=\"fas fa-external-link-alt\"></i>\n <span class=\"action-text\">{{ entityNavigationText }}</span>\n </button>\n }\n </div>\n</div>"]}
|
|
1
|
+
{"version":3,"file":"ai-agent-run-step-node.component.js","sourceRoot":"","sources":["../../../../src/lib/custom/ai-agent-run/ai-agent-run-step-node.component.ts","../../../../src/lib/custom/ai-agent-run/ai-agent-run-step-node.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;;;;;;ICUnE,kCAEyC;IADvC,qMAAS,iCAA0B,KAAC;IAEpC,wBAE8C;IAChD,iBAAS;;;;IAFL,cAA2C;IAC7C,AADE,2DAA2C,2CACJ;;;;IAOzC,+BAIkC;IAAhC,kMAAS,0BAAmB,KAAC;IAJ/B,iBAIkC;;;IAFhC,AADA,2DAAoB,0BACF;;;IAKpB,uBAAyC;;;IAA1B,0CAAqB;;;IASlC,+BAA4B;IAAA,YAA2C;;IAAA,iBAAO;;;IAAlD,cAA2C;IAA3C,kFAA2C;;;IAEvE,+BAAkF;IAAA,sBAAO;IAAA,iBAAO;;;IAOlG,+BAAsC;IACpC,YACF;IAAA,iBAAM;;;IADJ,cACF;IADE,2DACF;;;IAMI,gCAAwG;IACtG,wBAA0C;IAC1C,YACA;IAAA,gCA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kBACN,MAAM;;kBACN,MAAM;;kFALI,2BAA2B","sourcesContent":["import { Component, Input, Output, EventEmitter } from '@angular/core';\nimport { MJAIAgentRunStepEntity_AgentSkillInvocation } from '@memberjunction/core-entities';\nimport { TimelineItem } from './ai-agent-run-timeline.component';\n\n@Component({\n standalone: false,\n selector: 'mj-ai-agent-run-step-node',\n templateUrl: './ai-agent-run-step-node.component.html',\n styleUrls: ['./ai-agent-run-step-node.component.css']\n})\nexport class AIAgentRunStepNodeComponent {\n @Input() item!: TimelineItem;\n @Input() isSelected = false;\n @Output() itemClick = new EventEmitter<TimelineItem>();\n @Output() expandToggle = new EventEmitter<Event>();\n @Output() navigateToEntity = new EventEmitter<{ entityName: string; recordId: string }>();\n\n get hasChildren(): boolean {\n return !!this.item.children && this.item.children.length > 0;\n }\n\n get isSubAgent(): boolean {\n // A TaskGraph step expands too: it stands in for a whole graph of Task rows, and without the\n // affordance the run stops at \"Task Graph: X\" with no way to see what actually ran.\n return this.item.type === 'subrun' ||\n (this.item.type === 'step' && (this.item.data?.StepType === 'Sub-Agent' || this.item.data?.StepType === 'TaskGraph'));\n }\n\n get isParentStep(): boolean {\n // STRUCTURAL, not type-gated. Anything holding children can be opened — a loop's iterations, a\n // workflow's steps, a nested run. The old test required `type === 'step'`, so a ForEach that\n // came from a task graph rendered its children into the model and then offered no way to reach\n // them: the work existed, was loaded, and was unreachable.\n return !this.isSubAgent && this.hasChildren;\n }\n\n get canExpand(): boolean {\n // Can expand if it's a sub-agent OR if it's a parent step with children\n return this.isSubAgent || this.isParentStep;\n }\n\n get canNavigateToEntity(): boolean {\n // For steps, check if it's a type that has a target and if TargetLogID exists\n if (this.item.type === 'step' && this.item.data) {\n const stepType = this.item.data.StepType;\n return (stepType === 'Actions' || stepType === 'Prompt' || stepType === 'Sub-Agent') \n && !!this.item.data.TargetLogID;\n }\n return false;\n }\n\n get entityNavigationText(): string {\n // For step types, check the StepType\n if (this.item.type === 'step' && this.item.data) {\n const stepType = this.item.data.StepType;\n switch (stepType.trim().toLowerCase()) {\n case 'actions':\n return 'View Action Log';\n case 'prompt':\n return 'View Prompt Run';\n case 'sub-agent':\n return 'View Agent Run';\n case 'taskgraph':\n return 'View Workflow Run';\n default:\n return 'View Details';\n }\n }\n\n return \"\";\n }\n\n /**\n * The glyph beside a row's status word.\n *\n * Covers BOTH status vocabularies' worth of meaning, because this list used to know only what an\n * `AIAgentRunStep` can be — `Running / Completed / Failed / Cancelled / Paused`. A workflow step is\n * `Pending`, `Skipped` or `Blocked` (and says `Complete`, not `Completed`), so every row belonging\n * to a task graph fell through to the unknown glyph and rendered a question mark. The projection\n * now normalizes the two vocabularies into one; these are the values it can produce.\n */\n getStatusIcon(status: string): string {\n const iconMap: Record<string, string> = {\n 'Running': 'fa-circle-notch fa-spin',\n 'Completed': 'fa-check-circle',\n 'Failed': 'fa-times-circle',\n 'Cancelled': 'fa-ban',\n 'Paused': 'fa-pause-circle',\n // A branch the workflow did not take. Not a failure and not a pause — deliberately its own\n // glyph, because reading it as either sends someone hunting for a problem that never happened.\n 'Skipped': 'fa-diamond-turn-right',\n 'Pending': 'fa-hourglass-half',\n // Failure-driven unsatisfiability: something upstream broke and this can no longer run.\n 'Blocked': 'fa-circle-exclamation',\n 'Waiting': 'fa-user-clock'\n };\n return iconMap[status] || 'fa-question-circle';\n }\n\n handleClick() {\n this.itemClick.emit(this.item);\n }\n\n handleExpandToggle(event: Event) {\n if (this.canExpand) {\n this.expandToggle.emit(event);\n }\n }\n\n navigateToRecord(event: Event) {\n event.stopPropagation();\n \n if (!this.canNavigateToEntity) return;\n\n let entityName = '';\n let recordId = '';\n\n // For step types, use TargetLogID and determine entity based on StepType\n if (this.item.type === 'step' && this.item.data) {\n recordId = this.item.data.TargetLogID;\n const stepType = this.item.data.StepType;\n \n switch (stepType.trim().toLowerCase()) {\n case 'actions':\n entityName = 'MJ: Action Execution Logs';\n break;\n case 'prompt':\n entityName = 'MJ: AI Prompt Runs';\n break;\n case 'sub-agent':\n entityName = 'MJ: AI Agent Runs';\n break;\n }\n } else {\n // For direct types, use the item ID\n recordId = this.item.id;\n \n switch (this.item.type.trim().toLowerCase()) {\n case 'actions':\n entityName = 'MJ: Action Execution Logs';\n break;\n case 'prompt':\n entityName = 'MJ: AI Prompt Runs';\n break;\n case 'sub-agent':\n entityName = 'MJ: AI Agent Runs';\n break;\n }\n }\n\n if (entityName && recordId) {\n this.navigateToEntity.emit({ entityName, recordId });\n }\n }\n\n /**\n * Skill-invocation records associated with this step (parsed from `AIAgentRunStep.Skills`).\n * Non-empty on Skill steps (the activation performed), Prompt steps (skills in effect for\n * the turn), and Actions/Sub-Agent steps whose tool was granted by a skill rather than a\n * native agent grant.\n */\n get SkillInvocations(): MJAIAgentRunStepEntity_AgentSkillInvocation[] {\n const raw = this.item.type === 'step' ? this.item.data?.Skills : null;\n if (!raw) return [];\n try {\n const parsed = typeof raw === 'string' ? JSON.parse(raw) : raw;\n return Array.isArray(parsed) ? parsed : [];\n } catch {\n return [];\n }\n }\n\n /** Tooltip summarizing an invocation's provenance for the badge hover. */\n public GetSkillChipTooltip(inv: MJAIAgentRunStepEntity_AgentSkillInvocation): string {\n const who = inv.ActivationType === 'requested' ? 'requested by the user (/skill mention)' : 'self-activated by the agent';\n const reason = inv.Reason ? ` — ${inv.Reason}` : '';\n return `${inv.SkillName}: ${who}${reason}`;\n }\n\n getAdditionalInfo(): string {\n if (this.item.type === 'step' && this.item.data) {\n const step = this.item.data;\n const parts = [];\n\n if (step.TargetActionName) {\n parts.push(`Action: ${step.TargetActionName}`);\n }\n if (step.Error) {\n parts.push('Error occurred');\n }\n\n return parts.join(' • ');\n }\n\n if (this.item.type === 'action' && this.item.data) {\n const log = this.item.data;\n if (log.Message) {\n return log.Message.substring(0, 100) + (log.Message.length > 100 ? '...' : '');\n }\n }\n\n return '';\n }\n\n onLogoError(event: Event): void {\n // Hide the broken image and show the icon instead by clearing logoUrl\n const imgElement = event.target as HTMLImageElement;\n imgElement.style.display = 'none';\n this.item.logoUrl = undefined;\n }\n}","<div class=\"timeline-item\"\n [class.selected]=\"isSelected\"\n [attr.data-status]=\"item.status\"\n [attr.data-type]=\"item.type\"\n [attr.data-provenance]=\"item.provenance\"\n [style.margin-left.px]=\"item.level * 24\"\n (click)=\"handleClick()\">\n\n <!-- Expand/Collapse Button for Sub-Agents and Parent Steps -->\n @if (canExpand) {\n <button class=\"expand-toggle\"\n (click)=\"handleExpandToggle($event)\"\n [attr.aria-expanded]=\"item.isExpanded\">\n <i class=\"fas\"\n [class.fa-chevron-right]=\"!item.isExpanded\"\n [class.fa-chevron-down]=\"item.isExpanded\"></i>\n </button>\n }\n\n <!-- Timeline Marker -->\n <div class=\"timeline-marker\" [attr.data-color]=\"item.color\">\n @if (item.logoUrl) {\n <img\n [src]=\"item.logoUrl\"\n [alt]=\"item.title\"\n class=\"timeline-marker-logo\"\n (error)=\"onLogoError($event)\" />\n }\n @if (!item.logoUrl) {\n <i class=\"fas\" [ngClass]=\"item.icon\"></i>\n }\n </div>\n\n <!-- Timeline Content -->\n <div class=\"timeline-content\">\n <div class=\"timeline-header\">\n <h4>{{ item.title }}</h4>\n @if (item.startTime) {\n <span class=\"timeline-time\">{{ item.startTime | date:'h:mm:ss.SSS a' }}</span>\n } @else {\n <span class=\"timeline-time timeline-time--none\" title=\"This step has not started\">—</span>\n }\n </div>\n\n <div class=\"timeline-subtitle\">{{ item.subtitle }}</div>\n\n @if (getAdditionalInfo()) {\n <div class=\"timeline-additional-info\">\n {{ getAdditionalInfo() }}\n </div>\n }\n\n @if (SkillInvocations.length > 0) {\n <div class=\"timeline-skills\">\n @for (inv of SkillInvocations; track inv.SkillID) {\n <span class=\"skill-chip\" [attr.data-activation]=\"inv.ActivationType\" [title]=\"GetSkillChipTooltip(inv)\">\n <i class=\"fas fa-wand-magic-sparkles\"></i>\n {{ inv.SkillName }}\n <span class=\"skill-chip-mode\">{{ inv.ActivationType === 'requested' ? 'user' : 'auto' }}</span>\n </span>\n }\n </div>\n }\n\n <div class=\"timeline-meta\">\n @if (item.duration) {\n <span class=\"duration\">\n <i class=\"fas fa-clock\"></i> {{ item.duration }}\n </span>\n }\n <span class=\"status\" [attr.data-status]=\"item.status\">\n <i class=\"fas\" [ngClass]=\"getStatusIcon(item.status)\"></i>\n {{ item.status }}\n </span>\n </div>\n </div>\n\n <!-- Timeline Actions -->\n <div class=\"timeline-actions\">\n @if (canNavigateToEntity) {\n <button class=\"btn-link\"\n (click)=\"navigateToRecord($event)\"\n [title]=\"entityNavigationText\">\n <i class=\"fas fa-external-link-alt\"></i>\n <span class=\"action-text\">{{ entityNavigationText }}</span>\n </button>\n }\n </div>\n</div>"]}
|
|
@@ -1,16 +1,40 @@
|
|
|
1
1
|
import { EventEmitter, OnInit, OnDestroy, ChangeDetectorRef } from '@angular/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { MJAIAgentRunEntity, MJAIAgentRunStepEntity, MJActionExecutionLogEntity, MJAIPromptRunEntity } from '@memberjunction/core-entities';
|
|
3
|
+
import { MJAIAgentRunEntity, MJAIAgentRunStepEntity, MJActionExecutionLogEntity, MJAIPromptRunEntity, MJTaskEntity } from '@memberjunction/core-entities';
|
|
4
4
|
import { AIAgentRunDataHelper } from './ai-agent-run-data.service';
|
|
5
5
|
import { BaseAngularComponent } from '@memberjunction/ng-base-types';
|
|
6
|
+
import { type AgentRunTreeNode } from '@memberjunction/ai-core-plus';
|
|
6
7
|
import * as i0 from "@angular/core";
|
|
7
8
|
export interface TimelineItem {
|
|
8
9
|
id: string;
|
|
9
|
-
|
|
10
|
+
/**
|
|
11
|
+
* What the row represents.
|
|
12
|
+
*
|
|
13
|
+
* `taskgraph` and `task` are dispatcher work — a graph that outlives the run that submitted it,
|
|
14
|
+
* and the steps inside it. They are rendered as ordinary rows rather than as an embedded diagram,
|
|
15
|
+
* and colour-coded so their provenance is visible without opening anything.
|
|
16
|
+
*/
|
|
17
|
+
type: 'step' | 'subrun' | 'action' | 'prompt' | 'taskgraph' | 'task';
|
|
18
|
+
/**
|
|
19
|
+
* Where this row's work ran, when that is not obvious from its type.
|
|
20
|
+
*
|
|
21
|
+
* `'workflow'` means it ran on the task-graph dispatcher and outlives the agent run that
|
|
22
|
+
* submitted it. Kept separate from `type` on purpose: a workflow step that runs an action IS an
|
|
23
|
+
* action and should render as one — provenance styles it, it does not redefine it.
|
|
24
|
+
*/
|
|
25
|
+
provenance?: 'workflow';
|
|
10
26
|
title: string;
|
|
11
27
|
subtitle: string;
|
|
12
28
|
status: string;
|
|
13
|
-
|
|
29
|
+
/**
|
|
30
|
+
* When this row started, or NULL when it has not.
|
|
31
|
+
*
|
|
32
|
+
* Nullable on purpose. A projection that needed "sorts last" once filled this with the maximum
|
|
33
|
+
* Date, and every unstarted row then displayed that sentinel as a real clock time — identical on
|
|
34
|
+
* every row and indistinguishable from data. Ordering belongs to whatever produced the rows; a row
|
|
35
|
+
* that has not run has no start time, and says so by having none.
|
|
36
|
+
*/
|
|
37
|
+
startTime: Date | null;
|
|
14
38
|
endTime?: Date;
|
|
15
39
|
duration?: string;
|
|
16
40
|
icon: string;
|
|
@@ -27,6 +51,14 @@ export interface TimelineItem {
|
|
|
27
51
|
export declare class AIAgentRunTimelineComponent extends BaseAngularComponent implements OnInit, OnDestroy {
|
|
28
52
|
private cdr;
|
|
29
53
|
aiAgentRunId: string;
|
|
54
|
+
/**
|
|
55
|
+
* The run's execution tree, loaded ONCE by the form and shared with every tab.
|
|
56
|
+
*
|
|
57
|
+
* Received rather than fetched: three tabs need the same structure, and letting each load its own
|
|
58
|
+
* issues the same recursive query three times AND lets the tabs disagree — a tab that loaded a
|
|
59
|
+
* second earlier shows a different run than the one beside it.
|
|
60
|
+
*/
|
|
61
|
+
RunTree: AgentRunTreeNode | null;
|
|
30
62
|
dataHelper: AIAgentRunDataHelper;
|
|
31
63
|
itemSelected: EventEmitter<TimelineItem>;
|
|
32
64
|
navigateToEntity: EventEmitter<{
|
|
@@ -42,6 +74,8 @@ export declare class AIAgentRunTimelineComponent extends BaseAngularComponent im
|
|
|
42
74
|
loading: boolean;
|
|
43
75
|
error: string | null;
|
|
44
76
|
selectedItem: TimelineItem | null;
|
|
77
|
+
/** Graph steps currently being expanded, so a second click cannot start a second load. */
|
|
78
|
+
private expandingGraphIDs;
|
|
45
79
|
constructor(cdr: ChangeDetectorRef);
|
|
46
80
|
ngOnInit(): Promise<void>;
|
|
47
81
|
ngOnDestroy(): void;
|
|
@@ -62,9 +96,44 @@ export declare class AIAgentRunTimelineComponent extends BaseAngularComponent im
|
|
|
62
96
|
/**
|
|
63
97
|
* TrackBy function for timeline items
|
|
64
98
|
*/
|
|
99
|
+
/**
|
|
100
|
+
* The graph a TaskGraph step submitted, read from the step's own output.
|
|
101
|
+
*
|
|
102
|
+
* `executeTasksStep` records `parentTaskID` there whether or not submission succeeded, because a
|
|
103
|
+
* rejected graph is the case where forensics matter most. A step with no id therefore means the
|
|
104
|
+
* graph never reached the dispatcher — a real state the caller renders differently, which is why
|
|
105
|
+
* this returns null rather than an empty string.
|
|
106
|
+
*/
|
|
107
|
+
GetGraphParentTaskID(item: TimelineItem): string | null;
|
|
108
|
+
/**
|
|
109
|
+
* A step inside the graph was selected.
|
|
110
|
+
*
|
|
111
|
+
* An Agent node carries the run it started, so selecting one offers the same navigation a
|
|
112
|
+
* Sub-Agent step already does — that link is the seam between the two views, and without it a
|
|
113
|
+
* dispatched sub-agent run is unreachable from the run that caused it.
|
|
114
|
+
*/
|
|
115
|
+
OnGraphNodeSelected(event: {
|
|
116
|
+
TaskID: string;
|
|
117
|
+
Task: MJTaskEntity | null;
|
|
118
|
+
}): void;
|
|
119
|
+
/**
|
|
120
|
+
* Expands a task-graph step into the graph's own steps, as ordinary timeline rows.
|
|
121
|
+
*
|
|
122
|
+
* **The graph's steps are steps.** They used to appear as an embedded canvas inside the list — a
|
|
123
|
+
* diagram wedged into a vertical column, in a different visual language from everything around it,
|
|
124
|
+
* and the only work in a run that could not be read, selected or navigated the same way as the
|
|
125
|
+
* rest. They are rows now, colour-coded so their provenance is obvious, with the canvas moved to
|
|
126
|
+
* the detail panel where edges have room to be seen.
|
|
127
|
+
*
|
|
128
|
+
* One query rather than a walk: the whole subtree arrives at once, so there is no
|
|
129
|
+
* "Loading sub-agent steps…" and no per-level round trip.
|
|
130
|
+
*/
|
|
131
|
+
ExpandTaskGraph(item: TimelineItem): Promise<void>;
|
|
132
|
+
/** True while a graph's steps are being fetched, so the row can say so. */
|
|
133
|
+
IsExpandingGraph(item: TimelineItem): boolean;
|
|
65
134
|
trackByItemId(index: number, item: TimelineItem): string;
|
|
66
135
|
createSubRunDataHelper(): AIAgentRunDataHelper;
|
|
67
136
|
static ɵfac: i0.ɵɵFactoryDeclaration<AIAgentRunTimelineComponent, never>;
|
|
68
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AIAgentRunTimelineComponent, "mj-ai-agent-run-timeline", never, { "aiAgentRunId": { "alias": "aiAgentRunId"; "required": false; }; "dataHelper": { "alias": "dataHelper"; "required": false; }; }, { "itemSelected": "itemSelected"; "navigateToEntity": "navigateToEntity"; }, never, never, false, never>;
|
|
137
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AIAgentRunTimelineComponent, "mj-ai-agent-run-timeline", never, { "aiAgentRunId": { "alias": "aiAgentRunId"; "required": false; }; "RunTree": { "alias": "RunTree"; "required": false; }; "dataHelper": { "alias": "dataHelper"; "required": false; }; }, { "itemSelected": "itemSelected"; "navigateToEntity": "navigateToEntity"; }, never, never, false, never>;
|
|
69
138
|
}
|
|
70
139
|
//# sourceMappingURL=ai-agent-run-timeline.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-agent-run-timeline.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/custom/ai-agent-run/ai-agent-run-timeline.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAAE,MAAM,EAAE,SAAS,EAA2B,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACtI,OAAO,EAAW,UAAU,EAAiB,MAAM,MAAM,CAAC;AAE1D,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"ai-agent-run-timeline.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/custom/ai-agent-run/ai-agent-run-timeline.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAAE,MAAM,EAAE,SAAS,EAA2B,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACtI,OAAO,EAAW,UAAU,EAAiB,MAAM,MAAM,CAAC;AAE1D,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC1J,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAInE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAyB,KAAK,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;;AAE5F,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX;;;;;;OAMG;IACH,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,WAAW,GAAG,MAAM,CAAC;IACrE;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf;;;;;;;OAOG;IACH,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IACvB,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,GAAG,CAA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B,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,MAAM;IAazD,UAAU,CAAC,IAAI,EAAE,YAAY;IAKvB,mBAAmB,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,KAAK;YAsB5C,oBAAoB;IAqClC,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK;IAK5C,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK;IAK/C,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK;IAK/C;;OAEG;IACH;;;;;;;OAOG;IACH,oBAAoB,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,GAAG,IAAI;IAYvD;;;;;;OAMG;IACH,mBAAmB,CAAC,KAAK,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,YAAY,GAAG,IAAI,CAAA;KAAE,GAAG,IAAI;IAW/E;;;;;;;;;;;OAWG;IACG,eAAe,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IA0BxD,2EAA2E;IAC3E,gBAAgB,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO;IAI7C,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,GAAG,MAAM;IAIxD,sBAAsB,IAAI,oBAAoB;yCAnanC,2BAA2B;2CAA3B,2BAA2B;CAuavC"}
|
|
@@ -5,6 +5,8 @@ import { AIAgentRunDataHelper } from './ai-agent-run-data.service';
|
|
|
5
5
|
import { AIEngineBase } from '@memberjunction/ai-engine-base';
|
|
6
6
|
import { UUIDsEqual } from '@memberjunction/global';
|
|
7
7
|
import { BaseAngularComponent } from '@memberjunction/ng-base-types';
|
|
8
|
+
import { FindAgentRunTreeNodes } from '@memberjunction/ai-core-plus';
|
|
9
|
+
import { ProjectRunTreeToTimeline } from './run-tree-timeline-projection';
|
|
8
10
|
import * as i0 from "@angular/core";
|
|
9
11
|
const _c0 = a0 => ({ $implicit: a0 });
|
|
10
12
|
function AIAgentRunTimelineComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
@@ -35,10 +37,35 @@ function AIAgentRunTimelineComponent_Conditional_2_Conditional_1_For_2_Condition
|
|
|
35
37
|
const recursiveSteps_r4 = i0.ɵɵreference(6);
|
|
36
38
|
i0.ɵɵproperty("ngTemplateOutlet", recursiveSteps_r4)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c0, item_r2.children));
|
|
37
39
|
} }
|
|
40
|
+
function AIAgentRunTimelineComponent_Conditional_2_Conditional_1_For_2_Conditional_1_Conditional_3_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
41
|
+
i0.ɵɵelementStart(0, "div", 8);
|
|
42
|
+
i0.ɵɵelement(1, "i", 11);
|
|
43
|
+
i0.ɵɵtext(2, " Loading workflow steps... ");
|
|
44
|
+
i0.ɵɵelementEnd();
|
|
45
|
+
} }
|
|
46
|
+
function AIAgentRunTimelineComponent_Conditional_2_Conditional_1_For_2_Conditional_1_Conditional_3_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
47
|
+
i0.ɵɵelementStart(0, "div", 9);
|
|
48
|
+
i0.ɵɵelement(1, "i", 12);
|
|
49
|
+
i0.ɵɵtext(2, " This workflow was recorded but never reached the dispatcher. ");
|
|
50
|
+
i0.ɵɵelementEnd();
|
|
51
|
+
} }
|
|
52
|
+
function AIAgentRunTimelineComponent_Conditional_2_Conditional_1_For_2_Conditional_1_Conditional_3_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
53
|
+
i0.ɵɵelementStart(0, "div", 9);
|
|
54
|
+
i0.ɵɵelement(1, "i", 12);
|
|
55
|
+
i0.ɵɵtext(2, " This workflow has no steps yet. ");
|
|
56
|
+
i0.ɵɵelementEnd();
|
|
57
|
+
} }
|
|
38
58
|
function AIAgentRunTimelineComponent_Conditional_2_Conditional_1_For_2_Conditional_1_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
59
|
+
i0.ɵɵconditionalCreate(0, AIAgentRunTimelineComponent_Conditional_2_Conditional_1_For_2_Conditional_1_Conditional_3_Conditional_0_Template, 3, 0, "div", 8)(1, AIAgentRunTimelineComponent_Conditional_2_Conditional_1_For_2_Conditional_1_Conditional_3_Conditional_1_Template, 3, 0, "div", 9)(2, AIAgentRunTimelineComponent_Conditional_2_Conditional_1_For_2_Conditional_1_Conditional_3_Conditional_2_Template, 3, 0, "div", 9);
|
|
60
|
+
} if (rf & 2) {
|
|
61
|
+
const item_r2 = i0.ɵɵnextContext(2).$implicit;
|
|
62
|
+
const ctx_r2 = i0.ɵɵnextContext(3);
|
|
63
|
+
i0.ɵɵconditional(ctx_r2.IsExpandingGraph(item_r2) ? 0 : !ctx_r2.GetGraphParentTaskID(item_r2) ? 1 : item_r2.childrenLoaded && item_r2.hasNoChildren ? 2 : -1);
|
|
64
|
+
} }
|
|
65
|
+
function AIAgentRunTimelineComponent_Conditional_2_Conditional_1_For_2_Conditional_1_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
39
66
|
const _r5 = i0.ɵɵgetCurrentView();
|
|
40
67
|
i0.ɵɵelementStart(0, "mj-ai-agent-run-timeline", 14);
|
|
41
|
-
i0.ɵɵlistener("itemSelected", function
|
|
68
|
+
i0.ɵɵlistener("itemSelected", function AIAgentRunTimelineComponent_Conditional_2_Conditional_1_For_2_Conditional_1_Conditional_4_Template_mj_ai_agent_run_timeline_itemSelected_0_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r2 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r2.selectItem($event)); })("navigateToEntity", function AIAgentRunTimelineComponent_Conditional_2_Conditional_1_For_2_Conditional_1_Conditional_4_Template_mj_ai_agent_run_timeline_navigateToEntity_0_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r2 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r2.navigateToEntity.emit($event)); });
|
|
42
69
|
i0.ɵɵelementEnd();
|
|
43
70
|
} if (rf & 2) {
|
|
44
71
|
const item_r2 = i0.ɵɵnextContext(2).$implicit;
|
|
@@ -49,7 +76,8 @@ function AIAgentRunTimelineComponent_Conditional_2_Conditional_1_For_2_Condition
|
|
|
49
76
|
i0.ɵɵconditionalCreate(0, AIAgentRunTimelineComponent_Conditional_2_Conditional_1_For_2_Conditional_1_Conditional_0_Template, 3, 0, "div", 8);
|
|
50
77
|
i0.ɵɵconditionalCreate(1, AIAgentRunTimelineComponent_Conditional_2_Conditional_1_For_2_Conditional_1_Conditional_1_Template, 3, 0, "div", 9);
|
|
51
78
|
i0.ɵɵconditionalCreate(2, AIAgentRunTimelineComponent_Conditional_2_Conditional_1_For_2_Conditional_1_Conditional_2_Template, 1, 4, "ng-container");
|
|
52
|
-
i0.ɵɵconditionalCreate(3, AIAgentRunTimelineComponent_Conditional_2_Conditional_1_For_2_Conditional_1_Conditional_3_Template,
|
|
79
|
+
i0.ɵɵconditionalCreate(3, AIAgentRunTimelineComponent_Conditional_2_Conditional_1_For_2_Conditional_1_Conditional_3_Template, 3, 1);
|
|
80
|
+
i0.ɵɵconditionalCreate(4, AIAgentRunTimelineComponent_Conditional_2_Conditional_1_For_2_Conditional_1_Conditional_4_Template, 1, 3, "mj-ai-agent-run-timeline", 10);
|
|
53
81
|
} if (rf & 2) {
|
|
54
82
|
const item_r2 = i0.ɵɵnextContext().$implicit;
|
|
55
83
|
i0.ɵɵconditional(item_r2.type === "step" && (item_r2.data == null ? null : item_r2.data.StepType) === "Sub-Agent" && !item_r2.childrenLoaded ? 0 : -1);
|
|
@@ -58,14 +86,16 @@ function AIAgentRunTimelineComponent_Conditional_2_Conditional_1_For_2_Condition
|
|
|
58
86
|
i0.ɵɵadvance();
|
|
59
87
|
i0.ɵɵconditional(item_r2.children && item_r2.children.length > 0 ? 2 : -1);
|
|
60
88
|
i0.ɵɵadvance();
|
|
61
|
-
i0.ɵɵconditional(item_r2.type === "
|
|
89
|
+
i0.ɵɵconditional(item_r2.type === "step" && (item_r2.data == null ? null : item_r2.data.StepType) === "TaskGraph" ? 3 : -1);
|
|
90
|
+
i0.ɵɵadvance();
|
|
91
|
+
i0.ɵɵconditional(item_r2.type === "subrun" && (item_r2.data == null ? null : item_r2.data.ID) ? 4 : -1);
|
|
62
92
|
} }
|
|
63
93
|
function AIAgentRunTimelineComponent_Conditional_2_Conditional_1_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
64
94
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
65
95
|
i0.ɵɵelementStart(0, "mj-ai-agent-run-step-node", 7);
|
|
66
96
|
i0.ɵɵlistener("itemClick", function AIAgentRunTimelineComponent_Conditional_2_Conditional_1_For_2_Template_mj_ai_agent_run_step_node_itemClick_0_listener() { const item_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.selectItem(item_r2)); })("expandToggle", function AIAgentRunTimelineComponent_Conditional_2_Conditional_1_For_2_Template_mj_ai_agent_run_step_node_expandToggle_0_listener($event) { const item_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.toggleItemExpansion(item_r2, $event)); })("navigateToEntity", function AIAgentRunTimelineComponent_Conditional_2_Conditional_1_For_2_Template_mj_ai_agent_run_step_node_navigateToEntity_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.navigateToEntity.emit($event)); });
|
|
67
97
|
i0.ɵɵelementEnd();
|
|
68
|
-
i0.ɵɵconditionalCreate(1, AIAgentRunTimelineComponent_Conditional_2_Conditional_1_For_2_Conditional_1_Template,
|
|
98
|
+
i0.ɵɵconditionalCreate(1, AIAgentRunTimelineComponent_Conditional_2_Conditional_1_For_2_Conditional_1_Template, 5, 5);
|
|
69
99
|
} if (rf & 2) {
|
|
70
100
|
const item_r2 = ctx.$implicit;
|
|
71
101
|
const ctx_r2 = i0.ɵɵnextContext(3);
|
|
@@ -142,12 +172,22 @@ export class AIAgentRunTimelineComponent extends BaseAngularComponent {
|
|
|
142
172
|
constructor(cdr) {
|
|
143
173
|
super();
|
|
144
174
|
this.cdr = cdr;
|
|
175
|
+
/**
|
|
176
|
+
* The run's execution tree, loaded ONCE by the form and shared with every tab.
|
|
177
|
+
*
|
|
178
|
+
* Received rather than fetched: three tabs need the same structure, and letting each load its own
|
|
179
|
+
* issues the same recursive query three times AND lets the tabs disagree — a tab that loaded a
|
|
180
|
+
* second earlier shows a different run than the one beside it.
|
|
181
|
+
*/
|
|
182
|
+
this.RunTree = null;
|
|
145
183
|
this.itemSelected = new EventEmitter();
|
|
146
184
|
this.navigateToEntity = new EventEmitter();
|
|
147
185
|
this.destroy$ = new Subject();
|
|
148
186
|
this.loading = true;
|
|
149
187
|
this.error = null;
|
|
150
188
|
this.selectedItem = null;
|
|
189
|
+
/** Graph steps currently being expanded, so a second click cannot start a second load. */
|
|
190
|
+
this.expandingGraphIDs = new Set();
|
|
151
191
|
}
|
|
152
192
|
async ngOnInit() {
|
|
153
193
|
// AIEngineBase is deferred at startup; ensure it's loaded before timeline
|
|
@@ -338,6 +378,11 @@ export class AIAgentRunTimelineComponent extends BaseAngularComponent {
|
|
|
338
378
|
if (item.isExpanded && !item.childrenLoaded && item.type === 'step' && item.data?.StepType === 'Sub-Agent') {
|
|
339
379
|
await this.loadSubAgentChildren(item);
|
|
340
380
|
}
|
|
381
|
+
// A TaskGraph step expands into the graph's own steps — one query for the whole subtree, so it
|
|
382
|
+
// never shows a per-level loading state the way the sub-agent path has to.
|
|
383
|
+
if (item.isExpanded && item.type === 'step' && item.data?.StepType === 'TaskGraph') {
|
|
384
|
+
await this.ExpandTaskGraph(item);
|
|
385
|
+
}
|
|
341
386
|
// For parent steps (loop containers like ForEach/While), children are already loaded via ParentID
|
|
342
387
|
// Just toggle - no additional loading needed since we already have all steps from the run
|
|
343
388
|
// The children were already attached in buildTimelineItems()
|
|
@@ -389,6 +434,85 @@ export class AIAgentRunTimelineComponent extends BaseAngularComponent {
|
|
|
389
434
|
/**
|
|
390
435
|
* TrackBy function for timeline items
|
|
391
436
|
*/
|
|
437
|
+
/**
|
|
438
|
+
* The graph a TaskGraph step submitted, read from the step's own output.
|
|
439
|
+
*
|
|
440
|
+
* `executeTasksStep` records `parentTaskID` there whether or not submission succeeded, because a
|
|
441
|
+
* rejected graph is the case where forensics matter most. A step with no id therefore means the
|
|
442
|
+
* graph never reached the dispatcher — a real state the caller renders differently, which is why
|
|
443
|
+
* this returns null rather than an empty string.
|
|
444
|
+
*/
|
|
445
|
+
GetGraphParentTaskID(item) {
|
|
446
|
+
const raw = item?.data?.OutputData;
|
|
447
|
+
if (!raw)
|
|
448
|
+
return null;
|
|
449
|
+
try {
|
|
450
|
+
const parsed = typeof raw === 'string' ? JSON.parse(raw) : raw;
|
|
451
|
+
const id = parsed?.parentTaskID;
|
|
452
|
+
return typeof id === 'string' && id.length > 0 ? id : null;
|
|
453
|
+
}
|
|
454
|
+
catch {
|
|
455
|
+
return null;
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* A step inside the graph was selected.
|
|
460
|
+
*
|
|
461
|
+
* An Agent node carries the run it started, so selecting one offers the same navigation a
|
|
462
|
+
* Sub-Agent step already does — that link is the seam between the two views, and without it a
|
|
463
|
+
* dispatched sub-agent run is unreachable from the run that caused it.
|
|
464
|
+
*/
|
|
465
|
+
OnGraphNodeSelected(event) {
|
|
466
|
+
const agentRunID = event.Task?.AgentRunID;
|
|
467
|
+
if (agentRunID) {
|
|
468
|
+
this.navigateToEntity.emit({ entityName: 'MJ: AI Agent Runs', recordId: agentRunID });
|
|
469
|
+
return;
|
|
470
|
+
}
|
|
471
|
+
if (event.Task?.ActionID) {
|
|
472
|
+
this.navigateToEntity.emit({ entityName: 'MJ: Tasks', recordId: event.TaskID });
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
/**
|
|
476
|
+
* Expands a task-graph step into the graph's own steps, as ordinary timeline rows.
|
|
477
|
+
*
|
|
478
|
+
* **The graph's steps are steps.** They used to appear as an embedded canvas inside the list — a
|
|
479
|
+
* diagram wedged into a vertical column, in a different visual language from everything around it,
|
|
480
|
+
* and the only work in a run that could not be read, selected or navigated the same way as the
|
|
481
|
+
* rest. They are rows now, colour-coded so their provenance is obvious, with the canvas moved to
|
|
482
|
+
* the detail panel where edges have room to be seen.
|
|
483
|
+
*
|
|
484
|
+
* One query rather than a walk: the whole subtree arrives at once, so there is no
|
|
485
|
+
* "Loading sub-agent steps…" and no per-level round trip.
|
|
486
|
+
*/
|
|
487
|
+
async ExpandTaskGraph(item) {
|
|
488
|
+
if (item.childrenLoaded || this.expandingGraphIDs.has(item.id))
|
|
489
|
+
return;
|
|
490
|
+
this.expandingGraphIDs.add(item.id);
|
|
491
|
+
this.cdr.markForCheck();
|
|
492
|
+
try {
|
|
493
|
+
if (!this.RunTree) {
|
|
494
|
+
this.error = 'The run tree is not loaded yet, so this workflow cannot be expanded.';
|
|
495
|
+
return;
|
|
496
|
+
}
|
|
497
|
+
// The graph hangs off THIS step in the tree, so the subtree to splice in is the node whose id
|
|
498
|
+
// matches the step — not the whole run, which is already on screen above it.
|
|
499
|
+
const stepNode = FindAgentRunTreeNodes(this.RunTree, (n) => n.NodeID === item.id)[0] ?? null;
|
|
500
|
+
item.children = ProjectRunTreeToTimeline(stepNode, item.level + 1, true);
|
|
501
|
+
item.childrenLoaded = true;
|
|
502
|
+
item.hasNoChildren = item.children.length === 0;
|
|
503
|
+
}
|
|
504
|
+
catch (e) {
|
|
505
|
+
this.error = e instanceof Error ? e.message : String(e);
|
|
506
|
+
}
|
|
507
|
+
finally {
|
|
508
|
+
this.expandingGraphIDs.delete(item.id);
|
|
509
|
+
this.cdr.markForCheck();
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
/** True while a graph's steps are being fetched, so the row can say so. */
|
|
513
|
+
IsExpandingGraph(item) {
|
|
514
|
+
return this.expandingGraphIDs.has(item.id);
|
|
515
|
+
}
|
|
392
516
|
trackByItemId(index, item) {
|
|
393
517
|
return item.id;
|
|
394
518
|
}
|
|
@@ -397,7 +521,7 @@ export class AIAgentRunTimelineComponent extends BaseAngularComponent {
|
|
|
397
521
|
return new AIAgentRunDataHelper();
|
|
398
522
|
}
|
|
399
523
|
static { this.ɵfac = function AIAgentRunTimelineComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || AIAgentRunTimelineComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); }; }
|
|
400
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AIAgentRunTimelineComponent, selectors: [["mj-ai-agent-run-timeline"]], inputs: { aiAgentRunId: "aiAgentRunId", 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) {
|
|
524
|
+
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) {
|
|
401
525
|
i0.ɵɵconditionalCreate(0, AIAgentRunTimelineComponent_Conditional_0_Template, 2, 0, "div", 1);
|
|
402
526
|
i0.ɵɵpipe(1, "async");
|
|
403
527
|
i0.ɵɵconditionalBranchCreate(2, AIAgentRunTimelineComponent_Conditional_2_Template, 3, 2, "div", 2)(3, AIAgentRunTimelineComponent_Conditional_3_Template, 2, 0, "div", 1);
|
|
@@ -412,9 +536,11 @@ export class AIAgentRunTimelineComponent extends BaseAngularComponent {
|
|
|
412
536
|
}
|
|
413
537
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AIAgentRunTimelineComponent, [{
|
|
414
538
|
type: Component,
|
|
415
|
-
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 <!-- 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}"] }]
|
|
539
|
+
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}"] }]
|
|
416
540
|
}], () => [{ type: i0.ChangeDetectorRef }], { aiAgentRunId: [{
|
|
417
541
|
type: Input
|
|
542
|
+
}], RunTree: [{
|
|
543
|
+
type: Input
|
|
418
544
|
}], dataHelper: [{
|
|
419
545
|
type: Input
|
|
420
546
|
}], itemSelected: [{
|
|
@@ -422,5 +548,5 @@ export class AIAgentRunTimelineComponent extends BaseAngularComponent {
|
|
|
422
548
|
}], navigateToEntity: [{
|
|
423
549
|
type: Output
|
|
424
550
|
}] }); })();
|
|
425
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(AIAgentRunTimelineComponent, { className: "AIAgentRunTimelineComponent", filePath: "src/lib/custom/ai-agent-run/ai-agent-run-timeline.component.ts", lineNumber:
|
|
551
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(AIAgentRunTimelineComponent, { className: "AIAgentRunTimelineComponent", filePath: "src/lib/custom/ai-agent-run/ai-agent-run-timeline.component.ts", lineNumber: 63 }); })();
|
|
426
552
|
//# sourceMappingURL=ai-agent-run-timeline.component.js.map
|