@memberjunction/ng-core-entity-forms 2.69.0 → 2.70.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/custom/AIPromptRuns/ai-prompt-run-form.component.d.ts +12 -2
- package/dist/lib/custom/AIPromptRuns/ai-prompt-run-form.component.d.ts.map +1 -1
- package/dist/lib/custom/AIPromptRuns/ai-prompt-run-form.component.js +385 -228
- package/dist/lib/custom/AIPromptRuns/ai-prompt-run-form.component.js.map +1 -1
- package/dist/lib/custom/AIPromptRuns/chat-message-viewer.component.d.ts +72 -0
- package/dist/lib/custom/AIPromptRuns/chat-message-viewer.component.d.ts.map +1 -0
- package/dist/lib/custom/AIPromptRuns/chat-message-viewer.component.js +526 -0
- package/dist/lib/custom/AIPromptRuns/chat-message-viewer.component.js.map +1 -0
- package/dist/lib/custom/custom-forms.module.d.ts +31 -30
- package/dist/lib/custom/custom-forms.module.d.ts.map +1 -1
- package/dist/lib/custom/custom-forms.module.js +9 -1
- package/dist/lib/custom/custom-forms.module.js.map +1 -1
- package/package.json +16 -16
|
@@ -0,0 +1,526 @@
|
|
|
1
|
+
import { Component, Input } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "@angular/forms";
|
|
4
|
+
import * as i2 from "@progress/kendo-angular-inputs";
|
|
5
|
+
import * as i3 from "@memberjunction/ng-code-editor";
|
|
6
|
+
const _forTrack0 = ($index, $item) => $item.id;
|
|
7
|
+
function ChatMessageViewerComponent_Conditional_18_Template(rf, ctx) { if (rf & 1) {
|
|
8
|
+
i0.ɵɵelementStart(0, "div", 9);
|
|
9
|
+
i0.ɵɵelement(1, "i", 10);
|
|
10
|
+
i0.ɵɵelementStart(2, "p");
|
|
11
|
+
i0.ɵɵtext(3, "No messages to display");
|
|
12
|
+
i0.ɵɵelementEnd()();
|
|
13
|
+
} }
|
|
14
|
+
function ChatMessageViewerComponent_Conditional_19_For_1_Conditional_0_Conditional_20_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
15
|
+
i0.ɵɵelementStart(0, "div", 24);
|
|
16
|
+
i0.ɵɵelement(1, "mj-code-editor", 26);
|
|
17
|
+
i0.ɵɵelementEnd();
|
|
18
|
+
} if (rf & 2) {
|
|
19
|
+
const item_r4 = i0.ɵɵnextContext(3).$implicit;
|
|
20
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
21
|
+
i0.ɵɵadvance();
|
|
22
|
+
i0.ɵɵproperty("value", ctx_r2.getContentString(item_r4.message.content))("readonly", true)("language", ctx_r2.getContentLanguage(item_r4.message.content));
|
|
23
|
+
} }
|
|
24
|
+
function ChatMessageViewerComponent_Conditional_19_For_1_Conditional_0_Conditional_20_Conditional_2_For_2_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
25
|
+
i0.ɵɵelementStart(0, "div", 33);
|
|
26
|
+
i0.ɵɵelement(1, "mj-code-editor", 34);
|
|
27
|
+
i0.ɵɵelementEnd();
|
|
28
|
+
} if (rf & 2) {
|
|
29
|
+
const part_r6 = i0.ɵɵnextContext().$implicit;
|
|
30
|
+
i0.ɵɵadvance();
|
|
31
|
+
i0.ɵɵproperty("value", part_r6.value)("readonly", true)("language", part_r6.language);
|
|
32
|
+
} }
|
|
33
|
+
function ChatMessageViewerComponent_Conditional_19_For_1_Conditional_0_Conditional_20_Conditional_2_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
34
|
+
const _r5 = i0.ɵɵgetCurrentView();
|
|
35
|
+
i0.ɵɵelementStart(0, "div", 28)(1, "div", 29);
|
|
36
|
+
i0.ɵɵlistener("click", function ChatMessageViewerComponent_Conditional_19_For_1_Conditional_0_Conditional_20_Conditional_2_For_2_Template_div_click_1_listener() { const part_r6 = i0.ɵɵrestoreView(_r5).$implicit; const ctx_r2 = i0.ɵɵnextContext(6); return i0.ɵɵresetView(ctx_r2.toggleContentPart(part_r6.id)); });
|
|
37
|
+
i0.ɵɵelementStart(2, "div", 30);
|
|
38
|
+
i0.ɵɵelement(3, "i", 31);
|
|
39
|
+
i0.ɵɵtext(4);
|
|
40
|
+
i0.ɵɵelementEnd();
|
|
41
|
+
i0.ɵɵelementStart(5, "button", 32);
|
|
42
|
+
i0.ɵɵelement(6, "i");
|
|
43
|
+
i0.ɵɵelementEnd()();
|
|
44
|
+
i0.ɵɵtemplate(7, ChatMessageViewerComponent_Conditional_19_For_1_Conditional_0_Conditional_20_Conditional_2_For_2_Conditional_7_Template, 2, 3, "div", 33);
|
|
45
|
+
i0.ɵɵelementEnd();
|
|
46
|
+
} if (rf & 2) {
|
|
47
|
+
const part_r6 = ctx.$implicit;
|
|
48
|
+
i0.ɵɵclassProp("collapsed", !part_r6.expanded);
|
|
49
|
+
i0.ɵɵadvance(4);
|
|
50
|
+
i0.ɵɵtextInterpolate1(" ", part_r6.key, " ");
|
|
51
|
+
i0.ɵɵadvance(2);
|
|
52
|
+
i0.ɵɵclassMap(part_r6.expanded ? "fa-solid fa-chevron-up" : "fa-solid fa-chevron-down");
|
|
53
|
+
i0.ɵɵadvance();
|
|
54
|
+
i0.ɵɵconditional(part_r6.expanded ? 7 : -1);
|
|
55
|
+
} }
|
|
56
|
+
function ChatMessageViewerComponent_Conditional_19_For_1_Conditional_0_Conditional_20_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
57
|
+
i0.ɵɵelementStart(0, "div", 25);
|
|
58
|
+
i0.ɵɵrepeaterCreate(1, ChatMessageViewerComponent_Conditional_19_For_1_Conditional_0_Conditional_20_Conditional_2_For_2_Template, 8, 6, "div", 27, _forTrack0);
|
|
59
|
+
i0.ɵɵelementEnd();
|
|
60
|
+
} if (rf & 2) {
|
|
61
|
+
const ctx_r6 = i0.ɵɵnextContext(3);
|
|
62
|
+
const item_r4 = ctx_r6.$implicit;
|
|
63
|
+
const ɵ$index_43_r2 = ctx_r6.$index;
|
|
64
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
65
|
+
i0.ɵɵadvance();
|
|
66
|
+
i0.ɵɵrepeater(ctx_r2.getContentParts(item_r4.message.content, ɵ$index_43_r2));
|
|
67
|
+
} }
|
|
68
|
+
function ChatMessageViewerComponent_Conditional_19_For_1_Conditional_0_Conditional_20_Template(rf, ctx) { if (rf & 1) {
|
|
69
|
+
i0.ɵɵelementStart(0, "div", 23);
|
|
70
|
+
i0.ɵɵtemplate(1, ChatMessageViewerComponent_Conditional_19_For_1_Conditional_0_Conditional_20_Conditional_1_Template, 2, 3, "div", 24)(2, ChatMessageViewerComponent_Conditional_19_For_1_Conditional_0_Conditional_20_Conditional_2_Template, 3, 0, "div", 25);
|
|
71
|
+
i0.ɵɵelementEnd();
|
|
72
|
+
} if (rf & 2) {
|
|
73
|
+
const item_r4 = i0.ɵɵnextContext(2).$implicit;
|
|
74
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
75
|
+
i0.ɵɵadvance();
|
|
76
|
+
i0.ɵɵconditional(ctx_r2.isStringContent(item_r4.message.content) ? 1 : 2);
|
|
77
|
+
} }
|
|
78
|
+
function ChatMessageViewerComponent_Conditional_19_For_1_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
79
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
80
|
+
i0.ɵɵelementStart(0, "div", 11)(1, "div", 12);
|
|
81
|
+
i0.ɵɵlistener("click", function ChatMessageViewerComponent_Conditional_19_For_1_Conditional_0_Template_div_click_1_listener() { i0.ɵɵrestoreView(_r1); const ɵ$index_43_r2 = i0.ɵɵnextContext().$index; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.toggleMessage(ɵ$index_43_r2)); });
|
|
82
|
+
i0.ɵɵelementStart(2, "div", 13)(3, "span", 14);
|
|
83
|
+
i0.ɵɵtext(4);
|
|
84
|
+
i0.ɵɵelementEnd();
|
|
85
|
+
i0.ɵɵelement(5, "i");
|
|
86
|
+
i0.ɵɵelementStart(6, "span", 15);
|
|
87
|
+
i0.ɵɵtext(7);
|
|
88
|
+
i0.ɵɵelementEnd();
|
|
89
|
+
i0.ɵɵelementStart(8, "span", 16)(9, "span", 17);
|
|
90
|
+
i0.ɵɵtext(10);
|
|
91
|
+
i0.ɵɵelementEnd();
|
|
92
|
+
i0.ɵɵelementStart(11, "span", 18);
|
|
93
|
+
i0.ɵɵtext(12, "\u2022");
|
|
94
|
+
i0.ɵɵelementEnd();
|
|
95
|
+
i0.ɵɵelementStart(13, "span", 17);
|
|
96
|
+
i0.ɵɵtext(14);
|
|
97
|
+
i0.ɵɵelementEnd()()();
|
|
98
|
+
i0.ɵɵelementStart(15, "div", 19)(16, "button", 20);
|
|
99
|
+
i0.ɵɵlistener("click", function ChatMessageViewerComponent_Conditional_19_For_1_Conditional_0_Template_button_click_16_listener($event) { i0.ɵɵrestoreView(_r1); const item_r4 = i0.ɵɵnextContext().$implicit; const ctx_r2 = i0.ɵɵnextContext(2); ctx_r2.copyMessageContent(item_r4.message.content); return i0.ɵɵresetView($event.stopPropagation()); });
|
|
100
|
+
i0.ɵɵelement(17, "i", 21);
|
|
101
|
+
i0.ɵɵelementEnd();
|
|
102
|
+
i0.ɵɵelementStart(18, "button", 22);
|
|
103
|
+
i0.ɵɵelement(19, "i");
|
|
104
|
+
i0.ɵɵelementEnd()()();
|
|
105
|
+
i0.ɵɵtemplate(20, ChatMessageViewerComponent_Conditional_19_For_1_Conditional_0_Conditional_20_Template, 3, 1, "div", 23);
|
|
106
|
+
i0.ɵɵelementEnd();
|
|
107
|
+
} if (rf & 2) {
|
|
108
|
+
const item_r4 = i0.ɵɵnextContext().$implicit;
|
|
109
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
110
|
+
i0.ɵɵattribute("data-role", item_r4.message.role);
|
|
111
|
+
i0.ɵɵadvance(4);
|
|
112
|
+
i0.ɵɵtextInterpolate1("#", item_r4.sequenceNumber, "");
|
|
113
|
+
i0.ɵɵadvance();
|
|
114
|
+
i0.ɵɵclassMap("fa-solid " + ctx_r2.getRoleIcon(item_r4.message.role));
|
|
115
|
+
i0.ɵɵstyleProp("color", ctx_r2.getRoleColor(item_r4.message.role));
|
|
116
|
+
i0.ɵɵadvance(2);
|
|
117
|
+
i0.ɵɵtextInterpolate(ctx_r2.getRoleLabel(item_r4.message.role));
|
|
118
|
+
i0.ɵɵadvance(3);
|
|
119
|
+
i0.ɵɵtextInterpolate1("", ctx_r2.getContentStats(item_r4.message.content).chars.toLocaleString(), " chars");
|
|
120
|
+
i0.ɵɵadvance(4);
|
|
121
|
+
i0.ɵɵtextInterpolate1("~", ctx_r2.getContentStats(item_r4.message.content).approxTokens.toLocaleString(), " tokens");
|
|
122
|
+
i0.ɵɵadvance(5);
|
|
123
|
+
i0.ɵɵclassMap(item_r4.expanded ? "fa-solid fa-chevron-up" : "fa-solid fa-chevron-down");
|
|
124
|
+
i0.ɵɵadvance();
|
|
125
|
+
i0.ɵɵconditional(item_r4.expanded ? 20 : -1);
|
|
126
|
+
} }
|
|
127
|
+
function ChatMessageViewerComponent_Conditional_19_For_1_Template(rf, ctx) { if (rf & 1) {
|
|
128
|
+
i0.ɵɵtemplate(0, ChatMessageViewerComponent_Conditional_19_For_1_Conditional_0_Template, 21, 12, "div", 11);
|
|
129
|
+
} if (rf & 2) {
|
|
130
|
+
const item_r4 = ctx.$implicit;
|
|
131
|
+
i0.ɵɵconditional(item_r4.visible ? 0 : -1);
|
|
132
|
+
} }
|
|
133
|
+
function ChatMessageViewerComponent_Conditional_19_Template(rf, ctx) { if (rf & 1) {
|
|
134
|
+
i0.ɵɵrepeaterCreate(0, ChatMessageViewerComponent_Conditional_19_For_1_Template, 1, 1, null, null, i0.ɵɵrepeaterTrackByIndex);
|
|
135
|
+
} if (rf & 2) {
|
|
136
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
137
|
+
i0.ɵɵrepeater(ctx_r2.displayMessages);
|
|
138
|
+
} }
|
|
139
|
+
export class ChatMessageViewerComponent {
|
|
140
|
+
constructor() {
|
|
141
|
+
this.messages = [];
|
|
142
|
+
this.displayMessages = [];
|
|
143
|
+
this.showSystem = true;
|
|
144
|
+
this.showUser = true;
|
|
145
|
+
this.showAssistant = true;
|
|
146
|
+
// Track expanded state for content parts
|
|
147
|
+
this.contentPartStates = new Map();
|
|
148
|
+
}
|
|
149
|
+
ngOnInit() {
|
|
150
|
+
this.processMessages();
|
|
151
|
+
}
|
|
152
|
+
ngOnChanges() {
|
|
153
|
+
this.processMessages();
|
|
154
|
+
}
|
|
155
|
+
processMessages() {
|
|
156
|
+
this.displayMessages = this.messages.map((msg, index) => ({
|
|
157
|
+
message: msg,
|
|
158
|
+
visible: this.isMessageVisible(msg),
|
|
159
|
+
expanded: true,
|
|
160
|
+
sequenceNumber: index + 1
|
|
161
|
+
}));
|
|
162
|
+
}
|
|
163
|
+
isMessageVisible(message) {
|
|
164
|
+
switch (message.role) {
|
|
165
|
+
case 'system':
|
|
166
|
+
return this.showSystem;
|
|
167
|
+
case 'user':
|
|
168
|
+
return this.showUser;
|
|
169
|
+
case 'assistant':
|
|
170
|
+
return this.showAssistant;
|
|
171
|
+
default:
|
|
172
|
+
return true;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
onFilterChange() {
|
|
176
|
+
this.displayMessages.forEach(dm => {
|
|
177
|
+
dm.visible = this.isMessageVisible(dm.message);
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
getRoleIcon(role) {
|
|
181
|
+
switch (role) {
|
|
182
|
+
case 'system':
|
|
183
|
+
return 'fa-cog';
|
|
184
|
+
case 'user':
|
|
185
|
+
return 'fa-user';
|
|
186
|
+
case 'assistant':
|
|
187
|
+
return 'fa-robot';
|
|
188
|
+
default:
|
|
189
|
+
return 'fa-comment';
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
getRoleColor(role) {
|
|
193
|
+
switch (role) {
|
|
194
|
+
case 'system':
|
|
195
|
+
return '#2563eb'; // blue
|
|
196
|
+
case 'user':
|
|
197
|
+
return '#059669'; // green
|
|
198
|
+
case 'assistant':
|
|
199
|
+
return '#7c3aed'; // purple
|
|
200
|
+
default:
|
|
201
|
+
return '#6b7280'; // gray
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
getRoleLabel(role) {
|
|
205
|
+
return role.charAt(0).toUpperCase() + role.slice(1);
|
|
206
|
+
}
|
|
207
|
+
toggleMessage(index) {
|
|
208
|
+
this.displayMessages[index].expanded = !this.displayMessages[index].expanded;
|
|
209
|
+
}
|
|
210
|
+
getContentString(content) {
|
|
211
|
+
if (typeof content === 'string') {
|
|
212
|
+
return content;
|
|
213
|
+
}
|
|
214
|
+
else {
|
|
215
|
+
const contentAny = content;
|
|
216
|
+
// check to see if we have a text sub-property and if so
|
|
217
|
+
if (contentAny.text?.trim().length > 0) {
|
|
218
|
+
// we should return this
|
|
219
|
+
return contentAny.text;
|
|
220
|
+
}
|
|
221
|
+
else {
|
|
222
|
+
return JSON.stringify(content, null, 2);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
getContentLanguage(content) {
|
|
227
|
+
const text = this.getContentString(content);
|
|
228
|
+
// Try to detect language based on content
|
|
229
|
+
if (text.trim().startsWith('{') || text.trim().startsWith('[')) {
|
|
230
|
+
return 'json';
|
|
231
|
+
}
|
|
232
|
+
else if (text.includes('```') || text.includes('# ') || text.includes('**')) {
|
|
233
|
+
return 'markdown';
|
|
234
|
+
}
|
|
235
|
+
else if (text.includes('function') || text.includes('const') || text.includes('let')) {
|
|
236
|
+
return 'javascript';
|
|
237
|
+
}
|
|
238
|
+
else if (text.includes('SELECT') || text.includes('FROM') || text.includes('WHERE')) {
|
|
239
|
+
return 'sql';
|
|
240
|
+
}
|
|
241
|
+
return 'markdown'; // default to markdown for formatting
|
|
242
|
+
}
|
|
243
|
+
getContentBlockIcon(type) {
|
|
244
|
+
switch (type) {
|
|
245
|
+
case 'image_url':
|
|
246
|
+
return 'fa-image';
|
|
247
|
+
case 'video_url':
|
|
248
|
+
return 'fa-video';
|
|
249
|
+
case 'audio_url':
|
|
250
|
+
return 'fa-music';
|
|
251
|
+
case 'file_url':
|
|
252
|
+
return 'fa-file';
|
|
253
|
+
default:
|
|
254
|
+
return 'fa-paperclip';
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
isStringContent(content) {
|
|
258
|
+
return typeof content === 'string';
|
|
259
|
+
}
|
|
260
|
+
getContentJSON(content) {
|
|
261
|
+
if (typeof content === 'string') {
|
|
262
|
+
return content; // Shouldn't happen but just in case
|
|
263
|
+
}
|
|
264
|
+
// check to see if we have a text sub-property and if so
|
|
265
|
+
// check to see if there are any other sub-properties that have non-empty values or non-empty-arrays/non-empty-object values
|
|
266
|
+
const contentAny = content;
|
|
267
|
+
if (contentAny.text?.trim().length > 0) {
|
|
268
|
+
// check to see if there is just one more property called json, if that is the case, append that with a ```json block to the text
|
|
269
|
+
// and return that
|
|
270
|
+
if (contentAny.json) {
|
|
271
|
+
return contentAny.text + '\n\n```json\n' + JSON.stringify(contentAny.json, null, 2) + '\n```';
|
|
272
|
+
}
|
|
273
|
+
else {
|
|
274
|
+
// now check to see if there are any other sub-properties that have non-empty values or non-empty-arrays/non-empty-object values
|
|
275
|
+
const hasNonEmptySubProps = Object.keys(contentAny).some(key => {
|
|
276
|
+
if (key === 'text')
|
|
277
|
+
return false; // skip text property
|
|
278
|
+
const value = contentAny[key];
|
|
279
|
+
if (typeof value === 'string' && value.trim().length > 0)
|
|
280
|
+
return true;
|
|
281
|
+
if (Array.isArray(value) && value.length > 0)
|
|
282
|
+
return true;
|
|
283
|
+
if (typeof value === 'object' && value !== null && Object.keys(value).length > 0)
|
|
284
|
+
return true;
|
|
285
|
+
return false;
|
|
286
|
+
});
|
|
287
|
+
if (hasNonEmptySubProps) {
|
|
288
|
+
// return the full JSON with text included
|
|
289
|
+
return JSON.stringify(contentAny, null, 2);
|
|
290
|
+
}
|
|
291
|
+
else {
|
|
292
|
+
// if there are no other non-empty sub-properties, just return the text
|
|
293
|
+
return contentAny.text;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
else {
|
|
298
|
+
// if there is no text property, just return the full JSON
|
|
299
|
+
return JSON.stringify(content, null, 2);
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
getContentStats(content) {
|
|
303
|
+
let totalChars = 0;
|
|
304
|
+
let totalWords = 0;
|
|
305
|
+
if (typeof content === 'string') {
|
|
306
|
+
// For string content, use the content directly
|
|
307
|
+
totalChars = content.length;
|
|
308
|
+
totalWords = content.trim() ? content.trim().split(/\s+/).filter(word => word.length > 0).length : 0;
|
|
309
|
+
}
|
|
310
|
+
else {
|
|
311
|
+
// For non-string content, calculate stats from all non-empty parts
|
|
312
|
+
const contentAny = content;
|
|
313
|
+
Object.keys(contentAny).forEach(key => {
|
|
314
|
+
const value = contentAny[key];
|
|
315
|
+
// Skip empty values
|
|
316
|
+
if (value === null || value === undefined)
|
|
317
|
+
return;
|
|
318
|
+
let partText;
|
|
319
|
+
if (typeof value === 'string') {
|
|
320
|
+
partText = value;
|
|
321
|
+
}
|
|
322
|
+
else if (Array.isArray(value) && value.length > 0) {
|
|
323
|
+
partText = JSON.stringify(value, null, 2);
|
|
324
|
+
}
|
|
325
|
+
else if (typeof value === 'object' && Object.keys(value).length > 0) {
|
|
326
|
+
partText = JSON.stringify(value, null, 2);
|
|
327
|
+
}
|
|
328
|
+
else {
|
|
329
|
+
return; // Skip empty arrays/objects
|
|
330
|
+
}
|
|
331
|
+
totalChars += partText.length;
|
|
332
|
+
const partWords = partText.trim().split(/\s+/).filter(word => word.length > 0).length;
|
|
333
|
+
totalWords += partWords;
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
const approxTokens = Math.round(totalWords * 1.25); // Average 1.25 tokens per word
|
|
337
|
+
return { chars: totalChars, words: totalWords, approxTokens };
|
|
338
|
+
}
|
|
339
|
+
copyMessageContent(content) {
|
|
340
|
+
const text = this.getContentString(content);
|
|
341
|
+
navigator.clipboard.writeText(text).then(() => {
|
|
342
|
+
console.log('Message content copied to clipboard');
|
|
343
|
+
}).catch(err => {
|
|
344
|
+
console.error('Failed to copy message:', err);
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* Get content parts for multi-part content display
|
|
349
|
+
* Returns an array of {id, key, value, language, expanded} objects for each content part
|
|
350
|
+
*/
|
|
351
|
+
getContentParts(content, messageIndex) {
|
|
352
|
+
if (typeof content === 'string') {
|
|
353
|
+
const id = `msg-${messageIndex}-part-content`;
|
|
354
|
+
return [{
|
|
355
|
+
id: id,
|
|
356
|
+
key: 'content',
|
|
357
|
+
value: content,
|
|
358
|
+
language: 'markdown',
|
|
359
|
+
expanded: this.isPartExpanded(id)
|
|
360
|
+
}];
|
|
361
|
+
}
|
|
362
|
+
const contentAny = content;
|
|
363
|
+
const parts = [];
|
|
364
|
+
// Process each key in the content object
|
|
365
|
+
Object.keys(contentAny).forEach((key, index) => {
|
|
366
|
+
const value = contentAny[key];
|
|
367
|
+
// Skip empty values
|
|
368
|
+
if (value === null || value === undefined)
|
|
369
|
+
return;
|
|
370
|
+
if (typeof value === 'string' && value.trim().length === 0)
|
|
371
|
+
return;
|
|
372
|
+
if (Array.isArray(value) && value.length === 0)
|
|
373
|
+
return;
|
|
374
|
+
if (typeof value === 'object' && Object.keys(value).length === 0)
|
|
375
|
+
return;
|
|
376
|
+
// Determine the display value and language
|
|
377
|
+
let displayValue;
|
|
378
|
+
let language;
|
|
379
|
+
if (typeof value === 'string') {
|
|
380
|
+
displayValue = value;
|
|
381
|
+
language = this.detectLanguageForKey(key, value);
|
|
382
|
+
}
|
|
383
|
+
else {
|
|
384
|
+
// For objects/arrays, stringify them
|
|
385
|
+
displayValue = JSON.stringify(value, null, 2);
|
|
386
|
+
language = 'json';
|
|
387
|
+
}
|
|
388
|
+
const id = `msg-${messageIndex}-part-${key}`;
|
|
389
|
+
parts.push({
|
|
390
|
+
id: id,
|
|
391
|
+
key: this.formatKeyLabel(key),
|
|
392
|
+
value: displayValue,
|
|
393
|
+
language: language,
|
|
394
|
+
expanded: this.isPartExpanded(id)
|
|
395
|
+
});
|
|
396
|
+
});
|
|
397
|
+
return parts;
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* Detect language based on key name and content
|
|
401
|
+
*/
|
|
402
|
+
detectLanguageForKey(key, value) {
|
|
403
|
+
// Check key-based hints first
|
|
404
|
+
const keyLower = key.toLowerCase();
|
|
405
|
+
if (keyLower.includes('json') || keyLower.includes('data'))
|
|
406
|
+
return 'json';
|
|
407
|
+
if (keyLower.includes('sql') || keyLower.includes('query'))
|
|
408
|
+
return 'sql';
|
|
409
|
+
if (keyLower.includes('code') || keyLower.includes('script'))
|
|
410
|
+
return 'javascript';
|
|
411
|
+
if (keyLower.includes('markdown') || keyLower.includes('md'))
|
|
412
|
+
return 'markdown';
|
|
413
|
+
if (keyLower.includes('html'))
|
|
414
|
+
return 'html';
|
|
415
|
+
if (keyLower.includes('css'))
|
|
416
|
+
return 'css';
|
|
417
|
+
if (keyLower.includes('xml'))
|
|
418
|
+
return 'xml';
|
|
419
|
+
if (keyLower.includes('yaml') || keyLower.includes('yml'))
|
|
420
|
+
return 'yaml';
|
|
421
|
+
// Fall back to content detection
|
|
422
|
+
return this.getContentLanguage({ text: value });
|
|
423
|
+
}
|
|
424
|
+
/**
|
|
425
|
+
* Format key name for display label
|
|
426
|
+
*/
|
|
427
|
+
formatKeyLabel(key) {
|
|
428
|
+
// Convert camelCase or snake_case to Title Case
|
|
429
|
+
return key
|
|
430
|
+
.replace(/([A-Z])/g, ' $1') // Add space before capitals
|
|
431
|
+
.replace(/_/g, ' ') // Replace underscores with spaces
|
|
432
|
+
.replace(/\b\w/g, l => l.toUpperCase()) // Capitalize first letter of each word
|
|
433
|
+
.trim();
|
|
434
|
+
}
|
|
435
|
+
/**
|
|
436
|
+
* Check if content has multiple parts (for non-string content)
|
|
437
|
+
*/
|
|
438
|
+
hasMultipleParts(content) {
|
|
439
|
+
if (typeof content === 'string')
|
|
440
|
+
return false;
|
|
441
|
+
const contentAny = content;
|
|
442
|
+
const nonEmptyKeys = Object.keys(contentAny).filter(key => {
|
|
443
|
+
const value = contentAny[key];
|
|
444
|
+
if (value === null || value === undefined)
|
|
445
|
+
return false;
|
|
446
|
+
if (typeof value === 'string' && value.trim().length === 0)
|
|
447
|
+
return false;
|
|
448
|
+
if (Array.isArray(value) && value.length === 0)
|
|
449
|
+
return false;
|
|
450
|
+
if (typeof value === 'object' && Object.keys(value).length === 0)
|
|
451
|
+
return false;
|
|
452
|
+
return true;
|
|
453
|
+
});
|
|
454
|
+
return nonEmptyKeys.length > 1;
|
|
455
|
+
}
|
|
456
|
+
/**
|
|
457
|
+
* Check if a content part is expanded
|
|
458
|
+
*/
|
|
459
|
+
isPartExpanded(partId) {
|
|
460
|
+
// Default to expanded for all parts initially
|
|
461
|
+
if (!this.contentPartStates.has(partId)) {
|
|
462
|
+
this.contentPartStates.set(partId, true);
|
|
463
|
+
}
|
|
464
|
+
return this.contentPartStates.get(partId) || false;
|
|
465
|
+
}
|
|
466
|
+
/**
|
|
467
|
+
* Toggle the expanded state of a content part
|
|
468
|
+
*/
|
|
469
|
+
toggleContentPart(partId) {
|
|
470
|
+
const currentState = this.contentPartStates.get(partId) || false;
|
|
471
|
+
this.contentPartStates.set(partId, !currentState);
|
|
472
|
+
}
|
|
473
|
+
static { this.ɵfac = function ChatMessageViewerComponent_Factory(t) { return new (t || ChatMessageViewerComponent)(); }; }
|
|
474
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ChatMessageViewerComponent, selectors: [["mj-chat-message-viewer"]], inputs: { messages: "messages" }, features: [i0.ɵɵNgOnChangesFeature], decls: 20, vars: 10, consts: [[1, "chat-message-viewer"], [1, "filter-controls"], [1, "filter-checkbox"], ["type", "checkbox", "kendoCheckBox", "", 3, "ngModelChange", "ngModel"], [1, "filter-label"], [1, "fa-solid", "fa-cog"], [1, "fa-solid", "fa-user"], [1, "fa-solid", "fa-robot"], [1, "messages-container"], [1, "empty-state"], [1, "fa-solid", "fa-comments"], [1, "message-card"], [1, "message-header", 3, "click"], [1, "message-role"], [1, "sequence-number"], [1, "role-label"], [1, "content-stats"], [1, "stat-item"], [1, "stat-divider"], [1, "message-actions"], ["type", "button", "title", "Copy message content", 1, "action-button", 3, "click"], [1, "fa-solid", "fa-copy"], ["type", "button", 1, "toggle-button"], [1, "message-content"], [1, "text-content"], [1, "multi-part-content"], [2, "max-height", "600px", "overflow-y", "auto", 3, "value", "readonly", "language"], [1, "content-part", 3, "collapsed"], [1, "content-part"], [1, "content-part-label", 3, "click"], [1, "content-part-label-content"], [1, "fa-solid", "fa-tag"], ["type", "button", 1, "content-part-toggle"], [1, "content-part-editor"], [2, "max-height", "400px", "overflow-y", "auto", 3, "value", "readonly", "language"]], template: function ChatMessageViewerComponent_Template(rf, ctx) { if (rf & 1) {
|
|
475
|
+
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "label", 2)(3, "input", 3);
|
|
476
|
+
i0.ɵɵtwoWayListener("ngModelChange", function ChatMessageViewerComponent_Template_input_ngModelChange_3_listener($event) { i0.ɵɵtwoWayBindingSet(ctx.showSystem, $event) || (ctx.showSystem = $event); return $event; });
|
|
477
|
+
i0.ɵɵlistener("ngModelChange", function ChatMessageViewerComponent_Template_input_ngModelChange_3_listener() { return ctx.onFilterChange(); });
|
|
478
|
+
i0.ɵɵelementEnd();
|
|
479
|
+
i0.ɵɵelementStart(4, "span", 4);
|
|
480
|
+
i0.ɵɵelement(5, "i", 5);
|
|
481
|
+
i0.ɵɵtext(6, " System ");
|
|
482
|
+
i0.ɵɵelementEnd()();
|
|
483
|
+
i0.ɵɵelementStart(7, "label", 2)(8, "input", 3);
|
|
484
|
+
i0.ɵɵtwoWayListener("ngModelChange", function ChatMessageViewerComponent_Template_input_ngModelChange_8_listener($event) { i0.ɵɵtwoWayBindingSet(ctx.showUser, $event) || (ctx.showUser = $event); return $event; });
|
|
485
|
+
i0.ɵɵlistener("ngModelChange", function ChatMessageViewerComponent_Template_input_ngModelChange_8_listener() { return ctx.onFilterChange(); });
|
|
486
|
+
i0.ɵɵelementEnd();
|
|
487
|
+
i0.ɵɵelementStart(9, "span", 4);
|
|
488
|
+
i0.ɵɵelement(10, "i", 6);
|
|
489
|
+
i0.ɵɵtext(11, " User ");
|
|
490
|
+
i0.ɵɵelementEnd()();
|
|
491
|
+
i0.ɵɵelementStart(12, "label", 2)(13, "input", 3);
|
|
492
|
+
i0.ɵɵtwoWayListener("ngModelChange", function ChatMessageViewerComponent_Template_input_ngModelChange_13_listener($event) { i0.ɵɵtwoWayBindingSet(ctx.showAssistant, $event) || (ctx.showAssistant = $event); return $event; });
|
|
493
|
+
i0.ɵɵlistener("ngModelChange", function ChatMessageViewerComponent_Template_input_ngModelChange_13_listener() { return ctx.onFilterChange(); });
|
|
494
|
+
i0.ɵɵelementEnd();
|
|
495
|
+
i0.ɵɵelementStart(14, "span", 4);
|
|
496
|
+
i0.ɵɵelement(15, "i", 7);
|
|
497
|
+
i0.ɵɵtext(16, " Assistant ");
|
|
498
|
+
i0.ɵɵelementEnd()()();
|
|
499
|
+
i0.ɵɵelementStart(17, "div", 8);
|
|
500
|
+
i0.ɵɵtemplate(18, ChatMessageViewerComponent_Conditional_18_Template, 4, 0, "div", 9)(19, ChatMessageViewerComponent_Conditional_19_Template, 2, 0);
|
|
501
|
+
i0.ɵɵelementEnd()();
|
|
502
|
+
} if (rf & 2) {
|
|
503
|
+
i0.ɵɵadvance(3);
|
|
504
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx.showSystem);
|
|
505
|
+
i0.ɵɵadvance(2);
|
|
506
|
+
i0.ɵɵstyleProp("color", ctx.getRoleColor("system"));
|
|
507
|
+
i0.ɵɵadvance(3);
|
|
508
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx.showUser);
|
|
509
|
+
i0.ɵɵadvance(2);
|
|
510
|
+
i0.ɵɵstyleProp("color", ctx.getRoleColor("user"));
|
|
511
|
+
i0.ɵɵadvance(3);
|
|
512
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx.showAssistant);
|
|
513
|
+
i0.ɵɵadvance(2);
|
|
514
|
+
i0.ɵɵstyleProp("color", ctx.getRoleColor("assistant"));
|
|
515
|
+
i0.ɵɵadvance(3);
|
|
516
|
+
i0.ɵɵconditional(ctx.displayMessages.length === 0 ? 18 : 19);
|
|
517
|
+
} }, dependencies: [i1.CheckboxControlValueAccessor, i1.NgControlStatus, i1.NgModel, i2.CheckBoxDirective, i3.CodeEditorComponent], styles: [".chat-message-viewer[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n height: 100%;\n overflow: hidden; \n\n}\n\n\n\n\n.filter-controls[_ngcontent-%COMP%] {\n display: flex;\n gap: 1.5rem;\n align-items: center;\n padding: 0.75rem;\n background-color: #f9fafb;\n border-radius: 8px;\n border: 1px solid #e5e7eb;\n margin-bottom: 1rem;\n flex-shrink: 0; \n\n}\n\n.filter-checkbox[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n cursor: pointer;\n user-select: none;\n}\n\n.filter-checkbox[_ngcontent-%COMP%] input[type=\"checkbox\"][_ngcontent-%COMP%] {\n margin-right: 0.5rem;\n}\n\n.filter-label[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n font-size: 0.875rem;\n font-weight: 500;\n}\n\n.filter-label[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 1rem;\n}\n\n\n\n.messages-container[_ngcontent-%COMP%] {\n flex: 1;\n overflow-y: auto;\n padding: 0.5rem;\n padding-bottom: 1rem; \n\n max-height: 800px;\n}\n\n.empty-state[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 3rem;\n color: #9ca3af;\n}\n\n.empty-state[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 3rem;\n margin-bottom: 1rem;\n}\n\n.empty-state[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\n font-size: 1rem;\n margin: 0;\n}\n\n\n\n.message-card[_ngcontent-%COMP%] {\n background: white;\n border: 1px solid #e5e7eb;\n border-radius: 8px;\n margin-bottom: 0.75rem;\n overflow: hidden;\n transition: all 0.2s ease;\n}\n\n.message-card[_ngcontent-%COMP%]:hover {\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);\n}\n\n.message-card[_ngcontent-%COMP%]:last-child {\n margin-bottom: 2rem; \n\n}\n\n.message-card[data-role=\"system\"][_ngcontent-%COMP%] {\n border-left: 3px solid #2563eb;\n}\n\n.message-card[data-role=\"user\"][_ngcontent-%COMP%] {\n border-left: 3px solid #059669;\n}\n\n.message-card[data-role=\"assistant\"][_ngcontent-%COMP%] {\n border-left: 3px solid #7c3aed;\n}\n\n\n\n.message-header[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0.75rem 1rem;\n background-color: #f9fafb;\n cursor: pointer;\n user-select: none;\n}\n\n.message-header[_ngcontent-%COMP%]:hover {\n background-color: #f3f4f6;\n}\n\n.message-role[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.sequence-number[_ngcontent-%COMP%] {\n color: #6c757d;\n font-weight: 500;\n font-size: 0.85rem;\n margin-right: 4px;\n}\n\n.message-role[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 1.125rem;\n}\n\n.content-stats[_ngcontent-%COMP%] {\n margin-left: auto;\n display: flex;\n align-items: center;\n gap: 6px;\n color: #6c757d;\n font-size: 0.8rem;\n font-weight: 400;\n}\n\n.stat-item[_ngcontent-%COMP%] {\n white-space: nowrap;\n}\n\n.stat-divider[_ngcontent-%COMP%] {\n color: #cbd5e0;\n}\n\n.role-label[_ngcontent-%COMP%] {\n font-weight: 600;\n font-size: 0.875rem;\n text-transform: uppercase;\n letter-spacing: 0.025em;\n}\n\n.message-actions[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.action-button[_ngcontent-%COMP%], \n.toggle-button[_ngcontent-%COMP%] {\n background: none;\n border: none;\n padding: 0.25rem;\n cursor: pointer;\n color: #6b7280;\n transition: color 0.2s ease;\n}\n\n.action-button[_ngcontent-%COMP%]:hover, \n.toggle-button[_ngcontent-%COMP%]:hover {\n color: #374151;\n}\n\n.action-button[_ngcontent-%COMP%] {\n padding: 0.25rem 0.5rem;\n}\n\n.action-button[_ngcontent-%COMP%]:hover {\n color: #2563eb;\n}\n\n\n\n.message-content[_ngcontent-%COMP%] {\n padding: 1rem;\n}\n\n.content-blocks[_ngcontent-%COMP%] {\n display: flex;\n flex-wrap: wrap;\n gap: 0.5rem;\n margin-bottom: 1rem;\n}\n\n.content-block-indicator[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 0.375rem;\n padding: 0.25rem 0.75rem;\n background-color: #eff6ff;\n border: 1px solid #dbeafe;\n border-radius: 9999px;\n font-size: 0.75rem;\n color: #1e40af;\n}\n\n.content-block-indicator[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 0.875rem;\n}\n\n\n\n.text-content[_ngcontent-%COMP%], \n.json-content[_ngcontent-%COMP%] {\n border: 1px solid #e5e7eb;\n border-radius: 6px;\n overflow: hidden;\n}\n\n.json-content[_ngcontent-%COMP%] {\n background-color: #f9fafb;\n}\n\n.text-content[_ngcontent-%COMP%] mj-code-editor[_ngcontent-%COMP%], \n.json-content[_ngcontent-%COMP%] mj-code-editor[_ngcontent-%COMP%] {\n display: block;\n min-height: 100px;\n}\n\n\n\n.multi-part-content[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n}\n\n.content-part[_ngcontent-%COMP%] {\n border: 1px solid #e5e7eb;\n border-radius: 6px;\n overflow: hidden;\n}\n\n.content-part-label[_ngcontent-%COMP%] {\n background-color: #f3f4f6;\n padding: 0.5rem 1rem;\n font-size: 0.875rem;\n font-weight: 500;\n color: #374151;\n border-bottom: 1px solid #e5e7eb;\n display: flex;\n align-items: center;\n justify-content: space-between;\n cursor: pointer;\n user-select: none;\n transition: background-color 0.2s;\n}\n\n.content-part-label[_ngcontent-%COMP%]:hover {\n background-color: #e5e7eb;\n}\n\n.content-part-label-content[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.content-part-label[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 0.75rem;\n color: #6b7280;\n}\n\n.content-part-toggle[_ngcontent-%COMP%] {\n background: none;\n border: none;\n padding: 0.25rem;\n cursor: pointer;\n color: #6b7280;\n transition: color 0.2s;\n}\n\n.content-part-toggle[_ngcontent-%COMP%]:hover {\n color: #374151;\n}\n\n.content-part.collapsed[_ngcontent-%COMP%] .content-part-label[_ngcontent-%COMP%] {\n border-bottom: none;\n}\n\n.content-part-editor[_ngcontent-%COMP%] {\n background-color: #f9fafb;\n}\n\n.content-part-editor[_ngcontent-%COMP%] mj-code-editor[_ngcontent-%COMP%] {\n display: block;\n min-height: 80px;\n}\n\n\n\n.chat-message-viewer[_ngcontent-%COMP%] .cm-editor[_ngcontent-%COMP%] {\n font-size: 0.875rem;\n}\n\n.chat-message-viewer[_ngcontent-%COMP%] .cm-editor.cm-focused[_ngcontent-%COMP%] {\n outline: none;\n}\n\n\n\n@media (max-width: 640px) {\n .filter-controls[_ngcontent-%COMP%] {\n flex-wrap: wrap;\n gap: 0.75rem;\n }\n \n .filter-checkbox[_ngcontent-%COMP%] {\n min-width: calc(50% - 0.375rem);\n }\n}"] }); }
|
|
518
|
+
}
|
|
519
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ChatMessageViewerComponent, [{
|
|
520
|
+
type: Component,
|
|
521
|
+
args: [{ selector: 'mj-chat-message-viewer', template: "<div class=\"chat-message-viewer\">\n <!-- Filter Controls -->\n <div class=\"filter-controls\">\n <label class=\"filter-checkbox\">\n <input type=\"checkbox\" \n [(ngModel)]=\"showSystem\" \n (ngModelChange)=\"onFilterChange()\"\n kendoCheckBox />\n <span class=\"filter-label\">\n <i class=\"fa-solid fa-cog\" [style.color]=\"getRoleColor('system')\"></i>\n System\n </span>\n </label>\n \n <label class=\"filter-checkbox\">\n <input type=\"checkbox\" \n [(ngModel)]=\"showUser\" \n (ngModelChange)=\"onFilterChange()\"\n kendoCheckBox />\n <span class=\"filter-label\">\n <i class=\"fa-solid fa-user\" [style.color]=\"getRoleColor('user')\"></i>\n User\n </span>\n </label>\n \n <label class=\"filter-checkbox\">\n <input type=\"checkbox\" \n [(ngModel)]=\"showAssistant\" \n (ngModelChange)=\"onFilterChange()\"\n kendoCheckBox />\n <span class=\"filter-label\">\n <i class=\"fa-solid fa-robot\" [style.color]=\"getRoleColor('assistant')\"></i>\n Assistant\n </span>\n </label>\n </div>\n \n <!-- Messages List -->\n <div class=\"messages-container\">\n @if (displayMessages.length === 0) {\n <div class=\"empty-state\">\n <i class=\"fa-solid fa-comments\"></i>\n <p>No messages to display</p>\n </div>\n } @else {\n @for (item of displayMessages; track $index; let i = $index) {\n @if (item.visible) {\n <div class=\"message-card\" [attr.data-role]=\"item.message.role\">\n <!-- Message Header -->\n <div class=\"message-header\" (click)=\"toggleMessage(i)\">\n <div class=\"message-role\">\n <span class=\"sequence-number\">#{{ item.sequenceNumber }}</span>\n <i [class]=\"'fa-solid ' + getRoleIcon(item.message.role)\" \n [style.color]=\"getRoleColor(item.message.role)\"></i>\n <span class=\"role-label\">{{ getRoleLabel(item.message.role) }}</span>\n <span class=\"content-stats\">\n <span class=\"stat-item\">{{ getContentStats(item.message.content).chars.toLocaleString() }} chars</span>\n <span class=\"stat-divider\">\u2022</span>\n <span class=\"stat-item\">~{{ getContentStats(item.message.content).approxTokens.toLocaleString() }} tokens</span>\n </span>\n </div>\n <div class=\"message-actions\">\n <button class=\"action-button\" type=\"button\" \n (click)=\"copyMessageContent(item.message.content); $event.stopPropagation()\"\n title=\"Copy message content\">\n <i class=\"fa-solid fa-copy\"></i>\n </button>\n <button class=\"toggle-button\" type=\"button\">\n <i [class]=\"item.expanded ? 'fa-solid fa-chevron-up' : 'fa-solid fa-chevron-down'\"></i>\n </button>\n </div>\n </div>\n \n <!-- Message Content -->\n @if (item.expanded) {\n <div class=\"message-content\">\n <!-- Main content -->\n @if (isStringContent(item.message.content)) {\n <div class=\"text-content\">\n <mj-code-editor \n [value]=\"getContentString(item.message.content)\"\n [readonly]=\"true\"\n [language]=\"getContentLanguage(item.message.content)\"\n style=\"max-height: 600px; overflow-y: auto;\">\n </mj-code-editor>\n </div>\n } @else {\n <!-- Non-string content with multiple parts -->\n <div class=\"multi-part-content\">\n @for (part of getContentParts(item.message.content, i); track part.id) {\n <div class=\"content-part\" [class.collapsed]=\"!part.expanded\">\n <div class=\"content-part-label\" (click)=\"toggleContentPart(part.id)\">\n <div class=\"content-part-label-content\">\n <i class=\"fa-solid fa-tag\"></i>\n {{ part.key }}\n </div>\n <button class=\"content-part-toggle\" type=\"button\">\n <i [class]=\"part.expanded ? 'fa-solid fa-chevron-up' : 'fa-solid fa-chevron-down'\"></i>\n </button>\n </div>\n @if (part.expanded) {\n <div class=\"content-part-editor\">\n <mj-code-editor \n [value]=\"part.value\"\n [readonly]=\"true\"\n [language]=\"part.language\"\n style=\"max-height: 400px; overflow-y: auto;\">\n </mj-code-editor>\n </div>\n }\n </div>\n }\n </div>\n }\n </div>\n }\n </div>\n }\n }\n }\n </div>\n</div>", styles: [".chat-message-viewer {\n display: flex;\n flex-direction: column;\n height: 100%;\n overflow: hidden; /* Prevent overflow from the parent */\n}\n\n\n/* Filter Controls */\n.filter-controls {\n display: flex;\n gap: 1.5rem;\n align-items: center;\n padding: 0.75rem;\n background-color: #f9fafb;\n border-radius: 8px;\n border: 1px solid #e5e7eb;\n margin-bottom: 1rem;\n flex-shrink: 0; /* Prevent filter from shrinking */\n}\n\n.filter-checkbox {\n display: flex;\n align-items: center;\n cursor: pointer;\n user-select: none;\n}\n\n.filter-checkbox input[type=\"checkbox\"] {\n margin-right: 0.5rem;\n}\n\n.filter-label {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n font-size: 0.875rem;\n font-weight: 500;\n}\n\n.filter-label i {\n font-size: 1rem;\n}\n\n/* Messages Container */\n.messages-container {\n flex: 1;\n overflow-y: auto;\n padding: 0.5rem;\n padding-bottom: 1rem; /* Small padding at bottom */\n max-height: 800px;\n}\n\n.empty-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 3rem;\n color: #9ca3af;\n}\n\n.empty-state i {\n font-size: 3rem;\n margin-bottom: 1rem;\n}\n\n.empty-state p {\n font-size: 1rem;\n margin: 0;\n}\n\n/* Message Card */\n.message-card {\n background: white;\n border: 1px solid #e5e7eb;\n border-radius: 8px;\n margin-bottom: 0.75rem;\n overflow: hidden;\n transition: all 0.2s ease;\n}\n\n.message-card:hover {\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);\n}\n\n.message-card:last-child {\n margin-bottom: 2rem; /* Extra margin on last card to ensure it's fully visible */\n}\n\n.message-card[data-role=\"system\"] {\n border-left: 3px solid #2563eb;\n}\n\n.message-card[data-role=\"user\"] {\n border-left: 3px solid #059669;\n}\n\n.message-card[data-role=\"assistant\"] {\n border-left: 3px solid #7c3aed;\n}\n\n/* Message Header */\n.message-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0.75rem 1rem;\n background-color: #f9fafb;\n cursor: pointer;\n user-select: none;\n}\n\n.message-header:hover {\n background-color: #f3f4f6;\n}\n\n.message-role {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.sequence-number {\n color: #6c757d;\n font-weight: 500;\n font-size: 0.85rem;\n margin-right: 4px;\n}\n\n.message-role i {\n font-size: 1.125rem;\n}\n\n.content-stats {\n margin-left: auto;\n display: flex;\n align-items: center;\n gap: 6px;\n color: #6c757d;\n font-size: 0.8rem;\n font-weight: 400;\n}\n\n.stat-item {\n white-space: nowrap;\n}\n\n.stat-divider {\n color: #cbd5e0;\n}\n\n.role-label {\n font-weight: 600;\n font-size: 0.875rem;\n text-transform: uppercase;\n letter-spacing: 0.025em;\n}\n\n.message-actions {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.action-button,\n.toggle-button {\n background: none;\n border: none;\n padding: 0.25rem;\n cursor: pointer;\n color: #6b7280;\n transition: color 0.2s ease;\n}\n\n.action-button:hover,\n.toggle-button:hover {\n color: #374151;\n}\n\n.action-button {\n padding: 0.25rem 0.5rem;\n}\n\n.action-button:hover {\n color: #2563eb;\n}\n\n/* Message Content */\n.message-content {\n padding: 1rem;\n}\n\n.content-blocks {\n display: flex;\n flex-wrap: wrap;\n gap: 0.5rem;\n margin-bottom: 1rem;\n}\n\n.content-block-indicator {\n display: inline-flex;\n align-items: center;\n gap: 0.375rem;\n padding: 0.25rem 0.75rem;\n background-color: #eff6ff;\n border: 1px solid #dbeafe;\n border-radius: 9999px;\n font-size: 0.75rem;\n color: #1e40af;\n}\n\n.content-block-indicator i {\n font-size: 0.875rem;\n}\n\n/* Text Content */\n.text-content,\n.json-content {\n border: 1px solid #e5e7eb;\n border-radius: 6px;\n overflow: hidden;\n}\n\n.json-content {\n background-color: #f9fafb;\n}\n\n.text-content mj-code-editor,\n.json-content mj-code-editor {\n display: block;\n min-height: 100px;\n}\n\n/* Multi-part Content */\n.multi-part-content {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n}\n\n.content-part {\n border: 1px solid #e5e7eb;\n border-radius: 6px;\n overflow: hidden;\n}\n\n.content-part-label {\n background-color: #f3f4f6;\n padding: 0.5rem 1rem;\n font-size: 0.875rem;\n font-weight: 500;\n color: #374151;\n border-bottom: 1px solid #e5e7eb;\n display: flex;\n align-items: center;\n justify-content: space-between;\n cursor: pointer;\n user-select: none;\n transition: background-color 0.2s;\n}\n\n.content-part-label:hover {\n background-color: #e5e7eb;\n}\n\n.content-part-label-content {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.content-part-label i {\n font-size: 0.75rem;\n color: #6b7280;\n}\n\n.content-part-toggle {\n background: none;\n border: none;\n padding: 0.25rem;\n cursor: pointer;\n color: #6b7280;\n transition: color 0.2s;\n}\n\n.content-part-toggle:hover {\n color: #374151;\n}\n\n.content-part.collapsed .content-part-label {\n border-bottom: none;\n}\n\n.content-part-editor {\n background-color: #f9fafb;\n}\n\n.content-part-editor mj-code-editor {\n display: block;\n min-height: 80px;\n}\n\n/* CodeMirror Overrides for this component */\n.chat-message-viewer .cm-editor {\n font-size: 0.875rem;\n}\n\n.chat-message-viewer .cm-editor.cm-focused {\n outline: none;\n}\n\n/* Responsive adjustments */\n@media (max-width: 640px) {\n .filter-controls {\n flex-wrap: wrap;\n gap: 0.75rem;\n }\n \n .filter-checkbox {\n min-width: calc(50% - 0.375rem);\n }\n}"] }]
|
|
522
|
+
}], null, { messages: [{
|
|
523
|
+
type: Input
|
|
524
|
+
}] }); })();
|
|
525
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ChatMessageViewerComponent, { className: "ChatMessageViewerComponent", filePath: "src/lib/custom/AIPromptRuns/chat-message-viewer.component.ts", lineNumber: 16 }); })();
|
|
526
|
+
//# sourceMappingURL=chat-message-viewer.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-message-viewer.component.js","sourceRoot":"","sources":["../../../../src/lib/custom/AIPromptRuns/chat-message-viewer.component.ts","../../../../src/lib/custom/AIPromptRuns/chat-message-viewer.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAqB,MAAM,eAAe,CAAC;;;;;;;ICwCxD,8BAAyB;IACrB,wBAAoC;IACpC,yBAAG;IAAA,sCAAsB;IAC7B,AAD6B,iBAAI,EAC3B;;;IAmCkB,+BAA0B;IACtB,qCAKiB;IACrB,iBAAM;;;;IALE,cAAgD;IAEhD,AADA,AADA,wEAAgD,kBAC/B,gEACoC;;;IAmB7C,+BAAiC;IAC7B,qCAKiB;IACr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