@memberjunction/ng-core-entity-forms 2.70.0 → 2.72.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/dist/lib/custom/AIAgents/add-action-dialog.component.d.ts +65 -0
  2. package/dist/lib/custom/AIAgents/add-action-dialog.component.d.ts.map +1 -0
  3. package/dist/lib/custom/AIAgents/add-action-dialog.component.js +578 -0
  4. package/dist/lib/custom/AIAgents/add-action-dialog.component.js.map +1 -0
  5. package/dist/lib/custom/AIAgents/agent-advanced-settings-dialog.component.d.ts +1 -0
  6. package/dist/lib/custom/AIAgents/agent-advanced-settings-dialog.component.d.ts.map +1 -0
  7. package/dist/lib/custom/AIAgents/agent-advanced-settings-dialog.component.js +282 -0
  8. package/dist/lib/custom/AIAgents/agent-advanced-settings-dialog.component.js.map +1 -0
  9. package/dist/lib/custom/AIAgents/agent-prompt-advanced-settings-dialog.component.d.ts +58 -0
  10. package/dist/lib/custom/AIAgents/agent-prompt-advanced-settings-dialog.component.d.ts.map +1 -0
  11. package/dist/lib/custom/AIAgents/agent-prompt-advanced-settings-dialog.component.js +400 -0
  12. package/dist/lib/custom/AIAgents/agent-prompt-advanced-settings-dialog.component.js.map +1 -0
  13. package/dist/lib/custom/AIAgents/ai-agent-form.component.d.ts +119 -23
  14. package/dist/lib/custom/AIAgents/ai-agent-form.component.d.ts.map +1 -1
  15. package/dist/lib/custom/AIAgents/ai-agent-form.component.js +1815 -924
  16. package/dist/lib/custom/AIAgents/ai-agent-form.component.js.map +1 -1
  17. package/dist/lib/custom/AIAgents/ai-agent-management.service.d.ts +159 -0
  18. package/dist/lib/custom/AIAgents/ai-agent-management.service.d.ts.map +1 -0
  19. package/dist/lib/custom/AIAgents/ai-agent-management.service.js +315 -0
  20. package/dist/lib/custom/AIAgents/ai-agent-management.service.js.map +1 -0
  21. package/dist/lib/custom/AIAgents/create-prompt-dialog.component.d.ts +67 -0
  22. package/dist/lib/custom/AIAgents/create-prompt-dialog.component.d.ts.map +1 -0
  23. package/dist/lib/custom/AIAgents/create-prompt-dialog.component.js +463 -0
  24. package/dist/lib/custom/AIAgents/create-prompt-dialog.component.js.map +1 -0
  25. package/dist/lib/custom/AIAgents/create-sub-agent-dialog.component.d.ts +82 -0
  26. package/dist/lib/custom/AIAgents/create-sub-agent-dialog.component.d.ts.map +1 -0
  27. package/dist/lib/custom/AIAgents/create-sub-agent-dialog.component.js +708 -0
  28. package/dist/lib/custom/AIAgents/create-sub-agent-dialog.component.js.map +1 -0
  29. package/dist/lib/custom/AIAgents/new-agent-dialog.component.js +2 -2
  30. package/dist/lib/custom/AIAgents/prompt-selector-dialog.component.d.ts +65 -0
  31. package/dist/lib/custom/AIAgents/prompt-selector-dialog.component.d.ts.map +1 -0
  32. package/dist/lib/custom/AIAgents/prompt-selector-dialog.component.js +379 -0
  33. package/dist/lib/custom/AIAgents/prompt-selector-dialog.component.js.map +1 -0
  34. package/dist/lib/custom/AIAgents/sub-agent-advanced-settings-dialog.component.d.ts +58 -0
  35. package/dist/lib/custom/AIAgents/sub-agent-advanced-settings-dialog.component.d.ts.map +1 -0
  36. package/dist/lib/custom/AIAgents/sub-agent-advanced-settings-dialog.component.js +373 -0
  37. package/dist/lib/custom/AIAgents/sub-agent-advanced-settings-dialog.component.js.map +1 -0
  38. package/dist/lib/custom/AIAgents/sub-agent-selector-dialog.component.d.ts +61 -0
  39. package/dist/lib/custom/AIAgents/sub-agent-selector-dialog.component.d.ts.map +1 -0
  40. package/dist/lib/custom/AIAgents/sub-agent-selector-dialog.component.js +459 -0
  41. package/dist/lib/custom/AIAgents/sub-agent-selector-dialog.component.js.map +1 -0
  42. package/dist/lib/custom/AIPrompts/ai-prompt-form.component.d.ts +90 -10
  43. package/dist/lib/custom/AIPrompts/ai-prompt-form.component.d.ts.map +1 -1
  44. package/dist/lib/custom/AIPrompts/ai-prompt-form.component.js +1159 -687
  45. package/dist/lib/custom/AIPrompts/ai-prompt-form.component.js.map +1 -1
  46. package/dist/lib/custom/AIPrompts/ai-prompt-management.service.d.ts +27 -0
  47. package/dist/lib/custom/AIPrompts/ai-prompt-management.service.d.ts.map +1 -0
  48. package/dist/lib/custom/AIPrompts/ai-prompt-management.service.js +88 -0
  49. package/dist/lib/custom/AIPrompts/ai-prompt-management.service.js.map +1 -0
  50. package/dist/lib/custom/AIPrompts/template-selector-dialog.component.d.ts +69 -0
  51. package/dist/lib/custom/AIPrompts/template-selector-dialog.component.d.ts.map +1 -0
  52. package/dist/lib/custom/AIPrompts/template-selector-dialog.component.js +442 -0
  53. package/dist/lib/custom/AIPrompts/template-selector-dialog.component.js.map +1 -0
  54. package/dist/lib/custom/ai-agent-run/ai-agent-run.component.js +2 -2
  55. package/dist/lib/custom/ai-agent-run/ai-agent-run.component.js.map +1 -1
  56. package/dist/lib/custom/custom-forms.module.d.ts +40 -33
  57. package/dist/lib/custom/custom-forms.module.d.ts.map +1 -1
  58. package/dist/lib/custom/custom-forms.module.js +26 -2
  59. package/dist/lib/custom/custom-forms.module.js.map +1 -1
  60. package/dist/lib/generated/Entities/AIAgent/sections/details.component.d.ts.map +1 -1
  61. package/dist/lib/generated/Entities/AIAgent/sections/details.component.js +22 -4
  62. package/dist/lib/generated/Entities/AIAgent/sections/details.component.js.map +1 -1
  63. package/dist/lib/shared/components/template-editor.component.d.ts +8 -2
  64. package/dist/lib/shared/components/template-editor.component.d.ts.map +1 -1
  65. package/dist/lib/shared/components/template-editor.component.js +58 -23
  66. package/dist/lib/shared/components/template-editor.component.js.map +1 -1
  67. package/package.json +16 -16
@@ -10,23 +10,22 @@ import { BaseFormComponent } from '@memberjunction/ng-base-forms';
10
10
  import { CompositeKey, Metadata, RunView } from '@memberjunction/core';
11
11
  import { MJNotificationService } from '@memberjunction/ng-notifications';
12
12
  import { AIAgentFormComponent } from '../../generated/Entities/AIAgent/aiagent.form.component';
13
- import { EntitySelectorDialogComponent } from '../shared/entity-selector-dialog.component';
13
+ import { firstValueFrom } from 'rxjs';
14
14
  import * as i0 from "@angular/core";
15
15
  import * as i1 from "@memberjunction/ng-shared";
16
16
  import * as i2 from "@angular/router";
17
17
  import * as i3 from "@progress/kendo-angular-dialog";
18
- import * as i4 from "./new-agent-dialog.service";
19
- import * as i5 from "@memberjunction/ng-action-gallery";
20
- import * as i6 from "@memberjunction/ng-ai-test-harness";
21
- import * as i7 from "@angular/common";
22
- import * as i8 from "@angular/forms";
23
- import * as i9 from "@progress/kendo-angular-layout";
24
- import * as i10 from "@progress/kendo-angular-inputs";
25
- import * as i11 from "@progress/kendo-angular-dropdowns";
26
- import * as i12 from "@progress/kendo-angular-buttons";
27
- import * as i13 from "@memberjunction/ng-base-forms";
28
- import * as i14 from "@memberjunction/ng-form-toolbar";
29
- import * as i15 from "@memberjunction/ng-code-editor";
18
+ import * as i4 from "./ai-agent-management.service";
19
+ import * as i5 from "@memberjunction/ng-ai-test-harness";
20
+ import * as i6 from "@angular/common";
21
+ import * as i7 from "@angular/forms";
22
+ import * as i8 from "@progress/kendo-angular-layout";
23
+ import * as i9 from "@progress/kendo-angular-inputs";
24
+ import * as i10 from "@progress/kendo-angular-dropdowns";
25
+ import * as i11 from "@progress/kendo-angular-buttons";
26
+ import * as i12 from "@memberjunction/ng-base-forms";
27
+ import * as i13 from "@memberjunction/ng-form-toolbar";
28
+ import * as i14 from "@memberjunction/ng-code-editor";
30
29
  const _forTrack0 = ($index, $item) => $item.ID;
31
30
  function AIAgentFormComponentExtended_form_2_Conditional_7_Template(rf, ctx) { if (rf & 1) {
32
31
  i0.ɵɵelement(0, "img", 10);
@@ -108,227 +107,361 @@ function AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_1_Templa
108
107
  } if (rf & 2) {
109
108
  const ctx_r1 = i0.ɵɵnextContext(3);
110
109
  i0.ɵɵadvance();
111
- i0.ɵɵtextInterpolate1(" Execution History", ctx_r1.executionHistoryCount > 0 ? " (" + ctx_r1.executionHistoryCount + ")" : "", " ");
110
+ i0.ɵɵtextInterpolate1(" Actions", ctx_r1.actionCount > 0 ? " (" + ctx_r1.actionCount + ")" : "", " ");
111
+ } }
112
+ function AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Conditional_3_Template(rf, ctx) { if (rf & 1) {
113
+ const _r5 = i0.ɵɵgetCurrentView();
114
+ i0.ɵɵelementStart(0, "button", 40);
115
+ i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Conditional_3_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.configureActions()); });
116
+ i0.ɵɵelement(1, "i", 41);
117
+ i0.ɵɵtext(2, " Add Action ");
118
+ i0.ɵɵelementEnd();
119
+ } }
120
+ function AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Conditional_4_Conditional_6_Template(rf, ctx) { if (rf & 1) {
121
+ const _r6 = i0.ɵɵgetCurrentView();
122
+ i0.ɵɵelementStart(0, "button", 43);
123
+ i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Conditional_4_Conditional_6_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r6); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.configureActions()); });
124
+ i0.ɵɵelement(1, "i", 41);
125
+ i0.ɵɵtext(2, " Configure First Action ");
126
+ i0.ɵɵelementEnd();
112
127
  } }
113
128
  function AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Conditional_4_Template(rf, ctx) { if (rf & 1) {
114
- i0.ɵɵelementStart(0, "div", 37);
129
+ i0.ɵɵelementStart(0, "div", 38);
115
130
  i0.ɵɵelement(1, "i", 33);
116
131
  i0.ɵɵelementStart(2, "h4");
117
- i0.ɵɵtext(3, "No Execution History");
132
+ i0.ɵɵtext(3, "No Actions Configured");
118
133
  i0.ɵɵelementEnd();
119
134
  i0.ɵɵelementStart(4, "p");
120
- i0.ɵɵtext(5, "This agent hasn't been executed yet. Use the Test Agent button to run the agent and see execution history here.");
121
- i0.ɵɵelementEnd()();
135
+ i0.ɵɵtext(5, "Add actions to enable this agent to perform specific tasks and operations.");
136
+ i0.ɵɵelementEnd();
137
+ i0.ɵɵtemplate(6, AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Conditional_4_Conditional_6_Template, 3, 0, "button", 42);
138
+ i0.ɵɵelementEnd();
139
+ } if (rf & 2) {
140
+ const ctx_r1 = i0.ɵɵnextContext(4);
141
+ i0.ɵɵadvance(6);
142
+ i0.ɵɵconditional(ctx_r1.EditMode && ctx_r1.UserCanCreateActions ? 6 : -1);
122
143
  } }
123
- function AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Conditional_5_For_2_Conditional_16_Template(rf, ctx) { if (rf & 1) {
124
- i0.ɵɵelementStart(0, "span", 49);
125
- i0.ɵɵelement(1, "i", 55);
126
- i0.ɵɵtext(2);
144
+ function AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Conditional_5_For_2_Conditional_6_Template(rf, ctx) { if (rf & 1) {
145
+ i0.ɵɵelementStart(0, "div", 50);
146
+ i0.ɵɵtext(1);
127
147
  i0.ɵɵelementEnd();
128
148
  } if (rf & 2) {
129
- const execution_r6 = i0.ɵɵnextContext().$implicit;
130
- const ctx_r1 = i0.ɵɵnextContext(5);
131
- i0.ɵɵadvance(2);
132
- i0.ɵɵtextInterpolate1(" ", ctx_r1.formatExecutionTimeFromDates(execution_r6.StartedAt, execution_r6.CompletedAt), " ");
149
+ const action_r8 = i0.ɵɵnextContext().$implicit;
150
+ i0.ɵɵadvance();
151
+ i0.ɵɵtextInterpolate(action_r8.Description);
133
152
  } }
134
- function AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Conditional_5_For_2_Conditional_20_Template(rf, ctx) { if (rf & 1) {
135
- i0.ɵɵelementStart(0, "div", 53);
153
+ function AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Conditional_5_For_2_Conditional_8_Template(rf, ctx) { if (rf & 1) {
154
+ i0.ɵɵelementStart(0, "span", 52);
136
155
  i0.ɵɵtext(1);
137
156
  i0.ɵɵelementEnd();
138
157
  } if (rf & 2) {
139
- const execution_r6 = i0.ɵɵnextContext().$implicit;
140
- const ctx_r1 = i0.ɵɵnextContext(5);
158
+ const action_r8 = i0.ɵɵnextContext().$implicit;
141
159
  i0.ɵɵadvance();
142
- i0.ɵɵtextInterpolate(ctx_r1.getExecutionResultPreview(execution_r6, true));
160
+ i0.ɵɵtextInterpolate(action_r8.Type);
143
161
  } }
144
- function AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Conditional_5_For_2_Conditional_21_Conditional_1_Template(rf, ctx) { if (rf & 1) {
145
- i0.ɵɵelementStart(0, "div", 56)(1, "h5");
146
- i0.ɵɵtext(2, "Result");
162
+ function AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Conditional_5_For_2_Conditional_13_Template(rf, ctx) { if (rf & 1) {
163
+ const _r9 = i0.ɵɵgetCurrentView();
164
+ i0.ɵɵelementStart(0, "button", 58);
165
+ i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Conditional_5_For_2_Conditional_13_Template_button_click_0_listener($event) { i0.ɵɵrestoreView(_r9); const action_r8 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.removeAction(action_r8, $event)); });
166
+ i0.ɵɵelement(1, "i", 59);
167
+ i0.ɵɵelementEnd();
168
+ } }
169
+ function AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Conditional_5_For_2_Template(rf, ctx) { if (rf & 1) {
170
+ const _r7 = i0.ɵɵgetCurrentView();
171
+ i0.ɵɵelementStart(0, "div", 46);
172
+ i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Conditional_5_For_2_Template_div_click_0_listener() { const action_r8 = i0.ɵɵrestoreView(_r7).$implicit; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.navigateToEntity("Actions", action_r8.ID)); });
173
+ i0.ɵɵelementStart(1, "div", 47);
174
+ i0.ɵɵelement(2, "i");
147
175
  i0.ɵɵelementEnd();
148
- i0.ɵɵelement(3, "mj-code-editor", 62);
176
+ i0.ɵɵelementStart(3, "div", 48)(4, "div", 49);
177
+ i0.ɵɵtext(5);
149
178
  i0.ɵɵelementEnd();
179
+ i0.ɵɵtemplate(6, AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Conditional_5_For_2_Conditional_6_Template, 2, 1, "div", 50);
180
+ i0.ɵɵelementStart(7, "div", 51);
181
+ i0.ɵɵtemplate(8, AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Conditional_5_For_2_Conditional_8_Template, 2, 1, "span", 52);
182
+ i0.ɵɵelementStart(9, "span", 53);
183
+ i0.ɵɵelement(10, "i", 54);
184
+ i0.ɵɵtext(11);
185
+ i0.ɵɵelementEnd()()();
186
+ i0.ɵɵelementStart(12, "div", 55);
187
+ i0.ɵɵtemplate(13, AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Conditional_5_For_2_Conditional_13_Template, 2, 0, "button", 56);
188
+ i0.ɵɵelement(14, "i", 57);
189
+ i0.ɵɵelementEnd()();
150
190
  } if (rf & 2) {
151
- const execution_r6 = i0.ɵɵnextContext(2).$implicit;
191
+ const action_r8 = ctx.$implicit;
152
192
  const ctx_r1 = i0.ɵɵnextContext(5);
193
+ i0.ɵɵadvance(2);
194
+ i0.ɵɵclassMap(ctx_r1.getActionIcon(action_r8));
153
195
  i0.ɵɵadvance(3);
154
- i0.ɵɵproperty("value", ctx_r1.getExecutionResultPreview(execution_r6, false))("readonly", true)("lineWrapping", true);
196
+ i0.ɵɵtextInterpolate(action_r8.Name || "Untitled Action");
197
+ i0.ɵɵadvance();
198
+ i0.ɵɵconditional(action_r8.Description ? 6 : -1);
199
+ i0.ɵɵadvance(2);
200
+ i0.ɵɵconditional(action_r8.Type ? 8 : -1);
201
+ i0.ɵɵadvance();
202
+ i0.ɵɵclassProp("active", action_r8.Status === "Active")("inactive", action_r8.Status !== "Active");
203
+ i0.ɵɵadvance();
204
+ i0.ɵɵclassProp("fa-check-circle", action_r8.Status === "Active")("fa-times-circle", action_r8.Status !== "Active");
205
+ i0.ɵɵadvance();
206
+ i0.ɵɵtextInterpolate1(" ", action_r8.Status, " ");
207
+ i0.ɵɵadvance(2);
208
+ i0.ɵɵconditional(ctx_r1.EditMode && ctx_r1.UserCanDeleteActions ? 13 : -1);
155
209
  } }
156
- function AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Conditional_5_For_2_Conditional_21_Conditional_2_Template(rf, ctx) { if (rf & 1) {
157
- i0.ɵɵelementStart(0, "div", 57)(1, "h5");
158
- i0.ɵɵelement(2, "i", 63);
159
- i0.ɵɵtext(3, " Error");
160
- i0.ɵɵelementEnd();
161
- i0.ɵɵelementStart(4, "div", 64);
162
- i0.ɵɵtext(5);
210
+ function AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Conditional_5_Conditional_3_Template(rf, ctx) { if (rf & 1) {
211
+ const _r10 = i0.ɵɵgetCurrentView();
212
+ i0.ɵɵelementStart(0, "div", 60);
213
+ i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Conditional_5_Conditional_3_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r10); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.navigateToEntity("AI Agent Actions", "")); });
214
+ i0.ɵɵelementStart(1, "span");
215
+ i0.ɵɵtext(2);
163
216
  i0.ɵɵelementEnd()();
164
217
  } if (rf & 2) {
165
- const execution_r6 = i0.ɵɵnextContext(2).$implicit;
166
- i0.ɵɵadvance(5);
167
- i0.ɵɵtextInterpolate(execution_r6.ErrorMessage);
218
+ const ctx_r1 = i0.ɵɵnextContext(5);
219
+ i0.ɵɵadvance(2);
220
+ i0.ɵɵtextInterpolate1("View all ", ctx_r1.actionCount, " actions...");
168
221
  } }
169
- function AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Conditional_5_For_2_Conditional_21_Conditional_10_Template(rf, ctx) { if (rf & 1) {
170
- i0.ɵɵelementStart(0, "div", 59)(1, "span", 60);
171
- i0.ɵɵtext(2, "Completed:");
222
+ function AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Conditional_5_Template(rf, ctx) { if (rf & 1) {
223
+ i0.ɵɵelementStart(0, "div", 39);
224
+ i0.ɵɵrepeaterCreate(1, AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Conditional_5_For_2_Template, 15, 15, "div", 44, _forTrack0);
225
+ i0.ɵɵtemplate(3, AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Conditional_5_Conditional_3_Template, 3, 1, "div", 45);
172
226
  i0.ɵɵelementEnd();
173
- i0.ɵɵelementStart(3, "span", 61);
174
- i0.ɵɵtext(4);
175
- i0.ɵɵpipe(5, "date");
227
+ } if (rf & 2) {
228
+ const ctx_r1 = i0.ɵɵnextContext(4);
229
+ i0.ɵɵadvance();
230
+ i0.ɵɵrepeater(ctx_r1.agentActions);
231
+ i0.ɵɵadvance(2);
232
+ i0.ɵɵconditional(ctx_r1.actionCount > ctx_r1.agentActions.length ? 3 : -1);
233
+ } }
234
+ function AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Template(rf, ctx) { if (rf & 1) {
235
+ i0.ɵɵelementStart(0, "div", 34)(1, "div", 35)(2, "div", 36);
236
+ i0.ɵɵtemplate(3, AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Conditional_3_Template, 3, 0, "button", 37);
176
237
  i0.ɵɵelementEnd()();
238
+ i0.ɵɵtemplate(4, AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Conditional_4_Template, 7, 1, "div", 38)(5, AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Conditional_5_Template, 4, 1, "div", 39);
239
+ i0.ɵɵelementEnd();
177
240
  } if (rf & 2) {
178
- const execution_r6 = i0.ɵɵnextContext(2).$implicit;
179
- i0.ɵɵadvance(4);
180
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(5, 1, execution_r6.CompletedAt, "medium"));
241
+ const ctx_r1 = i0.ɵɵnextContext(3);
242
+ i0.ɵɵadvance(3);
243
+ i0.ɵɵconditional(ctx_r1.EditMode && ctx_r1.UserCanCreateActions ? 3 : -1);
244
+ i0.ɵɵadvance();
245
+ i0.ɵɵconditional(ctx_r1.actionCount === 0 ? 4 : 5);
181
246
  } }
182
- function AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Conditional_5_For_2_Conditional_21_Conditional_11_Template(rf, ctx) { if (rf & 1) {
183
- i0.ɵɵelementStart(0, "div", 59)(1, "span", 60);
184
- i0.ɵɵtext(2, "Conversation:");
247
+ function AIAgentFormComponentExtended_form_2_Conditional_22_Template(rf, ctx) { if (rf & 1) {
248
+ i0.ɵɵelementStart(0, "kendo-panelbar-item", 24);
249
+ i0.ɵɵtemplate(1, AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_1_Template, 2, 1, "ng-template", 25)(2, AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Template, 6, 2, "ng-template", 26);
185
250
  i0.ɵɵelementEnd();
186
- i0.ɵɵelementStart(3, "span", 61);
187
- i0.ɵɵtext(4);
188
- i0.ɵɵelementEnd()();
189
251
  } if (rf & 2) {
190
- const execution_r6 = i0.ɵɵnextContext(2).$implicit;
191
- i0.ɵɵadvance(4);
192
- i0.ɵɵtextInterpolate(execution_r6.ConversationID);
252
+ const ctx_r1 = i0.ɵɵnextContext(2);
253
+ i0.ɵɵproperty("expanded", ctx_r1.actionCount > 0);
193
254
  } }
194
- function AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Conditional_5_For_2_Conditional_21_Template(rf, ctx) { if (rf & 1) {
195
- i0.ɵɵelementStart(0, "div", 54);
196
- i0.ɵɵtemplate(1, AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Conditional_5_For_2_Conditional_21_Conditional_1_Template, 4, 3, "div", 56)(2, AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Conditional_5_For_2_Conditional_21_Conditional_2_Template, 6, 1, "div", 57);
197
- i0.ɵɵelementStart(3, "div", 58)(4, "div", 59)(5, "span", 60);
198
- i0.ɵɵtext(6, "Started:");
255
+ function AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_1_Template(rf, ctx) { if (rf & 1) {
256
+ i0.ɵɵelement(0, "i", 30);
257
+ i0.ɵɵtext(1);
258
+ } if (rf & 2) {
259
+ const ctx_r1 = i0.ɵɵnextContext(3);
260
+ i0.ɵɵadvance();
261
+ i0.ɵɵtextInterpolate1(" Sub-Agents", ctx_r1.subAgentCount > 0 ? " (" + ctx_r1.subAgentCount + ")" : "", " ");
262
+ } }
263
+ function AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_5_Template(rf, ctx) { if (rf & 1) {
264
+ const _r11 = i0.ɵɵgetCurrentView();
265
+ i0.ɵɵelementStart(0, "button", 40);
266
+ i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_5_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r11); const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.addSubAgents()); });
267
+ i0.ɵɵelement(1, "i", 41);
268
+ i0.ɵɵtext(2, " Add Subagent ");
269
+ i0.ɵɵelementEnd();
270
+ i0.ɵɵelementStart(3, "button", 62);
271
+ i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_5_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r11); const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.createSubAgent()); });
272
+ i0.ɵɵelement(4, "i", 41);
273
+ i0.ɵɵtext(5, " Create Sub-Agent ");
274
+ i0.ɵɵelementEnd();
275
+ } }
276
+ function AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_6_Conditional_6_Template(rf, ctx) { if (rf & 1) {
277
+ const _r12 = i0.ɵɵgetCurrentView();
278
+ i0.ɵɵelementStart(0, "button", 43);
279
+ i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_6_Conditional_6_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r12); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.addSubAgents()); });
280
+ i0.ɵɵelement(1, "i", 41);
281
+ i0.ɵɵtext(2, " Add Subagent ");
282
+ i0.ɵɵelementEnd();
283
+ i0.ɵɵelementStart(3, "button", 63);
284
+ i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_6_Conditional_6_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r12); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.createSubAgent()); });
285
+ i0.ɵɵelement(4, "i", 41);
286
+ i0.ɵɵtext(5, " Create First Sub-Agent ");
287
+ i0.ɵɵelementEnd();
288
+ } }
289
+ function AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_6_Template(rf, ctx) { if (rf & 1) {
290
+ i0.ɵɵelementStart(0, "div", 38);
291
+ i0.ɵɵelement(1, "i", 30);
292
+ i0.ɵɵelementStart(2, "h4");
293
+ i0.ɵɵtext(3, "No Sub-Agents");
294
+ i0.ɵɵelementEnd();
295
+ i0.ɵɵelementStart(4, "p");
296
+ i0.ɵɵtext(5, "Create sub-agents to build a hierarchical structure for complex workflows.");
297
+ i0.ɵɵelementEnd();
298
+ i0.ɵɵtemplate(6, AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_6_Conditional_6_Template, 6, 0);
299
+ i0.ɵɵelementEnd();
300
+ } if (rf & 2) {
301
+ const ctx_r1 = i0.ɵɵnextContext(4);
302
+ i0.ɵɵadvance(6);
303
+ i0.ɵɵconditional(ctx_r1.EditMode && ctx_r1.UserCanCreateSubAgents ? 6 : -1);
304
+ } }
305
+ function AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_7_For_2_Conditional_2_Template(rf, ctx) { if (rf & 1) {
306
+ i0.ɵɵelement(0, "img", 66);
307
+ } if (rf & 2) {
308
+ const subAgent_r14 = i0.ɵɵnextContext().$implicit;
309
+ i0.ɵɵproperty("src", subAgent_r14.LogoURL, i0.ɵɵsanitizeUrl)("alt", subAgent_r14.Name + " logo");
310
+ } }
311
+ function AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_7_For_2_Conditional_3_Template(rf, ctx) { if (rf & 1) {
312
+ i0.ɵɵelement(0, "i");
313
+ } if (rf & 2) {
314
+ const subAgent_r14 = i0.ɵɵnextContext().$implicit;
315
+ const ctx_r1 = i0.ɵɵnextContext(5);
316
+ i0.ɵɵclassMap(ctx_r1.getSubAgentIcon(subAgent_r14));
317
+ } }
318
+ function AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_7_For_2_Conditional_7_Template(rf, ctx) { if (rf & 1) {
319
+ i0.ɵɵelementStart(0, "div", 50);
320
+ i0.ɵɵtext(1);
199
321
  i0.ɵɵelementEnd();
200
- i0.ɵɵelementStart(7, "span", 61);
201
- i0.ɵɵtext(8);
202
- i0.ɵɵpipe(9, "date");
203
- i0.ɵɵelementEnd()();
204
- i0.ɵɵtemplate(10, AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Conditional_5_For_2_Conditional_21_Conditional_10_Template, 6, 4, "div", 59)(11, AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Conditional_5_For_2_Conditional_21_Conditional_11_Template, 5, 1, "div", 59);
205
- i0.ɵɵelementEnd()();
206
322
  } if (rf & 2) {
207
- const execution_r6 = i0.ɵɵnextContext().$implicit;
323
+ const subAgent_r14 = i0.ɵɵnextContext().$implicit;
208
324
  i0.ɵɵadvance();
209
- i0.ɵɵconditional(execution_r6.Result ? 1 : -1);
325
+ i0.ɵɵtextInterpolate(subAgent_r14.Description);
326
+ } }
327
+ function AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_7_For_2_Conditional_9_Template(rf, ctx) { if (rf & 1) {
328
+ i0.ɵɵelementStart(0, "span", 53);
329
+ i0.ɵɵtext(1);
330
+ i0.ɵɵelementEnd();
331
+ } if (rf & 2) {
332
+ const subAgent_r14 = i0.ɵɵnextContext().$implicit;
333
+ const ctx_r1 = i0.ɵɵnextContext(5);
334
+ i0.ɵɵstyleProp("background-color", ctx_r1.getStatusBadgeColor());
210
335
  i0.ɵɵadvance();
211
- i0.ɵɵconditional(execution_r6.ErrorMessage ? 2 : -1);
212
- i0.ɵɵadvance(6);
213
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(9, 5, execution_r6.StartedAt, "medium"));
214
- i0.ɵɵadvance(2);
215
- i0.ɵɵconditional(execution_r6.CompletedAt ? 10 : -1);
336
+ i0.ɵɵtextInterpolate1(" ", subAgent_r14.Status, " ");
337
+ } }
338
+ function AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_7_For_2_Conditional_10_Template(rf, ctx) { if (rf & 1) {
339
+ i0.ɵɵelementStart(0, "span", 52);
340
+ i0.ɵɵtext(1);
341
+ i0.ɵɵelementEnd();
342
+ } if (rf & 2) {
343
+ const subAgent_r14 = i0.ɵɵnextContext().$implicit;
216
344
  i0.ɵɵadvance();
217
- i0.ɵɵconditional(execution_r6.ConversationID ? 11 : -1);
345
+ i0.ɵɵtextInterpolate(subAgent_r14.ExecutionMode);
218
346
  } }
219
- function AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Conditional_5_For_2_Template(rf, ctx) { if (rf & 1) {
220
- const _r5 = i0.ɵɵgetCurrentView();
221
- i0.ɵɵelementStart(0, "div", 41)(1, "div")(2, "div", 42);
222
- i0.ɵɵelement(3, "i");
347
+ function AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_7_For_2_Conditional_12_Template(rf, ctx) { if (rf & 1) {
348
+ const _r15 = i0.ɵɵgetCurrentView();
349
+ i0.ɵɵelementStart(0, "button", 70);
350
+ i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_7_For_2_Conditional_12_Template_button_click_0_listener($event) { i0.ɵɵrestoreView(_r15); const subAgent_r14 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.openSubAgentAdvancedSettings(subAgent_r14, $event)); });
351
+ i0.ɵɵelement(1, "i", 71);
223
352
  i0.ɵɵelementEnd();
224
- i0.ɵɵelementStart(4, "div", 43)(5, "div", 44);
225
- i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Conditional_5_For_2_Template_div_click_5_listener() { const execution_r6 = i0.ɵɵrestoreView(_r5).$implicit; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.toggleExecutionExpanded(execution_r6.ID)); });
226
- i0.ɵɵelementStart(6, "div")(7, "div", 45);
227
- i0.ɵɵelement(8, "i", 46);
228
- i0.ɵɵtext(9);
229
- i0.ɵɵelementStart(10, "span", 47);
230
- i0.ɵɵtext(11);
231
- i0.ɵɵpipe(12, "date");
232
- i0.ɵɵelementEnd()();
233
- i0.ɵɵelementStart(13, "div", 48)(14, "span", 28);
234
- i0.ɵɵtext(15);
353
+ } }
354
+ function AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_7_For_2_Conditional_13_Template(rf, ctx) { if (rf & 1) {
355
+ const _r16 = i0.ɵɵgetCurrentView();
356
+ i0.ɵɵelementStart(0, "button", 72);
357
+ i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_7_For_2_Conditional_13_Template_button_click_0_listener($event) { i0.ɵɵrestoreView(_r16); const subAgent_r14 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.removeSubAgent(subAgent_r14, $event)); });
358
+ i0.ɵɵelement(1, "i", 59);
235
359
  i0.ɵɵelementEnd();
236
- i0.ɵɵtemplate(16, AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Conditional_5_For_2_Conditional_16_Template, 3, 1, "span", 49);
237
- i0.ɵɵelementStart(17, "div", 50)(18, "button", 51);
238
- i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Conditional_5_For_2_Template_button_click_18_listener($event) { const execution_r6 = i0.ɵɵrestoreView(_r5).$implicit; const ctx_r1 = i0.ɵɵnextContext(5); ctx_r1.openExecutionRecord(execution_r6.ID); return i0.ɵɵresetView($event.stopPropagation()); });
239
- i0.ɵɵelement(19, "i", 52);
240
- i0.ɵɵelementEnd()()();
241
- i0.ɵɵtemplate(20, AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Conditional_5_For_2_Conditional_20_Template, 2, 1, "div", 53);
360
+ } }
361
+ function AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_7_For_2_Template(rf, ctx) { if (rf & 1) {
362
+ const _r13 = i0.ɵɵgetCurrentView();
363
+ i0.ɵɵelementStart(0, "div", 65);
364
+ i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_7_For_2_Template_div_click_0_listener() { const subAgent_r14 = i0.ɵɵrestoreView(_r13).$implicit; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.navigateToEntity("AI Agents", subAgent_r14.ID)); });
365
+ i0.ɵɵelementStart(1, "div", 47);
366
+ i0.ɵɵtemplate(2, AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_7_For_2_Conditional_2_Template, 1, 2, "img", 66)(3, AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_7_For_2_Conditional_3_Template, 1, 2, "i", 11);
367
+ i0.ɵɵelementEnd();
368
+ i0.ɵɵelementStart(4, "div", 48)(5, "div", 49);
369
+ i0.ɵɵtext(6);
370
+ i0.ɵɵelementEnd();
371
+ i0.ɵɵtemplate(7, AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_7_For_2_Conditional_7_Template, 2, 1, "div", 50);
372
+ i0.ɵɵelementStart(8, "div", 51);
373
+ i0.ɵɵtemplate(9, AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_7_For_2_Conditional_9_Template, 2, 3, "span", 67)(10, AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_7_For_2_Conditional_10_Template, 2, 1, "span", 52);
374
+ i0.ɵɵelementEnd()();
375
+ i0.ɵɵelementStart(11, "div", 55);
376
+ i0.ɵɵtemplate(12, AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_7_For_2_Conditional_12_Template, 2, 0, "button", 68)(13, AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_7_For_2_Conditional_13_Template, 2, 0, "button", 69);
377
+ i0.ɵɵelement(14, "i", 57);
242
378
  i0.ɵɵelementEnd()();
243
- i0.ɵɵtemplate(21, AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Conditional_5_For_2_Conditional_21_Template, 12, 8, "div", 54);
244
- i0.ɵɵelementEnd()()();
245
379
  } if (rf & 2) {
246
- const execution_r6 = ctx.$implicit;
380
+ const subAgent_r14 = ctx.$implicit;
247
381
  const ctx_r1 = i0.ɵɵnextContext(5);
248
- i0.ɵɵclassProp("expanded", ctx_r1.expandedExecutions[execution_r6.ID]);
249
382
  i0.ɵɵadvance(2);
250
- i0.ɵɵstyleProp("background-color", ctx_r1.getExecutionStatusColor(execution_r6.Status));
251
- i0.ɵɵadvance();
252
- i0.ɵɵclassMap(ctx_r1.getExecutionStatusIcon(execution_r6.Status));
253
- i0.ɵɵadvance(5);
254
- i0.ɵɵclassProp("expanded", ctx_r1.expandedExecutions[execution_r6.ID]);
383
+ i0.ɵɵconditional(ctx_r1.hasSubAgentLogoURL(subAgent_r14) ? 2 : 3);
384
+ i0.ɵɵadvance(4);
385
+ i0.ɵɵtextInterpolate(subAgent_r14.Name || "Untitled Sub-Agent");
255
386
  i0.ɵɵadvance();
256
- i0.ɵɵtextInterpolate1(" Execution #", execution_r6.ID.substring(0, 8), " ");
387
+ i0.ɵɵconditional(subAgent_r14.Description ? 7 : -1);
257
388
  i0.ɵɵadvance(2);
258
- i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(12, 16, execution_r6.__mj_CreatedAt, "MMM d, h:mm a"));
259
- i0.ɵɵadvance(3);
260
- i0.ɵɵstyleProp("background-color", ctx_r1.getExecutionStatusColor(execution_r6.Status));
261
- i0.ɵɵadvance();
262
- i0.ɵɵtextInterpolate1(" ", execution_r6.Status || "Unknown", " ");
389
+ i0.ɵɵconditional(subAgent_r14.Status ? 9 : -1);
263
390
  i0.ɵɵadvance();
264
- i0.ɵɵconditional(execution_r6.CompletedAt ? 16 : -1);
265
- i0.ɵɵadvance(4);
266
- i0.ɵɵconditional(execution_r6.Result && !ctx_r1.expandedExecutions[execution_r6.ID] ? 20 : -1);
391
+ i0.ɵɵconditional(subAgent_r14.ExecutionMode ? 10 : -1);
392
+ i0.ɵɵadvance(2);
393
+ i0.ɵɵconditional(ctx_r1.EditMode && ctx_r1.UserCanCreateSubAgents ? 12 : -1);
267
394
  i0.ɵɵadvance();
268
- i0.ɵɵconditional(ctx_r1.expandedExecutions[execution_r6.ID] ? 21 : -1);
395
+ i0.ɵɵconditional(ctx_r1.EditMode && ctx_r1.UserCanDeleteSubAgents ? 13 : -1);
269
396
  } }
270
- function AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Conditional_5_Conditional_3_Template(rf, ctx) { if (rf & 1) {
271
- const _r7 = i0.ɵɵgetCurrentView();
272
- i0.ɵɵelementStart(0, "div", 65);
273
- i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Conditional_5_Conditional_3_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r7); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.navigateToEntity("AI Agent Runs", "")); });
397
+ function AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_7_Conditional_3_Template(rf, ctx) { if (rf & 1) {
398
+ const _r17 = i0.ɵɵgetCurrentView();
399
+ i0.ɵɵelementStart(0, "div", 60);
400
+ i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_7_Conditional_3_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r17); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.navigateToEntity("AI Agents", "")); });
274
401
  i0.ɵɵelementStart(1, "span");
275
402
  i0.ɵɵtext(2);
276
403
  i0.ɵɵelementEnd()();
277
404
  } if (rf & 2) {
278
405
  const ctx_r1 = i0.ɵɵnextContext(5);
279
406
  i0.ɵɵadvance(2);
280
- i0.ɵɵtextInterpolate1("View all ", ctx_r1.executionHistoryCount, " executions...");
407
+ i0.ɵɵtextInterpolate1("View all ", ctx_r1.subAgentCount, " sub-agents...");
281
408
  } }
282
- function AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Conditional_5_Template(rf, ctx) { if (rf & 1) {
283
- i0.ɵɵelementStart(0, "div", 38);
284
- i0.ɵɵrepeaterCreate(1, AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Conditional_5_For_2_Template, 22, 19, "div", 39, _forTrack0);
285
- i0.ɵɵtemplate(3, AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Conditional_5_Conditional_3_Template, 3, 1, "div", 40);
409
+ function AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_7_Template(rf, ctx) { if (rf & 1) {
410
+ i0.ɵɵelementStart(0, "div", 39);
411
+ i0.ɵɵrepeaterCreate(1, AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_7_For_2_Template, 15, 7, "div", 64, _forTrack0);
412
+ i0.ɵɵtemplate(3, AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_7_Conditional_3_Template, 3, 1, "div", 45);
286
413
  i0.ɵɵelementEnd();
287
414
  } if (rf & 2) {
288
415
  const ctx_r1 = i0.ɵɵnextContext(4);
289
416
  i0.ɵɵadvance();
290
- i0.ɵɵrepeater(ctx_r1.recentExecutions);
417
+ i0.ɵɵrepeater(ctx_r1.subAgents);
291
418
  i0.ɵɵadvance(2);
292
- i0.ɵɵconditional(ctx_r1.executionHistoryCount > ctx_r1.recentExecutions.length ? 3 : -1);
419
+ i0.ɵɵconditional(ctx_r1.subAgentCount > ctx_r1.subAgents.length ? 3 : -1);
293
420
  } }
294
- function AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Template(rf, ctx) { if (rf & 1) {
295
- i0.ɵɵelementStart(0, "div", 34)(1, "div", 35)(2, "div", 36);
296
- i0.ɵɵtext(3, " Review execution history, requests, and performance metrics for this agent. ");
421
+ function AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Template(rf, ctx) { if (rf & 1) {
422
+ i0.ɵɵelementStart(0, "div", 34)(1, "div", 35)(2, "div", 61);
423
+ i0.ɵɵtext(3, " Manage hierarchical relationships with child agents that work under this agent. ");
424
+ i0.ɵɵelementEnd();
425
+ i0.ɵɵelementStart(4, "div", 36);
426
+ i0.ɵɵtemplate(5, AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_5_Template, 6, 0);
297
427
  i0.ɵɵelementEnd()();
298
- i0.ɵɵtemplate(4, AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Conditional_4_Template, 6, 0, "div", 37)(5, AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Conditional_5_Template, 4, 1, "div", 38);
428
+ i0.ɵɵtemplate(6, AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_6_Template, 7, 1, "div", 38)(7, AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_7_Template, 4, 1, "div", 39);
299
429
  i0.ɵɵelementEnd();
300
430
  } if (rf & 2) {
301
431
  const ctx_r1 = i0.ɵɵnextContext(3);
302
- i0.ɵɵadvance(4);
303
- i0.ɵɵconditional(ctx_r1.executionHistoryCount === 0 ? 4 : 5);
432
+ i0.ɵɵadvance(5);
433
+ i0.ɵɵconditional(ctx_r1.EditMode && ctx_r1.UserCanCreateSubAgents ? 5 : -1);
434
+ i0.ɵɵadvance();
435
+ i0.ɵɵconditional(ctx_r1.subAgentCount === 0 ? 6 : 7);
304
436
  } }
305
- function AIAgentFormComponentExtended_form_2_Conditional_22_Template(rf, ctx) { if (rf & 1) {
437
+ function AIAgentFormComponentExtended_form_2_Conditional_23_Template(rf, ctx) { if (rf & 1) {
306
438
  i0.ɵɵelementStart(0, "kendo-panelbar-item", 24);
307
- i0.ɵɵtemplate(1, AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_1_Template, 2, 1, "ng-template", 25)(2, AIAgentFormComponentExtended_form_2_Conditional_22_ng_template_2_Template, 6, 1, "ng-template", 26);
439
+ i0.ɵɵtemplate(1, AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_1_Template, 2, 1, "ng-template", 25)(2, AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Template, 8, 2, "ng-template", 26);
308
440
  i0.ɵɵelementEnd();
309
441
  } if (rf & 2) {
310
- i0.ɵɵproperty("expanded", true);
442
+ const ctx_r1 = i0.ɵɵnextContext(2);
443
+ i0.ɵɵproperty("expanded", ctx_r1.subAgentCount > 0);
311
444
  } }
312
- function AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_1_Template(rf, ctx) { if (rf & 1) {
313
- i0.ɵɵelement(0, "i", 66);
445
+ function AIAgentFormComponentExtended_form_2_Conditional_24_ng_template_1_Template(rf, ctx) { if (rf & 1) {
446
+ i0.ɵɵelement(0, "i", 73);
314
447
  i0.ɵɵtext(1);
315
448
  } if (rf & 2) {
316
449
  const ctx_r1 = i0.ɵɵnextContext(3);
317
450
  i0.ɵɵadvance();
318
451
  i0.ɵɵtextInterpolate1(" Prompts", ctx_r1.promptCount > 0 ? " (" + ctx_r1.promptCount + ")" : "", " ");
319
452
  } }
320
- function AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_7_Template(rf, ctx) { if (rf & 1) {
321
- const _r8 = i0.ɵɵgetCurrentView();
322
- i0.ɵɵelementStart(0, "kendo-dropdownlist", 77);
323
- i0.ɵɵtwoWayListener("ngModelChange", function AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_7_Template_kendo_dropdownlist_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(4); i0.ɵɵtwoWayBindingSet(ctx_r1.record.ModelSelectionMode, $event) || (ctx_r1.record.ModelSelectionMode = $event); return i0.ɵɵresetView($event); });
453
+ function AIAgentFormComponentExtended_form_2_Conditional_24_ng_template_2_Conditional_7_Template(rf, ctx) { if (rf & 1) {
454
+ const _r18 = i0.ɵɵgetCurrentView();
455
+ i0.ɵɵelementStart(0, "kendo-dropdownlist", 80);
456
+ i0.ɵɵtwoWayListener("ngModelChange", function AIAgentFormComponentExtended_form_2_Conditional_24_ng_template_2_Conditional_7_Template_kendo_dropdownlist_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r18); const ctx_r1 = i0.ɵɵnextContext(4); i0.ɵɵtwoWayBindingSet(ctx_r1.record.ModelSelectionMode, $event) || (ctx_r1.record.ModelSelectionMode = $event); return i0.ɵɵresetView($event); });
324
457
  i0.ɵɵelementEnd();
325
458
  } if (rf & 2) {
326
459
  const ctx_r1 = i0.ɵɵnextContext(4);
327
460
  i0.ɵɵtwoWayProperty("ngModel", ctx_r1.record.ModelSelectionMode);
328
461
  i0.ɵɵproperty("data", ctx_r1.modelSelectionModes)("valuePrimitive", true);
329
462
  } }
330
- function AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_8_Template(rf, ctx) { if (rf & 1) {
331
- i0.ɵɵelementStart(0, "span", 73);
463
+ function AIAgentFormComponentExtended_form_2_Conditional_24_ng_template_2_Conditional_8_Template(rf, ctx) { if (rf & 1) {
464
+ i0.ɵɵelementStart(0, "span", 79);
332
465
  i0.ɵɵtext(1);
333
466
  i0.ɵɵelementEnd();
334
467
  } if (rf & 2) {
@@ -336,97 +469,106 @@ function AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Condit
336
469
  i0.ɵɵadvance();
337
470
  i0.ɵɵtextInterpolate(ctx_r1.record.ModelSelectionMode || "Agent Type");
338
471
  } }
339
- function AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_10_Template(rf, ctx) { if (rf & 1) {
340
- const _r9 = i0.ɵɵgetCurrentView();
341
- i0.ɵɵelementStart(0, "button", 78);
342
- i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_10_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r9); const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.addPrompt()); });
343
- i0.ɵɵelement(1, "i", 79);
472
+ function AIAgentFormComponentExtended_form_2_Conditional_24_ng_template_2_Conditional_10_Template(rf, ctx) { if (rf & 1) {
473
+ const _r19 = i0.ɵɵgetCurrentView();
474
+ i0.ɵɵelementStart(0, "button", 40);
475
+ i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_24_ng_template_2_Conditional_10_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r19); const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.addPrompt()); });
476
+ i0.ɵɵelement(1, "i", 41);
344
477
  i0.ɵɵtext(2, " Add Prompt ");
345
478
  i0.ɵɵelementEnd();
346
479
  } }
347
- function AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_11_Conditional_6_Template(rf, ctx) { if (rf & 1) {
348
- const _r10 = i0.ɵɵgetCurrentView();
349
- i0.ɵɵelementStart(0, "button", 81);
350
- i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_11_Conditional_6_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r10); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.addPrompt()); });
351
- i0.ɵɵelement(1, "i", 79);
480
+ function AIAgentFormComponentExtended_form_2_Conditional_24_ng_template_2_Conditional_11_Conditional_6_Template(rf, ctx) { if (rf & 1) {
481
+ const _r20 = i0.ɵɵgetCurrentView();
482
+ i0.ɵɵelementStart(0, "button", 43);
483
+ i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_24_ng_template_2_Conditional_11_Conditional_6_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r20); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.addPrompt()); });
484
+ i0.ɵɵelement(1, "i", 41);
352
485
  i0.ɵɵtext(2, " Create First Prompt ");
353
486
  i0.ɵɵelementEnd();
354
487
  } }
355
- function AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_11_Template(rf, ctx) { if (rf & 1) {
356
- i0.ɵɵelementStart(0, "div", 37);
357
- i0.ɵɵelement(1, "i", 66);
488
+ function AIAgentFormComponentExtended_form_2_Conditional_24_ng_template_2_Conditional_11_Template(rf, ctx) { if (rf & 1) {
489
+ i0.ɵɵelementStart(0, "div", 38);
490
+ i0.ɵɵelement(1, "i", 73);
358
491
  i0.ɵɵelementStart(2, "h4");
359
492
  i0.ɵɵtext(3, "No Prompts Configured");
360
493
  i0.ɵɵelementEnd();
361
494
  i0.ɵɵelementStart(4, "p");
362
495
  i0.ɵɵtext(5, "Add prompts to define how this agent processes requests and generates responses.");
363
496
  i0.ɵɵelementEnd();
364
- i0.ɵɵtemplate(6, AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_11_Conditional_6_Template, 3, 0, "button", 80);
497
+ i0.ɵɵtemplate(6, AIAgentFormComponentExtended_form_2_Conditional_24_ng_template_2_Conditional_11_Conditional_6_Template, 3, 0, "button", 42);
365
498
  i0.ɵɵelementEnd();
366
499
  } if (rf & 2) {
367
500
  const ctx_r1 = i0.ɵɵnextContext(4);
368
501
  i0.ɵɵadvance(6);
369
- i0.ɵɵconditional(ctx_r1.EditMode ? 6 : -1);
502
+ i0.ɵɵconditional(ctx_r1.EditMode && ctx_r1.UserCanCreateNewPrompts ? 6 : -1);
370
503
  } }
371
- function AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_12_For_2_Conditional_6_Template(rf, ctx) { if (rf & 1) {
372
- i0.ɵɵelementStart(0, "div", 88);
504
+ function AIAgentFormComponentExtended_form_2_Conditional_24_ng_template_2_Conditional_12_For_2_Conditional_6_Template(rf, ctx) { if (rf & 1) {
505
+ i0.ɵɵelementStart(0, "div", 50);
373
506
  i0.ɵɵtext(1);
374
507
  i0.ɵɵelementEnd();
375
508
  } if (rf & 2) {
376
- const prompt_r12 = i0.ɵɵnextContext().$implicit;
509
+ const prompt_r22 = i0.ɵɵnextContext().$implicit;
377
510
  i0.ɵɵadvance();
378
- i0.ɵɵtextInterpolate2("", prompt_r12.TemplateText.substring(0, 120), "", prompt_r12.TemplateText.length > 120 ? "..." : "", "");
511
+ i0.ɵɵtextInterpolate2("", prompt_r22.TemplateText.substring(0, 120), "", prompt_r22.TemplateText.length > 120 ? "..." : "", "");
379
512
  } }
380
- function AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_12_For_2_Conditional_8_Template(rf, ctx) { if (rf & 1) {
381
- i0.ɵɵelementStart(0, "span", 90);
513
+ function AIAgentFormComponentExtended_form_2_Conditional_24_ng_template_2_Conditional_12_For_2_Conditional_8_Template(rf, ctx) { if (rf & 1) {
514
+ i0.ɵɵelementStart(0, "span", 52);
382
515
  i0.ɵɵtext(1);
383
516
  i0.ɵɵelementEnd();
384
517
  } if (rf & 2) {
385
- const prompt_r12 = i0.ɵɵnextContext().$implicit;
518
+ const prompt_r22 = i0.ɵɵnextContext().$implicit;
386
519
  i0.ɵɵadvance();
387
- i0.ɵɵtextInterpolate(prompt_r12.PromptRole);
520
+ i0.ɵɵtextInterpolate(prompt_r22.PromptRole);
388
521
  } }
389
- function AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_12_For_2_Conditional_10_Template(rf, ctx) { if (rf & 1) {
390
- const _r13 = i0.ɵɵgetCurrentView();
391
- i0.ɵɵelementStart(0, "button", 94);
392
- i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_12_For_2_Conditional_10_Template_button_click_0_listener($event) { i0.ɵɵrestoreView(_r13); const prompt_r12 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.removePrompt(prompt_r12, $event)); });
393
- i0.ɵɵelement(1, "i", 95);
522
+ function AIAgentFormComponentExtended_form_2_Conditional_24_ng_template_2_Conditional_12_For_2_Conditional_10_Template(rf, ctx) { if (rf & 1) {
523
+ const _r23 = i0.ɵɵgetCurrentView();
524
+ i0.ɵɵelementStart(0, "button", 70);
525
+ i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_24_ng_template_2_Conditional_12_For_2_Conditional_10_Template_button_click_0_listener($event) { i0.ɵɵrestoreView(_r23); const prompt_r22 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.openPromptAdvancedSettings(prompt_r22, $event)); });
526
+ i0.ɵɵelement(1, "i", 71);
394
527
  i0.ɵɵelementEnd();
395
528
  } }
396
- function AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_12_For_2_Template(rf, ctx) { if (rf & 1) {
397
- const _r11 = i0.ɵɵgetCurrentView();
398
- i0.ɵɵelementStart(0, "div", 83);
399
- i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_12_For_2_Template_div_click_0_listener() { const prompt_r12 = i0.ɵɵrestoreView(_r11).$implicit; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.navigateToEntity("AI Prompts", prompt_r12.ID)); });
400
- i0.ɵɵelementStart(1, "div", 84);
401
- i0.ɵɵelement(2, "i", 85);
529
+ function AIAgentFormComponentExtended_form_2_Conditional_24_ng_template_2_Conditional_12_For_2_Conditional_11_Template(rf, ctx) { if (rf & 1) {
530
+ const _r24 = i0.ɵɵgetCurrentView();
531
+ i0.ɵɵelementStart(0, "button", 85);
532
+ i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_24_ng_template_2_Conditional_12_For_2_Conditional_11_Template_button_click_0_listener($event) { i0.ɵɵrestoreView(_r24); const prompt_r22 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.removePrompt(prompt_r22, $event)); });
533
+ i0.ɵɵelement(1, "i", 59);
402
534
  i0.ɵɵelementEnd();
403
- i0.ɵɵelementStart(3, "div", 86)(4, "div", 87);
535
+ } }
536
+ function AIAgentFormComponentExtended_form_2_Conditional_24_ng_template_2_Conditional_12_For_2_Template(rf, ctx) { if (rf & 1) {
537
+ const _r21 = i0.ɵɵgetCurrentView();
538
+ i0.ɵɵelementStart(0, "div", 82);
539
+ i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_24_ng_template_2_Conditional_12_For_2_Template_div_click_0_listener() { const prompt_r22 = i0.ɵɵrestoreView(_r21).$implicit; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.navigateToEntity("AI Prompts", prompt_r22.ID)); });
540
+ i0.ɵɵelementStart(1, "div", 47);
541
+ i0.ɵɵelement(2, "i", 83);
542
+ i0.ɵɵelementEnd();
543
+ i0.ɵɵelementStart(3, "div", 48)(4, "div", 49);
404
544
  i0.ɵɵtext(5);
405
545
  i0.ɵɵelementEnd();
406
- i0.ɵɵtemplate(6, AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_12_For_2_Conditional_6_Template, 2, 2, "div", 88);
407
- i0.ɵɵelementStart(7, "div", 89);
408
- i0.ɵɵtemplate(8, AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_12_For_2_Conditional_8_Template, 2, 1, "span", 90);
546
+ i0.ɵɵtemplate(6, AIAgentFormComponentExtended_form_2_Conditional_24_ng_template_2_Conditional_12_For_2_Conditional_6_Template, 2, 2, "div", 50);
547
+ i0.ɵɵelementStart(7, "div", 51);
548
+ i0.ɵɵtemplate(8, AIAgentFormComponentExtended_form_2_Conditional_24_ng_template_2_Conditional_12_For_2_Conditional_8_Template, 2, 1, "span", 52);
409
549
  i0.ɵɵelementEnd()();
410
- i0.ɵɵelementStart(9, "div", 91);
411
- i0.ɵɵtemplate(10, AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_12_For_2_Conditional_10_Template, 2, 0, "button", 92);
412
- i0.ɵɵelement(11, "i", 93);
550
+ i0.ɵɵelementStart(9, "div", 55);
551
+ i0.ɵɵtemplate(10, AIAgentFormComponentExtended_form_2_Conditional_24_ng_template_2_Conditional_12_For_2_Conditional_10_Template, 2, 0, "button", 68)(11, AIAgentFormComponentExtended_form_2_Conditional_24_ng_template_2_Conditional_12_For_2_Conditional_11_Template, 2, 0, "button", 84);
552
+ i0.ɵɵelement(12, "i", 57);
413
553
  i0.ɵɵelementEnd()();
414
554
  } if (rf & 2) {
415
- const prompt_r12 = ctx.$implicit;
555
+ const prompt_r22 = ctx.$implicit;
416
556
  const ctx_r1 = i0.ɵɵnextContext(5);
417
557
  i0.ɵɵadvance(5);
418
- i0.ɵɵtextInterpolate(prompt_r12.Name);
558
+ i0.ɵɵtextInterpolate(prompt_r22.Name);
419
559
  i0.ɵɵadvance();
420
- i0.ɵɵconditional(prompt_r12.TemplateText ? 6 : -1);
560
+ i0.ɵɵconditional(prompt_r22.TemplateText ? 6 : -1);
421
561
  i0.ɵɵadvance(2);
422
- i0.ɵɵconditional(prompt_r12.PromptRole ? 8 : -1);
562
+ i0.ɵɵconditional(prompt_r22.PromptRole ? 8 : -1);
423
563
  i0.ɵɵadvance(2);
424
- i0.ɵɵconditional(ctx_r1.EditMode ? 10 : -1);
564
+ i0.ɵɵconditional(ctx_r1.EditMode && ctx_r1.UserCanCreatePrompts ? 10 : -1);
565
+ i0.ɵɵadvance();
566
+ i0.ɵɵconditional(ctx_r1.EditMode && ctx_r1.UserCanDeletePrompts ? 11 : -1);
425
567
  } }
426
- function AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_12_Conditional_3_Template(rf, ctx) { if (rf & 1) {
427
- const _r14 = i0.ɵɵgetCurrentView();
428
- i0.ɵɵelementStart(0, "div", 65);
429
- i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_12_Conditional_3_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r14); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.navigateToEntity("AI Prompts", "")); });
568
+ function AIAgentFormComponentExtended_form_2_Conditional_24_ng_template_2_Conditional_12_Conditional_3_Template(rf, ctx) { if (rf & 1) {
569
+ const _r25 = i0.ɵɵgetCurrentView();
570
+ i0.ɵɵelementStart(0, "div", 60);
571
+ i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_24_ng_template_2_Conditional_12_Conditional_3_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r25); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.navigateToEntity("AI Prompts", "")); });
430
572
  i0.ɵɵelementStart(1, "span");
431
573
  i0.ɵɵtext(2);
432
574
  i0.ɵɵelementEnd()();
@@ -435,10 +577,10 @@ function AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Condit
435
577
  i0.ɵɵadvance(2);
436
578
  i0.ɵɵtextInterpolate1("View all ", ctx_r1.promptCount, " prompts...");
437
579
  } }
438
- function AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_12_Template(rf, ctx) { if (rf & 1) {
439
- i0.ɵɵelementStart(0, "div", 76);
440
- i0.ɵɵrepeaterCreate(1, AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_12_For_2_Template, 12, 4, "div", 82, _forTrack0);
441
- i0.ɵɵtemplate(3, AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_12_Conditional_3_Template, 3, 1, "div", 40);
580
+ function AIAgentFormComponentExtended_form_2_Conditional_24_ng_template_2_Conditional_12_Template(rf, ctx) { if (rf & 1) {
581
+ i0.ɵɵelementStart(0, "div", 39);
582
+ i0.ɵɵrepeaterCreate(1, AIAgentFormComponentExtended_form_2_Conditional_24_ng_template_2_Conditional_12_For_2_Template, 13, 5, "div", 81, _forTrack0);
583
+ i0.ɵɵtemplate(3, AIAgentFormComponentExtended_form_2_Conditional_24_ng_template_2_Conditional_12_Conditional_3_Template, 3, 1, "div", 45);
442
584
  i0.ɵɵelementEnd();
443
585
  } if (rf & 2) {
444
586
  const ctx_r1 = i0.ɵɵnextContext(4);
@@ -447,735 +589,635 @@ function AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Condit
447
589
  i0.ɵɵadvance(2);
448
590
  i0.ɵɵconditional(ctx_r1.promptCount > ctx_r1.agentPrompts.length ? 3 : -1);
449
591
  } }
450
- function AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Template(rf, ctx) { if (rf & 1) {
451
- i0.ɵɵelementStart(0, "div", 67)(1, "div", 35)(2, "div", 68)(3, "div", 69)(4, "label", 70);
452
- i0.ɵɵelement(5, "i", 71);
592
+ function AIAgentFormComponentExtended_form_2_Conditional_24_ng_template_2_Template(rf, ctx) { if (rf & 1) {
593
+ i0.ɵɵelementStart(0, "div", 34)(1, "div", 35)(2, "div", 74)(3, "div", 75)(4, "label", 76);
594
+ i0.ɵɵelement(5, "i", 77);
453
595
  i0.ɵɵtext(6, " Model Selection: ");
454
596
  i0.ɵɵelementEnd();
455
- i0.ɵɵtemplate(7, AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_7_Template, 1, 3, "kendo-dropdownlist", 72)(8, AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_8_Template, 2, 1, "span", 73);
597
+ i0.ɵɵtemplate(7, AIAgentFormComponentExtended_form_2_Conditional_24_ng_template_2_Conditional_7_Template, 1, 3, "kendo-dropdownlist", 78)(8, AIAgentFormComponentExtended_form_2_Conditional_24_ng_template_2_Conditional_8_Template, 2, 1, "span", 79);
456
598
  i0.ɵɵelementEnd()();
457
- i0.ɵɵelementStart(9, "div", 74);
458
- i0.ɵɵtemplate(10, AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_10_Template, 3, 0, "button", 75);
599
+ i0.ɵɵelementStart(9, "div", 36);
600
+ i0.ɵɵtemplate(10, AIAgentFormComponentExtended_form_2_Conditional_24_ng_template_2_Conditional_10_Template, 3, 0, "button", 37);
459
601
  i0.ɵɵelementEnd()();
460
- i0.ɵɵtemplate(11, AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_11_Template, 7, 1, "div", 37)(12, AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Conditional_12_Template, 4, 1, "div", 76);
602
+ i0.ɵɵtemplate(11, AIAgentFormComponentExtended_form_2_Conditional_24_ng_template_2_Conditional_11_Template, 7, 1, "div", 38)(12, AIAgentFormComponentExtended_form_2_Conditional_24_ng_template_2_Conditional_12_Template, 4, 1, "div", 39);
461
603
  i0.ɵɵelementEnd();
462
604
  } if (rf & 2) {
463
605
  const ctx_r1 = i0.ɵɵnextContext(3);
464
606
  i0.ɵɵadvance(7);
465
607
  i0.ɵɵconditional(ctx_r1.EditMode ? 7 : 8);
466
608
  i0.ɵɵadvance(3);
467
- i0.ɵɵconditional(ctx_r1.EditMode ? 10 : -1);
609
+ i0.ɵɵconditional(ctx_r1.EditMode && ctx_r1.UserCanCreateNewPrompts ? 10 : -1);
468
610
  i0.ɵɵadvance();
469
611
  i0.ɵɵconditional(ctx_r1.promptCount === 0 ? 11 : 12);
470
612
  } }
471
- function AIAgentFormComponentExtended_form_2_Conditional_23_Template(rf, ctx) { if (rf & 1) {
613
+ function AIAgentFormComponentExtended_form_2_Conditional_24_Template(rf, ctx) { if (rf & 1) {
472
614
  i0.ɵɵelementStart(0, "kendo-panelbar-item", 24);
473
- i0.ɵɵtemplate(1, AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_1_Template, 2, 1, "ng-template", 25)(2, AIAgentFormComponentExtended_form_2_Conditional_23_ng_template_2_Template, 13, 3, "ng-template", 26);
615
+ i0.ɵɵtemplate(1, AIAgentFormComponentExtended_form_2_Conditional_24_ng_template_1_Template, 2, 1, "ng-template", 25)(2, AIAgentFormComponentExtended_form_2_Conditional_24_ng_template_2_Template, 13, 3, "ng-template", 26);
474
616
  i0.ɵɵelementEnd();
475
617
  } if (rf & 2) {
476
- i0.ɵɵproperty("expanded", false);
618
+ i0.ɵɵproperty("expanded", true);
477
619
  } }
478
- function AIAgentFormComponentExtended_form_2_ng_template_25_Template(rf, ctx) { if (rf & 1) {
479
- i0.ɵɵelement(0, "i", 96);
480
- i0.ɵɵtext(1, " Payload ");
620
+ function AIAgentFormComponentExtended_form_2_Conditional_25_ng_template_1_Template(rf, ctx) { if (rf & 1) {
621
+ i0.ɵɵelement(0, "i", 86);
622
+ i0.ɵɵtext(1);
623
+ } if (rf & 2) {
624
+ const ctx_r1 = i0.ɵɵnextContext(3);
625
+ i0.ɵɵadvance();
626
+ i0.ɵɵtextInterpolate1(" Learning Cycles", ctx_r1.learningCycleCount > 0 ? " (" + ctx_r1.learningCycleCount + ")" : "", " ");
481
627
  } }
482
- function AIAgentFormComponentExtended_form_2_ng_template_26_Template(rf, ctx) { if (rf & 1) {
483
- const _r15 = i0.ɵɵgetCurrentView();
484
- i0.ɵɵelementStart(0, "div", 67)(1, "div", 35)(2, "div", 36);
485
- i0.ɵɵtext(3, " Configure how this agent handles data payloads and validation. ");
486
- i0.ɵɵelementEnd()();
487
- i0.ɵɵelementStart(4, "div", 97)(5, "h4", 98);
488
- i0.ɵɵelement(6, "i", 99);
489
- i0.ɵɵtext(7, " Configuration ");
628
+ function AIAgentFormComponentExtended_form_2_Conditional_25_ng_template_2_Conditional_4_Template(rf, ctx) { if (rf & 1) {
629
+ i0.ɵɵelementStart(0, "div", 38);
630
+ i0.ɵɵelement(1, "i", 86);
631
+ i0.ɵɵelementStart(2, "h4");
632
+ i0.ɵɵtext(3, "No Learning Cycles");
490
633
  i0.ɵɵelementEnd();
491
- i0.ɵɵelementStart(8, "div", 100);
492
- i0.ɵɵelement(9, "mj-form-field", 101)(10, "mj-form-field", 102)(11, "mj-form-field", 103);
634
+ i0.ɵɵelementStart(4, "p");
635
+ i0.ɵɵtext(5, "Learning cycles will appear here as the agent processes requests and improves over time.");
493
636
  i0.ɵɵelementEnd()();
494
- i0.ɵɵelementStart(12, "div", 104)(13, "h4", 98);
495
- i0.ɵɵelement(14, "i", 105);
496
- i0.ɵɵtext(15, " Path Configuration ");
637
+ } }
638
+ function AIAgentFormComponentExtended_form_2_Conditional_25_ng_template_2_Conditional_5_For_2_Conditional_7_Template(rf, ctx) { if (rf & 1) {
639
+ i0.ɵɵelementStart(0, "span", 52);
640
+ i0.ɵɵelement(1, "i", 89);
641
+ i0.ɵɵtext(2);
642
+ i0.ɵɵpipe(3, "date");
497
643
  i0.ɵɵelementEnd();
498
- i0.ɵɵelementStart(16, "div", 106)(17, "label", 107);
499
- i0.ɵɵelement(18, "i", 108);
500
- i0.ɵɵtext(19, " Downstream Paths ");
501
- i0.ɵɵelementStart(20, "span", 109);
502
- i0.ɵɵtext(21, "JSON array of paths to pass to sub-agents");
503
- i0.ɵɵelementEnd()();
504
- i0.ɵɵelementStart(22, "mj-code-editor", 110);
505
- i0.ɵɵlistener("valueChange", function AIAgentFormComponentExtended_form_2_ng_template_26_Template_mj_code_editor_valueChange_22_listener($event) { i0.ɵɵrestoreView(_r15); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.updatePayloadField("PayloadDownstreamPaths", $event)); });
506
- i0.ɵɵelementEnd()();
507
- i0.ɵɵelementStart(23, "div", 106)(24, "label", 107);
508
- i0.ɵɵelement(25, "i", 111);
509
- i0.ɵɵtext(26, " Upstream Paths ");
510
- i0.ɵɵelementStart(27, "span", 109);
511
- i0.ɵɵtext(28, "JSON array of paths to return to parent agent");
512
- i0.ɵɵelementEnd()();
513
- i0.ɵɵelementStart(29, "mj-code-editor", 110);
514
- i0.ɵɵlistener("valueChange", function AIAgentFormComponentExtended_form_2_ng_template_26_Template_mj_code_editor_valueChange_29_listener($event) { i0.ɵɵrestoreView(_r15); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.updatePayloadField("PayloadUpstreamPaths", $event)); });
515
- i0.ɵɵelementEnd()();
516
- i0.ɵɵelementStart(30, "div", 106)(31, "label", 107);
517
- i0.ɵɵelement(32, "i", 112);
518
- i0.ɵɵtext(33, " Self Read Paths ");
519
- i0.ɵɵelementStart(34, "span", 109);
520
- i0.ɵɵtext(35, "JSON array of paths this agent can read");
521
- i0.ɵɵelementEnd()();
522
- i0.ɵɵelementStart(36, "mj-code-editor", 110);
523
- i0.ɵɵlistener("valueChange", function AIAgentFormComponentExtended_form_2_ng_template_26_Template_mj_code_editor_valueChange_36_listener($event) { i0.ɵɵrestoreView(_r15); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.updatePayloadField("PayloadSelfReadPaths", $event)); });
524
- i0.ɵɵelementEnd()();
525
- i0.ɵɵelementStart(37, "div", 106)(38, "label", 107);
526
- i0.ɵɵelement(39, "i", 113);
527
- i0.ɵɵtext(40, " Self Write Paths ");
528
- i0.ɵɵelementStart(41, "span", 109);
529
- i0.ɵɵtext(42, "JSON array of paths this agent can write to");
530
- i0.ɵɵelementEnd()();
531
- i0.ɵɵelementStart(43, "mj-code-editor", 110);
532
- i0.ɵɵlistener("valueChange", function AIAgentFormComponentExtended_form_2_ng_template_26_Template_mj_code_editor_valueChange_43_listener($event) { i0.ɵɵrestoreView(_r15); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.updatePayloadField("PayloadSelfWritePaths", $event)); });
533
- i0.ɵɵelementEnd()()();
534
- i0.ɵɵelementStart(44, "div", 114)(45, "h4", 98);
535
- i0.ɵɵelement(46, "i", 115);
536
- i0.ɵɵtext(47, " Final Payload Validation ");
644
+ } if (rf & 2) {
645
+ const cycle_r27 = i0.ɵɵnextContext().$implicit;
646
+ i0.ɵɵadvance(2);
647
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(3, 1, cycle_r27.StartedAt, "short"), " ");
648
+ } }
649
+ function AIAgentFormComponentExtended_form_2_Conditional_25_ng_template_2_Conditional_5_For_2_Conditional_8_Template(rf, ctx) { if (rf & 1) {
650
+ i0.ɵɵelementStart(0, "span", 53);
651
+ i0.ɵɵtext(1);
537
652
  i0.ɵɵelementEnd();
538
- i0.ɵɵelementStart(48, "div", 106)(49, "label", 107)(50, "span", 109);
539
- i0.ɵɵtext(51, "JSON validation rules or schema for final payload validation");
540
- i0.ɵɵelementEnd()();
541
- i0.ɵɵelementStart(52, "mj-code-editor", 116);
542
- i0.ɵɵlistener("valueChange", function AIAgentFormComponentExtended_form_2_ng_template_26_Template_mj_code_editor_valueChange_52_listener($event) { i0.ɵɵrestoreView(_r15); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.updatePayloadField("FinalPayloadValidation", $event)); });
543
- i0.ɵɵelementEnd()()()();
544
653
  } if (rf & 2) {
545
- const ctx_r1 = i0.ɵɵnextContext(2);
546
- i0.ɵɵadvance(9);
547
- i0.ɵɵproperty("EditMode", ctx_r1.EditMode)("record", ctx_r1.record);
654
+ const cycle_r27 = i0.ɵɵnextContext().$implicit;
548
655
  i0.ɵɵadvance();
549
- i0.ɵɵproperty("EditMode", ctx_r1.EditMode)("record", ctx_r1.record);
550
- i0.ɵɵadvance();
551
- i0.ɵɵproperty("EditMode", ctx_r1.EditMode)("record", ctx_r1.record);
552
- i0.ɵɵadvance(11);
553
- i0.ɵɵproperty("value", ctx_r1.record.PayloadDownstreamPaths || "[]")("readonly", !ctx_r1.EditMode)("lineWrapping", true);
554
- i0.ɵɵadvance(7);
555
- i0.ɵɵproperty("value", ctx_r1.record.PayloadUpstreamPaths || "[]")("readonly", !ctx_r1.EditMode)("lineWrapping", true);
556
- i0.ɵɵadvance(7);
557
- i0.ɵɵproperty("value", ctx_r1.record.PayloadSelfReadPaths || "[]")("readonly", !ctx_r1.EditMode)("lineWrapping", true);
558
- i0.ɵɵadvance(7);
559
- i0.ɵɵproperty("value", ctx_r1.record.PayloadSelfWritePaths || "[]")("readonly", !ctx_r1.EditMode)("lineWrapping", true);
560
- i0.ɵɵadvance(9);
561
- i0.ɵɵproperty("value", ctx_r1.record.FinalPayloadValidation || "{}")("readonly", !ctx_r1.EditMode)("lineWrapping", true);
656
+ i0.ɵɵtextInterpolate(cycle_r27.Status);
562
657
  } }
563
- function AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_1_Template(rf, ctx) { if (rf & 1) {
564
- i0.ɵɵelement(0, "i", 117);
565
- i0.ɵɵtext(1);
566
- } if (rf & 2) {
567
- const ctx_r1 = i0.ɵɵnextContext(3);
568
- i0.ɵɵadvance();
569
- i0.ɵɵtextInterpolate1(" Actions", ctx_r1.actionCount > 0 ? " (" + ctx_r1.actionCount + ")" : "", " ");
570
- } }
571
- function AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_3_Template(rf, ctx) { if (rf & 1) {
572
- const _r16 = i0.ɵɵgetCurrentView();
573
- i0.ɵɵelementStart(0, "button", 78);
574
- i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_3_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r16); const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.configureActions()); });
575
- i0.ɵɵelement(1, "i", 79);
576
- i0.ɵɵtext(2, " Add Action ");
577
- i0.ɵɵelementEnd();
578
- } }
579
- function AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_4_Conditional_6_Template(rf, ctx) { if (rf & 1) {
580
- const _r17 = i0.ɵɵgetCurrentView();
581
- i0.ɵɵelementStart(0, "button", 81);
582
- i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_4_Conditional_6_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r17); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.configureActions()); });
583
- i0.ɵɵelement(1, "i", 79);
584
- i0.ɵɵtext(2, " Configure First Action ");
585
- i0.ɵɵelementEnd();
586
- } }
587
- function AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_4_Template(rf, ctx) { if (rf & 1) {
588
- i0.ɵɵelementStart(0, "div", 37);
589
- i0.ɵɵelement(1, "i", 117);
590
- i0.ɵɵelementStart(2, "h4");
591
- i0.ɵɵtext(3, "No Actions Configured");
592
- i0.ɵɵelementEnd();
593
- i0.ɵɵelementStart(4, "p");
594
- i0.ɵɵtext(5, "Add actions to enable this agent to perform specific tasks and operations.");
595
- i0.ɵɵelementEnd();
596
- i0.ɵɵtemplate(6, AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_4_Conditional_6_Template, 3, 0, "button", 80);
597
- i0.ɵɵelementEnd();
598
- } if (rf & 2) {
599
- const ctx_r1 = i0.ɵɵnextContext(4);
600
- i0.ɵɵadvance(6);
601
- i0.ɵɵconditional(ctx_r1.EditMode ? 6 : -1);
602
- } }
603
- function AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_5_For_2_Conditional_6_Template(rf, ctx) { if (rf & 1) {
658
+ function AIAgentFormComponentExtended_form_2_Conditional_25_ng_template_2_Conditional_5_For_2_Template(rf, ctx) { if (rf & 1) {
659
+ const _r26 = i0.ɵɵgetCurrentView();
604
660
  i0.ɵɵelementStart(0, "div", 88);
605
- i0.ɵɵtext(1);
606
- i0.ɵɵelementEnd();
607
- } if (rf & 2) {
608
- const action_r19 = i0.ɵɵnextContext().$implicit;
609
- i0.ɵɵadvance();
610
- i0.ɵɵtextInterpolate(action_r19.Description);
611
- } }
612
- function AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_5_For_2_Conditional_8_Template(rf, ctx) { if (rf & 1) {
613
- i0.ɵɵelementStart(0, "span", 90);
614
- i0.ɵɵtext(1);
615
- i0.ɵɵelementEnd();
616
- } if (rf & 2) {
617
- const action_r19 = i0.ɵɵnextContext().$implicit;
618
- i0.ɵɵadvance();
619
- i0.ɵɵtextInterpolate(action_r19.Type);
620
- } }
621
- function AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_5_For_2_Conditional_13_Template(rf, ctx) { if (rf & 1) {
622
- const _r20 = i0.ɵɵgetCurrentView();
623
- i0.ɵɵelementStart(0, "button", 123);
624
- i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_5_For_2_Conditional_13_Template_button_click_0_listener($event) { i0.ɵɵrestoreView(_r20); const action_r19 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.removeAction(action_r19, $event)); });
625
- i0.ɵɵelement(1, "i", 95);
626
- i0.ɵɵelementEnd();
627
- } }
628
- function AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_5_For_2_Template(rf, ctx) { if (rf & 1) {
629
- const _r18 = i0.ɵɵgetCurrentView();
630
- i0.ɵɵelementStart(0, "div", 119);
631
- i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_5_For_2_Template_div_click_0_listener() { const action_r19 = i0.ɵɵrestoreView(_r18).$implicit; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.navigateToEntity("Actions", action_r19.ID)); });
632
- i0.ɵɵelementStart(1, "div", 84);
633
- i0.ɵɵelement(2, "i");
661
+ i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_25_ng_template_2_Conditional_5_For_2_Template_div_click_0_listener() { const cycle_r27 = i0.ɵɵrestoreView(_r26).$implicit; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.navigateToEntity("AI Agent Learning Cycles", cycle_r27.ID)); });
662
+ i0.ɵɵelementStart(1, "div", 47);
663
+ i0.ɵɵelement(2, "i", 86);
634
664
  i0.ɵɵelementEnd();
635
- i0.ɵɵelementStart(3, "div", 86)(4, "div", 87);
665
+ i0.ɵɵelementStart(3, "div", 48)(4, "div", 49);
636
666
  i0.ɵɵtext(5);
637
667
  i0.ɵɵelementEnd();
638
- i0.ɵɵtemplate(6, AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_5_For_2_Conditional_6_Template, 2, 1, "div", 88);
639
- i0.ɵɵelementStart(7, "div", 89);
640
- i0.ɵɵtemplate(8, AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_5_For_2_Conditional_8_Template, 2, 1, "span", 90);
641
- i0.ɵɵelementStart(9, "span", 120);
642
- i0.ɵɵelement(10, "i", 121);
643
- i0.ɵɵtext(11);
644
- i0.ɵɵelementEnd()()();
645
- i0.ɵɵelementStart(12, "div", 91);
646
- i0.ɵɵtemplate(13, AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_5_For_2_Conditional_13_Template, 2, 0, "button", 122);
647
- i0.ɵɵelement(14, "i", 93);
668
+ i0.ɵɵelementStart(6, "div", 51);
669
+ i0.ɵɵtemplate(7, AIAgentFormComponentExtended_form_2_Conditional_25_ng_template_2_Conditional_5_For_2_Conditional_7_Template, 4, 4, "span", 52)(8, AIAgentFormComponentExtended_form_2_Conditional_25_ng_template_2_Conditional_5_For_2_Conditional_8_Template, 2, 1, "span", 53);
670
+ i0.ɵɵelementEnd()();
671
+ i0.ɵɵelementStart(9, "div", 55);
672
+ i0.ɵɵelement(10, "i", 57);
648
673
  i0.ɵɵelementEnd()();
649
674
  } if (rf & 2) {
650
- const action_r19 = ctx.$implicit;
651
- const ctx_r1 = i0.ɵɵnextContext(5);
652
- i0.ɵɵadvance(2);
653
- i0.ɵɵclassMap(ctx_r1.getActionIcon(action_r19));
654
- i0.ɵɵadvance(3);
655
- i0.ɵɵtextInterpolate(action_r19.Name || "Untitled Action");
656
- i0.ɵɵadvance();
657
- i0.ɵɵconditional(action_r19.Description ? 6 : -1);
675
+ const cycle_r27 = ctx.$implicit;
676
+ i0.ɵɵadvance(5);
677
+ i0.ɵɵtextInterpolate1("Learning Cycle ", cycle_r27.ID.substring(0, 8), "");
658
678
  i0.ɵɵadvance(2);
659
- i0.ɵɵconditional(action_r19.Type ? 8 : -1);
660
- i0.ɵɵadvance();
661
- i0.ɵɵclassProp("active", action_r19.Status === "Active")("inactive", action_r19.Status !== "Active");
679
+ i0.ɵɵconditional(cycle_r27.StartedAt ? 7 : -1);
662
680
  i0.ɵɵadvance();
663
- i0.ɵɵclassProp("fa-check-circle", action_r19.Status === "Active")("fa-times-circle", action_r19.Status !== "Active");
664
- i0.ɵɵadvance();
665
- i0.ɵɵtextInterpolate1(" ", action_r19.Status, " ");
666
- i0.ɵɵadvance(2);
667
- i0.ɵɵconditional(ctx_r1.EditMode ? 13 : -1);
681
+ i0.ɵɵconditional(cycle_r27.Status ? 8 : -1);
668
682
  } }
669
- function AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_5_Conditional_3_Template(rf, ctx) { if (rf & 1) {
670
- const _r21 = i0.ɵɵgetCurrentView();
671
- i0.ɵɵelementStart(0, "div", 65);
672
- i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_5_Conditional_3_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r21); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.navigateToEntity("AI Agent Actions", "")); });
683
+ function AIAgentFormComponentExtended_form_2_Conditional_25_ng_template_2_Conditional_5_Conditional_3_Template(rf, ctx) { if (rf & 1) {
684
+ const _r28 = i0.ɵɵgetCurrentView();
685
+ i0.ɵɵelementStart(0, "div", 60);
686
+ i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_25_ng_template_2_Conditional_5_Conditional_3_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r28); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.navigateToEntity("AI Agent Learning Cycles", "")); });
673
687
  i0.ɵɵelementStart(1, "span");
674
688
  i0.ɵɵtext(2);
675
689
  i0.ɵɵelementEnd()();
676
690
  } if (rf & 2) {
677
691
  const ctx_r1 = i0.ɵɵnextContext(5);
678
692
  i0.ɵɵadvance(2);
679
- i0.ɵɵtextInterpolate1("View all ", ctx_r1.actionCount, " actions...");
693
+ i0.ɵɵtextInterpolate1("View all ", ctx_r1.learningCycleCount, " cycles...");
680
694
  } }
681
- function AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_5_Template(rf, ctx) { if (rf & 1) {
682
- i0.ɵɵelementStart(0, "div", 76);
683
- i0.ɵɵrepeaterCreate(1, AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_5_For_2_Template, 15, 15, "div", 118, _forTrack0);
684
- i0.ɵɵtemplate(3, AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_5_Conditional_3_Template, 3, 1, "div", 40);
695
+ function AIAgentFormComponentExtended_form_2_Conditional_25_ng_template_2_Conditional_5_Template(rf, ctx) { if (rf & 1) {
696
+ i0.ɵɵelementStart(0, "div", 39);
697
+ i0.ɵɵrepeaterCreate(1, AIAgentFormComponentExtended_form_2_Conditional_25_ng_template_2_Conditional_5_For_2_Template, 11, 3, "div", 87, _forTrack0);
698
+ i0.ɵɵtemplate(3, AIAgentFormComponentExtended_form_2_Conditional_25_ng_template_2_Conditional_5_Conditional_3_Template, 3, 1, "div", 45);
685
699
  i0.ɵɵelementEnd();
686
700
  } if (rf & 2) {
687
701
  const ctx_r1 = i0.ɵɵnextContext(4);
688
702
  i0.ɵɵadvance();
689
- i0.ɵɵrepeater(ctx_r1.agentActions);
703
+ i0.ɵɵrepeater(ctx_r1.learningCycles);
690
704
  i0.ɵɵadvance(2);
691
- i0.ɵɵconditional(ctx_r1.actionCount > ctx_r1.agentActions.length ? 3 : -1);
705
+ i0.ɵɵconditional(ctx_r1.learningCycleCount > ctx_r1.learningCycles.length ? 3 : -1);
692
706
  } }
693
- function AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Template(rf, ctx) { if (rf & 1) {
694
- i0.ɵɵelementStart(0, "div", 67)(1, "div", 35)(2, "div", 74);
695
- i0.ɵɵtemplate(3, AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_3_Template, 3, 0, "button", 75);
707
+ function AIAgentFormComponentExtended_form_2_Conditional_25_ng_template_2_Template(rf, ctx) { if (rf & 1) {
708
+ i0.ɵɵelementStart(0, "div", 34)(1, "div", 35)(2, "div", 61);
709
+ i0.ɵɵtext(3, " Monitor and manage learning cycles, training sessions, and performance analytics. ");
696
710
  i0.ɵɵelementEnd()();
697
- i0.ɵɵtemplate(4, AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_4_Template, 7, 1, "div", 37)(5, AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_5_Template, 4, 1, "div", 76);
711
+ i0.ɵɵtemplate(4, AIAgentFormComponentExtended_form_2_Conditional_25_ng_template_2_Conditional_4_Template, 6, 0, "div", 38)(5, AIAgentFormComponentExtended_form_2_Conditional_25_ng_template_2_Conditional_5_Template, 4, 1, "div", 39);
698
712
  i0.ɵɵelementEnd();
699
713
  } if (rf & 2) {
700
714
  const ctx_r1 = i0.ɵɵnextContext(3);
701
- i0.ɵɵadvance(3);
702
- i0.ɵɵconditional(ctx_r1.EditMode ? 3 : -1);
703
- i0.ɵɵadvance();
704
- i0.ɵɵconditional(ctx_r1.actionCount === 0 ? 4 : 5);
715
+ i0.ɵɵadvance(4);
716
+ i0.ɵɵconditional(ctx_r1.learningCycleCount === 0 ? 4 : 5);
705
717
  } }
706
- function AIAgentFormComponentExtended_form_2_Conditional_27_Template(rf, ctx) { if (rf & 1) {
718
+ function AIAgentFormComponentExtended_form_2_Conditional_25_Template(rf, ctx) { if (rf & 1) {
707
719
  i0.ɵɵelementStart(0, "kendo-panelbar-item", 24);
708
- i0.ɵɵtemplate(1, AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_1_Template, 2, 1, "ng-template", 25)(2, AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Template, 6, 2, "ng-template", 26);
720
+ i0.ɵɵtemplate(1, AIAgentFormComponentExtended_form_2_Conditional_25_ng_template_1_Template, 2, 1, "ng-template", 25)(2, AIAgentFormComponentExtended_form_2_Conditional_25_ng_template_2_Template, 6, 1, "ng-template", 26);
709
721
  i0.ɵɵelementEnd();
710
722
  } if (rf & 2) {
711
723
  i0.ɵɵproperty("expanded", false);
712
724
  } }
713
- function AIAgentFormComponentExtended_form_2_Conditional_28_ng_template_1_Template(rf, ctx) { if (rf & 1) {
714
- i0.ɵɵelement(0, "i", 30);
725
+ function AIAgentFormComponentExtended_form_2_Conditional_26_ng_template_1_Template(rf, ctx) { if (rf & 1) {
726
+ i0.ɵɵelement(0, "i", 90);
715
727
  i0.ɵɵtext(1);
716
728
  } if (rf & 2) {
717
729
  const ctx_r1 = i0.ɵɵnextContext(3);
718
730
  i0.ɵɵadvance();
719
- i0.ɵɵtextInterpolate1(" Sub-Agents", ctx_r1.subAgentCount > 0 ? " (" + ctx_r1.subAgentCount + ")" : "", " ");
731
+ i0.ɵɵtextInterpolate1(" Notes", ctx_r1.noteCount > 0 ? " (" + ctx_r1.noteCount + ")" : "", " ");
720
732
  } }
721
- function AIAgentFormComponentExtended_form_2_Conditional_28_ng_template_2_Conditional_5_Template(rf, ctx) { if (rf & 1) {
722
- const _r22 = i0.ɵɵgetCurrentView();
723
- i0.ɵɵelementStart(0, "button", 78);
724
- i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_28_ng_template_2_Conditional_5_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r22); const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.createSubAgent()); });
725
- i0.ɵɵelement(1, "i", 79);
726
- i0.ɵɵtext(2, " Add Sub-Agent ");
733
+ function AIAgentFormComponentExtended_form_2_Conditional_26_ng_template_2_Conditional_5_Template(rf, ctx) { if (rf & 1) {
734
+ const _r29 = i0.ɵɵgetCurrentView();
735
+ i0.ɵɵelementStart(0, "button", 40);
736
+ i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_26_ng_template_2_Conditional_5_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r29); const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.addNote()); });
737
+ i0.ɵɵelement(1, "i", 41);
738
+ i0.ɵɵtext(2, " Add Note ");
727
739
  i0.ɵɵelementEnd();
728
740
  } }
729
- function AIAgentFormComponentExtended_form_2_Conditional_28_ng_template_2_Conditional_6_Conditional_6_Template(rf, ctx) { if (rf & 1) {
730
- const _r23 = i0.ɵɵgetCurrentView();
731
- i0.ɵɵelementStart(0, "button", 81);
732
- i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_28_ng_template_2_Conditional_6_Conditional_6_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r23); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.createSubAgent()); });
733
- i0.ɵɵelement(1, "i", 79);
734
- i0.ɵɵtext(2, " Create First Sub-Agent ");
741
+ function AIAgentFormComponentExtended_form_2_Conditional_26_ng_template_2_Conditional_6_Conditional_6_Template(rf, ctx) { if (rf & 1) {
742
+ const _r30 = i0.ɵɵgetCurrentView();
743
+ i0.ɵɵelementStart(0, "button", 43);
744
+ i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_26_ng_template_2_Conditional_6_Conditional_6_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r30); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.addNote()); });
745
+ i0.ɵɵelement(1, "i", 41);
746
+ i0.ɵɵtext(2, " Create First Note ");
735
747
  i0.ɵɵelementEnd();
736
748
  } }
737
- function AIAgentFormComponentExtended_form_2_Conditional_28_ng_template_2_Conditional_6_Template(rf, ctx) { if (rf & 1) {
738
- i0.ɵɵelementStart(0, "div", 37);
739
- i0.ɵɵelement(1, "i", 30);
749
+ function AIAgentFormComponentExtended_form_2_Conditional_26_ng_template_2_Conditional_6_Template(rf, ctx) { if (rf & 1) {
750
+ i0.ɵɵelementStart(0, "div", 38);
751
+ i0.ɵɵelement(1, "i", 90);
740
752
  i0.ɵɵelementStart(2, "h4");
741
- i0.ɵɵtext(3, "No Sub-Agents");
753
+ i0.ɵɵtext(3, "No Notes");
742
754
  i0.ɵɵelementEnd();
743
755
  i0.ɵɵelementStart(4, "p");
744
- i0.ɵɵtext(5, "Create sub-agents to build a hierarchical structure for complex workflows.");
756
+ i0.ɵɵtext(5, "Add notes to document important information, observations, or instructions for this agent.");
745
757
  i0.ɵɵelementEnd();
746
- i0.ɵɵtemplate(6, AIAgentFormComponentExtended_form_2_Conditional_28_ng_template_2_Conditional_6_Conditional_6_Template, 3, 0, "button", 80);
758
+ i0.ɵɵtemplate(6, AIAgentFormComponentExtended_form_2_Conditional_26_ng_template_2_Conditional_6_Conditional_6_Template, 3, 0, "button", 42);
747
759
  i0.ɵɵelementEnd();
748
760
  } if (rf & 2) {
749
761
  const ctx_r1 = i0.ɵɵnextContext(4);
750
762
  i0.ɵɵadvance(6);
751
- i0.ɵɵconditional(ctx_r1.EditMode ? 6 : -1);
752
- } }
753
- function AIAgentFormComponentExtended_form_2_Conditional_28_ng_template_2_Conditional_7_For_2_Conditional_2_Template(rf, ctx) { if (rf & 1) {
754
- i0.ɵɵelement(0, "img", 126);
755
- } if (rf & 2) {
756
- const subAgent_r25 = i0.ɵɵnextContext().$implicit;
757
- i0.ɵɵproperty("src", subAgent_r25.LogoURL, i0.ɵɵsanitizeUrl)("alt", subAgent_r25.Name + " logo");
758
- } }
759
- function AIAgentFormComponentExtended_form_2_Conditional_28_ng_template_2_Conditional_7_For_2_Conditional_3_Template(rf, ctx) { if (rf & 1) {
760
- i0.ɵɵelement(0, "i");
761
- } if (rf & 2) {
762
- const subAgent_r25 = i0.ɵɵnextContext().$implicit;
763
- const ctx_r1 = i0.ɵɵnextContext(5);
764
- i0.ɵɵclassMap(ctx_r1.getSubAgentIcon(subAgent_r25));
763
+ i0.ɵɵconditional(ctx_r1.EditMode && ctx_r1.UserCanCreateNotes ? 6 : -1);
765
764
  } }
766
- function AIAgentFormComponentExtended_form_2_Conditional_28_ng_template_2_Conditional_7_For_2_Conditional_7_Template(rf, ctx) { if (rf & 1) {
767
- i0.ɵɵelementStart(0, "div", 88);
765
+ function AIAgentFormComponentExtended_form_2_Conditional_26_ng_template_2_Conditional_7_For_2_Conditional_6_Template(rf, ctx) { if (rf & 1) {
766
+ i0.ɵɵelementStart(0, "div", 50);
768
767
  i0.ɵɵtext(1);
769
768
  i0.ɵɵelementEnd();
770
769
  } if (rf & 2) {
771
- const subAgent_r25 = i0.ɵɵnextContext().$implicit;
770
+ const note_r32 = i0.ɵɵnextContext().$implicit;
772
771
  i0.ɵɵadvance();
773
- i0.ɵɵtextInterpolate(subAgent_r25.Description);
772
+ i0.ɵɵtextInterpolate2("", note_r32.Note.substring(0, 100), "", note_r32.Note.length > 100 ? "..." : "", "");
774
773
  } }
775
- function AIAgentFormComponentExtended_form_2_Conditional_28_ng_template_2_Conditional_7_For_2_Conditional_9_Template(rf, ctx) { if (rf & 1) {
776
- i0.ɵɵelementStart(0, "span", 120);
777
- i0.ɵɵtext(1);
778
- i0.ɵɵelementEnd();
779
- } if (rf & 2) {
780
- const subAgent_r25 = i0.ɵɵnextContext().$implicit;
781
- const ctx_r1 = i0.ɵɵnextContext(5);
782
- i0.ɵɵstyleProp("background-color", ctx_r1.getStatusBadgeColor());
783
- i0.ɵɵadvance();
784
- i0.ɵɵtextInterpolate1(" ", subAgent_r25.Status, " ");
785
- } }
786
- function AIAgentFormComponentExtended_form_2_Conditional_28_ng_template_2_Conditional_7_For_2_Conditional_10_Template(rf, ctx) { if (rf & 1) {
787
- i0.ɵɵelementStart(0, "span", 90);
788
- i0.ɵɵtext(1);
774
+ function AIAgentFormComponentExtended_form_2_Conditional_26_ng_template_2_Conditional_7_For_2_Conditional_8_Template(rf, ctx) { if (rf & 1) {
775
+ i0.ɵɵelementStart(0, "span", 52);
776
+ i0.ɵɵelement(1, "i", 89);
777
+ i0.ɵɵtext(2);
778
+ i0.ɵɵpipe(3, "date");
789
779
  i0.ɵɵelementEnd();
790
780
  } if (rf & 2) {
791
- const subAgent_r25 = i0.ɵɵnextContext().$implicit;
792
- i0.ɵɵadvance();
793
- i0.ɵɵtextInterpolate(subAgent_r25.ExecutionMode);
781
+ const note_r32 = i0.ɵɵnextContext().$implicit;
782
+ i0.ɵɵadvance(2);
783
+ i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(3, 1, note_r32.__mj_CreatedAt, "short"), " ");
794
784
  } }
795
- function AIAgentFormComponentExtended_form_2_Conditional_28_ng_template_2_Conditional_7_For_2_Template(rf, ctx) { if (rf & 1) {
796
- const _r24 = i0.ɵɵgetCurrentView();
797
- i0.ɵɵelementStart(0, "div", 125);
798
- i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_28_ng_template_2_Conditional_7_For_2_Template_div_click_0_listener() { const subAgent_r25 = i0.ɵɵrestoreView(_r24).$implicit; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.navigateToEntity("AI Agents", subAgent_r25.ID)); });
799
- i0.ɵɵelementStart(1, "div", 84);
800
- i0.ɵɵtemplate(2, AIAgentFormComponentExtended_form_2_Conditional_28_ng_template_2_Conditional_7_For_2_Conditional_2_Template, 1, 2, "img", 126)(3, AIAgentFormComponentExtended_form_2_Conditional_28_ng_template_2_Conditional_7_For_2_Conditional_3_Template, 1, 2, "i", 11);
785
+ function AIAgentFormComponentExtended_form_2_Conditional_26_ng_template_2_Conditional_7_For_2_Template(rf, ctx) { if (rf & 1) {
786
+ const _r31 = i0.ɵɵgetCurrentView();
787
+ i0.ɵɵelementStart(0, "div", 92);
788
+ i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_26_ng_template_2_Conditional_7_For_2_Template_div_click_0_listener() { const note_r32 = i0.ɵɵrestoreView(_r31).$implicit; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.navigateToEntity("AI Agent Notes", note_r32.ID)); });
789
+ i0.ɵɵelementStart(1, "div", 47);
790
+ i0.ɵɵelement(2, "i", 90);
801
791
  i0.ɵɵelementEnd();
802
- i0.ɵɵelementStart(4, "div", 86)(5, "div", 87);
803
- i0.ɵɵtext(6);
792
+ i0.ɵɵelementStart(3, "div", 48)(4, "div", 49);
793
+ i0.ɵɵtext(5);
804
794
  i0.ɵɵelementEnd();
805
- i0.ɵɵtemplate(7, AIAgentFormComponentExtended_form_2_Conditional_28_ng_template_2_Conditional_7_For_2_Conditional_7_Template, 2, 1, "div", 88);
806
- i0.ɵɵelementStart(8, "div", 89);
807
- i0.ɵɵtemplate(9, AIAgentFormComponentExtended_form_2_Conditional_28_ng_template_2_Conditional_7_For_2_Conditional_9_Template, 2, 3, "span", 127)(10, AIAgentFormComponentExtended_form_2_Conditional_28_ng_template_2_Conditional_7_For_2_Conditional_10_Template, 2, 1, "span", 90);
795
+ i0.ɵɵtemplate(6, AIAgentFormComponentExtended_form_2_Conditional_26_ng_template_2_Conditional_7_For_2_Conditional_6_Template, 2, 2, "div", 50);
796
+ i0.ɵɵelementStart(7, "div", 51);
797
+ i0.ɵɵtemplate(8, AIAgentFormComponentExtended_form_2_Conditional_26_ng_template_2_Conditional_7_For_2_Conditional_8_Template, 4, 4, "span", 52);
808
798
  i0.ɵɵelementEnd()();
809
- i0.ɵɵelementStart(11, "div", 91);
810
- i0.ɵɵelement(12, "i", 93);
799
+ i0.ɵɵelementStart(9, "div", 55);
800
+ i0.ɵɵelement(10, "i", 57);
811
801
  i0.ɵɵelementEnd()();
812
802
  } if (rf & 2) {
813
- const subAgent_r25 = ctx.$implicit;
814
- const ctx_r1 = i0.ɵɵnextContext(5);
815
- i0.ɵɵadvance(2);
816
- i0.ɵɵconditional(ctx_r1.hasSubAgentLogoURL(subAgent_r25) ? 2 : 3);
817
- i0.ɵɵadvance(4);
818
- i0.ɵɵtextInterpolate(subAgent_r25.Name || "Untitled Sub-Agent");
803
+ const note_r32 = ctx.$implicit;
804
+ i0.ɵɵadvance(5);
805
+ i0.ɵɵtextInterpolate(note_r32.Type || "Note");
819
806
  i0.ɵɵadvance();
820
- i0.ɵɵconditional(subAgent_r25.Description ? 7 : -1);
807
+ i0.ɵɵconditional(note_r32.Note ? 6 : -1);
821
808
  i0.ɵɵadvance(2);
822
- i0.ɵɵconditional(subAgent_r25.Status ? 9 : -1);
823
- i0.ɵɵadvance();
824
- i0.ɵɵconditional(subAgent_r25.ExecutionMode ? 10 : -1);
809
+ i0.ɵɵconditional(note_r32.__mj_CreatedAt ? 8 : -1);
825
810
  } }
826
- function AIAgentFormComponentExtended_form_2_Conditional_28_ng_template_2_Conditional_7_Conditional_3_Template(rf, ctx) { if (rf & 1) {
827
- const _r26 = i0.ɵɵgetCurrentView();
828
- i0.ɵɵelementStart(0, "div", 65);
829
- i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_28_ng_template_2_Conditional_7_Conditional_3_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r26); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.navigateToEntity("AI Agents", "")); });
811
+ function AIAgentFormComponentExtended_form_2_Conditional_26_ng_template_2_Conditional_7_Conditional_3_Template(rf, ctx) { if (rf & 1) {
812
+ const _r33 = i0.ɵɵgetCurrentView();
813
+ i0.ɵɵelementStart(0, "div", 60);
814
+ i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_26_ng_template_2_Conditional_7_Conditional_3_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r33); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.navigateToEntity("AI Agent Notes", "")); });
830
815
  i0.ɵɵelementStart(1, "span");
831
816
  i0.ɵɵtext(2);
832
817
  i0.ɵɵelementEnd()();
833
818
  } if (rf & 2) {
834
819
  const ctx_r1 = i0.ɵɵnextContext(5);
835
820
  i0.ɵɵadvance(2);
836
- i0.ɵɵtextInterpolate1("View all ", ctx_r1.subAgentCount, " sub-agents...");
821
+ i0.ɵɵtextInterpolate1("View all ", ctx_r1.noteCount, " notes...");
837
822
  } }
838
- function AIAgentFormComponentExtended_form_2_Conditional_28_ng_template_2_Conditional_7_Template(rf, ctx) { if (rf & 1) {
839
- i0.ɵɵelementStart(0, "div", 76);
840
- i0.ɵɵrepeaterCreate(1, AIAgentFormComponentExtended_form_2_Conditional_28_ng_template_2_Conditional_7_For_2_Template, 13, 5, "div", 124, _forTrack0);
841
- i0.ɵɵtemplate(3, AIAgentFormComponentExtended_form_2_Conditional_28_ng_template_2_Conditional_7_Conditional_3_Template, 3, 1, "div", 40);
823
+ function AIAgentFormComponentExtended_form_2_Conditional_26_ng_template_2_Conditional_7_Template(rf, ctx) { if (rf & 1) {
824
+ i0.ɵɵelementStart(0, "div", 39);
825
+ i0.ɵɵrepeaterCreate(1, AIAgentFormComponentExtended_form_2_Conditional_26_ng_template_2_Conditional_7_For_2_Template, 11, 3, "div", 91, _forTrack0);
826
+ i0.ɵɵtemplate(3, AIAgentFormComponentExtended_form_2_Conditional_26_ng_template_2_Conditional_7_Conditional_3_Template, 3, 1, "div", 45);
842
827
  i0.ɵɵelementEnd();
843
828
  } if (rf & 2) {
844
829
  const ctx_r1 = i0.ɵɵnextContext(4);
845
830
  i0.ɵɵadvance();
846
- i0.ɵɵrepeater(ctx_r1.subAgents);
831
+ i0.ɵɵrepeater(ctx_r1.agentNotes);
847
832
  i0.ɵɵadvance(2);
848
- i0.ɵɵconditional(ctx_r1.subAgentCount > ctx_r1.subAgents.length ? 3 : -1);
833
+ i0.ɵɵconditional(ctx_r1.noteCount > ctx_r1.agentNotes.length ? 3 : -1);
849
834
  } }
850
- function AIAgentFormComponentExtended_form_2_Conditional_28_ng_template_2_Template(rf, ctx) { if (rf & 1) {
851
- i0.ɵɵelementStart(0, "div", 67)(1, "div", 35)(2, "div", 36);
852
- i0.ɵɵtext(3, " Manage hierarchical relationships with child agents that work under this agent. ");
835
+ function AIAgentFormComponentExtended_form_2_Conditional_26_ng_template_2_Template(rf, ctx) { if (rf & 1) {
836
+ i0.ɵɵelementStart(0, "div", 34)(1, "div", 35)(2, "div", 61);
837
+ i0.ɵɵtext(3, " Manage notes, documentation, and annotations for this agent. ");
853
838
  i0.ɵɵelementEnd();
854
- i0.ɵɵelementStart(4, "div", 74);
855
- i0.ɵɵtemplate(5, AIAgentFormComponentExtended_form_2_Conditional_28_ng_template_2_Conditional_5_Template, 3, 0, "button", 75);
839
+ i0.ɵɵelementStart(4, "div", 36);
840
+ i0.ɵɵtemplate(5, AIAgentFormComponentExtended_form_2_Conditional_26_ng_template_2_Conditional_5_Template, 3, 0, "button", 37);
856
841
  i0.ɵɵelementEnd()();
857
- i0.ɵɵtemplate(6, AIAgentFormComponentExtended_form_2_Conditional_28_ng_template_2_Conditional_6_Template, 7, 1, "div", 37)(7, AIAgentFormComponentExtended_form_2_Conditional_28_ng_template_2_Conditional_7_Template, 4, 1, "div", 76);
842
+ i0.ɵɵtemplate(6, AIAgentFormComponentExtended_form_2_Conditional_26_ng_template_2_Conditional_6_Template, 7, 1, "div", 38)(7, AIAgentFormComponentExtended_form_2_Conditional_26_ng_template_2_Conditional_7_Template, 4, 1, "div", 39);
858
843
  i0.ɵɵelementEnd();
859
844
  } if (rf & 2) {
860
845
  const ctx_r1 = i0.ɵɵnextContext(3);
861
846
  i0.ɵɵadvance(5);
862
- i0.ɵɵconditional(ctx_r1.EditMode ? 5 : -1);
847
+ i0.ɵɵconditional(ctx_r1.EditMode && ctx_r1.UserCanCreateNotes ? 5 : -1);
863
848
  i0.ɵɵadvance();
864
- i0.ɵɵconditional(ctx_r1.subAgentCount === 0 ? 6 : 7);
849
+ i0.ɵɵconditional(ctx_r1.noteCount === 0 ? 6 : 7);
865
850
  } }
866
- function AIAgentFormComponentExtended_form_2_Conditional_28_Template(rf, ctx) { if (rf & 1) {
851
+ function AIAgentFormComponentExtended_form_2_Conditional_26_Template(rf, ctx) { if (rf & 1) {
867
852
  i0.ɵɵelementStart(0, "kendo-panelbar-item", 24);
868
- i0.ɵɵtemplate(1, AIAgentFormComponentExtended_form_2_Conditional_28_ng_template_1_Template, 2, 1, "ng-template", 25)(2, AIAgentFormComponentExtended_form_2_Conditional_28_ng_template_2_Template, 8, 2, "ng-template", 26);
853
+ i0.ɵɵtemplate(1, AIAgentFormComponentExtended_form_2_Conditional_26_ng_template_1_Template, 2, 1, "ng-template", 25)(2, AIAgentFormComponentExtended_form_2_Conditional_26_ng_template_2_Template, 8, 2, "ng-template", 26);
869
854
  i0.ɵɵelementEnd();
870
855
  } if (rf & 2) {
871
856
  i0.ɵɵproperty("expanded", false);
872
857
  } }
873
- function AIAgentFormComponentExtended_form_2_ng_template_30_Template(rf, ctx) { if (rf & 1) {
874
- i0.ɵɵelement(0, "i", 128);
875
- i0.ɵɵtext(1, " Execution Guardrails ");
876
- } }
877
- function AIAgentFormComponentExtended_form_2_ng_template_31_Template(rf, ctx) { if (rf & 1) {
878
- i0.ɵɵelementStart(0, "div", 67)(1, "div", 35)(2, "div", 36);
879
- i0.ɵɵtext(3, " Set limits to prevent runaway agent executions and control resource usage. ");
880
- i0.ɵɵelementEnd()();
881
- i0.ɵɵelementStart(4, "div", 129);
882
- i0.ɵɵelement(5, "mj-form-field", 130)(6, "mj-form-field", 131)(7, "mj-form-field", 132)(8, "mj-form-field", 133);
883
- i0.ɵɵelementEnd()();
858
+ function AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_1_Template(rf, ctx) { if (rf & 1) {
859
+ i0.ɵɵelement(0, "i", 93);
860
+ i0.ɵɵtext(1);
884
861
  } if (rf & 2) {
885
- const ctx_r1 = i0.ɵɵnextContext(2);
886
- i0.ɵɵadvance(5);
887
- i0.ɵɵproperty("EditMode", ctx_r1.EditMode)("record", ctx_r1.record);
888
- i0.ɵɵadvance();
889
- i0.ɵɵproperty("EditMode", ctx_r1.EditMode)("record", ctx_r1.record);
890
- i0.ɵɵadvance();
891
- i0.ɵɵproperty("EditMode", ctx_r1.EditMode)("record", ctx_r1.record);
862
+ const ctx_r1 = i0.ɵɵnextContext(3);
892
863
  i0.ɵɵadvance();
893
- i0.ɵɵproperty("EditMode", ctx_r1.EditMode)("record", ctx_r1.record);
894
- } }
895
- function AIAgentFormComponentExtended_form_2_ng_template_33_Template(rf, ctx) { if (rf & 1) {
896
- i0.ɵɵelement(0, "i", 99);
897
- i0.ɵɵtext(1, " Configuration ");
864
+ i0.ɵɵtextInterpolate1(" Execution History", ctx_r1.executionHistoryCount > 0 ? " (" + ctx_r1.executionHistoryCount + ")" : "", " ");
898
865
  } }
899
- function AIAgentFormComponentExtended_form_2_ng_template_34_Template(rf, ctx) { if (rf & 1) {
900
- i0.ɵɵelementStart(0, "div", 67)(1, "div", 35)(2, "div", 36);
901
- i0.ɵɵtext(3, " Advanced configuration settings for agent behavior and execution. ");
902
- i0.ɵɵelementEnd()();
903
- i0.ɵɵelementStart(4, "div", 129);
904
- i0.ɵɵelement(5, "mj-form-field", 134)(6, "mj-form-field", 135)(7, "mj-form-field", 136)(8, "mj-form-field", 137)(9, "mj-form-field", 138)(10, "mj-form-field", 139)(11, "mj-form-field", 140)(12, "mj-form-field", 141)(13, "mj-form-field", 142);
866
+ function AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_4_Template(rf, ctx) { if (rf & 1) {
867
+ i0.ɵɵelementStart(0, "div", 38);
868
+ i0.ɵɵelement(1, "i", 93);
869
+ i0.ɵɵelementStart(2, "h4");
870
+ i0.ɵɵtext(3, "No Execution History");
905
871
  i0.ɵɵelementEnd();
906
- i0.ɵɵelementStart(14, "div", 143)(15, "h4", 98);
907
- i0.ɵɵelement(16, "i", 144);
908
- i0.ɵɵtext(17, " Context Compression ");
909
- i0.ɵɵelementEnd()();
910
- i0.ɵɵelementStart(18, "div", 129);
911
- i0.ɵɵelement(19, "mj-form-field", 145)(20, "mj-form-field", 146)(21, "mj-form-field", 147)(22, "mj-form-field", 148);
872
+ i0.ɵɵelementStart(4, "p");
873
+ i0.ɵɵtext(5, "This agent hasn't been executed yet. Use the Test Agent button to run the agent and see execution history here.");
912
874
  i0.ɵɵelementEnd()();
875
+ } }
876
+ function AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_5_For_2_Conditional_16_Template(rf, ctx) { if (rf & 1) {
877
+ i0.ɵɵelementStart(0, "span", 105);
878
+ i0.ɵɵelement(1, "i", 111);
879
+ i0.ɵɵtext(2);
880
+ i0.ɵɵelementEnd();
913
881
  } if (rf & 2) {
914
- const ctx_r1 = i0.ɵɵnextContext(2);
915
- i0.ɵɵadvance(5);
916
- i0.ɵɵproperty("EditMode", ctx_r1.EditMode)("record", ctx_r1.record);
917
- i0.ɵɵadvance();
918
- i0.ɵɵproperty("EditMode", ctx_r1.EditMode)("record", ctx_r1.record);
919
- i0.ɵɵadvance();
920
- i0.ɵɵproperty("EditMode", ctx_r1.EditMode)("record", ctx_r1.record);
921
- i0.ɵɵadvance();
922
- i0.ɵɵproperty("EditMode", ctx_r1.EditMode)("record", ctx_r1.record);
923
- i0.ɵɵadvance();
924
- i0.ɵɵproperty("EditMode", ctx_r1.EditMode)("record", ctx_r1.record);
925
- i0.ɵɵadvance();
926
- i0.ɵɵproperty("EditMode", ctx_r1.EditMode)("record", ctx_r1.record);
927
- i0.ɵɵadvance();
928
- i0.ɵɵproperty("EditMode", ctx_r1.EditMode)("record", ctx_r1.record);
929
- i0.ɵɵadvance();
930
- i0.ɵɵproperty("EditMode", ctx_r1.EditMode)("record", ctx_r1.record);
931
- i0.ɵɵadvance();
932
- i0.ɵɵproperty("EditMode", ctx_r1.EditMode)("record", ctx_r1.record);
933
- i0.ɵɵadvance(6);
934
- i0.ɵɵproperty("EditMode", ctx_r1.EditMode)("record", ctx_r1.record);
935
- i0.ɵɵadvance();
936
- i0.ɵɵproperty("EditMode", ctx_r1.EditMode)("record", ctx_r1.record);
937
- i0.ɵɵadvance();
938
- i0.ɵɵproperty("EditMode", ctx_r1.EditMode)("record", ctx_r1.record);
939
- i0.ɵɵadvance();
940
- i0.ɵɵproperty("EditMode", ctx_r1.EditMode)("record", ctx_r1.record);
882
+ const execution_r35 = i0.ɵɵnextContext().$implicit;
883
+ const ctx_r1 = i0.ɵɵnextContext(5);
884
+ i0.ɵɵadvance(2);
885
+ i0.ɵɵtextInterpolate1(" ", ctx_r1.formatExecutionTimeFromDates(execution_r35.StartedAt, execution_r35.CompletedAt), " ");
941
886
  } }
942
- function AIAgentFormComponentExtended_form_2_Conditional_35_ng_template_1_Template(rf, ctx) { if (rf & 1) {
943
- i0.ɵɵelement(0, "i", 149);
887
+ function AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_5_For_2_Conditional_20_Template(rf, ctx) { if (rf & 1) {
888
+ i0.ɵɵelementStart(0, "div", 109);
944
889
  i0.ɵɵtext(1);
890
+ i0.ɵɵelementEnd();
945
891
  } if (rf & 2) {
946
- const ctx_r1 = i0.ɵɵnextContext(3);
892
+ const execution_r35 = i0.ɵɵnextContext().$implicit;
893
+ const ctx_r1 = i0.ɵɵnextContext(5);
947
894
  i0.ɵɵadvance();
948
- i0.ɵɵtextInterpolate1(" Notes", ctx_r1.noteCount > 0 ? " (" + ctx_r1.noteCount + ")" : "", " ");
895
+ i0.ɵɵtextInterpolate(ctx_r1.getExecutionResultPreview(execution_r35, true));
949
896
  } }
950
- function AIAgentFormComponentExtended_form_2_Conditional_35_ng_template_2_Conditional_5_Template(rf, ctx) { if (rf & 1) {
951
- const _r27 = i0.ɵɵgetCurrentView();
952
- i0.ɵɵelementStart(0, "button", 78);
953
- i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_35_ng_template_2_Conditional_5_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r27); const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.addNote()); });
954
- i0.ɵɵelement(1, "i", 79);
955
- i0.ɵɵtext(2, " Add Note ");
897
+ function AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_5_For_2_Conditional_21_Conditional_1_Template(rf, ctx) { if (rf & 1) {
898
+ i0.ɵɵelementStart(0, "div", 112)(1, "h5");
899
+ i0.ɵɵtext(2, "Result");
956
900
  i0.ɵɵelementEnd();
957
- } }
958
- function AIAgentFormComponentExtended_form_2_Conditional_35_ng_template_2_Conditional_6_Conditional_6_Template(rf, ctx) { if (rf & 1) {
959
- const _r28 = i0.ɵɵgetCurrentView();
960
- i0.ɵɵelementStart(0, "button", 81);
961
- i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_35_ng_template_2_Conditional_6_Conditional_6_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r28); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.addNote()); });
962
- i0.ɵɵelement(1, "i", 79);
963
- i0.ɵɵtext(2, " Create First Note ");
901
+ i0.ɵɵelement(3, "mj-code-editor", 118);
964
902
  i0.ɵɵelementEnd();
903
+ } if (rf & 2) {
904
+ const execution_r35 = i0.ɵɵnextContext(2).$implicit;
905
+ const ctx_r1 = i0.ɵɵnextContext(5);
906
+ i0.ɵɵadvance(3);
907
+ i0.ɵɵproperty("value", ctx_r1.getExecutionResultPreview(execution_r35, false))("readonly", true)("lineWrapping", true);
965
908
  } }
966
- function AIAgentFormComponentExtended_form_2_Conditional_35_ng_template_2_Conditional_6_Template(rf, ctx) { if (rf & 1) {
967
- i0.ɵɵelementStart(0, "div", 37);
968
- i0.ɵɵelement(1, "i", 149);
969
- i0.ɵɵelementStart(2, "h4");
970
- i0.ɵɵtext(3, "No Notes");
971
- i0.ɵɵelementEnd();
972
- i0.ɵɵelementStart(4, "p");
973
- i0.ɵɵtext(5, "Add notes to document important information, observations, or instructions for this agent.");
909
+ function AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_5_For_2_Conditional_21_Conditional_2_Template(rf, ctx) { if (rf & 1) {
910
+ i0.ɵɵelementStart(0, "div", 113)(1, "h5");
911
+ i0.ɵɵelement(2, "i", 119);
912
+ i0.ɵɵtext(3, " Error");
974
913
  i0.ɵɵelementEnd();
975
- i0.ɵɵtemplate(6, AIAgentFormComponentExtended_form_2_Conditional_35_ng_template_2_Conditional_6_Conditional_6_Template, 3, 0, "button", 80);
914
+ i0.ɵɵelementStart(4, "div", 120);
915
+ i0.ɵɵtext(5);
916
+ i0.ɵɵelementEnd()();
917
+ } if (rf & 2) {
918
+ const execution_r35 = i0.ɵɵnextContext(2).$implicit;
919
+ i0.ɵɵadvance(5);
920
+ i0.ɵɵtextInterpolate(execution_r35.ErrorMessage);
921
+ } }
922
+ function AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_5_For_2_Conditional_21_Conditional_10_Template(rf, ctx) { if (rf & 1) {
923
+ i0.ɵɵelementStart(0, "div", 115)(1, "span", 116);
924
+ i0.ɵɵtext(2, "Completed:");
976
925
  i0.ɵɵelementEnd();
926
+ i0.ɵɵelementStart(3, "span", 117);
927
+ i0.ɵɵtext(4);
928
+ i0.ɵɵpipe(5, "date");
929
+ i0.ɵɵelementEnd()();
977
930
  } if (rf & 2) {
978
- const ctx_r1 = i0.ɵɵnextContext(4);
979
- i0.ɵɵadvance(6);
980
- i0.ɵɵconditional(ctx_r1.EditMode ? 6 : -1);
931
+ const execution_r35 = i0.ɵɵnextContext(2).$implicit;
932
+ i0.ɵɵadvance(4);
933
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(5, 1, execution_r35.CompletedAt, "medium"));
981
934
  } }
982
- function AIAgentFormComponentExtended_form_2_Conditional_35_ng_template_2_Conditional_7_For_2_Conditional_6_Template(rf, ctx) { if (rf & 1) {
983
- i0.ɵɵelementStart(0, "div", 88);
984
- i0.ɵɵtext(1);
935
+ function AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_5_For_2_Conditional_21_Conditional_11_Template(rf, ctx) { if (rf & 1) {
936
+ i0.ɵɵelementStart(0, "div", 115)(1, "span", 116);
937
+ i0.ɵɵtext(2, "Conversation:");
985
938
  i0.ɵɵelementEnd();
939
+ i0.ɵɵelementStart(3, "span", 117);
940
+ i0.ɵɵtext(4);
941
+ i0.ɵɵelementEnd()();
986
942
  } if (rf & 2) {
987
- const note_r30 = i0.ɵɵnextContext().$implicit;
988
- i0.ɵɵadvance();
989
- i0.ɵɵtextInterpolate2("", note_r30.Note.substring(0, 100), "", note_r30.Note.length > 100 ? "..." : "", "");
943
+ const execution_r35 = i0.ɵɵnextContext(2).$implicit;
944
+ i0.ɵɵadvance(4);
945
+ i0.ɵɵtextInterpolate(execution_r35.ConversationID);
990
946
  } }
991
- function AIAgentFormComponentExtended_form_2_Conditional_35_ng_template_2_Conditional_7_For_2_Conditional_8_Template(rf, ctx) { if (rf & 1) {
992
- i0.ɵɵelementStart(0, "span", 90);
993
- i0.ɵɵelement(1, "i", 152);
994
- i0.ɵɵtext(2);
995
- i0.ɵɵpipe(3, "date");
947
+ function AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_5_For_2_Conditional_21_Template(rf, ctx) { if (rf & 1) {
948
+ i0.ɵɵelementStart(0, "div", 110);
949
+ i0.ɵɵtemplate(1, AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_5_For_2_Conditional_21_Conditional_1_Template, 4, 3, "div", 112)(2, AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_5_For_2_Conditional_21_Conditional_2_Template, 6, 1, "div", 113);
950
+ i0.ɵɵelementStart(3, "div", 114)(4, "div", 115)(5, "span", 116);
951
+ i0.ɵɵtext(6, "Started:");
996
952
  i0.ɵɵelementEnd();
953
+ i0.ɵɵelementStart(7, "span", 117);
954
+ i0.ɵɵtext(8);
955
+ i0.ɵɵpipe(9, "date");
956
+ i0.ɵɵelementEnd()();
957
+ i0.ɵɵtemplate(10, AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_5_For_2_Conditional_21_Conditional_10_Template, 6, 4, "div", 115)(11, AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_5_For_2_Conditional_21_Conditional_11_Template, 5, 1, "div", 115);
958
+ i0.ɵɵelementEnd()();
997
959
  } if (rf & 2) {
998
- const note_r30 = i0.ɵɵnextContext().$implicit;
960
+ const execution_r35 = i0.ɵɵnextContext().$implicit;
961
+ i0.ɵɵadvance();
962
+ i0.ɵɵconditional(execution_r35.Result ? 1 : -1);
963
+ i0.ɵɵadvance();
964
+ i0.ɵɵconditional(execution_r35.ErrorMessage ? 2 : -1);
965
+ i0.ɵɵadvance(6);
966
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(9, 5, execution_r35.StartedAt, "medium"));
999
967
  i0.ɵɵadvance(2);
1000
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(3, 1, note_r30.__mj_CreatedAt, "short"), " ");
968
+ i0.ɵɵconditional(execution_r35.CompletedAt ? 10 : -1);
969
+ i0.ɵɵadvance();
970
+ i0.ɵɵconditional(execution_r35.ConversationID ? 11 : -1);
1001
971
  } }
1002
- function AIAgentFormComponentExtended_form_2_Conditional_35_ng_template_2_Conditional_7_For_2_Template(rf, ctx) { if (rf & 1) {
1003
- const _r29 = i0.ɵɵgetCurrentView();
1004
- i0.ɵɵelementStart(0, "div", 151);
1005
- i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_35_ng_template_2_Conditional_7_For_2_Template_div_click_0_listener() { const note_r30 = i0.ɵɵrestoreView(_r29).$implicit; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.navigateToEntity("AI Agent Notes", note_r30.ID)); });
1006
- i0.ɵɵelementStart(1, "div", 84);
1007
- i0.ɵɵelement(2, "i", 149);
1008
- i0.ɵɵelementEnd();
1009
- i0.ɵɵelementStart(3, "div", 86)(4, "div", 87);
1010
- i0.ɵɵtext(5);
972
+ function AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_5_For_2_Template(rf, ctx) { if (rf & 1) {
973
+ const _r34 = i0.ɵɵgetCurrentView();
974
+ i0.ɵɵelementStart(0, "div", 97)(1, "div")(2, "div", 98);
975
+ i0.ɵɵelement(3, "i");
1011
976
  i0.ɵɵelementEnd();
1012
- i0.ɵɵtemplate(6, AIAgentFormComponentExtended_form_2_Conditional_35_ng_template_2_Conditional_7_For_2_Conditional_6_Template, 2, 2, "div", 88);
1013
- i0.ɵɵelementStart(7, "div", 89);
1014
- i0.ɵɵtemplate(8, AIAgentFormComponentExtended_form_2_Conditional_35_ng_template_2_Conditional_7_For_2_Conditional_8_Template, 4, 4, "span", 90);
977
+ i0.ɵɵelementStart(4, "div", 99)(5, "div", 100);
978
+ i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_5_For_2_Template_div_click_5_listener() { const execution_r35 = i0.ɵɵrestoreView(_r34).$implicit; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.toggleExecutionExpanded(execution_r35.ID)); });
979
+ i0.ɵɵelementStart(6, "div")(7, "div", 101);
980
+ i0.ɵɵelement(8, "i", 102);
981
+ i0.ɵɵtext(9);
982
+ i0.ɵɵelementStart(10, "span", 103);
983
+ i0.ɵɵtext(11);
984
+ i0.ɵɵpipe(12, "date");
1015
985
  i0.ɵɵelementEnd()();
1016
- i0.ɵɵelementStart(9, "div", 91);
1017
- i0.ɵɵelement(10, "i", 93);
986
+ i0.ɵɵelementStart(13, "div", 104)(14, "span", 28);
987
+ i0.ɵɵtext(15);
988
+ i0.ɵɵelementEnd();
989
+ i0.ɵɵtemplate(16, AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_5_For_2_Conditional_16_Template, 3, 1, "span", 105);
990
+ i0.ɵɵelementStart(17, "div", 106)(18, "button", 107);
991
+ i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_5_For_2_Template_button_click_18_listener($event) { const execution_r35 = i0.ɵɵrestoreView(_r34).$implicit; const ctx_r1 = i0.ɵɵnextContext(5); ctx_r1.openExecutionRecord(execution_r35.ID); return i0.ɵɵresetView($event.stopPropagation()); });
992
+ i0.ɵɵelement(19, "i", 108);
993
+ i0.ɵɵelementEnd()()();
994
+ i0.ɵɵtemplate(20, AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_5_For_2_Conditional_20_Template, 2, 1, "div", 109);
1018
995
  i0.ɵɵelementEnd()();
996
+ i0.ɵɵtemplate(21, AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_5_For_2_Conditional_21_Template, 12, 8, "div", 110);
997
+ i0.ɵɵelementEnd()()();
1019
998
  } if (rf & 2) {
1020
- const note_r30 = ctx.$implicit;
999
+ const execution_r35 = ctx.$implicit;
1000
+ const ctx_r1 = i0.ɵɵnextContext(5);
1001
+ i0.ɵɵclassProp("expanded", ctx_r1.expandedExecutions[execution_r35.ID]);
1002
+ i0.ɵɵadvance(2);
1003
+ i0.ɵɵstyleProp("background-color", ctx_r1.getExecutionStatusColor(execution_r35.Status));
1004
+ i0.ɵɵadvance();
1005
+ i0.ɵɵclassMap(ctx_r1.getExecutionStatusIcon(execution_r35.Status));
1021
1006
  i0.ɵɵadvance(5);
1022
- i0.ɵɵtextInterpolate(note_r30.Type || "Note");
1007
+ i0.ɵɵclassProp("expanded", ctx_r1.expandedExecutions[execution_r35.ID]);
1023
1008
  i0.ɵɵadvance();
1024
- i0.ɵɵconditional(note_r30.Note ? 6 : -1);
1009
+ i0.ɵɵtextInterpolate1(" Execution #", execution_r35.ID.substring(0, 8), " ");
1025
1010
  i0.ɵɵadvance(2);
1026
- i0.ɵɵconditional(note_r30.__mj_CreatedAt ? 8 : -1);
1011
+ i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(12, 16, execution_r35.__mj_CreatedAt, "MMM d, h:mm a"));
1012
+ i0.ɵɵadvance(3);
1013
+ i0.ɵɵstyleProp("background-color", ctx_r1.getExecutionStatusColor(execution_r35.Status));
1014
+ i0.ɵɵadvance();
1015
+ i0.ɵɵtextInterpolate1(" ", execution_r35.Status || "Unknown", " ");
1016
+ i0.ɵɵadvance();
1017
+ i0.ɵɵconditional(execution_r35.CompletedAt ? 16 : -1);
1018
+ i0.ɵɵadvance(4);
1019
+ i0.ɵɵconditional(execution_r35.Result && !ctx_r1.expandedExecutions[execution_r35.ID] ? 20 : -1);
1020
+ i0.ɵɵadvance();
1021
+ i0.ɵɵconditional(ctx_r1.expandedExecutions[execution_r35.ID] ? 21 : -1);
1027
1022
  } }
1028
- function AIAgentFormComponentExtended_form_2_Conditional_35_ng_template_2_Conditional_7_Conditional_3_Template(rf, ctx) { if (rf & 1) {
1029
- const _r31 = i0.ɵɵgetCurrentView();
1030
- i0.ɵɵelementStart(0, "div", 65);
1031
- i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_35_ng_template_2_Conditional_7_Conditional_3_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r31); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.navigateToEntity("AI Agent Notes", "")); });
1023
+ function AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_5_Conditional_3_Template(rf, ctx) { if (rf & 1) {
1024
+ const _r36 = i0.ɵɵgetCurrentView();
1025
+ i0.ɵɵelementStart(0, "div", 60);
1026
+ i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_5_Conditional_3_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r36); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.navigateToEntity("MJ: AI Agent Runs", "")); });
1032
1027
  i0.ɵɵelementStart(1, "span");
1033
1028
  i0.ɵɵtext(2);
1034
1029
  i0.ɵɵelementEnd()();
1035
1030
  } if (rf & 2) {
1036
1031
  const ctx_r1 = i0.ɵɵnextContext(5);
1037
1032
  i0.ɵɵadvance(2);
1038
- i0.ɵɵtextInterpolate1("View all ", ctx_r1.noteCount, " notes...");
1033
+ i0.ɵɵtextInterpolate1("View all ", ctx_r1.executionHistoryCount, " executions...");
1039
1034
  } }
1040
- function AIAgentFormComponentExtended_form_2_Conditional_35_ng_template_2_Conditional_7_Template(rf, ctx) { if (rf & 1) {
1041
- i0.ɵɵelementStart(0, "div", 76);
1042
- i0.ɵɵrepeaterCreate(1, AIAgentFormComponentExtended_form_2_Conditional_35_ng_template_2_Conditional_7_For_2_Template, 11, 3, "div", 150, _forTrack0);
1043
- i0.ɵɵtemplate(3, AIAgentFormComponentExtended_form_2_Conditional_35_ng_template_2_Conditional_7_Conditional_3_Template, 3, 1, "div", 40);
1035
+ function AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_5_Template(rf, ctx) { if (rf & 1) {
1036
+ i0.ɵɵelementStart(0, "div", 95);
1037
+ i0.ɵɵrepeaterCreate(1, AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_5_For_2_Template, 22, 19, "div", 96, _forTrack0);
1038
+ i0.ɵɵtemplate(3, AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_5_Conditional_3_Template, 3, 1, "div", 45);
1044
1039
  i0.ɵɵelementEnd();
1045
1040
  } if (rf & 2) {
1046
1041
  const ctx_r1 = i0.ɵɵnextContext(4);
1047
1042
  i0.ɵɵadvance();
1048
- i0.ɵɵrepeater(ctx_r1.agentNotes);
1043
+ i0.ɵɵrepeater(ctx_r1.recentExecutions);
1049
1044
  i0.ɵɵadvance(2);
1050
- i0.ɵɵconditional(ctx_r1.noteCount > ctx_r1.agentNotes.length ? 3 : -1);
1045
+ i0.ɵɵconditional(ctx_r1.executionHistoryCount > ctx_r1.recentExecutions.length ? 3 : -1);
1051
1046
  } }
1052
- function AIAgentFormComponentExtended_form_2_Conditional_35_ng_template_2_Template(rf, ctx) { if (rf & 1) {
1053
- i0.ɵɵelementStart(0, "div", 67)(1, "div", 35)(2, "div", 36);
1054
- i0.ɵɵtext(3, " Manage notes, documentation, and annotations for this agent. ");
1055
- i0.ɵɵelementEnd();
1056
- i0.ɵɵelementStart(4, "div", 74);
1057
- i0.ɵɵtemplate(5, AIAgentFormComponentExtended_form_2_Conditional_35_ng_template_2_Conditional_5_Template, 3, 0, "button", 75);
1047
+ function AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Template(rf, ctx) { if (rf & 1) {
1048
+ i0.ɵɵelementStart(0, "div", 94)(1, "div", 35)(2, "div", 61);
1049
+ i0.ɵɵtext(3, " Review execution history, requests, and performance metrics for this agent. ");
1058
1050
  i0.ɵɵelementEnd()();
1059
- i0.ɵɵtemplate(6, AIAgentFormComponentExtended_form_2_Conditional_35_ng_template_2_Conditional_6_Template, 7, 1, "div", 37)(7, AIAgentFormComponentExtended_form_2_Conditional_35_ng_template_2_Conditional_7_Template, 4, 1, "div", 76);
1051
+ i0.ɵɵtemplate(4, AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_4_Template, 6, 0, "div", 38)(5, AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Conditional_5_Template, 4, 1, "div", 95);
1060
1052
  i0.ɵɵelementEnd();
1061
1053
  } if (rf & 2) {
1062
1054
  const ctx_r1 = i0.ɵɵnextContext(3);
1063
- i0.ɵɵadvance(5);
1064
- i0.ɵɵconditional(ctx_r1.EditMode ? 5 : -1);
1065
- i0.ɵɵadvance();
1066
- i0.ɵɵconditional(ctx_r1.noteCount === 0 ? 6 : 7);
1055
+ i0.ɵɵadvance(4);
1056
+ i0.ɵɵconditional(ctx_r1.executionHistoryCount === 0 ? 4 : 5);
1067
1057
  } }
1068
- function AIAgentFormComponentExtended_form_2_Conditional_35_Template(rf, ctx) { if (rf & 1) {
1058
+ function AIAgentFormComponentExtended_form_2_Conditional_27_Template(rf, ctx) { if (rf & 1) {
1069
1059
  i0.ɵɵelementStart(0, "kendo-panelbar-item", 24);
1070
- i0.ɵɵtemplate(1, AIAgentFormComponentExtended_form_2_Conditional_35_ng_template_1_Template, 2, 1, "ng-template", 25)(2, AIAgentFormComponentExtended_form_2_Conditional_35_ng_template_2_Template, 8, 2, "ng-template", 26);
1060
+ i0.ɵɵtemplate(1, AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_1_Template, 2, 1, "ng-template", 25)(2, AIAgentFormComponentExtended_form_2_Conditional_27_ng_template_2_Template, 6, 1, "ng-template", 26);
1071
1061
  i0.ɵɵelementEnd();
1072
1062
  } if (rf & 2) {
1073
1063
  i0.ɵɵproperty("expanded", false);
1074
1064
  } }
1075
- function AIAgentFormComponentExtended_form_2_Conditional_36_ng_template_1_Template(rf, ctx) { if (rf & 1) {
1076
- i0.ɵɵelement(0, "i", 153);
1077
- i0.ɵɵtext(1);
1078
- } if (rf & 2) {
1079
- const ctx_r1 = i0.ɵɵnextContext(3);
1080
- i0.ɵɵadvance();
1081
- i0.ɵɵtextInterpolate1(" Learning Cycles", ctx_r1.learningCycleCount > 0 ? " (" + ctx_r1.learningCycleCount + ")" : "", " ");
1065
+ function AIAgentFormComponentExtended_form_2_ng_template_29_Template(rf, ctx) { if (rf & 1) {
1066
+ i0.ɵɵelement(0, "i", 121);
1067
+ i0.ɵɵtext(1, " Payload ");
1082
1068
  } }
1083
- function AIAgentFormComponentExtended_form_2_Conditional_36_ng_template_2_Conditional_4_Template(rf, ctx) { if (rf & 1) {
1084
- i0.ɵɵelementStart(0, "div", 37);
1085
- i0.ɵɵelement(1, "i", 153);
1086
- i0.ɵɵelementStart(2, "h4");
1087
- i0.ɵɵtext(3, "No Learning Cycles");
1069
+ function AIAgentFormComponentExtended_form_2_ng_template_30_Template(rf, ctx) { if (rf & 1) {
1070
+ const _r37 = i0.ɵɵgetCurrentView();
1071
+ i0.ɵɵelementStart(0, "div", 34)(1, "div", 35)(2, "div", 61);
1072
+ i0.ɵɵtext(3, " Configure how this agent handles data payloads and validation. ");
1073
+ i0.ɵɵelementEnd()();
1074
+ i0.ɵɵelementStart(4, "div", 122)(5, "h4", 123);
1075
+ i0.ɵɵelement(6, "i", 71);
1076
+ i0.ɵɵtext(7, " Configuration ");
1088
1077
  i0.ɵɵelementEnd();
1089
- i0.ɵɵelementStart(4, "p");
1090
- i0.ɵɵtext(5, "Learning cycles will appear here as the agent processes requests and improves over time.");
1078
+ i0.ɵɵelementStart(8, "div", 124);
1079
+ i0.ɵɵelement(9, "mj-form-field", 125)(10, "mj-form-field", 126)(11, "mj-form-field", 127);
1091
1080
  i0.ɵɵelementEnd()();
1092
- } }
1093
- function AIAgentFormComponentExtended_form_2_Conditional_36_ng_template_2_Conditional_5_For_2_Conditional_7_Template(rf, ctx) { if (rf & 1) {
1094
- i0.ɵɵelementStart(0, "span", 90);
1095
- i0.ɵɵelement(1, "i", 152);
1096
- i0.ɵɵtext(2);
1097
- i0.ɵɵpipe(3, "date");
1081
+ i0.ɵɵelementStart(12, "div", 128)(13, "h4", 123);
1082
+ i0.ɵɵelement(14, "i", 129);
1083
+ i0.ɵɵtext(15, " Path Configuration ");
1098
1084
  i0.ɵɵelementEnd();
1099
- } if (rf & 2) {
1100
- const cycle_r33 = i0.ɵɵnextContext().$implicit;
1101
- i0.ɵɵadvance(2);
1102
- i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(3, 1, cycle_r33.StartedAt, "short"), " ");
1103
- } }
1104
- function AIAgentFormComponentExtended_form_2_Conditional_36_ng_template_2_Conditional_5_For_2_Conditional_8_Template(rf, ctx) { if (rf & 1) {
1105
- i0.ɵɵelementStart(0, "span", 120);
1106
- i0.ɵɵtext(1);
1085
+ i0.ɵɵelementStart(16, "div", 130)(17, "label", 131);
1086
+ i0.ɵɵelement(18, "i", 132);
1087
+ i0.ɵɵtext(19, " Downstream Paths ");
1088
+ i0.ɵɵelementStart(20, "span", 133);
1089
+ i0.ɵɵtext(21, "JSON array of paths to pass to sub-agents");
1090
+ i0.ɵɵelementEnd()();
1091
+ i0.ɵɵelementStart(22, "mj-code-editor", 134);
1092
+ i0.ɵɵlistener("valueChange", function AIAgentFormComponentExtended_form_2_ng_template_30_Template_mj_code_editor_valueChange_22_listener($event) { i0.ɵɵrestoreView(_r37); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.updatePayloadField("PayloadDownstreamPaths", $event)); });
1093
+ i0.ɵɵelementEnd()();
1094
+ i0.ɵɵelementStart(23, "div", 130)(24, "label", 131);
1095
+ i0.ɵɵelement(25, "i", 135);
1096
+ i0.ɵɵtext(26, " Upstream Paths ");
1097
+ i0.ɵɵelementStart(27, "span", 133);
1098
+ i0.ɵɵtext(28, "JSON array of paths to return to parent agent");
1099
+ i0.ɵɵelementEnd()();
1100
+ i0.ɵɵelementStart(29, "mj-code-editor", 134);
1101
+ i0.ɵɵlistener("valueChange", function AIAgentFormComponentExtended_form_2_ng_template_30_Template_mj_code_editor_valueChange_29_listener($event) { i0.ɵɵrestoreView(_r37); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.updatePayloadField("PayloadUpstreamPaths", $event)); });
1102
+ i0.ɵɵelementEnd()();
1103
+ i0.ɵɵelementStart(30, "div", 130)(31, "label", 131);
1104
+ i0.ɵɵelement(32, "i", 136);
1105
+ i0.ɵɵtext(33, " Self Read Paths ");
1106
+ i0.ɵɵelementStart(34, "span", 133);
1107
+ i0.ɵɵtext(35, "JSON array of paths this agent can read");
1108
+ i0.ɵɵelementEnd()();
1109
+ i0.ɵɵelementStart(36, "mj-code-editor", 134);
1110
+ i0.ɵɵlistener("valueChange", function AIAgentFormComponentExtended_form_2_ng_template_30_Template_mj_code_editor_valueChange_36_listener($event) { i0.ɵɵrestoreView(_r37); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.updatePayloadField("PayloadSelfReadPaths", $event)); });
1111
+ i0.ɵɵelementEnd()();
1112
+ i0.ɵɵelementStart(37, "div", 130)(38, "label", 131);
1113
+ i0.ɵɵelement(39, "i", 137);
1114
+ i0.ɵɵtext(40, " Self Write Paths ");
1115
+ i0.ɵɵelementStart(41, "span", 133);
1116
+ i0.ɵɵtext(42, "JSON array of paths this agent can write to");
1117
+ i0.ɵɵelementEnd()();
1118
+ i0.ɵɵelementStart(43, "mj-code-editor", 134);
1119
+ i0.ɵɵlistener("valueChange", function AIAgentFormComponentExtended_form_2_ng_template_30_Template_mj_code_editor_valueChange_43_listener($event) { i0.ɵɵrestoreView(_r37); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.updatePayloadField("PayloadSelfWritePaths", $event)); });
1120
+ i0.ɵɵelementEnd()()();
1121
+ i0.ɵɵelementStart(44, "div", 138)(45, "h4", 123);
1122
+ i0.ɵɵelement(46, "i", 139);
1123
+ i0.ɵɵtext(47, " Final Payload Validation ");
1107
1124
  i0.ɵɵelementEnd();
1125
+ i0.ɵɵelementStart(48, "div", 130)(49, "label", 131)(50, "span", 133);
1126
+ i0.ɵɵtext(51, "JSON validation rules or schema for final payload validation");
1127
+ i0.ɵɵelementEnd()();
1128
+ i0.ɵɵelementStart(52, "mj-code-editor", 140);
1129
+ i0.ɵɵlistener("valueChange", function AIAgentFormComponentExtended_form_2_ng_template_30_Template_mj_code_editor_valueChange_52_listener($event) { i0.ɵɵrestoreView(_r37); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.updatePayloadField("FinalPayloadValidation", $event)); });
1130
+ i0.ɵɵelementEnd()()()();
1108
1131
  } if (rf & 2) {
1109
- const cycle_r33 = i0.ɵɵnextContext().$implicit;
1132
+ const ctx_r1 = i0.ɵɵnextContext(2);
1133
+ i0.ɵɵadvance(9);
1134
+ i0.ɵɵproperty("EditMode", ctx_r1.EditMode)("record", ctx_r1.record);
1135
+ i0.ɵɵadvance();
1136
+ i0.ɵɵproperty("EditMode", ctx_r1.EditMode)("record", ctx_r1.record);
1110
1137
  i0.ɵɵadvance();
1111
- i0.ɵɵtextInterpolate(cycle_r33.Status);
1138
+ i0.ɵɵproperty("EditMode", ctx_r1.EditMode)("record", ctx_r1.record);
1139
+ i0.ɵɵadvance(11);
1140
+ i0.ɵɵproperty("value", ctx_r1.record.PayloadDownstreamPaths || "[]")("readonly", !ctx_r1.EditMode)("lineWrapping", true);
1141
+ i0.ɵɵadvance(7);
1142
+ i0.ɵɵproperty("value", ctx_r1.record.PayloadUpstreamPaths || "[]")("readonly", !ctx_r1.EditMode)("lineWrapping", true);
1143
+ i0.ɵɵadvance(7);
1144
+ i0.ɵɵproperty("value", ctx_r1.record.PayloadSelfReadPaths || "[]")("readonly", !ctx_r1.EditMode)("lineWrapping", true);
1145
+ i0.ɵɵadvance(7);
1146
+ i0.ɵɵproperty("value", ctx_r1.record.PayloadSelfWritePaths || "[]")("readonly", !ctx_r1.EditMode)("lineWrapping", true);
1147
+ i0.ɵɵadvance(9);
1148
+ i0.ɵɵproperty("value", ctx_r1.record.FinalPayloadValidation || "{}")("readonly", !ctx_r1.EditMode)("lineWrapping", true);
1112
1149
  } }
1113
- function AIAgentFormComponentExtended_form_2_Conditional_36_ng_template_2_Conditional_5_For_2_Template(rf, ctx) { if (rf & 1) {
1114
- const _r32 = i0.ɵɵgetCurrentView();
1115
- i0.ɵɵelementStart(0, "div", 155);
1116
- i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_36_ng_template_2_Conditional_5_For_2_Template_div_click_0_listener() { const cycle_r33 = i0.ɵɵrestoreView(_r32).$implicit; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.navigateToEntity("AI Agent Learning Cycles", cycle_r33.ID)); });
1117
- i0.ɵɵelementStart(1, "div", 84);
1118
- i0.ɵɵelement(2, "i", 153);
1119
- i0.ɵɵelementEnd();
1120
- i0.ɵɵelementStart(3, "div", 86)(4, "div", 87);
1121
- i0.ɵɵtext(5);
1122
- i0.ɵɵelementEnd();
1123
- i0.ɵɵelementStart(6, "div", 89);
1124
- i0.ɵɵtemplate(7, AIAgentFormComponentExtended_form_2_Conditional_36_ng_template_2_Conditional_5_For_2_Conditional_7_Template, 4, 4, "span", 90)(8, AIAgentFormComponentExtended_form_2_Conditional_36_ng_template_2_Conditional_5_For_2_Conditional_8_Template, 2, 1, "span", 120);
1150
+ function AIAgentFormComponentExtended_form_2_ng_template_32_Template(rf, ctx) { if (rf & 1) {
1151
+ i0.ɵɵelement(0, "i", 141);
1152
+ i0.ɵɵtext(1, " Execution Guardrails ");
1153
+ } }
1154
+ function AIAgentFormComponentExtended_form_2_ng_template_33_Template(rf, ctx) { if (rf & 1) {
1155
+ i0.ɵɵelementStart(0, "div", 34)(1, "div", 35)(2, "div", 61);
1156
+ i0.ɵɵtext(3, " Set limits to prevent runaway agent executions and control resource usage. ");
1125
1157
  i0.ɵɵelementEnd()();
1126
- i0.ɵɵelementStart(9, "div", 91);
1127
- i0.ɵɵelement(10, "i", 93);
1158
+ i0.ɵɵelementStart(4, "div", 142);
1159
+ i0.ɵɵelement(5, "mj-form-field", 143)(6, "mj-form-field", 144)(7, "mj-form-field", 145)(8, "mj-form-field", 146);
1128
1160
  i0.ɵɵelementEnd()();
1129
1161
  } if (rf & 2) {
1130
- const cycle_r33 = ctx.$implicit;
1162
+ const ctx_r1 = i0.ɵɵnextContext(2);
1131
1163
  i0.ɵɵadvance(5);
1132
- i0.ɵɵtextInterpolate1("Learning Cycle ", cycle_r33.ID.substring(0, 8), "");
1133
- i0.ɵɵadvance(2);
1134
- i0.ɵɵconditional(cycle_r33.StartedAt ? 7 : -1);
1164
+ i0.ɵɵproperty("EditMode", ctx_r1.EditMode)("record", ctx_r1.record);
1135
1165
  i0.ɵɵadvance();
1136
- i0.ɵɵconditional(cycle_r33.Status ? 8 : -1);
1137
- } }
1138
- function AIAgentFormComponentExtended_form_2_Conditional_36_ng_template_2_Conditional_5_Conditional_3_Template(rf, ctx) { if (rf & 1) {
1139
- const _r34 = i0.ɵɵgetCurrentView();
1140
- i0.ɵɵelementStart(0, "div", 65);
1141
- i0.ɵɵlistener("click", function AIAgentFormComponentExtended_form_2_Conditional_36_ng_template_2_Conditional_5_Conditional_3_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r34); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.navigateToEntity("AI Agent Learning Cycles", "")); });
1142
- i0.ɵɵelementStart(1, "span");
1143
- i0.ɵɵtext(2);
1144
- i0.ɵɵelementEnd()();
1145
- } if (rf & 2) {
1146
- const ctx_r1 = i0.ɵɵnextContext(5);
1147
- i0.ɵɵadvance(2);
1148
- i0.ɵɵtextInterpolate1("View all ", ctx_r1.learningCycleCount, " cycles...");
1149
- } }
1150
- function AIAgentFormComponentExtended_form_2_Conditional_36_ng_template_2_Conditional_5_Template(rf, ctx) { if (rf & 1) {
1151
- i0.ɵɵelementStart(0, "div", 76);
1152
- i0.ɵɵrepeaterCreate(1, AIAgentFormComponentExtended_form_2_Conditional_36_ng_template_2_Conditional_5_For_2_Template, 11, 3, "div", 154, _forTrack0);
1153
- i0.ɵɵtemplate(3, AIAgentFormComponentExtended_form_2_Conditional_36_ng_template_2_Conditional_5_Conditional_3_Template, 3, 1, "div", 40);
1154
- i0.ɵɵelementEnd();
1155
- } if (rf & 2) {
1156
- const ctx_r1 = i0.ɵɵnextContext(4);
1166
+ i0.ɵɵproperty("EditMode", ctx_r1.EditMode)("record", ctx_r1.record);
1157
1167
  i0.ɵɵadvance();
1158
- i0.ɵɵrepeater(ctx_r1.learningCycles);
1159
- i0.ɵɵadvance(2);
1160
- i0.ɵɵconditional(ctx_r1.learningCycleCount > ctx_r1.learningCycles.length ? 3 : -1);
1168
+ i0.ɵɵproperty("EditMode", ctx_r1.EditMode)("record", ctx_r1.record);
1169
+ i0.ɵɵadvance();
1170
+ i0.ɵɵproperty("EditMode", ctx_r1.EditMode)("record", ctx_r1.record);
1161
1171
  } }
1162
- function AIAgentFormComponentExtended_form_2_Conditional_36_ng_template_2_Template(rf, ctx) { if (rf & 1) {
1163
- i0.ɵɵelementStart(0, "div", 67)(1, "div", 35)(2, "div", 36);
1164
- i0.ɵɵtext(3, " Monitor and manage learning cycles, training sessions, and performance analytics. ");
1172
+ function AIAgentFormComponentExtended_form_2_ng_template_35_Template(rf, ctx) { if (rf & 1) {
1173
+ i0.ɵɵelement(0, "i", 71);
1174
+ i0.ɵɵtext(1, " Configuration ");
1175
+ } }
1176
+ function AIAgentFormComponentExtended_form_2_ng_template_36_Template(rf, ctx) { if (rf & 1) {
1177
+ const _r38 = i0.ɵɵgetCurrentView();
1178
+ i0.ɵɵelementStart(0, "div", 34)(1, "div", 35)(2, "div", 61);
1179
+ i0.ɵɵtext(3, " Advanced configuration settings for agent behavior and execution. ");
1165
1180
  i0.ɵɵelementEnd()();
1166
- i0.ɵɵtemplate(4, AIAgentFormComponentExtended_form_2_Conditional_36_ng_template_2_Conditional_4_Template, 6, 0, "div", 37)(5, AIAgentFormComponentExtended_form_2_Conditional_36_ng_template_2_Conditional_5_Template, 4, 1, "div", 76);
1181
+ i0.ɵɵelementStart(4, "div", 142);
1182
+ i0.ɵɵelement(5, "mj-form-field", 147)(6, "mj-form-field", 148)(7, "mj-form-field", 149)(8, "mj-form-field", 150)(9, "mj-form-field", 151)(10, "mj-form-field", 152)(11, "mj-form-field", 153)(12, "mj-form-field", 154)(13, "mj-form-field", 155);
1167
1183
  i0.ɵɵelementEnd();
1168
- } if (rf & 2) {
1169
- const ctx_r1 = i0.ɵɵnextContext(3);
1170
- i0.ɵɵadvance(4);
1171
- i0.ɵɵconditional(ctx_r1.learningCycleCount === 0 ? 4 : 5);
1172
- } }
1173
- function AIAgentFormComponentExtended_form_2_Conditional_36_Template(rf, ctx) { if (rf & 1) {
1174
- i0.ɵɵelementStart(0, "kendo-panelbar-item", 24);
1175
- i0.ɵɵtemplate(1, AIAgentFormComponentExtended_form_2_Conditional_36_ng_template_1_Template, 2, 1, "ng-template", 25)(2, AIAgentFormComponentExtended_form_2_Conditional_36_ng_template_2_Template, 6, 1, "ng-template", 26);
1184
+ i0.ɵɵelementStart(14, "div", 156)(15, "h4", 123);
1185
+ i0.ɵɵelement(16, "i", 157);
1186
+ i0.ɵɵtext(17, " Context Compression ");
1187
+ i0.ɵɵelementEnd()();
1188
+ i0.ɵɵelementStart(18, "div", 142)(19, "mj-form-field", 158);
1189
+ i0.ɵɵlistener("valueChange", function AIAgentFormComponentExtended_form_2_ng_template_36_Template_mj_form_field_valueChange_19_listener($event) { i0.ɵɵrestoreView(_r38); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onContextCompressionToggle($event)); });
1176
1190
  i0.ɵɵelementEnd();
1191
+ i0.ɵɵelement(20, "mj-form-field", 159)(21, "mj-form-field", 160)(22, "mj-form-field", 161);
1192
+ i0.ɵɵelementEnd()();
1177
1193
  } if (rf & 2) {
1178
- i0.ɵɵproperty("expanded", false);
1194
+ const ctx_r1 = i0.ɵɵnextContext(2);
1195
+ i0.ɵɵadvance(5);
1196
+ i0.ɵɵproperty("EditMode", ctx_r1.EditMode)("record", ctx_r1.record);
1197
+ i0.ɵɵadvance();
1198
+ i0.ɵɵproperty("EditMode", ctx_r1.EditMode)("record", ctx_r1.record);
1199
+ i0.ɵɵadvance();
1200
+ i0.ɵɵproperty("EditMode", ctx_r1.EditMode)("record", ctx_r1.record);
1201
+ i0.ɵɵadvance();
1202
+ i0.ɵɵproperty("EditMode", ctx_r1.EditMode)("record", ctx_r1.record);
1203
+ i0.ɵɵadvance();
1204
+ i0.ɵɵproperty("EditMode", ctx_r1.EditMode)("record", ctx_r1.record);
1205
+ i0.ɵɵadvance();
1206
+ i0.ɵɵproperty("EditMode", ctx_r1.EditMode)("record", ctx_r1.record);
1207
+ i0.ɵɵadvance();
1208
+ i0.ɵɵproperty("EditMode", ctx_r1.EditMode)("record", ctx_r1.record);
1209
+ i0.ɵɵadvance();
1210
+ i0.ɵɵproperty("EditMode", ctx_r1.EditMode)("record", ctx_r1.record);
1211
+ i0.ɵɵadvance();
1212
+ i0.ɵɵproperty("EditMode", ctx_r1.EditMode)("record", ctx_r1.record);
1213
+ i0.ɵɵadvance(6);
1214
+ i0.ɵɵproperty("EditMode", ctx_r1.EditMode)("record", ctx_r1.record);
1215
+ i0.ɵɵadvance();
1216
+ i0.ɵɵproperty("EditMode", ctx_r1.EditMode)("record", ctx_r1.record);
1217
+ i0.ɵɵadvance();
1218
+ i0.ɵɵproperty("EditMode", ctx_r1.EditMode)("record", ctx_r1.record);
1219
+ i0.ɵɵadvance();
1220
+ i0.ɵɵproperty("EditMode", ctx_r1.EditMode)("record", ctx_r1.record);
1179
1221
  } }
1180
1222
  function AIAgentFormComponentExtended_form_2_Template(rf, ctx) { if (rf & 1) {
1181
1223
  const _r1 = i0.ɵɵgetCurrentView();
@@ -1196,19 +1238,16 @@ function AIAgentFormComponentExtended_form_2_Template(rf, ctx) { if (rf & 1) {
1196
1238
  i0.ɵɵelement(19, "i", 22);
1197
1239
  i0.ɵɵelementEnd()()()();
1198
1240
  i0.ɵɵelementStart(20, "div", 23)(21, "kendo-panelbar");
1199
- i0.ɵɵtemplate(22, AIAgentFormComponentExtended_form_2_Conditional_22_Template, 3, 1, "kendo-panelbar-item", 24)(23, AIAgentFormComponentExtended_form_2_Conditional_23_Template, 3, 1, "kendo-panelbar-item", 24);
1200
- i0.ɵɵelementStart(24, "kendo-panelbar-item", 24);
1201
- i0.ɵɵtemplate(25, AIAgentFormComponentExtended_form_2_ng_template_25_Template, 2, 0, "ng-template", 25)(26, AIAgentFormComponentExtended_form_2_ng_template_26_Template, 53, 21, "ng-template", 26);
1202
- i0.ɵɵelementEnd();
1203
- i0.ɵɵtemplate(27, AIAgentFormComponentExtended_form_2_Conditional_27_Template, 3, 1, "kendo-panelbar-item", 24)(28, AIAgentFormComponentExtended_form_2_Conditional_28_Template, 3, 1, "kendo-panelbar-item", 24);
1204
- i0.ɵɵelementStart(29, "kendo-panelbar-item", 24);
1205
- i0.ɵɵtemplate(30, AIAgentFormComponentExtended_form_2_ng_template_30_Template, 2, 0, "ng-template", 25)(31, AIAgentFormComponentExtended_form_2_ng_template_31_Template, 9, 8, "ng-template", 26);
1241
+ i0.ɵɵtemplate(22, AIAgentFormComponentExtended_form_2_Conditional_22_Template, 3, 1, "kendo-panelbar-item", 24)(23, AIAgentFormComponentExtended_form_2_Conditional_23_Template, 3, 1, "kendo-panelbar-item", 24)(24, AIAgentFormComponentExtended_form_2_Conditional_24_Template, 3, 1, "kendo-panelbar-item", 24)(25, AIAgentFormComponentExtended_form_2_Conditional_25_Template, 3, 1, "kendo-panelbar-item", 24)(26, AIAgentFormComponentExtended_form_2_Conditional_26_Template, 3, 1, "kendo-panelbar-item", 24)(27, AIAgentFormComponentExtended_form_2_Conditional_27_Template, 3, 1, "kendo-panelbar-item", 24);
1242
+ i0.ɵɵelementStart(28, "kendo-panelbar-item", 24);
1243
+ i0.ɵɵtemplate(29, AIAgentFormComponentExtended_form_2_ng_template_29_Template, 2, 0, "ng-template", 25)(30, AIAgentFormComponentExtended_form_2_ng_template_30_Template, 53, 21, "ng-template", 26);
1206
1244
  i0.ɵɵelementEnd();
1207
- i0.ɵɵelementStart(32, "kendo-panelbar-item", 24);
1208
- i0.ɵɵtemplate(33, AIAgentFormComponentExtended_form_2_ng_template_33_Template, 2, 0, "ng-template", 25)(34, AIAgentFormComponentExtended_form_2_ng_template_34_Template, 23, 26, "ng-template", 26);
1245
+ i0.ɵɵelementStart(31, "kendo-panelbar-item", 24);
1246
+ i0.ɵɵtemplate(32, AIAgentFormComponentExtended_form_2_ng_template_32_Template, 2, 0, "ng-template", 25)(33, AIAgentFormComponentExtended_form_2_ng_template_33_Template, 9, 8, "ng-template", 26);
1209
1247
  i0.ɵɵelementEnd();
1210
- i0.ɵɵtemplate(35, AIAgentFormComponentExtended_form_2_Conditional_35_Template, 3, 1, "kendo-panelbar-item", 24)(36, AIAgentFormComponentExtended_form_2_Conditional_36_Template, 3, 1, "kendo-panelbar-item", 24);
1211
- i0.ɵɵelementEnd()()();
1248
+ i0.ɵɵelementStart(34, "kendo-panelbar-item", 24);
1249
+ i0.ɵɵtemplate(35, AIAgentFormComponentExtended_form_2_ng_template_35_Template, 2, 0, "ng-template", 25)(36, AIAgentFormComponentExtended_form_2_ng_template_36_Template, 23, 26, "ng-template", 26);
1250
+ i0.ɵɵelementEnd()()()();
1212
1251
  } if (rf & 2) {
1213
1252
  const ctx_r1 = i0.ɵɵnextContext();
1214
1253
  i0.ɵɵadvance(2);
@@ -1230,19 +1269,19 @@ function AIAgentFormComponentExtended_form_2_Template(rf, ctx) { if (rf & 1) {
1230
1269
  i0.ɵɵadvance();
1231
1270
  i0.ɵɵconditional(ctx_r1.record.ID ? 23 : -1);
1232
1271
  i0.ɵɵadvance();
1233
- i0.ɵɵproperty("expanded", false);
1234
- i0.ɵɵadvance(3);
1235
- i0.ɵɵconditional(ctx_r1.record.ID ? 27 : -1);
1272
+ i0.ɵɵconditional(ctx_r1.record.ID ? 24 : -1);
1273
+ i0.ɵɵadvance();
1274
+ i0.ɵɵconditional(ctx_r1.record.ID ? 25 : -1);
1236
1275
  i0.ɵɵadvance();
1237
- i0.ɵɵconditional(ctx_r1.record.ID ? 28 : -1);
1276
+ i0.ɵɵconditional(ctx_r1.record.ID ? 26 : -1);
1277
+ i0.ɵɵadvance();
1278
+ i0.ɵɵconditional(ctx_r1.record.ID ? 27 : -1);
1238
1279
  i0.ɵɵadvance();
1239
1280
  i0.ɵɵproperty("expanded", false);
1240
1281
  i0.ɵɵadvance(3);
1241
1282
  i0.ɵɵproperty("expanded", false);
1242
1283
  i0.ɵɵadvance(3);
1243
- i0.ɵɵconditional(ctx_r1.record.ID ? 35 : -1);
1244
- i0.ɵɵadvance();
1245
- i0.ɵɵconditional(ctx_r1.record.ID ? 36 : -1);
1284
+ i0.ɵɵproperty("expanded", false);
1246
1285
  } }
1247
1286
  /**
1248
1287
  * Enhanced AI Agent form component that extends the auto-generated base form
@@ -1275,13 +1314,131 @@ function AIAgentFormComponentExtended_form_2_Template(rf, ctx) { if (rf & 1) {
1275
1314
  * ```
1276
1315
  */
1277
1316
  let AIAgentFormComponentExtended = class AIAgentFormComponentExtended extends AIAgentFormComponent {
1278
- constructor(elementRef, sharedService, router, route, cdr, dialogService, viewContainerRef, newAgentDialogService, actionGalleryService, testHarnessService) {
1317
+ // Main AI Agent permissions inherited from BaseFormComponent:
1318
+ // - UserCanEdit (Update permission)
1319
+ // - UserCanRead (Read permission)
1320
+ // - UserCanCreate (Create permission)
1321
+ // - UserCanDelete (Delete permission)
1322
+ /** Check if user can create AI Agent Actions */
1323
+ get UserCanCreateActions() {
1324
+ return this.checkEntityPermission('AI Agent Actions', 'Create');
1325
+ }
1326
+ /** Check if user can update AI Agent Actions */
1327
+ get UserCanUpdateActions() {
1328
+ return this.checkEntityPermission('AI Agent Actions', 'Update');
1329
+ }
1330
+ /** Check if user can delete AI Agent Actions */
1331
+ get UserCanDeleteActions() {
1332
+ return this.checkEntityPermission('AI Agent Actions', 'Delete');
1333
+ }
1334
+ /** Check if user can create AI Agent Prompts */
1335
+ get UserCanCreatePrompts() {
1336
+ return this.checkEntityPermission('MJ: AI Agent Prompts', 'Create');
1337
+ }
1338
+ /** Check if user can update AI Agent Prompts */
1339
+ get UserCanUpdatePrompts() {
1340
+ return this.checkEntityPermission('MJ: AI Agent Prompts', 'Update');
1341
+ }
1342
+ /** Check if user can delete AI Agent Prompts */
1343
+ get UserCanDeletePrompts() {
1344
+ return this.checkEntityPermission('MJ: AI Agent Prompts', 'Delete');
1345
+ }
1346
+ /** Check if user can create AI Agents (for sub-agents) */
1347
+ get UserCanCreateSubAgents() {
1348
+ return this.checkEntityPermission('AI Agents', 'Create');
1349
+ }
1350
+ /** Check if user can update AI Agents (for sub-agents) */
1351
+ get UserCanUpdateSubAgents() {
1352
+ return this.checkEntityPermission('AI Agents', 'Update');
1353
+ }
1354
+ /** Check if user can delete AI Agents (for sub-agents) */
1355
+ get UserCanDeleteSubAgents() {
1356
+ return this.checkEntityPermission('AI Agents', 'Delete');
1357
+ }
1358
+ /** Check if user can create AI Agent Notes */
1359
+ get UserCanCreateNotes() {
1360
+ return this.checkEntityPermission('AI Agent Notes', 'Create');
1361
+ }
1362
+ /** Check if user can update AI Agent Notes */
1363
+ get UserCanUpdateNotes() {
1364
+ return this.checkEntityPermission('AI Agent Notes', 'Update');
1365
+ }
1366
+ /** Check if user can delete AI Agent Notes */
1367
+ get UserCanDeleteNotes() {
1368
+ return this.checkEntityPermission('AI Agent Notes', 'Delete');
1369
+ }
1370
+ /** Check if user can view AI Agent Learning Cycles */
1371
+ get UserCanViewLearningCycles() {
1372
+ return this.checkEntityPermission('AI Agent Learning Cycles', 'Read');
1373
+ }
1374
+ /** Check if user can view AI Agent Runs (execution history) */
1375
+ get UserCanViewExecutionHistory() {
1376
+ return this.checkEntityPermission('MJ: AI Agent Runs', 'Read');
1377
+ }
1378
+ /** Check if user can create AI Prompts (needed for creating new prompts) */
1379
+ get UserCanCreateAIPrompts() {
1380
+ return this.checkEntityPermission('AI Prompts', 'Create');
1381
+ }
1382
+ /** Check if user can create both AI Prompts and AI Agent Prompts (for createNewPrompt functionality) */
1383
+ get UserCanCreateNewPrompts() {
1384
+ return this.UserCanCreateAIPrompts && this.UserCanCreatePrompts;
1385
+ }
1386
+ /**
1387
+ * Helper method to check entity permissions with caching
1388
+ * @param entityName - The name of the entity to check permissions for
1389
+ * @param permissionType - The type of permission to check (Create, Read, Update, Delete)
1390
+ * @returns boolean indicating if user has the permission
1391
+ */
1392
+ checkEntityPermission(entityName, permissionType) {
1393
+ const cacheKey = `${entityName}_${permissionType}`;
1394
+ if (this._permissionCache.has(cacheKey)) {
1395
+ return this._permissionCache.get(cacheKey);
1396
+ }
1397
+ try {
1398
+ const md = new Metadata();
1399
+ const entityInfo = md.Entities.find(e => e.Name === entityName);
1400
+ if (!entityInfo) {
1401
+ console.warn(`Entity '${entityName}' not found for permission check`);
1402
+ this._permissionCache.set(cacheKey, false);
1403
+ return false;
1404
+ }
1405
+ const userPermissions = entityInfo.GetUserPermisions(md.CurrentUser);
1406
+ let hasPermission = false;
1407
+ switch (permissionType) {
1408
+ case 'Create':
1409
+ hasPermission = userPermissions.CanCreate;
1410
+ break;
1411
+ case 'Read':
1412
+ hasPermission = userPermissions.CanRead;
1413
+ break;
1414
+ case 'Update':
1415
+ hasPermission = userPermissions.CanUpdate;
1416
+ break;
1417
+ case 'Delete':
1418
+ hasPermission = userPermissions.CanDelete;
1419
+ break;
1420
+ }
1421
+ this._permissionCache.set(cacheKey, hasPermission);
1422
+ return hasPermission;
1423
+ }
1424
+ catch (error) {
1425
+ console.error(`Error checking ${permissionType} permission for ${entityName}:`, error);
1426
+ this._permissionCache.set(cacheKey, false);
1427
+ return false;
1428
+ }
1429
+ }
1430
+ /**
1431
+ * Clears the permission cache. Call this when user context changes or permissions are updated.
1432
+ */
1433
+ clearPermissionCache() {
1434
+ this._permissionCache.clear();
1435
+ }
1436
+ constructor(elementRef, sharedService, router, route, cdr, dialogService, viewContainerRef, agentManagementService, testHarnessService) {
1279
1437
  super(elementRef, sharedService, router, route, cdr);
1280
1438
  this.sharedService = sharedService;
1281
1439
  this.dialogService = dialogService;
1282
1440
  this.viewContainerRef = viewContainerRef;
1283
- this.newAgentDialogService = newAgentDialogService;
1284
- this.actionGalleryService = actionGalleryService;
1441
+ this.agentManagementService = agentManagementService;
1285
1442
  this.testHarnessService = testHarnessService;
1286
1443
  // === Related Entity Counts ===
1287
1444
  /** Number of sub-agents under this agent */
@@ -1311,11 +1468,24 @@ let AIAgentFormComponentExtended = class AIAgentFormComponentExtended extends AI
1311
1468
  this.recentExecutions = [];
1312
1469
  /** Track which execution cards are expanded */
1313
1470
  this.expandedExecutions = {};
1314
- /** Available model selection modes */
1471
+ // === Dropdown Data ===
1472
+ /** Model selection mode options for the dropdown */
1315
1473
  this.modelSelectionModes = [
1316
1474
  { text: 'Agent Type', value: 'Agent Type' },
1317
1475
  { text: 'Agent', value: 'Agent' }
1318
1476
  ];
1477
+ // === Permission Checks for Related Entities ===
1478
+ /** Cache for permission checks to avoid repeated calculations */
1479
+ this._permissionCache = new Map();
1480
+ // === Transaction-based editing support ===
1481
+ /** Now using BaseFormComponent's PendingRecords system exclusively */
1482
+ /** Flag to indicate if there are unsaved changes */
1483
+ this.hasUnsavedChanges = false;
1484
+ // === Original State for Cancel/Revert ===
1485
+ /** Snapshots of original data for reverting UI changes */
1486
+ this.originalSnapshots = null;
1487
+ /** Flag to track if we're currently performing a cancel operation */
1488
+ this.isPerformingCancel = false;
1319
1489
  }
1320
1490
  /**
1321
1491
  * Component initialization. Calls parent initialization and loads related entity data
@@ -1337,7 +1507,6 @@ let AIAgentFormComponentExtended = class AIAgentFormComponentExtended extends AI
1337
1507
  if (!this.record?.ID)
1338
1508
  return;
1339
1509
  try {
1340
- console.log('🔍 AI Agent Form - Loading related data for Agent ID:', this.record.ID);
1341
1510
  const rv = new RunView();
1342
1511
  // Load sub-agents with data
1343
1512
  const subAgentResult = await rv.RunView({
@@ -1360,7 +1529,6 @@ let AIAgentFormComponentExtended = class AIAgentFormComponentExtended extends AI
1360
1529
  });
1361
1530
  this.agentActions = actionResult.Results || [];
1362
1531
  this.actionCount = actionResult.TotalRowCount || 0;
1363
- console.log('⚡ Final actions count:', this.actionCount, 'items');
1364
1532
  // Load learning cycles with data
1365
1533
  const learningResult = await rv.RunView({
1366
1534
  EntityName: 'AI Agent Learning Cycles',
@@ -1384,6 +1552,8 @@ let AIAgentFormComponentExtended = class AIAgentFormComponentExtended extends AI
1384
1552
  });
1385
1553
  this.recentExecutions = historyResult.Results || [];
1386
1554
  this.executionHistoryCount = historyResult.TotalRowCount || 0;
1555
+ // Create snapshot for cancel/revert functionality
1556
+ this.createOriginalSnapshot();
1387
1557
  }
1388
1558
  catch (error) {
1389
1559
  console.error('Error loading related data:', error);
@@ -1396,6 +1566,77 @@ let AIAgentFormComponentExtended = class AIAgentFormComponentExtended extends AI
1396
1566
  this.executionHistoryCount = 0;
1397
1567
  }
1398
1568
  }
1569
+ /**
1570
+ * Creates a snapshot of the current UI state for cancel/revert functionality
1571
+ * @private
1572
+ */
1573
+ createOriginalSnapshot() {
1574
+ this.originalSnapshots = {
1575
+ agentPrompts: [...this.agentPrompts], // Deep copy of arrays
1576
+ agentActions: [...this.agentActions],
1577
+ subAgents: [...this.subAgents],
1578
+ promptCount: this.promptCount,
1579
+ actionCount: this.actionCount,
1580
+ subAgentCount: this.subAgentCount,
1581
+ learningCycleCount: this.learningCycleCount,
1582
+ noteCount: this.noteCount,
1583
+ executionHistoryCount: this.executionHistoryCount
1584
+ };
1585
+ }
1586
+ /**
1587
+ * Restores the UI to its original state using saved snapshots
1588
+ * @private
1589
+ */
1590
+ restoreFromSnapshots() {
1591
+ if (this.originalSnapshots) {
1592
+ console.log('Restoring UI from snapshots...');
1593
+ // Restore arrays (create new copies to ensure reactivity)
1594
+ this.agentPrompts = [...this.originalSnapshots.agentPrompts];
1595
+ this.agentActions = [...this.originalSnapshots.agentActions];
1596
+ this.subAgents = [...this.originalSnapshots.subAgents];
1597
+ // Restore counts
1598
+ this.promptCount = this.originalSnapshots.promptCount;
1599
+ this.actionCount = this.originalSnapshots.actionCount;
1600
+ this.subAgentCount = this.originalSnapshots.subAgentCount;
1601
+ this.learningCycleCount = this.originalSnapshots.learningCycleCount;
1602
+ this.noteCount = this.originalSnapshots.noteCount;
1603
+ this.executionHistoryCount = this.originalSnapshots.executionHistoryCount;
1604
+ // Reset other UI state
1605
+ this.hasUnsavedChanges = false;
1606
+ console.log('UI restored - Prompts:', this.promptCount, 'Actions:', this.actionCount, 'SubAgents:', this.subAgentCount);
1607
+ // Force change detection to update the UI
1608
+ this.cdr.detectChanges();
1609
+ }
1610
+ else {
1611
+ console.warn('No snapshots available to restore from');
1612
+ }
1613
+ }
1614
+ /**
1615
+ * Override CancelEdit to restore UI state when user cancels changes
1616
+ */
1617
+ CancelEdit() {
1618
+ console.log('=== AI Agent CancelEdit called ===');
1619
+ console.log('Pending records before clear:', this.PendingRecords.length);
1620
+ // Set flag to indicate we're performing a cancel operation
1621
+ this.isPerformingCancel = true;
1622
+ try {
1623
+ // CRITICAL: Clear our pending records BEFORE calling parent
1624
+ // This ensures that any prompt/action/sub-agent changes we added don't persist
1625
+ this.PendingRecords.length = 0;
1626
+ console.log('Pending records after clear:', this.PendingRecords.length);
1627
+ // Call the parent CancelEdit first (this handles main record revert and pending records)
1628
+ super.CancelEdit();
1629
+ // Restore our UI state after parent cancel
1630
+ this.restoreFromSnapshots();
1631
+ // Reset the unsaved changes flag
1632
+ this.hasUnsavedChanges = false;
1633
+ console.log('Cancel completed successfully');
1634
+ }
1635
+ finally {
1636
+ // Always reset the flag
1637
+ this.isPerformingCancel = false;
1638
+ }
1639
+ }
1399
1640
  /**
1400
1641
  * Opens the integrated test harness for the current agent.
1401
1642
  * Validates that the agent has been saved before allowing testing.
@@ -1501,66 +1742,230 @@ let AIAgentFormComponentExtended = class AIAgentFormComponentExtended extends AI
1501
1742
  return !!subAgent?.LogoURL;
1502
1743
  }
1503
1744
  /**
1504
- * Creates a new sub-agent
1745
+ * Creates a new sub-agent using the create sub-agent dialog
1505
1746
  */
1506
1747
  async createSubAgent() {
1507
- // Open a new AI Agent form with ParentID pre-populated
1508
- MJNotificationService.Instance.CreateSimpleNotification('Opening new sub-agent form...', 'info', 2000);
1509
- // For now, we'll just show a notification
1510
- // In a full implementation, this would emit an event to open a new form
1511
- // with ParentID pre-populated to this.record.ID
1748
+ try {
1749
+ this.agentManagementService.openCreateSubAgentDialog({
1750
+ title: `Create Sub-Agent for ${this.record.Name || 'Agent'}`,
1751
+ initialName: '',
1752
+ parentAgentId: this.record.ID,
1753
+ parentAgentName: this.record.Name || 'Agent',
1754
+ viewContainerRef: this.viewContainerRef
1755
+ }).subscribe({
1756
+ next: async (result) => {
1757
+ if (result && result.subAgent) {
1758
+ try {
1759
+ // Handle deferred sub-agent creation if parent is not saved
1760
+ if (!this.record.IsSaved) {
1761
+ // Store a temporary reference to the parent - will be resolved during save
1762
+ result.subAgent.Set('_tempParentId', this.record.ID);
1763
+ }
1764
+ // Add the sub-agent to pending records
1765
+ this.PendingRecords.push({
1766
+ entityObject: result.subAgent,
1767
+ action: 'save'
1768
+ });
1769
+ // Add any newly created prompts to pending records
1770
+ if (result.newPrompts) {
1771
+ for (const prompt of result.newPrompts) {
1772
+ this.PendingRecords.push({
1773
+ entityObject: prompt,
1774
+ action: 'save'
1775
+ });
1776
+ }
1777
+ }
1778
+ // Add any newly created prompt templates to pending records
1779
+ if (result.newPromptTemplates) {
1780
+ for (const template of result.newPromptTemplates) {
1781
+ this.PendingRecords.push({
1782
+ entityObject: template,
1783
+ action: 'save'
1784
+ });
1785
+ }
1786
+ }
1787
+ // Add any newly created template contents to pending records
1788
+ if (result.newTemplateContents) {
1789
+ for (const content of result.newTemplateContents) {
1790
+ this.PendingRecords.push({
1791
+ entityObject: content,
1792
+ action: 'save'
1793
+ });
1794
+ }
1795
+ }
1796
+ // Add agent prompt links to pending records
1797
+ if (result.agentPrompts) {
1798
+ for (const agentPrompt of result.agentPrompts) {
1799
+ this.PendingRecords.push({
1800
+ entityObject: agentPrompt,
1801
+ action: 'save'
1802
+ });
1803
+ }
1804
+ }
1805
+ // Add agent action links to pending records
1806
+ if (result.agentActions) {
1807
+ for (const agentAction of result.agentActions) {
1808
+ this.PendingRecords.push({
1809
+ entityObject: agentAction,
1810
+ action: 'save'
1811
+ });
1812
+ }
1813
+ }
1814
+ // Update UI to show the new sub-agent
1815
+ this.subAgents.push(result.subAgent);
1816
+ this.subAgentCount = this.subAgents.length;
1817
+ this.hasUnsavedChanges = true;
1818
+ // Trigger change detection
1819
+ this.cdr.detectChanges();
1820
+ MJNotificationService.Instance.CreateSimpleNotification(`Sub-agent "${result.subAgent.Name}" created and will be saved when you save the parent agent`, 'success', 4000);
1821
+ }
1822
+ catch (error) {
1823
+ console.error('Error processing created sub-agent:', error);
1824
+ MJNotificationService.Instance.CreateSimpleNotification('Error processing created sub-agent. Please try again.', 'error', 3000);
1825
+ }
1826
+ }
1827
+ },
1828
+ error: (error) => {
1829
+ console.error('Error in create sub-agent dialog:', error);
1830
+ MJNotificationService.Instance.CreateSimpleNotification('Error opening sub-agent creation dialog. Please try again.', 'error', 3000);
1831
+ }
1832
+ });
1833
+ }
1834
+ catch (error) {
1835
+ console.error('Error in createSubAgent:', error);
1836
+ MJNotificationService.Instance.CreateSimpleNotification('Error creating sub-agent. Please try again.', 'error', 3000);
1837
+ }
1512
1838
  }
1513
1839
  /**
1514
- * Adds a new prompt to the agent
1840
+ * Adds a new prompt to the agent (deferred until save)
1515
1841
  */
1516
1842
  async addPrompt() {
1517
- const config = {
1518
- entityName: 'AI Prompts',
1519
- title: 'Select AI Prompt',
1520
- displayField: 'Name',
1521
- descriptionField: 'Description',
1522
- statusField: 'Status',
1523
- filters: `Status='Active'`,
1524
- orderBy: 'Name ASC',
1525
- icon: 'fa-solid fa-comment-dots'
1526
- };
1527
- const dialogRef = this.dialogService.open({
1528
- content: EntitySelectorDialogComponent
1529
- });
1530
- const componentInstance = dialogRef.content.instance;
1531
- componentInstance.config = config;
1532
- const result = await dialogRef.result;
1533
- if (result && result.entity) {
1534
- // User selected an existing prompt
1535
- await this.linkPromptToAgent(result.entity);
1843
+ // Get currently linked and pending prompt IDs for pre-selection
1844
+ const currentPromptIds = this.agentPrompts.map(ap => ap.ID);
1845
+ const pendingAddIds = this.PendingRecords
1846
+ .filter(p => p.entityObject.EntityInfo.Name === 'MJ: AI Agent Prompts' && p.action === 'save')
1847
+ .map(p => p.entityObject.Get('PromptID'));
1848
+ const allLinkedIds = [...currentPromptIds, ...pendingAddIds];
1849
+ try {
1850
+ this.agentManagementService.openPromptSelectorDialog({
1851
+ title: 'Add Prompts to Agent',
1852
+ multiSelect: true,
1853
+ selectedPromptIds: [],
1854
+ showCreateNew: true,
1855
+ linkedPromptIds: allLinkedIds,
1856
+ viewContainerRef: this.viewContainerRef
1857
+ }).subscribe({
1858
+ next: async (result) => {
1859
+ if (result && result.selectedPrompts.length > 0) {
1860
+ // Filter out already linked or pending prompts
1861
+ const newPrompts = result.selectedPrompts.filter(prompt => !allLinkedIds.includes(prompt.ID));
1862
+ if (newPrompts.length === 0) {
1863
+ MJNotificationService.Instance.CreateSimpleNotification('All selected prompts are already linked to this agent', 'info', 3000);
1864
+ return;
1865
+ }
1866
+ // Add to pending changes (defer until save)
1867
+ const md = new Metadata();
1868
+ for (const prompt of newPrompts) {
1869
+ const agentPrompt = await md.GetEntityObject('MJ: AI Agent Prompts');
1870
+ agentPrompt.NewRecord();
1871
+ agentPrompt.AgentID = this.record.ID;
1872
+ agentPrompt.PromptID = prompt.ID;
1873
+ agentPrompt.Status = 'Active';
1874
+ agentPrompt.ExecutionOrder = 1;
1875
+ this.PendingRecords.push({
1876
+ entityObject: agentPrompt,
1877
+ action: 'save'
1878
+ });
1879
+ }
1880
+ this.hasUnsavedChanges = true;
1881
+ // Update UI to show the new prompts (cast to extended type for display)
1882
+ this.agentPrompts.push(...newPrompts);
1883
+ this.promptCount = this.agentPrompts.length;
1884
+ // Trigger change detection to update UI
1885
+ this.cdr.detectChanges();
1886
+ // Show success notification
1887
+ MJNotificationService.Instance.CreateSimpleNotification(`${newPrompts.length} prompt${newPrompts.length === 1 ? '' : 's'} will be added when you save the agent`, 'info', 4000);
1888
+ }
1889
+ else if (result && result.createNew) {
1890
+ // User wants to create a new prompt
1891
+ await this.createNewPrompt();
1892
+ }
1893
+ },
1894
+ error: (error) => {
1895
+ console.error('Error opening prompt selector:', error);
1896
+ MJNotificationService.Instance.CreateSimpleNotification('Error opening prompt selector. Please try again.', 'error', 3000);
1897
+ }
1898
+ });
1899
+ }
1900
+ catch (error) {
1901
+ console.error('Error in addPrompt:', error);
1902
+ MJNotificationService.Instance.CreateSimpleNotification('Error adding prompts. Please try again.', 'error', 3000);
1536
1903
  }
1537
- else if (result && result.createNew) {
1538
- // User wants to create a new prompt
1539
- await this.createNewPrompt();
1904
+ }
1905
+ /**
1906
+ * Handle context compression toggle and reset related fields when disabled
1907
+ */
1908
+ onContextCompressionToggle(value) {
1909
+ const enabled = value === true || value === 'true';
1910
+ if (!enabled) {
1911
+ // Reset context compression related fields to null when disabled
1912
+ this.record.ContextCompressionMessageThreshold = null;
1913
+ this.record.ContextCompressionPromptID = null;
1914
+ this.record.ContextCompressionMessageRetentionCount = null;
1915
+ // Trigger change detection to update the UI
1916
+ this.cdr.detectChanges();
1540
1917
  }
1541
1918
  }
1542
1919
  /**
1543
- * Opens the enhanced action gallery for selecting actions
1920
+ * Opens the modern Add Action dialog for selecting actions (deferred until save)
1544
1921
  */
1545
1922
  async configureActions() {
1546
- // Get currently linked action IDs for pre-selection
1547
- const linkedActionIds = this.agentActions.map(aa => aa.ID);
1548
- this.actionGalleryService.openForMultiSelection({
1549
- preSelectedActions: linkedActionIds,
1550
- showCategories: true,
1551
- enableQuickTest: true,
1552
- title: 'Select Actions for Agent',
1553
- submitButtonText: 'Add Selected Actions'
1554
- }, this.viewContainerRef).subscribe(async (selectedActions) => {
1555
- if (selectedActions && selectedActions.length > 0) {
1556
- // Find newly selected actions (not already linked)
1557
- const newActions = selectedActions.filter(action => !linkedActionIds.includes(action.ID));
1558
- // Link each new action to the agent
1559
- for (const action of newActions) {
1560
- await this.linkActionToAgent(action);
1923
+ // Get currently linked and pending action IDs for pre-selection
1924
+ const currentActionIds = this.agentActions.map(aa => aa.ID);
1925
+ const pendingAddIds = this.PendingRecords
1926
+ .filter(p => p.entityObject.EntityInfo.Name === 'AI Agent Actions' && p.action === 'save')
1927
+ .map(p => p.entityObject.Get('ActionID'));
1928
+ const allLinkedIds = [...currentActionIds, ...pendingAddIds];
1929
+ this.agentManagementService.openAddActionDialog({
1930
+ agentId: this.record.ID,
1931
+ agentName: this.record.Name || 'Agent',
1932
+ existingActionIds: allLinkedIds,
1933
+ viewContainerRef: this.viewContainerRef
1934
+ }).subscribe({
1935
+ next: async (selectedActions) => {
1936
+ if (selectedActions && selectedActions.length > 0) {
1937
+ // Filter out already linked or pending actions
1938
+ const newActions = selectedActions.filter(action => !allLinkedIds.includes(action.ID));
1939
+ if (newActions.length === 0) {
1940
+ MJNotificationService.Instance.CreateSimpleNotification('All selected actions are already linked to this agent', 'info', 3000);
1941
+ return;
1942
+ }
1943
+ // Add to pending changes (defer until save)
1944
+ const md = new Metadata();
1945
+ for (const action of newActions) {
1946
+ const agentAction = await md.GetEntityObject('AI Agent Actions');
1947
+ agentAction.NewRecord();
1948
+ agentAction.AgentID = this.record.ID;
1949
+ agentAction.ActionID = action.ID;
1950
+ agentAction.Status = 'Active';
1951
+ this.PendingRecords.push({
1952
+ entityObject: agentAction,
1953
+ action: 'save'
1954
+ });
1955
+ }
1956
+ this.hasUnsavedChanges = true;
1957
+ // Update UI to show the new actions
1958
+ this.agentActions.push(...newActions);
1959
+ this.actionCount = this.agentActions.length;
1960
+ // Trigger change detection to update UI
1961
+ this.cdr.detectChanges();
1962
+ // Show success notification
1963
+ MJNotificationService.Instance.CreateSimpleNotification(`${newActions.length} action${newActions.length === 1 ? '' : 's'} will be added when you save the agent`, 'info', 4000);
1561
1964
  }
1562
- // Reload the actions list
1563
- await this.loadRelatedCounts();
1965
+ },
1966
+ error: (error) => {
1967
+ console.error('Error in add action dialog:', error);
1968
+ MJNotificationService.Instance.CreateSimpleNotification('Error opening action selection dialog. Please try again.', 'error', 3000);
1564
1969
  }
1565
1970
  });
1566
1971
  }
@@ -1744,7 +2149,7 @@ let AIAgentFormComponentExtended = class AIAgentFormComponentExtended extends AI
1744
2149
  }
1745
2150
  }
1746
2151
  /**
1747
- * Refreshes the related data
2152
+ * Refreshes the related data and updates snapshots
1748
2153
  */
1749
2154
  async refreshRelatedData() {
1750
2155
  if (this.record?.ID) {
@@ -1752,6 +2157,31 @@ let AIAgentFormComponentExtended = class AIAgentFormComponentExtended extends AI
1752
2157
  MJNotificationService.Instance.CreateSimpleNotification('Related data refreshed', 'success', 2000);
1753
2158
  }
1754
2159
  }
2160
+ /**
2161
+ * Manually refreshes the snapshot for cancel/revert functionality
2162
+ * Useful when you want to reset the "original state" to the current state
2163
+ */
2164
+ refreshSnapshot() {
2165
+ this.createOriginalSnapshot();
2166
+ MJNotificationService.Instance.CreateSimpleNotification('Current state saved as new baseline', 'info', 2000);
2167
+ }
2168
+ /**
2169
+ * Debug method to check current pending records state
2170
+ * Useful for troubleshooting cancel/revert issues
2171
+ */
2172
+ debugPendingRecords() {
2173
+ console.log('=== Pending Records Debug ===');
2174
+ console.log('Pending Records Count:', this.PendingRecords.length);
2175
+ console.log('Has Unsaved Changes:', this.hasUnsavedChanges);
2176
+ console.log('Is Performing Cancel:', this.isPerformingCancel);
2177
+ console.log('Pending Records:', this.PendingRecords.map(p => ({
2178
+ entityName: p.entityObject.EntityInfo.Name,
2179
+ id: p.entityObject.Get('ID'),
2180
+ action: p.action,
2181
+ isDirty: p.entityObject.Dirty
2182
+ })));
2183
+ console.log('=============================');
2184
+ }
1755
2185
  /**
1756
2186
  * Adds a new note to the agent
1757
2187
  */
@@ -1760,77 +2190,85 @@ let AIAgentFormComponentExtended = class AIAgentFormComponentExtended extends AI
1760
2190
  // In a full implementation, this would open a new AI Agent Note form
1761
2191
  // with AgentID pre-populated to this.record.ID
1762
2192
  }
1763
- /**
1764
- * Links an existing prompt to the agent
1765
- */
1766
- async linkPromptToAgent(prompt) {
1767
- try {
1768
- const md = new Metadata();
1769
- const agentPrompt = await md.GetEntityObject('AI Agent Prompts');
1770
- agentPrompt.AgentID = this.record.ID;
1771
- agentPrompt.PromptID = prompt.ID;
1772
- agentPrompt.Status = 'Active'; // Default value
1773
- agentPrompt.ExecutionOrder = 1; // Default execution order
1774
- const result = await agentPrompt.Save();
1775
- if (result) {
1776
- MJNotificationService.Instance.CreateSimpleNotification(`Prompt "${prompt.Name}" added successfully`, 'success', 3000);
1777
- await this.loadRelatedCounts();
1778
- }
1779
- else {
1780
- throw new Error('Failed to save AI Agent Prompt');
1781
- }
1782
- }
1783
- catch (error) {
1784
- console.error('Error linking prompt to agent:', error);
1785
- MJNotificationService.Instance.CreateSimpleNotification('Failed to add prompt', 'error', 3000);
1786
- }
1787
- }
1788
2193
  /**
1789
2194
  * Creates a new prompt and links it to the agent
1790
2195
  */
1791
2196
  async createNewPrompt() {
1792
- // TODO: Open new AI Prompt form
1793
- // await this.sharedService.CreateNewRecord('AI Prompts', undefined, [
1794
- // { FieldName: 'Status', Value: 'Active' }
1795
- // ]);
1796
- MJNotificationService.Instance.CreateSimpleNotification('Creating new prompt - functionality to be implemented', 'info', 3000);
1797
- }
1798
- /**
1799
- * Links an existing action to the agent
1800
- */
1801
- async linkActionToAgent(action) {
1802
2197
  try {
1803
- const md = new Metadata();
1804
- const agentAction = await md.GetEntityObject('AI Agent Actions');
1805
- agentAction.AgentID = this.record.ID;
1806
- agentAction.ActionID = action.ID;
1807
- agentAction.Status = 'Active'; // Default status
1808
- const result = await agentAction.Save();
1809
- if (result) {
1810
- MJNotificationService.Instance.CreateSimpleNotification(`Action "${action.Name}" added successfully`, 'success', 3000);
1811
- await this.loadRelatedCounts();
1812
- }
1813
- else {
1814
- throw new Error('Failed to save AI Agent Action');
1815
- }
2198
+ this.agentManagementService.openCreatePromptDialog({
2199
+ title: `Create New Prompt for ${this.record.Name || 'Agent'}`,
2200
+ initialName: '',
2201
+ viewContainerRef: this.viewContainerRef
2202
+ }).subscribe({
2203
+ next: async (result) => {
2204
+ if (result && result.prompt) {
2205
+ try {
2206
+ // Get current user using proper MJ pattern
2207
+ const md = new Metadata();
2208
+ const currentUserId = md.CurrentUser.ID;
2209
+ // Add the prompt to PendingRecords (will be saved with agent)
2210
+ this.PendingRecords.push({
2211
+ entityObject: result.prompt,
2212
+ action: 'save'
2213
+ });
2214
+ // Add template to PendingRecords if created
2215
+ if (result.template) {
2216
+ // Set UserID on template (required field)
2217
+ result.template.UserID = currentUserId;
2218
+ this.PendingRecords.push({
2219
+ entityObject: result.template,
2220
+ action: 'save'
2221
+ });
2222
+ }
2223
+ // Add template contents to PendingRecords if created
2224
+ if (result.templateContents && result.templateContents.length > 0) {
2225
+ for (const content of result.templateContents) {
2226
+ // Template content does not have UserID field, no manual user assignment needed
2227
+ this.PendingRecords.push({
2228
+ entityObject: content,
2229
+ action: 'save'
2230
+ });
2231
+ }
2232
+ }
2233
+ // Create the AI Agent Prompt link
2234
+ const agentPrompt = await md.GetEntityObject('MJ: AI Agent Prompts');
2235
+ agentPrompt.NewRecord();
2236
+ agentPrompt.AgentID = this.record.ID;
2237
+ agentPrompt.PromptID = result.prompt.ID;
2238
+ agentPrompt.Status = 'Active';
2239
+ agentPrompt.ExecutionOrder = 1;
2240
+ // AI Agent Prompt does not have UserID field, no manual user assignment needed
2241
+ this.PendingRecords.push({
2242
+ entityObject: agentPrompt,
2243
+ action: 'save'
2244
+ });
2245
+ this.hasUnsavedChanges = true;
2246
+ // Update UI to show the new prompt
2247
+ this.agentPrompts.push(result.prompt);
2248
+ this.promptCount = this.agentPrompts.length;
2249
+ // Trigger change detection to update UI
2250
+ this.cdr.detectChanges();
2251
+ MJNotificationService.Instance.CreateSimpleNotification(`New prompt "${result.prompt.Name}" will be created and linked when you save the agent`, 'success', 4000);
2252
+ }
2253
+ catch (error) {
2254
+ console.error('Error processing created prompt:', error);
2255
+ MJNotificationService.Instance.CreateSimpleNotification('Error processing created prompt. Please try again.', 'error', 3000);
2256
+ }
2257
+ }
2258
+ },
2259
+ error: (error) => {
2260
+ console.error('Error in create prompt dialog:', error);
2261
+ MJNotificationService.Instance.CreateSimpleNotification('Error opening prompt creation dialog. Please try again.', 'error', 3000);
2262
+ }
2263
+ });
1816
2264
  }
1817
2265
  catch (error) {
1818
- console.error('Error linking action to agent:', error);
1819
- MJNotificationService.Instance.CreateSimpleNotification('Failed to add action', 'error', 3000);
2266
+ console.error('Error in createNewPrompt:', error);
2267
+ MJNotificationService.Instance.CreateSimpleNotification('Error creating new prompt. Please try again.', 'error', 3000);
1820
2268
  }
1821
2269
  }
1822
2270
  /**
1823
- * Creates a new action and links it to the agent
1824
- */
1825
- async createNewAction() {
1826
- // TODO: Open new Action form
1827
- // await this.sharedService.CreateNewRecord('Actions', undefined, [
1828
- // { FieldName: 'Status', Value: 'Active' }
1829
- // ]);
1830
- MJNotificationService.Instance.CreateSimpleNotification('Creating new action - functionality to be implemented', 'info', 3000);
1831
- }
1832
- /**
1833
- * Removes a prompt from the agent
2271
+ * Removes a prompt from the agent (deferred until save)
1834
2272
  */
1835
2273
  async removePrompt(prompt, event) {
1836
2274
  event.stopPropagation(); // Prevent navigation
@@ -1844,34 +2282,57 @@ let AIAgentFormComponentExtended = class AIAgentFormComponentExtended extends AI
1844
2282
  width: 450,
1845
2283
  height: 200
1846
2284
  });
1847
- const result = await confirmDialog.result;
1848
- if (result && result.text === 'Remove') {
1849
- try {
1850
- // Find the AI Agent Prompt link record
1851
- const rv = new RunView();
1852
- const linkResult = await rv.RunView({
1853
- EntityName: 'AI Agent Prompts',
1854
- ExtraFilter: `AgentID='${this.record.ID}' AND PromptID='${prompt.ID}'`
1855
- });
1856
- if (linkResult.Results && linkResult.Results.length > 0) {
1857
- const agentPrompt = linkResult.Results[0];
1858
- const deleteResult = await agentPrompt.Delete();
1859
- if (deleteResult) {
1860
- MJNotificationService.Instance.CreateSimpleNotification(`Prompt "${prompt.Name}" removed successfully`, 'success', 3000);
1861
- await this.loadRelatedCounts();
2285
+ try {
2286
+ const result = await firstValueFrom(confirmDialog.result);
2287
+ if (result && result.text === 'Remove') {
2288
+ try {
2289
+ // Check if this is a pending add (not yet in database)
2290
+ const pendingAddIndex = this.PendingRecords.findIndex(p => p.entityObject.EntityInfo.Name === 'MJ: AI Agent Prompts' &&
2291
+ p.action === 'save' &&
2292
+ p.entityObject.Get('PromptID') === prompt.ID);
2293
+ if (pendingAddIndex >= 0) {
2294
+ // Remove from pending adds
2295
+ this.PendingRecords.splice(pendingAddIndex, 1);
1862
2296
  }
1863
2297
  else {
1864
- throw new Error('Failed to delete AI Agent Prompt link');
2298
+ // Find the existing AI Agent Prompt link record for deferred deletion
2299
+ const rv = new RunView();
2300
+ const linkResult = await rv.RunView({
2301
+ EntityName: 'MJ: AI Agent Prompts',
2302
+ ExtraFilter: `AgentID='${this.record.ID}' AND PromptID='${prompt.ID}'`,
2303
+ ResultType: 'entity_object'
2304
+ });
2305
+ if (linkResult.Success && linkResult.Results && linkResult.Results.length > 0) {
2306
+ const agentPromptToDelete = linkResult.Results[0];
2307
+ // Add to pending deletions
2308
+ this.PendingRecords.push({
2309
+ entityObject: agentPromptToDelete,
2310
+ action: 'delete'
2311
+ });
2312
+ }
2313
+ else {
2314
+ throw new Error('AI Agent Prompt link not found');
2315
+ }
2316
+ }
2317
+ // Remove from UI immediately
2318
+ const promptIndex = this.agentPrompts.findIndex(p => p.ID === prompt.ID);
2319
+ if (promptIndex >= 0) {
2320
+ this.agentPrompts.splice(promptIndex, 1);
2321
+ this.promptCount = this.agentPrompts.length;
1865
2322
  }
2323
+ this.hasUnsavedChanges = true;
2324
+ // Trigger change detection to update UI
2325
+ this.cdr.detectChanges();
2326
+ MJNotificationService.Instance.CreateSimpleNotification(`Prompt "${prompt.Name}" will be removed when you save the agent`, 'info', 4000);
1866
2327
  }
1867
- else {
1868
- throw new Error('AI Agent Prompt link not found');
2328
+ catch (error) {
2329
+ console.error('Error removing prompt from agent:', error);
2330
+ MJNotificationService.Instance.CreateSimpleNotification('Failed to remove prompt', 'error', 3000);
1869
2331
  }
1870
2332
  }
1871
- catch (error) {
1872
- console.error('Error removing prompt from agent:', error);
1873
- MJNotificationService.Instance.CreateSimpleNotification('Failed to remove prompt', 'error', 3000);
1874
- }
2333
+ }
2334
+ catch (dialogError) {
2335
+ console.error('Error with dialog:', dialogError);
1875
2336
  }
1876
2337
  }
1877
2338
  /**
@@ -1885,7 +2346,133 @@ let AIAgentFormComponentExtended = class AIAgentFormComponentExtended extends AI
1885
2346
  }
1886
2347
  }
1887
2348
  /**
1888
- * Removes an action from the agent
2349
+ * Opens the sub-agent selector dialog for adding sub-agents (deferred until save)
2350
+ */
2351
+ async addSubAgents() {
2352
+ try {
2353
+ // Get list of already pending sub-agent IDs to filter duplicates
2354
+ const pendingSubAgentIds = this.PendingRecords
2355
+ .filter(p => p.entityObject.EntityInfo.Name === 'AI Agents' &&
2356
+ p.action === 'save' &&
2357
+ p.entityObject.Get('ParentID') === this.record.ID)
2358
+ .map(p => p.entityObject.Get('ID'));
2359
+ const existingSubAgentIds = this.subAgents.map(agent => agent.ID);
2360
+ const allLinkedIds = [...pendingSubAgentIds, ...existingSubAgentIds];
2361
+ this.agentManagementService.openSubAgentSelectorDialog({
2362
+ title: 'Add Sub-Agents',
2363
+ multiSelect: true,
2364
+ parentAgentId: this.record.ID,
2365
+ showCreateNew: true,
2366
+ viewContainerRef: this.viewContainerRef
2367
+ }).subscribe({
2368
+ next: async (result) => {
2369
+ if (result && result.selectedAgents && result.selectedAgents.length > 0) {
2370
+ // Filter out already linked or pending agents
2371
+ const newAgents = result.selectedAgents.filter(agent => !allLinkedIds.includes(agent.ID));
2372
+ if (newAgents.length === 0) {
2373
+ MJNotificationService.Instance.CreateSimpleNotification('All selected agents are already linked to this agent', 'info', 3000);
2374
+ return;
2375
+ }
2376
+ // Add to pending changes (defer until save)
2377
+ const md = new Metadata();
2378
+ for (const agent of newAgents) {
2379
+ const subAgentToUpdate = await md.GetEntityObject('AI Agents');
2380
+ await subAgentToUpdate.Load(agent.ID);
2381
+ subAgentToUpdate.ParentID = this.record.ID;
2382
+ // Database constraint requires ExposeAsAction = false for sub-agents
2383
+ subAgentToUpdate.ExposeAsAction = false;
2384
+ this.PendingRecords.push({
2385
+ entityObject: subAgentToUpdate,
2386
+ action: 'save'
2387
+ });
2388
+ }
2389
+ this.hasUnsavedChanges = true;
2390
+ // Update UI to show the new sub-agents
2391
+ this.subAgents.push(...newAgents);
2392
+ this.subAgentCount = this.subAgents.length;
2393
+ // Trigger change detection to update UI
2394
+ this.cdr.detectChanges();
2395
+ // Show success notification
2396
+ MJNotificationService.Instance.CreateSimpleNotification(`${newAgents.length} agent${newAgents.length === 1 ? '' : 's'} will be converted to sub-agent${newAgents.length === 1 ? '' : 's'} when you save`, 'info', 4000);
2397
+ }
2398
+ else if (result && result.createNew) {
2399
+ // User wants to create a new sub-agent
2400
+ await this.createSubAgent();
2401
+ }
2402
+ },
2403
+ error: (error) => {
2404
+ console.error('Error opening sub-agent selector:', error);
2405
+ MJNotificationService.Instance.CreateSimpleNotification('Error opening sub-agent selector. Please try again.', 'error', 3000);
2406
+ }
2407
+ });
2408
+ }
2409
+ catch (error) {
2410
+ console.error('Error in addSubAgents:', error);
2411
+ MJNotificationService.Instance.CreateSimpleNotification('Error adding sub-agents. Please try again.', 'error', 3000);
2412
+ }
2413
+ }
2414
+ /**
2415
+ * Removes a sub-agent from this agent (deferred until save)
2416
+ */
2417
+ async removeSubAgent(subAgent, event) {
2418
+ event.stopPropagation(); // Prevent navigation
2419
+ const confirmDialog = this.dialogService.open({
2420
+ title: 'Remove Sub-Agent',
2421
+ content: `Are you sure you want to remove "${subAgent.Name}" as a sub-agent? This will make it an independent root agent.`,
2422
+ actions: [
2423
+ { text: 'Cancel' },
2424
+ { text: 'Remove', themeColor: 'error' }
2425
+ ],
2426
+ width: 450,
2427
+ height: 200
2428
+ });
2429
+ try {
2430
+ const result = await firstValueFrom(confirmDialog.result);
2431
+ if (result && result.text === 'Remove') {
2432
+ try {
2433
+ // Check if this is a pending add (not yet in database)
2434
+ const pendingAddIndex = this.PendingRecords.findIndex(p => p.entityObject.EntityInfo.Name === 'AI Agents' &&
2435
+ p.action === 'save' &&
2436
+ p.entityObject.Get('ID') === subAgent.ID &&
2437
+ p.entityObject.Get('ParentID') === this.record.ID);
2438
+ if (pendingAddIndex >= 0) {
2439
+ // Remove from pending adds
2440
+ this.PendingRecords.splice(pendingAddIndex, 1);
2441
+ }
2442
+ else {
2443
+ // Add to pending removals (will restore to root agent)
2444
+ const md = new Metadata();
2445
+ const subAgentToUpdate = await md.GetEntityObject('AI Agents');
2446
+ await subAgentToUpdate.Load(subAgent.ID);
2447
+ subAgentToUpdate.ParentID = null; // Will become a root agent
2448
+ this.PendingRecords.push({
2449
+ entityObject: subAgentToUpdate,
2450
+ action: 'save'
2451
+ });
2452
+ }
2453
+ // Remove from UI immediately
2454
+ const subAgentIndex = this.subAgents.findIndex(sa => sa.ID === subAgent.ID);
2455
+ if (subAgentIndex >= 0) {
2456
+ this.subAgents.splice(subAgentIndex, 1);
2457
+ this.subAgentCount = this.subAgents.length;
2458
+ }
2459
+ this.hasUnsavedChanges = true;
2460
+ // Trigger change detection to update UI
2461
+ this.cdr.detectChanges();
2462
+ MJNotificationService.Instance.CreateSimpleNotification(`"${subAgent.Name}" will be removed as a sub-agent when you save`, 'info', 4000);
2463
+ }
2464
+ catch (error) {
2465
+ console.error('Error removing sub-agent:', error);
2466
+ MJNotificationService.Instance.CreateSimpleNotification('Failed to remove sub-agent', 'error', 3000);
2467
+ }
2468
+ }
2469
+ }
2470
+ catch (dialogError) {
2471
+ console.error('Error with dialog:', dialogError);
2472
+ }
2473
+ }
2474
+ /**
2475
+ * Removes an action from the agent (deferred until save)
1889
2476
  */
1890
2477
  async removeAction(action, event) {
1891
2478
  event.stopPropagation(); // Prevent navigation
@@ -1899,38 +2486,342 @@ let AIAgentFormComponentExtended = class AIAgentFormComponentExtended extends AI
1899
2486
  width: 450,
1900
2487
  height: 200
1901
2488
  });
1902
- const result = await confirmDialog.result;
1903
- if (result && result.text === 'Remove') {
1904
- try {
1905
- // Find the AI Agent Action link record
1906
- const rv = new RunView();
1907
- const linkResult = await rv.RunView({
1908
- EntityName: 'AI Agent Actions',
1909
- ExtraFilter: `AgentID='${this.record.ID}' AND ActionID='${action.ID}'`
1910
- });
1911
- if (linkResult.Results && linkResult.Results.length > 0) {
1912
- const agentAction = linkResult.Results[0];
1913
- const deleteResult = await agentAction.Delete();
1914
- if (deleteResult) {
1915
- MJNotificationService.Instance.CreateSimpleNotification(`Action "${action.Name}" removed successfully`, 'success', 3000);
1916
- await this.loadRelatedCounts();
2489
+ try {
2490
+ const result = await firstValueFrom(confirmDialog.result);
2491
+ if (result && result.text === 'Remove') {
2492
+ try {
2493
+ // Check if this is a pending add (not yet in database)
2494
+ const pendingAddIndex = this.PendingRecords.findIndex(p => p.entityObject.EntityInfo.Name === 'AI Agent Actions' &&
2495
+ p.action === 'save' &&
2496
+ p.entityObject.Get('ActionID') === action.ID);
2497
+ if (pendingAddIndex >= 0) {
2498
+ // Remove from pending adds
2499
+ this.PendingRecords.splice(pendingAddIndex, 1);
1917
2500
  }
1918
2501
  else {
1919
- throw new Error('Failed to delete AI Agent Action link');
2502
+ // Find the existing AI Agent Action link record for deferred deletion
2503
+ const rv = new RunView();
2504
+ const linkResult = await rv.RunView({
2505
+ EntityName: 'AI Agent Actions',
2506
+ ExtraFilter: `AgentID='${this.record.ID}' AND ActionID='${action.ID}'`,
2507
+ ResultType: 'entity_object'
2508
+ });
2509
+ if (linkResult.Success && linkResult.Results && linkResult.Results.length > 0) {
2510
+ const agentActionToDelete = linkResult.Results[0];
2511
+ // Add to pending deletions
2512
+ this.PendingRecords.push({
2513
+ entityObject: agentActionToDelete,
2514
+ action: 'delete'
2515
+ });
2516
+ }
2517
+ else {
2518
+ throw new Error('AI Agent Action link not found');
2519
+ }
2520
+ }
2521
+ // Remove from UI immediately
2522
+ const actionIndex = this.agentActions.findIndex(a => a.ID === action.ID);
2523
+ if (actionIndex >= 0) {
2524
+ this.agentActions.splice(actionIndex, 1);
2525
+ this.actionCount = this.agentActions.length;
2526
+ }
2527
+ this.hasUnsavedChanges = true;
2528
+ // Trigger change detection to update UI
2529
+ this.cdr.detectChanges();
2530
+ MJNotificationService.Instance.CreateSimpleNotification(`Action "${action.Name}" will be removed when you save the agent`, 'info', 4000);
2531
+ }
2532
+ catch (error) {
2533
+ console.error('Error removing action from agent:', error);
2534
+ MJNotificationService.Instance.CreateSimpleNotification('Failed to remove action', 'error', 3000);
2535
+ }
2536
+ }
2537
+ }
2538
+ catch (dialogError) {
2539
+ console.error('Error with action dialog:', dialogError);
2540
+ }
2541
+ }
2542
+ /**
2543
+ * Opens the advanced settings dialog for a prompt
2544
+ */
2545
+ async openPromptAdvancedSettings(prompt, event) {
2546
+ event.stopPropagation(); // Prevent navigation
2547
+ try {
2548
+ // Find the corresponding AIAgentPromptEntity for this prompt
2549
+ const rv = new RunView();
2550
+ const agentPromptResult = await rv.RunView({
2551
+ EntityName: 'MJ: AI Agent Prompts',
2552
+ ExtraFilter: `AgentID='${this.record.ID}' AND PromptID='${prompt.ID}'`,
2553
+ ResultType: 'entity_object'
2554
+ });
2555
+ if (!agentPromptResult.Success || !agentPromptResult.Results?.length) {
2556
+ MJNotificationService.Instance.CreateSimpleNotification('Unable to find prompt configuration for advanced settings', 'error', 3000);
2557
+ return;
2558
+ }
2559
+ const agentPrompt = agentPromptResult.Results[0];
2560
+ // Get all agent prompts for validation
2561
+ const allAgentPromptsResult = await rv.RunView({
2562
+ EntityName: 'MJ: AI Agent Prompts',
2563
+ ExtraFilter: `AgentID='${this.record.ID}'`,
2564
+ ResultType: 'entity_object'
2565
+ });
2566
+ const allAgentPrompts = allAgentPromptsResult.Success ? (allAgentPromptsResult.Results || []) : [];
2567
+ this.agentManagementService.openAgentPromptAdvancedSettingsDialog({
2568
+ agentPrompt: agentPrompt,
2569
+ allAgentPrompts: allAgentPrompts,
2570
+ viewContainerRef: this.viewContainerRef
2571
+ }).subscribe({
2572
+ next: async (formData) => {
2573
+ if (formData) {
2574
+ try {
2575
+ // Update the agent prompt entity with new values
2576
+ agentPrompt.ExecutionOrder = formData.executionOrder;
2577
+ agentPrompt.Purpose = formData.purpose;
2578
+ agentPrompt.ConfigurationID = formData.configurationID;
2579
+ agentPrompt.ContextBehavior = formData.contextBehavior;
2580
+ agentPrompt.ContextMessageCount = formData.contextMessageCount;
2581
+ agentPrompt.Status = formData.status;
2582
+ // Save immediately to database
2583
+ const saveResult = await agentPrompt.Save();
2584
+ if (saveResult) {
2585
+ MJNotificationService.Instance.CreateSimpleNotification('Prompt settings updated successfully', 'success', 3000);
2586
+ // Refresh the related data to reflect changes
2587
+ await this.loadRelatedCounts();
2588
+ }
2589
+ else {
2590
+ MJNotificationService.Instance.CreateSimpleNotification('Failed to save prompt settings. Please try again.', 'error', 3000);
2591
+ }
2592
+ }
2593
+ catch (error) {
2594
+ console.error('Error saving prompt advanced settings:', error);
2595
+ MJNotificationService.Instance.CreateSimpleNotification('Error saving prompt settings. Please try again.', 'error', 3000);
2596
+ }
2597
+ }
2598
+ },
2599
+ error: (error) => {
2600
+ console.error('Error opening prompt advanced settings dialog:', error);
2601
+ MJNotificationService.Instance.CreateSimpleNotification('Error opening advanced settings. Please try again.', 'error', 3000);
2602
+ }
2603
+ });
2604
+ }
2605
+ catch (error) {
2606
+ console.error('Error in openPromptAdvancedSettings:', error);
2607
+ MJNotificationService.Instance.CreateSimpleNotification('Error opening prompt advanced settings. Please try again.', 'error', 3000);
2608
+ }
2609
+ }
2610
+ /**
2611
+ * Opens the advanced settings dialog for a sub-agent
2612
+ */
2613
+ async openSubAgentAdvancedSettings(subAgent, event) {
2614
+ event.stopPropagation(); // Prevent navigation
2615
+ try {
2616
+ // Load the full sub-agent entity for editing
2617
+ const md = new Metadata();
2618
+ const subAgentEntity = await md.GetEntityObject('AI Agents');
2619
+ await subAgentEntity.Load(subAgent.ID);
2620
+ // Get all sub-agents under the same parent for validation
2621
+ const rv = new RunView();
2622
+ const allSubAgentsResult = await rv.RunView({
2623
+ EntityName: 'AI Agents',
2624
+ ExtraFilter: `ParentID='${this.record.ID}'`,
2625
+ ResultType: 'entity_object'
2626
+ });
2627
+ const allSubAgents = allSubAgentsResult.Success ? (allSubAgentsResult.Results || []) : [];
2628
+ this.agentManagementService.openSubAgentAdvancedSettingsDialog({
2629
+ subAgent: subAgentEntity,
2630
+ allSubAgents: allSubAgents,
2631
+ viewContainerRef: this.viewContainerRef
2632
+ }).subscribe({
2633
+ next: async (formData) => {
2634
+ if (formData) {
2635
+ try {
2636
+ // Update the sub-agent entity with new values
2637
+ subAgentEntity.ExecutionOrder = formData.executionOrder;
2638
+ subAgentEntity.ExecutionMode = formData.executionMode;
2639
+ subAgentEntity.Status = formData.status;
2640
+ subAgentEntity.TypeID = formData.typeID;
2641
+ subAgentEntity.ExposeAsAction = formData.exposeAsAction;
2642
+ // Save immediately to database
2643
+ const saveResult = await subAgentEntity.Save();
2644
+ if (saveResult) {
2645
+ MJNotificationService.Instance.CreateSimpleNotification('Sub-agent settings updated successfully', 'success', 3000);
2646
+ // Update the local sub-agent data to reflect changes
2647
+ const localSubAgent = this.subAgents.find(sa => sa.ID === subAgent.ID);
2648
+ if (localSubAgent) {
2649
+ localSubAgent.ExecutionOrder = formData.executionOrder;
2650
+ localSubAgent.ExecutionMode = formData.executionMode;
2651
+ localSubAgent.Status = formData.status;
2652
+ localSubAgent.TypeID = formData.typeID;
2653
+ localSubAgent.ExposeAsAction = formData.exposeAsAction;
2654
+ }
2655
+ // Trigger change detection to update UI
2656
+ this.cdr.detectChanges();
2657
+ }
2658
+ else {
2659
+ MJNotificationService.Instance.CreateSimpleNotification('Failed to save sub-agent settings. Please try again.', 'error', 3000);
2660
+ }
2661
+ }
2662
+ catch (error) {
2663
+ console.error('Error saving sub-agent advanced settings:', error);
2664
+ MJNotificationService.Instance.CreateSimpleNotification('Error saving sub-agent settings. Please try again.', 'error', 3000);
2665
+ }
2666
+ }
2667
+ },
2668
+ error: (error) => {
2669
+ console.error('Error opening sub-agent advanced settings dialog:', error);
2670
+ MJNotificationService.Instance.CreateSimpleNotification('Error opening advanced settings. Please try again.', 'error', 3000);
2671
+ }
2672
+ });
2673
+ }
2674
+ catch (error) {
2675
+ console.error('Error in openSubAgentAdvancedSettings:', error);
2676
+ MJNotificationService.Instance.CreateSimpleNotification('Error opening sub-agent advanced settings. Please try again.', 'error', 3000);
2677
+ }
2678
+ }
2679
+ /**
2680
+ * Override PopulatePendingRecords to preserve our pending records before parent clears them
2681
+ * However, during cancel operations, we want to clear all pending records completely
2682
+ */
2683
+ PopulatePendingRecords() {
2684
+ // If we're in the middle of a cancel operation, don't preserve pending records
2685
+ // The base class CancelEdit will handle reverting pending records appropriately
2686
+ if (this.isPerformingCancel) {
2687
+ super.PopulatePendingRecords();
2688
+ return;
2689
+ }
2690
+ // IMPORTANT: The parent method clears the pending records array, so we need to preserve
2691
+ // any records we've added before calling the parent method during normal operations
2692
+ const currentPendingRecords = [...this.PendingRecords]; // Make a copy
2693
+ // Call parent first to get child component pending records (this clears the array)
2694
+ super.PopulatePendingRecords();
2695
+ // Re-add our preserved records (only during normal save operations)
2696
+ for (const record of currentPendingRecords) {
2697
+ this.PendingRecords.push(record);
2698
+ }
2699
+ }
2700
+ /**
2701
+ * Override InternalSaveRecord to handle agent-specific transaction logic
2702
+ * AI Agent must be saved first since related entities depend on it
2703
+ */
2704
+ /**
2705
+ * The base SaveRecord() method will call this InternalSaveRecord() method
2706
+ * after handling validation and pending record population
2707
+ */
2708
+ async InternalSaveRecord() {
2709
+ if (!this.record) {
2710
+ return false;
2711
+ }
2712
+ try {
2713
+ const md = new Metadata();
2714
+ const transactionGroup = await md.CreateTransactionGroup();
2715
+ // Set transaction group on main record first
2716
+ this.record.TransactionGroup = transactionGroup;
2717
+ // Save entities in dependency order to avoid foreign key constraint errors
2718
+ // We need to save Templates and Template Contents BEFORE the main AI Agent
2719
+ // since AI Prompts depend on Templates, and AI Agent Prompts depend on AI Agents
2720
+ // 1. First save Templates (they have no dependencies)
2721
+ const templateRecords = this.PendingRecords.filter(p => p.entityObject.EntityInfo.Name === 'Templates');
2722
+ for (const templateRecord of templateRecords) {
2723
+ templateRecord.entityObject.TransactionGroup = transactionGroup;
2724
+ if (templateRecord.action === 'save') {
2725
+ const saveResult = await templateRecord.entityObject.Save();
2726
+ if (!saveResult) {
2727
+ MJNotificationService.Instance.CreateSimpleNotification(`Failed to save Template "${templateRecord.entityObject.Get('Name')}". Please check the data and try again.`, 'error', 4000);
2728
+ return false;
2729
+ }
2730
+ }
2731
+ else {
2732
+ await templateRecord.entityObject.Delete();
2733
+ }
2734
+ }
2735
+ // 2. Save Template Contents (depend on Templates)
2736
+ const templateContentRecords = this.PendingRecords.filter(p => p.entityObject.EntityInfo.Name === 'Template Contents');
2737
+ for (const contentRecord of templateContentRecords) {
2738
+ contentRecord.entityObject.TransactionGroup = transactionGroup;
2739
+ if (contentRecord.action === 'save') {
2740
+ const saveResult = await contentRecord.entityObject.Save();
2741
+ if (!saveResult) {
2742
+ MJNotificationService.Instance.CreateSimpleNotification(`Failed to save Template Content. Please check the data and try again.`, 'error', 4000);
2743
+ return false;
2744
+ }
2745
+ }
2746
+ else {
2747
+ await contentRecord.entityObject.Delete();
2748
+ }
2749
+ }
2750
+ // 3. Save AI Prompts (depend on Templates)
2751
+ const promptRecords = this.PendingRecords.filter(p => p.entityObject.EntityInfo.Name === 'AI Prompts');
2752
+ for (const promptRecord of promptRecords) {
2753
+ promptRecord.entityObject.TransactionGroup = transactionGroup;
2754
+ if (promptRecord.action === 'save') {
2755
+ const saveResult = await promptRecord.entityObject.Save();
2756
+ if (!saveResult) {
2757
+ MJNotificationService.Instance.CreateSimpleNotification(`Failed to save AI Prompt "${promptRecord.entityObject.Get('Name')}". Please check the data and try again.`, 'error', 4000);
2758
+ return false;
2759
+ }
2760
+ }
2761
+ else {
2762
+ await promptRecord.entityObject.Delete();
2763
+ }
2764
+ }
2765
+ // 4. Save the main AI Agent record (other entity links depend on it)
2766
+ // The record transaction group was already set above
2767
+ const agentSaveResult = await this.record.Save();
2768
+ if (!agentSaveResult) {
2769
+ MJNotificationService.Instance.CreateSimpleNotification(`Failed to save AI agent "${this.record.Name}". Please check the data and try again.`, 'error', 4000);
2770
+ return false;
2771
+ }
2772
+ // 4.1. Handle deferred sub-agent creation - set ParentID on any sub-agents created before parent was saved
2773
+ const subAgentRecords = this.PendingRecords.filter(p => p.entityObject.EntityInfo.Name === 'AI Agents' &&
2774
+ p.action === 'save' &&
2775
+ p.entityObject.Get('_tempParentId') === this.record.ID);
2776
+ for (const subAgentRecord of subAgentRecords) {
2777
+ // Cast to AIAgentEntity to access ParentID property
2778
+ const subAgent = subAgentRecord.entityObject;
2779
+ // Set the proper ParentID now that parent is saved
2780
+ subAgent.ParentID = this.record.ID;
2781
+ // Clear the temporary reference
2782
+ subAgent.Set('_tempParentId', null);
2783
+ }
2784
+ // 5. Save all other pending records (AI Agent Actions, AI Agent Prompts, etc.)
2785
+ const otherRecords = this.PendingRecords.filter(p => p.entityObject.EntityInfo.Name !== 'Templates' &&
2786
+ p.entityObject.EntityInfo.Name !== 'Template Contents' &&
2787
+ p.entityObject.EntityInfo.Name !== 'AI Prompts');
2788
+ for (const record of otherRecords) {
2789
+ record.entityObject.TransactionGroup = transactionGroup;
2790
+ if (record.action === 'save') {
2791
+ const saveResult = await record.entityObject.Save();
2792
+ if (!saveResult) {
2793
+ MJNotificationService.Instance.CreateSimpleNotification(`Failed to save ${record.entityObject.EntityInfo.Name}. Transaction will be rolled back.`, 'error', 4000);
2794
+ return false;
1920
2795
  }
1921
2796
  }
1922
2797
  else {
1923
- throw new Error('AI Agent Action link not found');
2798
+ await record.entityObject.Delete();
1924
2799
  }
1925
2800
  }
1926
- catch (error) {
1927
- console.error('Error removing action from agent:', error);
1928
- MJNotificationService.Instance.CreateSimpleNotification('Failed to remove action', 'error', 3000);
2801
+ // Execute all operations atomically
2802
+ const success = await transactionGroup.Submit();
2803
+ if (success) {
2804
+ // Clear our local state since save was successful
2805
+ this.hasUnsavedChanges = false;
2806
+ // Clear pending records since they've been saved
2807
+ this.PendingRecords.length = 0;
2808
+ // Reload related data to reflect database state
2809
+ await this.loadRelatedCounts();
2810
+ MJNotificationService.Instance.CreateSimpleNotification('AI Agent and all related changes saved successfully', 'success', 3000);
2811
+ return true;
2812
+ }
2813
+ else {
2814
+ MJNotificationService.Instance.CreateSimpleNotification('Save failed. Please try again.', 'error', 4000);
2815
+ return false;
1929
2816
  }
1930
2817
  }
2818
+ catch (error) {
2819
+ MJNotificationService.Instance.CreateSimpleNotification(`Save failed: ${error instanceof Error ? error.message : 'Unknown error'}. Please try again.`, 'error', 5000);
2820
+ return false;
2821
+ }
1931
2822
  }
1932
- static { this.ɵfac = function AIAgentFormComponentExtended_Factory(t) { return new (t || AIAgentFormComponentExtended)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1.SharedService), i0.ɵɵdirectiveInject(i2.Router), i0.ɵɵdirectiveInject(i2.ActivatedRoute), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i3.DialogService), i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(i4.NewAgentDialogService), i0.ɵɵdirectiveInject(i5.ActionGalleryDialogService), i0.ɵɵdirectiveInject(i6.AITestHarnessDialogService)); }; }
1933
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AIAgentFormComponentExtended, selectors: [["mj-ai-agent-form"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 3, vars: 1, consts: [["form", "ngForm"], [1, "record-form-container"], ["kendoDialogContainer", ""], ["class", "record-form", 4, "ngIf"], [1, "record-form"], [3, "form"], [1, "agent-header"], [1, "agent-header-content"], [1, "agent-overview"], [1, "agent-icon-wrapper"], [1, "agent-logo", 3, "src", "alt"], [3, "class"], [1, "agent-info"], ["name", "agentName", "placeholder", "Enter agent name...", 1, "agent-name-input", 3, "ngModel"], [1, "agent-name"], [1, "agent-meta"], [1, "status-badge", 3, "background-color"], [1, "execution-mode"], [1, "parent-agent"], [1, "agent-actions"], ["kendoButton", "", "themeColor", "primary", "size", "large", "title", "Run this AI agent", 3, "disabled"], ["kendoButton", "", "fillMode", "outline", "size", "small", "title", "Refresh all data", 3, "click"], [1, "fa-solid", "fa-refresh"], [1, "form-content"], [3, "expanded"], ["kendoPanelBarItemTitle", ""], ["kendoPanelBarContent", ""], ["name", "agentName", "placeholder", "Enter agent name...", 1, "agent-name-input", 3, "ngModelChange", "ngModel"], [1, "status-badge"], [1, "fa-solid", "fa-circle"], [1, "fa-solid", "fa-sitemap"], ["kendoButton", "", "themeColor", "primary", "size", "large", "title", "Run this AI agent", 3, "click", "disabled"], [1, "fa-solid", "fa-play"], [1, "fa-solid", "fa-history"], [1, "panel-content", "execution-history-panel"], [1, "section-header"], [1, "section-description"], [1, "empty-state"], [1, "timeline-list"], [1, "timeline-item", 3, "expanded"], [1, "view-more-item"], [1, "timeline-item"], [1, "timeline-marker"], [1, "timeline-content"], [1, "timeline-header", 3, "click"], [1, "timeline-title"], [1, "fa-solid", "fa-chevron-right", "expand-icon"], [1, "timeline-date"], [1, "timeline-meta"], [1, "execution-time"], [1, "timeline-actions"], [1, "btn-primary", 3, "click"], [1, "fa-solid", "fa-external-link-alt"], [1, "timeline-preview"], [1, "timeline-expanded-content"], [1, "fa-solid", "fa-stopwatch"], [1, "result-section"], [1, "error-section"], [1, "execution-details"], [1, "detail-row"], [1, "detail-label"], [1, "detail-value"], ["language", "json", 2, "max-height", "200px", "width", "100%", 3, "value", "readonly", "lineWrapping"], [1, "fa-solid", "fa-exclamation-triangle"], [1, "error-content"], [1, "view-more-item", 3, "click"], [1, "fa-solid", "fa-comments"], [1, "panel-content"], [1, "prompt-controls"], [1, "model-selection-mode"], [1, "model-selection-label"], [1, "fa-solid", "fa-sliders"], ["name", "modelSelectionMode", "textField", "text", "valueField", "value", 1, "model-selection-dropdown", 3, "ngModel", "data", "valuePrimitive"], [1, "model-selection-value"], [1, "header-actions"], ["kendoButton", "", "themeColor", "primary", "size", "small"], [1, "entity-list"], ["name", "modelSelectionMode", "textField", "text", "valueField", "value", 1, "model-selection-dropdown", 3, "ngModelChange", "ngModel", "data", "valuePrimitive"], ["kendoButton", "", "themeColor", "primary", "size", "small", 3, "click"], [1, "fa-solid", "fa-plus"], ["kendoButton", "", "themeColor", "primary"], ["kendoButton", "", "themeColor", "primary", 3, "click"], [1, "entity-item", "prompt-item"], [1, "entity-item", "prompt-item", 3, "click"], [1, "item-icon"], [1, "fa-solid", "fa-comment-dots"], [1, "item-content"], [1, "item-title"], [1, "item-preview"], [1, "item-meta"], [1, "meta-tag"], [1, "item-actions"], ["kendoButton", "", "fillMode", "flat", "themeColor", "error", "size", "small", "title", "Remove prompt"], [1, "fa-solid", "fa-external-link"], ["kendoButton", "", "fillMode", "flat", "themeColor", "error", "size", "small", "title", "Remove prompt", 3, "click"], [1, "fa-solid", "fa-trash"], [1, "fa-solid", "fa-box"], [1, "payload-config-section"], [1, "subsection-title"], [1, "fa-solid", "fa-cog"], [1, "payload-config-grid"], ["FieldName", "PayloadScope", "Type", "textbox", "Caption", "Payload Scope", "Description", "Path to narrow payload (e.g., /functionalRequirements)", 3, "EditMode", "record"], ["FieldName", "FinalPayloadValidationMode", "Type", "dropdownlist", "Caption", "Validation Mode", "Description", "Action on validation failure", 3, "EditMode", "record"], ["FieldName", "FinalPayloadValidationMaxRetries", "Type", "numerictextbox", "Caption", "Max Retries", "Description", "Maximum validation retry attempts", 3, "EditMode", "record"], [1, "payload-paths-section"], [1, "fa-solid", "fa-route"], [1, "payload-field-group"], [1, "payload-field-label"], [1, "fa-solid", "fa-arrow-down"], [1, "field-description"], ["language", "json", 2, "height", "120px", "width", "100%", 3, "valueChange", "value", "readonly", "lineWrapping"], [1, "fa-solid", "fa-arrow-up"], [1, "fa-solid", "fa-eye"], [1, "fa-solid", "fa-pen"], [1, "payload-validation-section"], [1, "fa-solid", "fa-shield-check"], ["language", "json", 2, "height", "200px", "width", "100%", 3, "valueChange", "value", "readonly", "lineWrapping"], [1, "fa-solid", "fa-bolt"], [1, "entity-item", "action-item"], [1, "entity-item", "action-item", 3, "click"], [1, "status-tag"], [1, "fa-solid"], ["kendoButton", "", "fillMode", "flat", "themeColor", "error", "size", "small", "title", "Remove action"], ["kendoButton", "", "fillMode", "flat", "themeColor", "error", "size", "small", "title", "Remove action", 3, "click"], [1, "entity-item", "sub-agent-item"], [1, "entity-item", "sub-agent-item", 3, "click"], [1, "sub-agent-logo", 3, "src", "alt"], [1, "status-tag", 3, "background-color"], [1, "fa-solid", "fa-shield-halved"], [1, "form-fields-grid"], ["FieldName", "MaxCostPerRun", "Type", "numerictextbox", "Caption", "Max Cost ($)", "Description", "Maximum cost per run", 3, "EditMode", "record"], ["FieldName", "MaxTokensPerRun", "Type", "numerictextbox", "Caption", "Max Tokens", "Description", "Maximum tokens per run", 3, "EditMode", "record"], ["FieldName", "MaxIterationsPerRun", "Type", "numerictextbox", "Caption", "Max Iterations", "Description", "Maximum prompt iterations", 3, "EditMode", "record"], ["FieldName", "MaxTimePerRun", "Type", "numerictextbox", "Caption", "Max Time (seconds)", "Description", "Maximum execution time", 3, "EditMode", "record"], ["FieldName", "Status", "Type", "dropdownlist", "Caption", "Status", "Description", "Agent availability status", 3, "EditMode", "record"], ["FieldName", "ExecutionMode", "Type", "dropdownlist", "Caption", "Execution Mode", "Description", "How sub-agents are executed", 3, "EditMode", "record"], ["FieldName", "ExecutionOrder", "Type", "numerictextbox", "Caption", "Execution Order", "Description", "Order when run with siblings", 3, "EditMode", "record"], ["FieldName", "ExposeAsAction", "Type", "checkbox", "Caption", "Expose as Action", "Description", "Make available as an action", 3, "EditMode", "record"], ["FieldName", "TypeID", "Type", "dropdownlist", "Caption", "Agent Type", "Description", "Category of this agent", "LinkType", "Record", "LinkEntityName", "AI Agent Types", 3, "EditMode", "record"], ["FieldName", "DriverClass", "Type", "textbox", "Caption", "Driver Class", "Description", "Custom implementation class", 3, "EditMode", "record"], ["FieldName", "IconClass", "Type", "textbox", "Caption", "Icon Class", "Description", "Font Awesome icon class", 3, "EditMode", "record"], ["FieldName", "Description", "Type", "textarea", "Caption", "Description", "Description", "Detailed agent description", 2, "grid-column", "span 2", 3, "EditMode", "record"], ["FieldName", "LogoURL", "Type", "textbox", "Caption", "Logo URL", "Description", "URL for agent logo image", 2, "grid-column", "span 2", 3, "EditMode", "record"], [1, "subsection-divider"], [1, "fa-solid", "fa-compress"], ["FieldName", "EnableContextCompression", "Type", "checkbox", "Caption", "Enable Compression", "Description", "Compress long conversations", 3, "EditMode", "record"], ["FieldName", "ContextCompressionMessageThreshold", "Type", "numerictextbox", "Caption", "Message Threshold", "Description", "Messages before compression", 3, "EditMode", "record"], ["FieldName", "ContextCompressionMessageRetentionCount", "Type", "numerictextbox", "Caption", "Messages to Keep", "Description", "Recent messages to retain", 3, "EditMode", "record"], ["FieldName", "ContextCompressionPromptID", "Type", "dropdownlist", "Caption", "Compression Prompt", "Description", "Prompt for summarization", "LinkType", "Record", "LinkEntityName", "AI Prompts", 3, "EditMode", "record"], [1, "fa-solid", "fa-sticky-note"], [1, "entity-item", "note-item"], [1, "entity-item", "note-item", 3, "click"], [1, "fa-solid", "fa-calendar"], [1, "fa-solid", "fa-brain"], [1, "entity-item", "learning-item"], [1, "entity-item", "learning-item", 3, "click"]], template: function AIAgentFormComponentExtended_Template(rf, ctx) { if (rf & 1) {
2823
+ static { this.ɵfac = function AIAgentFormComponentExtended_Factory(t) { return new (t || AIAgentFormComponentExtended)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1.SharedService), i0.ɵɵdirectiveInject(i2.Router), i0.ɵɵdirectiveInject(i2.ActivatedRoute), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i3.DialogService), i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(i4.AIAgentManagementService), i0.ɵɵdirectiveInject(i5.AITestHarnessDialogService)); }; }
2824
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AIAgentFormComponentExtended, selectors: [["mj-ai-agent-form"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 3, vars: 1, consts: [["form", "ngForm"], [1, "record-form-container"], ["kendoDialogContainer", ""], ["class", "record-form", 4, "ngIf"], [1, "record-form"], [3, "form"], [1, "agent-header"], [1, "agent-header-content"], [1, "agent-overview"], [1, "agent-icon-wrapper"], [1, "agent-logo", 3, "src", "alt"], [3, "class"], [1, "agent-info"], ["name", "agentName", "placeholder", "Enter agent name...", 1, "agent-name-input", 3, "ngModel"], [1, "agent-name"], [1, "agent-meta"], [1, "status-badge", 3, "background-color"], [1, "execution-mode"], [1, "parent-agent"], [1, "agent-actions"], ["kendoButton", "", "themeColor", "primary", "size", "large", "title", "Run this AI agent", 3, "disabled"], ["kendoButton", "", "fillMode", "outline", "size", "small", "title", "Refresh all data", 3, "click"], [1, "fa-solid", "fa-refresh"], [1, "form-content"], [3, "expanded"], ["kendoPanelBarItemTitle", ""], ["kendoPanelBarContent", ""], ["name", "agentName", "placeholder", "Enter agent name...", 1, "agent-name-input", 3, "ngModelChange", "ngModel"], [1, "status-badge"], [1, "fa-solid", "fa-circle"], [1, "fa-solid", "fa-sitemap"], ["kendoButton", "", "themeColor", "primary", "size", "large", "title", "Run this AI agent", 3, "click", "disabled"], [1, "fa-solid", "fa-play"], [1, "fa-solid", "fa-bolt"], [1, "panel-content"], [1, "section-header"], [1, "header-actions"], ["kendoButton", "", "themeColor", "primary", "size", "small"], [1, "empty-state"], [1, "entity-list"], ["kendoButton", "", "themeColor", "primary", "size", "small", 3, "click"], [1, "fa-solid", "fa-plus"], ["kendoButton", "", "themeColor", "primary"], ["kendoButton", "", "themeColor", "primary", 3, "click"], [1, "entity-item", "action-item"], [1, "view-more-item"], [1, "entity-item", "action-item", 3, "click"], [1, "item-icon"], [1, "item-content"], [1, "item-title"], [1, "item-preview"], [1, "item-meta"], [1, "meta-tag"], [1, "status-tag"], [1, "fa-solid"], [1, "item-actions"], ["kendoButton", "", "fillMode", "flat", "themeColor", "error", "size", "small", "title", "Remove action"], [1, "fa-solid", "fa-external-link"], ["kendoButton", "", "fillMode", "flat", "themeColor", "error", "size", "small", "title", "Remove action", 3, "click"], [1, "fa-solid", "fa-trash"], [1, "view-more-item", 3, "click"], [1, "section-description"], ["kendoButton", "", "themeColor", "secondary", "size", "small", 3, "click"], ["kendoButton", "", "themeColor", "secondary", 3, "click"], [1, "entity-item", "sub-agent-item"], [1, "entity-item", "sub-agent-item", 3, "click"], [1, "sub-agent-logo", 3, "src", "alt"], [1, "status-tag", 3, "background-color"], ["kendoButton", "", "fillMode", "flat", "themeColor", "primary", "size", "small", "title", "Advanced settings"], ["kendoButton", "", "fillMode", "flat", "themeColor", "error", "size", "small", "title", "Remove sub-agent"], ["kendoButton", "", "fillMode", "flat", "themeColor", "primary", "size", "small", "title", "Advanced settings", 3, "click"], [1, "fa-solid", "fa-cog"], ["kendoButton", "", "fillMode", "flat", "themeColor", "error", "size", "small", "title", "Remove sub-agent", 3, "click"], [1, "fa-solid", "fa-comments"], [1, "prompt-controls"], [1, "model-selection-mode"], [1, "model-selection-label"], [1, "fa-solid", "fa-sliders"], ["name", "modelSelectionMode", "textField", "text", "valueField", "value", 1, "model-selection-dropdown", 3, "ngModel", "data", "valuePrimitive"], [1, "model-selection-value"], ["name", "modelSelectionMode", "textField", "text", "valueField", "value", 1, "model-selection-dropdown", 3, "ngModelChange", "ngModel", "data", "valuePrimitive"], [1, "entity-item", "prompt-item"], [1, "entity-item", "prompt-item", 3, "click"], [1, "fa-solid", "fa-comment-dots"], ["kendoButton", "", "fillMode", "flat", "themeColor", "error", "size", "small", "title", "Remove prompt"], ["kendoButton", "", "fillMode", "flat", "themeColor", "error", "size", "small", "title", "Remove prompt", 3, "click"], [1, "fa-solid", "fa-brain"], [1, "entity-item", "learning-item"], [1, "entity-item", "learning-item", 3, "click"], [1, "fa-solid", "fa-calendar"], [1, "fa-solid", "fa-sticky-note"], [1, "entity-item", "note-item"], [1, "entity-item", "note-item", 3, "click"], [1, "fa-solid", "fa-history"], [1, "panel-content", "execution-history-panel"], [1, "timeline-list"], [1, "timeline-item", 3, "expanded"], [1, "timeline-item"], [1, "timeline-marker"], [1, "timeline-content"], [1, "timeline-header", 3, "click"], [1, "timeline-title"], [1, "fa-solid", "fa-chevron-right", "expand-icon"], [1, "timeline-date"], [1, "timeline-meta"], [1, "execution-time"], [1, "timeline-actions"], [1, "btn-primary", 3, "click"], [1, "fa-solid", "fa-external-link-alt"], [1, "timeline-preview"], [1, "timeline-expanded-content"], [1, "fa-solid", "fa-stopwatch"], [1, "result-section"], [1, "error-section"], [1, "execution-details"], [1, "detail-row"], [1, "detail-label"], [1, "detail-value"], ["language", "json", 2, "max-height", "200px", "width", "100%", 3, "value", "readonly", "lineWrapping"], [1, "fa-solid", "fa-exclamation-triangle"], [1, "error-content"], [1, "fa-solid", "fa-box"], [1, "payload-config-section"], [1, "subsection-title"], [1, "payload-config-grid"], ["FieldName", "PayloadScope", "Type", "textbox", "Caption", "Payload Scope", "Description", "Path to narrow payload (e.g., /functionalRequirements)", 3, "EditMode", "record"], ["FieldName", "FinalPayloadValidationMode", "Type", "dropdownlist", "Caption", "Validation Mode", "Description", "Action on validation failure", 3, "EditMode", "record"], ["FieldName", "FinalPayloadValidationMaxRetries", "Type", "numerictextbox", "Caption", "Max Retries", "Description", "Maximum validation retry attempts", 3, "EditMode", "record"], [1, "payload-paths-section"], [1, "fa-solid", "fa-route"], [1, "payload-field-group"], [1, "payload-field-label"], [1, "fa-solid", "fa-arrow-down"], [1, "field-description"], ["language", "json", 2, "height", "120px", "width", "100%", 3, "valueChange", "value", "readonly", "lineWrapping"], [1, "fa-solid", "fa-arrow-up"], [1, "fa-solid", "fa-eye"], [1, "fa-solid", "fa-pen"], [1, "payload-validation-section"], [1, "fa-solid", "fa-shield-check"], ["language", "json", 2, "height", "200px", "width", "100%", 3, "valueChange", "value", "readonly", "lineWrapping"], [1, "fa-solid", "fa-shield-halved"], [1, "form-fields-grid"], ["FieldName", "MaxCostPerRun", "Type", "numerictextbox", "Caption", "Max Cost ($)", "Description", "Maximum cost per run", 3, "EditMode", "record"], ["FieldName", "MaxTokensPerRun", "Type", "numerictextbox", "Caption", "Max Tokens", "Description", "Maximum tokens per run", 3, "EditMode", "record"], ["FieldName", "MaxIterationsPerRun", "Type", "numerictextbox", "Caption", "Max Iterations", "Description", "Maximum prompt iterations", 3, "EditMode", "record"], ["FieldName", "MaxTimePerRun", "Type", "numerictextbox", "Caption", "Max Time (seconds)", "Description", "Maximum execution time", 3, "EditMode", "record"], ["FieldName", "Status", "Type", "dropdownlist", "Caption", "Status", "Description", "Agent availability status", 3, "EditMode", "record"], ["FieldName", "ExecutionMode", "Type", "dropdownlist", "Caption", "Execution Mode", "Description", "How sub-agents are executed", 3, "EditMode", "record"], ["FieldName", "ExecutionOrder", "Type", "numerictextbox", "Caption", "Execution Order", "Description", "Order when run with siblings", 3, "EditMode", "record"], ["FieldName", "ExposeAsAction", "Type", "checkbox", "Caption", "Expose as Action", "Description", "Make available as an action", 3, "EditMode", "record"], ["FieldName", "TypeID", "Type", "dropdownlist", "Caption", "Agent Type", "Description", "Category of this agent", "LinkType", "Record", "LinkEntityName", "MJ: AI Agent Types", 3, "EditMode", "record"], ["FieldName", "DriverClass", "Type", "textbox", "Caption", "Driver Class", "Description", "Custom implementation class", 3, "EditMode", "record"], ["FieldName", "IconClass", "Type", "textbox", "Caption", "Icon Class", "Description", "Font Awesome icon class", 3, "EditMode", "record"], ["FieldName", "Description", "Type", "textarea", "Caption", "Description", "Description", "Detailed agent description", 2, "grid-column", "span 2", 3, "EditMode", "record"], ["FieldName", "LogoURL", "Type", "textbox", "Caption", "Logo URL", "Description", "URL for agent logo image", 2, "grid-column", "span 2", 3, "EditMode", "record"], [1, "subsection-divider"], [1, "fa-solid", "fa-compress"], ["FieldName", "EnableContextCompression", "Type", "checkbox", "Caption", "Enable Compression", "Description", "Compress long conversations", 3, "valueChange", "EditMode", "record"], ["FieldName", "ContextCompressionMessageThreshold", "Type", "numerictextbox", "Caption", "Message Threshold", "Description", "Messages before compression", 3, "EditMode", "record"], ["FieldName", "ContextCompressionMessageRetentionCount", "Type", "numerictextbox", "Caption", "Messages to Keep", "Description", "Recent messages to retain", 3, "EditMode", "record"], ["FieldName", "ContextCompressionPromptID", "Type", "dropdownlist", "Caption", "Compression Prompt", "Description", "Prompt for summarization", "LinkType", "Record", "LinkEntityName", "AI Prompts", 3, "EditMode", "record"]], template: function AIAgentFormComponentExtended_Template(rf, ctx) { if (rf & 1) {
1934
2825
  i0.ɵɵelementStart(0, "div", 1);
1935
2826
  i0.ɵɵelement(1, "div", 2);
1936
2827
  i0.ɵɵtemplate(2, AIAgentFormComponentExtended_form_2_Template, 37, 16, "form", 3);
@@ -1938,7 +2829,7 @@ let AIAgentFormComponentExtended = class AIAgentFormComponentExtended extends AI
1938
2829
  } if (rf & 2) {
1939
2830
  i0.ɵɵadvance(2);
1940
2831
  i0.ɵɵproperty("ngIf", ctx.record);
1941
- } }, dependencies: [i7.NgIf, i8.ɵNgNoValidate, i8.NgControlStatus, i8.NgControlStatusGroup, i8.NgModel, i8.NgForm, i9.PanelBarComponent, i9.PanelBarItemComponent, i9.PanelBarContentDirective, i9.PanelBarItemTitleDirective, i3.DialogContainerDirective, i10.TextBoxComponent, i11.DropDownListComponent, i12.ButtonComponent, i13.MJFormField, i14.FormToolbarComponent, i15.CodeEditorComponent, i7.DatePipe], styles: ["\n\n.record-form-container[_ngcontent-%COMP%] {\n height: 100%;\n display: flex;\n flex-direction: column;\n background: #f5f7fa;\n}\n\n.record-form[_ngcontent-%COMP%] {\n height: 100%;\n display: flex;\n flex-direction: column;\n}\n\n\n\n.agent-header[_ngcontent-%COMP%] {\n background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);\n border-bottom: 1px solid #e0e6ed;\n padding: 12px 20px;\n box-shadow: 0 2px 4px rgba(0,0,0,0.04);\n}\n\n.agent-header-content[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 20px;\n}\n\n.agent-overview[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 16px;\n flex: 1;\n min-width: 0;\n}\n\n.agent-icon-wrapper[_ngcontent-%COMP%] {\n width: 48px;\n height: 48px;\n background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);\n border-radius: 12px;\n display: flex;\n align-items: center;\n justify-content: center;\n box-shadow: 0 4px 12px rgba(33, 150, 243, 0.2);\n flex-shrink: 0;\n}\n\n.agent-icon-wrapper[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: white;\n font-size: 24px;\n}\n\n.agent-icon-wrapper[_ngcontent-%COMP%] img.agent-logo[_ngcontent-%COMP%] {\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: 8px;\n}\n\n.agent-info[_ngcontent-%COMP%] {\n flex: 1;\n min-width: 0;\n}\n\n.agent-name[_ngcontent-%COMP%] {\n font-size: 22px;\n font-weight: 600;\n color: #2c3e50;\n margin: 0 0 8px 0;\n line-height: 1.2;\n}\n\n.agent-name-input[_ngcontent-%COMP%] {\n font-size: 18px !important;\n font-weight: 500 !important;\n height: 36px !important;\n width: 100% !important;\n max-width: 400px !important;\n}\n\n.agent-meta[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 16px;\n flex-wrap: wrap;\n}\n\n.status-badge[_ngcontent-%COMP%] {\n padding: 6px 16px;\n border-radius: 20px;\n font-size: 13px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n display: inline-flex;\n align-items: center;\n gap: 6px;\n}\n\n.status-badge.active[_ngcontent-%COMP%] {\n background: #28a745;\n color: white;\n}\n\n.status-badge.pending[_ngcontent-%COMP%] {\n background: #ffc107;\n color: #212529;\n}\n\n.status-badge.disabled[_ngcontent-%COMP%] {\n background: #6c757d;\n color: white;\n}\n\n.execution-mode[_ngcontent-%COMP%], \n.parent-agent[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 6px;\n font-size: 13px;\n color: #6c757d;\n background: #f8f9fa;\n padding: 4px 10px;\n border-radius: 12px;\n}\n\n.execution-mode[_ngcontent-%COMP%] i[_ngcontent-%COMP%], \n.parent-agent[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 12px;\n opacity: 0.8;\n}\n\n\n\n.prompt-controls[_ngcontent-%COMP%] {\n flex: 1;\n margin-right: 16px;\n}\n\n\n\n.model-selection-mode[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 12px;\n padding: 8px 16px;\n background: #f0f7ff;\n border: 1px solid #cce5ff;\n border-radius: 8px;\n}\n\n.model-selection-label[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 13px;\n font-weight: 600;\n color: #0066cc;\n margin: 0;\n}\n\n.model-selection-label[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 14px;\n}\n\n.model-selection-dropdown[_ngcontent-%COMP%] {\n min-width: 140px;\n height: 32px;\n}\n\n.model-selection-value[_ngcontent-%COMP%] {\n font-size: 13px;\n font-weight: 500;\n color: #495057;\n padding: 4px 12px;\n background: white;\n border-radius: 6px;\n border: 1px solid #dee2e6;\n}\n\n.agent-meta-info[_ngcontent-%COMP%] {\n display: flex;\n gap: 24px;\n margin-top: 12px;\n flex-wrap: wrap;\n}\n\n.meta-item[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.meta-label[_ngcontent-%COMP%] {\n font-size: 12px;\n font-weight: 600;\n color: #6c757d;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n.meta-value[_ngcontent-%COMP%] {\n font-size: 14px;\n color: #495057;\n font-weight: 500;\n}\n\n.agent-description[_ngcontent-%COMP%] {\n margin-top: 16px;\n color: #6c757d;\n line-height: 1.6;\n font-size: 15px;\n}\n\n.agent-description-input[_ngcontent-%COMP%] {\n width: 100%;\n max-width: 600px;\n min-height: 80px;\n resize: vertical;\n}\n\n\n\n.agent-actions[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\n.action-buttons-row[_ngcontent-%COMP%] {\n display: flex;\n gap: 12px;\n flex-wrap: wrap;\n}\n\n.action-button[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 10px 20px;\n border-radius: 8px;\n font-weight: 500;\n font-size: 14px;\n transition: all 0.2s ease;\n box-shadow: 0 2px 4px rgba(0,0,0,0.08);\n}\n\n.action-button[_ngcontent-%COMP%]:hover {\n transform: translateY(-1px);\n box-shadow: 0 4px 8px rgba(0,0,0,0.12);\n}\n\n.action-button.primary[_ngcontent-%COMP%] {\n background: #2196f3;\n color: white;\n}\n\n.action-button.primary[_ngcontent-%COMP%]:hover {\n background: #1976d2;\n}\n\n.action-button.secondary[_ngcontent-%COMP%] {\n background: #6c757d;\n color: white;\n}\n\n.action-button.secondary[_ngcontent-%COMP%]:hover {\n background: #5a6268;\n}\n\n.action-warnings[_ngcontent-%COMP%] {\n margin-top: 8px;\n font-size: 13px;\n color: #dc3545;\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n\n\n.form-content[_ngcontent-%COMP%] {\n flex: 1;\n display: flex;\n flex-direction: column;\n overflow-y: auto;\n overflow-x: hidden;\n background: #f5f7fa;\n padding: 12px;\n}\n\n\n\n .k-panelbar {\n border: none;\n background: transparent;\n}\n\n .k-panelbar > .k-panelbar-item {\n border: none;\n border-radius: 12px;\n margin-bottom: 12px;\n box-shadow: 0 2px 8px rgba(0,0,0,0.06);\n background: white;\n overflow: hidden;\n}\n\n .k-panelbar > .k-panelbar-item > .k-header {\n background: white;\n border: none;\n padding: 16px 20px;\n border-radius: 12px 12px 0 0;\n color: #2c3e50;\n font-weight: 600;\n font-size: 16px;\n transition: all 0.2s ease;\n display: flex;\n align-items: center;\n gap: 12px;\n}\n\n .k-panelbar > .k-panelbar-item > .k-header:hover {\n background: #f8f9fa;\n}\n\n .k-panelbar > .k-panelbar-item.k-panelbar-expanded > .k-header {\n background: #2196f3;\n color: white;\n border-radius: 12px 12px 0 0;\n}\n\n .k-panelbar > .k-panelbar-item > .k-header .k-panelbar-toggle {\n position: absolute;\n right: 24px;\n color: inherit;\n font-size: 14px;\n transition: transform 0.2s ease;\n}\n\n .k-panelbar > .k-panelbar-item.k-panelbar-expanded > .k-header .k-panelbar-toggle {\n transform: rotate(180deg);\n}\n\n .k-panelbar > .k-panelbar-item > .k-header .k-panelbar-toggle::before {\n content: '\\f107';\n font-family: 'Font Awesome 6 Free';\n font-weight: 900;\n}\n\n .k-panelbar > .k-panelbar-item > .k-content {\n padding: 0;\n border: none;\n background: white;\n border-radius: 0 0 12px 12px;\n}\n\n .k-panelbar .k-header .k-panelbar-icon {\n font-size: 18px;\n color: #2196f3;\n margin-right: 8px;\n}\n\n .k-panelbar .k-panelbar-expanded .k-header .k-panelbar-icon {\n color: white;\n}\n\n\n\n.panel-content[_ngcontent-%COMP%] {\n padding: 16px;\n background: white;\n}\n\n.section-header[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 20px;\n gap: 16px;\n flex-wrap: wrap;\n}\n\n.section-description[_ngcontent-%COMP%] {\n color: #6c757d;\n font-size: 14px;\n line-height: 1.6;\n margin-bottom: 16px;\n}\n\n.header-actions[_ngcontent-%COMP%] {\n display: flex;\n gap: 8px;\n align-items: center;\n flex-shrink: 0;\n}\n\n.tab-section[_ngcontent-%COMP%] {\n background: white;\n border-radius: 12px;\n padding: 24px;\n margin-bottom: 24px;\n box-shadow: 0 2px 8px rgba(0,0,0,0.04);\n border: 1px solid #e0e6ed;\n}\n\n.section-header[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 20px;\n padding-bottom: 16px;\n border-bottom: 2px solid #f0f4f8;\n}\n\n.section-title[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 12px;\n margin: 0;\n color: #2c3e50;\n font-size: 18px;\n font-weight: 600;\n}\n\n.section-title[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: #2196f3;\n font-size: 20px;\n}\n\n.section-description[_ngcontent-%COMP%] {\n color: #6c757d;\n font-size: 14px;\n line-height: 1.6;\n margin-top: 8px;\n}\n\n\n\n.form-fields-grid[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));\n gap: 20px;\n margin-top: 20px;\n}\n\n.form-field-group[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.form-field-label[_ngcontent-%COMP%] {\n font-size: 13px;\n font-weight: 600;\n color: #495057;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n\n\n.sub-grid-container[_ngcontent-%COMP%] {\n height: 500px;\n border: 1px solid #e0e6ed;\n border-radius: 8px;\n overflow: hidden;\n display: none; \n\n}\n\n\n\n.empty-state[_ngcontent-%COMP%] {\n text-align: center;\n padding: 60px 20px;\n color: #6c757d;\n}\n\n.empty-state[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 48px;\n color: #dee2e6;\n margin-bottom: 16px;\n}\n\n.empty-state[_ngcontent-%COMP%] h4[_ngcontent-%COMP%] {\n color: #495057;\n font-weight: 600;\n margin-bottom: 8px;\n}\n\n.empty-state[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\n font-size: 15px;\n line-height: 1.6;\n max-width: 400px;\n margin: 0 auto;\n}\n\n\n\n.loading-overlay[_ngcontent-%COMP%] {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(255, 255, 255, 0.9);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 1000;\n}\n\n.loading-spinner[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 16px;\n}\n\n.spinner-icon[_ngcontent-%COMP%] {\n width: 48px;\n height: 48px;\n border: 4px solid #f3f3f3;\n border-top: 4px solid #2196f3;\n border-radius: 50%;\n animation: _ngcontent-%COMP%_spin 1s linear infinite;\n}\n\n@keyframes _ngcontent-%COMP%_spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n}\n\n\n\n.quick-actions[_ngcontent-%COMP%] {\n display: flex;\n gap: 16px;\n margin-top: 20px;\n padding-top: 20px;\n border-top: 1px solid #e0e6ed;\n}\n\n.quick-action-card[_ngcontent-%COMP%] {\n flex: 1;\n padding: 16px;\n background: #f8f9fa;\n border-radius: 8px;\n border: 1px solid #e0e6ed;\n cursor: pointer;\n transition: all 0.2s ease;\n text-align: center;\n}\n\n.quick-action-card[_ngcontent-%COMP%]:hover {\n background: white;\n box-shadow: 0 4px 12px rgba(0,0,0,0.08);\n transform: translateY(-2px);\n}\n\n.quick-action-icon[_ngcontent-%COMP%] {\n font-size: 32px;\n color: #2196f3;\n margin-bottom: 8px;\n}\n\n.quick-action-title[_ngcontent-%COMP%] {\n font-size: 14px;\n font-weight: 600;\n color: #495057;\n margin-bottom: 4px;\n}\n\n.quick-action-description[_ngcontent-%COMP%] {\n font-size: 12px;\n color: #6c757d;\n}\n\n\n\n.header-actions[_ngcontent-%COMP%] {\n display: flex;\n gap: 8px;\n align-items: center;\n}\n\n\n\n.entity-list[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 12px;\n margin-top: 16px;\n}\n\n.entity-item[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 16px;\n padding: 16px;\n background: #f8f9fa;\n border: 1px solid #e0e6ed;\n border-radius: 10px;\n cursor: pointer;\n transition: all 0.2s ease;\n}\n\n.entity-item[_ngcontent-%COMP%]:hover {\n background: white;\n border-color: #2196f3;\n box-shadow: 0 4px 12px rgba(0,0,0,0.08);\n transform: translateY(-1px);\n}\n\n.item-icon[_ngcontent-%COMP%] {\n width: 40px;\n height: 40px;\n background: linear-gradient(135deg, #e9ecef, #dee2e6);\n border-radius: 10px;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.prompt-item[_ngcontent-%COMP%] .item-icon[_ngcontent-%COMP%] {\n background: linear-gradient(135deg, #20c997, #17a673);\n}\n\n.action-item[_ngcontent-%COMP%] .item-icon[_ngcontent-%COMP%] {\n background: linear-gradient(135deg, #ffc107, #e0a800);\n}\n\n.sub-agent-item[_ngcontent-%COMP%] .item-icon[_ngcontent-%COMP%] {\n background: linear-gradient(135deg, #2196f3, #1976d2);\n}\n\n.model-item[_ngcontent-%COMP%] .item-icon[_ngcontent-%COMP%] {\n background: linear-gradient(135deg, #6f42c1, #563d7c);\n}\n\n.learning-item[_ngcontent-%COMP%] .item-icon[_ngcontent-%COMP%] {\n background: linear-gradient(135deg, #e83e8c, #dc3545);\n}\n\n.note-item[_ngcontent-%COMP%] .item-icon[_ngcontent-%COMP%] {\n background: linear-gradient(135deg, #fd7e14, #e55a00);\n}\n\n.item-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: #6c757d;\n font-size: 18px;\n}\n\n.prompt-item[_ngcontent-%COMP%] .item-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], \n.action-item[_ngcontent-%COMP%] .item-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], \n.sub-agent-item[_ngcontent-%COMP%] .item-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], \n.model-item[_ngcontent-%COMP%] .item-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], \n.learning-item[_ngcontent-%COMP%] .item-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], \n.note-item[_ngcontent-%COMP%] .item-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: white;\n}\n\n.item-icon[_ngcontent-%COMP%] img.sub-agent-logo[_ngcontent-%COMP%] {\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: 6px;\n}\n\n.item-content[_ngcontent-%COMP%] {\n flex: 1;\n min-width: 0;\n}\n\n.item-title[_ngcontent-%COMP%] {\n font-size: 16px;\n font-weight: 600;\n color: #2c3e50;\n margin: 0 0 4px 0;\n line-height: 1.3;\n}\n\n.item-preview[_ngcontent-%COMP%] {\n color: #6c757d;\n font-size: 14px;\n line-height: 1.4;\n margin: 4px 0 8px 0;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n}\n\n.item-meta[_ngcontent-%COMP%] {\n display: flex;\n gap: 12px;\n align-items: center;\n flex-wrap: wrap;\n}\n\n.meta-tag[_ngcontent-%COMP%], \n.priority-tag[_ngcontent-%COMP%], \n.status-tag[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 12px;\n padding: 3px 8px;\n border-radius: 6px;\n font-weight: 500;\n}\n\n.meta-tag[_ngcontent-%COMP%] {\n background: #e9ecef;\n color: #495057;\n}\n\n.priority-tag[_ngcontent-%COMP%] {\n color: white;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.3px;\n}\n\n.status-tag[_ngcontent-%COMP%] {\n background: #e9ecef;\n color: #495057;\n}\n\n.status-tag.active[_ngcontent-%COMP%] {\n background: #d4edda;\n color: #28a745;\n}\n\n.status-tag.inactive[_ngcontent-%COMP%] {\n background: #f8d7da;\n color: #dc3545;\n}\n\n.item-actions[_ngcontent-%COMP%] {\n opacity: 0;\n transition: opacity 0.2s ease;\n color: #6c757d;\n font-size: 16px;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.entity-item[_ngcontent-%COMP%]:hover .item-actions[_ngcontent-%COMP%] {\n opacity: 1;\n}\n\n.entity-item[_ngcontent-%COMP%]:hover .item-actions[_ngcontent-%COMP%] > i[_ngcontent-%COMP%] {\n color: #2196f3;\n}\n\n.view-more-item[_ngcontent-%COMP%] {\n padding: 16px;\n background: linear-gradient(135deg, #f8f9fa, #e9ecef);\n border: 2px dashed #dee2e6;\n border-radius: 10px;\n text-align: center;\n cursor: pointer;\n transition: all 0.2s ease;\n color: #6c757d;\n font-weight: 500;\n}\n\n.view-more-item[_ngcontent-%COMP%]:hover {\n background: linear-gradient(135deg, #e9ecef, #dee2e6);\n border-color: #2196f3;\n color: #2196f3;\n}\n\n\n\n.payload-config-section[_ngcontent-%COMP%], \n.payload-paths-section[_ngcontent-%COMP%], \n.payload-validation-section[_ngcontent-%COMP%] {\n margin-bottom: 32px;\n}\n\n.subsection-title[_ngcontent-%COMP%] {\n font-size: 16px;\n font-weight: 600;\n color: #2c3e50;\n margin: 0 0 16px 0;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.subsection-title[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: #2196f3;\n}\n\n.subsection-divider[_ngcontent-%COMP%] {\n margin-top: 32px;\n margin-bottom: 16px;\n padding-top: 24px;\n border-top: 1px solid #e0e6ed;\n}\n\n.payload-config-grid[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: 1fr 1fr 1fr;\n gap: 16px;\n margin-bottom: 24px;\n}\n\n.payload-field-group[_ngcontent-%COMP%] {\n margin-bottom: 20px;\n}\n\n.payload-field-label[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 14px;\n font-weight: 600;\n color: #495057;\n margin-bottom: 8px;\n}\n\n.payload-field-label[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: #6c757d;\n font-size: 16px;\n}\n\n.field-description[_ngcontent-%COMP%] {\n font-size: 12px;\n font-weight: normal;\n color: #6c757d;\n margin-left: auto;\n}\n\n\n\n.payload-field-group[_ngcontent-%COMP%] mj-code-editor[_ngcontent-%COMP%] {\n border: 1px solid #dee2e6;\n border-radius: 8px;\n overflow: hidden;\n}\n\n.payload-field-group[_ngcontent-%COMP%] mj-code-editor[_ngcontent-%COMP%]:hover {\n border-color: #2196f3;\n}\n\n\n\n.payload-field-group[_ngcontent-%COMP%] mj-form-field[_ngcontent-%COMP%] textarea {\n font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;\n font-size: 13px;\n line-height: 1.5;\n min-height: 120px;\n resize: vertical;\n}\n\n\n\n.execution-history-panel[_ngcontent-%COMP%] {\n max-height: 500px;\n overflow-y: auto;\n overflow-x: hidden;\n}\n\n\n\n.timeline-list[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 16px;\n margin-top: 16px;\n}\n\n.timeline-item[_ngcontent-%COMP%] {\n display: flex;\n align-items: flex-start;\n gap: 16px;\n padding: 16px;\n background: #f8f9fa;\n border: 1px solid #e0e6ed;\n border-radius: 10px;\n cursor: pointer;\n transition: all 0.2s ease;\n}\n\n.timeline-item[_ngcontent-%COMP%]:hover {\n background: white;\n border-color: #2196f3;\n box-shadow: 0 4px 12px rgba(0,0,0,0.08);\n}\n\n.timeline-marker[_ngcontent-%COMP%] {\n width: 32px;\n height: 32px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n box-shadow: 0 2px 8px rgba(0,0,0,0.1);\n}\n\n.timeline-marker[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: white;\n font-size: 14px;\n}\n\n.timeline-content[_ngcontent-%COMP%] {\n flex: 1;\n min-width: 0;\n}\n\n.timeline-title[_ngcontent-%COMP%] {\n font-size: 16px;\n font-weight: 600;\n color: #2c3e50;\n margin: 0 0 8px 0;\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n gap: 16px;\n}\n\n.timeline-date[_ngcontent-%COMP%] {\n font-size: 12px;\n color: #6c757d;\n background: #e9ecef;\n padding: 2px 8px;\n border-radius: 6px;\n white-space: nowrap;\n flex-shrink: 0;\n}\n\n.timeline-meta[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 12px;\n margin-bottom: 8px;\n}\n\n.timeline-preview[_ngcontent-%COMP%] {\n color: #6c757d;\n font-size: 14px;\n line-height: 1.4;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n}\n\n\n\n.cards-container[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));\n gap: 20px;\n margin-top: 16px;\n}\n\n.entity-card[_ngcontent-%COMP%] {\n background: white;\n border: 1px solid #e0e6ed;\n border-radius: 12px;\n padding: 20px;\n cursor: pointer;\n transition: all 0.3s ease;\n box-shadow: 0 2px 8px rgba(0,0,0,0.06);\n position: relative;\n overflow: hidden;\n}\n\n.entity-card[_ngcontent-%COMP%]:hover {\n transform: translateY(-4px);\n box-shadow: 0 8px 24px rgba(0,0,0,0.12);\n border-color: #2196f3;\n}\n\n.entity-card[_ngcontent-%COMP%]::before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n height: 4px;\n background: linear-gradient(90deg, #2196f3, #42a5f5);\n opacity: 0;\n transition: opacity 0.3s ease;\n}\n\n.entity-card[_ngcontent-%COMP%]:hover::before {\n opacity: 1;\n}\n\n.card-header[_ngcontent-%COMP%] {\n display: flex;\n align-items: flex-start;\n gap: 12px;\n margin-bottom: 12px;\n}\n\n.card-icon[_ngcontent-%COMP%] {\n width: 40px;\n height: 40px;\n background: linear-gradient(135deg, #f8f9fa, #e9ecef);\n border-radius: 10px;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.sub-agent-card[_ngcontent-%COMP%] .card-icon[_ngcontent-%COMP%] {\n background: linear-gradient(135deg, #2196f3, #1976d2);\n}\n\n.prompt-card[_ngcontent-%COMP%] .card-icon[_ngcontent-%COMP%] {\n background: linear-gradient(135deg, #20c997, #17a673);\n}\n\n.action-card[_ngcontent-%COMP%] .card-icon[_ngcontent-%COMP%] {\n background: linear-gradient(135deg, #ffc107, #e0a800);\n}\n\n.card-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 18px;\n color: #6c757d;\n}\n\n.sub-agent-card[_ngcontent-%COMP%] .card-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], \n.prompt-card[_ngcontent-%COMP%] .card-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], \n.action-card[_ngcontent-%COMP%] .card-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: white;\n}\n\n.card-title-section[_ngcontent-%COMP%] {\n flex: 1;\n min-width: 0;\n}\n\n.card-title[_ngcontent-%COMP%] {\n font-size: 16px;\n font-weight: 600;\n color: #2c3e50;\n margin: 0 0 4px 0;\n line-height: 1.3;\n word-wrap: break-word;\n}\n\n.card-description[_ngcontent-%COMP%] {\n color: #6c757d;\n font-size: 14px;\n line-height: 1.5;\n margin: 8px 0;\n display: -webkit-box;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n overflow: hidden;\n}\n\n.card-meta[_ngcontent-%COMP%] {\n display: flex;\n gap: 16px;\n margin-top: 12px;\n flex-wrap: wrap;\n}\n\n.meta-item[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 6px;\n font-size: 12px;\n color: #6c757d;\n padding: 4px 8px;\n background: #f8f9fa;\n border-radius: 6px;\n}\n\n.meta-item[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 11px;\n opacity: 0.8;\n}\n\n.meta-item.active[_ngcontent-%COMP%] {\n color: #28a745;\n background: #d4edda;\n}\n\n.meta-item.inactive[_ngcontent-%COMP%] {\n color: #dc3545;\n background: #f8d7da;\n}\n\n.card-actions[_ngcontent-%COMP%] {\n opacity: 0;\n transition: opacity 0.3s ease;\n color: #6c757d;\n}\n\n.entity-card[_ngcontent-%COMP%]:hover .card-actions[_ngcontent-%COMP%] {\n opacity: 1;\n color: #2196f3;\n}\n\n\n\n.priority-badge[_ngcontent-%COMP%] {\n padding: 2px 8px;\n border-radius: 12px;\n font-size: 11px;\n font-weight: 600;\n color: white;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n.type-badge[_ngcontent-%COMP%] {\n padding: 2px 8px;\n border-radius: 6px;\n font-size: 11px;\n font-weight: 500;\n background: #e9ecef;\n color: #495057;\n text-transform: uppercase;\n letter-spacing: 0.3px;\n}\n\n\n\n.view-all-card[_ngcontent-%COMP%] {\n background: linear-gradient(135deg, #f8f9fa, #e9ecef);\n border: 2px dashed #dee2e6;\n border-radius: 12px;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 120px;\n cursor: pointer;\n transition: all 0.3s ease;\n}\n\n.view-all-card[_ngcontent-%COMP%]:hover {\n background: linear-gradient(135deg, #e9ecef, #dee2e6);\n border-color: #2196f3;\n transform: translateY(-2px);\n}\n\n.view-all-content[_ngcontent-%COMP%] {\n text-align: center;\n color: #6c757d;\n font-weight: 500;\n}\n\n.view-all-content[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 24px;\n margin-bottom: 8px;\n display: block;\n}\n\n\n\n.timeline-container[_ngcontent-%COMP%] {\n position: relative;\n margin-top: 16px;\n}\n\n.timeline-item[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n margin-bottom: 24px;\n transition: all 0.3s ease;\n border-radius: 12px;\n padding: 16px;\n background: transparent;\n border: 1px solid transparent;\n}\n\n.timeline-item[_ngcontent-%COMP%]:hover {\n background: #f8f9fa;\n border-color: #e0e6ed;\n}\n\n.timeline-item.expanded[_ngcontent-%COMP%] {\n background: #f8f9fa;\n border-color: #2196f3;\n box-shadow: 0 4px 12px rgba(33, 150, 243, 0.1);\n}\n\n.timeline-item.view-all[_ngcontent-%COMP%] {\n cursor: pointer;\n background: linear-gradient(135deg, #f8f9fa, #e9ecef);\n border: 2px dashed #dee2e6;\n}\n\n.timeline-item.view-all[_ngcontent-%COMP%]:hover {\n background: linear-gradient(135deg, #e9ecef, #dee2e6);\n border-color: #2196f3;\n}\n\n.timeline-item[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:first-child {\n display: flex;\n align-items: flex-start;\n}\n\n.timeline-marker[_ngcontent-%COMP%] {\n width: 40px;\n height: 40px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-right: 16px;\n flex-shrink: 0;\n position: relative;\n box-shadow: 0 2px 8px rgba(0,0,0,0.1);\n}\n\n.timeline-marker[_ngcontent-%COMP%]::after {\n content: '';\n position: absolute;\n top: 50px;\n left: 50%;\n transform: translateX(-50%);\n width: 2px;\n height: 24px;\n background: #e0e6ed;\n}\n\n.timeline-item[_ngcontent-%COMP%]:last-child .timeline-marker[_ngcontent-%COMP%]::after {\n display: none;\n}\n\n.timeline-marker[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: white;\n font-size: 16px;\n}\n\n.timeline-marker.view-all-marker[_ngcontent-%COMP%] {\n background: #6c757d;\n}\n\n.timeline-content[_ngcontent-%COMP%] {\n flex: 1;\n min-width: 0;\n display: flex;\n align-items: flex-start;\n}\n\n.timeline-header[_ngcontent-%COMP%] {\n flex: 1;\n cursor: pointer;\n}\n\n.timeline-header[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:first-child {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n margin-bottom: 8px;\n gap: 16px;\n}\n\n.expand-icon[_ngcontent-%COMP%] {\n transition: transform 0.3s ease;\n margin-right: 8px;\n color: #6c757d;\n}\n\n.expand-icon.expanded[_ngcontent-%COMP%] {\n transform: rotate(90deg);\n}\n\n.timeline-title[_ngcontent-%COMP%] {\n font-size: 16px;\n font-weight: 600;\n color: #2c3e50;\n margin: 0;\n line-height: 1.3;\n}\n\n.timeline-date[_ngcontent-%COMP%] {\n font-size: 12px;\n color: #6c757d;\n white-space: nowrap;\n background: #f8f9fa;\n padding: 4px 8px;\n border-radius: 6px;\n margin-left: auto;\n}\n\n.timeline-preview[_ngcontent-%COMP%] {\n font-size: 13px;\n color: #6c757d;\n line-height: 1.5;\n margin-top: 8px;\n padding: 8px 12px;\n background: #f8f9fa;\n border-radius: 6px;\n border: 1px solid #e0e6ed;\n}\n\n.timeline-status[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 12px;\n margin-bottom: 8px;\n}\n\n.execution-time[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 12px;\n color: #6c757d;\n background: #f8f9fa;\n padding: 4px 8px;\n border-radius: 6px;\n}\n\n.timeline-description[_ngcontent-%COMP%] {\n color: #6c757d;\n font-size: 14px;\n line-height: 1.5;\n margin: 8px 0;\n}\n\n.timeline-error[_ngcontent-%COMP%] {\n color: #dc3545;\n font-size: 13px;\n background: #f8d7da;\n padding: 8px 12px;\n border-radius: 6px;\n margin-top: 8px;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.timeline-error[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n flex-shrink: 0;\n}\n\n\n\n.timeline-expanded-content[_ngcontent-%COMP%] {\n margin-top: 20px;\n padding-top: 20px;\n border-top: 1px solid #e0e6ed;\n animation: _ngcontent-%COMP%_fadeIn 0.3s ease;\n}\n\n@keyframes _ngcontent-%COMP%_fadeIn {\n from {\n opacity: 0;\n transform: translateY(-10px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n.result-section[_ngcontent-%COMP%], \n.error-section[_ngcontent-%COMP%] {\n margin-bottom: 20px;\n}\n\n.result-section[_ngcontent-%COMP%] h5[_ngcontent-%COMP%], \n.error-section[_ngcontent-%COMP%] h5[_ngcontent-%COMP%] {\n font-size: 14px;\n font-weight: 600;\n color: #495057;\n margin-bottom: 8px;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.error-section[_ngcontent-%COMP%] h5[_ngcontent-%COMP%] {\n color: #dc3545;\n}\n\n.result-content[_ngcontent-%COMP%], \n.error-content[_ngcontent-%COMP%] {\n background: white;\n border: 1px solid #e0e6ed;\n border-radius: 8px;\n padding: 12px 16px;\n font-size: 14px;\n line-height: 1.6;\n color: #495057;\n white-space: pre-wrap;\n word-break: break-word;\n max-height: 200px;\n overflow-y: auto;\n}\n\n\n\n.result-section[_ngcontent-%COMP%] mj-code-editor[_ngcontent-%COMP%] {\n border: 1px solid #e0e6ed;\n border-radius: 8px;\n overflow: hidden;\n}\n\n.error-content[_ngcontent-%COMP%] {\n background: #f8d7da;\n border-color: #f5c6cb;\n color: #721c24;\n}\n\n.execution-details[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));\n gap: 16px;\n margin-bottom: 20px;\n}\n\n.detail-row[_ngcontent-%COMP%] {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n}\n\n.detail-label[_ngcontent-%COMP%] {\n font-size: 12px;\n font-weight: 600;\n color: #6c757d;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n min-width: 80px;\n}\n\n.detail-value[_ngcontent-%COMP%] {\n font-size: 14px;\n color: #495057;\n word-break: break-all;\n}\n\n.timeline-actions[_ngcontent-%COMP%] {\n display: flex;\n gap: 12px;\n justify-content: flex-end;\n}\n\n.btn-primary[_ngcontent-%COMP%] {\n padding: 8px 16px;\n background: #2196f3;\n color: white;\n border: none;\n border-radius: 8px;\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n gap: 8px;\n transition: all 0.2s ease;\n}\n\n.btn-primary[_ngcontent-%COMP%]:hover {\n background: #1976d2;\n transform: translateY(-1px);\n box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);\n}\n\n.btn-primary[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 12px;\n}\n\n\n\n.empty-state[_ngcontent-%COMP%] {\n text-align: center;\n padding: 60px 20px;\n color: #6c757d;\n background: #f8f9fa;\n border-radius: 12px;\n border: 2px dashed #dee2e6;\n margin-top: 16px;\n}\n\n.empty-state[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 48px;\n color: #dee2e6;\n margin-bottom: 16px;\n}\n\n.empty-state[_ngcontent-%COMP%] h4[_ngcontent-%COMP%] {\n color: #495057;\n font-weight: 600;\n margin-bottom: 8px;\n font-size: 18px;\n}\n\n.empty-state[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\n font-size: 15px;\n line-height: 1.6;\n max-width: 400px;\n margin: 0 auto 20px auto;\n}\n\n\n\n@media (max-width: 768px) {\n \n\n .agent-header[_ngcontent-%COMP%] {\n padding: 16px;\n }\n \n .agent-header-content[_ngcontent-%COMP%] {\n flex-direction: column;\n gap: 16px;\n }\n \n .agent-overview[_ngcontent-%COMP%] {\n flex-direction: column;\n align-items: flex-start;\n gap: 12px;\n }\n \n .agent-meta[_ngcontent-%COMP%] {\n flex-direction: column;\n align-items: flex-start;\n gap: 8px;\n }\n \n .agent-actions[_ngcontent-%COMP%] {\n width: 100%;\n align-self: stretch;\n }\n \n .action-button[_ngcontent-%COMP%] {\n flex: 1;\n justify-content: center;\n }\n \n \n\n .form-content[_ngcontent-%COMP%] {\n padding: 12px;\n }\n \n .k-panelbar > .k-panelbar-item > .k-header {\n padding: 16px 20px;\n font-size: 15px;\n }\n \n .panel-content[_ngcontent-%COMP%] {\n padding: 20px 16px;\n }\n \n .section-header[_ngcontent-%COMP%] {\n flex-direction: column;\n align-items: flex-start;\n gap: 12px;\n }\n \n .header-actions[_ngcontent-%COMP%] {\n flex-wrap: wrap;\n align-self: stretch;\n }\n \n \n\n .entity-item[_ngcontent-%COMP%] {\n padding: 12px;\n gap: 12px;\n }\n \n .item-icon[_ngcontent-%COMP%] {\n width: 36px;\n height: 36px;\n }\n \n .item-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 16px;\n }\n \n .item-title[_ngcontent-%COMP%] {\n font-size: 15px;\n }\n \n .item-preview[_ngcontent-%COMP%] {\n font-size: 13px;\n }\n \n .item-meta[_ngcontent-%COMP%] {\n gap: 8px;\n }\n \n \n\n .timeline-item[_ngcontent-%COMP%] {\n padding: 12px;\n gap: 12px;\n }\n \n .timeline-marker[_ngcontent-%COMP%] {\n width: 28px;\n height: 28px;\n }\n \n .timeline-marker[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 12px;\n }\n \n .timeline-title[_ngcontent-%COMP%] {\n flex-direction: column;\n align-items: flex-start;\n gap: 8px;\n }\n \n .timeline-date[_ngcontent-%COMP%] {\n align-self: flex-start;\n }\n \n \n\n .form-fields-grid[_ngcontent-%COMP%] {\n grid-template-columns: 1fr;\n gap: 16px;\n }\n \n \n\n .cards-container[_ngcontent-%COMP%] {\n grid-template-columns: 1fr;\n }\n}\n\n\n\n.execution-history-panel[_ngcontent-%COMP%] {\n max-height: 500px;\n overflow-y: auto;\n overflow-x: hidden;\n}\n\n\n\n.execution-history-panel[_ngcontent-%COMP%]::-webkit-scrollbar {\n width: 8px;\n}\n\n.execution-history-panel[_ngcontent-%COMP%]::-webkit-scrollbar-track {\n background: #f1f1f1;\n border-radius: 4px;\n}\n\n.execution-history-panel[_ngcontent-%COMP%]::-webkit-scrollbar-thumb {\n background: #c1c1c1;\n border-radius: 4px;\n}\n\n.execution-history-panel[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover {\n background: #a0a0a0;\n}"] }); }
2832
+ } }, dependencies: [i6.NgIf, i7.ɵNgNoValidate, i7.NgControlStatus, i7.NgControlStatusGroup, i7.NgModel, i7.NgForm, i8.PanelBarComponent, i8.PanelBarItemComponent, i8.PanelBarContentDirective, i8.PanelBarItemTitleDirective, i3.DialogContainerDirective, i9.TextBoxComponent, i10.DropDownListComponent, i11.ButtonComponent, i12.MJFormField, i13.FormToolbarComponent, i14.CodeEditorComponent, i6.DatePipe], styles: ["\n\n.record-form-container[_ngcontent-%COMP%] {\n height: 100%;\n display: flex;\n flex-direction: column;\n background: #f5f7fa;\n}\n\n.record-form[_ngcontent-%COMP%] {\n height: 100%;\n display: flex;\n flex-direction: column;\n}\n\n\n\n.agent-header[_ngcontent-%COMP%] {\n background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);\n border-bottom: 1px solid #e0e6ed;\n padding: 12px 20px;\n box-shadow: 0 2px 4px rgba(0,0,0,0.04);\n}\n\n.agent-header-content[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 20px;\n}\n\n.agent-overview[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 16px;\n flex: 1;\n min-width: 0;\n}\n\n.agent-icon-wrapper[_ngcontent-%COMP%] {\n width: 48px;\n height: 48px;\n background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);\n border-radius: 12px;\n display: flex;\n align-items: center;\n justify-content: center;\n box-shadow: 0 4px 12px rgba(33, 150, 243, 0.2);\n flex-shrink: 0;\n}\n\n.agent-icon-wrapper[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: white;\n font-size: 24px;\n}\n\n.agent-icon-wrapper[_ngcontent-%COMP%] img.agent-logo[_ngcontent-%COMP%] {\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: 8px;\n}\n\n.agent-info[_ngcontent-%COMP%] {\n flex: 1;\n min-width: 0;\n}\n\n.agent-name[_ngcontent-%COMP%] {\n font-size: 22px;\n font-weight: 600;\n color: #2c3e50;\n margin: 0 0 8px 0;\n line-height: 1.2;\n}\n\n.agent-name-input[_ngcontent-%COMP%] {\n font-size: 18px !important;\n font-weight: 500 !important;\n height: 36px !important;\n width: 100% !important;\n max-width: 400px !important;\n}\n\n.agent-meta[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 16px;\n flex-wrap: wrap;\n}\n\n.status-badge[_ngcontent-%COMP%] {\n padding: 6px 16px;\n border-radius: 20px;\n font-size: 13px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n display: inline-flex;\n align-items: center;\n gap: 6px;\n}\n\n.status-badge.active[_ngcontent-%COMP%] {\n background: #28a745;\n color: white;\n}\n\n.status-badge.pending[_ngcontent-%COMP%] {\n background: #ffc107;\n color: #212529;\n}\n\n.status-badge.disabled[_ngcontent-%COMP%] {\n background: #6c757d;\n color: white;\n}\n\n.execution-mode[_ngcontent-%COMP%], \n.parent-agent[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 6px;\n font-size: 13px;\n color: #6c757d;\n background: #f8f9fa;\n padding: 4px 10px;\n border-radius: 12px;\n}\n\n.execution-mode[_ngcontent-%COMP%] i[_ngcontent-%COMP%], \n.parent-agent[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 12px;\n opacity: 0.8;\n}\n\n\n\n.prompt-controls[_ngcontent-%COMP%] {\n flex: 1;\n margin-right: 16px;\n}\n\n.agent-meta-info[_ngcontent-%COMP%] {\n display: flex;\n gap: 24px;\n margin-top: 12px;\n flex-wrap: wrap;\n}\n\n.meta-item[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.meta-label[_ngcontent-%COMP%] {\n font-size: 12px;\n font-weight: 600;\n color: #6c757d;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n.meta-value[_ngcontent-%COMP%] {\n font-size: 14px;\n color: #495057;\n font-weight: 500;\n}\n\n.agent-description[_ngcontent-%COMP%] {\n margin-top: 16px;\n color: #6c757d;\n line-height: 1.6;\n font-size: 15px;\n}\n\n.agent-description-input[_ngcontent-%COMP%] {\n width: 100%;\n max-width: 600px;\n min-height: 80px;\n resize: vertical;\n}\n\n\n\n.agent-actions[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\n.action-buttons-row[_ngcontent-%COMP%] {\n display: flex;\n gap: 12px;\n flex-wrap: wrap;\n}\n\n.action-button[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 10px 20px;\n border-radius: 8px;\n font-weight: 500;\n font-size: 14px;\n transition: all 0.2s ease;\n box-shadow: 0 2px 4px rgba(0,0,0,0.08);\n}\n\n.action-button[_ngcontent-%COMP%]:hover {\n transform: translateY(-1px);\n box-shadow: 0 4px 8px rgba(0,0,0,0.12);\n}\n\n.action-button.primary[_ngcontent-%COMP%] {\n background: #2196f3;\n color: white;\n}\n\n.action-button.primary[_ngcontent-%COMP%]:hover {\n background: #1976d2;\n}\n\n.action-button.secondary[_ngcontent-%COMP%] {\n background: #6c757d;\n color: white;\n}\n\n.action-button.secondary[_ngcontent-%COMP%]:hover {\n background: #5a6268;\n}\n\n.action-warnings[_ngcontent-%COMP%] {\n margin-top: 8px;\n font-size: 13px;\n color: #dc3545;\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n\n\n.form-content[_ngcontent-%COMP%] {\n flex: 1;\n display: flex;\n flex-direction: column;\n overflow-y: auto;\n overflow-x: hidden;\n background: #f5f7fa;\n padding: 12px;\n}\n\n\n\n .k-panelbar {\n border: none;\n background: transparent;\n}\n\n .k-panelbar > .k-panelbar-item {\n border: none;\n border-radius: 12px;\n margin-bottom: 12px;\n box-shadow: 0 2px 8px rgba(0,0,0,0.06);\n background: white;\n overflow: hidden;\n}\n\n .k-panelbar > .k-panelbar-item > .k-header {\n background: white;\n border: none;\n padding: 16px 20px;\n border-radius: 12px 12px 0 0;\n color: #2c3e50;\n font-weight: 600;\n font-size: 16px;\n transition: all 0.2s ease;\n display: flex;\n align-items: center;\n gap: 12px;\n}\n\n .k-panelbar > .k-panelbar-item > .k-header:hover {\n background: #f8f9fa;\n}\n\n .k-panelbar > .k-panelbar-item.k-panelbar-expanded > .k-header {\n background: #2196f3;\n color: white;\n border-radius: 12px 12px 0 0;\n}\n\n .k-panelbar > .k-panelbar-item > .k-header .k-panelbar-toggle {\n position: absolute;\n right: 24px;\n color: inherit;\n font-size: 14px;\n transition: transform 0.2s ease;\n}\n\n .k-panelbar > .k-panelbar-item.k-panelbar-expanded > .k-header .k-panelbar-toggle {\n transform: rotate(180deg);\n}\n\n .k-panelbar > .k-panelbar-item > .k-header .k-panelbar-toggle::before {\n content: '\\f107';\n font-family: 'Font Awesome 6 Free';\n font-weight: 900;\n}\n\n .k-panelbar > .k-panelbar-item > .k-content {\n padding: 0;\n border: none;\n background: white;\n border-radius: 0 0 12px 12px;\n}\n\n .k-panelbar .k-header .k-panelbar-icon {\n font-size: 18px;\n color: #2196f3;\n margin-right: 8px;\n}\n\n .k-panelbar .k-panelbar-expanded .k-header .k-panelbar-icon {\n color: white;\n}\n\n\n\n.panel-content[_ngcontent-%COMP%] {\n padding: 16px;\n background: white;\n}\n\n.section-header[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 20px;\n gap: 16px;\n flex-wrap: wrap;\n}\n\n.section-description[_ngcontent-%COMP%] {\n color: #6c757d;\n font-size: 14px;\n line-height: 1.6;\n margin-bottom: 16px;\n}\n\n.header-actions[_ngcontent-%COMP%] {\n display: flex;\n gap: 8px;\n align-items: center;\n flex-shrink: 0;\n}\n\n.tab-section[_ngcontent-%COMP%] {\n background: white;\n border-radius: 12px;\n padding: 24px;\n margin-bottom: 24px;\n box-shadow: 0 2px 8px rgba(0,0,0,0.04);\n border: 1px solid #e0e6ed;\n}\n\n.section-header[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 20px;\n padding-bottom: 16px;\n border-bottom: 2px solid #f0f4f8;\n}\n\n.section-title[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 12px;\n margin: 0;\n color: #2c3e50;\n font-size: 18px;\n font-weight: 600;\n}\n\n.section-title[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: #2196f3;\n font-size: 20px;\n}\n\n.section-description[_ngcontent-%COMP%] {\n color: #6c757d;\n font-size: 14px;\n line-height: 1.6;\n margin-top: 8px;\n}\n\n\n\n.form-fields-grid[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));\n gap: 20px;\n margin-top: 20px;\n}\n\n.form-field-group[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.form-field-label[_ngcontent-%COMP%] {\n font-size: 13px;\n font-weight: 600;\n color: #495057;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n\n\n.sub-grid-container[_ngcontent-%COMP%] {\n height: 500px;\n border: 1px solid #e0e6ed;\n border-radius: 8px;\n overflow: hidden;\n display: none; \n\n}\n\n\n\n.empty-state[_ngcontent-%COMP%] {\n text-align: center;\n padding: 60px 20px;\n color: #6c757d;\n}\n\n.empty-state[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 48px;\n color: #dee2e6;\n margin-bottom: 16px;\n}\n\n.empty-state[_ngcontent-%COMP%] h4[_ngcontent-%COMP%] {\n color: #495057;\n font-weight: 600;\n margin-bottom: 8px;\n}\n\n.empty-state[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\n font-size: 15px;\n line-height: 1.6;\n max-width: 400px;\n margin: 0 auto;\n}\n\n\n\n.loading-overlay[_ngcontent-%COMP%] {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(255, 255, 255, 0.9);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 1000;\n}\n\n.loading-spinner[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 16px;\n}\n\n.spinner-icon[_ngcontent-%COMP%] {\n width: 48px;\n height: 48px;\n border: 4px solid #f3f3f3;\n border-top: 4px solid #2196f3;\n border-radius: 50%;\n animation: _ngcontent-%COMP%_spin 1s linear infinite;\n}\n\n@keyframes _ngcontent-%COMP%_spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n}\n\n\n\n.quick-actions[_ngcontent-%COMP%] {\n display: flex;\n gap: 16px;\n margin-top: 20px;\n padding-top: 20px;\n border-top: 1px solid #e0e6ed;\n}\n\n.quick-action-card[_ngcontent-%COMP%] {\n flex: 1;\n padding: 16px;\n background: #f8f9fa;\n border-radius: 8px;\n border: 1px solid #e0e6ed;\n cursor: pointer;\n transition: all 0.2s ease;\n text-align: center;\n}\n\n.quick-action-card[_ngcontent-%COMP%]:hover {\n background: white;\n box-shadow: 0 4px 12px rgba(0,0,0,0.08);\n transform: translateY(-2px);\n}\n\n.quick-action-icon[_ngcontent-%COMP%] {\n font-size: 32px;\n color: #2196f3;\n margin-bottom: 8px;\n}\n\n.quick-action-title[_ngcontent-%COMP%] {\n font-size: 14px;\n font-weight: 600;\n color: #495057;\n margin-bottom: 4px;\n}\n\n.quick-action-description[_ngcontent-%COMP%] {\n font-size: 12px;\n color: #6c757d;\n}\n\n\n\n.header-actions[_ngcontent-%COMP%] {\n display: flex;\n gap: 8px;\n align-items: center;\n}\n\n\n\n.entity-list[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 12px;\n margin-top: 16px;\n}\n\n.entity-item[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 16px;\n padding: 16px;\n background: #f8f9fa;\n border: 1px solid #e0e6ed;\n border-radius: 10px;\n cursor: pointer;\n transition: all 0.2s ease;\n}\n\n.entity-item[_ngcontent-%COMP%]:hover {\n background: white;\n border-color: #2196f3;\n box-shadow: 0 4px 12px rgba(0,0,0,0.08);\n transform: translateY(-1px);\n}\n\n.item-icon[_ngcontent-%COMP%] {\n width: 40px;\n height: 40px;\n background: linear-gradient(135deg, #e9ecef, #dee2e6);\n border-radius: 10px;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.prompt-item[_ngcontent-%COMP%] .item-icon[_ngcontent-%COMP%] {\n background: linear-gradient(135deg, #20c997, #17a673);\n}\n\n.action-item[_ngcontent-%COMP%] .item-icon[_ngcontent-%COMP%] {\n background: linear-gradient(135deg, #ffc107, #e0a800);\n}\n\n.sub-agent-item[_ngcontent-%COMP%] .item-icon[_ngcontent-%COMP%] {\n background: linear-gradient(135deg, #2196f3, #1976d2);\n}\n\n.model-item[_ngcontent-%COMP%] .item-icon[_ngcontent-%COMP%] {\n background: linear-gradient(135deg, #6f42c1, #563d7c);\n}\n\n.learning-item[_ngcontent-%COMP%] .item-icon[_ngcontent-%COMP%] {\n background: linear-gradient(135deg, #e83e8c, #dc3545);\n}\n\n.note-item[_ngcontent-%COMP%] .item-icon[_ngcontent-%COMP%] {\n background: linear-gradient(135deg, #fd7e14, #e55a00);\n}\n\n.item-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: #6c757d;\n font-size: 18px;\n}\n\n.prompt-item[_ngcontent-%COMP%] .item-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], \n.action-item[_ngcontent-%COMP%] .item-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], \n.sub-agent-item[_ngcontent-%COMP%] .item-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], \n.model-item[_ngcontent-%COMP%] .item-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], \n.learning-item[_ngcontent-%COMP%] .item-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], \n.note-item[_ngcontent-%COMP%] .item-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: white;\n}\n\n.item-icon[_ngcontent-%COMP%] img.sub-agent-logo[_ngcontent-%COMP%] {\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: 6px;\n}\n\n.item-content[_ngcontent-%COMP%] {\n flex: 1;\n min-width: 0;\n}\n\n.item-title[_ngcontent-%COMP%] {\n font-size: 16px;\n font-weight: 600;\n color: #2c3e50;\n margin: 0 0 4px 0;\n line-height: 1.3;\n}\n\n.item-preview[_ngcontent-%COMP%] {\n color: #6c757d;\n font-size: 14px;\n line-height: 1.4;\n margin: 4px 0 8px 0;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n}\n\n.item-meta[_ngcontent-%COMP%] {\n display: flex;\n gap: 12px;\n align-items: center;\n flex-wrap: wrap;\n}\n\n.meta-tag[_ngcontent-%COMP%], \n.priority-tag[_ngcontent-%COMP%], \n.status-tag[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 12px;\n padding: 3px 8px;\n border-radius: 6px;\n font-weight: 500;\n}\n\n.meta-tag[_ngcontent-%COMP%] {\n background: #e9ecef;\n color: #495057;\n}\n\n.priority-tag[_ngcontent-%COMP%] {\n color: white;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.3px;\n}\n\n.status-tag[_ngcontent-%COMP%] {\n background: #e9ecef;\n color: #495057;\n}\n\n.status-tag.active[_ngcontent-%COMP%] {\n background: #d4edda;\n color: #28a745;\n}\n\n.status-tag.inactive[_ngcontent-%COMP%] {\n background: #f8d7da;\n color: #dc3545;\n}\n\n.item-actions[_ngcontent-%COMP%] {\n opacity: 0;\n transition: opacity 0.2s ease;\n color: #6c757d;\n font-size: 16px;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.entity-item[_ngcontent-%COMP%]:hover .item-actions[_ngcontent-%COMP%] {\n opacity: 1;\n}\n\n.entity-item[_ngcontent-%COMP%]:hover .item-actions[_ngcontent-%COMP%] > i[_ngcontent-%COMP%] {\n color: #2196f3;\n}\n\n.view-more-item[_ngcontent-%COMP%] {\n padding: 16px;\n background: linear-gradient(135deg, #f8f9fa, #e9ecef);\n border: 2px dashed #dee2e6;\n border-radius: 10px;\n text-align: center;\n cursor: pointer;\n transition: all 0.2s ease;\n color: #6c757d;\n font-weight: 500;\n}\n\n.view-more-item[_ngcontent-%COMP%]:hover {\n background: linear-gradient(135deg, #e9ecef, #dee2e6);\n border-color: #2196f3;\n color: #2196f3;\n}\n\n\n\n.payload-config-section[_ngcontent-%COMP%], \n.payload-paths-section[_ngcontent-%COMP%], \n.payload-validation-section[_ngcontent-%COMP%] {\n margin-bottom: 32px;\n}\n\n.subsection-title[_ngcontent-%COMP%] {\n font-size: 16px;\n font-weight: 600;\n color: #2c3e50;\n margin: 0 0 16px 0;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.subsection-title[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: #2196f3;\n}\n\n.subsection-divider[_ngcontent-%COMP%] {\n margin-top: 32px;\n margin-bottom: 16px;\n padding-top: 24px;\n border-top: 1px solid #e0e6ed;\n}\n\n.payload-config-grid[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: 1fr 1fr 1fr;\n gap: 16px;\n margin-bottom: 24px;\n}\n\n.payload-field-group[_ngcontent-%COMP%] {\n margin-bottom: 20px;\n}\n\n.payload-field-label[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 14px;\n font-weight: 600;\n color: #495057;\n margin-bottom: 8px;\n}\n\n.payload-field-label[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: #6c757d;\n font-size: 16px;\n}\n\n.field-description[_ngcontent-%COMP%] {\n font-size: 12px;\n font-weight: normal;\n color: #6c757d;\n margin-left: auto;\n}\n\n\n\n.payload-field-group[_ngcontent-%COMP%] mj-code-editor[_ngcontent-%COMP%] {\n border: 1px solid #dee2e6;\n border-radius: 8px;\n overflow: hidden;\n}\n\n.payload-field-group[_ngcontent-%COMP%] mj-code-editor[_ngcontent-%COMP%]:hover {\n border-color: #2196f3;\n}\n\n\n\n.payload-field-group[_ngcontent-%COMP%] mj-form-field[_ngcontent-%COMP%] textarea {\n font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;\n font-size: 13px;\n line-height: 1.5;\n min-height: 120px;\n resize: vertical;\n}\n\n\n\n.execution-history-panel[_ngcontent-%COMP%] {\n max-height: 500px;\n overflow-y: auto;\n overflow-x: hidden;\n}\n\n\n\n.timeline-list[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 16px;\n margin-top: 16px;\n}\n\n.timeline-item[_ngcontent-%COMP%] {\n display: flex;\n align-items: flex-start;\n gap: 16px;\n padding: 16px;\n background: #f8f9fa;\n border: 1px solid #e0e6ed;\n border-radius: 10px;\n cursor: pointer;\n transition: all 0.2s ease;\n}\n\n.timeline-item[_ngcontent-%COMP%]:hover {\n background: white;\n border-color: #2196f3;\n box-shadow: 0 4px 12px rgba(0,0,0,0.08);\n}\n\n.timeline-marker[_ngcontent-%COMP%] {\n width: 32px;\n height: 32px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n box-shadow: 0 2px 8px rgba(0,0,0,0.1);\n}\n\n.timeline-marker[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: white;\n font-size: 14px;\n}\n\n.timeline-content[_ngcontent-%COMP%] {\n flex: 1;\n min-width: 0;\n}\n\n.timeline-title[_ngcontent-%COMP%] {\n font-size: 16px;\n font-weight: 600;\n color: #2c3e50;\n margin: 0 0 8px 0;\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n gap: 16px;\n}\n\n.timeline-date[_ngcontent-%COMP%] {\n font-size: 12px;\n color: #6c757d;\n background: #e9ecef;\n padding: 2px 8px;\n border-radius: 6px;\n white-space: nowrap;\n flex-shrink: 0;\n}\n\n.timeline-meta[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 12px;\n margin-bottom: 8px;\n}\n\n.timeline-preview[_ngcontent-%COMP%] {\n color: #6c757d;\n font-size: 14px;\n line-height: 1.4;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n}\n\n\n\n.cards-container[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));\n gap: 20px;\n margin-top: 16px;\n}\n\n.entity-card[_ngcontent-%COMP%] {\n background: white;\n border: 1px solid #e0e6ed;\n border-radius: 12px;\n padding: 20px;\n cursor: pointer;\n transition: all 0.3s ease;\n box-shadow: 0 2px 8px rgba(0,0,0,0.06);\n position: relative;\n overflow: hidden;\n}\n\n.entity-card[_ngcontent-%COMP%]:hover {\n transform: translateY(-4px);\n box-shadow: 0 8px 24px rgba(0,0,0,0.12);\n border-color: #2196f3;\n}\n\n.entity-card[_ngcontent-%COMP%]::before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n height: 4px;\n background: linear-gradient(90deg, #2196f3, #42a5f5);\n opacity: 0;\n transition: opacity 0.3s ease;\n}\n\n.entity-card[_ngcontent-%COMP%]:hover::before {\n opacity: 1;\n}\n\n.card-header[_ngcontent-%COMP%] {\n display: flex;\n align-items: flex-start;\n gap: 12px;\n margin-bottom: 12px;\n}\n\n.card-icon[_ngcontent-%COMP%] {\n width: 40px;\n height: 40px;\n background: linear-gradient(135deg, #f8f9fa, #e9ecef);\n border-radius: 10px;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.sub-agent-card[_ngcontent-%COMP%] .card-icon[_ngcontent-%COMP%] {\n background: linear-gradient(135deg, #2196f3, #1976d2);\n}\n\n.prompt-card[_ngcontent-%COMP%] .card-icon[_ngcontent-%COMP%] {\n background: linear-gradient(135deg, #20c997, #17a673);\n}\n\n.action-card[_ngcontent-%COMP%] .card-icon[_ngcontent-%COMP%] {\n background: linear-gradient(135deg, #ffc107, #e0a800);\n}\n\n.card-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 18px;\n color: #6c757d;\n}\n\n.sub-agent-card[_ngcontent-%COMP%] .card-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], \n.prompt-card[_ngcontent-%COMP%] .card-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%], \n.action-card[_ngcontent-%COMP%] .card-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: white;\n}\n\n.card-title-section[_ngcontent-%COMP%] {\n flex: 1;\n min-width: 0;\n}\n\n.card-title[_ngcontent-%COMP%] {\n font-size: 16px;\n font-weight: 600;\n color: #2c3e50;\n margin: 0 0 4px 0;\n line-height: 1.3;\n word-wrap: break-word;\n}\n\n.card-description[_ngcontent-%COMP%] {\n color: #6c757d;\n font-size: 14px;\n line-height: 1.5;\n margin: 8px 0;\n display: -webkit-box;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n overflow: hidden;\n}\n\n.card-meta[_ngcontent-%COMP%] {\n display: flex;\n gap: 16px;\n margin-top: 12px;\n flex-wrap: wrap;\n}\n\n.meta-item[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 6px;\n font-size: 12px;\n color: #6c757d;\n padding: 4px 8px;\n background: #f8f9fa;\n border-radius: 6px;\n}\n\n.meta-item[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 11px;\n opacity: 0.8;\n}\n\n.meta-item.active[_ngcontent-%COMP%] {\n color: #28a745;\n background: #d4edda;\n}\n\n.meta-item.inactive[_ngcontent-%COMP%] {\n color: #dc3545;\n background: #f8d7da;\n}\n\n.card-actions[_ngcontent-%COMP%] {\n opacity: 0;\n transition: opacity 0.3s ease;\n color: #6c757d;\n}\n\n.entity-card[_ngcontent-%COMP%]:hover .card-actions[_ngcontent-%COMP%] {\n opacity: 1;\n color: #2196f3;\n}\n\n\n\n.priority-badge[_ngcontent-%COMP%] {\n padding: 2px 8px;\n border-radius: 12px;\n font-size: 11px;\n font-weight: 600;\n color: white;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n.type-badge[_ngcontent-%COMP%] {\n padding: 2px 8px;\n border-radius: 6px;\n font-size: 11px;\n font-weight: 500;\n background: #e9ecef;\n color: #495057;\n text-transform: uppercase;\n letter-spacing: 0.3px;\n}\n\n\n\n.view-all-card[_ngcontent-%COMP%] {\n background: linear-gradient(135deg, #f8f9fa, #e9ecef);\n border: 2px dashed #dee2e6;\n border-radius: 12px;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 120px;\n cursor: pointer;\n transition: all 0.3s ease;\n}\n\n.view-all-card[_ngcontent-%COMP%]:hover {\n background: linear-gradient(135deg, #e9ecef, #dee2e6);\n border-color: #2196f3;\n transform: translateY(-2px);\n}\n\n.view-all-content[_ngcontent-%COMP%] {\n text-align: center;\n color: #6c757d;\n font-weight: 500;\n}\n\n.view-all-content[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 24px;\n margin-bottom: 8px;\n display: block;\n}\n\n\n\n.timeline-container[_ngcontent-%COMP%] {\n position: relative;\n margin-top: 16px;\n}\n\n.timeline-item[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n margin-bottom: 24px;\n transition: all 0.3s ease;\n border-radius: 12px;\n padding: 16px;\n background: transparent;\n border: 1px solid transparent;\n}\n\n.timeline-item[_ngcontent-%COMP%]:hover {\n background: #f8f9fa;\n border-color: #e0e6ed;\n}\n\n.timeline-item.expanded[_ngcontent-%COMP%] {\n background: #f8f9fa;\n border-color: #2196f3;\n box-shadow: 0 4px 12px rgba(33, 150, 243, 0.1);\n}\n\n.timeline-item.view-all[_ngcontent-%COMP%] {\n cursor: pointer;\n background: linear-gradient(135deg, #f8f9fa, #e9ecef);\n border: 2px dashed #dee2e6;\n}\n\n.timeline-item.view-all[_ngcontent-%COMP%]:hover {\n background: linear-gradient(135deg, #e9ecef, #dee2e6);\n border-color: #2196f3;\n}\n\n.timeline-item[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:first-child {\n display: flex;\n align-items: flex-start;\n}\n\n.timeline-marker[_ngcontent-%COMP%] {\n width: 40px;\n height: 40px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-right: 16px;\n flex-shrink: 0;\n position: relative;\n box-shadow: 0 2px 8px rgba(0,0,0,0.1);\n}\n\n.timeline-marker[_ngcontent-%COMP%]::after {\n content: '';\n position: absolute;\n top: 50px;\n left: 50%;\n transform: translateX(-50%);\n width: 2px;\n height: 24px;\n background: #e0e6ed;\n}\n\n.timeline-item[_ngcontent-%COMP%]:last-child .timeline-marker[_ngcontent-%COMP%]::after {\n display: none;\n}\n\n.timeline-marker[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: white;\n font-size: 16px;\n}\n\n.timeline-marker.view-all-marker[_ngcontent-%COMP%] {\n background: #6c757d;\n}\n\n.timeline-content[_ngcontent-%COMP%] {\n flex: 1;\n min-width: 0;\n display: flex;\n align-items: flex-start;\n}\n\n.timeline-header[_ngcontent-%COMP%] {\n flex: 1;\n cursor: pointer;\n}\n\n.timeline-header[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:first-child {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n margin-bottom: 8px;\n gap: 16px;\n}\n\n.expand-icon[_ngcontent-%COMP%] {\n transition: transform 0.3s ease;\n margin-right: 8px;\n color: #6c757d;\n}\n\n.expand-icon.expanded[_ngcontent-%COMP%] {\n transform: rotate(90deg);\n}\n\n.timeline-title[_ngcontent-%COMP%] {\n font-size: 16px;\n font-weight: 600;\n color: #2c3e50;\n margin: 0;\n line-height: 1.3;\n}\n\n.timeline-date[_ngcontent-%COMP%] {\n font-size: 12px;\n color: #6c757d;\n white-space: nowrap;\n background: #f8f9fa;\n padding: 4px 8px;\n border-radius: 6px;\n margin-left: auto;\n}\n\n.timeline-preview[_ngcontent-%COMP%] {\n font-size: 13px;\n color: #6c757d;\n line-height: 1.5;\n margin-top: 8px;\n padding: 8px 12px;\n background: #f8f9fa;\n border-radius: 6px;\n border: 1px solid #e0e6ed;\n}\n\n.timeline-status[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 12px;\n margin-bottom: 8px;\n}\n\n.execution-time[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 12px;\n color: #6c757d;\n background: #f8f9fa;\n padding: 4px 8px;\n border-radius: 6px;\n}\n\n.timeline-description[_ngcontent-%COMP%] {\n color: #6c757d;\n font-size: 14px;\n line-height: 1.5;\n margin: 8px 0;\n}\n\n.timeline-error[_ngcontent-%COMP%] {\n color: #dc3545;\n font-size: 13px;\n background: #f8d7da;\n padding: 8px 12px;\n border-radius: 6px;\n margin-top: 8px;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.timeline-error[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n flex-shrink: 0;\n}\n\n\n\n.timeline-expanded-content[_ngcontent-%COMP%] {\n margin-top: 20px;\n padding-top: 20px;\n border-top: 1px solid #e0e6ed;\n animation: _ngcontent-%COMP%_fadeIn 0.3s ease;\n}\n\n@keyframes _ngcontent-%COMP%_fadeIn {\n from {\n opacity: 0;\n transform: translateY(-10px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n.result-section[_ngcontent-%COMP%], \n.error-section[_ngcontent-%COMP%] {\n margin-bottom: 20px;\n}\n\n.result-section[_ngcontent-%COMP%] h5[_ngcontent-%COMP%], \n.error-section[_ngcontent-%COMP%] h5[_ngcontent-%COMP%] {\n font-size: 14px;\n font-weight: 600;\n color: #495057;\n margin-bottom: 8px;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.error-section[_ngcontent-%COMP%] h5[_ngcontent-%COMP%] {\n color: #dc3545;\n}\n\n.result-content[_ngcontent-%COMP%], \n.error-content[_ngcontent-%COMP%] {\n background: white;\n border: 1px solid #e0e6ed;\n border-radius: 8px;\n padding: 12px 16px;\n font-size: 14px;\n line-height: 1.6;\n color: #495057;\n white-space: pre-wrap;\n word-break: break-word;\n max-height: 200px;\n overflow-y: auto;\n}\n\n\n\n.result-section[_ngcontent-%COMP%] mj-code-editor[_ngcontent-%COMP%] {\n border: 1px solid #e0e6ed;\n border-radius: 8px;\n overflow: hidden;\n}\n\n.error-content[_ngcontent-%COMP%] {\n background: #f8d7da;\n border-color: #f5c6cb;\n color: #721c24;\n}\n\n.execution-details[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));\n gap: 16px;\n margin-bottom: 20px;\n}\n\n.detail-row[_ngcontent-%COMP%] {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n}\n\n.detail-label[_ngcontent-%COMP%] {\n font-size: 12px;\n font-weight: 600;\n color: #6c757d;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n min-width: 80px;\n}\n\n.detail-value[_ngcontent-%COMP%] {\n font-size: 14px;\n color: #495057;\n word-break: break-all;\n}\n\n.timeline-actions[_ngcontent-%COMP%] {\n display: flex;\n gap: 12px;\n justify-content: flex-end;\n}\n\n.btn-primary[_ngcontent-%COMP%] {\n padding: 8px 16px;\n background: #2196f3;\n color: white;\n border: none;\n border-radius: 8px;\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n gap: 8px;\n transition: all 0.2s ease;\n}\n\n.btn-primary[_ngcontent-%COMP%]:hover {\n background: #1976d2;\n transform: translateY(-1px);\n box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);\n}\n\n.btn-primary[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 12px;\n}\n\n\n\n.empty-state[_ngcontent-%COMP%] {\n text-align: center;\n padding: 60px 20px;\n color: #6c757d;\n background: #f8f9fa;\n border-radius: 12px;\n border: 2px dashed #dee2e6;\n margin-top: 16px;\n}\n\n.empty-state[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 48px;\n color: #dee2e6;\n margin-bottom: 16px;\n}\n\n.empty-state[_ngcontent-%COMP%] h4[_ngcontent-%COMP%] {\n color: #495057;\n font-weight: 600;\n margin-bottom: 8px;\n font-size: 18px;\n}\n\n.empty-state[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\n font-size: 15px;\n line-height: 1.6;\n max-width: 400px;\n margin: 0 auto 20px auto;\n}\n\n\n\n@media (max-width: 768px) {\n \n\n .agent-header[_ngcontent-%COMP%] {\n padding: 16px;\n }\n \n .agent-header-content[_ngcontent-%COMP%] {\n flex-direction: column;\n gap: 16px;\n }\n \n .agent-overview[_ngcontent-%COMP%] {\n flex-direction: column;\n align-items: flex-start;\n gap: 12px;\n }\n \n .agent-meta[_ngcontent-%COMP%] {\n flex-direction: column;\n align-items: flex-start;\n gap: 8px;\n }\n \n .agent-actions[_ngcontent-%COMP%] {\n width: 100%;\n align-self: stretch;\n }\n \n .action-button[_ngcontent-%COMP%] {\n flex: 1;\n justify-content: center;\n }\n \n \n\n .form-content[_ngcontent-%COMP%] {\n padding: 12px;\n }\n \n .k-panelbar > .k-panelbar-item > .k-header {\n padding: 16px 20px;\n font-size: 15px;\n }\n \n .panel-content[_ngcontent-%COMP%] {\n padding: 20px 16px;\n }\n \n .section-header[_ngcontent-%COMP%] {\n flex-direction: column;\n align-items: flex-start;\n gap: 12px;\n }\n \n .header-actions[_ngcontent-%COMP%] {\n flex-wrap: wrap;\n align-self: stretch;\n }\n \n \n\n .entity-item[_ngcontent-%COMP%] {\n padding: 12px;\n gap: 12px;\n }\n \n .item-icon[_ngcontent-%COMP%] {\n width: 36px;\n height: 36px;\n }\n \n .item-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 16px;\n }\n \n .item-title[_ngcontent-%COMP%] {\n font-size: 15px;\n }\n \n .item-preview[_ngcontent-%COMP%] {\n font-size: 13px;\n }\n \n .item-meta[_ngcontent-%COMP%] {\n gap: 8px;\n }\n \n \n\n .timeline-item[_ngcontent-%COMP%] {\n padding: 12px;\n gap: 12px;\n }\n \n .timeline-marker[_ngcontent-%COMP%] {\n width: 28px;\n height: 28px;\n }\n \n .timeline-marker[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 12px;\n }\n \n .timeline-title[_ngcontent-%COMP%] {\n flex-direction: column;\n align-items: flex-start;\n gap: 8px;\n }\n \n .timeline-date[_ngcontent-%COMP%] {\n align-self: flex-start;\n }\n \n \n\n .form-fields-grid[_ngcontent-%COMP%] {\n grid-template-columns: 1fr;\n gap: 16px;\n }\n \n \n\n .cards-container[_ngcontent-%COMP%] {\n grid-template-columns: 1fr;\n }\n}\n\n\n\n.execution-history-panel[_ngcontent-%COMP%] {\n max-height: 500px;\n overflow-y: auto;\n overflow-x: hidden;\n}\n\n\n\n.execution-history-panel[_ngcontent-%COMP%]::-webkit-scrollbar {\n width: 8px;\n}\n\n.execution-history-panel[_ngcontent-%COMP%]::-webkit-scrollbar-track {\n background: #f1f1f1;\n border-radius: 4px;\n}\n\n.execution-history-panel[_ngcontent-%COMP%]::-webkit-scrollbar-thumb {\n background: #c1c1c1;\n border-radius: 4px;\n}\n\n.execution-history-panel[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover {\n background: #a0a0a0;\n}"] }); }
1942
2833
  };
1943
2834
  AIAgentFormComponentExtended = __decorate([
1944
2835
  RegisterClass(BaseFormComponent, 'AI Agents')
@@ -1946,8 +2837,8 @@ AIAgentFormComponentExtended = __decorate([
1946
2837
  export { AIAgentFormComponentExtended };
1947
2838
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AIAgentFormComponentExtended, [{
1948
2839
  type: Component,
1949
- args: [{ selector: 'mj-ai-agent-form', template: "<div class=\"record-form-container\">\n <!-- Dialog container for Kendo dialogs -->\n <div kendoDialogContainer></div>\n <form *ngIf=\"record\" class=\"record-form\" #form=\"ngForm\">\n <mj-form-toolbar [form]=\"this\"></mj-form-toolbar>\n\n <!-- Compact Header with Agent Overview -->\n <div class=\"agent-header\">\n <div class=\"agent-header-content\">\n <div class=\"agent-overview\">\n <div class=\"agent-icon-wrapper\">\n @if (hasLogoURL()) {\n <img [src]=\"record.LogoURL\" [alt]=\"record.Name + ' logo'\" class=\"agent-logo\">\n } @else {\n <i [class]=\"getAgentIcon()\"></i>\n }\n </div>\n <div class=\"agent-info\">\n @if (EditMode) {\n <kendo-textbox [(ngModel)]=\"record.Name\" \n name=\"agentName\"\n placeholder=\"Enter agent name...\"\n class=\"agent-name-input\">\n </kendo-textbox>\n } @else {\n <h1 class=\"agent-name\">{{ record.Name || 'Untitled AI Agent' }}</h1>\n }\n <div class=\"agent-meta\">\n @if (record.Status) {\n <span class=\"status-badge\" [style.background-color]=\"getStatusBadgeColor()\">\n <i class=\"fa-solid fa-circle\"></i>\n {{ record.Status }}\n </span>\n }\n @if (record.ExecutionMode) {\n <span class=\"execution-mode\">\n <i [class]=\"getExecutionModeIcon(record.ExecutionMode)\"></i>\n {{ record.ExecutionMode }}\n </span>\n }\n @if (record.Parent) {\n <span class=\"parent-agent\">\n <i class=\"fa-solid fa-sitemap\"></i>\n Child of {{ record.Parent }}\n </span>\n }\n </div>\n </div>\n </div>\n \n <!-- Action Buttons -->\n <div class=\"agent-actions\">\n @if (record.ID) {\n <button kendoButton themeColor=\"primary\" size=\"large\"\n (click)=\"openTestHarness()\"\n [disabled]=\"record.Status !== 'Active'\"\n title=\"Run this AI agent\">\n <i class=\"fa-solid fa-play\"></i>\n Run\n </button>\n }\n <button kendoButton fillMode=\"outline\" size=\"small\" (click)=\"refreshRelatedData()\" title=\"Refresh all data\">\n <i class=\"fa-solid fa-refresh\"></i>\n </button>\n </div>\n </div>\n </div>\n\n <!-- Single Pane Layout with Expander Panels -->\n <div class=\"form-content\">\n <kendo-panelbar>\n\n <!-- Execution History (First Panel - Expanded by default) -->\n @if (record.ID) {\n <kendo-panelbar-item [expanded]=\"true\">\n <ng-template kendoPanelBarItemTitle>\n <i class=\"fa-solid fa-history\"></i> Execution History{{ executionHistoryCount > 0 ? ' (' + executionHistoryCount + ')' : '' }}\n </ng-template>\n <ng-template kendoPanelBarContent>\n <div class=\"panel-content execution-history-panel\">\n <div class=\"section-header\">\n <div class=\"section-description\">\n Review execution history, requests, and performance metrics for this agent.\n </div>\n </div>\n \n @if (executionHistoryCount === 0) {\n <div class=\"empty-state\">\n <i class=\"fa-solid fa-history\"></i>\n <h4>No Execution History</h4>\n <p>This agent hasn't been executed yet. Use the Test Agent button to run the agent and see execution history here.</p>\n </div>\n } @else {\n <div class=\"timeline-list\">\n @for (execution of recentExecutions; track execution.ID) {\n <div class=\"timeline-item\" [class.expanded]=\"expandedExecutions[execution.ID]\">\n <div>\n <div class=\"timeline-marker\" [style.background-color]=\"getExecutionStatusColor(execution.Status)\">\n <i [class]=\"getExecutionStatusIcon(execution.Status)\"></i>\n </div>\n <div class=\"timeline-content\">\n <div class=\"timeline-header\" (click)=\"toggleExecutionExpanded(execution.ID)\">\n <div>\n <div class=\"timeline-title\">\n <i class=\"fa-solid fa-chevron-right expand-icon\" [class.expanded]=\"expandedExecutions[execution.ID]\"></i>\n Execution #{{ execution.ID.substring(0, 8) }}\n <span class=\"timeline-date\">{{ execution.__mj_CreatedAt | date:'MMM d, h:mm a' }}</span>\n </div>\n <div class=\"timeline-meta\">\n <span class=\"status-badge\" [style.background-color]=\"getExecutionStatusColor(execution.Status)\">\n {{ execution.Status || 'Unknown' }}\n </span>\n @if (execution.CompletedAt) {\n <span class=\"execution-time\">\n <i class=\"fa-solid fa-stopwatch\"></i>\n {{ formatExecutionTimeFromDates(execution.StartedAt, execution.CompletedAt) }}\n </span>\n }\n <div class=\"timeline-actions\">\n <button class=\"btn-primary\" (click)=\"openExecutionRecord(execution.ID); $event.stopPropagation()\">\n <i class=\"fa-solid fa-external-link-alt\"></i>\n </button>\n </div>\n </div>\n @if (execution.Result && !expandedExecutions[execution.ID]) {\n <div class=\"timeline-preview\">{{ getExecutionResultPreview(execution, true) }}</div>\n }\n </div>\n </div>\n @if (expandedExecutions[execution.ID]) {\n <div class=\"timeline-expanded-content\">\n @if (execution.Result) {\n <div class=\"result-section\">\n <h5>Result</h5>\n <mj-code-editor \n [value]=\"getExecutionResultPreview(execution, false)\"\n [readonly]=\"true\"\n language=\"json\"\n [lineWrapping]=\"true\"\n style=\"max-height: 200px; width: 100%;\">\n </mj-code-editor>\n </div>\n }\n @if (execution.ErrorMessage) {\n <div class=\"error-section\">\n <h5><i class=\"fa-solid fa-exclamation-triangle\"></i> Error</h5>\n <div class=\"error-content\">{{ execution.ErrorMessage }}</div>\n </div>\n }\n <div class=\"execution-details\">\n <div class=\"detail-row\">\n <span class=\"detail-label\">Started:</span>\n <span class=\"detail-value\">{{ execution.StartedAt | date:'medium' }}</span>\n </div>\n @if (execution.CompletedAt) {\n <div class=\"detail-row\">\n <span class=\"detail-label\">Completed:</span>\n <span class=\"detail-value\">{{ execution.CompletedAt | date:'medium' }}</span>\n </div>\n }\n @if (execution.ConversationID) {\n <div class=\"detail-row\">\n <span class=\"detail-label\">Conversation:</span>\n <span class=\"detail-value\">{{ execution.ConversationID }}</span>\n </div>\n }\n </div>\n </div>\n }\n </div>\n </div>\n </div>\n }\n @if (executionHistoryCount > recentExecutions.length) {\n <div class=\"view-more-item\" (click)=\"navigateToEntity('AI Agent Runs', '')\">\n <span>View all {{ executionHistoryCount }} executions...</span>\n </div>\n }\n </div>\n }\n </div>\n </ng-template>\n </kendo-panelbar-item>\n }\n\n <!-- Prompts (Second Panel - With Model Selection) -->\n @if (record.ID) {\n <kendo-panelbar-item [expanded]=\"false\">\n <ng-template kendoPanelBarItemTitle>\n <i class=\"fa-solid fa-comments\"></i> Prompts{{ promptCount > 0 ? ' (' + promptCount + ')' : '' }}\n </ng-template>\n <ng-template kendoPanelBarContent>\n <div class=\"panel-content\">\n <div class=\"section-header\">\n <div class=\"prompt-controls\">\n <!-- Model Selection Mode Control -->\n <div class=\"model-selection-mode\">\n <label class=\"model-selection-label\">\n <i class=\"fa-solid fa-sliders\"></i>\n Model Selection:\n </label>\n @if (EditMode) {\n <kendo-dropdownlist\n [(ngModel)]=\"record.ModelSelectionMode\"\n name=\"modelSelectionMode\"\n [data]=\"modelSelectionModes\"\n textField=\"text\"\n valueField=\"value\"\n [valuePrimitive]=\"true\"\n class=\"model-selection-dropdown\">\n </kendo-dropdownlist>\n } @else {\n <span class=\"model-selection-value\">{{ record.ModelSelectionMode || 'Agent Type' }}</span>\n }\n </div>\n </div>\n <div class=\"header-actions\">\n @if (EditMode) {\n <button kendoButton themeColor=\"primary\" size=\"small\" (click)=\"addPrompt()\">\n <i class=\"fa-solid fa-plus\"></i> Add Prompt\n </button>\n }\n </div>\n </div>\n \n @if (promptCount === 0) {\n <div class=\"empty-state\">\n <i class=\"fa-solid fa-comments\"></i>\n <h4>No Prompts Configured</h4>\n <p>Add prompts to define how this agent processes requests and generates responses.</p>\n @if (EditMode) {\n <button kendoButton themeColor=\"primary\" (click)=\"addPrompt()\">\n <i class=\"fa-solid fa-plus\"></i> Create First Prompt\n </button>\n }\n </div>\n } @else {\n <div class=\"entity-list\">\n @for (prompt of agentPrompts; track prompt.ID) {\n <div class=\"entity-item prompt-item\" (click)=\"navigateToEntity('AI Prompts', prompt.ID)\">\n <div class=\"item-icon\">\n <i class=\"fa-solid fa-comment-dots\"></i>\n </div>\n <div class=\"item-content\">\n <div class=\"item-title\">{{ prompt.Name }}</div>\n @if (prompt.TemplateText) {\n <div class=\"item-preview\">{{ prompt.TemplateText.substring(0, 120) }}{{ prompt.TemplateText.length > 120 ? '...' : '' }}</div>\n }\n <div class=\"item-meta\">\n @if (prompt.PromptRole) {\n <span class=\"meta-tag\">{{ prompt.PromptRole }}</span>\n }\n </div>\n </div>\n <div class=\"item-actions\">\n @if (EditMode) {\n <button kendoButton\n fillMode=\"flat\" \n themeColor=\"error\" \n size=\"small\"\n (click)=\"removePrompt(prompt, $event)\"\n title=\"Remove prompt\">\n <i class=\"fa-solid fa-trash\"></i>\n </button>\n }\n <i class=\"fa-solid fa-external-link\"></i>\n </div>\n </div>\n }\n @if (promptCount > agentPrompts.length) {\n <div class=\"view-more-item\" (click)=\"navigateToEntity('AI Prompts', '')\">\n <span>View all {{ promptCount }} prompts...</span>\n </div>\n }\n </div>\n }\n </div>\n </ng-template>\n </kendo-panelbar-item>\n }\n\n <!-- Payload (Third Panel) -->\n <kendo-panelbar-item [expanded]=\"false\">\n <ng-template kendoPanelBarItemTitle>\n <i class=\"fa-solid fa-box\"></i> Payload\n </ng-template>\n <ng-template kendoPanelBarContent>\n <div class=\"panel-content\">\n <div class=\"section-header\">\n <div class=\"section-description\">\n Configure how this agent handles data payloads and validation.\n </div>\n </div>\n \n <!-- Configuration Fields -->\n <div class=\"payload-config-section\">\n <h4 class=\"subsection-title\">\n <i class=\"fa-solid fa-cog\"></i> Configuration\n </h4>\n <div class=\"payload-config-grid\">\n <!-- Payload Scope -->\n <mj-form-field \n FieldName=\"PayloadScope\" \n Type=\"textbox\"\n Caption=\"Payload Scope\"\n Description=\"Path to narrow payload (e.g., /functionalRequirements)\"\n [EditMode]=\"EditMode\"\n [record]=\"record\">\n </mj-form-field>\n\n <!-- Final Payload Validation Mode -->\n <mj-form-field \n FieldName=\"FinalPayloadValidationMode\" \n Type=\"dropdownlist\"\n Caption=\"Validation Mode\"\n Description=\"Action on validation failure\"\n [EditMode]=\"EditMode\"\n [record]=\"record\">\n </mj-form-field>\n\n <!-- Final Payload Validation Max Retries -->\n <mj-form-field \n FieldName=\"FinalPayloadValidationMaxRetries\" \n Type=\"numerictextbox\"\n Caption=\"Max Retries\"\n Description=\"Maximum validation retry attempts\"\n [EditMode]=\"EditMode\"\n [record]=\"record\">\n </mj-form-field>\n </div>\n </div>\n\n <!-- Path Configuration -->\n <div class=\"payload-paths-section\">\n <h4 class=\"subsection-title\">\n <i class=\"fa-solid fa-route\"></i> Path Configuration\n </h4>\n \n <!-- Downstream Paths -->\n <div class=\"payload-field-group\">\n <label class=\"payload-field-label\">\n <i class=\"fa-solid fa-arrow-down\"></i> Downstream Paths\n <span class=\"field-description\">JSON array of paths to pass to sub-agents</span>\n </label>\n <mj-code-editor \n [value]=\"record.PayloadDownstreamPaths || '[]'\"\n [readonly]=\"!EditMode\"\n language=\"json\"\n [lineWrapping]=\"true\"\n style=\"height: 120px; width: 100%;\"\n (valueChange)=\"updatePayloadField('PayloadDownstreamPaths', $event)\">\n </mj-code-editor>\n </div>\n\n <!-- Upstream Paths -->\n <div class=\"payload-field-group\">\n <label class=\"payload-field-label\">\n <i class=\"fa-solid fa-arrow-up\"></i> Upstream Paths\n <span class=\"field-description\">JSON array of paths to return to parent agent</span>\n </label>\n <mj-code-editor \n [value]=\"record.PayloadUpstreamPaths || '[]'\"\n [readonly]=\"!EditMode\"\n language=\"json\"\n [lineWrapping]=\"true\"\n style=\"height: 120px; width: 100%;\"\n (valueChange)=\"updatePayloadField('PayloadUpstreamPaths', $event)\">\n </mj-code-editor>\n </div>\n\n <!-- Self Read Paths -->\n <div class=\"payload-field-group\">\n <label class=\"payload-field-label\">\n <i class=\"fa-solid fa-eye\"></i> Self Read Paths\n <span class=\"field-description\">JSON array of paths this agent can read</span>\n </label>\n <mj-code-editor \n [value]=\"record.PayloadSelfReadPaths || '[]'\"\n [readonly]=\"!EditMode\"\n language=\"json\"\n [lineWrapping]=\"true\"\n style=\"height: 120px; width: 100%;\"\n (valueChange)=\"updatePayloadField('PayloadSelfReadPaths', $event)\">\n </mj-code-editor>\n </div>\n\n <!-- Self Write Paths -->\n <div class=\"payload-field-group\">\n <label class=\"payload-field-label\">\n <i class=\"fa-solid fa-pen\"></i> Self Write Paths\n <span class=\"field-description\">JSON array of paths this agent can write to</span>\n </label>\n <mj-code-editor \n [value]=\"record.PayloadSelfWritePaths || '[]'\"\n [readonly]=\"!EditMode\"\n language=\"json\"\n [lineWrapping]=\"true\"\n style=\"height: 120px; width: 100%;\"\n (valueChange)=\"updatePayloadField('PayloadSelfWritePaths', $event)\">\n </mj-code-editor>\n </div>\n </div>\n\n <!-- Validation Rules -->\n <div class=\"payload-validation-section\">\n <h4 class=\"subsection-title\">\n <i class=\"fa-solid fa-shield-check\"></i> Final Payload Validation\n </h4>\n <div class=\"payload-field-group\">\n <label class=\"payload-field-label\">\n <span class=\"field-description\">JSON validation rules or schema for final payload validation</span>\n </label>\n <mj-code-editor \n [value]=\"record.FinalPayloadValidation || '{}'\"\n [readonly]=\"!EditMode\"\n language=\"json\"\n [lineWrapping]=\"true\"\n style=\"height: 200px; width: 100%;\"\n (valueChange)=\"updatePayloadField('FinalPayloadValidation', $event)\">\n </mj-code-editor>\n </div>\n </div>\n </div>\n </ng-template>\n </kendo-panelbar-item>\n\n <!-- Actions (Fourth Panel) -->\n @if (record.ID) {\n <kendo-panelbar-item [expanded]=\"false\">\n <ng-template kendoPanelBarItemTitle>\n <i class=\"fa-solid fa-bolt\"></i> Actions{{ actionCount > 0 ? ' (' + actionCount + ')' : '' }}\n </ng-template>\n <ng-template kendoPanelBarContent>\n <div class=\"panel-content\">\n <div class=\"section-header\">\n <div class=\"header-actions\">\n @if (EditMode) {\n <button kendoButton themeColor=\"primary\" size=\"small\" (click)=\"configureActions()\">\n <i class=\"fa-solid fa-plus\"></i> Add Action\n </button>\n }\n </div>\n </div>\n \n @if (actionCount === 0) {\n <div class=\"empty-state\">\n <i class=\"fa-solid fa-bolt\"></i>\n <h4>No Actions Configured</h4>\n <p>Add actions to enable this agent to perform specific tasks and operations.</p>\n @if (EditMode) {\n <button kendoButton themeColor=\"primary\" (click)=\"configureActions()\">\n <i class=\"fa-solid fa-plus\"></i> Configure First Action\n </button>\n }\n </div>\n } @else {\n <div class=\"entity-list\">\n @for (action of agentActions; track action.ID) {\n <div class=\"entity-item action-item\" (click)=\"navigateToEntity('Actions', action.ID)\">\n <div class=\"item-icon\">\n <i [class]=\"getActionIcon(action)\"></i>\n </div>\n <div class=\"item-content\">\n <div class=\"item-title\">{{ action.Name || 'Untitled Action' }}</div>\n @if (action.Description) {\n <div class=\"item-preview\">{{ action.Description }}</div>\n }\n <div class=\"item-meta\">\n @if (action.Type) {\n <span class=\"meta-tag\">{{ action.Type }}</span>\n }\n <span class=\"status-tag\" [class.active]=\"action.Status==='Active'\" [class.inactive]=\"action.Status!=='Active'\">\n <i class=\"fa-solid\" [class.fa-check-circle]=\"action.Status==='Active'\" [class.fa-times-circle]=\"action.Status!=='Active'\"></i>\n {{ action.Status }}\n </span>\n </div>\n </div>\n <div class=\"item-actions\">\n @if (EditMode) {\n <button kendoButton\n fillMode=\"flat\" \n themeColor=\"error\" \n size=\"small\"\n (click)=\"removeAction(action, $event)\"\n title=\"Remove action\">\n <i class=\"fa-solid fa-trash\"></i>\n </button>\n }\n <i class=\"fa-solid fa-external-link\"></i>\n </div>\n </div>\n }\n @if (actionCount > agentActions.length) {\n <div class=\"view-more-item\" (click)=\"navigateToEntity('AI Agent Actions', '')\">\n <span>View all {{ actionCount }} actions...</span>\n </div>\n }\n </div>\n }\n </div>\n </ng-template>\n </kendo-panelbar-item>\n }\n\n <!-- Sub-Agents (Fifth Panel) -->\n @if (record.ID) {\n <kendo-panelbar-item [expanded]=\"false\">\n <ng-template kendoPanelBarItemTitle>\n <i class=\"fa-solid fa-sitemap\"></i> Sub-Agents{{ subAgentCount > 0 ? ' (' + subAgentCount + ')' : '' }}\n </ng-template>\n <ng-template kendoPanelBarContent>\n <div class=\"panel-content\">\n <div class=\"section-header\">\n <div class=\"section-description\">\n Manage hierarchical relationships with child agents that work under this agent.\n </div>\n <div class=\"header-actions\">\n @if (EditMode) {\n <button kendoButton themeColor=\"primary\" size=\"small\" (click)=\"createSubAgent()\">\n <i class=\"fa-solid fa-plus\"></i> Add Sub-Agent\n </button>\n }\n </div>\n </div>\n \n @if (subAgentCount === 0) {\n <div class=\"empty-state\">\n <i class=\"fa-solid fa-sitemap\"></i>\n <h4>No Sub-Agents</h4>\n <p>Create sub-agents to build a hierarchical structure for complex workflows.</p>\n @if (EditMode) {\n <button kendoButton themeColor=\"primary\" (click)=\"createSubAgent()\">\n <i class=\"fa-solid fa-plus\"></i> Create First Sub-Agent\n </button>\n }\n </div>\n } @else {\n <div class=\"entity-list\">\n @for (subAgent of subAgents; track subAgent.ID) {\n <div class=\"entity-item sub-agent-item\" (click)=\"navigateToEntity('AI Agents', subAgent.ID)\">\n <div class=\"item-icon\">\n @if (hasSubAgentLogoURL(subAgent)) {\n <img [src]=\"subAgent.LogoURL\" [alt]=\"subAgent.Name + ' logo'\" class=\"sub-agent-logo\">\n } @else {\n <i [class]=\"getSubAgentIcon(subAgent)\"></i>\n }\n </div>\n <div class=\"item-content\">\n <div class=\"item-title\">{{ subAgent.Name || 'Untitled Sub-Agent' }}</div>\n @if (subAgent.Description) {\n <div class=\"item-preview\">{{ subAgent.Description }}</div>\n }\n <div class=\"item-meta\">\n @if (subAgent.Status) {\n <span class=\"status-tag\" [style.background-color]=\"getStatusBadgeColor()\">\n {{ subAgent.Status }}\n </span>\n }\n @if (subAgent.ExecutionMode) {\n <span class=\"meta-tag\">{{ subAgent.ExecutionMode }}</span>\n }\n </div>\n </div>\n <div class=\"item-actions\">\n <i class=\"fa-solid fa-external-link\"></i>\n </div>\n </div>\n }\n @if (subAgentCount > subAgents.length) {\n <div class=\"view-more-item\" (click)=\"navigateToEntity('AI Agents', '')\">\n <span>View all {{ subAgentCount }} sub-agents...</span>\n </div>\n }\n </div>\n }\n </div>\n </ng-template>\n </kendo-panelbar-item>\n }\n\n <!-- Execution Guardrails (New Separate Panel) -->\n <kendo-panelbar-item [expanded]=\"false\">\n <ng-template kendoPanelBarItemTitle>\n <i class=\"fa-solid fa-shield-halved\"></i> Execution Guardrails\n </ng-template>\n <ng-template kendoPanelBarContent>\n <div class=\"panel-content\">\n <div class=\"section-header\">\n <div class=\"section-description\">\n Set limits to prevent runaway agent executions and control resource usage.\n </div>\n </div>\n \n <div class=\"form-fields-grid\">\n <mj-form-field \n FieldName=\"MaxCostPerRun\" \n Type=\"numerictextbox\"\n Caption=\"Max Cost ($)\"\n Description=\"Maximum cost per run\"\n [EditMode]=\"EditMode\"\n [record]=\"record\">\n </mj-form-field>\n\n <mj-form-field \n FieldName=\"MaxTokensPerRun\" \n Type=\"numerictextbox\"\n Caption=\"Max Tokens\"\n Description=\"Maximum tokens per run\"\n [EditMode]=\"EditMode\"\n [record]=\"record\">\n </mj-form-field>\n\n <mj-form-field \n FieldName=\"MaxIterationsPerRun\" \n Type=\"numerictextbox\"\n Caption=\"Max Iterations\"\n Description=\"Maximum prompt iterations\"\n [EditMode]=\"EditMode\"\n [record]=\"record\">\n </mj-form-field>\n\n <mj-form-field \n FieldName=\"MaxTimePerRun\" \n Type=\"numerictextbox\"\n Caption=\"Max Time (seconds)\"\n Description=\"Maximum execution time\"\n [EditMode]=\"EditMode\"\n [record]=\"record\">\n </mj-form-field>\n </div>\n </div>\n </ng-template>\n </kendo-panelbar-item>\n\n <!-- Configuration (Settings Panel) -->\n <kendo-panelbar-item [expanded]=\"false\">\n <ng-template kendoPanelBarItemTitle>\n <i class=\"fa-solid fa-cog\"></i> Configuration\n </ng-template>\n <ng-template kendoPanelBarContent>\n <div class=\"panel-content\">\n <div class=\"section-header\">\n <div class=\"section-description\">\n Advanced configuration settings for agent behavior and execution.\n </div>\n </div>\n \n <div class=\"form-fields-grid\">\n <!-- Core Settings -->\n <mj-form-field \n FieldName=\"Status\" \n Type=\"dropdownlist\"\n Caption=\"Status\"\n Description=\"Agent availability status\"\n [EditMode]=\"EditMode\"\n [record]=\"record\">\n </mj-form-field>\n\n <mj-form-field \n FieldName=\"ExecutionMode\" \n Type=\"dropdownlist\"\n Caption=\"Execution Mode\"\n Description=\"How sub-agents are executed\"\n [EditMode]=\"EditMode\"\n [record]=\"record\">\n </mj-form-field>\n\n <mj-form-field \n FieldName=\"ExecutionOrder\" \n Type=\"numerictextbox\"\n Caption=\"Execution Order\"\n Description=\"Order when run with siblings\"\n [EditMode]=\"EditMode\"\n [record]=\"record\">\n </mj-form-field>\n\n <mj-form-field \n FieldName=\"ExposeAsAction\" \n Type=\"checkbox\"\n Caption=\"Expose as Action\"\n Description=\"Make available as an action\"\n [EditMode]=\"EditMode\"\n [record]=\"record\">\n </mj-form-field>\n\n <mj-form-field \n FieldName=\"TypeID\" \n Type=\"dropdownlist\"\n Caption=\"Agent Type\"\n Description=\"Category of this agent\"\n [EditMode]=\"EditMode\"\n [record]=\"record\"\n LinkType=\"Record\"\n LinkEntityName=\"AI Agent Types\">\n </mj-form-field>\n\n <mj-form-field \n FieldName=\"DriverClass\" \n Type=\"textbox\"\n Caption=\"Driver Class\"\n Description=\"Custom implementation class\"\n [EditMode]=\"EditMode\"\n [record]=\"record\">\n </mj-form-field>\n\n <mj-form-field \n FieldName=\"IconClass\" \n Type=\"textbox\"\n Caption=\"Icon Class\"\n Description=\"Font Awesome icon class\"\n [EditMode]=\"EditMode\"\n [record]=\"record\">\n </mj-form-field>\n\n <mj-form-field \n FieldName=\"Description\" \n Type=\"textarea\"\n Caption=\"Description\"\n Description=\"Detailed agent description\"\n [EditMode]=\"EditMode\"\n [record]=\"record\"\n style=\"grid-column: span 2;\">\n </mj-form-field>\n\n <mj-form-field \n FieldName=\"LogoURL\" \n Type=\"textbox\"\n Caption=\"Logo URL\"\n Description=\"URL for agent logo image\"\n [EditMode]=\"EditMode\"\n [record]=\"record\"\n style=\"grid-column: span 2;\">\n </mj-form-field>\n </div>\n\n <!-- Context Compression Settings -->\n <div class=\"subsection-divider\">\n <h4 class=\"subsection-title\">\n <i class=\"fa-solid fa-compress\"></i> Context Compression\n </h4>\n </div>\n\n <div class=\"form-fields-grid\">\n <mj-form-field \n FieldName=\"EnableContextCompression\" \n Type=\"checkbox\"\n Caption=\"Enable Compression\"\n Description=\"Compress long conversations\"\n [EditMode]=\"EditMode\"\n [record]=\"record\">\n </mj-form-field>\n\n <mj-form-field \n FieldName=\"ContextCompressionMessageThreshold\" \n Type=\"numerictextbox\"\n Caption=\"Message Threshold\"\n Description=\"Messages before compression\"\n [EditMode]=\"EditMode\"\n [record]=\"record\">\n </mj-form-field>\n\n <mj-form-field \n FieldName=\"ContextCompressionMessageRetentionCount\" \n Type=\"numerictextbox\"\n Caption=\"Messages to Keep\"\n Description=\"Recent messages to retain\"\n [EditMode]=\"EditMode\"\n [record]=\"record\">\n </mj-form-field>\n\n <mj-form-field \n FieldName=\"ContextCompressionPromptID\" \n Type=\"dropdownlist\"\n Caption=\"Compression Prompt\"\n Description=\"Prompt for summarization\"\n [EditMode]=\"EditMode\"\n [record]=\"record\"\n LinkType=\"Record\"\n LinkEntityName=\"AI Prompts\">\n </mj-form-field>\n </div>\n </div>\n </ng-template>\n </kendo-panelbar-item>\n\n <!-- Notes (Seventh Panel) -->\n @if (record.ID) {\n <kendo-panelbar-item [expanded]=\"false\">\n <ng-template kendoPanelBarItemTitle>\n <i class=\"fa-solid fa-sticky-note\"></i> Notes{{ noteCount > 0 ? ' (' + noteCount + ')' : '' }}\n </ng-template>\n <ng-template kendoPanelBarContent>\n <div class=\"panel-content\">\n <div class=\"section-header\">\n <div class=\"section-description\">\n Manage notes, documentation, and annotations for this agent.\n </div>\n <div class=\"header-actions\">\n @if (EditMode) {\n <button kendoButton themeColor=\"primary\" size=\"small\" (click)=\"addNote()\">\n <i class=\"fa-solid fa-plus\"></i> Add Note\n </button>\n }\n </div>\n </div>\n \n @if (noteCount === 0) {\n <div class=\"empty-state\">\n <i class=\"fa-solid fa-sticky-note\"></i>\n <h4>No Notes</h4>\n <p>Add notes to document important information, observations, or instructions for this agent.</p>\n @if (EditMode) {\n <button kendoButton themeColor=\"primary\" (click)=\"addNote()\">\n <i class=\"fa-solid fa-plus\"></i> Create First Note\n </button>\n }\n </div>\n } @else {\n <div class=\"entity-list\">\n @for (note of agentNotes; track note.ID) {\n <div class=\"entity-item note-item\" (click)=\"navigateToEntity('AI Agent Notes', note.ID)\">\n <div class=\"item-icon\">\n <i class=\"fa-solid fa-sticky-note\"></i>\n </div>\n <div class=\"item-content\">\n <div class=\"item-title\">{{ note.Type || 'Note' }}</div>\n @if (note.Note) {\n <div class=\"item-preview\">{{ note.Note.substring(0, 100) }}{{ note.Note.length > 100 ? '...' : '' }}</div>\n }\n <div class=\"item-meta\">\n @if (note.__mj_CreatedAt) {\n <span class=\"meta-tag\">\n <i class=\"fa-solid fa-calendar\"></i>\n {{ note.__mj_CreatedAt | date:'short' }}\n </span>\n }\n </div>\n </div>\n <div class=\"item-actions\">\n <i class=\"fa-solid fa-external-link\"></i>\n </div>\n </div>\n }\n @if (noteCount > agentNotes.length) {\n <div class=\"view-more-item\" (click)=\"navigateToEntity('AI Agent Notes', '')\">\n <span>View all {{ noteCount }} notes...</span>\n </div>\n }\n </div>\n }\n </div>\n </ng-template>\n </kendo-panelbar-item>\n }\n\n <!-- Learning Cycles (Eighth Panel) -->\n @if (record.ID) {\n <kendo-panelbar-item [expanded]=\"false\">\n <ng-template kendoPanelBarItemTitle>\n <i class=\"fa-solid fa-brain\"></i> Learning Cycles{{ learningCycleCount > 0 ? ' (' + learningCycleCount + ')' : '' }}\n </ng-template>\n <ng-template kendoPanelBarContent>\n <div class=\"panel-content\">\n <div class=\"section-header\">\n <div class=\"section-description\">\n Monitor and manage learning cycles, training sessions, and performance analytics.\n </div>\n </div>\n \n @if (learningCycleCount === 0) {\n <div class=\"empty-state\">\n <i class=\"fa-solid fa-brain\"></i>\n <h4>No Learning Cycles</h4>\n <p>Learning cycles will appear here as the agent processes requests and improves over time.</p>\n </div>\n } @else {\n <div class=\"entity-list\">\n @for (cycle of learningCycles; track cycle.ID) {\n <div class=\"entity-item learning-item\" (click)=\"navigateToEntity('AI Agent Learning Cycles', cycle.ID)\">\n <div class=\"item-icon\">\n <i class=\"fa-solid fa-brain\"></i>\n </div>\n <div class=\"item-content\">\n <div class=\"item-title\">Learning Cycle {{ cycle.ID.substring(0, 8) }}</div>\n <div class=\"item-meta\">\n @if (cycle.StartedAt) {\n <span class=\"meta-tag\">\n <i class=\"fa-solid fa-calendar\"></i>\n {{ cycle.StartedAt | date:'short' }}\n </span>\n }\n @if (cycle.Status) {\n <span class=\"status-tag\">{{ cycle.Status }}</span>\n }\n </div>\n </div>\n <div class=\"item-actions\">\n <i class=\"fa-solid fa-external-link\"></i>\n </div>\n </div>\n }\n @if (learningCycleCount > learningCycles.length) {\n <div class=\"view-more-item\" (click)=\"navigateToEntity('AI Agent Learning Cycles', '')\">\n <span>View all {{ learningCycleCount }} cycles...</span>\n </div>\n }\n </div>\n }\n </div>\n </ng-template>\n </kendo-panelbar-item>\n }\n\n\n </kendo-panelbar>\n </div>\n </form>\n\n</div>", styles: ["/* AI Agent Form - Modern Redesign */\n.record-form-container {\n height: 100%;\n display: flex;\n flex-direction: column;\n background: #f5f7fa;\n}\n\n.record-form {\n height: 100%;\n display: flex;\n flex-direction: column;\n}\n\n/* Agent Header Section - Compact Design */\n.agent-header {\n background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);\n border-bottom: 1px solid #e0e6ed;\n padding: 12px 20px;\n box-shadow: 0 2px 4px rgba(0,0,0,0.04);\n}\n\n.agent-header-content {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 20px;\n}\n\n.agent-overview {\n display: flex;\n align-items: center;\n gap: 16px;\n flex: 1;\n min-width: 0;\n}\n\n.agent-icon-wrapper {\n width: 48px;\n height: 48px;\n background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);\n border-radius: 12px;\n display: flex;\n align-items: center;\n justify-content: center;\n box-shadow: 0 4px 12px rgba(33, 150, 243, 0.2);\n flex-shrink: 0;\n}\n\n.agent-icon-wrapper i {\n color: white;\n font-size: 24px;\n}\n\n.agent-icon-wrapper img.agent-logo {\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: 8px;\n}\n\n.agent-info {\n flex: 1;\n min-width: 0;\n}\n\n.agent-name {\n font-size: 22px;\n font-weight: 600;\n color: #2c3e50;\n margin: 0 0 8px 0;\n line-height: 1.2;\n}\n\n.agent-name-input {\n font-size: 18px !important;\n font-weight: 500 !important;\n height: 36px !important;\n width: 100% !important;\n max-width: 400px !important;\n}\n\n.agent-meta {\n display: flex;\n align-items: center;\n gap: 16px;\n flex-wrap: wrap;\n}\n\n.status-badge {\n padding: 6px 16px;\n border-radius: 20px;\n font-size: 13px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n display: inline-flex;\n align-items: center;\n gap: 6px;\n}\n\n.status-badge.active {\n background: #28a745;\n color: white;\n}\n\n.status-badge.pending {\n background: #ffc107;\n color: #212529;\n}\n\n.status-badge.disabled {\n background: #6c757d;\n color: white;\n}\n\n.execution-mode,\n.parent-agent {\n display: flex;\n align-items: center;\n gap: 6px;\n font-size: 13px;\n color: #6c757d;\n background: #f8f9fa;\n padding: 4px 10px;\n border-radius: 12px;\n}\n\n.execution-mode i,\n.parent-agent i {\n font-size: 12px;\n opacity: 0.8;\n}\n\n/* Prompt Controls Section */\n.prompt-controls {\n flex: 1;\n margin-right: 16px;\n}\n\n/* Model Selection Mode */\n.model-selection-mode {\n display: inline-flex;\n align-items: center;\n gap: 12px;\n padding: 8px 16px;\n background: #f0f7ff;\n border: 1px solid #cce5ff;\n border-radius: 8px;\n}\n\n.model-selection-label {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 13px;\n font-weight: 600;\n color: #0066cc;\n margin: 0;\n}\n\n.model-selection-label i {\n font-size: 14px;\n}\n\n.model-selection-dropdown {\n min-width: 140px;\n height: 32px;\n}\n\n.model-selection-value {\n font-size: 13px;\n font-weight: 500;\n color: #495057;\n padding: 4px 12px;\n background: white;\n border-radius: 6px;\n border: 1px solid #dee2e6;\n}\n\n.agent-meta-info {\n display: flex;\n gap: 24px;\n margin-top: 12px;\n flex-wrap: wrap;\n}\n\n.meta-item {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.meta-label {\n font-size: 12px;\n font-weight: 600;\n color: #6c757d;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n.meta-value {\n font-size: 14px;\n color: #495057;\n font-weight: 500;\n}\n\n.agent-description {\n margin-top: 16px;\n color: #6c757d;\n line-height: 1.6;\n font-size: 15px;\n}\n\n.agent-description-input {\n width: 100%;\n max-width: 600px;\n min-height: 80px;\n resize: vertical;\n}\n\n/* Action Buttons Section */\n.agent-actions {\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\n.action-buttons-row {\n display: flex;\n gap: 12px;\n flex-wrap: wrap;\n}\n\n.action-button {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 10px 20px;\n border-radius: 8px;\n font-weight: 500;\n font-size: 14px;\n transition: all 0.2s ease;\n box-shadow: 0 2px 4px rgba(0,0,0,0.08);\n}\n\n.action-button:hover {\n transform: translateY(-1px);\n box-shadow: 0 4px 8px rgba(0,0,0,0.12);\n}\n\n.action-button.primary {\n background: #2196f3;\n color: white;\n}\n\n.action-button.primary:hover {\n background: #1976d2;\n}\n\n.action-button.secondary {\n background: #6c757d;\n color: white;\n}\n\n.action-button.secondary:hover {\n background: #5a6268;\n}\n\n.action-warnings {\n margin-top: 8px;\n font-size: 13px;\n color: #dc3545;\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n/* Panel-Based Form Content */\n.form-content {\n flex: 1;\n display: flex;\n flex-direction: column;\n overflow-y: auto;\n overflow-x: hidden;\n background: #f5f7fa;\n padding: 12px;\n}\n\n/* Kendo PanelBar Styling */\n::ng-deep .k-panelbar {\n border: none;\n background: transparent;\n}\n\n::ng-deep .k-panelbar > .k-panelbar-item {\n border: none;\n border-radius: 12px;\n margin-bottom: 12px;\n box-shadow: 0 2px 8px rgba(0,0,0,0.06);\n background: white;\n overflow: hidden;\n}\n\n::ng-deep .k-panelbar > .k-panelbar-item > .k-header {\n background: white;\n border: none;\n padding: 16px 20px;\n border-radius: 12px 12px 0 0;\n color: #2c3e50;\n font-weight: 600;\n font-size: 16px;\n transition: all 0.2s ease;\n display: flex;\n align-items: center;\n gap: 12px;\n}\n\n::ng-deep .k-panelbar > .k-panelbar-item > .k-header:hover {\n background: #f8f9fa;\n}\n\n::ng-deep .k-panelbar > .k-panelbar-item.k-panelbar-expanded > .k-header {\n background: #2196f3;\n color: white;\n border-radius: 12px 12px 0 0;\n}\n\n::ng-deep .k-panelbar > .k-panelbar-item > .k-header .k-panelbar-toggle {\n position: absolute;\n right: 24px;\n color: inherit;\n font-size: 14px;\n transition: transform 0.2s ease;\n}\n\n::ng-deep .k-panelbar > .k-panelbar-item.k-panelbar-expanded > .k-header .k-panelbar-toggle {\n transform: rotate(180deg);\n}\n\n::ng-deep .k-panelbar > .k-panelbar-item > .k-header .k-panelbar-toggle::before {\n content: '\\f107';\n font-family: 'Font Awesome 6 Free';\n font-weight: 900;\n}\n\n::ng-deep .k-panelbar > .k-panelbar-item > .k-content {\n padding: 0;\n border: none;\n background: white;\n border-radius: 0 0 12px 12px;\n}\n\n::ng-deep .k-panelbar .k-header .k-panelbar-icon {\n font-size: 18px;\n color: #2196f3;\n margin-right: 8px;\n}\n\n::ng-deep .k-panelbar .k-panelbar-expanded .k-header .k-panelbar-icon {\n color: white;\n}\n\n/* Panel Content */\n.panel-content {\n padding: 16px;\n background: white;\n}\n\n.section-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 20px;\n gap: 16px;\n flex-wrap: wrap;\n}\n\n.section-description {\n color: #6c757d;\n font-size: 14px;\n line-height: 1.6;\n margin-bottom: 16px;\n}\n\n.header-actions {\n display: flex;\n gap: 8px;\n align-items: center;\n flex-shrink: 0;\n}\n\n.tab-section {\n background: white;\n border-radius: 12px;\n padding: 24px;\n margin-bottom: 24px;\n box-shadow: 0 2px 8px rgba(0,0,0,0.04);\n border: 1px solid #e0e6ed;\n}\n\n.section-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 20px;\n padding-bottom: 16px;\n border-bottom: 2px solid #f0f4f8;\n}\n\n.section-title {\n display: flex;\n align-items: center;\n gap: 12px;\n margin: 0;\n color: #2c3e50;\n font-size: 18px;\n font-weight: 600;\n}\n\n.section-title i {\n color: #2196f3;\n font-size: 20px;\n}\n\n.section-description {\n color: #6c757d;\n font-size: 14px;\n line-height: 1.6;\n margin-top: 8px;\n}\n\n/* Form Fields Grid */\n.form-fields-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));\n gap: 20px;\n margin-top: 20px;\n}\n\n.form-field-group {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.form-field-label {\n font-size: 13px;\n font-weight: 600;\n color: #495057;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n/* Sub-grids styling (legacy) */\n.sub-grid-container {\n height: 500px;\n border: 1px solid #e0e6ed;\n border-radius: 8px;\n overflow: hidden;\n display: none; /* Hidden as we now use cards */\n}\n\n/* Empty States */\n.empty-state {\n text-align: center;\n padding: 60px 20px;\n color: #6c757d;\n}\n\n.empty-state i {\n font-size: 48px;\n color: #dee2e6;\n margin-bottom: 16px;\n}\n\n.empty-state h4 {\n color: #495057;\n font-weight: 600;\n margin-bottom: 8px;\n}\n\n.empty-state p {\n font-size: 15px;\n line-height: 1.6;\n max-width: 400px;\n margin: 0 auto;\n}\n\n/* Loading State */\n.loading-overlay {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(255, 255, 255, 0.9);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 1000;\n}\n\n.loading-spinner {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 16px;\n}\n\n.spinner-icon {\n width: 48px;\n height: 48px;\n border: 4px solid #f3f3f3;\n border-top: 4px solid #2196f3;\n border-radius: 50%;\n animation: spin 1s linear infinite;\n}\n\n@keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n}\n\n/* Quick Actions */\n.quick-actions {\n display: flex;\n gap: 16px;\n margin-top: 20px;\n padding-top: 20px;\n border-top: 1px solid #e0e6ed;\n}\n\n.quick-action-card {\n flex: 1;\n padding: 16px;\n background: #f8f9fa;\n border-radius: 8px;\n border: 1px solid #e0e6ed;\n cursor: pointer;\n transition: all 0.2s ease;\n text-align: center;\n}\n\n.quick-action-card:hover {\n background: white;\n box-shadow: 0 4px 12px rgba(0,0,0,0.08);\n transform: translateY(-2px);\n}\n\n.quick-action-icon {\n font-size: 32px;\n color: #2196f3;\n margin-bottom: 8px;\n}\n\n.quick-action-title {\n font-size: 14px;\n font-weight: 600;\n color: #495057;\n margin-bottom: 4px;\n}\n\n.quick-action-description {\n font-size: 12px;\n color: #6c757d;\n}\n\n/* Header Actions */\n.header-actions {\n display: flex;\n gap: 8px;\n align-items: center;\n}\n\n/* Entity List Interface */\n.entity-list {\n display: flex;\n flex-direction: column;\n gap: 12px;\n margin-top: 16px;\n}\n\n.entity-item {\n display: flex;\n align-items: center;\n gap: 16px;\n padding: 16px;\n background: #f8f9fa;\n border: 1px solid #e0e6ed;\n border-radius: 10px;\n cursor: pointer;\n transition: all 0.2s ease;\n}\n\n.entity-item:hover {\n background: white;\n border-color: #2196f3;\n box-shadow: 0 4px 12px rgba(0,0,0,0.08);\n transform: translateY(-1px);\n}\n\n.item-icon {\n width: 40px;\n height: 40px;\n background: linear-gradient(135deg, #e9ecef, #dee2e6);\n border-radius: 10px;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.prompt-item .item-icon {\n background: linear-gradient(135deg, #20c997, #17a673);\n}\n\n.action-item .item-icon {\n background: linear-gradient(135deg, #ffc107, #e0a800);\n}\n\n.sub-agent-item .item-icon {\n background: linear-gradient(135deg, #2196f3, #1976d2);\n}\n\n.model-item .item-icon {\n background: linear-gradient(135deg, #6f42c1, #563d7c);\n}\n\n.learning-item .item-icon {\n background: linear-gradient(135deg, #e83e8c, #dc3545);\n}\n\n.note-item .item-icon {\n background: linear-gradient(135deg, #fd7e14, #e55a00);\n}\n\n.item-icon i {\n color: #6c757d;\n font-size: 18px;\n}\n\n.prompt-item .item-icon i,\n.action-item .item-icon i,\n.sub-agent-item .item-icon i,\n.model-item .item-icon i,\n.learning-item .item-icon i,\n.note-item .item-icon i {\n color: white;\n}\n\n.item-icon img.sub-agent-logo {\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: 6px;\n}\n\n.item-content {\n flex: 1;\n min-width: 0;\n}\n\n.item-title {\n font-size: 16px;\n font-weight: 600;\n color: #2c3e50;\n margin: 0 0 4px 0;\n line-height: 1.3;\n}\n\n.item-preview {\n color: #6c757d;\n font-size: 14px;\n line-height: 1.4;\n margin: 4px 0 8px 0;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n}\n\n.item-meta {\n display: flex;\n gap: 12px;\n align-items: center;\n flex-wrap: wrap;\n}\n\n.meta-tag,\n.priority-tag,\n.status-tag {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 12px;\n padding: 3px 8px;\n border-radius: 6px;\n font-weight: 500;\n}\n\n.meta-tag {\n background: #e9ecef;\n color: #495057;\n}\n\n.priority-tag {\n color: white;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.3px;\n}\n\n.status-tag {\n background: #e9ecef;\n color: #495057;\n}\n\n.status-tag.active {\n background: #d4edda;\n color: #28a745;\n}\n\n.status-tag.inactive {\n background: #f8d7da;\n color: #dc3545;\n}\n\n.item-actions {\n opacity: 0;\n transition: opacity 0.2s ease;\n color: #6c757d;\n font-size: 16px;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.entity-item:hover .item-actions {\n opacity: 1;\n}\n\n.entity-item:hover .item-actions > i {\n color: #2196f3;\n}\n\n.view-more-item {\n padding: 16px;\n background: linear-gradient(135deg, #f8f9fa, #e9ecef);\n border: 2px dashed #dee2e6;\n border-radius: 10px;\n text-align: center;\n cursor: pointer;\n transition: all 0.2s ease;\n color: #6c757d;\n font-weight: 500;\n}\n\n.view-more-item:hover {\n background: linear-gradient(135deg, #e9ecef, #dee2e6);\n border-color: #2196f3;\n color: #2196f3;\n}\n\n/* Payload Section Styles */\n.payload-config-section,\n.payload-paths-section,\n.payload-validation-section {\n margin-bottom: 32px;\n}\n\n.subsection-title {\n font-size: 16px;\n font-weight: 600;\n color: #2c3e50;\n margin: 0 0 16px 0;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.subsection-title i {\n color: #2196f3;\n}\n\n.subsection-divider {\n margin-top: 32px;\n margin-bottom: 16px;\n padding-top: 24px;\n border-top: 1px solid #e0e6ed;\n}\n\n.payload-config-grid {\n display: grid;\n grid-template-columns: 1fr 1fr 1fr;\n gap: 16px;\n margin-bottom: 24px;\n}\n\n.payload-field-group {\n margin-bottom: 20px;\n}\n\n.payload-field-label {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 14px;\n font-weight: 600;\n color: #495057;\n margin-bottom: 8px;\n}\n\n.payload-field-label i {\n color: #6c757d;\n font-size: 16px;\n}\n\n.field-description {\n font-size: 12px;\n font-weight: normal;\n color: #6c757d;\n margin-left: auto;\n}\n\n/* Code editor styling */\n.payload-field-group mj-code-editor {\n border: 1px solid #dee2e6;\n border-radius: 8px;\n overflow: hidden;\n}\n\n.payload-field-group mj-code-editor:hover {\n border-color: #2196f3;\n}\n\n/* Payload textarea styling */\n.payload-field-group mj-form-field ::ng-deep textarea {\n font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;\n font-size: 13px;\n line-height: 1.5;\n min-height: 120px;\n resize: vertical;\n}\n\n/* Execution History Panel */\n.execution-history-panel {\n max-height: 500px;\n overflow-y: auto;\n overflow-x: hidden;\n}\n\n/* Timeline List for Execution History */\n.timeline-list {\n display: flex;\n flex-direction: column;\n gap: 16px;\n margin-top: 16px;\n}\n\n.timeline-item {\n display: flex;\n align-items: flex-start;\n gap: 16px;\n padding: 16px;\n background: #f8f9fa;\n border: 1px solid #e0e6ed;\n border-radius: 10px;\n cursor: pointer;\n transition: all 0.2s ease;\n}\n\n.timeline-item:hover {\n background: white;\n border-color: #2196f3;\n box-shadow: 0 4px 12px rgba(0,0,0,0.08);\n}\n\n.timeline-marker {\n width: 32px;\n height: 32px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n box-shadow: 0 2px 8px rgba(0,0,0,0.1);\n}\n\n.timeline-marker i {\n color: white;\n font-size: 14px;\n}\n\n.timeline-content {\n flex: 1;\n min-width: 0;\n}\n\n.timeline-title {\n font-size: 16px;\n font-weight: 600;\n color: #2c3e50;\n margin: 0 0 8px 0;\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n gap: 16px;\n}\n\n.timeline-date {\n font-size: 12px;\n color: #6c757d;\n background: #e9ecef;\n padding: 2px 8px;\n border-radius: 6px;\n white-space: nowrap;\n flex-shrink: 0;\n}\n\n.timeline-meta {\n display: flex;\n align-items: center;\n gap: 12px;\n margin-bottom: 8px;\n}\n\n.timeline-preview {\n color: #6c757d;\n font-size: 14px;\n line-height: 1.4;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n}\n\n/* Modern Card-Based Interface (Legacy - Keep for backward compatibility) */\n.cards-container {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));\n gap: 20px;\n margin-top: 16px;\n}\n\n.entity-card {\n background: white;\n border: 1px solid #e0e6ed;\n border-radius: 12px;\n padding: 20px;\n cursor: pointer;\n transition: all 0.3s ease;\n box-shadow: 0 2px 8px rgba(0,0,0,0.06);\n position: relative;\n overflow: hidden;\n}\n\n.entity-card:hover {\n transform: translateY(-4px);\n box-shadow: 0 8px 24px rgba(0,0,0,0.12);\n border-color: #2196f3;\n}\n\n.entity-card::before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n height: 4px;\n background: linear-gradient(90deg, #2196f3, #42a5f5);\n opacity: 0;\n transition: opacity 0.3s ease;\n}\n\n.entity-card:hover::before {\n opacity: 1;\n}\n\n.card-header {\n display: flex;\n align-items: flex-start;\n gap: 12px;\n margin-bottom: 12px;\n}\n\n.card-icon {\n width: 40px;\n height: 40px;\n background: linear-gradient(135deg, #f8f9fa, #e9ecef);\n border-radius: 10px;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.sub-agent-card .card-icon {\n background: linear-gradient(135deg, #2196f3, #1976d2);\n}\n\n.prompt-card .card-icon {\n background: linear-gradient(135deg, #20c997, #17a673);\n}\n\n.action-card .card-icon {\n background: linear-gradient(135deg, #ffc107, #e0a800);\n}\n\n.card-icon i {\n font-size: 18px;\n color: #6c757d;\n}\n\n.sub-agent-card .card-icon i,\n.prompt-card .card-icon i,\n.action-card .card-icon i {\n color: white;\n}\n\n.card-title-section {\n flex: 1;\n min-width: 0;\n}\n\n.card-title {\n font-size: 16px;\n font-weight: 600;\n color: #2c3e50;\n margin: 0 0 4px 0;\n line-height: 1.3;\n word-wrap: break-word;\n}\n\n.card-description {\n color: #6c757d;\n font-size: 14px;\n line-height: 1.5;\n margin: 8px 0;\n display: -webkit-box;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n overflow: hidden;\n}\n\n.card-meta {\n display: flex;\n gap: 16px;\n margin-top: 12px;\n flex-wrap: wrap;\n}\n\n.meta-item {\n display: flex;\n align-items: center;\n gap: 6px;\n font-size: 12px;\n color: #6c757d;\n padding: 4px 8px;\n background: #f8f9fa;\n border-radius: 6px;\n}\n\n.meta-item i {\n font-size: 11px;\n opacity: 0.8;\n}\n\n.meta-item.active {\n color: #28a745;\n background: #d4edda;\n}\n\n.meta-item.inactive {\n color: #dc3545;\n background: #f8d7da;\n}\n\n.card-actions {\n opacity: 0;\n transition: opacity 0.3s ease;\n color: #6c757d;\n}\n\n.entity-card:hover .card-actions {\n opacity: 1;\n color: #2196f3;\n}\n\n/* Badge Styles */\n.priority-badge {\n padding: 2px 8px;\n border-radius: 12px;\n font-size: 11px;\n font-weight: 600;\n color: white;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n.type-badge {\n padding: 2px 8px;\n border-radius: 6px;\n font-size: 11px;\n font-weight: 500;\n background: #e9ecef;\n color: #495057;\n text-transform: uppercase;\n letter-spacing: 0.3px;\n}\n\n/* View All Card */\n.view-all-card {\n background: linear-gradient(135deg, #f8f9fa, #e9ecef);\n border: 2px dashed #dee2e6;\n border-radius: 12px;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 120px;\n cursor: pointer;\n transition: all 0.3s ease;\n}\n\n.view-all-card:hover {\n background: linear-gradient(135deg, #e9ecef, #dee2e6);\n border-color: #2196f3;\n transform: translateY(-2px);\n}\n\n.view-all-content {\n text-align: center;\n color: #6c757d;\n font-weight: 500;\n}\n\n.view-all-content i {\n font-size: 24px;\n margin-bottom: 8px;\n display: block;\n}\n\n/* Timeline Interface for History */\n.timeline-container {\n position: relative;\n margin-top: 16px;\n}\n\n.timeline-item {\n display: flex;\n flex-direction: column;\n margin-bottom: 24px;\n transition: all 0.3s ease;\n border-radius: 12px;\n padding: 16px;\n background: transparent;\n border: 1px solid transparent;\n}\n\n.timeline-item:hover {\n background: #f8f9fa;\n border-color: #e0e6ed;\n}\n\n.timeline-item.expanded {\n background: #f8f9fa;\n border-color: #2196f3;\n box-shadow: 0 4px 12px rgba(33, 150, 243, 0.1);\n}\n\n.timeline-item.view-all {\n cursor: pointer;\n background: linear-gradient(135deg, #f8f9fa, #e9ecef);\n border: 2px dashed #dee2e6;\n}\n\n.timeline-item.view-all:hover {\n background: linear-gradient(135deg, #e9ecef, #dee2e6);\n border-color: #2196f3;\n}\n\n.timeline-item > div:first-child {\n display: flex;\n align-items: flex-start;\n}\n\n.timeline-marker {\n width: 40px;\n height: 40px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-right: 16px;\n flex-shrink: 0;\n position: relative;\n box-shadow: 0 2px 8px rgba(0,0,0,0.1);\n}\n\n.timeline-marker::after {\n content: '';\n position: absolute;\n top: 50px;\n left: 50%;\n transform: translateX(-50%);\n width: 2px;\n height: 24px;\n background: #e0e6ed;\n}\n\n.timeline-item:last-child .timeline-marker::after {\n display: none;\n}\n\n.timeline-marker i {\n color: white;\n font-size: 16px;\n}\n\n.timeline-marker.view-all-marker {\n background: #6c757d;\n}\n\n.timeline-content {\n flex: 1;\n min-width: 0;\n display: flex;\n align-items: flex-start;\n}\n\n.timeline-header {\n flex: 1;\n cursor: pointer;\n}\n\n.timeline-header > div:first-child {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n margin-bottom: 8px;\n gap: 16px;\n}\n\n.expand-icon {\n transition: transform 0.3s ease;\n margin-right: 8px;\n color: #6c757d;\n}\n\n.expand-icon.expanded {\n transform: rotate(90deg);\n}\n\n.timeline-title {\n font-size: 16px;\n font-weight: 600;\n color: #2c3e50;\n margin: 0;\n line-height: 1.3;\n}\n\n.timeline-date {\n font-size: 12px;\n color: #6c757d;\n white-space: nowrap;\n background: #f8f9fa;\n padding: 4px 8px;\n border-radius: 6px;\n margin-left: auto;\n}\n\n.timeline-preview {\n font-size: 13px;\n color: #6c757d;\n line-height: 1.5;\n margin-top: 8px;\n padding: 8px 12px;\n background: #f8f9fa;\n border-radius: 6px;\n border: 1px solid #e0e6ed;\n}\n\n.timeline-status {\n display: flex;\n align-items: center;\n gap: 12px;\n margin-bottom: 8px;\n}\n\n.execution-time {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 12px;\n color: #6c757d;\n background: #f8f9fa;\n padding: 4px 8px;\n border-radius: 6px;\n}\n\n.timeline-description {\n color: #6c757d;\n font-size: 14px;\n line-height: 1.5;\n margin: 8px 0;\n}\n\n.timeline-error {\n color: #dc3545;\n font-size: 13px;\n background: #f8d7da;\n padding: 8px 12px;\n border-radius: 6px;\n margin-top: 8px;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.timeline-error i {\n flex-shrink: 0;\n}\n\n/* Expanded Content Styles */\n.timeline-expanded-content {\n margin-top: 20px;\n padding-top: 20px;\n border-top: 1px solid #e0e6ed;\n animation: fadeIn 0.3s ease;\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n transform: translateY(-10px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n.result-section,\n.error-section {\n margin-bottom: 20px;\n}\n\n.result-section h5,\n.error-section h5 {\n font-size: 14px;\n font-weight: 600;\n color: #495057;\n margin-bottom: 8px;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.error-section h5 {\n color: #dc3545;\n}\n\n.result-content,\n.error-content {\n background: white;\n border: 1px solid #e0e6ed;\n border-radius: 8px;\n padding: 12px 16px;\n font-size: 14px;\n line-height: 1.6;\n color: #495057;\n white-space: pre-wrap;\n word-break: break-word;\n max-height: 200px;\n overflow-y: auto;\n}\n\n/* Code editor styling within result section */\n.result-section mj-code-editor {\n border: 1px solid #e0e6ed;\n border-radius: 8px;\n overflow: hidden;\n}\n\n.error-content {\n background: #f8d7da;\n border-color: #f5c6cb;\n color: #721c24;\n}\n\n.execution-details {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));\n gap: 16px;\n margin-bottom: 20px;\n}\n\n.detail-row {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n}\n\n.detail-label {\n font-size: 12px;\n font-weight: 600;\n color: #6c757d;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n min-width: 80px;\n}\n\n.detail-value {\n font-size: 14px;\n color: #495057;\n word-break: break-all;\n}\n\n.timeline-actions {\n display: flex;\n gap: 12px;\n justify-content: flex-end;\n}\n\n.btn-primary {\n padding: 8px 16px;\n background: #2196f3;\n color: white;\n border: none;\n border-radius: 8px;\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n gap: 8px;\n transition: all 0.2s ease;\n}\n\n.btn-primary:hover {\n background: #1976d2;\n transform: translateY(-1px);\n box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);\n}\n\n.btn-primary i {\n font-size: 12px;\n}\n\n/* Enhanced Empty States */\n.empty-state {\n text-align: center;\n padding: 60px 20px;\n color: #6c757d;\n background: #f8f9fa;\n border-radius: 12px;\n border: 2px dashed #dee2e6;\n margin-top: 16px;\n}\n\n.empty-state i {\n font-size: 48px;\n color: #dee2e6;\n margin-bottom: 16px;\n}\n\n.empty-state h4 {\n color: #495057;\n font-weight: 600;\n margin-bottom: 8px;\n font-size: 18px;\n}\n\n.empty-state p {\n font-size: 15px;\n line-height: 1.6;\n max-width: 400px;\n margin: 0 auto 20px auto;\n}\n\n/* Responsive Design */\n@media (max-width: 768px) {\n /* Header Responsiveness */\n .agent-header {\n padding: 16px;\n }\n \n .agent-header-content {\n flex-direction: column;\n gap: 16px;\n }\n \n .agent-overview {\n flex-direction: column;\n align-items: flex-start;\n gap: 12px;\n }\n \n .agent-meta {\n flex-direction: column;\n align-items: flex-start;\n gap: 8px;\n }\n \n .agent-actions {\n width: 100%;\n align-self: stretch;\n }\n \n .action-button {\n flex: 1;\n justify-content: center;\n }\n \n /* Panel Responsiveness */\n .form-content {\n padding: 12px;\n }\n \n ::ng-deep .k-panelbar > .k-panelbar-item > .k-header {\n padding: 16px 20px;\n font-size: 15px;\n }\n \n .panel-content {\n padding: 20px 16px;\n }\n \n .section-header {\n flex-direction: column;\n align-items: flex-start;\n gap: 12px;\n }\n \n .header-actions {\n flex-wrap: wrap;\n align-self: stretch;\n }\n \n /* Entity List Responsiveness */\n .entity-item {\n padding: 12px;\n gap: 12px;\n }\n \n .item-icon {\n width: 36px;\n height: 36px;\n }\n \n .item-icon i {\n font-size: 16px;\n }\n \n .item-title {\n font-size: 15px;\n }\n \n .item-preview {\n font-size: 13px;\n }\n \n .item-meta {\n gap: 8px;\n }\n \n /* Timeline Responsiveness */\n .timeline-item {\n padding: 12px;\n gap: 12px;\n }\n \n .timeline-marker {\n width: 28px;\n height: 28px;\n }\n \n .timeline-marker i {\n font-size: 12px;\n }\n \n .timeline-title {\n flex-direction: column;\n align-items: flex-start;\n gap: 8px;\n }\n \n .timeline-date {\n align-self: flex-start;\n }\n \n /* Form Field Responsiveness */\n .form-fields-grid {\n grid-template-columns: 1fr;\n gap: 16px;\n }\n \n /* Legacy card support */\n .cards-container {\n grid-template-columns: 1fr;\n }\n}\n\n/* Execution History Panel - Max Height and Scroll */\n.execution-history-panel {\n max-height: 500px;\n overflow-y: auto;\n overflow-x: hidden;\n}\n\n/* Custom scrollbar for execution history */\n.execution-history-panel::-webkit-scrollbar {\n width: 8px;\n}\n\n.execution-history-panel::-webkit-scrollbar-track {\n background: #f1f1f1;\n border-radius: 4px;\n}\n\n.execution-history-panel::-webkit-scrollbar-thumb {\n background: #c1c1c1;\n border-radius: 4px;\n}\n\n.execution-history-panel::-webkit-scrollbar-thumb:hover {\n background: #a0a0a0;\n}\n\n"] }]
1950
- }], () => [{ type: i0.ElementRef }, { type: i1.SharedService }, { type: i2.Router }, { type: i2.ActivatedRoute }, { type: i0.ChangeDetectorRef }, { type: i3.DialogService }, { type: i0.ViewContainerRef }, { type: i4.NewAgentDialogService }, { type: i5.ActionGalleryDialogService }, { type: i6.AITestHarnessDialogService }], null); })();
2840
+ args: [{ selector: 'mj-ai-agent-form', template: "<div class=\"record-form-container\">\n <!-- Dialog container for Kendo dialogs -->\n <div kendoDialogContainer></div>\n <form *ngIf=\"record\" class=\"record-form\" #form=\"ngForm\">\n <mj-form-toolbar [form]=\"this\"></mj-form-toolbar>\n\n <!-- Compact Header with Agent Overview -->\n <div class=\"agent-header\">\n <div class=\"agent-header-content\">\n <div class=\"agent-overview\">\n <div class=\"agent-icon-wrapper\">\n @if (hasLogoURL()) {\n <img [src]=\"record.LogoURL\" [alt]=\"record.Name + ' logo'\" class=\"agent-logo\">\n } @else {\n <i [class]=\"getAgentIcon()\"></i>\n }\n </div>\n <div class=\"agent-info\">\n @if (EditMode) {\n <kendo-textbox [(ngModel)]=\"record.Name\" \n name=\"agentName\"\n placeholder=\"Enter agent name...\"\n class=\"agent-name-input\">\n </kendo-textbox>\n } @else {\n <h1 class=\"agent-name\">{{ record.Name || 'Untitled AI Agent' }}</h1>\n }\n <div class=\"agent-meta\">\n @if (record.Status) {\n <span class=\"status-badge\" [style.background-color]=\"getStatusBadgeColor()\">\n <i class=\"fa-solid fa-circle\"></i>\n {{ record.Status }}\n </span>\n }\n @if (record.ExecutionMode) {\n <span class=\"execution-mode\">\n <i [class]=\"getExecutionModeIcon(record.ExecutionMode)\"></i>\n {{ record.ExecutionMode }}\n </span>\n }\n @if (record.Parent) {\n <span class=\"parent-agent\">\n <i class=\"fa-solid fa-sitemap\"></i>\n Child of {{ record.Parent }}\n </span>\n }\n </div>\n </div>\n </div>\n \n <!-- Action Buttons -->\n <div class=\"agent-actions\">\n @if (record.ID) {\n <button kendoButton themeColor=\"primary\" size=\"large\"\n (click)=\"openTestHarness()\"\n [disabled]=\"record.Status !== 'Active'\"\n title=\"Run this AI agent\">\n <i class=\"fa-solid fa-play\"></i>\n Run\n </button>\n }\n <button kendoButton fillMode=\"outline\" size=\"small\" (click)=\"refreshRelatedData()\" title=\"Refresh all data\">\n <i class=\"fa-solid fa-refresh\"></i>\n </button>\n </div>\n </div>\n </div>\n\n <!-- Single Pane Layout with Expander Panels -->\n <div class=\"form-content\">\n <kendo-panelbar>\n\n <!-- Actions (First Panel - Expanded by default) -->\n @if (record.ID) {\n <kendo-panelbar-item [expanded]=\"actionCount > 0\">\n <ng-template kendoPanelBarItemTitle>\n <i class=\"fa-solid fa-bolt\"></i> Actions{{ actionCount > 0 ? ' (' + actionCount + ')' : '' }}\n </ng-template>\n <ng-template kendoPanelBarContent>\n <div class=\"panel-content\">\n <div class=\"section-header\">\n <div class=\"header-actions\">\n @if (EditMode && UserCanCreateActions) {\n <button kendoButton themeColor=\"primary\" size=\"small\" (click)=\"configureActions()\">\n <i class=\"fa-solid fa-plus\"></i> Add Action\n </button>\n }\n </div>\n </div>\n \n @if (actionCount === 0) {\n <div class=\"empty-state\">\n <i class=\"fa-solid fa-bolt\"></i>\n <h4>No Actions Configured</h4>\n <p>Add actions to enable this agent to perform specific tasks and operations.</p>\n @if (EditMode && UserCanCreateActions) {\n <button kendoButton themeColor=\"primary\" (click)=\"configureActions()\">\n <i class=\"fa-solid fa-plus\"></i> Configure First Action\n </button>\n }\n </div>\n } @else {\n <div class=\"entity-list\">\n @for (action of agentActions; track action.ID) {\n <div class=\"entity-item action-item\" (click)=\"navigateToEntity('Actions', action.ID)\">\n <div class=\"item-icon\">\n <i [class]=\"getActionIcon(action)\"></i>\n </div>\n <div class=\"item-content\">\n <div class=\"item-title\">{{ action.Name || 'Untitled Action' }}</div>\n @if (action.Description) {\n <div class=\"item-preview\">{{ action.Description }}</div>\n }\n <div class=\"item-meta\">\n @if (action.Type) {\n <span class=\"meta-tag\">{{ action.Type }}</span>\n }\n <span class=\"status-tag\" [class.active]=\"action.Status==='Active'\" [class.inactive]=\"action.Status!=='Active'\">\n <i class=\"fa-solid\" [class.fa-check-circle]=\"action.Status==='Active'\" [class.fa-times-circle]=\"action.Status!=='Active'\"></i>\n {{ action.Status }}\n </span>\n </div>\n </div>\n <div class=\"item-actions\">\n @if (EditMode && UserCanDeleteActions) {\n <button kendoButton\n fillMode=\"flat\" \n themeColor=\"error\" \n size=\"small\"\n (click)=\"removeAction(action, $event)\"\n title=\"Remove action\">\n <i class=\"fa-solid fa-trash\"></i>\n </button>\n }\n <i class=\"fa-solid fa-external-link\"></i>\n </div>\n </div>\n }\n @if (actionCount > agentActions.length) {\n <div class=\"view-more-item\" (click)=\"navigateToEntity('AI Agent Actions', '')\">\n <span>View all {{ actionCount }} actions...</span>\n </div>\n }\n </div>\n }\n </div>\n </ng-template>\n </kendo-panelbar-item>\n }\n\n <!-- Sub-Agents (Second Panel) -->\n @if (record.ID) {\n <kendo-panelbar-item [expanded]=\"subAgentCount > 0\">\n <ng-template kendoPanelBarItemTitle>\n <i class=\"fa-solid fa-sitemap\"></i> Sub-Agents{{ subAgentCount > 0 ? ' (' + subAgentCount + ')' : '' }}\n </ng-template>\n <ng-template kendoPanelBarContent>\n <div class=\"panel-content\">\n <div class=\"section-header\">\n <div class=\"section-description\">\n Manage hierarchical relationships with child agents that work under this agent.\n </div>\n <div class=\"header-actions\">\n @if (EditMode && UserCanCreateSubAgents) {\n <button kendoButton themeColor=\"primary\" size=\"small\" (click)=\"addSubAgents()\">\n <i class=\"fa-solid fa-plus\"></i> Add Subagent\n </button>\n <button kendoButton themeColor=\"secondary\" size=\"small\" (click)=\"createSubAgent()\">\n <i class=\"fa-solid fa-plus\"></i> Create Sub-Agent\n </button>\n }\n </div>\n </div>\n \n @if (subAgentCount === 0) {\n <div class=\"empty-state\">\n <i class=\"fa-solid fa-sitemap\"></i>\n <h4>No Sub-Agents</h4>\n <p>Create sub-agents to build a hierarchical structure for complex workflows.</p>\n @if (EditMode && UserCanCreateSubAgents) {\n <button kendoButton themeColor=\"primary\" (click)=\"addSubAgents()\">\n <i class=\"fa-solid fa-plus\"></i> Add Subagent\n </button>\n <button kendoButton themeColor=\"secondary\" (click)=\"createSubAgent()\">\n <i class=\"fa-solid fa-plus\"></i> Create First Sub-Agent\n </button>\n }\n </div>\n } @else {\n <div class=\"entity-list\">\n @for (subAgent of subAgents; track subAgent.ID) {\n <div class=\"entity-item sub-agent-item\" (click)=\"navigateToEntity('AI Agents', subAgent.ID)\">\n <div class=\"item-icon\">\n @if (hasSubAgentLogoURL(subAgent)) {\n <img [src]=\"subAgent.LogoURL\" [alt]=\"subAgent.Name + ' logo'\" class=\"sub-agent-logo\">\n } @else {\n <i [class]=\"getSubAgentIcon(subAgent)\"></i>\n }\n </div>\n <div class=\"item-content\">\n <div class=\"item-title\">{{ subAgent.Name || 'Untitled Sub-Agent' }}</div>\n @if (subAgent.Description) {\n <div class=\"item-preview\">{{ subAgent.Description }}</div>\n }\n <div class=\"item-meta\">\n @if (subAgent.Status) {\n <span class=\"status-tag\" [style.background-color]=\"getStatusBadgeColor()\">\n {{ subAgent.Status }}\n </span>\n }\n @if (subAgent.ExecutionMode) {\n <span class=\"meta-tag\">{{ subAgent.ExecutionMode }}</span>\n }\n </div>\n </div>\n <div class=\"item-actions\">\n @if (EditMode && UserCanCreateSubAgents) {\n <button kendoButton\n fillMode=\"flat\" \n themeColor=\"primary\" \n size=\"small\"\n (click)=\"openSubAgentAdvancedSettings(subAgent, $event)\"\n title=\"Advanced settings\">\n <i class=\"fa-solid fa-cog\"></i>\n </button>\n }\n @if (EditMode && UserCanDeleteSubAgents) {\n <button kendoButton\n fillMode=\"flat\" \n themeColor=\"error\" \n size=\"small\"\n (click)=\"removeSubAgent(subAgent, $event)\"\n title=\"Remove sub-agent\">\n <i class=\"fa-solid fa-trash\"></i>\n </button>\n }\n <i class=\"fa-solid fa-external-link\"></i>\n </div>\n </div>\n }\n @if (subAgentCount > subAgents.length) {\n <div class=\"view-more-item\" (click)=\"navigateToEntity('AI Agents', '')\">\n <span>View all {{ subAgentCount }} sub-agents...</span>\n </div>\n }\n </div>\n }\n </div>\n </ng-template>\n </kendo-panelbar-item>\n }\n\n <!-- Prompts (Third Panel - With Model Selection) -->\n @if (record.ID) {\n <kendo-panelbar-item [expanded]=\"true\">\n <ng-template kendoPanelBarItemTitle>\n <i class=\"fa-solid fa-comments\"></i> Prompts{{ promptCount > 0 ? ' (' + promptCount + ')' : '' }}\n </ng-template>\n <ng-template kendoPanelBarContent>\n <div class=\"panel-content\">\n <div class=\"section-header\">\n <div class=\"prompt-controls\">\n <!-- Model Selection Mode Control -->\n <div class=\"model-selection-mode\">\n <label class=\"model-selection-label\">\n <i class=\"fa-solid fa-sliders\"></i>\n Model Selection:\n </label>\n @if (EditMode) {\n <kendo-dropdownlist\n [(ngModel)]=\"record.ModelSelectionMode\"\n name=\"modelSelectionMode\"\n [data]=\"modelSelectionModes\"\n textField=\"text\"\n valueField=\"value\"\n [valuePrimitive]=\"true\"\n class=\"model-selection-dropdown\">\n </kendo-dropdownlist>\n } @else {\n <span class=\"model-selection-value\">{{ record.ModelSelectionMode || 'Agent Type' }}</span>\n }\n </div>\n </div>\n <div class=\"header-actions\">\n @if (EditMode && UserCanCreateNewPrompts) {\n <button kendoButton themeColor=\"primary\" size=\"small\" (click)=\"addPrompt()\">\n <i class=\"fa-solid fa-plus\"></i> Add Prompt\n </button>\n }\n </div>\n </div>\n \n @if (promptCount === 0) {\n <div class=\"empty-state\">\n <i class=\"fa-solid fa-comments\"></i>\n <h4>No Prompts Configured</h4>\n <p>Add prompts to define how this agent processes requests and generates responses.</p>\n @if (EditMode && UserCanCreateNewPrompts) {\n <button kendoButton themeColor=\"primary\" (click)=\"addPrompt()\">\n <i class=\"fa-solid fa-plus\"></i> Create First Prompt\n </button>\n }\n </div>\n } @else {\n <div class=\"entity-list\">\n @for (prompt of agentPrompts; track prompt.ID) {\n <div class=\"entity-item prompt-item\" (click)=\"navigateToEntity('AI Prompts', prompt.ID)\">\n <div class=\"item-icon\">\n <i class=\"fa-solid fa-comment-dots\"></i>\n </div>\n <div class=\"item-content\">\n <div class=\"item-title\">{{ prompt.Name }}</div>\n @if (prompt.TemplateText) {\n <div class=\"item-preview\">{{ prompt.TemplateText.substring(0, 120) }}{{ prompt.TemplateText.length > 120 ? '...' : '' }}</div>\n }\n <div class=\"item-meta\">\n @if (prompt.PromptRole) {\n <span class=\"meta-tag\">{{ prompt.PromptRole }}</span>\n }\n </div>\n </div>\n <div class=\"item-actions\">\n @if (EditMode && UserCanCreatePrompts) {\n <button kendoButton\n fillMode=\"flat\" \n themeColor=\"primary\" \n size=\"small\"\n (click)=\"openPromptAdvancedSettings(prompt, $event)\"\n title=\"Advanced settings\">\n <i class=\"fa-solid fa-cog\"></i>\n </button>\n }\n @if (EditMode && UserCanDeletePrompts) {\n <button kendoButton\n fillMode=\"flat\" \n themeColor=\"error\" \n size=\"small\"\n (click)=\"removePrompt(prompt, $event)\"\n title=\"Remove prompt\">\n <i class=\"fa-solid fa-trash\"></i>\n </button>\n }\n <i class=\"fa-solid fa-external-link\"></i>\n </div>\n </div>\n }\n @if (promptCount > agentPrompts.length) {\n <div class=\"view-more-item\" (click)=\"navigateToEntity('AI Prompts', '')\">\n <span>View all {{ promptCount }} prompts...</span>\n </div>\n }\n </div>\n }\n </div>\n </ng-template>\n </kendo-panelbar-item>\n }\n\n\n <!-- Learning & Analytics -->\n @if (record.ID) {\n <kendo-panelbar-item [expanded]=\"false\">\n <ng-template kendoPanelBarItemTitle>\n <i class=\"fa-solid fa-brain\"></i> Learning Cycles{{ learningCycleCount > 0 ? ' (' + learningCycleCount + ')' : '' }}\n </ng-template>\n <ng-template kendoPanelBarContent>\n <div class=\"panel-content\">\n <div class=\"section-header\">\n <div class=\"section-description\">\n Monitor and manage learning cycles, training sessions, and performance analytics.\n </div>\n </div>\n \n @if (learningCycleCount === 0) {\n <div class=\"empty-state\">\n <i class=\"fa-solid fa-brain\"></i>\n <h4>No Learning Cycles</h4>\n <p>Learning cycles will appear here as the agent processes requests and improves over time.</p>\n </div>\n } @else {\n <div class=\"entity-list\">\n @for (cycle of learningCycles; track cycle.ID) {\n <div class=\"entity-item learning-item\" (click)=\"navigateToEntity('AI Agent Learning Cycles', cycle.ID)\">\n <div class=\"item-icon\">\n <i class=\"fa-solid fa-brain\"></i>\n </div>\n <div class=\"item-content\">\n <div class=\"item-title\">Learning Cycle {{ cycle.ID.substring(0, 8) }}</div>\n <div class=\"item-meta\">\n @if (cycle.StartedAt) {\n <span class=\"meta-tag\">\n <i class=\"fa-solid fa-calendar\"></i>\n {{ cycle.StartedAt | date:'short' }}\n </span>\n }\n @if (cycle.Status) {\n <span class=\"status-tag\">{{ cycle.Status }}</span>\n }\n </div>\n </div>\n <div class=\"item-actions\">\n <i class=\"fa-solid fa-external-link\"></i>\n </div>\n </div>\n }\n @if (learningCycleCount > learningCycles.length) {\n <div class=\"view-more-item\" (click)=\"navigateToEntity('AI Agent Learning Cycles', '')\">\n <span>View all {{ learningCycleCount }} cycles...</span>\n </div>\n }\n </div>\n }\n </div>\n </ng-template>\n </kendo-panelbar-item>\n }\n\n <!-- Notes & Documentation -->\n @if (record.ID) {\n <kendo-panelbar-item [expanded]=\"false\">\n <ng-template kendoPanelBarItemTitle>\n <i class=\"fa-solid fa-sticky-note\"></i> Notes{{ noteCount > 0 ? ' (' + noteCount + ')' : '' }}\n </ng-template>\n <ng-template kendoPanelBarContent>\n <div class=\"panel-content\">\n <div class=\"section-header\">\n <div class=\"section-description\">\n Manage notes, documentation, and annotations for this agent.\n </div>\n <div class=\"header-actions\">\n @if (EditMode && UserCanCreateNotes) {\n <button kendoButton themeColor=\"primary\" size=\"small\" (click)=\"addNote()\">\n <i class=\"fa-solid fa-plus\"></i> Add Note\n </button>\n }\n </div>\n </div>\n \n @if (noteCount === 0) {\n <div class=\"empty-state\">\n <i class=\"fa-solid fa-sticky-note\"></i>\n <h4>No Notes</h4>\n <p>Add notes to document important information, observations, or instructions for this agent.</p>\n @if (EditMode && UserCanCreateNotes) {\n <button kendoButton themeColor=\"primary\" (click)=\"addNote()\">\n <i class=\"fa-solid fa-plus\"></i> Create First Note\n </button>\n }\n </div>\n } @else {\n <div class=\"entity-list\">\n @for (note of agentNotes; track note.ID) {\n <div class=\"entity-item note-item\" (click)=\"navigateToEntity('AI Agent Notes', note.ID)\">\n <div class=\"item-icon\">\n <i class=\"fa-solid fa-sticky-note\"></i>\n </div>\n <div class=\"item-content\">\n <div class=\"item-title\">{{ note.Type || 'Note' }}</div>\n @if (note.Note) {\n <div class=\"item-preview\">{{ note.Note.substring(0, 100) }}{{ note.Note.length > 100 ? '...' : '' }}</div>\n }\n <div class=\"item-meta\">\n @if (note.__mj_CreatedAt) {\n <span class=\"meta-tag\">\n <i class=\"fa-solid fa-calendar\"></i>\n {{ note.__mj_CreatedAt | date:'short' }}\n </span>\n }\n </div>\n </div>\n <div class=\"item-actions\">\n <i class=\"fa-solid fa-external-link\"></i>\n </div>\n </div>\n }\n @if (noteCount > agentNotes.length) {\n <div class=\"view-more-item\" (click)=\"navigateToEntity('AI Agent Notes', '')\">\n <span>View all {{ noteCount }} notes...</span>\n </div>\n }\n </div>\n }\n </div>\n </ng-template>\n </kendo-panelbar-item>\n }\n\n <!-- Requests & History -->\n @if (record.ID) {\n <kendo-panelbar-item [expanded]=\"false\">\n <ng-template kendoPanelBarItemTitle>\n <i class=\"fa-solid fa-history\"></i> Execution History{{ executionHistoryCount > 0 ? ' (' + executionHistoryCount + ')' : '' }}\n </ng-template>\n <ng-template kendoPanelBarContent>\n <div class=\"panel-content execution-history-panel\">\n <div class=\"section-header\">\n <div class=\"section-description\">\n Review execution history, requests, and performance metrics for this agent.\n </div>\n </div>\n \n @if (executionHistoryCount === 0) {\n <div class=\"empty-state\">\n <i class=\"fa-solid fa-history\"></i>\n <h4>No Execution History</h4>\n <p>This agent hasn't been executed yet. Use the Test Agent button to run the agent and see execution history here.</p>\n </div>\n } @else {\n <div class=\"timeline-list\">\n @for (execution of recentExecutions; track execution.ID) {\n <div class=\"timeline-item\" [class.expanded]=\"expandedExecutions[execution.ID]\">\n <div>\n <div class=\"timeline-marker\" [style.background-color]=\"getExecutionStatusColor(execution.Status)\">\n <i [class]=\"getExecutionStatusIcon(execution.Status)\"></i>\n </div>\n <div class=\"timeline-content\">\n <div class=\"timeline-header\" (click)=\"toggleExecutionExpanded(execution.ID)\">\n <div>\n <div class=\"timeline-title\">\n <i class=\"fa-solid fa-chevron-right expand-icon\" [class.expanded]=\"expandedExecutions[execution.ID]\"></i>\n Execution #{{ execution.ID.substring(0, 8) }}\n <span class=\"timeline-date\">{{ execution.__mj_CreatedAt | date:'MMM d, h:mm a' }}</span>\n </div>\n <div class=\"timeline-meta\">\n <span class=\"status-badge\" [style.background-color]=\"getExecutionStatusColor(execution.Status)\">\n {{ execution.Status || 'Unknown' }}\n </span>\n @if (execution.CompletedAt) {\n <span class=\"execution-time\">\n <i class=\"fa-solid fa-stopwatch\"></i>\n {{ formatExecutionTimeFromDates(execution.StartedAt, execution.CompletedAt) }}\n </span>\n }\n <div class=\"timeline-actions\">\n <button class=\"btn-primary\" (click)=\"openExecutionRecord(execution.ID); $event.stopPropagation()\">\n <i class=\"fa-solid fa-external-link-alt\"></i>\n </button>\n </div>\n </div>\n @if (execution.Result && !expandedExecutions[execution.ID]) {\n <div class=\"timeline-preview\">{{ getExecutionResultPreview(execution, true) }}</div>\n }\n </div>\n </div>\n @if (expandedExecutions[execution.ID]) {\n <div class=\"timeline-expanded-content\">\n @if (execution.Result) {\n <div class=\"result-section\">\n <h5>Result</h5>\n <mj-code-editor \n [value]=\"getExecutionResultPreview(execution, false)\"\n [readonly]=\"true\"\n language=\"json\"\n [lineWrapping]=\"true\"\n style=\"max-height: 200px; width: 100%;\">\n </mj-code-editor>\n </div>\n }\n @if (execution.ErrorMessage) {\n <div class=\"error-section\">\n <h5><i class=\"fa-solid fa-exclamation-triangle\"></i> Error</h5>\n <div class=\"error-content\">{{ execution.ErrorMessage }}</div>\n </div>\n }\n <div class=\"execution-details\">\n <div class=\"detail-row\">\n <span class=\"detail-label\">Started:</span>\n <span class=\"detail-value\">{{ execution.StartedAt | date:'medium' }}</span>\n </div>\n @if (execution.CompletedAt) {\n <div class=\"detail-row\">\n <span class=\"detail-label\">Completed:</span>\n <span class=\"detail-value\">{{ execution.CompletedAt | date:'medium' }}</span>\n </div>\n }\n @if (execution.ConversationID) {\n <div class=\"detail-row\">\n <span class=\"detail-label\">Conversation:</span>\n <span class=\"detail-value\">{{ execution.ConversationID }}</span>\n </div>\n }\n </div>\n </div>\n }\n </div>\n </div>\n </div>\n }\n @if (executionHistoryCount > recentExecutions.length) {\n <div class=\"view-more-item\" (click)=\"navigateToEntity('MJ: AI Agent Runs', '')\">\n <span>View all {{ executionHistoryCount }} executions...</span>\n </div>\n }\n </div>\n }\n </div>\n </ng-template>\n </kendo-panelbar-item>\n }\n\n\n <!-- Payload (Third Panel) -->\n <kendo-panelbar-item [expanded]=\"false\">\n <ng-template kendoPanelBarItemTitle>\n <i class=\"fa-solid fa-box\"></i> Payload\n </ng-template>\n <ng-template kendoPanelBarContent>\n <div class=\"panel-content\">\n <div class=\"section-header\">\n <div class=\"section-description\">\n Configure how this agent handles data payloads and validation.\n </div>\n </div>\n \n <!-- Configuration Fields -->\n <div class=\"payload-config-section\">\n <h4 class=\"subsection-title\">\n <i class=\"fa-solid fa-cog\"></i> Configuration\n </h4>\n <div class=\"payload-config-grid\">\n <!-- Payload Scope -->\n <mj-form-field \n FieldName=\"PayloadScope\" \n Type=\"textbox\"\n Caption=\"Payload Scope\"\n Description=\"Path to narrow payload (e.g., /functionalRequirements)\"\n [EditMode]=\"EditMode\"\n [record]=\"record\">\n </mj-form-field>\n\n <!-- Final Payload Validation Mode -->\n <mj-form-field \n FieldName=\"FinalPayloadValidationMode\" \n Type=\"dropdownlist\"\n Caption=\"Validation Mode\"\n Description=\"Action on validation failure\"\n [EditMode]=\"EditMode\"\n [record]=\"record\">\n </mj-form-field>\n\n <!-- Final Payload Validation Max Retries -->\n <mj-form-field \n FieldName=\"FinalPayloadValidationMaxRetries\" \n Type=\"numerictextbox\"\n Caption=\"Max Retries\"\n Description=\"Maximum validation retry attempts\"\n [EditMode]=\"EditMode\"\n [record]=\"record\">\n </mj-form-field>\n </div>\n </div>\n\n <!-- Path Configuration -->\n <div class=\"payload-paths-section\">\n <h4 class=\"subsection-title\">\n <i class=\"fa-solid fa-route\"></i> Path Configuration\n </h4>\n \n <!-- Downstream Paths -->\n <div class=\"payload-field-group\">\n <label class=\"payload-field-label\">\n <i class=\"fa-solid fa-arrow-down\"></i> Downstream Paths\n <span class=\"field-description\">JSON array of paths to pass to sub-agents</span>\n </label>\n <mj-code-editor \n [value]=\"record.PayloadDownstreamPaths || '[]'\"\n [readonly]=\"!EditMode\"\n language=\"json\"\n [lineWrapping]=\"true\"\n style=\"height: 120px; width: 100%;\"\n (valueChange)=\"updatePayloadField('PayloadDownstreamPaths', $event)\">\n </mj-code-editor>\n </div>\n\n <!-- Upstream Paths -->\n <div class=\"payload-field-group\">\n <label class=\"payload-field-label\">\n <i class=\"fa-solid fa-arrow-up\"></i> Upstream Paths\n <span class=\"field-description\">JSON array of paths to return to parent agent</span>\n </label>\n <mj-code-editor \n [value]=\"record.PayloadUpstreamPaths || '[]'\"\n [readonly]=\"!EditMode\"\n language=\"json\"\n [lineWrapping]=\"true\"\n style=\"height: 120px; width: 100%;\"\n (valueChange)=\"updatePayloadField('PayloadUpstreamPaths', $event)\">\n </mj-code-editor>\n </div>\n\n <!-- Self Read Paths -->\n <div class=\"payload-field-group\">\n <label class=\"payload-field-label\">\n <i class=\"fa-solid fa-eye\"></i> Self Read Paths\n <span class=\"field-description\">JSON array of paths this agent can read</span>\n </label>\n <mj-code-editor \n [value]=\"record.PayloadSelfReadPaths || '[]'\"\n [readonly]=\"!EditMode\"\n language=\"json\"\n [lineWrapping]=\"true\"\n style=\"height: 120px; width: 100%;\"\n (valueChange)=\"updatePayloadField('PayloadSelfReadPaths', $event)\">\n </mj-code-editor>\n </div>\n\n <!-- Self Write Paths -->\n <div class=\"payload-field-group\">\n <label class=\"payload-field-label\">\n <i class=\"fa-solid fa-pen\"></i> Self Write Paths\n <span class=\"field-description\">JSON array of paths this agent can write to</span>\n </label>\n <mj-code-editor \n [value]=\"record.PayloadSelfWritePaths || '[]'\"\n [readonly]=\"!EditMode\"\n language=\"json\"\n [lineWrapping]=\"true\"\n style=\"height: 120px; width: 100%;\"\n (valueChange)=\"updatePayloadField('PayloadSelfWritePaths', $event)\">\n </mj-code-editor>\n </div>\n </div>\n\n <!-- Validation Rules -->\n <div class=\"payload-validation-section\">\n <h4 class=\"subsection-title\">\n <i class=\"fa-solid fa-shield-check\"></i> Final Payload Validation\n </h4>\n <div class=\"payload-field-group\">\n <label class=\"payload-field-label\">\n <span class=\"field-description\">JSON validation rules or schema for final payload validation</span>\n </label>\n <mj-code-editor \n [value]=\"record.FinalPayloadValidation || '{}'\"\n [readonly]=\"!EditMode\"\n language=\"json\"\n [lineWrapping]=\"true\"\n style=\"height: 200px; width: 100%;\"\n (valueChange)=\"updatePayloadField('FinalPayloadValidation', $event)\">\n </mj-code-editor>\n </div>\n </div>\n </div>\n </ng-template>\n </kendo-panelbar-item>\n\n\n\n <!-- Execution Guardrails (New Separate Panel) -->\n <kendo-panelbar-item [expanded]=\"false\">\n <ng-template kendoPanelBarItemTitle>\n <i class=\"fa-solid fa-shield-halved\"></i> Execution Guardrails\n </ng-template>\n <ng-template kendoPanelBarContent>\n <div class=\"panel-content\">\n <div class=\"section-header\">\n <div class=\"section-description\">\n Set limits to prevent runaway agent executions and control resource usage.\n </div>\n </div>\n \n <div class=\"form-fields-grid\">\n <mj-form-field \n FieldName=\"MaxCostPerRun\" \n Type=\"numerictextbox\"\n Caption=\"Max Cost ($)\"\n Description=\"Maximum cost per run\"\n [EditMode]=\"EditMode\"\n [record]=\"record\">\n </mj-form-field>\n\n <mj-form-field \n FieldName=\"MaxTokensPerRun\" \n Type=\"numerictextbox\"\n Caption=\"Max Tokens\"\n Description=\"Maximum tokens per run\"\n [EditMode]=\"EditMode\"\n [record]=\"record\">\n </mj-form-field>\n\n <mj-form-field \n FieldName=\"MaxIterationsPerRun\" \n Type=\"numerictextbox\"\n Caption=\"Max Iterations\"\n Description=\"Maximum prompt iterations\"\n [EditMode]=\"EditMode\"\n [record]=\"record\">\n </mj-form-field>\n\n <mj-form-field \n FieldName=\"MaxTimePerRun\" \n Type=\"numerictextbox\"\n Caption=\"Max Time (seconds)\"\n Description=\"Maximum execution time\"\n [EditMode]=\"EditMode\"\n [record]=\"record\">\n </mj-form-field>\n </div>\n </div>\n </ng-template>\n </kendo-panelbar-item>\n\n <!-- Configuration (Settings Panel) -->\n <kendo-panelbar-item [expanded]=\"false\">\n <ng-template kendoPanelBarItemTitle>\n <i class=\"fa-solid fa-cog\"></i> Configuration\n </ng-template>\n <ng-template kendoPanelBarContent>\n <div class=\"panel-content\">\n <div class=\"section-header\">\n <div class=\"section-description\">\n Advanced configuration settings for agent behavior and execution.\n </div>\n </div>\n \n <div class=\"form-fields-grid\">\n <!-- Core Settings -->\n <mj-form-field \n FieldName=\"Status\" \n Type=\"dropdownlist\"\n Caption=\"Status\"\n Description=\"Agent availability status\"\n [EditMode]=\"EditMode\"\n [record]=\"record\">\n </mj-form-field>\n\n <mj-form-field \n FieldName=\"ExecutionMode\" \n Type=\"dropdownlist\"\n Caption=\"Execution Mode\"\n Description=\"How sub-agents are executed\"\n [EditMode]=\"EditMode\"\n [record]=\"record\">\n </mj-form-field>\n\n <mj-form-field \n FieldName=\"ExecutionOrder\" \n Type=\"numerictextbox\"\n Caption=\"Execution Order\"\n Description=\"Order when run with siblings\"\n [EditMode]=\"EditMode\"\n [record]=\"record\">\n </mj-form-field>\n\n <mj-form-field \n FieldName=\"ExposeAsAction\" \n Type=\"checkbox\"\n Caption=\"Expose as Action\"\n Description=\"Make available as an action\"\n [EditMode]=\"EditMode\"\n [record]=\"record\">\n </mj-form-field>\n\n <mj-form-field \n FieldName=\"TypeID\" \n Type=\"dropdownlist\"\n Caption=\"Agent Type\"\n Description=\"Category of this agent\"\n [EditMode]=\"EditMode\"\n [record]=\"record\"\n LinkType=\"Record\"\n LinkEntityName=\"MJ: AI Agent Types\">\n </mj-form-field>\n\n <mj-form-field \n FieldName=\"DriverClass\" \n Type=\"textbox\"\n Caption=\"Driver Class\"\n Description=\"Custom implementation class\"\n [EditMode]=\"EditMode\"\n [record]=\"record\">\n </mj-form-field>\n\n <mj-form-field \n FieldName=\"IconClass\" \n Type=\"textbox\"\n Caption=\"Icon Class\"\n Description=\"Font Awesome icon class\"\n [EditMode]=\"EditMode\"\n [record]=\"record\">\n </mj-form-field>\n\n <mj-form-field \n FieldName=\"Description\" \n Type=\"textarea\"\n Caption=\"Description\"\n Description=\"Detailed agent description\"\n [EditMode]=\"EditMode\"\n [record]=\"record\"\n style=\"grid-column: span 2;\">\n </mj-form-field>\n\n <mj-form-field \n FieldName=\"LogoURL\" \n Type=\"textbox\"\n Caption=\"Logo URL\"\n Description=\"URL for agent logo image\"\n [EditMode]=\"EditMode\"\n [record]=\"record\"\n style=\"grid-column: span 2;\">\n </mj-form-field>\n </div>\n\n <!-- Context Compression Settings -->\n <div class=\"subsection-divider\">\n <h4 class=\"subsection-title\">\n <i class=\"fa-solid fa-compress\"></i> Context Compression\n </h4>\n </div>\n\n <div class=\"form-fields-grid\">\n <mj-form-field \n FieldName=\"EnableContextCompression\" \n Type=\"checkbox\"\n Caption=\"Enable Compression\"\n Description=\"Compress long conversations\"\n [EditMode]=\"EditMode\"\n [record]=\"record\"\n (valueChange)=\"onContextCompressionToggle($event)\">\n </mj-form-field>\n\n <mj-form-field \n FieldName=\"ContextCompressionMessageThreshold\" \n Type=\"numerictextbox\"\n Caption=\"Message Threshold\"\n Description=\"Messages before compression\"\n [EditMode]=\"EditMode\"\n [record]=\"record\">\n </mj-form-field>\n\n <mj-form-field \n FieldName=\"ContextCompressionMessageRetentionCount\" \n Type=\"numerictextbox\"\n Caption=\"Messages to Keep\"\n Description=\"Recent messages to retain\"\n [EditMode]=\"EditMode\"\n [record]=\"record\">\n </mj-form-field>\n\n <mj-form-field \n FieldName=\"ContextCompressionPromptID\" \n Type=\"dropdownlist\"\n Caption=\"Compression Prompt\"\n Description=\"Prompt for summarization\"\n [EditMode]=\"EditMode\"\n [record]=\"record\"\n LinkType=\"Record\"\n LinkEntityName=\"AI Prompts\">\n </mj-form-field>\n </div>\n </div>\n </ng-template>\n </kendo-panelbar-item>\n\n\n\n\n </kendo-panelbar>\n </div>\n </form>\n\n</div>", styles: ["/* AI Agent Form - Modern Redesign */\n.record-form-container {\n height: 100%;\n display: flex;\n flex-direction: column;\n background: #f5f7fa;\n}\n\n.record-form {\n height: 100%;\n display: flex;\n flex-direction: column;\n}\n\n/* Agent Header Section - Compact Design */\n.agent-header {\n background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);\n border-bottom: 1px solid #e0e6ed;\n padding: 12px 20px;\n box-shadow: 0 2px 4px rgba(0,0,0,0.04);\n}\n\n.agent-header-content {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 20px;\n}\n\n.agent-overview {\n display: flex;\n align-items: center;\n gap: 16px;\n flex: 1;\n min-width: 0;\n}\n\n.agent-icon-wrapper {\n width: 48px;\n height: 48px;\n background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);\n border-radius: 12px;\n display: flex;\n align-items: center;\n justify-content: center;\n box-shadow: 0 4px 12px rgba(33, 150, 243, 0.2);\n flex-shrink: 0;\n}\n\n.agent-icon-wrapper i {\n color: white;\n font-size: 24px;\n}\n\n.agent-icon-wrapper img.agent-logo {\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: 8px;\n}\n\n.agent-info {\n flex: 1;\n min-width: 0;\n}\n\n.agent-name {\n font-size: 22px;\n font-weight: 600;\n color: #2c3e50;\n margin: 0 0 8px 0;\n line-height: 1.2;\n}\n\n.agent-name-input {\n font-size: 18px !important;\n font-weight: 500 !important;\n height: 36px !important;\n width: 100% !important;\n max-width: 400px !important;\n}\n\n.agent-meta {\n display: flex;\n align-items: center;\n gap: 16px;\n flex-wrap: wrap;\n}\n\n.status-badge {\n padding: 6px 16px;\n border-radius: 20px;\n font-size: 13px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n display: inline-flex;\n align-items: center;\n gap: 6px;\n}\n\n.status-badge.active {\n background: #28a745;\n color: white;\n}\n\n.status-badge.pending {\n background: #ffc107;\n color: #212529;\n}\n\n.status-badge.disabled {\n background: #6c757d;\n color: white;\n}\n\n.execution-mode,\n.parent-agent {\n display: flex;\n align-items: center;\n gap: 6px;\n font-size: 13px;\n color: #6c757d;\n background: #f8f9fa;\n padding: 4px 10px;\n border-radius: 12px;\n}\n\n.execution-mode i,\n.parent-agent i {\n font-size: 12px;\n opacity: 0.8;\n}\n\n/* Prompt Controls Section */\n.prompt-controls {\n flex: 1;\n margin-right: 16px;\n}\n\n.agent-meta-info {\n display: flex;\n gap: 24px;\n margin-top: 12px;\n flex-wrap: wrap;\n}\n\n.meta-item {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.meta-label {\n font-size: 12px;\n font-weight: 600;\n color: #6c757d;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n.meta-value {\n font-size: 14px;\n color: #495057;\n font-weight: 500;\n}\n\n.agent-description {\n margin-top: 16px;\n color: #6c757d;\n line-height: 1.6;\n font-size: 15px;\n}\n\n.agent-description-input {\n width: 100%;\n max-width: 600px;\n min-height: 80px;\n resize: vertical;\n}\n\n/* Action Buttons Section */\n.agent-actions {\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\n.action-buttons-row {\n display: flex;\n gap: 12px;\n flex-wrap: wrap;\n}\n\n.action-button {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 10px 20px;\n border-radius: 8px;\n font-weight: 500;\n font-size: 14px;\n transition: all 0.2s ease;\n box-shadow: 0 2px 4px rgba(0,0,0,0.08);\n}\n\n.action-button:hover {\n transform: translateY(-1px);\n box-shadow: 0 4px 8px rgba(0,0,0,0.12);\n}\n\n.action-button.primary {\n background: #2196f3;\n color: white;\n}\n\n.action-button.primary:hover {\n background: #1976d2;\n}\n\n.action-button.secondary {\n background: #6c757d;\n color: white;\n}\n\n.action-button.secondary:hover {\n background: #5a6268;\n}\n\n.action-warnings {\n margin-top: 8px;\n font-size: 13px;\n color: #dc3545;\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n/* Panel-Based Form Content */\n.form-content {\n flex: 1;\n display: flex;\n flex-direction: column;\n overflow-y: auto;\n overflow-x: hidden;\n background: #f5f7fa;\n padding: 12px;\n}\n\n/* Kendo PanelBar Styling */\n::ng-deep .k-panelbar {\n border: none;\n background: transparent;\n}\n\n::ng-deep .k-panelbar > .k-panelbar-item {\n border: none;\n border-radius: 12px;\n margin-bottom: 12px;\n box-shadow: 0 2px 8px rgba(0,0,0,0.06);\n background: white;\n overflow: hidden;\n}\n\n::ng-deep .k-panelbar > .k-panelbar-item > .k-header {\n background: white;\n border: none;\n padding: 16px 20px;\n border-radius: 12px 12px 0 0;\n color: #2c3e50;\n font-weight: 600;\n font-size: 16px;\n transition: all 0.2s ease;\n display: flex;\n align-items: center;\n gap: 12px;\n}\n\n::ng-deep .k-panelbar > .k-panelbar-item > .k-header:hover {\n background: #f8f9fa;\n}\n\n::ng-deep .k-panelbar > .k-panelbar-item.k-panelbar-expanded > .k-header {\n background: #2196f3;\n color: white;\n border-radius: 12px 12px 0 0;\n}\n\n::ng-deep .k-panelbar > .k-panelbar-item > .k-header .k-panelbar-toggle {\n position: absolute;\n right: 24px;\n color: inherit;\n font-size: 14px;\n transition: transform 0.2s ease;\n}\n\n::ng-deep .k-panelbar > .k-panelbar-item.k-panelbar-expanded > .k-header .k-panelbar-toggle {\n transform: rotate(180deg);\n}\n\n::ng-deep .k-panelbar > .k-panelbar-item > .k-header .k-panelbar-toggle::before {\n content: '\\f107';\n font-family: 'Font Awesome 6 Free';\n font-weight: 900;\n}\n\n::ng-deep .k-panelbar > .k-panelbar-item > .k-content {\n padding: 0;\n border: none;\n background: white;\n border-radius: 0 0 12px 12px;\n}\n\n::ng-deep .k-panelbar .k-header .k-panelbar-icon {\n font-size: 18px;\n color: #2196f3;\n margin-right: 8px;\n}\n\n::ng-deep .k-panelbar .k-panelbar-expanded .k-header .k-panelbar-icon {\n color: white;\n}\n\n/* Panel Content */\n.panel-content {\n padding: 16px;\n background: white;\n}\n\n.section-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 20px;\n gap: 16px;\n flex-wrap: wrap;\n}\n\n.section-description {\n color: #6c757d;\n font-size: 14px;\n line-height: 1.6;\n margin-bottom: 16px;\n}\n\n.header-actions {\n display: flex;\n gap: 8px;\n align-items: center;\n flex-shrink: 0;\n}\n\n.tab-section {\n background: white;\n border-radius: 12px;\n padding: 24px;\n margin-bottom: 24px;\n box-shadow: 0 2px 8px rgba(0,0,0,0.04);\n border: 1px solid #e0e6ed;\n}\n\n.section-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 20px;\n padding-bottom: 16px;\n border-bottom: 2px solid #f0f4f8;\n}\n\n.section-title {\n display: flex;\n align-items: center;\n gap: 12px;\n margin: 0;\n color: #2c3e50;\n font-size: 18px;\n font-weight: 600;\n}\n\n.section-title i {\n color: #2196f3;\n font-size: 20px;\n}\n\n.section-description {\n color: #6c757d;\n font-size: 14px;\n line-height: 1.6;\n margin-top: 8px;\n}\n\n/* Form Fields Grid */\n.form-fields-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));\n gap: 20px;\n margin-top: 20px;\n}\n\n.form-field-group {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.form-field-label {\n font-size: 13px;\n font-weight: 600;\n color: #495057;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n/* Sub-grids styling (legacy) */\n.sub-grid-container {\n height: 500px;\n border: 1px solid #e0e6ed;\n border-radius: 8px;\n overflow: hidden;\n display: none; /* Hidden as we now use cards */\n}\n\n/* Empty States */\n.empty-state {\n text-align: center;\n padding: 60px 20px;\n color: #6c757d;\n}\n\n.empty-state i {\n font-size: 48px;\n color: #dee2e6;\n margin-bottom: 16px;\n}\n\n.empty-state h4 {\n color: #495057;\n font-weight: 600;\n margin-bottom: 8px;\n}\n\n.empty-state p {\n font-size: 15px;\n line-height: 1.6;\n max-width: 400px;\n margin: 0 auto;\n}\n\n/* Loading State */\n.loading-overlay {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(255, 255, 255, 0.9);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 1000;\n}\n\n.loading-spinner {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 16px;\n}\n\n.spinner-icon {\n width: 48px;\n height: 48px;\n border: 4px solid #f3f3f3;\n border-top: 4px solid #2196f3;\n border-radius: 50%;\n animation: spin 1s linear infinite;\n}\n\n@keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n}\n\n/* Quick Actions */\n.quick-actions {\n display: flex;\n gap: 16px;\n margin-top: 20px;\n padding-top: 20px;\n border-top: 1px solid #e0e6ed;\n}\n\n.quick-action-card {\n flex: 1;\n padding: 16px;\n background: #f8f9fa;\n border-radius: 8px;\n border: 1px solid #e0e6ed;\n cursor: pointer;\n transition: all 0.2s ease;\n text-align: center;\n}\n\n.quick-action-card:hover {\n background: white;\n box-shadow: 0 4px 12px rgba(0,0,0,0.08);\n transform: translateY(-2px);\n}\n\n.quick-action-icon {\n font-size: 32px;\n color: #2196f3;\n margin-bottom: 8px;\n}\n\n.quick-action-title {\n font-size: 14px;\n font-weight: 600;\n color: #495057;\n margin-bottom: 4px;\n}\n\n.quick-action-description {\n font-size: 12px;\n color: #6c757d;\n}\n\n/* Header Actions */\n.header-actions {\n display: flex;\n gap: 8px;\n align-items: center;\n}\n\n/* Entity List Interface */\n.entity-list {\n display: flex;\n flex-direction: column;\n gap: 12px;\n margin-top: 16px;\n}\n\n.entity-item {\n display: flex;\n align-items: center;\n gap: 16px;\n padding: 16px;\n background: #f8f9fa;\n border: 1px solid #e0e6ed;\n border-radius: 10px;\n cursor: pointer;\n transition: all 0.2s ease;\n}\n\n.entity-item:hover {\n background: white;\n border-color: #2196f3;\n box-shadow: 0 4px 12px rgba(0,0,0,0.08);\n transform: translateY(-1px);\n}\n\n.item-icon {\n width: 40px;\n height: 40px;\n background: linear-gradient(135deg, #e9ecef, #dee2e6);\n border-radius: 10px;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.prompt-item .item-icon {\n background: linear-gradient(135deg, #20c997, #17a673);\n}\n\n.action-item .item-icon {\n background: linear-gradient(135deg, #ffc107, #e0a800);\n}\n\n.sub-agent-item .item-icon {\n background: linear-gradient(135deg, #2196f3, #1976d2);\n}\n\n.model-item .item-icon {\n background: linear-gradient(135deg, #6f42c1, #563d7c);\n}\n\n.learning-item .item-icon {\n background: linear-gradient(135deg, #e83e8c, #dc3545);\n}\n\n.note-item .item-icon {\n background: linear-gradient(135deg, #fd7e14, #e55a00);\n}\n\n.item-icon i {\n color: #6c757d;\n font-size: 18px;\n}\n\n.prompt-item .item-icon i,\n.action-item .item-icon i,\n.sub-agent-item .item-icon i,\n.model-item .item-icon i,\n.learning-item .item-icon i,\n.note-item .item-icon i {\n color: white;\n}\n\n.item-icon img.sub-agent-logo {\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: 6px;\n}\n\n.item-content {\n flex: 1;\n min-width: 0;\n}\n\n.item-title {\n font-size: 16px;\n font-weight: 600;\n color: #2c3e50;\n margin: 0 0 4px 0;\n line-height: 1.3;\n}\n\n.item-preview {\n color: #6c757d;\n font-size: 14px;\n line-height: 1.4;\n margin: 4px 0 8px 0;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n}\n\n.item-meta {\n display: flex;\n gap: 12px;\n align-items: center;\n flex-wrap: wrap;\n}\n\n.meta-tag,\n.priority-tag,\n.status-tag {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 12px;\n padding: 3px 8px;\n border-radius: 6px;\n font-weight: 500;\n}\n\n.meta-tag {\n background: #e9ecef;\n color: #495057;\n}\n\n.priority-tag {\n color: white;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.3px;\n}\n\n.status-tag {\n background: #e9ecef;\n color: #495057;\n}\n\n.status-tag.active {\n background: #d4edda;\n color: #28a745;\n}\n\n.status-tag.inactive {\n background: #f8d7da;\n color: #dc3545;\n}\n\n.item-actions {\n opacity: 0;\n transition: opacity 0.2s ease;\n color: #6c757d;\n font-size: 16px;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.entity-item:hover .item-actions {\n opacity: 1;\n}\n\n.entity-item:hover .item-actions > i {\n color: #2196f3;\n}\n\n.view-more-item {\n padding: 16px;\n background: linear-gradient(135deg, #f8f9fa, #e9ecef);\n border: 2px dashed #dee2e6;\n border-radius: 10px;\n text-align: center;\n cursor: pointer;\n transition: all 0.2s ease;\n color: #6c757d;\n font-weight: 500;\n}\n\n.view-more-item:hover {\n background: linear-gradient(135deg, #e9ecef, #dee2e6);\n border-color: #2196f3;\n color: #2196f3;\n}\n\n/* Payload Section Styles */\n.payload-config-section,\n.payload-paths-section,\n.payload-validation-section {\n margin-bottom: 32px;\n}\n\n.subsection-title {\n font-size: 16px;\n font-weight: 600;\n color: #2c3e50;\n margin: 0 0 16px 0;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.subsection-title i {\n color: #2196f3;\n}\n\n.subsection-divider {\n margin-top: 32px;\n margin-bottom: 16px;\n padding-top: 24px;\n border-top: 1px solid #e0e6ed;\n}\n\n.payload-config-grid {\n display: grid;\n grid-template-columns: 1fr 1fr 1fr;\n gap: 16px;\n margin-bottom: 24px;\n}\n\n.payload-field-group {\n margin-bottom: 20px;\n}\n\n.payload-field-label {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 14px;\n font-weight: 600;\n color: #495057;\n margin-bottom: 8px;\n}\n\n.payload-field-label i {\n color: #6c757d;\n font-size: 16px;\n}\n\n.field-description {\n font-size: 12px;\n font-weight: normal;\n color: #6c757d;\n margin-left: auto;\n}\n\n/* Code editor styling */\n.payload-field-group mj-code-editor {\n border: 1px solid #dee2e6;\n border-radius: 8px;\n overflow: hidden;\n}\n\n.payload-field-group mj-code-editor:hover {\n border-color: #2196f3;\n}\n\n/* Payload textarea styling */\n.payload-field-group mj-form-field ::ng-deep textarea {\n font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;\n font-size: 13px;\n line-height: 1.5;\n min-height: 120px;\n resize: vertical;\n}\n\n/* Execution History Panel */\n.execution-history-panel {\n max-height: 500px;\n overflow-y: auto;\n overflow-x: hidden;\n}\n\n/* Timeline List for Execution History */\n.timeline-list {\n display: flex;\n flex-direction: column;\n gap: 16px;\n margin-top: 16px;\n}\n\n.timeline-item {\n display: flex;\n align-items: flex-start;\n gap: 16px;\n padding: 16px;\n background: #f8f9fa;\n border: 1px solid #e0e6ed;\n border-radius: 10px;\n cursor: pointer;\n transition: all 0.2s ease;\n}\n\n.timeline-item:hover {\n background: white;\n border-color: #2196f3;\n box-shadow: 0 4px 12px rgba(0,0,0,0.08);\n}\n\n.timeline-marker {\n width: 32px;\n height: 32px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n box-shadow: 0 2px 8px rgba(0,0,0,0.1);\n}\n\n.timeline-marker i {\n color: white;\n font-size: 14px;\n}\n\n.timeline-content {\n flex: 1;\n min-width: 0;\n}\n\n.timeline-title {\n font-size: 16px;\n font-weight: 600;\n color: #2c3e50;\n margin: 0 0 8px 0;\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n gap: 16px;\n}\n\n.timeline-date {\n font-size: 12px;\n color: #6c757d;\n background: #e9ecef;\n padding: 2px 8px;\n border-radius: 6px;\n white-space: nowrap;\n flex-shrink: 0;\n}\n\n.timeline-meta {\n display: flex;\n align-items: center;\n gap: 12px;\n margin-bottom: 8px;\n}\n\n.timeline-preview {\n color: #6c757d;\n font-size: 14px;\n line-height: 1.4;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n}\n\n/* Modern Card-Based Interface (Legacy - Keep for backward compatibility) */\n.cards-container {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));\n gap: 20px;\n margin-top: 16px;\n}\n\n.entity-card {\n background: white;\n border: 1px solid #e0e6ed;\n border-radius: 12px;\n padding: 20px;\n cursor: pointer;\n transition: all 0.3s ease;\n box-shadow: 0 2px 8px rgba(0,0,0,0.06);\n position: relative;\n overflow: hidden;\n}\n\n.entity-card:hover {\n transform: translateY(-4px);\n box-shadow: 0 8px 24px rgba(0,0,0,0.12);\n border-color: #2196f3;\n}\n\n.entity-card::before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n height: 4px;\n background: linear-gradient(90deg, #2196f3, #42a5f5);\n opacity: 0;\n transition: opacity 0.3s ease;\n}\n\n.entity-card:hover::before {\n opacity: 1;\n}\n\n.card-header {\n display: flex;\n align-items: flex-start;\n gap: 12px;\n margin-bottom: 12px;\n}\n\n.card-icon {\n width: 40px;\n height: 40px;\n background: linear-gradient(135deg, #f8f9fa, #e9ecef);\n border-radius: 10px;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.sub-agent-card .card-icon {\n background: linear-gradient(135deg, #2196f3, #1976d2);\n}\n\n.prompt-card .card-icon {\n background: linear-gradient(135deg, #20c997, #17a673);\n}\n\n.action-card .card-icon {\n background: linear-gradient(135deg, #ffc107, #e0a800);\n}\n\n.card-icon i {\n font-size: 18px;\n color: #6c757d;\n}\n\n.sub-agent-card .card-icon i,\n.prompt-card .card-icon i,\n.action-card .card-icon i {\n color: white;\n}\n\n.card-title-section {\n flex: 1;\n min-width: 0;\n}\n\n.card-title {\n font-size: 16px;\n font-weight: 600;\n color: #2c3e50;\n margin: 0 0 4px 0;\n line-height: 1.3;\n word-wrap: break-word;\n}\n\n.card-description {\n color: #6c757d;\n font-size: 14px;\n line-height: 1.5;\n margin: 8px 0;\n display: -webkit-box;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n overflow: hidden;\n}\n\n.card-meta {\n display: flex;\n gap: 16px;\n margin-top: 12px;\n flex-wrap: wrap;\n}\n\n.meta-item {\n display: flex;\n align-items: center;\n gap: 6px;\n font-size: 12px;\n color: #6c757d;\n padding: 4px 8px;\n background: #f8f9fa;\n border-radius: 6px;\n}\n\n.meta-item i {\n font-size: 11px;\n opacity: 0.8;\n}\n\n.meta-item.active {\n color: #28a745;\n background: #d4edda;\n}\n\n.meta-item.inactive {\n color: #dc3545;\n background: #f8d7da;\n}\n\n.card-actions {\n opacity: 0;\n transition: opacity 0.3s ease;\n color: #6c757d;\n}\n\n.entity-card:hover .card-actions {\n opacity: 1;\n color: #2196f3;\n}\n\n/* Badge Styles */\n.priority-badge {\n padding: 2px 8px;\n border-radius: 12px;\n font-size: 11px;\n font-weight: 600;\n color: white;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n.type-badge {\n padding: 2px 8px;\n border-radius: 6px;\n font-size: 11px;\n font-weight: 500;\n background: #e9ecef;\n color: #495057;\n text-transform: uppercase;\n letter-spacing: 0.3px;\n}\n\n/* View All Card */\n.view-all-card {\n background: linear-gradient(135deg, #f8f9fa, #e9ecef);\n border: 2px dashed #dee2e6;\n border-radius: 12px;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 120px;\n cursor: pointer;\n transition: all 0.3s ease;\n}\n\n.view-all-card:hover {\n background: linear-gradient(135deg, #e9ecef, #dee2e6);\n border-color: #2196f3;\n transform: translateY(-2px);\n}\n\n.view-all-content {\n text-align: center;\n color: #6c757d;\n font-weight: 500;\n}\n\n.view-all-content i {\n font-size: 24px;\n margin-bottom: 8px;\n display: block;\n}\n\n/* Timeline Interface for History */\n.timeline-container {\n position: relative;\n margin-top: 16px;\n}\n\n.timeline-item {\n display: flex;\n flex-direction: column;\n margin-bottom: 24px;\n transition: all 0.3s ease;\n border-radius: 12px;\n padding: 16px;\n background: transparent;\n border: 1px solid transparent;\n}\n\n.timeline-item:hover {\n background: #f8f9fa;\n border-color: #e0e6ed;\n}\n\n.timeline-item.expanded {\n background: #f8f9fa;\n border-color: #2196f3;\n box-shadow: 0 4px 12px rgba(33, 150, 243, 0.1);\n}\n\n.timeline-item.view-all {\n cursor: pointer;\n background: linear-gradient(135deg, #f8f9fa, #e9ecef);\n border: 2px dashed #dee2e6;\n}\n\n.timeline-item.view-all:hover {\n background: linear-gradient(135deg, #e9ecef, #dee2e6);\n border-color: #2196f3;\n}\n\n.timeline-item > div:first-child {\n display: flex;\n align-items: flex-start;\n}\n\n.timeline-marker {\n width: 40px;\n height: 40px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-right: 16px;\n flex-shrink: 0;\n position: relative;\n box-shadow: 0 2px 8px rgba(0,0,0,0.1);\n}\n\n.timeline-marker::after {\n content: '';\n position: absolute;\n top: 50px;\n left: 50%;\n transform: translateX(-50%);\n width: 2px;\n height: 24px;\n background: #e0e6ed;\n}\n\n.timeline-item:last-child .timeline-marker::after {\n display: none;\n}\n\n.timeline-marker i {\n color: white;\n font-size: 16px;\n}\n\n.timeline-marker.view-all-marker {\n background: #6c757d;\n}\n\n.timeline-content {\n flex: 1;\n min-width: 0;\n display: flex;\n align-items: flex-start;\n}\n\n.timeline-header {\n flex: 1;\n cursor: pointer;\n}\n\n.timeline-header > div:first-child {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n margin-bottom: 8px;\n gap: 16px;\n}\n\n.expand-icon {\n transition: transform 0.3s ease;\n margin-right: 8px;\n color: #6c757d;\n}\n\n.expand-icon.expanded {\n transform: rotate(90deg);\n}\n\n.timeline-title {\n font-size: 16px;\n font-weight: 600;\n color: #2c3e50;\n margin: 0;\n line-height: 1.3;\n}\n\n.timeline-date {\n font-size: 12px;\n color: #6c757d;\n white-space: nowrap;\n background: #f8f9fa;\n padding: 4px 8px;\n border-radius: 6px;\n margin-left: auto;\n}\n\n.timeline-preview {\n font-size: 13px;\n color: #6c757d;\n line-height: 1.5;\n margin-top: 8px;\n padding: 8px 12px;\n background: #f8f9fa;\n border-radius: 6px;\n border: 1px solid #e0e6ed;\n}\n\n.timeline-status {\n display: flex;\n align-items: center;\n gap: 12px;\n margin-bottom: 8px;\n}\n\n.execution-time {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 12px;\n color: #6c757d;\n background: #f8f9fa;\n padding: 4px 8px;\n border-radius: 6px;\n}\n\n.timeline-description {\n color: #6c757d;\n font-size: 14px;\n line-height: 1.5;\n margin: 8px 0;\n}\n\n.timeline-error {\n color: #dc3545;\n font-size: 13px;\n background: #f8d7da;\n padding: 8px 12px;\n border-radius: 6px;\n margin-top: 8px;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.timeline-error i {\n flex-shrink: 0;\n}\n\n/* Expanded Content Styles */\n.timeline-expanded-content {\n margin-top: 20px;\n padding-top: 20px;\n border-top: 1px solid #e0e6ed;\n animation: fadeIn 0.3s ease;\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n transform: translateY(-10px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n.result-section,\n.error-section {\n margin-bottom: 20px;\n}\n\n.result-section h5,\n.error-section h5 {\n font-size: 14px;\n font-weight: 600;\n color: #495057;\n margin-bottom: 8px;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.error-section h5 {\n color: #dc3545;\n}\n\n.result-content,\n.error-content {\n background: white;\n border: 1px solid #e0e6ed;\n border-radius: 8px;\n padding: 12px 16px;\n font-size: 14px;\n line-height: 1.6;\n color: #495057;\n white-space: pre-wrap;\n word-break: break-word;\n max-height: 200px;\n overflow-y: auto;\n}\n\n/* Code editor styling within result section */\n.result-section mj-code-editor {\n border: 1px solid #e0e6ed;\n border-radius: 8px;\n overflow: hidden;\n}\n\n.error-content {\n background: #f8d7da;\n border-color: #f5c6cb;\n color: #721c24;\n}\n\n.execution-details {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));\n gap: 16px;\n margin-bottom: 20px;\n}\n\n.detail-row {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n}\n\n.detail-label {\n font-size: 12px;\n font-weight: 600;\n color: #6c757d;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n min-width: 80px;\n}\n\n.detail-value {\n font-size: 14px;\n color: #495057;\n word-break: break-all;\n}\n\n.timeline-actions {\n display: flex;\n gap: 12px;\n justify-content: flex-end;\n}\n\n.btn-primary {\n padding: 8px 16px;\n background: #2196f3;\n color: white;\n border: none;\n border-radius: 8px;\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n gap: 8px;\n transition: all 0.2s ease;\n}\n\n.btn-primary:hover {\n background: #1976d2;\n transform: translateY(-1px);\n box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);\n}\n\n.btn-primary i {\n font-size: 12px;\n}\n\n/* Enhanced Empty States */\n.empty-state {\n text-align: center;\n padding: 60px 20px;\n color: #6c757d;\n background: #f8f9fa;\n border-radius: 12px;\n border: 2px dashed #dee2e6;\n margin-top: 16px;\n}\n\n.empty-state i {\n font-size: 48px;\n color: #dee2e6;\n margin-bottom: 16px;\n}\n\n.empty-state h4 {\n color: #495057;\n font-weight: 600;\n margin-bottom: 8px;\n font-size: 18px;\n}\n\n.empty-state p {\n font-size: 15px;\n line-height: 1.6;\n max-width: 400px;\n margin: 0 auto 20px auto;\n}\n\n/* Responsive Design */\n@media (max-width: 768px) {\n /* Header Responsiveness */\n .agent-header {\n padding: 16px;\n }\n \n .agent-header-content {\n flex-direction: column;\n gap: 16px;\n }\n \n .agent-overview {\n flex-direction: column;\n align-items: flex-start;\n gap: 12px;\n }\n \n .agent-meta {\n flex-direction: column;\n align-items: flex-start;\n gap: 8px;\n }\n \n .agent-actions {\n width: 100%;\n align-self: stretch;\n }\n \n .action-button {\n flex: 1;\n justify-content: center;\n }\n \n /* Panel Responsiveness */\n .form-content {\n padding: 12px;\n }\n \n ::ng-deep .k-panelbar > .k-panelbar-item > .k-header {\n padding: 16px 20px;\n font-size: 15px;\n }\n \n .panel-content {\n padding: 20px 16px;\n }\n \n .section-header {\n flex-direction: column;\n align-items: flex-start;\n gap: 12px;\n }\n \n .header-actions {\n flex-wrap: wrap;\n align-self: stretch;\n }\n \n /* Entity List Responsiveness */\n .entity-item {\n padding: 12px;\n gap: 12px;\n }\n \n .item-icon {\n width: 36px;\n height: 36px;\n }\n \n .item-icon i {\n font-size: 16px;\n }\n \n .item-title {\n font-size: 15px;\n }\n \n .item-preview {\n font-size: 13px;\n }\n \n .item-meta {\n gap: 8px;\n }\n \n /* Timeline Responsiveness */\n .timeline-item {\n padding: 12px;\n gap: 12px;\n }\n \n .timeline-marker {\n width: 28px;\n height: 28px;\n }\n \n .timeline-marker i {\n font-size: 12px;\n }\n \n .timeline-title {\n flex-direction: column;\n align-items: flex-start;\n gap: 8px;\n }\n \n .timeline-date {\n align-self: flex-start;\n }\n \n /* Form Field Responsiveness */\n .form-fields-grid {\n grid-template-columns: 1fr;\n gap: 16px;\n }\n \n /* Legacy card support */\n .cards-container {\n grid-template-columns: 1fr;\n }\n}\n\n/* Execution History Panel - Max Height and Scroll */\n.execution-history-panel {\n max-height: 500px;\n overflow-y: auto;\n overflow-x: hidden;\n}\n\n/* Custom scrollbar for execution history */\n.execution-history-panel::-webkit-scrollbar {\n width: 8px;\n}\n\n.execution-history-panel::-webkit-scrollbar-track {\n background: #f1f1f1;\n border-radius: 4px;\n}\n\n.execution-history-panel::-webkit-scrollbar-thumb {\n background: #c1c1c1;\n border-radius: 4px;\n}\n\n.execution-history-panel::-webkit-scrollbar-thumb:hover {\n background: #a0a0a0;\n}\n\n"] }]
2841
+ }], () => [{ type: i0.ElementRef }, { type: i1.SharedService }, { type: i2.Router }, { type: i2.ActivatedRoute }, { type: i0.ChangeDetectorRef }, { type: i3.DialogService }, { type: i0.ViewContainerRef }, { type: i4.AIAgentManagementService }, { type: i5.AITestHarnessDialogService }], null); })();
1951
2842
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(AIAgentFormComponentExtended, { className: "AIAgentFormComponentExtended", filePath: "src/lib/custom/AIAgents/ai-agent-form.component.ts", lineNumber: 52 }); })();
1952
2843
  export function LoadAIAgentFormComponentExtended() {
1953
2844
  // This function is called to ensure the component is loaded and registered