@memberjunction/ng-core-entity-forms 2.69.1 → 2.71.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 (72) 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/AIPromptRuns/ai-prompt-run-form.component.d.ts +12 -2
  43. package/dist/lib/custom/AIPromptRuns/ai-prompt-run-form.component.d.ts.map +1 -1
  44. package/dist/lib/custom/AIPromptRuns/ai-prompt-run-form.component.js +385 -228
  45. package/dist/lib/custom/AIPromptRuns/ai-prompt-run-form.component.js.map +1 -1
  46. package/dist/lib/custom/AIPromptRuns/chat-message-viewer.component.d.ts +72 -0
  47. package/dist/lib/custom/AIPromptRuns/chat-message-viewer.component.d.ts.map +1 -0
  48. package/dist/lib/custom/AIPromptRuns/chat-message-viewer.component.js +526 -0
  49. package/dist/lib/custom/AIPromptRuns/chat-message-viewer.component.js.map +1 -0
  50. package/dist/lib/custom/AIPrompts/ai-prompt-form.component.d.ts +90 -10
  51. package/dist/lib/custom/AIPrompts/ai-prompt-form.component.d.ts.map +1 -1
  52. package/dist/lib/custom/AIPrompts/ai-prompt-form.component.js +1159 -687
  53. package/dist/lib/custom/AIPrompts/ai-prompt-form.component.js.map +1 -1
  54. package/dist/lib/custom/AIPrompts/ai-prompt-management.service.d.ts +27 -0
  55. package/dist/lib/custom/AIPrompts/ai-prompt-management.service.d.ts.map +1 -0
  56. package/dist/lib/custom/AIPrompts/ai-prompt-management.service.js +88 -0
  57. package/dist/lib/custom/AIPrompts/ai-prompt-management.service.js.map +1 -0
  58. package/dist/lib/custom/AIPrompts/template-selector-dialog.component.d.ts +69 -0
  59. package/dist/lib/custom/AIPrompts/template-selector-dialog.component.d.ts.map +1 -0
  60. package/dist/lib/custom/AIPrompts/template-selector-dialog.component.js +442 -0
  61. package/dist/lib/custom/AIPrompts/template-selector-dialog.component.js.map +1 -0
  62. package/dist/lib/custom/ai-agent-run/ai-agent-run.component.js +2 -2
  63. package/dist/lib/custom/ai-agent-run/ai-agent-run.component.js.map +1 -1
  64. package/dist/lib/custom/custom-forms.module.d.ts +40 -32
  65. package/dist/lib/custom/custom-forms.module.d.ts.map +1 -1
  66. package/dist/lib/custom/custom-forms.module.js +35 -3
  67. package/dist/lib/custom/custom-forms.module.js.map +1 -1
  68. package/dist/lib/shared/components/template-editor.component.d.ts +8 -2
  69. package/dist/lib/shared/components/template-editor.component.d.ts.map +1 -1
  70. package/dist/lib/shared/components/template-editor.component.js +58 -23
  71. package/dist/lib/shared/components/template-editor.component.js.map +1 -1
  72. package/package.json +16 -16
@@ -0,0 +1,708 @@
1
+ import { Component } from '@angular/core';
2
+ import { FormControl, FormGroup, Validators } from '@angular/forms';
3
+ import { Subject, BehaviorSubject, takeUntil } from 'rxjs';
4
+ import { Metadata, RunView } from '@memberjunction/core';
5
+ import { MJNotificationService } from '@memberjunction/ng-notifications';
6
+ import * as i0 from "@angular/core";
7
+ import * as i1 from "@progress/kendo-angular-dialog";
8
+ import * as i2 from "./ai-agent-management.service";
9
+ import * as i3 from "@angular/forms";
10
+ import * as i4 from "@angular/common";
11
+ const _forTrack0 = ($index, $item) => $item.ID;
12
+ function CreateSubAgentDialogComponent_Conditional_5_Template(rf, ctx) { if (rf & 1) {
13
+ i0.ɵɵelementStart(0, "p", 4);
14
+ i0.ɵɵelement(1, "i", 11);
15
+ i0.ɵɵtext(2, " Sub-agent of: ");
16
+ i0.ɵɵelementStart(3, "strong");
17
+ i0.ɵɵtext(4);
18
+ i0.ɵɵelementEnd()();
19
+ } if (rf & 2) {
20
+ const ctx_r0 = i0.ɵɵnextContext();
21
+ i0.ɵɵadvance(4);
22
+ i0.ɵɵtextInterpolate(ctx_r0.config.parentAgentName);
23
+ } }
24
+ function CreateSubAgentDialogComponent_Conditional_6_Template(rf, ctx) { if (rf & 1) {
25
+ i0.ɵɵelementStart(0, "div", 5);
26
+ i0.ɵɵelement(1, "i", 12);
27
+ i0.ɵɵelementStart(2, "span");
28
+ i0.ɵɵtext(3, "Loading sub-agent creation form...");
29
+ i0.ɵɵelementEnd()();
30
+ } }
31
+ function CreateSubAgentDialogComponent_Conditional_8_For_17_Template(rf, ctx) { if (rf & 1) {
32
+ i0.ɵɵelementStart(0, "option", 23);
33
+ i0.ɵɵtext(1);
34
+ i0.ɵɵelementEnd();
35
+ } if (rf & 2) {
36
+ const type_r3 = ctx.$implicit;
37
+ i0.ɵɵproperty("value", type_r3.ID);
38
+ i0.ɵɵadvance();
39
+ i0.ɵɵtextInterpolate(type_r3.Name);
40
+ } }
41
+ function CreateSubAgentDialogComponent_Conditional_8_Conditional_108_For_2_Conditional_5_Template(rf, ctx) { if (rf & 1) {
42
+ i0.ɵɵelementStart(0, "span", 68);
43
+ i0.ɵɵtext(1);
44
+ i0.ɵɵelementEnd();
45
+ } if (rf & 2) {
46
+ const prompt_r5 = i0.ɵɵnextContext().$implicit;
47
+ i0.ɵɵadvance();
48
+ i0.ɵɵtextInterpolate(prompt_r5.Description);
49
+ } }
50
+ function CreateSubAgentDialogComponent_Conditional_8_Conditional_108_For_2_Template(rf, ctx) { if (rf & 1) {
51
+ const _r4 = i0.ɵɵgetCurrentView();
52
+ i0.ɵɵelementStart(0, "div", 65)(1, "div", 66);
53
+ i0.ɵɵelement(2, "i", 57);
54
+ i0.ɵɵelementStart(3, "span", 67);
55
+ i0.ɵɵtext(4);
56
+ i0.ɵɵelementEnd();
57
+ i0.ɵɵtemplate(5, CreateSubAgentDialogComponent_Conditional_8_Conditional_108_For_2_Conditional_5_Template, 2, 1, "span", 68);
58
+ i0.ɵɵelementEnd();
59
+ i0.ɵɵelementStart(6, "button", 69);
60
+ i0.ɵɵlistener("click", function CreateSubAgentDialogComponent_Conditional_8_Conditional_108_For_2_Template_button_click_6_listener() { const prompt_r5 = i0.ɵɵrestoreView(_r4).$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.removePrompt(prompt_r5)); });
61
+ i0.ɵɵelement(7, "i", 9);
62
+ i0.ɵɵelementEnd()();
63
+ } if (rf & 2) {
64
+ const prompt_r5 = ctx.$implicit;
65
+ i0.ɵɵadvance(4);
66
+ i0.ɵɵtextInterpolate(prompt_r5.Name);
67
+ i0.ɵɵadvance();
68
+ i0.ɵɵconditional(prompt_r5.Description ? 5 : -1);
69
+ } }
70
+ function CreateSubAgentDialogComponent_Conditional_8_Conditional_108_Template(rf, ctx) { if (rf & 1) {
71
+ i0.ɵɵelementStart(0, "div", 62);
72
+ i0.ɵɵrepeaterCreate(1, CreateSubAgentDialogComponent_Conditional_8_Conditional_108_For_2_Template, 8, 2, "div", 65, _forTrack0);
73
+ i0.ɵɵelementEnd();
74
+ } if (rf & 2) {
75
+ const ctx_r0 = i0.ɵɵnextContext(2);
76
+ i0.ɵɵadvance();
77
+ i0.ɵɵrepeater(ctx_r0.linkedPrompts);
78
+ } }
79
+ function CreateSubAgentDialogComponent_Conditional_8_Conditional_109_Template(rf, ctx) { if (rf & 1) {
80
+ i0.ɵɵelementStart(0, "div", 63);
81
+ i0.ɵɵelement(1, "i", 57);
82
+ i0.ɵɵelementStart(2, "p");
83
+ i0.ɵɵtext(3, "No prompts added yet. Click the buttons above to add prompts.");
84
+ i0.ɵɵelementEnd()();
85
+ } }
86
+ function CreateSubAgentDialogComponent_Conditional_8_Conditional_118_For_2_Conditional_5_Template(rf, ctx) { if (rf & 1) {
87
+ i0.ɵɵelementStart(0, "span", 68);
88
+ i0.ɵɵtext(1);
89
+ i0.ɵɵelementEnd();
90
+ } if (rf & 2) {
91
+ const action_r7 = i0.ɵɵnextContext().$implicit;
92
+ i0.ɵɵadvance();
93
+ i0.ɵɵtextInterpolate(action_r7.Description);
94
+ } }
95
+ function CreateSubAgentDialogComponent_Conditional_8_Conditional_118_For_2_Template(rf, ctx) { if (rf & 1) {
96
+ const _r6 = i0.ɵɵgetCurrentView();
97
+ i0.ɵɵelementStart(0, "div", 70)(1, "div", 66);
98
+ i0.ɵɵelement(2, "i", 64);
99
+ i0.ɵɵelementStart(3, "span", 67);
100
+ i0.ɵɵtext(4);
101
+ i0.ɵɵelementEnd();
102
+ i0.ɵɵtemplate(5, CreateSubAgentDialogComponent_Conditional_8_Conditional_118_For_2_Conditional_5_Template, 2, 1, "span", 68);
103
+ i0.ɵɵelementEnd();
104
+ i0.ɵɵelementStart(6, "button", 69);
105
+ i0.ɵɵlistener("click", function CreateSubAgentDialogComponent_Conditional_8_Conditional_118_For_2_Template_button_click_6_listener() { const action_r7 = i0.ɵɵrestoreView(_r6).$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.removeAction(action_r7)); });
106
+ i0.ɵɵelement(7, "i", 9);
107
+ i0.ɵɵelementEnd()();
108
+ } if (rf & 2) {
109
+ const action_r7 = ctx.$implicit;
110
+ i0.ɵɵadvance(4);
111
+ i0.ɵɵtextInterpolate(action_r7.Name);
112
+ i0.ɵɵadvance();
113
+ i0.ɵɵconditional(action_r7.Description ? 5 : -1);
114
+ } }
115
+ function CreateSubAgentDialogComponent_Conditional_8_Conditional_118_Template(rf, ctx) { if (rf & 1) {
116
+ i0.ɵɵelementStart(0, "div", 62);
117
+ i0.ɵɵrepeaterCreate(1, CreateSubAgentDialogComponent_Conditional_8_Conditional_118_For_2_Template, 8, 2, "div", 70, _forTrack0);
118
+ i0.ɵɵelementEnd();
119
+ } if (rf & 2) {
120
+ const ctx_r0 = i0.ɵɵnextContext(2);
121
+ i0.ɵɵadvance();
122
+ i0.ɵɵrepeater(ctx_r0.linkedActions);
123
+ } }
124
+ function CreateSubAgentDialogComponent_Conditional_8_Conditional_119_Template(rf, ctx) { if (rf & 1) {
125
+ i0.ɵɵelementStart(0, "div", 63);
126
+ i0.ɵɵelement(1, "i", 64);
127
+ i0.ɵɵelementStart(2, "p");
128
+ i0.ɵɵtext(3, "No actions added yet. Click the button above to add actions.");
129
+ i0.ɵɵelementEnd()();
130
+ } }
131
+ function CreateSubAgentDialogComponent_Conditional_8_Template(rf, ctx) { if (rf & 1) {
132
+ const _r2 = i0.ɵɵgetCurrentView();
133
+ i0.ɵɵelementStart(0, "form", 6)(1, "div", 13)(2, "h3", 14);
134
+ i0.ɵɵelement(3, "i", 15);
135
+ i0.ɵɵtext(4, " Basic Information ");
136
+ i0.ɵɵelementEnd();
137
+ i0.ɵɵelementStart(5, "div", 16)(6, "div", 17)(7, "label", 18);
138
+ i0.ɵɵtext(8, "Name *");
139
+ i0.ɵɵelementEnd();
140
+ i0.ɵɵelement(9, "input", 19);
141
+ i0.ɵɵelementEnd();
142
+ i0.ɵɵelementStart(10, "div", 17)(11, "label", 20);
143
+ i0.ɵɵtext(12, "Type *");
144
+ i0.ɵɵelementEnd();
145
+ i0.ɵɵelementStart(13, "select", 21)(14, "option", 22);
146
+ i0.ɵɵtext(15, "Select agent type...");
147
+ i0.ɵɵelementEnd();
148
+ i0.ɵɵrepeaterCreate(16, CreateSubAgentDialogComponent_Conditional_8_For_17_Template, 2, 2, "option", 23, _forTrack0);
149
+ i0.ɵɵpipe(18, "async");
150
+ i0.ɵɵelementEnd()()();
151
+ i0.ɵɵelementStart(19, "div", 16)(20, "div", 17)(21, "label", 24);
152
+ i0.ɵɵtext(22, "Description");
153
+ i0.ɵɵelementEnd();
154
+ i0.ɵɵelement(23, "textarea", 25);
155
+ i0.ɵɵelementEnd()();
156
+ i0.ɵɵelementStart(24, "div", 16)(25, "div", 17)(26, "label", 26);
157
+ i0.ɵɵtext(27, "Status");
158
+ i0.ɵɵelementEnd();
159
+ i0.ɵɵelementStart(28, "select", 27)(29, "option", 28);
160
+ i0.ɵɵtext(30, "Pending");
161
+ i0.ɵɵelementEnd();
162
+ i0.ɵɵelementStart(31, "option", 29);
163
+ i0.ɵɵtext(32, "Active");
164
+ i0.ɵɵelementEnd();
165
+ i0.ɵɵelementStart(33, "option", 30);
166
+ i0.ɵɵtext(34, "Disabled");
167
+ i0.ɵɵelementEnd()()();
168
+ i0.ɵɵelementStart(35, "div", 17)(36, "label", 31);
169
+ i0.ɵɵtext(37, "Execution Mode");
170
+ i0.ɵɵelementEnd();
171
+ i0.ɵɵelementStart(38, "select", 32)(39, "option", 33);
172
+ i0.ɵɵtext(40, "Sequential");
173
+ i0.ɵɵelementEnd();
174
+ i0.ɵɵelementStart(41, "option", 34);
175
+ i0.ɵɵtext(42, "Parallel");
176
+ i0.ɵɵelementEnd()()()()();
177
+ i0.ɵɵelementStart(43, "div", 13)(44, "h3", 14);
178
+ i0.ɵɵelement(45, "i", 35);
179
+ i0.ɵɵtext(46, " Purpose & Messages ");
180
+ i0.ɵɵelementEnd();
181
+ i0.ɵɵelementStart(47, "div", 16)(48, "div", 17)(49, "label", 36);
182
+ i0.ɵɵtext(50, "Purpose");
183
+ i0.ɵɵelementEnd();
184
+ i0.ɵɵelement(51, "input", 37);
185
+ i0.ɵɵelementEnd()();
186
+ i0.ɵɵelementStart(52, "div", 16)(53, "div", 17)(54, "label", 38);
187
+ i0.ɵɵtext(55, "User Message");
188
+ i0.ɵɵelementEnd();
189
+ i0.ɵɵelement(56, "textarea", 39);
190
+ i0.ɵɵelementEnd()()();
191
+ i0.ɵɵelementStart(57, "div", 13)(58, "h3", 14);
192
+ i0.ɵɵelement(59, "i", 40);
193
+ i0.ɵɵtext(60, " Model Configuration ");
194
+ i0.ɵɵelementEnd();
195
+ i0.ɵɵelementStart(61, "div", 16)(62, "div", 17)(63, "label", 41);
196
+ i0.ɵɵtext(64, "Model Selection Mode");
197
+ i0.ɵɵelementEnd();
198
+ i0.ɵɵelementStart(65, "select", 42)(66, "option", 43);
199
+ i0.ɵɵtext(67, "Agent Type");
200
+ i0.ɵɵelementEnd();
201
+ i0.ɵɵelementStart(68, "option", 44);
202
+ i0.ɵɵtext(69, "Agent");
203
+ i0.ɵɵelementEnd()()()();
204
+ i0.ɵɵelementStart(70, "div", 16)(71, "div", 17)(72, "label", 45);
205
+ i0.ɵɵtext(73, "Temperature");
206
+ i0.ɵɵelementEnd();
207
+ i0.ɵɵelement(74, "input", 46);
208
+ i0.ɵɵelementEnd();
209
+ i0.ɵɵelementStart(75, "div", 17)(76, "label", 47);
210
+ i0.ɵɵtext(77, "Top P");
211
+ i0.ɵɵelementEnd();
212
+ i0.ɵɵelement(78, "input", 48);
213
+ i0.ɵɵelementEnd()();
214
+ i0.ɵɵelementStart(79, "div", 16)(80, "div", 17)(81, "label", 49);
215
+ i0.ɵɵtext(82, "Top K");
216
+ i0.ɵɵelementEnd();
217
+ i0.ɵɵelement(83, "input", 50);
218
+ i0.ɵɵelementEnd();
219
+ i0.ɵɵelementStart(84, "div", 17)(85, "label", 51);
220
+ i0.ɵɵtext(86, "Max Tokens");
221
+ i0.ɵɵelementEnd();
222
+ i0.ɵɵelement(87, "input", 52);
223
+ i0.ɵɵelementEnd()();
224
+ i0.ɵɵelementStart(88, "div", 16)(89, "div", 17)(90, "label", 53);
225
+ i0.ɵɵelement(91, "input", 54);
226
+ i0.ɵɵtext(92, " Enable Caching ");
227
+ i0.ɵɵelementEnd()();
228
+ i0.ɵɵelementStart(93, "div", 17)(94, "label", 55);
229
+ i0.ɵɵtext(95, "Cache TTL (seconds)");
230
+ i0.ɵɵelementEnd();
231
+ i0.ɵɵelement(96, "input", 56);
232
+ i0.ɵɵelementEnd()()();
233
+ i0.ɵɵelementStart(97, "div", 13)(98, "h3", 14);
234
+ i0.ɵɵelement(99, "i", 57);
235
+ i0.ɵɵtext(100);
236
+ i0.ɵɵelementEnd();
237
+ i0.ɵɵelementStart(101, "div", 58)(102, "button", 59);
238
+ i0.ɵɵlistener("click", function CreateSubAgentDialogComponent_Conditional_8_Template_button_click_102_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.addPrompt()); });
239
+ i0.ɵɵelement(103, "i", 60);
240
+ i0.ɵɵtext(104, " Add Existing Prompt ");
241
+ i0.ɵɵelementEnd();
242
+ i0.ɵɵelementStart(105, "button", 61);
243
+ i0.ɵɵlistener("click", function CreateSubAgentDialogComponent_Conditional_8_Template_button_click_105_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.createNewPrompt()); });
244
+ i0.ɵɵelement(106, "i", 60);
245
+ i0.ɵɵtext(107, " Create New Prompt ");
246
+ i0.ɵɵelementEnd()();
247
+ i0.ɵɵtemplate(108, CreateSubAgentDialogComponent_Conditional_8_Conditional_108_Template, 3, 0, "div", 62)(109, CreateSubAgentDialogComponent_Conditional_8_Conditional_109_Template, 4, 0, "div", 63);
248
+ i0.ɵɵelementEnd();
249
+ i0.ɵɵelementStart(110, "div", 13)(111, "h3", 14);
250
+ i0.ɵɵelement(112, "i", 64);
251
+ i0.ɵɵtext(113);
252
+ i0.ɵɵelementEnd();
253
+ i0.ɵɵelementStart(114, "div", 58)(115, "button", 59);
254
+ i0.ɵɵlistener("click", function CreateSubAgentDialogComponent_Conditional_8_Template_button_click_115_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.addAction()); });
255
+ i0.ɵɵelement(116, "i", 60);
256
+ i0.ɵɵtext(117, " Add Action ");
257
+ i0.ɵɵelementEnd()();
258
+ i0.ɵɵtemplate(118, CreateSubAgentDialogComponent_Conditional_8_Conditional_118_Template, 3, 0, "div", 62)(119, CreateSubAgentDialogComponent_Conditional_8_Conditional_119_Template, 4, 0, "div", 63);
259
+ i0.ɵɵelementEnd()();
260
+ } if (rf & 2) {
261
+ const ctx_r0 = i0.ɵɵnextContext();
262
+ i0.ɵɵproperty("formGroup", ctx_r0.subAgentForm);
263
+ i0.ɵɵadvance(16);
264
+ i0.ɵɵrepeater(i0.ɵɵpipeBind1(18, 5, ctx_r0.availableAgentTypes$));
265
+ i0.ɵɵadvance(84);
266
+ i0.ɵɵtextInterpolate1(" Prompts (", ctx_r0.linkedPromptCount, ") ");
267
+ i0.ɵɵadvance(8);
268
+ i0.ɵɵconditional(ctx_r0.linkedPrompts.length > 0 ? 108 : 109);
269
+ i0.ɵɵadvance(5);
270
+ i0.ɵɵtextInterpolate1(" Actions (", ctx_r0.linkedActionCount, ") ");
271
+ i0.ɵɵadvance(5);
272
+ i0.ɵɵconditional(ctx_r0.linkedActions.length > 0 ? 118 : 119);
273
+ } }
274
+ function CreateSubAgentDialogComponent_Conditional_16_Template(rf, ctx) { if (rf & 1) {
275
+ i0.ɵɵelement(0, "i", 12);
276
+ i0.ɵɵtext(1, " Creating... ");
277
+ } }
278
+ function CreateSubAgentDialogComponent_Conditional_18_Template(rf, ctx) { if (rf & 1) {
279
+ i0.ɵɵelement(0, "i", 71);
280
+ i0.ɵɵtext(1, " Create Sub-Agent ");
281
+ } }
282
+ /**
283
+ * Dialog for creating new AI Sub-Agents with essential fields, actions, and prompts management.
284
+ * Creates entities but does not save them - returns entities for parent to add to PendingRecords.
285
+ * This ensures atomicity with the parent form's save operation.
286
+ */
287
+ export class CreateSubAgentDialogComponent {
288
+ constructor(dialogRef, cdr, agentManagementService) {
289
+ this.dialogRef = dialogRef;
290
+ this.cdr = cdr;
291
+ this.agentManagementService = agentManagementService;
292
+ // Configuration
293
+ this.config = {};
294
+ // State management
295
+ this.destroy$ = new Subject();
296
+ this.result = new Subject();
297
+ this.isLoading$ = new BehaviorSubject(false);
298
+ this.isSaving$ = new BehaviorSubject(false);
299
+ // Data
300
+ this.availableAgentTypes$ = new BehaviorSubject([]);
301
+ this.availablePrompts$ = new BehaviorSubject([]);
302
+ this.availableActions$ = new BehaviorSubject([]);
303
+ // Entities (not saved to database)
304
+ this.subAgentEntity = null;
305
+ this.linkedPrompts = [];
306
+ this.linkedActions = [];
307
+ // Link entities for database relationships
308
+ this.agentPromptLinks = [];
309
+ this.agentActionLinks = [];
310
+ // Storage for new entities created within dialog
311
+ this.newlyCreatedPrompts = [];
312
+ this.newlyCreatedPromptTemplates = [];
313
+ this.newlyCreatedTemplateContents = [];
314
+ this.subAgentForm = this.createForm();
315
+ }
316
+ ngOnInit() {
317
+ this.loadInitialData();
318
+ this.setupFormWatching();
319
+ }
320
+ ngOnDestroy() {
321
+ this.destroy$.next();
322
+ this.destroy$.complete();
323
+ }
324
+ createForm() {
325
+ return new FormGroup({
326
+ name: new FormControl(this.config.initialName || '', [Validators.required]),
327
+ description: new FormControl(''),
328
+ typeID: new FormControl(this.config.initialTypeID || '', [Validators.required]),
329
+ status: new FormControl('Pending'),
330
+ executionMode: new FormControl('Sequential'),
331
+ purpose: new FormControl(''),
332
+ userMessage: new FormControl(''),
333
+ // systemMessage: new FormControl(''), // SystemMessage does not exist on AIAgentEntity
334
+ modelSelectionMode: new FormControl('Agent Type'),
335
+ temperature: new FormControl(0.1),
336
+ topP: new FormControl(0.1),
337
+ topK: new FormControl(40),
338
+ maxTokens: new FormControl(4000),
339
+ enableCaching: new FormControl(false),
340
+ cacheTTL: new FormControl(3600)
341
+ });
342
+ }
343
+ setupFormWatching() {
344
+ // Watch for form changes to update entity
345
+ this.subAgentForm.valueChanges
346
+ .pipe(takeUntil(this.destroy$))
347
+ .subscribe(formValue => {
348
+ this.updateSubAgentEntity(formValue);
349
+ });
350
+ }
351
+ async loadInitialData() {
352
+ this.isLoading$.next(true);
353
+ try {
354
+ const rv = new RunView();
355
+ // Load agent types
356
+ const typesResult = await rv.RunView({
357
+ EntityName: 'MJ: AI Agent Types',
358
+ OrderBy: 'Name ASC',
359
+ ResultType: 'entity_object'
360
+ });
361
+ if (typesResult.Success && typesResult.Results) {
362
+ this.availableAgentTypes$.next(typesResult.Results);
363
+ // Set default type if not specified
364
+ if (!this.config.initialTypeID && typesResult.Results.length > 0) {
365
+ this.subAgentForm.patchValue({ typeID: typesResult.Results[0].ID });
366
+ }
367
+ }
368
+ // Load available prompts
369
+ const promptsResult = await rv.RunView({
370
+ EntityName: 'AI Prompts',
371
+ ExtraFilter: `Status = 'Active'`,
372
+ OrderBy: 'Name ASC',
373
+ MaxRows: 1000,
374
+ ResultType: 'entity_object'
375
+ });
376
+ if (promptsResult.Success && promptsResult.Results) {
377
+ this.availablePrompts$.next(promptsResult.Results);
378
+ }
379
+ // Load available actions
380
+ const actionsResult = await rv.RunView({
381
+ EntityName: 'Actions',
382
+ ExtraFilter: `Status = 'Active'`,
383
+ OrderBy: 'Name ASC',
384
+ MaxRows: 1000,
385
+ ResultType: 'entity_object'
386
+ });
387
+ if (actionsResult.Success && actionsResult.Results) {
388
+ this.availableActions$.next(actionsResult.Results);
389
+ }
390
+ // Create the sub-agent entity
391
+ const md = new Metadata();
392
+ this.subAgentEntity = await md.GetEntityObject('AI Agents');
393
+ this.subAgentEntity.NewRecord();
394
+ // Set default values
395
+ this.subAgentEntity.Status = 'Pending';
396
+ this.subAgentEntity.ExecutionMode = 'Sequential';
397
+ this.subAgentEntity.ExposeAsAction = false; // Database constraint for sub-agents
398
+ this.subAgentEntity.ParentID = this.config.parentAgentId;
399
+ this.subAgentEntity.ModelSelectionMode = 'Agent Type';
400
+ this.subAgentEntity.Set('Temperature', 0.1);
401
+ this.subAgentEntity.Set('TopP', 0.1);
402
+ this.subAgentEntity.Set('TopK', 40);
403
+ this.subAgentEntity.Set('MaxTokensPerRun', 4000);
404
+ this.subAgentEntity.Set('EnableCaching', false);
405
+ this.subAgentEntity.Set('CacheTTLSeconds', 3600);
406
+ // Update form with initial values
407
+ this.updateSubAgentEntity(this.subAgentForm.value);
408
+ }
409
+ catch (error) {
410
+ console.error('Error loading sub-agent creation data:', error);
411
+ MJNotificationService.Instance.CreateSimpleNotification('Error loading data for sub-agent creation', 'error', 3000);
412
+ }
413
+ finally {
414
+ this.isLoading$.next(false);
415
+ }
416
+ }
417
+ updateSubAgentEntity(formValue) {
418
+ if (!this.subAgentEntity)
419
+ return;
420
+ // Update entity with form values
421
+ this.subAgentEntity.Name = formValue.name;
422
+ this.subAgentEntity.Description = formValue.description || '';
423
+ this.subAgentEntity.TypeID = formValue.typeID;
424
+ this.subAgentEntity.Status = formValue.status;
425
+ this.subAgentEntity.ExecutionMode = formValue.executionMode;
426
+ this.subAgentEntity.Set('Purpose', formValue.purpose || '');
427
+ this.subAgentEntity.Set('UserMessage', formValue.userMessage || '');
428
+ // Note: SystemMessage does not exist on AIAgentEntity, removing this line
429
+ this.subAgentEntity.ModelSelectionMode = formValue.modelSelectionMode;
430
+ this.subAgentEntity.Set('Temperature', formValue.temperature);
431
+ this.subAgentEntity.Set('TopP', formValue.topP);
432
+ this.subAgentEntity.Set('TopK', formValue.topK);
433
+ this.subAgentEntity.Set('MaxTokensPerRun', formValue.maxTokens);
434
+ this.subAgentEntity.Set('EnableCaching', formValue.enableCaching);
435
+ this.subAgentEntity.Set('CacheTTLSeconds', formValue.cacheTTL);
436
+ }
437
+ async addPrompt() {
438
+ // Get currently linked prompt IDs
439
+ const linkedPromptIds = this.linkedPrompts.map(p => p.ID);
440
+ try {
441
+ this.agentManagementService.openPromptSelectorDialog({
442
+ title: 'Add Prompts to Sub-Agent',
443
+ multiSelect: true,
444
+ selectedPromptIds: [],
445
+ showCreateNew: true,
446
+ linkedPromptIds: linkedPromptIds,
447
+ viewContainerRef: undefined // Will be top-level modal
448
+ }).subscribe({
449
+ next: async (result) => {
450
+ if (result && result.selectedPrompts.length > 0) {
451
+ // Filter out already linked prompts
452
+ const newPrompts = result.selectedPrompts.filter(prompt => !linkedPromptIds.includes(prompt.ID));
453
+ if (newPrompts.length > 0) {
454
+ // Add to UI
455
+ this.linkedPrompts.push(...newPrompts);
456
+ // Create agent prompt link entities
457
+ const md = new Metadata();
458
+ for (const prompt of newPrompts) {
459
+ const agentPrompt = await md.GetEntityObject('MJ: AI Agent Prompts');
460
+ agentPrompt.NewRecord();
461
+ agentPrompt.AgentID = this.subAgentEntity.ID;
462
+ agentPrompt.PromptID = prompt.ID;
463
+ agentPrompt.Status = 'Active';
464
+ agentPrompt.ExecutionOrder = this.agentPromptLinks.length + 1;
465
+ this.agentPromptLinks.push(agentPrompt);
466
+ }
467
+ // Trigger change detection
468
+ this.cdr.detectChanges();
469
+ MJNotificationService.Instance.CreateSimpleNotification(`${newPrompts.length} prompt${newPrompts.length === 1 ? '' : 's'} added to sub-agent`, 'success', 3000);
470
+ }
471
+ }
472
+ else if (result && result.createNew) {
473
+ // User wants to create a new prompt
474
+ await this.createNewPrompt();
475
+ }
476
+ },
477
+ error: (error) => {
478
+ console.error('Error opening prompt selector:', error);
479
+ MJNotificationService.Instance.CreateSimpleNotification('Error opening prompt selector. Please try again.', 'error', 3000);
480
+ }
481
+ });
482
+ }
483
+ catch (error) {
484
+ console.error('Error in addPrompt:', error);
485
+ MJNotificationService.Instance.CreateSimpleNotification('Error adding prompts. Please try again.', 'error', 3000);
486
+ }
487
+ }
488
+ async createNewPrompt() {
489
+ try {
490
+ this.agentManagementService.openCreatePromptDialog({
491
+ title: `Create New Prompt for ${this.subAgentEntity?.Name || 'Sub-Agent'}`,
492
+ initialName: '',
493
+ viewContainerRef: undefined // Will be top-level modal
494
+ }).subscribe({
495
+ next: async (result) => {
496
+ if (result && result.prompt) {
497
+ try {
498
+ // Store the newly created entities
499
+ this.newlyCreatedPrompts.push(result.prompt);
500
+ if (result.template) {
501
+ this.newlyCreatedPromptTemplates.push(result.template);
502
+ }
503
+ if (result.templateContents && result.templateContents.length > 0) {
504
+ this.newlyCreatedTemplateContents.push(...result.templateContents);
505
+ }
506
+ // Add to UI
507
+ this.linkedPrompts.push(result.prompt);
508
+ // Create agent prompt link entity
509
+ const md = new Metadata();
510
+ const agentPrompt = await md.GetEntityObject('MJ: AI Agent Prompts');
511
+ agentPrompt.NewRecord();
512
+ agentPrompt.AgentID = this.subAgentEntity.ID;
513
+ agentPrompt.PromptID = result.prompt.ID;
514
+ agentPrompt.Status = 'Active';
515
+ agentPrompt.ExecutionOrder = this.agentPromptLinks.length + 1;
516
+ this.agentPromptLinks.push(agentPrompt);
517
+ // Trigger change detection
518
+ this.cdr.detectChanges();
519
+ MJNotificationService.Instance.CreateSimpleNotification(`New prompt "${result.prompt.Name}" created and linked to sub-agent`, 'success', 3000);
520
+ }
521
+ catch (error) {
522
+ console.error('Error processing created prompt:', error);
523
+ MJNotificationService.Instance.CreateSimpleNotification('Error processing created prompt. Please try again.', 'error', 3000);
524
+ }
525
+ }
526
+ },
527
+ error: (error) => {
528
+ console.error('Error in create prompt dialog:', error);
529
+ MJNotificationService.Instance.CreateSimpleNotification('Error opening prompt creation dialog. Please try again.', 'error', 3000);
530
+ }
531
+ });
532
+ }
533
+ catch (error) {
534
+ console.error('Error in createNewPrompt:', error);
535
+ MJNotificationService.Instance.CreateSimpleNotification('Error creating new prompt. Please try again.', 'error', 3000);
536
+ }
537
+ }
538
+ async addAction() {
539
+ // Get currently linked action IDs
540
+ const linkedActionIds = this.linkedActions.map(a => a.ID);
541
+ try {
542
+ this.agentManagementService.openAddActionDialog({
543
+ agentId: this.subAgentEntity?.ID || '',
544
+ agentName: this.subAgentEntity?.Name || 'Sub-Agent',
545
+ existingActionIds: linkedActionIds,
546
+ viewContainerRef: undefined // Will be top-level modal
547
+ }).subscribe({
548
+ next: async (selectedActions) => {
549
+ if (selectedActions && selectedActions.length > 0) {
550
+ // Filter out already linked actions
551
+ const newActions = selectedActions.filter(action => !linkedActionIds.includes(action.ID));
552
+ if (newActions.length > 0) {
553
+ // Add to UI
554
+ this.linkedActions.push(...newActions);
555
+ // Create agent action link entities
556
+ const md = new Metadata();
557
+ for (const action of newActions) {
558
+ const agentAction = await md.GetEntityObject('AI Agent Actions');
559
+ agentAction.NewRecord();
560
+ agentAction.AgentID = this.subAgentEntity.ID;
561
+ agentAction.ActionID = action.ID;
562
+ agentAction.Status = 'Active';
563
+ this.agentActionLinks.push(agentAction);
564
+ }
565
+ // Trigger change detection
566
+ this.cdr.detectChanges();
567
+ MJNotificationService.Instance.CreateSimpleNotification(`${newActions.length} action${newActions.length === 1 ? '' : 's'} added to sub-agent`, 'success', 3000);
568
+ }
569
+ }
570
+ },
571
+ error: (error) => {
572
+ console.error('Error in add action dialog:', error);
573
+ MJNotificationService.Instance.CreateSimpleNotification('Error opening action selection dialog. Please try again.', 'error', 3000);
574
+ }
575
+ });
576
+ }
577
+ catch (error) {
578
+ console.error('Error in addAction:', error);
579
+ MJNotificationService.Instance.CreateSimpleNotification('Error adding actions. Please try again.', 'error', 3000);
580
+ }
581
+ }
582
+ removePrompt(prompt) {
583
+ // Remove from UI
584
+ const promptIndex = this.linkedPrompts.findIndex(p => p.ID === prompt.ID);
585
+ if (promptIndex >= 0) {
586
+ this.linkedPrompts.splice(promptIndex, 1);
587
+ }
588
+ // Remove from link entities
589
+ const linkIndex = this.agentPromptLinks.findIndex(ap => ap.PromptID === prompt.ID);
590
+ if (linkIndex >= 0) {
591
+ this.agentPromptLinks.splice(linkIndex, 1);
592
+ }
593
+ // Remove from newly created prompts if it was created in this dialog
594
+ const newPromptIndex = this.newlyCreatedPrompts.findIndex(p => p.ID === prompt.ID);
595
+ if (newPromptIndex >= 0) {
596
+ this.newlyCreatedPrompts.splice(newPromptIndex, 1);
597
+ }
598
+ this.cdr.detectChanges();
599
+ MJNotificationService.Instance.CreateSimpleNotification(`Prompt "${prompt.Name}" removed from sub-agent`, 'info', 3000);
600
+ }
601
+ removeAction(action) {
602
+ // Remove from UI
603
+ const actionIndex = this.linkedActions.findIndex(a => a.ID === action.ID);
604
+ if (actionIndex >= 0) {
605
+ this.linkedActions.splice(actionIndex, 1);
606
+ }
607
+ // Remove from link entities
608
+ const linkIndex = this.agentActionLinks.findIndex(aa => aa.ActionID === action.ID);
609
+ if (linkIndex >= 0) {
610
+ this.agentActionLinks.splice(linkIndex, 1);
611
+ }
612
+ this.cdr.detectChanges();
613
+ MJNotificationService.Instance.CreateSimpleNotification(`Action "${action.Name}" removed from sub-agent`, 'info', 3000);
614
+ }
615
+ async save() {
616
+ if (!this.subAgentForm.valid || !this.subAgentEntity) {
617
+ MJNotificationService.Instance.CreateSimpleNotification('Please fill in all required fields', 'warning', 3000);
618
+ return;
619
+ }
620
+ this.isSaving$.next(true);
621
+ try {
622
+ // Update entity with final form values
623
+ this.updateSubAgentEntity(this.subAgentForm.value);
624
+ // Return the created entities (not saved to database)
625
+ const result = {
626
+ subAgent: this.subAgentEntity,
627
+ agentPrompts: this.agentPromptLinks,
628
+ agentActions: this.agentActionLinks,
629
+ newPrompts: this.newlyCreatedPrompts.length > 0 ? this.newlyCreatedPrompts : undefined,
630
+ newPromptTemplates: this.newlyCreatedPromptTemplates.length > 0 ? this.newlyCreatedPromptTemplates : undefined,
631
+ newTemplateContents: this.newlyCreatedTemplateContents.length > 0 ? this.newlyCreatedTemplateContents : undefined
632
+ };
633
+ this.result.next(result);
634
+ this.dialogRef.close();
635
+ }
636
+ catch (error) {
637
+ console.error('Error preparing sub-agent for creation:', error);
638
+ MJNotificationService.Instance.CreateSimpleNotification('Error preparing sub-agent for creation', 'error', 3000);
639
+ }
640
+ finally {
641
+ this.isSaving$.next(false);
642
+ }
643
+ }
644
+ cancel() {
645
+ this.result.next(null);
646
+ this.dialogRef.close();
647
+ }
648
+ // Helper methods for UI
649
+ getAgentIcon() {
650
+ return this.subAgentEntity?.IconClass || 'fa-solid fa-robot';
651
+ }
652
+ getPromptIcon() {
653
+ return 'fa-solid fa-comments';
654
+ }
655
+ getActionIcon() {
656
+ return 'fa-solid fa-bolt';
657
+ }
658
+ get linkedPromptCount() {
659
+ return this.linkedPrompts.length;
660
+ }
661
+ get linkedActionCount() {
662
+ return this.linkedActions.length;
663
+ }
664
+ static { this.ɵfac = function CreateSubAgentDialogComponent_Factory(t) { return new (t || CreateSubAgentDialogComponent)(i0.ɵɵdirectiveInject(i1.DialogRef), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i2.AIAgentManagementService)); }; }
665
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CreateSubAgentDialogComponent, selectors: [["mj-create-sub-agent-dialog"]], decls: 19, vars: 14, consts: [[1, "sub-agent-dialog"], [1, "sub-agent-header"], [1, "dialog-title"], [1, "fa-solid", "fa-robot"], [1, "parent-info"], [1, "loading-container"], [1, "sub-agent-form", 3, "formGroup"], [1, "dialog-actions"], ["type", "button", 1, "btn", "btn-secondary", 3, "click", "disabled"], [1, "fa-solid", "fa-times"], ["type", "button", 1, "btn", "btn-primary", 3, "click", "disabled"], [1, "fa-solid", "fa-link"], [1, "fa-solid", "fa-spinner", "fa-spin"], [1, "form-section"], [1, "section-title"], [1, "fa-solid", "fa-info-circle"], [1, "form-row"], [1, "form-group"], ["for", "name"], ["type", "text", "id", "name", "formControlName", "name", "placeholder", "Enter sub-agent name", 1, "form-control"], ["for", "typeID"], ["id", "typeID", "formControlName", "typeID", 1, "form-control"], ["value", ""], [3, "value"], ["for", "description"], ["id", "description", "formControlName", "description", "rows", "2", "placeholder", "Enter description", 1, "form-control"], ["for", "status"], ["id", "status", "formControlName", "status", 1, "form-control"], ["value", "Pending"], ["value", "Active"], ["value", "Disabled"], ["for", "executionMode"], ["id", "executionMode", "formControlName", "executionMode", 1, "form-control"], ["value", "Sequential"], ["value", "Parallel"], [1, "fa-solid", "fa-bullseye"], ["for", "purpose"], ["type", "text", "id", "purpose", "formControlName", "purpose", "placeholder", "Enter the purpose of this sub-agent", 1, "form-control"], ["for", "userMessage"], ["id", "userMessage", "formControlName", "userMessage", "rows", "3", "placeholder", "Enter user message", 1, "form-control"], [1, "fa-solid", "fa-cogs"], ["for", "modelSelectionMode"], ["id", "modelSelectionMode", "formControlName", "modelSelectionMode", 1, "form-control"], ["value", "Agent Type"], ["value", "Agent"], ["for", "temperature"], ["type", "number", "id", "temperature", "formControlName", "temperature", "min", "0", "max", "2", "step", "0.1", 1, "form-control"], ["for", "topP"], ["type", "number", "id", "topP", "formControlName", "topP", "min", "0", "max", "1", "step", "0.1", 1, "form-control"], ["for", "topK"], ["type", "number", "id", "topK", "formControlName", "topK", "min", "1", "max", "100", "step", "1", 1, "form-control"], ["for", "maxTokens"], ["type", "number", "id", "maxTokens", "formControlName", "maxTokens", "min", "1", "max", "32000", "step", "1", 1, "form-control"], ["for", "enableCaching"], ["type", "checkbox", "id", "enableCaching", "formControlName", "enableCaching"], ["for", "cacheTTL"], ["type", "number", "id", "cacheTTL", "formControlName", "cacheTTL", "min", "60", "max", "86400", "step", "60", 1, "form-control"], [1, "fa-solid", "fa-comments"], [1, "section-actions"], ["type", "button", 1, "btn", "btn-primary", "btn-sm", 3, "click"], [1, "fa-solid", "fa-plus"], ["type", "button", 1, "btn", "btn-success", "btn-sm", 3, "click"], [1, "linked-items"], [1, "empty-state"], [1, "fa-solid", "fa-bolt"], [1, "linked-item", "prompt-item"], [1, "item-info"], [1, "item-name"], [1, "item-description"], ["type", "button", 1, "btn", "btn-danger", "btn-xs", 3, "click"], [1, "linked-item", "action-item"], [1, "fa-solid", "fa-save"]], template: function CreateSubAgentDialogComponent_Template(rf, ctx) { if (rf & 1) {
666
+ i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "h2", 2);
667
+ i0.ɵɵelement(3, "i", 3);
668
+ i0.ɵɵtext(4);
669
+ i0.ɵɵelementEnd();
670
+ i0.ɵɵtemplate(5, CreateSubAgentDialogComponent_Conditional_5_Template, 5, 1, "p", 4);
671
+ i0.ɵɵelementEnd();
672
+ i0.ɵɵtemplate(6, CreateSubAgentDialogComponent_Conditional_6_Template, 4, 0, "div", 5);
673
+ i0.ɵɵpipe(7, "async");
674
+ i0.ɵɵtemplate(8, CreateSubAgentDialogComponent_Conditional_8_Template, 120, 7, "form", 6);
675
+ i0.ɵɵelementStart(9, "div", 7)(10, "button", 8);
676
+ i0.ɵɵpipe(11, "async");
677
+ i0.ɵɵlistener("click", function CreateSubAgentDialogComponent_Template_button_click_10_listener() { return ctx.cancel(); });
678
+ i0.ɵɵelement(12, "i", 9);
679
+ i0.ɵɵtext(13, " Cancel ");
680
+ i0.ɵɵelementEnd();
681
+ i0.ɵɵelementStart(14, "button", 10);
682
+ i0.ɵɵpipe(15, "async");
683
+ i0.ɵɵlistener("click", function CreateSubAgentDialogComponent_Template_button_click_14_listener() { return ctx.save(); });
684
+ i0.ɵɵtemplate(16, CreateSubAgentDialogComponent_Conditional_16_Template, 2, 0);
685
+ i0.ɵɵpipe(17, "async");
686
+ i0.ɵɵtemplate(18, CreateSubAgentDialogComponent_Conditional_18_Template, 2, 0);
687
+ i0.ɵɵelementEnd()()();
688
+ } if (rf & 2) {
689
+ i0.ɵɵadvance(4);
690
+ i0.ɵɵtextInterpolate1(" ", ctx.config.title || "Create New Sub-Agent", " ");
691
+ i0.ɵɵadvance();
692
+ i0.ɵɵconditional(ctx.config.parentAgentName ? 5 : -1);
693
+ i0.ɵɵadvance();
694
+ i0.ɵɵconditional(i0.ɵɵpipeBind1(7, 6, ctx.isLoading$) ? 6 : 8);
695
+ i0.ɵɵadvance(4);
696
+ i0.ɵɵproperty("disabled", i0.ɵɵpipeBind1(11, 8, ctx.isSaving$));
697
+ i0.ɵɵadvance(4);
698
+ i0.ɵɵproperty("disabled", i0.ɵɵpipeBind1(15, 10, ctx.isSaving$) || !ctx.subAgentForm.valid);
699
+ i0.ɵɵadvance(2);
700
+ i0.ɵɵconditional(i0.ɵɵpipeBind1(17, 12, ctx.isSaving$) ? 16 : 18);
701
+ } }, dependencies: [i3.ɵNgNoValidate, i3.NgSelectOption, i3.ɵNgSelectMultipleOption, i3.DefaultValueAccessor, i3.NumberValueAccessor, i3.CheckboxControlValueAccessor, i3.SelectControlValueAccessor, i3.NgControlStatus, i3.NgControlStatusGroup, i3.MinValidator, i3.MaxValidator, i3.FormGroupDirective, i3.FormControlName, i4.AsyncPipe], styles: [".sub-agent-dialog[_ngcontent-%COMP%] {\n padding: 20px;\n max-width: 800px;\n max-height: 90vh;\n overflow-y: auto;\n}\n\n.sub-agent-header[_ngcontent-%COMP%] {\n margin-bottom: 20px;\n border-bottom: 1px solid #e0e0e0;\n padding-bottom: 15px;\n}\n\n.dialog-title[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 1.4em;\n font-weight: 600;\n color: #333;\n display: flex;\n align-items: center;\n gap: 10px;\n}\n\n.dialog-title[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: #007bff;\n}\n\n.parent-info[_ngcontent-%COMP%] {\n margin: 8px 0 0 0;\n color: #666;\n font-size: 0.9em;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.parent-info[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: #28a745;\n}\n\n.loading-container[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 10px;\n padding: 40px;\n color: #666;\n}\n\n.loading-container[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 1.2em;\n color: #007bff;\n}\n\n.sub-agent-form[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 25px;\n}\n\n.form-section[_ngcontent-%COMP%] {\n border: 1px solid #e9ecef;\n border-radius: 8px;\n padding: 20px;\n background-color: #f8f9fa;\n}\n\n.section-title[_ngcontent-%COMP%] {\n margin: 0 0 15px 0;\n font-size: 1.1em;\n font-weight: 600;\n color: #495057;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.section-title[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: #007bff;\n}\n\n.form-row[_ngcontent-%COMP%] {\n display: flex;\n gap: 15px;\n margin-bottom: 15px;\n}\n\n.form-row[_ngcontent-%COMP%]:last-child {\n margin-bottom: 0;\n}\n\n.form-group[_ngcontent-%COMP%] {\n flex: 1;\n display: flex;\n flex-direction: column;\n}\n\n.form-group[_ngcontent-%COMP%] label[_ngcontent-%COMP%] {\n font-weight: 500;\n color: #495057;\n margin-bottom: 5px;\n font-size: 0.9em;\n}\n\n.form-group[_ngcontent-%COMP%] label[for=\"enableCaching\"][_ngcontent-%COMP%] {\n flex-direction: row;\n align-items: center;\n gap: 8px;\n}\n\n.form-group[_ngcontent-%COMP%] label[for=\"enableCaching\"][_ngcontent-%COMP%] input[_ngcontent-%COMP%] {\n margin: 0;\n width: auto;\n}\n\n.form-control[_ngcontent-%COMP%] {\n padding: 8px 12px;\n border: 1px solid #ced4da;\n border-radius: 4px;\n font-size: 0.9em;\n transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;\n}\n\n.form-control[_ngcontent-%COMP%]:focus {\n outline: none;\n border-color: #007bff;\n box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);\n}\n\n.form-control[readonly][_ngcontent-%COMP%] {\n background-color: #e9ecef;\n opacity: 1;\n}\n\n.section-actions[_ngcontent-%COMP%] {\n display: flex;\n gap: 10px;\n margin-bottom: 15px;\n}\n\n.linked-items[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 10px;\n}\n\n.linked-item[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 12px;\n background-color: #ffffff;\n border: 1px solid #dee2e6;\n border-radius: 6px;\n transition: box-shadow 0.15s ease-in-out;\n}\n\n.linked-item[_ngcontent-%COMP%]:hover {\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\n}\n\n.item-info[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 10px;\n flex: 1;\n}\n\n.item-info[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: #007bff;\n width: 16px;\n text-align: center;\n}\n\n.item-name[_ngcontent-%COMP%] {\n font-weight: 500;\n color: #333;\n}\n\n.item-description[_ngcontent-%COMP%] {\n color: #666;\n font-size: 0.85em;\n margin-left: 10px;\n}\n\n.prompt-item[_ngcontent-%COMP%] .item-info[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: #28a745;\n}\n\n.action-item[_ngcontent-%COMP%] .item-info[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: #ffc107;\n}\n\n.empty-state[_ngcontent-%COMP%] {\n text-align: center;\n padding: 30px;\n color: #6c757d;\n}\n\n.empty-state[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 2em;\n color: #dee2e6;\n margin-bottom: 10px;\n}\n\n.empty-state[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 0.9em;\n}\n\n.dialog-actions[_ngcontent-%COMP%] {\n display: flex;\n justify-content: flex-end;\n gap: 10px;\n margin-top: 30px;\n padding-top: 20px;\n border-top: 1px solid #e0e0e0;\n}\n\n.btn[_ngcontent-%COMP%] {\n padding: 8px 16px;\n border: none;\n border-radius: 4px;\n font-size: 0.9em;\n font-weight: 500;\n cursor: pointer;\n transition: background-color 0.15s ease-in-out;\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.btn[_ngcontent-%COMP%]:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n\n.btn-primary[_ngcontent-%COMP%] {\n background-color: #007bff;\n color: white;\n}\n\n.btn-primary[_ngcontent-%COMP%]:hover:not(:disabled) {\n background-color: #0056b3;\n}\n\n.btn-secondary[_ngcontent-%COMP%] {\n background-color: #6c757d;\n color: white;\n}\n\n.btn-secondary[_ngcontent-%COMP%]:hover:not(:disabled) {\n background-color: #545b62;\n}\n\n.btn-success[_ngcontent-%COMP%] {\n background-color: #28a745;\n color: white;\n}\n\n.btn-success[_ngcontent-%COMP%]:hover:not(:disabled) {\n background-color: #1e7e34;\n}\n\n.btn-danger[_ngcontent-%COMP%] {\n background-color: #dc3545;\n color: white;\n}\n\n.btn-danger[_ngcontent-%COMP%]:hover:not(:disabled) {\n background-color: #c82333;\n}\n\n.btn-sm[_ngcontent-%COMP%] {\n padding: 6px 12px;\n font-size: 0.8em;\n}\n\n.btn-xs[_ngcontent-%COMP%] {\n padding: 4px 8px;\n font-size: 0.75em;\n}\n\n\n\n@media (max-width: 768px) {\n .sub-agent-dialog[_ngcontent-%COMP%] {\n padding: 15px;\n max-width: 95vw;\n }\n \n .form-row[_ngcontent-%COMP%] {\n flex-direction: column;\n gap: 10px;\n }\n \n .section-actions[_ngcontent-%COMP%] {\n flex-direction: column;\n }\n \n .dialog-actions[_ngcontent-%COMP%] {\n flex-direction: column;\n }\n \n .linked-item[_ngcontent-%COMP%] {\n flex-direction: column;\n align-items: flex-start;\n gap: 10px;\n }\n}\n\n\n\n.form-control.ng-invalid.ng-touched[_ngcontent-%COMP%] {\n border-color: #dc3545;\n}\n\n.form-control.ng-valid.ng-touched[_ngcontent-%COMP%] {\n border-color: #28a745;\n}\n\n\n\n.sub-agent-dialog[_ngcontent-%COMP%]::-webkit-scrollbar {\n width: 8px;\n}\n\n.sub-agent-dialog[_ngcontent-%COMP%]::-webkit-scrollbar-track {\n background: #f1f1f1;\n border-radius: 4px;\n}\n\n.sub-agent-dialog[_ngcontent-%COMP%]::-webkit-scrollbar-thumb {\n background: #c1c1c1;\n border-radius: 4px;\n}\n\n.sub-agent-dialog[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover {\n background: #a8a8a8;\n}"] }); }
702
+ }
703
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CreateSubAgentDialogComponent, [{
704
+ type: Component,
705
+ args: [{ selector: 'mj-create-sub-agent-dialog', template: "<div class=\"sub-agent-dialog\">\n <div class=\"sub-agent-header\">\n <h2 class=\"dialog-title\">\n <i class=\"fa-solid fa-robot\"></i>\n {{ config.title || 'Create New Sub-Agent' }}\n </h2>\n @if (config.parentAgentName) {\n <p class=\"parent-info\">\n <i class=\"fa-solid fa-link\"></i>\n Sub-agent of: <strong>{{ config.parentAgentName }}</strong>\n </p>\n }\n </div>\n\n @if (isLoading$ | async) {\n <div class=\"loading-container\">\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n <span>Loading sub-agent creation form...</span>\n </div>\n } @else {\n <form [formGroup]=\"subAgentForm\" class=\"sub-agent-form\">\n <!-- Basic Information Section -->\n <div class=\"form-section\">\n <h3 class=\"section-title\">\n <i class=\"fa-solid fa-info-circle\"></i>\n Basic Information\n </h3>\n \n <div class=\"form-row\">\n <div class=\"form-group\">\n <label for=\"name\">Name *</label>\n <input type=\"text\" id=\"name\" formControlName=\"name\" class=\"form-control\" placeholder=\"Enter sub-agent name\">\n </div>\n \n <div class=\"form-group\">\n <label for=\"typeID\">Type *</label>\n <select id=\"typeID\" formControlName=\"typeID\" class=\"form-control\">\n <option value=\"\">Select agent type...</option>\n @for (type of availableAgentTypes$ | async; track type.ID) {\n <option [value]=\"type.ID\">{{ type.Name }}</option>\n }\n </select>\n </div>\n </div>\n\n <div class=\"form-row\">\n <div class=\"form-group\">\n <label for=\"description\">Description</label>\n <textarea id=\"description\" formControlName=\"description\" class=\"form-control\" rows=\"2\" placeholder=\"Enter description\"></textarea>\n </div>\n </div>\n\n <div class=\"form-row\">\n <div class=\"form-group\">\n <label for=\"status\">Status</label>\n <select id=\"status\" formControlName=\"status\" class=\"form-control\">\n <option value=\"Pending\">Pending</option>\n <option value=\"Active\">Active</option>\n <option value=\"Disabled\">Disabled</option>\n </select>\n </div>\n \n <div class=\"form-group\">\n <label for=\"executionMode\">Execution Mode</label>\n <select id=\"executionMode\" formControlName=\"executionMode\" class=\"form-control\">\n <option value=\"Sequential\">Sequential</option>\n <option value=\"Parallel\">Parallel</option>\n </select>\n </div>\n </div>\n </div>\n\n <!-- Purpose & Messages Section -->\n <div class=\"form-section\">\n <h3 class=\"section-title\">\n <i class=\"fa-solid fa-bullseye\"></i>\n Purpose & Messages\n </h3>\n \n <div class=\"form-row\">\n <div class=\"form-group\">\n <label for=\"purpose\">Purpose</label>\n <input type=\"text\" id=\"purpose\" formControlName=\"purpose\" class=\"form-control\" placeholder=\"Enter the purpose of this sub-agent\">\n </div>\n </div>\n\n <div class=\"form-row\">\n <div class=\"form-group\">\n <label for=\"userMessage\">User Message</label>\n <textarea id=\"userMessage\" formControlName=\"userMessage\" class=\"form-control\" rows=\"3\" placeholder=\"Enter user message\"></textarea>\n </div>\n </div>\n\n <!-- System Message field removed - property does not exist on AIAgentEntity -->\n </div>\n\n <!-- Model Configuration Section -->\n <div class=\"form-section\">\n <h3 class=\"section-title\">\n <i class=\"fa-solid fa-cogs\"></i>\n Model Configuration\n </h3>\n \n <div class=\"form-row\">\n <div class=\"form-group\">\n <label for=\"modelSelectionMode\">Model Selection Mode</label>\n <select id=\"modelSelectionMode\" formControlName=\"modelSelectionMode\" class=\"form-control\">\n <option value=\"Agent Type\">Agent Type</option>\n <option value=\"Agent\">Agent</option>\n </select>\n </div>\n </div>\n\n <div class=\"form-row\">\n <div class=\"form-group\">\n <label for=\"temperature\">Temperature</label>\n <input type=\"number\" id=\"temperature\" formControlName=\"temperature\" class=\"form-control\" min=\"0\" max=\"2\" step=\"0.1\">\n </div>\n \n <div class=\"form-group\">\n <label for=\"topP\">Top P</label>\n <input type=\"number\" id=\"topP\" formControlName=\"topP\" class=\"form-control\" min=\"0\" max=\"1\" step=\"0.1\">\n </div>\n </div>\n\n <div class=\"form-row\">\n <div class=\"form-group\">\n <label for=\"topK\">Top K</label>\n <input type=\"number\" id=\"topK\" formControlName=\"topK\" class=\"form-control\" min=\"1\" max=\"100\" step=\"1\">\n </div>\n \n <div class=\"form-group\">\n <label for=\"maxTokens\">Max Tokens</label>\n <input type=\"number\" id=\"maxTokens\" formControlName=\"maxTokens\" class=\"form-control\" min=\"1\" max=\"32000\" step=\"1\">\n </div>\n </div>\n\n <div class=\"form-row\">\n <div class=\"form-group\">\n <label for=\"enableCaching\">\n <input type=\"checkbox\" id=\"enableCaching\" formControlName=\"enableCaching\">\n Enable Caching\n </label>\n </div>\n \n <div class=\"form-group\">\n <label for=\"cacheTTL\">Cache TTL (seconds)</label>\n <input type=\"number\" id=\"cacheTTL\" formControlName=\"cacheTTL\" class=\"form-control\" min=\"60\" max=\"86400\" step=\"60\">\n </div>\n </div>\n </div>\n\n <!-- Prompts Section -->\n <div class=\"form-section\">\n <h3 class=\"section-title\">\n <i class=\"fa-solid fa-comments\"></i>\n Prompts ({{ linkedPromptCount }})\n </h3>\n \n <div class=\"section-actions\">\n <button type=\"button\" class=\"btn btn-primary btn-sm\" (click)=\"addPrompt()\">\n <i class=\"fa-solid fa-plus\"></i>\n Add Existing Prompt\n </button>\n <button type=\"button\" class=\"btn btn-success btn-sm\" (click)=\"createNewPrompt()\">\n <i class=\"fa-solid fa-plus\"></i>\n Create New Prompt\n </button>\n </div>\n\n @if (linkedPrompts.length > 0) {\n <div class=\"linked-items\">\n @for (prompt of linkedPrompts; track prompt.ID) {\n <div class=\"linked-item prompt-item\">\n <div class=\"item-info\">\n <i class=\"fa-solid fa-comments\"></i>\n <span class=\"item-name\">{{ prompt.Name }}</span>\n @if (prompt.Description) {\n <span class=\"item-description\">{{ prompt.Description }}</span>\n }\n </div>\n <button type=\"button\" class=\"btn btn-danger btn-xs\" (click)=\"removePrompt(prompt)\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n </div>\n }\n </div>\n } @else {\n <div class=\"empty-state\">\n <i class=\"fa-solid fa-comments\"></i>\n <p>No prompts added yet. Click the buttons above to add prompts.</p>\n </div>\n }\n </div>\n\n <!-- Actions Section -->\n <div class=\"form-section\">\n <h3 class=\"section-title\">\n <i class=\"fa-solid fa-bolt\"></i>\n Actions ({{ linkedActionCount }})\n </h3>\n \n <div class=\"section-actions\">\n <button type=\"button\" class=\"btn btn-primary btn-sm\" (click)=\"addAction()\">\n <i class=\"fa-solid fa-plus\"></i>\n Add Action\n </button>\n </div>\n\n @if (linkedActions.length > 0) {\n <div class=\"linked-items\">\n @for (action of linkedActions; track action.ID) {\n <div class=\"linked-item action-item\">\n <div class=\"item-info\">\n <i class=\"fa-solid fa-bolt\"></i>\n <span class=\"item-name\">{{ action.Name }}</span>\n @if (action.Description) {\n <span class=\"item-description\">{{ action.Description }}</span>\n }\n </div>\n <button type=\"button\" class=\"btn btn-danger btn-xs\" (click)=\"removeAction(action)\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n </div>\n }\n </div>\n } @else {\n <div class=\"empty-state\">\n <i class=\"fa-solid fa-bolt\"></i>\n <p>No actions added yet. Click the button above to add actions.</p>\n </div>\n }\n </div>\n </form>\n }\n\n <!-- Dialog Actions -->\n <div class=\"dialog-actions\">\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"cancel()\" [disabled]=\"isSaving$ | async\">\n <i class=\"fa-solid fa-times\"></i>\n Cancel\n </button>\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"save()\" [disabled]=\"(isSaving$ | async) || !subAgentForm.valid\">\n @if (isSaving$ | async) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n Creating...\n } @else {\n <i class=\"fa-solid fa-save\"></i>\n Create Sub-Agent\n }\n </button>\n </div>\n</div>", styles: [".sub-agent-dialog {\n padding: 20px;\n max-width: 800px;\n max-height: 90vh;\n overflow-y: auto;\n}\n\n.sub-agent-header {\n margin-bottom: 20px;\n border-bottom: 1px solid #e0e0e0;\n padding-bottom: 15px;\n}\n\n.dialog-title {\n margin: 0;\n font-size: 1.4em;\n font-weight: 600;\n color: #333;\n display: flex;\n align-items: center;\n gap: 10px;\n}\n\n.dialog-title i {\n color: #007bff;\n}\n\n.parent-info {\n margin: 8px 0 0 0;\n color: #666;\n font-size: 0.9em;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.parent-info i {\n color: #28a745;\n}\n\n.loading-container {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 10px;\n padding: 40px;\n color: #666;\n}\n\n.loading-container i {\n font-size: 1.2em;\n color: #007bff;\n}\n\n.sub-agent-form {\n display: flex;\n flex-direction: column;\n gap: 25px;\n}\n\n.form-section {\n border: 1px solid #e9ecef;\n border-radius: 8px;\n padding: 20px;\n background-color: #f8f9fa;\n}\n\n.section-title {\n margin: 0 0 15px 0;\n font-size: 1.1em;\n font-weight: 600;\n color: #495057;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.section-title i {\n color: #007bff;\n}\n\n.form-row {\n display: flex;\n gap: 15px;\n margin-bottom: 15px;\n}\n\n.form-row:last-child {\n margin-bottom: 0;\n}\n\n.form-group {\n flex: 1;\n display: flex;\n flex-direction: column;\n}\n\n.form-group label {\n font-weight: 500;\n color: #495057;\n margin-bottom: 5px;\n font-size: 0.9em;\n}\n\n.form-group label[for=\"enableCaching\"] {\n flex-direction: row;\n align-items: center;\n gap: 8px;\n}\n\n.form-group label[for=\"enableCaching\"] input {\n margin: 0;\n width: auto;\n}\n\n.form-control {\n padding: 8px 12px;\n border: 1px solid #ced4da;\n border-radius: 4px;\n font-size: 0.9em;\n transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;\n}\n\n.form-control:focus {\n outline: none;\n border-color: #007bff;\n box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);\n}\n\n.form-control[readonly] {\n background-color: #e9ecef;\n opacity: 1;\n}\n\n.section-actions {\n display: flex;\n gap: 10px;\n margin-bottom: 15px;\n}\n\n.linked-items {\n display: flex;\n flex-direction: column;\n gap: 10px;\n}\n\n.linked-item {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 12px;\n background-color: #ffffff;\n border: 1px solid #dee2e6;\n border-radius: 6px;\n transition: box-shadow 0.15s ease-in-out;\n}\n\n.linked-item:hover {\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\n}\n\n.item-info {\n display: flex;\n align-items: center;\n gap: 10px;\n flex: 1;\n}\n\n.item-info i {\n color: #007bff;\n width: 16px;\n text-align: center;\n}\n\n.item-name {\n font-weight: 500;\n color: #333;\n}\n\n.item-description {\n color: #666;\n font-size: 0.85em;\n margin-left: 10px;\n}\n\n.prompt-item .item-info i {\n color: #28a745;\n}\n\n.action-item .item-info i {\n color: #ffc107;\n}\n\n.empty-state {\n text-align: center;\n padding: 30px;\n color: #6c757d;\n}\n\n.empty-state i {\n font-size: 2em;\n color: #dee2e6;\n margin-bottom: 10px;\n}\n\n.empty-state p {\n margin: 0;\n font-size: 0.9em;\n}\n\n.dialog-actions {\n display: flex;\n justify-content: flex-end;\n gap: 10px;\n margin-top: 30px;\n padding-top: 20px;\n border-top: 1px solid #e0e0e0;\n}\n\n.btn {\n padding: 8px 16px;\n border: none;\n border-radius: 4px;\n font-size: 0.9em;\n font-weight: 500;\n cursor: pointer;\n transition: background-color 0.15s ease-in-out;\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.btn:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n\n.btn-primary {\n background-color: #007bff;\n color: white;\n}\n\n.btn-primary:hover:not(:disabled) {\n background-color: #0056b3;\n}\n\n.btn-secondary {\n background-color: #6c757d;\n color: white;\n}\n\n.btn-secondary:hover:not(:disabled) {\n background-color: #545b62;\n}\n\n.btn-success {\n background-color: #28a745;\n color: white;\n}\n\n.btn-success:hover:not(:disabled) {\n background-color: #1e7e34;\n}\n\n.btn-danger {\n background-color: #dc3545;\n color: white;\n}\n\n.btn-danger:hover:not(:disabled) {\n background-color: #c82333;\n}\n\n.btn-sm {\n padding: 6px 12px;\n font-size: 0.8em;\n}\n\n.btn-xs {\n padding: 4px 8px;\n font-size: 0.75em;\n}\n\n/* Responsive adjustments */\n@media (max-width: 768px) {\n .sub-agent-dialog {\n padding: 15px;\n max-width: 95vw;\n }\n \n .form-row {\n flex-direction: column;\n gap: 10px;\n }\n \n .section-actions {\n flex-direction: column;\n }\n \n .dialog-actions {\n flex-direction: column;\n }\n \n .linked-item {\n flex-direction: column;\n align-items: flex-start;\n gap: 10px;\n }\n}\n\n/* Validation styles */\n.form-control.ng-invalid.ng-touched {\n border-color: #dc3545;\n}\n\n.form-control.ng-valid.ng-touched {\n border-color: #28a745;\n}\n\n/* Custom scrollbar for dialog */\n.sub-agent-dialog::-webkit-scrollbar {\n width: 8px;\n}\n\n.sub-agent-dialog::-webkit-scrollbar-track {\n background: #f1f1f1;\n border-radius: 4px;\n}\n\n.sub-agent-dialog::-webkit-scrollbar-thumb {\n background: #c1c1c1;\n border-radius: 4px;\n}\n\n.sub-agent-dialog::-webkit-scrollbar-thumb:hover {\n background: #a8a8a8;\n}"] }]
706
+ }], () => [{ type: i1.DialogRef }, { type: i0.ChangeDetectorRef }, { type: i2.AIAgentManagementService }], null); })();
707
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CreateSubAgentDialogComponent, { className: "CreateSubAgentDialogComponent", filePath: "src/lib/custom/AIAgents/create-sub-agent-dialog.component.ts", lineNumber: 48 }); })();
708
+ //# sourceMappingURL=create-sub-agent-dialog.component.js.map