@memberjunction/ng-ai-test-harness 2.55.0 → 2.56.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/dist/lib/agent-execution-monitor.component.d.ts +9 -0
  2. package/dist/lib/agent-execution-monitor.component.d.ts.map +1 -1
  3. package/dist/lib/agent-execution-monitor.component.js +68 -10
  4. package/dist/lib/agent-execution-monitor.component.js.map +1 -1
  5. package/dist/lib/agent-execution-node.component.d.ts +1 -0
  6. package/dist/lib/agent-execution-node.component.d.ts.map +1 -1
  7. package/dist/lib/agent-execution-node.component.js +88 -39
  8. package/dist/lib/agent-execution-node.component.js.map +1 -1
  9. package/dist/lib/ai-test-harness-dialog.service.d.ts +7 -14
  10. package/dist/lib/ai-test-harness-dialog.service.d.ts.map +1 -1
  11. package/dist/lib/ai-test-harness-dialog.service.js +21 -95
  12. package/dist/lib/ai-test-harness-dialog.service.js.map +1 -1
  13. package/dist/lib/ai-test-harness-window.component.d.ts +37 -0
  14. package/dist/lib/ai-test-harness-window.component.d.ts.map +1 -0
  15. package/dist/lib/ai-test-harness-window.component.js +171 -0
  16. package/dist/lib/ai-test-harness-window.component.js.map +1 -0
  17. package/dist/lib/ai-test-harness.component.d.ts +26 -1
  18. package/dist/lib/ai-test-harness.component.d.ts.map +1 -1
  19. package/dist/lib/ai-test-harness.component.js +299 -219
  20. package/dist/lib/ai-test-harness.component.js.map +1 -1
  21. package/dist/lib/test-harness-custom-window.component.d.ts +78 -0
  22. package/dist/lib/test-harness-custom-window.component.d.ts.map +1 -0
  23. package/dist/lib/test-harness-custom-window.component.js +528 -0
  24. package/dist/lib/test-harness-custom-window.component.js.map +1 -0
  25. package/dist/lib/test-harness-window-manager.service.d.ts +59 -0
  26. package/dist/lib/test-harness-window-manager.service.d.ts.map +1 -0
  27. package/dist/lib/test-harness-window-manager.service.js +163 -0
  28. package/dist/lib/test-harness-window-manager.service.js.map +1 -0
  29. package/dist/lib/test-harness-window.service.d.ts +73 -0
  30. package/dist/lib/test-harness-window.service.d.ts.map +1 -0
  31. package/dist/lib/test-harness-window.service.js +164 -0
  32. package/dist/lib/test-harness-window.service.js.map +1 -0
  33. package/dist/lib/window-dock.service.d.ts +32 -0
  34. package/dist/lib/window-dock.service.d.ts.map +1 -0
  35. package/dist/lib/window-dock.service.js +125 -0
  36. package/dist/lib/window-dock.service.js.map +1 -0
  37. package/dist/module.d.ts +19 -17
  38. package/dist/module.d.ts.map +1 -1
  39. package/dist/module.js +23 -4
  40. package/dist/module.js.map +1 -1
  41. package/dist/public-api.d.ts +6 -1
  42. package/dist/public-api.d.ts.map +1 -1
  43. package/dist/public-api.js +6 -1
  44. package/dist/public-api.js.map +1 -1
  45. package/package.json +8 -8
  46. package/dist/lib/test-harness-dialog.service.d.ts +0 -151
  47. package/dist/lib/test-harness-dialog.service.d.ts.map +0 -1
  48. package/dist/lib/test-harness-dialog.service.js +0 -234
  49. package/dist/lib/test-harness-dialog.service.js.map +0 -1
@@ -0,0 +1,528 @@
1
+ import { Component, Input, Output, EventEmitter, ViewChild } from '@angular/core';
2
+ import { Metadata } from '@memberjunction/core';
3
+ import { AITestHarnessComponent } from './ai-test-harness.component';
4
+ import * as i0 from "@angular/core";
5
+ import * as i1 from "@progress/kendo-angular-dialog";
6
+ import * as i2 from "@progress/kendo-angular-indicators";
7
+ import * as i3 from "./ai-test-harness.component";
8
+ const _c0 = ["kendoWindow"];
9
+ function TestHarnessCustomWindowComponent_Conditional_4_Template(rf, ctx) { if (rf & 1) {
10
+ i0.ɵɵelement(0, "img", 3);
11
+ } if (rf & 2) {
12
+ const ctx_r1 = i0.ɵɵnextContext();
13
+ i0.ɵɵproperty("src", ctx_r1.agent == null ? null : ctx_r1.agent.LogoURL, i0.ɵɵsanitizeUrl);
14
+ } }
15
+ function TestHarnessCustomWindowComponent_Conditional_5_Template(rf, ctx) { if (rf & 1) {
16
+ i0.ɵɵelement(0, "i", 4);
17
+ } }
18
+ function TestHarnessCustomWindowComponent_Conditional_6_Template(rf, ctx) { if (rf & 1) {
19
+ i0.ɵɵelement(0, "i", 5);
20
+ } }
21
+ function TestHarnessCustomWindowComponent_Conditional_17_Template(rf, ctx) { if (rf & 1) {
22
+ i0.ɵɵelementStart(0, "div", 14);
23
+ i0.ɵɵelement(1, "kendo-loader", 17);
24
+ i0.ɵɵelementStart(2, "p");
25
+ i0.ɵɵtext(3);
26
+ i0.ɵɵelementEnd()();
27
+ } if (rf & 2) {
28
+ const ctx_r1 = i0.ɵɵnextContext();
29
+ i0.ɵɵadvance(3);
30
+ i0.ɵɵtextInterpolate1("Loading ", ctx_r1.mode === "agent" ? "AI Agent" : "AI Prompt", "...");
31
+ } }
32
+ function TestHarnessCustomWindowComponent_Conditional_18_Template(rf, ctx) { if (rf & 1) {
33
+ i0.ɵɵelementStart(0, "div", 15);
34
+ i0.ɵɵelement(1, "i", 18);
35
+ i0.ɵɵelementStart(2, "p");
36
+ i0.ɵɵtext(3);
37
+ i0.ɵɵelementEnd()();
38
+ } if (rf & 2) {
39
+ const ctx_r1 = i0.ɵɵnextContext();
40
+ i0.ɵɵadvance(3);
41
+ i0.ɵɵtextInterpolate(ctx_r1.error);
42
+ } }
43
+ function TestHarnessCustomWindowComponent_Conditional_19_Template(rf, ctx) { if (rf & 1) {
44
+ const _r3 = i0.ɵɵgetCurrentView();
45
+ i0.ɵɵelementStart(0, "mj-ai-test-harness", 19);
46
+ i0.ɵɵlistener("runOpened", function TestHarnessCustomWindowComponent_Conditional_19_Template_mj_ai_test_harness_runOpened_0_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onRunOpened($event)); });
47
+ i0.ɵɵelementEnd();
48
+ } if (rf & 2) {
49
+ const ctx_r1 = i0.ɵɵnextContext();
50
+ i0.ɵɵproperty("entity", ctx_r1.agent || ctx_r1.prompt || null)("mode", ctx_r1.mode)("isVisible", true);
51
+ } }
52
+ export class TestHarnessCustomWindowComponent {
53
+ constructor(renderer, elementRef, cdr) {
54
+ this.renderer = renderer;
55
+ this.elementRef = elementRef;
56
+ this.cdr = cdr;
57
+ this.data = {};
58
+ this.closeWindow = new EventEmitter();
59
+ this.minimizeWindow = new EventEmitter();
60
+ this.restoreWindow = new EventEmitter();
61
+ this.executionStateChange = new EventEmitter();
62
+ this.windowTitle = 'AI Test Harness';
63
+ this.width = 1200;
64
+ this.height = 800;
65
+ this.windowTop = 100;
66
+ this.windowLeft = 100;
67
+ this.loading = true;
68
+ this.error = '';
69
+ this.windowState = 'default';
70
+ this.isMaximized = false;
71
+ this.isMinimized = false;
72
+ // Store original dimensions for restore
73
+ this.originalWidth = 1200;
74
+ this.originalHeight = 800;
75
+ this.originalTop = 100;
76
+ this.originalLeft = 100;
77
+ // Minimized dimensions
78
+ this.MINIMIZED_WIDTH = 400;
79
+ this.MINIMIZED_HEIGHT = 60;
80
+ this.mode = 'agent';
81
+ this.metadata = new Metadata();
82
+ }
83
+ ngOnInit() {
84
+ // Set window dimensions
85
+ this.width = this.convertToNumber(this.data.width) || 1200;
86
+ this.height = this.convertToNumber(this.data.height) || 800;
87
+ // Store original dimensions
88
+ this.originalWidth = this.width;
89
+ this.originalHeight = this.height;
90
+ // Calculate centered position
91
+ const windowWidth = window.innerWidth;
92
+ const windowHeight = window.innerHeight;
93
+ this.windowLeft = Math.max(0, (windowWidth - this.width) / 2);
94
+ this.windowTop = Math.max(0, (windowHeight - this.height) / 2);
95
+ // Store original position
96
+ this.originalLeft = this.windowLeft;
97
+ this.originalTop = this.windowTop;
98
+ // Determine mode
99
+ this.mode = this.data.mode || (this.data.promptId || this.data.prompt ? 'prompt' : 'agent');
100
+ // Load entity
101
+ this.loadEntity();
102
+ }
103
+ async loadEntity() {
104
+ try {
105
+ if (this.mode === 'agent') {
106
+ if (this.data.agent) {
107
+ this.agent = this.data.agent;
108
+ this.windowTitle = this.data.title || `Test: ${this.agent.Name}`;
109
+ }
110
+ else if (this.data.agentId) {
111
+ const agentEntity = await this.metadata.GetEntityObject('AI Agents');
112
+ await agentEntity.Load(this.data.agentId);
113
+ if (agentEntity.IsSaved) {
114
+ this.agent = agentEntity;
115
+ this.windowTitle = this.data.title || `Test: ${this.agent.Name}`;
116
+ }
117
+ else {
118
+ throw new Error('Agent not found');
119
+ }
120
+ }
121
+ else {
122
+ throw new Error('No agent provided');
123
+ }
124
+ }
125
+ else {
126
+ if (this.data.prompt) {
127
+ this.prompt = this.data.prompt;
128
+ this.windowTitle = this.data.title || `Test: ${this.prompt.Name}`;
129
+ }
130
+ else if (this.data.promptId) {
131
+ const promptEntity = await this.metadata.GetEntityObject('AI Prompts');
132
+ await promptEntity.Load(this.data.promptId);
133
+ if (promptEntity.IsSaved) {
134
+ this.prompt = promptEntity;
135
+ this.windowTitle = this.data.title || `Test: ${this.prompt.Name}`;
136
+ }
137
+ else {
138
+ throw new Error('Prompt not found');
139
+ }
140
+ }
141
+ else {
142
+ throw new Error('No prompt provided');
143
+ }
144
+ }
145
+ this.loading = false;
146
+ }
147
+ catch (err) {
148
+ this.error = err.message || 'Failed to load entity';
149
+ this.loading = false;
150
+ }
151
+ }
152
+ onClose() {
153
+ // When the Kendo Window's close event fires (from the default X button),
154
+ // emit our closeWindow event to notify the window manager
155
+ this.closeWindow.emit();
156
+ }
157
+ closeButtonClick() {
158
+ // When our custom close button is clicked, emit the close event
159
+ // This will trigger the window to close and call our onClose handler
160
+ if (this.kendoWindow) {
161
+ this.kendoWindow.close.emit();
162
+ }
163
+ else {
164
+ // If kendoWindow is not available, directly emit the close event
165
+ this.onClose();
166
+ }
167
+ }
168
+ onStateChange(state) {
169
+ this.windowState = state;
170
+ this.isMaximized = state === 'maximized';
171
+ this.isMinimized = state === 'minimized';
172
+ // Handle restore from minimized
173
+ if (this.isMinimized && state !== 'minimized') {
174
+ this.restoreFromMinimized();
175
+ }
176
+ // Adjust content height on any state change
177
+ if (state !== 'minimized') {
178
+ setTimeout(() => this.adjustContentHeight(), 100);
179
+ }
180
+ }
181
+ onWindowResize() {
182
+ // Handle Kendo Window resize event
183
+ if (!this.isMinimized) {
184
+ // Use a small delay to ensure the DOM has updated
185
+ setTimeout(() => this.adjustContentHeight(), 50);
186
+ }
187
+ }
188
+ onRunOpened(event) {
189
+ // Auto-minimize the test harness window when a run is opened
190
+ this.minimize();
191
+ }
192
+ minimize() {
193
+ if (!this.isMinimized) {
194
+ // Store current dimensions before minimizing
195
+ this.originalWidth = this.width;
196
+ this.originalHeight = this.height;
197
+ this.originalTop = this.windowTop;
198
+ this.originalLeft = this.windowLeft;
199
+ // Hide the window when minimized (dock will show icon)
200
+ this.isMinimized = true;
201
+ this.minimizeWindow.emit();
202
+ // Hide the window element
203
+ let windowElement = this.elementRef.nativeElement.querySelector('.k-window');
204
+ if (!windowElement && this.elementRef.nativeElement.closest) {
205
+ windowElement = this.elementRef.nativeElement.closest('.k-window');
206
+ }
207
+ if (windowElement) {
208
+ this.renderer.setStyle(windowElement, 'display', 'none');
209
+ }
210
+ }
211
+ }
212
+ restoreFromMinimized() {
213
+ this.width = this.originalWidth;
214
+ this.height = this.originalHeight;
215
+ this.windowTop = this.originalTop;
216
+ this.windowLeft = this.originalLeft;
217
+ this.windowState = 'default';
218
+ this.isMinimized = false;
219
+ // Show the window element
220
+ let windowElement = this.elementRef.nativeElement.querySelector('.k-window');
221
+ if (!windowElement && this.elementRef.nativeElement.closest) {
222
+ windowElement = this.elementRef.nativeElement.closest('.k-window');
223
+ }
224
+ if (windowElement) {
225
+ this.renderer.setStyle(windowElement, 'display', 'block');
226
+ }
227
+ // Update position after state change
228
+ setTimeout(() => {
229
+ this.updateWindowPosition();
230
+ // Force Angular change detection
231
+ this.cdr.detectChanges();
232
+ // Force the Kendo Window to recalculate its internal dimensions
233
+ if (this.kendoWindow) {
234
+ // Trigger resize event to fix content sizing
235
+ window.dispatchEvent(new Event('resize'));
236
+ // Use the shared method to adjust content height
237
+ this.adjustContentHeight();
238
+ }
239
+ }, 100);
240
+ // Emit restore event
241
+ this.restoreWindow.emit();
242
+ }
243
+ toggleMaximize() {
244
+ if (this.isMinimized) {
245
+ // First restore from minimized, then maximize
246
+ this.restoreFromMinimized();
247
+ setTimeout(() => {
248
+ this.windowState = 'maximized';
249
+ this.isMaximized = true;
250
+ }, 600);
251
+ }
252
+ else {
253
+ this.windowState = this.isMaximized ? 'default' : 'maximized';
254
+ this.isMaximized = !this.isMaximized;
255
+ }
256
+ }
257
+ convertToNumber(value) {
258
+ if (!value)
259
+ return undefined;
260
+ if (typeof value === 'number')
261
+ return value;
262
+ // Handle percentage values
263
+ if (value.endsWith('vw') || value.endsWith('vh')) {
264
+ const percentage = parseFloat(value) / 100;
265
+ if (value.endsWith('vw')) {
266
+ return window.innerWidth * percentage;
267
+ }
268
+ else {
269
+ return window.innerHeight * percentage;
270
+ }
271
+ }
272
+ // Handle pixel values
273
+ if (value.endsWith('px')) {
274
+ return parseFloat(value);
275
+ }
276
+ // Try to parse as number
277
+ const parsed = parseFloat(value);
278
+ return isNaN(parsed) ? undefined : parsed;
279
+ }
280
+ ngAfterViewInit() {
281
+ // Set initial position if needed
282
+ setTimeout(() => {
283
+ this.updateWindowPosition();
284
+ this.adjustContentHeight();
285
+ }, 100);
286
+ // Set up execution tracking
287
+ this.setupExecutionTracking();
288
+ // Set up window resize listener
289
+ this.setupResizeListener();
290
+ }
291
+ adjustContentHeight() {
292
+ // Ensure the window content wrapper has proper height
293
+ const contentWrapper = this.elementRef.nativeElement.querySelector('.k-window-content');
294
+ if (contentWrapper && this.kendoWindow) {
295
+ // Get the actual window element to check current dimensions
296
+ const windowElement = this.elementRef.nativeElement.querySelector('.k-window') ||
297
+ this.elementRef.nativeElement.closest('.k-window');
298
+ // Update our tracked dimensions if the window has been resized
299
+ if (windowElement) {
300
+ const rect = windowElement.getBoundingClientRect();
301
+ if (rect.width > 0)
302
+ this.width = rect.width;
303
+ if (rect.height > 0)
304
+ this.height = rect.height;
305
+ }
306
+ // Calculate the actual content height (window height minus titlebar and some padding)
307
+ const windowHeight = this.height;
308
+ const titlebarHeight = 40; // Titlebar height
309
+ const bottomPadding = 10; // Extra space to prevent clipping
310
+ const contentHeight = windowHeight - titlebarHeight - bottomPadding;
311
+ this.renderer.setStyle(contentWrapper, 'height', `${contentHeight}px`);
312
+ this.renderer.setStyle(contentWrapper, 'display', 'flex');
313
+ this.renderer.setStyle(contentWrapper, 'flex-direction', 'column');
314
+ }
315
+ // Also update the test harness container
316
+ const testHarnessContainer = this.elementRef.nativeElement.querySelector('mj-ai-test-harness');
317
+ if (testHarnessContainer) {
318
+ this.renderer.setStyle(testHarnessContainer, 'flex', '1');
319
+ this.renderer.setStyle(testHarnessContainer, 'height', '100%');
320
+ this.renderer.setStyle(testHarnessContainer, 'overflow', 'hidden');
321
+ }
322
+ }
323
+ setupResizeListener() {
324
+ // Debounced resize handler
325
+ let resizeTimeout;
326
+ const handleResize = () => {
327
+ clearTimeout(resizeTimeout);
328
+ resizeTimeout = setTimeout(() => {
329
+ if (!this.isMinimized) {
330
+ this.adjustContentHeight();
331
+ }
332
+ }, 100);
333
+ };
334
+ // Listen for window resize events
335
+ window.addEventListener('resize', handleResize);
336
+ // Store the handler for cleanup
337
+ this.resizeHandler = handleResize;
338
+ // Note: Kendo Window resize events are handled by the (resize) event binding in the template
339
+ }
340
+ setupExecutionTracking() {
341
+ // Use a timer to check the test harness execution state
342
+ // This is needed because the test harness doesn't emit events for execution state changes
343
+ if (this.testHarness) {
344
+ // Initial state
345
+ let lastExecutingState = false;
346
+ // Check execution state periodically
347
+ const checkInterval = setInterval(() => {
348
+ if (this.testHarness && this.testHarness.isExecuting !== lastExecutingState) {
349
+ lastExecutingState = this.testHarness.isExecuting;
350
+ this.executionStateChange.emit({ isExecuting: lastExecutingState });
351
+ }
352
+ }, 100);
353
+ // Store interval for cleanup
354
+ this.executionCheckInterval = checkInterval;
355
+ }
356
+ }
357
+ ngOnDestroy() {
358
+ // Clean up execution tracking interval
359
+ if (this.executionCheckInterval) {
360
+ clearInterval(this.executionCheckInterval);
361
+ }
362
+ // Clean up resize listener
363
+ if (this.resizeHandler) {
364
+ window.removeEventListener('resize', this.resizeHandler);
365
+ }
366
+ // Ensure window is properly closed and cleaned up
367
+ if (this.kendoWindow) {
368
+ this.kendoWindow.close.emit();
369
+ }
370
+ }
371
+ updateWindowPosition() {
372
+ // Find the window element - it might be in the parent if we're inside a wrapper
373
+ let windowElement = this.elementRef.nativeElement.querySelector('.k-window');
374
+ if (!windowElement && this.elementRef.nativeElement.closest) {
375
+ windowElement = this.elementRef.nativeElement.closest('.k-window');
376
+ }
377
+ if (windowElement && (this.windowTop !== undefined || this.windowLeft !== undefined)) {
378
+ if (this.windowTop !== undefined) {
379
+ this.renderer.setStyle(windowElement, 'top', `${this.windowTop}px`);
380
+ }
381
+ if (this.windowLeft !== undefined) {
382
+ this.renderer.setStyle(windowElement, 'left', `${this.windowLeft}px`);
383
+ }
384
+ }
385
+ }
386
+ static { this.ɵfac = function TestHarnessCustomWindowComponent_Factory(t) { return new (t || TestHarnessCustomWindowComponent)(i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); }; }
387
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TestHarnessCustomWindowComponent, selectors: [["mj-test-harness-custom-window"]], viewQuery: function TestHarnessCustomWindowComponent_Query(rf, ctx) { if (rf & 1) {
388
+ i0.ɵɵviewQuery(_c0, 5);
389
+ i0.ɵɵviewQuery(AITestHarnessComponent, 5);
390
+ } if (rf & 2) {
391
+ let _t;
392
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.kendoWindow = _t.first);
393
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.testHarness = _t.first);
394
+ } }, inputs: { data: "data" }, outputs: { closeWindow: "closeWindow", minimizeWindow: "minimizeWindow", restoreWindow: "restoreWindow", executionStateChange: "executionStateChange" }, decls: 20, vars: 20, consts: [["kendoWindow", ""], [3, "close", "stateChange", "resize", "title", "width", "height", "top", "left", "minWidth", "minHeight", "draggable", "resizable", "state"], [1, "window-title"], ["alt", "Agent logo", 1, "title-logo", 3, "src"], [1, "fa-solid", "fa-robot", "title-icon"], [1, "fa-solid", "fa-comment-dots", "title-icon"], [1, "window-actions"], ["title", "Minimize", 1, "window-action-btn", 3, "click"], [1, "fa-solid", "fa-window-minimize"], [1, "window-action-btn", 3, "click", "title"], [1, "fa-solid"], ["title", "Close", 1, "window-action-btn", 3, "click"], [1, "fa-solid", "fa-xmark"], [1, "window-content"], [1, "loading-container"], [1, "error-container"], [3, "entity", "mode", "isVisible"], ["type", "converging-spinner", "size", "large"], [1, "fa-solid", "fa-exclamation-triangle"], [3, "runOpened", "entity", "mode", "isVisible"]], template: function TestHarnessCustomWindowComponent_Template(rf, ctx) { if (rf & 1) {
395
+ const _r1 = i0.ɵɵgetCurrentView();
396
+ i0.ɵɵelementStart(0, "kendo-window", 1, 0);
397
+ i0.ɵɵlistener("close", function TestHarnessCustomWindowComponent_Template_kendo_window_close_0_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onClose()); })("stateChange", function TestHarnessCustomWindowComponent_Template_kendo_window_stateChange_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onStateChange($event)); })("resize", function TestHarnessCustomWindowComponent_Template_kendo_window_resize_0_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onWindowResize()); });
398
+ i0.ɵɵelementStart(2, "kendo-window-titlebar")(3, "div", 2);
399
+ i0.ɵɵtemplate(4, TestHarnessCustomWindowComponent_Conditional_4_Template, 1, 1, "img", 3)(5, TestHarnessCustomWindowComponent_Conditional_5_Template, 1, 0, "i", 4)(6, TestHarnessCustomWindowComponent_Conditional_6_Template, 1, 0, "i", 5);
400
+ i0.ɵɵelementStart(7, "span");
401
+ i0.ɵɵtext(8);
402
+ i0.ɵɵelementEnd()();
403
+ i0.ɵɵelementStart(9, "div", 6)(10, "button", 7);
404
+ i0.ɵɵlistener("click", function TestHarnessCustomWindowComponent_Template_button_click_10_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.minimize()); });
405
+ i0.ɵɵelement(11, "i", 8);
406
+ i0.ɵɵelementEnd();
407
+ i0.ɵɵelementStart(12, "button", 9);
408
+ i0.ɵɵlistener("click", function TestHarnessCustomWindowComponent_Template_button_click_12_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.toggleMaximize()); });
409
+ i0.ɵɵelement(13, "i", 10);
410
+ i0.ɵɵelementEnd();
411
+ i0.ɵɵelementStart(14, "button", 11);
412
+ i0.ɵɵlistener("click", function TestHarnessCustomWindowComponent_Template_button_click_14_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.closeButtonClick()); });
413
+ i0.ɵɵelement(15, "i", 12);
414
+ i0.ɵɵelementEnd()()();
415
+ i0.ɵɵelementStart(16, "div", 13);
416
+ i0.ɵɵtemplate(17, TestHarnessCustomWindowComponent_Conditional_17_Template, 4, 1, "div", 14)(18, TestHarnessCustomWindowComponent_Conditional_18_Template, 4, 1, "div", 15)(19, TestHarnessCustomWindowComponent_Conditional_19_Template, 1, 3, "mj-ai-test-harness", 16);
417
+ i0.ɵɵelementEnd()();
418
+ } if (rf & 2) {
419
+ i0.ɵɵclassProp("minimized-window", ctx.isMinimized);
420
+ i0.ɵɵproperty("title", ctx.windowTitle)("width", ctx.width)("height", ctx.height)("top", ctx.windowTop)("left", ctx.windowLeft)("minWidth", ctx.isMinimized ? 400 : 800)("minHeight", ctx.isMinimized ? 60 : 600)("draggable", true)("resizable", !ctx.isMinimized)("state", ctx.windowState);
421
+ i0.ɵɵadvance(4);
422
+ i0.ɵɵconditional(ctx.mode === "agent" && (ctx.agent == null ? null : ctx.agent.LogoURL) ? 4 : ctx.mode === "agent" ? 5 : 6);
423
+ i0.ɵɵadvance(4);
424
+ i0.ɵɵtextInterpolate(ctx.windowTitle);
425
+ i0.ɵɵadvance(4);
426
+ i0.ɵɵproperty("title", ctx.isMaximized ? "Restore" : "Maximize");
427
+ i0.ɵɵadvance();
428
+ i0.ɵɵclassProp("fa-window-maximize", !ctx.isMaximized)("fa-window-restore", ctx.isMaximized);
429
+ i0.ɵɵadvance(4);
430
+ i0.ɵɵconditional(ctx.loading ? 17 : ctx.error ? 18 : 19);
431
+ } }, dependencies: [i1.WindowComponent, i1.WindowTitleBarComponent, i2.LoaderComponent, i3.AITestHarnessComponent], styles: ["[_nghost-%COMP%] {\n display: contents;\n }\n \n \n\n\n\n\n \n .minimized-window {\n .k-window-content {\n display: none !important;\n }\n \n .k-window-titlebar {\n border-radius: 4px !important;\n }\n }\n \n .window-title[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n flex: 1;\n \n .title-icon {\n color: #666;\n font-size: 16px;\n }\n \n .title-logo {\n width: 20px;\n height: 20px;\n object-fit: contain;\n }\n }\n \n .window-actions[_ngcontent-%COMP%] {\n display: flex;\n gap: 4px;\n align-items: center;\n }\n \n .window-action-btn[_ngcontent-%COMP%] {\n background: transparent;\n border: none;\n padding: 8px;\n cursor: pointer;\n border-radius: 4px;\n transition: background-color 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n \n &:hover {\n background-color: rgba(0, 0, 0, 0.08);\n }\n \n i {\n font-size: 14px;\n color: #666;\n }\n }\n \n .window-content[_ngcontent-%COMP%] {\n height: 100%;\n display: flex;\n flex-direction: column;\n }\n \n .loading-container[_ngcontent-%COMP%], \n .error-container[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n height: 100%;\n gap: 1rem;\n }\n \n .error-container[_ngcontent-%COMP%] {\n color: #dc3545;\n \n i {\n font-size: 3rem;\n }\n }\n \n mj-ai-test-harness[_ngcontent-%COMP%] {\n flex: 1;\n overflow: hidden;\n }\n \n \n\n .k-window-content {\n display: flex;\n flex-direction: column;\n }"] }); }
432
+ }
433
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TestHarnessCustomWindowComponent, [{
434
+ type: Component,
435
+ args: [{ selector: 'mj-test-harness-custom-window', template: `
436
+ <kendo-window
437
+ #kendoWindow
438
+ [title]="windowTitle"
439
+ [width]="width"
440
+ [height]="height"
441
+ [top]="windowTop"
442
+ [left]="windowLeft"
443
+ [minWidth]="isMinimized ? 400 : 800"
444
+ [minHeight]="isMinimized ? 60 : 600"
445
+ [draggable]="true"
446
+ [resizable]="!isMinimized"
447
+ [state]="windowState"
448
+ [class.minimized-window]="isMinimized"
449
+ (close)="onClose()"
450
+ (stateChange)="onStateChange($event)"
451
+ (resize)="onWindowResize()">
452
+
453
+ <kendo-window-titlebar>
454
+ <div class="window-title">
455
+ @if (mode === 'agent' && agent?.LogoURL) {
456
+ <img [src]="agent?.LogoURL" class="title-logo" alt="Agent logo" />
457
+ } @else if (mode === 'agent') {
458
+ <i class="fa-solid fa-robot title-icon"></i>
459
+ } @else {
460
+ <i class="fa-solid fa-comment-dots title-icon"></i>
461
+ }
462
+ <span>{{ windowTitle }}</span>
463
+ </div>
464
+ <div class="window-actions">
465
+ <button
466
+ (click)="minimize()"
467
+ title="Minimize"
468
+ class="window-action-btn">
469
+ <i class="fa-solid fa-window-minimize"></i>
470
+ </button>
471
+ <button
472
+ (click)="toggleMaximize()"
473
+ [title]="isMaximized ? 'Restore' : 'Maximize'"
474
+ class="window-action-btn">
475
+ <i class="fa-solid" [class.fa-window-maximize]="!isMaximized" [class.fa-window-restore]="isMaximized"></i>
476
+ </button>
477
+ <button
478
+ (click)="closeButtonClick()"
479
+ title="Close"
480
+ class="window-action-btn">
481
+ <i class="fa-solid fa-xmark"></i>
482
+ </button>
483
+ </div>
484
+ </kendo-window-titlebar>
485
+
486
+ <div class="window-content">
487
+ @if (loading) {
488
+ <div class="loading-container">
489
+ <kendo-loader type="converging-spinner" size="large"></kendo-loader>
490
+ <p>Loading {{mode === 'agent' ? 'AI Agent' : 'AI Prompt'}}...</p>
491
+ </div>
492
+ }
493
+ @else if (error) {
494
+ <div class="error-container">
495
+ <i class="fa-solid fa-exclamation-triangle"></i>
496
+ <p>{{ error }}</p>
497
+ </div>
498
+ }
499
+ @else {
500
+ <mj-ai-test-harness
501
+ [entity]="(agent || prompt) || null"
502
+ [mode]="mode"
503
+ [isVisible]="true"
504
+ (runOpened)="onRunOpened($event)">
505
+ </mj-ai-test-harness>
506
+ }
507
+ </div>
508
+ </kendo-window>
509
+ `, styles: ["\n :host {\n display: contents;\n }\n \n /* Remove animation for snappy performance\n ::ng-deep .window-transition {\n transition: all 0.6s ease-in-out !important;\n } */\n \n ::ng-deep .minimized-window {\n .k-window-content {\n display: none !important;\n }\n \n .k-window-titlebar {\n border-radius: 4px !important;\n }\n }\n \n .window-title {\n display: flex;\n align-items: center;\n gap: 8px;\n flex: 1;\n \n .title-icon {\n color: #666;\n font-size: 16px;\n }\n \n .title-logo {\n width: 20px;\n height: 20px;\n object-fit: contain;\n }\n }\n \n .window-actions {\n display: flex;\n gap: 4px;\n align-items: center;\n }\n \n .window-action-btn {\n background: transparent;\n border: none;\n padding: 8px;\n cursor: pointer;\n border-radius: 4px;\n transition: background-color 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n \n &:hover {\n background-color: rgba(0, 0, 0, 0.08);\n }\n \n i {\n font-size: 14px;\n color: #666;\n }\n }\n \n .window-content {\n height: 100%;\n display: flex;\n flex-direction: column;\n }\n \n .loading-container,\n .error-container {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n height: 100%;\n gap: 1rem;\n }\n \n .error-container {\n color: #dc3545;\n \n i {\n font-size: 3rem;\n }\n }\n \n mj-ai-test-harness {\n flex: 1;\n overflow: hidden;\n }\n \n /* Ensure Kendo Window content wrapper maintains proper height */\n ::ng-deep .k-window-content {\n display: flex;\n flex-direction: column;\n }\n "] }]
510
+ }], () => [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }], { kendoWindow: [{
511
+ type: ViewChild,
512
+ args: ['kendoWindow', { static: false }]
513
+ }], testHarness: [{
514
+ type: ViewChild,
515
+ args: [AITestHarnessComponent, { static: false }]
516
+ }], data: [{
517
+ type: Input
518
+ }], closeWindow: [{
519
+ type: Output
520
+ }], minimizeWindow: [{
521
+ type: Output
522
+ }], restoreWindow: [{
523
+ type: Output
524
+ }], executionStateChange: [{
525
+ type: Output
526
+ }] }); })();
527
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(TestHarnessCustomWindowComponent, { className: "TestHarnessCustomWindowComponent", filePath: "lib/test-harness-custom-window.component.ts", lineNumber: 200 }); })();
528
+ //# sourceMappingURL=test-harness-custom-window.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-harness-custom-window.component.js","sourceRoot":"","sources":["../../src/lib/test-harness-custom-window.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAU,SAAS,EAAsE,MAAM,eAAe,CAAC;AAG9J,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;;;;;;;IAwC7C,yBAAkE;;;IAA7D,0FAAsB;;;IAE3B,uBAA4C;;;IAE5C,uBAAmD;;;IA4BvD,+BAA+B;IAC3B,mCAAoE;IACpE,yBAAG;IAAA,YAA0D;IACjE,AADiE,iBAAI,EAC/D;;;IADC,eAA0D;IAA1D,4FAA0D;;;IAIjE,+BAA6B;IACzB,wBAAgD;IAChD,yBAAG;IAAA,YAAW;IAClB,AADkB,iBAAI,EAChB;;;IADC,eAAW;IAAX,kCAAW;;;;IAIlB,8CAIsC;IAAlC,+NAAa,0BAAmB,KAAC;IACrC,iBAAqB;;;IAFjB,AADA,AADA,8DAAoC,qBACvB,mBACK;;AA4G1C,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BACN,sBACE,sBACA,wBACE,yCACiB,yCACA,mBAClB,+BACQ,0BACL;YAQb,eAMC;YAND,2HAMC;YACK,eAAiB;YAAjB,qCAAiB;YAWnB,eAA8C;YAA9C,gEAA8C;YAE1B,cAAyC;YAAC,AAA1C,sDAAyC,sCAAwC;YAY7G,eAmBC;YAnBD,wDAmBC;;;iFAyGJ,gCAAgC;cAlL5C,SAAS;2BACI,+BAA+B,YAC/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA0ET;mGAuG4C,WAAW;kBAAvD,SAAS;mBAAC,aAAa,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;YACW,WAAW;kBAAhE,SAAS;mBAAC,sBAAsB,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;YAC3C,IAAI;kBAAZ,KAAK;YACI,WAAW;kBAApB,MAAM;YACG,cAAc;kBAAvB,MAAM;YACG,aAAa;kBAAtB,MAAM;YACG,oBAAoB;kBAA7B,MAAM;;kFAPE,gCAAgC"}
@@ -0,0 +1,59 @@
1
+ import { ApplicationRef, Injector, ViewContainerRef } from '@angular/core';
2
+ import { AIAgentEntity, AIPromptEntity } from '@memberjunction/core-entities';
3
+ import { Observable } from 'rxjs';
4
+ import { TestResult } from './test-harness-window.service';
5
+ import { WindowDockService } from './window-dock.service';
6
+ import * as i0 from "@angular/core";
7
+ /**
8
+ * Service for managing test harness windows for AI Agents and AI Prompts.
9
+ * Creates Kendo Window components with custom titlebar including minimize button.
10
+ */
11
+ export declare class TestHarnessWindowManagerService {
12
+ private appRef;
13
+ private injector;
14
+ private dockService;
15
+ private openWindows;
16
+ private windowCounter;
17
+ constructor(appRef: ApplicationRef, injector: Injector, dockService: WindowDockService);
18
+ /**
19
+ * Opens the AI Agent Test Harness in a window
20
+ */
21
+ openAgentTestHarness(options: {
22
+ agentId?: string;
23
+ agent?: AIAgentEntity;
24
+ title?: string;
25
+ width?: string | number;
26
+ height?: string | number;
27
+ initialDataContext?: Record<string, any>;
28
+ initialTemplateData?: Record<string, any>;
29
+ viewContainerRef?: ViewContainerRef;
30
+ }): Observable<TestResult>;
31
+ /**
32
+ * Opens the AI Prompt Test Harness in a window
33
+ */
34
+ openPromptTestHarness(options: {
35
+ promptId?: string;
36
+ prompt?: AIPromptEntity;
37
+ title?: string;
38
+ width?: string | number;
39
+ height?: string | number;
40
+ initialTemplateVariables?: Record<string, any>;
41
+ selectedModelId?: string;
42
+ viewContainerRef?: ViewContainerRef;
43
+ }): Observable<TestResult>;
44
+ /**
45
+ * Creates a test harness window
46
+ */
47
+ private createWindow;
48
+ /**
49
+ * Closes a specific window
50
+ */
51
+ private closeWindow;
52
+ /**
53
+ * Closes all open windows
54
+ */
55
+ closeAllWindows(): void;
56
+ static ɵfac: i0.ɵɵFactoryDeclaration<TestHarnessWindowManagerService, never>;
57
+ static ɵprov: i0.ɵɵInjectableDeclaration<TestHarnessWindowManagerService>;
58
+ }
59
+ //# sourceMappingURL=test-harness-window-manager.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-harness-window-manager.service.d.ts","sourceRoot":"","sources":["../../src/lib/test-harness-window-manager.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,cAAc,EAAE,QAAQ,EAAmB,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtH,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE9E,OAAO,EAAE,UAAU,EAAW,MAAM,MAAM,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;;AAO1D;;;GAGG;AACH,qBAGa,+BAA+B;IAKpC,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,WAAW;IANvB,OAAO,CAAC,WAAW,CAAiC;IACpD,OAAO,CAAC,aAAa,CAAK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