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