@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
@@ -0,0 +1,400 @@
1
+ import { Component } from '@angular/core';
2
+ import { Validators } from '@angular/forms';
3
+ import { Subject, BehaviorSubject, takeUntil } from 'rxjs';
4
+ import { 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 "@angular/forms";
9
+ import * as i3 from "@progress/kendo-angular-inputs";
10
+ import * as i4 from "@progress/kendo-angular-dropdowns";
11
+ import * as i5 from "@progress/kendo-angular-buttons";
12
+ import * as i6 from "@angular/common";
13
+ const _c0 = () => ({ Name: "Use Agent Default", ID: null });
14
+ function AgentPromptAdvancedSettingsDialogComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
15
+ i0.ɵɵelementStart(0, "div", 1)(1, "div", 6);
16
+ i0.ɵɵelement(2, "i", 7);
17
+ i0.ɵɵelementEnd();
18
+ i0.ɵɵelementStart(3, "p");
19
+ i0.ɵɵtext(4, "Loading prompt settings...");
20
+ i0.ɵɵelementEnd()();
21
+ } }
22
+ function AgentPromptAdvancedSettingsDialogComponent_Conditional_3_Conditional_10_Template(rf, ctx) { if (rf & 1) {
23
+ i0.ɵɵelementStart(0, "div", 15);
24
+ i0.ɵɵtext(1);
25
+ i0.ɵɵelementEnd();
26
+ } if (rf & 2) {
27
+ const ctx_r0 = i0.ɵɵnextContext(2);
28
+ i0.ɵɵadvance();
29
+ i0.ɵɵtextInterpolate(ctx_r0.getFieldError("executionOrder"));
30
+ } }
31
+ function AgentPromptAdvancedSettingsDialogComponent_Conditional_3_Conditional_11_Template(rf, ctx) { if (rf & 1) {
32
+ i0.ɵɵelementStart(0, "div", 15);
33
+ i0.ɵɵtext(1);
34
+ i0.ɵɵelementEnd();
35
+ } if (rf & 2) {
36
+ const ctx_r0 = i0.ɵɵnextContext(2);
37
+ i0.ɵɵadvance();
38
+ i0.ɵɵtextInterpolate(ctx_r0.executionOrderError);
39
+ } }
40
+ function AgentPromptAdvancedSettingsDialogComponent_Conditional_3_Conditional_24_Template(rf, ctx) { if (rf & 1) {
41
+ i0.ɵɵelementStart(0, "div", 15);
42
+ i0.ɵɵtext(1);
43
+ i0.ɵɵelementEnd();
44
+ } if (rf & 2) {
45
+ const ctx_r0 = i0.ɵɵnextContext(2);
46
+ i0.ɵɵadvance();
47
+ i0.ɵɵtextInterpolate(ctx_r0.getFieldError("status"));
48
+ } }
49
+ function AgentPromptAdvancedSettingsDialogComponent_Conditional_3_ng_template_36_Template(rf, ctx) { if (rf & 1) {
50
+ i0.ɵɵelementStart(0, "div", 29)(1, "div", 30);
51
+ i0.ɵɵtext(2);
52
+ i0.ɵɵelementEnd();
53
+ i0.ɵɵelementStart(3, "div", 31);
54
+ i0.ɵɵtext(4);
55
+ i0.ɵɵelementEnd()();
56
+ } if (rf & 2) {
57
+ const dataItem_r2 = ctx.$implicit;
58
+ i0.ɵɵadvance(2);
59
+ i0.ɵɵtextInterpolate(dataItem_r2.text);
60
+ i0.ɵɵadvance(2);
61
+ i0.ɵɵtextInterpolate(dataItem_r2.description);
62
+ } }
63
+ function AgentPromptAdvancedSettingsDialogComponent_Conditional_3_Conditional_37_Template(rf, ctx) { if (rf & 1) {
64
+ i0.ɵɵelementStart(0, "div", 15);
65
+ i0.ɵɵtext(1);
66
+ i0.ɵɵelementEnd();
67
+ } if (rf & 2) {
68
+ const ctx_r0 = i0.ɵɵnextContext(2);
69
+ i0.ɵɵadvance();
70
+ i0.ɵɵtextInterpolate(ctx_r0.getFieldError("contextBehavior"));
71
+ } }
72
+ function AgentPromptAdvancedSettingsDialogComponent_Conditional_3_Conditional_40_Conditional_4_Template(rf, ctx) { if (rf & 1) {
73
+ i0.ɵɵelementStart(0, "div", 15);
74
+ i0.ɵɵtext(1);
75
+ i0.ɵɵelementEnd();
76
+ } if (rf & 2) {
77
+ const ctx_r0 = i0.ɵɵnextContext(3);
78
+ i0.ɵɵadvance();
79
+ i0.ɵɵtextInterpolate(ctx_r0.getFieldError("contextMessageCount"));
80
+ } }
81
+ function AgentPromptAdvancedSettingsDialogComponent_Conditional_3_Conditional_40_Template(rf, ctx) { if (rf & 1) {
82
+ i0.ɵɵelementStart(0, "div", 12)(1, "label", 32);
83
+ i0.ɵɵtext(2, "Message Count *");
84
+ i0.ɵɵelementEnd();
85
+ i0.ɵɵelement(3, "kendo-numerictextbox", 33);
86
+ i0.ɵɵtemplate(4, AgentPromptAdvancedSettingsDialogComponent_Conditional_3_Conditional_40_Conditional_4_Template, 2, 1, "div", 15);
87
+ i0.ɵɵelementStart(5, "small", 16);
88
+ i0.ɵɵtext(6);
89
+ i0.ɵɵelementEnd()();
90
+ } if (rf & 2) {
91
+ let tmp_5_0;
92
+ const ctx_r0 = i0.ɵɵnextContext(2);
93
+ i0.ɵɵadvance(3);
94
+ i0.ɵɵproperty("min", 1)("format", "0");
95
+ i0.ɵɵadvance();
96
+ i0.ɵɵconditional(ctx_r0.isFieldInvalid("contextMessageCount") ? 4 : -1);
97
+ i0.ɵɵadvance(2);
98
+ i0.ɵɵtextInterpolate1("Number of messages to include for ", (tmp_5_0 = ctx_r0.advancedForm.get("contextBehavior")) == null ? null : tmp_5_0.value, "");
99
+ } }
100
+ function AgentPromptAdvancedSettingsDialogComponent_Conditional_3_Template(rf, ctx) { if (rf & 1) {
101
+ i0.ɵɵelementStart(0, "form", 2)(1, "div", 8)(2, "h3", 9);
102
+ i0.ɵɵelement(3, "i", 10);
103
+ i0.ɵɵtext(4, " Execution Configuration ");
104
+ i0.ɵɵelementEnd();
105
+ i0.ɵɵelementStart(5, "div", 11)(6, "div", 12)(7, "label", 13);
106
+ i0.ɵɵtext(8, "Execution Order *");
107
+ i0.ɵɵelementEnd();
108
+ i0.ɵɵelement(9, "kendo-numerictextbox", 14);
109
+ i0.ɵɵtemplate(10, AgentPromptAdvancedSettingsDialogComponent_Conditional_3_Conditional_10_Template, 2, 1, "div", 15)(11, AgentPromptAdvancedSettingsDialogComponent_Conditional_3_Conditional_11_Template, 2, 1, "div", 15);
110
+ i0.ɵɵelementStart(12, "small", 16);
111
+ i0.ɵɵtext(13, "Order in which this prompt executes (0 = first). Must be unique among agent prompts.");
112
+ i0.ɵɵelementEnd()();
113
+ i0.ɵɵelementStart(14, "div", 12)(15, "label", 17);
114
+ i0.ɵɵtext(16, "Purpose");
115
+ i0.ɵɵelementEnd();
116
+ i0.ɵɵelement(17, "kendo-textbox", 18);
117
+ i0.ɵɵelementStart(18, "small", 16);
118
+ i0.ɵɵtext(19, "Functional purpose of this prompt within the agent workflow");
119
+ i0.ɵɵelementEnd()();
120
+ i0.ɵɵelementStart(20, "div", 12)(21, "label", 19);
121
+ i0.ɵɵtext(22, "Status *");
122
+ i0.ɵɵelementEnd();
123
+ i0.ɵɵelement(23, "kendo-dropdownlist", 20);
124
+ i0.ɵɵtemplate(24, AgentPromptAdvancedSettingsDialogComponent_Conditional_3_Conditional_24_Template, 2, 1, "div", 15);
125
+ i0.ɵɵelementStart(25, "small", 16);
126
+ i0.ɵɵtext(26, "Current status of this prompt mapping");
127
+ i0.ɵɵelementEnd()()()();
128
+ i0.ɵɵelementStart(27, "div", 8)(28, "h3", 9);
129
+ i0.ɵɵelement(29, "i", 21);
130
+ i0.ɵɵtext(30, " Context Behavior ");
131
+ i0.ɵɵelementEnd();
132
+ i0.ɵɵelementStart(31, "div", 11)(32, "div", 22)(33, "label", 23);
133
+ i0.ɵɵtext(34, "Context Behavior *");
134
+ i0.ɵɵelementEnd();
135
+ i0.ɵɵelementStart(35, "kendo-dropdownlist", 24);
136
+ i0.ɵɵtemplate(36, AgentPromptAdvancedSettingsDialogComponent_Conditional_3_ng_template_36_Template, 5, 2, "ng-template", 25);
137
+ i0.ɵɵelementEnd();
138
+ i0.ɵɵtemplate(37, AgentPromptAdvancedSettingsDialogComponent_Conditional_3_Conditional_37_Template, 2, 1, "div", 15);
139
+ i0.ɵɵelementStart(38, "small", 16);
140
+ i0.ɵɵtext(39);
141
+ i0.ɵɵelementEnd()();
142
+ i0.ɵɵtemplate(40, AgentPromptAdvancedSettingsDialogComponent_Conditional_3_Conditional_40_Template, 7, 4, "div", 12);
143
+ i0.ɵɵelementEnd()();
144
+ i0.ɵɵelementStart(41, "div", 8)(42, "h3", 9);
145
+ i0.ɵɵelement(43, "i", 26);
146
+ i0.ɵɵtext(44, " AI Configuration Override ");
147
+ i0.ɵɵelementEnd();
148
+ i0.ɵɵelementStart(45, "div", 11)(46, "div", 22)(47, "label", 27);
149
+ i0.ɵɵtext(48, "AI Configuration");
150
+ i0.ɵɵelementEnd();
151
+ i0.ɵɵelement(49, "kendo-dropdownlist", 28);
152
+ i0.ɵɵpipe(50, "async");
153
+ i0.ɵɵelementStart(51, "small", 16);
154
+ i0.ɵɵtext(52, "Override the agent's default AI configuration for this specific prompt");
155
+ i0.ɵɵelementEnd()()()()();
156
+ } if (rf & 2) {
157
+ let tmp_13_0;
158
+ const ctx_r0 = i0.ɵɵnextContext();
159
+ i0.ɵɵproperty("formGroup", ctx_r0.advancedForm);
160
+ i0.ɵɵadvance(9);
161
+ i0.ɵɵclassProp("error-border", ctx_r0.hasExecutionOrderError());
162
+ i0.ɵɵproperty("min", 0)("format", "0");
163
+ i0.ɵɵadvance();
164
+ i0.ɵɵconditional(ctx_r0.isFieldInvalid("executionOrder") ? 10 : -1);
165
+ i0.ɵɵadvance();
166
+ i0.ɵɵconditional(ctx_r0.hasExecutionOrderError() ? 11 : -1);
167
+ i0.ɵɵadvance(12);
168
+ i0.ɵɵproperty("data", ctx_r0.statusOptions)("valuePrimitive", true);
169
+ i0.ɵɵadvance();
170
+ i0.ɵɵconditional(ctx_r0.isFieldInvalid("status") ? 24 : -1);
171
+ i0.ɵɵadvance(11);
172
+ i0.ɵɵproperty("data", ctx_r0.contextBehaviorOptions)("valuePrimitive", true);
173
+ i0.ɵɵadvance(2);
174
+ i0.ɵɵconditional(ctx_r0.isFieldInvalid("contextBehavior") ? 37 : -1);
175
+ i0.ɵɵadvance(2);
176
+ i0.ɵɵtextInterpolate(ctx_r0.getContextBehaviorDescription((tmp_13_0 = ctx_r0.advancedForm.get("contextBehavior")) == null ? null : tmp_13_0.value));
177
+ i0.ɵɵadvance();
178
+ i0.ɵɵconditional(ctx_r0.requiresMessageCount() ? 40 : -1);
179
+ i0.ɵɵadvance(9);
180
+ i0.ɵɵproperty("data", i0.ɵɵpipeBind1(50, 18, ctx_r0.configurations$))("valuePrimitive", true)("defaultItem", i0.ɵɵpureFunction0(20, _c0));
181
+ } }
182
+ function AgentPromptAdvancedSettingsDialogComponent_Conditional_11_Template(rf, ctx) { if (rf & 1) {
183
+ i0.ɵɵelement(0, "i", 34);
184
+ i0.ɵɵtext(1, " Saving... ");
185
+ } }
186
+ function AgentPromptAdvancedSettingsDialogComponent_Conditional_13_Template(rf, ctx) { if (rf & 1) {
187
+ i0.ɵɵelement(0, "i", 35);
188
+ i0.ɵɵtext(1, " Save Settings ");
189
+ } }
190
+ /**
191
+ * Advanced Settings dialog for AI Agent Prompts.
192
+ * Manages execution order, context behavior, and other advanced prompt configurations.
193
+ */
194
+ export class AgentPromptAdvancedSettingsDialogComponent {
195
+ constructor(dialogRef, fb, cdr) {
196
+ this.dialogRef = dialogRef;
197
+ this.fb = fb;
198
+ this.cdr = cdr;
199
+ this.allAgentPrompts = []; // For execution order validation
200
+ // Reactive state management
201
+ this.destroy$ = new Subject();
202
+ this.result = new Subject();
203
+ this.isLoading$ = new BehaviorSubject(false);
204
+ this.isSaving$ = new BehaviorSubject(false);
205
+ // Dropdown data
206
+ this.configurations$ = new BehaviorSubject([]);
207
+ // Available options
208
+ this.contextBehaviorOptions = [
209
+ { text: 'Complete Context', value: 'Complete', description: 'Include entire conversation context' },
210
+ { text: 'Smart Context', value: 'Smart', description: 'AI determines relevant context automatically' },
211
+ { text: 'No Context', value: 'None', description: 'No conversation context included' },
212
+ { text: 'Recent Messages', value: 'RecentMessages', description: 'Include only recent messages' },
213
+ { text: 'Initial Messages', value: 'InitialMessages', description: 'Include only conversation start' },
214
+ { text: 'Custom Context', value: 'Custom', description: 'Custom context filtering logic' }
215
+ ];
216
+ this.statusOptions = [
217
+ { text: 'Active', value: 'Active' },
218
+ { text: 'Inactive', value: 'Inactive' },
219
+ { text: 'Deprecated', value: 'Deprecated' },
220
+ { text: 'Preview', value: 'Preview' }
221
+ ];
222
+ // Execution order validation
223
+ this.executionOrderError = null;
224
+ }
225
+ ngOnInit() {
226
+ this.initializeForm();
227
+ this.loadDropdownData();
228
+ }
229
+ ngOnDestroy() {
230
+ this.destroy$.next();
231
+ this.destroy$.complete();
232
+ }
233
+ initializeForm() {
234
+ this.advancedForm = this.fb.group({
235
+ executionOrder: [this.agentPrompt.ExecutionOrder || 0, [Validators.required, Validators.min(0)]],
236
+ purpose: [this.agentPrompt.Purpose],
237
+ configurationID: [this.agentPrompt.ConfigurationID],
238
+ contextBehavior: [this.agentPrompt.ContextBehavior || 'Complete', [Validators.required]],
239
+ contextMessageCount: [this.agentPrompt.ContextMessageCount],
240
+ status: [this.agentPrompt.Status || 'Active', [Validators.required]]
241
+ });
242
+ this.setupValidationLogic();
243
+ }
244
+ setupValidationLogic() {
245
+ // Context behavior validation
246
+ const contextBehaviorControl = this.advancedForm.get('contextBehavior');
247
+ const contextMessageCountControl = this.advancedForm.get('contextMessageCount');
248
+ contextBehaviorControl?.valueChanges.pipe(takeUntil(this.destroy$)).subscribe(behavior => {
249
+ if (behavior === 'RecentMessages' || behavior === 'InitialMessages') {
250
+ contextMessageCountControl?.setValidators([Validators.required, Validators.min(1)]);
251
+ }
252
+ else {
253
+ contextMessageCountControl?.clearValidators();
254
+ if (behavior !== 'Custom') {
255
+ contextMessageCountControl?.setValue(null);
256
+ }
257
+ }
258
+ contextMessageCountControl?.updateValueAndValidity();
259
+ });
260
+ // Execution order validation
261
+ const executionOrderControl = this.advancedForm.get('executionOrder');
262
+ executionOrderControl?.valueChanges.pipe(takeUntil(this.destroy$)).subscribe(order => {
263
+ this.validateExecutionOrder(order);
264
+ });
265
+ }
266
+ validateExecutionOrder(order) {
267
+ if (order == null) {
268
+ this.executionOrderError = null;
269
+ return;
270
+ }
271
+ // Check for conflicts with other prompts (excluding current one)
272
+ const conflictingPrompt = this.allAgentPrompts.find(p => p.ID !== this.agentPrompt.ID &&
273
+ p.ExecutionOrder === order);
274
+ if (conflictingPrompt) {
275
+ this.executionOrderError = `Execution order ${order} is already used by another prompt. Please choose a different order.`;
276
+ }
277
+ else {
278
+ this.executionOrderError = null;
279
+ }
280
+ this.cdr.detectChanges();
281
+ }
282
+ async loadDropdownData() {
283
+ this.isLoading$.next(true);
284
+ try {
285
+ const rv = new RunView();
286
+ // Load AI Configurations
287
+ const configurationsResult = await rv.RunView({
288
+ EntityName: 'MJ: AI Configurations',
289
+ ExtraFilter: "Status = 'Active'",
290
+ OrderBy: 'Name',
291
+ ResultType: 'entity_object',
292
+ MaxRows: 1000
293
+ });
294
+ if (configurationsResult.Success) {
295
+ this.configurations$.next(configurationsResult.Results || []);
296
+ }
297
+ }
298
+ catch (error) {
299
+ console.error('Error loading dropdown data:', error);
300
+ MJNotificationService.Instance.CreateSimpleNotification('Error loading form data. Please try again.', 'error', 3000);
301
+ }
302
+ finally {
303
+ this.isLoading$.next(false);
304
+ }
305
+ }
306
+ // === Validation Helpers ===
307
+ isFieldInvalid(fieldName) {
308
+ const field = this.advancedForm.get(fieldName);
309
+ return !!(field && field.invalid && (field.dirty || field.touched));
310
+ }
311
+ getFieldError(fieldName) {
312
+ const field = this.advancedForm.get(fieldName);
313
+ if (field?.errors) {
314
+ if (field.errors['required'])
315
+ return `${fieldName} is required`;
316
+ if (field.errors['min'])
317
+ return `${fieldName} must be greater than or equal to ${field.errors['min'].min}`;
318
+ }
319
+ return '';
320
+ }
321
+ hasExecutionOrderError() {
322
+ return !!this.executionOrderError;
323
+ }
324
+ // === Context Behavior Helpers ===
325
+ requiresMessageCount() {
326
+ const behavior = this.advancedForm.get('contextBehavior')?.value;
327
+ return behavior === 'RecentMessages' || behavior === 'InitialMessages';
328
+ }
329
+ getContextBehaviorDescription(value) {
330
+ const option = this.contextBehaviorOptions.find(opt => opt.value === value);
331
+ return option?.description || '';
332
+ }
333
+ // === Dialog Actions ===
334
+ cancel() {
335
+ this.result.next(null);
336
+ this.dialogRef.close();
337
+ }
338
+ async save() {
339
+ if (this.advancedForm.invalid || this.hasExecutionOrderError()) {
340
+ this.advancedForm.markAllAsTouched();
341
+ MJNotificationService.Instance.CreateSimpleNotification('Please fix validation errors before saving', 'error', 3000);
342
+ return;
343
+ }
344
+ this.isSaving$.next(true);
345
+ try {
346
+ const formData = {
347
+ executionOrder: this.advancedForm.get('executionOrder')?.value,
348
+ purpose: this.advancedForm.get('purpose')?.value || null,
349
+ configurationID: this.advancedForm.get('configurationID')?.value || null,
350
+ contextBehavior: this.advancedForm.get('contextBehavior')?.value,
351
+ contextMessageCount: this.advancedForm.get('contextMessageCount')?.value || null,
352
+ status: this.advancedForm.get('status')?.value
353
+ };
354
+ this.result.next(formData);
355
+ this.dialogRef.close();
356
+ }
357
+ catch (error) {
358
+ console.error('Error saving advanced settings:', error);
359
+ MJNotificationService.Instance.CreateSimpleNotification('Error saving settings. Please try again.', 'error', 3000);
360
+ }
361
+ finally {
362
+ this.isSaving$.next(false);
363
+ }
364
+ }
365
+ static { this.ɵfac = function AgentPromptAdvancedSettingsDialogComponent_Factory(t) { return new (t || AgentPromptAdvancedSettingsDialogComponent)(i0.ɵɵdirectiveInject(i1.DialogRef), i0.ɵɵdirectiveInject(i2.FormBuilder), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); }; }
366
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AgentPromptAdvancedSettingsDialogComponent, selectors: [["mj-agent-prompt-advanced-settings-dialog"]], decls: 14, vars: 14, consts: [[1, "prompt-advanced-settings-dialog"], [1, "loading-state"], [1, "advanced-form", 3, "formGroup"], [1, "dialog-footer"], ["kendoButton", "", "look", "flat", 3, "click", "disabled"], ["kendoButton", "", "themeColor", "primary", 3, "click", "disabled"], [1, "loading-spinner"], [1, "fa-solid", "fa-spinner", "fa-spin", "fa-2x"], [1, "form-section"], [1, "section-title"], [1, "fa-solid", "fa-list-ol"], [1, "form-grid"], [1, "form-field"], ["for", "executionOrder"], ["formControlName", "executionOrder", 1, "form-control", 3, "min", "format"], [1, "field-error"], [1, "field-hint"], ["for", "purpose"], ["formControlName", "purpose", "placeholder", "e.g., Initialize, ProcessData, Summarize", 1, "form-control"], ["for", "status"], ["formControlName", "status", "textField", "text", "valueField", "value", 1, "form-control", 3, "data", "valuePrimitive"], [1, "fa-solid", "fa-comments"], [1, "form-field", "full-width"], ["for", "contextBehavior"], ["formControlName", "contextBehavior", "textField", "text", "valueField", "value", 1, "form-control", 3, "data", "valuePrimitive"], ["kendoDropDownListItemTemplate", ""], [1, "fa-solid", "fa-cog"], ["for", "configurationID"], ["formControlName", "configurationID", "textField", "Name", "valueField", "ID", 1, "form-control", 3, "data", "valuePrimitive", "defaultItem"], [1, "context-behavior-option"], [1, "option-title"], [1, "option-description"], ["for", "contextMessageCount"], ["formControlName", "contextMessageCount", 1, "form-control", 3, "min", "format"], [1, "fa-solid", "fa-spinner", "fa-spin"], [1, "fa-solid", "fa-save"]], template: function AgentPromptAdvancedSettingsDialogComponent_Template(rf, ctx) { if (rf & 1) {
367
+ i0.ɵɵelementStart(0, "div", 0);
368
+ i0.ɵɵtemplate(1, AgentPromptAdvancedSettingsDialogComponent_Conditional_1_Template, 5, 0, "div", 1);
369
+ i0.ɵɵpipe(2, "async");
370
+ i0.ɵɵtemplate(3, AgentPromptAdvancedSettingsDialogComponent_Conditional_3_Template, 53, 21, "form", 2);
371
+ i0.ɵɵelementStart(4, "div", 3)(5, "button", 4);
372
+ i0.ɵɵpipe(6, "async");
373
+ i0.ɵɵlistener("click", function AgentPromptAdvancedSettingsDialogComponent_Template_button_click_5_listener() { return ctx.cancel(); });
374
+ i0.ɵɵtext(7, " Cancel ");
375
+ i0.ɵɵelementEnd();
376
+ i0.ɵɵelementStart(8, "button", 5);
377
+ i0.ɵɵpipe(9, "async");
378
+ i0.ɵɵpipe(10, "async");
379
+ i0.ɵɵlistener("click", function AgentPromptAdvancedSettingsDialogComponent_Template_button_click_8_listener() { return ctx.save(); });
380
+ i0.ɵɵtemplate(11, AgentPromptAdvancedSettingsDialogComponent_Conditional_11_Template, 2, 0);
381
+ i0.ɵɵpipe(12, "async");
382
+ i0.ɵɵtemplate(13, AgentPromptAdvancedSettingsDialogComponent_Conditional_13_Template, 2, 0);
383
+ i0.ɵɵelementEnd()()();
384
+ } if (rf & 2) {
385
+ i0.ɵɵadvance();
386
+ i0.ɵɵconditional(i0.ɵɵpipeBind1(2, 4, ctx.isLoading$) ? 1 : 3);
387
+ i0.ɵɵadvance(4);
388
+ i0.ɵɵproperty("disabled", i0.ɵɵpipeBind1(6, 6, ctx.isSaving$) || false);
389
+ i0.ɵɵadvance(3);
390
+ i0.ɵɵproperty("disabled", i0.ɵɵpipeBind1(9, 8, ctx.isSaving$) || false || (i0.ɵɵpipeBind1(10, 10, ctx.isLoading$) || false) || ctx.hasExecutionOrderError());
391
+ i0.ɵɵadvance(3);
392
+ i0.ɵɵconditional(i0.ɵɵpipeBind1(12, 12, ctx.isSaving$) ? 11 : 13);
393
+ } }, dependencies: [i2.ɵNgNoValidate, i2.NgControlStatus, i2.NgControlStatusGroup, i2.FormGroupDirective, i2.FormControlName, i3.TextBoxComponent, i3.NumericTextBoxComponent, i4.ItemTemplateDirective, i4.DropDownListComponent, i5.ButtonComponent, i6.AsyncPipe], styles: [".prompt-advanced-settings-dialog[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n height: 100%;\n font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n}\n\n\n\n.loading-state[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n height: 300px;\n color: #6c757d;\n}\n\n.loading-spinner[_ngcontent-%COMP%] {\n margin-bottom: 1rem;\n}\n\n.loading-spinner[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: #2196f3;\n}\n\n.loading-state[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\n margin-top: 1rem;\n font-size: 1.1rem;\n}\n\n\n\n.advanced-form[_ngcontent-%COMP%] {\n flex: 1;\n overflow-y: auto;\n padding: 1.5rem;\n}\n\n.form-section[_ngcontent-%COMP%] {\n margin-bottom: 2rem;\n background: white;\n border-radius: 8px;\n border: 1px solid #e0e0e0;\n overflow: hidden;\n}\n\n.section-title[_ngcontent-%COMP%] {\n margin: 0;\n padding: 1rem 1.5rem;\n background: #f8f9fa;\n border-bottom: 1px solid #e0e0e0;\n color: #495057;\n font-size: 1.1rem;\n font-weight: 600;\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.section-title[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: #2196f3;\n}\n\n.form-grid[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 1.5rem;\n padding: 1.5rem;\n}\n\n.form-field[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n\n.form-field.full-width[_ngcontent-%COMP%] {\n grid-column: 1 / -1;\n}\n\n\n\nlabel[_ngcontent-%COMP%] {\n font-weight: 600;\n color: #495057;\n font-size: 0.9rem;\n}\n\n.form-control[_ngcontent-%COMP%] {\n width: 100%;\n}\n\n.field-hint[_ngcontent-%COMP%] {\n color: #6c757d;\n font-size: 0.8rem;\n margin-top: 0.25rem;\n line-height: 1.3;\n}\n\n.field-error[_ngcontent-%COMP%] {\n color: #dc3545;\n font-size: 0.8rem;\n margin-top: 0.25rem;\n}\n\n\n\n.form-control.ng-invalid.ng-touched[_ngcontent-%COMP%], \n.error-border[_ngcontent-%COMP%] {\n border-color: #dc3545 !important;\n}\n\n.form-control.ng-valid.ng-touched[_ngcontent-%COMP%] {\n border-color: #28a745;\n}\n\n\n\n.context-behavior-option[_ngcontent-%COMP%] {\n padding: 0.5rem 0;\n}\n\n.option-title[_ngcontent-%COMP%] {\n font-weight: 500;\n color: #333;\n font-size: 0.9rem;\n}\n\n.option-description[_ngcontent-%COMP%] {\n font-size: 0.8rem;\n color: #666;\n margin-top: 0.25rem;\n line-height: 1.3;\n}\n\n\n\n.dialog-footer[_ngcontent-%COMP%] {\n display: flex;\n justify-content: flex-end;\n gap: 1rem;\n padding: 1rem 1.5rem;\n border-top: 1px solid #e0e0e0;\n background: #f8f9fa;\n}\n\n.dialog-footer[_ngcontent-%COMP%] button[_ngcontent-%COMP%] {\n min-width: 120px;\n}\n\n.dialog-footer[_ngcontent-%COMP%] button[themeColor=\"primary\"][_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n margin-right: 0.5rem;\n}\n\n\n\n\n\n\n.form-section[_ngcontent-%COMP%]:first-child .section-title[_ngcontent-%COMP%] {\n background: linear-gradient(135deg, #e3f2fd, #f8f9fa);\n}\n\n\n\n.form-section[_ngcontent-%COMP%]:nth-child(2) .section-title[_ngcontent-%COMP%] {\n background: linear-gradient(135deg, #f3e5f5, #f8f9fa);\n}\n\n\n\n.form-section[_ngcontent-%COMP%]:nth-child(3) .section-title[_ngcontent-%COMP%] {\n background: linear-gradient(135deg, #e8f5e8, #f8f9fa);\n}\n\n\n\n@media (max-width: 768px) {\n .form-grid[_ngcontent-%COMP%] {\n grid-template-columns: 1fr;\n gap: 1rem;\n padding: 1rem;\n }\n \n .form-field.full-width[_ngcontent-%COMP%] {\n grid-column: 1;\n }\n \n .advanced-form[_ngcontent-%COMP%] {\n padding: 1rem;\n }\n \n .section-title[_ngcontent-%COMP%] {\n padding: 0.75rem 1rem;\n font-size: 1rem;\n }\n \n .dialog-footer[_ngcontent-%COMP%] {\n padding: 1rem;\n flex-direction: column;\n }\n \n .dialog-footer[_ngcontent-%COMP%] button[_ngcontent-%COMP%] {\n width: 100%;\n }\n}\n\n\n\n.error-border[_ngcontent-%COMP%] {\n border: 2px solid #dc3545 !important;\n background-color: #fff5f5;\n}"] }); }
394
+ }
395
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AgentPromptAdvancedSettingsDialogComponent, [{
396
+ type: Component,
397
+ args: [{ selector: 'mj-agent-prompt-advanced-settings-dialog', template: "<!-- Prompt Advanced Settings Dialog -->\n<div class=\"prompt-advanced-settings-dialog\">\n \n <!-- Loading State -->\n @if (isLoading$ | async) {\n <div class=\"loading-state\">\n <div class=\"loading-spinner\">\n <i class=\"fa-solid fa-spinner fa-spin fa-2x\"></i>\n </div>\n <p>Loading prompt settings...</p>\n </div>\n } @else {\n \n <!-- Form Content -->\n <form [formGroup]=\"advancedForm\" class=\"advanced-form\">\n \n <!-- Execution Configuration Section -->\n <div class=\"form-section\">\n <h3 class=\"section-title\">\n <i class=\"fa-solid fa-list-ol\"></i>\n Execution Configuration\n </h3>\n \n <div class=\"form-grid\">\n <!-- Execution Order -->\n <div class=\"form-field\">\n <label for=\"executionOrder\">Execution Order *</label>\n <kendo-numerictextbox \n formControlName=\"executionOrder\"\n [min]=\"0\"\n [format]=\"'0'\"\n [class.error-border]=\"hasExecutionOrderError()\"\n class=\"form-control\">\n </kendo-numerictextbox>\n @if (isFieldInvalid('executionOrder')) {\n <div class=\"field-error\">{{ getFieldError('executionOrder') }}</div>\n }\n @if (hasExecutionOrderError()) {\n <div class=\"field-error\">{{ executionOrderError }}</div>\n }\n <small class=\"field-hint\">Order in which this prompt executes (0 = first). Must be unique among agent prompts.</small>\n </div>\n \n <!-- Purpose -->\n <div class=\"form-field\">\n <label for=\"purpose\">Purpose</label>\n <kendo-textbox \n formControlName=\"purpose\"\n placeholder=\"e.g., Initialize, ProcessData, Summarize\"\n class=\"form-control\">\n </kendo-textbox>\n <small class=\"field-hint\">Functional purpose of this prompt within the agent workflow</small>\n </div>\n \n <!-- Status -->\n <div class=\"form-field\">\n <label for=\"status\">Status *</label>\n <kendo-dropdownlist \n formControlName=\"status\"\n [data]=\"statusOptions\"\n textField=\"text\"\n valueField=\"value\"\n [valuePrimitive]=\"true\"\n class=\"form-control\">\n </kendo-dropdownlist>\n @if (isFieldInvalid('status')) {\n <div class=\"field-error\">{{ getFieldError('status') }}</div>\n }\n <small class=\"field-hint\">Current status of this prompt mapping</small>\n </div>\n </div>\n </div>\n\n <!-- Context Behavior Section -->\n <div class=\"form-section\">\n <h3 class=\"section-title\">\n <i class=\"fa-solid fa-comments\"></i>\n Context Behavior\n </h3>\n \n <div class=\"form-grid\">\n <!-- Context Behavior -->\n <div class=\"form-field full-width\">\n <label for=\"contextBehavior\">Context Behavior *</label>\n <kendo-dropdownlist \n formControlName=\"contextBehavior\"\n [data]=\"contextBehaviorOptions\"\n textField=\"text\"\n valueField=\"value\"\n [valuePrimitive]=\"true\"\n class=\"form-control\">\n <ng-template kendoDropDownListItemTemplate let-dataItem>\n <div class=\"context-behavior-option\">\n <div class=\"option-title\">{{ dataItem.text }}</div>\n <div class=\"option-description\">{{ dataItem.description }}</div>\n </div>\n </ng-template>\n </kendo-dropdownlist>\n @if (isFieldInvalid('contextBehavior')) {\n <div class=\"field-error\">{{ getFieldError('contextBehavior') }}</div>\n }\n <small class=\"field-hint\">{{ getContextBehaviorDescription(advancedForm.get('contextBehavior')?.value) }}</small>\n </div>\n \n <!-- Context Message Count (conditional) -->\n @if (requiresMessageCount()) {\n <div class=\"form-field\">\n <label for=\"contextMessageCount\">Message Count *</label>\n <kendo-numerictextbox \n formControlName=\"contextMessageCount\"\n [min]=\"1\"\n [format]=\"'0'\"\n class=\"form-control\">\n </kendo-numerictextbox>\n @if (isFieldInvalid('contextMessageCount')) {\n <div class=\"field-error\">{{ getFieldError('contextMessageCount') }}</div>\n }\n <small class=\"field-hint\">Number of messages to include for {{ advancedForm.get('contextBehavior')?.value }}</small>\n </div>\n }\n </div>\n </div>\n\n <!-- AI Configuration Section -->\n <div class=\"form-section\">\n <h3 class=\"section-title\">\n <i class=\"fa-solid fa-cog\"></i>\n AI Configuration Override\n </h3>\n \n <div class=\"form-grid\">\n <!-- Configuration Override -->\n <div class=\"form-field full-width\">\n <label for=\"configurationID\">AI Configuration</label>\n <kendo-dropdownlist \n formControlName=\"configurationID\"\n [data]=\"configurations$ | async\"\n textField=\"Name\"\n valueField=\"ID\"\n [valuePrimitive]=\"true\"\n [defaultItem]=\"{ Name: 'Use Agent Default', ID: null }\"\n class=\"form-control\">\n </kendo-dropdownlist>\n <small class=\"field-hint\">Override the agent's default AI configuration for this specific prompt</small>\n </div>\n </div>\n </div>\n </form>\n }\n\n <!-- Dialog Footer -->\n <div class=\"dialog-footer\">\n <button kendoButton \n look=\"flat\" \n (click)=\"cancel()\"\n [disabled]=\"(isSaving$ | async) || false\">\n Cancel\n </button>\n \n <button kendoButton \n themeColor=\"primary\" \n (click)=\"save()\"\n [disabled]=\"((isSaving$ | async) || false) || ((isLoading$ | async) || false) || hasExecutionOrderError()\">\n @if (isSaving$ | async) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n Saving...\n } @else {\n <i class=\"fa-solid fa-save\"></i>\n Save Settings\n }\n </button>\n </div>\n</div>", styles: [".prompt-advanced-settings-dialog {\n display: flex;\n flex-direction: column;\n height: 100%;\n font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n}\n\n/* === Loading State === */\n.loading-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n height: 300px;\n color: #6c757d;\n}\n\n.loading-spinner {\n margin-bottom: 1rem;\n}\n\n.loading-spinner i {\n color: #2196f3;\n}\n\n.loading-state p {\n margin-top: 1rem;\n font-size: 1.1rem;\n}\n\n/* === Form Layout === */\n.advanced-form {\n flex: 1;\n overflow-y: auto;\n padding: 1.5rem;\n}\n\n.form-section {\n margin-bottom: 2rem;\n background: white;\n border-radius: 8px;\n border: 1px solid #e0e0e0;\n overflow: hidden;\n}\n\n.section-title {\n margin: 0;\n padding: 1rem 1.5rem;\n background: #f8f9fa;\n border-bottom: 1px solid #e0e0e0;\n color: #495057;\n font-size: 1.1rem;\n font-weight: 600;\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.section-title i {\n color: #2196f3;\n}\n\n.form-grid {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 1.5rem;\n padding: 1.5rem;\n}\n\n.form-field {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n\n.form-field.full-width {\n grid-column: 1 / -1;\n}\n\n/* === Form Controls === */\nlabel {\n font-weight: 600;\n color: #495057;\n font-size: 0.9rem;\n}\n\n.form-control {\n width: 100%;\n}\n\n.field-hint {\n color: #6c757d;\n font-size: 0.8rem;\n margin-top: 0.25rem;\n line-height: 1.3;\n}\n\n.field-error {\n color: #dc3545;\n font-size: 0.8rem;\n margin-top: 0.25rem;\n}\n\n/* === Validation States === */\n.form-control.ng-invalid.ng-touched,\n.error-border {\n border-color: #dc3545 !important;\n}\n\n.form-control.ng-valid.ng-touched {\n border-color: #28a745;\n}\n\n/* === Context Behavior Option Template === */\n.context-behavior-option {\n padding: 0.5rem 0;\n}\n\n.option-title {\n font-weight: 500;\n color: #333;\n font-size: 0.9rem;\n}\n\n.option-description {\n font-size: 0.8rem;\n color: #666;\n margin-top: 0.25rem;\n line-height: 1.3;\n}\n\n/* === Dialog Footer === */\n.dialog-footer {\n display: flex;\n justify-content: flex-end;\n gap: 1rem;\n padding: 1rem 1.5rem;\n border-top: 1px solid #e0e0e0;\n background: #f8f9fa;\n}\n\n.dialog-footer button {\n min-width: 120px;\n}\n\n.dialog-footer button[themeColor=\"primary\"] i {\n margin-right: 0.5rem;\n}\n\n/* === Section-Specific Styling === */\n\n/* Execution Configuration */\n.form-section:first-child .section-title {\n background: linear-gradient(135deg, #e3f2fd, #f8f9fa);\n}\n\n/* Context Behavior */\n.form-section:nth-child(2) .section-title {\n background: linear-gradient(135deg, #f3e5f5, #f8f9fa);\n}\n\n/* AI Configuration */\n.form-section:nth-child(3) .section-title {\n background: linear-gradient(135deg, #e8f5e8, #f8f9fa);\n}\n\n/* === Responsive Design === */\n@media (max-width: 768px) {\n .form-grid {\n grid-template-columns: 1fr;\n gap: 1rem;\n padding: 1rem;\n }\n \n .form-field.full-width {\n grid-column: 1;\n }\n \n .advanced-form {\n padding: 1rem;\n }\n \n .section-title {\n padding: 0.75rem 1rem;\n font-size: 1rem;\n }\n \n .dialog-footer {\n padding: 1rem;\n flex-direction: column;\n }\n \n .dialog-footer button {\n width: 100%;\n }\n}\n\n/* === Error Highlighting === */\n.error-border {\n border: 2px solid #dc3545 !important;\n background-color: #fff5f5;\n}"] }]
398
+ }], () => [{ type: i1.DialogRef }, { type: i2.FormBuilder }, { type: i0.ChangeDetectorRef }], null); })();
399
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(AgentPromptAdvancedSettingsDialogComponent, { className: "AgentPromptAdvancedSettingsDialogComponent", filePath: "src/lib/custom/AIAgents/agent-prompt-advanced-settings-dialog.component.ts", lineNumber: 27 }); })();
400
+ //# sourceMappingURL=agent-prompt-advanced-settings-dialog.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-prompt-advanced-settings-dialog.component.js","sourceRoot":"","sources":["../../../../src/lib/custom/AIAgents/agent-prompt-advanced-settings-dialog.component.ts","../../../../src/lib/custom/AIAgents/agent-prompt-advanced-settings-dialog.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAwC,MAAM,eAAe,CAAC;AAChF,OAAO,EAA0B,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEpE,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAY,MAAM,sBAAsB,CAAC;AAEzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;;;;;;;;;;ICAnE,AADF,8BAA2B,aACI;IAC3B,uBAAiD;IACnD,iBAAM;IACN,yBAAG;IAAA,0CAA0B;IAC/B,AAD+B,iBAAI,EAC7B;;;IAyBI,+BAAyB;IAAA,YAAqC;IAAA,iBAAM;;;IAA3C,cAAqC;IAArC,4DAAqC;;;IAG9D,+BAAyB;IAAA,YAAyB;IAAA,iBAAM;;;IAA/B,cAAyB;IAAzB,gDAAyB;;;IA4BlD,+BAAyB;IAAA,YAA6B;IAAA,iBAAM;;;IAAnC,cAA6B;IAA7B,oDAA6B;;;IA2BlD,AADF,+BAAqC,cACT;IAAA,YAAmB;IAAA,iBAAM;IACn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