@memberjunction/ng-core-entity-forms 2.50.0 → 2.52.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/README.md +215 -1
- package/dist/lib/custom/AIAgents/ai-agent-form.component.d.ts +171 -11
- package/dist/lib/custom/AIAgents/ai-agent-form.component.d.ts.map +1 -1
- package/dist/lib/custom/AIAgents/ai-agent-form.component.js +1411 -145
- package/dist/lib/custom/AIAgents/ai-agent-form.component.js.map +1 -1
- package/dist/lib/custom/AIPromptRuns/ai-prompt-run-form.component.d.ts +40 -0
- package/dist/lib/custom/AIPromptRuns/ai-prompt-run-form.component.d.ts.map +1 -0
- package/dist/lib/custom/AIPromptRuns/ai-prompt-run-form.component.js +965 -0
- package/dist/lib/custom/AIPromptRuns/ai-prompt-run-form.component.js.map +1 -0
- package/dist/lib/custom/AIPrompts/ai-prompt-form.component.d.ts +80 -5
- package/dist/lib/custom/AIPrompts/ai-prompt-form.component.d.ts.map +1 -1
- package/dist/lib/custom/AIPrompts/ai-prompt-form.component.js +938 -448
- package/dist/lib/custom/AIPrompts/ai-prompt-form.component.js.map +1 -1
- package/dist/lib/custom/Actions/action-execution-log-form.component.d.ts +40 -0
- package/dist/lib/custom/Actions/action-execution-log-form.component.d.ts.map +1 -0
- package/dist/lib/custom/Actions/action-execution-log-form.component.js +530 -0
- package/dist/lib/custom/Actions/action-execution-log-form.component.js.map +1 -0
- package/dist/lib/custom/Actions/action-form.component.d.ts +90 -0
- package/dist/lib/custom/Actions/action-form.component.d.ts.map +1 -0
- package/dist/lib/custom/Actions/action-form.component.js +1579 -0
- package/dist/lib/custom/Actions/action-form.component.js.map +1 -0
- package/dist/lib/custom/Actions/action-param-dialog.component.d.ts +32 -0
- package/dist/lib/custom/Actions/action-param-dialog.component.d.ts.map +1 -0
- package/dist/lib/custom/Actions/action-param-dialog.component.js +320 -0
- package/dist/lib/custom/Actions/action-param-dialog.component.js.map +1 -0
- package/dist/lib/custom/Actions/action-test-harness-dialog.component.d.ts +15 -0
- package/dist/lib/custom/Actions/action-test-harness-dialog.component.d.ts.map +1 -0
- package/dist/lib/custom/Actions/action-test-harness-dialog.component.js +96 -0
- package/dist/lib/custom/Actions/action-test-harness-dialog.component.js.map +1 -0
- package/dist/lib/custom/Actions/action-test-harness.component.d.ts +50 -0
- package/dist/lib/custom/Actions/action-test-harness.component.d.ts.map +1 -0
- package/dist/lib/custom/Actions/action-test-harness.component.js +708 -0
- package/dist/lib/custom/Actions/action-test-harness.component.js.map +1 -0
- package/dist/lib/custom/ai-test-harness/agent-execution-monitor.component.d.ts +244 -0
- package/dist/lib/custom/ai-test-harness/agent-execution-monitor.component.d.ts.map +1 -0
- package/dist/lib/custom/ai-test-harness/agent-execution-monitor.component.js +1327 -0
- package/dist/lib/custom/ai-test-harness/agent-execution-monitor.component.js.map +1 -0
- package/dist/lib/custom/ai-test-harness/agent-execution-node.component.d.ts +19 -0
- package/dist/lib/custom/ai-test-harness/agent-execution-node.component.d.ts.map +1 -0
- package/dist/lib/custom/ai-test-harness/agent-execution-node.component.js +458 -0
- package/dist/lib/custom/ai-test-harness/agent-execution-node.component.js.map +1 -0
- package/dist/lib/custom/ai-test-harness/ai-test-harness-dialog.component.d.ts +78 -0
- package/dist/lib/custom/ai-test-harness/ai-test-harness-dialog.component.d.ts.map +1 -0
- package/dist/lib/custom/ai-test-harness/ai-test-harness-dialog.component.js +157 -0
- package/dist/lib/custom/ai-test-harness/ai-test-harness-dialog.component.js.map +1 -0
- package/dist/lib/custom/ai-test-harness/ai-test-harness.component.d.ts +589 -0
- package/dist/lib/custom/ai-test-harness/ai-test-harness.component.d.ts.map +1 -0
- package/dist/lib/custom/ai-test-harness/ai-test-harness.component.js +3140 -0
- package/dist/lib/custom/ai-test-harness/ai-test-harness.component.js.map +1 -0
- package/dist/lib/custom/ai-test-harness/json-viewer-window.component.d.ts +8 -0
- package/dist/lib/custom/ai-test-harness/json-viewer-window.component.d.ts.map +1 -0
- package/dist/lib/custom/ai-test-harness/json-viewer-window.component.js +57 -0
- package/dist/lib/custom/ai-test-harness/json-viewer-window.component.js.map +1 -0
- package/dist/lib/custom/custom-forms.module.d.ts +33 -21
- package/dist/lib/custom/custom-forms.module.d.ts.map +1 -1
- package/dist/lib/custom/custom-forms.module.js +97 -18
- package/dist/lib/custom/custom-forms.module.js.map +1 -1
- package/dist/lib/custom/shared/entity-selector-dialog.component.d.ts +35 -0
- package/dist/lib/custom/shared/entity-selector-dialog.component.d.ts.map +1 -0
- package/dist/lib/custom/shared/entity-selector-dialog.component.js +290 -0
- package/dist/lib/custom/shared/entity-selector-dialog.component.js.map +1 -0
- package/dist/lib/custom/test-harness-dialog.service.d.ts +111 -0
- package/dist/lib/custom/test-harness-dialog.service.d.ts.map +1 -0
- package/dist/lib/custom/test-harness-dialog.service.js +211 -0
- package/dist/lib/custom/test-harness-dialog.service.js.map +1 -0
- package/dist/lib/generated/Entities/AIAgent/aiagent.form.component.js +12 -11
- package/dist/lib/generated/Entities/AIAgent/aiagent.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/AIAgent/sections/aiagent-form-overview.component.d.ts +54 -0
- package/dist/lib/generated/Entities/AIAgent/sections/aiagent-form-overview.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/AIAgent/sections/aiagent-form-overview.component.js +492 -0
- package/dist/lib/generated/Entities/AIAgent/sections/aiagent-form-overview.component.js.map +1 -0
- package/dist/lib/generated/Entities/AIAgentRun/aiagentrun.form.component.js +8 -7
- package/dist/lib/generated/Entities/AIAgentRun/aiagentrun.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/AIConfiguration/aiconfiguration.form.component.js +8 -7
- package/dist/lib/generated/Entities/AIConfiguration/aiconfiguration.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/AIModel/aimodel.form.component.js +8 -7
- package/dist/lib/generated/Entities/AIModel/aimodel.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/AIModelType/aimodeltype.form.component.js +12 -11
- package/dist/lib/generated/Entities/AIModelType/aimodeltype.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/AIPrompt/aiprompt.form.component.js +12 -11
- package/dist/lib/generated/Entities/AIPrompt/aiprompt.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/AIPrompt/sections/details.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/AIPrompt/sections/details.component.js +94 -4
- package/dist/lib/generated/Entities/AIPrompt/sections/details.component.js.map +1 -1
- package/dist/lib/generated/Entities/AIPromptRun/aipromptrun.form.component.js +12 -11
- package/dist/lib/generated/Entities/AIPromptRun/aipromptrun.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/AIPromptRun/sections/details.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/AIPromptRun/sections/details.component.js +103 -4
- package/dist/lib/generated/Entities/AIPromptRun/sections/details.component.js.map +1 -1
- package/dist/lib/generated/Entities/AIVendor/aivendor.form.component.js +12 -11
- package/dist/lib/generated/Entities/AIVendor/aivendor.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/ActionExecutionLog/sections/details.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/ActionExecutionLog/sections/details.component.js +13 -4
- package/dist/lib/generated/Entities/ActionExecutionLog/sections/details.component.js.map +1 -1
- package/dist/public-api.d.ts +3 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +16 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +12 -11
- package/dist/lib/custom/AIAgents/ai-agent-execution-dialog.component.d.ts +0 -52
- package/dist/lib/custom/AIAgents/ai-agent-execution-dialog.component.d.ts.map +0 -1
- package/dist/lib/custom/AIAgents/ai-agent-execution-dialog.component.js +0 -590
- package/dist/lib/custom/AIAgents/ai-agent-execution-dialog.component.js.map +0 -1
- package/dist/lib/custom/AIPrompts/ai-prompt-execution-dialog.component.d.ts +0 -94
- package/dist/lib/custom/AIPrompts/ai-prompt-execution-dialog.component.d.ts.map +0 -1
- package/dist/lib/custom/AIPrompts/ai-prompt-execution-dialog.component.js +0 -792
- package/dist/lib/custom/AIPrompts/ai-prompt-execution-dialog.component.js.map +0 -1
|
@@ -7,26 +7,31 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import { Component, ViewChild } from '@angular/core';
|
|
8
8
|
import { RegisterClass } from '@memberjunction/global';
|
|
9
9
|
import { BaseFormComponent } from '@memberjunction/ng-base-forms';
|
|
10
|
-
import {
|
|
10
|
+
import { SharedService } from '@memberjunction/ng-shared';
|
|
11
|
+
import { Metadata, RunView, CompositeKey } from '@memberjunction/core';
|
|
11
12
|
import { MJNotificationService } from '@memberjunction/ng-notifications';
|
|
12
13
|
import { AIPromptFormComponent } from '../../generated/Entities/AIPrompt/aiprompt.form.component';
|
|
13
14
|
import { AIEngineBase } from '@memberjunction/ai-engine-base';
|
|
14
15
|
import * as i0 from "@angular/core";
|
|
15
|
-
import * as i1 from "@
|
|
16
|
-
import * as i2 from "@angular/
|
|
17
|
-
import * as i3 from "@
|
|
18
|
-
import * as i4 from "@
|
|
19
|
-
import * as i5 from "@progress/kendo-angular-
|
|
20
|
-
import * as i6 from "@progress/kendo-angular-
|
|
21
|
-
import * as i7 from "@
|
|
22
|
-
import * as i8 from "@
|
|
23
|
-
import * as i9 from "@
|
|
24
|
-
import * as i10 from "@memberjunction/ng-
|
|
25
|
-
import * as i11 from "@memberjunction/ng-
|
|
26
|
-
import * as i12 from "
|
|
27
|
-
import * as i13 from "
|
|
16
|
+
import * as i1 from "@memberjunction/ng-shared";
|
|
17
|
+
import * as i2 from "@angular/router";
|
|
18
|
+
import * as i3 from "@angular/common";
|
|
19
|
+
import * as i4 from "@angular/forms";
|
|
20
|
+
import * as i5 from "@progress/kendo-angular-layout";
|
|
21
|
+
import * as i6 from "@progress/kendo-angular-dialog";
|
|
22
|
+
import * as i7 from "@progress/kendo-angular-inputs";
|
|
23
|
+
import * as i8 from "@progress/kendo-angular-dropdowns";
|
|
24
|
+
import * as i9 from "@progress/kendo-angular-buttons";
|
|
25
|
+
import * as i10 from "@memberjunction/ng-user-view-grid";
|
|
26
|
+
import * as i11 from "@memberjunction/ng-base-forms";
|
|
27
|
+
import * as i12 from "@memberjunction/ng-form-toolbar";
|
|
28
|
+
import * as i13 from "@memberjunction/ng-container-directives";
|
|
29
|
+
import * as i14 from "@memberjunction/ng-code-editor";
|
|
30
|
+
import * as i15 from "../../shared/components/template-editor.component";
|
|
31
|
+
import * as i16 from "../ai-test-harness/ai-test-harness.component";
|
|
28
32
|
const _c0 = ["templateEditor"];
|
|
29
33
|
const _forTrack0 = ($index, $item) => $item.ID || $index;
|
|
34
|
+
const _forTrack1 = ($index, $item) => $item.ID;
|
|
30
35
|
const _c1 = () => ({ text: "Active", value: "Active" });
|
|
31
36
|
const _c2 = () => ({ text: "Pending", value: "Pending" });
|
|
32
37
|
const _c3 = () => ({ text: "Disabled", value: "Disabled" });
|
|
@@ -36,7 +41,7 @@ const _c6 = () => ({ text: "Static Count", value: "StaticCount" });
|
|
|
36
41
|
const _c7 = () => ({ text: "Config Param", value: "ConfigParam" });
|
|
37
42
|
function AIPromptFormComponentExtended_form_1_Conditional_9_Template(rf, ctx) { if (rf & 1) {
|
|
38
43
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
39
|
-
i0.ɵɵelementStart(0, "kendo-textbox",
|
|
44
|
+
i0.ɵɵelementStart(0, "kendo-textbox", 47);
|
|
40
45
|
i0.ɵɵtwoWayListener("ngModelChange", function AIPromptFormComponentExtended_form_1_Conditional_9_Template_kendo_textbox_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.record.Name, $event) || (ctx_r1.record.Name = $event); return i0.ɵɵresetView($event); });
|
|
41
46
|
i0.ɵɵelementEnd();
|
|
42
47
|
} if (rf & 2) {
|
|
@@ -44,10 +49,10 @@ function AIPromptFormComponentExtended_form_1_Conditional_9_Template(rf, ctx) {
|
|
|
44
49
|
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.record.Name);
|
|
45
50
|
} }
|
|
46
51
|
function AIPromptFormComponentExtended_form_1_Conditional_10_Template(rf, ctx) { if (rf & 1) {
|
|
47
|
-
i0.ɵɵelementStart(0, "h4",
|
|
52
|
+
i0.ɵɵelementStart(0, "h4", 48);
|
|
48
53
|
i0.ɵɵtext(1);
|
|
49
54
|
i0.ɵɵelementEnd();
|
|
50
|
-
i0.ɵɵelementStart(2, "span",
|
|
55
|
+
i0.ɵɵelementStart(2, "span", 49);
|
|
51
56
|
i0.ɵɵtext(3);
|
|
52
57
|
i0.ɵɵelementEnd();
|
|
53
58
|
} if (rf & 2) {
|
|
@@ -60,14 +65,14 @@ function AIPromptFormComponentExtended_form_1_Conditional_10_Template(rf, ctx) {
|
|
|
60
65
|
i0.ɵɵtextInterpolate1(" ", ctx_r1.record.Status, " ");
|
|
61
66
|
} }
|
|
62
67
|
function AIPromptFormComponentExtended_form_1_Conditional_11_Conditional_10_Template(rf, ctx) { if (rf & 1) {
|
|
63
|
-
i0.ɵɵelementStart(0, "div",
|
|
64
|
-
i0.ɵɵelement(1, "i",
|
|
68
|
+
i0.ɵɵelementStart(0, "div", 52);
|
|
69
|
+
i0.ɵɵelement(1, "i", 54);
|
|
65
70
|
i0.ɵɵtext(2, " Loading types... ");
|
|
66
71
|
i0.ɵɵelementEnd();
|
|
67
72
|
} }
|
|
68
73
|
function AIPromptFormComponentExtended_form_1_Conditional_11_Conditional_11_Template(rf, ctx) { if (rf & 1) {
|
|
69
74
|
const _r4 = i0.ɵɵgetCurrentView();
|
|
70
|
-
i0.ɵɵelementStart(0, "kendo-dropdownlist",
|
|
75
|
+
i0.ɵɵelementStart(0, "kendo-dropdownlist", 55);
|
|
71
76
|
i0.ɵɵtwoWayListener("ngModelChange", function AIPromptFormComponentExtended_form_1_Conditional_11_Conditional_11_Template_kendo_dropdownlist_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(3); i0.ɵɵtwoWayBindingSet(ctx_r1.record.TypeID, $event) || (ctx_r1.record.TypeID = $event); return i0.ɵɵresetView($event); });
|
|
72
77
|
i0.ɵɵelementEnd();
|
|
73
78
|
} if (rf & 2) {
|
|
@@ -77,18 +82,18 @@ function AIPromptFormComponentExtended_form_1_Conditional_11_Conditional_11_Temp
|
|
|
77
82
|
} }
|
|
78
83
|
function AIPromptFormComponentExtended_form_1_Conditional_11_Template(rf, ctx) { if (rf & 1) {
|
|
79
84
|
const _r3 = i0.ɵɵgetCurrentView();
|
|
80
|
-
i0.ɵɵelementStart(0, "div", 14)(1, "div")(2, "label",
|
|
85
|
+
i0.ɵɵelementStart(0, "div", 14)(1, "div")(2, "label", 45);
|
|
81
86
|
i0.ɵɵtext(3, "Status");
|
|
82
87
|
i0.ɵɵelementEnd();
|
|
83
|
-
i0.ɵɵelementStart(4, "kendo-dropdownlist",
|
|
88
|
+
i0.ɵɵelementStart(4, "kendo-dropdownlist", 50);
|
|
84
89
|
i0.ɵɵtwoWayListener("ngModelChange", function AIPromptFormComponentExtended_form_1_Conditional_11_Template_kendo_dropdownlist_ngModelChange_4_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.record.Status, $event) || (ctx_r1.record.Status = $event); return i0.ɵɵresetView($event); });
|
|
85
90
|
i0.ɵɵelementEnd()();
|
|
86
|
-
i0.ɵɵelementStart(5, "div")(6, "label",
|
|
91
|
+
i0.ɵɵelementStart(5, "div")(6, "label", 45);
|
|
87
92
|
i0.ɵɵtext(7, " Type ");
|
|
88
|
-
i0.ɵɵelementStart(8, "span",
|
|
93
|
+
i0.ɵɵelementStart(8, "span", 51);
|
|
89
94
|
i0.ɵɵtext(9, "*");
|
|
90
95
|
i0.ɵɵelementEnd()();
|
|
91
|
-
i0.ɵɵtemplate(10, AIPromptFormComponentExtended_form_1_Conditional_11_Conditional_10_Template, 3, 0, "div",
|
|
96
|
+
i0.ɵɵtemplate(10, AIPromptFormComponentExtended_form_1_Conditional_11_Conditional_10_Template, 3, 0, "div", 52)(11, AIPromptFormComponentExtended_form_1_Conditional_11_Conditional_11_Template, 1, 4, "kendo-dropdownlist", 53);
|
|
92
97
|
i0.ɵɵelementEnd()();
|
|
93
98
|
} if (rf & 2) {
|
|
94
99
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
@@ -100,7 +105,7 @@ function AIPromptFormComponentExtended_form_1_Conditional_11_Template(rf, ctx) {
|
|
|
100
105
|
} }
|
|
101
106
|
function AIPromptFormComponentExtended_form_1_Conditional_12_Template(rf, ctx) { if (rf & 1) {
|
|
102
107
|
const _r5 = i0.ɵɵgetCurrentView();
|
|
103
|
-
i0.ɵɵelementStart(0, "kendo-textarea",
|
|
108
|
+
i0.ɵɵelementStart(0, "kendo-textarea", 56);
|
|
104
109
|
i0.ɵɵtwoWayListener("ngModelChange", function AIPromptFormComponentExtended_form_1_Conditional_12_Template_kendo_textarea_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.record.Description, $event) || (ctx_r1.record.Description = $event); return i0.ɵɵresetView($event); });
|
|
105
110
|
i0.ɵɵelementEnd();
|
|
106
111
|
} if (rf & 2) {
|
|
@@ -119,7 +124,7 @@ function AIPromptFormComponentExtended_form_1_Conditional_13_Template(rf, ctx) {
|
|
|
119
124
|
} }
|
|
120
125
|
function AIPromptFormComponentExtended_form_1_Conditional_15_Template(rf, ctx) { if (rf & 1) {
|
|
121
126
|
i0.ɵɵelementStart(0, "div", 18);
|
|
122
|
-
i0.ɵɵelement(1, "i",
|
|
127
|
+
i0.ɵɵelement(1, "i", 57);
|
|
123
128
|
i0.ɵɵelementStart(2, "span", 20);
|
|
124
129
|
i0.ɵɵtext(3, "Type:");
|
|
125
130
|
i0.ɵɵelementEnd();
|
|
@@ -133,48 +138,36 @@ function AIPromptFormComponentExtended_form_1_Conditional_15_Template(rf, ctx) {
|
|
|
133
138
|
} }
|
|
134
139
|
function AIPromptFormComponentExtended_form_1_Conditional_28_Template(rf, ctx) { if (rf & 1) {
|
|
135
140
|
i0.ɵɵelementStart(0, "div", 18);
|
|
136
|
-
i0.ɵɵelement(1, "i",
|
|
137
|
-
i0.ɵɵelementStart(2, "span",
|
|
141
|
+
i0.ɵɵelement(1, "i", 58);
|
|
142
|
+
i0.ɵɵelementStart(2, "span", 59);
|
|
138
143
|
i0.ɵɵtext(3, "Caching Enabled");
|
|
139
144
|
i0.ɵɵelementEnd()();
|
|
140
145
|
} }
|
|
141
146
|
function AIPromptFormComponentExtended_form_1_Conditional_31_Template(rf, ctx) { if (rf & 1) {
|
|
142
147
|
const _r6 = i0.ɵɵgetCurrentView();
|
|
143
|
-
i0.ɵɵelementStart(0, "
|
|
144
|
-
i0.ɵɵlistener("click", function
|
|
145
|
-
i0.ɵɵelement(1, "i",
|
|
146
|
-
i0.ɵɵtext(2, "
|
|
147
|
-
i0.ɵɵelementEnd();
|
|
148
|
-
} }
|
|
149
|
-
function AIPromptFormComponentExtended_form_1_Conditional_32_Template(rf, ctx) { if (rf & 1) {
|
|
150
|
-
i0.ɵɵelementStart(0, "kendo-button", 27);
|
|
151
|
-
i0.ɵɵelement(1, "i", 64);
|
|
152
|
-
i0.ɵɵtext(2, " Cannot Execute ");
|
|
148
|
+
i0.ɵɵelementStart(0, "button", 60);
|
|
149
|
+
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_1_Conditional_31_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r6); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.openTestHarness()); });
|
|
150
|
+
i0.ɵɵelement(1, "i", 61);
|
|
151
|
+
i0.ɵɵtext(2, " Run ");
|
|
153
152
|
i0.ɵɵelementEnd();
|
|
154
153
|
} if (rf & 2) {
|
|
155
|
-
i0.ɵɵproperty("
|
|
154
|
+
i0.ɵɵproperty("themeColor", "primary")("size", "large");
|
|
156
155
|
} }
|
|
157
|
-
function
|
|
158
|
-
i0.ɵɵelementStart(0, "kendo-button", 28);
|
|
159
|
-
i0.ɵɵelement(1, "i", 65);
|
|
160
|
-
i0.ɵɵtext(2, " History ");
|
|
161
|
-
i0.ɵɵelementEnd();
|
|
162
|
-
} }
|
|
163
|
-
function AIPromptFormComponentExtended_form_1_Conditional_34_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
156
|
+
function AIPromptFormComponentExtended_form_1_Conditional_32_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
164
157
|
i0.ɵɵtext(0, " \u2022 Prompt must be Active");
|
|
165
158
|
i0.ɵɵelement(1, "br");
|
|
166
159
|
} }
|
|
167
|
-
function
|
|
160
|
+
function AIPromptFormComponentExtended_form_1_Conditional_32_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
168
161
|
i0.ɵɵtext(0, " \u2022 Template is required");
|
|
169
162
|
i0.ɵɵelement(1, "br");
|
|
170
163
|
} }
|
|
171
|
-
function
|
|
164
|
+
function AIPromptFormComponentExtended_form_1_Conditional_32_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
172
165
|
i0.ɵɵtext(0, " \u2022 Template not found");
|
|
173
166
|
i0.ɵɵelement(1, "br");
|
|
174
167
|
} }
|
|
175
|
-
function
|
|
176
|
-
i0.ɵɵelementStart(0, "div",
|
|
177
|
-
i0.ɵɵtemplate(1,
|
|
168
|
+
function AIPromptFormComponentExtended_form_1_Conditional_32_Template(rf, ctx) { if (rf & 1) {
|
|
169
|
+
i0.ɵɵelementStart(0, "div", 27);
|
|
170
|
+
i0.ɵɵtemplate(1, AIPromptFormComponentExtended_form_1_Conditional_32_Conditional_1_Template, 2, 0, "br")(2, AIPromptFormComponentExtended_form_1_Conditional_32_Conditional_2_Template, 2, 0, "br")(3, AIPromptFormComponentExtended_form_1_Conditional_32_Conditional_3_Template, 2, 0, "br");
|
|
178
171
|
i0.ɵɵelementEnd();
|
|
179
172
|
} if (rf & 2) {
|
|
180
173
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
@@ -185,8 +178,8 @@ function AIPromptFormComponentExtended_form_1_Conditional_34_Template(rf, ctx) {
|
|
|
185
178
|
i0.ɵɵadvance();
|
|
186
179
|
i0.ɵɵconditional(!ctx_r1.template && ctx_r1.record.TemplateID ? 3 : -1);
|
|
187
180
|
} }
|
|
188
|
-
function
|
|
189
|
-
i0.ɵɵelementStart(0, "span",
|
|
181
|
+
function AIPromptFormComponentExtended_form_1_ng_template_35_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
182
|
+
i0.ɵɵelementStart(0, "span", 63);
|
|
190
183
|
i0.ɵɵtext(1);
|
|
191
184
|
i0.ɵɵelementEnd();
|
|
192
185
|
} if (rf & 2) {
|
|
@@ -194,77 +187,87 @@ function AIPromptFormComponentExtended_form_1_ng_template_37_Conditional_3_Templ
|
|
|
194
187
|
i0.ɵɵadvance();
|
|
195
188
|
i0.ɵɵtextInterpolate1("\u2022 ", ctx_r1.template.Name, "");
|
|
196
189
|
} }
|
|
197
|
-
function
|
|
198
|
-
i0.ɵɵelementStart(0, "span",
|
|
190
|
+
function AIPromptFormComponentExtended_form_1_ng_template_35_Template(rf, ctx) { if (rf & 1) {
|
|
191
|
+
i0.ɵɵelementStart(0, "span", 62);
|
|
199
192
|
i0.ɵɵelement(1, "i", 22);
|
|
200
193
|
i0.ɵɵtext(2, " Template Editor ");
|
|
201
|
-
i0.ɵɵtemplate(3,
|
|
194
|
+
i0.ɵɵtemplate(3, AIPromptFormComponentExtended_form_1_ng_template_35_Conditional_3_Template, 2, 1, "span", 63);
|
|
202
195
|
i0.ɵɵelementEnd();
|
|
203
196
|
} if (rf & 2) {
|
|
204
197
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
205
198
|
i0.ɵɵadvance(3);
|
|
206
199
|
i0.ɵɵconditional(ctx_r1.template ? 3 : -1);
|
|
207
200
|
} }
|
|
208
|
-
function
|
|
209
|
-
i0.ɵɵelementStart(0, "div",
|
|
210
|
-
i0.ɵɵelement(1, "i",
|
|
201
|
+
function AIPromptFormComponentExtended_form_1_Conditional_37_Template(rf, ctx) { if (rf & 1) {
|
|
202
|
+
i0.ɵɵelementStart(0, "div", 32);
|
|
203
|
+
i0.ɵɵelement(1, "i", 64);
|
|
211
204
|
i0.ɵɵtext(2, " Loading template... ");
|
|
212
205
|
i0.ɵɵelementEnd();
|
|
213
206
|
} }
|
|
214
|
-
function
|
|
207
|
+
function AIPromptFormComponentExtended_form_1_Conditional_38_Template(rf, ctx) { if (rf & 1) {
|
|
215
208
|
const _r7 = i0.ɵɵgetCurrentView();
|
|
216
|
-
i0.ɵɵelementStart(0, "div",
|
|
217
|
-
i0.ɵɵelement(1, "i",
|
|
218
|
-
i0.ɵɵelementStart(2, "h5",
|
|
209
|
+
i0.ɵɵelementStart(0, "div", 33);
|
|
210
|
+
i0.ɵɵelement(1, "i", 65);
|
|
211
|
+
i0.ɵɵelementStart(2, "h5", 66);
|
|
219
212
|
i0.ɵɵtext(3, "No Template Associated");
|
|
220
213
|
i0.ɵɵelementEnd();
|
|
221
|
-
i0.ɵɵelementStart(4, "p",
|
|
214
|
+
i0.ɵɵelementStart(4, "p", 67);
|
|
222
215
|
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. ");
|
|
223
216
|
i0.ɵɵelementEnd();
|
|
224
|
-
i0.ɵɵelementStart(6, "div",
|
|
225
|
-
i0.ɵɵlistener("click", function
|
|
226
|
-
i0.ɵɵelement(8, "i",
|
|
217
|
+
i0.ɵɵelementStart(6, "div", 68)(7, "button", 69);
|
|
218
|
+
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_1_Conditional_38_Template_button_click_7_listener() { i0.ɵɵrestoreView(_r7); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.createNewTemplate()); });
|
|
219
|
+
i0.ɵɵelement(8, "i", 70);
|
|
227
220
|
i0.ɵɵtext(9, " Create New Template ");
|
|
228
221
|
i0.ɵɵelementEnd();
|
|
229
|
-
i0.ɵɵelementStart(10, "
|
|
230
|
-
i0.ɵɵlistener("click", function
|
|
231
|
-
i0.ɵɵelement(11, "i",
|
|
222
|
+
i0.ɵɵelementStart(10, "button", 71);
|
|
223
|
+
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_1_Conditional_38_Template_button_click_10_listener() { i0.ɵɵrestoreView(_r7); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.linkExistingTemplate()); });
|
|
224
|
+
i0.ɵɵelement(11, "i", 72);
|
|
232
225
|
i0.ɵɵtext(12, " Link Existing Template ");
|
|
233
226
|
i0.ɵɵelementEnd()()();
|
|
227
|
+
} if (rf & 2) {
|
|
228
|
+
i0.ɵɵadvance(7);
|
|
229
|
+
i0.ɵɵproperty("themeColor", "primary");
|
|
230
|
+
i0.ɵɵadvance(3);
|
|
231
|
+
i0.ɵɵproperty("fillMode", "outline");
|
|
234
232
|
} }
|
|
235
|
-
function
|
|
233
|
+
function AIPromptFormComponentExtended_form_1_Conditional_39_Template(rf, ctx) { if (rf & 1) {
|
|
236
234
|
const _r8 = i0.ɵɵgetCurrentView();
|
|
237
|
-
i0.ɵɵelementStart(0, "div",
|
|
238
|
-
i0.ɵɵelement(1, "i",
|
|
239
|
-
i0.ɵɵelementStart(2, "h5",
|
|
235
|
+
i0.ɵɵelementStart(0, "div", 34);
|
|
236
|
+
i0.ɵɵelement(1, "i", 73);
|
|
237
|
+
i0.ɵɵelementStart(2, "h5", 74);
|
|
240
238
|
i0.ɵɵtext(3, "Template Not Found");
|
|
241
239
|
i0.ɵɵelementEnd();
|
|
242
|
-
i0.ɵɵelementStart(4, "p",
|
|
240
|
+
i0.ɵɵelementStart(4, "p", 67);
|
|
243
241
|
i0.ɵɵtext(5, " The referenced template could not be loaded. It may have been deleted or moved. ");
|
|
244
242
|
i0.ɵɵelementEnd();
|
|
245
|
-
i0.ɵɵelementStart(6, "div",
|
|
246
|
-
i0.ɵɵlistener("click", function
|
|
247
|
-
i0.ɵɵelement(8, "i",
|
|
243
|
+
i0.ɵɵelementStart(6, "div", 68)(7, "button", 71);
|
|
244
|
+
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_1_Conditional_39_Template_button_click_7_listener() { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.loadTemplate()); });
|
|
245
|
+
i0.ɵɵelement(8, "i", 75);
|
|
248
246
|
i0.ɵɵtext(9, " Retry Loading ");
|
|
249
247
|
i0.ɵɵelementEnd();
|
|
250
|
-
i0.ɵɵelementStart(10, "
|
|
251
|
-
i0.ɵɵlistener("click", function
|
|
252
|
-
i0.ɵɵelement(11, "i",
|
|
248
|
+
i0.ɵɵelementStart(10, "button", 69);
|
|
249
|
+
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_1_Conditional_39_Template_button_click_10_listener() { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.createNewTemplate()); });
|
|
250
|
+
i0.ɵɵelement(11, "i", 70);
|
|
253
251
|
i0.ɵɵtext(12, " Create New Template ");
|
|
254
252
|
i0.ɵɵelementEnd()()();
|
|
253
|
+
} if (rf & 2) {
|
|
254
|
+
i0.ɵɵadvance(7);
|
|
255
|
+
i0.ɵɵproperty("fillMode", "outline");
|
|
256
|
+
i0.ɵɵadvance(3);
|
|
257
|
+
i0.ɵɵproperty("themeColor", "primary");
|
|
255
258
|
} }
|
|
256
|
-
function
|
|
259
|
+
function AIPromptFormComponentExtended_form_1_Conditional_40_Template(rf, ctx) { if (rf & 1) {
|
|
257
260
|
const _r9 = i0.ɵɵgetCurrentView();
|
|
258
|
-
i0.ɵɵelementStart(0, "div",
|
|
259
|
-
i0.ɵɵlistener("contentChange", function
|
|
261
|
+
i0.ɵɵelementStart(0, "div", 35)(1, "div", 76)(2, "mj-template-editor", 77, 1);
|
|
262
|
+
i0.ɵɵlistener("contentChange", function AIPromptFormComponentExtended_form_1_Conditional_40_Template_mj_template_editor_contentChange_2_listener($event) { i0.ɵɵrestoreView(_r9); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onTemplateContentChange($event)); })("runTemplate", function AIPromptFormComponentExtended_form_1_Conditional_40_Template_mj_template_editor_runTemplate_2_listener($event) { i0.ɵɵrestoreView(_r9); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onTemplateRun($event)); });
|
|
260
263
|
i0.ɵɵelementEnd()()();
|
|
261
264
|
} if (rf & 2) {
|
|
262
265
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
263
266
|
i0.ɵɵadvance(2);
|
|
264
267
|
i0.ɵɵproperty("template", ctx_r1.template)("config", ctx_r1.templateEditorConfig);
|
|
265
268
|
} }
|
|
266
|
-
function
|
|
267
|
-
i0.ɵɵelementStart(0, "span",
|
|
269
|
+
function AIPromptFormComponentExtended_form_1_Conditional_41_ng_template_1_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
270
|
+
i0.ɵɵelementStart(0, "span", 81);
|
|
268
271
|
i0.ɵɵtext(1);
|
|
269
272
|
i0.ɵɵelementEnd();
|
|
270
273
|
} if (rf & 2) {
|
|
@@ -272,405 +275,427 @@ function AIPromptFormComponentExtended_form_1_Conditional_43_ng_template_1_Condi
|
|
|
272
275
|
i0.ɵɵadvance();
|
|
273
276
|
i0.ɵɵtextInterpolate1(" ", ctx_r1.promptModels.length, " ");
|
|
274
277
|
} }
|
|
275
|
-
function
|
|
276
|
-
i0.ɵɵelementStart(0, "span",
|
|
277
|
-
i0.ɵɵelement(1, "i",
|
|
278
|
+
function AIPromptFormComponentExtended_form_1_Conditional_41_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
279
|
+
i0.ɵɵelementStart(0, "span", 62);
|
|
280
|
+
i0.ɵɵelement(1, "i", 80);
|
|
278
281
|
i0.ɵɵtext(2, " Models ");
|
|
279
|
-
i0.ɵɵtemplate(3,
|
|
280
|
-
i0.ɵɵ
|
|
282
|
+
i0.ɵɵtemplate(3, AIPromptFormComponentExtended_form_1_Conditional_41_ng_template_1_Conditional_3_Template, 2, 1, "span", 81);
|
|
283
|
+
i0.ɵɵelementStart(4, "span", 82);
|
|
284
|
+
i0.ɵɵelement(5, "i", 83);
|
|
285
|
+
i0.ɵɵtext(6, " Priority order (first available model will be used) ");
|
|
286
|
+
i0.ɵɵelementEnd()();
|
|
281
287
|
} if (rf & 2) {
|
|
282
288
|
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
283
289
|
i0.ɵɵadvance(3);
|
|
284
290
|
i0.ɵɵconditional(ctx_r1.promptModels.length > 0 ? 3 : -1);
|
|
285
291
|
} }
|
|
286
|
-
function
|
|
287
|
-
i0.ɵɵelementStart(0, "div",
|
|
288
|
-
i0.ɵɵelement(1, "i",
|
|
292
|
+
function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
293
|
+
i0.ɵɵelementStart(0, "div", 79);
|
|
294
|
+
i0.ɵɵelement(1, "i", 54);
|
|
289
295
|
i0.ɵɵtext(2, " Loading models... ");
|
|
290
296
|
i0.ɵɵelementEnd();
|
|
291
297
|
} }
|
|
292
|
-
function
|
|
298
|
+
function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_0_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
293
299
|
const _r10 = i0.ɵɵgetCurrentView();
|
|
294
|
-
i0.ɵɵelementStart(0, "div",
|
|
295
|
-
i0.ɵɵlistener("click", function
|
|
296
|
-
i0.ɵɵelement(2, "i",
|
|
300
|
+
i0.ɵɵelementStart(0, "div", 86)(1, "button", 87);
|
|
301
|
+
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_0_Conditional_3_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r10); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.addNewModel()); });
|
|
302
|
+
i0.ɵɵelement(2, "i", 70);
|
|
297
303
|
i0.ɵɵtext(3, " Add Model ");
|
|
298
304
|
i0.ɵɵelementEnd()();
|
|
299
305
|
} }
|
|
300
|
-
function
|
|
301
|
-
i0.ɵɵelementStart(0, "div",
|
|
302
|
-
i0.ɵɵelement(1, "i",
|
|
306
|
+
function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
307
|
+
i0.ɵɵelementStart(0, "div", 84);
|
|
308
|
+
i0.ɵɵelement(1, "i", 85);
|
|
303
309
|
i0.ɵɵtext(2, " No models configured ");
|
|
304
|
-
i0.ɵɵtemplate(3,
|
|
310
|
+
i0.ɵɵtemplate(3, AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_0_Conditional_3_Template, 4, 0, "div", 86);
|
|
305
311
|
i0.ɵɵelementEnd();
|
|
306
312
|
} if (rf & 2) {
|
|
307
313
|
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
308
314
|
i0.ɵɵadvance(3);
|
|
309
315
|
i0.ɵɵconditional(ctx_r1.EditMode ? 3 : -1);
|
|
310
316
|
} }
|
|
311
|
-
function
|
|
312
|
-
i0.ɵɵ
|
|
317
|
+
function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
318
|
+
i0.ɵɵelementStart(0, "div", 88);
|
|
319
|
+
i0.ɵɵelement(1, "i", 93);
|
|
320
|
+
i0.ɵɵtext(2, " Models are tried in priority order (1, 2, 3...). The first available model that meets requirements will be used for execution. ");
|
|
321
|
+
i0.ɵɵelementEnd();
|
|
322
|
+
} }
|
|
323
|
+
function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
324
|
+
i0.ɵɵelement(0, "i", 107);
|
|
325
|
+
i0.ɵɵelementStart(1, "span", 108);
|
|
326
|
+
i0.ɵɵtext(2);
|
|
327
|
+
i0.ɵɵelementEnd();
|
|
328
|
+
} if (rf & 2) {
|
|
329
|
+
const ɵ$index_279_r12 = i0.ɵɵnextContext().$index;
|
|
330
|
+
i0.ɵɵadvance(2);
|
|
331
|
+
i0.ɵɵtextInterpolate1("#", ɵ$index_279_r12 + 1, "");
|
|
313
332
|
} }
|
|
314
|
-
function
|
|
315
|
-
i0.ɵɵelementStart(0, "span",
|
|
333
|
+
function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
334
|
+
i0.ɵɵelementStart(0, "span", 96);
|
|
316
335
|
i0.ɵɵtext(1);
|
|
317
336
|
i0.ɵɵelementEnd();
|
|
318
337
|
} if (rf & 2) {
|
|
319
|
-
const ɵ$
|
|
338
|
+
const ɵ$index_279_r12 = i0.ɵɵnextContext().$index;
|
|
339
|
+
i0.ɵɵpropertyInterpolate1("title", "Priority ", ɵ$index_279_r12 + 1, " - Lower numbers are tried first");
|
|
320
340
|
i0.ɵɵadvance();
|
|
321
|
-
i0.ɵɵ
|
|
341
|
+
i0.ɵɵtextInterpolate1("#", ɵ$index_279_r12 + 1, "");
|
|
322
342
|
} }
|
|
323
|
-
function
|
|
324
|
-
const
|
|
325
|
-
i0.ɵɵelementStart(0, "kendo-dropdownlist",
|
|
326
|
-
i0.ɵɵtwoWayListener("ngModelChange", function
|
|
327
|
-
i0.ɵɵlistener("valueChange", function
|
|
343
|
+
function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
344
|
+
const _r13 = i0.ɵɵgetCurrentView();
|
|
345
|
+
i0.ɵɵelementStart(0, "kendo-dropdownlist", 109);
|
|
346
|
+
i0.ɵɵtwoWayListener("ngModelChange", function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_5_Template_kendo_dropdownlist_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r13); const model_r14 = i0.ɵɵnextContext().$implicit; i0.ɵɵtwoWayBindingSet(model_r14.ModelID, $event) || (model_r14.ModelID = $event); return i0.ɵɵresetView($event); });
|
|
347
|
+
i0.ɵɵlistener("valueChange", function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_5_Template_kendo_dropdownlist_valueChange_0_listener($event) { i0.ɵɵrestoreView(_r13); const ɵ$index_279_r12 = i0.ɵɵnextContext().$index; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.onModelChange($event, ɵ$index_279_r12)); });
|
|
328
348
|
i0.ɵɵelementEnd();
|
|
329
349
|
} if (rf & 2) {
|
|
330
|
-
const
|
|
331
|
-
const
|
|
332
|
-
const ɵ$
|
|
350
|
+
const ctx_r14 = i0.ɵɵnextContext();
|
|
351
|
+
const model_r14 = ctx_r14.$implicit;
|
|
352
|
+
const ɵ$index_279_r12 = ctx_r14.$index;
|
|
333
353
|
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
334
|
-
i0.ɵɵtwoWayProperty("ngModel",
|
|
335
|
-
i0.ɵɵproperty("name", "modelId_" + ɵ$
|
|
354
|
+
i0.ɵɵtwoWayProperty("ngModel", model_r14.ModelID);
|
|
355
|
+
i0.ɵɵproperty("name", "modelId_" + ɵ$index_279_r12)("data", ctx_r1.availableModels)("valuePrimitive", true)("filterable", true);
|
|
336
356
|
} }
|
|
337
|
-
function
|
|
357
|
+
function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
338
358
|
i0.ɵɵelementStart(0, "span", 23);
|
|
339
359
|
i0.ɵɵtext(1);
|
|
340
360
|
i0.ɵɵelementEnd();
|
|
341
361
|
} if (rf & 2) {
|
|
342
|
-
const
|
|
362
|
+
const model_r14 = i0.ɵɵnextContext().$implicit;
|
|
343
363
|
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
344
364
|
i0.ɵɵadvance();
|
|
345
|
-
i0.ɵɵtextInterpolate(ctx_r1.getModelDisplayName(
|
|
365
|
+
i0.ɵɵtextInterpolate(ctx_r1.getModelDisplayName(model_r14.ModelID));
|
|
346
366
|
} }
|
|
347
|
-
function
|
|
348
|
-
i0.ɵɵelementStart(0, "span",
|
|
367
|
+
function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_8_Conditional_0_Conditional_0_ng_template_1_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
368
|
+
i0.ɵɵelementStart(0, "span", 114);
|
|
349
369
|
i0.ɵɵtext(1);
|
|
350
370
|
i0.ɵɵelementEnd();
|
|
351
371
|
} if (rf & 2) {
|
|
352
|
-
const
|
|
353
|
-
const
|
|
372
|
+
const dataItem_r17 = i0.ɵɵnextContext().$implicit;
|
|
373
|
+
const model_r14 = i0.ɵɵnextContext(4).$implicit;
|
|
354
374
|
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
355
375
|
i0.ɵɵadvance();
|
|
356
|
-
i0.ɵɵtextInterpolate1("(", ctx_r1.getModelVendorStatus(
|
|
376
|
+
i0.ɵɵtextInterpolate1("(", ctx_r1.getModelVendorStatus(model_r14.ModelID, dataItem_r17.ID), ")");
|
|
357
377
|
} }
|
|
358
|
-
function
|
|
378
|
+
function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_8_Conditional_0_Conditional_0_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
359
379
|
i0.ɵɵelementStart(0, "span");
|
|
360
380
|
i0.ɵɵtext(1);
|
|
361
|
-
i0.ɵɵtemplate(2,
|
|
381
|
+
i0.ɵɵtemplate(2, AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_8_Conditional_0_Conditional_0_ng_template_1_Conditional_2_Template, 2, 1, "span", 114);
|
|
362
382
|
i0.ɵɵelementEnd();
|
|
363
383
|
} if (rf & 2) {
|
|
364
|
-
const
|
|
365
|
-
const
|
|
384
|
+
const dataItem_r17 = ctx.$implicit;
|
|
385
|
+
const model_r14 = i0.ɵɵnextContext(4).$implicit;
|
|
366
386
|
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
367
|
-
i0.ɵɵstyleProp("color", ctx_r1.getVendorStatusColor(
|
|
387
|
+
i0.ɵɵstyleProp("color", ctx_r1.getVendorStatusColor(model_r14.ModelID, dataItem_r17.ID));
|
|
368
388
|
i0.ɵɵadvance();
|
|
369
|
-
i0.ɵɵtextInterpolate1(" ",
|
|
389
|
+
i0.ɵɵtextInterpolate1(" ", dataItem_r17.Name, " ");
|
|
370
390
|
i0.ɵɵadvance();
|
|
371
|
-
i0.ɵɵconditional(ctx_r1.getModelVendorStatus(
|
|
391
|
+
i0.ɵɵconditional(ctx_r1.getModelVendorStatus(model_r14.ModelID, dataItem_r17.ID) !== "Active" ? 2 : -1);
|
|
372
392
|
} }
|
|
373
|
-
function
|
|
374
|
-
const
|
|
375
|
-
i0.ɵɵelementStart(0, "kendo-dropdownlist",
|
|
376
|
-
i0.ɵɵtwoWayListener("ngModelChange", function
|
|
377
|
-
i0.ɵɵtemplate(1,
|
|
393
|
+
function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_8_Conditional_0_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
394
|
+
const _r16 = i0.ɵɵgetCurrentView();
|
|
395
|
+
i0.ɵɵelementStart(0, "kendo-dropdownlist", 112);
|
|
396
|
+
i0.ɵɵtwoWayListener("ngModelChange", function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_8_Conditional_0_Conditional_0_Template_kendo_dropdownlist_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r16); const model_r14 = i0.ɵɵnextContext(3).$implicit; i0.ɵɵtwoWayBindingSet(model_r14.VendorID, $event) || (model_r14.VendorID = $event); return i0.ɵɵresetView($event); });
|
|
397
|
+
i0.ɵɵtemplate(1, AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_8_Conditional_0_Conditional_0_ng_template_1_Template, 3, 4, "ng-template", 113);
|
|
378
398
|
i0.ɵɵelementEnd();
|
|
379
399
|
} if (rf & 2) {
|
|
380
|
-
const
|
|
381
|
-
const
|
|
382
|
-
const ɵ$
|
|
400
|
+
const ctx_r14 = i0.ɵɵnextContext(3);
|
|
401
|
+
const model_r14 = ctx_r14.$implicit;
|
|
402
|
+
const ɵ$index_279_r12 = ctx_r14.$index;
|
|
383
403
|
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
384
|
-
i0.ɵɵtwoWayProperty("ngModel",
|
|
385
|
-
i0.ɵɵproperty("name", "vendorId_" + ɵ$
|
|
404
|
+
i0.ɵɵtwoWayProperty("ngModel", model_r14.VendorID);
|
|
405
|
+
i0.ɵɵproperty("name", "vendorId_" + ɵ$index_279_r12)("data", ctx_r1.getVendorsForModelSync(model_r14.ModelID))("valuePrimitive", true)("filterable", true);
|
|
386
406
|
} }
|
|
387
|
-
function
|
|
388
|
-
i0.ɵɵelementStart(0, "span",
|
|
407
|
+
function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_8_Conditional_0_Conditional_1_Conditional_0_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
408
|
+
i0.ɵɵelementStart(0, "span", 114);
|
|
389
409
|
i0.ɵɵtext(1);
|
|
390
410
|
i0.ɵɵelementEnd();
|
|
391
411
|
} if (rf & 2) {
|
|
392
|
-
const
|
|
412
|
+
const model_r14 = i0.ɵɵnextContext(5).$implicit;
|
|
393
413
|
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
394
414
|
i0.ɵɵadvance();
|
|
395
|
-
i0.ɵɵtextInterpolate1("(", ctx_r1.getModelVendorStatus(
|
|
415
|
+
i0.ɵɵtextInterpolate1("(", ctx_r1.getModelVendorStatus(model_r14.ModelID, ctx_r1.getVendorsForModelSync(model_r14.ModelID)[0].ID), ")");
|
|
396
416
|
} }
|
|
397
|
-
function
|
|
398
|
-
i0.ɵɵelementStart(0, "span",
|
|
417
|
+
function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_8_Conditional_0_Conditional_1_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
418
|
+
i0.ɵɵelementStart(0, "span", 116);
|
|
399
419
|
i0.ɵɵtext(1);
|
|
400
|
-
i0.ɵɵtemplate(2,
|
|
420
|
+
i0.ɵɵtemplate(2, AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_8_Conditional_0_Conditional_1_Conditional_0_Conditional_2_Template, 2, 1, "span", 114);
|
|
401
421
|
i0.ɵɵelementEnd();
|
|
402
422
|
} if (rf & 2) {
|
|
403
|
-
const
|
|
423
|
+
const model_r14 = i0.ɵɵnextContext(4).$implicit;
|
|
404
424
|
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
405
|
-
i0.ɵɵstyleProp("color", ctx_r1.getVendorStatusColor(
|
|
425
|
+
i0.ɵɵstyleProp("color", ctx_r1.getVendorStatusColor(model_r14.ModelID, ctx_r1.getVendorsForModelSync(model_r14.ModelID)[0].ID));
|
|
406
426
|
i0.ɵɵadvance();
|
|
407
|
-
i0.ɵɵtextInterpolate1(" ", ctx_r1.getVendorsForModelSync(
|
|
427
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.getVendorsForModelSync(model_r14.ModelID)[0].Name, " ");
|
|
408
428
|
i0.ɵɵadvance();
|
|
409
|
-
i0.ɵɵconditional(ctx_r1.getModelVendorStatus(
|
|
429
|
+
i0.ɵɵconditional(ctx_r1.getModelVendorStatus(model_r14.ModelID, ctx_r1.getVendorsForModelSync(model_r14.ModelID)[0].ID) !== "Active" ? 2 : -1);
|
|
410
430
|
} }
|
|
411
|
-
function
|
|
412
|
-
i0.ɵɵelementStart(0, "span",
|
|
431
|
+
function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_8_Conditional_0_Conditional_1_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
432
|
+
i0.ɵɵelementStart(0, "span", 110);
|
|
413
433
|
i0.ɵɵtext(1, "No vendors available");
|
|
414
434
|
i0.ɵɵelementEnd();
|
|
415
435
|
} }
|
|
416
|
-
function
|
|
417
|
-
i0.ɵɵtemplate(0,
|
|
436
|
+
function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_8_Conditional_0_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
437
|
+
i0.ɵɵtemplate(0, AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_8_Conditional_0_Conditional_1_Conditional_0_Template, 3, 4, "span", 115)(1, AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_8_Conditional_0_Conditional_1_Conditional_1_Template, 2, 0, "span", 110);
|
|
418
438
|
} if (rf & 2) {
|
|
419
|
-
const
|
|
439
|
+
const model_r14 = i0.ɵɵnextContext(3).$implicit;
|
|
420
440
|
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
421
|
-
i0.ɵɵconditional(ctx_r1.getVendorsForModelSync(
|
|
441
|
+
i0.ɵɵconditional(ctx_r1.getVendorsForModelSync(model_r14.ModelID).length === 1 ? 0 : 1);
|
|
422
442
|
} }
|
|
423
|
-
function
|
|
424
|
-
i0.ɵɵtemplate(0,
|
|
443
|
+
function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_8_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
444
|
+
i0.ɵɵtemplate(0, AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_8_Conditional_0_Conditional_0_Template, 2, 5, "kendo-dropdownlist", 111)(1, AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_8_Conditional_0_Conditional_1_Template, 2, 1);
|
|
425
445
|
} if (rf & 2) {
|
|
426
|
-
const
|
|
446
|
+
const model_r14 = i0.ɵɵnextContext(2).$implicit;
|
|
427
447
|
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
428
|
-
i0.ɵɵconditional(ctx_r1.shouldShowVendorDropdown(
|
|
448
|
+
i0.ɵɵconditional(ctx_r1.shouldShowVendorDropdown(model_r14.ModelID) ? 0 : 1);
|
|
429
449
|
} }
|
|
430
|
-
function
|
|
431
|
-
i0.ɵɵelementStart(0, "span",
|
|
450
|
+
function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_8_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
451
|
+
i0.ɵɵelementStart(0, "span", 110);
|
|
432
452
|
i0.ɵɵtext(1, "Select model first");
|
|
433
453
|
i0.ɵɵelementEnd();
|
|
434
454
|
} }
|
|
435
|
-
function
|
|
436
|
-
i0.ɵɵtemplate(0,
|
|
455
|
+
function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
456
|
+
i0.ɵɵtemplate(0, AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_8_Conditional_0_Template, 2, 1)(1, AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_8_Conditional_1_Template, 2, 0, "span", 110);
|
|
437
457
|
} if (rf & 2) {
|
|
438
|
-
const
|
|
439
|
-
i0.ɵɵconditional(
|
|
458
|
+
const model_r14 = i0.ɵɵnextContext().$implicit;
|
|
459
|
+
i0.ɵɵconditional(model_r14.ModelID ? 0 : 1);
|
|
440
460
|
} }
|
|
441
|
-
function
|
|
442
|
-
i0.ɵɵelementStart(0, "span",
|
|
461
|
+
function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_9_Conditional_0_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
462
|
+
i0.ɵɵelementStart(0, "span", 114);
|
|
443
463
|
i0.ɵɵtext(1);
|
|
444
464
|
i0.ɵɵelementEnd();
|
|
445
465
|
} if (rf & 2) {
|
|
446
|
-
const
|
|
466
|
+
const model_r14 = i0.ɵɵnextContext(3).$implicit;
|
|
447
467
|
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
448
468
|
i0.ɵɵadvance();
|
|
449
|
-
i0.ɵɵtextInterpolate1("(", ctx_r1.getModelVendorStatus(
|
|
469
|
+
i0.ɵɵtextInterpolate1("(", ctx_r1.getModelVendorStatus(model_r14.ModelID, model_r14.VendorID), ")");
|
|
450
470
|
} }
|
|
451
|
-
function
|
|
452
|
-
i0.ɵɵelementStart(0, "span",
|
|
471
|
+
function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_9_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
472
|
+
i0.ɵɵelementStart(0, "span", 119);
|
|
453
473
|
i0.ɵɵtext(1);
|
|
454
|
-
i0.ɵɵtemplate(2,
|
|
474
|
+
i0.ɵɵtemplate(2, AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_9_Conditional_0_Conditional_2_Template, 2, 1, "span", 114);
|
|
455
475
|
i0.ɵɵelementEnd();
|
|
456
476
|
} if (rf & 2) {
|
|
457
|
-
const
|
|
477
|
+
const model_r14 = i0.ɵɵnextContext(2).$implicit;
|
|
458
478
|
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
459
|
-
i0.ɵɵstyleProp("color", ctx_r1.getVendorStatusColor(
|
|
479
|
+
i0.ɵɵstyleProp("color", ctx_r1.getVendorStatusColor(model_r14.ModelID, model_r14.VendorID));
|
|
460
480
|
i0.ɵɵadvance();
|
|
461
|
-
i0.ɵɵtextInterpolate1(" ", ctx_r1.getVendorDisplayName(
|
|
481
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.getVendorDisplayName(model_r14.VendorID), " ");
|
|
462
482
|
i0.ɵɵadvance();
|
|
463
|
-
i0.ɵɵconditional(ctx_r1.getModelVendorStatus(
|
|
483
|
+
i0.ɵɵconditional(ctx_r1.getModelVendorStatus(model_r14.ModelID, model_r14.VendorID) !== "Active" ? 2 : -1);
|
|
464
484
|
} }
|
|
465
|
-
function
|
|
466
|
-
i0.ɵɵelementStart(0, "span",
|
|
485
|
+
function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_9_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
486
|
+
i0.ɵɵelementStart(0, "span", 118);
|
|
467
487
|
i0.ɵɵtext(1, "-");
|
|
468
488
|
i0.ɵɵelementEnd();
|
|
469
489
|
} }
|
|
470
|
-
function
|
|
471
|
-
i0.ɵɵtemplate(0,
|
|
490
|
+
function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_9_Template(rf, ctx) { if (rf & 1) {
|
|
491
|
+
i0.ɵɵtemplate(0, AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_9_Conditional_0_Template, 3, 4, "span", 117)(1, AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_9_Conditional_1_Template, 2, 0, "span", 118);
|
|
472
492
|
} if (rf & 2) {
|
|
473
|
-
const
|
|
474
|
-
i0.ɵɵconditional(
|
|
493
|
+
const model_r14 = i0.ɵɵnextContext().$implicit;
|
|
494
|
+
i0.ɵɵconditional(model_r14.VendorID && model_r14.ModelID ? 0 : 1);
|
|
475
495
|
} }
|
|
476
|
-
function
|
|
477
|
-
i0.ɵɵelementStart(0, "span",
|
|
496
|
+
function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_11_Template(rf, ctx) { if (rf & 1) {
|
|
497
|
+
i0.ɵɵelementStart(0, "span", 101);
|
|
478
498
|
i0.ɵɵtext(1);
|
|
479
499
|
i0.ɵɵpipe(2, "date");
|
|
480
500
|
i0.ɵɵelementEnd();
|
|
481
501
|
} if (rf & 2) {
|
|
482
|
-
const
|
|
502
|
+
const model_r14 = i0.ɵɵnextContext().$implicit;
|
|
483
503
|
i0.ɵɵadvance();
|
|
484
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1,
|
|
504
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, model_r14.__mj_CreatedAt, "short"));
|
|
485
505
|
} }
|
|
486
|
-
function
|
|
487
|
-
i0.ɵɵelementStart(0, "span",
|
|
506
|
+
function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_12_Template(rf, ctx) { if (rf & 1) {
|
|
507
|
+
i0.ɵɵelementStart(0, "span", 102);
|
|
488
508
|
i0.ɵɵtext(1, "New");
|
|
489
509
|
i0.ɵɵelementEnd();
|
|
490
510
|
} }
|
|
491
|
-
function
|
|
492
|
-
const
|
|
493
|
-
i0.ɵɵelementStart(0, "div",
|
|
494
|
-
i0.ɵɵlistener("click", function
|
|
495
|
-
i0.ɵɵelement(2, "i",
|
|
511
|
+
function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_14_Template(rf, ctx) { if (rf & 1) {
|
|
512
|
+
const _r18 = i0.ɵɵgetCurrentView();
|
|
513
|
+
i0.ɵɵelementStart(0, "div", 120)(1, "button", 121);
|
|
514
|
+
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_14_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r18); const ɵ$index_279_r12 = i0.ɵɵnextContext().$index; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.moveModelUp(ɵ$index_279_r12)); });
|
|
515
|
+
i0.ɵɵelement(2, "i", 122);
|
|
496
516
|
i0.ɵɵelementEnd();
|
|
497
|
-
i0.ɵɵelementStart(3, "
|
|
498
|
-
i0.ɵɵlistener("click", function
|
|
499
|
-
i0.ɵɵelement(4, "i",
|
|
517
|
+
i0.ɵɵelementStart(3, "button", 123);
|
|
518
|
+
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_14_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r18); const ɵ$index_279_r12 = i0.ɵɵnextContext().$index; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.moveModelDown(ɵ$index_279_r12)); });
|
|
519
|
+
i0.ɵɵelement(4, "i", 124);
|
|
500
520
|
i0.ɵɵelementEnd()();
|
|
501
|
-
i0.ɵɵelementStart(5, "
|
|
502
|
-
i0.ɵɵlistener("click", function
|
|
503
|
-
i0.ɵɵelement(6, "i",
|
|
521
|
+
i0.ɵɵelementStart(5, "button", 125);
|
|
522
|
+
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_14_Template_button_click_5_listener() { i0.ɵɵrestoreView(_r18); const ɵ$index_279_r12 = i0.ɵɵnextContext().$index; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.removePromptModel(ɵ$index_279_r12)); });
|
|
523
|
+
i0.ɵɵelement(6, "i", 126);
|
|
504
524
|
i0.ɵɵelementEnd();
|
|
505
525
|
} if (rf & 2) {
|
|
506
|
-
const ɵ$
|
|
526
|
+
const ɵ$index_279_r12 = i0.ɵɵnextContext().$index;
|
|
507
527
|
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
508
528
|
i0.ɵɵadvance();
|
|
509
|
-
i0.ɵɵproperty("disabled", ɵ$
|
|
529
|
+
i0.ɵɵproperty("disabled", ɵ$index_279_r12 === 0);
|
|
510
530
|
i0.ɵɵadvance(2);
|
|
511
|
-
i0.ɵɵproperty("disabled", ɵ$
|
|
531
|
+
i0.ɵɵproperty("disabled", ɵ$index_279_r12 === ctx_r1.promptModels.length - 1);
|
|
512
532
|
} }
|
|
513
|
-
function
|
|
533
|
+
function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_19_Template(rf, ctx) { if (rf & 1) {
|
|
514
534
|
i0.ɵɵelementStart(0, "span")(1, "strong");
|
|
515
535
|
i0.ɵɵtext(2, "Status:");
|
|
516
536
|
i0.ɵɵelementEnd();
|
|
517
537
|
i0.ɵɵtext(3);
|
|
518
538
|
i0.ɵɵelementEnd();
|
|
519
539
|
} if (rf & 2) {
|
|
520
|
-
const
|
|
540
|
+
const model_r14 = i0.ɵɵnextContext().$implicit;
|
|
521
541
|
i0.ɵɵadvance(3);
|
|
522
|
-
i0.ɵɵtextInterpolate1(" ",
|
|
542
|
+
i0.ɵɵtextInterpolate1(" ", model_r14.Status, "");
|
|
523
543
|
} }
|
|
524
|
-
function
|
|
544
|
+
function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_20_Template(rf, ctx) { if (rf & 1) {
|
|
525
545
|
i0.ɵɵelementStart(0, "span")(1, "strong");
|
|
526
546
|
i0.ɵɵtext(2, "Configuration:");
|
|
527
547
|
i0.ɵɵelementEnd();
|
|
528
548
|
i0.ɵɵtext(3);
|
|
529
549
|
i0.ɵɵelementEnd();
|
|
530
550
|
} if (rf & 2) {
|
|
531
|
-
const
|
|
551
|
+
const model_r14 = i0.ɵɵnextContext().$implicit;
|
|
532
552
|
i0.ɵɵadvance(3);
|
|
533
|
-
i0.ɵɵtextInterpolate1(" ",
|
|
553
|
+
i0.ɵɵtextInterpolate1(" ", model_r14.ConfigurationID, "");
|
|
534
554
|
} }
|
|
535
|
-
function
|
|
536
|
-
const
|
|
537
|
-
i0.ɵɵelementStart(0, "div")(1, "label",
|
|
555
|
+
function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_21_Conditional_4_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
556
|
+
const _r20 = i0.ɵɵgetCurrentView();
|
|
557
|
+
i0.ɵɵelementStart(0, "div")(1, "label", 131);
|
|
538
558
|
i0.ɵɵtext(2, "Parallel Count");
|
|
539
559
|
i0.ɵɵelementEnd();
|
|
540
|
-
i0.ɵɵelementStart(3, "kendo-numerictextbox",
|
|
541
|
-
i0.ɵɵtwoWayListener("ngModelChange", function
|
|
560
|
+
i0.ɵɵelementStart(3, "kendo-numerictextbox", 133);
|
|
561
|
+
i0.ɵɵtwoWayListener("ngModelChange", function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_21_Conditional_4_Conditional_5_Template_kendo_numerictextbox_ngModelChange_3_listener($event) { i0.ɵɵrestoreView(_r20); const model_r14 = i0.ɵɵnextContext(3).$implicit; i0.ɵɵtwoWayBindingSet(model_r14.ParallelCount, $event) || (model_r14.ParallelCount = $event); return i0.ɵɵresetView($event); });
|
|
542
562
|
i0.ɵɵelementEnd()();
|
|
543
563
|
} if (rf & 2) {
|
|
544
|
-
const
|
|
545
|
-
const
|
|
546
|
-
const ɵ$
|
|
564
|
+
const ctx_r14 = i0.ɵɵnextContext(3);
|
|
565
|
+
const model_r14 = ctx_r14.$implicit;
|
|
566
|
+
const ɵ$index_279_r12 = ctx_r14.$index;
|
|
547
567
|
i0.ɵɵadvance(3);
|
|
548
|
-
i0.ɵɵtwoWayProperty("ngModel",
|
|
549
|
-
i0.ɵɵproperty("name", "parallelCount_" + ɵ$
|
|
568
|
+
i0.ɵɵtwoWayProperty("ngModel", model_r14.ParallelCount);
|
|
569
|
+
i0.ɵɵproperty("name", "parallelCount_" + ɵ$index_279_r12)("min", 1)("step", 1)("format", "n0");
|
|
550
570
|
} }
|
|
551
|
-
function
|
|
552
|
-
const
|
|
553
|
-
i0.ɵɵelementStart(0, "div")(1, "label",
|
|
571
|
+
function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_21_Conditional_4_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
572
|
+
const _r21 = i0.ɵɵgetCurrentView();
|
|
573
|
+
i0.ɵɵelementStart(0, "div")(1, "label", 131);
|
|
554
574
|
i0.ɵɵtext(2, "Config Parameter");
|
|
555
575
|
i0.ɵɵelementEnd();
|
|
556
|
-
i0.ɵɵelementStart(3, "kendo-textbox",
|
|
557
|
-
i0.ɵɵtwoWayListener("ngModelChange", function
|
|
576
|
+
i0.ɵɵelementStart(3, "kendo-textbox", 134);
|
|
577
|
+
i0.ɵɵtwoWayListener("ngModelChange", function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_21_Conditional_4_Conditional_6_Template_kendo_textbox_ngModelChange_3_listener($event) { i0.ɵɵrestoreView(_r21); const model_r14 = i0.ɵɵnextContext(3).$implicit; i0.ɵɵtwoWayBindingSet(model_r14.ParallelConfigParam, $event) || (model_r14.ParallelConfigParam = $event); return i0.ɵɵresetView($event); });
|
|
558
578
|
i0.ɵɵelementEnd()();
|
|
559
579
|
} if (rf & 2) {
|
|
560
|
-
const
|
|
561
|
-
const
|
|
562
|
-
const ɵ$
|
|
580
|
+
const ctx_r14 = i0.ɵɵnextContext(3);
|
|
581
|
+
const model_r14 = ctx_r14.$implicit;
|
|
582
|
+
const ɵ$index_279_r12 = ctx_r14.$index;
|
|
563
583
|
i0.ɵɵadvance(3);
|
|
564
|
-
i0.ɵɵtwoWayProperty("ngModel",
|
|
565
|
-
i0.ɵɵproperty("name", "parallelConfigParam_" + ɵ$
|
|
584
|
+
i0.ɵɵtwoWayProperty("ngModel", model_r14.ParallelConfigParam);
|
|
585
|
+
i0.ɵɵproperty("name", "parallelConfigParam_" + ɵ$index_279_r12);
|
|
566
586
|
} }
|
|
567
|
-
function
|
|
568
|
-
const
|
|
569
|
-
i0.ɵɵelementStart(0, "div",
|
|
587
|
+
function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_21_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
588
|
+
const _r19 = i0.ɵɵgetCurrentView();
|
|
589
|
+
i0.ɵɵelementStart(0, "div", 129)(1, "div")(2, "label", 131);
|
|
570
590
|
i0.ɵɵtext(3, "Parallel Mode");
|
|
571
591
|
i0.ɵɵelementEnd();
|
|
572
|
-
i0.ɵɵelementStart(4, "kendo-dropdownlist",
|
|
573
|
-
i0.ɵɵtwoWayListener("ngModelChange", function
|
|
592
|
+
i0.ɵɵelementStart(4, "kendo-dropdownlist", 132);
|
|
593
|
+
i0.ɵɵtwoWayListener("ngModelChange", function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_21_Conditional_4_Template_kendo_dropdownlist_ngModelChange_4_listener($event) { i0.ɵɵrestoreView(_r19); const model_r14 = i0.ɵɵnextContext(2).$implicit; i0.ɵɵtwoWayBindingSet(model_r14.ParallelizationMode, $event) || (model_r14.ParallelizationMode = $event); return i0.ɵɵresetView($event); });
|
|
574
594
|
i0.ɵɵelementEnd()();
|
|
575
|
-
i0.ɵɵtemplate(5,
|
|
595
|
+
i0.ɵɵtemplate(5, AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_21_Conditional_4_Conditional_5_Template, 4, 5, "div")(6, AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_21_Conditional_4_Conditional_6_Template, 4, 2, "div");
|
|
576
596
|
i0.ɵɵelementEnd();
|
|
577
597
|
} if (rf & 2) {
|
|
578
|
-
const
|
|
579
|
-
const
|
|
580
|
-
const ɵ$
|
|
598
|
+
const ctx_r14 = i0.ɵɵnextContext(2);
|
|
599
|
+
const model_r14 = ctx_r14.$implicit;
|
|
600
|
+
const ɵ$index_279_r12 = ctx_r14.$index;
|
|
581
601
|
i0.ɵɵadvance(4);
|
|
582
|
-
i0.ɵɵtwoWayProperty("ngModel",
|
|
583
|
-
i0.ɵɵproperty("name", "parallelMode_" + ɵ$
|
|
602
|
+
i0.ɵɵtwoWayProperty("ngModel", model_r14.ParallelizationMode);
|
|
603
|
+
i0.ɵɵproperty("name", "parallelMode_" + ɵ$index_279_r12)("data", i0.ɵɵpureFunction3(9, _c4, i0.ɵɵpureFunction0(6, _c5), i0.ɵɵpureFunction0(7, _c6), i0.ɵɵpureFunction0(8, _c7)))("valuePrimitive", true);
|
|
584
604
|
i0.ɵɵadvance();
|
|
585
|
-
i0.ɵɵconditional(
|
|
605
|
+
i0.ɵɵconditional(model_r14.ParallelizationMode === "StaticCount" ? 5 : -1);
|
|
586
606
|
i0.ɵɵadvance();
|
|
587
|
-
i0.ɵɵconditional(
|
|
607
|
+
i0.ɵɵconditional(model_r14.ParallelizationMode === "ConfigParam" ? 6 : -1);
|
|
588
608
|
} }
|
|
589
|
-
function
|
|
609
|
+
function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_21_Conditional_5_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
590
610
|
i0.ɵɵelementStart(0, "span")(1, "strong");
|
|
591
611
|
i0.ɵɵtext(2, "Parallel Mode:");
|
|
592
612
|
i0.ɵɵelementEnd();
|
|
593
613
|
i0.ɵɵtext(3);
|
|
594
614
|
i0.ɵɵelementEnd();
|
|
595
615
|
} if (rf & 2) {
|
|
596
|
-
const
|
|
616
|
+
const model_r14 = i0.ɵɵnextContext(3).$implicit;
|
|
597
617
|
i0.ɵɵadvance(3);
|
|
598
|
-
i0.ɵɵtextInterpolate1(" ",
|
|
618
|
+
i0.ɵɵtextInterpolate1(" ", model_r14.ParallelizationMode, "");
|
|
599
619
|
} }
|
|
600
|
-
function
|
|
620
|
+
function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_21_Conditional_5_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
601
621
|
i0.ɵɵelementStart(0, "span")(1, "strong");
|
|
602
622
|
i0.ɵɵtext(2, "Parallel Count:");
|
|
603
623
|
i0.ɵɵelementEnd();
|
|
604
624
|
i0.ɵɵtext(3);
|
|
605
625
|
i0.ɵɵelementEnd();
|
|
606
626
|
} if (rf & 2) {
|
|
607
|
-
const
|
|
627
|
+
const model_r14 = i0.ɵɵnextContext(3).$implicit;
|
|
608
628
|
i0.ɵɵadvance(3);
|
|
609
|
-
i0.ɵɵtextInterpolate1(" ",
|
|
629
|
+
i0.ɵɵtextInterpolate1(" ", model_r14.ParallelCount, "");
|
|
610
630
|
} }
|
|
611
|
-
function
|
|
631
|
+
function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_21_Conditional_5_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
612
632
|
i0.ɵɵelementStart(0, "span")(1, "strong");
|
|
613
633
|
i0.ɵɵtext(2, "Config Param:");
|
|
614
634
|
i0.ɵɵelementEnd();
|
|
615
635
|
i0.ɵɵtext(3);
|
|
616
636
|
i0.ɵɵelementEnd();
|
|
617
637
|
} if (rf & 2) {
|
|
618
|
-
const
|
|
638
|
+
const model_r14 = i0.ɵɵnextContext(3).$implicit;
|
|
619
639
|
i0.ɵɵadvance(3);
|
|
620
|
-
i0.ɵɵtextInterpolate1(" ",
|
|
640
|
+
i0.ɵɵtextInterpolate1(" ", model_r14.ParallelConfigParam, "");
|
|
621
641
|
} }
|
|
622
|
-
function
|
|
623
|
-
i0.ɵɵelementStart(0, "div",
|
|
624
|
-
i0.ɵɵtemplate(1,
|
|
642
|
+
function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_21_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
643
|
+
i0.ɵɵelementStart(0, "div", 130);
|
|
644
|
+
i0.ɵɵtemplate(1, AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_21_Conditional_5_Conditional_1_Template, 4, 1, "span")(2, AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_21_Conditional_5_Conditional_2_Template, 4, 1, "span")(3, AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_21_Conditional_5_Conditional_3_Template, 4, 1, "span");
|
|
625
645
|
i0.ɵɵelementEnd();
|
|
626
646
|
} if (rf & 2) {
|
|
627
|
-
const
|
|
647
|
+
const model_r14 = i0.ɵɵnextContext(2).$implicit;
|
|
628
648
|
i0.ɵɵadvance();
|
|
629
|
-
i0.ɵɵconditional(
|
|
649
|
+
i0.ɵɵconditional(model_r14.ParallelizationMode ? 1 : -1);
|
|
630
650
|
i0.ɵɵadvance();
|
|
631
|
-
i0.ɵɵconditional(
|
|
651
|
+
i0.ɵɵconditional(model_r14.ParallelCount ? 2 : -1);
|
|
632
652
|
i0.ɵɵadvance();
|
|
633
|
-
i0.ɵɵconditional(
|
|
653
|
+
i0.ɵɵconditional(model_r14.ParallelConfigParam ? 3 : -1);
|
|
634
654
|
} }
|
|
635
|
-
function
|
|
636
|
-
i0.ɵɵelementStart(0, "div",
|
|
637
|
-
i0.ɵɵelement(2, "i",
|
|
655
|
+
function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_21_Template(rf, ctx) { if (rf & 1) {
|
|
656
|
+
i0.ɵɵelementStart(0, "div", 106)(1, "div", 127);
|
|
657
|
+
i0.ɵɵelement(2, "i", 128);
|
|
638
658
|
i0.ɵɵtext(3, " Model-Specific Parallel Execution ");
|
|
639
659
|
i0.ɵɵelementEnd();
|
|
640
|
-
i0.ɵɵtemplate(4,
|
|
660
|
+
i0.ɵɵtemplate(4, AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_21_Conditional_4_Template, 7, 13, "div", 129)(5, AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_21_Conditional_5_Template, 4, 3, "div", 130);
|
|
641
661
|
i0.ɵɵelementEnd();
|
|
642
662
|
} if (rf & 2) {
|
|
643
663
|
const ctx_r1 = i0.ɵɵnextContext(6);
|
|
644
664
|
i0.ɵɵadvance(4);
|
|
645
665
|
i0.ɵɵconditional(ctx_r1.EditMode ? 4 : 5);
|
|
646
666
|
} }
|
|
647
|
-
function
|
|
648
|
-
i0.ɵɵ
|
|
649
|
-
i0.ɵɵ
|
|
667
|
+
function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Template(rf, ctx) { if (rf & 1) {
|
|
668
|
+
const _r11 = i0.ɵɵgetCurrentView();
|
|
669
|
+
i0.ɵɵelementStart(0, "div", 94);
|
|
670
|
+
i0.ɵɵlistener("dragstart", function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Template_div_dragstart_0_listener($event) { const ɵ$index_279_r12 = i0.ɵɵrestoreView(_r11).$index; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.onDragStart($event, ɵ$index_279_r12)); })("dragover", function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Template_div_dragover_0_listener($event) { i0.ɵɵrestoreView(_r11); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.onDragOver($event)); })("drop", function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Template_div_drop_0_listener($event) { const ɵ$index_279_r12 = i0.ɵɵrestoreView(_r11).$index; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.onDrop($event, ɵ$index_279_r12)); })("dragend", function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Template_div_dragend_0_listener($event) { i0.ɵɵrestoreView(_r11); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.onDragEnd($event)); });
|
|
671
|
+
i0.ɵɵelementStart(1, "div", 95);
|
|
672
|
+
i0.ɵɵtemplate(2, AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_2_Template, 3, 1)(3, AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_3_Template, 2, 3, "span", 96);
|
|
650
673
|
i0.ɵɵelementEnd();
|
|
651
|
-
i0.ɵɵelementStart(4, "div",
|
|
652
|
-
i0.ɵɵtemplate(5,
|
|
674
|
+
i0.ɵɵelementStart(4, "div", 97);
|
|
675
|
+
i0.ɵɵtemplate(5, AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_5_Template, 1, 5, "kendo-dropdownlist", 98)(6, AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_6_Template, 2, 1, "span", 23);
|
|
653
676
|
i0.ɵɵelementEnd();
|
|
654
|
-
i0.ɵɵelementStart(7, "div",
|
|
655
|
-
i0.ɵɵtemplate(8,
|
|
677
|
+
i0.ɵɵelementStart(7, "div", 99);
|
|
678
|
+
i0.ɵɵtemplate(8, AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_8_Template, 2, 1)(9, AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_9_Template, 2, 1);
|
|
656
679
|
i0.ɵɵelementEnd();
|
|
657
|
-
i0.ɵɵelementStart(10, "div",
|
|
658
|
-
i0.ɵɵtemplate(11,
|
|
680
|
+
i0.ɵɵelementStart(10, "div", 100);
|
|
681
|
+
i0.ɵɵtemplate(11, AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_11_Template, 3, 4, "span", 101)(12, AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_12_Template, 2, 0, "span", 102);
|
|
659
682
|
i0.ɵɵelementEnd();
|
|
660
|
-
i0.ɵɵelementStart(13, "div",
|
|
661
|
-
i0.ɵɵtemplate(14,
|
|
683
|
+
i0.ɵɵelementStart(13, "div", 103);
|
|
684
|
+
i0.ɵɵtemplate(14, AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_14_Template, 7, 2);
|
|
662
685
|
i0.ɵɵelementEnd()();
|
|
663
|
-
i0.ɵɵelementStart(15, "div",
|
|
686
|
+
i0.ɵɵelementStart(15, "div", 104);
|
|
664
687
|
i0.ɵɵelement(16, "div");
|
|
665
|
-
i0.ɵɵelementStart(17, "div")(18, "div",
|
|
666
|
-
i0.ɵɵtemplate(19,
|
|
688
|
+
i0.ɵɵelementStart(17, "div")(18, "div", 105);
|
|
689
|
+
i0.ɵɵtemplate(19, AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_19_Template, 4, 1, "span")(20, AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_20_Template, 4, 1, "span");
|
|
667
690
|
i0.ɵɵelementEnd();
|
|
668
|
-
i0.ɵɵtemplate(21,
|
|
691
|
+
i0.ɵɵtemplate(21, AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Conditional_21_Template, 6, 1, "div", 106);
|
|
669
692
|
i0.ɵɵelementEnd()();
|
|
670
693
|
} if (rf & 2) {
|
|
671
|
-
const
|
|
694
|
+
const model_r14 = ctx.$implicit;
|
|
695
|
+
const ɵ$index_279_r12 = ctx.$index;
|
|
672
696
|
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
673
|
-
i0.ɵɵstyleProp("background", !
|
|
697
|
+
i0.ɵɵstyleProp("background", !model_r14.ModelID ? "#fff3cd" : ctx_r1.draggedIndex === ɵ$index_279_r12 ? "#e3f2fd" : "white")("border-left", !model_r14.ModelID ? "3px solid #ffc107" : "none")("opacity", ctx_r1.draggedIndex === ɵ$index_279_r12 ? "0.5" : "1");
|
|
698
|
+
i0.ɵɵproperty("draggable", ctx_r1.EditMode);
|
|
674
699
|
i0.ɵɵadvance(2);
|
|
675
700
|
i0.ɵɵconditional(ctx_r1.EditMode ? 2 : 3);
|
|
676
701
|
i0.ɵɵadvance(3);
|
|
@@ -678,61 +703,64 @@ function AIPromptFormComponentExtended_form_1_Conditional_43_Conditional_5_Condi
|
|
|
678
703
|
i0.ɵɵadvance(3);
|
|
679
704
|
i0.ɵɵconditional(ctx_r1.EditMode ? 8 : 9);
|
|
680
705
|
i0.ɵɵadvance(3);
|
|
681
|
-
i0.ɵɵconditional(
|
|
706
|
+
i0.ɵɵconditional(model_r14.ID ? 11 : 12);
|
|
682
707
|
i0.ɵɵadvance(3);
|
|
683
708
|
i0.ɵɵconditional(ctx_r1.EditMode ? 14 : -1);
|
|
684
709
|
i0.ɵɵadvance(5);
|
|
685
|
-
i0.ɵɵconditional(
|
|
710
|
+
i0.ɵɵconditional(model_r14.Status ? 19 : -1);
|
|
686
711
|
i0.ɵɵadvance();
|
|
687
|
-
i0.ɵɵconditional(
|
|
712
|
+
i0.ɵɵconditional(model_r14.ConfigurationID ? 20 : -1);
|
|
688
713
|
i0.ɵɵadvance();
|
|
689
714
|
i0.ɵɵconditional(ctx_r1.record.ParallelizationMode === "ModelSpecific" ? 21 : -1);
|
|
690
715
|
} }
|
|
691
|
-
function
|
|
692
|
-
const
|
|
693
|
-
i0.ɵɵelementStart(0, "div",
|
|
694
|
-
i0.ɵɵlistener("click", function
|
|
695
|
-
i0.ɵɵelement(2, "i",
|
|
716
|
+
function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_Conditional_16_Template(rf, ctx) { if (rf & 1) {
|
|
717
|
+
const _r22 = i0.ɵɵgetCurrentView();
|
|
718
|
+
i0.ɵɵelementStart(0, "div", 92)(1, "button", 135);
|
|
719
|
+
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_Conditional_16_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r22); const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.addNewModel()); });
|
|
720
|
+
i0.ɵɵelement(2, "i", 70);
|
|
696
721
|
i0.ɵɵtext(3, " Add Model ");
|
|
697
722
|
i0.ɵɵelementEnd()();
|
|
698
723
|
} }
|
|
699
|
-
function
|
|
700
|
-
i0.ɵɵ
|
|
701
|
-
i0.ɵɵ
|
|
702
|
-
i0.ɵɵ
|
|
703
|
-
i0.ɵɵtext(3, "AI Model ");
|
|
704
|
-
i0.ɵɵelementStart(4, "span", 53);
|
|
705
|
-
i0.ɵɵtext(5, "*");
|
|
706
|
-
i0.ɵɵelementEnd()();
|
|
707
|
-
i0.ɵɵelementStart(6, "div");
|
|
708
|
-
i0.ɵɵtext(7, "Vendor");
|
|
724
|
+
function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
725
|
+
i0.ɵɵtemplate(0, AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_Conditional_0_Template, 3, 0, "div", 88);
|
|
726
|
+
i0.ɵɵelementStart(1, "div", 89)(2, "div", 90);
|
|
727
|
+
i0.ɵɵelement(3, "i", 91);
|
|
709
728
|
i0.ɵɵelementEnd();
|
|
729
|
+
i0.ɵɵelementStart(4, "div");
|
|
730
|
+
i0.ɵɵtext(5, "AI Model ");
|
|
731
|
+
i0.ɵɵelementStart(6, "span", 51);
|
|
732
|
+
i0.ɵɵtext(7, "*");
|
|
733
|
+
i0.ɵɵelementEnd()();
|
|
710
734
|
i0.ɵɵelementStart(8, "div");
|
|
711
|
-
i0.ɵɵtext(9, "
|
|
735
|
+
i0.ɵɵtext(9, "Vendor");
|
|
712
736
|
i0.ɵɵelementEnd();
|
|
713
737
|
i0.ɵɵelementStart(10, "div");
|
|
714
|
-
i0.ɵɵtext(11, "
|
|
738
|
+
i0.ɵɵtext(11, "Created");
|
|
739
|
+
i0.ɵɵelementEnd();
|
|
740
|
+
i0.ɵɵelementStart(12, "div");
|
|
741
|
+
i0.ɵɵtext(13, "Actions");
|
|
715
742
|
i0.ɵɵelementEnd()();
|
|
716
|
-
i0.ɵɵrepeaterCreate(
|
|
717
|
-
i0.ɵɵtemplate(
|
|
743
|
+
i0.ɵɵrepeaterCreate(14, AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_For_15_Template, 22, 15, null, null, _forTrack0);
|
|
744
|
+
i0.ɵɵtemplate(16, AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_Conditional_16_Template, 4, 0, "div", 92);
|
|
718
745
|
} if (rf & 2) {
|
|
719
746
|
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
720
|
-
i0.ɵɵ
|
|
747
|
+
i0.ɵɵconditional(ctx_r1.promptModels.length > 1 ? 0 : -1);
|
|
748
|
+
i0.ɵɵadvance(14);
|
|
721
749
|
i0.ɵɵrepeater(ctx_r1.promptModels);
|
|
722
750
|
i0.ɵɵadvance(2);
|
|
723
|
-
i0.ɵɵconditional(ctx_r1.EditMode ?
|
|
751
|
+
i0.ɵɵconditional(ctx_r1.EditMode ? 16 : -1);
|
|
724
752
|
} }
|
|
725
|
-
function
|
|
726
|
-
i0.ɵɵtemplate(0,
|
|
753
|
+
function AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
754
|
+
i0.ɵɵtemplate(0, AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_0_Template, 4, 1, "div", 84)(1, AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Conditional_1_Template, 17, 2);
|
|
727
755
|
} if (rf & 2) {
|
|
728
756
|
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
729
757
|
i0.ɵɵconditional(ctx_r1.promptModels.length === 0 ? 0 : 1);
|
|
730
758
|
} }
|
|
731
|
-
function
|
|
732
|
-
i0.ɵɵelementStart(0, "kendo-expansionpanel",
|
|
733
|
-
i0.ɵɵtemplate(1,
|
|
734
|
-
i0.ɵɵelementStart(2, "div",
|
|
735
|
-
i0.ɵɵtemplate(4,
|
|
759
|
+
function AIPromptFormComponentExtended_form_1_Conditional_41_Template(rf, ctx) { if (rf & 1) {
|
|
760
|
+
i0.ɵɵelementStart(0, "kendo-expansionpanel", 29);
|
|
761
|
+
i0.ɵɵtemplate(1, AIPromptFormComponentExtended_form_1_Conditional_41_ng_template_1_Template, 7, 1, "ng-template", 30);
|
|
762
|
+
i0.ɵɵelementStart(2, "div", 36)(3, "div", 78);
|
|
763
|
+
i0.ɵɵtemplate(4, AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_4_Template, 3, 0, "div", 79)(5, AIPromptFormComponentExtended_form_1_Conditional_41_Conditional_5_Template, 2, 1);
|
|
736
764
|
i0.ɵɵelementEnd()()();
|
|
737
765
|
} if (rf & 2) {
|
|
738
766
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
@@ -740,49 +768,49 @@ function AIPromptFormComponentExtended_form_1_Conditional_43_Template(rf, ctx) {
|
|
|
740
768
|
i0.ɵɵadvance(4);
|
|
741
769
|
i0.ɵɵconditional(ctx_r1.isLoadingModels ? 4 : 5);
|
|
742
770
|
} }
|
|
743
|
-
function
|
|
744
|
-
i0.ɵɵelementStart(0, "span",
|
|
745
|
-
i0.ɵɵelement(1, "i",
|
|
771
|
+
function AIPromptFormComponentExtended_form_1_ng_template_43_Template(rf, ctx) { if (rf & 1) {
|
|
772
|
+
i0.ɵɵelementStart(0, "span", 62);
|
|
773
|
+
i0.ɵɵelement(1, "i", 136);
|
|
746
774
|
i0.ɵɵtext(2, " Advanced Configuration ");
|
|
747
775
|
i0.ɵɵelementEnd();
|
|
748
776
|
} }
|
|
749
|
-
function
|
|
750
|
-
i0.ɵɵelement(0, "mj-form-field",
|
|
777
|
+
function AIPromptFormComponentExtended_form_1_Conditional_48_Template(rf, ctx) { if (rf & 1) {
|
|
778
|
+
i0.ɵɵelement(0, "mj-form-field", 39);
|
|
751
779
|
} if (rf & 2) {
|
|
752
780
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
753
781
|
i0.ɵɵproperty("record", ctx_r1.record)("ShowLabel", true)("EditMode", ctx_r1.EditMode);
|
|
754
782
|
} }
|
|
755
|
-
function
|
|
756
|
-
i0.ɵɵelement(0, "mj-form-field",
|
|
783
|
+
function AIPromptFormComponentExtended_form_1_Conditional_49_Template(rf, ctx) { if (rf & 1) {
|
|
784
|
+
i0.ɵɵelement(0, "mj-form-field", 40);
|
|
757
785
|
} if (rf & 2) {
|
|
758
786
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
759
787
|
i0.ɵɵproperty("record", ctx_r1.record)("ShowLabel", true)("EditMode", ctx_r1.EditMode);
|
|
760
788
|
} }
|
|
761
|
-
function
|
|
762
|
-
i0.ɵɵelementStart(0, "div",
|
|
763
|
-
i0.ɵɵelement(1, "i",
|
|
789
|
+
function AIPromptFormComponentExtended_form_1_Conditional_57_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
790
|
+
i0.ɵɵelementStart(0, "div", 137);
|
|
791
|
+
i0.ɵɵelement(1, "i", 54);
|
|
764
792
|
i0.ɵɵtext(2, " Loading prompts... ");
|
|
765
793
|
i0.ɵɵelementEnd();
|
|
766
794
|
} }
|
|
767
|
-
function
|
|
768
|
-
const
|
|
769
|
-
i0.ɵɵelementStart(0, "kendo-dropdowntree",
|
|
770
|
-
i0.ɵɵtwoWayListener("ngModelChange", function
|
|
771
|
-
i0.ɵɵlistener("valueChange", function
|
|
795
|
+
function AIPromptFormComponentExtended_form_1_Conditional_57_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
796
|
+
const _r23 = i0.ɵɵgetCurrentView();
|
|
797
|
+
i0.ɵɵelementStart(0, "kendo-dropdowntree", 139);
|
|
798
|
+
i0.ɵɵtwoWayListener("ngModelChange", function AIPromptFormComponentExtended_form_1_Conditional_57_Conditional_1_Template_kendo_dropdowntree_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r23); const ctx_r1 = i0.ɵɵnextContext(3); i0.ɵɵtwoWayBindingSet(ctx_r1.record.ResultSelectorPromptID, $event) || (ctx_r1.record.ResultSelectorPromptID = $event); return i0.ɵɵresetView($event); });
|
|
799
|
+
i0.ɵɵlistener("valueChange", function AIPromptFormComponentExtended_form_1_Conditional_57_Conditional_1_Template_kendo_dropdowntree_valueChange_0_listener($event) { i0.ɵɵrestoreView(_r23); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.onResultSelectorChange($event)); });
|
|
772
800
|
i0.ɵɵelementEnd();
|
|
773
801
|
} if (rf & 2) {
|
|
774
802
|
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
775
803
|
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.record.ResultSelectorPromptID);
|
|
776
804
|
i0.ɵɵproperty("data", ctx_r1.resultSelectorTreeData)("valuePrimitive", true)("filterable", true);
|
|
777
805
|
} }
|
|
778
|
-
function
|
|
779
|
-
i0.ɵɵtemplate(0,
|
|
806
|
+
function AIPromptFormComponentExtended_form_1_Conditional_57_Template(rf, ctx) { if (rf & 1) {
|
|
807
|
+
i0.ɵɵtemplate(0, AIPromptFormComponentExtended_form_1_Conditional_57_Conditional_0_Template, 3, 0, "div", 137)(1, AIPromptFormComponentExtended_form_1_Conditional_57_Conditional_1_Template, 1, 4, "kendo-dropdowntree", 138);
|
|
780
808
|
} if (rf & 2) {
|
|
781
809
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
782
810
|
i0.ɵɵconditional(ctx_r1.isLoadingResultSelectorData ? 0 : 1);
|
|
783
811
|
} }
|
|
784
|
-
function
|
|
785
|
-
i0.ɵɵelementStart(0, "span",
|
|
812
|
+
function AIPromptFormComponentExtended_form_1_Conditional_58_Template(rf, ctx) { if (rf & 1) {
|
|
813
|
+
i0.ɵɵelementStart(0, "span", 46);
|
|
786
814
|
i0.ɵɵtext(1);
|
|
787
815
|
i0.ɵɵelementEnd();
|
|
788
816
|
} if (rf & 2) {
|
|
@@ -790,29 +818,29 @@ function AIPromptFormComponentExtended_form_1_Conditional_60_Template(rf, ctx) {
|
|
|
790
818
|
i0.ɵɵadvance();
|
|
791
819
|
i0.ɵɵtextInterpolate(ctx_r1.getPromptDisplayName(ctx_r1.record.ResultSelectorPromptID || "") || "None selected");
|
|
792
820
|
} }
|
|
793
|
-
function
|
|
794
|
-
i0.ɵɵelementStart(0, "span",
|
|
821
|
+
function AIPromptFormComponentExtended_form_1_Conditional_59_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
822
|
+
i0.ɵɵelementStart(0, "span", 62);
|
|
795
823
|
i0.ɵɵelement(1, "i", 22);
|
|
796
824
|
i0.ɵɵtext(2, " Output Example (JSON) ");
|
|
797
|
-
i0.ɵɵelementStart(3, "span",
|
|
825
|
+
i0.ɵɵelementStart(3, "span", 143);
|
|
798
826
|
i0.ɵɵtext(4, "\u2022 Required for object output type");
|
|
799
827
|
i0.ɵɵelementEnd()();
|
|
800
828
|
} }
|
|
801
|
-
function
|
|
802
|
-
const
|
|
803
|
-
i0.ɵɵelementStart(0, "mj-code-editor",
|
|
804
|
-
i0.ɵɵtwoWayListener("ngModelChange", function
|
|
829
|
+
function AIPromptFormComponentExtended_form_1_Conditional_59_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
830
|
+
const _r24 = i0.ɵɵgetCurrentView();
|
|
831
|
+
i0.ɵɵelementStart(0, "mj-code-editor", 144);
|
|
832
|
+
i0.ɵɵtwoWayListener("ngModelChange", function AIPromptFormComponentExtended_form_1_Conditional_59_Conditional_3_Template_mj_code_editor_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r24); const ctx_r1 = i0.ɵɵnextContext(3); i0.ɵɵtwoWayBindingSet(ctx_r1.record.OutputExample, $event) || (ctx_r1.record.OutputExample = $event); return i0.ɵɵresetView($event); });
|
|
805
833
|
i0.ɵɵelementEnd();
|
|
806
|
-
i0.ɵɵelementStart(1, "div",
|
|
807
|
-
i0.ɵɵelement(2, "i",
|
|
834
|
+
i0.ɵɵelementStart(1, "div", 145);
|
|
835
|
+
i0.ɵɵelement(2, "i", 85);
|
|
808
836
|
i0.ɵɵtext(3, " Provide a JSON example that defines the expected structure for object output validation. ");
|
|
809
837
|
i0.ɵɵelementEnd();
|
|
810
838
|
} if (rf & 2) {
|
|
811
839
|
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
812
840
|
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.record.OutputExample);
|
|
813
841
|
} }
|
|
814
|
-
function
|
|
815
|
-
i0.ɵɵelementStart(0, "div",
|
|
842
|
+
function AIPromptFormComponentExtended_form_1_Conditional_59_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
843
|
+
i0.ɵɵelementStart(0, "div", 141);
|
|
816
844
|
i0.ɵɵtext(1);
|
|
817
845
|
i0.ɵɵelementEnd();
|
|
818
846
|
} if (rf & 2) {
|
|
@@ -820,17 +848,17 @@ function AIPromptFormComponentExtended_form_1_Conditional_61_Conditional_4_Templ
|
|
|
820
848
|
i0.ɵɵadvance();
|
|
821
849
|
i0.ɵɵtextInterpolate(ctx_r1.record.OutputExample);
|
|
822
850
|
} }
|
|
823
|
-
function
|
|
824
|
-
i0.ɵɵelementStart(0, "div",
|
|
825
|
-
i0.ɵɵelement(1, "i",
|
|
851
|
+
function AIPromptFormComponentExtended_form_1_Conditional_59_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
852
|
+
i0.ɵɵelementStart(0, "div", 142);
|
|
853
|
+
i0.ɵɵelement(1, "i", 146);
|
|
826
854
|
i0.ɵɵtext(2, " Output example is required when output type is 'object' ");
|
|
827
855
|
i0.ɵɵelementEnd();
|
|
828
856
|
} }
|
|
829
|
-
function
|
|
830
|
-
i0.ɵɵelementStart(0, "kendo-expansionpanel",
|
|
831
|
-
i0.ɵɵtemplate(1,
|
|
832
|
-
i0.ɵɵelementStart(2, "div",
|
|
833
|
-
i0.ɵɵtemplate(3,
|
|
857
|
+
function AIPromptFormComponentExtended_form_1_Conditional_59_Template(rf, ctx) { if (rf & 1) {
|
|
858
|
+
i0.ɵɵelementStart(0, "kendo-expansionpanel", 29);
|
|
859
|
+
i0.ɵɵtemplate(1, AIPromptFormComponentExtended_form_1_Conditional_59_ng_template_1_Template, 5, 0, "ng-template", 30);
|
|
860
|
+
i0.ɵɵelementStart(2, "div", 140);
|
|
861
|
+
i0.ɵɵtemplate(3, AIPromptFormComponentExtended_form_1_Conditional_59_Conditional_3_Template, 4, 1)(4, AIPromptFormComponentExtended_form_1_Conditional_59_Conditional_4_Template, 2, 1, "div", 141)(5, AIPromptFormComponentExtended_form_1_Conditional_59_Conditional_5_Template, 3, 0, "div", 142);
|
|
834
862
|
i0.ɵɵelementEnd()();
|
|
835
863
|
} if (rf & 2) {
|
|
836
864
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
@@ -838,35 +866,233 @@ function AIPromptFormComponentExtended_form_1_Conditional_61_Template(rf, ctx) {
|
|
|
838
866
|
i0.ɵɵadvance(3);
|
|
839
867
|
i0.ɵɵconditional(ctx_r1.EditMode ? 3 : ctx_r1.record.OutputExample ? 4 : 5);
|
|
840
868
|
} }
|
|
841
|
-
function
|
|
842
|
-
i0.ɵɵelementStart(0, "span",
|
|
843
|
-
i0.ɵɵ
|
|
869
|
+
function AIPromptFormComponentExtended_form_1_Conditional_60_ng_template_1_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
870
|
+
i0.ɵɵelementStart(0, "span", 149);
|
|
871
|
+
i0.ɵɵtext(1);
|
|
872
|
+
i0.ɵɵelementEnd();
|
|
873
|
+
} if (rf & 2) {
|
|
874
|
+
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
875
|
+
i0.ɵɵadvance();
|
|
876
|
+
i0.ɵɵtextInterpolate1("(", ctx_r1.executionHistory.length, ")");
|
|
877
|
+
} }
|
|
878
|
+
function AIPromptFormComponentExtended_form_1_Conditional_60_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
879
|
+
i0.ɵɵelementStart(0, "span", 62);
|
|
880
|
+
i0.ɵɵelement(1, "i", 148);
|
|
844
881
|
i0.ɵɵtext(2, " Execution History ");
|
|
882
|
+
i0.ɵɵtemplate(3, AIPromptFormComponentExtended_form_1_Conditional_60_ng_template_1_Conditional_3_Template, 2, 1, "span", 149);
|
|
845
883
|
i0.ɵɵelementEnd();
|
|
884
|
+
} if (rf & 2) {
|
|
885
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
886
|
+
i0.ɵɵadvance(3);
|
|
887
|
+
i0.ɵɵconditional(ctx_r1.executionHistory.length > 0 ? 3 : -1);
|
|
846
888
|
} }
|
|
847
|
-
function
|
|
848
|
-
i0.ɵɵelementStart(0, "
|
|
849
|
-
i0.ɵɵ
|
|
850
|
-
i0.ɵɵelementStart(2, "
|
|
851
|
-
i0.ɵɵ
|
|
889
|
+
function AIPromptFormComponentExtended_form_1_Conditional_60_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
890
|
+
i0.ɵɵelementStart(0, "div", 147);
|
|
891
|
+
i0.ɵɵelement(1, "i", 150);
|
|
892
|
+
i0.ɵɵelementStart(2, "p");
|
|
893
|
+
i0.ɵɵtext(3, "Loading execution history...");
|
|
894
|
+
i0.ɵɵelementEnd()();
|
|
895
|
+
} }
|
|
896
|
+
function AIPromptFormComponentExtended_form_1_Conditional_60_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
897
|
+
i0.ɵɵelementStart(0, "div", 147);
|
|
898
|
+
i0.ɵɵelement(1, "i", 151);
|
|
899
|
+
i0.ɵɵelementStart(2, "p");
|
|
900
|
+
i0.ɵɵtext(3, "No execution history yet");
|
|
901
|
+
i0.ɵɵelementEnd();
|
|
902
|
+
i0.ɵɵelementStart(4, "p", 119);
|
|
903
|
+
i0.ɵɵtext(5, "Run this prompt to see execution history here");
|
|
904
|
+
i0.ɵɵelementEnd()();
|
|
905
|
+
} }
|
|
906
|
+
function AIPromptFormComponentExtended_form_1_Conditional_60_Conditional_5_Conditional_9_Template(rf, ctx) { if (rf & 1) {
|
|
907
|
+
i0.ɵɵelement(0, "i", 165);
|
|
908
|
+
} if (rf & 2) {
|
|
909
|
+
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
910
|
+
i0.ɵɵclassMap("fa-solid fa-sort-" + (ctx_r1.historySortDirection === "asc" ? "up" : "down"));
|
|
911
|
+
} }
|
|
912
|
+
function AIPromptFormComponentExtended_form_1_Conditional_60_Conditional_5_Conditional_12_Template(rf, ctx) { if (rf & 1) {
|
|
913
|
+
i0.ɵɵelement(0, "i", 165);
|
|
914
|
+
} if (rf & 2) {
|
|
915
|
+
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
916
|
+
i0.ɵɵclassMap("fa-solid fa-sort-" + (ctx_r1.historySortDirection === "asc" ? "up" : "down"));
|
|
917
|
+
} }
|
|
918
|
+
function AIPromptFormComponentExtended_form_1_Conditional_60_Conditional_5_Conditional_15_Template(rf, ctx) { if (rf & 1) {
|
|
919
|
+
i0.ɵɵelement(0, "i", 165);
|
|
920
|
+
} if (rf & 2) {
|
|
921
|
+
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
922
|
+
i0.ɵɵclassMap("fa-solid fa-sort-" + (ctx_r1.historySortDirection === "asc" ? "up" : "down"));
|
|
923
|
+
} }
|
|
924
|
+
function AIPromptFormComponentExtended_form_1_Conditional_60_Conditional_5_Conditional_18_Template(rf, ctx) { if (rf & 1) {
|
|
925
|
+
i0.ɵɵelement(0, "i", 165);
|
|
926
|
+
} if (rf & 2) {
|
|
927
|
+
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
928
|
+
i0.ɵɵclassMap("fa-solid fa-sort-" + (ctx_r1.historySortDirection === "asc" ? "up" : "down"));
|
|
929
|
+
} }
|
|
930
|
+
function AIPromptFormComponentExtended_form_1_Conditional_60_Conditional_5_For_41_Conditional_20_Template(rf, ctx) { if (rf & 1) {
|
|
931
|
+
i0.ɵɵelementStart(0, "span", 172);
|
|
932
|
+
i0.ɵɵtext(1);
|
|
933
|
+
i0.ɵɵelementEnd();
|
|
934
|
+
} if (rf & 2) {
|
|
935
|
+
const run_r27 = i0.ɵɵnextContext().$implicit;
|
|
936
|
+
i0.ɵɵadvance();
|
|
937
|
+
i0.ɵɵtextInterpolate1(" ", run_r27.RunType, " ");
|
|
938
|
+
} }
|
|
939
|
+
function AIPromptFormComponentExtended_form_1_Conditional_60_Conditional_5_For_41_Template(rf, ctx) { if (rf & 1) {
|
|
940
|
+
const _r26 = i0.ɵɵgetCurrentView();
|
|
941
|
+
i0.ɵɵelementStart(0, "tr", 166)(1, "td", 167)(2, "span", 168);
|
|
942
|
+
i0.ɵɵelement(3, "i");
|
|
943
|
+
i0.ɵɵelementStart(4, "span", 23);
|
|
944
|
+
i0.ɵɵtext(5);
|
|
945
|
+
i0.ɵɵelementEnd()()();
|
|
946
|
+
i0.ɵɵelementStart(6, "td", 169);
|
|
947
|
+
i0.ɵɵtext(7);
|
|
948
|
+
i0.ɵɵpipe(8, "date");
|
|
949
|
+
i0.ɵɵelementEnd();
|
|
950
|
+
i0.ɵɵelementStart(9, "td", 169)(10, "span", 168);
|
|
951
|
+
i0.ɵɵelement(11, "i", 80);
|
|
952
|
+
i0.ɵɵtext(12);
|
|
953
|
+
i0.ɵɵelementEnd()();
|
|
954
|
+
i0.ɵɵelementStart(13, "td", 169);
|
|
955
|
+
i0.ɵɵtext(14);
|
|
956
|
+
i0.ɵɵelementEnd();
|
|
957
|
+
i0.ɵɵelementStart(15, "td", 170);
|
|
958
|
+
i0.ɵɵtext(16);
|
|
959
|
+
i0.ɵɵelementEnd();
|
|
960
|
+
i0.ɵɵelementStart(17, "td", 170);
|
|
961
|
+
i0.ɵɵtext(18);
|
|
962
|
+
i0.ɵɵelementEnd();
|
|
963
|
+
i0.ɵɵelementStart(19, "td", 171);
|
|
964
|
+
i0.ɵɵtemplate(20, AIPromptFormComponentExtended_form_1_Conditional_60_Conditional_5_For_41_Conditional_20_Template, 2, 1, "span", 172);
|
|
965
|
+
i0.ɵɵelementEnd();
|
|
966
|
+
i0.ɵɵelementStart(21, "td", 171)(22, "button", 173);
|
|
967
|
+
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_1_Conditional_60_Conditional_5_For_41_Template_button_click_22_listener() { const run_r27 = i0.ɵɵrestoreView(_r26).$implicit; const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.navigateToPromptRun(run_r27.ID)); });
|
|
968
|
+
i0.ɵɵelement(23, "i", 174);
|
|
969
|
+
i0.ɵɵelementEnd()()();
|
|
970
|
+
} if (rf & 2) {
|
|
971
|
+
const run_r27 = ctx.$implicit;
|
|
972
|
+
const ɵ$index_654_r28 = ctx.$index;
|
|
973
|
+
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
974
|
+
i0.ɵɵclassProp("even-row", ɵ$index_654_r28 % 2 === 0);
|
|
975
|
+
i0.ɵɵadvance(3);
|
|
976
|
+
i0.ɵɵclassMap("fa-solid " + ctx_r1.getExecutionStatusIcon(run_r27.Success));
|
|
977
|
+
i0.ɵɵstyleProp("color", ctx_r1.getExecutionStatusColor(run_r27.Success));
|
|
978
|
+
i0.ɵɵadvance();
|
|
979
|
+
i0.ɵɵstyleProp("color", ctx_r1.getExecutionStatusColor(run_r27.Success));
|
|
980
|
+
i0.ɵɵadvance();
|
|
981
|
+
i0.ɵɵtextInterpolate1(" ", run_r27.Success === true ? "Success" : run_r27.Success === false ? "Failed" : "Running", " ");
|
|
982
|
+
i0.ɵɵadvance(2);
|
|
983
|
+
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(8, 15, run_r27.RunAt, "short"), " ");
|
|
984
|
+
i0.ɵɵadvance(5);
|
|
985
|
+
i0.ɵɵtextInterpolate1(" ", run_r27.Model || "Unknown", " ");
|
|
986
|
+
i0.ɵɵadvance(2);
|
|
987
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.formatDuration(run_r27.ExecutionTimeMS), " ");
|
|
988
|
+
i0.ɵɵadvance(2);
|
|
989
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.formatTokens(run_r27.TokensUsed), " ");
|
|
990
|
+
i0.ɵɵadvance(2);
|
|
991
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.formatCost(run_r27.TotalCost || run_r27.Cost), " ");
|
|
992
|
+
i0.ɵɵadvance(2);
|
|
993
|
+
i0.ɵɵconditional(run_r27.RunType ? 20 : -1);
|
|
994
|
+
} }
|
|
995
|
+
function AIPromptFormComponentExtended_form_1_Conditional_60_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
996
|
+
const _r25 = i0.ɵɵgetCurrentView();
|
|
997
|
+
i0.ɵɵelementStart(0, "div", 152)(1, "div", 118);
|
|
998
|
+
i0.ɵɵtext(2);
|
|
999
|
+
i0.ɵɵelementEnd();
|
|
1000
|
+
i0.ɵɵelementStart(3, "div", 153)(4, "span", 154);
|
|
1001
|
+
i0.ɵɵtext(5, "Sort by:");
|
|
1002
|
+
i0.ɵɵelementEnd();
|
|
1003
|
+
i0.ɵɵelementStart(6, "kendo-buttongroup", 155)(7, "button", 156);
|
|
1004
|
+
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_1_Conditional_60_Conditional_5_Template_button_click_7_listener() { i0.ɵɵrestoreView(_r25); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.changeHistorySort("runAt")); });
|
|
1005
|
+
i0.ɵɵtext(8, " Date ");
|
|
1006
|
+
i0.ɵɵtemplate(9, AIPromptFormComponentExtended_form_1_Conditional_60_Conditional_5_Conditional_9_Template, 1, 2, "i", 157);
|
|
1007
|
+
i0.ɵɵelementEnd();
|
|
1008
|
+
i0.ɵɵelementStart(10, "button", 156);
|
|
1009
|
+
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_1_Conditional_60_Conditional_5_Template_button_click_10_listener() { i0.ɵɵrestoreView(_r25); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.changeHistorySort("executionTime")); });
|
|
1010
|
+
i0.ɵɵtext(11, " Duration ");
|
|
1011
|
+
i0.ɵɵtemplate(12, AIPromptFormComponentExtended_form_1_Conditional_60_Conditional_5_Conditional_12_Template, 1, 2, "i", 157);
|
|
1012
|
+
i0.ɵɵelementEnd();
|
|
1013
|
+
i0.ɵɵelementStart(13, "button", 156);
|
|
1014
|
+
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_1_Conditional_60_Conditional_5_Template_button_click_13_listener() { i0.ɵɵrestoreView(_r25); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.changeHistorySort("tokens")); });
|
|
1015
|
+
i0.ɵɵtext(14, " Tokens ");
|
|
1016
|
+
i0.ɵɵtemplate(15, AIPromptFormComponentExtended_form_1_Conditional_60_Conditional_5_Conditional_15_Template, 1, 2, "i", 157);
|
|
1017
|
+
i0.ɵɵelementEnd();
|
|
1018
|
+
i0.ɵɵelementStart(16, "button", 156);
|
|
1019
|
+
i0.ɵɵlistener("click", function AIPromptFormComponentExtended_form_1_Conditional_60_Conditional_5_Template_button_click_16_listener() { i0.ɵɵrestoreView(_r25); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.changeHistorySort("cost")); });
|
|
1020
|
+
i0.ɵɵtext(17, " Cost ");
|
|
1021
|
+
i0.ɵɵtemplate(18, AIPromptFormComponentExtended_form_1_Conditional_60_Conditional_5_Conditional_18_Template, 1, 2, "i", 157);
|
|
1022
|
+
i0.ɵɵelementEnd()()()();
|
|
1023
|
+
i0.ɵɵelementStart(19, "div", 158)(20, "table", 159)(21, "thead")(22, "tr", 160)(23, "th", 161);
|
|
1024
|
+
i0.ɵɵtext(24, "Status");
|
|
1025
|
+
i0.ɵɵelementEnd();
|
|
1026
|
+
i0.ɵɵelementStart(25, "th", 161);
|
|
1027
|
+
i0.ɵɵtext(26, "Date & Time");
|
|
1028
|
+
i0.ɵɵelementEnd();
|
|
1029
|
+
i0.ɵɵelementStart(27, "th", 161);
|
|
1030
|
+
i0.ɵɵtext(28, "Model");
|
|
1031
|
+
i0.ɵɵelementEnd();
|
|
1032
|
+
i0.ɵɵelementStart(29, "th", 161);
|
|
1033
|
+
i0.ɵɵtext(30, "Duration");
|
|
1034
|
+
i0.ɵɵelementEnd();
|
|
1035
|
+
i0.ɵɵelementStart(31, "th", 162);
|
|
1036
|
+
i0.ɵɵtext(32, "Tokens");
|
|
1037
|
+
i0.ɵɵelementEnd();
|
|
1038
|
+
i0.ɵɵelementStart(33, "th", 162);
|
|
1039
|
+
i0.ɵɵtext(34, "Cost");
|
|
1040
|
+
i0.ɵɵelementEnd();
|
|
1041
|
+
i0.ɵɵelementStart(35, "th", 163);
|
|
1042
|
+
i0.ɵɵtext(36, "Type");
|
|
1043
|
+
i0.ɵɵelementEnd();
|
|
1044
|
+
i0.ɵɵelementStart(37, "th", 163);
|
|
1045
|
+
i0.ɵɵtext(38, "Actions");
|
|
1046
|
+
i0.ɵɵelementEnd()()();
|
|
1047
|
+
i0.ɵɵelementStart(39, "tbody");
|
|
1048
|
+
i0.ɵɵrepeaterCreate(40, AIPromptFormComponentExtended_form_1_Conditional_60_Conditional_5_For_41_Template, 24, 18, "tr", 164, _forTrack1);
|
|
1049
|
+
i0.ɵɵelementEnd()()();
|
|
1050
|
+
} if (rf & 2) {
|
|
1051
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
1052
|
+
i0.ɵɵadvance(2);
|
|
1053
|
+
i0.ɵɵtextInterpolate1(" Showing ", ctx_r1.executionHistory.length, " executions ");
|
|
1054
|
+
i0.ɵɵadvance(5);
|
|
1055
|
+
i0.ɵɵproperty("selected", ctx_r1.historySortField === "runAt");
|
|
1056
|
+
i0.ɵɵadvance(2);
|
|
1057
|
+
i0.ɵɵconditional(ctx_r1.historySortField === "runAt" ? 9 : -1);
|
|
1058
|
+
i0.ɵɵadvance();
|
|
1059
|
+
i0.ɵɵproperty("selected", ctx_r1.historySortField === "executionTime");
|
|
1060
|
+
i0.ɵɵadvance(2);
|
|
1061
|
+
i0.ɵɵconditional(ctx_r1.historySortField === "executionTime" ? 12 : -1);
|
|
1062
|
+
i0.ɵɵadvance();
|
|
1063
|
+
i0.ɵɵproperty("selected", ctx_r1.historySortField === "tokens");
|
|
1064
|
+
i0.ɵɵadvance(2);
|
|
1065
|
+
i0.ɵɵconditional(ctx_r1.historySortField === "tokens" ? 15 : -1);
|
|
1066
|
+
i0.ɵɵadvance();
|
|
1067
|
+
i0.ɵɵproperty("selected", ctx_r1.historySortField === "cost");
|
|
1068
|
+
i0.ɵɵadvance(2);
|
|
1069
|
+
i0.ɵɵconditional(ctx_r1.historySortField === "cost" ? 18 : -1);
|
|
1070
|
+
i0.ɵɵadvance(22);
|
|
1071
|
+
i0.ɵɵrepeater(ctx_r1.executionHistory);
|
|
1072
|
+
} }
|
|
1073
|
+
function AIPromptFormComponentExtended_form_1_Conditional_60_Template(rf, ctx) { if (rf & 1) {
|
|
1074
|
+
i0.ɵɵelementStart(0, "kendo-expansionpanel", 29);
|
|
1075
|
+
i0.ɵɵtemplate(1, AIPromptFormComponentExtended_form_1_Conditional_60_ng_template_1_Template, 4, 1, "ng-template", 30);
|
|
1076
|
+
i0.ɵɵelementStart(2, "div", 140);
|
|
1077
|
+
i0.ɵɵtemplate(3, AIPromptFormComponentExtended_form_1_Conditional_60_Conditional_3_Template, 4, 0, "div", 147)(4, AIPromptFormComponentExtended_form_1_Conditional_60_Conditional_4_Template, 6, 0, "div", 147)(5, AIPromptFormComponentExtended_form_1_Conditional_60_Conditional_5_Template, 42, 9);
|
|
852
1078
|
i0.ɵɵelementEnd()();
|
|
853
1079
|
} if (rf & 2) {
|
|
854
1080
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
855
1081
|
i0.ɵɵproperty("expanded", false);
|
|
856
1082
|
i0.ɵɵadvance(3);
|
|
857
|
-
i0.ɵɵ
|
|
1083
|
+
i0.ɵɵconditional(ctx_r1.isLoadingHistory ? 3 : ctx_r1.executionHistory.length === 0 ? 4 : 5);
|
|
858
1084
|
} }
|
|
859
|
-
function
|
|
860
|
-
i0.ɵɵelementStart(0, "span",
|
|
861
|
-
i0.ɵɵelement(1, "i",
|
|
1085
|
+
function AIPromptFormComponentExtended_form_1_Conditional_61_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
1086
|
+
i0.ɵɵelementStart(0, "span", 62);
|
|
1087
|
+
i0.ɵɵelement(1, "i", 176);
|
|
862
1088
|
i0.ɵɵtext(2, " Result Cache ");
|
|
863
1089
|
i0.ɵɵelementEnd();
|
|
864
1090
|
} }
|
|
865
|
-
function
|
|
866
|
-
i0.ɵɵelementStart(0, "kendo-expansionpanel",
|
|
867
|
-
i0.ɵɵtemplate(1,
|
|
868
|
-
i0.ɵɵelementStart(2, "div",
|
|
869
|
-
i0.ɵɵelement(3, "mj-user-view-grid",
|
|
1091
|
+
function AIPromptFormComponentExtended_form_1_Conditional_61_Template(rf, ctx) { if (rf & 1) {
|
|
1092
|
+
i0.ɵɵelementStart(0, "kendo-expansionpanel", 29);
|
|
1093
|
+
i0.ɵɵtemplate(1, AIPromptFormComponentExtended_form_1_Conditional_61_ng_template_1_Template, 3, 0, "ng-template", 30);
|
|
1094
|
+
i0.ɵɵelementStart(2, "div", 36);
|
|
1095
|
+
i0.ɵɵelement(3, "mj-user-view-grid", 175);
|
|
870
1096
|
i0.ɵɵelementEnd()();
|
|
871
1097
|
} if (rf & 2) {
|
|
872
1098
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
@@ -874,24 +1100,24 @@ function AIPromptFormComponentExtended_form_1_Conditional_63_Template(rf, ctx) {
|
|
|
874
1100
|
i0.ɵɵadvance(3);
|
|
875
1101
|
i0.ɵɵproperty("Params", ctx_r1.BuildRelationshipViewParamsByEntityName("AI Result Cache", "AIPromptID"))("NewRecordValues", ctx_r1.NewRecordValues("AI Result Cache"))("AllowLoad", true)("EditMode", ctx_r1.GridEditMode())("BottomMargin", 0);
|
|
876
1102
|
} }
|
|
877
|
-
function
|
|
878
|
-
i0.ɵɵelementStart(0, "span",
|
|
879
|
-
i0.ɵɵelement(1, "i",
|
|
1103
|
+
function AIPromptFormComponentExtended_form_1_Conditional_62_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
1104
|
+
i0.ɵɵelementStart(0, "span", 62);
|
|
1105
|
+
i0.ɵɵelement(1, "i", 179);
|
|
880
1106
|
i0.ɵɵtext(2, " Related Items ");
|
|
881
1107
|
i0.ɵɵelementEnd();
|
|
882
1108
|
} }
|
|
883
|
-
function
|
|
884
|
-
i0.ɵɵelementStart(0, "kendo-expansionpanel",
|
|
885
|
-
i0.ɵɵtemplate(1,
|
|
886
|
-
i0.ɵɵelementStart(2, "div",
|
|
1109
|
+
function AIPromptFormComponentExtended_form_1_Conditional_62_Template(rf, ctx) { if (rf & 1) {
|
|
1110
|
+
i0.ɵɵelementStart(0, "kendo-expansionpanel", 29);
|
|
1111
|
+
i0.ɵɵtemplate(1, AIPromptFormComponentExtended_form_1_Conditional_62_ng_template_1_Template, 3, 0, "ng-template", 30);
|
|
1112
|
+
i0.ɵɵelementStart(2, "div", 36)(3, "div", 37)(4, "div")(5, "h6", 177);
|
|
887
1113
|
i0.ɵɵtext(6, "AI Agents Using This Prompt");
|
|
888
1114
|
i0.ɵɵelementEnd();
|
|
889
|
-
i0.ɵɵelement(7, "mj-user-view-grid",
|
|
1115
|
+
i0.ɵɵelement(7, "mj-user-view-grid", 178);
|
|
890
1116
|
i0.ɵɵelementEnd();
|
|
891
|
-
i0.ɵɵelementStart(8, "div")(9, "h6",
|
|
1117
|
+
i0.ɵɵelementStart(8, "div")(9, "h6", 177);
|
|
892
1118
|
i0.ɵɵtext(10, "Prompts Using This as Result Selector");
|
|
893
1119
|
i0.ɵɵelementEnd();
|
|
894
|
-
i0.ɵɵelement(11, "mj-user-view-grid",
|
|
1120
|
+
i0.ɵɵelement(11, "mj-user-view-grid", 178);
|
|
895
1121
|
i0.ɵɵelementEnd()()()();
|
|
896
1122
|
} if (rf & 2) {
|
|
897
1123
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
@@ -930,31 +1156,31 @@ function AIPromptFormComponentExtended_form_1_Template(rf, ctx) { if (rf & 1) {
|
|
|
930
1156
|
i0.ɵɵtemplate(28, AIPromptFormComponentExtended_form_1_Conditional_28_Template, 4, 0, "div", 18);
|
|
931
1157
|
i0.ɵɵelementEnd()();
|
|
932
1158
|
i0.ɵɵelementStart(29, "div", 24)(30, "div", 25);
|
|
933
|
-
i0.ɵɵtemplate(31, AIPromptFormComponentExtended_form_1_Conditional_31_Template, 3,
|
|
1159
|
+
i0.ɵɵtemplate(31, AIPromptFormComponentExtended_form_1_Conditional_31_Template, 3, 2, "button", 26);
|
|
934
1160
|
i0.ɵɵelementEnd();
|
|
935
|
-
i0.ɵɵtemplate(
|
|
1161
|
+
i0.ɵɵtemplate(32, AIPromptFormComponentExtended_form_1_Conditional_32_Template, 4, 3, "div", 27);
|
|
936
1162
|
i0.ɵɵelementEnd()()();
|
|
937
|
-
i0.ɵɵelementStart(
|
|
938
|
-
i0.ɵɵtemplate(
|
|
939
|
-
i0.ɵɵelementStart(
|
|
940
|
-
i0.ɵɵtemplate(
|
|
1163
|
+
i0.ɵɵelementStart(33, "div", 28)(34, "kendo-expansionpanel", 29);
|
|
1164
|
+
i0.ɵɵtemplate(35, AIPromptFormComponentExtended_form_1_ng_template_35_Template, 4, 1, "ng-template", 30);
|
|
1165
|
+
i0.ɵɵelementStart(36, "div", 31);
|
|
1166
|
+
i0.ɵɵtemplate(37, AIPromptFormComponentExtended_form_1_Conditional_37_Template, 3, 0, "div", 32)(38, AIPromptFormComponentExtended_form_1_Conditional_38_Template, 13, 2, "div", 33)(39, AIPromptFormComponentExtended_form_1_Conditional_39_Template, 13, 2, "div", 34)(40, AIPromptFormComponentExtended_form_1_Conditional_40_Template, 4, 2, "div", 35);
|
|
941
1167
|
i0.ɵɵelementEnd()();
|
|
942
|
-
i0.ɵɵtemplate(
|
|
943
|
-
i0.ɵɵelementStart(
|
|
944
|
-
i0.ɵɵtemplate(
|
|
945
|
-
i0.ɵɵelementStart(
|
|
946
|
-
i0.ɵɵelement(
|
|
947
|
-
i0.ɵɵtemplate(
|
|
948
|
-
i0.ɵɵelement(
|
|
949
|
-
i0.ɵɵelementEnd();
|
|
950
|
-
i0.ɵɵelementStart(
|
|
951
|
-
i0.ɵɵelement(
|
|
952
|
-
i0.ɵɵelementStart(
|
|
953
|
-
i0.ɵɵtext(
|
|
954
|
-
i0.ɵɵelementEnd();
|
|
955
|
-
i0.ɵɵtemplate(
|
|
1168
|
+
i0.ɵɵtemplate(41, AIPromptFormComponentExtended_form_1_Conditional_41_Template, 6, 2, "kendo-expansionpanel", 29);
|
|
1169
|
+
i0.ɵɵelementStart(42, "kendo-expansionpanel", 29);
|
|
1170
|
+
i0.ɵɵtemplate(43, AIPromptFormComponentExtended_form_1_ng_template_43_Template, 3, 0, "ng-template", 30);
|
|
1171
|
+
i0.ɵɵelementStart(44, "div", 36)(45, "div", 37)(46, "div");
|
|
1172
|
+
i0.ɵɵelement(47, "mj-form-field", 38);
|
|
1173
|
+
i0.ɵɵtemplate(48, AIPromptFormComponentExtended_form_1_Conditional_48_Template, 1, 3, "mj-form-field", 39)(49, AIPromptFormComponentExtended_form_1_Conditional_49_Template, 1, 3, "mj-form-field", 40);
|
|
1174
|
+
i0.ɵɵelement(50, "mj-form-field", 41);
|
|
1175
|
+
i0.ɵɵelementEnd();
|
|
1176
|
+
i0.ɵɵelementStart(51, "div");
|
|
1177
|
+
i0.ɵɵelement(52, "mj-form-field", 42)(53, "mj-form-field", 43);
|
|
1178
|
+
i0.ɵɵelementStart(54, "div", 44)(55, "label", 45);
|
|
1179
|
+
i0.ɵɵtext(56, " Result Selector Prompt ");
|
|
1180
|
+
i0.ɵɵelementEnd();
|
|
1181
|
+
i0.ɵɵtemplate(57, AIPromptFormComponentExtended_form_1_Conditional_57_Template, 2, 1)(58, AIPromptFormComponentExtended_form_1_Conditional_58_Template, 2, 1, "span", 46);
|
|
956
1182
|
i0.ɵɵelementEnd()()()()();
|
|
957
|
-
i0.ɵɵtemplate(
|
|
1183
|
+
i0.ɵɵtemplate(59, AIPromptFormComponentExtended_form_1_Conditional_59_Template, 6, 2, "kendo-expansionpanel", 29)(60, AIPromptFormComponentExtended_form_1_Conditional_60_Template, 6, 2, "kendo-expansionpanel", 29)(61, AIPromptFormComponentExtended_form_1_Conditional_61_Template, 4, 6, "kendo-expansionpanel", 29)(62, AIPromptFormComponentExtended_form_1_Conditional_62_Template, 12, 11, "kendo-expansionpanel", 29);
|
|
958
1184
|
i0.ɵɵelementEnd()()();
|
|
959
1185
|
} if (rf & 2) {
|
|
960
1186
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
@@ -977,25 +1203,23 @@ function AIPromptFormComponentExtended_form_1_Template(rf, ctx) { if (rf & 1) {
|
|
|
977
1203
|
i0.ɵɵadvance();
|
|
978
1204
|
i0.ɵɵconditional(ctx_r1.record.EnableCaching ? 28 : -1);
|
|
979
1205
|
i0.ɵɵadvance(3);
|
|
980
|
-
i0.ɵɵconditional(ctx_r1.record.ID
|
|
981
|
-
i0.ɵɵadvance(2);
|
|
982
|
-
i0.ɵɵconditional(ctx_r1.record.ID ? 33 : -1);
|
|
1206
|
+
i0.ɵɵconditional(ctx_r1.record.ID ? 31 : -1);
|
|
983
1207
|
i0.ɵɵadvance();
|
|
984
|
-
i0.ɵɵconditional(!ctx_r1.canExecute && ctx_r1.record.ID ?
|
|
1208
|
+
i0.ɵɵconditional(!ctx_r1.canExecute && ctx_r1.record.ID ? 32 : -1);
|
|
985
1209
|
i0.ɵɵadvance(2);
|
|
986
1210
|
i0.ɵɵproperty("expanded", true);
|
|
987
1211
|
i0.ɵɵadvance(3);
|
|
988
|
-
i0.ɵɵconditional(ctx_r1.isLoadingTemplate ?
|
|
1212
|
+
i0.ɵɵconditional(ctx_r1.isLoadingTemplate ? 37 : !ctx_r1.record.TemplateID ? 38 : ctx_r1.templateNotFoundInDatabase ? 39 : 40);
|
|
989
1213
|
i0.ɵɵadvance(4);
|
|
990
|
-
i0.ɵɵconditional(ctx_r1.record.IsSaved ?
|
|
1214
|
+
i0.ɵɵconditional(ctx_r1.record.IsSaved ? 41 : -1);
|
|
991
1215
|
i0.ɵɵadvance();
|
|
992
1216
|
i0.ɵɵproperty("expanded", false);
|
|
993
1217
|
i0.ɵɵadvance(5);
|
|
994
1218
|
i0.ɵɵproperty("record", ctx_r1.record)("ShowLabel", true)("EditMode", ctx_r1.EditMode);
|
|
995
1219
|
i0.ɵɵadvance();
|
|
996
|
-
i0.ɵɵconditional(ctx_r1.showParallelCount ?
|
|
1220
|
+
i0.ɵɵconditional(ctx_r1.showParallelCount ? 48 : -1);
|
|
997
1221
|
i0.ɵɵadvance();
|
|
998
|
-
i0.ɵɵconditional(ctx_r1.showParallelConfigParam ?
|
|
1222
|
+
i0.ɵɵconditional(ctx_r1.showParallelConfigParam ? 49 : -1);
|
|
999
1223
|
i0.ɵɵadvance();
|
|
1000
1224
|
i0.ɵɵproperty("record", ctx_r1.record)("ShowLabel", true)("EditMode", ctx_r1.EditMode);
|
|
1001
1225
|
i0.ɵɵadvance(2);
|
|
@@ -1003,22 +1227,47 @@ function AIPromptFormComponentExtended_form_1_Template(rf, ctx) { if (rf & 1) {
|
|
|
1003
1227
|
i0.ɵɵadvance();
|
|
1004
1228
|
i0.ɵɵproperty("record", ctx_r1.record)("ShowLabel", true)("EditMode", ctx_r1.EditMode);
|
|
1005
1229
|
i0.ɵɵadvance(4);
|
|
1006
|
-
i0.ɵɵconditional(ctx_r1.EditMode ?
|
|
1230
|
+
i0.ɵɵconditional(ctx_r1.EditMode ? 57 : 58);
|
|
1007
1231
|
i0.ɵɵadvance(2);
|
|
1008
|
-
i0.ɵɵconditional(ctx_r1.showOutputExample ?
|
|
1232
|
+
i0.ɵɵconditional(ctx_r1.showOutputExample ? 59 : -1);
|
|
1009
1233
|
i0.ɵɵadvance();
|
|
1010
|
-
i0.ɵɵconditional(ctx_r1.record.IsSaved ?
|
|
1234
|
+
i0.ɵɵconditional(ctx_r1.record.IsSaved ? 60 : -1);
|
|
1011
1235
|
i0.ɵɵadvance();
|
|
1012
|
-
i0.ɵɵconditional(ctx_r1.record.IsSaved && ctx_r1.record.EnableCaching ?
|
|
1236
|
+
i0.ɵɵconditional(ctx_r1.record.IsSaved && ctx_r1.record.EnableCaching ? 61 : -1);
|
|
1013
1237
|
i0.ɵɵadvance();
|
|
1014
|
-
i0.ɵɵconditional(ctx_r1.record.IsSaved ?
|
|
1238
|
+
i0.ɵɵconditional(ctx_r1.record.IsSaved ? 62 : -1);
|
|
1239
|
+
} }
|
|
1240
|
+
function AIPromptFormComponentExtended_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
1241
|
+
const _r29 = i0.ɵɵgetCurrentView();
|
|
1242
|
+
i0.ɵɵelementStart(0, "kendo-window", 180);
|
|
1243
|
+
i0.ɵɵlistener("close", function AIPromptFormComponentExtended_Conditional_2_Template_kendo_window_close_0_listener() { i0.ɵɵrestoreView(_r29); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onTestHarnessVisibilityChanged(false)); });
|
|
1244
|
+
i0.ɵɵelementStart(1, "mj-ai-test-harness", 181);
|
|
1245
|
+
i0.ɵɵlistener("visibilityChange", function AIPromptFormComponentExtended_Conditional_2_Template_mj_ai_test_harness_visibilityChange_1_listener($event) { i0.ɵɵrestoreView(_r29); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onTestHarnessVisibilityChanged($event)); });
|
|
1246
|
+
i0.ɵɵelementEnd()();
|
|
1247
|
+
} if (rf & 2) {
|
|
1248
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
1249
|
+
i0.ɵɵpropertyInterpolate1("title", "Run AI Prompt - ", ctx_r1.record.Name || "Untitled", "");
|
|
1250
|
+
i0.ɵɵproperty("width", 1200)("height", 800)("minWidth", 800)("minHeight", 600)("draggable", true)("resizable", true)("state", "default");
|
|
1251
|
+
i0.ɵɵadvance();
|
|
1252
|
+
i0.ɵɵproperty("entity", ctx_r1.record)("mode", "prompt")("isVisible", ctx_r1.showTestHarness);
|
|
1015
1253
|
} }
|
|
1016
1254
|
let AIPromptFormComponentExtended = class AIPromptFormComponentExtended extends AIPromptFormComponent {
|
|
1017
|
-
|
|
1018
|
-
|
|
1255
|
+
// Template editor configuration
|
|
1256
|
+
get templateEditorConfig() {
|
|
1257
|
+
return {
|
|
1258
|
+
allowEdit: this.EditMode,
|
|
1259
|
+
showRunButton: false,
|
|
1260
|
+
compactMode: false
|
|
1261
|
+
};
|
|
1262
|
+
}
|
|
1263
|
+
constructor(elementRef, sharedService, router, route, cdr) {
|
|
1264
|
+
super(elementRef, sharedService, router, route, cdr);
|
|
1265
|
+
this.cdr = cdr;
|
|
1019
1266
|
this.template = null;
|
|
1020
|
-
this.
|
|
1021
|
-
this.
|
|
1267
|
+
this.templateContent = null;
|
|
1268
|
+
this.isLoadingTemplate = true; // Default to loading state
|
|
1269
|
+
this.templateNotFoundInDatabase = false;
|
|
1270
|
+
this.showTestHarness = false;
|
|
1022
1271
|
// Model management
|
|
1023
1272
|
this.promptModels = [];
|
|
1024
1273
|
this.availableModels = [];
|
|
@@ -1032,17 +1281,16 @@ let AIPromptFormComponentExtended = class AIPromptFormComponentExtended extends
|
|
|
1032
1281
|
// Result Selector Tree Data
|
|
1033
1282
|
this.resultSelectorTreeData = [];
|
|
1034
1283
|
this.isLoadingResultSelectorData = false;
|
|
1284
|
+
// Drag and drop state
|
|
1285
|
+
this.draggedIndex = -1;
|
|
1286
|
+
// Execution History
|
|
1287
|
+
this.executionHistory = [];
|
|
1288
|
+
this.isLoadingHistory = false;
|
|
1289
|
+
this.historySortField = 'runAt';
|
|
1290
|
+
this.historySortDirection = 'desc';
|
|
1035
1291
|
this._metadata = new Metadata();
|
|
1036
1292
|
this.__InferenceProvider_VendorTypeDefinitionID = '';
|
|
1037
1293
|
}
|
|
1038
|
-
// Template editor configuration
|
|
1039
|
-
get templateEditorConfig() {
|
|
1040
|
-
return {
|
|
1041
|
-
allowEdit: this.EditMode,
|
|
1042
|
-
showRunButton: false,
|
|
1043
|
-
compactMode: false
|
|
1044
|
-
};
|
|
1045
|
-
}
|
|
1046
1294
|
async ngOnInit() {
|
|
1047
1295
|
await super.ngOnInit();
|
|
1048
1296
|
// make sure AI Engine Base is configured, this will load stuff only if not already
|
|
@@ -1056,7 +1304,12 @@ let AIPromptFormComponentExtended = class AIPromptFormComponentExtended extends
|
|
|
1056
1304
|
}
|
|
1057
1305
|
// Load template when record changes
|
|
1058
1306
|
if (this.record?.TemplateID) {
|
|
1059
|
-
|
|
1307
|
+
// isLoadingTemplate is already true by default
|
|
1308
|
+
this.loadTemplate(); // Don't await so other loads can happen in parallel
|
|
1309
|
+
}
|
|
1310
|
+
else {
|
|
1311
|
+
// No template ID, so we're not loading
|
|
1312
|
+
this.isLoadingTemplate = false;
|
|
1060
1313
|
}
|
|
1061
1314
|
// Load available models, vendors, prompt types, prompt models, and result selector data
|
|
1062
1315
|
await Promise.all([
|
|
@@ -1066,6 +1319,10 @@ let AIPromptFormComponentExtended = class AIPromptFormComponentExtended extends
|
|
|
1066
1319
|
this.loadPromptModels(),
|
|
1067
1320
|
this.loadResultSelectorTreeData()
|
|
1068
1321
|
]);
|
|
1322
|
+
// Load execution history if record is saved
|
|
1323
|
+
if (this.record?.IsSaved) {
|
|
1324
|
+
await this.loadExecutionHistory();
|
|
1325
|
+
}
|
|
1069
1326
|
// Set defaults for new records
|
|
1070
1327
|
if (!this.record.IsSaved) {
|
|
1071
1328
|
// Default to first prompt type if not set
|
|
@@ -1084,20 +1341,28 @@ let AIPromptFormComponentExtended = class AIPromptFormComponentExtended extends
|
|
|
1084
1341
|
async loadTemplate() {
|
|
1085
1342
|
if (!this.record?.TemplateID) {
|
|
1086
1343
|
this.template = null;
|
|
1344
|
+
this.templateNotFoundInDatabase = false;
|
|
1087
1345
|
return;
|
|
1088
1346
|
}
|
|
1089
1347
|
this.isLoadingTemplate = true;
|
|
1348
|
+
this.templateNotFoundInDatabase = false; // Reset the flag
|
|
1090
1349
|
try {
|
|
1091
1350
|
this.template = await this._metadata.GetEntityObject('Templates');
|
|
1092
1351
|
await this.template.Load(this.record.TemplateID);
|
|
1093
1352
|
if (!this.template.IsSaved) {
|
|
1094
1353
|
this.template = null;
|
|
1354
|
+
this.templateNotFoundInDatabase = true; // Set flag when template not found
|
|
1095
1355
|
console.warn(`Template with ID ${this.record.TemplateID} not found`);
|
|
1096
1356
|
}
|
|
1357
|
+
else {
|
|
1358
|
+
// Load template content
|
|
1359
|
+
await this.loadTemplateContent();
|
|
1360
|
+
}
|
|
1097
1361
|
}
|
|
1098
1362
|
catch (error) {
|
|
1099
1363
|
console.error('Error loading template:', error);
|
|
1100
1364
|
this.template = null;
|
|
1365
|
+
this.templateNotFoundInDatabase = true; // Set flag on error
|
|
1101
1366
|
MJNotificationService.Instance.CreateSimpleNotification('Error loading associated template', 'error', 5000);
|
|
1102
1367
|
}
|
|
1103
1368
|
finally {
|
|
@@ -1160,6 +1425,30 @@ let AIPromptFormComponentExtended = class AIPromptFormComponentExtended extends
|
|
|
1160
1425
|
MJNotificationService.Instance.CreateSimpleNotification(`Error creating new template: ${errorMessage}`, 'error', 6000);
|
|
1161
1426
|
}
|
|
1162
1427
|
}
|
|
1428
|
+
/**
|
|
1429
|
+
* Loads template content for the current template
|
|
1430
|
+
*/
|
|
1431
|
+
async loadTemplateContent() {
|
|
1432
|
+
if (!this.template?.ID) {
|
|
1433
|
+
this.templateContent = null;
|
|
1434
|
+
return;
|
|
1435
|
+
}
|
|
1436
|
+
try {
|
|
1437
|
+
const rv = new RunView();
|
|
1438
|
+
const results = await rv.RunView({
|
|
1439
|
+
EntityName: 'Template Contents',
|
|
1440
|
+
ExtraFilter: `TemplateID = '${this.template.ID}'`,
|
|
1441
|
+
OrderBy: 'Priority ASC',
|
|
1442
|
+
ResultType: 'entity_object'
|
|
1443
|
+
});
|
|
1444
|
+
// Get the first content (highest priority)
|
|
1445
|
+
this.templateContent = results.Results?.[0] || null;
|
|
1446
|
+
}
|
|
1447
|
+
catch (error) {
|
|
1448
|
+
console.error('Error loading template content:', error);
|
|
1449
|
+
this.templateContent = null;
|
|
1450
|
+
}
|
|
1451
|
+
}
|
|
1163
1452
|
/**
|
|
1164
1453
|
* Opens the AI prompt execution dialog
|
|
1165
1454
|
*/
|
|
@@ -1172,7 +1461,24 @@ let AIPromptFormComponentExtended = class AIPromptFormComponentExtended extends
|
|
|
1172
1461
|
MJNotificationService.Instance.CreateSimpleNotification('AI prompt must be Active to execute', 'warning', 4000);
|
|
1173
1462
|
return;
|
|
1174
1463
|
}
|
|
1175
|
-
|
|
1464
|
+
// Use test harness instead
|
|
1465
|
+
this.openTestHarness();
|
|
1466
|
+
}
|
|
1467
|
+
/**
|
|
1468
|
+
* Opens the test harness
|
|
1469
|
+
*/
|
|
1470
|
+
openTestHarness() {
|
|
1471
|
+
if (!this.record?.ID) {
|
|
1472
|
+
MJNotificationService.Instance.CreateSimpleNotification('Please save the AI prompt before testing', 'warning', 4000);
|
|
1473
|
+
return;
|
|
1474
|
+
}
|
|
1475
|
+
this.showTestHarness = true;
|
|
1476
|
+
}
|
|
1477
|
+
/**
|
|
1478
|
+
* Handles when test harness is closed
|
|
1479
|
+
*/
|
|
1480
|
+
onTestHarnessVisibilityChanged(isVisible) {
|
|
1481
|
+
this.showTestHarness = isVisible;
|
|
1176
1482
|
}
|
|
1177
1483
|
/**
|
|
1178
1484
|
* Handles template content changes from the editor
|
|
@@ -1741,25 +2047,35 @@ let AIPromptFormComponentExtended = class AIPromptFormComponentExtended extends
|
|
|
1741
2047
|
return findPromptInTree(this.resultSelectorTreeData);
|
|
1742
2048
|
}
|
|
1743
2049
|
/**
|
|
1744
|
-
* Moves a model up in the list
|
|
2050
|
+
* Moves a model up in the list by swapping with the previous item
|
|
1745
2051
|
*/
|
|
1746
2052
|
moveModelUp(index) {
|
|
1747
2053
|
if (index > 0 && index < this.promptModels.length) {
|
|
1748
|
-
|
|
1749
|
-
this.promptModels
|
|
1750
|
-
|
|
2054
|
+
// Create new array to ensure Angular detects the change
|
|
2055
|
+
const newModels = [...this.promptModels];
|
|
2056
|
+
// Swap with previous item
|
|
2057
|
+
[newModels[index - 1], newModels[index]] =
|
|
2058
|
+
[newModels[index], newModels[index - 1]];
|
|
2059
|
+
// Replace the array
|
|
2060
|
+
this.promptModels = newModels;
|
|
1751
2061
|
this.updateModelPriorities();
|
|
2062
|
+
this.cdr.detectChanges();
|
|
1752
2063
|
}
|
|
1753
2064
|
}
|
|
1754
2065
|
/**
|
|
1755
|
-
* Moves a model down in the list
|
|
2066
|
+
* Moves a model down in the list by swapping with the next item
|
|
1756
2067
|
*/
|
|
1757
2068
|
moveModelDown(index) {
|
|
1758
2069
|
if (index >= 0 && index < this.promptModels.length - 1) {
|
|
1759
|
-
|
|
1760
|
-
this.promptModels
|
|
1761
|
-
|
|
2070
|
+
// Create new array to ensure Angular detects the change
|
|
2071
|
+
const newModels = [...this.promptModels];
|
|
2072
|
+
// Swap with next item
|
|
2073
|
+
[newModels[index], newModels[index + 1]] =
|
|
2074
|
+
[newModels[index + 1], newModels[index]];
|
|
2075
|
+
// Replace the array
|
|
2076
|
+
this.promptModels = newModels;
|
|
1762
2077
|
this.updateModelPriorities();
|
|
2078
|
+
this.cdr.detectChanges();
|
|
1763
2079
|
}
|
|
1764
2080
|
}
|
|
1765
2081
|
/**
|
|
@@ -1770,26 +2086,200 @@ let AIPromptFormComponentExtended = class AIPromptFormComponentExtended extends
|
|
|
1770
2086
|
model.Priority = index + 1;
|
|
1771
2087
|
});
|
|
1772
2088
|
}
|
|
1773
|
-
|
|
2089
|
+
/**
|
|
2090
|
+
* Handles drag start event
|
|
2091
|
+
*/
|
|
2092
|
+
onDragStart(event, index) {
|
|
2093
|
+
this.draggedIndex = index;
|
|
2094
|
+
event.dataTransfer.effectAllowed = 'move';
|
|
2095
|
+
event.dataTransfer.setData('text/html', ''); // Required for Firefox
|
|
2096
|
+
}
|
|
2097
|
+
/**
|
|
2098
|
+
* Handles drag over event
|
|
2099
|
+
*/
|
|
2100
|
+
onDragOver(event) {
|
|
2101
|
+
event.preventDefault();
|
|
2102
|
+
event.dataTransfer.dropEffect = 'move';
|
|
2103
|
+
}
|
|
2104
|
+
/**
|
|
2105
|
+
* Handles drop event
|
|
2106
|
+
*/
|
|
2107
|
+
onDrop(event, dropIndex) {
|
|
2108
|
+
event.preventDefault();
|
|
2109
|
+
if (this.draggedIndex !== -1 && this.draggedIndex !== dropIndex) {
|
|
2110
|
+
// Create new array to ensure Angular detects the change
|
|
2111
|
+
const newModels = [...this.promptModels];
|
|
2112
|
+
// Remove dragged item
|
|
2113
|
+
const draggedItem = newModels.splice(this.draggedIndex, 1)[0];
|
|
2114
|
+
// Insert at new position
|
|
2115
|
+
newModels.splice(dropIndex, 0, draggedItem);
|
|
2116
|
+
// Replace the array
|
|
2117
|
+
this.promptModels = newModels;
|
|
2118
|
+
// Update priorities
|
|
2119
|
+
this.updateModelPriorities();
|
|
2120
|
+
this.cdr.detectChanges();
|
|
2121
|
+
}
|
|
2122
|
+
this.draggedIndex = -1;
|
|
2123
|
+
}
|
|
2124
|
+
/**
|
|
2125
|
+
* Handles drag end event
|
|
2126
|
+
*/
|
|
2127
|
+
onDragEnd(event) {
|
|
2128
|
+
this.draggedIndex = -1;
|
|
2129
|
+
}
|
|
2130
|
+
/**
|
|
2131
|
+
* Load execution history for this prompt
|
|
2132
|
+
*/
|
|
2133
|
+
async loadExecutionHistory() {
|
|
2134
|
+
if (!this.record?.ID)
|
|
2135
|
+
return;
|
|
2136
|
+
this.isLoadingHistory = true;
|
|
2137
|
+
try {
|
|
2138
|
+
const rv = new RunView();
|
|
2139
|
+
const result = await rv.RunView({
|
|
2140
|
+
EntityName: 'MJ: AI Prompt Runs',
|
|
2141
|
+
ExtraFilter: `PromptID='${this.record.ID}'`,
|
|
2142
|
+
OrderBy: 'RunAt DESC',
|
|
2143
|
+
MaxRows: 100,
|
|
2144
|
+
ResultType: 'entity_object'
|
|
2145
|
+
});
|
|
2146
|
+
this.executionHistory = result.Results;
|
|
2147
|
+
this.sortExecutionHistory();
|
|
2148
|
+
}
|
|
2149
|
+
catch (error) {
|
|
2150
|
+
console.error('Error loading execution history:', error);
|
|
2151
|
+
this.executionHistory = [];
|
|
2152
|
+
}
|
|
2153
|
+
finally {
|
|
2154
|
+
this.isLoadingHistory = false;
|
|
2155
|
+
}
|
|
2156
|
+
}
|
|
2157
|
+
/**
|
|
2158
|
+
* Sort execution history based on current sort field and direction
|
|
2159
|
+
*/
|
|
2160
|
+
sortExecutionHistory() {
|
|
2161
|
+
if (!this.executionHistory || this.executionHistory.length === 0)
|
|
2162
|
+
return;
|
|
2163
|
+
this.executionHistory.sort((a, b) => {
|
|
2164
|
+
let aVal, bVal;
|
|
2165
|
+
switch (this.historySortField) {
|
|
2166
|
+
case 'runAt':
|
|
2167
|
+
aVal = a.RunAt ? new Date(a.RunAt).getTime() : 0;
|
|
2168
|
+
bVal = b.RunAt ? new Date(b.RunAt).getTime() : 0;
|
|
2169
|
+
break;
|
|
2170
|
+
case 'executionTime':
|
|
2171
|
+
aVal = a.ExecutionTimeMS || 0;
|
|
2172
|
+
bVal = b.ExecutionTimeMS || 0;
|
|
2173
|
+
break;
|
|
2174
|
+
case 'cost':
|
|
2175
|
+
aVal = a.TotalCost || a.Cost || 0;
|
|
2176
|
+
bVal = b.TotalCost || b.Cost || 0;
|
|
2177
|
+
break;
|
|
2178
|
+
case 'tokens':
|
|
2179
|
+
aVal = a.TokensUsed || 0;
|
|
2180
|
+
bVal = b.TokensUsed || 0;
|
|
2181
|
+
break;
|
|
2182
|
+
}
|
|
2183
|
+
if (this.historySortDirection === 'asc') {
|
|
2184
|
+
return aVal > bVal ? 1 : aVal < bVal ? -1 : 0;
|
|
2185
|
+
}
|
|
2186
|
+
else {
|
|
2187
|
+
return aVal < bVal ? 1 : aVal > bVal ? -1 : 0;
|
|
2188
|
+
}
|
|
2189
|
+
});
|
|
2190
|
+
}
|
|
2191
|
+
/**
|
|
2192
|
+
* Change sort field and direction for execution history
|
|
2193
|
+
*/
|
|
2194
|
+
changeHistorySort(field) {
|
|
2195
|
+
if (this.historySortField === field) {
|
|
2196
|
+
// Toggle direction if same field
|
|
2197
|
+
this.historySortDirection = this.historySortDirection === 'asc' ? 'desc' : 'asc';
|
|
2198
|
+
}
|
|
2199
|
+
else {
|
|
2200
|
+
// New field, default to desc
|
|
2201
|
+
this.historySortField = field;
|
|
2202
|
+
this.historySortDirection = 'desc';
|
|
2203
|
+
}
|
|
2204
|
+
this.sortExecutionHistory();
|
|
2205
|
+
}
|
|
2206
|
+
/**
|
|
2207
|
+
* Navigate to a prompt run record
|
|
2208
|
+
*/
|
|
2209
|
+
navigateToPromptRun(runId) {
|
|
2210
|
+
SharedService.Instance.OpenEntityRecord('MJ: AI Prompt Runs', CompositeKey.FromID(runId));
|
|
2211
|
+
}
|
|
2212
|
+
/**
|
|
2213
|
+
* Format duration for display
|
|
2214
|
+
*/
|
|
2215
|
+
formatDuration(ms) {
|
|
2216
|
+
if (!ms)
|
|
2217
|
+
return '-';
|
|
2218
|
+
if (ms < 1000) {
|
|
2219
|
+
return `${ms}ms`;
|
|
2220
|
+
}
|
|
2221
|
+
else if (ms < 60000) {
|
|
2222
|
+
return `${(ms / 1000).toFixed(1)}s`;
|
|
2223
|
+
}
|
|
2224
|
+
else {
|
|
2225
|
+
const minutes = Math.floor(ms / 60000);
|
|
2226
|
+
const seconds = ((ms % 60000) / 1000).toFixed(0);
|
|
2227
|
+
return `${minutes}m ${seconds}s`;
|
|
2228
|
+
}
|
|
2229
|
+
}
|
|
2230
|
+
/**
|
|
2231
|
+
* Format cost for display
|
|
2232
|
+
*/
|
|
2233
|
+
formatCost(cost) {
|
|
2234
|
+
if (!cost)
|
|
2235
|
+
return '-';
|
|
2236
|
+
return `$${cost.toFixed(4)}`;
|
|
2237
|
+
}
|
|
2238
|
+
/**
|
|
2239
|
+
* Format tokens for display
|
|
2240
|
+
*/
|
|
2241
|
+
formatTokens(tokens) {
|
|
2242
|
+
if (!tokens)
|
|
2243
|
+
return '-';
|
|
2244
|
+
return tokens.toLocaleString();
|
|
2245
|
+
}
|
|
2246
|
+
/**
|
|
2247
|
+
* Get status color for execution
|
|
2248
|
+
*/
|
|
2249
|
+
getExecutionStatusColor(success) {
|
|
2250
|
+
if (success === true)
|
|
2251
|
+
return '#28a745';
|
|
2252
|
+
if (success === false)
|
|
2253
|
+
return '#dc3545';
|
|
2254
|
+
return '#ffc107';
|
|
2255
|
+
}
|
|
2256
|
+
/**
|
|
2257
|
+
* Get status icon for execution
|
|
2258
|
+
*/
|
|
2259
|
+
getExecutionStatusIcon(success) {
|
|
2260
|
+
if (success === true)
|
|
2261
|
+
return 'fa-check-circle';
|
|
2262
|
+
if (success === false)
|
|
2263
|
+
return 'fa-times-circle';
|
|
2264
|
+
return 'fa-spinner fa-spin';
|
|
2265
|
+
}
|
|
2266
|
+
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)); }; }
|
|
1774
2267
|
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AIPromptFormComponentExtended, selectors: [["mj-ai-prompt-form"]], viewQuery: function AIPromptFormComponentExtended_Query(rf, ctx) { if (rf & 1) {
|
|
1775
2268
|
i0.ɵɵviewQuery(_c0, 5);
|
|
1776
2269
|
} if (rf & 2) {
|
|
1777
2270
|
let _t;
|
|
1778
2271
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.templateEditor = _t.first);
|
|
1779
|
-
} }, features: [i0.ɵɵInheritDefinitionFeature], decls: 3, vars: 5, consts: [["form", "ngForm"], ["templateEditor", ""], ["mjFillContainer", "", 1, "record-form-container", 3, "bottomMargin", "rightMargin"], ["class", "record-form", "mjFillContainer", "", 4, "ngIf"], [3, "isVisibleChange", "aiPrompt", "isVisible"], ["mjFillContainer", "", 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"], ["themeColor", "primary", "size", "large", "title", "Execute this AI prompt"], ["themeColor", "primary", "size", "large", "title", "Prompt must be Active and have a Template to execute", 3, "disabled"], ["fillMode", "outline", "themeColor", "info", "title", "View execution history"], [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"], ["themeColor", "primary", "size", "large", "title", "Execute this AI prompt", 3, "click"], [1, "fa-solid", "fa-play"], [1, "fa-solid", "fa-exclamation-triangle"], [1, "fa-solid", "fa-history"], [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"], ["themeColor", "primary", 3, "click"], [1, "fa-solid", "fa-plus"], ["fillMode", "outline", 3, "click"], [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, "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"], [1, "empty-state", 2, "padding", "20px", "text-align", "center", "color", "#6c757d"], [1, "fa-solid", "fa-info-circle"], [2, "margin-top", "10px"], ["fillMode", "outline", "themeColor", "primary", "size", "small", 3, "click"], [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"], [1, "add-model-row", 2, "padding", "12px 16px", "text-align", "center", "background", "#f8f9fa", "border-top", "1px solid #dee2e6"], [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"], [1, "drag-handle", 2, "display", "flex", "align-items", "center", "justify-content", "center", "cursor", "move", "color", "#6c757d"], ["title", "Drag to reorder", 1, "fa-solid", "fa-grip-vertical"], [2, "font-size", "0.8em", "color", "#6c757d"], [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"], ["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"], ["fillMode", "flat", "size", "small", "title", "Move up", 3, "click", "disabled"], [1, "fa-solid", "fa-chevron-up"], ["fillMode", "flat", "size", "small", "title", "Move down", 3, "click", "disabled"], [1, "fa-solid", "fa-chevron-down"], ["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"], ["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"], [2, "height", "300px", 3, "Params", "NewRecordValues", "AllowLoad", "EditMode", "BottomMargin"], [1, "fa-solid", "fa-history", 2, "color", "#6c757d"], [1, "fa-solid", "fa-database", 2, "color", "#6c757d"], [2, "margin", "0 0 12px 0", "color", "#495057"], [2, "height", "200px", 3, "Params", "NewRecordValues", "AllowLoad", "EditMode", "BottomMargin"], [1, "fa-solid", "fa-link", 2, "color", "#6c757d"]], template: function AIPromptFormComponentExtended_Template(rf, ctx) { if (rf & 1) {
|
|
2272
|
+
} }, features: [i0.ɵɵInheritDefinitionFeature], decls: 3, vars: 4, consts: [["form", "ngForm"], ["templateEditor", ""], ["mjFillContainer", "", 1, "record-form-container", 3, "bottomMargin", "rightMargin"], ["class", "record-form", "mjFillContainer", "", 4, "ngIf"], [3, "width", "height", "minWidth", "minHeight", "draggable", "resizable", "state", "title"], ["mjFillContainer", "", 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, "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 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"], [2, "color", "#6c757d", "font-size", "0.85em"], ["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", "BottomMargin"], [1, "fa-solid", "fa-database", 2, "color", "#6c757d"], [2, "margin", "0 0 12px 0", "color", "#495057"], [2, "height", "200px", 3, "Params", "NewRecordValues", "AllowLoad", "EditMode", "BottomMargin"], [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) {
|
|
1780
2273
|
i0.ɵɵelementStart(0, "div", 2);
|
|
1781
|
-
i0.ɵɵtemplate(1, AIPromptFormComponentExtended_form_1_Template,
|
|
1782
|
-
i0.ɵɵ
|
|
1783
|
-
i0.ɵɵtwoWayListener("isVisibleChange", function AIPromptFormComponentExtended_Template_mj_ai_prompt_execution_dialog_isVisibleChange_2_listener($event) { i0.ɵɵtwoWayBindingSet(ctx.showExecutionDialog, $event) || (ctx.showExecutionDialog = $event); return $event; });
|
|
1784
|
-
i0.ɵɵelementEnd()();
|
|
2274
|
+
i0.ɵɵtemplate(1, AIPromptFormComponentExtended_form_1_Template, 63, 35, "form", 3)(2, AIPromptFormComponentExtended_Conditional_2_Template, 2, 12, "kendo-window", 4);
|
|
2275
|
+
i0.ɵɵelementEnd();
|
|
1785
2276
|
} if (rf & 2) {
|
|
1786
2277
|
i0.ɵɵproperty("bottomMargin", 20)("rightMargin", 5);
|
|
1787
2278
|
i0.ɵɵadvance();
|
|
1788
2279
|
i0.ɵɵproperty("ngIf", ctx.record);
|
|
1789
2280
|
i0.ɵɵadvance();
|
|
1790
|
-
i0.ɵɵ
|
|
1791
|
-
|
|
1792
|
-
} }, dependencies: [i1.NgIf, i2.ɵNgNoValidate, i2.NgControlStatus, i2.NgControlStatusGroup, i2.NgModel, i2.NgForm, i3.ExpansionPanelComponent, i3.ExpansionPanelTitleDirective, i4.TextAreaComponent, i4.TextBoxComponent, i4.NumericTextBoxComponent, i5.ItemTemplateDirective, i5.DropDownListComponent, i5.DropDownTreeComponent, i6.ButtonComponent, i7.UserViewGridComponent, i8.MJFormField, i9.FormToolbarComponent, i10.FillContainer, i11.CodeEditorComponent, i12.TemplateEditorComponent, i13.AIPromptExecutionDialogComponent, i1.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}"] }); }
|
|
2281
|
+
i0.ɵɵconditional(ctx.showTestHarness ? 2 : -1);
|
|
2282
|
+
} }, dependencies: [i3.NgIf, i4.ɵNgNoValidate, i4.NgControlStatus, i4.NgControlStatusGroup, i4.NgModel, i4.NgForm, i5.ExpansionPanelComponent, i5.ExpansionPanelTitleDirective, i6.WindowComponent, i7.TextAreaComponent, i7.TextBoxComponent, i7.NumericTextBoxComponent, i8.ItemTemplateDirective, i8.DropDownListComponent, i8.DropDownTreeComponent, i9.ButtonGroupComponent, i9.ButtonComponent, i10.UserViewGridComponent, i11.MJFormField, i12.FormToolbarComponent, i13.FillContainer, i14.CodeEditorComponent, i15.TemplateEditorComponent, i16.AITestHarnessComponent, i3.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}"] }); }
|
|
1793
2283
|
};
|
|
1794
2284
|
AIPromptFormComponentExtended = __decorate([
|
|
1795
2285
|
RegisterClass(BaseFormComponent, 'AI Prompts')
|
|
@@ -1797,12 +2287,12 @@ AIPromptFormComponentExtended = __decorate([
|
|
|
1797
2287
|
export { AIPromptFormComponentExtended };
|
|
1798
2288
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AIPromptFormComponentExtended, [{
|
|
1799
2289
|
type: Component,
|
|
1800
|
-
args: [{ selector: 'mj-ai-prompt-form', template: "<div class=\"record-form-container\" mjFillContainer [bottomMargin]=\"20\" [rightMargin]=\"5\">\n <form *ngIf=\"record\" class=\"record-form\" #form=\"ngForm\" mjFillContainer>\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 && canExecute) {\n <kendo-button themeColor=\"primary\" size=\"large\"\n (click)=\"executeAIPrompt()\"\n title=\"Execute this AI prompt\">\n <i class=\"fa-solid fa-play\"></i> Execute Prompt\n </kendo-button>\n } @else if (record.ID && !canExecute) {\n <kendo-button themeColor=\"primary\" size=\"large\" [disabled]=\"true\"\n title=\"Prompt must be Active and have a Template to execute\">\n <i class=\"fa-solid fa-exclamation-triangle\"></i> Cannot Execute\n </kendo-button>\n }\n \n @if (record.ID) {\n <kendo-button fillMode=\"outline\" themeColor=\"info\"\n title=\"View execution history\">\n <i class=\"fa-solid fa-history\"></i> History\n </kendo-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 <kendo-button themeColor=\"primary\" (click)=\"createNewTemplate()\">\n <i class=\"fa-solid fa-plus\"></i> Create New Template\n </kendo-button>\n <kendo-button fillMode=\"outline\" (click)=\"linkExistingTemplate()\">\n <i class=\"fa-solid fa-link\"></i> Link Existing Template\n </kendo-button>\n </div>\n </div>\n } @else if (!template) {\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 <kendo-button fillMode=\"outline\" (click)=\"loadTemplate()\">\n <i class=\"fa-solid fa-refresh\"></i> Retry Loading\n </kendo-button>\n <kendo-button themeColor=\"primary\" (click)=\"createNewTemplate()\">\n <i class=\"fa-solid fa-plus\"></i> Create New Template\n </kendo-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 <!-- 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>\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 <kendo-button fillMode=\"outline\" themeColor=\"primary\" size=\"small\"\n (click)=\"addNewModel()\">\n <i class=\"fa-solid fa-plus\"></i> Add Model\n </kendo-button>\n </div>\n }\n </div>\n } @else {\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></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 model.ID || $index; let i = $index) {\n <div class=\"model-row\" \n [style.background]=\"!model.ModelID ? '#fff3cd' : 'white'\"\n [style.border-left]=\"!model.ModelID ? '3px solid #ffc107' : 'none'\"\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;\">\n \n <!-- Drag Handle -->\n <div class=\"drag-handle\" style=\"display: flex; align-items: center; justify-content: center; cursor: move; color: #6c757d;\">\n @if (EditMode) {\n <i class=\"fa-solid fa-grip-vertical\" title=\"Drag to reorder\"></i>\n } @else {\n <span style=\"font-size: 0.8em; color: #6c757d;\">{{ 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_' + i\"\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_' + i\"\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 <kendo-button 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 </kendo-button>\n <kendo-button 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 </kendo-button>\n </div>\n <kendo-button fillMode=\"flat\" themeColor=\"error\" size=\"small\"\n (click)=\"removePromptModel(i)\"\n title=\"Remove model\">\n <i class=\"fa-solid fa-times\"></i>\n </kendo-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 <kendo-button fillMode=\"outline\" themeColor=\"success\" size=\"small\"\n (click)=\"addNewModel()\">\n <i class=\"fa-solid fa-plus\"></i> Add Model\n </kendo-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 </span>\n </ng-template>\n \n <!-- Direct Content Projection -->\n <div style=\"padding: 16px 0;\">\n <mj-user-view-grid \n [Params]=\"BuildRelationshipViewParamsByEntityName('MJ: AI Prompt Runs','PromptID')\" \n [NewRecordValues]=\"NewRecordValues('MJ: AI Prompt Runs')\"\n [AllowLoad]=\"true\"\n [EditMode]=\"GridEditMode()\" \n [BottomMargin]=\"0\"\n style=\"height: 300px;\">\n </mj-user-view-grid>\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 [BottomMargin]=\"0\"\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 [BottomMargin]=\"0\"\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 [BottomMargin]=\"0\"\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 <!-- AI Prompt Execution Dialog -->\n <mj-ai-prompt-execution-dialog\n [aiPrompt]=\"record\"\n [(isVisible)]=\"showExecutionDialog\">\n </mj-ai-prompt-execution-dialog>\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}"] }]
|
|
1801
|
-
}],
|
|
2290
|
+
args: [{ selector: 'mj-ai-prompt-form', template: "<div class=\"record-form-container\" mjFillContainer [bottomMargin]=\"20\" [rightMargin]=\"5\">\n <form *ngIf=\"record\" class=\"record-form\" #form=\"ngForm\" mjFillContainer>\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 <!-- 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 (1, 2, 3...). 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 model.ID || $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 {{ i + 1 }} - Lower 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_' + i\"\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_' + i\"\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 [BottomMargin]=\"0\"\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 [BottomMargin]=\"0\"\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 [BottomMargin]=\"0\"\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}"] }]
|
|
2291
|
+
}], () => [{ type: i0.ElementRef }, { type: i1.SharedService }, { type: i2.Router }, { type: i2.ActivatedRoute }, { type: i0.ChangeDetectorRef }], { templateEditor: [{
|
|
1802
2292
|
type: ViewChild,
|
|
1803
2293
|
args: ['templateEditor']
|
|
1804
2294
|
}] }); })();
|
|
1805
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(AIPromptFormComponentExtended, { className: "AIPromptFormComponentExtended", filePath: "src/lib/custom/AIPrompts/ai-prompt-form.component.ts", lineNumber:
|
|
2295
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(AIPromptFormComponentExtended, { className: "AIPromptFormComponentExtended", filePath: "src/lib/custom/AIPrompts/ai-prompt-form.component.ts", lineNumber: 19 }); })();
|
|
1806
2296
|
export function LoadAIPromptFormComponentExtended() {
|
|
1807
2297
|
// This function ensures the class isn't tree-shaken and registers it with MemberJunction
|
|
1808
2298
|
}
|