@memberjunction/ng-ai-test-harness
Version:
MemberJunction AI Test Harness - A reusable component for testing AI agents and prompts with beautiful UX
46 lines • 2.04 kB
JavaScript
import { Injectable } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "./test-harness-window-manager.service";
/**
* Service for opening AI test harness windows for agents and prompts.
* This service wraps the TestHarnessWindowManagerService to provide a simpler API
* that matches the expected interface in consuming components.
*/
export class AITestHarnessDialogService {
constructor(testHarnessService) {
this.testHarnessService = testHarnessService;
}
/**
* Opens the test harness window for an AI Agent
*/
openForAgent(agentId, viewContainerRef) {
return this.testHarnessService.openAgentTestHarness({
agentId: agentId,
// Don't pass title - let the window component generate it with the agent name
width: '80vw',
height: '80vh',
viewContainerRef: viewContainerRef
});
}
/**
* Opens the test harness window for an AI Prompt
*/
openForPrompt(promptId, viewContainerRef) {
return this.testHarnessService.openPromptTestHarness({
promptId: promptId,
// Don't pass title - let the window component generate it with the prompt name
width: '80vw',
height: '80vh',
viewContainerRef: viewContainerRef
});
}
static { this.ɵfac = function AITestHarnessDialogService_Factory(t) { return new (t || AITestHarnessDialogService)(i0.ɵɵinject(i1.TestHarnessWindowManagerService)); }; }
static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: AITestHarnessDialogService, factory: AITestHarnessDialogService.ɵfac, providedIn: 'root' }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AITestHarnessDialogService, [{
type: Injectable,
args: [{
providedIn: 'root'
}]
}], () => [{ type: i1.TestHarnessWindowManagerService }], null); })();
//# sourceMappingURL=ai-test-harness-dialog.service.js.map