@memberjunction/ng-core-entity-forms 2.70.0 → 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.
- package/dist/lib/custom/AIAgents/add-action-dialog.component.d.ts +65 -0
- package/dist/lib/custom/AIAgents/add-action-dialog.component.d.ts.map +1 -0
- package/dist/lib/custom/AIAgents/add-action-dialog.component.js +578 -0
- package/dist/lib/custom/AIAgents/add-action-dialog.component.js.map +1 -0
- package/dist/lib/custom/AIAgents/agent-advanced-settings-dialog.component.d.ts +1 -0
- package/dist/lib/custom/AIAgents/agent-advanced-settings-dialog.component.d.ts.map +1 -0
- package/dist/lib/custom/AIAgents/agent-advanced-settings-dialog.component.js +282 -0
- package/dist/lib/custom/AIAgents/agent-advanced-settings-dialog.component.js.map +1 -0
- package/dist/lib/custom/AIAgents/agent-prompt-advanced-settings-dialog.component.d.ts +58 -0
- package/dist/lib/custom/AIAgents/agent-prompt-advanced-settings-dialog.component.d.ts.map +1 -0
- package/dist/lib/custom/AIAgents/agent-prompt-advanced-settings-dialog.component.js +400 -0
- package/dist/lib/custom/AIAgents/agent-prompt-advanced-settings-dialog.component.js.map +1 -0
- package/dist/lib/custom/AIAgents/ai-agent-form.component.d.ts +119 -23
- package/dist/lib/custom/AIAgents/ai-agent-form.component.d.ts.map +1 -1
- package/dist/lib/custom/AIAgents/ai-agent-form.component.js +1815 -924
- package/dist/lib/custom/AIAgents/ai-agent-form.component.js.map +1 -1
- package/dist/lib/custom/AIAgents/ai-agent-management.service.d.ts +159 -0
- package/dist/lib/custom/AIAgents/ai-agent-management.service.d.ts.map +1 -0
- package/dist/lib/custom/AIAgents/ai-agent-management.service.js +315 -0
- package/dist/lib/custom/AIAgents/ai-agent-management.service.js.map +1 -0
- package/dist/lib/custom/AIAgents/create-prompt-dialog.component.d.ts +67 -0
- package/dist/lib/custom/AIAgents/create-prompt-dialog.component.d.ts.map +1 -0
- package/dist/lib/custom/AIAgents/create-prompt-dialog.component.js +463 -0
- package/dist/lib/custom/AIAgents/create-prompt-dialog.component.js.map +1 -0
- package/dist/lib/custom/AIAgents/create-sub-agent-dialog.component.d.ts +82 -0
- package/dist/lib/custom/AIAgents/create-sub-agent-dialog.component.d.ts.map +1 -0
- package/dist/lib/custom/AIAgents/create-sub-agent-dialog.component.js +708 -0
- package/dist/lib/custom/AIAgents/create-sub-agent-dialog.component.js.map +1 -0
- package/dist/lib/custom/AIAgents/new-agent-dialog.component.js +2 -2
- package/dist/lib/custom/AIAgents/prompt-selector-dialog.component.d.ts +65 -0
- package/dist/lib/custom/AIAgents/prompt-selector-dialog.component.d.ts.map +1 -0
- package/dist/lib/custom/AIAgents/prompt-selector-dialog.component.js +379 -0
- package/dist/lib/custom/AIAgents/prompt-selector-dialog.component.js.map +1 -0
- package/dist/lib/custom/AIAgents/sub-agent-advanced-settings-dialog.component.d.ts +58 -0
- package/dist/lib/custom/AIAgents/sub-agent-advanced-settings-dialog.component.d.ts.map +1 -0
- package/dist/lib/custom/AIAgents/sub-agent-advanced-settings-dialog.component.js +373 -0
- package/dist/lib/custom/AIAgents/sub-agent-advanced-settings-dialog.component.js.map +1 -0
- package/dist/lib/custom/AIAgents/sub-agent-selector-dialog.component.d.ts +61 -0
- package/dist/lib/custom/AIAgents/sub-agent-selector-dialog.component.d.ts.map +1 -0
- package/dist/lib/custom/AIAgents/sub-agent-selector-dialog.component.js +459 -0
- package/dist/lib/custom/AIAgents/sub-agent-selector-dialog.component.js.map +1 -0
- package/dist/lib/custom/AIPrompts/ai-prompt-form.component.d.ts +90 -10
- package/dist/lib/custom/AIPrompts/ai-prompt-form.component.d.ts.map +1 -1
- package/dist/lib/custom/AIPrompts/ai-prompt-form.component.js +1159 -687
- package/dist/lib/custom/AIPrompts/ai-prompt-form.component.js.map +1 -1
- package/dist/lib/custom/AIPrompts/ai-prompt-management.service.d.ts +27 -0
- package/dist/lib/custom/AIPrompts/ai-prompt-management.service.d.ts.map +1 -0
- package/dist/lib/custom/AIPrompts/ai-prompt-management.service.js +88 -0
- package/dist/lib/custom/AIPrompts/ai-prompt-management.service.js.map +1 -0
- package/dist/lib/custom/AIPrompts/template-selector-dialog.component.d.ts +69 -0
- package/dist/lib/custom/AIPrompts/template-selector-dialog.component.d.ts.map +1 -0
- package/dist/lib/custom/AIPrompts/template-selector-dialog.component.js +442 -0
- package/dist/lib/custom/AIPrompts/template-selector-dialog.component.js.map +1 -0
- package/dist/lib/custom/ai-agent-run/ai-agent-run.component.js +2 -2
- package/dist/lib/custom/ai-agent-run/ai-agent-run.component.js.map +1 -1
- package/dist/lib/custom/custom-forms.module.d.ts +40 -33
- package/dist/lib/custom/custom-forms.module.d.ts.map +1 -1
- package/dist/lib/custom/custom-forms.module.js +26 -2
- package/dist/lib/custom/custom-forms.module.js.map +1 -1
- package/dist/lib/shared/components/template-editor.component.d.ts +8 -2
- package/dist/lib/shared/components/template-editor.component.d.ts.map +1 -1
- package/dist/lib/shared/components/template-editor.component.js +58 -23
- package/dist/lib/shared/components/template-editor.component.js.map +1 -1
- package/package.json +16 -16
|
@@ -16,21 +16,22 @@ import * as i0 from "@angular/core";
|
|
|
16
16
|
import * as i1 from "@memberjunction/ng-shared";
|
|
17
17
|
import * as i2 from "@angular/router";
|
|
18
18
|
import * as i3 from "@memberjunction/ng-ai-test-harness";
|
|
19
|
-
import * as i4 from "
|
|
20
|
-
import * as i5 from "@angular/
|
|
21
|
-
import * as i6 from "@
|
|
22
|
-
import * as i7 from "@progress/kendo-angular-
|
|
23
|
-
import * as i8 from "@progress/kendo-angular-
|
|
24
|
-
import * as i9 from "@progress/kendo-angular-
|
|
25
|
-
import * as i10 from "@progress/kendo-angular-
|
|
26
|
-
import * as i11 from "@
|
|
27
|
-
import * as i12 from "@memberjunction/ng-
|
|
28
|
-
import * as i13 from "@memberjunction/ng-
|
|
29
|
-
import * as i14 from "@memberjunction/ng-
|
|
30
|
-
import * as i15 from "
|
|
19
|
+
import * as i4 from "./ai-prompt-management.service";
|
|
20
|
+
import * as i5 from "@angular/common";
|
|
21
|
+
import * as i6 from "@angular/forms";
|
|
22
|
+
import * as i7 from "@progress/kendo-angular-layout";
|
|
23
|
+
import * as i8 from "@progress/kendo-angular-dialog";
|
|
24
|
+
import * as i9 from "@progress/kendo-angular-inputs";
|
|
25
|
+
import * as i10 from "@progress/kendo-angular-dropdowns";
|
|
26
|
+
import * as i11 from "@progress/kendo-angular-buttons";
|
|
27
|
+
import * as i12 from "@memberjunction/ng-user-view-grid";
|
|
28
|
+
import * as i13 from "@memberjunction/ng-base-forms";
|
|
29
|
+
import * as i14 from "@memberjunction/ng-form-toolbar";
|
|
30
|
+
import * as i15 from "@memberjunction/ng-code-editor";
|
|
31
|
+
import * as i16 from "../../shared/components/template-editor.component";
|
|
31
32
|
const _c0 = ["templateEditor"];
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
function _forTrack0($index, $item) { return this.getModelTrackId($item) || $index; }
|
|
34
|
+
const _forTrack1 = ($index, $item) => $item.ID;
|
|
34
35
|
const _c1 = () => ({ text: "Active", value: "Active" });
|
|
35
36
|
const _c2 = () => ({ text: "Pending", value: "Pending" });
|
|
36
37
|
const _c3 = () => ({ text: "Disabled", value: "Disabled" });
|
|
@@ -203,8 +204,27 @@ function AIPromptFormComponentExtended_form_2_Conditional_37_Template(rf, ctx) {
|
|
|
203
204
|
i0.ɵɵtext(2, " Loading template... ");
|
|
204
205
|
i0.ɵɵelementEnd();
|
|
205
206
|
} }
|
|
206
|
-
function
|
|
207
|
+
function AIPromptFormComponentExtended_form_2_Conditional_38_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
207
208
|
const _r7 = i0.ɵɵgetCurrentView();
|
|
209
|
+
i0.ɵɵelementStart(0, "button", 72);
|
|
210
|
+
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_2_Conditional_38_Conditional_7_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r7); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.createNewTemplate()); });
|
|
211
|
+
i0.ɵɵelement(1, "i", 73);
|
|
212
|
+
i0.ɵɵtext(2, " Create New Template ");
|
|
213
|
+
i0.ɵɵelementEnd();
|
|
214
|
+
} if (rf & 2) {
|
|
215
|
+
i0.ɵɵproperty("themeColor", "primary");
|
|
216
|
+
} }
|
|
217
|
+
function AIPromptFormComponentExtended_form_2_Conditional_38_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
218
|
+
const _r8 = i0.ɵɵgetCurrentView();
|
|
219
|
+
i0.ɵɵelementStart(0, "button", 74);
|
|
220
|
+
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_2_Conditional_38_Conditional_8_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.linkExistingTemplate()); });
|
|
221
|
+
i0.ɵɵelement(1, "i", 75);
|
|
222
|
+
i0.ɵɵtext(2, " Link Existing Template ");
|
|
223
|
+
i0.ɵɵelementEnd();
|
|
224
|
+
} if (rf & 2) {
|
|
225
|
+
i0.ɵɵproperty("fillMode", "outline");
|
|
226
|
+
} }
|
|
227
|
+
function AIPromptFormComponentExtended_form_2_Conditional_38_Template(rf, ctx) { if (rf & 1) {
|
|
208
228
|
i0.ɵɵelementStart(0, "div", 34);
|
|
209
229
|
i0.ɵɵelement(1, "i", 66);
|
|
210
230
|
i0.ɵɵelementStart(2, "h5", 67);
|
|
@@ -213,261 +233,97 @@ function AIPromptFormComponentExtended_form_2_Conditional_38_Template(rf, ctx) {
|
|
|
213
233
|
i0.ɵɵelementStart(4, "p", 68);
|
|
214
234
|
i0.ɵɵtext(5, " This AI prompt needs a template to define its structure and parameters. Create a new template or link to an existing one. ");
|
|
215
235
|
i0.ɵɵelementEnd();
|
|
216
|
-
i0.ɵɵelementStart(6, "div", 69)
|
|
217
|
-
i0.ɵɵ
|
|
218
|
-
i0.ɵɵ
|
|
219
|
-
i0.ɵɵtext(9, " Create New Template ");
|
|
220
|
-
i0.ɵɵelementEnd();
|
|
221
|
-
i0.ɵɵelementStart(10, "button", 72);
|
|
222
|
-
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_2_Conditional_38_Template_button_click_10_listener() { i0.ɵɵrestoreView(_r7); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.linkExistingTemplate()); });
|
|
223
|
-
i0.ɵɵelement(11, "i", 73);
|
|
224
|
-
i0.ɵɵtext(12, " Link Existing Template ");
|
|
225
|
-
i0.ɵɵelementEnd()()();
|
|
236
|
+
i0.ɵɵelementStart(6, "div", 69);
|
|
237
|
+
i0.ɵɵtemplate(7, AIPromptFormComponentExtended_form_2_Conditional_38_Conditional_7_Template, 3, 1, "button", 70)(8, AIPromptFormComponentExtended_form_2_Conditional_38_Conditional_8_Template, 3, 1, "button", 71);
|
|
238
|
+
i0.ɵɵelementEnd()();
|
|
226
239
|
} if (rf & 2) {
|
|
240
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
227
241
|
i0.ɵɵadvance(7);
|
|
242
|
+
i0.ɵɵconditional(ctx_r1.UserCanCreateTemplates ? 7 : -1);
|
|
243
|
+
i0.ɵɵadvance();
|
|
244
|
+
i0.ɵɵconditional(ctx_r1.UserCanReadTemplates ? 8 : -1);
|
|
245
|
+
} }
|
|
246
|
+
function AIPromptFormComponentExtended_form_2_Conditional_39_Conditional_10_Template(rf, ctx) { if (rf & 1) {
|
|
247
|
+
const _r10 = i0.ɵɵgetCurrentView();
|
|
248
|
+
i0.ɵɵelementStart(0, "button", 72);
|
|
249
|
+
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_2_Conditional_39_Conditional_10_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r10); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.createNewTemplate()); });
|
|
250
|
+
i0.ɵɵelement(1, "i", 73);
|
|
251
|
+
i0.ɵɵtext(2, " Create New Template ");
|
|
252
|
+
i0.ɵɵelementEnd();
|
|
253
|
+
} if (rf & 2) {
|
|
228
254
|
i0.ɵɵproperty("themeColor", "primary");
|
|
229
|
-
i0.ɵɵadvance(3);
|
|
230
|
-
i0.ɵɵproperty("fillMode", "outline");
|
|
231
255
|
} }
|
|
232
256
|
function AIPromptFormComponentExtended_form_2_Conditional_39_Template(rf, ctx) { if (rf & 1) {
|
|
233
|
-
const
|
|
257
|
+
const _r9 = i0.ɵɵgetCurrentView();
|
|
234
258
|
i0.ɵɵelementStart(0, "div", 35);
|
|
235
|
-
i0.ɵɵelement(1, "i",
|
|
236
|
-
i0.ɵɵelementStart(2, "h5",
|
|
259
|
+
i0.ɵɵelement(1, "i", 76);
|
|
260
|
+
i0.ɵɵelementStart(2, "h5", 77);
|
|
237
261
|
i0.ɵɵtext(3, "Template Not Found");
|
|
238
262
|
i0.ɵɵelementEnd();
|
|
239
263
|
i0.ɵɵelementStart(4, "p", 68);
|
|
240
264
|
i0.ɵɵtext(5, " The referenced template could not be loaded. It may have been deleted or moved. ");
|
|
241
265
|
i0.ɵɵelementEnd();
|
|
242
|
-
i0.ɵɵelementStart(6, "div", 69)(7, "button",
|
|
243
|
-
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_2_Conditional_39_Template_button_click_7_listener() { i0.ɵɵrestoreView(
|
|
244
|
-
i0.ɵɵelement(8, "i",
|
|
266
|
+
i0.ɵɵelementStart(6, "div", 69)(7, "button", 74);
|
|
267
|
+
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_2_Conditional_39_Template_button_click_7_listener() { i0.ɵɵrestoreView(_r9); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.loadTemplate()); });
|
|
268
|
+
i0.ɵɵelement(8, "i", 78);
|
|
245
269
|
i0.ɵɵtext(9, " Retry Loading ");
|
|
246
270
|
i0.ɵɵelementEnd();
|
|
247
|
-
i0.ɵɵ
|
|
248
|
-
i0.ɵɵ
|
|
249
|
-
i0.ɵɵelement(11, "i", 71);
|
|
250
|
-
i0.ɵɵtext(12, " Create New Template ");
|
|
251
|
-
i0.ɵɵelementEnd()()();
|
|
271
|
+
i0.ɵɵtemplate(10, AIPromptFormComponentExtended_form_2_Conditional_39_Conditional_10_Template, 3, 1, "button", 70);
|
|
272
|
+
i0.ɵɵelementEnd()();
|
|
252
273
|
} if (rf & 2) {
|
|
274
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
253
275
|
i0.ɵɵadvance(7);
|
|
254
276
|
i0.ɵɵproperty("fillMode", "outline");
|
|
255
277
|
i0.ɵɵadvance(3);
|
|
256
|
-
i0.ɵɵ
|
|
278
|
+
i0.ɵɵconditional(ctx_r1.UserCanCreateTemplates ? 10 : -1);
|
|
257
279
|
} }
|
|
258
|
-
function
|
|
259
|
-
const
|
|
260
|
-
i0.ɵɵelementStart(0, "
|
|
261
|
-
i0.ɵɵlistener("
|
|
262
|
-
i0.ɵɵelementEnd()()();
|
|
263
|
-
} if (rf & 2) {
|
|
264
|
-
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
265
|
-
i0.ɵɵadvance(2);
|
|
266
|
-
i0.ɵɵproperty("template", ctx_r1.template)("config", ctx_r1.templateEditorConfig);
|
|
267
|
-
} }
|
|
268
|
-
function AIPromptFormComponentExtended_form_2_Conditional_41_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
269
|
-
i0.ɵɵelementStart(0, "span", 63);
|
|
270
|
-
i0.ɵɵelement(1, "i", 81);
|
|
271
|
-
i0.ɵɵtext(2, " Template Parameters ");
|
|
272
|
-
i0.ɵɵelementStart(3, "span", 82);
|
|
273
|
-
i0.ɵɵtext(4);
|
|
274
|
-
i0.ɵɵelementEnd();
|
|
275
|
-
i0.ɵɵelementStart(5, "span", 83);
|
|
276
|
-
i0.ɵɵelement(6, "i", 84);
|
|
277
|
-
i0.ɵɵtext(7, " Parameters defined in the template ");
|
|
278
|
-
i0.ɵɵelementEnd()();
|
|
279
|
-
} if (rf & 2) {
|
|
280
|
-
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
281
|
-
i0.ɵɵadvance(4);
|
|
282
|
-
i0.ɵɵtextInterpolate1(" ", ctx_r1.templateParams.length, " ");
|
|
283
|
-
} }
|
|
284
|
-
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
285
|
-
i0.ɵɵelementStart(0, "div", 79);
|
|
286
|
-
i0.ɵɵelement(1, "i", 55);
|
|
287
|
-
i0.ɵɵtext(2, " Loading template parameters... ");
|
|
288
|
-
i0.ɵɵelementEnd();
|
|
289
|
-
} }
|
|
290
|
-
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
291
|
-
i0.ɵɵelementStart(0, "div", 80);
|
|
280
|
+
function AIPromptFormComponentExtended_form_2_Conditional_40_Conditional_1_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
281
|
+
const _r12 = i0.ɵɵgetCurrentView();
|
|
282
|
+
i0.ɵɵelementStart(0, "button", 84);
|
|
283
|
+
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_2_Conditional_40_Conditional_1_Conditional_1_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r12); const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.linkExistingTemplate()); });
|
|
292
284
|
i0.ɵɵelement(1, "i", 85);
|
|
293
|
-
i0.ɵɵtext(2, "
|
|
294
|
-
i0.ɵɵelementEnd();
|
|
295
|
-
} }
|
|
296
|
-
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_For_2_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
297
|
-
i0.ɵɵelementStart(0, "span", 97);
|
|
298
|
-
i0.ɵɵtext(1, "*");
|
|
299
|
-
i0.ɵɵelementEnd();
|
|
300
|
-
} }
|
|
301
|
-
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_For_2_Conditional_10_Template(rf, ctx) { if (rf & 1) {
|
|
302
|
-
i0.ɵɵelementStart(0, "span", 99);
|
|
303
|
-
i0.ɵɵtext(1, "Required");
|
|
304
|
-
i0.ɵɵelementEnd();
|
|
305
|
-
} }
|
|
306
|
-
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_For_2_Conditional_11_Template(rf, ctx) { if (rf & 1) {
|
|
307
|
-
i0.ɵɵelementStart(0, "span", 100);
|
|
308
|
-
i0.ɵɵtext(1, "Optional");
|
|
309
|
-
i0.ɵɵelementEnd();
|
|
310
|
-
} }
|
|
311
|
-
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_For_2_Conditional_12_Template(rf, ctx) { if (rf & 1) {
|
|
312
|
-
i0.ɵɵelementStart(0, "p", 101);
|
|
313
|
-
i0.ɵɵtext(1);
|
|
285
|
+
i0.ɵɵtext(2, " Change Template ");
|
|
314
286
|
i0.ɵɵelementEnd();
|
|
315
287
|
} if (rf & 2) {
|
|
316
|
-
|
|
317
|
-
i0.ɵɵadvance();
|
|
318
|
-
i0.ɵɵtextInterpolate1(" ", param_r10.Description, " ");
|
|
288
|
+
i0.ɵɵproperty("fillMode", "outline")("size", "small");
|
|
319
289
|
} }
|
|
320
|
-
function
|
|
321
|
-
i0.ɵɵ
|
|
322
|
-
i0.ɵɵ
|
|
290
|
+
function AIPromptFormComponentExtended_form_2_Conditional_40_Conditional_1_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
291
|
+
const _r13 = i0.ɵɵgetCurrentView();
|
|
292
|
+
i0.ɵɵelementStart(0, "button", 86);
|
|
293
|
+
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_2_Conditional_40_Conditional_1_Conditional_2_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r13); const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.openTemplateInNewWindow()); });
|
|
294
|
+
i0.ɵɵelement(1, "i", 87);
|
|
295
|
+
i0.ɵɵtext(2, " Open in New Window ");
|
|
323
296
|
i0.ɵɵelementEnd();
|
|
324
|
-
i0.ɵɵelementStart(3, "code", 108);
|
|
325
|
-
i0.ɵɵtext(4);
|
|
326
|
-
i0.ɵɵelementEnd()();
|
|
327
297
|
} if (rf & 2) {
|
|
328
|
-
|
|
329
|
-
i0.ɵɵadvance(4);
|
|
330
|
-
i0.ɵɵtextInterpolate(param_r10.DefaultValue);
|
|
298
|
+
i0.ɵɵproperty("fillMode", "outline")("size", "small");
|
|
331
299
|
} }
|
|
332
|
-
function
|
|
333
|
-
i0.ɵɵelementStart(0, "div",
|
|
334
|
-
i0.ɵɵ
|
|
335
|
-
i0.ɵɵelementEnd();
|
|
336
|
-
i0.ɵɵelementStart(3, "span", 102);
|
|
337
|
-
i0.ɵɵtext(4);
|
|
338
|
-
i0.ɵɵelementEnd()();
|
|
339
|
-
} if (rf & 2) {
|
|
340
|
-
const param_r10 = i0.ɵɵnextContext().$implicit;
|
|
341
|
-
i0.ɵɵadvance(4);
|
|
342
|
-
i0.ɵɵtextInterpolate(param_r10.Entity || "Entity ID: " + param_r10.EntityID);
|
|
343
|
-
} }
|
|
344
|
-
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_For_2_Conditional_20_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
345
|
-
i0.ɵɵtext(0);
|
|
346
|
-
} if (rf & 2) {
|
|
347
|
-
const param_r10 = i0.ɵɵnextContext(2).$implicit;
|
|
348
|
-
i0.ɵɵtextInterpolate1(" (", param_r10.LinkedParameterField, ") ");
|
|
349
|
-
} }
|
|
350
|
-
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_For_2_Conditional_20_Template(rf, ctx) { if (rf & 1) {
|
|
351
|
-
i0.ɵɵelementStart(0, "div", 106)(1, "label", 107);
|
|
352
|
-
i0.ɵɵtext(2, "Linked To");
|
|
353
|
-
i0.ɵɵelementEnd();
|
|
354
|
-
i0.ɵɵelementStart(3, "span", 102);
|
|
355
|
-
i0.ɵɵtext(4);
|
|
356
|
-
i0.ɵɵtemplate(5, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_For_2_Conditional_20_Conditional_5_Template, 1, 1);
|
|
357
|
-
i0.ɵɵelementEnd()();
|
|
358
|
-
} if (rf & 2) {
|
|
359
|
-
const param_r10 = i0.ɵɵnextContext().$implicit;
|
|
360
|
-
i0.ɵɵadvance(4);
|
|
361
|
-
i0.ɵɵtextInterpolate1(" ", param_r10.LinkedParameterName, " ");
|
|
362
|
-
i0.ɵɵadvance();
|
|
363
|
-
i0.ɵɵconditional(param_r10.LinkedParameterField ? 5 : -1);
|
|
364
|
-
} }
|
|
365
|
-
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_For_2_Conditional_21_Template(rf, ctx) { if (rf & 1) {
|
|
366
|
-
i0.ɵɵelementStart(0, "div", 106)(1, "label", 107);
|
|
367
|
-
i0.ɵɵtext(2, "Filter");
|
|
368
|
-
i0.ɵɵelementEnd();
|
|
369
|
-
i0.ɵɵelementStart(3, "code", 109);
|
|
370
|
-
i0.ɵɵtext(4);
|
|
371
|
-
i0.ɵɵelementEnd()();
|
|
372
|
-
} if (rf & 2) {
|
|
373
|
-
const param_r10 = i0.ɵɵnextContext().$implicit;
|
|
374
|
-
i0.ɵɵadvance(4);
|
|
375
|
-
i0.ɵɵtextInterpolate(param_r10.ExtraFilter);
|
|
376
|
-
} }
|
|
377
|
-
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_For_2_Conditional_22_Template(rf, ctx) { if (rf & 1) {
|
|
378
|
-
i0.ɵɵelementStart(0, "div", 106)(1, "label", 107);
|
|
379
|
-
i0.ɵɵtext(2, "Record ID");
|
|
380
|
-
i0.ɵɵelementEnd();
|
|
381
|
-
i0.ɵɵelementStart(3, "code", 102);
|
|
382
|
-
i0.ɵɵtext(4);
|
|
383
|
-
i0.ɵɵelementEnd()();
|
|
384
|
-
} if (rf & 2) {
|
|
385
|
-
const param_r10 = i0.ɵɵnextContext().$implicit;
|
|
386
|
-
i0.ɵɵadvance(4);
|
|
387
|
-
i0.ɵɵtextInterpolate(param_r10.RecordID);
|
|
388
|
-
} }
|
|
389
|
-
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
390
|
-
i0.ɵɵelementStart(0, "div", 92)(1, "div", 93)(2, "div", 94);
|
|
391
|
-
i0.ɵɵelement(3, "i", 95);
|
|
392
|
-
i0.ɵɵelementStart(4, "h6", 96);
|
|
393
|
-
i0.ɵɵtext(5);
|
|
394
|
-
i0.ɵɵtemplate(6, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_For_2_Conditional_6_Template, 2, 0, "span", 97);
|
|
395
|
-
i0.ɵɵelementEnd()();
|
|
396
|
-
i0.ɵɵelementStart(7, "div", 94)(8, "span", 98);
|
|
397
|
-
i0.ɵɵtext(9);
|
|
300
|
+
function AIPromptFormComponentExtended_form_2_Conditional_40_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
301
|
+
i0.ɵɵelementStart(0, "div", 79);
|
|
302
|
+
i0.ɵɵtemplate(1, AIPromptFormComponentExtended_form_2_Conditional_40_Conditional_1_Conditional_1_Template, 3, 2, "button", 82)(2, AIPromptFormComponentExtended_form_2_Conditional_40_Conditional_1_Conditional_2_Template, 3, 2, "button", 83);
|
|
398
303
|
i0.ɵɵelementEnd();
|
|
399
|
-
i0.ɵɵtemplate(10, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_For_2_Conditional_10_Template, 2, 0, "span", 99)(11, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_For_2_Conditional_11_Template, 2, 0, "span", 100);
|
|
400
|
-
i0.ɵɵelementEnd()();
|
|
401
|
-
i0.ɵɵtemplate(12, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_For_2_Conditional_12_Template, 2, 1, "p", 101);
|
|
402
|
-
i0.ɵɵelementStart(13, "div", 102)(14, "span", 103);
|
|
403
|
-
i0.ɵɵelement(15, "i", 104);
|
|
404
|
-
i0.ɵɵtext(16);
|
|
405
|
-
i0.ɵɵelementEnd()();
|
|
406
|
-
i0.ɵɵelementStart(17, "div", 105);
|
|
407
|
-
i0.ɵɵtemplate(18, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_For_2_Conditional_18_Template, 5, 1, "div", 106)(19, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_For_2_Conditional_19_Template, 5, 1, "div", 106)(20, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_For_2_Conditional_20_Template, 6, 2, "div", 106)(21, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_For_2_Conditional_21_Template, 5, 1, "div", 106)(22, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_For_2_Conditional_22_Template, 5, 1, "div", 106);
|
|
408
|
-
i0.ɵɵelementEnd()();
|
|
409
304
|
} if (rf & 2) {
|
|
410
|
-
const
|
|
411
|
-
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
412
|
-
i0.ɵɵstyleProp("border-left", "4px solid " + ctx_r1.getParamTypeColor(param_r10.Type));
|
|
413
|
-
i0.ɵɵadvance(3);
|
|
414
|
-
i0.ɵɵclassMap("fa-solid " + ctx_r1.getParamTypeIcon(param_r10.Type));
|
|
415
|
-
i0.ɵɵstyleProp("color", ctx_r1.getParamTypeColor(param_r10.Type));
|
|
416
|
-
i0.ɵɵadvance(2);
|
|
417
|
-
i0.ɵɵtextInterpolate1(" ", param_r10.Name, " ");
|
|
418
|
-
i0.ɵɵadvance();
|
|
419
|
-
i0.ɵɵconditional(param_r10.IsRequired ? 6 : -1);
|
|
420
|
-
i0.ɵɵadvance(2);
|
|
421
|
-
i0.ɵɵstyleProp("background-color", ctx_r1.getParamTypeColor(param_r10.Type));
|
|
422
|
-
i0.ɵɵadvance();
|
|
423
|
-
i0.ɵɵtextInterpolate1(" ", param_r10.Type, " ");
|
|
424
|
-
i0.ɵɵadvance();
|
|
425
|
-
i0.ɵɵconditional(param_r10.IsRequired ? 10 : 11);
|
|
426
|
-
i0.ɵɵadvance(2);
|
|
427
|
-
i0.ɵɵconditional(param_r10.Description ? 12 : -1);
|
|
428
|
-
i0.ɵɵadvance(4);
|
|
429
|
-
i0.ɵɵtextInterpolate1(" ", ctx_r1.getParamTypeDescription(param_r10), " ");
|
|
430
|
-
i0.ɵɵadvance(2);
|
|
431
|
-
i0.ɵɵconditional(param_r10.DefaultValue ? 18 : -1);
|
|
432
|
-
i0.ɵɵadvance();
|
|
433
|
-
i0.ɵɵconditional(param_r10.EntityID ? 19 : -1);
|
|
434
|
-
i0.ɵɵadvance();
|
|
435
|
-
i0.ɵɵconditional(param_r10.LinkedParameterName ? 20 : -1);
|
|
305
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
436
306
|
i0.ɵɵadvance();
|
|
437
|
-
i0.ɵɵconditional(
|
|
307
|
+
i0.ɵɵconditional(ctx_r1.UserCanUpdateTemplates ? 1 : -1);
|
|
438
308
|
i0.ɵɵadvance();
|
|
439
|
-
i0.ɵɵconditional(
|
|
309
|
+
i0.ɵɵconditional(ctx_r1.UserCanReadTemplates ? 2 : -1);
|
|
440
310
|
} }
|
|
441
|
-
function
|
|
442
|
-
i0.ɵɵ
|
|
443
|
-
i0.ɵɵ
|
|
444
|
-
i0.ɵɵ
|
|
445
|
-
i0.ɵɵelementStart(
|
|
446
|
-
i0.ɵɵ
|
|
447
|
-
i0.ɵɵelementStart(6, "div", 91)(7, "strong");
|
|
448
|
-
i0.ɵɵtext(8, "Using Template Parameters:");
|
|
449
|
-
i0.ɵɵelementEnd();
|
|
450
|
-
i0.ɵɵtext(9, " When executing this prompt, you'll be prompted to provide values for all required parameters. Parameters can be simple values (text, numbers) or complex data structures (JSON objects, database records, or entire entity collections). The template will use these parameters to generate dynamic content based on the values provided at execution time. ");
|
|
311
|
+
function AIPromptFormComponentExtended_form_2_Conditional_40_Template(rf, ctx) { if (rf & 1) {
|
|
312
|
+
const _r11 = i0.ɵɵgetCurrentView();
|
|
313
|
+
i0.ɵɵelementStart(0, "div", 36);
|
|
314
|
+
i0.ɵɵtemplate(1, AIPromptFormComponentExtended_form_2_Conditional_40_Conditional_1_Template, 3, 2, "div", 79);
|
|
315
|
+
i0.ɵɵelementStart(2, "div", 80)(3, "mj-template-editor", 81, 1);
|
|
316
|
+
i0.ɵɵlistener("contentChange", function AIPromptFormComponentExtended_form_2_Conditional_40_Template_mj_template_editor_contentChange_3_listener($event) { i0.ɵɵrestoreView(_r11); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onTemplateContentChange($event)); })("runTemplate", function AIPromptFormComponentExtended_form_2_Conditional_40_Template_mj_template_editor_runTemplate_3_listener($event) { i0.ɵɵrestoreView(_r11); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onTemplateRun($event)); });
|
|
451
317
|
i0.ɵɵelementEnd()()();
|
|
452
|
-
} if (rf & 2) {
|
|
453
|
-
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
454
|
-
i0.ɵɵadvance();
|
|
455
|
-
i0.ɵɵrepeater(ctx_r1.templateParams);
|
|
456
|
-
} }
|
|
457
|
-
function AIPromptFormComponentExtended_form_2_Conditional_41_Template(rf, ctx) { if (rf & 1) {
|
|
458
|
-
i0.ɵɵelementStart(0, "kendo-expansionpanel", 30);
|
|
459
|
-
i0.ɵɵtemplate(1, AIPromptFormComponentExtended_form_2_Conditional_41_ng_template_1_Template, 8, 1, "ng-template", 31);
|
|
460
|
-
i0.ɵɵelementStart(2, "div", 37);
|
|
461
|
-
i0.ɵɵtemplate(3, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_3_Template, 3, 0, "div", 79)(4, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_4_Template, 3, 0, "div", 80)(5, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Template, 10, 0);
|
|
462
|
-
i0.ɵɵelementEnd()();
|
|
463
318
|
} if (rf & 2) {
|
|
464
319
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
465
|
-
i0.ɵɵ
|
|
466
|
-
i0.ɵɵ
|
|
467
|
-
i0.ɵɵ
|
|
320
|
+
i0.ɵɵadvance();
|
|
321
|
+
i0.ɵɵconditional(ctx_r1.template && ctx_r1.EditMode ? 1 : -1);
|
|
322
|
+
i0.ɵɵadvance(2);
|
|
323
|
+
i0.ɵɵproperty("template", ctx_r1.template)("config", ctx_r1.templateEditorConfig);
|
|
468
324
|
} }
|
|
469
|
-
function
|
|
470
|
-
i0.ɵɵelementStart(0, "span",
|
|
325
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_ng_template_1_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
326
|
+
i0.ɵɵelementStart(0, "span", 91);
|
|
471
327
|
i0.ɵɵtext(1);
|
|
472
328
|
i0.ɵɵelementEnd();
|
|
473
329
|
} if (rf & 2) {
|
|
@@ -475,13 +331,13 @@ function AIPromptFormComponentExtended_form_2_Conditional_42_ng_template_1_Condi
|
|
|
475
331
|
i0.ɵɵadvance();
|
|
476
332
|
i0.ɵɵtextInterpolate1(" ", ctx_r1.promptModels.length, " ");
|
|
477
333
|
} }
|
|
478
|
-
function
|
|
334
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
479
335
|
i0.ɵɵelementStart(0, "span", 63);
|
|
480
|
-
i0.ɵɵelement(1, "i",
|
|
336
|
+
i0.ɵɵelement(1, "i", 90);
|
|
481
337
|
i0.ɵɵtext(2, " Models ");
|
|
482
|
-
i0.ɵɵtemplate(3,
|
|
483
|
-
i0.ɵɵelementStart(4, "span",
|
|
484
|
-
i0.ɵɵelement(5, "i",
|
|
338
|
+
i0.ɵɵtemplate(3, AIPromptFormComponentExtended_form_2_Conditional_41_ng_template_1_Conditional_3_Template, 2, 1, "span", 91);
|
|
339
|
+
i0.ɵɵelementStart(4, "span", 92);
|
|
340
|
+
i0.ɵɵelement(5, "i", 93);
|
|
485
341
|
i0.ɵɵtext(6, " Priority order (first available model will be used) ");
|
|
486
342
|
i0.ɵɵelementEnd()();
|
|
487
343
|
} if (rf & 2) {
|
|
@@ -489,410 +345,456 @@ function AIPromptFormComponentExtended_form_2_Conditional_42_ng_template_1_Templ
|
|
|
489
345
|
i0.ɵɵadvance(3);
|
|
490
346
|
i0.ɵɵconditional(ctx_r1.promptModels.length > 0 ? 3 : -1);
|
|
491
347
|
} }
|
|
492
|
-
function
|
|
493
|
-
i0.ɵɵelementStart(0, "div",
|
|
348
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
349
|
+
i0.ɵɵelementStart(0, "div", 89);
|
|
494
350
|
i0.ɵɵelement(1, "i", 55);
|
|
495
351
|
i0.ɵɵtext(2, " Loading models... ");
|
|
496
352
|
i0.ɵɵelementEnd();
|
|
497
353
|
} }
|
|
498
|
-
function
|
|
499
|
-
const
|
|
500
|
-
i0.ɵɵelementStart(0, "div",
|
|
501
|
-
i0.ɵɵlistener("click", function
|
|
502
|
-
i0.ɵɵelement(2, "i",
|
|
354
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_0_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
355
|
+
const _r14 = i0.ɵɵgetCurrentView();
|
|
356
|
+
i0.ɵɵelementStart(0, "div", 96)(1, "button", 97);
|
|
357
|
+
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_0_Conditional_3_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r14); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.addNewModel()); });
|
|
358
|
+
i0.ɵɵelement(2, "i", 73);
|
|
503
359
|
i0.ɵɵtext(3, " Add Model ");
|
|
504
360
|
i0.ɵɵelementEnd()();
|
|
505
361
|
} }
|
|
506
|
-
function
|
|
507
|
-
i0.ɵɵelementStart(0, "div",
|
|
508
|
-
i0.ɵɵelement(1, "i",
|
|
362
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
363
|
+
i0.ɵɵelementStart(0, "div", 94);
|
|
364
|
+
i0.ɵɵelement(1, "i", 95);
|
|
509
365
|
i0.ɵɵtext(2, " No models configured ");
|
|
510
|
-
i0.ɵɵtemplate(3,
|
|
366
|
+
i0.ɵɵtemplate(3, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_0_Conditional_3_Template, 4, 0, "div", 96);
|
|
511
367
|
i0.ɵɵelementEnd();
|
|
512
368
|
} if (rf & 2) {
|
|
513
369
|
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
514
370
|
i0.ɵɵadvance(3);
|
|
515
|
-
i0.ɵɵconditional(ctx_r1.EditMode ? 3 : -1);
|
|
371
|
+
i0.ɵɵconditional(ctx_r1.EditMode && ctx_r1.UserCanCreatePromptModels ? 3 : -1);
|
|
516
372
|
} }
|
|
517
|
-
function
|
|
518
|
-
i0.ɵɵelementStart(0, "div",
|
|
519
|
-
i0.ɵɵelement(1, "i",
|
|
373
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
374
|
+
i0.ɵɵelementStart(0, "div", 98);
|
|
375
|
+
i0.ɵɵelement(1, "i", 103);
|
|
520
376
|
i0.ɵɵtext(2, " Models are tried in priority order (highest priority first). The first available model that meets requirements will be used for execution. ");
|
|
521
377
|
i0.ɵɵelementEnd();
|
|
522
378
|
} }
|
|
523
|
-
function
|
|
524
|
-
i0.ɵɵelement(0, "i",
|
|
525
|
-
i0.ɵɵelementStart(1, "span",
|
|
379
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
380
|
+
i0.ɵɵelement(0, "i", 119);
|
|
381
|
+
i0.ɵɵelementStart(1, "span", 120);
|
|
526
382
|
i0.ɵɵtext(2);
|
|
527
383
|
i0.ɵɵelementEnd();
|
|
528
384
|
} if (rf & 2) {
|
|
529
|
-
const ɵ$
|
|
385
|
+
const ɵ$index_302_r16 = i0.ɵɵnextContext().$index;
|
|
530
386
|
i0.ɵɵadvance(2);
|
|
531
|
-
i0.ɵɵtextInterpolate1("#", ɵ$
|
|
387
|
+
i0.ɵɵtextInterpolate1("#", ɵ$index_302_r16 + 1, "");
|
|
532
388
|
} }
|
|
533
|
-
function
|
|
534
|
-
i0.ɵɵelementStart(0, "span",
|
|
389
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
390
|
+
i0.ɵɵelementStart(0, "span", 106);
|
|
535
391
|
i0.ɵɵtext(1);
|
|
536
392
|
i0.ɵɵelementEnd();
|
|
537
393
|
} if (rf & 2) {
|
|
538
|
-
const
|
|
539
|
-
const
|
|
540
|
-
const ɵ$
|
|
541
|
-
i0.ɵɵpropertyInterpolate1("title", "Priority ",
|
|
394
|
+
const ctx_r16 = i0.ɵɵnextContext();
|
|
395
|
+
const model_r18 = ctx_r16.$implicit;
|
|
396
|
+
const ɵ$index_302_r16 = ctx_r16.$index;
|
|
397
|
+
i0.ɵɵpropertyInterpolate1("title", "Priority ", model_r18.Priority, " - Higher priority numbers are tried first");
|
|
542
398
|
i0.ɵɵadvance();
|
|
543
|
-
i0.ɵɵtextInterpolate1("#", ɵ$
|
|
399
|
+
i0.ɵɵtextInterpolate1("#", ɵ$index_302_r16 + 1, "");
|
|
544
400
|
} }
|
|
545
|
-
function
|
|
546
|
-
const
|
|
547
|
-
i0.ɵɵelementStart(0, "kendo-dropdownlist",
|
|
548
|
-
i0.ɵɵtwoWayListener("ngModelChange", function
|
|
549
|
-
i0.ɵɵlistener("valueChange", function
|
|
401
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
402
|
+
const _r19 = i0.ɵɵgetCurrentView();
|
|
403
|
+
i0.ɵɵelementStart(0, "kendo-dropdownlist", 121);
|
|
404
|
+
i0.ɵɵtwoWayListener("ngModelChange", function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_5_Template_kendo_dropdownlist_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r19); const model_r18 = i0.ɵɵnextContext().$implicit; i0.ɵɵtwoWayBindingSet(model_r18.ModelID, $event) || (model_r18.ModelID = $event); return i0.ɵɵresetView($event); });
|
|
405
|
+
i0.ɵɵlistener("valueChange", function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_5_Template_kendo_dropdownlist_valueChange_0_listener($event) { i0.ɵɵrestoreView(_r19); const ɵ$index_302_r16 = i0.ɵɵnextContext().$index; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.onModelChange($event, ɵ$index_302_r16)); });
|
|
550
406
|
i0.ɵɵelementEnd();
|
|
551
407
|
} if (rf & 2) {
|
|
552
|
-
const
|
|
408
|
+
const model_r18 = i0.ɵɵnextContext().$implicit;
|
|
553
409
|
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
554
|
-
i0.ɵɵtwoWayProperty("ngModel",
|
|
555
|
-
i0.ɵɵproperty("name", "modelId_" + ctx_r1.getModelTrackId(
|
|
410
|
+
i0.ɵɵtwoWayProperty("ngModel", model_r18.ModelID);
|
|
411
|
+
i0.ɵɵproperty("name", "modelId_" + ctx_r1.getModelTrackId(model_r18))("data", ctx_r1.availableModels)("valuePrimitive", true)("filterable", true);
|
|
556
412
|
} }
|
|
557
|
-
function
|
|
413
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
558
414
|
i0.ɵɵelementStart(0, "span", 24);
|
|
559
415
|
i0.ɵɵtext(1);
|
|
560
416
|
i0.ɵɵelementEnd();
|
|
561
417
|
} if (rf & 2) {
|
|
562
|
-
const
|
|
418
|
+
const model_r18 = i0.ɵɵnextContext().$implicit;
|
|
563
419
|
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
564
420
|
i0.ɵɵadvance();
|
|
565
|
-
i0.ɵɵtextInterpolate(ctx_r1.getModelDisplayName(
|
|
421
|
+
i0.ɵɵtextInterpolate(ctx_r1.getModelDisplayName(model_r18.ModelID));
|
|
566
422
|
} }
|
|
567
|
-
function
|
|
568
|
-
i0.ɵɵelementStart(0, "span",
|
|
423
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_8_Conditional_0_Conditional_0_ng_template_1_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
424
|
+
i0.ɵɵelementStart(0, "span", 126);
|
|
569
425
|
i0.ɵɵtext(1);
|
|
570
426
|
i0.ɵɵelementEnd();
|
|
571
427
|
} if (rf & 2) {
|
|
572
|
-
const
|
|
573
|
-
const
|
|
428
|
+
const dataItem_r21 = i0.ɵɵnextContext().$implicit;
|
|
429
|
+
const model_r18 = i0.ɵɵnextContext(4).$implicit;
|
|
574
430
|
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
575
431
|
i0.ɵɵadvance();
|
|
576
|
-
i0.ɵɵtextInterpolate1("(", ctx_r1.getModelVendorStatus(
|
|
432
|
+
i0.ɵɵtextInterpolate1("(", ctx_r1.getModelVendorStatus(model_r18.ModelID, dataItem_r21.ID), ")");
|
|
577
433
|
} }
|
|
578
|
-
function
|
|
434
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_8_Conditional_0_Conditional_0_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
579
435
|
i0.ɵɵelementStart(0, "span");
|
|
580
436
|
i0.ɵɵtext(1);
|
|
581
|
-
i0.ɵɵtemplate(2,
|
|
437
|
+
i0.ɵɵtemplate(2, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_8_Conditional_0_Conditional_0_ng_template_1_Conditional_2_Template, 2, 1, "span", 126);
|
|
582
438
|
i0.ɵɵelementEnd();
|
|
583
439
|
} if (rf & 2) {
|
|
584
|
-
const
|
|
585
|
-
const
|
|
440
|
+
const dataItem_r21 = ctx.$implicit;
|
|
441
|
+
const model_r18 = i0.ɵɵnextContext(4).$implicit;
|
|
586
442
|
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
587
|
-
i0.ɵɵstyleProp("color", ctx_r1.getVendorStatusColor(
|
|
443
|
+
i0.ɵɵstyleProp("color", ctx_r1.getVendorStatusColor(model_r18.ModelID, dataItem_r21.ID));
|
|
588
444
|
i0.ɵɵadvance();
|
|
589
|
-
i0.ɵɵtextInterpolate1(" ",
|
|
445
|
+
i0.ɵɵtextInterpolate1(" ", dataItem_r21.Name, " ");
|
|
590
446
|
i0.ɵɵadvance();
|
|
591
|
-
i0.ɵɵconditional(ctx_r1.getModelVendorStatus(
|
|
447
|
+
i0.ɵɵconditional(ctx_r1.getModelVendorStatus(model_r18.ModelID, dataItem_r21.ID) !== "Active" ? 2 : -1);
|
|
592
448
|
} }
|
|
593
|
-
function
|
|
594
|
-
const
|
|
595
|
-
i0.ɵɵelementStart(0, "kendo-dropdownlist",
|
|
596
|
-
i0.ɵɵtwoWayListener("ngModelChange", function
|
|
597
|
-
i0.ɵɵtemplate(1,
|
|
449
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_8_Conditional_0_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
450
|
+
const _r20 = i0.ɵɵgetCurrentView();
|
|
451
|
+
i0.ɵɵelementStart(0, "kendo-dropdownlist", 124);
|
|
452
|
+
i0.ɵɵtwoWayListener("ngModelChange", function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_8_Conditional_0_Conditional_0_Template_kendo_dropdownlist_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r20); const model_r18 = i0.ɵɵnextContext(3).$implicit; i0.ɵɵtwoWayBindingSet(model_r18.VendorID, $event) || (model_r18.VendorID = $event); return i0.ɵɵresetView($event); });
|
|
453
|
+
i0.ɵɵtemplate(1, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_8_Conditional_0_Conditional_0_ng_template_1_Template, 3, 4, "ng-template", 125);
|
|
598
454
|
i0.ɵɵelementEnd();
|
|
599
455
|
} if (rf & 2) {
|
|
600
|
-
const
|
|
456
|
+
const model_r18 = i0.ɵɵnextContext(3).$implicit;
|
|
601
457
|
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
602
|
-
i0.ɵɵtwoWayProperty("ngModel",
|
|
603
|
-
i0.ɵɵproperty("name", "vendorId_" + ctx_r1.getModelTrackId(
|
|
458
|
+
i0.ɵɵtwoWayProperty("ngModel", model_r18.VendorID);
|
|
459
|
+
i0.ɵɵproperty("name", "vendorId_" + ctx_r1.getModelTrackId(model_r18))("data", ctx_r1.getVendorsForModelSync(model_r18.ModelID))("valuePrimitive", true)("filterable", true);
|
|
604
460
|
} }
|
|
605
|
-
function
|
|
606
|
-
i0.ɵɵelementStart(0, "span",
|
|
461
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_8_Conditional_0_Conditional_1_Conditional_0_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
462
|
+
i0.ɵɵelementStart(0, "span", 126);
|
|
607
463
|
i0.ɵɵtext(1);
|
|
608
464
|
i0.ɵɵelementEnd();
|
|
609
465
|
} if (rf & 2) {
|
|
610
|
-
const
|
|
466
|
+
const model_r18 = i0.ɵɵnextContext(5).$implicit;
|
|
611
467
|
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
612
468
|
i0.ɵɵadvance();
|
|
613
|
-
i0.ɵɵtextInterpolate1("(", ctx_r1.getModelVendorStatus(
|
|
469
|
+
i0.ɵɵtextInterpolate1("(", ctx_r1.getModelVendorStatus(model_r18.ModelID, ctx_r1.getVendorsForModelSync(model_r18.ModelID)[0].ID), ")");
|
|
614
470
|
} }
|
|
615
|
-
function
|
|
616
|
-
i0.ɵɵelementStart(0, "span",
|
|
471
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_8_Conditional_0_Conditional_1_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
472
|
+
i0.ɵɵelementStart(0, "span", 128);
|
|
617
473
|
i0.ɵɵtext(1);
|
|
618
|
-
i0.ɵɵtemplate(2,
|
|
474
|
+
i0.ɵɵtemplate(2, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_8_Conditional_0_Conditional_1_Conditional_0_Conditional_2_Template, 2, 1, "span", 126);
|
|
619
475
|
i0.ɵɵelementEnd();
|
|
620
476
|
} if (rf & 2) {
|
|
621
|
-
const
|
|
477
|
+
const model_r18 = i0.ɵɵnextContext(4).$implicit;
|
|
622
478
|
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
623
|
-
i0.ɵɵstyleProp("color", ctx_r1.getVendorStatusColor(
|
|
479
|
+
i0.ɵɵstyleProp("color", ctx_r1.getVendorStatusColor(model_r18.ModelID, ctx_r1.getVendorsForModelSync(model_r18.ModelID)[0].ID));
|
|
624
480
|
i0.ɵɵadvance();
|
|
625
|
-
i0.ɵɵtextInterpolate1(" ", ctx_r1.getVendorsForModelSync(
|
|
481
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.getVendorsForModelSync(model_r18.ModelID)[0].Name, " ");
|
|
626
482
|
i0.ɵɵadvance();
|
|
627
|
-
i0.ɵɵconditional(ctx_r1.getModelVendorStatus(
|
|
483
|
+
i0.ɵɵconditional(ctx_r1.getModelVendorStatus(model_r18.ModelID, ctx_r1.getVendorsForModelSync(model_r18.ModelID)[0].ID) !== "Active" ? 2 : -1);
|
|
628
484
|
} }
|
|
629
|
-
function
|
|
630
|
-
i0.ɵɵelementStart(0, "span",
|
|
485
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_8_Conditional_0_Conditional_1_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
486
|
+
i0.ɵɵelementStart(0, "span", 122);
|
|
631
487
|
i0.ɵɵtext(1, "No vendors available");
|
|
632
488
|
i0.ɵɵelementEnd();
|
|
633
489
|
} }
|
|
634
|
-
function
|
|
635
|
-
i0.ɵɵtemplate(0,
|
|
490
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_8_Conditional_0_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
491
|
+
i0.ɵɵtemplate(0, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_8_Conditional_0_Conditional_1_Conditional_0_Template, 3, 4, "span", 127)(1, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_8_Conditional_0_Conditional_1_Conditional_1_Template, 2, 0, "span", 122);
|
|
636
492
|
} if (rf & 2) {
|
|
637
|
-
const
|
|
493
|
+
const model_r18 = i0.ɵɵnextContext(3).$implicit;
|
|
638
494
|
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
639
|
-
i0.ɵɵconditional(ctx_r1.getVendorsForModelSync(
|
|
495
|
+
i0.ɵɵconditional(ctx_r1.getVendorsForModelSync(model_r18.ModelID).length === 1 ? 0 : 1);
|
|
640
496
|
} }
|
|
641
|
-
function
|
|
642
|
-
i0.ɵɵtemplate(0,
|
|
497
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_8_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
498
|
+
i0.ɵɵtemplate(0, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_8_Conditional_0_Conditional_0_Template, 2, 5, "kendo-dropdownlist", 123)(1, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_8_Conditional_0_Conditional_1_Template, 2, 1);
|
|
643
499
|
} if (rf & 2) {
|
|
644
|
-
const
|
|
500
|
+
const model_r18 = i0.ɵɵnextContext(2).$implicit;
|
|
645
501
|
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
646
|
-
i0.ɵɵconditional(ctx_r1.shouldShowVendorDropdown(
|
|
502
|
+
i0.ɵɵconditional(ctx_r1.shouldShowVendorDropdown(model_r18.ModelID) ? 0 : 1);
|
|
647
503
|
} }
|
|
648
|
-
function
|
|
649
|
-
i0.ɵɵelementStart(0, "span",
|
|
504
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_8_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
505
|
+
i0.ɵɵelementStart(0, "span", 122);
|
|
650
506
|
i0.ɵɵtext(1, "Select model first");
|
|
651
507
|
i0.ɵɵelementEnd();
|
|
652
508
|
} }
|
|
653
|
-
function
|
|
654
|
-
i0.ɵɵtemplate(0,
|
|
509
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
510
|
+
i0.ɵɵtemplate(0, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_8_Conditional_0_Template, 2, 1)(1, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_8_Conditional_1_Template, 2, 0, "span", 122);
|
|
655
511
|
} if (rf & 2) {
|
|
656
|
-
const
|
|
657
|
-
i0.ɵɵconditional(
|
|
512
|
+
const model_r18 = i0.ɵɵnextContext().$implicit;
|
|
513
|
+
i0.ɵɵconditional(model_r18.ModelID ? 0 : 1);
|
|
658
514
|
} }
|
|
659
|
-
function
|
|
660
|
-
i0.ɵɵelementStart(0, "span",
|
|
515
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_9_Conditional_0_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
516
|
+
i0.ɵɵelementStart(0, "span", 126);
|
|
661
517
|
i0.ɵɵtext(1);
|
|
662
518
|
i0.ɵɵelementEnd();
|
|
663
519
|
} if (rf & 2) {
|
|
664
|
-
const
|
|
520
|
+
const model_r18 = i0.ɵɵnextContext(3).$implicit;
|
|
665
521
|
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
666
522
|
i0.ɵɵadvance();
|
|
667
|
-
i0.ɵɵtextInterpolate1("(", ctx_r1.getModelVendorStatus(
|
|
523
|
+
i0.ɵɵtextInterpolate1("(", ctx_r1.getModelVendorStatus(model_r18.ModelID, model_r18.VendorID), ")");
|
|
668
524
|
} }
|
|
669
|
-
function
|
|
670
|
-
i0.ɵɵelementStart(0, "span",
|
|
525
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_9_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
526
|
+
i0.ɵɵelementStart(0, "span", 111);
|
|
671
527
|
i0.ɵɵtext(1);
|
|
672
|
-
i0.ɵɵtemplate(2,
|
|
528
|
+
i0.ɵɵtemplate(2, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_9_Conditional_0_Conditional_2_Template, 2, 1, "span", 126);
|
|
673
529
|
i0.ɵɵelementEnd();
|
|
674
530
|
} if (rf & 2) {
|
|
675
|
-
const
|
|
531
|
+
const model_r18 = i0.ɵɵnextContext(2).$implicit;
|
|
676
532
|
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
677
|
-
i0.ɵɵstyleProp("color", ctx_r1.getVendorStatusColor(
|
|
533
|
+
i0.ɵɵstyleProp("color", ctx_r1.getVendorStatusColor(model_r18.ModelID, model_r18.VendorID));
|
|
678
534
|
i0.ɵɵadvance();
|
|
679
|
-
i0.ɵɵtextInterpolate1(" ", ctx_r1.getVendorDisplayName(
|
|
535
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.getVendorDisplayName(model_r18.VendorID), " ");
|
|
680
536
|
i0.ɵɵadvance();
|
|
681
|
-
i0.ɵɵconditional(ctx_r1.getModelVendorStatus(
|
|
537
|
+
i0.ɵɵconditional(ctx_r1.getModelVendorStatus(model_r18.ModelID, model_r18.VendorID) !== "Active" ? 2 : -1);
|
|
682
538
|
} }
|
|
683
|
-
function
|
|
684
|
-
i0.ɵɵelementStart(0, "span",
|
|
539
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_9_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
540
|
+
i0.ɵɵelementStart(0, "span", 130);
|
|
685
541
|
i0.ɵɵtext(1, "-");
|
|
686
542
|
i0.ɵɵelementEnd();
|
|
687
543
|
} }
|
|
688
|
-
function
|
|
689
|
-
i0.ɵɵtemplate(0,
|
|
544
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_9_Template(rf, ctx) { if (rf & 1) {
|
|
545
|
+
i0.ɵɵtemplate(0, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_9_Conditional_0_Template, 3, 4, "span", 129)(1, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_9_Conditional_1_Template, 2, 0, "span", 130);
|
|
546
|
+
} if (rf & 2) {
|
|
547
|
+
const model_r18 = i0.ɵɵnextContext().$implicit;
|
|
548
|
+
i0.ɵɵconditional(model_r18.VendorID && model_r18.ModelID ? 0 : 1);
|
|
549
|
+
} }
|
|
550
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_11_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
551
|
+
i0.ɵɵelementStart(0, "div", 131);
|
|
552
|
+
i0.ɵɵelement(1, "i", 55);
|
|
553
|
+
i0.ɵɵtext(2, " Loading... ");
|
|
554
|
+
i0.ɵɵelementEnd();
|
|
555
|
+
} }
|
|
556
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_11_Conditional_1_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
557
|
+
i0.ɵɵelementStart(0, "div", 135);
|
|
558
|
+
i0.ɵɵtext(1, " No configurations available ");
|
|
559
|
+
i0.ɵɵelementEnd();
|
|
560
|
+
} }
|
|
561
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_11_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
562
|
+
const _r22 = i0.ɵɵgetCurrentView();
|
|
563
|
+
i0.ɵɵelementStart(0, "kendo-dropdownlist", 133);
|
|
564
|
+
i0.ɵɵtwoWayListener("ngModelChange", function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_11_Conditional_1_Template_kendo_dropdownlist_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r22); const model_r18 = i0.ɵɵnextContext(2).$implicit; i0.ɵɵtwoWayBindingSet(model_r18.ConfigurationID, $event) || (model_r18.ConfigurationID = $event); return i0.ɵɵresetView($event); });
|
|
565
|
+
i0.ɵɵlistener("valueChange", function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_11_Conditional_1_Template_kendo_dropdownlist_valueChange_0_listener($event) { i0.ɵɵrestoreView(_r22); const ɵ$index_302_r16 = i0.ɵɵnextContext(2).$index; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.onConfigurationChange($event, ɵ$index_302_r16)); });
|
|
566
|
+
i0.ɵɵtemplate(1, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_11_Conditional_1_ng_template_1_Template, 2, 0, "ng-template", 134);
|
|
567
|
+
i0.ɵɵelementEnd();
|
|
568
|
+
} if (rf & 2) {
|
|
569
|
+
const model_r18 = i0.ɵɵnextContext(2).$implicit;
|
|
570
|
+
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
571
|
+
i0.ɵɵtwoWayProperty("ngModel", model_r18.ConfigurationID);
|
|
572
|
+
i0.ɵɵproperty("name", "configurationId_" + ctx_r1.getModelTrackId(model_r18))("data", ctx_r1.availableConfigurations)("valuePrimitive", true)("filterable", true);
|
|
573
|
+
} }
|
|
574
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_11_Template(rf, ctx) { if (rf & 1) {
|
|
575
|
+
i0.ɵɵtemplate(0, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_11_Conditional_0_Template, 3, 0, "div", 131)(1, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_11_Conditional_1_Template, 2, 5, "kendo-dropdownlist", 132);
|
|
576
|
+
} if (rf & 2) {
|
|
577
|
+
const ctx_r1 = i0.ɵɵnextContext(6);
|
|
578
|
+
i0.ɵɵconditional(ctx_r1.isLoadingConfigurations ? 0 : 1);
|
|
579
|
+
} }
|
|
580
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_12_Template(rf, ctx) { if (rf & 1) {
|
|
581
|
+
i0.ɵɵelementStart(0, "span", 111);
|
|
582
|
+
i0.ɵɵtext(1);
|
|
583
|
+
i0.ɵɵelementEnd();
|
|
690
584
|
} if (rf & 2) {
|
|
691
|
-
const
|
|
692
|
-
i0.ɵɵ
|
|
585
|
+
const model_r18 = i0.ɵɵnextContext().$implicit;
|
|
586
|
+
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
587
|
+
i0.ɵɵadvance();
|
|
588
|
+
i0.ɵɵtextInterpolate(ctx_r1.getConfigurationDisplayName(model_r18.ConfigurationID));
|
|
693
589
|
} }
|
|
694
|
-
function
|
|
695
|
-
i0.ɵɵelementStart(0, "span",
|
|
590
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_14_Template(rf, ctx) { if (rf & 1) {
|
|
591
|
+
i0.ɵɵelementStart(0, "span", 113);
|
|
696
592
|
i0.ɵɵtext(1);
|
|
697
593
|
i0.ɵɵpipe(2, "date");
|
|
698
594
|
i0.ɵɵelementEnd();
|
|
699
595
|
} if (rf & 2) {
|
|
700
|
-
const
|
|
596
|
+
const model_r18 = i0.ɵɵnextContext().$implicit;
|
|
701
597
|
i0.ɵɵadvance();
|
|
702
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1,
|
|
598
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, model_r18.__mj_CreatedAt, "short"));
|
|
703
599
|
} }
|
|
704
|
-
function
|
|
705
|
-
i0.ɵɵelementStart(0, "span",
|
|
600
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_15_Template(rf, ctx) { if (rf & 1) {
|
|
601
|
+
i0.ɵɵelementStart(0, "span", 114);
|
|
706
602
|
i0.ɵɵtext(1, "New");
|
|
707
603
|
i0.ɵɵelementEnd();
|
|
708
604
|
} }
|
|
709
|
-
function
|
|
710
|
-
const
|
|
711
|
-
i0.ɵɵelementStart(0, "
|
|
712
|
-
i0.ɵɵlistener("click", function
|
|
713
|
-
i0.ɵɵelement(
|
|
605
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_17_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
606
|
+
const _r23 = i0.ɵɵgetCurrentView();
|
|
607
|
+
i0.ɵɵelementStart(0, "button", 138);
|
|
608
|
+
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_17_Conditional_1_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r23); const ɵ$index_302_r16 = i0.ɵɵnextContext(2).$index; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.moveModelUp(ɵ$index_302_r16)); });
|
|
609
|
+
i0.ɵɵelement(1, "i", 139);
|
|
714
610
|
i0.ɵɵelementEnd();
|
|
715
|
-
i0.ɵɵelementStart(
|
|
716
|
-
i0.ɵɵlistener("click", function
|
|
717
|
-
i0.ɵɵelement(
|
|
718
|
-
i0.ɵɵelementEnd()();
|
|
719
|
-
i0.ɵɵelementStart(5, "button", 153);
|
|
720
|
-
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_2_Conditional_42_Conditional_5_Conditional_1_For_15_Conditional_14_Template_button_click_5_listener() { i0.ɵɵrestoreView(_r19); const ɵ$index_417_r13 = i0.ɵɵnextContext().$index; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.removePromptModel(ɵ$index_417_r13)); });
|
|
721
|
-
i0.ɵɵelement(6, "i", 154);
|
|
611
|
+
i0.ɵɵelementStart(2, "button", 140);
|
|
612
|
+
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_17_Conditional_1_Template_button_click_2_listener() { i0.ɵɵrestoreView(_r23); const ɵ$index_302_r16 = i0.ɵɵnextContext(2).$index; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.moveModelDown(ɵ$index_302_r16)); });
|
|
613
|
+
i0.ɵɵelement(3, "i", 141);
|
|
722
614
|
i0.ɵɵelementEnd();
|
|
723
615
|
} if (rf & 2) {
|
|
724
|
-
const ɵ$
|
|
616
|
+
const ɵ$index_302_r16 = i0.ɵɵnextContext(2).$index;
|
|
725
617
|
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
726
|
-
i0.ɵɵ
|
|
727
|
-
i0.ɵɵproperty("disabled", ɵ$index_417_r13 === 0);
|
|
618
|
+
i0.ɵɵproperty("disabled", ɵ$index_302_r16 === 0);
|
|
728
619
|
i0.ɵɵadvance(2);
|
|
729
|
-
i0.ɵɵproperty("disabled", ɵ$
|
|
620
|
+
i0.ɵɵproperty("disabled", ɵ$index_302_r16 === ctx_r1.promptModels.length - 1);
|
|
730
621
|
} }
|
|
731
|
-
function
|
|
732
|
-
i0.ɵɵ
|
|
733
|
-
i0.ɵɵ
|
|
622
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_17_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
623
|
+
const _r24 = i0.ɵɵgetCurrentView();
|
|
624
|
+
i0.ɵɵelementStart(0, "button", 142);
|
|
625
|
+
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_17_Conditional_2_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r24); const ɵ$index_302_r16 = i0.ɵɵnextContext(2).$index; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.removePromptModel(ɵ$index_302_r16)); });
|
|
626
|
+
i0.ɵɵelement(1, "i", 143);
|
|
734
627
|
i0.ɵɵelementEnd();
|
|
735
|
-
|
|
628
|
+
} }
|
|
629
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_17_Template(rf, ctx) { if (rf & 1) {
|
|
630
|
+
i0.ɵɵelementStart(0, "div", 136);
|
|
631
|
+
i0.ɵɵtemplate(1, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_17_Conditional_1_Template, 4, 2);
|
|
736
632
|
i0.ɵɵelementEnd();
|
|
633
|
+
i0.ɵɵtemplate(2, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_17_Conditional_2_Template, 2, 0, "button", 137);
|
|
737
634
|
} if (rf & 2) {
|
|
738
|
-
const
|
|
739
|
-
i0.ɵɵadvance(
|
|
740
|
-
i0.ɵɵ
|
|
635
|
+
const ctx_r1 = i0.ɵɵnextContext(6);
|
|
636
|
+
i0.ɵɵadvance();
|
|
637
|
+
i0.ɵɵconditional(ctx_r1.UserCanUpdatePromptModels ? 1 : -1);
|
|
638
|
+
i0.ɵɵadvance();
|
|
639
|
+
i0.ɵɵconditional(ctx_r1.UserCanDeletePromptModels ? 2 : -1);
|
|
741
640
|
} }
|
|
742
|
-
function
|
|
641
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_22_Template(rf, ctx) { if (rf & 1) {
|
|
743
642
|
i0.ɵɵelementStart(0, "span")(1, "strong");
|
|
744
|
-
i0.ɵɵtext(2, "
|
|
643
|
+
i0.ɵɵtext(2, "Status:");
|
|
745
644
|
i0.ɵɵelementEnd();
|
|
746
645
|
i0.ɵɵtext(3);
|
|
747
646
|
i0.ɵɵelementEnd();
|
|
748
647
|
} if (rf & 2) {
|
|
749
|
-
const
|
|
648
|
+
const model_r18 = i0.ɵɵnextContext().$implicit;
|
|
750
649
|
i0.ɵɵadvance(3);
|
|
751
|
-
i0.ɵɵtextInterpolate1(" ",
|
|
650
|
+
i0.ɵɵtextInterpolate1(" ", model_r18.Status, "");
|
|
752
651
|
} }
|
|
753
|
-
function
|
|
754
|
-
const
|
|
755
|
-
i0.ɵɵelementStart(0, "div")(1, "label",
|
|
652
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_23_Conditional_4_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
653
|
+
const _r26 = i0.ɵɵgetCurrentView();
|
|
654
|
+
i0.ɵɵelementStart(0, "div")(1, "label", 148);
|
|
756
655
|
i0.ɵɵtext(2, "Parallel Count");
|
|
757
656
|
i0.ɵɵelementEnd();
|
|
758
|
-
i0.ɵɵelementStart(3, "kendo-numerictextbox",
|
|
759
|
-
i0.ɵɵtwoWayListener("ngModelChange", function
|
|
657
|
+
i0.ɵɵelementStart(3, "kendo-numerictextbox", 150);
|
|
658
|
+
i0.ɵɵtwoWayListener("ngModelChange", function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_23_Conditional_4_Conditional_5_Template_kendo_numerictextbox_ngModelChange_3_listener($event) { i0.ɵɵrestoreView(_r26); const model_r18 = i0.ɵɵnextContext(3).$implicit; i0.ɵɵtwoWayBindingSet(model_r18.ParallelCount, $event) || (model_r18.ParallelCount = $event); return i0.ɵɵresetView($event); });
|
|
760
659
|
i0.ɵɵelementEnd()();
|
|
761
660
|
} if (rf & 2) {
|
|
762
|
-
const
|
|
763
|
-
const
|
|
764
|
-
const ɵ$
|
|
661
|
+
const ctx_r16 = i0.ɵɵnextContext(3);
|
|
662
|
+
const model_r18 = ctx_r16.$implicit;
|
|
663
|
+
const ɵ$index_302_r16 = ctx_r16.$index;
|
|
765
664
|
i0.ɵɵadvance(3);
|
|
766
|
-
i0.ɵɵtwoWayProperty("ngModel",
|
|
767
|
-
i0.ɵɵproperty("name", "parallelCount_" + ɵ$
|
|
665
|
+
i0.ɵɵtwoWayProperty("ngModel", model_r18.ParallelCount);
|
|
666
|
+
i0.ɵɵproperty("name", "parallelCount_" + ɵ$index_302_r16)("min", 1)("step", 1)("format", "n0");
|
|
768
667
|
} }
|
|
769
|
-
function
|
|
770
|
-
const
|
|
771
|
-
i0.ɵɵelementStart(0, "div")(1, "label",
|
|
668
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_23_Conditional_4_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
669
|
+
const _r27 = i0.ɵɵgetCurrentView();
|
|
670
|
+
i0.ɵɵelementStart(0, "div")(1, "label", 148);
|
|
772
671
|
i0.ɵɵtext(2, "Config Parameter");
|
|
773
672
|
i0.ɵɵelementEnd();
|
|
774
|
-
i0.ɵɵelementStart(3, "kendo-textbox",
|
|
775
|
-
i0.ɵɵtwoWayListener("ngModelChange", function
|
|
673
|
+
i0.ɵɵelementStart(3, "kendo-textbox", 151);
|
|
674
|
+
i0.ɵɵtwoWayListener("ngModelChange", function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_23_Conditional_4_Conditional_6_Template_kendo_textbox_ngModelChange_3_listener($event) { i0.ɵɵrestoreView(_r27); const model_r18 = i0.ɵɵnextContext(3).$implicit; i0.ɵɵtwoWayBindingSet(model_r18.ParallelConfigParam, $event) || (model_r18.ParallelConfigParam = $event); return i0.ɵɵresetView($event); });
|
|
776
675
|
i0.ɵɵelementEnd()();
|
|
777
676
|
} if (rf & 2) {
|
|
778
|
-
const
|
|
779
|
-
const
|
|
780
|
-
const ɵ$
|
|
677
|
+
const ctx_r16 = i0.ɵɵnextContext(3);
|
|
678
|
+
const model_r18 = ctx_r16.$implicit;
|
|
679
|
+
const ɵ$index_302_r16 = ctx_r16.$index;
|
|
781
680
|
i0.ɵɵadvance(3);
|
|
782
|
-
i0.ɵɵtwoWayProperty("ngModel",
|
|
783
|
-
i0.ɵɵproperty("name", "parallelConfigParam_" + ɵ$
|
|
681
|
+
i0.ɵɵtwoWayProperty("ngModel", model_r18.ParallelConfigParam);
|
|
682
|
+
i0.ɵɵproperty("name", "parallelConfigParam_" + ɵ$index_302_r16);
|
|
784
683
|
} }
|
|
785
|
-
function
|
|
786
|
-
const
|
|
787
|
-
i0.ɵɵelementStart(0, "div",
|
|
684
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_23_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
685
|
+
const _r25 = i0.ɵɵgetCurrentView();
|
|
686
|
+
i0.ɵɵelementStart(0, "div", 146)(1, "div")(2, "label", 148);
|
|
788
687
|
i0.ɵɵtext(3, "Parallel Mode");
|
|
789
688
|
i0.ɵɵelementEnd();
|
|
790
|
-
i0.ɵɵelementStart(4, "kendo-dropdownlist",
|
|
791
|
-
i0.ɵɵtwoWayListener("ngModelChange", function
|
|
689
|
+
i0.ɵɵelementStart(4, "kendo-dropdownlist", 149);
|
|
690
|
+
i0.ɵɵtwoWayListener("ngModelChange", function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_23_Conditional_4_Template_kendo_dropdownlist_ngModelChange_4_listener($event) { i0.ɵɵrestoreView(_r25); const model_r18 = i0.ɵɵnextContext(2).$implicit; i0.ɵɵtwoWayBindingSet(model_r18.ParallelizationMode, $event) || (model_r18.ParallelizationMode = $event); return i0.ɵɵresetView($event); });
|
|
792
691
|
i0.ɵɵelementEnd()();
|
|
793
|
-
i0.ɵɵtemplate(5,
|
|
692
|
+
i0.ɵɵtemplate(5, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_23_Conditional_4_Conditional_5_Template, 4, 5, "div")(6, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_23_Conditional_4_Conditional_6_Template, 4, 2, "div");
|
|
794
693
|
i0.ɵɵelementEnd();
|
|
795
694
|
} if (rf & 2) {
|
|
796
|
-
const
|
|
797
|
-
const
|
|
798
|
-
const ɵ$
|
|
695
|
+
const ctx_r16 = i0.ɵɵnextContext(2);
|
|
696
|
+
const model_r18 = ctx_r16.$implicit;
|
|
697
|
+
const ɵ$index_302_r16 = ctx_r16.$index;
|
|
799
698
|
i0.ɵɵadvance(4);
|
|
800
|
-
i0.ɵɵtwoWayProperty("ngModel",
|
|
801
|
-
i0.ɵɵproperty("name", "parallelMode_" + ɵ$
|
|
699
|
+
i0.ɵɵtwoWayProperty("ngModel", model_r18.ParallelizationMode);
|
|
700
|
+
i0.ɵɵproperty("name", "parallelMode_" + ɵ$index_302_r16)("data", i0.ɵɵpureFunction3(9, _c4, i0.ɵɵpureFunction0(6, _c5), i0.ɵɵpureFunction0(7, _c6), i0.ɵɵpureFunction0(8, _c7)))("valuePrimitive", true);
|
|
802
701
|
i0.ɵɵadvance();
|
|
803
|
-
i0.ɵɵconditional(
|
|
702
|
+
i0.ɵɵconditional(model_r18.ParallelizationMode === "StaticCount" ? 5 : -1);
|
|
804
703
|
i0.ɵɵadvance();
|
|
805
|
-
i0.ɵɵconditional(
|
|
704
|
+
i0.ɵɵconditional(model_r18.ParallelizationMode === "ConfigParam" ? 6 : -1);
|
|
806
705
|
} }
|
|
807
|
-
function
|
|
706
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_23_Conditional_5_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
808
707
|
i0.ɵɵelementStart(0, "span")(1, "strong");
|
|
809
708
|
i0.ɵɵtext(2, "Parallel Mode:");
|
|
810
709
|
i0.ɵɵelementEnd();
|
|
811
710
|
i0.ɵɵtext(3);
|
|
812
711
|
i0.ɵɵelementEnd();
|
|
813
712
|
} if (rf & 2) {
|
|
814
|
-
const
|
|
713
|
+
const model_r18 = i0.ɵɵnextContext(3).$implicit;
|
|
815
714
|
i0.ɵɵadvance(3);
|
|
816
|
-
i0.ɵɵtextInterpolate1(" ",
|
|
715
|
+
i0.ɵɵtextInterpolate1(" ", model_r18.ParallelizationMode, "");
|
|
817
716
|
} }
|
|
818
|
-
function
|
|
717
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_23_Conditional_5_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
819
718
|
i0.ɵɵelementStart(0, "span")(1, "strong");
|
|
820
719
|
i0.ɵɵtext(2, "Parallel Count:");
|
|
821
720
|
i0.ɵɵelementEnd();
|
|
822
721
|
i0.ɵɵtext(3);
|
|
823
722
|
i0.ɵɵelementEnd();
|
|
824
723
|
} if (rf & 2) {
|
|
825
|
-
const
|
|
724
|
+
const model_r18 = i0.ɵɵnextContext(3).$implicit;
|
|
826
725
|
i0.ɵɵadvance(3);
|
|
827
|
-
i0.ɵɵtextInterpolate1(" ",
|
|
726
|
+
i0.ɵɵtextInterpolate1(" ", model_r18.ParallelCount, "");
|
|
828
727
|
} }
|
|
829
|
-
function
|
|
728
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_23_Conditional_5_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
830
729
|
i0.ɵɵelementStart(0, "span")(1, "strong");
|
|
831
730
|
i0.ɵɵtext(2, "Config Param:");
|
|
832
731
|
i0.ɵɵelementEnd();
|
|
833
732
|
i0.ɵɵtext(3);
|
|
834
733
|
i0.ɵɵelementEnd();
|
|
835
734
|
} if (rf & 2) {
|
|
836
|
-
const
|
|
735
|
+
const model_r18 = i0.ɵɵnextContext(3).$implicit;
|
|
837
736
|
i0.ɵɵadvance(3);
|
|
838
|
-
i0.ɵɵtextInterpolate1(" ",
|
|
737
|
+
i0.ɵɵtextInterpolate1(" ", model_r18.ParallelConfigParam, "");
|
|
839
738
|
} }
|
|
840
|
-
function
|
|
841
|
-
i0.ɵɵelementStart(0, "div",
|
|
842
|
-
i0.ɵɵtemplate(1,
|
|
739
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_23_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
740
|
+
i0.ɵɵelementStart(0, "div", 147);
|
|
741
|
+
i0.ɵɵtemplate(1, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_23_Conditional_5_Conditional_1_Template, 4, 1, "span")(2, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_23_Conditional_5_Conditional_2_Template, 4, 1, "span")(3, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_23_Conditional_5_Conditional_3_Template, 4, 1, "span");
|
|
843
742
|
i0.ɵɵelementEnd();
|
|
844
743
|
} if (rf & 2) {
|
|
845
|
-
const
|
|
744
|
+
const model_r18 = i0.ɵɵnextContext(2).$implicit;
|
|
846
745
|
i0.ɵɵadvance();
|
|
847
|
-
i0.ɵɵconditional(
|
|
746
|
+
i0.ɵɵconditional(model_r18.ParallelizationMode ? 1 : -1);
|
|
848
747
|
i0.ɵɵadvance();
|
|
849
|
-
i0.ɵɵconditional(
|
|
748
|
+
i0.ɵɵconditional(model_r18.ParallelCount ? 2 : -1);
|
|
850
749
|
i0.ɵɵadvance();
|
|
851
|
-
i0.ɵɵconditional(
|
|
750
|
+
i0.ɵɵconditional(model_r18.ParallelConfigParam ? 3 : -1);
|
|
852
751
|
} }
|
|
853
|
-
function
|
|
854
|
-
i0.ɵɵelementStart(0, "div",
|
|
855
|
-
i0.ɵɵelement(2, "i",
|
|
752
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_23_Template(rf, ctx) { if (rf & 1) {
|
|
753
|
+
i0.ɵɵelementStart(0, "div", 118)(1, "div", 144);
|
|
754
|
+
i0.ɵɵelement(2, "i", 145);
|
|
856
755
|
i0.ɵɵtext(3, " Model-Specific Parallel Execution ");
|
|
857
756
|
i0.ɵɵelementEnd();
|
|
858
|
-
i0.ɵɵtemplate(4,
|
|
757
|
+
i0.ɵɵtemplate(4, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_23_Conditional_4_Template, 7, 13, "div", 146)(5, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_23_Conditional_5_Template, 4, 3, "div", 147);
|
|
859
758
|
i0.ɵɵelementEnd();
|
|
860
759
|
} if (rf & 2) {
|
|
861
760
|
const ctx_r1 = i0.ɵɵnextContext(6);
|
|
862
761
|
i0.ɵɵadvance(4);
|
|
863
762
|
i0.ɵɵconditional(ctx_r1.EditMode ? 4 : 5);
|
|
864
763
|
} }
|
|
865
|
-
function
|
|
866
|
-
const
|
|
867
|
-
i0.ɵɵelementStart(0, "div",
|
|
868
|
-
i0.ɵɵlistener("dragstart", function
|
|
869
|
-
i0.ɵɵelementStart(1, "div",
|
|
870
|
-
i0.ɵɵtemplate(2,
|
|
764
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Template(rf, ctx) { if (rf & 1) {
|
|
765
|
+
const _r15 = i0.ɵɵgetCurrentView();
|
|
766
|
+
i0.ɵɵelementStart(0, "div", 104);
|
|
767
|
+
i0.ɵɵlistener("dragstart", function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Template_div_dragstart_0_listener($event) { const ɵ$index_302_r16 = i0.ɵɵrestoreView(_r15).$index; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.onDragStart($event, ɵ$index_302_r16)); })("dragover", function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Template_div_dragover_0_listener($event) { i0.ɵɵrestoreView(_r15); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.onDragOver($event)); })("drop", function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Template_div_drop_0_listener($event) { const ɵ$index_302_r16 = i0.ɵɵrestoreView(_r15).$index; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.onDrop($event, ɵ$index_302_r16)); })("dragend", function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Template_div_dragend_0_listener($event) { i0.ɵɵrestoreView(_r15); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.onDragEnd($event)); });
|
|
768
|
+
i0.ɵɵelementStart(1, "div", 105);
|
|
769
|
+
i0.ɵɵtemplate(2, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_2_Template, 3, 1)(3, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_3_Template, 2, 3, "span", 106);
|
|
871
770
|
i0.ɵɵelementEnd();
|
|
872
|
-
i0.ɵɵelementStart(4, "div",
|
|
873
|
-
i0.ɵɵtemplate(5,
|
|
771
|
+
i0.ɵɵelementStart(4, "div", 107);
|
|
772
|
+
i0.ɵɵtemplate(5, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_5_Template, 1, 5, "kendo-dropdownlist", 108)(6, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_6_Template, 2, 1, "span", 24);
|
|
874
773
|
i0.ɵɵelementEnd();
|
|
875
|
-
i0.ɵɵelementStart(7, "div",
|
|
876
|
-
i0.ɵɵtemplate(8,
|
|
774
|
+
i0.ɵɵelementStart(7, "div", 109);
|
|
775
|
+
i0.ɵɵtemplate(8, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_8_Template, 2, 1)(9, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_9_Template, 2, 1);
|
|
877
776
|
i0.ɵɵelementEnd();
|
|
878
|
-
i0.ɵɵelementStart(10, "div",
|
|
879
|
-
i0.ɵɵtemplate(11,
|
|
777
|
+
i0.ɵɵelementStart(10, "div", 110);
|
|
778
|
+
i0.ɵɵtemplate(11, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_11_Template, 2, 1)(12, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_12_Template, 2, 1, "span", 111);
|
|
880
779
|
i0.ɵɵelementEnd();
|
|
881
|
-
i0.ɵɵelementStart(13, "div",
|
|
882
|
-
i0.ɵɵtemplate(14,
|
|
780
|
+
i0.ɵɵelementStart(13, "div", 112);
|
|
781
|
+
i0.ɵɵtemplate(14, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_14_Template, 3, 4, "span", 113)(15, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_15_Template, 2, 0, "span", 114);
|
|
782
|
+
i0.ɵɵelementEnd();
|
|
783
|
+
i0.ɵɵelementStart(16, "div", 115);
|
|
784
|
+
i0.ɵɵtemplate(17, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_17_Template, 3, 2);
|
|
883
785
|
i0.ɵɵelementEnd()();
|
|
884
|
-
i0.ɵɵelementStart(
|
|
885
|
-
i0.ɵɵelement(
|
|
886
|
-
i0.ɵɵelementStart(
|
|
887
|
-
i0.ɵɵtemplate(
|
|
786
|
+
i0.ɵɵelementStart(18, "div", 116);
|
|
787
|
+
i0.ɵɵelement(19, "div");
|
|
788
|
+
i0.ɵɵelementStart(20, "div")(21, "div", 117);
|
|
789
|
+
i0.ɵɵtemplate(22, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_22_Template, 4, 1, "span");
|
|
888
790
|
i0.ɵɵelementEnd();
|
|
889
|
-
i0.ɵɵtemplate(
|
|
791
|
+
i0.ɵɵtemplate(23, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Conditional_23_Template, 6, 1, "div", 118);
|
|
890
792
|
i0.ɵɵelementEnd()();
|
|
891
793
|
} if (rf & 2) {
|
|
892
|
-
const
|
|
893
|
-
const ɵ$
|
|
794
|
+
const model_r18 = ctx.$implicit;
|
|
795
|
+
const ɵ$index_302_r16 = ctx.$index;
|
|
894
796
|
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
895
|
-
i0.ɵɵstyleProp("background", !
|
|
797
|
+
i0.ɵɵstyleProp("background", !model_r18.ModelID ? "#fff3cd" : ctx_r1.draggedIndex === ɵ$index_302_r16 ? "#e3f2fd" : "white")("border-left", !model_r18.ModelID ? "3px solid #ffc107" : "none")("opacity", ctx_r1.draggedIndex === ɵ$index_302_r16 ? "0.5" : "1");
|
|
896
798
|
i0.ɵɵproperty("draggable", ctx_r1.EditMode);
|
|
897
799
|
i0.ɵɵadvance(2);
|
|
898
800
|
i0.ɵɵconditional(ctx_r1.EditMode ? 2 : 3);
|
|
@@ -901,28 +803,28 @@ function AIPromptFormComponentExtended_form_2_Conditional_42_Conditional_5_Condi
|
|
|
901
803
|
i0.ɵɵadvance(3);
|
|
902
804
|
i0.ɵɵconditional(ctx_r1.EditMode ? 8 : 9);
|
|
903
805
|
i0.ɵɵadvance(3);
|
|
904
|
-
i0.ɵɵconditional(
|
|
806
|
+
i0.ɵɵconditional(ctx_r1.EditMode ? 11 : 12);
|
|
807
|
+
i0.ɵɵadvance(3);
|
|
808
|
+
i0.ɵɵconditional(model_r18.ID ? 14 : 15);
|
|
905
809
|
i0.ɵɵadvance(3);
|
|
906
|
-
i0.ɵɵconditional(ctx_r1.EditMode ?
|
|
810
|
+
i0.ɵɵconditional(ctx_r1.EditMode ? 17 : -1);
|
|
907
811
|
i0.ɵɵadvance(5);
|
|
908
|
-
i0.ɵɵconditional(
|
|
812
|
+
i0.ɵɵconditional(model_r18.Status ? 22 : -1);
|
|
909
813
|
i0.ɵɵadvance();
|
|
910
|
-
i0.ɵɵconditional(
|
|
911
|
-
i0.ɵɵadvance();
|
|
912
|
-
i0.ɵɵconditional(ctx_r1.record.ParallelizationMode === "ModelSpecific" ? 21 : -1);
|
|
814
|
+
i0.ɵɵconditional(ctx_r1.record.ParallelizationMode === "ModelSpecific" ? 23 : -1);
|
|
913
815
|
} }
|
|
914
|
-
function
|
|
915
|
-
const
|
|
916
|
-
i0.ɵɵelementStart(0, "div",
|
|
917
|
-
i0.ɵɵlistener("click", function
|
|
918
|
-
i0.ɵɵelement(2, "i",
|
|
816
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_Conditional_18_Template(rf, ctx) { if (rf & 1) {
|
|
817
|
+
const _r28 = i0.ɵɵgetCurrentView();
|
|
818
|
+
i0.ɵɵelementStart(0, "div", 102)(1, "button", 152);
|
|
819
|
+
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_Conditional_18_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r28); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.addNewModel()); });
|
|
820
|
+
i0.ɵɵelement(2, "i", 73);
|
|
919
821
|
i0.ɵɵtext(3, " Add Model ");
|
|
920
822
|
i0.ɵɵelementEnd()();
|
|
921
823
|
} }
|
|
922
|
-
function
|
|
923
|
-
i0.ɵɵtemplate(0,
|
|
924
|
-
i0.ɵɵelementStart(1, "div",
|
|
925
|
-
i0.ɵɵelement(3, "i",
|
|
824
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
825
|
+
i0.ɵɵtemplate(0, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_Conditional_0_Template, 3, 0, "div", 98);
|
|
826
|
+
i0.ɵɵelementStart(1, "div", 99)(2, "div", 100);
|
|
827
|
+
i0.ɵɵelement(3, "i", 101);
|
|
926
828
|
i0.ɵɵelementEnd();
|
|
927
829
|
i0.ɵɵelementStart(4, "div");
|
|
928
830
|
i0.ɵɵtext(5, "AI Model ");
|
|
@@ -933,81 +835,84 @@ function AIPromptFormComponentExtended_form_2_Conditional_42_Conditional_5_Condi
|
|
|
933
835
|
i0.ɵɵtext(9, "Vendor");
|
|
934
836
|
i0.ɵɵelementEnd();
|
|
935
837
|
i0.ɵɵelementStart(10, "div");
|
|
936
|
-
i0.ɵɵtext(11, "
|
|
838
|
+
i0.ɵɵtext(11, "Configuration");
|
|
937
839
|
i0.ɵɵelementEnd();
|
|
938
840
|
i0.ɵɵelementStart(12, "div");
|
|
939
|
-
i0.ɵɵtext(13, "
|
|
841
|
+
i0.ɵɵtext(13, "Created");
|
|
842
|
+
i0.ɵɵelementEnd();
|
|
843
|
+
i0.ɵɵelementStart(14, "div");
|
|
844
|
+
i0.ɵɵtext(15, "Actions");
|
|
940
845
|
i0.ɵɵelementEnd()();
|
|
941
|
-
i0.ɵɵrepeaterCreate(
|
|
942
|
-
i0.ɵɵtemplate(
|
|
846
|
+
i0.ɵɵrepeaterCreate(16, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_For_17_Template, 24, 15, null, null, _forTrack0, true);
|
|
847
|
+
i0.ɵɵtemplate(18, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_Conditional_18_Template, 4, 0, "div", 102);
|
|
943
848
|
} if (rf & 2) {
|
|
944
849
|
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
945
850
|
i0.ɵɵconditional(ctx_r1.promptModels.length > 1 ? 0 : -1);
|
|
946
|
-
i0.ɵɵadvance(
|
|
851
|
+
i0.ɵɵadvance(16);
|
|
947
852
|
i0.ɵɵrepeater(ctx_r1.promptModels);
|
|
948
853
|
i0.ɵɵadvance(2);
|
|
949
|
-
i0.ɵɵconditional(ctx_r1.EditMode ?
|
|
854
|
+
i0.ɵɵconditional(ctx_r1.EditMode && ctx_r1.UserCanCreatePromptModels ? 18 : -1);
|
|
950
855
|
} }
|
|
951
|
-
function
|
|
952
|
-
i0.ɵɵtemplate(0,
|
|
856
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
857
|
+
i0.ɵɵtemplate(0, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_0_Template, 4, 1, "div", 94)(1, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Conditional_1_Template, 19, 2);
|
|
953
858
|
} if (rf & 2) {
|
|
954
859
|
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
955
860
|
i0.ɵɵconditional(ctx_r1.promptModels.length === 0 ? 0 : 1);
|
|
956
861
|
} }
|
|
957
|
-
function
|
|
862
|
+
function AIPromptFormComponentExtended_form_2_Conditional_41_Template(rf, ctx) { if (rf & 1) {
|
|
958
863
|
i0.ɵɵelementStart(0, "kendo-expansionpanel", 30);
|
|
959
|
-
i0.ɵɵtemplate(1,
|
|
960
|
-
i0.ɵɵelementStart(2, "div", 37)(3, "div",
|
|
961
|
-
i0.ɵɵtemplate(4,
|
|
864
|
+
i0.ɵɵtemplate(1, AIPromptFormComponentExtended_form_2_Conditional_41_ng_template_1_Template, 7, 1, "ng-template", 31);
|
|
865
|
+
i0.ɵɵelementStart(2, "div", 37)(3, "div", 88);
|
|
866
|
+
i0.ɵɵtemplate(4, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_4_Template, 3, 0, "div", 89)(5, AIPromptFormComponentExtended_form_2_Conditional_41_Conditional_5_Template, 2, 1);
|
|
962
867
|
i0.ɵɵelementEnd()()();
|
|
963
868
|
} if (rf & 2) {
|
|
964
869
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
965
|
-
i0.ɵɵproperty("expanded",
|
|
870
|
+
i0.ɵɵproperty("expanded", true);
|
|
966
871
|
i0.ɵɵadvance(4);
|
|
967
872
|
i0.ɵɵconditional(ctx_r1.isLoadingModels ? 4 : 5);
|
|
968
873
|
} }
|
|
969
|
-
function
|
|
874
|
+
function AIPromptFormComponentExtended_form_2_ng_template_43_Template(rf, ctx) { if (rf & 1) {
|
|
970
875
|
i0.ɵɵelementStart(0, "span", 63);
|
|
971
|
-
i0.ɵɵelement(1, "i",
|
|
876
|
+
i0.ɵɵelement(1, "i", 153);
|
|
972
877
|
i0.ɵɵtext(2, " Advanced Configuration ");
|
|
973
878
|
i0.ɵɵelementEnd();
|
|
974
879
|
} }
|
|
975
|
-
function
|
|
880
|
+
function AIPromptFormComponentExtended_form_2_Conditional_48_Template(rf, ctx) { if (rf & 1) {
|
|
976
881
|
i0.ɵɵelement(0, "mj-form-field", 40);
|
|
977
882
|
} if (rf & 2) {
|
|
978
883
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
979
884
|
i0.ɵɵproperty("record", ctx_r1.record)("ShowLabel", true)("EditMode", ctx_r1.EditMode);
|
|
980
885
|
} }
|
|
981
|
-
function
|
|
886
|
+
function AIPromptFormComponentExtended_form_2_Conditional_49_Template(rf, ctx) { if (rf & 1) {
|
|
982
887
|
i0.ɵɵelement(0, "mj-form-field", 41);
|
|
983
888
|
} if (rf & 2) {
|
|
984
889
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
985
890
|
i0.ɵɵproperty("record", ctx_r1.record)("ShowLabel", true)("EditMode", ctx_r1.EditMode);
|
|
986
891
|
} }
|
|
987
|
-
function
|
|
988
|
-
i0.ɵɵelementStart(0, "div",
|
|
892
|
+
function AIPromptFormComponentExtended_form_2_Conditional_57_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
893
|
+
i0.ɵɵelementStart(0, "div", 154);
|
|
989
894
|
i0.ɵɵelement(1, "i", 55);
|
|
990
895
|
i0.ɵɵtext(2, " Loading prompts... ");
|
|
991
896
|
i0.ɵɵelementEnd();
|
|
992
897
|
} }
|
|
993
|
-
function
|
|
994
|
-
const
|
|
995
|
-
i0.ɵɵelementStart(0, "kendo-dropdowntree",
|
|
996
|
-
i0.ɵɵtwoWayListener("ngModelChange", function
|
|
997
|
-
i0.ɵɵlistener("valueChange", function
|
|
898
|
+
function AIPromptFormComponentExtended_form_2_Conditional_57_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
899
|
+
const _r29 = i0.ɵɵgetCurrentView();
|
|
900
|
+
i0.ɵɵelementStart(0, "kendo-dropdowntree", 156);
|
|
901
|
+
i0.ɵɵtwoWayListener("ngModelChange", function AIPromptFormComponentExtended_form_2_Conditional_57_Conditional_1_Template_kendo_dropdowntree_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r29); const ctx_r1 = i0.ɵɵnextContext(3); i0.ɵɵtwoWayBindingSet(ctx_r1.record.ResultSelectorPromptID, $event) || (ctx_r1.record.ResultSelectorPromptID = $event); return i0.ɵɵresetView($event); });
|
|
902
|
+
i0.ɵɵlistener("valueChange", function AIPromptFormComponentExtended_form_2_Conditional_57_Conditional_1_Template_kendo_dropdowntree_valueChange_0_listener($event) { i0.ɵɵrestoreView(_r29); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.onResultSelectorChange($event)); });
|
|
998
903
|
i0.ɵɵelementEnd();
|
|
999
904
|
} if (rf & 2) {
|
|
1000
905
|
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
1001
906
|
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.record.ResultSelectorPromptID);
|
|
1002
907
|
i0.ɵɵproperty("data", ctx_r1.resultSelectorTreeData)("valuePrimitive", true)("filterable", true);
|
|
1003
908
|
} }
|
|
1004
|
-
function
|
|
1005
|
-
i0.ɵɵtemplate(0,
|
|
909
|
+
function AIPromptFormComponentExtended_form_2_Conditional_57_Template(rf, ctx) { if (rf & 1) {
|
|
910
|
+
i0.ɵɵtemplate(0, AIPromptFormComponentExtended_form_2_Conditional_57_Conditional_0_Template, 3, 0, "div", 154)(1, AIPromptFormComponentExtended_form_2_Conditional_57_Conditional_1_Template, 1, 4, "kendo-dropdowntree", 155);
|
|
1006
911
|
} if (rf & 2) {
|
|
1007
912
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
1008
913
|
i0.ɵɵconditional(ctx_r1.isLoadingResultSelectorData ? 0 : 1);
|
|
1009
914
|
} }
|
|
1010
|
-
function
|
|
915
|
+
function AIPromptFormComponentExtended_form_2_Conditional_58_Template(rf, ctx) { if (rf & 1) {
|
|
1011
916
|
i0.ɵɵelementStart(0, "span", 47);
|
|
1012
917
|
i0.ɵɵtext(1);
|
|
1013
918
|
i0.ɵɵelementEnd();
|
|
@@ -1016,21 +921,222 @@ function AIPromptFormComponentExtended_form_2_Conditional_59_Template(rf, ctx) {
|
|
|
1016
921
|
i0.ɵɵadvance();
|
|
1017
922
|
i0.ɵɵtextInterpolate(ctx_r1.getPromptDisplayName(ctx_r1.record.ResultSelectorPromptID || "") || "None selected");
|
|
1018
923
|
} }
|
|
924
|
+
function AIPromptFormComponentExtended_form_2_Conditional_59_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
925
|
+
i0.ɵɵelementStart(0, "span", 63);
|
|
926
|
+
i0.ɵɵelement(1, "i", 157);
|
|
927
|
+
i0.ɵɵtext(2, " Template Parameters ");
|
|
928
|
+
i0.ɵɵelementStart(3, "span", 158);
|
|
929
|
+
i0.ɵɵtext(4);
|
|
930
|
+
i0.ɵɵelementEnd();
|
|
931
|
+
i0.ɵɵelementStart(5, "span", 92);
|
|
932
|
+
i0.ɵɵelement(6, "i", 159);
|
|
933
|
+
i0.ɵɵtext(7, " Parameters defined in the template ");
|
|
934
|
+
i0.ɵɵelementEnd()();
|
|
935
|
+
} if (rf & 2) {
|
|
936
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
937
|
+
i0.ɵɵadvance(4);
|
|
938
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.templateParams.length, " ");
|
|
939
|
+
} }
|
|
940
|
+
function AIPromptFormComponentExtended_form_2_Conditional_59_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
941
|
+
i0.ɵɵelementStart(0, "div", 89);
|
|
942
|
+
i0.ɵɵelement(1, "i", 55);
|
|
943
|
+
i0.ɵɵtext(2, " Loading template parameters... ");
|
|
944
|
+
i0.ɵɵelementEnd();
|
|
945
|
+
} }
|
|
946
|
+
function AIPromptFormComponentExtended_form_2_Conditional_59_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
947
|
+
i0.ɵɵelementStart(0, "div", 94);
|
|
948
|
+
i0.ɵɵelement(1, "i", 95);
|
|
949
|
+
i0.ɵɵtext(2, " This template has no parameters defined ");
|
|
950
|
+
i0.ɵɵelementEnd();
|
|
951
|
+
} }
|
|
952
|
+
function AIPromptFormComponentExtended_form_2_Conditional_59_Conditional_5_For_2_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
953
|
+
i0.ɵɵelementStart(0, "span", 171);
|
|
954
|
+
i0.ɵɵtext(1, "*");
|
|
955
|
+
i0.ɵɵelementEnd();
|
|
956
|
+
} }
|
|
957
|
+
function AIPromptFormComponentExtended_form_2_Conditional_59_Conditional_5_For_2_Conditional_10_Template(rf, ctx) { if (rf & 1) {
|
|
958
|
+
i0.ɵɵelementStart(0, "span", 173);
|
|
959
|
+
i0.ɵɵtext(1, "Required");
|
|
960
|
+
i0.ɵɵelementEnd();
|
|
961
|
+
} }
|
|
962
|
+
function AIPromptFormComponentExtended_form_2_Conditional_59_Conditional_5_For_2_Conditional_11_Template(rf, ctx) { if (rf & 1) {
|
|
963
|
+
i0.ɵɵelementStart(0, "span", 174);
|
|
964
|
+
i0.ɵɵtext(1, "Optional");
|
|
965
|
+
i0.ɵɵelementEnd();
|
|
966
|
+
} }
|
|
967
|
+
function AIPromptFormComponentExtended_form_2_Conditional_59_Conditional_5_For_2_Conditional_12_Template(rf, ctx) { if (rf & 1) {
|
|
968
|
+
i0.ɵɵelementStart(0, "p", 175);
|
|
969
|
+
i0.ɵɵtext(1);
|
|
970
|
+
i0.ɵɵelementEnd();
|
|
971
|
+
} if (rf & 2) {
|
|
972
|
+
const param_r30 = i0.ɵɵnextContext().$implicit;
|
|
973
|
+
i0.ɵɵadvance();
|
|
974
|
+
i0.ɵɵtextInterpolate1(" ", param_r30.Description, " ");
|
|
975
|
+
} }
|
|
976
|
+
function AIPromptFormComponentExtended_form_2_Conditional_59_Conditional_5_For_2_Conditional_18_Template(rf, ctx) { if (rf & 1) {
|
|
977
|
+
i0.ɵɵelementStart(0, "div", 180)(1, "label", 181);
|
|
978
|
+
i0.ɵɵtext(2, "Default Value");
|
|
979
|
+
i0.ɵɵelementEnd();
|
|
980
|
+
i0.ɵɵelementStart(3, "code", 182);
|
|
981
|
+
i0.ɵɵtext(4);
|
|
982
|
+
i0.ɵɵelementEnd()();
|
|
983
|
+
} if (rf & 2) {
|
|
984
|
+
const param_r30 = i0.ɵɵnextContext().$implicit;
|
|
985
|
+
i0.ɵɵadvance(4);
|
|
986
|
+
i0.ɵɵtextInterpolate(param_r30.DefaultValue);
|
|
987
|
+
} }
|
|
988
|
+
function AIPromptFormComponentExtended_form_2_Conditional_59_Conditional_5_For_2_Conditional_19_Template(rf, ctx) { if (rf & 1) {
|
|
989
|
+
i0.ɵɵelementStart(0, "div", 180)(1, "label", 181);
|
|
990
|
+
i0.ɵɵtext(2, "Entity");
|
|
991
|
+
i0.ɵɵelementEnd();
|
|
992
|
+
i0.ɵɵelementStart(3, "span", 176);
|
|
993
|
+
i0.ɵɵtext(4);
|
|
994
|
+
i0.ɵɵelementEnd()();
|
|
995
|
+
} if (rf & 2) {
|
|
996
|
+
const param_r30 = i0.ɵɵnextContext().$implicit;
|
|
997
|
+
i0.ɵɵadvance(4);
|
|
998
|
+
i0.ɵɵtextInterpolate(param_r30.Entity || "Entity ID: " + param_r30.EntityID);
|
|
999
|
+
} }
|
|
1000
|
+
function AIPromptFormComponentExtended_form_2_Conditional_59_Conditional_5_For_2_Conditional_20_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
1001
|
+
i0.ɵɵtext(0);
|
|
1002
|
+
} if (rf & 2) {
|
|
1003
|
+
const param_r30 = i0.ɵɵnextContext(2).$implicit;
|
|
1004
|
+
i0.ɵɵtextInterpolate1(" (", param_r30.LinkedParameterField, ") ");
|
|
1005
|
+
} }
|
|
1006
|
+
function AIPromptFormComponentExtended_form_2_Conditional_59_Conditional_5_For_2_Conditional_20_Template(rf, ctx) { if (rf & 1) {
|
|
1007
|
+
i0.ɵɵelementStart(0, "div", 180)(1, "label", 181);
|
|
1008
|
+
i0.ɵɵtext(2, "Linked To");
|
|
1009
|
+
i0.ɵɵelementEnd();
|
|
1010
|
+
i0.ɵɵelementStart(3, "span", 176);
|
|
1011
|
+
i0.ɵɵtext(4);
|
|
1012
|
+
i0.ɵɵtemplate(5, AIPromptFormComponentExtended_form_2_Conditional_59_Conditional_5_For_2_Conditional_20_Conditional_5_Template, 1, 1);
|
|
1013
|
+
i0.ɵɵelementEnd()();
|
|
1014
|
+
} if (rf & 2) {
|
|
1015
|
+
const param_r30 = i0.ɵɵnextContext().$implicit;
|
|
1016
|
+
i0.ɵɵadvance(4);
|
|
1017
|
+
i0.ɵɵtextInterpolate1(" ", param_r30.LinkedParameterName, " ");
|
|
1018
|
+
i0.ɵɵadvance();
|
|
1019
|
+
i0.ɵɵconditional(param_r30.LinkedParameterField ? 5 : -1);
|
|
1020
|
+
} }
|
|
1021
|
+
function AIPromptFormComponentExtended_form_2_Conditional_59_Conditional_5_For_2_Conditional_21_Template(rf, ctx) { if (rf & 1) {
|
|
1022
|
+
i0.ɵɵelementStart(0, "div", 180)(1, "label", 181);
|
|
1023
|
+
i0.ɵɵtext(2, "Filter");
|
|
1024
|
+
i0.ɵɵelementEnd();
|
|
1025
|
+
i0.ɵɵelementStart(3, "code", 183);
|
|
1026
|
+
i0.ɵɵtext(4);
|
|
1027
|
+
i0.ɵɵelementEnd()();
|
|
1028
|
+
} if (rf & 2) {
|
|
1029
|
+
const param_r30 = i0.ɵɵnextContext().$implicit;
|
|
1030
|
+
i0.ɵɵadvance(4);
|
|
1031
|
+
i0.ɵɵtextInterpolate(param_r30.ExtraFilter);
|
|
1032
|
+
} }
|
|
1033
|
+
function AIPromptFormComponentExtended_form_2_Conditional_59_Conditional_5_For_2_Conditional_22_Template(rf, ctx) { if (rf & 1) {
|
|
1034
|
+
i0.ɵɵelementStart(0, "div", 180)(1, "label", 181);
|
|
1035
|
+
i0.ɵɵtext(2, "Record ID");
|
|
1036
|
+
i0.ɵɵelementEnd();
|
|
1037
|
+
i0.ɵɵelementStart(3, "code", 176);
|
|
1038
|
+
i0.ɵɵtext(4);
|
|
1039
|
+
i0.ɵɵelementEnd()();
|
|
1040
|
+
} if (rf & 2) {
|
|
1041
|
+
const param_r30 = i0.ɵɵnextContext().$implicit;
|
|
1042
|
+
i0.ɵɵadvance(4);
|
|
1043
|
+
i0.ɵɵtextInterpolate(param_r30.RecordID);
|
|
1044
|
+
} }
|
|
1045
|
+
function AIPromptFormComponentExtended_form_2_Conditional_59_Conditional_5_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
1046
|
+
i0.ɵɵelementStart(0, "div", 166)(1, "div", 167)(2, "div", 168);
|
|
1047
|
+
i0.ɵɵelement(3, "i", 169);
|
|
1048
|
+
i0.ɵɵelementStart(4, "h6", 170);
|
|
1049
|
+
i0.ɵɵtext(5);
|
|
1050
|
+
i0.ɵɵtemplate(6, AIPromptFormComponentExtended_form_2_Conditional_59_Conditional_5_For_2_Conditional_6_Template, 2, 0, "span", 171);
|
|
1051
|
+
i0.ɵɵelementEnd()();
|
|
1052
|
+
i0.ɵɵelementStart(7, "div", 168)(8, "span", 172);
|
|
1053
|
+
i0.ɵɵtext(9);
|
|
1054
|
+
i0.ɵɵelementEnd();
|
|
1055
|
+
i0.ɵɵtemplate(10, AIPromptFormComponentExtended_form_2_Conditional_59_Conditional_5_For_2_Conditional_10_Template, 2, 0, "span", 173)(11, AIPromptFormComponentExtended_form_2_Conditional_59_Conditional_5_For_2_Conditional_11_Template, 2, 0, "span", 174);
|
|
1056
|
+
i0.ɵɵelementEnd()();
|
|
1057
|
+
i0.ɵɵtemplate(12, AIPromptFormComponentExtended_form_2_Conditional_59_Conditional_5_For_2_Conditional_12_Template, 2, 1, "p", 175);
|
|
1058
|
+
i0.ɵɵelementStart(13, "div", 176)(14, "span", 177);
|
|
1059
|
+
i0.ɵɵelement(15, "i", 178);
|
|
1060
|
+
i0.ɵɵtext(16);
|
|
1061
|
+
i0.ɵɵelementEnd()();
|
|
1062
|
+
i0.ɵɵelementStart(17, "div", 179);
|
|
1063
|
+
i0.ɵɵtemplate(18, AIPromptFormComponentExtended_form_2_Conditional_59_Conditional_5_For_2_Conditional_18_Template, 5, 1, "div", 180)(19, AIPromptFormComponentExtended_form_2_Conditional_59_Conditional_5_For_2_Conditional_19_Template, 5, 1, "div", 180)(20, AIPromptFormComponentExtended_form_2_Conditional_59_Conditional_5_For_2_Conditional_20_Template, 6, 2, "div", 180)(21, AIPromptFormComponentExtended_form_2_Conditional_59_Conditional_5_For_2_Conditional_21_Template, 5, 1, "div", 180)(22, AIPromptFormComponentExtended_form_2_Conditional_59_Conditional_5_For_2_Conditional_22_Template, 5, 1, "div", 180);
|
|
1064
|
+
i0.ɵɵelementEnd()();
|
|
1065
|
+
} if (rf & 2) {
|
|
1066
|
+
const param_r30 = ctx.$implicit;
|
|
1067
|
+
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
1068
|
+
i0.ɵɵstyleProp("border-left", "4px solid " + ctx_r1.getParamTypeColor(param_r30.Type));
|
|
1069
|
+
i0.ɵɵadvance(3);
|
|
1070
|
+
i0.ɵɵclassMap("fa-solid " + ctx_r1.getParamTypeIcon(param_r30.Type));
|
|
1071
|
+
i0.ɵɵstyleProp("color", ctx_r1.getParamTypeColor(param_r30.Type));
|
|
1072
|
+
i0.ɵɵadvance(2);
|
|
1073
|
+
i0.ɵɵtextInterpolate1(" ", param_r30.Name, " ");
|
|
1074
|
+
i0.ɵɵadvance();
|
|
1075
|
+
i0.ɵɵconditional(param_r30.IsRequired ? 6 : -1);
|
|
1076
|
+
i0.ɵɵadvance(2);
|
|
1077
|
+
i0.ɵɵstyleProp("background-color", ctx_r1.getParamTypeColor(param_r30.Type));
|
|
1078
|
+
i0.ɵɵadvance();
|
|
1079
|
+
i0.ɵɵtextInterpolate1(" ", param_r30.Type, " ");
|
|
1080
|
+
i0.ɵɵadvance();
|
|
1081
|
+
i0.ɵɵconditional(param_r30.IsRequired ? 10 : 11);
|
|
1082
|
+
i0.ɵɵadvance(2);
|
|
1083
|
+
i0.ɵɵconditional(param_r30.Description ? 12 : -1);
|
|
1084
|
+
i0.ɵɵadvance(4);
|
|
1085
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.getParamTypeDescription(param_r30), " ");
|
|
1086
|
+
i0.ɵɵadvance(2);
|
|
1087
|
+
i0.ɵɵconditional(param_r30.DefaultValue ? 18 : -1);
|
|
1088
|
+
i0.ɵɵadvance();
|
|
1089
|
+
i0.ɵɵconditional(param_r30.EntityID ? 19 : -1);
|
|
1090
|
+
i0.ɵɵadvance();
|
|
1091
|
+
i0.ɵɵconditional(param_r30.LinkedParameterName ? 20 : -1);
|
|
1092
|
+
i0.ɵɵadvance();
|
|
1093
|
+
i0.ɵɵconditional(param_r30.ExtraFilter ? 21 : -1);
|
|
1094
|
+
i0.ɵɵadvance();
|
|
1095
|
+
i0.ɵɵconditional(param_r30.RecordID ? 22 : -1);
|
|
1096
|
+
} }
|
|
1097
|
+
function AIPromptFormComponentExtended_form_2_Conditional_59_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
1098
|
+
i0.ɵɵelementStart(0, "div", 160);
|
|
1099
|
+
i0.ɵɵrepeaterCreate(1, AIPromptFormComponentExtended_form_2_Conditional_59_Conditional_5_For_2_Template, 23, 19, "div", 161, _forTrack1);
|
|
1100
|
+
i0.ɵɵelementEnd();
|
|
1101
|
+
i0.ɵɵelementStart(3, "div", 162)(4, "div", 163);
|
|
1102
|
+
i0.ɵɵelement(5, "i", 164);
|
|
1103
|
+
i0.ɵɵelementStart(6, "div", 165)(7, "strong");
|
|
1104
|
+
i0.ɵɵtext(8, "Using Template Parameters:");
|
|
1105
|
+
i0.ɵɵelementEnd();
|
|
1106
|
+
i0.ɵɵtext(9, " When executing this prompt, you'll be prompted to provide values for all required parameters. Parameters can be simple values (text, numbers) or complex data structures (JSON objects, database records, or entire entity collections). The template will use these parameters to generate dynamic content based on the values provided at execution time. ");
|
|
1107
|
+
i0.ɵɵelementEnd()()();
|
|
1108
|
+
} if (rf & 2) {
|
|
1109
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
1110
|
+
i0.ɵɵadvance();
|
|
1111
|
+
i0.ɵɵrepeater(ctx_r1.templateParams);
|
|
1112
|
+
} }
|
|
1113
|
+
function AIPromptFormComponentExtended_form_2_Conditional_59_Template(rf, ctx) { if (rf & 1) {
|
|
1114
|
+
i0.ɵɵelementStart(0, "kendo-expansionpanel", 30);
|
|
1115
|
+
i0.ɵɵtemplate(1, AIPromptFormComponentExtended_form_2_Conditional_59_ng_template_1_Template, 8, 1, "ng-template", 31);
|
|
1116
|
+
i0.ɵɵelementStart(2, "div", 37);
|
|
1117
|
+
i0.ɵɵtemplate(3, AIPromptFormComponentExtended_form_2_Conditional_59_Conditional_3_Template, 3, 0, "div", 89)(4, AIPromptFormComponentExtended_form_2_Conditional_59_Conditional_4_Template, 3, 0, "div", 94)(5, AIPromptFormComponentExtended_form_2_Conditional_59_Conditional_5_Template, 10, 0);
|
|
1118
|
+
i0.ɵɵelementEnd()();
|
|
1119
|
+
} if (rf & 2) {
|
|
1120
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
1121
|
+
i0.ɵɵproperty("expanded", false);
|
|
1122
|
+
i0.ɵɵadvance(3);
|
|
1123
|
+
i0.ɵɵconditional(ctx_r1.isLoadingTemplateParams ? 3 : ctx_r1.templateParams.length === 0 ? 4 : 5);
|
|
1124
|
+
} }
|
|
1019
1125
|
function AIPromptFormComponentExtended_form_2_Conditional_60_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
1020
1126
|
i0.ɵɵelementStart(0, "span", 63);
|
|
1021
1127
|
i0.ɵɵelement(1, "i", 23);
|
|
1022
1128
|
i0.ɵɵtext(2, " Output Example (JSON) ");
|
|
1023
|
-
i0.ɵɵelementStart(3, "span",
|
|
1129
|
+
i0.ɵɵelementStart(3, "span", 187);
|
|
1024
1130
|
i0.ɵɵtext(4, "\u2022 Required for object output type");
|
|
1025
1131
|
i0.ɵɵelementEnd()();
|
|
1026
1132
|
} }
|
|
1027
1133
|
function AIPromptFormComponentExtended_form_2_Conditional_60_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
1028
|
-
const
|
|
1029
|
-
i0.ɵɵelementStart(0, "mj-code-editor",
|
|
1030
|
-
i0.ɵɵtwoWayListener("ngModelChange", function AIPromptFormComponentExtended_form_2_Conditional_60_Conditional_3_Template_mj_code_editor_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(
|
|
1134
|
+
const _r31 = i0.ɵɵgetCurrentView();
|
|
1135
|
+
i0.ɵɵelementStart(0, "mj-code-editor", 188);
|
|
1136
|
+
i0.ɵɵtwoWayListener("ngModelChange", function AIPromptFormComponentExtended_form_2_Conditional_60_Conditional_3_Template_mj_code_editor_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r31); const ctx_r1 = i0.ɵɵnextContext(3); i0.ɵɵtwoWayBindingSet(ctx_r1.record.OutputExample, $event) || (ctx_r1.record.OutputExample = $event); return i0.ɵɵresetView($event); });
|
|
1031
1137
|
i0.ɵɵelementEnd();
|
|
1032
|
-
i0.ɵɵelementStart(1, "div",
|
|
1033
|
-
i0.ɵɵelement(2, "i",
|
|
1138
|
+
i0.ɵɵelementStart(1, "div", 189);
|
|
1139
|
+
i0.ɵɵelement(2, "i", 95);
|
|
1034
1140
|
i0.ɵɵtext(3, " Provide a JSON example that defines the expected structure for object output validation. ");
|
|
1035
1141
|
i0.ɵɵelementEnd();
|
|
1036
1142
|
} if (rf & 2) {
|
|
@@ -1038,7 +1144,7 @@ function AIPromptFormComponentExtended_form_2_Conditional_60_Conditional_3_Templ
|
|
|
1038
1144
|
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.record.OutputExample);
|
|
1039
1145
|
} }
|
|
1040
1146
|
function AIPromptFormComponentExtended_form_2_Conditional_60_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
1041
|
-
i0.ɵɵelementStart(0, "div",
|
|
1147
|
+
i0.ɵɵelementStart(0, "div", 185);
|
|
1042
1148
|
i0.ɵɵtext(1);
|
|
1043
1149
|
i0.ɵɵelementEnd();
|
|
1044
1150
|
} if (rf & 2) {
|
|
@@ -1047,16 +1153,16 @@ function AIPromptFormComponentExtended_form_2_Conditional_60_Conditional_4_Templ
|
|
|
1047
1153
|
i0.ɵɵtextInterpolate(ctx_r1.record.OutputExample);
|
|
1048
1154
|
} }
|
|
1049
1155
|
function AIPromptFormComponentExtended_form_2_Conditional_60_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
1050
|
-
i0.ɵɵelementStart(0, "div",
|
|
1051
|
-
i0.ɵɵelement(1, "i",
|
|
1156
|
+
i0.ɵɵelementStart(0, "div", 186);
|
|
1157
|
+
i0.ɵɵelement(1, "i", 190);
|
|
1052
1158
|
i0.ɵɵtext(2, " Output example is required when output type is 'object' ");
|
|
1053
1159
|
i0.ɵɵelementEnd();
|
|
1054
1160
|
} }
|
|
1055
1161
|
function AIPromptFormComponentExtended_form_2_Conditional_60_Template(rf, ctx) { if (rf & 1) {
|
|
1056
1162
|
i0.ɵɵelementStart(0, "kendo-expansionpanel", 30);
|
|
1057
1163
|
i0.ɵɵtemplate(1, AIPromptFormComponentExtended_form_2_Conditional_60_ng_template_1_Template, 5, 0, "ng-template", 31);
|
|
1058
|
-
i0.ɵɵelementStart(2, "div",
|
|
1059
|
-
i0.ɵɵtemplate(3, AIPromptFormComponentExtended_form_2_Conditional_60_Conditional_3_Template, 4, 1)(4, AIPromptFormComponentExtended_form_2_Conditional_60_Conditional_4_Template, 2, 1, "div",
|
|
1164
|
+
i0.ɵɵelementStart(2, "div", 184);
|
|
1165
|
+
i0.ɵɵtemplate(3, AIPromptFormComponentExtended_form_2_Conditional_60_Conditional_3_Template, 4, 1)(4, AIPromptFormComponentExtended_form_2_Conditional_60_Conditional_4_Template, 2, 1, "div", 185)(5, AIPromptFormComponentExtended_form_2_Conditional_60_Conditional_5_Template, 3, 0, "div", 186);
|
|
1060
1166
|
i0.ɵɵelementEnd()();
|
|
1061
1167
|
} if (rf & 2) {
|
|
1062
1168
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
@@ -1065,7 +1171,7 @@ function AIPromptFormComponentExtended_form_2_Conditional_60_Template(rf, ctx) {
|
|
|
1065
1171
|
i0.ɵɵconditional(ctx_r1.EditMode ? 3 : ctx_r1.record.OutputExample ? 4 : 5);
|
|
1066
1172
|
} }
|
|
1067
1173
|
function AIPromptFormComponentExtended_form_2_Conditional_61_ng_template_1_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
1068
|
-
i0.ɵɵelementStart(0, "span",
|
|
1174
|
+
i0.ɵɵelementStart(0, "span", 193);
|
|
1069
1175
|
i0.ɵɵtext(1);
|
|
1070
1176
|
i0.ɵɵelementEnd();
|
|
1071
1177
|
} if (rf & 2) {
|
|
@@ -1075,9 +1181,9 @@ function AIPromptFormComponentExtended_form_2_Conditional_61_ng_template_1_Condi
|
|
|
1075
1181
|
} }
|
|
1076
1182
|
function AIPromptFormComponentExtended_form_2_Conditional_61_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
1077
1183
|
i0.ɵɵelementStart(0, "span", 63);
|
|
1078
|
-
i0.ɵɵelement(1, "i",
|
|
1184
|
+
i0.ɵɵelement(1, "i", 192);
|
|
1079
1185
|
i0.ɵɵtext(2, " Execution History ");
|
|
1080
|
-
i0.ɵɵtemplate(3, AIPromptFormComponentExtended_form_2_Conditional_61_ng_template_1_Conditional_3_Template, 2, 1, "span",
|
|
1186
|
+
i0.ɵɵtemplate(3, AIPromptFormComponentExtended_form_2_Conditional_61_ng_template_1_Conditional_3_Template, 2, 1, "span", 193);
|
|
1081
1187
|
i0.ɵɵelementEnd();
|
|
1082
1188
|
} if (rf & 2) {
|
|
1083
1189
|
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
@@ -1085,165 +1191,165 @@ function AIPromptFormComponentExtended_form_2_Conditional_61_ng_template_1_Templ
|
|
|
1085
1191
|
i0.ɵɵconditional(ctx_r1.executionHistory.length > 0 ? 3 : -1);
|
|
1086
1192
|
} }
|
|
1087
1193
|
function AIPromptFormComponentExtended_form_2_Conditional_61_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
1088
|
-
i0.ɵɵelementStart(0, "div",
|
|
1089
|
-
i0.ɵɵelement(1, "i",
|
|
1194
|
+
i0.ɵɵelementStart(0, "div", 191);
|
|
1195
|
+
i0.ɵɵelement(1, "i", 194);
|
|
1090
1196
|
i0.ɵɵelementStart(2, "p");
|
|
1091
1197
|
i0.ɵɵtext(3, "Loading execution history...");
|
|
1092
1198
|
i0.ɵɵelementEnd()();
|
|
1093
1199
|
} }
|
|
1094
1200
|
function AIPromptFormComponentExtended_form_2_Conditional_61_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
1095
|
-
i0.ɵɵelementStart(0, "div",
|
|
1096
|
-
i0.ɵɵelement(1, "i",
|
|
1201
|
+
i0.ɵɵelementStart(0, "div", 191);
|
|
1202
|
+
i0.ɵɵelement(1, "i", 195);
|
|
1097
1203
|
i0.ɵɵelementStart(2, "p");
|
|
1098
1204
|
i0.ɵɵtext(3, "No execution history yet");
|
|
1099
1205
|
i0.ɵɵelementEnd();
|
|
1100
|
-
i0.ɵɵelementStart(4, "p",
|
|
1206
|
+
i0.ɵɵelementStart(4, "p", 111);
|
|
1101
1207
|
i0.ɵɵtext(5, "Run this prompt to see execution history here");
|
|
1102
1208
|
i0.ɵɵelementEnd()();
|
|
1103
1209
|
} }
|
|
1104
1210
|
function AIPromptFormComponentExtended_form_2_Conditional_61_Conditional_5_Conditional_9_Template(rf, ctx) { if (rf & 1) {
|
|
1105
|
-
i0.ɵɵelement(0, "i",
|
|
1211
|
+
i0.ɵɵelement(0, "i", 208);
|
|
1106
1212
|
} if (rf & 2) {
|
|
1107
1213
|
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
1108
1214
|
i0.ɵɵclassMap("fa-solid fa-sort-" + (ctx_r1.historySortDirection === "asc" ? "up" : "down"));
|
|
1109
1215
|
} }
|
|
1110
1216
|
function AIPromptFormComponentExtended_form_2_Conditional_61_Conditional_5_Conditional_12_Template(rf, ctx) { if (rf & 1) {
|
|
1111
|
-
i0.ɵɵelement(0, "i",
|
|
1217
|
+
i0.ɵɵelement(0, "i", 208);
|
|
1112
1218
|
} if (rf & 2) {
|
|
1113
1219
|
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
1114
1220
|
i0.ɵɵclassMap("fa-solid fa-sort-" + (ctx_r1.historySortDirection === "asc" ? "up" : "down"));
|
|
1115
1221
|
} }
|
|
1116
1222
|
function AIPromptFormComponentExtended_form_2_Conditional_61_Conditional_5_Conditional_15_Template(rf, ctx) { if (rf & 1) {
|
|
1117
|
-
i0.ɵɵelement(0, "i",
|
|
1223
|
+
i0.ɵɵelement(0, "i", 208);
|
|
1118
1224
|
} if (rf & 2) {
|
|
1119
1225
|
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
1120
1226
|
i0.ɵɵclassMap("fa-solid fa-sort-" + (ctx_r1.historySortDirection === "asc" ? "up" : "down"));
|
|
1121
1227
|
} }
|
|
1122
1228
|
function AIPromptFormComponentExtended_form_2_Conditional_61_Conditional_5_Conditional_18_Template(rf, ctx) { if (rf & 1) {
|
|
1123
|
-
i0.ɵɵelement(0, "i",
|
|
1229
|
+
i0.ɵɵelement(0, "i", 208);
|
|
1124
1230
|
} if (rf & 2) {
|
|
1125
1231
|
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
1126
1232
|
i0.ɵɵclassMap("fa-solid fa-sort-" + (ctx_r1.historySortDirection === "asc" ? "up" : "down"));
|
|
1127
1233
|
} }
|
|
1128
1234
|
function AIPromptFormComponentExtended_form_2_Conditional_61_Conditional_5_For_41_Conditional_20_Template(rf, ctx) { if (rf & 1) {
|
|
1129
|
-
i0.ɵɵelementStart(0, "span",
|
|
1235
|
+
i0.ɵɵelementStart(0, "span", 215);
|
|
1130
1236
|
i0.ɵɵtext(1);
|
|
1131
1237
|
i0.ɵɵelementEnd();
|
|
1132
1238
|
} if (rf & 2) {
|
|
1133
|
-
const
|
|
1239
|
+
const run_r34 = i0.ɵɵnextContext().$implicit;
|
|
1134
1240
|
i0.ɵɵadvance();
|
|
1135
|
-
i0.ɵɵtextInterpolate1(" ",
|
|
1241
|
+
i0.ɵɵtextInterpolate1(" ", run_r34.RunType, " ");
|
|
1136
1242
|
} }
|
|
1137
1243
|
function AIPromptFormComponentExtended_form_2_Conditional_61_Conditional_5_For_41_Template(rf, ctx) { if (rf & 1) {
|
|
1138
|
-
const
|
|
1139
|
-
i0.ɵɵelementStart(0, "tr",
|
|
1244
|
+
const _r33 = i0.ɵɵgetCurrentView();
|
|
1245
|
+
i0.ɵɵelementStart(0, "tr", 209)(1, "td", 210)(2, "span", 211);
|
|
1140
1246
|
i0.ɵɵelement(3, "i");
|
|
1141
1247
|
i0.ɵɵelementStart(4, "span", 24);
|
|
1142
1248
|
i0.ɵɵtext(5);
|
|
1143
1249
|
i0.ɵɵelementEnd()()();
|
|
1144
|
-
i0.ɵɵelementStart(6, "td",
|
|
1250
|
+
i0.ɵɵelementStart(6, "td", 212);
|
|
1145
1251
|
i0.ɵɵtext(7);
|
|
1146
1252
|
i0.ɵɵpipe(8, "date");
|
|
1147
1253
|
i0.ɵɵelementEnd();
|
|
1148
|
-
i0.ɵɵelementStart(9, "td",
|
|
1149
|
-
i0.ɵɵelement(11, "i",
|
|
1254
|
+
i0.ɵɵelementStart(9, "td", 212)(10, "span", 211);
|
|
1255
|
+
i0.ɵɵelement(11, "i", 90);
|
|
1150
1256
|
i0.ɵɵtext(12);
|
|
1151
1257
|
i0.ɵɵelementEnd()();
|
|
1152
|
-
i0.ɵɵelementStart(13, "td",
|
|
1258
|
+
i0.ɵɵelementStart(13, "td", 212);
|
|
1153
1259
|
i0.ɵɵtext(14);
|
|
1154
1260
|
i0.ɵɵelementEnd();
|
|
1155
|
-
i0.ɵɵelementStart(15, "td",
|
|
1261
|
+
i0.ɵɵelementStart(15, "td", 213);
|
|
1156
1262
|
i0.ɵɵtext(16);
|
|
1157
1263
|
i0.ɵɵelementEnd();
|
|
1158
|
-
i0.ɵɵelementStart(17, "td",
|
|
1264
|
+
i0.ɵɵelementStart(17, "td", 213);
|
|
1159
1265
|
i0.ɵɵtext(18);
|
|
1160
1266
|
i0.ɵɵelementEnd();
|
|
1161
|
-
i0.ɵɵelementStart(19, "td",
|
|
1162
|
-
i0.ɵɵtemplate(20, AIPromptFormComponentExtended_form_2_Conditional_61_Conditional_5_For_41_Conditional_20_Template, 2, 1, "span",
|
|
1267
|
+
i0.ɵɵelementStart(19, "td", 214);
|
|
1268
|
+
i0.ɵɵtemplate(20, AIPromptFormComponentExtended_form_2_Conditional_61_Conditional_5_For_41_Conditional_20_Template, 2, 1, "span", 215);
|
|
1163
1269
|
i0.ɵɵelementEnd();
|
|
1164
|
-
i0.ɵɵelementStart(21, "td",
|
|
1165
|
-
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_2_Conditional_61_Conditional_5_For_41_Template_button_click_22_listener() { const
|
|
1166
|
-
i0.ɵɵelement(23, "i",
|
|
1270
|
+
i0.ɵɵelementStart(21, "td", 214)(22, "button", 216);
|
|
1271
|
+
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_2_Conditional_61_Conditional_5_For_41_Template_button_click_22_listener() { const run_r34 = i0.ɵɵrestoreView(_r33).$implicit; const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.navigateToPromptRun(run_r34.ID)); });
|
|
1272
|
+
i0.ɵɵelement(23, "i", 217);
|
|
1167
1273
|
i0.ɵɵelementEnd()()();
|
|
1168
1274
|
} if (rf & 2) {
|
|
1169
|
-
const
|
|
1170
|
-
const ɵ$
|
|
1275
|
+
const run_r34 = ctx.$implicit;
|
|
1276
|
+
const ɵ$index_829_r35 = ctx.$index;
|
|
1171
1277
|
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
1172
|
-
i0.ɵɵclassProp("even-row", ɵ$
|
|
1278
|
+
i0.ɵɵclassProp("even-row", ɵ$index_829_r35 % 2 === 0);
|
|
1173
1279
|
i0.ɵɵadvance(3);
|
|
1174
|
-
i0.ɵɵclassMap("fa-solid " + ctx_r1.getExecutionStatusIcon(
|
|
1175
|
-
i0.ɵɵstyleProp("color", ctx_r1.getExecutionStatusColor(
|
|
1280
|
+
i0.ɵɵclassMap("fa-solid " + ctx_r1.getExecutionStatusIcon(run_r34.Success));
|
|
1281
|
+
i0.ɵɵstyleProp("color", ctx_r1.getExecutionStatusColor(run_r34.Success));
|
|
1176
1282
|
i0.ɵɵadvance();
|
|
1177
|
-
i0.ɵɵstyleProp("color", ctx_r1.getExecutionStatusColor(
|
|
1283
|
+
i0.ɵɵstyleProp("color", ctx_r1.getExecutionStatusColor(run_r34.Success));
|
|
1178
1284
|
i0.ɵɵadvance();
|
|
1179
|
-
i0.ɵɵtextInterpolate1(" ",
|
|
1285
|
+
i0.ɵɵtextInterpolate1(" ", run_r34.Success === true ? "Success" : run_r34.Success === false ? "Failed" : "Running", " ");
|
|
1180
1286
|
i0.ɵɵadvance(2);
|
|
1181
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(8, 15,
|
|
1287
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(8, 15, run_r34.RunAt, "short"), " ");
|
|
1182
1288
|
i0.ɵɵadvance(5);
|
|
1183
|
-
i0.ɵɵtextInterpolate1(" ",
|
|
1289
|
+
i0.ɵɵtextInterpolate1(" ", run_r34.Model || "Unknown", " ");
|
|
1184
1290
|
i0.ɵɵadvance(2);
|
|
1185
|
-
i0.ɵɵtextInterpolate1(" ", ctx_r1.formatDuration(
|
|
1291
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.formatDuration(run_r34.ExecutionTimeMS), " ");
|
|
1186
1292
|
i0.ɵɵadvance(2);
|
|
1187
|
-
i0.ɵɵtextInterpolate1(" ", ctx_r1.formatTokens(
|
|
1293
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.formatTokens(run_r34.TokensUsed), " ");
|
|
1188
1294
|
i0.ɵɵadvance(2);
|
|
1189
|
-
i0.ɵɵtextInterpolate1(" ", ctx_r1.formatCost(
|
|
1295
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.formatCost(run_r34.TotalCost || run_r34.Cost), " ");
|
|
1190
1296
|
i0.ɵɵadvance(2);
|
|
1191
|
-
i0.ɵɵconditional(
|
|
1297
|
+
i0.ɵɵconditional(run_r34.RunType ? 20 : -1);
|
|
1192
1298
|
} }
|
|
1193
1299
|
function AIPromptFormComponentExtended_form_2_Conditional_61_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
1194
|
-
const
|
|
1195
|
-
i0.ɵɵelementStart(0, "div",
|
|
1300
|
+
const _r32 = i0.ɵɵgetCurrentView();
|
|
1301
|
+
i0.ɵɵelementStart(0, "div", 196)(1, "div", 130);
|
|
1196
1302
|
i0.ɵɵtext(2);
|
|
1197
1303
|
i0.ɵɵelementEnd();
|
|
1198
|
-
i0.ɵɵelementStart(3, "div",
|
|
1304
|
+
i0.ɵɵelementStart(3, "div", 197)(4, "span", 174);
|
|
1199
1305
|
i0.ɵɵtext(5, "Sort by:");
|
|
1200
1306
|
i0.ɵɵelementEnd();
|
|
1201
|
-
i0.ɵɵelementStart(6, "kendo-buttongroup",
|
|
1202
|
-
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_2_Conditional_61_Conditional_5_Template_button_click_7_listener() { i0.ɵɵrestoreView(
|
|
1307
|
+
i0.ɵɵelementStart(6, "kendo-buttongroup", 198)(7, "button", 199);
|
|
1308
|
+
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_2_Conditional_61_Conditional_5_Template_button_click_7_listener() { i0.ɵɵrestoreView(_r32); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.changeHistorySort("runAt")); });
|
|
1203
1309
|
i0.ɵɵtext(8, " Date ");
|
|
1204
|
-
i0.ɵɵtemplate(9, AIPromptFormComponentExtended_form_2_Conditional_61_Conditional_5_Conditional_9_Template, 1, 2, "i",
|
|
1310
|
+
i0.ɵɵtemplate(9, AIPromptFormComponentExtended_form_2_Conditional_61_Conditional_5_Conditional_9_Template, 1, 2, "i", 200);
|
|
1205
1311
|
i0.ɵɵelementEnd();
|
|
1206
|
-
i0.ɵɵelementStart(10, "button",
|
|
1207
|
-
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_2_Conditional_61_Conditional_5_Template_button_click_10_listener() { i0.ɵɵrestoreView(
|
|
1312
|
+
i0.ɵɵelementStart(10, "button", 199);
|
|
1313
|
+
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_2_Conditional_61_Conditional_5_Template_button_click_10_listener() { i0.ɵɵrestoreView(_r32); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.changeHistorySort("executionTime")); });
|
|
1208
1314
|
i0.ɵɵtext(11, " Duration ");
|
|
1209
|
-
i0.ɵɵtemplate(12, AIPromptFormComponentExtended_form_2_Conditional_61_Conditional_5_Conditional_12_Template, 1, 2, "i",
|
|
1315
|
+
i0.ɵɵtemplate(12, AIPromptFormComponentExtended_form_2_Conditional_61_Conditional_5_Conditional_12_Template, 1, 2, "i", 200);
|
|
1210
1316
|
i0.ɵɵelementEnd();
|
|
1211
|
-
i0.ɵɵelementStart(13, "button",
|
|
1212
|
-
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_2_Conditional_61_Conditional_5_Template_button_click_13_listener() { i0.ɵɵrestoreView(
|
|
1317
|
+
i0.ɵɵelementStart(13, "button", 199);
|
|
1318
|
+
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_2_Conditional_61_Conditional_5_Template_button_click_13_listener() { i0.ɵɵrestoreView(_r32); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.changeHistorySort("tokens")); });
|
|
1213
1319
|
i0.ɵɵtext(14, " Tokens ");
|
|
1214
|
-
i0.ɵɵtemplate(15, AIPromptFormComponentExtended_form_2_Conditional_61_Conditional_5_Conditional_15_Template, 1, 2, "i",
|
|
1320
|
+
i0.ɵɵtemplate(15, AIPromptFormComponentExtended_form_2_Conditional_61_Conditional_5_Conditional_15_Template, 1, 2, "i", 200);
|
|
1215
1321
|
i0.ɵɵelementEnd();
|
|
1216
|
-
i0.ɵɵelementStart(16, "button",
|
|
1217
|
-
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_2_Conditional_61_Conditional_5_Template_button_click_16_listener() { i0.ɵɵrestoreView(
|
|
1322
|
+
i0.ɵɵelementStart(16, "button", 199);
|
|
1323
|
+
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_2_Conditional_61_Conditional_5_Template_button_click_16_listener() { i0.ɵɵrestoreView(_r32); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.changeHistorySort("cost")); });
|
|
1218
1324
|
i0.ɵɵtext(17, " Cost ");
|
|
1219
|
-
i0.ɵɵtemplate(18, AIPromptFormComponentExtended_form_2_Conditional_61_Conditional_5_Conditional_18_Template, 1, 2, "i",
|
|
1325
|
+
i0.ɵɵtemplate(18, AIPromptFormComponentExtended_form_2_Conditional_61_Conditional_5_Conditional_18_Template, 1, 2, "i", 200);
|
|
1220
1326
|
i0.ɵɵelementEnd()()()();
|
|
1221
|
-
i0.ɵɵelementStart(19, "div",
|
|
1327
|
+
i0.ɵɵelementStart(19, "div", 201)(20, "table", 202)(21, "thead")(22, "tr", 203)(23, "th", 204);
|
|
1222
1328
|
i0.ɵɵtext(24, "Status");
|
|
1223
1329
|
i0.ɵɵelementEnd();
|
|
1224
|
-
i0.ɵɵelementStart(25, "th",
|
|
1330
|
+
i0.ɵɵelementStart(25, "th", 204);
|
|
1225
1331
|
i0.ɵɵtext(26, "Date & Time");
|
|
1226
1332
|
i0.ɵɵelementEnd();
|
|
1227
|
-
i0.ɵɵelementStart(27, "th",
|
|
1333
|
+
i0.ɵɵelementStart(27, "th", 204);
|
|
1228
1334
|
i0.ɵɵtext(28, "Model");
|
|
1229
1335
|
i0.ɵɵelementEnd();
|
|
1230
|
-
i0.ɵɵelementStart(29, "th",
|
|
1336
|
+
i0.ɵɵelementStart(29, "th", 204);
|
|
1231
1337
|
i0.ɵɵtext(30, "Duration");
|
|
1232
1338
|
i0.ɵɵelementEnd();
|
|
1233
|
-
i0.ɵɵelementStart(31, "th",
|
|
1339
|
+
i0.ɵɵelementStart(31, "th", 205);
|
|
1234
1340
|
i0.ɵɵtext(32, "Tokens");
|
|
1235
1341
|
i0.ɵɵelementEnd();
|
|
1236
|
-
i0.ɵɵelementStart(33, "th",
|
|
1342
|
+
i0.ɵɵelementStart(33, "th", 205);
|
|
1237
1343
|
i0.ɵɵtext(34, "Cost");
|
|
1238
1344
|
i0.ɵɵelementEnd();
|
|
1239
|
-
i0.ɵɵelementStart(35, "th",
|
|
1345
|
+
i0.ɵɵelementStart(35, "th", 206);
|
|
1240
1346
|
i0.ɵɵtext(36, "Type");
|
|
1241
1347
|
i0.ɵɵelementEnd();
|
|
1242
|
-
i0.ɵɵelementStart(37, "th",
|
|
1348
|
+
i0.ɵɵelementStart(37, "th", 206);
|
|
1243
1349
|
i0.ɵɵtext(38, "Actions");
|
|
1244
1350
|
i0.ɵɵelementEnd()()();
|
|
1245
1351
|
i0.ɵɵelementStart(39, "tbody");
|
|
1246
|
-
i0.ɵɵrepeaterCreate(40, AIPromptFormComponentExtended_form_2_Conditional_61_Conditional_5_For_41_Template, 24, 18, "tr",
|
|
1352
|
+
i0.ɵɵrepeaterCreate(40, AIPromptFormComponentExtended_form_2_Conditional_61_Conditional_5_For_41_Template, 24, 18, "tr", 207, _forTrack1);
|
|
1247
1353
|
i0.ɵɵelementEnd()()();
|
|
1248
1354
|
} if (rf & 2) {
|
|
1249
1355
|
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
@@ -1271,8 +1377,8 @@ function AIPromptFormComponentExtended_form_2_Conditional_61_Conditional_5_Templ
|
|
|
1271
1377
|
function AIPromptFormComponentExtended_form_2_Conditional_61_Template(rf, ctx) { if (rf & 1) {
|
|
1272
1378
|
i0.ɵɵelementStart(0, "kendo-expansionpanel", 30);
|
|
1273
1379
|
i0.ɵɵtemplate(1, AIPromptFormComponentExtended_form_2_Conditional_61_ng_template_1_Template, 4, 1, "ng-template", 31);
|
|
1274
|
-
i0.ɵɵelementStart(2, "div",
|
|
1275
|
-
i0.ɵɵtemplate(3, AIPromptFormComponentExtended_form_2_Conditional_61_Conditional_3_Template, 4, 0, "div",
|
|
1380
|
+
i0.ɵɵelementStart(2, "div", 184);
|
|
1381
|
+
i0.ɵɵtemplate(3, AIPromptFormComponentExtended_form_2_Conditional_61_Conditional_3_Template, 4, 0, "div", 191)(4, AIPromptFormComponentExtended_form_2_Conditional_61_Conditional_4_Template, 6, 0, "div", 191)(5, AIPromptFormComponentExtended_form_2_Conditional_61_Conditional_5_Template, 42, 9);
|
|
1276
1382
|
i0.ɵɵelementEnd()();
|
|
1277
1383
|
} if (rf & 2) {
|
|
1278
1384
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
@@ -1282,7 +1388,7 @@ function AIPromptFormComponentExtended_form_2_Conditional_61_Template(rf, ctx) {
|
|
|
1282
1388
|
} }
|
|
1283
1389
|
function AIPromptFormComponentExtended_form_2_Conditional_62_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
1284
1390
|
i0.ɵɵelementStart(0, "span", 63);
|
|
1285
|
-
i0.ɵɵelement(1, "i",
|
|
1391
|
+
i0.ɵɵelement(1, "i", 219);
|
|
1286
1392
|
i0.ɵɵtext(2, " Result Cache ");
|
|
1287
1393
|
i0.ɵɵelementEnd();
|
|
1288
1394
|
} }
|
|
@@ -1290,7 +1396,7 @@ function AIPromptFormComponentExtended_form_2_Conditional_62_Template(rf, ctx) {
|
|
|
1290
1396
|
i0.ɵɵelementStart(0, "kendo-expansionpanel", 30);
|
|
1291
1397
|
i0.ɵɵtemplate(1, AIPromptFormComponentExtended_form_2_Conditional_62_ng_template_1_Template, 3, 0, "ng-template", 31);
|
|
1292
1398
|
i0.ɵɵelementStart(2, "div", 37);
|
|
1293
|
-
i0.ɵɵelement(3, "mj-user-view-grid",
|
|
1399
|
+
i0.ɵɵelement(3, "mj-user-view-grid", 218);
|
|
1294
1400
|
i0.ɵɵelementEnd()();
|
|
1295
1401
|
} if (rf & 2) {
|
|
1296
1402
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
@@ -1300,22 +1406,22 @@ function AIPromptFormComponentExtended_form_2_Conditional_62_Template(rf, ctx) {
|
|
|
1300
1406
|
} }
|
|
1301
1407
|
function AIPromptFormComponentExtended_form_2_Conditional_63_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
1302
1408
|
i0.ɵɵelementStart(0, "span", 63);
|
|
1303
|
-
i0.ɵɵelement(1, "i",
|
|
1409
|
+
i0.ɵɵelement(1, "i", 222);
|
|
1304
1410
|
i0.ɵɵtext(2, " Related Items ");
|
|
1305
1411
|
i0.ɵɵelementEnd();
|
|
1306
1412
|
} }
|
|
1307
1413
|
function AIPromptFormComponentExtended_form_2_Conditional_63_Template(rf, ctx) { if (rf & 1) {
|
|
1308
1414
|
i0.ɵɵelementStart(0, "kendo-expansionpanel", 30);
|
|
1309
1415
|
i0.ɵɵtemplate(1, AIPromptFormComponentExtended_form_2_Conditional_63_ng_template_1_Template, 3, 0, "ng-template", 31);
|
|
1310
|
-
i0.ɵɵelementStart(2, "div", 37)(3, "div", 38)(4, "div")(5, "h6",
|
|
1416
|
+
i0.ɵɵelementStart(2, "div", 37)(3, "div", 38)(4, "div")(5, "h6", 220);
|
|
1311
1417
|
i0.ɵɵtext(6, "AI Agents Using This Prompt");
|
|
1312
1418
|
i0.ɵɵelementEnd();
|
|
1313
|
-
i0.ɵɵelement(7, "mj-user-view-grid",
|
|
1419
|
+
i0.ɵɵelement(7, "mj-user-view-grid", 221);
|
|
1314
1420
|
i0.ɵɵelementEnd();
|
|
1315
|
-
i0.ɵɵelementStart(8, "div")(9, "h6",
|
|
1421
|
+
i0.ɵɵelementStart(8, "div")(9, "h6", 220);
|
|
1316
1422
|
i0.ɵɵtext(10, "Prompts Using This as Result Selector");
|
|
1317
1423
|
i0.ɵɵelementEnd();
|
|
1318
|
-
i0.ɵɵelement(11, "mj-user-view-grid",
|
|
1424
|
+
i0.ɵɵelement(11, "mj-user-view-grid", 221);
|
|
1319
1425
|
i0.ɵɵelementEnd()()()();
|
|
1320
1426
|
} if (rf & 2) {
|
|
1321
1427
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
@@ -1361,24 +1467,24 @@ function AIPromptFormComponentExtended_form_2_Template(rf, ctx) { if (rf & 1) {
|
|
|
1361
1467
|
i0.ɵɵelementStart(33, "div", 29)(34, "kendo-expansionpanel", 30);
|
|
1362
1468
|
i0.ɵɵtemplate(35, AIPromptFormComponentExtended_form_2_ng_template_35_Template, 4, 1, "ng-template", 31);
|
|
1363
1469
|
i0.ɵɵelementStart(36, "div", 32);
|
|
1364
|
-
i0.ɵɵtemplate(37, AIPromptFormComponentExtended_form_2_Conditional_37_Template, 3, 0, "div", 33)(38, AIPromptFormComponentExtended_form_2_Conditional_38_Template,
|
|
1470
|
+
i0.ɵɵtemplate(37, AIPromptFormComponentExtended_form_2_Conditional_37_Template, 3, 0, "div", 33)(38, AIPromptFormComponentExtended_form_2_Conditional_38_Template, 9, 2, "div", 34)(39, AIPromptFormComponentExtended_form_2_Conditional_39_Template, 11, 2, "div", 35)(40, AIPromptFormComponentExtended_form_2_Conditional_40_Template, 5, 3, "div", 36);
|
|
1365
1471
|
i0.ɵɵelementEnd()();
|
|
1366
|
-
i0.ɵɵtemplate(41, AIPromptFormComponentExtended_form_2_Conditional_41_Template, 6, 2, "kendo-expansionpanel", 30)
|
|
1367
|
-
i0.ɵɵelementStart(
|
|
1368
|
-
i0.ɵɵtemplate(
|
|
1369
|
-
i0.ɵɵelementStart(
|
|
1370
|
-
i0.ɵɵelement(
|
|
1371
|
-
i0.ɵɵtemplate(
|
|
1372
|
-
i0.ɵɵelement(
|
|
1373
|
-
i0.ɵɵelementEnd();
|
|
1374
|
-
i0.ɵɵelementStart(
|
|
1375
|
-
i0.ɵɵelement(
|
|
1376
|
-
i0.ɵɵelementStart(
|
|
1377
|
-
i0.ɵɵtext(
|
|
1378
|
-
i0.ɵɵelementEnd();
|
|
1379
|
-
i0.ɵɵtemplate(
|
|
1472
|
+
i0.ɵɵtemplate(41, AIPromptFormComponentExtended_form_2_Conditional_41_Template, 6, 2, "kendo-expansionpanel", 30);
|
|
1473
|
+
i0.ɵɵelementStart(42, "kendo-expansionpanel", 30);
|
|
1474
|
+
i0.ɵɵtemplate(43, AIPromptFormComponentExtended_form_2_ng_template_43_Template, 3, 0, "ng-template", 31);
|
|
1475
|
+
i0.ɵɵelementStart(44, "div", 37)(45, "div", 38)(46, "div");
|
|
1476
|
+
i0.ɵɵelement(47, "mj-form-field", 39);
|
|
1477
|
+
i0.ɵɵtemplate(48, AIPromptFormComponentExtended_form_2_Conditional_48_Template, 1, 3, "mj-form-field", 40)(49, AIPromptFormComponentExtended_form_2_Conditional_49_Template, 1, 3, "mj-form-field", 41);
|
|
1478
|
+
i0.ɵɵelement(50, "mj-form-field", 42);
|
|
1479
|
+
i0.ɵɵelementEnd();
|
|
1480
|
+
i0.ɵɵelementStart(51, "div");
|
|
1481
|
+
i0.ɵɵelement(52, "mj-form-field", 43)(53, "mj-form-field", 44);
|
|
1482
|
+
i0.ɵɵelementStart(54, "div", 45)(55, "label", 46);
|
|
1483
|
+
i0.ɵɵtext(56, " Result Selector Prompt ");
|
|
1484
|
+
i0.ɵɵelementEnd();
|
|
1485
|
+
i0.ɵɵtemplate(57, AIPromptFormComponentExtended_form_2_Conditional_57_Template, 2, 1)(58, AIPromptFormComponentExtended_form_2_Conditional_58_Template, 2, 1, "span", 47);
|
|
1380
1486
|
i0.ɵɵelementEnd()()()()();
|
|
1381
|
-
i0.ɵɵtemplate(60, AIPromptFormComponentExtended_form_2_Conditional_60_Template, 6, 2, "kendo-expansionpanel", 30)(61, AIPromptFormComponentExtended_form_2_Conditional_61_Template, 6, 2, "kendo-expansionpanel", 30)(62, AIPromptFormComponentExtended_form_2_Conditional_62_Template, 4, 5, "kendo-expansionpanel", 30)(63, AIPromptFormComponentExtended_form_2_Conditional_63_Template, 12, 9, "kendo-expansionpanel", 30);
|
|
1487
|
+
i0.ɵɵtemplate(59, AIPromptFormComponentExtended_form_2_Conditional_59_Template, 6, 2, "kendo-expansionpanel", 30)(60, AIPromptFormComponentExtended_form_2_Conditional_60_Template, 6, 2, "kendo-expansionpanel", 30)(61, AIPromptFormComponentExtended_form_2_Conditional_61_Template, 6, 2, "kendo-expansionpanel", 30)(62, AIPromptFormComponentExtended_form_2_Conditional_62_Template, 4, 5, "kendo-expansionpanel", 30)(63, AIPromptFormComponentExtended_form_2_Conditional_63_Template, 12, 9, "kendo-expansionpanel", 30);
|
|
1382
1488
|
i0.ɵɵelementEnd()()();
|
|
1383
1489
|
} if (rf & 2) {
|
|
1384
1490
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
@@ -1409,17 +1515,15 @@ function AIPromptFormComponentExtended_form_2_Template(rf, ctx) { if (rf & 1) {
|
|
|
1409
1515
|
i0.ɵɵadvance(3);
|
|
1410
1516
|
i0.ɵɵconditional(ctx_r1.isLoadingTemplate ? 37 : !ctx_r1.record.TemplateID ? 38 : ctx_r1.templateNotFoundInDatabase ? 39 : 40);
|
|
1411
1517
|
i0.ɵɵadvance(4);
|
|
1412
|
-
i0.ɵɵconditional(ctx_r1.
|
|
1413
|
-
i0.ɵɵadvance();
|
|
1414
|
-
i0.ɵɵconditional(ctx_r1.record.IsSaved ? 42 : -1);
|
|
1518
|
+
i0.ɵɵconditional(ctx_r1.record.IsSaved ? 41 : -1);
|
|
1415
1519
|
i0.ɵɵadvance();
|
|
1416
1520
|
i0.ɵɵproperty("expanded", false);
|
|
1417
1521
|
i0.ɵɵadvance(5);
|
|
1418
1522
|
i0.ɵɵproperty("record", ctx_r1.record)("ShowLabel", true)("EditMode", ctx_r1.EditMode);
|
|
1419
1523
|
i0.ɵɵadvance();
|
|
1420
|
-
i0.ɵɵconditional(ctx_r1.showParallelCount ?
|
|
1524
|
+
i0.ɵɵconditional(ctx_r1.showParallelCount ? 48 : -1);
|
|
1421
1525
|
i0.ɵɵadvance();
|
|
1422
|
-
i0.ɵɵconditional(ctx_r1.showParallelConfigParam ?
|
|
1526
|
+
i0.ɵɵconditional(ctx_r1.showParallelConfigParam ? 49 : -1);
|
|
1423
1527
|
i0.ɵɵadvance();
|
|
1424
1528
|
i0.ɵɵproperty("record", ctx_r1.record)("ShowLabel", true)("EditMode", ctx_r1.EditMode);
|
|
1425
1529
|
i0.ɵɵadvance(2);
|
|
@@ -1427,8 +1531,10 @@ function AIPromptFormComponentExtended_form_2_Template(rf, ctx) { if (rf & 1) {
|
|
|
1427
1531
|
i0.ɵɵadvance();
|
|
1428
1532
|
i0.ɵɵproperty("record", ctx_r1.record)("ShowLabel", true)("EditMode", ctx_r1.EditMode);
|
|
1429
1533
|
i0.ɵɵadvance(4);
|
|
1430
|
-
i0.ɵɵconditional(ctx_r1.EditMode ?
|
|
1534
|
+
i0.ɵɵconditional(ctx_r1.EditMode ? 57 : 58);
|
|
1431
1535
|
i0.ɵɵadvance(2);
|
|
1536
|
+
i0.ɵɵconditional(ctx_r1.template && ctx_r1.templateParams.length > 0 ? 59 : -1);
|
|
1537
|
+
i0.ɵɵadvance();
|
|
1432
1538
|
i0.ɵɵconditional(ctx_r1.showOutputExample ? 60 : -1);
|
|
1433
1539
|
i0.ɵɵadvance();
|
|
1434
1540
|
i0.ɵɵconditional(ctx_r1.record.IsSaved ? 61 : -1);
|
|
@@ -1438,11 +1544,11 @@ function AIPromptFormComponentExtended_form_2_Template(rf, ctx) { if (rf & 1) {
|
|
|
1438
1544
|
i0.ɵɵconditional(ctx_r1.record.IsSaved ? 63 : -1);
|
|
1439
1545
|
} }
|
|
1440
1546
|
function AIPromptFormComponentExtended_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
1441
|
-
const
|
|
1442
|
-
i0.ɵɵelementStart(0, "kendo-window",
|
|
1443
|
-
i0.ɵɵlistener("close", function AIPromptFormComponentExtended_Conditional_3_Template_kendo_window_close_0_listener() { i0.ɵɵrestoreView(
|
|
1444
|
-
i0.ɵɵelementStart(1, "mj-ai-test-harness",
|
|
1445
|
-
i0.ɵɵlistener("visibilityChange", function AIPromptFormComponentExtended_Conditional_3_Template_mj_ai_test_harness_visibilityChange_1_listener($event) { i0.ɵɵrestoreView(
|
|
1547
|
+
const _r36 = i0.ɵɵgetCurrentView();
|
|
1548
|
+
i0.ɵɵelementStart(0, "kendo-window", 223);
|
|
1549
|
+
i0.ɵɵlistener("close", function AIPromptFormComponentExtended_Conditional_3_Template_kendo_window_close_0_listener() { i0.ɵɵrestoreView(_r36); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onTestHarnessVisibilityChanged(false)); });
|
|
1550
|
+
i0.ɵɵelementStart(1, "mj-ai-test-harness", 224);
|
|
1551
|
+
i0.ɵɵlistener("visibilityChange", function AIPromptFormComponentExtended_Conditional_3_Template_mj_ai_test_harness_visibilityChange_1_listener($event) { i0.ɵɵrestoreView(_r36); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onTestHarnessVisibilityChanged($event)); });
|
|
1446
1552
|
i0.ɵɵelementEnd()();
|
|
1447
1553
|
} if (rf & 2) {
|
|
1448
1554
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
@@ -1452,19 +1558,110 @@ function AIPromptFormComponentExtended_Conditional_3_Template(rf, ctx) { if (rf
|
|
|
1452
1558
|
i0.ɵɵproperty("entity", ctx_r1.record)("mode", "prompt")("isVisible", ctx_r1.showTestHarness);
|
|
1453
1559
|
} }
|
|
1454
1560
|
let AIPromptFormComponentExtended = class AIPromptFormComponentExtended extends AIPromptFormComponent {
|
|
1561
|
+
// Main AI Prompt permissions inherited from BaseFormComponent:
|
|
1562
|
+
// - UserCanEdit (Update permission)
|
|
1563
|
+
// - UserCanRead (Read permission)
|
|
1564
|
+
// - UserCanCreate (Create permission)
|
|
1565
|
+
// - UserCanDelete (Delete permission)
|
|
1566
|
+
/** Check if user can create Templates */
|
|
1567
|
+
get UserCanCreateTemplates() {
|
|
1568
|
+
return this.checkEntityPermission('Templates', 'Create');
|
|
1569
|
+
}
|
|
1570
|
+
/** Check if user can update Templates */
|
|
1571
|
+
get UserCanUpdateTemplates() {
|
|
1572
|
+
return this.checkEntityPermission('Templates', 'Update');
|
|
1573
|
+
}
|
|
1574
|
+
/** Check if user can delete Templates */
|
|
1575
|
+
get UserCanDeleteTemplates() {
|
|
1576
|
+
return this.checkEntityPermission('Templates', 'Delete');
|
|
1577
|
+
}
|
|
1578
|
+
/** Check if user can read Templates */
|
|
1579
|
+
get UserCanReadTemplates() {
|
|
1580
|
+
return this.checkEntityPermission('Templates', 'Read');
|
|
1581
|
+
}
|
|
1582
|
+
/** Check if user can create Template Contents */
|
|
1583
|
+
get UserCanCreateTemplateContents() {
|
|
1584
|
+
return this.checkEntityPermission('Template Contents', 'Create');
|
|
1585
|
+
}
|
|
1586
|
+
/** Check if user can update Template Contents */
|
|
1587
|
+
get UserCanUpdateTemplateContents() {
|
|
1588
|
+
return this.checkEntityPermission('Template Contents', 'Update');
|
|
1589
|
+
}
|
|
1590
|
+
/** Check if user can create AI Prompt Models */
|
|
1591
|
+
get UserCanCreatePromptModels() {
|
|
1592
|
+
return this.checkEntityPermission('MJ: AI Prompt Models', 'Create');
|
|
1593
|
+
}
|
|
1594
|
+
/** Check if user can update AI Prompt Models */
|
|
1595
|
+
get UserCanUpdatePromptModels() {
|
|
1596
|
+
return this.checkEntityPermission('MJ: AI Prompt Models', 'Update');
|
|
1597
|
+
}
|
|
1598
|
+
/** Check if user can delete AI Prompt Models */
|
|
1599
|
+
get UserCanDeletePromptModels() {
|
|
1600
|
+
return this.checkEntityPermission('MJ: AI Prompt Models', 'Delete');
|
|
1601
|
+
}
|
|
1602
|
+
/**
|
|
1603
|
+
* Helper method to check entity permissions with caching
|
|
1604
|
+
* @param entityName - The name of the entity to check permissions for
|
|
1605
|
+
* @param permissionType - The type of permission to check (Create, Read, Update, Delete)
|
|
1606
|
+
* @returns boolean indicating if user has the permission
|
|
1607
|
+
*/
|
|
1608
|
+
checkEntityPermission(entityName, permissionType) {
|
|
1609
|
+
const cacheKey = `${entityName}_${permissionType}`;
|
|
1610
|
+
if (this._permissionCache.has(cacheKey)) {
|
|
1611
|
+
return this._permissionCache.get(cacheKey);
|
|
1612
|
+
}
|
|
1613
|
+
try {
|
|
1614
|
+
const entityInfo = this._metadata.Entities.find(e => e.Name === entityName);
|
|
1615
|
+
if (!entityInfo) {
|
|
1616
|
+
console.warn(`Entity '${entityName}' not found for permission check`);
|
|
1617
|
+
this._permissionCache.set(cacheKey, false);
|
|
1618
|
+
return false;
|
|
1619
|
+
}
|
|
1620
|
+
const userPermissions = entityInfo.GetUserPermisions(this._metadata.CurrentUser);
|
|
1621
|
+
let hasPermission = false;
|
|
1622
|
+
switch (permissionType) {
|
|
1623
|
+
case 'Create':
|
|
1624
|
+
hasPermission = userPermissions.CanCreate;
|
|
1625
|
+
break;
|
|
1626
|
+
case 'Read':
|
|
1627
|
+
hasPermission = userPermissions.CanRead;
|
|
1628
|
+
break;
|
|
1629
|
+
case 'Update':
|
|
1630
|
+
hasPermission = userPermissions.CanUpdate;
|
|
1631
|
+
break;
|
|
1632
|
+
case 'Delete':
|
|
1633
|
+
hasPermission = userPermissions.CanDelete;
|
|
1634
|
+
break;
|
|
1635
|
+
}
|
|
1636
|
+
this._permissionCache.set(cacheKey, hasPermission);
|
|
1637
|
+
return hasPermission;
|
|
1638
|
+
}
|
|
1639
|
+
catch (error) {
|
|
1640
|
+
console.error(`Error checking ${permissionType} permission for ${entityName}:`, error);
|
|
1641
|
+
this._permissionCache.set(cacheKey, false);
|
|
1642
|
+
return false;
|
|
1643
|
+
}
|
|
1644
|
+
}
|
|
1645
|
+
/**
|
|
1646
|
+
* Clears the permission cache. Call this when user context changes or permissions are updated.
|
|
1647
|
+
*/
|
|
1648
|
+
clearPermissionCache() {
|
|
1649
|
+
this._permissionCache.clear();
|
|
1650
|
+
}
|
|
1455
1651
|
// Template editor configuration
|
|
1456
1652
|
get templateEditorConfig() {
|
|
1457
1653
|
return {
|
|
1458
|
-
allowEdit: this.EditMode,
|
|
1654
|
+
allowEdit: this.EditMode && this.UserCanUpdateTemplateContents,
|
|
1459
1655
|
showRunButton: false,
|
|
1460
1656
|
compactMode: false
|
|
1461
1657
|
};
|
|
1462
1658
|
}
|
|
1463
|
-
constructor(elementRef, sharedService, router, route, cdr, testHarnessService, viewContainerRef) {
|
|
1659
|
+
constructor(elementRef, sharedService, router, route, cdr, testHarnessService, viewContainerRef, promptManagementService) {
|
|
1464
1660
|
super(elementRef, sharedService, router, route, cdr);
|
|
1465
1661
|
this.cdr = cdr;
|
|
1466
1662
|
this.testHarnessService = testHarnessService;
|
|
1467
1663
|
this.viewContainerRef = viewContainerRef;
|
|
1664
|
+
this.promptManagementService = promptManagementService;
|
|
1468
1665
|
this.template = null;
|
|
1469
1666
|
this.templateContent = null;
|
|
1470
1667
|
this.templateParams = [];
|
|
@@ -1482,6 +1679,9 @@ let AIPromptFormComponentExtended = class AIPromptFormComponentExtended extends
|
|
|
1482
1679
|
// AI Prompt Types
|
|
1483
1680
|
this.availablePromptTypes = [];
|
|
1484
1681
|
this.isLoadingPromptTypes = false;
|
|
1682
|
+
// AI Configurations
|
|
1683
|
+
this.availableConfigurations = [];
|
|
1684
|
+
this.isLoadingConfigurations = false;
|
|
1485
1685
|
// Result Selector Tree Data
|
|
1486
1686
|
this.resultSelectorTreeData = [];
|
|
1487
1687
|
this.isLoadingResultSelectorData = false;
|
|
@@ -1492,6 +1692,13 @@ let AIPromptFormComponentExtended = class AIPromptFormComponentExtended extends
|
|
|
1492
1692
|
this.isLoadingHistory = false;
|
|
1493
1693
|
this.historySortField = 'runAt';
|
|
1494
1694
|
this.historySortDirection = 'desc';
|
|
1695
|
+
// Removed custom transaction tracking - we'll use base form's _pendingRecords instead
|
|
1696
|
+
this.hasUnsavedChanges = false;
|
|
1697
|
+
// Store original state for cancel/revert functionality
|
|
1698
|
+
this.originalTemplateID = null;
|
|
1699
|
+
// === Permission Checks for Related Entities ===
|
|
1700
|
+
/** Cache for permission checks to avoid repeated calculations */
|
|
1701
|
+
this._permissionCache = new Map();
|
|
1495
1702
|
this._metadata = new Metadata();
|
|
1496
1703
|
this.__InferenceProvider_VendorTypeDefinitionID = '';
|
|
1497
1704
|
}
|
|
@@ -1515,11 +1722,12 @@ let AIPromptFormComponentExtended = class AIPromptFormComponentExtended extends
|
|
|
1515
1722
|
// No template ID, so we're not loading
|
|
1516
1723
|
this.isLoadingTemplate = false;
|
|
1517
1724
|
}
|
|
1518
|
-
// Load available models, vendors, prompt types, prompt models, and result selector data
|
|
1725
|
+
// Load available models, vendors, prompt types, configurations, prompt models, and result selector data
|
|
1519
1726
|
await Promise.all([
|
|
1520
1727
|
this.loadAvailableModels(),
|
|
1521
1728
|
this.loadAvailableVendors(),
|
|
1522
1729
|
this.loadAvailablePromptTypes(),
|
|
1730
|
+
this.loadAvailableConfigurations(),
|
|
1523
1731
|
this.loadPromptModels(),
|
|
1524
1732
|
this.loadResultSelectorTreeData()
|
|
1525
1733
|
]);
|
|
@@ -1548,6 +1756,19 @@ let AIPromptFormComponentExtended = class AIPromptFormComponentExtended extends
|
|
|
1548
1756
|
this.templateNotFoundInDatabase = false;
|
|
1549
1757
|
return;
|
|
1550
1758
|
}
|
|
1759
|
+
// First check if we already have this template in pending records (newly created)
|
|
1760
|
+
const pendingTemplate = this.PendingRecords.find(p => p.entityObject.EntityInfo.Name === 'Templates' &&
|
|
1761
|
+
p.entityObject.Get('ID') === this.record.TemplateID);
|
|
1762
|
+
if (pendingTemplate) {
|
|
1763
|
+
// Use the pending template
|
|
1764
|
+
this.template = pendingTemplate.entityObject;
|
|
1765
|
+
this.templateNotFoundInDatabase = false;
|
|
1766
|
+
this.isLoadingTemplate = false;
|
|
1767
|
+
// Clear template content and params since this is a new template
|
|
1768
|
+
this.templateContent = null;
|
|
1769
|
+
this.templateParams = [];
|
|
1770
|
+
return;
|
|
1771
|
+
}
|
|
1551
1772
|
this.isLoadingTemplate = true;
|
|
1552
1773
|
this.templateNotFoundInDatabase = false; // Reset the flag
|
|
1553
1774
|
try {
|
|
@@ -1587,13 +1808,50 @@ let AIPromptFormComponentExtended = class AIPromptFormComponentExtended extends
|
|
|
1587
1808
|
this.template = null;
|
|
1588
1809
|
this.templateParams = [];
|
|
1589
1810
|
}
|
|
1811
|
+
this.hasUnsavedChanges = true;
|
|
1590
1812
|
}
|
|
1591
1813
|
/**
|
|
1592
1814
|
* Opens a dialog to link an existing template
|
|
1593
1815
|
*/
|
|
1594
1816
|
async linkExistingTemplate() {
|
|
1595
|
-
|
|
1596
|
-
|
|
1817
|
+
try {
|
|
1818
|
+
this.promptManagementService.openTemplateSelectorDialog({
|
|
1819
|
+
title: 'Link Existing Template',
|
|
1820
|
+
multiSelect: false,
|
|
1821
|
+
showCreateNew: true,
|
|
1822
|
+
showActiveOnly: true,
|
|
1823
|
+
selectedTemplateIds: this.record.TemplateID ? [this.record.TemplateID] : [],
|
|
1824
|
+
viewContainerRef: this.viewContainerRef
|
|
1825
|
+
}).subscribe({
|
|
1826
|
+
next: async (result) => {
|
|
1827
|
+
if (result && result.selectedTemplates.length > 0) {
|
|
1828
|
+
const selectedTemplate = result.selectedTemplates[0];
|
|
1829
|
+
// First, clean up any pending changes related to the old template
|
|
1830
|
+
this.cleanupOldTemplateRecords();
|
|
1831
|
+
// Update the AI prompt to reference the selected template
|
|
1832
|
+
this.record.TemplateID = selectedTemplate.ID;
|
|
1833
|
+
this.hasUnsavedChanges = true;
|
|
1834
|
+
// Load the selected template
|
|
1835
|
+
await this.loadTemplate();
|
|
1836
|
+
// Trigger change detection to update UI
|
|
1837
|
+
this.cdr.detectChanges();
|
|
1838
|
+
MJNotificationService.Instance.CreateSimpleNotification(`Template "${selectedTemplate.Name}" linked successfully`, 'success', 3000);
|
|
1839
|
+
}
|
|
1840
|
+
else if (result && result.createNew) {
|
|
1841
|
+
// User wants to create a new template
|
|
1842
|
+
await this.createNewTemplate();
|
|
1843
|
+
}
|
|
1844
|
+
},
|
|
1845
|
+
error: (error) => {
|
|
1846
|
+
console.error('Error opening template selector:', error);
|
|
1847
|
+
MJNotificationService.Instance.CreateSimpleNotification('Error opening template selector. Please try again.', 'error', 3000);
|
|
1848
|
+
}
|
|
1849
|
+
});
|
|
1850
|
+
}
|
|
1851
|
+
catch (error) {
|
|
1852
|
+
console.error('Error in linkExistingTemplate:', error);
|
|
1853
|
+
MJNotificationService.Instance.CreateSimpleNotification('Error linking template. Please try again.', 'error', 3000);
|
|
1854
|
+
}
|
|
1597
1855
|
}
|
|
1598
1856
|
/**
|
|
1599
1857
|
* Opens the current template in a new window
|
|
@@ -1606,26 +1864,38 @@ let AIPromptFormComponentExtended = class AIPromptFormComponentExtended extends
|
|
|
1606
1864
|
window.open(templateUrl, '_blank');
|
|
1607
1865
|
}
|
|
1608
1866
|
/**
|
|
1609
|
-
* Creates a new template for this AI prompt
|
|
1867
|
+
* Creates a new template for this AI prompt (deferred until save)
|
|
1610
1868
|
*/
|
|
1611
1869
|
async createNewTemplate() {
|
|
1612
1870
|
try {
|
|
1871
|
+
// First, clean up any pending changes related to the old template
|
|
1872
|
+
this.cleanupOldTemplateRecords();
|
|
1613
1873
|
const newTemplate = await this._metadata.GetEntityObject('Templates');
|
|
1874
|
+
console.log("Record Name:", this.record.Name);
|
|
1614
1875
|
newTemplate.NewRecord();
|
|
1615
1876
|
newTemplate.Name = `${this.record.Name || 'AI Prompt'} Template`;
|
|
1616
1877
|
newTemplate.Description = `Template for AI Prompt: ${this.record.Name}`;
|
|
1617
1878
|
newTemplate.UserID = this._metadata.CurrentUser.ID;
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
}
|
|
1879
|
+
// Add to pending records instead of saving immediately
|
|
1880
|
+
this.PendingRecords.push({
|
|
1881
|
+
entityObject: newTemplate,
|
|
1882
|
+
action: 'save'
|
|
1883
|
+
});
|
|
1624
1884
|
// Update the AI prompt to reference the new template
|
|
1625
1885
|
this.record.TemplateID = newTemplate.ID;
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1886
|
+
this.hasUnsavedChanges = true;
|
|
1887
|
+
// Set the template for UI purposes
|
|
1888
|
+
this.template = newTemplate;
|
|
1889
|
+
// Clear existing template content and params since we have a new template
|
|
1890
|
+
this.templateContent = null;
|
|
1891
|
+
this.templateParams = [];
|
|
1892
|
+
this.isLoadingTemplate = false;
|
|
1893
|
+
this.templateNotFoundInDatabase = false;
|
|
1894
|
+
// Force UI update in next microtask to ensure template editor refreshes
|
|
1895
|
+
Promise.resolve().then(() => {
|
|
1896
|
+
this.cdr.detectChanges();
|
|
1897
|
+
});
|
|
1898
|
+
MJNotificationService.Instance.CreateSimpleNotification('New template created and will be saved when you save the AI prompt', 'info', 4000);
|
|
1629
1899
|
}
|
|
1630
1900
|
catch (error) {
|
|
1631
1901
|
console.error('Error creating new template:', error);
|
|
@@ -1633,6 +1903,21 @@ let AIPromptFormComponentExtended = class AIPromptFormComponentExtended extends
|
|
|
1633
1903
|
MJNotificationService.Instance.CreateSimpleNotification(`Error creating new template: ${errorMessage}`, 'error', 6000);
|
|
1634
1904
|
}
|
|
1635
1905
|
}
|
|
1906
|
+
/**
|
|
1907
|
+
* Cleans up any pending records related to the old template when changing templates
|
|
1908
|
+
*/
|
|
1909
|
+
cleanupOldTemplateRecords() {
|
|
1910
|
+
// Get current pending records and filter out template content/params from old template
|
|
1911
|
+
const currentPendingRecords = this.PendingRecords;
|
|
1912
|
+
// Remove template content and template param records
|
|
1913
|
+
for (let i = currentPendingRecords.length - 1; i >= 0; i--) {
|
|
1914
|
+
const record = currentPendingRecords[i];
|
|
1915
|
+
const entityName = record.entityObject.EntityInfo.Name;
|
|
1916
|
+
if (entityName === 'Template Contents' || entityName === 'Template Params') {
|
|
1917
|
+
currentPendingRecords.splice(i, 1);
|
|
1918
|
+
}
|
|
1919
|
+
}
|
|
1920
|
+
}
|
|
1636
1921
|
/**
|
|
1637
1922
|
* Loads template content for the current template
|
|
1638
1923
|
*/
|
|
@@ -1733,6 +2018,72 @@ let AIPromptFormComponentExtended = class AIPromptFormComponentExtended extends
|
|
|
1733
2018
|
onTemplateContentChange(content) {
|
|
1734
2019
|
// Handle template content changes if needed
|
|
1735
2020
|
console.log('Template content changed:', content);
|
|
2021
|
+
// Mark as having unsaved changes
|
|
2022
|
+
this.hasUnsavedChanges = true;
|
|
2023
|
+
// If we have content changes, we need to ensure they're added to pending records
|
|
2024
|
+
// This is typically handled by the template editor component itself
|
|
2025
|
+
}
|
|
2026
|
+
/**
|
|
2027
|
+
* Handles template content record deletion
|
|
2028
|
+
* This method should be called by the template editor to properly manage deletions
|
|
2029
|
+
*/
|
|
2030
|
+
handleTemplateContentDelete(templateContent) {
|
|
2031
|
+
if (templateContent.IsSaved) {
|
|
2032
|
+
// If it's saved, add to pending deletions
|
|
2033
|
+
this.PendingRecords.push({
|
|
2034
|
+
entityObject: templateContent,
|
|
2035
|
+
action: 'delete'
|
|
2036
|
+
});
|
|
2037
|
+
}
|
|
2038
|
+
else {
|
|
2039
|
+
// If it's not saved, remove it from pending records if it exists there
|
|
2040
|
+
const currentPendingRecords = this.PendingRecords;
|
|
2041
|
+
for (let i = currentPendingRecords.length - 1; i >= 0; i--) {
|
|
2042
|
+
const record = currentPendingRecords[i];
|
|
2043
|
+
if (record.entityObject === templateContent ||
|
|
2044
|
+
(record.entityObject.EntityInfo.Name === 'Template Contents' &&
|
|
2045
|
+
record.entityObject.Get('ID') === templateContent.Get('ID'))) {
|
|
2046
|
+
currentPendingRecords.splice(i, 1);
|
|
2047
|
+
break;
|
|
2048
|
+
}
|
|
2049
|
+
}
|
|
2050
|
+
}
|
|
2051
|
+
this.hasUnsavedChanges = true;
|
|
2052
|
+
}
|
|
2053
|
+
/**
|
|
2054
|
+
* Handles template content record creation/modification
|
|
2055
|
+
* This method should be called by the template editor to properly manage saves
|
|
2056
|
+
*/
|
|
2057
|
+
handleTemplateContentSave(templateContent) {
|
|
2058
|
+
if (templateContent.Dirty || !templateContent.IsSaved) {
|
|
2059
|
+
// Add to pending saves
|
|
2060
|
+
this.PendingRecords.push({
|
|
2061
|
+
entityObject: templateContent,
|
|
2062
|
+
action: 'save'
|
|
2063
|
+
});
|
|
2064
|
+
}
|
|
2065
|
+
this.hasUnsavedChanges = true;
|
|
2066
|
+
}
|
|
2067
|
+
/**
|
|
2068
|
+
* Adds template content changes to pending records
|
|
2069
|
+
*/
|
|
2070
|
+
addTemplateContentsToPendingRecords() {
|
|
2071
|
+
// This method would typically get pending changes from the template editor
|
|
2072
|
+
// The template editor should expose its pending changes through events or direct calls
|
|
2073
|
+
// For now, we'll rely on the template editor to manage its own pending records
|
|
2074
|
+
// and communicate them through the MJ event system
|
|
2075
|
+
// If the template editor has a method to get pending changes, we would call it here
|
|
2076
|
+
if (this.templateEditor && typeof this.templateEditor.getPendingChanges === 'function') {
|
|
2077
|
+
try {
|
|
2078
|
+
const pendingChanges = this.templateEditor.getPendingChanges();
|
|
2079
|
+
if (pendingChanges && pendingChanges.length > 0) {
|
|
2080
|
+
this.PendingRecords.push(...pendingChanges);
|
|
2081
|
+
}
|
|
2082
|
+
}
|
|
2083
|
+
catch (error) {
|
|
2084
|
+
console.warn('Template editor does not support getPendingChanges method:', error);
|
|
2085
|
+
}
|
|
2086
|
+
}
|
|
1736
2087
|
}
|
|
1737
2088
|
/**
|
|
1738
2089
|
* Handles template run requests from the editor
|
|
@@ -1864,6 +2215,25 @@ let AIPromptFormComponentExtended = class AIPromptFormComponentExtended extends
|
|
|
1864
2215
|
this.isLoadingPromptTypes = false;
|
|
1865
2216
|
}
|
|
1866
2217
|
}
|
|
2218
|
+
/**
|
|
2219
|
+
* Loads available AI configurations for selection
|
|
2220
|
+
*/
|
|
2221
|
+
async loadAvailableConfigurations() {
|
|
2222
|
+
this.isLoadingConfigurations = true;
|
|
2223
|
+
try {
|
|
2224
|
+
const engine = AIEngineBase.Instance;
|
|
2225
|
+
await engine.Config(false);
|
|
2226
|
+
const configurations = engine.Configurations;
|
|
2227
|
+
configurations.sort((a, b) => a.Name.localeCompare(b.Name));
|
|
2228
|
+
this.availableConfigurations = configurations;
|
|
2229
|
+
}
|
|
2230
|
+
catch (error) {
|
|
2231
|
+
console.error('Error loading available configurations:', error);
|
|
2232
|
+
}
|
|
2233
|
+
finally {
|
|
2234
|
+
this.isLoadingConfigurations = false;
|
|
2235
|
+
}
|
|
2236
|
+
}
|
|
1867
2237
|
/**
|
|
1868
2238
|
* Loads vendors available for a specific model
|
|
1869
2239
|
*/
|
|
@@ -1929,6 +2299,7 @@ let AIPromptFormComponentExtended = class AIPromptFormComponentExtended extends
|
|
|
1929
2299
|
return;
|
|
1930
2300
|
// Clear the vendor selection when model changes
|
|
1931
2301
|
promptModel.VendorID = null;
|
|
2302
|
+
this.hasUnsavedChanges = true;
|
|
1932
2303
|
// Load vendors for the new model
|
|
1933
2304
|
if (modelId) {
|
|
1934
2305
|
const vendorData = await this.loadVendorsForModel(modelId);
|
|
@@ -1937,6 +2308,20 @@ let AIPromptFormComponentExtended = class AIPromptFormComponentExtended extends
|
|
|
1937
2308
|
promptModel.VendorID = vendorData.vendors[0].ID;
|
|
1938
2309
|
}
|
|
1939
2310
|
}
|
|
2311
|
+
// Trigger change detection
|
|
2312
|
+
this.cdr.detectChanges();
|
|
2313
|
+
}
|
|
2314
|
+
/**
|
|
2315
|
+
* Handles configuration change for a prompt model
|
|
2316
|
+
*/
|
|
2317
|
+
onConfigurationChange(configurationId, promptModelIndex) {
|
|
2318
|
+
const promptModel = this.promptModels[promptModelIndex];
|
|
2319
|
+
if (!promptModel)
|
|
2320
|
+
return;
|
|
2321
|
+
promptModel.ConfigurationID = configurationId;
|
|
2322
|
+
this.hasUnsavedChanges = true;
|
|
2323
|
+
// Trigger change detection
|
|
2324
|
+
this.cdr.detectChanges();
|
|
1940
2325
|
}
|
|
1941
2326
|
/**
|
|
1942
2327
|
* Gets vendors for a specific model
|
|
@@ -1985,7 +2370,7 @@ let AIPromptFormComponentExtended = class AIPromptFormComponentExtended extends
|
|
|
1985
2370
|
}
|
|
1986
2371
|
}
|
|
1987
2372
|
/**
|
|
1988
|
-
* Adds a new model to the prompt
|
|
2373
|
+
* Adds a new model to the prompt (deferred until save)
|
|
1989
2374
|
*/
|
|
1990
2375
|
async addNewModel() {
|
|
1991
2376
|
if (!this.record?.ID)
|
|
@@ -1997,10 +2382,16 @@ let AIPromptFormComponentExtended = class AIPromptFormComponentExtended extends
|
|
|
1997
2382
|
newModel.Priority = 1;
|
|
1998
2383
|
// Generate a temporary ID for tracking if the model doesn't have one
|
|
1999
2384
|
if (!newModel.ID) {
|
|
2000
|
-
newModel._tempId = `temp_${Date.now()}_${Math.random().toString(36).
|
|
2385
|
+
newModel._tempId = `temp_${Date.now()}_${Math.random().toString(36).substring(2, 11)}`;
|
|
2001
2386
|
}
|
|
2002
2387
|
// ModelID will be set by user
|
|
2003
2388
|
this.promptModels.push(newModel);
|
|
2389
|
+
this.hasUnsavedChanges = true;
|
|
2390
|
+
// Update priorities after adding
|
|
2391
|
+
this.updateModelPriorities();
|
|
2392
|
+
// Trigger change detection
|
|
2393
|
+
this.cdr.detectChanges();
|
|
2394
|
+
MJNotificationService.Instance.CreateSimpleNotification('New model added. Select a model and save to persist changes.', 'info', 3000);
|
|
2004
2395
|
}
|
|
2005
2396
|
catch (error) {
|
|
2006
2397
|
console.error('Error creating new model:', error);
|
|
@@ -2008,23 +2399,28 @@ let AIPromptFormComponentExtended = class AIPromptFormComponentExtended extends
|
|
|
2008
2399
|
}
|
|
2009
2400
|
}
|
|
2010
2401
|
/**
|
|
2011
|
-
* Removes a model from the prompt
|
|
2402
|
+
* Removes a model from the prompt (deferred until save)
|
|
2012
2403
|
*/
|
|
2013
2404
|
async removePromptModel(index) {
|
|
2014
2405
|
if (index < 0 || index >= this.promptModels.length)
|
|
2015
2406
|
return;
|
|
2016
2407
|
const model = this.promptModels[index];
|
|
2017
2408
|
try {
|
|
2018
|
-
// If it's a saved model,
|
|
2409
|
+
// If it's a saved model, add it to pending deletions
|
|
2019
2410
|
if (model.IsSaved) {
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
}
|
|
2411
|
+
this.PendingRecords.push({
|
|
2412
|
+
entityObject: model,
|
|
2413
|
+
action: 'delete'
|
|
2414
|
+
});
|
|
2024
2415
|
}
|
|
2025
2416
|
// Remove from local array
|
|
2026
2417
|
this.promptModels.splice(index, 1);
|
|
2027
|
-
|
|
2418
|
+
this.hasUnsavedChanges = true;
|
|
2419
|
+
// Update priorities after removal
|
|
2420
|
+
this.updateModelPriorities();
|
|
2421
|
+
// Trigger change detection
|
|
2422
|
+
this.cdr.detectChanges();
|
|
2423
|
+
MJNotificationService.Instance.CreateSimpleNotification('Model will be removed when you save the prompt', 'info', 3000);
|
|
2028
2424
|
}
|
|
2029
2425
|
catch (error) {
|
|
2030
2426
|
console.error('Error removing model:', error);
|
|
@@ -2059,74 +2455,147 @@ let AIPromptFormComponentExtended = class AIPromptFormComponentExtended extends
|
|
|
2059
2455
|
return type ? type.Name : typeId;
|
|
2060
2456
|
}
|
|
2061
2457
|
/**
|
|
2062
|
-
*
|
|
2458
|
+
* Gets the display name for a configuration ID
|
|
2063
2459
|
*/
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2460
|
+
getConfigurationDisplayName(configurationId) {
|
|
2461
|
+
if (!configurationId)
|
|
2462
|
+
return 'Default';
|
|
2463
|
+
const config = this.availableConfigurations.find(c => c.ID === configurationId);
|
|
2464
|
+
return config ? config.Name : configurationId;
|
|
2465
|
+
}
|
|
2466
|
+
/**
|
|
2467
|
+
* Override PopulatePendingRecords to add AI prompt model changes
|
|
2468
|
+
*/
|
|
2469
|
+
PopulatePendingRecords() {
|
|
2470
|
+
// IMPORTANT: The parent method clears the pending records array, so we need to preserve
|
|
2471
|
+
// any records we've added (like templates) before calling the parent method
|
|
2472
|
+
const currentPendingRecords = [...this.PendingRecords]; // Make a copy
|
|
2473
|
+
// Call parent first to get child component pending records (this clears the array)
|
|
2474
|
+
super.PopulatePendingRecords();
|
|
2475
|
+
// Re-add our preserved records
|
|
2476
|
+
for (const record of currentPendingRecords) {
|
|
2477
|
+
this.PendingRecords.push(record);
|
|
2478
|
+
}
|
|
2479
|
+
// Add prompt model changes to pending records
|
|
2480
|
+
this.addPromptModelsToPendingRecords();
|
|
2481
|
+
// Handle template content changes through the template editor
|
|
2482
|
+
this.addTemplateContentsToPendingRecords();
|
|
2483
|
+
}
|
|
2484
|
+
/**
|
|
2485
|
+
* Override StartEditMode to capture original state for cancel functionality
|
|
2486
|
+
*/
|
|
2487
|
+
StartEditMode() {
|
|
2488
|
+
// Store original template ID for cancel functionality
|
|
2489
|
+
this.originalTemplateID = this.record.TemplateID;
|
|
2490
|
+
// Call parent implementation
|
|
2491
|
+
super.StartEditMode();
|
|
2492
|
+
}
|
|
2493
|
+
/**
|
|
2494
|
+
* Override CancelEdit to restore original state
|
|
2495
|
+
*/
|
|
2496
|
+
CancelEdit() {
|
|
2497
|
+
// Call parent implementation first
|
|
2498
|
+
super.CancelEdit();
|
|
2499
|
+
// Restore original template state
|
|
2500
|
+
if (this.originalTemplateID !== this.record.TemplateID) {
|
|
2501
|
+
this.record.TemplateID = this.originalTemplateID || '';
|
|
2502
|
+
// Reload the template to reflect the reverted state
|
|
2503
|
+
this.loadTemplate().then(() => {
|
|
2504
|
+
this.cdr.detectChanges();
|
|
2505
|
+
});
|
|
2506
|
+
}
|
|
2507
|
+
else if (this.templateEditor) {
|
|
2508
|
+
// Even if template didn't change, refresh the template editor to discard any unsaved content changes
|
|
2509
|
+
this.templateEditor.refreshAndDiscardChanges();
|
|
2510
|
+
}
|
|
2511
|
+
// Clear the stored original state
|
|
2512
|
+
this.originalTemplateID = null;
|
|
2513
|
+
this.hasUnsavedChanges = false;
|
|
2514
|
+
}
|
|
2515
|
+
/**
|
|
2516
|
+
* Adds prompt model changes to the pending records
|
|
2517
|
+
*/
|
|
2518
|
+
addPromptModelsToPendingRecords() {
|
|
2519
|
+
// Add all prompt models that have been modified or are new
|
|
2520
|
+
for (const model of this.promptModels) {
|
|
2521
|
+
if (model.ModelID && (model.Dirty || !model.IsSaved)) {
|
|
2522
|
+
// Set the PromptID if it's not already set
|
|
2523
|
+
if (!model.PromptID) {
|
|
2524
|
+
model.PromptID = this.record.ID;
|
|
2085
2525
|
}
|
|
2086
|
-
|
|
2087
|
-
|
|
2526
|
+
this.PendingRecords.push({
|
|
2527
|
+
entityObject: model,
|
|
2528
|
+
action: 'save'
|
|
2529
|
+
});
|
|
2088
2530
|
}
|
|
2089
|
-
return false;
|
|
2090
|
-
}
|
|
2091
|
-
catch (error) {
|
|
2092
|
-
console.error('Error in SaveRecord:', error);
|
|
2093
|
-
MJNotificationService.Instance.CreateSimpleNotification('Error saving AI prompt', 'error', 5000);
|
|
2094
|
-
return false;
|
|
2095
2531
|
}
|
|
2096
2532
|
}
|
|
2097
2533
|
/**
|
|
2098
|
-
*
|
|
2534
|
+
* Override InternalSaveRecord to handle template dependencies and related entity changes
|
|
2535
|
+
* Templates must be saved before AI Prompts to avoid foreign key constraint errors
|
|
2099
2536
|
*/
|
|
2100
|
-
async
|
|
2537
|
+
async InternalSaveRecord() {
|
|
2538
|
+
if (!this.record) {
|
|
2539
|
+
return false;
|
|
2540
|
+
}
|
|
2101
2541
|
try {
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
allSuccessful = false;
|
|
2542
|
+
const md = new Metadata();
|
|
2543
|
+
const transactionGroup = await md.CreateTransactionGroup();
|
|
2544
|
+
// First, save any templates that need to be saved (they must be saved before AI Prompts)
|
|
2545
|
+
const templateRecords = this.PendingRecords.filter(p => p.entityObject.EntityInfo.Name === 'Templates');
|
|
2546
|
+
for (const templateRecord of templateRecords) {
|
|
2547
|
+
templateRecord.entityObject.TransactionGroup = transactionGroup;
|
|
2548
|
+
if (templateRecord.action === 'save') {
|
|
2549
|
+
const saveResult = await templateRecord.entityObject.Save();
|
|
2550
|
+
if (!saveResult) {
|
|
2551
|
+
MJNotificationService.Instance.CreateSimpleNotification('Failed to save template. Please check the template data.', 'error', 4000);
|
|
2552
|
+
return false;
|
|
2114
2553
|
}
|
|
2115
2554
|
}
|
|
2555
|
+
else {
|
|
2556
|
+
await templateRecord.entityObject.Delete();
|
|
2557
|
+
}
|
|
2558
|
+
}
|
|
2559
|
+
// Now save the main AI Prompt record
|
|
2560
|
+
this.record.TransactionGroup = transactionGroup;
|
|
2561
|
+
const agentSaveResult = await this.record.Save();
|
|
2562
|
+
if (!agentSaveResult) {
|
|
2563
|
+
MJNotificationService.Instance.CreateSimpleNotification('Failed to save AI prompt details. Please check the form data.', 'error', 4000);
|
|
2564
|
+
return false;
|
|
2116
2565
|
}
|
|
2117
|
-
|
|
2118
|
-
|
|
2566
|
+
// Then save all other pending records (excluding templates which we already saved)
|
|
2567
|
+
const otherRecords = this.PendingRecords.filter(p => p.entityObject.EntityInfo.Name !== 'Templates');
|
|
2568
|
+
for (const record of otherRecords) {
|
|
2569
|
+
record.entityObject.TransactionGroup = transactionGroup;
|
|
2570
|
+
if (record.action === 'save') {
|
|
2571
|
+
await record.entityObject.Save();
|
|
2572
|
+
}
|
|
2573
|
+
else {
|
|
2574
|
+
await record.entityObject.Delete();
|
|
2575
|
+
}
|
|
2576
|
+
}
|
|
2577
|
+
// Execute all operations atomically
|
|
2578
|
+
const success = await transactionGroup.Submit();
|
|
2579
|
+
if (success) {
|
|
2580
|
+
// Clear our local state since save was successful
|
|
2581
|
+
this.hasUnsavedChanges = false;
|
|
2582
|
+
// Reload prompt models to reflect database state
|
|
2119
2583
|
await this.loadPromptModels();
|
|
2120
|
-
|
|
2584
|
+
// Reload template to reflect any changes
|
|
2585
|
+
if (this.record.TemplateID) {
|
|
2586
|
+
await this.loadTemplate();
|
|
2587
|
+
}
|
|
2588
|
+
MJNotificationService.Instance.CreateSimpleNotification('AI Prompt saved successfully', 'success', 3000);
|
|
2589
|
+
return true;
|
|
2121
2590
|
}
|
|
2122
2591
|
else {
|
|
2123
|
-
MJNotificationService.Instance.CreateSimpleNotification('
|
|
2592
|
+
MJNotificationService.Instance.CreateSimpleNotification('Save failed. Please try again.', 'error', 4000);
|
|
2593
|
+
return false;
|
|
2124
2594
|
}
|
|
2125
|
-
return allSuccessful;
|
|
2126
2595
|
}
|
|
2127
2596
|
catch (error) {
|
|
2128
|
-
console.error('Error
|
|
2129
|
-
MJNotificationService.Instance.CreateSimpleNotification(
|
|
2597
|
+
console.error('Error in AI prompt save:', error);
|
|
2598
|
+
MJNotificationService.Instance.CreateSimpleNotification(`Save failed: ${error instanceof Error ? error.message : 'Unknown error'}. Please try again.`, 'error', 5000);
|
|
2130
2599
|
return false;
|
|
2131
2600
|
}
|
|
2132
2601
|
}
|
|
@@ -2273,6 +2742,7 @@ let AIPromptFormComponentExtended = class AIPromptFormComponentExtended extends
|
|
|
2273
2742
|
[newModels[index], newModels[index - 1]];
|
|
2274
2743
|
// Replace the array and force full re-render
|
|
2275
2744
|
this.promptModels = [...newModels];
|
|
2745
|
+
this.hasUnsavedChanges = true;
|
|
2276
2746
|
this.updateModelPriorities();
|
|
2277
2747
|
// Force Angular to re-evaluate all bindings
|
|
2278
2748
|
this.cdr.detectChanges();
|
|
@@ -2294,6 +2764,7 @@ let AIPromptFormComponentExtended = class AIPromptFormComponentExtended extends
|
|
|
2294
2764
|
[newModels[index + 1], newModels[index]];
|
|
2295
2765
|
// Replace the array and force full re-render
|
|
2296
2766
|
this.promptModels = [...newModels];
|
|
2767
|
+
this.hasUnsavedChanges = true;
|
|
2297
2768
|
this.updateModelPriorities();
|
|
2298
2769
|
// Force Angular to re-evaluate all bindings
|
|
2299
2770
|
this.cdr.detectChanges();
|
|
@@ -2348,6 +2819,7 @@ let AIPromptFormComponentExtended = class AIPromptFormComponentExtended extends
|
|
|
2348
2819
|
newModels.splice(dropIndex, 0, draggedItem);
|
|
2349
2820
|
// Replace the array and force full re-render
|
|
2350
2821
|
this.promptModels = [...newModels];
|
|
2822
|
+
this.hasUnsavedChanges = true;
|
|
2351
2823
|
// Update priorities
|
|
2352
2824
|
this.updateModelPriorities();
|
|
2353
2825
|
// Force Angular to re-evaluate all bindings
|
|
@@ -2362,7 +2834,7 @@ let AIPromptFormComponentExtended = class AIPromptFormComponentExtended extends
|
|
|
2362
2834
|
/**
|
|
2363
2835
|
* Handles drag end event
|
|
2364
2836
|
*/
|
|
2365
|
-
onDragEnd(
|
|
2837
|
+
onDragEnd(_event) {
|
|
2366
2838
|
this.draggedIndex = -1;
|
|
2367
2839
|
}
|
|
2368
2840
|
/**
|
|
@@ -2550,13 +3022,13 @@ let AIPromptFormComponentExtended = class AIPromptFormComponentExtended extends
|
|
|
2550
3022
|
return 'Unknown type';
|
|
2551
3023
|
}
|
|
2552
3024
|
}
|
|
2553
|
-
static { this.ɵfac = function AIPromptFormComponentExtended_Factory(t) { return new (t || AIPromptFormComponentExtended)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1.SharedService), i0.ɵɵdirectiveInject(i2.Router), i0.ɵɵdirectiveInject(i2.ActivatedRoute), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i3.AITestHarnessDialogService), i0.ɵɵdirectiveInject(i0.ViewContainerRef)); }; }
|
|
3025
|
+
static { this.ɵfac = function AIPromptFormComponentExtended_Factory(t) { return new (t || AIPromptFormComponentExtended)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1.SharedService), i0.ɵɵdirectiveInject(i2.Router), i0.ɵɵdirectiveInject(i2.ActivatedRoute), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i3.AITestHarnessDialogService), i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(i4.AIPromptManagementService)); }; }
|
|
2554
3026
|
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AIPromptFormComponentExtended, selectors: [["mj-ai-prompt-form"]], viewQuery: function AIPromptFormComponentExtended_Query(rf, ctx) { if (rf & 1) {
|
|
2555
3027
|
i0.ɵɵviewQuery(_c0, 5);
|
|
2556
3028
|
} if (rf & 2) {
|
|
2557
3029
|
let _t;
|
|
2558
3030
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.templateEditor = _t.first);
|
|
2559
|
-
} }, features: [i0.ɵɵInheritDefinitionFeature], decls: 4, vars: 2, consts: [["form", "ngForm"], ["templateEditor", ""], [1, "record-form-container"], ["kendoDialogContainer", ""], ["class", "record-form", 4, "ngIf"], [3, "width", "height", "minWidth", "minHeight", "draggable", "resizable", "state", "title"], [1, "record-form"], [3, "form"], [1, "prompt-main-area", 2, "display", "flex", "flex-direction", "column", "height", "100%", "overflow-y", "auto"], [1, "prompt-header", 2, "flex-shrink", "0", "padding", "20px", "background", "#f8f9fa", "border-bottom", "2px solid #e9ecef"], [2, "display", "flex", "justify-content", "space-between", "align-items", "flex-start", "gap", "20px"], [2, "flex", "1", "min-width", "0"], [2, "display", "flex", "align-items", "center", "gap", "12px", "margin-bottom", "8px"], [1, "fa-solid", "fa-robot", 2, "color", "#6f42c1", "font-size", "1.4em"], ["name", "promptName", "placeholder", "Enter prompt name...", 2, "font-size", "1.2em", "font-weight", "600", "min-width", "300px", "flex", "1", 3, "ngModel"], [2, "display", "flex", "gap", "16px", "margin-bottom", "12px", "flex-wrap", "wrap"], ["name", "promptDescription", "placeholder", "Enter prompt description...", 2, "width", "100%", "max-width", "600px", "margin-bottom", "12px", 3, "ngModel", "rows"], [2, "margin", "0 0 12px 0", "color", "#6c757d", "font-size", "0.9em", "line-height", "1.4"], [1, "quick-config", 2, "display", "flex", "align-items", "center", "gap", "16px", "flex-wrap", "wrap"], [1, "config-item", 2, "display", "flex", "align-items", "center", "gap", "6px", "font-size", "0.85em"], [1, "fa-solid", "fa-layer-group", 2, "color", "#6c757d"], [2, "color", "#6c757d"], [2, "color", "#495057", "font-weight", "500"], [1, "fa-solid", "fa-code", 2, "color", "#6c757d"], [2, "font-weight", "500"], [1, "action-buttons", 2, "display", "flex", "flex-direction", "column", "gap", "8px", "align-items", "flex-end"], [2, "display", "flex", "gap", "8px"], ["kendoButton", "", "title", "Run AI Prompt Test Harness", 3, "themeColor", "size"], [2, "font-size", "0.75em", "color", "#dc3545", "text-align", "right", "max-width", "200px"], [1, "configuration-sections", 2, "flex", "1", "background", "white", "border-top", "2px solid #e9ecef", "padding", "16px", "min-height", "0"], [2, "margin-bottom", "12px", 3, "expanded"], ["kendoExpansionPanelTitleDirective", ""], [1, "template-section", 2, "display", "flex", "flex-direction", "column", "min-height", "400px", "padding", "8px"], [1, "loading-state", 2, "flex", "1", "display", "flex", "align-items", "center", "justify-content", "center", "color", "#6c757d"], [1, "no-template-state", 2, "flex", "1", "display", "flex", "flex-direction", "column", "align-items", "center", "justify-content", "center", "padding", "40px", "color", "#6c757d"], [1, "invalid-template-state", 2, "flex", "1", "display", "flex", "flex-direction", "column", "align-items", "center", "justify-content", "center", "padding", "40px", "color", "#dc3545"], [1, "template-editor-container", 2, "flex", "1", "display", "flex", "flex-direction", "column", "min-height", "350px"], [2, "padding", "16px 0"], [2, "display", "grid", "grid-template-columns", "1fr 1fr", "gap", "20px"], ["FieldName", "ParallelizationMode", "Type", "dropdownlist", 3, "record", "ShowLabel", "EditMode"], ["FieldName", "ParallelCount", "Type", "numerictextbox", 3, "record", "ShowLabel", "EditMode"], ["FieldName", "ParallelConfigParam", "Type", "textbox", 3, "record", "ShowLabel", "EditMode"], ["FieldName", "OutputType", "Type", "dropdownlist", 3, "record", "ShowLabel", "EditMode"], ["FieldName", "ValidationBehavior", "Type", "dropdownlist", 3, "record", "ShowLabel", "EditMode"], ["FieldName", "EnableCaching", "Type", "checkbox", 3, "record", "ShowLabel", "EditMode"], [2, "margin-bottom", "16px"], [2, "display", "block", "margin-bottom", "4px", "font-weight", "600", "color", "#495057", "font-size", "0.9em"], [2, "color", "#495057"], ["name", "promptName", "placeholder", "Enter prompt name...", 2, "font-size", "1.2em", "font-weight", "600", "min-width", "300px", "flex", "1", 3, "ngModelChange", "ngModel"], [2, "margin", "0", "color", "#495057", "font-weight", "600", "flex", "1"], [1, "status-badge", 2, "color", "white", "padding", "4px 10px", "border-radius", "12px", "font-size", "0.75em", "font-weight", "500"], ["name", "promptStatus", "textField", "text", "valueField", "value", 2, "width", "150px", 3, "ngModelChange", "ngModel", "data", "valuePrimitive"], [2, "color", "#dc3545"], [2, "padding", "8px", "color", "#6c757d", "font-style", "italic", "width", "200px"], ["name", "promptTypeID", "textField", "Name", "valueField", "ID", "placeholder", "Select prompt type...", 2, "width", "200px", 3, "ngModel", "data", "valuePrimitive", "filterable"], [1, "fa-solid", "fa-spinner", "fa-spin"], ["name", "promptTypeID", "textField", "Name", "valueField", "ID", "placeholder", "Select prompt type...", 2, "width", "200px", 3, "ngModelChange", "ngModel", "data", "valuePrimitive", "filterable"], ["name", "promptDescription", "placeholder", "Enter prompt description...", 2, "width", "100%", "max-width", "600px", "margin-bottom", "12px", 3, "ngModelChange", "ngModel", "rows"], [1, "fa-solid", "fa-tag", 2, "color", "#6c757d"], [1, "fa-solid", "fa-database", 2, "color", "#28a745"], [2, "color", "#28a745", "font-weight", "500"], ["kendoButton", "", "title", "Run AI Prompt Test Harness", 3, "click", "themeColor", "size"], [1, "fa-solid", "fa-play"], [2, "display", "flex", "align-items", "center", "gap", "8px", "font-weight", "600"], [2, "color", "#6c757d", "font-size", "0.9em", "font-weight", "normal"], [1, "fa-solid", "fa-spinner", "fa-spin", 2, "font-size", "24px", "margin-right", "12px"], [1, "fa-solid", "fa-code", 2, "font-size", "64px", "margin-bottom", "20px", "opacity", "0.3"], [2, "margin-bottom", "12px", "color", "#495057"], [2, "margin-bottom", "24px", "text-align", "center", "max-width", "400px"], [2, "display", "flex", "gap", "12px"], ["kendoButton", "", 3, "click", "themeColor"], [1, "fa-solid", "fa-plus"], ["kendoButton", "", 3, "click", "fillMode"], [1, "fa-solid", "fa-link"], [1, "fa-solid", "fa-exclamation-triangle", 2, "font-size", "64px", "margin-bottom", "20px", "opacity", "0.7"], [2, "margin-bottom", "12px"], [1, "fa-solid", "fa-refresh"], [2, "flex", "1", "background", "white", "border-radius", "6px", "border", "1px solid #e9ecef"], [2, "display", "block", "min-height", "300px", 3, "contentChange", "runTemplate", "template", "config"], [1, "loading-state", 2, "padding", "20px", "text-align", "center", "color", "#6c757d"], [1, "empty-state", 2, "padding", "20px", "text-align", "center", "color", "#6c757d"], [1, "fa-solid", "fa-sliders", 2, "color", "#6c757d"], [1, "badge", 2, "background", "#6f42c1", "color", "white", "padding", "2px 6px", "border-radius", "10px", "font-size", "0.7em"], [2, "color", "#6c757d", "font-size", "0.8em", "font-weight", "normal", "margin-left", "8px"], ["title", "These parameters are defined in the template and will be available when executing this prompt", 1, "fa-solid", "fa-info-circle"], [1, "fa-solid", "fa-info-circle"], [2, "display", "grid", "gap", "12px"], [1, "parameter-card", 2, "border", "1px solid #e9ecef", "border-radius", "8px", "padding", "16px", "background", "#f8f9fa", "transition", "all 0.2s", 3, "border-left"], [2, "margin-top", "16px", "padding", "12px", "background", "#e3f2fd", "border-radius", "6px", "border", "1px solid #bbdefb"], [2, "display", "flex", "align-items", "flex-start", "gap", "8px"], [1, "fa-solid", "fa-lightbulb", 2, "color", "#1976d2", "margin-top", "2px"], [2, "flex", "1", "font-size", "0.85em", "color", "#1565c0", "line-height", "1.5"], [1, "parameter-card", 2, "border", "1px solid #e9ecef", "border-radius", "8px", "padding", "16px", "background", "#f8f9fa", "transition", "all 0.2s"], [2, "display", "flex", "justify-content", "space-between", "align-items", "flex-start", "margin-bottom", "8px"], [2, "display", "flex", "align-items", "center", "gap", "8px"], [2, "font-size", "1.2em"], [2, "margin", "0", "color", "#495057", "font-weight", "600"], [2, "color", "#dc3545", "font-size", "0.9em", "margin-left", "4px"], [1, "type-badge", 2, "color", "white", "padding", "4px 8px", "border-radius", "12px", "font-size", "0.75em", "font-weight", "500"], [2, "color", "#dc3545", "font-size", "0.85em", "font-weight", "500"], [2, "color", "#6c757d", "font-size", "0.85em"], [2, "margin", "0 0 8px 0", "color", "#6c757d", "font-size", "0.9em", "line-height", "1.4"], [2, "font-size", "0.85em", "color", "#495057"], [2, "display", "flex", "align-items", "center", "gap", "4px", "margin-bottom", "4px"], [1, "fa-solid", "fa-info-circle", 2, "color", "#6c757d"], [2, "display", "grid", "grid-template-columns", "repeat(auto-fit, minmax(200px, 1fr))", "gap", "12px", "margin-top", "12px"], [2, "background", "white", "padding", "8px 12px", "border-radius", "4px", "border", "1px solid #dee2e6"], [2, "display", "block", "font-size", "0.8em", "color", "#6c757d", "margin-bottom", "2px"], [2, "font-size", "0.85em", "color", "#495057", "word-break", "break-all"], [2, "font-size", "0.8em", "color", "#495057", "word-break", "break-all"], [1, "model-management", 2, "border", "1px solid #dee2e6", "border-radius", "6px", "background", "#f8f9fa"], [1, "fa-solid", "fa-microchip", 2, "color", "#6c757d"], [1, "badge", 2, "background", "#17a2b8", "color", "white", "padding", "2px 6px", "border-radius", "10px", "font-size", "0.7em"], ["title", "Models are tried in order from top to bottom. The first available model will be used.", 1, "fa-solid", "fa-info-circle"], [2, "margin-top", "10px"], ["kendoButton", "", "fillMode", "outline", "themeColor", "primary", "size", "small", 3, "click"], [2, "padding", "12px 16px", "background", "#e3f2fd", "border-bottom", "1px solid #bbdefb", "color", "#1565c0", "font-size", "0.85em"], [1, "model-header", 2, "display", "grid", "grid-template-columns", "40px 2fr 1fr 1fr 60px", "gap", "12px", "padding", "12px 16px", "background", "#e9ecef", "font-weight", "600", "font-size", "0.85em", "color", "#495057", "border-bottom", "1px solid #dee2e6"], ["title", "Priority order - models are tried from top to bottom"], [1, "fa-solid", "fa-sort", 2, "color", "#6c757d"], [1, "add-model-row", 2, "padding", "12px 16px", "text-align", "center", "background", "#f8f9fa", "border-top", "1px solid #dee2e6"], [1, "fa-solid", "fa-info-circle", 2, "margin-right", "6px"], [1, "model-row", 2, "display", "grid", "grid-template-columns", "40px 2fr 1fr 1fr 60px", "gap", "12px", "padding", "12px 16px", "border-bottom", "1px solid #e9ecef", "align-items", "start", "transition", "background 0.2s, opacity 0.2s", 3, "dragstart", "dragover", "drop", "dragend", "draggable"], [1, "drag-handle", 2, "display", "flex", "flex-direction", "column", "align-items", "center", "justify-content", "center", "color", "#6c757d"], [2, "font-size", "0.9em", "font-weight", "600", 3, "title"], [1, "model-select"], ["textField", "Name", "valueField", "ID", "placeholder", "Select a model...", 2, "width", "100%", 3, "ngModel", "name", "data", "valuePrimitive", "filterable"], [1, "model-vendor"], [1, "model-created"], [2, "color", "#6c757d", "font-size", "0.8em"], [2, "color", "#28a745", "font-size", "0.8em", "font-style", "italic"], [1, "model-actions", 2, "display", "flex", "gap", "2px", "flex-direction", "column"], [2, "display", "grid", "grid-template-columns", "40px 1fr", "gap", "12px", "padding", "8px 16px", "border-bottom", "1px solid #e9ecef", "background", "#f8f9fa", "font-size", "0.85em", "color", "#6c757d"], [2, "display", "flex", "gap", "16px", "flex-wrap", "wrap", "align-items", "center", "margin-bottom", "8px"], [2, "padding", "8px", "background", "#fff", "border", "1px solid #dee2e6", "border-radius", "4px", "margin-top", "8px"], ["title", "Drag to reorder priority", 1, "fa-solid", "fa-grip-vertical", 2, "cursor", "move"], [2, "font-size", "0.7em", "margin-top", "2px"], ["textField", "Name", "valueField", "ID", "placeholder", "Select a model...", 2, "width", "100%", 3, "ngModelChange", "valueChange", "ngModel", "name", "data", "valuePrimitive", "filterable"], [2, "color", "#6c757d", "font-style", "italic", "font-size", "0.9em"], ["textField", "Name", "valueField", "ID", "placeholder", "Select vendor...", 2, "width", "100%", 3, "ngModel", "name", "data", "valuePrimitive", "filterable"], ["textField", "Name", "valueField", "ID", "placeholder", "Select vendor...", 2, "width", "100%", 3, "ngModelChange", "ngModel", "name", "data", "valuePrimitive", "filterable"], ["kendoDropDownListItemTemplate", ""], [2, "font-size", "0.8em", "margin-left", "4px"], [2, "font-size", "0.9em", "font-weight", "500", 3, "color"], [2, "font-size", "0.9em", "font-weight", "500"], [2, "font-size", "0.9em", 3, "color"], [2, "color", "#6c757d", "font-size", "0.9em"], [2, "font-size", "0.9em"], [2, "display", "flex", "gap", "2px", "margin-bottom", "4px"], ["kendoButton", "", "fillMode", "flat", "size", "small", "title", "Move up", 3, "click", "disabled"], [1, "fa-solid", "fa-chevron-up"], ["kendoButton", "", "fillMode", "flat", "size", "small", "title", "Move down", 3, "click", "disabled"], [1, "fa-solid", "fa-chevron-down"], ["kendoButton", "", "fillMode", "flat", "themeColor", "error", "size", "small", "title", "Remove model", 3, "click"], [1, "fa-solid", "fa-times"], [2, "margin-bottom", "6px", "font-weight", "600", "color", "#495057", "font-size", "0.9em"], [1, "fa-solid", "fa-layer-group"], [2, "display", "grid", "grid-template-columns", "1fr 1fr 1fr", "gap", "12px", "align-items", "center"], [2, "display", "flex", "gap", "16px", "flex-wrap", "wrap", "align-items", "center"], [2, "display", "block", "margin-bottom", "2px", "font-size", "0.8em", "font-weight", "600", "color", "#495057"], ["textField", "text", "valueField", "value", "placeholder", "Select mode...", 2, "width", "100%", "font-size", "0.85em", 3, "ngModelChange", "ngModel", "name", "data", "valuePrimitive"], ["placeholder", "Count...", 2, "width", "100%", "font-size", "0.85em", 3, "ngModelChange", "ngModel", "name", "min", "step", "format"], ["placeholder", "Parameter name...", 2, "width", "100%", "font-size", "0.85em", 3, "ngModelChange", "ngModel", "name"], ["kendoButton", "", "fillMode", "outline", "themeColor", "success", "size", "small", 3, "click"], [1, "fa-solid", "fa-cogs", 2, "color", "#6c757d"], [2, "padding", "8px", "color", "#6c757d", "font-style", "italic"], ["name", "resultSelectorPromptID", "textField", "text", "valueField", "value", "placeholder", "Select a result selector prompt...", 2, "width", "100%", 3, "ngModel", "data", "valuePrimitive", "filterable"], ["name", "resultSelectorPromptID", "textField", "text", "valueField", "value", "placeholder", "Select a result selector prompt...", 2, "width", "100%", 3, "ngModelChange", "valueChange", "ngModel", "data", "valuePrimitive", "filterable"], [2, "padding", "16px"], [2, "background", "#f8f9fa", "border", "1px solid #dee2e6", "border-radius", "4px", "padding", "12px", "font-family", "'Courier New', monospace", "font-size", "0.9em", "white-space", "pre-wrap", "overflow", "auto", "max-height", "250px"], [2, "background", "#fff3cd", "border", "1px solid #ffeaa7", "border-radius", "4px", "padding", "12px", "color", "#856404", "text-align", "center"], [2, "color", "#dc3545", "font-size", "0.8em", "font-weight", "normal"], ["name", "outputExample", "language", "json", "placeholder", "Enter JSON example structure...", 2, "width", "100%", "height", "200px", "border", "1px solid #dee2e6", "border-radius", "4px", 3, "ngModelChange", "ngModel"], [2, "margin-top", "8px", "color", "#6c757d", "font-size", "0.85em"], [1, "fa-solid", "fa-exclamation-triangle"], [2, "text-align", "center", "padding", "40px", "color", "#6c757d"], [1, "fa-solid", "fa-history", 2, "color", "#6c757d"], [2, "color", "#6c757d", "font-weight", "normal"], [1, "fa-solid", "fa-spinner", "fa-spin", 2, "font-size", "2em", "margin-bottom", "12px"], [1, "fa-solid", "fa-history", 2, "font-size", "3em", "margin-bottom", "12px", "opacity", "0.3"], [2, "display", "flex", "justify-content", "space-between", "align-items", "center", "margin-bottom", "16px"], [2, "display", "flex", "gap", "8px", "align-items", "center"], ["selection", "single"], ["kendoButton", "", "size", "small", 3, "click", "selected"], [2, "margin-left", "4px", "font-size", "0.8em", 3, "class"], [2, "border", "1px solid #e9ecef", "border-radius", "8px", "overflow", "hidden"], [2, "width", "100%", "border-collapse", "collapse"], [2, "background", "#f8f9fa", "border-bottom", "2px solid #e9ecef"], [2, "padding", "12px", "text-align", "left", "font-weight", "600", "color", "#495057"], [2, "padding", "12px", "text-align", "right", "font-weight", "600", "color", "#495057"], [2, "padding", "12px", "text-align", "center", "font-weight", "600", "color", "#495057"], [1, "history-row", 2, "border-bottom", "1px solid #f1f3f5", 3, "even-row"], [2, "margin-left", "4px", "font-size", "0.8em"], [1, "history-row", 2, "border-bottom", "1px solid #f1f3f5"], [2, "padding", "12px"], [2, "display", "flex", "align-items", "center", "gap", "6px"], [2, "padding", "12px", "color", "#495057"], [2, "padding", "12px", "text-align", "right", "color", "#495057"], [2, "padding", "12px", "text-align", "center"], [2, "padding", "4px 8px", "border-radius", "12px", "background", "#e9ecef", "color", "#495057", "font-size", "0.85em", "font-weight", "500"], ["kendoButton", "", "fillMode", "flat", "size", "small", "title", "View details", 3, "click"], [1, "fa-solid", "fa-external-link"], [2, "height", "300px", 3, "Params", "NewRecordValues", "AllowLoad", "EditMode"], [1, "fa-solid", "fa-database", 2, "color", "#6c757d"], [2, "margin", "0 0 12px 0", "color", "#495057"], [2, "height", "200px", 3, "Params", "NewRecordValues", "AllowLoad", "EditMode"], [1, "fa-solid", "fa-link", 2, "color", "#6c757d"], [3, "close", "width", "height", "minWidth", "minHeight", "draggable", "resizable", "state", "title"], [3, "visibilityChange", "entity", "mode", "isVisible"]], template: function AIPromptFormComponentExtended_Template(rf, ctx) { if (rf & 1) {
|
|
3031
|
+
} }, features: [i0.ɵɵInheritDefinitionFeature], decls: 4, vars: 2, consts: [["form", "ngForm"], ["templateEditor", ""], [1, "record-form-container"], ["kendoDialogContainer", ""], ["class", "record-form", 4, "ngIf"], [3, "width", "height", "minWidth", "minHeight", "draggable", "resizable", "state", "title"], [1, "record-form"], [3, "form"], [1, "prompt-main-area", 2, "display", "flex", "flex-direction", "column", "height", "100%", "overflow-y", "auto"], [1, "prompt-header", 2, "flex-shrink", "0", "padding", "20px", "background", "#f8f9fa", "border-bottom", "2px solid #e9ecef"], [2, "display", "flex", "justify-content", "space-between", "align-items", "flex-start", "gap", "20px"], [2, "flex", "1", "min-width", "0"], [2, "display", "flex", "align-items", "center", "gap", "12px", "margin-bottom", "8px"], [1, "fa-solid", "fa-robot", 2, "color", "#6f42c1", "font-size", "1.4em"], ["name", "promptName", "placeholder", "Enter prompt name...", 2, "font-size", "1.2em", "font-weight", "600", "min-width", "300px", "flex", "1", 3, "ngModel"], [2, "display", "flex", "gap", "16px", "margin-bottom", "12px", "flex-wrap", "wrap"], ["name", "promptDescription", "placeholder", "Enter prompt description...", 2, "width", "100%", "max-width", "600px", "margin-bottom", "12px", 3, "ngModel", "rows"], [2, "margin", "0 0 12px 0", "color", "#6c757d", "font-size", "0.9em", "line-height", "1.4"], [1, "quick-config", 2, "display", "flex", "align-items", "center", "gap", "16px", "flex-wrap", "wrap"], [1, "config-item", 2, "display", "flex", "align-items", "center", "gap", "6px", "font-size", "0.85em"], [1, "fa-solid", "fa-layer-group", 2, "color", "#6c757d"], [2, "color", "#6c757d"], [2, "color", "#495057", "font-weight", "500"], [1, "fa-solid", "fa-code", 2, "color", "#6c757d"], [2, "font-weight", "500"], [1, "action-buttons", 2, "display", "flex", "flex-direction", "column", "gap", "8px", "align-items", "flex-end"], [2, "display", "flex", "gap", "8px"], ["kendoButton", "", "title", "Run AI Prompt Test Harness", 3, "themeColor", "size"], [2, "font-size", "0.75em", "color", "#dc3545", "text-align", "right", "max-width", "200px"], [1, "configuration-sections", 2, "flex", "1", "background", "white", "border-top", "2px solid #e9ecef", "padding", "16px", "min-height", "0"], [2, "margin-bottom", "12px", 3, "expanded"], ["kendoExpansionPanelTitleDirective", ""], [1, "template-section", 2, "display", "flex", "flex-direction", "column", "min-height", "400px", "padding", "8px"], [1, "loading-state", 2, "flex", "1", "display", "flex", "align-items", "center", "justify-content", "center", "color", "#6c757d"], [1, "no-template-state", 2, "flex", "1", "display", "flex", "flex-direction", "column", "align-items", "center", "justify-content", "center", "padding", "40px", "color", "#6c757d"], [1, "invalid-template-state", 2, "flex", "1", "display", "flex", "flex-direction", "column", "align-items", "center", "justify-content", "center", "padding", "40px", "color", "#dc3545"], [1, "template-editor-container", 2, "flex", "1", "display", "flex", "flex-direction", "column", "min-height", "350px"], [2, "padding", "16px 0"], [2, "display", "grid", "grid-template-columns", "1fr 1fr", "gap", "20px"], ["FieldName", "ParallelizationMode", "Type", "dropdownlist", 3, "record", "ShowLabel", "EditMode"], ["FieldName", "ParallelCount", "Type", "numerictextbox", 3, "record", "ShowLabel", "EditMode"], ["FieldName", "ParallelConfigParam", "Type", "textbox", 3, "record", "ShowLabel", "EditMode"], ["FieldName", "OutputType", "Type", "dropdownlist", 3, "record", "ShowLabel", "EditMode"], ["FieldName", "ValidationBehavior", "Type", "dropdownlist", 3, "record", "ShowLabel", "EditMode"], ["FieldName", "EnableCaching", "Type", "checkbox", 3, "record", "ShowLabel", "EditMode"], [2, "margin-bottom", "16px"], [2, "display", "block", "margin-bottom", "4px", "font-weight", "600", "color", "#495057", "font-size", "0.9em"], [2, "color", "#495057"], ["name", "promptName", "placeholder", "Enter prompt name...", 2, "font-size", "1.2em", "font-weight", "600", "min-width", "300px", "flex", "1", 3, "ngModelChange", "ngModel"], [2, "margin", "0", "color", "#495057", "font-weight", "600", "flex", "1"], [1, "status-badge", 2, "color", "white", "padding", "4px 10px", "border-radius", "12px", "font-size", "0.75em", "font-weight", "500"], ["name", "promptStatus", "textField", "text", "valueField", "value", 2, "width", "150px", 3, "ngModelChange", "ngModel", "data", "valuePrimitive"], [2, "color", "#dc3545"], [2, "padding", "8px", "color", "#6c757d", "font-style", "italic", "width", "200px"], ["name", "promptTypeID", "textField", "Name", "valueField", "ID", "placeholder", "Select prompt type...", 2, "width", "200px", 3, "ngModel", "data", "valuePrimitive", "filterable"], [1, "fa-solid", "fa-spinner", "fa-spin"], ["name", "promptTypeID", "textField", "Name", "valueField", "ID", "placeholder", "Select prompt type...", 2, "width", "200px", 3, "ngModelChange", "ngModel", "data", "valuePrimitive", "filterable"], ["name", "promptDescription", "placeholder", "Enter prompt description...", 2, "width", "100%", "max-width", "600px", "margin-bottom", "12px", 3, "ngModelChange", "ngModel", "rows"], [1, "fa-solid", "fa-tag", 2, "color", "#6c757d"], [1, "fa-solid", "fa-database", 2, "color", "#28a745"], [2, "color", "#28a745", "font-weight", "500"], ["kendoButton", "", "title", "Run AI Prompt Test Harness", 3, "click", "themeColor", "size"], [1, "fa-solid", "fa-play"], [2, "display", "flex", "align-items", "center", "gap", "8px", "font-weight", "600"], [2, "color", "#6c757d", "font-size", "0.9em", "font-weight", "normal"], [1, "fa-solid", "fa-spinner", "fa-spin", 2, "font-size", "24px", "margin-right", "12px"], [1, "fa-solid", "fa-code", 2, "font-size", "64px", "margin-bottom", "20px", "opacity", "0.3"], [2, "margin-bottom", "12px", "color", "#495057"], [2, "margin-bottom", "24px", "text-align", "center", "max-width", "400px"], [2, "display", "flex", "gap", "12px"], ["kendoButton", "", 3, "themeColor"], ["kendoButton", "", 3, "fillMode"], ["kendoButton", "", 3, "click", "themeColor"], [1, "fa-solid", "fa-plus"], ["kendoButton", "", 3, "click", "fillMode"], [1, "fa-solid", "fa-link"], [1, "fa-solid", "fa-exclamation-triangle", 2, "font-size", "64px", "margin-bottom", "20px", "opacity", "0.7"], [2, "margin-bottom", "12px"], [1, "fa-solid", "fa-refresh"], [1, "template-actions", 2, "display", "flex", "gap", "8px", "padding", "8px", "border-bottom", "1px solid #e9ecef", "background", "#f8f9fa"], [2, "flex", "1", "background", "white", "border-radius", "6px", "border", "1px solid #e9ecef"], [2, "display", "block", "min-height", "300px", 3, "contentChange", "runTemplate", "template", "config"], ["kendoButton", "", "title", "Change to a different template", 3, "fillMode", "size"], ["kendoButton", "", "title", "Open template in new window", 3, "fillMode", "size"], ["kendoButton", "", "title", "Change to a different template", 3, "click", "fillMode", "size"], [1, "fa-solid", "fa-exchange-alt"], ["kendoButton", "", "title", "Open template in new window", 3, "click", "fillMode", "size"], [1, "fa-solid", "fa-external-link-alt"], [1, "model-management", 2, "border", "1px solid #dee2e6", "border-radius", "6px", "background", "#f8f9fa"], [1, "loading-state", 2, "padding", "20px", "text-align", "center", "color", "#6c757d"], [1, "fa-solid", "fa-microchip", 2, "color", "#6c757d"], [1, "badge", 2, "background", "#17a2b8", "color", "white", "padding", "2px 6px", "border-radius", "10px", "font-size", "0.7em"], [2, "color", "#6c757d", "font-size", "0.8em", "font-weight", "normal", "margin-left", "8px"], ["title", "Models are tried in order from top to bottom. The first available model will be used.", 1, "fa-solid", "fa-info-circle"], [1, "empty-state", 2, "padding", "20px", "text-align", "center", "color", "#6c757d"], [1, "fa-solid", "fa-info-circle"], [2, "margin-top", "10px"], ["kendoButton", "", "fillMode", "outline", "themeColor", "primary", "size", "small", 3, "click"], [2, "padding", "12px 16px", "background", "#e3f2fd", "border-bottom", "1px solid #bbdefb", "color", "#1565c0", "font-size", "0.85em"], [1, "model-header", 2, "display", "grid", "grid-template-columns", "40px 2fr 1fr 1fr 1fr 60px", "gap", "12px", "padding", "12px 16px", "background", "#e9ecef", "font-weight", "600", "font-size", "0.85em", "color", "#495057", "border-bottom", "1px solid #dee2e6"], ["title", "Priority order - models are tried from top to bottom"], [1, "fa-solid", "fa-sort", 2, "color", "#6c757d"], [1, "add-model-row", 2, "padding", "12px 16px", "text-align", "center", "background", "#f8f9fa", "border-top", "1px solid #dee2e6"], [1, "fa-solid", "fa-info-circle", 2, "margin-right", "6px"], [1, "model-row", 2, "display", "grid", "grid-template-columns", "40px 2fr 1fr 1fr 1fr 60px", "gap", "12px", "padding", "12px 16px", "border-bottom", "1px solid #e9ecef", "align-items", "start", "transition", "background 0.2s, opacity 0.2s", 3, "dragstart", "dragover", "drop", "dragend", "draggable"], [1, "drag-handle", 2, "display", "flex", "flex-direction", "column", "align-items", "center", "justify-content", "center", "color", "#6c757d"], [2, "font-size", "0.9em", "font-weight", "600", 3, "title"], [1, "model-select"], ["textField", "Name", "valueField", "ID", "placeholder", "Select a model...", 2, "width", "100%", 3, "ngModel", "name", "data", "valuePrimitive", "filterable"], [1, "model-vendor"], [1, "model-configuration"], [2, "font-size", "0.9em"], [1, "model-created"], [2, "color", "#6c757d", "font-size", "0.8em"], [2, "color", "#28a745", "font-size", "0.8em", "font-style", "italic"], [1, "model-actions", 2, "display", "flex", "gap", "2px", "flex-direction", "column"], [2, "display", "grid", "grid-template-columns", "40px 1fr", "gap", "12px", "padding", "8px 16px", "border-bottom", "1px solid #e9ecef", "background", "#f8f9fa", "font-size", "0.85em", "color", "#6c757d"], [2, "display", "flex", "gap", "16px", "flex-wrap", "wrap", "align-items", "center", "margin-bottom", "8px"], [2, "padding", "8px", "background", "#fff", "border", "1px solid #dee2e6", "border-radius", "4px", "margin-top", "8px"], ["title", "Drag to reorder priority", 1, "fa-solid", "fa-grip-vertical", 2, "cursor", "move"], [2, "font-size", "0.7em", "margin-top", "2px"], ["textField", "Name", "valueField", "ID", "placeholder", "Select a model...", 2, "width", "100%", 3, "ngModelChange", "valueChange", "ngModel", "name", "data", "valuePrimitive", "filterable"], [2, "color", "#6c757d", "font-style", "italic", "font-size", "0.9em"], ["textField", "Name", "valueField", "ID", "placeholder", "Select vendor...", 2, "width", "100%", 3, "ngModel", "name", "data", "valuePrimitive", "filterable"], ["textField", "Name", "valueField", "ID", "placeholder", "Select vendor...", 2, "width", "100%", 3, "ngModelChange", "ngModel", "name", "data", "valuePrimitive", "filterable"], ["kendoDropDownListItemTemplate", ""], [2, "font-size", "0.8em", "margin-left", "4px"], [2, "font-size", "0.9em", "font-weight", "500", 3, "color"], [2, "font-size", "0.9em", "font-weight", "500"], [2, "font-size", "0.9em", 3, "color"], [2, "color", "#6c757d", "font-size", "0.9em"], [2, "padding", "4px", "color", "#6c757d", "font-style", "italic", "font-size", "0.85em"], ["textField", "Name", "valueField", "ID", "placeholder", "Default", 2, "width", "100%", 3, "ngModel", "name", "data", "valuePrimitive", "filterable"], ["textField", "Name", "valueField", "ID", "placeholder", "Default", 2, "width", "100%", 3, "ngModelChange", "valueChange", "ngModel", "name", "data", "valuePrimitive", "filterable"], ["kendoDropDownListNoDataTemplate", ""], [2, "padding", "8px", "text-align", "center", "color", "#6c757d"], [2, "display", "flex", "gap", "2px", "margin-bottom", "4px"], ["kendoButton", "", "fillMode", "flat", "themeColor", "error", "size", "small", "title", "Remove model"], ["kendoButton", "", "fillMode", "flat", "size", "small", "title", "Move up", 3, "click", "disabled"], [1, "fa-solid", "fa-chevron-up"], ["kendoButton", "", "fillMode", "flat", "size", "small", "title", "Move down", 3, "click", "disabled"], [1, "fa-solid", "fa-chevron-down"], ["kendoButton", "", "fillMode", "flat", "themeColor", "error", "size", "small", "title", "Remove model", 3, "click"], [1, "fa-solid", "fa-times"], [2, "margin-bottom", "6px", "font-weight", "600", "color", "#495057", "font-size", "0.9em"], [1, "fa-solid", "fa-layer-group"], [2, "display", "grid", "grid-template-columns", "1fr 1fr 1fr", "gap", "12px", "align-items", "center"], [2, "display", "flex", "gap", "16px", "flex-wrap", "wrap", "align-items", "center"], [2, "display", "block", "margin-bottom", "2px", "font-size", "0.8em", "font-weight", "600", "color", "#495057"], ["textField", "text", "valueField", "value", "placeholder", "Select mode...", 2, "width", "100%", "font-size", "0.85em", 3, "ngModelChange", "ngModel", "name", "data", "valuePrimitive"], ["placeholder", "Count...", 2, "width", "100%", "font-size", "0.85em", 3, "ngModelChange", "ngModel", "name", "min", "step", "format"], ["placeholder", "Parameter name...", 2, "width", "100%", "font-size", "0.85em", 3, "ngModelChange", "ngModel", "name"], ["kendoButton", "", "fillMode", "outline", "themeColor", "success", "size", "small", 3, "click"], [1, "fa-solid", "fa-cogs", 2, "color", "#6c757d"], [2, "padding", "8px", "color", "#6c757d", "font-style", "italic"], ["name", "resultSelectorPromptID", "textField", "text", "valueField", "value", "placeholder", "Select a result selector prompt...", 2, "width", "100%", 3, "ngModel", "data", "valuePrimitive", "filterable"], ["name", "resultSelectorPromptID", "textField", "text", "valueField", "value", "placeholder", "Select a result selector prompt...", 2, "width", "100%", 3, "ngModelChange", "valueChange", "ngModel", "data", "valuePrimitive", "filterable"], [1, "fa-solid", "fa-sliders", 2, "color", "#6c757d"], [1, "badge", 2, "background", "#6f42c1", "color", "white", "padding", "2px 6px", "border-radius", "10px", "font-size", "0.7em"], ["title", "These parameters are defined in the template and will be available when executing this prompt", 1, "fa-solid", "fa-info-circle"], [2, "display", "grid", "gap", "12px"], [1, "parameter-card", 2, "border", "1px solid #e9ecef", "border-radius", "8px", "padding", "16px", "background", "#f8f9fa", "transition", "all 0.2s", 3, "border-left"], [2, "margin-top", "16px", "padding", "12px", "background", "#e3f2fd", "border-radius", "6px", "border", "1px solid #bbdefb"], [2, "display", "flex", "align-items", "flex-start", "gap", "8px"], [1, "fa-solid", "fa-lightbulb", 2, "color", "#1976d2", "margin-top", "2px"], [2, "flex", "1", "font-size", "0.85em", "color", "#1565c0", "line-height", "1.5"], [1, "parameter-card", 2, "border", "1px solid #e9ecef", "border-radius", "8px", "padding", "16px", "background", "#f8f9fa", "transition", "all 0.2s"], [2, "display", "flex", "justify-content", "space-between", "align-items", "flex-start", "margin-bottom", "8px"], [2, "display", "flex", "align-items", "center", "gap", "8px"], [2, "font-size", "1.2em"], [2, "margin", "0", "color", "#495057", "font-weight", "600"], [2, "color", "#dc3545", "font-size", "0.9em", "margin-left", "4px"], [1, "type-badge", 2, "color", "white", "padding", "4px 8px", "border-radius", "12px", "font-size", "0.75em", "font-weight", "500"], [2, "color", "#dc3545", "font-size", "0.85em", "font-weight", "500"], [2, "color", "#6c757d", "font-size", "0.85em"], [2, "margin", "0 0 8px 0", "color", "#6c757d", "font-size", "0.9em", "line-height", "1.4"], [2, "font-size", "0.85em", "color", "#495057"], [2, "display", "flex", "align-items", "center", "gap", "4px", "margin-bottom", "4px"], [1, "fa-solid", "fa-info-circle", 2, "color", "#6c757d"], [2, "display", "grid", "grid-template-columns", "repeat(auto-fit, minmax(200px, 1fr))", "gap", "12px", "margin-top", "12px"], [2, "background", "white", "padding", "8px 12px", "border-radius", "4px", "border", "1px solid #dee2e6"], [2, "display", "block", "font-size", "0.8em", "color", "#6c757d", "margin-bottom", "2px"], [2, "font-size", "0.85em", "color", "#495057", "word-break", "break-all"], [2, "font-size", "0.8em", "color", "#495057", "word-break", "break-all"], [2, "padding", "16px"], [2, "background", "#f8f9fa", "border", "1px solid #dee2e6", "border-radius", "4px", "padding", "12px", "font-family", "'Courier New', monospace", "font-size", "0.9em", "white-space", "pre-wrap", "overflow", "auto", "max-height", "250px"], [2, "background", "#fff3cd", "border", "1px solid #ffeaa7", "border-radius", "4px", "padding", "12px", "color", "#856404", "text-align", "center"], [2, "color", "#dc3545", "font-size", "0.8em", "font-weight", "normal"], ["name", "outputExample", "language", "json", "placeholder", "Enter JSON example structure...", 2, "width", "100%", "height", "200px", "border", "1px solid #dee2e6", "border-radius", "4px", 3, "ngModelChange", "ngModel"], [2, "margin-top", "8px", "color", "#6c757d", "font-size", "0.85em"], [1, "fa-solid", "fa-exclamation-triangle"], [2, "text-align", "center", "padding", "40px", "color", "#6c757d"], [1, "fa-solid", "fa-history", 2, "color", "#6c757d"], [2, "color", "#6c757d", "font-weight", "normal"], [1, "fa-solid", "fa-spinner", "fa-spin", 2, "font-size", "2em", "margin-bottom", "12px"], [1, "fa-solid", "fa-history", 2, "font-size", "3em", "margin-bottom", "12px", "opacity", "0.3"], [2, "display", "flex", "justify-content", "space-between", "align-items", "center", "margin-bottom", "16px"], [2, "display", "flex", "gap", "8px", "align-items", "center"], ["selection", "single"], ["kendoButton", "", "size", "small", 3, "click", "selected"], [2, "margin-left", "4px", "font-size", "0.8em", 3, "class"], [2, "border", "1px solid #e9ecef", "border-radius", "8px", "overflow", "hidden"], [2, "width", "100%", "border-collapse", "collapse"], [2, "background", "#f8f9fa", "border-bottom", "2px solid #e9ecef"], [2, "padding", "12px", "text-align", "left", "font-weight", "600", "color", "#495057"], [2, "padding", "12px", "text-align", "right", "font-weight", "600", "color", "#495057"], [2, "padding", "12px", "text-align", "center", "font-weight", "600", "color", "#495057"], [1, "history-row", 2, "border-bottom", "1px solid #f1f3f5", 3, "even-row"], [2, "margin-left", "4px", "font-size", "0.8em"], [1, "history-row", 2, "border-bottom", "1px solid #f1f3f5"], [2, "padding", "12px"], [2, "display", "flex", "align-items", "center", "gap", "6px"], [2, "padding", "12px", "color", "#495057"], [2, "padding", "12px", "text-align", "right", "color", "#495057"], [2, "padding", "12px", "text-align", "center"], [2, "padding", "4px 8px", "border-radius", "12px", "background", "#e9ecef", "color", "#495057", "font-size", "0.85em", "font-weight", "500"], ["kendoButton", "", "fillMode", "flat", "size", "small", "title", "View details", 3, "click"], [1, "fa-solid", "fa-external-link"], [2, "height", "300px", 3, "Params", "NewRecordValues", "AllowLoad", "EditMode"], [1, "fa-solid", "fa-database", 2, "color", "#6c757d"], [2, "margin", "0 0 12px 0", "color", "#495057"], [2, "height", "200px", 3, "Params", "NewRecordValues", "AllowLoad", "EditMode"], [1, "fa-solid", "fa-link", 2, "color", "#6c757d"], [3, "close", "width", "height", "minWidth", "minHeight", "draggable", "resizable", "state", "title"], [3, "visibilityChange", "entity", "mode", "isVisible"]], template: function AIPromptFormComponentExtended_Template(rf, ctx) { if (rf & 1) {
|
|
2560
3032
|
i0.ɵɵelementStart(0, "div", 2);
|
|
2561
3033
|
i0.ɵɵelement(1, "div", 3);
|
|
2562
3034
|
i0.ɵɵtemplate(2, AIPromptFormComponentExtended_form_2_Template, 64, 36, "form", 4)(3, AIPromptFormComponentExtended_Conditional_3_Template, 2, 12, "kendo-window", 5);
|
|
@@ -2566,7 +3038,7 @@ let AIPromptFormComponentExtended = class AIPromptFormComponentExtended extends
|
|
|
2566
3038
|
i0.ɵɵproperty("ngIf", ctx.record);
|
|
2567
3039
|
i0.ɵɵadvance();
|
|
2568
3040
|
i0.ɵɵconditional(ctx.showTestHarness ? 3 : -1);
|
|
2569
|
-
} }, dependencies: [
|
|
3041
|
+
} }, dependencies: [i5.NgIf, i6.ɵNgNoValidate, i6.NgControlStatus, i6.NgControlStatusGroup, i6.NgModel, i6.NgForm, i7.ExpansionPanelComponent, i7.ExpansionPanelTitleDirective, i8.DialogContainerDirective, i8.WindowComponent, i9.TextAreaComponent, i9.TextBoxComponent, i9.NumericTextBoxComponent, i10.ItemTemplateDirective, i10.NoDataTemplateDirective, i10.DropDownListComponent, i10.DropDownTreeComponent, i11.ButtonGroupComponent, i11.ButtonComponent, i12.UserViewGridComponent, i13.MJFormField, i14.FormToolbarComponent, i15.CodeEditorComponent, i3.AITestHarnessComponent, i16.TemplateEditorComponent, i5.DatePipe], styles: [".record-form-container[_ngcontent-%COMP%] {\n font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n padding: 10px;\n}\n\n.custom-toolbar-actions[_ngcontent-%COMP%] {\n margin-left: auto;\n}\n\n.status-badge[_ngcontent-%COMP%] {\n font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n font-weight: 500;\n letter-spacing: 0.02em;\n}\n\n.config-summary[_ngcontent-%COMP%] {\n position: sticky;\n top: 0;\n max-height: 600px;\n overflow-y: auto;\n}\n\n.config-item[_ngcontent-%COMP%] {\n padding: 8px 0;\n border-bottom: 1px solid #e9ecef;\n}\n\n.config-item[_ngcontent-%COMP%]:last-child {\n border-bottom: none;\n}\n\n.template-tab-content[_ngcontent-%COMP%] {\n background: #fff;\n}\n\n.template-header[_ngcontent-%COMP%] h5[_ngcontent-%COMP%] {\n font-size: 1.1em;\n}\n\n.loading-state[_ngcontent-%COMP%], \n.no-template-state[_ngcontent-%COMP%], \n.invalid-template-state[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n\n.no-template-state[_ngcontent-%COMP%] i[_ngcontent-%COMP%], \n.invalid-template-state[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n opacity: 0.6;\n}\n\n.template-editor-container[_ngcontent-%COMP%] {\n background: #fff;\n border-radius: 6px;\n}\n\n\n\n@media (max-width: 1200px) {\n .record-form-container[_ngcontent-%COMP%] .mj-tab-body[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] {\n grid-template-columns: 1fr !important;\n gap: 20px;\n }\n \n .config-summary[_ngcontent-%COMP%] {\n order: -1;\n position: static;\n max-height: none;\n }\n}\n\n\n\n@media (max-width: 768px) {\n .custom-toolbar-actions[_ngcontent-%COMP%] {\n flex-direction: column;\n gap: 4px !important;\n }\n \n .status-badge[_ngcontent-%COMP%] {\n align-self: flex-start;\n }\n}\n\n\n\n.record-form-container[_ngcontent-%COMP%] mj-form-section[_ngcontent-%COMP%] {\n padding: 16px;\n}\n\n\n\n.status-badge[_ngcontent-%COMP%], \n.config-item[_ngcontent-%COMP%], \n.template-header[_ngcontent-%COMP%] {\n transition: all 0.2s ease;\n}\n\n.config-item[_ngcontent-%COMP%]:hover {\n background-color: rgba(0,0,0,0.02);\n border-radius: 4px;\n margin: 0 -8px;\n padding: 8px;\n}\n\n\n\n.history-row[_ngcontent-%COMP%] {\n transition: background 0.2s;\n}\n\n.history-row[_ngcontent-%COMP%]:not(.even-row) {\n background: #f8f9fa;\n}\n\n.history-row.even-row[_ngcontent-%COMP%] {\n background: white;\n}\n\n.history-row[_ngcontent-%COMP%]:hover {\n background: #e9ecef !important;\n}\n\n\n\n.parameter-card[_ngcontent-%COMP%] {\n position: relative;\n overflow: hidden;\n}\n\n.parameter-card[_ngcontent-%COMP%]::before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: 4px;\n background: inherit;\n transition: width 0.2s;\n}\n\n.parameter-card[_ngcontent-%COMP%]:hover {\n transform: translateY(-2px);\n box-shadow: 0 4px 12px rgba(0,0,0,0.1);\n}\n\n.parameter-card[_ngcontent-%COMP%]:hover::before {\n width: 6px;\n}\n\n.type-badge[_ngcontent-%COMP%] {\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.03em;\n transition: transform 0.2s;\n}\n\n.parameter-card[_ngcontent-%COMP%]:hover .type-badge[_ngcontent-%COMP%] {\n transform: scale(1.05);\n}\n\n\n\n.parameter-card[_ngcontent-%COMP%] i.fa-solid[_ngcontent-%COMP%] {\n transition: transform 0.3s;\n}\n\n.parameter-card[_ngcontent-%COMP%]:hover i.fa-solid[_ngcontent-%COMP%] {\n transform: rotate(360deg);\n}\n\n\n\n@media (max-width: 768px) {\n .parameter-card[_ngcontent-%COMP%] {\n margin-bottom: 8px;\n }\n \n .parameter-card[_ngcontent-%COMP%] h6[_ngcontent-%COMP%] {\n font-size: 0.95em;\n }\n \n .type-badge[_ngcontent-%COMP%] {\n font-size: 0.7em !important;\n }\n}"] }); }
|
|
2570
3042
|
};
|
|
2571
3043
|
AIPromptFormComponentExtended = __decorate([
|
|
2572
3044
|
RegisterClass(BaseFormComponent, 'AI Prompts')
|
|
@@ -2574,12 +3046,12 @@ AIPromptFormComponentExtended = __decorate([
|
|
|
2574
3046
|
export { AIPromptFormComponentExtended };
|
|
2575
3047
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AIPromptFormComponentExtended, [{
|
|
2576
3048
|
type: Component,
|
|
2577
|
-
args: [{ selector: 'mj-ai-prompt-form', template: "<div class=\"record-form-container\">\n <!-- Dialog container for Kendo dialogs -->\n <div kendoDialogContainer></div>\n <form *ngIf=\"record\" class=\"record-form\" #form=\"ngForm\" >\n <mj-form-toolbar [form]=\"this\"></mj-form-toolbar>\n\n <!-- Main Content Area - Template Editor and Configuration -->\n <div class=\"prompt-main-area\" style=\"display: flex; flex-direction: column; height: 100%; overflow-y: auto;\">\n \n <!-- Header Section -->\n <div class=\"prompt-header\" style=\"flex-shrink: 0; padding: 20px; background: #f8f9fa; border-bottom: 2px solid #e9ecef;\">\n <div style=\"display: flex; justify-content: space-between; align-items: flex-start; gap: 20px;\">\n \n <!-- Left: Prompt Info -->\n <div style=\"flex: 1; min-width: 0;\">\n <div style=\"display: flex; align-items: center; gap: 12px; margin-bottom: 8px;\">\n <i class=\"fa-solid fa-robot\" style=\"color: #6f42c1; font-size: 1.4em;\"></i>\n @if (EditMode) {\n <kendo-textbox [(ngModel)]=\"record.Name\" \n name=\"promptName\"\n placeholder=\"Enter prompt name...\"\n style=\"font-size: 1.2em; font-weight: 600; min-width: 300px; flex: 1;\">\n </kendo-textbox>\n } @else {\n <h4 style=\"margin: 0; color: #495057; font-weight: 600; flex: 1;\">{{ record.Name || 'Untitled AI Prompt' }}</h4>\n <span class=\"status-badge\" [style.background-color]=\"getStatusBadgeColor()\" \n style=\"color: white; padding: 4px 10px; border-radius: 12px; font-size: 0.75em; font-weight: 500;\">\n {{ record.Status }}\n </span>\n }\n </div>\n \n <!-- Status and Type Editors when in edit mode -->\n @if (EditMode) {\n <div style=\"display: flex; gap: 16px; margin-bottom: 12px; flex-wrap: wrap;\">\n <div>\n <label style=\"display: block; margin-bottom: 4px; font-weight: 600; color: #495057; font-size: 0.9em;\">Status</label>\n <kendo-dropdownlist [(ngModel)]=\"record.Status\"\n name=\"promptStatus\"\n [data]=\"[{text: 'Active', value: 'Active'}, {text: 'Pending', value: 'Pending'}, {text: 'Disabled', value: 'Disabled'}]\"\n textField=\"text\"\n valueField=\"value\"\n [valuePrimitive]=\"true\"\n style=\"width: 150px;\">\n </kendo-dropdownlist>\n </div>\n <div>\n <label style=\"display: block; margin-bottom: 4px; font-weight: 600; color: #495057; font-size: 0.9em;\">\n Type <span style=\"color: #dc3545;\">*</span>\n </label>\n @if (isLoadingPromptTypes) {\n <div style=\"padding: 8px; color: #6c757d; font-style: italic; width: 200px;\">\n <i class=\"fa-solid fa-spinner fa-spin\"></i> Loading types...\n </div>\n } @else {\n <kendo-dropdownlist [(ngModel)]=\"record.TypeID\"\n name=\"promptTypeID\"\n [data]=\"availablePromptTypes\"\n textField=\"Name\"\n valueField=\"ID\"\n [valuePrimitive]=\"true\"\n [filterable]=\"true\"\n placeholder=\"Select prompt type...\"\n style=\"width: 200px;\">\n </kendo-dropdownlist>\n }\n </div>\n </div>\n }\n \n @if (EditMode) {\n <kendo-textarea [(ngModel)]=\"record.Description\" \n name=\"promptDescription\"\n [rows]=\"2\"\n placeholder=\"Enter prompt description...\"\n style=\"width: 100%; max-width: 600px; margin-bottom: 12px;\">\n </kendo-textarea>\n } @else if (record.Description) {\n <p style=\"margin: 0 0 12px 0; color: #6c757d; font-size: 0.9em; line-height: 1.4;\">{{ record.Description }}</p>\n }\n \n <!-- Quick Config Row -->\n <div class=\"quick-config\" style=\"display: flex; align-items: center; gap: 16px; flex-wrap: wrap;\">\n @if (record.TypeID) {\n <div class=\"config-item\" style=\"display: flex; align-items: center; gap: 6px; font-size: 0.85em;\">\n <i class=\"fa-solid fa-tag\" style=\"color: #6c757d;\"></i>\n <span style=\"color: #6c757d;\">Type:</span>\n <span style=\"color: #495057; font-weight: 500;\">{{ getPromptTypeDisplayName(record.TypeID) }}</span>\n </div>\n }\n \n <div class=\"config-item\" style=\"display: flex; align-items: center; gap: 6px; font-size: 0.85em;\">\n <i class=\"fa-solid fa-layer-group\" style=\"color: #6c757d;\"></i>\n <span style=\"color: #6c757d;\">Parallelization:</span>\n <span style=\"color: #495057; font-weight: 500;\">{{ getParallelizationModeDisplay() }}</span>\n </div>\n \n <div class=\"config-item\" style=\"display: flex; align-items: center; gap: 6px; font-size: 0.85em;\">\n <i class=\"fa-solid fa-code\" style=\"color: #6c757d;\"></i>\n <span style=\"color: #6c757d;\">Output:</span>\n <span [style.color]=\"getValidationColor()\" style=\"font-weight: 500;\">{{ getOutputTypeDisplay() }}</span>\n </div>\n \n @if (record.EnableCaching) {\n <div class=\"config-item\" style=\"display: flex; align-items: center; gap: 6px; font-size: 0.85em;\">\n <i class=\"fa-solid fa-database\" style=\"color: #28a745;\"></i>\n <span style=\"color: #28a745; font-weight: 500;\">Caching Enabled</span>\n </div>\n }\n </div>\n </div>\n \n <!-- Right: Action Buttons -->\n <div class=\"action-buttons\" style=\"display: flex; flex-direction: column; gap: 8px; align-items: flex-end;\">\n <div style=\"display: flex; gap: 8px;\">\n @if (record.ID) {\n <button kendoButton [themeColor]=\"'primary'\" [size]=\"'large'\"\n (click)=\"openTestHarness()\"\n title=\"Run AI Prompt Test Harness\">\n <i class=\"fa-solid fa-play\"></i> Run\n </button>\n }\n </div>\n \n @if (!canExecute && record.ID) {\n <div style=\"font-size: 0.75em; color: #dc3545; text-align: right; max-width: 200px;\">\n @if (record.Status !== 'Active') {\n \u2022 Prompt must be Active<br>\n }\n @if (!record.TemplateID) {\n \u2022 Template is required<br>\n }\n @if (!template && record.TemplateID) {\n \u2022 Template not found<br>\n }\n </div>\n }\n </div>\n </div>\n </div>\n\n <!-- Configuration Sections with Expansion Panels -->\n <div class=\"configuration-sections\" style=\"flex: 1; background: white; border-top: 2px solid #e9ecef; padding: 16px; min-height: 0;\">\n <!-- Template Editor Section -->\n <kendo-expansionpanel \n [expanded]=\"true\"\n style=\"margin-bottom: 12px;\">\n <ng-template kendoExpansionPanelTitleDirective>\n <span style=\"display: flex; align-items: center; gap: 8px; font-weight: 600;\">\n <i class=\"fa-solid fa-code\" style=\"color: #6c757d;\"></i>\n Template Editor\n @if (template) {\n <span style=\"color: #6c757d; font-size: 0.9em; font-weight: normal;\">\u2022 {{ template.Name }}</span>\n }\n </span>\n </ng-template>\n \n <!-- Direct Content Projection -->\n <div class=\"template-section\" style=\"display: flex; flex-direction: column; min-height: 400px; padding: 8px;\">\n @if (isLoadingTemplate) {\n <div class=\"loading-state\" style=\"flex: 1; display: flex; align-items: center; justify-content: center; color: #6c757d;\">\n <i class=\"fa-solid fa-spinner fa-spin\" style=\"font-size: 24px; margin-right: 12px;\"></i>\n Loading template...\n </div>\n } @else if (!record.TemplateID) {\n <div class=\"no-template-state\" style=\"flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px; color: #6c757d;\">\n <i class=\"fa-solid fa-code\" style=\"font-size: 64px; margin-bottom: 20px; opacity: 0.3;\"></i>\n <h5 style=\"margin-bottom: 12px; color: #495057;\">No Template Associated</h5>\n <p style=\"margin-bottom: 24px; text-align: center; max-width: 400px;\">\n This AI prompt needs a template to define its structure and parameters. \n Create a new template or link to an existing one.\n </p>\n <div style=\"display: flex; gap: 12px;\">\n <button kendoButton [themeColor]=\"'primary'\" (click)=\"createNewTemplate()\">\n <i class=\"fa-solid fa-plus\"></i> Create New Template\n </button>\n <button kendoButton [fillMode]=\"'outline'\" (click)=\"linkExistingTemplate()\">\n <i class=\"fa-solid fa-link\"></i> Link Existing Template\n </button>\n </div>\n </div>\n } @else if (templateNotFoundInDatabase) {\n <div class=\"invalid-template-state\" style=\"flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px; color: #dc3545;\">\n <i class=\"fa-solid fa-exclamation-triangle\" style=\"font-size: 64px; margin-bottom: 20px; opacity: 0.7;\"></i>\n <h5 style=\"margin-bottom: 12px;\">Template Not Found</h5>\n <p style=\"margin-bottom: 24px; text-align: center; max-width: 400px;\">\n The referenced template could not be loaded. It may have been deleted or moved.\n </p>\n <div style=\"display: flex; gap: 12px;\">\n <button kendoButton [fillMode]=\"'outline'\" (click)=\"loadTemplate()\">\n <i class=\"fa-solid fa-refresh\"></i> Retry Loading\n </button>\n <button kendoButton [themeColor]=\"'primary'\" (click)=\"createNewTemplate()\">\n <i class=\"fa-solid fa-plus\"></i> Create New Template\n </button>\n </div>\n </div>\n } @else {\n <!-- Active Template Editor -->\n <div class=\"template-editor-container\" style=\"flex: 1; display: flex; flex-direction: column; min-height: 350px;\">\n <!-- Template Editor -->\n <div style=\"flex: 1; background: white; border-radius: 6px; border: 1px solid #e9ecef;\">\n <mj-template-editor \n #templateEditor\n [template]=\"template\"\n [config]=\"templateEditorConfig\"\n (contentChange)=\"onTemplateContentChange($event)\"\n (runTemplate)=\"onTemplateRun($event)\"\n style=\"display: block; min-height: 300px;\">\n </mj-template-editor>\n </div>\n </div>\n }\n </div>\n </kendo-expansionpanel> \n\n <!-- Template Parameters Expansion Panel -->\n @if (template && templateParams.length > 0) {\n <kendo-expansionpanel \n [expanded]=\"true\"\n style=\"margin-bottom: 12px;\">\n <ng-template kendoExpansionPanelTitleDirective>\n <span style=\"display: flex; align-items: center; gap: 8px; font-weight: 600;\">\n <i class=\"fa-solid fa-sliders\" style=\"color: #6c757d;\"></i>\n Template Parameters\n <span class=\"badge\" style=\"background: #6f42c1; color: white; padding: 2px 6px; border-radius: 10px; font-size: 0.7em;\">\n {{ templateParams.length }}\n </span>\n <span style=\"color: #6c757d; font-size: 0.8em; font-weight: normal; margin-left: 8px;\">\n <i class=\"fa-solid fa-info-circle\" title=\"These parameters are defined in the template and will be available when executing this prompt\"></i>\n Parameters defined in the template\n </span>\n </span>\n </ng-template>\n \n <!-- Template Parameters Display -->\n <div style=\"padding: 16px 0;\">\n @if (isLoadingTemplateParams) {\n <div class=\"loading-state\" style=\"padding: 20px; text-align: center; color: #6c757d;\">\n <i class=\"fa-solid fa-spinner fa-spin\"></i> Loading template parameters...\n </div>\n } @else if (templateParams.length === 0) {\n <div class=\"empty-state\" style=\"padding: 20px; text-align: center; color: #6c757d;\">\n <i class=\"fa-solid fa-info-circle\"></i> This template has no parameters defined\n </div>\n } @else {\n <!-- Parameters Grid -->\n <div style=\"display: grid; gap: 12px;\">\n @for (param of templateParams; track param.ID) {\n <div class=\"parameter-card\" \n style=\"border: 1px solid #e9ecef; border-radius: 8px; padding: 16px; background: #f8f9fa; transition: all 0.2s;\"\n [style.border-left]=\"'4px solid ' + getParamTypeColor(param.Type)\">\n \n <!-- Parameter Header -->\n <div style=\"display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px;\">\n <div style=\"display: flex; align-items: center; gap: 8px;\">\n <i [class]=\"'fa-solid ' + getParamTypeIcon(param.Type)\" \n [style.color]=\"getParamTypeColor(param.Type)\"\n style=\"font-size: 1.2em;\"></i>\n <h6 style=\"margin: 0; color: #495057; font-weight: 600;\">\n {{ param.Name }}\n @if (param.IsRequired) {\n <span style=\"color: #dc3545; font-size: 0.9em; margin-left: 4px;\">*</span>\n }\n </h6>\n </div>\n <div style=\"display: flex; align-items: center; gap: 8px;\">\n <span class=\"type-badge\" \n [style.background-color]=\"getParamTypeColor(param.Type)\"\n style=\"color: white; padding: 4px 8px; border-radius: 12px; font-size: 0.75em; font-weight: 500;\">\n {{ param.Type }}\n </span>\n @if (param.IsRequired) {\n <span style=\"color: #dc3545; font-size: 0.85em; font-weight: 500;\">Required</span>\n } @else {\n <span style=\"color: #6c757d; font-size: 0.85em;\">Optional</span>\n }\n </div>\n </div>\n \n <!-- Parameter Description -->\n @if (param.Description) {\n <p style=\"margin: 0 0 8px 0; color: #6c757d; font-size: 0.9em; line-height: 1.4;\">\n {{ param.Description }}\n </p>\n }\n \n <!-- Type-specific Information -->\n <div style=\"font-size: 0.85em; color: #495057;\">\n <span style=\"display: flex; align-items: center; gap: 4px; margin-bottom: 4px;\">\n <i class=\"fa-solid fa-info-circle\" style=\"color: #6c757d;\"></i>\n {{ getParamTypeDescription(param) }}\n </span>\n </div>\n \n <!-- Additional Parameter Details -->\n <div style=\"display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 12px;\">\n @if (param.DefaultValue) {\n <div style=\"background: white; padding: 8px 12px; border-radius: 4px; border: 1px solid #dee2e6;\">\n <label style=\"display: block; font-size: 0.8em; color: #6c757d; margin-bottom: 2px;\">Default Value</label>\n <code style=\"font-size: 0.85em; color: #495057; word-break: break-all;\">{{ param.DefaultValue }}</code>\n </div>\n }\n \n @if (param.EntityID) {\n <div style=\"background: white; padding: 8px 12px; border-radius: 4px; border: 1px solid #dee2e6;\">\n <label style=\"display: block; font-size: 0.8em; color: #6c757d; margin-bottom: 2px;\">Entity</label>\n <span style=\"font-size: 0.85em; color: #495057;\">{{ param.Entity || 'Entity ID: ' + param.EntityID }}</span>\n </div>\n }\n \n @if (param.LinkedParameterName) {\n <div style=\"background: white; padding: 8px 12px; border-radius: 4px; border: 1px solid #dee2e6;\">\n <label style=\"display: block; font-size: 0.8em; color: #6c757d; margin-bottom: 2px;\">Linked To</label>\n <span style=\"font-size: 0.85em; color: #495057;\">\n {{ param.LinkedParameterName }}\n @if (param.LinkedParameterField) {\n ({{ param.LinkedParameterField }})\n }\n </span>\n </div>\n }\n \n @if (param.ExtraFilter) {\n <div style=\"background: white; padding: 8px 12px; border-radius: 4px; border: 1px solid #dee2e6;\">\n <label style=\"display: block; font-size: 0.8em; color: #6c757d; margin-bottom: 2px;\">Filter</label>\n <code style=\"font-size: 0.8em; color: #495057; word-break: break-all;\">{{ param.ExtraFilter }}</code>\n </div>\n }\n \n @if (param.RecordID) {\n <div style=\"background: white; padding: 8px 12px; border-radius: 4px; border: 1px solid #dee2e6;\">\n <label style=\"display: block; font-size: 0.8em; color: #6c757d; margin-bottom: 2px;\">Record ID</label>\n <code style=\"font-size: 0.85em; color: #495057;\">{{ param.RecordID }}</code>\n </div>\n }\n </div>\n </div>\n }\n </div>\n \n <!-- Help Text -->\n <div style=\"margin-top: 16px; padding: 12px; background: #e3f2fd; border-radius: 6px; border: 1px solid #bbdefb;\">\n <div style=\"display: flex; align-items: flex-start; gap: 8px;\">\n <i class=\"fa-solid fa-lightbulb\" style=\"color: #1976d2; margin-top: 2px;\"></i>\n <div style=\"flex: 1; font-size: 0.85em; color: #1565c0; line-height: 1.5;\">\n <strong>Using Template Parameters:</strong> When executing this prompt, you'll be prompted to provide values for all required parameters. \n Parameters can be simple values (text, numbers) or complex data structures (JSON objects, database records, or entire entity collections).\n The template will use these parameters to generate dynamic content based on the values provided at execution time.\n </div>\n </div>\n </div>\n }\n </div>\n </kendo-expansionpanel>\n }\n\n <!-- Model Configuration Expansion Panel -->\n @if (record.IsSaved) {\n <kendo-expansionpanel \n [expanded]=\"false\"\n style=\"margin-bottom: 12px;\">\n <ng-template kendoExpansionPanelTitleDirective>\n <span style=\"display: flex; align-items: center; gap: 8px; font-weight: 600;\">\n <i class=\"fa-solid fa-microchip\" style=\"color: #6c757d;\"></i>\n Models\n @if (promptModels.length > 0) {\n <span class=\"badge\" style=\"background: #17a2b8; color: white; padding: 2px 6px; border-radius: 10px; font-size: 0.7em;\">\n {{ promptModels.length }}\n </span>\n }\n <span style=\"color: #6c757d; font-size: 0.8em; font-weight: normal; margin-left: 8px;\">\n <i class=\"fa-solid fa-info-circle\" title=\"Models are tried in order from top to bottom. The first available model will be used.\"></i>\n Priority order (first available model will be used)\n </span>\n </span>\n </ng-template>\n \n <!-- Direct Content Projection -->\n <div style=\"padding: 16px 0;\">\n <!-- Model Management Interface -->\n <div class=\"model-management\" style=\"border: 1px solid #dee2e6; border-radius: 6px; background: #f8f9fa;\">\n @if (isLoadingModels) {\n <div class=\"loading-state\" style=\"padding: 20px; text-align: center; color: #6c757d;\">\n <i class=\"fa-solid fa-spinner fa-spin\"></i> Loading models...\n </div>\n } @else {\n @if (promptModels.length === 0) {\n <div class=\"empty-state\" style=\"padding: 20px; text-align: center; color: #6c757d;\">\n <i class=\"fa-solid fa-info-circle\"></i> No models configured\n @if (EditMode) {\n <div style=\"margin-top: 10px;\">\n <button kendoButton fillMode=\"outline\" themeColor=\"primary\" size=\"small\"\n (click)=\"addNewModel()\">\n <i class=\"fa-solid fa-plus\"></i> Add Model\n </button>\n </div>\n }\n </div>\n } @else {\n <!-- Priority explanation for multiple models -->\n @if (promptModels.length > 1) {\n <div style=\"padding: 12px 16px; background: #e3f2fd; border-bottom: 1px solid #bbdefb; color: #1565c0; font-size: 0.85em;\">\n <i class=\"fa-solid fa-info-circle\" style=\"margin-right: 6px;\"></i>\n Models are tried in priority order (highest priority first). The first available model that meets requirements will be used for execution.\n </div>\n }\n <!-- Column Headers -->\n <div class=\"model-header\" style=\"display: grid; grid-template-columns: 40px 2fr 1fr 1fr 60px; gap: 12px; padding: 12px 16px; background: #e9ecef; font-weight: 600; font-size: 0.85em; color: #495057; border-bottom: 1px solid #dee2e6;\">\n <div title=\"Priority order - models are tried from top to bottom\">\n <i class=\"fa-solid fa-sort\" style=\"color: #6c757d;\"></i>\n </div>\n <div>AI Model <span style=\"color: #dc3545;\">*</span></div>\n <div>Vendor</div>\n <div>Created</div>\n <div>Actions</div>\n </div>\n \n @for (model of promptModels; track getModelTrackId(model) || $index; let i = $index) {\n <div class=\"model-row\" \n [draggable]=\"EditMode\"\n (dragstart)=\"onDragStart($event, i)\"\n (dragover)=\"onDragOver($event)\"\n (drop)=\"onDrop($event, i)\"\n (dragend)=\"onDragEnd($event)\"\n [style.background]=\"!model.ModelID ? '#fff3cd' : (draggedIndex === i ? '#e3f2fd' : 'white')\"\n [style.border-left]=\"!model.ModelID ? '3px solid #ffc107' : 'none'\"\n [style.opacity]=\"draggedIndex === i ? '0.5' : '1'\"\n style=\"display: grid; grid-template-columns: 40px 2fr 1fr 1fr 60px; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #e9ecef; align-items: start; transition: background 0.2s, opacity 0.2s;\">\n \n <!-- Drag Handle / Priority -->\n <div class=\"drag-handle\" style=\"display: flex; flex-direction: column; align-items: center; justify-content: center; color: #6c757d;\">\n @if (EditMode) {\n <i class=\"fa-solid fa-grip-vertical\" title=\"Drag to reorder priority\" style=\"cursor: move;\"></i>\n <span style=\"font-size: 0.7em; margin-top: 2px;\">#{{ i + 1 }}</span>\n } @else {\n <span style=\"font-size: 0.9em; font-weight: 600;\" title=\"Priority {{ model.Priority }} - Higher priority numbers are tried first\">#{{ i + 1 }}</span>\n }\n </div>\n \n <!-- Model Selection -->\n <div class=\"model-select\">\n @if (EditMode) {\n <kendo-dropdownlist [(ngModel)]=\"model.ModelID\"\n [name]=\"'modelId_' + getModelTrackId(model)\"\n [data]=\"availableModels\"\n textField=\"Name\"\n valueField=\"ID\"\n [valuePrimitive]=\"true\"\n [filterable]=\"true\"\n placeholder=\"Select a model...\"\n (valueChange)=\"onModelChange($event, i)\"\n style=\"width: 100%;\">\n </kendo-dropdownlist>\n } @else {\n <span style=\"font-weight: 500;\">{{ getModelDisplayName(model.ModelID) }}</span>\n }\n </div>\n \n <!-- Vendor -->\n <div class=\"model-vendor\">\n @if (EditMode) {\n @if (model.ModelID) {\n @if (shouldShowVendorDropdown(model.ModelID)) {\n <kendo-dropdownlist [(ngModel)]=\"model.VendorID\"\n [name]=\"'vendorId_' + getModelTrackId(model)\"\n [data]=\"getVendorsForModelSync(model.ModelID)\"\n textField=\"Name\"\n valueField=\"ID\"\n [valuePrimitive]=\"true\"\n [filterable]=\"true\"\n placeholder=\"Select vendor...\"\n style=\"width: 100%;\">\n <ng-template kendoDropDownListItemTemplate let-dataItem>\n <span [style.color]=\"getVendorStatusColor(model.ModelID, dataItem.ID)\">\n {{ dataItem.Name }}\n @if (getModelVendorStatus(model.ModelID, dataItem.ID) !== 'Active') {\n <span style=\"font-size: 0.8em; margin-left: 4px;\">({{ getModelVendorStatus(model.ModelID, dataItem.ID) }})</span>\n }\n </span>\n </ng-template>\n </kendo-dropdownlist>\n } @else {\n <!-- Single vendor - just show the name -->\n @if (getVendorsForModelSync(model.ModelID).length === 1) {\n <span [style.color]=\"getVendorStatusColor(model.ModelID, getVendorsForModelSync(model.ModelID)[0].ID)\" style=\"font-size: 0.9em; font-weight: 500;\">\n {{ getVendorsForModelSync(model.ModelID)[0].Name }}\n @if (getModelVendorStatus(model.ModelID, getVendorsForModelSync(model.ModelID)[0].ID) !== 'Active') {\n <span style=\"font-size: 0.8em; margin-left: 4px;\">({{ getModelVendorStatus(model.ModelID, getVendorsForModelSync(model.ModelID)[0].ID) }})</span>\n }\n </span>\n } @else {\n <span style=\"color: #6c757d; font-style: italic; font-size: 0.9em;\">No vendors available</span>\n }\n }\n } @else {\n <span style=\"color: #6c757d; font-style: italic; font-size: 0.9em;\">Select model first</span>\n }\n } @else {\n @if (model.VendorID && model.ModelID) {\n <span [style.color]=\"getVendorStatusColor(model.ModelID, model.VendorID)\" style=\"font-size: 0.9em;\">\n {{ getVendorDisplayName(model.VendorID) }}\n @if (getModelVendorStatus(model.ModelID, model.VendorID) !== 'Active') {\n <span style=\"font-size: 0.8em; margin-left: 4px;\">({{ getModelVendorStatus(model.ModelID, model.VendorID) }})</span>\n }\n </span>\n } @else {\n <span style=\"color: #6c757d; font-size: 0.9em;\">-</span>\n }\n }\n </div>\n \n \n <!-- Created Date -->\n <div class=\"model-created\">\n @if (model.ID) {\n <span style=\"color: #6c757d; font-size: 0.8em;\">{{ model.__mj_CreatedAt | date:'short' }}</span>\n } @else {\n <span style=\"color: #28a745; font-size: 0.8em; font-style: italic;\">New</span>\n }\n </div>\n \n <!-- Actions -->\n <div class=\"model-actions\" style=\"display: flex; gap: 2px; flex-direction: column;\">\n @if (EditMode) {\n <div style=\"display: flex; gap: 2px; margin-bottom: 4px;\">\n <button kendoButton fillMode=\"flat\" size=\"small\"\n (click)=\"moveModelUp(i)\"\n [disabled]=\"i === 0\"\n title=\"Move up\">\n <i class=\"fa-solid fa-chevron-up\"></i>\n </button>\n <button kendoButton fillMode=\"flat\" size=\"small\"\n (click)=\"moveModelDown(i)\"\n [disabled]=\"i === promptModels.length - 1\"\n title=\"Move down\">\n <i class=\"fa-solid fa-chevron-down\"></i>\n </button>\n </div>\n <button kendoButton fillMode=\"flat\" themeColor=\"error\" size=\"small\"\n (click)=\"removePromptModel(i)\"\n title=\"Remove model\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n }\n </div>\n </div>\n \n <!-- Second row with additional details -->\n <div style=\"display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 8px 16px; border-bottom: 1px solid #e9ecef; background: #f8f9fa; font-size: 0.85em; color: #6c757d;\">\n <div></div>\n <div>\n <!-- Basic model details -->\n <div style=\"display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin-bottom: 8px;\">\n @if (model.Status) {\n <span><strong>Status:</strong> {{ model.Status }}</span>\n }\n @if (model.ConfigurationID) {\n <span><strong>Configuration:</strong> {{ model.ConfigurationID }}</span>\n }\n </div>\n \n <!-- Parallel execution fields when prompt is ModelSpecific -->\n @if (record.ParallelizationMode === 'ModelSpecific') {\n <div style=\"padding: 8px; background: #fff; border: 1px solid #dee2e6; border-radius: 4px; margin-top: 8px;\">\n <div style=\"margin-bottom: 6px; font-weight: 600; color: #495057; font-size: 0.9em;\">\n <i class=\"fa-solid fa-layer-group\"></i> Model-Specific Parallel Execution\n </div>\n \n @if (EditMode) {\n <div style=\"display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; align-items: center;\">\n <!-- Parallel Mode -->\n <div>\n <label style=\"display: block; margin-bottom: 2px; font-size: 0.8em; font-weight: 600; color: #495057;\">Parallel Mode</label>\n <kendo-dropdownlist [(ngModel)]=\"model.ParallelizationMode\"\n [name]=\"'parallelMode_' + i\"\n [data]=\"[{text: 'None', value: 'None'}, {text: 'Static Count', value: 'StaticCount'}, {text: 'Config Param', value: 'ConfigParam'}]\"\n textField=\"text\"\n valueField=\"value\"\n [valuePrimitive]=\"true\"\n placeholder=\"Select mode...\"\n style=\"width: 100%; font-size: 0.85em;\">\n </kendo-dropdownlist>\n </div>\n \n <!-- Parallel Count (when StaticCount) -->\n @if (model.ParallelizationMode === 'StaticCount') {\n <div>\n <label style=\"display: block; margin-bottom: 2px; font-size: 0.8em; font-weight: 600; color: #495057;\">Parallel Count</label>\n <kendo-numerictextbox [(ngModel)]=\"model.ParallelCount\"\n [name]=\"'parallelCount_' + i\"\n [min]=\"1\"\n [step]=\"1\"\n [format]=\"'n0'\"\n placeholder=\"Count...\"\n style=\"width: 100%; font-size: 0.85em;\">\n </kendo-numerictextbox>\n </div>\n }\n \n <!-- Config Param (when ConfigParam) -->\n @if (model.ParallelizationMode === 'ConfigParam') {\n <div>\n <label style=\"display: block; margin-bottom: 2px; font-size: 0.8em; font-weight: 600; color: #495057;\">Config Parameter</label>\n <kendo-textbox [(ngModel)]=\"model.ParallelConfigParam\"\n [name]=\"'parallelConfigParam_' + i\"\n placeholder=\"Parameter name...\"\n style=\"width: 100%; font-size: 0.85em;\">\n </kendo-textbox>\n </div>\n }\n </div>\n } @else {\n <!-- Read-only display -->\n <div style=\"display: flex; gap: 16px; flex-wrap: wrap; align-items: center;\">\n @if (model.ParallelizationMode) {\n <span><strong>Parallel Mode:</strong> {{ model.ParallelizationMode }}</span>\n }\n @if (model.ParallelCount) {\n <span><strong>Parallel Count:</strong> {{ model.ParallelCount }}</span>\n }\n @if (model.ParallelConfigParam) {\n <span><strong>Config Param:</strong> {{ model.ParallelConfigParam }}</span>\n }\n </div>\n }\n </div>\n }\n </div>\n </div>\n }\n \n @if (EditMode) {\n <div class=\"add-model-row\" style=\"padding: 12px 16px; text-align: center; background: #f8f9fa; border-top: 1px solid #dee2e6;\">\n <button kendoButton fillMode=\"outline\" themeColor=\"success\" size=\"small\"\n (click)=\"addNewModel()\">\n <i class=\"fa-solid fa-plus\"></i> Add Model\n </button>\n </div>\n }\n }\n }\n </div>\n </div>\n </kendo-expansionpanel>\n }\n\n <!-- Advanced Configuration Expansion Panel -->\n <kendo-expansionpanel \n [expanded]=\"false\"\n style=\"margin-bottom: 12px;\">\n <ng-template kendoExpansionPanelTitleDirective>\n <span style=\"display: flex; align-items: center; gap: 8px; font-weight: 600;\">\n <i class=\"fa-solid fa-cogs\" style=\"color: #6c757d;\"></i>\n Advanced Configuration\n </span>\n </ng-template>\n \n <!-- Direct Content Projection -->\n <div style=\"padding: 16px 0;\">\n <div style=\"display: grid; grid-template-columns: 1fr 1fr; gap: 20px;\">\n \n <!-- Left Column -->\n <div>\n <mj-form-field \n [record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"ParallelizationMode\"\n Type=\"dropdownlist\"\n [EditMode]=\"EditMode\">\n </mj-form-field>\n \n @if (showParallelCount) {\n <mj-form-field \n [record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"ParallelCount\"\n Type=\"numerictextbox\"\n [EditMode]=\"EditMode\">\n </mj-form-field>\n }\n \n @if (showParallelConfigParam) {\n <mj-form-field \n [record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"ParallelConfigParam\"\n Type=\"textbox\"\n [EditMode]=\"EditMode\">\n </mj-form-field>\n }\n \n <mj-form-field \n [record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"OutputType\"\n Type=\"dropdownlist\"\n [EditMode]=\"EditMode\">\n </mj-form-field>\n \n </div>\n \n <!-- Right Column -->\n <div>\n <mj-form-field \n [record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"ValidationBehavior\"\n Type=\"dropdownlist\"\n [EditMode]=\"EditMode\">\n </mj-form-field>\n \n <mj-form-field \n [record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"EnableCaching\"\n Type=\"checkbox\"\n [EditMode]=\"EditMode\">\n </mj-form-field>\n \n <!-- Result Selector Prompt with Tree Selector -->\n <div style=\"margin-bottom: 16px;\">\n <label style=\"display: block; margin-bottom: 4px; font-weight: 600; color: #495057; font-size: 0.9em;\">\n Result Selector Prompt\n </label>\n @if (EditMode) {\n @if (isLoadingResultSelectorData) {\n <div style=\"padding: 8px; color: #6c757d; font-style: italic;\">\n <i class=\"fa-solid fa-spinner fa-spin\"></i> Loading prompts...\n </div>\n } @else {\n <kendo-dropdowntree \n [(ngModel)]=\"record.ResultSelectorPromptID\"\n name=\"resultSelectorPromptID\"\n [data]=\"resultSelectorTreeData\"\n textField=\"text\"\n valueField=\"value\"\n [valuePrimitive]=\"true\"\n [filterable]=\"true\"\n placeholder=\"Select a result selector prompt...\"\n style=\"width: 100%;\"\n (valueChange)=\"onResultSelectorChange($event)\">\n </kendo-dropdowntree>\n }\n } @else {\n <span style=\"color: #495057;\">{{ getPromptDisplayName(record.ResultSelectorPromptID || '') || 'None selected' }}</span>\n }\n </div>\n </div>\n </div>\n </div>\n </kendo-expansionpanel>\n\n <!-- Output Example Expansion Panel (when OutputType = object) -->\n @if (showOutputExample) {\n <kendo-expansionpanel \n [expanded]=\"true\"\n style=\"margin-bottom: 12px;\">\n <ng-template kendoExpansionPanelTitleDirective>\n <span style=\"display: flex; align-items: center; gap: 8px; font-weight: 600;\">\n <i class=\"fa-solid fa-code\" style=\"color: #6c757d;\"></i>\n Output Example (JSON)\n <span style=\"color: #dc3545; font-size: 0.8em; font-weight: normal;\">\u2022 Required for object output type</span>\n </span>\n </ng-template>\n \n <!-- Direct Content Projection -->\n <div style=\"padding: 16px;\">\n @if (EditMode) {\n <mj-code-editor \n [(ngModel)]=\"record.OutputExample\"\n name=\"outputExample\"\n language=\"json\"\n placeholder=\"Enter JSON example structure...\"\n style=\"width: 100%; height: 200px; border: 1px solid #dee2e6; border-radius: 4px;\">\n </mj-code-editor>\n <div style=\"margin-top: 8px; color: #6c757d; font-size: 0.85em;\">\n <i class=\"fa-solid fa-info-circle\"></i> Provide a JSON example that defines the expected structure for object output validation.\n </div>\n } @else if (record.OutputExample) {\n <div style=\"background: #f8f9fa; border: 1px solid #dee2e6; border-radius: 4px; padding: 12px; font-family: 'Courier New', monospace; font-size: 0.9em; white-space: pre-wrap; overflow: auto; max-height: 250px;\">{{ record.OutputExample }}</div>\n } @else {\n <div style=\"background: #fff3cd; border: 1px solid #ffeaa7; border-radius: 4px; padding: 12px; color: #856404; text-align: center;\">\n <i class=\"fa-solid fa-exclamation-triangle\"></i> Output example is required when output type is 'object'\n </div>\n }\n </div>\n </kendo-expansionpanel>\n }\n\n <!-- Execution History Expansion Panel -->\n @if (record.IsSaved) {\n <kendo-expansionpanel \n [expanded]=\"false\"\n style=\"margin-bottom: 12px;\">\n <ng-template kendoExpansionPanelTitleDirective>\n <span style=\"display: flex; align-items: center; gap: 8px; font-weight: 600;\">\n <i class=\"fa-solid fa-history\" style=\"color: #6c757d;\"></i>\n Execution History\n @if (executionHistory.length > 0) {\n <span style=\"color: #6c757d; font-weight: normal;\">({{ executionHistory.length }})</span>\n }\n </span>\n </ng-template>\n \n <!-- Custom Execution History Viewer -->\n <div style=\"padding: 16px;\">\n @if (isLoadingHistory) {\n <div style=\"text-align: center; padding: 40px; color: #6c757d;\">\n <i class=\"fa-solid fa-spinner fa-spin\" style=\"font-size: 2em; margin-bottom: 12px;\"></i>\n <p>Loading execution history...</p>\n </div>\n } @else if (executionHistory.length === 0) {\n <div style=\"text-align: center; padding: 40px; color: #6c757d;\">\n <i class=\"fa-solid fa-history\" style=\"font-size: 3em; margin-bottom: 12px; opacity: 0.3;\"></i>\n <p>No execution history yet</p>\n <p style=\"font-size: 0.9em;\">Run this prompt to see execution history here</p>\n </div>\n } @else {\n <!-- Sort Controls -->\n <div style=\"display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px;\">\n <div style=\"color: #6c757d; font-size: 0.9em;\">\n Showing {{ executionHistory.length }} executions\n </div>\n <div style=\"display: flex; gap: 8px; align-items: center;\">\n <span style=\"color: #6c757d; font-size: 0.85em;\">Sort by:</span>\n <kendo-buttongroup selection=\"single\">\n <button kendoButton \n [selected]=\"historySortField === 'runAt'\"\n (click)=\"changeHistorySort('runAt')\"\n size=\"small\">\n Date\n @if (historySortField === 'runAt') {\n <i [class]=\"'fa-solid fa-sort-' + (historySortDirection === 'asc' ? 'up' : 'down')\" \n style=\"margin-left: 4px; font-size: 0.8em;\"></i>\n }\n </button>\n <button kendoButton \n [selected]=\"historySortField === 'executionTime'\"\n (click)=\"changeHistorySort('executionTime')\"\n size=\"small\">\n Duration\n @if (historySortField === 'executionTime') {\n <i [class]=\"'fa-solid fa-sort-' + (historySortDirection === 'asc' ? 'up' : 'down')\" \n style=\"margin-left: 4px; font-size: 0.8em;\"></i>\n }\n </button>\n <button kendoButton \n [selected]=\"historySortField === 'tokens'\"\n (click)=\"changeHistorySort('tokens')\"\n size=\"small\">\n Tokens\n @if (historySortField === 'tokens') {\n <i [class]=\"'fa-solid fa-sort-' + (historySortDirection === 'asc' ? 'up' : 'down')\" \n style=\"margin-left: 4px; font-size: 0.8em;\"></i>\n }\n </button>\n <button kendoButton \n [selected]=\"historySortField === 'cost'\"\n (click)=\"changeHistorySort('cost')\"\n size=\"small\">\n Cost\n @if (historySortField === 'cost') {\n <i [class]=\"'fa-solid fa-sort-' + (historySortDirection === 'asc' ? 'up' : 'down')\" \n style=\"margin-left: 4px; font-size: 0.8em;\"></i>\n }\n </button>\n </kendo-buttongroup>\n </div>\n </div>\n \n <!-- Execution History Table -->\n <div style=\"border: 1px solid #e9ecef; border-radius: 8px; overflow: hidden;\">\n <table style=\"width: 100%; border-collapse: collapse;\">\n <thead>\n <tr style=\"background: #f8f9fa; border-bottom: 2px solid #e9ecef;\">\n <th style=\"padding: 12px; text-align: left; font-weight: 600; color: #495057;\">Status</th>\n <th style=\"padding: 12px; text-align: left; font-weight: 600; color: #495057;\">Date & Time</th>\n <th style=\"padding: 12px; text-align: left; font-weight: 600; color: #495057;\">Model</th>\n <th style=\"padding: 12px; text-align: left; font-weight: 600; color: #495057;\">Duration</th>\n <th style=\"padding: 12px; text-align: right; font-weight: 600; color: #495057;\">Tokens</th>\n <th style=\"padding: 12px; text-align: right; font-weight: 600; color: #495057;\">Cost</th>\n <th style=\"padding: 12px; text-align: center; font-weight: 600; color: #495057;\">Type</th>\n <th style=\"padding: 12px; text-align: center; font-weight: 600; color: #495057;\">Actions</th>\n </tr>\n </thead>\n <tbody>\n @for (run of executionHistory; track run.ID; let i = $index) {\n <tr class=\"history-row\"\n [class.even-row]=\"i % 2 === 0\"\n style=\"border-bottom: 1px solid #f1f3f5;\">\n <td style=\"padding: 12px;\">\n <span style=\"display: flex; align-items: center; gap: 6px;\">\n <i [class]=\"'fa-solid ' + getExecutionStatusIcon(run.Success)\" \n [style.color]=\"getExecutionStatusColor(run.Success)\"></i>\n <span [style.color]=\"getExecutionStatusColor(run.Success)\" style=\"font-weight: 500;\">\n {{ run.Success === true ? 'Success' : run.Success === false ? 'Failed' : 'Running' }}\n </span>\n </span>\n </td>\n <td style=\"padding: 12px; color: #495057;\">\n {{ run.RunAt | date:'short' }}\n </td>\n <td style=\"padding: 12px; color: #495057;\">\n <span style=\"display: flex; align-items: center; gap: 6px;\">\n <i class=\"fa-solid fa-microchip\" style=\"color: #6c757d;\"></i>\n {{ run.Model || 'Unknown' }}\n </span>\n </td>\n <td style=\"padding: 12px; color: #495057;\">\n {{ formatDuration(run.ExecutionTimeMS) }}\n </td>\n <td style=\"padding: 12px; text-align: right; color: #495057;\">\n {{ formatTokens(run.TokensUsed) }}\n </td>\n <td style=\"padding: 12px; text-align: right; color: #495057;\">\n {{ formatCost(run.TotalCost || run.Cost) }}\n </td>\n <td style=\"padding: 12px; text-align: center;\">\n @if (run.RunType) {\n <span style=\"padding: 4px 8px; border-radius: 12px; background: #e9ecef; \n color: #495057; font-size: 0.85em; font-weight: 500;\">\n {{ run.RunType }}\n </span>\n }\n </td>\n <td style=\"padding: 12px; text-align: center;\">\n <button kendoButton \n fillMode=\"flat\"\n size=\"small\"\n (click)=\"navigateToPromptRun(run.ID)\"\n title=\"View details\">\n <i class=\"fa-solid fa-external-link\"></i>\n </button>\n </td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n }\n </div>\n </kendo-expansionpanel>\n }\n\n <!-- Cache Expansion Panel -->\n @if (record.IsSaved && record.EnableCaching) {\n <kendo-expansionpanel \n [expanded]=\"false\"\n style=\"margin-bottom: 12px;\">\n <ng-template kendoExpansionPanelTitleDirective>\n <span style=\"display: flex; align-items: center; gap: 8px; font-weight: 600;\">\n <i class=\"fa-solid fa-database\" style=\"color: #6c757d;\"></i>\n Result Cache\n </span>\n </ng-template>\n \n <!-- Direct Content Projection -->\n <div style=\"padding: 16px 0;\">\n <mj-user-view-grid \n [Params]=\"BuildRelationshipViewParamsByEntityName('AI Result Cache','AIPromptID')\" \n [NewRecordValues]=\"NewRecordValues('AI Result Cache')\"\n [AllowLoad]=\"true\"\n [EditMode]=\"GridEditMode()\" \n style=\"height: 300px;\">\n </mj-user-view-grid>\n </div>\n </kendo-expansionpanel>\n }\n\n <!-- Related Items Expansion Panel -->\n @if (record.IsSaved) {\n <kendo-expansionpanel \n [expanded]=\"false\"\n style=\"margin-bottom: 12px;\">\n <ng-template kendoExpansionPanelTitleDirective>\n <span style=\"display: flex; align-items: center; gap: 8px; font-weight: 600;\">\n <i class=\"fa-solid fa-link\" style=\"color: #6c757d;\"></i>\n Related Items\n </span>\n </ng-template>\n \n <!-- Direct Content Projection -->\n <div style=\"padding: 16px 0;\">\n <div style=\"display: grid; grid-template-columns: 1fr 1fr; gap: 20px;\">\n <!-- AI Agents -->\n <div>\n <h6 style=\"margin: 0 0 12px 0; color: #495057;\">AI Agents Using This Prompt</h6>\n <mj-user-view-grid \n [Params]=\"BuildRelationshipViewParamsByEntityName('MJ: AI Agent Prompts','PromptID')\" \n [NewRecordValues]=\"NewRecordValues('MJ: AI Agent Prompts')\"\n [AllowLoad]=\"true\"\n [EditMode]=\"GridEditMode()\" \n style=\"height: 200px;\">\n </mj-user-view-grid>\n </div>\n \n <!-- Result Selector References -->\n <div>\n <h6 style=\"margin: 0 0 12px 0; color: #495057;\">Prompts Using This as Result Selector</h6>\n <mj-user-view-grid \n [Params]=\"BuildRelationshipViewParamsByEntityName('AI Prompts','ResultSelectorPromptID')\" \n [NewRecordValues]=\"NewRecordValues('AI Prompts')\"\n [AllowLoad]=\"true\"\n [EditMode]=\"GridEditMode()\" \n style=\"height: 200px;\">\n </mj-user-view-grid>\n </div>\n </div>\n </div>\n </kendo-expansionpanel>\n }\n </div>\n </div>\n </form>\n\n \n <!-- AI Prompt Test Harness -->\n @if (showTestHarness) {\n <kendo-window \n [width]=\"1200\" \n [height]=\"800\" \n [minWidth]=\"800\"\n [minHeight]=\"600\"\n [draggable]=\"true\"\n [resizable]=\"true\"\n [state]=\"'default'\"\n (close)=\"onTestHarnessVisibilityChanged(false)\"\n title=\"Run AI Prompt - {{ record.Name || 'Untitled' }}\">\n <mj-ai-test-harness\n [entity]=\"record\"\n [mode]=\"'prompt'\"\n [isVisible]=\"showTestHarness\"\n (visibilityChange)=\"onTestHarnessVisibilityChanged($event)\">\n </mj-ai-test-harness>\n </kendo-window>\n }\n</div>", styles: [".record-form-container {\n font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n padding: 10px;\n}\n\n.custom-toolbar-actions {\n margin-left: auto;\n}\n\n.status-badge {\n font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n font-weight: 500;\n letter-spacing: 0.02em;\n}\n\n.config-summary {\n position: sticky;\n top: 0;\n max-height: 600px;\n overflow-y: auto;\n}\n\n.config-item {\n padding: 8px 0;\n border-bottom: 1px solid #e9ecef;\n}\n\n.config-item:last-child {\n border-bottom: none;\n}\n\n.template-tab-content {\n background: #fff;\n}\n\n.template-header h5 {\n font-size: 1.1em;\n}\n\n.loading-state,\n.no-template-state,\n.invalid-template-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n\n.no-template-state i,\n.invalid-template-state i {\n opacity: 0.6;\n}\n\n.template-editor-container {\n background: #fff;\n border-radius: 6px;\n}\n\n/* Grid layout adjustments */\n@media (max-width: 1200px) {\n .record-form-container .mj-tab-body > div {\n grid-template-columns: 1fr !important;\n gap: 20px;\n }\n \n .config-summary {\n order: -1;\n position: static;\n max-height: none;\n }\n}\n\n/* Responsive toolbar */\n@media (max-width: 768px) {\n .custom-toolbar-actions {\n flex-direction: column;\n gap: 4px !important;\n }\n \n .status-badge {\n align-self: flex-start;\n }\n}\n\n/* Ensure proper spacing in form sections */\n.record-form-container mj-form-section {\n padding: 16px;\n}\n\n/* Smooth transitions for better UX */\n.status-badge,\n.config-item,\n.template-header {\n transition: all 0.2s ease;\n}\n\n.config-item:hover {\n background-color: rgba(0,0,0,0.02);\n border-radius: 4px;\n margin: 0 -8px;\n padding: 8px;\n}\n\n/* Execution History Table Styles */\n.history-row {\n transition: background 0.2s;\n}\n\n.history-row:not(.even-row) {\n background: #f8f9fa;\n}\n\n.history-row.even-row {\n background: white;\n}\n\n.history-row:hover {\n background: #e9ecef !important;\n}\n\n/* Template Parameters Styles */\n.parameter-card {\n position: relative;\n overflow: hidden;\n}\n\n.parameter-card::before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: 4px;\n background: inherit;\n transition: width 0.2s;\n}\n\n.parameter-card:hover {\n transform: translateY(-2px);\n box-shadow: 0 4px 12px rgba(0,0,0,0.1);\n}\n\n.parameter-card:hover::before {\n width: 6px;\n}\n\n.type-badge {\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.03em;\n transition: transform 0.2s;\n}\n\n.parameter-card:hover .type-badge {\n transform: scale(1.05);\n}\n\n/* Parameter type icons animation */\n.parameter-card i.fa-solid {\n transition: transform 0.3s;\n}\n\n.parameter-card:hover i.fa-solid {\n transform: rotate(360deg);\n}\n\n/* Grid responsive behavior */\n@media (max-width: 768px) {\n .parameter-card {\n margin-bottom: 8px;\n }\n \n .parameter-card h6 {\n font-size: 0.95em;\n }\n \n .type-badge {\n font-size: 0.7em !important;\n }\n}"] }]
|
|
2578
|
-
}], () => [{ type: i0.ElementRef }, { type: i1.SharedService }, { type: i2.Router }, { type: i2.ActivatedRoute }, { type: i0.ChangeDetectorRef }, { type: i3.AITestHarnessDialogService }, { type: i0.ViewContainerRef }], { templateEditor: [{
|
|
3049
|
+
args: [{ selector: 'mj-ai-prompt-form', template: "<div class=\"record-form-container\">\n <!-- Dialog container for Kendo dialogs -->\n <div kendoDialogContainer></div>\n <form *ngIf=\"record\" class=\"record-form\" #form=\"ngForm\" >\n <mj-form-toolbar [form]=\"this\"></mj-form-toolbar>\n\n <!-- Main Content Area - Template Editor and Configuration -->\n <div class=\"prompt-main-area\" style=\"display: flex; flex-direction: column; height: 100%; overflow-y: auto;\">\n \n <!-- Header Section -->\n <div class=\"prompt-header\" style=\"flex-shrink: 0; padding: 20px; background: #f8f9fa; border-bottom: 2px solid #e9ecef;\">\n <div style=\"display: flex; justify-content: space-between; align-items: flex-start; gap: 20px;\">\n \n <!-- Left: Prompt Info -->\n <div style=\"flex: 1; min-width: 0;\">\n <div style=\"display: flex; align-items: center; gap: 12px; margin-bottom: 8px;\">\n <i class=\"fa-solid fa-robot\" style=\"color: #6f42c1; font-size: 1.4em;\"></i>\n @if (EditMode) {\n <kendo-textbox [(ngModel)]=\"record.Name\" \n name=\"promptName\"\n placeholder=\"Enter prompt name...\"\n style=\"font-size: 1.2em; font-weight: 600; min-width: 300px; flex: 1;\">\n </kendo-textbox>\n } @else {\n <h4 style=\"margin: 0; color: #495057; font-weight: 600; flex: 1;\">{{ record.Name || 'Untitled AI Prompt' }}</h4>\n <span class=\"status-badge\" [style.background-color]=\"getStatusBadgeColor()\" \n style=\"color: white; padding: 4px 10px; border-radius: 12px; font-size: 0.75em; font-weight: 500;\">\n {{ record.Status }}\n </span>\n }\n </div>\n \n <!-- Status and Type Editors when in edit mode -->\n @if (EditMode) {\n <div style=\"display: flex; gap: 16px; margin-bottom: 12px; flex-wrap: wrap;\">\n <div>\n <label style=\"display: block; margin-bottom: 4px; font-weight: 600; color: #495057; font-size: 0.9em;\">Status</label>\n <kendo-dropdownlist [(ngModel)]=\"record.Status\"\n name=\"promptStatus\"\n [data]=\"[{text: 'Active', value: 'Active'}, {text: 'Pending', value: 'Pending'}, {text: 'Disabled', value: 'Disabled'}]\"\n textField=\"text\"\n valueField=\"value\"\n [valuePrimitive]=\"true\"\n style=\"width: 150px;\">\n </kendo-dropdownlist>\n </div>\n <div>\n <label style=\"display: block; margin-bottom: 4px; font-weight: 600; color: #495057; font-size: 0.9em;\">\n Type <span style=\"color: #dc3545;\">*</span>\n </label>\n @if (isLoadingPromptTypes) {\n <div style=\"padding: 8px; color: #6c757d; font-style: italic; width: 200px;\">\n <i class=\"fa-solid fa-spinner fa-spin\"></i> Loading types...\n </div>\n } @else {\n <kendo-dropdownlist [(ngModel)]=\"record.TypeID\"\n name=\"promptTypeID\"\n [data]=\"availablePromptTypes\"\n textField=\"Name\"\n valueField=\"ID\"\n [valuePrimitive]=\"true\"\n [filterable]=\"true\"\n placeholder=\"Select prompt type...\"\n style=\"width: 200px;\">\n </kendo-dropdownlist>\n }\n </div>\n </div>\n }\n \n @if (EditMode) {\n <kendo-textarea [(ngModel)]=\"record.Description\" \n name=\"promptDescription\"\n [rows]=\"2\"\n placeholder=\"Enter prompt description...\"\n style=\"width: 100%; max-width: 600px; margin-bottom: 12px;\">\n </kendo-textarea>\n } @else if (record.Description) {\n <p style=\"margin: 0 0 12px 0; color: #6c757d; font-size: 0.9em; line-height: 1.4;\">{{ record.Description }}</p>\n }\n \n <!-- Quick Config Row -->\n <div class=\"quick-config\" style=\"display: flex; align-items: center; gap: 16px; flex-wrap: wrap;\">\n @if (record.TypeID) {\n <div class=\"config-item\" style=\"display: flex; align-items: center; gap: 6px; font-size: 0.85em;\">\n <i class=\"fa-solid fa-tag\" style=\"color: #6c757d;\"></i>\n <span style=\"color: #6c757d;\">Type:</span>\n <span style=\"color: #495057; font-weight: 500;\">{{ getPromptTypeDisplayName(record.TypeID) }}</span>\n </div>\n }\n \n <div class=\"config-item\" style=\"display: flex; align-items: center; gap: 6px; font-size: 0.85em;\">\n <i class=\"fa-solid fa-layer-group\" style=\"color: #6c757d;\"></i>\n <span style=\"color: #6c757d;\">Parallelization:</span>\n <span style=\"color: #495057; font-weight: 500;\">{{ getParallelizationModeDisplay() }}</span>\n </div>\n \n <div class=\"config-item\" style=\"display: flex; align-items: center; gap: 6px; font-size: 0.85em;\">\n <i class=\"fa-solid fa-code\" style=\"color: #6c757d;\"></i>\n <span style=\"color: #6c757d;\">Output:</span>\n <span [style.color]=\"getValidationColor()\" style=\"font-weight: 500;\">{{ getOutputTypeDisplay() }}</span>\n </div>\n \n @if (record.EnableCaching) {\n <div class=\"config-item\" style=\"display: flex; align-items: center; gap: 6px; font-size: 0.85em;\">\n <i class=\"fa-solid fa-database\" style=\"color: #28a745;\"></i>\n <span style=\"color: #28a745; font-weight: 500;\">Caching Enabled</span>\n </div>\n }\n </div>\n </div>\n \n <!-- Right: Action Buttons -->\n <div class=\"action-buttons\" style=\"display: flex; flex-direction: column; gap: 8px; align-items: flex-end;\">\n <div style=\"display: flex; gap: 8px;\">\n @if (record.ID) {\n <button kendoButton [themeColor]=\"'primary'\" [size]=\"'large'\"\n (click)=\"openTestHarness()\"\n title=\"Run AI Prompt Test Harness\">\n <i class=\"fa-solid fa-play\"></i> Run\n </button>\n }\n </div>\n \n @if (!canExecute && record.ID) {\n <div style=\"font-size: 0.75em; color: #dc3545; text-align: right; max-width: 200px;\">\n @if (record.Status !== 'Active') {\n \u2022 Prompt must be Active<br>\n }\n @if (!record.TemplateID) {\n \u2022 Template is required<br>\n }\n @if (!template && record.TemplateID) {\n \u2022 Template not found<br>\n }\n </div>\n }\n </div>\n </div>\n </div>\n\n <!-- Configuration Sections with Expansion Panels -->\n <div class=\"configuration-sections\" style=\"flex: 1; background: white; border-top: 2px solid #e9ecef; padding: 16px; min-height: 0;\">\n <!-- Template Editor Section -->\n <kendo-expansionpanel \n [expanded]=\"true\"\n style=\"margin-bottom: 12px;\">\n <ng-template kendoExpansionPanelTitleDirective>\n <span style=\"display: flex; align-items: center; gap: 8px; font-weight: 600;\">\n <i class=\"fa-solid fa-code\" style=\"color: #6c757d;\"></i>\n Template Editor\n @if (template) {\n <span style=\"color: #6c757d; font-size: 0.9em; font-weight: normal;\">\u2022 {{ template.Name }}</span>\n }\n </span>\n </ng-template>\n \n <!-- Direct Content Projection -->\n <div class=\"template-section\" style=\"display: flex; flex-direction: column; min-height: 400px; padding: 8px;\">\n @if (isLoadingTemplate) {\n <div class=\"loading-state\" style=\"flex: 1; display: flex; align-items: center; justify-content: center; color: #6c757d;\">\n <i class=\"fa-solid fa-spinner fa-spin\" style=\"font-size: 24px; margin-right: 12px;\"></i>\n Loading template...\n </div>\n } @else if (!record.TemplateID) {\n <div class=\"no-template-state\" style=\"flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px; color: #6c757d;\">\n <i class=\"fa-solid fa-code\" style=\"font-size: 64px; margin-bottom: 20px; opacity: 0.3;\"></i>\n <h5 style=\"margin-bottom: 12px; color: #495057;\">No Template Associated</h5>\n <p style=\"margin-bottom: 24px; text-align: center; max-width: 400px;\">\n This AI prompt needs a template to define its structure and parameters. \n Create a new template or link to an existing one.\n </p>\n <div style=\"display: flex; gap: 12px;\">\n @if (UserCanCreateTemplates) {\n <button kendoButton [themeColor]=\"'primary'\" (click)=\"createNewTemplate()\">\n <i class=\"fa-solid fa-plus\"></i> Create New Template\n </button>\n }\n @if (UserCanReadTemplates) {\n <button kendoButton [fillMode]=\"'outline'\" (click)=\"linkExistingTemplate()\">\n <i class=\"fa-solid fa-link\"></i> Link Existing Template\n </button>\n }\n </div>\n </div>\n } @else if (templateNotFoundInDatabase) {\n <div class=\"invalid-template-state\" style=\"flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px; color: #dc3545;\">\n <i class=\"fa-solid fa-exclamation-triangle\" style=\"font-size: 64px; margin-bottom: 20px; opacity: 0.7;\"></i>\n <h5 style=\"margin-bottom: 12px;\">Template Not Found</h5>\n <p style=\"margin-bottom: 24px; text-align: center; max-width: 400px;\">\n The referenced template could not be loaded. It may have been deleted or moved.\n </p>\n <div style=\"display: flex; gap: 12px;\">\n <button kendoButton [fillMode]=\"'outline'\" (click)=\"loadTemplate()\">\n <i class=\"fa-solid fa-refresh\"></i> Retry Loading\n </button>\n @if (UserCanCreateTemplates) {\n <button kendoButton [themeColor]=\"'primary'\" (click)=\"createNewTemplate()\">\n <i class=\"fa-solid fa-plus\"></i> Create New Template\n </button>\n }\n </div>\n </div>\n } @else {\n <!-- Active Template Editor -->\n <div class=\"template-editor-container\" style=\"flex: 1; display: flex; flex-direction: column; min-height: 350px;\">\n <!-- Template Actions Bar -->\n @if (template && EditMode) {\n <div class=\"template-actions\" style=\"display: flex; gap: 8px; padding: 8px; border-bottom: 1px solid #e9ecef; background: #f8f9fa;\">\n @if (UserCanUpdateTemplates) {\n <button kendoButton \n [fillMode]=\"'outline'\" \n [size]=\"'small'\"\n (click)=\"linkExistingTemplate()\"\n title=\"Change to a different template\">\n <i class=\"fa-solid fa-exchange-alt\"></i> Change Template\n </button>\n }\n @if (UserCanReadTemplates) {\n <button kendoButton \n [fillMode]=\"'outline'\" \n [size]=\"'small'\"\n (click)=\"openTemplateInNewWindow()\"\n title=\"Open template in new window\">\n <i class=\"fa-solid fa-external-link-alt\"></i> Open in New Window\n </button>\n }\n </div>\n }\n \n <!-- Template Editor -->\n <div style=\"flex: 1; background: white; border-radius: 6px; border: 1px solid #e9ecef;\">\n <mj-template-editor \n #templateEditor\n [template]=\"template\"\n [config]=\"templateEditorConfig\"\n (contentChange)=\"onTemplateContentChange($event)\"\n (runTemplate)=\"onTemplateRun($event)\"\n style=\"display: block; min-height: 300px;\">\n </mj-template-editor>\n </div>\n </div>\n }\n </div>\n </kendo-expansionpanel> \n\n <!-- Model Configuration Expansion Panel -->\n @if (record.IsSaved) {\n <kendo-expansionpanel \n [expanded]=\"true\"\n style=\"margin-bottom: 12px;\">\n <ng-template kendoExpansionPanelTitleDirective>\n <span style=\"display: flex; align-items: center; gap: 8px; font-weight: 600;\">\n <i class=\"fa-solid fa-microchip\" style=\"color: #6c757d;\"></i>\n Models\n @if (promptModels.length > 0) {\n <span class=\"badge\" style=\"background: #17a2b8; color: white; padding: 2px 6px; border-radius: 10px; font-size: 0.7em;\">\n {{ promptModels.length }}\n </span>\n }\n <span style=\"color: #6c757d; font-size: 0.8em; font-weight: normal; margin-left: 8px;\">\n <i class=\"fa-solid fa-info-circle\" title=\"Models are tried in order from top to bottom. The first available model will be used.\"></i>\n Priority order (first available model will be used)\n </span>\n </span>\n </ng-template>\n \n <!-- Direct Content Projection -->\n <div style=\"padding: 16px 0;\">\n <!-- Model Management Interface -->\n <div class=\"model-management\" style=\"border: 1px solid #dee2e6; border-radius: 6px; background: #f8f9fa;\">\n @if (isLoadingModels) {\n <div class=\"loading-state\" style=\"padding: 20px; text-align: center; color: #6c757d;\">\n <i class=\"fa-solid fa-spinner fa-spin\"></i> Loading models...\n </div>\n } @else {\n @if (promptModels.length === 0) {\n <div class=\"empty-state\" style=\"padding: 20px; text-align: center; color: #6c757d;\">\n <i class=\"fa-solid fa-info-circle\"></i> No models configured\n @if (EditMode && UserCanCreatePromptModels) {\n <div style=\"margin-top: 10px;\">\n <button kendoButton fillMode=\"outline\" themeColor=\"primary\" size=\"small\"\n (click)=\"addNewModel()\">\n <i class=\"fa-solid fa-plus\"></i> Add Model\n </button>\n </div>\n }\n </div>\n } @else {\n <!-- Priority explanation for multiple models -->\n @if (promptModels.length > 1) {\n <div style=\"padding: 12px 16px; background: #e3f2fd; border-bottom: 1px solid #bbdefb; color: #1565c0; font-size: 0.85em;\">\n <i class=\"fa-solid fa-info-circle\" style=\"margin-right: 6px;\"></i>\n Models are tried in priority order (highest priority first). The first available model that meets requirements will be used for execution.\n </div>\n }\n <!-- Column Headers -->\n <div class=\"model-header\" style=\"display: grid; grid-template-columns: 40px 2fr 1fr 1fr 1fr 60px; gap: 12px; padding: 12px 16px; background: #e9ecef; font-weight: 600; font-size: 0.85em; color: #495057; border-bottom: 1px solid #dee2e6;\">\n <div title=\"Priority order - models are tried from top to bottom\">\n <i class=\"fa-solid fa-sort\" style=\"color: #6c757d;\"></i>\n </div>\n <div>AI Model <span style=\"color: #dc3545;\">*</span></div>\n <div>Vendor</div>\n <div>Configuration</div>\n <div>Created</div>\n <div>Actions</div>\n </div>\n \n @for (model of promptModels; track getModelTrackId(model) || $index; let i = $index) {\n <div class=\"model-row\" \n [draggable]=\"EditMode\"\n (dragstart)=\"onDragStart($event, i)\"\n (dragover)=\"onDragOver($event)\"\n (drop)=\"onDrop($event, i)\"\n (dragend)=\"onDragEnd($event)\"\n [style.background]=\"!model.ModelID ? '#fff3cd' : (draggedIndex === i ? '#e3f2fd' : 'white')\"\n [style.border-left]=\"!model.ModelID ? '3px solid #ffc107' : 'none'\"\n [style.opacity]=\"draggedIndex === i ? '0.5' : '1'\"\n style=\"display: grid; grid-template-columns: 40px 2fr 1fr 1fr 1fr 60px; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #e9ecef; align-items: start; transition: background 0.2s, opacity 0.2s;\">\n \n <!-- Drag Handle / Priority -->\n <div class=\"drag-handle\" style=\"display: flex; flex-direction: column; align-items: center; justify-content: center; color: #6c757d;\">\n @if (EditMode) {\n <i class=\"fa-solid fa-grip-vertical\" title=\"Drag to reorder priority\" style=\"cursor: move;\"></i>\n <span style=\"font-size: 0.7em; margin-top: 2px;\">#{{ i + 1 }}</span>\n } @else {\n <span style=\"font-size: 0.9em; font-weight: 600;\" title=\"Priority {{ model.Priority }} - Higher priority numbers are tried first\">#{{ i + 1 }}</span>\n }\n </div>\n \n <!-- Model Selection -->\n <div class=\"model-select\">\n @if (EditMode) {\n <kendo-dropdownlist [(ngModel)]=\"model.ModelID\"\n [name]=\"'modelId_' + getModelTrackId(model)\"\n [data]=\"availableModels\"\n textField=\"Name\"\n valueField=\"ID\"\n [valuePrimitive]=\"true\"\n [filterable]=\"true\"\n placeholder=\"Select a model...\"\n (valueChange)=\"onModelChange($event, i)\"\n style=\"width: 100%;\">\n </kendo-dropdownlist>\n } @else {\n <span style=\"font-weight: 500;\">{{ getModelDisplayName(model.ModelID) }}</span>\n }\n </div>\n \n <!-- Vendor -->\n <div class=\"model-vendor\">\n @if (EditMode) {\n @if (model.ModelID) {\n @if (shouldShowVendorDropdown(model.ModelID)) {\n <kendo-dropdownlist [(ngModel)]=\"model.VendorID\"\n [name]=\"'vendorId_' + getModelTrackId(model)\"\n [data]=\"getVendorsForModelSync(model.ModelID)\"\n textField=\"Name\"\n valueField=\"ID\"\n [valuePrimitive]=\"true\"\n [filterable]=\"true\"\n placeholder=\"Select vendor...\"\n style=\"width: 100%;\">\n <ng-template kendoDropDownListItemTemplate let-dataItem>\n <span [style.color]=\"getVendorStatusColor(model.ModelID, dataItem.ID)\">\n {{ dataItem.Name }}\n @if (getModelVendorStatus(model.ModelID, dataItem.ID) !== 'Active') {\n <span style=\"font-size: 0.8em; margin-left: 4px;\">({{ getModelVendorStatus(model.ModelID, dataItem.ID) }})</span>\n }\n </span>\n </ng-template>\n </kendo-dropdownlist>\n } @else {\n <!-- Single vendor - just show the name -->\n @if (getVendorsForModelSync(model.ModelID).length === 1) {\n <span [style.color]=\"getVendorStatusColor(model.ModelID, getVendorsForModelSync(model.ModelID)[0].ID)\" style=\"font-size: 0.9em; font-weight: 500;\">\n {{ getVendorsForModelSync(model.ModelID)[0].Name }}\n @if (getModelVendorStatus(model.ModelID, getVendorsForModelSync(model.ModelID)[0].ID) !== 'Active') {\n <span style=\"font-size: 0.8em; margin-left: 4px;\">({{ getModelVendorStatus(model.ModelID, getVendorsForModelSync(model.ModelID)[0].ID) }})</span>\n }\n </span>\n } @else {\n <span style=\"color: #6c757d; font-style: italic; font-size: 0.9em;\">No vendors available</span>\n }\n }\n } @else {\n <span style=\"color: #6c757d; font-style: italic; font-size: 0.9em;\">Select model first</span>\n }\n } @else {\n @if (model.VendorID && model.ModelID) {\n <span [style.color]=\"getVendorStatusColor(model.ModelID, model.VendorID)\" style=\"font-size: 0.9em;\">\n {{ getVendorDisplayName(model.VendorID) }}\n @if (getModelVendorStatus(model.ModelID, model.VendorID) !== 'Active') {\n <span style=\"font-size: 0.8em; margin-left: 4px;\">({{ getModelVendorStatus(model.ModelID, model.VendorID) }})</span>\n }\n </span>\n } @else {\n <span style=\"color: #6c757d; font-size: 0.9em;\">-</span>\n }\n }\n </div>\n \n <!-- Configuration -->\n <div class=\"model-configuration\">\n @if (EditMode) {\n @if (isLoadingConfigurations) {\n <div style=\"padding: 4px; color: #6c757d; font-style: italic; font-size: 0.85em;\">\n <i class=\"fa-solid fa-spinner fa-spin\"></i> Loading...\n </div>\n } @else {\n <kendo-dropdownlist [(ngModel)]=\"model.ConfigurationID\"\n [name]=\"'configurationId_' + getModelTrackId(model)\"\n [data]=\"availableConfigurations\"\n textField=\"Name\"\n valueField=\"ID\"\n [valuePrimitive]=\"true\"\n [filterable]=\"true\"\n placeholder=\"Default\"\n (valueChange)=\"onConfigurationChange($event, i)\"\n style=\"width: 100%;\">\n <ng-template kendoDropDownListNoDataTemplate>\n <div style=\"padding: 8px; text-align: center; color: #6c757d;\">\n No configurations available\n </div>\n </ng-template>\n </kendo-dropdownlist>\n }\n } @else {\n <span style=\"font-size: 0.9em;\">{{ getConfigurationDisplayName(model.ConfigurationID) }}</span>\n }\n </div>\n \n <!-- Created Date -->\n <div class=\"model-created\">\n @if (model.ID) {\n <span style=\"color: #6c757d; font-size: 0.8em;\">{{ model.__mj_CreatedAt | date:'short' }}</span>\n } @else {\n <span style=\"color: #28a745; font-size: 0.8em; font-style: italic;\">New</span>\n }\n </div>\n \n <!-- Actions -->\n <div class=\"model-actions\" style=\"display: flex; gap: 2px; flex-direction: column;\">\n @if (EditMode) {\n <div style=\"display: flex; gap: 2px; margin-bottom: 4px;\">\n @if (UserCanUpdatePromptModels) {\n <button kendoButton fillMode=\"flat\" size=\"small\"\n (click)=\"moveModelUp(i)\"\n [disabled]=\"i === 0\"\n title=\"Move up\">\n <i class=\"fa-solid fa-chevron-up\"></i>\n </button>\n <button kendoButton fillMode=\"flat\" size=\"small\"\n (click)=\"moveModelDown(i)\"\n [disabled]=\"i === promptModels.length - 1\"\n title=\"Move down\">\n <i class=\"fa-solid fa-chevron-down\"></i>\n </button>\n }\n </div>\n @if (UserCanDeletePromptModels) {\n <button kendoButton fillMode=\"flat\" themeColor=\"error\" size=\"small\"\n (click)=\"removePromptModel(i)\"\n title=\"Remove model\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n }\n }\n </div>\n </div>\n \n <!-- Second row with additional details -->\n <div style=\"display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 8px 16px; border-bottom: 1px solid #e9ecef; background: #f8f9fa; font-size: 0.85em; color: #6c757d;\">\n <div></div>\n <div>\n <!-- Basic model details -->\n <div style=\"display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin-bottom: 8px;\">\n @if (model.Status) {\n <span><strong>Status:</strong> {{ model.Status }}</span>\n }\n </div>\n \n <!-- Parallel execution fields when prompt is ModelSpecific -->\n @if (record.ParallelizationMode === 'ModelSpecific') {\n <div style=\"padding: 8px; background: #fff; border: 1px solid #dee2e6; border-radius: 4px; margin-top: 8px;\">\n <div style=\"margin-bottom: 6px; font-weight: 600; color: #495057; font-size: 0.9em;\">\n <i class=\"fa-solid fa-layer-group\"></i> Model-Specific Parallel Execution\n </div>\n \n @if (EditMode) {\n <div style=\"display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; align-items: center;\">\n <!-- Parallel Mode -->\n <div>\n <label style=\"display: block; margin-bottom: 2px; font-size: 0.8em; font-weight: 600; color: #495057;\">Parallel Mode</label>\n <kendo-dropdownlist [(ngModel)]=\"model.ParallelizationMode\"\n [name]=\"'parallelMode_' + i\"\n [data]=\"[{text: 'None', value: 'None'}, {text: 'Static Count', value: 'StaticCount'}, {text: 'Config Param', value: 'ConfigParam'}]\"\n textField=\"text\"\n valueField=\"value\"\n [valuePrimitive]=\"true\"\n placeholder=\"Select mode...\"\n style=\"width: 100%; font-size: 0.85em;\">\n </kendo-dropdownlist>\n </div>\n \n <!-- Parallel Count (when StaticCount) -->\n @if (model.ParallelizationMode === 'StaticCount') {\n <div>\n <label style=\"display: block; margin-bottom: 2px; font-size: 0.8em; font-weight: 600; color: #495057;\">Parallel Count</label>\n <kendo-numerictextbox [(ngModel)]=\"model.ParallelCount\"\n [name]=\"'parallelCount_' + i\"\n [min]=\"1\"\n [step]=\"1\"\n [format]=\"'n0'\"\n placeholder=\"Count...\"\n style=\"width: 100%; font-size: 0.85em;\">\n </kendo-numerictextbox>\n </div>\n }\n \n <!-- Config Param (when ConfigParam) -->\n @if (model.ParallelizationMode === 'ConfigParam') {\n <div>\n <label style=\"display: block; margin-bottom: 2px; font-size: 0.8em; font-weight: 600; color: #495057;\">Config Parameter</label>\n <kendo-textbox [(ngModel)]=\"model.ParallelConfigParam\"\n [name]=\"'parallelConfigParam_' + i\"\n placeholder=\"Parameter name...\"\n style=\"width: 100%; font-size: 0.85em;\">\n </kendo-textbox>\n </div>\n }\n </div>\n } @else {\n <!-- Read-only display -->\n <div style=\"display: flex; gap: 16px; flex-wrap: wrap; align-items: center;\">\n @if (model.ParallelizationMode) {\n <span><strong>Parallel Mode:</strong> {{ model.ParallelizationMode }}</span>\n }\n @if (model.ParallelCount) {\n <span><strong>Parallel Count:</strong> {{ model.ParallelCount }}</span>\n }\n @if (model.ParallelConfigParam) {\n <span><strong>Config Param:</strong> {{ model.ParallelConfigParam }}</span>\n }\n </div>\n }\n </div>\n }\n </div>\n </div>\n }\n \n @if (EditMode && UserCanCreatePromptModels) {\n <div class=\"add-model-row\" style=\"padding: 12px 16px; text-align: center; background: #f8f9fa; border-top: 1px solid #dee2e6;\">\n <button kendoButton fillMode=\"outline\" themeColor=\"success\" size=\"small\"\n (click)=\"addNewModel()\">\n <i class=\"fa-solid fa-plus\"></i> Add Model\n </button>\n </div>\n }\n }\n }\n </div>\n </div>\n </kendo-expansionpanel>\n }\n\n <!-- Advanced Configuration Expansion Panel -->\n <kendo-expansionpanel \n [expanded]=\"false\"\n style=\"margin-bottom: 12px;\">\n <ng-template kendoExpansionPanelTitleDirective>\n <span style=\"display: flex; align-items: center; gap: 8px; font-weight: 600;\">\n <i class=\"fa-solid fa-cogs\" style=\"color: #6c757d;\"></i>\n Advanced Configuration\n </span>\n </ng-template>\n \n <!-- Direct Content Projection -->\n <div style=\"padding: 16px 0;\">\n <div style=\"display: grid; grid-template-columns: 1fr 1fr; gap: 20px;\">\n \n <!-- Left Column -->\n <div>\n <mj-form-field \n [record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"ParallelizationMode\"\n Type=\"dropdownlist\"\n [EditMode]=\"EditMode\">\n </mj-form-field>\n \n @if (showParallelCount) {\n <mj-form-field \n [record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"ParallelCount\"\n Type=\"numerictextbox\"\n [EditMode]=\"EditMode\">\n </mj-form-field>\n }\n \n @if (showParallelConfigParam) {\n <mj-form-field \n [record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"ParallelConfigParam\"\n Type=\"textbox\"\n [EditMode]=\"EditMode\">\n </mj-form-field>\n }\n \n <mj-form-field \n [record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"OutputType\"\n Type=\"dropdownlist\"\n [EditMode]=\"EditMode\">\n </mj-form-field>\n \n </div>\n \n <!-- Right Column -->\n <div>\n <mj-form-field \n [record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"ValidationBehavior\"\n Type=\"dropdownlist\"\n [EditMode]=\"EditMode\">\n </mj-form-field>\n \n <mj-form-field \n [record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"EnableCaching\"\n Type=\"checkbox\"\n [EditMode]=\"EditMode\">\n </mj-form-field>\n \n <!-- Result Selector Prompt with Tree Selector -->\n <div style=\"margin-bottom: 16px;\">\n <label style=\"display: block; margin-bottom: 4px; font-weight: 600; color: #495057; font-size: 0.9em;\">\n Result Selector Prompt\n </label>\n @if (EditMode) {\n @if (isLoadingResultSelectorData) {\n <div style=\"padding: 8px; color: #6c757d; font-style: italic;\">\n <i class=\"fa-solid fa-spinner fa-spin\"></i> Loading prompts...\n </div>\n } @else {\n <kendo-dropdowntree \n [(ngModel)]=\"record.ResultSelectorPromptID\"\n name=\"resultSelectorPromptID\"\n [data]=\"resultSelectorTreeData\"\n textField=\"text\"\n valueField=\"value\"\n [valuePrimitive]=\"true\"\n [filterable]=\"true\"\n placeholder=\"Select a result selector prompt...\"\n style=\"width: 100%;\"\n (valueChange)=\"onResultSelectorChange($event)\">\n </kendo-dropdowntree>\n }\n } @else {\n <span style=\"color: #495057;\">{{ getPromptDisplayName(record.ResultSelectorPromptID || '') || 'None selected' }}</span>\n }\n </div>\n </div>\n </div>\n </div>\n </kendo-expansionpanel>\n\n <!-- Template Parameters Expansion Panel -->\n @if (template && templateParams.length > 0) {\n <kendo-expansionpanel \n [expanded]=\"false\"\n style=\"margin-bottom: 12px;\">\n <ng-template kendoExpansionPanelTitleDirective>\n <span style=\"display: flex; align-items: center; gap: 8px; font-weight: 600;\">\n <i class=\"fa-solid fa-sliders\" style=\"color: #6c757d;\"></i>\n Template Parameters\n <span class=\"badge\" style=\"background: #6f42c1; color: white; padding: 2px 6px; border-radius: 10px; font-size: 0.7em;\">\n {{ templateParams.length }}\n </span>\n <span style=\"color: #6c757d; font-size: 0.8em; font-weight: normal; margin-left: 8px;\">\n <i class=\"fa-solid fa-info-circle\" title=\"These parameters are defined in the template and will be available when executing this prompt\"></i>\n Parameters defined in the template\n </span>\n </span>\n </ng-template>\n \n <!-- Template Parameters Display -->\n <div style=\"padding: 16px 0;\">\n @if (isLoadingTemplateParams) {\n <div class=\"loading-state\" style=\"padding: 20px; text-align: center; color: #6c757d;\">\n <i class=\"fa-solid fa-spinner fa-spin\"></i> Loading template parameters...\n </div>\n } @else if (templateParams.length === 0) {\n <div class=\"empty-state\" style=\"padding: 20px; text-align: center; color: #6c757d;\">\n <i class=\"fa-solid fa-info-circle\"></i> This template has no parameters defined\n </div>\n } @else {\n <!-- Parameters Grid -->\n <div style=\"display: grid; gap: 12px;\">\n @for (param of templateParams; track param.ID) {\n <div class=\"parameter-card\" \n style=\"border: 1px solid #e9ecef; border-radius: 8px; padding: 16px; background: #f8f9fa; transition: all 0.2s;\"\n [style.border-left]=\"'4px solid ' + getParamTypeColor(param.Type)\">\n \n <!-- Parameter Header -->\n <div style=\"display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px;\">\n <div style=\"display: flex; align-items: center; gap: 8px;\">\n <i [class]=\"'fa-solid ' + getParamTypeIcon(param.Type)\" \n [style.color]=\"getParamTypeColor(param.Type)\"\n style=\"font-size: 1.2em;\"></i>\n <h6 style=\"margin: 0; color: #495057; font-weight: 600;\">\n {{ param.Name }}\n @if (param.IsRequired) {\n <span style=\"color: #dc3545; font-size: 0.9em; margin-left: 4px;\">*</span>\n }\n </h6>\n </div>\n <div style=\"display: flex; align-items: center; gap: 8px;\">\n <span class=\"type-badge\" \n [style.background-color]=\"getParamTypeColor(param.Type)\"\n style=\"color: white; padding: 4px 8px; border-radius: 12px; font-size: 0.75em; font-weight: 500;\">\n {{ param.Type }}\n </span>\n @if (param.IsRequired) {\n <span style=\"color: #dc3545; font-size: 0.85em; font-weight: 500;\">Required</span>\n } @else {\n <span style=\"color: #6c757d; font-size: 0.85em;\">Optional</span>\n }\n </div>\n </div>\n \n <!-- Parameter Description -->\n @if (param.Description) {\n <p style=\"margin: 0 0 8px 0; color: #6c757d; font-size: 0.9em; line-height: 1.4;\">\n {{ param.Description }}\n </p>\n }\n \n <!-- Type-specific Information -->\n <div style=\"font-size: 0.85em; color: #495057;\">\n <span style=\"display: flex; align-items: center; gap: 4px; margin-bottom: 4px;\">\n <i class=\"fa-solid fa-info-circle\" style=\"color: #6c757d;\"></i>\n {{ getParamTypeDescription(param) }}\n </span>\n </div>\n \n <!-- Additional Parameter Details -->\n <div style=\"display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 12px;\">\n @if (param.DefaultValue) {\n <div style=\"background: white; padding: 8px 12px; border-radius: 4px; border: 1px solid #dee2e6;\">\n <label style=\"display: block; font-size: 0.8em; color: #6c757d; margin-bottom: 2px;\">Default Value</label>\n <code style=\"font-size: 0.85em; color: #495057; word-break: break-all;\">{{ param.DefaultValue }}</code>\n </div>\n }\n \n @if (param.EntityID) {\n <div style=\"background: white; padding: 8px 12px; border-radius: 4px; border: 1px solid #dee2e6;\">\n <label style=\"display: block; font-size: 0.8em; color: #6c757d; margin-bottom: 2px;\">Entity</label>\n <span style=\"font-size: 0.85em; color: #495057;\">{{ param.Entity || 'Entity ID: ' + param.EntityID }}</span>\n </div>\n }\n \n @if (param.LinkedParameterName) {\n <div style=\"background: white; padding: 8px 12px; border-radius: 4px; border: 1px solid #dee2e6;\">\n <label style=\"display: block; font-size: 0.8em; color: #6c757d; margin-bottom: 2px;\">Linked To</label>\n <span style=\"font-size: 0.85em; color: #495057;\">\n {{ param.LinkedParameterName }}\n @if (param.LinkedParameterField) {\n ({{ param.LinkedParameterField }})\n }\n </span>\n </div>\n }\n \n @if (param.ExtraFilter) {\n <div style=\"background: white; padding: 8px 12px; border-radius: 4px; border: 1px solid #dee2e6;\">\n <label style=\"display: block; font-size: 0.8em; color: #6c757d; margin-bottom: 2px;\">Filter</label>\n <code style=\"font-size: 0.8em; color: #495057; word-break: break-all;\">{{ param.ExtraFilter }}</code>\n </div>\n }\n \n @if (param.RecordID) {\n <div style=\"background: white; padding: 8px 12px; border-radius: 4px; border: 1px solid #dee2e6;\">\n <label style=\"display: block; font-size: 0.8em; color: #6c757d; margin-bottom: 2px;\">Record ID</label>\n <code style=\"font-size: 0.85em; color: #495057;\">{{ param.RecordID }}</code>\n </div>\n }\n </div>\n </div>\n }\n </div>\n \n <!-- Help Text -->\n <div style=\"margin-top: 16px; padding: 12px; background: #e3f2fd; border-radius: 6px; border: 1px solid #bbdefb;\">\n <div style=\"display: flex; align-items: flex-start; gap: 8px;\">\n <i class=\"fa-solid fa-lightbulb\" style=\"color: #1976d2; margin-top: 2px;\"></i>\n <div style=\"flex: 1; font-size: 0.85em; color: #1565c0; line-height: 1.5;\">\n <strong>Using Template Parameters:</strong> When executing this prompt, you'll be prompted to provide values for all required parameters. \n Parameters can be simple values (text, numbers) or complex data structures (JSON objects, database records, or entire entity collections).\n The template will use these parameters to generate dynamic content based on the values provided at execution time.\n </div>\n </div>\n </div>\n }\n </div>\n </kendo-expansionpanel>\n }\n\n <!-- Output Example Expansion Panel (when OutputType = object) -->\n @if (showOutputExample) {\n <kendo-expansionpanel \n [expanded]=\"true\"\n style=\"margin-bottom: 12px;\">\n <ng-template kendoExpansionPanelTitleDirective>\n <span style=\"display: flex; align-items: center; gap: 8px; font-weight: 600;\">\n <i class=\"fa-solid fa-code\" style=\"color: #6c757d;\"></i>\n Output Example (JSON)\n <span style=\"color: #dc3545; font-size: 0.8em; font-weight: normal;\">\u2022 Required for object output type</span>\n </span>\n </ng-template>\n \n <!-- Direct Content Projection -->\n <div style=\"padding: 16px;\">\n @if (EditMode) {\n <mj-code-editor \n [(ngModel)]=\"record.OutputExample\"\n name=\"outputExample\"\n language=\"json\"\n placeholder=\"Enter JSON example structure...\"\n style=\"width: 100%; height: 200px; border: 1px solid #dee2e6; border-radius: 4px;\">\n </mj-code-editor>\n <div style=\"margin-top: 8px; color: #6c757d; font-size: 0.85em;\">\n <i class=\"fa-solid fa-info-circle\"></i> Provide a JSON example that defines the expected structure for object output validation.\n </div>\n } @else if (record.OutputExample) {\n <div style=\"background: #f8f9fa; border: 1px solid #dee2e6; border-radius: 4px; padding: 12px; font-family: 'Courier New', monospace; font-size: 0.9em; white-space: pre-wrap; overflow: auto; max-height: 250px;\">{{ record.OutputExample }}</div>\n } @else {\n <div style=\"background: #fff3cd; border: 1px solid #ffeaa7; border-radius: 4px; padding: 12px; color: #856404; text-align: center;\">\n <i class=\"fa-solid fa-exclamation-triangle\"></i> Output example is required when output type is 'object'\n </div>\n }\n </div>\n </kendo-expansionpanel>\n }\n\n <!-- Execution History Expansion Panel -->\n @if (record.IsSaved) {\n <kendo-expansionpanel \n [expanded]=\"false\"\n style=\"margin-bottom: 12px;\">\n <ng-template kendoExpansionPanelTitleDirective>\n <span style=\"display: flex; align-items: center; gap: 8px; font-weight: 600;\">\n <i class=\"fa-solid fa-history\" style=\"color: #6c757d;\"></i>\n Execution History\n @if (executionHistory.length > 0) {\n <span style=\"color: #6c757d; font-weight: normal;\">({{ executionHistory.length }})</span>\n }\n </span>\n </ng-template>\n \n <!-- Custom Execution History Viewer -->\n <div style=\"padding: 16px;\">\n @if (isLoadingHistory) {\n <div style=\"text-align: center; padding: 40px; color: #6c757d;\">\n <i class=\"fa-solid fa-spinner fa-spin\" style=\"font-size: 2em; margin-bottom: 12px;\"></i>\n <p>Loading execution history...</p>\n </div>\n } @else if (executionHistory.length === 0) {\n <div style=\"text-align: center; padding: 40px; color: #6c757d;\">\n <i class=\"fa-solid fa-history\" style=\"font-size: 3em; margin-bottom: 12px; opacity: 0.3;\"></i>\n <p>No execution history yet</p>\n <p style=\"font-size: 0.9em;\">Run this prompt to see execution history here</p>\n </div>\n } @else {\n <!-- Sort Controls -->\n <div style=\"display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px;\">\n <div style=\"color: #6c757d; font-size: 0.9em;\">\n Showing {{ executionHistory.length }} executions\n </div>\n <div style=\"display: flex; gap: 8px; align-items: center;\">\n <span style=\"color: #6c757d; font-size: 0.85em;\">Sort by:</span>\n <kendo-buttongroup selection=\"single\">\n <button kendoButton \n [selected]=\"historySortField === 'runAt'\"\n (click)=\"changeHistorySort('runAt')\"\n size=\"small\">\n Date\n @if (historySortField === 'runAt') {\n <i [class]=\"'fa-solid fa-sort-' + (historySortDirection === 'asc' ? 'up' : 'down')\" \n style=\"margin-left: 4px; font-size: 0.8em;\"></i>\n }\n </button>\n <button kendoButton \n [selected]=\"historySortField === 'executionTime'\"\n (click)=\"changeHistorySort('executionTime')\"\n size=\"small\">\n Duration\n @if (historySortField === 'executionTime') {\n <i [class]=\"'fa-solid fa-sort-' + (historySortDirection === 'asc' ? 'up' : 'down')\" \n style=\"margin-left: 4px; font-size: 0.8em;\"></i>\n }\n </button>\n <button kendoButton \n [selected]=\"historySortField === 'tokens'\"\n (click)=\"changeHistorySort('tokens')\"\n size=\"small\">\n Tokens\n @if (historySortField === 'tokens') {\n <i [class]=\"'fa-solid fa-sort-' + (historySortDirection === 'asc' ? 'up' : 'down')\" \n style=\"margin-left: 4px; font-size: 0.8em;\"></i>\n }\n </button>\n <button kendoButton \n [selected]=\"historySortField === 'cost'\"\n (click)=\"changeHistorySort('cost')\"\n size=\"small\">\n Cost\n @if (historySortField === 'cost') {\n <i [class]=\"'fa-solid fa-sort-' + (historySortDirection === 'asc' ? 'up' : 'down')\" \n style=\"margin-left: 4px; font-size: 0.8em;\"></i>\n }\n </button>\n </kendo-buttongroup>\n </div>\n </div>\n \n <!-- Execution History Table -->\n <div style=\"border: 1px solid #e9ecef; border-radius: 8px; overflow: hidden;\">\n <table style=\"width: 100%; border-collapse: collapse;\">\n <thead>\n <tr style=\"background: #f8f9fa; border-bottom: 2px solid #e9ecef;\">\n <th style=\"padding: 12px; text-align: left; font-weight: 600; color: #495057;\">Status</th>\n <th style=\"padding: 12px; text-align: left; font-weight: 600; color: #495057;\">Date & Time</th>\n <th style=\"padding: 12px; text-align: left; font-weight: 600; color: #495057;\">Model</th>\n <th style=\"padding: 12px; text-align: left; font-weight: 600; color: #495057;\">Duration</th>\n <th style=\"padding: 12px; text-align: right; font-weight: 600; color: #495057;\">Tokens</th>\n <th style=\"padding: 12px; text-align: right; font-weight: 600; color: #495057;\">Cost</th>\n <th style=\"padding: 12px; text-align: center; font-weight: 600; color: #495057;\">Type</th>\n <th style=\"padding: 12px; text-align: center; font-weight: 600; color: #495057;\">Actions</th>\n </tr>\n </thead>\n <tbody>\n @for (run of executionHistory; track run.ID; let i = $index) {\n <tr class=\"history-row\"\n [class.even-row]=\"i % 2 === 0\"\n style=\"border-bottom: 1px solid #f1f3f5;\">\n <td style=\"padding: 12px;\">\n <span style=\"display: flex; align-items: center; gap: 6px;\">\n <i [class]=\"'fa-solid ' + getExecutionStatusIcon(run.Success)\" \n [style.color]=\"getExecutionStatusColor(run.Success)\"></i>\n <span [style.color]=\"getExecutionStatusColor(run.Success)\" style=\"font-weight: 500;\">\n {{ run.Success === true ? 'Success' : run.Success === false ? 'Failed' : 'Running' }}\n </span>\n </span>\n </td>\n <td style=\"padding: 12px; color: #495057;\">\n {{ run.RunAt | date:'short' }}\n </td>\n <td style=\"padding: 12px; color: #495057;\">\n <span style=\"display: flex; align-items: center; gap: 6px;\">\n <i class=\"fa-solid fa-microchip\" style=\"color: #6c757d;\"></i>\n {{ run.Model || 'Unknown' }}\n </span>\n </td>\n <td style=\"padding: 12px; color: #495057;\">\n {{ formatDuration(run.ExecutionTimeMS) }}\n </td>\n <td style=\"padding: 12px; text-align: right; color: #495057;\">\n {{ formatTokens(run.TokensUsed) }}\n </td>\n <td style=\"padding: 12px; text-align: right; color: #495057;\">\n {{ formatCost(run.TotalCost || run.Cost) }}\n </td>\n <td style=\"padding: 12px; text-align: center;\">\n @if (run.RunType) {\n <span style=\"padding: 4px 8px; border-radius: 12px; background: #e9ecef; \n color: #495057; font-size: 0.85em; font-weight: 500;\">\n {{ run.RunType }}\n </span>\n }\n </td>\n <td style=\"padding: 12px; text-align: center;\">\n <button kendoButton \n fillMode=\"flat\"\n size=\"small\"\n (click)=\"navigateToPromptRun(run.ID)\"\n title=\"View details\">\n <i class=\"fa-solid fa-external-link\"></i>\n </button>\n </td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n }\n </div>\n </kendo-expansionpanel>\n }\n\n <!-- Cache Expansion Panel -->\n @if (record.IsSaved && record.EnableCaching) {\n <kendo-expansionpanel \n [expanded]=\"false\"\n style=\"margin-bottom: 12px;\">\n <ng-template kendoExpansionPanelTitleDirective>\n <span style=\"display: flex; align-items: center; gap: 8px; font-weight: 600;\">\n <i class=\"fa-solid fa-database\" style=\"color: #6c757d;\"></i>\n Result Cache\n </span>\n </ng-template>\n \n <!-- Direct Content Projection -->\n <div style=\"padding: 16px 0;\">\n <mj-user-view-grid \n [Params]=\"BuildRelationshipViewParamsByEntityName('AI Result Cache','AIPromptID')\" \n [NewRecordValues]=\"NewRecordValues('AI Result Cache')\"\n [AllowLoad]=\"true\"\n [EditMode]=\"GridEditMode()\" \n style=\"height: 300px;\">\n </mj-user-view-grid>\n </div>\n </kendo-expansionpanel>\n }\n\n <!-- Related Items Expansion Panel -->\n @if (record.IsSaved) {\n <kendo-expansionpanel \n [expanded]=\"false\"\n style=\"margin-bottom: 12px;\">\n <ng-template kendoExpansionPanelTitleDirective>\n <span style=\"display: flex; align-items: center; gap: 8px; font-weight: 600;\">\n <i class=\"fa-solid fa-link\" style=\"color: #6c757d;\"></i>\n Related Items\n </span>\n </ng-template>\n \n <!-- Direct Content Projection -->\n <div style=\"padding: 16px 0;\">\n <div style=\"display: grid; grid-template-columns: 1fr 1fr; gap: 20px;\">\n <!-- AI Agents -->\n <div>\n <h6 style=\"margin: 0 0 12px 0; color: #495057;\">AI Agents Using This Prompt</h6>\n <mj-user-view-grid \n [Params]=\"BuildRelationshipViewParamsByEntityName('MJ: AI Agent Prompts','PromptID')\" \n [NewRecordValues]=\"NewRecordValues('MJ: AI Agent Prompts')\"\n [AllowLoad]=\"true\"\n [EditMode]=\"GridEditMode()\" \n style=\"height: 200px;\">\n </mj-user-view-grid>\n </div>\n \n <!-- Result Selector References -->\n <div>\n <h6 style=\"margin: 0 0 12px 0; color: #495057;\">Prompts Using This as Result Selector</h6>\n <mj-user-view-grid \n [Params]=\"BuildRelationshipViewParamsByEntityName('AI Prompts','ResultSelectorPromptID')\" \n [NewRecordValues]=\"NewRecordValues('AI Prompts')\"\n [AllowLoad]=\"true\"\n [EditMode]=\"GridEditMode()\" \n style=\"height: 200px;\">\n </mj-user-view-grid>\n </div>\n </div>\n </div>\n </kendo-expansionpanel>\n }\n </div>\n </div>\n </form>\n\n \n <!-- AI Prompt Test Harness -->\n @if (showTestHarness) {\n <kendo-window \n [width]=\"1200\" \n [height]=\"800\" \n [minWidth]=\"800\"\n [minHeight]=\"600\"\n [draggable]=\"true\"\n [resizable]=\"true\"\n [state]=\"'default'\"\n (close)=\"onTestHarnessVisibilityChanged(false)\"\n title=\"Run AI Prompt - {{ record.Name || 'Untitled' }}\">\n <mj-ai-test-harness\n [entity]=\"record\"\n [mode]=\"'prompt'\"\n [isVisible]=\"showTestHarness\"\n (visibilityChange)=\"onTestHarnessVisibilityChanged($event)\">\n </mj-ai-test-harness>\n </kendo-window>\n }\n</div>", styles: [".record-form-container {\n font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n padding: 10px;\n}\n\n.custom-toolbar-actions {\n margin-left: auto;\n}\n\n.status-badge {\n font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n font-weight: 500;\n letter-spacing: 0.02em;\n}\n\n.config-summary {\n position: sticky;\n top: 0;\n max-height: 600px;\n overflow-y: auto;\n}\n\n.config-item {\n padding: 8px 0;\n border-bottom: 1px solid #e9ecef;\n}\n\n.config-item:last-child {\n border-bottom: none;\n}\n\n.template-tab-content {\n background: #fff;\n}\n\n.template-header h5 {\n font-size: 1.1em;\n}\n\n.loading-state,\n.no-template-state,\n.invalid-template-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n\n.no-template-state i,\n.invalid-template-state i {\n opacity: 0.6;\n}\n\n.template-editor-container {\n background: #fff;\n border-radius: 6px;\n}\n\n/* Grid layout adjustments */\n@media (max-width: 1200px) {\n .record-form-container .mj-tab-body > div {\n grid-template-columns: 1fr !important;\n gap: 20px;\n }\n \n .config-summary {\n order: -1;\n position: static;\n max-height: none;\n }\n}\n\n/* Responsive toolbar */\n@media (max-width: 768px) {\n .custom-toolbar-actions {\n flex-direction: column;\n gap: 4px !important;\n }\n \n .status-badge {\n align-self: flex-start;\n }\n}\n\n/* Ensure proper spacing in form sections */\n.record-form-container mj-form-section {\n padding: 16px;\n}\n\n/* Smooth transitions for better UX */\n.status-badge,\n.config-item,\n.template-header {\n transition: all 0.2s ease;\n}\n\n.config-item:hover {\n background-color: rgba(0,0,0,0.02);\n border-radius: 4px;\n margin: 0 -8px;\n padding: 8px;\n}\n\n/* Execution History Table Styles */\n.history-row {\n transition: background 0.2s;\n}\n\n.history-row:not(.even-row) {\n background: #f8f9fa;\n}\n\n.history-row.even-row {\n background: white;\n}\n\n.history-row:hover {\n background: #e9ecef !important;\n}\n\n/* Template Parameters Styles */\n.parameter-card {\n position: relative;\n overflow: hidden;\n}\n\n.parameter-card::before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: 4px;\n background: inherit;\n transition: width 0.2s;\n}\n\n.parameter-card:hover {\n transform: translateY(-2px);\n box-shadow: 0 4px 12px rgba(0,0,0,0.1);\n}\n\n.parameter-card:hover::before {\n width: 6px;\n}\n\n.type-badge {\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.03em;\n transition: transform 0.2s;\n}\n\n.parameter-card:hover .type-badge {\n transform: scale(1.05);\n}\n\n/* Parameter type icons animation */\n.parameter-card i.fa-solid {\n transition: transform 0.3s;\n}\n\n.parameter-card:hover i.fa-solid {\n transform: rotate(360deg);\n}\n\n/* Grid responsive behavior */\n@media (max-width: 768px) {\n .parameter-card {\n margin-bottom: 8px;\n }\n \n .parameter-card h6 {\n font-size: 0.95em;\n }\n \n .type-badge {\n font-size: 0.7em !important;\n }\n}"] }]
|
|
3050
|
+
}], () => [{ type: i0.ElementRef }, { type: i1.SharedService }, { type: i2.Router }, { type: i2.ActivatedRoute }, { type: i0.ChangeDetectorRef }, { type: i3.AITestHarnessDialogService }, { type: i0.ViewContainerRef }, { type: i4.AIPromptManagementService }], { templateEditor: [{
|
|
2579
3051
|
type: ViewChild,
|
|
2580
3052
|
args: ['templateEditor']
|
|
2581
3053
|
}] }); })();
|
|
2582
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(AIPromptFormComponentExtended, { className: "AIPromptFormComponentExtended", filePath: "src/lib/custom/AIPrompts/ai-prompt-form.component.ts", lineNumber:
|
|
3054
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(AIPromptFormComponentExtended, { className: "AIPromptFormComponentExtended", filePath: "src/lib/custom/AIPrompts/ai-prompt-form.component.ts", lineNumber: 21 }); })();
|
|
2583
3055
|
export function LoadAIPromptFormComponentExtended() {
|
|
2584
3056
|
// This function ensures the class isn't tree-shaken and registers it with MemberJunction
|
|
2585
3057
|
}
|