@memberjunction/ng-conversations 6.3.0-edge.0 → 6.3.0-edge.2
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 +60 -22
- package/dist/assets/edge-ai.worker.js +35168 -0
- package/dist/lib/components/agent/agent-instance-editor-modal.component.d.ts +186 -0
- package/dist/lib/components/agent/agent-instance-editor-modal.component.d.ts.map +1 -0
- package/dist/lib/components/agent/agent-instance-editor-modal.component.js +2202 -0
- package/dist/lib/components/agent/agent-instance-editor-modal.component.js.map +1 -0
- package/dist/lib/components/artifact/artifact-share-modal.component.d.ts +39 -6
- package/dist/lib/components/artifact/artifact-share-modal.component.d.ts.map +1 -1
- package/dist/lib/components/artifact/artifact-share-modal.component.js +773 -204
- package/dist/lib/components/artifact/artifact-share-modal.component.js.map +1 -1
- package/dist/lib/components/collection/collection-tree.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collection-tree.component.js +19 -18
- package/dist/lib/components/collection/collection-tree.component.js.map +1 -1
- package/dist/lib/components/collection/collection-view.component.d.ts +6 -4
- package/dist/lib/components/collection/collection-view.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collection-view.component.js +35 -17
- package/dist/lib/components/collection/collection-view.component.js.map +1 -1
- package/dist/lib/components/collection/collections-full-view.component.d.ts +1 -0
- package/dist/lib/components/collection/collections-full-view.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collections-full-view.component.js +108 -106
- package/dist/lib/components/collection/collections-full-view.component.js.map +1 -1
- package/dist/lib/components/composer/ai-composer.component.d.ts +15 -1
- package/dist/lib/components/composer/ai-composer.component.d.ts.map +1 -1
- package/dist/lib/components/composer/ai-composer.component.js +43 -4
- package/dist/lib/components/composer/ai-composer.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-agent-picker.component.d.ts +20 -2
- package/dist/lib/components/conversation/conversation-agent-picker.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-agent-picker.component.js +378 -62
- package/dist/lib/components/conversation/conversation-agent-picker.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts +94 -18
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.js +732 -439
- package/dist/lib/components/conversation/conversation-chat-area.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-list.component.d.ts +19 -1
- package/dist/lib/components/conversation/conversation-list.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-list.component.js +184 -89
- package/dist/lib/components/conversation/conversation-list.component.js.map +1 -1
- package/dist/lib/components/export/export-modal.component.d.ts +7 -2
- package/dist/lib/components/export/export-modal.component.d.ts.map +1 -1
- package/dist/lib/components/export/export-modal.component.js +13 -2
- package/dist/lib/components/export/export-modal.component.js.map +1 -1
- package/dist/lib/components/library/library-create-dialog.component.d.ts +136 -0
- package/dist/lib/components/library/library-create-dialog.component.d.ts.map +1 -0
- package/dist/lib/components/library/library-create-dialog.component.js +1620 -0
- package/dist/lib/components/library/library-create-dialog.component.js.map +1 -0
- package/dist/lib/components/library/library-full-view.component.d.ts +10 -4
- package/dist/lib/components/library/library-full-view.component.d.ts.map +1 -1
- package/dist/lib/components/library/library-full-view.component.js +216 -40
- package/dist/lib/components/library/library-full-view.component.js.map +1 -1
- package/dist/lib/components/library/library-remote-drive-pane.component.d.ts +97 -0
- package/dist/lib/components/library/library-remote-drive-pane.component.d.ts.map +1 -0
- package/dist/lib/components/library/library-remote-drive-pane.component.js +1229 -0
- package/dist/lib/components/library/library-remote-drive-pane.component.js.map +1 -0
- package/dist/lib/components/library/library-workspace.component.d.ts +293 -0
- package/dist/lib/components/library/library-workspace.component.d.ts.map +1 -0
- package/dist/lib/components/library/library-workspace.component.js +5121 -0
- package/dist/lib/components/library/library-workspace.component.js.map +1 -0
- package/dist/lib/components/library/library.models.d.ts +192 -0
- package/dist/lib/components/library/library.models.d.ts.map +1 -0
- package/dist/lib/components/library/library.models.js +2 -0
- package/dist/lib/components/library/library.models.js.map +1 -0
- package/dist/lib/components/message/agent-handoff-card.component.js +1 -1
- package/dist/lib/components/message/agent-handoff-card.component.js.map +1 -1
- package/dist/lib/components/message/conversation-message-rating.component.d.ts +5 -0
- package/dist/lib/components/message/conversation-message-rating.component.d.ts.map +1 -1
- package/dist/lib/components/message/conversation-message-rating.component.js +72 -16
- package/dist/lib/components/message/conversation-message-rating.component.js.map +1 -1
- package/dist/lib/components/message/message-input.component.d.ts +33 -14
- package/dist/lib/components/message/message-input.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-input.component.js +142 -75
- package/dist/lib/components/message/message-input.component.js.map +1 -1
- package/dist/lib/components/message/message-item.component.d.ts +51 -4
- package/dist/lib/components/message/message-item.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-item.component.js +640 -399
- package/dist/lib/components/message/message-item.component.js.map +1 -1
- package/dist/lib/components/message/message-list.component.d.ts +15 -1
- package/dist/lib/components/message/message-list.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-list.component.js +75 -3
- package/dist/lib/components/message/message-list.component.js.map +1 -1
- package/dist/lib/components/navigation/conversation-navigation.component.js +9 -9
- package/dist/lib/components/navigation/conversation-navigation.component.js.map +1 -1
- package/dist/lib/components/overlay/chat-overlay.component.d.ts +94 -6
- package/dist/lib/components/overlay/chat-overlay.component.d.ts.map +1 -1
- package/dist/lib/components/overlay/chat-overlay.component.js +249 -59
- package/dist/lib/components/overlay/chat-overlay.component.js.map +1 -1
- package/dist/lib/components/project/project-form-modal.component.d.ts +6 -0
- package/dist/lib/components/project/project-form-modal.component.d.ts.map +1 -1
- package/dist/lib/components/project/project-form-modal.component.js +81 -61
- package/dist/lib/components/project/project-form-modal.component.js.map +1 -1
- package/dist/lib/components/project/project-selector.component.d.ts +5 -0
- package/dist/lib/components/project/project-selector.component.d.ts.map +1 -1
- package/dist/lib/components/project/project-selector.component.js +11 -4
- package/dist/lib/components/project/project-selector.component.js.map +1 -1
- package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-channel.d.ts +55 -0
- package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-channel.d.ts.map +1 -0
- package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-channel.js +974 -0
- package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-channel.js.map +1 -0
- package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-engine.d.ts +66 -0
- package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-engine.d.ts.map +1 -0
- package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-engine.js +253 -0
- package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-engine.js.map +1 -0
- package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-types.d.ts +80 -0
- package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-types.d.ts.map +1 -0
- package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-types.js +49 -0
- package/dist/lib/components/realtime/artifact-workspace/artifact-workspace-types.js.map +1 -0
- package/dist/lib/components/realtime/artifact-workspace/realtime-artifact-workspace-surface.component.d.ts +54 -0
- package/dist/lib/components/realtime/artifact-workspace/realtime-artifact-workspace-surface.component.d.ts.map +1 -0
- package/dist/lib/components/realtime/artifact-workspace/realtime-artifact-workspace-surface.component.js +386 -0
- package/dist/lib/components/realtime/artifact-workspace/realtime-artifact-workspace-surface.component.js.map +1 -0
- package/dist/lib/components/realtime/capture/realtime-capture-channel.d.ts +28 -1
- package/dist/lib/components/realtime/capture/realtime-capture-channel.d.ts.map +1 -1
- package/dist/lib/components/realtime/capture/realtime-capture-channel.js +53 -1
- package/dist/lib/components/realtime/capture/realtime-capture-channel.js.map +1 -1
- package/dist/lib/components/realtime/channels/client-context-channel.d.ts.map +1 -1
- package/dist/lib/components/realtime/channels/client-context-channel.js +23 -7
- package/dist/lib/components/realtime/channels/client-context-channel.js.map +1 -1
- package/dist/lib/components/realtime/interactive-component/interactive-component-channel.d.ts +1 -0
- package/dist/lib/components/realtime/interactive-component/interactive-component-channel.d.ts.map +1 -1
- package/dist/lib/components/realtime/interactive-component/interactive-component-channel.js +15 -2
- package/dist/lib/components/realtime/interactive-component/interactive-component-channel.js.map +1 -1
- package/dist/lib/components/realtime/media/media-channel.d.ts +32 -11
- package/dist/lib/components/realtime/media/media-channel.d.ts.map +1 -1
- package/dist/lib/components/realtime/media/media-channel.js +186 -23
- package/dist/lib/components/realtime/media/media-channel.js.map +1 -1
- package/dist/lib/components/realtime/media/realtime-media-surface.component.d.ts +9 -1
- package/dist/lib/components/realtime/media/realtime-media-surface.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/media/realtime-media-surface.component.js +33 -10
- package/dist/lib/components/realtime/media/realtime-media-surface.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-agent-banner.component.js +3 -3
- package/dist/lib/components/realtime/realtime-agent-banner.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-agent-picker.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-agent-picker.component.js +3 -3
- package/dist/lib/components/realtime/realtime-agent-picker.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-composer.component.js +6 -4
- package/dist/lib/components/realtime/realtime-composer.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-session-overlay.component.d.ts +82 -33
- package/dist/lib/components/realtime/realtime-session-overlay.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-session-overlay.component.js +521 -191
- package/dist/lib/components/realtime/realtime-session-overlay.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-session-state.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-session-state.js +1 -1
- package/dist/lib/components/realtime/realtime-session-state.js.map +1 -1
- package/dist/lib/components/realtime/realtime-session-thread.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-session-thread.component.js +90 -5
- package/dist/lib/components/realtime/realtime-session-thread.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-surface-stage.model.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-surface-stage.model.js +2 -1
- package/dist/lib/components/realtime/realtime-surface-stage.model.js.map +1 -1
- package/dist/lib/components/realtime/realtime-surface-tab-style.d.ts +11 -4
- package/dist/lib/components/realtime/realtime-surface-tab-style.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-surface-tab-style.js +24 -5
- package/dist/lib/components/realtime/realtime-surface-tab-style.js.map +1 -1
- package/dist/lib/components/realtime/realtime-surface-tabs.model.d.ts +7 -9
- package/dist/lib/components/realtime/realtime-surface-tabs.model.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-surface-tabs.model.js +25 -15
- package/dist/lib/components/realtime/realtime-surface-tabs.model.js.map +1 -1
- package/dist/lib/components/realtime/remote-browser/remote-browser-channel.d.ts +30 -1
- package/dist/lib/components/realtime/remote-browser/remote-browser-channel.d.ts.map +1 -1
- package/dist/lib/components/realtime/remote-browser/remote-browser-channel.js +150 -2
- package/dist/lib/components/realtime/remote-browser/remote-browser-channel.js.map +1 -1
- package/dist/lib/components/realtime/remote-browser/remote-browser-surface.component.d.ts +101 -3
- package/dist/lib/components/realtime/remote-browser/remote-browser-surface.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/remote-browser/remote-browser-surface.component.js +503 -55
- package/dist/lib/components/realtime/remote-browser/remote-browser-surface.component.js.map +1 -1
- package/dist/lib/components/realtime/whiteboard/whiteboard-artifact-viewer.component.d.ts +48 -5
- package/dist/lib/components/realtime/whiteboard/whiteboard-artifact-viewer.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/whiteboard/whiteboard-artifact-viewer.component.js +249 -53
- package/dist/lib/components/realtime/whiteboard/whiteboard-artifact-viewer.component.js.map +1 -1
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel.d.ts.map +1 -1
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel.js +1 -1
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel.js.map +1 -1
- package/dist/lib/components/search/search-panel.component.d.ts +10 -0
- package/dist/lib/components/search/search-panel.component.d.ts.map +1 -1
- package/dist/lib/components/search/search-panel.component.js +25 -3
- package/dist/lib/components/search/search-panel.component.js.map +1 -1
- package/dist/lib/components/share/share-modal.component.d.ts.map +1 -1
- package/dist/lib/components/share/share-modal.component.js +181 -127
- package/dist/lib/components/share/share-modal.component.js.map +1 -1
- package/dist/lib/components/sidebar/conversation-sidebar.component.d.ts +14 -1
- package/dist/lib/components/sidebar/conversation-sidebar.component.d.ts.map +1 -1
- package/dist/lib/components/sidebar/conversation-sidebar.component.js +50 -11
- package/dist/lib/components/sidebar/conversation-sidebar.component.js.map +1 -1
- package/dist/lib/components/sidebar/my-agents-section.component.d.ts +78 -0
- package/dist/lib/components/sidebar/my-agents-section.component.d.ts.map +1 -0
- package/dist/lib/components/sidebar/my-agents-section.component.js +450 -0
- package/dist/lib/components/sidebar/my-agents-section.component.js.map +1 -0
- package/dist/lib/components/task/tasks-full-view.component.d.ts +31 -8
- package/dist/lib/components/task/tasks-full-view.component.d.ts.map +1 -1
- package/dist/lib/components/task/tasks-full-view.component.js +701 -497
- package/dist/lib/components/task/tasks-full-view.component.js.map +1 -1
- package/dist/lib/components/workspace/conversation-workspace.component.d.ts.map +1 -1
- package/dist/lib/components/workspace/conversation-workspace.component.js +15 -2
- package/dist/lib/components/workspace/conversation-workspace.component.js.map +1 -1
- package/dist/lib/composer-plugins/base-conversation-mention.provider.d.ts +1 -0
- package/dist/lib/composer-plugins/base-conversation-mention.provider.d.ts.map +1 -1
- package/dist/lib/composer-plugins/base-conversation-mention.provider.js +13 -1
- package/dist/lib/composer-plugins/base-conversation-mention.provider.js.map +1 -1
- package/dist/lib/conversations.module.d.ts +78 -71
- package/dist/lib/conversations.module.d.ts.map +1 -1
- package/dist/lib/conversations.module.js +68 -1
- package/dist/lib/conversations.module.js.map +1 -1
- package/dist/lib/models/agent-turn.model.d.ts +7 -1
- package/dist/lib/models/agent-turn.model.d.ts.map +1 -1
- package/dist/lib/models/agent-turn.model.js.map +1 -1
- package/dist/lib/services/agent-state.service.d.ts.map +1 -1
- package/dist/lib/services/agent-state.service.js +14 -3
- package/dist/lib/services/agent-state.service.js.map +1 -1
- package/dist/lib/services/artifact-permission.service.d.ts.map +1 -1
- package/dist/lib/services/artifact-permission.service.js +14 -3
- package/dist/lib/services/artifact-permission.service.js.map +1 -1
- package/dist/lib/services/artifact-state.service.d.ts.map +1 -1
- package/dist/lib/services/artifact-state.service.js +43 -11
- package/dist/lib/services/artifact-state.service.js.map +1 -1
- package/dist/lib/services/conversation-agent.service.d.ts +31 -21
- package/dist/lib/services/conversation-agent.service.d.ts.map +1 -1
- package/dist/lib/services/conversation-agent.service.js +84 -35
- package/dist/lib/services/conversation-agent.service.js.map +1 -1
- package/dist/lib/services/conversation-tasks-filter.d.ts +59 -2
- package/dist/lib/services/conversation-tasks-filter.d.ts.map +1 -1
- package/dist/lib/services/conversation-tasks-filter.js +222 -18
- package/dist/lib/services/conversation-tasks-filter.js.map +1 -1
- package/dist/lib/services/edge-ai/edge-agent-pre-discovery.service.d.ts +85 -0
- package/dist/lib/services/edge-ai/edge-agent-pre-discovery.service.d.ts.map +1 -0
- package/dist/lib/services/edge-ai/edge-agent-pre-discovery.service.js +257 -0
- package/dist/lib/services/edge-ai/edge-agent-pre-discovery.service.js.map +1 -0
- package/dist/lib/services/edge-ai/edge-ai-protocol.d.ts +85 -0
- package/dist/lib/services/edge-ai/edge-ai-protocol.d.ts.map +1 -0
- package/dist/lib/services/edge-ai/edge-ai-protocol.js +10 -0
- package/dist/lib/services/edge-ai/edge-ai-protocol.js.map +1 -0
- package/dist/lib/services/edge-ai/edge-ai-worker-host.d.ts +90 -0
- package/dist/lib/services/edge-ai/edge-ai-worker-host.d.ts.map +1 -0
- package/dist/lib/services/edge-ai/edge-ai-worker-host.js +386 -0
- package/dist/lib/services/edge-ai/edge-ai-worker-host.js.map +1 -0
- package/dist/lib/services/edge-ai/edge-ai.worker.d.ts +13 -0
- package/dist/lib/services/edge-ai/edge-ai.worker.d.ts.map +1 -0
- package/dist/lib/services/edge-ai/edge-ai.worker.js +201 -0
- package/dist/lib/services/edge-ai/edge-ai.worker.js.map +1 -0
- package/dist/lib/services/export.service.d.ts +64 -0
- package/dist/lib/services/export.service.d.ts.map +1 -1
- package/dist/lib/services/export.service.js +185 -6
- package/dist/lib/services/export.service.js.map +1 -1
- package/dist/lib/services/library-creation.service.d.ts +304 -0
- package/dist/lib/services/library-creation.service.d.ts.map +1 -0
- package/dist/lib/services/library-creation.service.js +1244 -0
- package/dist/lib/services/library-creation.service.js.map +1 -0
- package/dist/lib/services/realtime-pairing.d.ts +3 -3
- package/dist/lib/services/realtime-pairing.js +4 -4
- package/dist/lib/services/realtime-pairing.js.map +1 -1
- package/dist/lib/services/realtime-session-review.service.d.ts +14 -0
- package/dist/lib/services/realtime-session-review.service.d.ts.map +1 -1
- package/dist/lib/services/realtime-session-review.service.js +46 -4
- package/dist/lib/services/realtime-session-review.service.js.map +1 -1
- package/dist/lib/services/realtime-session.service.d.ts.map +1 -1
- package/dist/lib/services/realtime-session.service.js +2 -1
- package/dist/lib/services/realtime-session.service.js.map +1 -1
- package/dist/lib/services/search.service.d.ts +19 -2
- package/dist/lib/services/search.service.d.ts.map +1 -1
- package/dist/lib/services/search.service.js +99 -36
- package/dist/lib/services/search.service.js.map +1 -1
- package/dist/lib/utils/agent-handoff-map.js +1 -1
- package/dist/lib/utils/agent-handoff-map.js.map +1 -1
- package/dist/lib/utils/agent-turn-routing.js +1 -1
- package/dist/lib/utils/agent-turn-routing.js.map +1 -1
- package/dist/lib/utils/decision-routing.d.ts +5 -2
- package/dist/lib/utils/decision-routing.d.ts.map +1 -1
- package/dist/lib/utils/decision-routing.js +9 -4
- package/dist/lib/utils/decision-routing.js.map +1 -1
- package/dist/public-api.d.ts +15 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +17 -1
- package/dist/public-api.js.map +1 -1
- package/package.json +42 -37
|
@@ -0,0 +1,2202 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, HostListener, Input, Output, inject, } from '@angular/core';
|
|
2
|
+
import { CompositeKey, LogError, RunView } from '@memberjunction/core';
|
|
3
|
+
import { AgentUserPolicyEngine, ApplyDefaultAgentUserPolicyValues, ParseAgentInstantiationConfig, } from '@memberjunction/ai-core-plus';
|
|
4
|
+
import { AIEngineBase } from '@memberjunction/ai-engine-base';
|
|
5
|
+
import { GraphQLActionClient } from '@memberjunction/graphql-dataprovider';
|
|
6
|
+
import { MJNotificationService } from '@memberjunction/ng-notifications';
|
|
7
|
+
import { BaseAngularComponent } from '@memberjunction/ng-base-types';
|
|
8
|
+
import { EscapeSQLString, UUIDsEqual } from '@memberjunction/global';
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
10
|
+
import * as i1 from "@angular/forms";
|
|
11
|
+
import * as i2 from "@memberjunction/ng-ui-components";
|
|
12
|
+
import * as i3 from "@memberjunction/ng-shared-generic";
|
|
13
|
+
const _forTrack0 = ($index, $item) => $item.IconClass;
|
|
14
|
+
const _forTrack1 = ($index, $item) => $item.Key;
|
|
15
|
+
const _forTrack2 = ($index, $item) => $item.ID;
|
|
16
|
+
const _forTrack3 = ($index, $item) => $item.Value;
|
|
17
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
18
|
+
i0.ɵɵelementStart(0, "div", 3);
|
|
19
|
+
i0.ɵɵelement(1, "mj-loading", 6);
|
|
20
|
+
i0.ɵɵelementEnd();
|
|
21
|
+
} }
|
|
22
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_3_Conditional_10_Template(rf, ctx) { if (rf & 1) {
|
|
23
|
+
const _r4 = i0.ɵɵgetCurrentView();
|
|
24
|
+
i0.ɵɵelementStart(0, "img", 26);
|
|
25
|
+
i0.ɵɵlistener("error", function AgentInstanceEditorModalComponent_Conditional_0_Conditional_3_Conditional_10_Template_img_error_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.AvatarPreviewError = true); });
|
|
26
|
+
i0.ɵɵelementEnd();
|
|
27
|
+
} if (rf & 2) {
|
|
28
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
29
|
+
i0.ɵɵproperty("src", ctx_r1.PreviewAvatarUrl, i0.ɵɵsanitizeUrl)("alt", ctx_r1.InstanceName || (ctx_r1.EditingAgent == null ? null : ctx_r1.EditingAgent.Name) || "Agent avatar");
|
|
30
|
+
} }
|
|
31
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_3_Conditional_11_Template(rf, ctx) { if (rf & 1) {
|
|
32
|
+
i0.ɵɵelement(0, "i");
|
|
33
|
+
} if (rf & 2) {
|
|
34
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
35
|
+
i0.ɵɵclassMap(ctx_r1.IconClass || "fa-solid fa-wand-magic-sparkles");
|
|
36
|
+
} }
|
|
37
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_3_Conditional_12_Template(rf, ctx) { if (rf & 1) {
|
|
38
|
+
i0.ɵɵelementStart(0, "span", 15);
|
|
39
|
+
i0.ɵɵelement(1, "i", 27);
|
|
40
|
+
i0.ɵɵelementEnd();
|
|
41
|
+
} }
|
|
42
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_3_Conditional_28_Template(rf, ctx) { if (rf & 1) {
|
|
43
|
+
i0.ɵɵelementStart(0, "div", 24);
|
|
44
|
+
i0.ɵɵelement(1, "i", 28);
|
|
45
|
+
i0.ɵɵelementStart(2, "span");
|
|
46
|
+
i0.ɵɵtext(3);
|
|
47
|
+
i0.ɵɵelementEnd()();
|
|
48
|
+
} if (rf & 2) {
|
|
49
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
50
|
+
i0.ɵɵadvance(3);
|
|
51
|
+
i0.ɵɵtextInterpolate(ctx_r1.AvatarErrorMessage);
|
|
52
|
+
} }
|
|
53
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_3_Conditional_29_For_13_Template(rf, ctx) { if (rf & 1) {
|
|
54
|
+
const _r6 = i0.ɵɵgetCurrentView();
|
|
55
|
+
i0.ɵɵelementStart(0, "button", 40);
|
|
56
|
+
i0.ɵɵlistener("click", function AgentInstanceEditorModalComponent_Conditional_0_Conditional_3_Conditional_29_For_13_Template_button_click_0_listener() { const style_r7 = i0.ɵɵrestoreView(_r6).$implicit; const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.SelectAvatarStylePreset(style_r7)); });
|
|
57
|
+
i0.ɵɵtext(1);
|
|
58
|
+
i0.ɵɵelementEnd();
|
|
59
|
+
} if (rf & 2) {
|
|
60
|
+
const style_r7 = ctx.$implicit;
|
|
61
|
+
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
62
|
+
i0.ɵɵclassProp("aie-chip--active", ctx_r1.SelectedAvatarStyle === style_r7);
|
|
63
|
+
i0.ɵɵproperty("disabled", ctx_r1.IsGeneratingAvatar);
|
|
64
|
+
i0.ɵɵadvance();
|
|
65
|
+
i0.ɵɵtextInterpolate1(" ", style_r7, " ");
|
|
66
|
+
} }
|
|
67
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_3_Conditional_29_Conditional_15_Template(rf, ctx) { if (rf & 1) {
|
|
68
|
+
i0.ɵɵelement(0, "i", 27);
|
|
69
|
+
i0.ɵɵtext(1, " Generating... ");
|
|
70
|
+
} }
|
|
71
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_3_Conditional_29_Conditional_16_Template(rf, ctx) { if (rf & 1) {
|
|
72
|
+
i0.ɵɵelement(0, "i", 21);
|
|
73
|
+
i0.ɵɵtext(1, " Generate Avatar ");
|
|
74
|
+
} }
|
|
75
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_3_Conditional_29_Conditional_17_For_11_Template(rf, ctx) { if (rf & 1) {
|
|
76
|
+
const _r9 = i0.ɵɵgetCurrentView();
|
|
77
|
+
i0.ɵɵelementStart(0, "button", 40);
|
|
78
|
+
i0.ɵɵlistener("click", function AgentInstanceEditorModalComponent_Conditional_0_Conditional_3_Conditional_29_Conditional_17_For_11_Template_button_click_0_listener() { const quick_r10 = i0.ɵɵrestoreView(_r9).$implicit; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.ApplyQuickRefinement(quick_r10)); });
|
|
79
|
+
i0.ɵɵtext(1);
|
|
80
|
+
i0.ɵɵelementEnd();
|
|
81
|
+
} if (rf & 2) {
|
|
82
|
+
const quick_r10 = ctx.$implicit;
|
|
83
|
+
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
84
|
+
i0.ɵɵproperty("disabled", ctx_r1.IsGeneratingAvatar);
|
|
85
|
+
i0.ɵɵadvance();
|
|
86
|
+
i0.ɵɵtextInterpolate1(" ", quick_r10, " ");
|
|
87
|
+
} }
|
|
88
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_3_Conditional_29_Conditional_17_Template(rf, ctx) { if (rf & 1) {
|
|
89
|
+
const _r8 = i0.ɵɵgetCurrentView();
|
|
90
|
+
i0.ɵɵelementStart(0, "div", 39)(1, "label", 41);
|
|
91
|
+
i0.ɵɵelement(2, "i", 42);
|
|
92
|
+
i0.ɵɵtext(3, " Refine current avatar ");
|
|
93
|
+
i0.ɵɵelementEnd();
|
|
94
|
+
i0.ɵɵelementStart(4, "div", 43)(5, "textarea", 44);
|
|
95
|
+
i0.ɵɵtwoWayListener("ngModelChange", function AgentInstanceEditorModalComponent_Conditional_0_Conditional_3_Conditional_29_Conditional_17_Template_textarea_ngModelChange_5_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(4); i0.ɵɵtwoWayBindingSet(ctx_r1.AvatarRefinePrompt, $event) || (ctx_r1.AvatarRefinePrompt = $event); return i0.ɵɵresetView($event); });
|
|
96
|
+
i0.ɵɵelementEnd();
|
|
97
|
+
i0.ɵɵelementStart(6, "button", 45);
|
|
98
|
+
i0.ɵɵlistener("click", function AgentInstanceEditorModalComponent_Conditional_0_Conditional_3_Conditional_29_Conditional_17_Template_button_click_6_listener() { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.RefineAvatar()); });
|
|
99
|
+
i0.ɵɵelement(7, "i", 46);
|
|
100
|
+
i0.ɵɵtext(8, " Refine ");
|
|
101
|
+
i0.ɵɵelementEnd()();
|
|
102
|
+
i0.ɵɵelementStart(9, "div", 47);
|
|
103
|
+
i0.ɵɵrepeaterCreate(10, AgentInstanceEditorModalComponent_Conditional_0_Conditional_3_Conditional_29_Conditional_17_For_11_Template, 2, 2, "button", 48, i0.ɵɵrepeaterTrackByIdentity);
|
|
104
|
+
i0.ɵɵelementEnd()();
|
|
105
|
+
} if (rf & 2) {
|
|
106
|
+
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
107
|
+
i0.ɵɵadvance(5);
|
|
108
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.AvatarRefinePrompt);
|
|
109
|
+
i0.ɵɵproperty("disabled", ctx_r1.IsGeneratingAvatar);
|
|
110
|
+
i0.ɵɵadvance();
|
|
111
|
+
i0.ɵɵproperty("disabled", ctx_r1.IsGeneratingAvatar || !ctx_r1.AvatarRefinePrompt.trim());
|
|
112
|
+
i0.ɵɵadvance(4);
|
|
113
|
+
i0.ɵɵrepeater(ctx_r1.AvatarQuickRefinements);
|
|
114
|
+
} }
|
|
115
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_3_Conditional_29_Template(rf, ctx) { if (rf & 1) {
|
|
116
|
+
const _r5 = i0.ɵɵgetCurrentView();
|
|
117
|
+
i0.ɵɵelementStart(0, "div", 25)(1, "div", 29)(2, "label", 30);
|
|
118
|
+
i0.ɵɵtext(3, " Avatar Prompt ");
|
|
119
|
+
i0.ɵɵelementEnd();
|
|
120
|
+
i0.ɵɵelementStart(4, "button", 31);
|
|
121
|
+
i0.ɵɵlistener("click", function AgentInstanceEditorModalComponent_Conditional_0_Conditional_3_Conditional_29_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.RefreshAvatarPromptFromAgent()); });
|
|
122
|
+
i0.ɵɵelement(5, "i", 32);
|
|
123
|
+
i0.ɵɵtext(6, " Rebuild from agent details ");
|
|
124
|
+
i0.ɵɵelementEnd()();
|
|
125
|
+
i0.ɵɵelementStart(7, "textarea", 33);
|
|
126
|
+
i0.ɵɵtwoWayListener("ngModelChange", function AgentInstanceEditorModalComponent_Conditional_0_Conditional_3_Conditional_29_Template_textarea_ngModelChange_7_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(3); i0.ɵɵtwoWayBindingSet(ctx_r1.AvatarPrompt, $event) || (ctx_r1.AvatarPrompt = $event); return i0.ɵɵresetView($event); });
|
|
127
|
+
i0.ɵɵlistener("input", function AgentInstanceEditorModalComponent_Conditional_0_Conditional_3_Conditional_29_Template_textarea_input_7_listener() { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.OnAvatarPromptUserInput()); });
|
|
128
|
+
i0.ɵɵelementEnd();
|
|
129
|
+
i0.ɵɵelementStart(8, "div", 34)(9, "div", 35)(10, "span", 36);
|
|
130
|
+
i0.ɵɵtext(11, "Style:");
|
|
131
|
+
i0.ɵɵelementEnd();
|
|
132
|
+
i0.ɵɵrepeaterCreate(12, AgentInstanceEditorModalComponent_Conditional_0_Conditional_3_Conditional_29_For_13_Template, 2, 4, "button", 37, i0.ɵɵrepeaterTrackByIdentity);
|
|
133
|
+
i0.ɵɵelementEnd();
|
|
134
|
+
i0.ɵɵelementStart(14, "button", 38);
|
|
135
|
+
i0.ɵɵlistener("click", function AgentInstanceEditorModalComponent_Conditional_0_Conditional_3_Conditional_29_Template_button_click_14_listener() { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.GenerateAvatar()); });
|
|
136
|
+
i0.ɵɵconditionalCreate(15, AgentInstanceEditorModalComponent_Conditional_0_Conditional_3_Conditional_29_Conditional_15_Template, 2, 0)(16, AgentInstanceEditorModalComponent_Conditional_0_Conditional_3_Conditional_29_Conditional_16_Template, 2, 0);
|
|
137
|
+
i0.ɵɵelementEnd()();
|
|
138
|
+
i0.ɵɵconditionalCreate(17, AgentInstanceEditorModalComponent_Conditional_0_Conditional_3_Conditional_29_Conditional_17_Template, 12, 3, "div", 39);
|
|
139
|
+
i0.ɵɵelementEnd();
|
|
140
|
+
} if (rf & 2) {
|
|
141
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
142
|
+
i0.ɵɵadvance(4);
|
|
143
|
+
i0.ɵɵproperty("disabled", ctx_r1.IsGeneratingAvatar);
|
|
144
|
+
i0.ɵɵadvance(3);
|
|
145
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.AvatarPrompt);
|
|
146
|
+
i0.ɵɵproperty("disabled", ctx_r1.IsGeneratingAvatar);
|
|
147
|
+
i0.ɵɵadvance(5);
|
|
148
|
+
i0.ɵɵrepeater(ctx_r1.AvatarStylePresets);
|
|
149
|
+
i0.ɵɵadvance(2);
|
|
150
|
+
i0.ɵɵproperty("disabled", ctx_r1.IsGeneratingAvatar);
|
|
151
|
+
i0.ɵɵadvance();
|
|
152
|
+
i0.ɵɵconditional(ctx_r1.IsGeneratingAvatar ? 15 : 16);
|
|
153
|
+
i0.ɵɵadvance(2);
|
|
154
|
+
i0.ɵɵconditional(ctx_r1.HasImageAvatar ? 17 : -1);
|
|
155
|
+
} }
|
|
156
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_3_Conditional_30_For_3_Template(rf, ctx) { if (rf & 1) {
|
|
157
|
+
const _r11 = i0.ɵɵgetCurrentView();
|
|
158
|
+
i0.ɵɵelementStart(0, "button", 51);
|
|
159
|
+
i0.ɵɵlistener("click", function AgentInstanceEditorModalComponent_Conditional_0_Conditional_3_Conditional_30_For_3_Template_button_click_0_listener() { const opt_r12 = i0.ɵɵrestoreView(_r11).$implicit; const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.SelectIcon(opt_r12.IconClass)); });
|
|
160
|
+
i0.ɵɵelement(1, "i");
|
|
161
|
+
i0.ɵɵelementStart(2, "span", 52);
|
|
162
|
+
i0.ɵɵtext(3);
|
|
163
|
+
i0.ɵɵelementEnd()();
|
|
164
|
+
} if (rf & 2) {
|
|
165
|
+
const opt_r12 = ctx.$implicit;
|
|
166
|
+
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
167
|
+
i0.ɵɵclassProp("aie-icon-tile--selected", !ctx_r1.HasImageAvatar && ctx_r1.IconClass === opt_r12.IconClass);
|
|
168
|
+
i0.ɵɵproperty("title", opt_r12.Label);
|
|
169
|
+
i0.ɵɵattribute("aria-label", opt_r12.Label);
|
|
170
|
+
i0.ɵɵadvance();
|
|
171
|
+
i0.ɵɵclassMap(opt_r12.IconClass);
|
|
172
|
+
i0.ɵɵadvance(2);
|
|
173
|
+
i0.ɵɵtextInterpolate(opt_r12.Label);
|
|
174
|
+
} }
|
|
175
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_3_Conditional_30_Template(rf, ctx) { if (rf & 1) {
|
|
176
|
+
i0.ɵɵelementStart(0, "div", 25)(1, "div", 49);
|
|
177
|
+
i0.ɵɵrepeaterCreate(2, AgentInstanceEditorModalComponent_Conditional_0_Conditional_3_Conditional_30_For_3_Template, 4, 7, "button", 50, _forTrack0);
|
|
178
|
+
i0.ɵɵelementEnd()();
|
|
179
|
+
} if (rf & 2) {
|
|
180
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
181
|
+
i0.ɵɵadvance(2);
|
|
182
|
+
i0.ɵɵrepeater(ctx_r1.IconOptions);
|
|
183
|
+
} }
|
|
184
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_3_Conditional_31_Template(rf, ctx) { if (rf & 1) {
|
|
185
|
+
const _r13 = i0.ɵɵgetCurrentView();
|
|
186
|
+
i0.ɵɵelementStart(0, "div", 25)(1, "label", 53);
|
|
187
|
+
i0.ɵɵelement(2, "i", 54);
|
|
188
|
+
i0.ɵɵelementStart(3, "span")(4, "strong");
|
|
189
|
+
i0.ɵɵtext(5, "Upload image");
|
|
190
|
+
i0.ɵɵelementEnd();
|
|
191
|
+
i0.ɵɵelementStart(6, "span", 55);
|
|
192
|
+
i0.ɵɵtext(7, "Auto-cropped & compressed to 128\u00D7128 WebP");
|
|
193
|
+
i0.ɵɵelementEnd()();
|
|
194
|
+
i0.ɵɵelementStart(8, "input", 56);
|
|
195
|
+
i0.ɵɵlistener("change", function AgentInstanceEditorModalComponent_Conditional_0_Conditional_3_Conditional_31_Template_input_change_8_listener($event) { i0.ɵɵrestoreView(_r13); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.OnAvatarFileSelected($event)); });
|
|
196
|
+
i0.ɵɵelementEnd()();
|
|
197
|
+
i0.ɵɵelementStart(9, "div")(10, "label", 57);
|
|
198
|
+
i0.ɵɵtext(11, "Or paste an image URL");
|
|
199
|
+
i0.ɵɵelementEnd();
|
|
200
|
+
i0.ɵɵelementStart(12, "input", 58);
|
|
201
|
+
i0.ɵɵtwoWayListener("ngModelChange", function AgentInstanceEditorModalComponent_Conditional_0_Conditional_3_Conditional_31_Template_input_ngModelChange_12_listener($event) { i0.ɵɵrestoreView(_r13); const ctx_r1 = i0.ɵɵnextContext(3); i0.ɵɵtwoWayBindingSet(ctx_r1.LogoURL, $event) || (ctx_r1.LogoURL = $event); return i0.ɵɵresetView($event); });
|
|
202
|
+
i0.ɵɵlistener("ngModelChange", function AgentInstanceEditorModalComponent_Conditional_0_Conditional_3_Conditional_31_Template_input_ngModelChange_12_listener() { i0.ɵɵrestoreView(_r13); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.OnLogoUrlChanged()); });
|
|
203
|
+
i0.ɵɵelementEnd()()();
|
|
204
|
+
} if (rf & 2) {
|
|
205
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
206
|
+
i0.ɵɵadvance(12);
|
|
207
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.LogoURL);
|
|
208
|
+
} }
|
|
209
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
210
|
+
const _r3 = i0.ɵɵgetCurrentView();
|
|
211
|
+
i0.ɵɵelementStart(0, "div", 4)(1, "div", 7)(2, "button", 8);
|
|
212
|
+
i0.ɵɵlistener("click", function AgentInstanceEditorModalComponent_Conditional_0_Conditional_3_Template_button_click_2_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.CloseAvatarStudio()); });
|
|
213
|
+
i0.ɵɵelement(3, "i", 9);
|
|
214
|
+
i0.ɵɵelementStart(4, "span");
|
|
215
|
+
i0.ɵɵtext(5, "Back to Agent");
|
|
216
|
+
i0.ɵɵelementEnd()();
|
|
217
|
+
i0.ɵɵelementStart(6, "span", 10);
|
|
218
|
+
i0.ɵɵtext(7);
|
|
219
|
+
i0.ɵɵelementEnd()();
|
|
220
|
+
i0.ɵɵelementStart(8, "div", 11)(9, "div", 12);
|
|
221
|
+
i0.ɵɵconditionalCreate(10, AgentInstanceEditorModalComponent_Conditional_0_Conditional_3_Conditional_10_Template, 1, 2, "img", 13)(11, AgentInstanceEditorModalComponent_Conditional_0_Conditional_3_Conditional_11_Template, 1, 2, "i", 14);
|
|
222
|
+
i0.ɵɵconditionalCreate(12, AgentInstanceEditorModalComponent_Conditional_0_Conditional_3_Conditional_12_Template, 2, 0, "span", 15);
|
|
223
|
+
i0.ɵɵelementEnd();
|
|
224
|
+
i0.ɵɵelementStart(13, "div", 16)(14, "div", 17);
|
|
225
|
+
i0.ɵɵtext(15);
|
|
226
|
+
i0.ɵɵelementEnd();
|
|
227
|
+
i0.ɵɵelementStart(16, "div", 18);
|
|
228
|
+
i0.ɵɵtext(17);
|
|
229
|
+
i0.ɵɵelementEnd()()();
|
|
230
|
+
i0.ɵɵelementStart(18, "div", 19)(19, "button", 20);
|
|
231
|
+
i0.ɵɵlistener("click", function AgentInstanceEditorModalComponent_Conditional_0_Conditional_3_Template_button_click_19_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.SetAvatarStudioTab("ai")); });
|
|
232
|
+
i0.ɵɵelement(20, "i", 21);
|
|
233
|
+
i0.ɵɵtext(21, " AI Generate ");
|
|
234
|
+
i0.ɵɵelementEnd();
|
|
235
|
+
i0.ɵɵelementStart(22, "button", 20);
|
|
236
|
+
i0.ɵɵlistener("click", function AgentInstanceEditorModalComponent_Conditional_0_Conditional_3_Template_button_click_22_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.SetAvatarStudioTab("icon")); });
|
|
237
|
+
i0.ɵɵelement(23, "i", 22);
|
|
238
|
+
i0.ɵɵtext(24, " Curated Icons ");
|
|
239
|
+
i0.ɵɵelementEnd();
|
|
240
|
+
i0.ɵɵelementStart(25, "button", 20);
|
|
241
|
+
i0.ɵɵlistener("click", function AgentInstanceEditorModalComponent_Conditional_0_Conditional_3_Template_button_click_25_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.SetAvatarStudioTab("upload")); });
|
|
242
|
+
i0.ɵɵelement(26, "i", 23);
|
|
243
|
+
i0.ɵɵtext(27, " Upload / URL ");
|
|
244
|
+
i0.ɵɵelementEnd()();
|
|
245
|
+
i0.ɵɵconditionalCreate(28, AgentInstanceEditorModalComponent_Conditional_0_Conditional_3_Conditional_28_Template, 4, 1, "div", 24);
|
|
246
|
+
i0.ɵɵconditionalCreate(29, AgentInstanceEditorModalComponent_Conditional_0_Conditional_3_Conditional_29_Template, 18, 6, "div", 25);
|
|
247
|
+
i0.ɵɵconditionalCreate(30, AgentInstanceEditorModalComponent_Conditional_0_Conditional_3_Conditional_30_Template, 4, 0, "div", 25);
|
|
248
|
+
i0.ɵɵconditionalCreate(31, AgentInstanceEditorModalComponent_Conditional_0_Conditional_3_Conditional_31_Template, 13, 1, "div", 25);
|
|
249
|
+
i0.ɵɵelementEnd();
|
|
250
|
+
} if (rf & 2) {
|
|
251
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
252
|
+
i0.ɵɵadvance(2);
|
|
253
|
+
i0.ɵɵproperty("disabled", ctx_r1.IsGeneratingAvatar);
|
|
254
|
+
i0.ɵɵadvance(5);
|
|
255
|
+
i0.ɵɵtextInterpolate(ctx_r1.AvatarStatusLabel);
|
|
256
|
+
i0.ɵɵadvance(2);
|
|
257
|
+
i0.ɵɵclassProp("aie-studio-hero-avatar--busy", ctx_r1.IsGeneratingAvatar);
|
|
258
|
+
i0.ɵɵadvance();
|
|
259
|
+
i0.ɵɵconditional(ctx_r1.PreviewAvatarUrl ? 10 : 11);
|
|
260
|
+
i0.ɵɵadvance(2);
|
|
261
|
+
i0.ɵɵconditional(ctx_r1.IsGeneratingAvatar ? 12 : -1);
|
|
262
|
+
i0.ɵɵadvance(3);
|
|
263
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.InstanceName.trim() || (ctx_r1.EditingAgent == null ? null : ctx_r1.EditingAgent.Name) || (ctx_r1.SelectedBaseAgent == null ? null : ctx_r1.SelectedBaseAgent.Name) || "Your Personal Agent", " ");
|
|
264
|
+
i0.ɵɵadvance(2);
|
|
265
|
+
i0.ɵɵtextInterpolate(ctx_r1.StudioSubjectSubtitle);
|
|
266
|
+
i0.ɵɵadvance(2);
|
|
267
|
+
i0.ɵɵclassProp("aie-studio-tab--active", ctx_r1.AvatarStudioTab === "ai");
|
|
268
|
+
i0.ɵɵattribute("aria-selected", ctx_r1.AvatarStudioTab === "ai");
|
|
269
|
+
i0.ɵɵadvance(3);
|
|
270
|
+
i0.ɵɵclassProp("aie-studio-tab--active", ctx_r1.AvatarStudioTab === "icon");
|
|
271
|
+
i0.ɵɵattribute("aria-selected", ctx_r1.AvatarStudioTab === "icon");
|
|
272
|
+
i0.ɵɵadvance(3);
|
|
273
|
+
i0.ɵɵclassProp("aie-studio-tab--active", ctx_r1.AvatarStudioTab === "upload");
|
|
274
|
+
i0.ɵɵattribute("aria-selected", ctx_r1.AvatarStudioTab === "upload");
|
|
275
|
+
i0.ɵɵadvance(3);
|
|
276
|
+
i0.ɵɵconditional(ctx_r1.AvatarErrorMessage ? 28 : -1);
|
|
277
|
+
i0.ɵɵadvance();
|
|
278
|
+
i0.ɵɵconditional(ctx_r1.AvatarStudioTab === "ai" ? 29 : -1);
|
|
279
|
+
i0.ɵɵadvance();
|
|
280
|
+
i0.ɵɵconditional(ctx_r1.AvatarStudioTab === "icon" ? 30 : -1);
|
|
281
|
+
i0.ɵɵadvance();
|
|
282
|
+
i0.ɵɵconditional(ctx_r1.AvatarStudioTab === "upload" ? 31 : -1);
|
|
283
|
+
} }
|
|
284
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
285
|
+
const _r15 = i0.ɵɵgetCurrentView();
|
|
286
|
+
i0.ɵɵelementStart(0, "img", 26);
|
|
287
|
+
i0.ɵɵlistener("error", function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_2_Template_img_error_0_listener() { i0.ɵɵrestoreView(_r15); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.AvatarPreviewError = true); });
|
|
288
|
+
i0.ɵɵelementEnd();
|
|
289
|
+
} if (rf & 2) {
|
|
290
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
291
|
+
i0.ɵɵproperty("src", ctx_r1.PreviewAvatarUrl, i0.ɵɵsanitizeUrl)("alt", ctx_r1.InstanceName || "Agent avatar");
|
|
292
|
+
} }
|
|
293
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
294
|
+
i0.ɵɵelement(0, "i");
|
|
295
|
+
} if (rf & 2) {
|
|
296
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
297
|
+
i0.ɵɵclassMap(ctx_r1.IconClass || "fa-solid fa-wand-magic-sparkles");
|
|
298
|
+
} }
|
|
299
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_11_Template(rf, ctx) { if (rf & 1) {
|
|
300
|
+
i0.ɵɵelementStart(0, "span", 65);
|
|
301
|
+
i0.ɵɵelement(1, "i", 98);
|
|
302
|
+
i0.ɵɵtext(2, " Primary ");
|
|
303
|
+
i0.ɵɵelementEnd();
|
|
304
|
+
} }
|
|
305
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_13_Template(rf, ctx) { if (rf & 1) {
|
|
306
|
+
const _r16 = i0.ɵɵgetCurrentView();
|
|
307
|
+
i0.ɵɵelementStart(0, "button", 99);
|
|
308
|
+
i0.ɵɵlistener("click", function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_13_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r16); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.ToggleTemplatePicker()); });
|
|
309
|
+
i0.ɵɵelement(1, "i");
|
|
310
|
+
i0.ɵɵelementStart(2, "span", 100);
|
|
311
|
+
i0.ɵɵtext(3, "Based on: ");
|
|
312
|
+
i0.ɵɵelementStart(4, "strong");
|
|
313
|
+
i0.ɵɵtext(5);
|
|
314
|
+
i0.ɵɵelementEnd()();
|
|
315
|
+
i0.ɵɵelementStart(6, "span", 101);
|
|
316
|
+
i0.ɵɵtext(7);
|
|
317
|
+
i0.ɵɵelement(8, "i", 102);
|
|
318
|
+
i0.ɵɵelementEnd()();
|
|
319
|
+
} if (rf & 2) {
|
|
320
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
321
|
+
i0.ɵɵattribute("aria-expanded", ctx_r1.TemplatePickerOpen);
|
|
322
|
+
i0.ɵɵadvance();
|
|
323
|
+
i0.ɵɵclassMap((ctx_r1.SelectedBaseAgent == null ? null : ctx_r1.SelectedBaseAgent.IconClass) || "fa-solid fa-robot");
|
|
324
|
+
i0.ɵɵadvance(4);
|
|
325
|
+
i0.ɵɵtextInterpolate((ctx_r1.SelectedBaseAgent == null ? null : ctx_r1.SelectedBaseAgent.Name) || "Select template");
|
|
326
|
+
i0.ɵɵadvance(2);
|
|
327
|
+
i0.ɵɵtextInterpolate1(" Change (", ctx_r1.InstantiableTemplates.length, ") ");
|
|
328
|
+
i0.ɵɵadvance();
|
|
329
|
+
i0.ɵɵclassProp("fa-chevron-up", ctx_r1.TemplatePickerOpen)("fa-chevron-down", !ctx_r1.TemplatePickerOpen);
|
|
330
|
+
} }
|
|
331
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_14_Template(rf, ctx) { if (rf & 1) {
|
|
332
|
+
i0.ɵɵelementStart(0, "span", 68);
|
|
333
|
+
i0.ɵɵelement(1, "i");
|
|
334
|
+
i0.ɵɵelementStart(2, "span");
|
|
335
|
+
i0.ɵɵtext(3, "Based on: ");
|
|
336
|
+
i0.ɵɵelementStart(4, "strong");
|
|
337
|
+
i0.ɵɵtext(5);
|
|
338
|
+
i0.ɵɵelementEnd()()();
|
|
339
|
+
} if (rf & 2) {
|
|
340
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
341
|
+
i0.ɵɵadvance();
|
|
342
|
+
i0.ɵɵclassMap(ctx_r1.SelectedBaseAgent.IconClass || "fa-solid fa-robot");
|
|
343
|
+
i0.ɵɵadvance(4);
|
|
344
|
+
i0.ɵɵtextInterpolate(ctx_r1.SelectedBaseAgent.Name);
|
|
345
|
+
} }
|
|
346
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_15_Template(rf, ctx) { if (rf & 1) {
|
|
347
|
+
const _r17 = i0.ɵɵgetCurrentView();
|
|
348
|
+
i0.ɵɵelementStart(0, "button", 103);
|
|
349
|
+
i0.ɵɵlistener("click", function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_15_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r17); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.OnChatToOnboardClicked()); });
|
|
350
|
+
i0.ɵɵelement(1, "i", 104);
|
|
351
|
+
i0.ɵɵtext(2, " Chat to Onboard ");
|
|
352
|
+
i0.ɵɵelementEnd();
|
|
353
|
+
} }
|
|
354
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_17_Template(rf, ctx) { if (rf & 1) {
|
|
355
|
+
i0.ɵɵtext(0);
|
|
356
|
+
} if (rf & 2) {
|
|
357
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
358
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.SelectedBaseAgent == null ? null : ctx_r1.SelectedBaseAgent.Description, " ");
|
|
359
|
+
} }
|
|
360
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_18_Template(rf, ctx) { if (rf & 1) {
|
|
361
|
+
i0.ɵɵtext(0);
|
|
362
|
+
} if (rf & 2) {
|
|
363
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
364
|
+
i0.ɵɵtextInterpolate1(" Inherits all tools, skills, and live updates from ", (ctx_r1.SelectedBaseAgent == null ? null : ctx_r1.SelectedBaseAgent.Name) || "its base template", ". ");
|
|
365
|
+
} }
|
|
366
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_19_Conditional_4_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
367
|
+
const _r19 = i0.ɵɵgetCurrentView();
|
|
368
|
+
i0.ɵɵelementStart(0, "button", 112);
|
|
369
|
+
i0.ɵɵlistener("click", function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_19_Conditional_4_For_2_Template_button_click_0_listener() { const cat_r20 = i0.ɵɵrestoreView(_r19).$implicit; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.SetTemplateCategory(cat_r20)); });
|
|
370
|
+
i0.ɵɵtext(1);
|
|
371
|
+
i0.ɵɵelementEnd();
|
|
372
|
+
} if (rf & 2) {
|
|
373
|
+
const cat_r20 = ctx.$implicit;
|
|
374
|
+
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
375
|
+
i0.ɵɵclassProp("aie-chip--active", ctx_r1.SelectedTemplateCategory === cat_r20);
|
|
376
|
+
i0.ɵɵadvance();
|
|
377
|
+
i0.ɵɵtextInterpolate1(" ", cat_r20, " ");
|
|
378
|
+
} }
|
|
379
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_19_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
380
|
+
i0.ɵɵelementStart(0, "div", 108);
|
|
381
|
+
i0.ɵɵrepeaterCreate(1, AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_19_Conditional_4_For_2_Template, 2, 3, "button", 111, i0.ɵɵrepeaterTrackByIdentity);
|
|
382
|
+
i0.ɵɵelementEnd();
|
|
383
|
+
} if (rf & 2) {
|
|
384
|
+
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
385
|
+
i0.ɵɵadvance();
|
|
386
|
+
i0.ɵɵrepeater(ctx_r1.TemplateCategories);
|
|
387
|
+
} }
|
|
388
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_19_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
389
|
+
i0.ɵɵelementStart(0, "div", 110);
|
|
390
|
+
i0.ɵɵtext(1);
|
|
391
|
+
i0.ɵɵelementEnd();
|
|
392
|
+
} if (rf & 2) {
|
|
393
|
+
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
394
|
+
i0.ɵɵadvance();
|
|
395
|
+
i0.ɵɵtextInterpolate1("No templates match \"", ctx_r1.TemplateSearchText, "\".");
|
|
396
|
+
} }
|
|
397
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_19_Conditional_7_For_1_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
398
|
+
i0.ɵɵelementStart(0, "span", 118);
|
|
399
|
+
i0.ɵɵtext(1);
|
|
400
|
+
i0.ɵɵelementEnd();
|
|
401
|
+
} if (rf & 2) {
|
|
402
|
+
const tpl_r22 = i0.ɵɵnextContext().$implicit;
|
|
403
|
+
i0.ɵɵadvance();
|
|
404
|
+
i0.ɵɵtextInterpolate(tpl_r22.Description);
|
|
405
|
+
} }
|
|
406
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_19_Conditional_7_For_1_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
407
|
+
i0.ɵɵelementStart(0, "span", 10);
|
|
408
|
+
i0.ɵɵtext(1, "Recommended");
|
|
409
|
+
i0.ɵɵelementEnd();
|
|
410
|
+
} }
|
|
411
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_19_Conditional_7_For_1_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
412
|
+
i0.ɵɵelementStart(0, "span", 119);
|
|
413
|
+
i0.ɵɵtext(1);
|
|
414
|
+
i0.ɵɵelementEnd();
|
|
415
|
+
} if (rf & 2) {
|
|
416
|
+
const tpl_r22 = i0.ɵɵnextContext().$implicit;
|
|
417
|
+
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
418
|
+
i0.ɵɵadvance();
|
|
419
|
+
i0.ɵɵtextInterpolate(ctx_r1.GetTemplateCategory(tpl_r22));
|
|
420
|
+
} }
|
|
421
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_19_Conditional_7_For_1_Template(rf, ctx) { if (rf & 1) {
|
|
422
|
+
const _r21 = i0.ɵɵgetCurrentView();
|
|
423
|
+
i0.ɵɵelementStart(0, "button", 114);
|
|
424
|
+
i0.ɵɵlistener("click", function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_19_Conditional_7_For_1_Template_button_click_0_listener() { const tpl_r22 = i0.ɵɵrestoreView(_r21).$implicit; const ctx_r1 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r1.SelectTemplate(tpl_r22)); });
|
|
425
|
+
i0.ɵɵelementStart(1, "span", 115);
|
|
426
|
+
i0.ɵɵelement(2, "i");
|
|
427
|
+
i0.ɵɵelementEnd();
|
|
428
|
+
i0.ɵɵelementStart(3, "span", 116)(4, "span", 117);
|
|
429
|
+
i0.ɵɵtext(5);
|
|
430
|
+
i0.ɵɵelementEnd();
|
|
431
|
+
i0.ɵɵconditionalCreate(6, AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_19_Conditional_7_For_1_Conditional_6_Template, 2, 1, "span", 118);
|
|
432
|
+
i0.ɵɵelementEnd();
|
|
433
|
+
i0.ɵɵconditionalCreate(7, AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_19_Conditional_7_For_1_Conditional_7_Template, 2, 0, "span", 10)(8, AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_19_Conditional_7_For_1_Conditional_8_Template, 2, 1, "span", 119);
|
|
434
|
+
i0.ɵɵelementEnd();
|
|
435
|
+
} if (rf & 2) {
|
|
436
|
+
const tpl_r22 = ctx.$implicit;
|
|
437
|
+
const ctx_r1 = i0.ɵɵnextContext(5);
|
|
438
|
+
i0.ɵɵclassProp("aie-tpl-row--selected", tpl_r22.ID === ctx_r1.SelectedBaseAgentId);
|
|
439
|
+
i0.ɵɵattribute("aria-selected", tpl_r22.ID === ctx_r1.SelectedBaseAgentId);
|
|
440
|
+
i0.ɵɵadvance(2);
|
|
441
|
+
i0.ɵɵclassMap(tpl_r22.IconClass || "fa-solid fa-robot");
|
|
442
|
+
i0.ɵɵadvance(3);
|
|
443
|
+
i0.ɵɵtextInterpolate(tpl_r22.Name);
|
|
444
|
+
i0.ɵɵadvance();
|
|
445
|
+
i0.ɵɵconditional(tpl_r22.Description ? 6 : -1);
|
|
446
|
+
i0.ɵɵadvance();
|
|
447
|
+
i0.ɵɵconditional(tpl_r22.InstantiationMode === "Required" ? 7 : 8);
|
|
448
|
+
} }
|
|
449
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_19_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
450
|
+
i0.ɵɵrepeaterCreate(0, AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_19_Conditional_7_For_1_Template, 9, 8, "button", 113, _forTrack2);
|
|
451
|
+
} if (rf & 2) {
|
|
452
|
+
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
453
|
+
i0.ɵɵrepeater(ctx_r1.FilteredTemplates);
|
|
454
|
+
} }
|
|
455
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_19_Template(rf, ctx) { if (rf & 1) {
|
|
456
|
+
const _r18 = i0.ɵɵgetCurrentView();
|
|
457
|
+
i0.ɵɵelementStart(0, "div", 71)(1, "div", 105);
|
|
458
|
+
i0.ɵɵelement(2, "i", 106);
|
|
459
|
+
i0.ɵɵelementStart(3, "input", 107);
|
|
460
|
+
i0.ɵɵtwoWayListener("ngModelChange", function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_19_Template_input_ngModelChange_3_listener($event) { i0.ɵɵrestoreView(_r18); const ctx_r1 = i0.ɵɵnextContext(3); i0.ɵɵtwoWayBindingSet(ctx_r1.TemplateSearchText, $event) || (ctx_r1.TemplateSearchText = $event); return i0.ɵɵresetView($event); });
|
|
461
|
+
i0.ɵɵelementEnd()();
|
|
462
|
+
i0.ɵɵconditionalCreate(4, AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_19_Conditional_4_Template, 3, 0, "div", 108);
|
|
463
|
+
i0.ɵɵelementStart(5, "div", 109);
|
|
464
|
+
i0.ɵɵconditionalCreate(6, AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_19_Conditional_6_Template, 2, 1, "div", 110)(7, AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_19_Conditional_7_Template, 2, 0);
|
|
465
|
+
i0.ɵɵelementEnd()();
|
|
466
|
+
} if (rf & 2) {
|
|
467
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
468
|
+
i0.ɵɵadvance(3);
|
|
469
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.TemplateSearchText);
|
|
470
|
+
i0.ɵɵadvance();
|
|
471
|
+
i0.ɵɵconditional(ctx_r1.TemplateCategories.length > 2 ? 4 : -1);
|
|
472
|
+
i0.ɵɵadvance(2);
|
|
473
|
+
i0.ɵɵconditional(ctx_r1.FilteredTemplates.length === 0 ? 6 : 7);
|
|
474
|
+
} }
|
|
475
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_20_Template(rf, ctx) { if (rf & 1) {
|
|
476
|
+
i0.ɵɵelementStart(0, "mj-alert", 72);
|
|
477
|
+
i0.ɵɵtext(1);
|
|
478
|
+
i0.ɵɵelementEnd();
|
|
479
|
+
} if (rf & 2) {
|
|
480
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
481
|
+
i0.ɵɵadvance();
|
|
482
|
+
i0.ɵɵtextInterpolate(ctx_r1.ErrorMessage);
|
|
483
|
+
} }
|
|
484
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_32_For_4_Template(rf, ctx) { if (rf & 1) {
|
|
485
|
+
const _r23 = i0.ɵɵgetCurrentView();
|
|
486
|
+
i0.ɵɵelementStart(0, "button", 112);
|
|
487
|
+
i0.ɵɵlistener("click", function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_32_For_4_Template_button_click_0_listener() { const idea_r24 = i0.ɵɵrestoreView(_r23).$implicit; const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.ApplySuggestedName(idea_r24)); });
|
|
488
|
+
i0.ɵɵtext(1);
|
|
489
|
+
i0.ɵɵelementEnd();
|
|
490
|
+
} if (rf & 2) {
|
|
491
|
+
const idea_r24 = ctx.$implicit;
|
|
492
|
+
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
493
|
+
i0.ɵɵclassProp("aie-chip--active", ctx_r1.InstanceName.trim().toLowerCase() === idea_r24.toLowerCase());
|
|
494
|
+
i0.ɵɵadvance();
|
|
495
|
+
i0.ɵɵtextInterpolate1(" ", idea_r24, " ");
|
|
496
|
+
} }
|
|
497
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_32_Template(rf, ctx) { if (rf & 1) {
|
|
498
|
+
i0.ɵɵelementStart(0, "div", 47)(1, "span", 36);
|
|
499
|
+
i0.ɵɵtext(2, "Ideas:");
|
|
500
|
+
i0.ɵɵelementEnd();
|
|
501
|
+
i0.ɵɵrepeaterCreate(3, AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_32_For_4_Template, 2, 3, "button", 111, i0.ɵɵrepeaterTrackByIdentity);
|
|
502
|
+
i0.ɵɵelementEnd();
|
|
503
|
+
} if (rf & 2) {
|
|
504
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
505
|
+
i0.ɵɵadvance(3);
|
|
506
|
+
i0.ɵɵrepeater(ctx_r1.SuggestedNames);
|
|
507
|
+
} }
|
|
508
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_37_Template(rf, ctx) { if (rf & 1) {
|
|
509
|
+
i0.ɵɵelementStart(0, "span", 10);
|
|
510
|
+
i0.ɵɵtext(1, "Custom");
|
|
511
|
+
i0.ɵɵelementEnd();
|
|
512
|
+
} }
|
|
513
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_For_40_Template(rf, ctx) { if (rf & 1) {
|
|
514
|
+
const _r25 = i0.ɵɵgetCurrentView();
|
|
515
|
+
i0.ɵɵelementStart(0, "button", 120);
|
|
516
|
+
i0.ɵɵlistener("click", function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_For_40_Template_button_click_0_listener() { const vibe_r26 = i0.ɵɵrestoreView(_r25).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.ApplyVibe(vibe_r26)); });
|
|
517
|
+
i0.ɵɵelementStart(1, "span", 121);
|
|
518
|
+
i0.ɵɵelement(2, "i");
|
|
519
|
+
i0.ɵɵelementStart(3, "span", 122);
|
|
520
|
+
i0.ɵɵtext(4);
|
|
521
|
+
i0.ɵɵelementEnd()();
|
|
522
|
+
i0.ɵɵelementStart(5, "span", 123);
|
|
523
|
+
i0.ɵɵtext(6);
|
|
524
|
+
i0.ɵɵelementEnd()();
|
|
525
|
+
} if (rf & 2) {
|
|
526
|
+
const vibe_r26 = ctx.$implicit;
|
|
527
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
528
|
+
i0.ɵɵclassProp("aie-vibe-card--active", ctx_r1.IsVibeActive(vibe_r26));
|
|
529
|
+
i0.ɵɵattribute("aria-pressed", ctx_r1.IsVibeActive(vibe_r26));
|
|
530
|
+
i0.ɵɵadvance(2);
|
|
531
|
+
i0.ɵɵclassMap(vibe_r26.IconClass);
|
|
532
|
+
i0.ɵɵadvance(2);
|
|
533
|
+
i0.ɵɵtextInterpolate(vibe_r26.Label);
|
|
534
|
+
i0.ɵɵadvance(2);
|
|
535
|
+
i0.ɵɵtextInterpolate(vibe_r26.Subtitle);
|
|
536
|
+
} }
|
|
537
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_51_For_9_Template(rf, ctx) { if (rf & 1) {
|
|
538
|
+
const _r27 = i0.ɵɵgetCurrentView();
|
|
539
|
+
i0.ɵɵelementStart(0, "button", 128);
|
|
540
|
+
i0.ɵɵlistener("click", function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_51_For_9_Template_button_click_0_listener() { const persona_r28 = i0.ɵɵrestoreView(_r27).$implicit; const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.SelectPersona(persona_r28)); });
|
|
541
|
+
i0.ɵɵelement(1, "i", 129);
|
|
542
|
+
i0.ɵɵtext(2);
|
|
543
|
+
i0.ɵɵelementEnd();
|
|
544
|
+
} if (rf & 2) {
|
|
545
|
+
const persona_r28 = ctx.$implicit;
|
|
546
|
+
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
547
|
+
i0.ɵɵclassProp("aie-chip--active", ctx_r1.IsPersonaSelected(persona_r28));
|
|
548
|
+
i0.ɵɵproperty("title", persona_r28.Description || persona_r28.Name);
|
|
549
|
+
i0.ɵɵadvance(2);
|
|
550
|
+
i0.ɵɵtextInterpolate1(" ", persona_r28.Name, " ");
|
|
551
|
+
} }
|
|
552
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_51_Conditional_10_Template(rf, ctx) { if (rf & 1) {
|
|
553
|
+
const _r29 = i0.ɵɵgetCurrentView();
|
|
554
|
+
i0.ɵɵelementStart(0, "button", 130);
|
|
555
|
+
i0.ɵɵlistener("click", function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_51_Conditional_10_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r29); const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.ShowAllPersonas = !ctx_r1.ShowAllPersonas); });
|
|
556
|
+
i0.ɵɵtext(1);
|
|
557
|
+
i0.ɵɵelementEnd();
|
|
558
|
+
} if (rf & 2) {
|
|
559
|
+
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
560
|
+
i0.ɵɵadvance();
|
|
561
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.ShowAllPersonas ? "Show fewer" : "Show all (" + ctx_r1.ActivePersonas.length + ")", " ");
|
|
562
|
+
} }
|
|
563
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_51_Template(rf, ctx) { if (rf & 1) {
|
|
564
|
+
i0.ɵɵelementStart(0, "div", 73)(1, "div", 29)(2, "label", 78);
|
|
565
|
+
i0.ɵɵtext(3, "Voice");
|
|
566
|
+
i0.ɵɵelementEnd();
|
|
567
|
+
i0.ɵɵelementStart(4, "span", 124);
|
|
568
|
+
i0.ɵɵelement(5, "i", 125);
|
|
569
|
+
i0.ɵɵtext(6, " Universal cross-vendor voice ");
|
|
570
|
+
i0.ɵɵelementEnd()();
|
|
571
|
+
i0.ɵɵelementStart(7, "div", 47);
|
|
572
|
+
i0.ɵɵrepeaterCreate(8, AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_51_For_9_Template, 3, 4, "button", 126, _forTrack2);
|
|
573
|
+
i0.ɵɵconditionalCreate(10, AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_51_Conditional_10_Template, 2, 1, "button", 127);
|
|
574
|
+
i0.ɵɵelementEnd()();
|
|
575
|
+
} if (rf & 2) {
|
|
576
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
577
|
+
i0.ɵɵadvance(8);
|
|
578
|
+
i0.ɵɵrepeater(ctx_r1.VisiblePersonas);
|
|
579
|
+
i0.ɵɵadvance(2);
|
|
580
|
+
i0.ɵɵconditional(ctx_r1.ActivePersonas.length > 6 ? 10 : -1);
|
|
581
|
+
} }
|
|
582
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_69_For_5_Template(rf, ctx) { if (rf & 1) {
|
|
583
|
+
const _r30 = i0.ɵɵgetCurrentView();
|
|
584
|
+
i0.ɵɵelementStart(0, "button", 134);
|
|
585
|
+
i0.ɵɵlistener("click", function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_69_For_5_Template_button_click_0_listener() { const opt_r31 = i0.ɵɵrestoreView(_r30).$implicit; const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.SetCoordinationMode(opt_r31.Value)); });
|
|
586
|
+
i0.ɵɵelementStart(1, "span", 135);
|
|
587
|
+
i0.ɵɵtext(2);
|
|
588
|
+
i0.ɵɵelementEnd();
|
|
589
|
+
i0.ɵɵelementStart(3, "span", 136);
|
|
590
|
+
i0.ɵɵtext(4);
|
|
591
|
+
i0.ɵɵelementEnd()();
|
|
592
|
+
} if (rf & 2) {
|
|
593
|
+
const opt_r31 = ctx.$implicit;
|
|
594
|
+
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
595
|
+
i0.ɵɵclassProp("aie-mode-pill--active", ctx_r1.CoordinationMode === opt_r31.Value);
|
|
596
|
+
i0.ɵɵattribute("aria-pressed", ctx_r1.CoordinationMode === opt_r31.Value);
|
|
597
|
+
i0.ɵɵadvance(2);
|
|
598
|
+
i0.ɵɵtextInterpolate(opt_r31.Label);
|
|
599
|
+
i0.ɵɵadvance(2);
|
|
600
|
+
i0.ɵɵtextInterpolate(opt_r31.Hint);
|
|
601
|
+
} }
|
|
602
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_69_Template(rf, ctx) { if (rf & 1) {
|
|
603
|
+
i0.ɵɵelementStart(0, "div", 73)(1, "label", 131);
|
|
604
|
+
i0.ɵɵtext(2, "Coordination Autonomy");
|
|
605
|
+
i0.ɵɵelementEnd();
|
|
606
|
+
i0.ɵɵelementStart(3, "div", 132);
|
|
607
|
+
i0.ɵɵrepeaterCreate(4, AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_69_For_5_Template, 5, 5, "button", 133, _forTrack3);
|
|
608
|
+
i0.ɵɵelementEnd()();
|
|
609
|
+
} if (rf & 2) {
|
|
610
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
611
|
+
i0.ɵɵadvance(4);
|
|
612
|
+
i0.ɵɵrepeater(ctx_r1.CoordinationModeOptions);
|
|
613
|
+
} }
|
|
614
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_70_Template(rf, ctx) { if (rf & 1) {
|
|
615
|
+
const _r32 = i0.ɵɵgetCurrentView();
|
|
616
|
+
i0.ɵɵelementStart(0, "div", 96)(1, "label", 137)(2, "input", 138);
|
|
617
|
+
i0.ɵɵtwoWayListener("ngModelChange", function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_70_Template_input_ngModelChange_2_listener($event) { i0.ɵɵrestoreView(_r32); const ctx_r1 = i0.ɵɵnextContext(3); i0.ɵɵtwoWayBindingSet(ctx_r1.IsPrimaryInstance, $event) || (ctx_r1.IsPrimaryInstance = $event); return i0.ɵɵresetView($event); });
|
|
618
|
+
i0.ɵɵelementEnd();
|
|
619
|
+
i0.ɵɵelementStart(3, "span")(4, "strong");
|
|
620
|
+
i0.ɵɵtext(5);
|
|
621
|
+
i0.ɵɵelementEnd();
|
|
622
|
+
i0.ɵɵelementStart(6, "span", 139);
|
|
623
|
+
i0.ɵɵtext(7, " Receives inbound wakes, colleague requests, and serves as your default switcher choice. ");
|
|
624
|
+
i0.ɵɵelementEnd()()()();
|
|
625
|
+
} if (rf & 2) {
|
|
626
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
627
|
+
i0.ɵɵadvance(2);
|
|
628
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.IsPrimaryInstance);
|
|
629
|
+
i0.ɵɵadvance(3);
|
|
630
|
+
i0.ɵɵtextInterpolate1("Primary ", (ctx_r1.SelectedBaseAgent == null ? null : ctx_r1.SelectedBaseAgent.Name) || "agent", " instance");
|
|
631
|
+
} }
|
|
632
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_71_Template(rf, ctx) { if (rf & 1) {
|
|
633
|
+
const _r33 = i0.ɵɵgetCurrentView();
|
|
634
|
+
i0.ɵɵelementStart(0, "div", 97)(1, "span");
|
|
635
|
+
i0.ɵɵtext(2, "Archive ");
|
|
636
|
+
i0.ɵɵelementStart(3, "strong");
|
|
637
|
+
i0.ɵɵtext(4);
|
|
638
|
+
i0.ɵɵelementEnd();
|
|
639
|
+
i0.ɵɵtext(5, "? Past conversations stay intact, and it will be hidden from your active agents.");
|
|
640
|
+
i0.ɵɵelementEnd();
|
|
641
|
+
i0.ɵɵelementStart(6, "div", 140)(7, "button", 141);
|
|
642
|
+
i0.ɵɵlistener("click", function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_71_Template_button_click_7_listener() { i0.ɵɵrestoreView(_r33); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.ConfirmArchive()); });
|
|
643
|
+
i0.ɵɵtext(8);
|
|
644
|
+
i0.ɵɵelementEnd();
|
|
645
|
+
i0.ɵɵelementStart(9, "button", 45);
|
|
646
|
+
i0.ɵɵlistener("click", function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_71_Template_button_click_9_listener() { i0.ɵɵrestoreView(_r33); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.CancelArchive()); });
|
|
647
|
+
i0.ɵɵtext(10, " Keep ");
|
|
648
|
+
i0.ɵɵelementEnd()()();
|
|
649
|
+
} if (rf & 2) {
|
|
650
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
651
|
+
i0.ɵɵadvance(4);
|
|
652
|
+
i0.ɵɵtextInterpolate(ctx_r1.EditingAgent == null ? null : ctx_r1.EditingAgent.Name);
|
|
653
|
+
i0.ɵɵadvance(3);
|
|
654
|
+
i0.ɵɵproperty("disabled", ctx_r1.IsArchiving);
|
|
655
|
+
i0.ɵɵadvance();
|
|
656
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.IsArchiving ? "Archiving..." : "Confirm Archive", " ");
|
|
657
|
+
i0.ɵɵadvance();
|
|
658
|
+
i0.ɵɵproperty("disabled", ctx_r1.IsArchiving);
|
|
659
|
+
} }
|
|
660
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
661
|
+
const _r14 = i0.ɵɵgetCurrentView();
|
|
662
|
+
i0.ɵɵelementStart(0, "div", 59)(1, "button", 60);
|
|
663
|
+
i0.ɵɵlistener("click", function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r14); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.ToggleAvatarStudio()); });
|
|
664
|
+
i0.ɵɵconditionalCreate(2, AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_2_Template, 1, 2, "img", 13)(3, AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_3_Template, 1, 2, "i", 14);
|
|
665
|
+
i0.ɵɵelementStart(4, "span", 61);
|
|
666
|
+
i0.ɵɵelement(5, "i", 21);
|
|
667
|
+
i0.ɵɵtext(6, " Edit ");
|
|
668
|
+
i0.ɵɵelementEnd()();
|
|
669
|
+
i0.ɵɵelementStart(7, "div", 62)(8, "div", 63)(9, "span", 64);
|
|
670
|
+
i0.ɵɵtext(10, "Base Template");
|
|
671
|
+
i0.ɵɵelementEnd();
|
|
672
|
+
i0.ɵɵconditionalCreate(11, AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_11_Template, 3, 0, "span", 65);
|
|
673
|
+
i0.ɵɵelementEnd();
|
|
674
|
+
i0.ɵɵelementStart(12, "div", 66);
|
|
675
|
+
i0.ɵɵconditionalCreate(13, AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_13_Template, 9, 9, "button", 67)(14, AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_14_Template, 6, 3, "span", 68);
|
|
676
|
+
i0.ɵɵconditionalCreate(15, AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_15_Template, 3, 0, "button", 69);
|
|
677
|
+
i0.ɵɵelementEnd();
|
|
678
|
+
i0.ɵɵelementStart(16, "p", 70);
|
|
679
|
+
i0.ɵɵconditionalCreate(17, AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_17_Template, 1, 1)(18, AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_18_Template, 1, 1);
|
|
680
|
+
i0.ɵɵelementEnd()()();
|
|
681
|
+
i0.ɵɵconditionalCreate(19, AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_19_Template, 8, 3, "div", 71);
|
|
682
|
+
i0.ɵɵconditionalCreate(20, AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_20_Template, 2, 1, "mj-alert", 72);
|
|
683
|
+
i0.ɵɵelementStart(21, "div", 73)(22, "div", 29)(23, "label", 74);
|
|
684
|
+
i0.ɵɵtext(24, " Name ");
|
|
685
|
+
i0.ɵɵelementStart(25, "span", 75);
|
|
686
|
+
i0.ɵɵtext(26, "*");
|
|
687
|
+
i0.ɵɵelementEnd()();
|
|
688
|
+
i0.ɵɵelementStart(27, "span", 76);
|
|
689
|
+
i0.ɵɵtext(28, " Summon with ");
|
|
690
|
+
i0.ɵɵelementStart(29, "code");
|
|
691
|
+
i0.ɵɵtext(30);
|
|
692
|
+
i0.ɵɵelementEnd()()();
|
|
693
|
+
i0.ɵɵelementStart(31, "input", 77);
|
|
694
|
+
i0.ɵɵtwoWayListener("ngModelChange", function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Template_input_ngModelChange_31_listener($event) { i0.ɵɵrestoreView(_r14); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.InstanceName, $event) || (ctx_r1.InstanceName = $event); return i0.ɵɵresetView($event); });
|
|
695
|
+
i0.ɵɵelementEnd();
|
|
696
|
+
i0.ɵɵconditionalCreate(32, AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_32_Template, 5, 0, "div", 47);
|
|
697
|
+
i0.ɵɵelementEnd();
|
|
698
|
+
i0.ɵɵelementStart(33, "div", 73)(34, "div", 29)(35, "span", 78);
|
|
699
|
+
i0.ɵɵtext(36, "Personality Vibe");
|
|
700
|
+
i0.ɵɵelementEnd();
|
|
701
|
+
i0.ɵɵconditionalCreate(37, AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_37_Template, 2, 0, "span", 10);
|
|
702
|
+
i0.ɵɵelementEnd();
|
|
703
|
+
i0.ɵɵelementStart(38, "div", 79);
|
|
704
|
+
i0.ɵɵrepeaterCreate(39, AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_For_40_Template, 7, 7, "button", 80, _forTrack1);
|
|
705
|
+
i0.ɵɵelementEnd()();
|
|
706
|
+
i0.ɵɵelementStart(41, "details", 81);
|
|
707
|
+
i0.ɵɵlistener("toggle", function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Template_details_toggle_41_listener($event) { i0.ɵɵrestoreView(_r14); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.OnAdvancedToggle($event)); });
|
|
708
|
+
i0.ɵɵelementStart(42, "summary", 82)(43, "span", 83);
|
|
709
|
+
i0.ɵɵelement(44, "i", 46);
|
|
710
|
+
i0.ɵɵtext(45, " Customize Voice, Instructions & Guardrails ");
|
|
711
|
+
i0.ɵɵelementEnd();
|
|
712
|
+
i0.ɵɵelementStart(46, "span", 84)(47, "span", 10);
|
|
713
|
+
i0.ɵɵtext(48);
|
|
714
|
+
i0.ɵɵelementEnd();
|
|
715
|
+
i0.ɵɵelement(49, "i", 85);
|
|
716
|
+
i0.ɵɵelementEnd()();
|
|
717
|
+
i0.ɵɵelementStart(50, "div", 86);
|
|
718
|
+
i0.ɵɵconditionalCreate(51, AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_51_Template, 11, 1, "div", 73);
|
|
719
|
+
i0.ɵɵelementStart(52, "div", 87)(53, "div")(54, "label", 88);
|
|
720
|
+
i0.ɵɵtext(55, "Tone");
|
|
721
|
+
i0.ɵɵelementEnd();
|
|
722
|
+
i0.ɵɵelementStart(56, "input", 89);
|
|
723
|
+
i0.ɵɵtwoWayListener("ngModelChange", function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Template_input_ngModelChange_56_listener($event) { i0.ɵɵrestoreView(_r14); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.Tone, $event) || (ctx_r1.Tone = $event); return i0.ɵɵresetView($event); });
|
|
724
|
+
i0.ɵɵelementEnd()();
|
|
725
|
+
i0.ɵɵelementStart(57, "div")(58, "label", 90);
|
|
726
|
+
i0.ɵɵtext(59, "Speaking / Writing Style");
|
|
727
|
+
i0.ɵɵelementEnd();
|
|
728
|
+
i0.ɵɵelementStart(60, "input", 91);
|
|
729
|
+
i0.ɵɵtwoWayListener("ngModelChange", function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Template_input_ngModelChange_60_listener($event) { i0.ɵɵrestoreView(_r14); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.SpeakingStyle, $event) || (ctx_r1.SpeakingStyle = $event); return i0.ɵɵresetView($event); });
|
|
730
|
+
i0.ɵɵelementEnd()()();
|
|
731
|
+
i0.ɵɵelementStart(61, "div", 73)(62, "label", 92);
|
|
732
|
+
i0.ɵɵtext(63, "Role / Focus");
|
|
733
|
+
i0.ɵɵelementEnd();
|
|
734
|
+
i0.ɵɵelementStart(64, "input", 93);
|
|
735
|
+
i0.ɵɵtwoWayListener("ngModelChange", function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Template_input_ngModelChange_64_listener($event) { i0.ɵɵrestoreView(_r14); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.Description, $event) || (ctx_r1.Description = $event); return i0.ɵɵresetView($event); });
|
|
736
|
+
i0.ɵɵelementEnd()();
|
|
737
|
+
i0.ɵɵelementStart(65, "div", 73)(66, "label", 94);
|
|
738
|
+
i0.ɵɵtext(67, "Standing Instructions");
|
|
739
|
+
i0.ɵɵelementEnd();
|
|
740
|
+
i0.ɵɵelementStart(68, "textarea", 95);
|
|
741
|
+
i0.ɵɵtwoWayListener("ngModelChange", function AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Template_textarea_ngModelChange_68_listener($event) { i0.ɵɵrestoreView(_r14); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.AdditionalInstructions, $event) || (ctx_r1.AdditionalInstructions = $event); return i0.ɵɵresetView($event); });
|
|
742
|
+
i0.ɵɵelementEnd()();
|
|
743
|
+
i0.ɵɵconditionalCreate(69, AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_69_Template, 6, 0, "div", 73);
|
|
744
|
+
i0.ɵɵconditionalCreate(70, AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_70_Template, 8, 2, "div", 96);
|
|
745
|
+
i0.ɵɵelementEnd()();
|
|
746
|
+
i0.ɵɵconditionalCreate(71, AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Conditional_71_Template, 11, 4, "div", 97);
|
|
747
|
+
} if (rf & 2) {
|
|
748
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
749
|
+
i0.ɵɵadvance();
|
|
750
|
+
i0.ɵɵclassProp("aie-avatar-trigger--open", ctx_r1.AvatarStudioOpen);
|
|
751
|
+
i0.ɵɵattribute("aria-expanded", ctx_r1.AvatarStudioOpen);
|
|
752
|
+
i0.ɵɵadvance();
|
|
753
|
+
i0.ɵɵconditional(ctx_r1.PreviewAvatarUrl ? 2 : 3);
|
|
754
|
+
i0.ɵɵadvance(9);
|
|
755
|
+
i0.ɵɵconditional(ctx_r1.IsPrimaryInstance && ctx_r1.ShowPrimaryToggle ? 11 : -1);
|
|
756
|
+
i0.ɵɵadvance(2);
|
|
757
|
+
i0.ɵɵconditional(ctx_r1.Mode === "create" && ctx_r1.InstantiableTemplates.length > 1 ? 13 : ctx_r1.SelectedBaseAgent ? 14 : -1);
|
|
758
|
+
i0.ɵɵadvance(2);
|
|
759
|
+
i0.ɵɵconditional(ctx_r1.Mode === "create" && ctx_r1.SelectedBaseAgent ? 15 : -1);
|
|
760
|
+
i0.ɵɵadvance(2);
|
|
761
|
+
i0.ɵɵconditional((ctx_r1.SelectedBaseAgent == null ? null : ctx_r1.SelectedBaseAgent.Description) ? 17 : 18);
|
|
762
|
+
i0.ɵɵadvance(2);
|
|
763
|
+
i0.ɵɵconditional(ctx_r1.Mode === "create" && ctx_r1.TemplatePickerOpen && ctx_r1.InstantiableTemplates.length > 1 ? 19 : -1);
|
|
764
|
+
i0.ɵɵadvance();
|
|
765
|
+
i0.ɵɵconditional(ctx_r1.ErrorMessage ? 20 : -1);
|
|
766
|
+
i0.ɵɵadvance(10);
|
|
767
|
+
i0.ɵɵtextInterpolate1("@", ctx_r1.MentionHandle);
|
|
768
|
+
i0.ɵɵadvance();
|
|
769
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.InstanceName);
|
|
770
|
+
i0.ɵɵadvance();
|
|
771
|
+
i0.ɵɵconditional(ctx_r1.Mode === "create" && ctx_r1.SuggestedNames.length > 0 ? 32 : -1);
|
|
772
|
+
i0.ɵɵadvance(5);
|
|
773
|
+
i0.ɵɵconditional(ctx_r1.IsCustomVibe ? 37 : -1);
|
|
774
|
+
i0.ɵɵadvance(2);
|
|
775
|
+
i0.ɵɵrepeater(ctx_r1.VibeOptions);
|
|
776
|
+
i0.ɵɵadvance(2);
|
|
777
|
+
i0.ɵɵproperty("open", ctx_r1.AdvancedExpanded);
|
|
778
|
+
i0.ɵɵadvance(7);
|
|
779
|
+
i0.ɵɵtextInterpolate(ctx_r1.AdvancedSummaryLabel);
|
|
780
|
+
i0.ɵɵadvance(3);
|
|
781
|
+
i0.ɵɵconditional(ctx_r1.ActivePersonas.length > 0 ? 51 : -1);
|
|
782
|
+
i0.ɵɵadvance(5);
|
|
783
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.Tone);
|
|
784
|
+
i0.ɵɵadvance(4);
|
|
785
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.SpeakingStyle);
|
|
786
|
+
i0.ɵɵadvance(4);
|
|
787
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.Description);
|
|
788
|
+
i0.ɵɵadvance(4);
|
|
789
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.AdditionalInstructions);
|
|
790
|
+
i0.ɵɵadvance();
|
|
791
|
+
i0.ɵɵconditional(ctx_r1.IsChiefOfStaffTemplate ? 69 : -1);
|
|
792
|
+
i0.ɵɵadvance();
|
|
793
|
+
i0.ɵɵconditional(ctx_r1.ShowPrimaryToggle ? 70 : -1);
|
|
794
|
+
i0.ɵɵadvance();
|
|
795
|
+
i0.ɵɵconditional(ctx_r1.Mode === "edit" && ctx_r1.ConfirmArchiveOpen ? 71 : -1);
|
|
796
|
+
} }
|
|
797
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_6_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
798
|
+
const _r35 = i0.ɵɵgetCurrentView();
|
|
799
|
+
i0.ɵɵelementStart(0, "button", 45);
|
|
800
|
+
i0.ɵɵlistener("click", function AgentInstanceEditorModalComponent_Conditional_0_Conditional_6_Conditional_6_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r35); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.UndoAvatar()); });
|
|
801
|
+
i0.ɵɵelement(1, "i", 148);
|
|
802
|
+
i0.ɵɵtext(2);
|
|
803
|
+
i0.ɵɵelementEnd();
|
|
804
|
+
} if (rf & 2) {
|
|
805
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
806
|
+
i0.ɵɵproperty("disabled", ctx_r1.IsGeneratingAvatar);
|
|
807
|
+
i0.ɵɵadvance(2);
|
|
808
|
+
i0.ɵɵtextInterpolate1(" Undo (", ctx_r1.AvatarHistory.length, ") ");
|
|
809
|
+
} }
|
|
810
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_6_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
811
|
+
const _r36 = i0.ɵɵgetCurrentView();
|
|
812
|
+
i0.ɵɵelementStart(0, "button", 149);
|
|
813
|
+
i0.ɵɵlistener("click", function AgentInstanceEditorModalComponent_Conditional_0_Conditional_6_Conditional_7_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r36); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.ClearAvatarImage()); });
|
|
814
|
+
i0.ɵɵelement(1, "i", 22);
|
|
815
|
+
i0.ɵɵtext(2, " Use Icon Instead ");
|
|
816
|
+
i0.ɵɵelementEnd();
|
|
817
|
+
} if (rf & 2) {
|
|
818
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
819
|
+
i0.ɵɵproperty("disabled", ctx_r1.IsGeneratingAvatar);
|
|
820
|
+
} }
|
|
821
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
822
|
+
const _r34 = i0.ɵɵgetCurrentView();
|
|
823
|
+
i0.ɵɵelementStart(0, "div", 5)(1, "div", 142)(2, "button", 143);
|
|
824
|
+
i0.ɵɵlistener("click", function AgentInstanceEditorModalComponent_Conditional_0_Conditional_6_Template_button_click_2_listener() { i0.ɵɵrestoreView(_r34); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.CloseAvatarStudio()); });
|
|
825
|
+
i0.ɵɵelement(3, "i", 144);
|
|
826
|
+
i0.ɵɵtext(4, " Done \u2014 Use This Avatar ");
|
|
827
|
+
i0.ɵɵelementEnd()();
|
|
828
|
+
i0.ɵɵelementStart(5, "div", 145);
|
|
829
|
+
i0.ɵɵconditionalCreate(6, AgentInstanceEditorModalComponent_Conditional_0_Conditional_6_Conditional_6_Template, 3, 2, "button", 146);
|
|
830
|
+
i0.ɵɵconditionalCreate(7, AgentInstanceEditorModalComponent_Conditional_0_Conditional_6_Conditional_7_Template, 3, 1, "button", 147);
|
|
831
|
+
i0.ɵɵelementEnd()();
|
|
832
|
+
} if (rf & 2) {
|
|
833
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
834
|
+
i0.ɵɵadvance(2);
|
|
835
|
+
i0.ɵɵproperty("disabled", ctx_r1.IsGeneratingAvatar);
|
|
836
|
+
i0.ɵɵadvance(4);
|
|
837
|
+
i0.ɵɵconditional(ctx_r1.AvatarHistory.length > 0 ? 6 : -1);
|
|
838
|
+
i0.ɵɵadvance();
|
|
839
|
+
i0.ɵɵconditional(ctx_r1.HasImageAvatar ? 7 : -1);
|
|
840
|
+
} }
|
|
841
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_7_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
842
|
+
const _r38 = i0.ɵɵgetCurrentView();
|
|
843
|
+
i0.ɵɵelementStart(0, "button", 149);
|
|
844
|
+
i0.ɵɵlistener("click", function AgentInstanceEditorModalComponent_Conditional_0_Conditional_7_Conditional_7_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r38); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.RequestArchive()); });
|
|
845
|
+
i0.ɵɵelement(1, "i", 151);
|
|
846
|
+
i0.ɵɵtext(2, " Archive ");
|
|
847
|
+
i0.ɵɵelementEnd();
|
|
848
|
+
} if (rf & 2) {
|
|
849
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
850
|
+
i0.ɵɵproperty("disabled", ctx_r1.IsSaving || ctx_r1.IsArchiving);
|
|
851
|
+
} }
|
|
852
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
853
|
+
const _r37 = i0.ɵɵgetCurrentView();
|
|
854
|
+
i0.ɵɵelementStart(0, "div", 5)(1, "div", 142)(2, "button", 143);
|
|
855
|
+
i0.ɵɵlistener("click", function AgentInstanceEditorModalComponent_Conditional_0_Conditional_7_Template_button_click_2_listener() { i0.ɵɵrestoreView(_r37); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.OnSave()); });
|
|
856
|
+
i0.ɵɵelement(3, "i", 144);
|
|
857
|
+
i0.ɵɵtext(4);
|
|
858
|
+
i0.ɵɵelementEnd();
|
|
859
|
+
i0.ɵɵelementStart(5, "button", 150);
|
|
860
|
+
i0.ɵɵlistener("click", function AgentInstanceEditorModalComponent_Conditional_0_Conditional_7_Template_button_click_5_listener() { i0.ɵɵrestoreView(_r37); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.OnCancel()); });
|
|
861
|
+
i0.ɵɵtext(6, " Cancel ");
|
|
862
|
+
i0.ɵɵelementEnd()();
|
|
863
|
+
i0.ɵɵconditionalCreate(7, AgentInstanceEditorModalComponent_Conditional_0_Conditional_7_Conditional_7_Template, 3, 1, "button", 147);
|
|
864
|
+
i0.ɵɵelementEnd();
|
|
865
|
+
} if (rf & 2) {
|
|
866
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
867
|
+
i0.ɵɵadvance(2);
|
|
868
|
+
i0.ɵɵproperty("disabled", !ctx_r1.CanSave);
|
|
869
|
+
i0.ɵɵadvance(2);
|
|
870
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.SaveButtonLabel, " ");
|
|
871
|
+
i0.ɵɵadvance();
|
|
872
|
+
i0.ɵɵproperty("disabled", ctx_r1.IsSaving || ctx_r1.IsArchiving);
|
|
873
|
+
i0.ɵɵadvance(2);
|
|
874
|
+
i0.ɵɵconditional(ctx_r1.Mode === "edit" && !ctx_r1.ConfirmArchiveOpen ? 7 : -1);
|
|
875
|
+
} }
|
|
876
|
+
function AgentInstanceEditorModalComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
877
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
878
|
+
i0.ɵɵelementStart(0, "mj-dialog", 1);
|
|
879
|
+
i0.ɵɵlistener("Close", function AgentInstanceEditorModalComponent_Conditional_0_Template_mj_dialog_Close_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnCancel()); });
|
|
880
|
+
i0.ɵɵelementStart(1, "div", 2);
|
|
881
|
+
i0.ɵɵconditionalCreate(2, AgentInstanceEditorModalComponent_Conditional_0_Conditional_2_Template, 2, 0, "div", 3)(3, AgentInstanceEditorModalComponent_Conditional_0_Conditional_3_Template, 32, 21, "div", 4)(4, AgentInstanceEditorModalComponent_Conditional_0_Conditional_4_Template, 72, 24);
|
|
882
|
+
i0.ɵɵelementEnd();
|
|
883
|
+
i0.ɵɵelementStart(5, "mj-dialog-actions");
|
|
884
|
+
i0.ɵɵconditionalCreate(6, AgentInstanceEditorModalComponent_Conditional_0_Conditional_6_Template, 8, 3, "div", 5)(7, AgentInstanceEditorModalComponent_Conditional_0_Conditional_7_Template, 8, 4, "div", 5);
|
|
885
|
+
i0.ɵɵelementEnd()();
|
|
886
|
+
} if (rf & 2) {
|
|
887
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
888
|
+
i0.ɵɵproperty("Title", ctx_r1.DialogTitle)("Visible", true)("Width", ctx_r1.DialogWidth)("MinWidth", 320);
|
|
889
|
+
i0.ɵɵadvance(2);
|
|
890
|
+
i0.ɵɵconditional(ctx_r1.IsLoading ? 2 : ctx_r1.AvatarStudioOpen ? 3 : 4);
|
|
891
|
+
i0.ɵɵadvance(4);
|
|
892
|
+
i0.ɵɵconditional(ctx_r1.AvatarStudioOpen ? 6 : 7);
|
|
893
|
+
} }
|
|
894
|
+
const GENERATE_IMAGE_ACTION_NAME = 'Generate Image';
|
|
895
|
+
const GENERATE_IMAGE_FALLBACK_ID = '048FF309-C2CD-44D8-8A8E-8C771ADA8284';
|
|
896
|
+
const AVATAR_CANVAS_SIZE = 128;
|
|
897
|
+
const AVATAR_REFINE_PNG_SIZE = 256;
|
|
898
|
+
const AVATAR_WEBP_QUALITY = 0.85;
|
|
899
|
+
const MAX_AVATAR_HISTORY = 10;
|
|
900
|
+
const DEFAULT_ICON_OPTIONS = [
|
|
901
|
+
{ IconClass: 'fa-solid fa-pepper-hot', Label: 'Pepper' },
|
|
902
|
+
{ IconClass: 'fa-solid fa-bolt', Label: 'Bolt' },
|
|
903
|
+
{ IconClass: 'fa-solid fa-chess-knight', Label: 'Strategist' },
|
|
904
|
+
{ IconClass: 'fa-solid fa-compass', Label: 'Compass' },
|
|
905
|
+
{ IconClass: 'fa-solid fa-brain', Label: 'Brain' },
|
|
906
|
+
{ IconClass: 'fa-solid fa-rocket', Label: 'Rocket' },
|
|
907
|
+
{ IconClass: 'fa-solid fa-wand-magic-sparkles', Label: 'Sparkles' },
|
|
908
|
+
{ IconClass: 'fa-solid fa-shield-halved', Label: 'Shield' },
|
|
909
|
+
{ IconClass: 'fa-solid fa-microscope', Label: 'Research' },
|
|
910
|
+
{ IconClass: 'fa-solid fa-database', Label: 'Data' },
|
|
911
|
+
{ IconClass: 'fa-solid fa-chart-line', Label: 'Analytics' },
|
|
912
|
+
{ IconClass: 'fa-solid fa-feather-pointed', Label: 'Writer' },
|
|
913
|
+
];
|
|
914
|
+
const AVATAR_STYLE_PRESETS = [
|
|
915
|
+
'3D Clay Mascot',
|
|
916
|
+
'Minimal Geometric',
|
|
917
|
+
'Flat Vector Badge',
|
|
918
|
+
'Cyberpunk Bot',
|
|
919
|
+
'Watercolor Portrait',
|
|
920
|
+
];
|
|
921
|
+
const AVATAR_QUICK_REFINEMENTS = [
|
|
922
|
+
'Add sleek glasses',
|
|
923
|
+
'Make background teal',
|
|
924
|
+
'Warm gold accent rim',
|
|
925
|
+
'Cleaner minimalist flat style',
|
|
926
|
+
];
|
|
927
|
+
const DEFAULT_VIBE_OPTIONS = [
|
|
928
|
+
{
|
|
929
|
+
Key: 'witty',
|
|
930
|
+
Label: 'Direct & Witty',
|
|
931
|
+
Subtitle: 'High-signal bullets with dry humor in 1:1 chat',
|
|
932
|
+
IconClass: 'fa-solid fa-bolt',
|
|
933
|
+
Tone: 'Direct, playful, a touch sarcastic and genuinely funny',
|
|
934
|
+
SpeakingStyle: 'High-signal bullets with dry humor in 1:1 chat while keeping external drafts crisp and professional.',
|
|
935
|
+
DefaultPersonaName: 'Coral',
|
|
936
|
+
},
|
|
937
|
+
{
|
|
938
|
+
Key: 'executive',
|
|
939
|
+
Label: 'Crisp Executive',
|
|
940
|
+
Subtitle: 'Zero fluff; bottom-line conclusions first',
|
|
941
|
+
IconClass: 'fa-solid fa-bullseye',
|
|
942
|
+
Tone: 'Direct, analytical, concise, and action-oriented',
|
|
943
|
+
SpeakingStyle: 'Zero fluff; lead with bottom-line conclusions and crisp bullet points.',
|
|
944
|
+
DefaultPersonaName: 'Sage',
|
|
945
|
+
},
|
|
946
|
+
{
|
|
947
|
+
Key: 'socratic',
|
|
948
|
+
Label: 'Socratic Challenger',
|
|
949
|
+
Subtitle: 'Steelmans counter-arguments & stress-tests plans',
|
|
950
|
+
IconClass: 'fa-solid fa-chess-knight',
|
|
951
|
+
Tone: 'Sharp, inquisitive, skeptical, and intellectually rigorous',
|
|
952
|
+
SpeakingStyle: 'Steelman counter-arguments and stress-test assumptions before recommending a path.',
|
|
953
|
+
DefaultPersonaName: 'Onyx',
|
|
954
|
+
},
|
|
955
|
+
{
|
|
956
|
+
Key: 'coach',
|
|
957
|
+
Label: 'Warm Coach',
|
|
958
|
+
Subtitle: 'Encouraging, structured, thoughtful pacing',
|
|
959
|
+
IconClass: 'fa-solid fa-handshake',
|
|
960
|
+
Tone: 'Encouraging, empathetic, and thought-partnering',
|
|
961
|
+
SpeakingStyle: 'Structured, thoughtful pacing; frame trade-offs clearly and keep momentum high.',
|
|
962
|
+
DefaultPersonaName: 'Verse',
|
|
963
|
+
},
|
|
964
|
+
];
|
|
965
|
+
const COORDINATION_MODES = [
|
|
966
|
+
{ Value: 'Observer', Label: 'Observer', Hint: 'Read & brief only' },
|
|
967
|
+
{ Value: 'Coordinator', Label: 'Coordinator', Hint: 'Draft & ask approval' },
|
|
968
|
+
{ Value: 'Autonomous', Label: 'Autonomous', Hint: 'Act within guardrails' },
|
|
969
|
+
];
|
|
970
|
+
/**
|
|
971
|
+
* Progressive-disclosure studio modal for creating and tailoring personal AI Agent instances
|
|
972
|
+
* (`BaseAgentID != null`).
|
|
973
|
+
*
|
|
974
|
+
* Features:
|
|
975
|
+
* - Compact Identity Header with clickable 68x68 avatar trigger, adaptive searchable base template
|
|
976
|
+
* picker (scales cleanly from 2 to 50+ templates), and "Chat to Onboard" handoff.
|
|
977
|
+
* - Inline AI Avatar Studio (`128x128` WebP Base64 stored in `AIAgent.LogoURL`) powered by MJ's
|
|
978
|
+
* `Generate Image` action with iterative image-to-image refinement, undo history, icon grid,
|
|
979
|
+
* local file upload (auto-downscaled), and custom URL input.
|
|
980
|
+
* - 30-second core form (Name + 2x2 Personality Vibe archetypes bundling Tone, SpeakingStyle, and
|
|
981
|
+
* a cross-vendor Voice Persona default) plus a collapsible progressive-disclosure accordion for
|
|
982
|
+
* voice selection, fine-tuned tone/style, role, standing instructions, autonomy, and primary flag.
|
|
983
|
+
*/
|
|
984
|
+
export class AgentInstanceEditorModalComponent extends BaseAngularComponent {
|
|
985
|
+
cdr = inject(ChangeDetectorRef);
|
|
986
|
+
Visible = false;
|
|
987
|
+
VisibleChange = new EventEmitter();
|
|
988
|
+
CurrentUser = null;
|
|
989
|
+
Mode = 'create';
|
|
990
|
+
EditingAgent = null;
|
|
991
|
+
InitialBaseAgentId = null;
|
|
992
|
+
/** Emitted after saving (create or update) with the refreshed derived agent entity. */
|
|
993
|
+
Saved = new EventEmitter();
|
|
994
|
+
/** Emitted when user clicks "Chat to Onboard" with the chosen base template agent. */
|
|
995
|
+
ChatToOnboard = new EventEmitter();
|
|
996
|
+
/** Emitted after archiving an instance with its agent ID. */
|
|
997
|
+
Archived = new EventEmitter();
|
|
998
|
+
/** Emitted when the modal closes without saving. */
|
|
999
|
+
Closed = new EventEmitter();
|
|
1000
|
+
IconOptions = DEFAULT_ICON_OPTIONS;
|
|
1001
|
+
CoordinationModeOptions = COORDINATION_MODES;
|
|
1002
|
+
AvatarStylePresets = AVATAR_STYLE_PRESETS;
|
|
1003
|
+
AvatarQuickRefinements = AVATAR_QUICK_REFINEMENTS;
|
|
1004
|
+
InstantiableTemplates = [];
|
|
1005
|
+
ActivePersonas = [];
|
|
1006
|
+
ShowAllPersonas = false;
|
|
1007
|
+
// Responsive dialog width (clamped to viewport so narrow screens never clip)
|
|
1008
|
+
DialogWidth = 560;
|
|
1009
|
+
// Progressive disclosure & drawers
|
|
1010
|
+
TemplatePickerOpen = false;
|
|
1011
|
+
TemplateSearchText = '';
|
|
1012
|
+
SelectedTemplateCategory = 'All';
|
|
1013
|
+
AdvancedExpanded = false;
|
|
1014
|
+
// Full-dialog overlay AI Avatar Studio state
|
|
1015
|
+
AvatarStudioOpen = false;
|
|
1016
|
+
AvatarStudioTab = 'ai';
|
|
1017
|
+
AvatarPrompt = '';
|
|
1018
|
+
SelectedAvatarStyle = '3D Clay Mascot';
|
|
1019
|
+
AvatarRefinePrompt = '';
|
|
1020
|
+
IsGeneratingAvatar = false;
|
|
1021
|
+
AvatarErrorMessage = null;
|
|
1022
|
+
AvatarHistory = [];
|
|
1023
|
+
avatarPromptEditedByUser = false;
|
|
1024
|
+
lastGeneratedPngSource = null;
|
|
1025
|
+
cachedGenerateImageActionId = null;
|
|
1026
|
+
// Core form state
|
|
1027
|
+
SelectedBaseAgentId = '';
|
|
1028
|
+
InstanceName = '';
|
|
1029
|
+
Description = '';
|
|
1030
|
+
IconClass = 'fa-solid fa-pepper-hot';
|
|
1031
|
+
LogoURL = '';
|
|
1032
|
+
AvatarPreviewError = false;
|
|
1033
|
+
SelectedPersonaId = null;
|
|
1034
|
+
Tone = '';
|
|
1035
|
+
SpeakingStyle = '';
|
|
1036
|
+
AdditionalInstructions = '';
|
|
1037
|
+
IsPrimaryInstance = true;
|
|
1038
|
+
CoordinationMode = null;
|
|
1039
|
+
IsLoading = false;
|
|
1040
|
+
IsSaving = false;
|
|
1041
|
+
IsArchiving = false;
|
|
1042
|
+
ConfirmArchiveOpen = false;
|
|
1043
|
+
ErrorMessage = null;
|
|
1044
|
+
existingSiblingCount = 0;
|
|
1045
|
+
OnWindowResize() {
|
|
1046
|
+
const prev = this.DialogWidth;
|
|
1047
|
+
this.updateDialogWidth();
|
|
1048
|
+
if (this.Visible && this.DialogWidth !== prev) {
|
|
1049
|
+
this.cdr.markForCheck();
|
|
1050
|
+
}
|
|
1051
|
+
}
|
|
1052
|
+
async ngOnChanges(changes) {
|
|
1053
|
+
if ((changes['Visible'] && this.Visible) ||
|
|
1054
|
+
(this.Visible && (changes['EditingAgent'] || changes['InitialBaseAgentId'] || changes['Mode']))) {
|
|
1055
|
+
this.updateDialogWidth();
|
|
1056
|
+
await this.initializeForm();
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
get EffectiveUser() {
|
|
1060
|
+
return this.CurrentUser ?? this.ProviderToUse.CurrentUser ?? null;
|
|
1061
|
+
}
|
|
1062
|
+
get DialogTitle() {
|
|
1063
|
+
if (this.AvatarStudioOpen) {
|
|
1064
|
+
const targetName = this.InstanceName.trim() ||
|
|
1065
|
+
this.EditingAgent?.Name?.trim() ||
|
|
1066
|
+
this.SelectedBaseAgent?.Name?.trim() ||
|
|
1067
|
+
'Agent';
|
|
1068
|
+
return `Avatar Studio — ${targetName}`;
|
|
1069
|
+
}
|
|
1070
|
+
if (this.Mode === 'edit' && this.EditingAgent) {
|
|
1071
|
+
return `Tailor ${this.EditingAgent.Name}`;
|
|
1072
|
+
}
|
|
1073
|
+
const base = this.SelectedBaseAgent;
|
|
1074
|
+
return base ? `Create Personal ${base.Name}` : 'Create Personal Agent';
|
|
1075
|
+
}
|
|
1076
|
+
get StudioSubjectSubtitle() {
|
|
1077
|
+
const parts = [];
|
|
1078
|
+
if (this.SelectedBaseAgent?.Name) {
|
|
1079
|
+
parts.push(this.SelectedBaseAgent.Name);
|
|
1080
|
+
}
|
|
1081
|
+
const activeVibe = this.VibeOptions.find((v) => this.IsVibeActive(v));
|
|
1082
|
+
if (activeVibe) {
|
|
1083
|
+
parts.push(activeVibe.Label);
|
|
1084
|
+
}
|
|
1085
|
+
else if (this.Tone.trim()) {
|
|
1086
|
+
parts.push(this.truncateContextSnippet(this.Tone, 48));
|
|
1087
|
+
}
|
|
1088
|
+
if (this.Description.trim()) {
|
|
1089
|
+
parts.push(this.truncateContextSnippet(this.Description, 64));
|
|
1090
|
+
}
|
|
1091
|
+
return parts.length > 0 ? parts.join(' · ') : 'Personal AI Agent';
|
|
1092
|
+
}
|
|
1093
|
+
get SaveButtonLabel() {
|
|
1094
|
+
if (this.IsSaving) {
|
|
1095
|
+
return 'Saving...';
|
|
1096
|
+
}
|
|
1097
|
+
if (this.Mode === 'edit') {
|
|
1098
|
+
return 'Save Changes';
|
|
1099
|
+
}
|
|
1100
|
+
const trimmed = this.InstanceName.trim();
|
|
1101
|
+
return trimmed ? `Create ${trimmed}` : 'Create Agent';
|
|
1102
|
+
}
|
|
1103
|
+
get MentionHandle() {
|
|
1104
|
+
const cleaned = this.InstanceName.trim().replace(/\s+/g, '');
|
|
1105
|
+
return cleaned || 'Agent';
|
|
1106
|
+
}
|
|
1107
|
+
get SelectedBaseAgent() {
|
|
1108
|
+
if (!this.SelectedBaseAgentId) {
|
|
1109
|
+
return null;
|
|
1110
|
+
}
|
|
1111
|
+
const engine = this.aiEngine;
|
|
1112
|
+
return (this.InstantiableTemplates.find((a) => UUIDsEqual(a.ID, this.SelectedBaseAgentId)) ??
|
|
1113
|
+
engine.GetAgentByID(this.SelectedBaseAgentId) ??
|
|
1114
|
+
null);
|
|
1115
|
+
}
|
|
1116
|
+
get InstantiationConfig() {
|
|
1117
|
+
return ParseAgentInstantiationConfig(this.SelectedBaseAgent?.TypeConfiguration);
|
|
1118
|
+
}
|
|
1119
|
+
get SuggestedNames() {
|
|
1120
|
+
const fromConfig = this.InstantiationConfig?.suggestedNames;
|
|
1121
|
+
if (fromConfig && fromConfig.length > 0) {
|
|
1122
|
+
return fromConfig;
|
|
1123
|
+
}
|
|
1124
|
+
return ['Pepper', 'Atlas', 'Cato', 'Jarvis', 'Vesper'];
|
|
1125
|
+
}
|
|
1126
|
+
get PersonalityPresets() {
|
|
1127
|
+
const fromConfig = this.InstantiationConfig?.personalityPresets;
|
|
1128
|
+
if (fromConfig && fromConfig.length > 0) {
|
|
1129
|
+
return fromConfig;
|
|
1130
|
+
}
|
|
1131
|
+
return DEFAULT_VIBE_OPTIONS.map((v) => ({
|
|
1132
|
+
label: v.Label,
|
|
1133
|
+
tone: v.Tone,
|
|
1134
|
+
speakingStyle: v.SpeakingStyle,
|
|
1135
|
+
description: v.Subtitle,
|
|
1136
|
+
}));
|
|
1137
|
+
}
|
|
1138
|
+
get VibeOptions() {
|
|
1139
|
+
const fromConfig = this.InstantiationConfig?.personalityPresets;
|
|
1140
|
+
if (!fromConfig || fromConfig.length === 0) {
|
|
1141
|
+
return DEFAULT_VIBE_OPTIONS;
|
|
1142
|
+
}
|
|
1143
|
+
return fromConfig.map((preset, idx) => this.mapPresetToVibeOption(preset, idx));
|
|
1144
|
+
}
|
|
1145
|
+
get IsCustomVibe() {
|
|
1146
|
+
const hasCustomText = this.Tone.trim().length > 0 || this.SpeakingStyle.trim().length > 0;
|
|
1147
|
+
if (!hasCustomText) {
|
|
1148
|
+
return false;
|
|
1149
|
+
}
|
|
1150
|
+
return !this.VibeOptions.some((v) => this.IsVibeActive(v));
|
|
1151
|
+
}
|
|
1152
|
+
get SelectedPersona() {
|
|
1153
|
+
if (!this.SelectedPersonaId) {
|
|
1154
|
+
return null;
|
|
1155
|
+
}
|
|
1156
|
+
return this.ActivePersonas.find((p) => UUIDsEqual(p.ID, this.SelectedPersonaId)) ?? null;
|
|
1157
|
+
}
|
|
1158
|
+
get AdvancedSummaryLabel() {
|
|
1159
|
+
const parts = [];
|
|
1160
|
+
if (this.SelectedPersona) {
|
|
1161
|
+
parts.push(this.SelectedPersona.Name);
|
|
1162
|
+
}
|
|
1163
|
+
if (this.IsChiefOfStaffTemplate && this.CoordinationMode) {
|
|
1164
|
+
parts.push(this.CoordinationMode);
|
|
1165
|
+
}
|
|
1166
|
+
if (this.AdditionalInstructions.trim().length > 0) {
|
|
1167
|
+
parts.push('Custom rules');
|
|
1168
|
+
}
|
|
1169
|
+
else if (this.IsCustomVibe) {
|
|
1170
|
+
parts.push('Custom tone');
|
|
1171
|
+
}
|
|
1172
|
+
return parts.length > 0 ? parts.join(' · ') : 'Default settings';
|
|
1173
|
+
}
|
|
1174
|
+
get TemplateCategories() {
|
|
1175
|
+
const categories = new Set();
|
|
1176
|
+
for (const tpl of this.InstantiableTemplates) {
|
|
1177
|
+
categories.add(this.GetTemplateCategory(tpl));
|
|
1178
|
+
}
|
|
1179
|
+
return ['All', ...Array.from(categories)];
|
|
1180
|
+
}
|
|
1181
|
+
get FilteredTemplates() {
|
|
1182
|
+
const q = this.TemplateSearchText.trim().toLowerCase();
|
|
1183
|
+
return this.InstantiableTemplates.filter((tpl) => {
|
|
1184
|
+
if (this.SelectedTemplateCategory !== 'All' &&
|
|
1185
|
+
this.GetTemplateCategory(tpl) !== this.SelectedTemplateCategory) {
|
|
1186
|
+
return false;
|
|
1187
|
+
}
|
|
1188
|
+
if (!q) {
|
|
1189
|
+
return true;
|
|
1190
|
+
}
|
|
1191
|
+
const haystack = `${tpl.Name ?? ''} ${tpl.Description ?? ''} ${this.GetTemplateCategory(tpl)}`.toLowerCase();
|
|
1192
|
+
return haystack.includes(q);
|
|
1193
|
+
});
|
|
1194
|
+
}
|
|
1195
|
+
get VisiblePersonas() {
|
|
1196
|
+
if (this.ShowAllPersonas) {
|
|
1197
|
+
return this.ActivePersonas;
|
|
1198
|
+
}
|
|
1199
|
+
return this.ActivePersonas.slice(0, 6);
|
|
1200
|
+
}
|
|
1201
|
+
get IsChiefOfStaffTemplate() {
|
|
1202
|
+
const base = this.SelectedBaseAgent;
|
|
1203
|
+
if (!base) {
|
|
1204
|
+
return false;
|
|
1205
|
+
}
|
|
1206
|
+
const root = this.aiEngine.GetRootAgent(base.ID) ?? base;
|
|
1207
|
+
return (root.Name ?? '').trim().toLowerCase() === 'chief of staff';
|
|
1208
|
+
}
|
|
1209
|
+
get ShowPrimaryToggle() {
|
|
1210
|
+
return this.Mode === 'edit' || this.existingSiblingCount > 0;
|
|
1211
|
+
}
|
|
1212
|
+
get CanSave() {
|
|
1213
|
+
return (!this.IsSaving &&
|
|
1214
|
+
!this.IsArchiving &&
|
|
1215
|
+
!this.IsGeneratingAvatar &&
|
|
1216
|
+
this.InstanceName.trim().length > 0 &&
|
|
1217
|
+
(this.Mode === 'edit' || this.SelectedBaseAgentId.trim().length > 0));
|
|
1218
|
+
}
|
|
1219
|
+
get PreviewAvatarUrl() {
|
|
1220
|
+
if (this.AvatarPreviewError) {
|
|
1221
|
+
return null;
|
|
1222
|
+
}
|
|
1223
|
+
const trimmed = this.LogoURL.trim();
|
|
1224
|
+
return trimmed.length > 0 ? trimmed : null;
|
|
1225
|
+
}
|
|
1226
|
+
get HasImageAvatar() {
|
|
1227
|
+
return this.PreviewAvatarUrl !== null;
|
|
1228
|
+
}
|
|
1229
|
+
get AvatarStatusLabel() {
|
|
1230
|
+
const url = this.PreviewAvatarUrl;
|
|
1231
|
+
if (!url) {
|
|
1232
|
+
return 'Icon mode';
|
|
1233
|
+
}
|
|
1234
|
+
if (url.startsWith('data:image/')) {
|
|
1235
|
+
const kb = (Math.round((url.length / 1024) * 10) / 10).toFixed(1);
|
|
1236
|
+
const fmt = url.startsWith('data:image/webp') ? 'WebP' : 'Image';
|
|
1237
|
+
return `128×128 ${fmt} · ${kb} KB`;
|
|
1238
|
+
}
|
|
1239
|
+
return 'Custom URL';
|
|
1240
|
+
}
|
|
1241
|
+
get aiEngine() {
|
|
1242
|
+
return AIEngineBase.GetProviderInstance(this.ProviderToUse, AIEngineBase);
|
|
1243
|
+
}
|
|
1244
|
+
GetTemplateCategory(tpl) {
|
|
1245
|
+
if (tpl.BaseAgentID) {
|
|
1246
|
+
return 'Shared Dept';
|
|
1247
|
+
}
|
|
1248
|
+
const text = `${tpl.Name ?? ''} ${tpl.Description ?? ''}`.toLowerCase();
|
|
1249
|
+
if (tpl.InstantiationMode === 'Required' ||
|
|
1250
|
+
text.includes('chief of staff') ||
|
|
1251
|
+
text.includes('executive') ||
|
|
1252
|
+
text.includes('coordinator')) {
|
|
1253
|
+
return 'Executive';
|
|
1254
|
+
}
|
|
1255
|
+
if (text.includes('research') ||
|
|
1256
|
+
text.includes('query') ||
|
|
1257
|
+
text.includes('data') ||
|
|
1258
|
+
text.includes('analyst') ||
|
|
1259
|
+
text.includes('sql')) {
|
|
1260
|
+
return 'Data & Research';
|
|
1261
|
+
}
|
|
1262
|
+
return 'General';
|
|
1263
|
+
}
|
|
1264
|
+
ToggleTemplatePicker() {
|
|
1265
|
+
this.TemplatePickerOpen = !this.TemplatePickerOpen;
|
|
1266
|
+
if (this.TemplatePickerOpen) {
|
|
1267
|
+
this.AvatarStudioOpen = false;
|
|
1268
|
+
}
|
|
1269
|
+
this.cdr.markForCheck();
|
|
1270
|
+
}
|
|
1271
|
+
SetTemplateCategory(category) {
|
|
1272
|
+
this.SelectedTemplateCategory = category;
|
|
1273
|
+
this.cdr.markForCheck();
|
|
1274
|
+
}
|
|
1275
|
+
SelectTemplate(template) {
|
|
1276
|
+
this.SelectedBaseAgentId = template.ID;
|
|
1277
|
+
this.TemplatePickerOpen = false;
|
|
1278
|
+
this.TemplateSearchText = '';
|
|
1279
|
+
this.SelectedTemplateCategory = 'All';
|
|
1280
|
+
this.updateSiblingCount();
|
|
1281
|
+
if (!this.IconClass || this.Mode === 'create') {
|
|
1282
|
+
const cfg = ParseAgentInstantiationConfig(template.TypeConfiguration);
|
|
1283
|
+
this.IconClass = cfg?.suggestedIcons?.[0] ?? template.IconClass ?? 'fa-solid fa-wand-magic-sparkles';
|
|
1284
|
+
}
|
|
1285
|
+
if (this.IsChiefOfStaffTemplate && !this.CoordinationMode) {
|
|
1286
|
+
this.CoordinationMode = 'Coordinator';
|
|
1287
|
+
}
|
|
1288
|
+
this.cdr.markForCheck();
|
|
1289
|
+
}
|
|
1290
|
+
ToggleAvatarStudio() {
|
|
1291
|
+
if (this.AvatarStudioOpen) {
|
|
1292
|
+
this.CloseAvatarStudio();
|
|
1293
|
+
}
|
|
1294
|
+
else {
|
|
1295
|
+
this.OpenAvatarStudio();
|
|
1296
|
+
}
|
|
1297
|
+
}
|
|
1298
|
+
OpenAvatarStudio() {
|
|
1299
|
+
this.AvatarStudioOpen = true;
|
|
1300
|
+
this.TemplatePickerOpen = false;
|
|
1301
|
+
this.AvatarErrorMessage = null;
|
|
1302
|
+
if (!this.SelectedAvatarStyle) {
|
|
1303
|
+
this.SelectedAvatarStyle = '3D Clay Mascot';
|
|
1304
|
+
}
|
|
1305
|
+
if (!this.AvatarPrompt.trim() || !this.avatarPromptEditedByUser) {
|
|
1306
|
+
this.AvatarPrompt = this.BuildContextualAvatarPrompt(this.SelectedAvatarStyle);
|
|
1307
|
+
this.avatarPromptEditedByUser = false;
|
|
1308
|
+
}
|
|
1309
|
+
this.cdr.markForCheck();
|
|
1310
|
+
}
|
|
1311
|
+
CloseAvatarStudio() {
|
|
1312
|
+
this.AvatarStudioOpen = false;
|
|
1313
|
+
this.AvatarErrorMessage = null;
|
|
1314
|
+
this.cdr.markForCheck();
|
|
1315
|
+
}
|
|
1316
|
+
OnAvatarPromptUserInput() {
|
|
1317
|
+
this.avatarPromptEditedByUser = this.AvatarPrompt.trim().length > 0;
|
|
1318
|
+
}
|
|
1319
|
+
RefreshAvatarPromptFromAgent() {
|
|
1320
|
+
const style = this.SelectedAvatarStyle || '3D Clay Mascot';
|
|
1321
|
+
this.SelectedAvatarStyle = style;
|
|
1322
|
+
this.AvatarPrompt = this.BuildContextualAvatarPrompt(style);
|
|
1323
|
+
this.avatarPromptEditedByUser = false;
|
|
1324
|
+
this.cdr.markForCheck();
|
|
1325
|
+
}
|
|
1326
|
+
SetAvatarStudioTab(tab) {
|
|
1327
|
+
this.AvatarStudioTab = tab;
|
|
1328
|
+
this.AvatarErrorMessage = null;
|
|
1329
|
+
this.cdr.markForCheck();
|
|
1330
|
+
}
|
|
1331
|
+
SelectAvatarStylePreset(style) {
|
|
1332
|
+
this.SelectedAvatarStyle = this.SelectedAvatarStyle === style ? '' : style;
|
|
1333
|
+
if (!this.avatarPromptEditedByUser || !this.AvatarPrompt.trim()) {
|
|
1334
|
+
this.AvatarPrompt = this.BuildContextualAvatarPrompt(this.SelectedAvatarStyle || 'Minimal Geometric');
|
|
1335
|
+
this.avatarPromptEditedByUser = false;
|
|
1336
|
+
}
|
|
1337
|
+
this.cdr.markForCheck();
|
|
1338
|
+
}
|
|
1339
|
+
ApplySuggestedName(name) {
|
|
1340
|
+
this.InstanceName = name;
|
|
1341
|
+
this.cdr.markForCheck();
|
|
1342
|
+
}
|
|
1343
|
+
SelectIcon(iconClass) {
|
|
1344
|
+
if (this.LogoURL.trim().length > 0) {
|
|
1345
|
+
this.pushAvatarHistory(this.LogoURL);
|
|
1346
|
+
this.LogoURL = '';
|
|
1347
|
+
this.AvatarPreviewError = false;
|
|
1348
|
+
this.lastGeneratedPngSource = null;
|
|
1349
|
+
}
|
|
1350
|
+
this.IconClass = iconClass;
|
|
1351
|
+
this.cdr.markForCheck();
|
|
1352
|
+
}
|
|
1353
|
+
ClearAvatarImage() {
|
|
1354
|
+
if (this.LogoURL.trim().length > 0) {
|
|
1355
|
+
this.pushAvatarHistory(this.LogoURL);
|
|
1356
|
+
this.LogoURL = '';
|
|
1357
|
+
this.AvatarPreviewError = false;
|
|
1358
|
+
this.lastGeneratedPngSource = null;
|
|
1359
|
+
this.AvatarErrorMessage = null;
|
|
1360
|
+
this.cdr.markForCheck();
|
|
1361
|
+
}
|
|
1362
|
+
}
|
|
1363
|
+
UndoAvatar() {
|
|
1364
|
+
if (this.AvatarHistory.length === 0) {
|
|
1365
|
+
return;
|
|
1366
|
+
}
|
|
1367
|
+
const previous = this.AvatarHistory[this.AvatarHistory.length - 1];
|
|
1368
|
+
this.AvatarHistory = this.AvatarHistory.slice(0, -1);
|
|
1369
|
+
this.LogoURL = previous;
|
|
1370
|
+
this.AvatarPreviewError = false;
|
|
1371
|
+
this.lastGeneratedPngSource = null;
|
|
1372
|
+
this.AvatarErrorMessage = null;
|
|
1373
|
+
this.cdr.markForCheck();
|
|
1374
|
+
}
|
|
1375
|
+
OnLogoUrlChanged() {
|
|
1376
|
+
this.AvatarPreviewError = false;
|
|
1377
|
+
this.lastGeneratedPngSource = null;
|
|
1378
|
+
this.cdr.markForCheck();
|
|
1379
|
+
}
|
|
1380
|
+
async GenerateAvatar() {
|
|
1381
|
+
if (this.IsGeneratingAvatar) {
|
|
1382
|
+
return;
|
|
1383
|
+
}
|
|
1384
|
+
const promptToUse = this.composeGenerationPrompt();
|
|
1385
|
+
if (!this.AvatarPrompt.trim()) {
|
|
1386
|
+
this.AvatarPrompt = promptToUse;
|
|
1387
|
+
}
|
|
1388
|
+
await this.runAvatarImageAction(promptToUse, null);
|
|
1389
|
+
}
|
|
1390
|
+
async RefineAvatar() {
|
|
1391
|
+
const refineInstruction = this.AvatarRefinePrompt.trim();
|
|
1392
|
+
if (this.IsGeneratingAvatar || !this.HasImageAvatar || !refineInstruction) {
|
|
1393
|
+
return;
|
|
1394
|
+
}
|
|
1395
|
+
const sourceImage = await this.buildSourceImageForEdit();
|
|
1396
|
+
if (!sourceImage) {
|
|
1397
|
+
this.notifyAvatarFailure('Could not prepare the current avatar image for refinement.');
|
|
1398
|
+
return;
|
|
1399
|
+
}
|
|
1400
|
+
await this.runAvatarImageAction(refineInstruction, sourceImage);
|
|
1401
|
+
if (!this.AvatarErrorMessage) {
|
|
1402
|
+
this.AvatarRefinePrompt = '';
|
|
1403
|
+
this.cdr.markForCheck();
|
|
1404
|
+
}
|
|
1405
|
+
}
|
|
1406
|
+
ApplyQuickRefinement(instruction) {
|
|
1407
|
+
this.AvatarRefinePrompt = instruction;
|
|
1408
|
+
this.cdr.markForCheck();
|
|
1409
|
+
void this.RefineAvatar();
|
|
1410
|
+
}
|
|
1411
|
+
async OnAvatarFileSelected(event) {
|
|
1412
|
+
const input = event.target instanceof HTMLInputElement ? event.target : null;
|
|
1413
|
+
const file = input?.files?.[0];
|
|
1414
|
+
if (!file) {
|
|
1415
|
+
return;
|
|
1416
|
+
}
|
|
1417
|
+
if (!file.type.startsWith('image/')) {
|
|
1418
|
+
this.notifyAvatarFailure('Please select an image file (PNG, JPG, WebP, or GIF).', 'warning');
|
|
1419
|
+
if (input) {
|
|
1420
|
+
input.value = '';
|
|
1421
|
+
}
|
|
1422
|
+
return;
|
|
1423
|
+
}
|
|
1424
|
+
try {
|
|
1425
|
+
const rawDataUrl = await this.readFileAsDataUrl(file);
|
|
1426
|
+
const downscaled = await this.downscaleImageToAvatarDataUrl(rawDataUrl);
|
|
1427
|
+
this.applyNewAvatarDataUrl(downscaled, null);
|
|
1428
|
+
}
|
|
1429
|
+
catch (err) {
|
|
1430
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
1431
|
+
this.notifyAvatarFailure(`Could not process uploaded image: ${msg}`);
|
|
1432
|
+
}
|
|
1433
|
+
finally {
|
|
1434
|
+
if (input) {
|
|
1435
|
+
input.value = '';
|
|
1436
|
+
}
|
|
1437
|
+
}
|
|
1438
|
+
}
|
|
1439
|
+
SelectPersona(persona) {
|
|
1440
|
+
if (this.SelectedPersonaId && UUIDsEqual(this.SelectedPersonaId, persona.ID)) {
|
|
1441
|
+
this.SelectedPersonaId = null;
|
|
1442
|
+
}
|
|
1443
|
+
else {
|
|
1444
|
+
this.SelectedPersonaId = persona.ID;
|
|
1445
|
+
}
|
|
1446
|
+
this.cdr.markForCheck();
|
|
1447
|
+
}
|
|
1448
|
+
IsPersonaSelected(persona) {
|
|
1449
|
+
return this.SelectedPersonaId != null && UUIDsEqual(this.SelectedPersonaId, persona.ID);
|
|
1450
|
+
}
|
|
1451
|
+
ApplyVibe(vibe) {
|
|
1452
|
+
this.Tone = vibe.Tone;
|
|
1453
|
+
this.SpeakingStyle = vibe.SpeakingStyle;
|
|
1454
|
+
const matchedPersona = this.findPersonaByName(vibe.DefaultPersonaName);
|
|
1455
|
+
if (matchedPersona) {
|
|
1456
|
+
this.SelectedPersonaId = matchedPersona.ID;
|
|
1457
|
+
}
|
|
1458
|
+
this.cdr.markForCheck();
|
|
1459
|
+
}
|
|
1460
|
+
IsVibeActive(vibe) {
|
|
1461
|
+
return this.Tone.trim().toLowerCase() === vibe.Tone.trim().toLowerCase();
|
|
1462
|
+
}
|
|
1463
|
+
ApplyPersonalityPreset(preset) {
|
|
1464
|
+
const mapped = this.VibeOptions.find((v) => v.Label.toLowerCase() === preset.label.toLowerCase());
|
|
1465
|
+
if (mapped) {
|
|
1466
|
+
this.ApplyVibe(mapped);
|
|
1467
|
+
return;
|
|
1468
|
+
}
|
|
1469
|
+
this.Tone = preset.tone;
|
|
1470
|
+
this.SpeakingStyle = preset.speakingStyle ?? '';
|
|
1471
|
+
this.cdr.markForCheck();
|
|
1472
|
+
}
|
|
1473
|
+
IsPresetActive(preset) {
|
|
1474
|
+
return this.Tone.trim().toLowerCase() === preset.tone.trim().toLowerCase();
|
|
1475
|
+
}
|
|
1476
|
+
OnAdvancedToggle(event) {
|
|
1477
|
+
if (event.target instanceof HTMLDetailsElement) {
|
|
1478
|
+
this.AdvancedExpanded = event.target.open;
|
|
1479
|
+
this.cdr.markForCheck();
|
|
1480
|
+
}
|
|
1481
|
+
}
|
|
1482
|
+
SetCoordinationMode(mode) {
|
|
1483
|
+
this.CoordinationMode = mode;
|
|
1484
|
+
this.cdr.markForCheck();
|
|
1485
|
+
}
|
|
1486
|
+
OnChatToOnboardClicked() {
|
|
1487
|
+
const base = this.SelectedBaseAgent;
|
|
1488
|
+
if (!base) {
|
|
1489
|
+
return;
|
|
1490
|
+
}
|
|
1491
|
+
this.closeInternal(false);
|
|
1492
|
+
this.ChatToOnboard.emit(base);
|
|
1493
|
+
}
|
|
1494
|
+
OnCancel() {
|
|
1495
|
+
this.closeInternal(true);
|
|
1496
|
+
}
|
|
1497
|
+
async OnSave() {
|
|
1498
|
+
if (!this.CanSave) {
|
|
1499
|
+
return;
|
|
1500
|
+
}
|
|
1501
|
+
const user = this.EffectiveUser;
|
|
1502
|
+
if (!user) {
|
|
1503
|
+
this.ErrorMessage = 'Sign in required to save a personal agent instance.';
|
|
1504
|
+
this.cdr.markForCheck();
|
|
1505
|
+
return;
|
|
1506
|
+
}
|
|
1507
|
+
this.IsSaving = true;
|
|
1508
|
+
this.ErrorMessage = null;
|
|
1509
|
+
this.cdr.markForCheck();
|
|
1510
|
+
try {
|
|
1511
|
+
const md = this.ProviderToUse;
|
|
1512
|
+
const engine = this.aiEngine;
|
|
1513
|
+
const entity = await md.GetEntityObject('MJ: AI Agents', user);
|
|
1514
|
+
if (this.Mode === 'edit' && this.EditingAgent) {
|
|
1515
|
+
const loaded = await entity.InnerLoad(CompositeKey.FromID(this.EditingAgent.ID));
|
|
1516
|
+
if (!loaded) {
|
|
1517
|
+
throw new Error(`Could not load agent "${this.EditingAgent.Name}" for editing.`);
|
|
1518
|
+
}
|
|
1519
|
+
}
|
|
1520
|
+
else {
|
|
1521
|
+
const base = this.SelectedBaseAgent;
|
|
1522
|
+
if (!base) {
|
|
1523
|
+
throw new Error('Select a base agent template first.');
|
|
1524
|
+
}
|
|
1525
|
+
const effectiveBase = engine.ResolveEffectiveAgentProperties(base);
|
|
1526
|
+
entity.NewRecord();
|
|
1527
|
+
entity.BaseAgentID = base.ID;
|
|
1528
|
+
entity.OwnerUserID = user.ID;
|
|
1529
|
+
entity.InstantiationMode = 'None';
|
|
1530
|
+
entity.Status = 'Active';
|
|
1531
|
+
entity.TypeID = effectiveBase.TypeID ?? base.TypeID;
|
|
1532
|
+
}
|
|
1533
|
+
entity.Name = this.InstanceName.trim();
|
|
1534
|
+
entity.Description =
|
|
1535
|
+
this.Description.trim() ||
|
|
1536
|
+
(this.SelectedBaseAgent ? `Personal ${this.SelectedBaseAgent.Name} instance` : null);
|
|
1537
|
+
entity.IconClass = this.IconClass.trim() || null;
|
|
1538
|
+
entity.LogoURL = this.LogoURL.trim() || null;
|
|
1539
|
+
entity.AdditionalInstructions = this.AdditionalInstructions.trim() || null;
|
|
1540
|
+
entity.IsPrimaryInstance = this.IsPrimaryInstance;
|
|
1541
|
+
const savedAgent = await entity.Save();
|
|
1542
|
+
if (!savedAgent) {
|
|
1543
|
+
throw new Error(entity.LatestResult?.CompleteMessage || 'Failed to save agent instance.');
|
|
1544
|
+
}
|
|
1545
|
+
// AIEngineBase has AutoRefresh enabled on _agents, _agentPersonas, and _agentPermissions,
|
|
1546
|
+
// so entity.Save() updates the in-memory cache automatically without a manual Config(true).
|
|
1547
|
+
await this.savePersonaConfiguration(entity.ID, user);
|
|
1548
|
+
// Save optional CoordinationMode / onboarding policy for Chief of Staff or when chosen
|
|
1549
|
+
if (this.CoordinationMode || this.IsChiefOfStaffTemplate) {
|
|
1550
|
+
await this.saveUserPolicy(entity.ID, entity.Name, user);
|
|
1551
|
+
}
|
|
1552
|
+
const refreshed = engine.GetAgentByID(entity.ID) ?? entity;
|
|
1553
|
+
this.closeInternal(false);
|
|
1554
|
+
this.Saved.emit(refreshed);
|
|
1555
|
+
}
|
|
1556
|
+
catch (err) {
|
|
1557
|
+
this.ErrorMessage = err instanceof Error ? err.message : String(err);
|
|
1558
|
+
LogError(`AgentInstanceEditorModal.OnSave: ${this.ErrorMessage}`);
|
|
1559
|
+
}
|
|
1560
|
+
finally {
|
|
1561
|
+
this.IsSaving = false;
|
|
1562
|
+
this.cdr.markForCheck();
|
|
1563
|
+
}
|
|
1564
|
+
}
|
|
1565
|
+
RequestArchive() {
|
|
1566
|
+
this.ConfirmArchiveOpen = true;
|
|
1567
|
+
this.cdr.markForCheck();
|
|
1568
|
+
}
|
|
1569
|
+
CancelArchive() {
|
|
1570
|
+
this.ConfirmArchiveOpen = false;
|
|
1571
|
+
this.cdr.markForCheck();
|
|
1572
|
+
}
|
|
1573
|
+
async ConfirmArchive() {
|
|
1574
|
+
const user = this.EffectiveUser;
|
|
1575
|
+
if (!this.EditingAgent || !user || this.IsArchiving) {
|
|
1576
|
+
return;
|
|
1577
|
+
}
|
|
1578
|
+
this.IsArchiving = true;
|
|
1579
|
+
this.ErrorMessage = null;
|
|
1580
|
+
this.cdr.markForCheck();
|
|
1581
|
+
try {
|
|
1582
|
+
const md = this.ProviderToUse;
|
|
1583
|
+
const entity = await md.GetEntityObject('MJ: AI Agents', user);
|
|
1584
|
+
const loaded = await entity.InnerLoad(CompositeKey.FromID(this.EditingAgent.ID));
|
|
1585
|
+
if (!loaded) {
|
|
1586
|
+
throw new Error(`Could not load "${this.EditingAgent.Name}" to archive.`);
|
|
1587
|
+
}
|
|
1588
|
+
entity.Status = 'Disabled';
|
|
1589
|
+
entity.IsPrimaryInstance = false;
|
|
1590
|
+
const saved = await entity.Save();
|
|
1591
|
+
if (!saved) {
|
|
1592
|
+
throw new Error(entity.LatestResult?.CompleteMessage || 'Failed to archive agent instance.');
|
|
1593
|
+
}
|
|
1594
|
+
const archivedId = entity.ID;
|
|
1595
|
+
this.closeInternal(false);
|
|
1596
|
+
this.Archived.emit(archivedId);
|
|
1597
|
+
}
|
|
1598
|
+
catch (err) {
|
|
1599
|
+
this.ErrorMessage = err instanceof Error ? err.message : String(err);
|
|
1600
|
+
LogError(`AgentInstanceEditorModal.ConfirmArchive: ${this.ErrorMessage}`);
|
|
1601
|
+
}
|
|
1602
|
+
finally {
|
|
1603
|
+
this.IsArchiving = false;
|
|
1604
|
+
this.ConfirmArchiveOpen = false;
|
|
1605
|
+
this.cdr.markForCheck();
|
|
1606
|
+
}
|
|
1607
|
+
}
|
|
1608
|
+
updateDialogWidth() {
|
|
1609
|
+
if (typeof window !== 'undefined' && Number.isFinite(window.innerWidth) && window.innerWidth > 0) {
|
|
1610
|
+
this.DialogWidth = Math.max(320, Math.min(560, window.innerWidth - 24));
|
|
1611
|
+
}
|
|
1612
|
+
else {
|
|
1613
|
+
this.DialogWidth = 560;
|
|
1614
|
+
}
|
|
1615
|
+
}
|
|
1616
|
+
async initializeForm() {
|
|
1617
|
+
const user = this.EffectiveUser;
|
|
1618
|
+
this.IsLoading = true;
|
|
1619
|
+
this.ErrorMessage = null;
|
|
1620
|
+
this.ConfirmArchiveOpen = false;
|
|
1621
|
+
this.AvatarPreviewError = false;
|
|
1622
|
+
this.ShowAllPersonas = false;
|
|
1623
|
+
this.TemplatePickerOpen = false;
|
|
1624
|
+
this.TemplateSearchText = '';
|
|
1625
|
+
this.SelectedTemplateCategory = 'All';
|
|
1626
|
+
this.AvatarStudioOpen = false;
|
|
1627
|
+
this.AvatarStudioTab = 'ai';
|
|
1628
|
+
this.AvatarPrompt = '';
|
|
1629
|
+
this.SelectedAvatarStyle = '3D Clay Mascot';
|
|
1630
|
+
this.AvatarRefinePrompt = '';
|
|
1631
|
+
this.AvatarErrorMessage = null;
|
|
1632
|
+
this.AvatarHistory = [];
|
|
1633
|
+
this.avatarPromptEditedByUser = false;
|
|
1634
|
+
this.lastGeneratedPngSource = null;
|
|
1635
|
+
this.cdr.markForCheck();
|
|
1636
|
+
try {
|
|
1637
|
+
const engine = this.aiEngine;
|
|
1638
|
+
await engine.Config(false, user ?? undefined, this.ProviderToUse);
|
|
1639
|
+
this.InstantiableTemplates = user ? engine.GetInstantiableAgents(user) : [];
|
|
1640
|
+
const suggestedNames = new Set(['coral', 'sage', 'onyx', 'verse', 'alloy', 'ash', 'ballad']);
|
|
1641
|
+
this.ActivePersonas = [...(engine.Personas ?? [])]
|
|
1642
|
+
.filter((p) => p.IsActive !== false)
|
|
1643
|
+
.sort((a, b) => {
|
|
1644
|
+
const aSuggested = suggestedNames.has(a.Name.trim().toLowerCase()) ? 0 : 1;
|
|
1645
|
+
const bSuggested = suggestedNames.has(b.Name.trim().toLowerCase()) ? 0 : 1;
|
|
1646
|
+
if (aSuggested !== bSuggested) {
|
|
1647
|
+
return aSuggested - bSuggested;
|
|
1648
|
+
}
|
|
1649
|
+
return a.Name.localeCompare(b.Name);
|
|
1650
|
+
});
|
|
1651
|
+
if (this.Mode === 'edit' && this.EditingAgent) {
|
|
1652
|
+
const agent = this.EditingAgent;
|
|
1653
|
+
this.SelectedBaseAgentId = agent.BaseAgentID ?? '';
|
|
1654
|
+
this.InstanceName = agent.Name ?? '';
|
|
1655
|
+
this.Description = agent.Description ?? '';
|
|
1656
|
+
this.IconClass = agent.IconClass?.trim() || 'fa-solid fa-wand-magic-sparkles';
|
|
1657
|
+
this.LogoURL = agent.LogoURL ?? '';
|
|
1658
|
+
this.AdditionalInstructions = agent.AdditionalInstructions ?? '';
|
|
1659
|
+
this.IsPrimaryInstance = Boolean(agent.IsPrimaryInstance);
|
|
1660
|
+
const resolvedPersona = engine.ResolveAgentPersona(agent.ID);
|
|
1661
|
+
this.SelectedPersonaId = resolvedPersona?.Persona?.ID ?? null;
|
|
1662
|
+
this.Tone = resolvedPersona?.Tone ?? '';
|
|
1663
|
+
this.SpeakingStyle = resolvedPersona?.SpeakingStyle ?? '';
|
|
1664
|
+
this.CoordinationMode = null;
|
|
1665
|
+
if (user) {
|
|
1666
|
+
const pol = await AgentUserPolicyEngine.Instance.ResolvePolicyForAgentAndUser(agent.ID, user.ID, user, { provider: this.ProviderToUse });
|
|
1667
|
+
if (pol.status === 'found' && pol.policy) {
|
|
1668
|
+
this.CoordinationMode = pol.policy.CoordinationMode;
|
|
1669
|
+
}
|
|
1670
|
+
}
|
|
1671
|
+
this.updateSiblingCount();
|
|
1672
|
+
this.AdvancedExpanded =
|
|
1673
|
+
this.AdditionalInstructions.trim().length > 0 ||
|
|
1674
|
+
this.Description.trim().length > 0 ||
|
|
1675
|
+
this.Tone.trim().length > 0 ||
|
|
1676
|
+
this.SpeakingStyle.trim().length > 0;
|
|
1677
|
+
}
|
|
1678
|
+
else {
|
|
1679
|
+
const defaultTemplate = (this.InitialBaseAgentId
|
|
1680
|
+
? this.InstantiableTemplates.find((t) => UUIDsEqual(t.ID, this.InitialBaseAgentId))
|
|
1681
|
+
: undefined) ??
|
|
1682
|
+
this.InstantiableTemplates.find((t) => t.InstantiationMode === 'Required') ??
|
|
1683
|
+
this.InstantiableTemplates[0] ??
|
|
1684
|
+
null;
|
|
1685
|
+
this.SelectedBaseAgentId = defaultTemplate?.ID ?? '';
|
|
1686
|
+
this.InstanceName = '';
|
|
1687
|
+
this.Description = '';
|
|
1688
|
+
const cfg = ParseAgentInstantiationConfig(defaultTemplate?.TypeConfiguration);
|
|
1689
|
+
this.IconClass = cfg?.suggestedIcons?.[0] ?? defaultTemplate?.IconClass ?? 'fa-solid fa-pepper-hot';
|
|
1690
|
+
this.LogoURL = '';
|
|
1691
|
+
this.AdditionalInstructions = '';
|
|
1692
|
+
this.Tone = '';
|
|
1693
|
+
this.SpeakingStyle = '';
|
|
1694
|
+
const preferredVoice = cfg?.suggestedPersonaNames?.[0]?.toLowerCase() ?? 'sage';
|
|
1695
|
+
const defaultPersona = this.ActivePersonas.find((p) => p.Name.trim().toLowerCase() === preferredVoice) ??
|
|
1696
|
+
this.ActivePersonas[0] ??
|
|
1697
|
+
null;
|
|
1698
|
+
this.SelectedPersonaId = defaultPersona?.ID ?? null;
|
|
1699
|
+
this.updateSiblingCount();
|
|
1700
|
+
this.IsPrimaryInstance = this.existingSiblingCount === 0;
|
|
1701
|
+
this.CoordinationMode = this.IsChiefOfStaffTemplate ? 'Coordinator' : null;
|
|
1702
|
+
this.AdvancedExpanded = false;
|
|
1703
|
+
}
|
|
1704
|
+
}
|
|
1705
|
+
catch (err) {
|
|
1706
|
+
this.ErrorMessage = err instanceof Error ? err.message : String(err);
|
|
1707
|
+
LogError(`AgentInstanceEditorModal.initializeForm: ${this.ErrorMessage}`);
|
|
1708
|
+
}
|
|
1709
|
+
finally {
|
|
1710
|
+
this.IsLoading = false;
|
|
1711
|
+
this.cdr.markForCheck();
|
|
1712
|
+
}
|
|
1713
|
+
}
|
|
1714
|
+
mapPresetToVibeOption(preset, index) {
|
|
1715
|
+
const combined = `${preset.label} ${preset.tone} ${preset.speakingStyle}`.toLowerCase();
|
|
1716
|
+
let iconClass = 'fa-solid fa-wand-magic-sparkles';
|
|
1717
|
+
let defaultPersonaName = 'Sage';
|
|
1718
|
+
if (combined.includes('witty') ||
|
|
1719
|
+
combined.includes('sarcastic') ||
|
|
1720
|
+
combined.includes('funny') ||
|
|
1721
|
+
combined.includes('playful')) {
|
|
1722
|
+
iconClass = 'fa-solid fa-bolt';
|
|
1723
|
+
defaultPersonaName = 'Coral';
|
|
1724
|
+
}
|
|
1725
|
+
else if (combined.includes('socratic') ||
|
|
1726
|
+
combined.includes('challenger') ||
|
|
1727
|
+
combined.includes('skeptical') ||
|
|
1728
|
+
combined.includes('rigorous')) {
|
|
1729
|
+
iconClass = 'fa-solid fa-chess-knight';
|
|
1730
|
+
defaultPersonaName = 'Onyx';
|
|
1731
|
+
}
|
|
1732
|
+
else if (combined.includes('warm') ||
|
|
1733
|
+
combined.includes('coach') ||
|
|
1734
|
+
combined.includes('empathetic') ||
|
|
1735
|
+
combined.includes('encouraging')) {
|
|
1736
|
+
iconClass = 'fa-solid fa-handshake';
|
|
1737
|
+
defaultPersonaName = 'Verse';
|
|
1738
|
+
}
|
|
1739
|
+
else if (combined.includes('executive') ||
|
|
1740
|
+
combined.includes('crisp') ||
|
|
1741
|
+
combined.includes('concise') ||
|
|
1742
|
+
combined.includes('analytical')) {
|
|
1743
|
+
iconClass = 'fa-solid fa-bullseye';
|
|
1744
|
+
defaultPersonaName = 'Sage';
|
|
1745
|
+
}
|
|
1746
|
+
else {
|
|
1747
|
+
const fallback = DEFAULT_VIBE_OPTIONS[index % DEFAULT_VIBE_OPTIONS.length];
|
|
1748
|
+
iconClass = fallback.IconClass;
|
|
1749
|
+
defaultPersonaName = fallback.DefaultPersonaName;
|
|
1750
|
+
}
|
|
1751
|
+
return {
|
|
1752
|
+
Key: `preset-${index}`,
|
|
1753
|
+
Label: preset.label,
|
|
1754
|
+
Subtitle: preset.description || preset.speakingStyle || preset.tone,
|
|
1755
|
+
IconClass: iconClass,
|
|
1756
|
+
Tone: preset.tone,
|
|
1757
|
+
SpeakingStyle: preset.speakingStyle ?? '',
|
|
1758
|
+
DefaultPersonaName: defaultPersonaName,
|
|
1759
|
+
};
|
|
1760
|
+
}
|
|
1761
|
+
findPersonaByName(name) {
|
|
1762
|
+
const target = name.trim().toLowerCase();
|
|
1763
|
+
const direct = this.ActivePersonas.find((p) => p.Name.trim().toLowerCase() === target);
|
|
1764
|
+
if (direct) {
|
|
1765
|
+
return direct;
|
|
1766
|
+
}
|
|
1767
|
+
if (target === 'onyx') {
|
|
1768
|
+
return this.ActivePersonas.find((p) => p.Name.trim().toLowerCase() === 'echo') ?? null;
|
|
1769
|
+
}
|
|
1770
|
+
return null;
|
|
1771
|
+
}
|
|
1772
|
+
composeGenerationPrompt() {
|
|
1773
|
+
const manual = this.AvatarPrompt.trim();
|
|
1774
|
+
if (!manual) {
|
|
1775
|
+
return this.BuildContextualAvatarPrompt(this.SelectedAvatarStyle || '3D Clay Mascot');
|
|
1776
|
+
}
|
|
1777
|
+
if (this.SelectedAvatarStyle &&
|
|
1778
|
+
!manual.toLowerCase().includes(this.SelectedAvatarStyle.toLowerCase())) {
|
|
1779
|
+
return `${manual} Visual style: ${this.SelectedAvatarStyle}. Square avatar icon, centered, no text.`;
|
|
1780
|
+
}
|
|
1781
|
+
return manual;
|
|
1782
|
+
}
|
|
1783
|
+
/**
|
|
1784
|
+
* Synthesizes a rich, agent-aware avatar generation prompt combining the agent's name,
|
|
1785
|
+
* base template domain, custom role/focus, personality/tone, standing instructions cues,
|
|
1786
|
+
* and selected visual style so generated avatars reflect what the agent actually does.
|
|
1787
|
+
*/
|
|
1788
|
+
BuildContextualAvatarPrompt(styleOverride) {
|
|
1789
|
+
const base = this.SelectedBaseAgent;
|
|
1790
|
+
const rawName = this.InstanceName.trim() || this.EditingAgent?.Name?.trim() || '';
|
|
1791
|
+
const baseName = base?.Name?.trim() || 'AI Assistant';
|
|
1792
|
+
const displaySubject = rawName ? `"${rawName}" (${baseName})` : baseName;
|
|
1793
|
+
const segments = [`Avatar portrait for personal AI agent ${displaySubject}.`];
|
|
1794
|
+
const customRole = this.Description.trim();
|
|
1795
|
+
const baseDesc = base?.Description?.trim() ?? '';
|
|
1796
|
+
const isGenericBoilerplateRole = /^personal\s+.+\s+instance\.?$/i.test(customRole);
|
|
1797
|
+
if (customRole && !isGenericBoilerplateRole) {
|
|
1798
|
+
segments.push(`Role & focus: ${this.truncateContextSnippet(customRole, 140)}.`);
|
|
1799
|
+
}
|
|
1800
|
+
else if (baseDesc) {
|
|
1801
|
+
segments.push(`Domain: ${this.truncateContextSnippet(baseDesc, 130)}.`);
|
|
1802
|
+
}
|
|
1803
|
+
const activeVibe = this.VibeOptions.find((v) => this.IsVibeActive(v));
|
|
1804
|
+
const toneText = this.Tone.trim();
|
|
1805
|
+
if (activeVibe && toneText) {
|
|
1806
|
+
segments.push(`Personality: ${activeVibe.Label} (${this.truncateContextSnippet(toneText, 90)}).`);
|
|
1807
|
+
}
|
|
1808
|
+
else if (activeVibe) {
|
|
1809
|
+
segments.push(`Personality: ${activeVibe.Label} — ${this.truncateContextSnippet(activeVibe.Subtitle, 90)}.`);
|
|
1810
|
+
}
|
|
1811
|
+
else if (toneText) {
|
|
1812
|
+
segments.push(`Personality & tone: ${this.truncateContextSnippet(toneText, 100)}.`);
|
|
1813
|
+
}
|
|
1814
|
+
const standing = this.AdditionalInstructions.trim();
|
|
1815
|
+
if (standing) {
|
|
1816
|
+
segments.push(`Specialties: ${this.truncateContextSnippet(standing, 120)}.`);
|
|
1817
|
+
}
|
|
1818
|
+
const chosenStyle = (styleOverride ?? this.SelectedAvatarStyle).trim() || '3D Clay Mascot';
|
|
1819
|
+
segments.push(`Visual style: ${chosenStyle}. Centered square avatar icon with expressive character/motif matching this role, clean contrasting background, crisp at 128x128px, no text, no letters, no watermarks.`);
|
|
1820
|
+
return segments.join(' ');
|
|
1821
|
+
}
|
|
1822
|
+
truncateContextSnippet(raw, maxLen) {
|
|
1823
|
+
const singleLine = raw.replace(/\s+/g, ' ').trim().replace(/[.]+$/, '');
|
|
1824
|
+
if (singleLine.length <= maxLen) {
|
|
1825
|
+
return singleLine;
|
|
1826
|
+
}
|
|
1827
|
+
return `${singleLine.slice(0, maxLen - 1).trimEnd()}…`;
|
|
1828
|
+
}
|
|
1829
|
+
async runAvatarImageAction(prompt, sourceImage) {
|
|
1830
|
+
this.IsGeneratingAvatar = true;
|
|
1831
|
+
this.AvatarErrorMessage = null;
|
|
1832
|
+
this.cdr.markForCheck();
|
|
1833
|
+
try {
|
|
1834
|
+
const actionId = await this.resolveGenerateImageActionId();
|
|
1835
|
+
const params = [
|
|
1836
|
+
{ Name: 'Prompt', Value: prompt, Type: 'Input' },
|
|
1837
|
+
{ Name: 'NumberOfImages', Value: '1', Type: 'Input' },
|
|
1838
|
+
{ Name: 'Size', Value: '1024x1024', Type: 'Input' },
|
|
1839
|
+
{ Name: 'OutputFormat', Value: 'base64', Type: 'Input' },
|
|
1840
|
+
];
|
|
1841
|
+
if (sourceImage) {
|
|
1842
|
+
params.push({ Name: 'SourceImage', Value: sourceImage, Type: 'Input' });
|
|
1843
|
+
}
|
|
1844
|
+
const client = new GraphQLActionClient(this.ProviderToUse);
|
|
1845
|
+
const result = await client.RunAction(actionId, params);
|
|
1846
|
+
if (!result.Success) {
|
|
1847
|
+
const reason = result.Message?.trim() || 'Image generation model is unavailable or not configured.';
|
|
1848
|
+
this.notifyAvatarFailure(reason, 'warning');
|
|
1849
|
+
return;
|
|
1850
|
+
}
|
|
1851
|
+
const media = this.extractFirstMediaOutput(result.Result);
|
|
1852
|
+
if (!media) {
|
|
1853
|
+
this.notifyAvatarFailure('Image generation completed but returned no image data. Check your image model configuration.', 'warning');
|
|
1854
|
+
return;
|
|
1855
|
+
}
|
|
1856
|
+
const sourceDataUrl = media.data
|
|
1857
|
+
? `data:${media.mimeType || 'image/png'};base64,${media.data}`
|
|
1858
|
+
: (media.url ?? '');
|
|
1859
|
+
if (!sourceDataUrl) {
|
|
1860
|
+
this.notifyAvatarFailure('Returned image payload contained neither base64 data nor a URL.', 'warning');
|
|
1861
|
+
return;
|
|
1862
|
+
}
|
|
1863
|
+
const avatarDataUrl = await this.downscaleImageToAvatarDataUrl(sourceDataUrl);
|
|
1864
|
+
const rawPngBase64 = media.data && (!media.mimeType || media.mimeType.toLowerCase().includes('png'))
|
|
1865
|
+
? media.data
|
|
1866
|
+
: null;
|
|
1867
|
+
this.applyNewAvatarDataUrl(avatarDataUrl, rawPngBase64);
|
|
1868
|
+
}
|
|
1869
|
+
catch (err) {
|
|
1870
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
1871
|
+
this.notifyAvatarFailure(`Could not generate avatar: ${msg}`);
|
|
1872
|
+
LogError(`AgentInstanceEditorModal.runAvatarImageAction: ${msg}`);
|
|
1873
|
+
}
|
|
1874
|
+
finally {
|
|
1875
|
+
this.IsGeneratingAvatar = false;
|
|
1876
|
+
this.cdr.markForCheck();
|
|
1877
|
+
}
|
|
1878
|
+
}
|
|
1879
|
+
async resolveGenerateImageActionId() {
|
|
1880
|
+
if (this.cachedGenerateImageActionId) {
|
|
1881
|
+
return this.cachedGenerateImageActionId;
|
|
1882
|
+
}
|
|
1883
|
+
try {
|
|
1884
|
+
const rv = RunView.FromMetadataProvider(this.ProviderToUse);
|
|
1885
|
+
const res = await rv.RunView({
|
|
1886
|
+
EntityName: 'MJ: Actions',
|
|
1887
|
+
ExtraFilter: `Name = '${EscapeSQLString(GENERATE_IMAGE_ACTION_NAME)}'`,
|
|
1888
|
+
Fields: ['ID'],
|
|
1889
|
+
MaxRows: 1,
|
|
1890
|
+
SkipTotalRowCount: true,
|
|
1891
|
+
ResultType: 'simple',
|
|
1892
|
+
});
|
|
1893
|
+
if (res.Success && res.Results && res.Results.length > 0 && res.Results[0]?.ID) {
|
|
1894
|
+
this.cachedGenerateImageActionId = res.Results[0].ID;
|
|
1895
|
+
return this.cachedGenerateImageActionId;
|
|
1896
|
+
}
|
|
1897
|
+
}
|
|
1898
|
+
catch {
|
|
1899
|
+
// Fall back to the shipped canonical Generate Image action ID
|
|
1900
|
+
}
|
|
1901
|
+
this.cachedGenerateImageActionId = GENERATE_IMAGE_FALLBACK_ID;
|
|
1902
|
+
return this.cachedGenerateImageActionId;
|
|
1903
|
+
}
|
|
1904
|
+
extractFirstMediaOutput(payload) {
|
|
1905
|
+
if (!payload) {
|
|
1906
|
+
return null;
|
|
1907
|
+
}
|
|
1908
|
+
const outputParams = Array.isArray(payload)
|
|
1909
|
+
? payload
|
|
1910
|
+
: Array.isArray(payload.Params)
|
|
1911
|
+
? (payload.Params ?? [])
|
|
1912
|
+
: Object.values(payload).filter((v) => Boolean(v && typeof v === 'object' && 'Name' in v));
|
|
1913
|
+
const imagesParam = outputParams.find((p) => typeof p?.Name === 'string' && p.Name.trim().toLowerCase() === 'images');
|
|
1914
|
+
if (!imagesParam || imagesParam.Value == null) {
|
|
1915
|
+
return null;
|
|
1916
|
+
}
|
|
1917
|
+
let rawImages = [];
|
|
1918
|
+
if (Array.isArray(imagesParam.Value)) {
|
|
1919
|
+
rawImages = imagesParam.Value;
|
|
1920
|
+
}
|
|
1921
|
+
else if (typeof imagesParam.Value === 'string') {
|
|
1922
|
+
try {
|
|
1923
|
+
const parsed = JSON.parse(imagesParam.Value);
|
|
1924
|
+
if (Array.isArray(parsed)) {
|
|
1925
|
+
rawImages = parsed;
|
|
1926
|
+
}
|
|
1927
|
+
}
|
|
1928
|
+
catch {
|
|
1929
|
+
return null;
|
|
1930
|
+
}
|
|
1931
|
+
}
|
|
1932
|
+
const first = rawImages.find((item) => Boolean(item && (item.data?.trim() || item.url?.trim())));
|
|
1933
|
+
return first ?? null;
|
|
1934
|
+
}
|
|
1935
|
+
async buildSourceImageForEdit() {
|
|
1936
|
+
const current = this.LogoURL.trim();
|
|
1937
|
+
if (!current) {
|
|
1938
|
+
return null;
|
|
1939
|
+
}
|
|
1940
|
+
if (this.lastGeneratedPngSource && this.lastGeneratedPngSource.dataUri === current) {
|
|
1941
|
+
return this.lastGeneratedPngSource.pngBase64;
|
|
1942
|
+
}
|
|
1943
|
+
if (current.startsWith('http://') || current.startsWith('https://')) {
|
|
1944
|
+
return current;
|
|
1945
|
+
}
|
|
1946
|
+
if (current.startsWith('data:image/')) {
|
|
1947
|
+
const pngDataUrl = await this.convertDataUrlToPngBase64(current);
|
|
1948
|
+
if (pngDataUrl) {
|
|
1949
|
+
return pngDataUrl;
|
|
1950
|
+
}
|
|
1951
|
+
return this.stripDataUrlPrefix(current);
|
|
1952
|
+
}
|
|
1953
|
+
return current;
|
|
1954
|
+
}
|
|
1955
|
+
stripDataUrlPrefix(dataUrl) {
|
|
1956
|
+
const commaIdx = dataUrl.indexOf(',');
|
|
1957
|
+
return commaIdx >= 0 ? dataUrl.slice(commaIdx + 1) : dataUrl;
|
|
1958
|
+
}
|
|
1959
|
+
async convertDataUrlToPngBase64(dataUrl) {
|
|
1960
|
+
if (typeof document === 'undefined' || typeof Image === 'undefined') {
|
|
1961
|
+
return null;
|
|
1962
|
+
}
|
|
1963
|
+
const canvas = document.createElement('canvas');
|
|
1964
|
+
canvas.width = AVATAR_REFINE_PNG_SIZE;
|
|
1965
|
+
canvas.height = AVATAR_REFINE_PNG_SIZE;
|
|
1966
|
+
const ctx = canvas.getContext('2d');
|
|
1967
|
+
if (!ctx) {
|
|
1968
|
+
return null;
|
|
1969
|
+
}
|
|
1970
|
+
try {
|
|
1971
|
+
const img = await this.loadHtmlImage(dataUrl);
|
|
1972
|
+
ctx.drawImage(img, 0, 0, AVATAR_REFINE_PNG_SIZE, AVATAR_REFINE_PNG_SIZE);
|
|
1973
|
+
const pngUri = canvas.toDataURL('image/png');
|
|
1974
|
+
return pngUri.startsWith('data:image/png;base64,')
|
|
1975
|
+
? this.stripDataUrlPrefix(pngUri)
|
|
1976
|
+
: null;
|
|
1977
|
+
}
|
|
1978
|
+
catch {
|
|
1979
|
+
return null;
|
|
1980
|
+
}
|
|
1981
|
+
}
|
|
1982
|
+
async downscaleImageToAvatarDataUrl(sourceUrl) {
|
|
1983
|
+
if (typeof document === 'undefined' || typeof Image === 'undefined') {
|
|
1984
|
+
return sourceUrl;
|
|
1985
|
+
}
|
|
1986
|
+
const canvas = document.createElement('canvas');
|
|
1987
|
+
canvas.width = AVATAR_CANVAS_SIZE;
|
|
1988
|
+
canvas.height = AVATAR_CANVAS_SIZE;
|
|
1989
|
+
const ctx = canvas.getContext('2d');
|
|
1990
|
+
if (!ctx) {
|
|
1991
|
+
return sourceUrl;
|
|
1992
|
+
}
|
|
1993
|
+
const img = await this.loadHtmlImage(sourceUrl);
|
|
1994
|
+
const width = img.naturalWidth || img.width || AVATAR_CANVAS_SIZE;
|
|
1995
|
+
const height = img.naturalHeight || img.height || AVATAR_CANVAS_SIZE;
|
|
1996
|
+
const side = Math.min(width, height);
|
|
1997
|
+
const sx = Math.max(0, Math.floor((width - side) / 2));
|
|
1998
|
+
const sy = Math.max(0, Math.floor((height - side) / 2));
|
|
1999
|
+
ctx.clearRect(0, 0, AVATAR_CANVAS_SIZE, AVATAR_CANVAS_SIZE);
|
|
2000
|
+
ctx.drawImage(img, sx, sy, side, side, 0, 0, AVATAR_CANVAS_SIZE, AVATAR_CANVAS_SIZE);
|
|
2001
|
+
const webp = canvas.toDataURL('image/webp', AVATAR_WEBP_QUALITY);
|
|
2002
|
+
if (webp && webp.startsWith('data:image/webp')) {
|
|
2003
|
+
return webp;
|
|
2004
|
+
}
|
|
2005
|
+
const png = canvas.toDataURL('image/png');
|
|
2006
|
+
return png && png.startsWith('data:image/') ? png : sourceUrl;
|
|
2007
|
+
}
|
|
2008
|
+
loadHtmlImage(src) {
|
|
2009
|
+
return new Promise((resolve, reject) => {
|
|
2010
|
+
const img = new Image();
|
|
2011
|
+
if (src.startsWith('http://') || src.startsWith('https://')) {
|
|
2012
|
+
img.crossOrigin = 'anonymous';
|
|
2013
|
+
}
|
|
2014
|
+
img.onload = () => resolve(img);
|
|
2015
|
+
img.onerror = () => reject(new Error('Failed to decode avatar image.'));
|
|
2016
|
+
img.src = src;
|
|
2017
|
+
});
|
|
2018
|
+
}
|
|
2019
|
+
readFileAsDataUrl(file) {
|
|
2020
|
+
return new Promise((resolve, reject) => {
|
|
2021
|
+
const reader = new FileReader();
|
|
2022
|
+
reader.onload = () => {
|
|
2023
|
+
if (typeof reader.result === 'string') {
|
|
2024
|
+
resolve(reader.result);
|
|
2025
|
+
}
|
|
2026
|
+
else {
|
|
2027
|
+
reject(new Error('Unsupported file reader output.'));
|
|
2028
|
+
}
|
|
2029
|
+
};
|
|
2030
|
+
reader.onerror = () => reject(new Error('Failed to read uploaded image file.'));
|
|
2031
|
+
reader.readAsDataURL(file);
|
|
2032
|
+
});
|
|
2033
|
+
}
|
|
2034
|
+
pushAvatarHistory(previousUrl) {
|
|
2035
|
+
const next = [...this.AvatarHistory, previousUrl];
|
|
2036
|
+
this.AvatarHistory = next.length > MAX_AVATAR_HISTORY ? next.slice(next.length - MAX_AVATAR_HISTORY) : next;
|
|
2037
|
+
}
|
|
2038
|
+
applyNewAvatarDataUrl(dataUrl, rawPngBase64) {
|
|
2039
|
+
this.pushAvatarHistory(this.LogoURL);
|
|
2040
|
+
this.LogoURL = dataUrl;
|
|
2041
|
+
this.AvatarPreviewError = false;
|
|
2042
|
+
this.AvatarErrorMessage = null;
|
|
2043
|
+
this.lastGeneratedPngSource = rawPngBase64
|
|
2044
|
+
? { dataUri: dataUrl, pngBase64: rawPngBase64 }
|
|
2045
|
+
: null;
|
|
2046
|
+
this.cdr.markForCheck();
|
|
2047
|
+
}
|
|
2048
|
+
notifyAvatarFailure(message, severity = 'error') {
|
|
2049
|
+
this.AvatarErrorMessage = message;
|
|
2050
|
+
MJNotificationService.Instance?.CreateSimpleNotification(message, severity, 5000);
|
|
2051
|
+
this.cdr.markForCheck();
|
|
2052
|
+
}
|
|
2053
|
+
updateSiblingCount() {
|
|
2054
|
+
const user = this.EffectiveUser;
|
|
2055
|
+
if (!user || !this.SelectedBaseAgentId) {
|
|
2056
|
+
this.existingSiblingCount = 0;
|
|
2057
|
+
return;
|
|
2058
|
+
}
|
|
2059
|
+
const engine = this.aiEngine;
|
|
2060
|
+
const root = engine.GetRootAgent(this.SelectedBaseAgentId);
|
|
2061
|
+
if (!root) {
|
|
2062
|
+
this.existingSiblingCount = 0;
|
|
2063
|
+
return;
|
|
2064
|
+
}
|
|
2065
|
+
const derived = engine.GetUserDerivedAgents(user).filter((a) => {
|
|
2066
|
+
if (this.Mode === 'edit' && this.EditingAgent && UUIDsEqual(a.ID, this.EditingAgent.ID)) {
|
|
2067
|
+
return false;
|
|
2068
|
+
}
|
|
2069
|
+
if (!UUIDsEqual(a.OwnerUserID, user.ID)) {
|
|
2070
|
+
return false;
|
|
2071
|
+
}
|
|
2072
|
+
const r = engine.GetRootAgent(a.ID);
|
|
2073
|
+
return r != null && UUIDsEqual(r.ID, root.ID);
|
|
2074
|
+
});
|
|
2075
|
+
this.existingSiblingCount = derived.length;
|
|
2076
|
+
}
|
|
2077
|
+
async savePersonaConfiguration(agentId, user) {
|
|
2078
|
+
const hasStyle = this.Tone.trim().length > 0 || this.SpeakingStyle.trim().length > 0;
|
|
2079
|
+
const personaId = this.SelectedPersonaId ?? (hasStyle ? (this.ActivePersonas[0]?.ID ?? null) : null);
|
|
2080
|
+
if (!personaId) {
|
|
2081
|
+
return;
|
|
2082
|
+
}
|
|
2083
|
+
const md = this.ProviderToUse;
|
|
2084
|
+
const rv = RunView.FromMetadataProvider(md);
|
|
2085
|
+
const existingRes = await rv.RunView({
|
|
2086
|
+
EntityName: 'MJ: AI Agent Personas',
|
|
2087
|
+
ExtraFilter: `AgentID='${agentId}' AND IsDefault=1`,
|
|
2088
|
+
MaxRows: 1,
|
|
2089
|
+
ResultType: 'entity_object',
|
|
2090
|
+
}, user);
|
|
2091
|
+
let link;
|
|
2092
|
+
if (existingRes.Success && existingRes.Results.length > 0) {
|
|
2093
|
+
link = existingRes.Results[0];
|
|
2094
|
+
}
|
|
2095
|
+
else {
|
|
2096
|
+
link = await md.GetEntityObject('MJ: AI Agent Personas', user);
|
|
2097
|
+
link.NewRecord();
|
|
2098
|
+
link.AgentID = agentId;
|
|
2099
|
+
link.IsDefault = true;
|
|
2100
|
+
link.IsAllowed = true;
|
|
2101
|
+
link.Sequence = 10;
|
|
2102
|
+
}
|
|
2103
|
+
link.PersonaID = personaId;
|
|
2104
|
+
const styleObj = {
|
|
2105
|
+
...(link.StyleOverrideObject ?? {}),
|
|
2106
|
+
};
|
|
2107
|
+
if (this.Tone.trim()) {
|
|
2108
|
+
styleObj.Tone = this.Tone.trim();
|
|
2109
|
+
}
|
|
2110
|
+
else {
|
|
2111
|
+
delete styleObj.Tone;
|
|
2112
|
+
}
|
|
2113
|
+
if (this.SpeakingStyle.trim()) {
|
|
2114
|
+
styleObj.SpeakingStyle = this.SpeakingStyle.trim();
|
|
2115
|
+
}
|
|
2116
|
+
else {
|
|
2117
|
+
delete styleObj.SpeakingStyle;
|
|
2118
|
+
}
|
|
2119
|
+
link.StyleOverrideObject =
|
|
2120
|
+
styleObj.Tone || styleObj.SpeakingStyle || styleObj.Visual ? styleObj : null;
|
|
2121
|
+
const saved = await link.Save();
|
|
2122
|
+
if (!saved) {
|
|
2123
|
+
throw new Error(link.LatestResult?.CompleteMessage || 'Failed to save persona style.');
|
|
2124
|
+
}
|
|
2125
|
+
}
|
|
2126
|
+
async saveUserPolicy(agentId, displayName, user) {
|
|
2127
|
+
const md = this.ProviderToUse;
|
|
2128
|
+
const lookup = await AgentUserPolicyEngine.Instance.ResolvePolicyForAgentAndUser(agentId, user.ID, user, { forceRefresh: true, provider: md });
|
|
2129
|
+
const policy = await md.GetEntityObject('MJ: AI Agent User Policies', user);
|
|
2130
|
+
if (lookup.status === 'found' && lookup.policy) {
|
|
2131
|
+
const loaded = await policy.InnerLoad(CompositeKey.FromID(lookup.policy.ID));
|
|
2132
|
+
if (!loaded) {
|
|
2133
|
+
return;
|
|
2134
|
+
}
|
|
2135
|
+
}
|
|
2136
|
+
else {
|
|
2137
|
+
policy.NewRecord();
|
|
2138
|
+
policy.AgentID = agentId;
|
|
2139
|
+
policy.UserID = user.ID;
|
|
2140
|
+
ApplyDefaultAgentUserPolicyValues(policy);
|
|
2141
|
+
policy.OnboardingStatus = 'Completed';
|
|
2142
|
+
policy.OnboardedAt = new Date();
|
|
2143
|
+
}
|
|
2144
|
+
policy.DisplayNameOverride = displayName;
|
|
2145
|
+
if (this.SelectedPersonaId) {
|
|
2146
|
+
policy.PreferredPersonaID = this.SelectedPersonaId;
|
|
2147
|
+
}
|
|
2148
|
+
if (this.CoordinationMode) {
|
|
2149
|
+
policy.CoordinationMode = this.CoordinationMode;
|
|
2150
|
+
}
|
|
2151
|
+
const saved = await policy.Save();
|
|
2152
|
+
if (!saved) {
|
|
2153
|
+
throw new Error(policy.LatestResult?.CompleteMessage || 'Failed to save agent user policy.');
|
|
2154
|
+
}
|
|
2155
|
+
AgentUserPolicyEngine.Instance.SetCachedPolicy(policy);
|
|
2156
|
+
}
|
|
2157
|
+
closeInternal(emitClosed) {
|
|
2158
|
+
this.Visible = false;
|
|
2159
|
+
this.VisibleChange.emit(false);
|
|
2160
|
+
if (emitClosed) {
|
|
2161
|
+
this.Closed.emit();
|
|
2162
|
+
}
|
|
2163
|
+
this.cdr.markForCheck();
|
|
2164
|
+
}
|
|
2165
|
+
static ɵfac = /*@__PURE__*/ (() => { let ɵAgentInstanceEditorModalComponent_BaseFactory; return function AgentInstanceEditorModalComponent_Factory(__ngFactoryType__) { return (ɵAgentInstanceEditorModalComponent_BaseFactory || (ɵAgentInstanceEditorModalComponent_BaseFactory = i0.ɵɵgetInheritedFactory(AgentInstanceEditorModalComponent)))(__ngFactoryType__ || AgentInstanceEditorModalComponent); }; })();
|
|
2166
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AgentInstanceEditorModalComponent, selectors: [["mj-agent-instance-editor-modal"]], hostBindings: function AgentInstanceEditorModalComponent_HostBindings(rf, ctx) { if (rf & 1) {
|
|
2167
|
+
i0.ɵɵlistener("resize", function AgentInstanceEditorModalComponent_resize_HostBindingHandler() { return ctx.OnWindowResize(); }, i0.ɵɵresolveWindow);
|
|
2168
|
+
} }, inputs: { Visible: "Visible", CurrentUser: "CurrentUser", Mode: "Mode", EditingAgent: "EditingAgent", InitialBaseAgentId: "InitialBaseAgentId" }, outputs: { VisibleChange: "VisibleChange", Saved: "Saved", ChatToOnboard: "ChatToOnboard", Archived: "Archived", Closed: "Closed" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], decls: 1, vars: 1, consts: [[3, "Title", "Visible", "Width", "MinWidth"], [3, "Close", "Title", "Visible", "Width", "MinWidth"], [1, "aie-body"], [1, "aie-loading"], ["role", "region", "aria-label", "Avatar Studio", 1, "aie-avatar-studio", "aie-avatar-studio--overlay"], [1, "aie-actions-bar"], ["text", "Loading agent studio...", "size", "medium"], [1, "aie-studio-topbar"], ["type", "button", 1, "aie-studio-back-btn", 3, "click", "disabled"], [1, "fa-solid", "fa-arrow-left"], [1, "aie-pill"], [1, "aie-studio-hero"], [1, "aie-studio-hero-avatar"], [3, "src", "alt"], [3, "class"], ["aria-hidden", "true", 1, "aie-studio-hero-spinner"], [1, "aie-studio-hero-meta"], [1, "aie-studio-hero-name"], [1, "aie-studio-hero-sub"], ["role", "tablist", "aria-label", "Avatar source", 1, "aie-studio-tabs"], ["type", "button", "role", "tab", 1, "aie-studio-tab", 3, "click"], [1, "fa-solid", "fa-wand-magic-sparkles"], [1, "fa-solid", "fa-icons"], [1, "fa-solid", "fa-upload"], ["role", "alert", 1, "aie-studio-error"], ["role", "tabpanel", 1, "aie-studio-pane"], [3, "error", "src", "alt"], [1, "fa-solid", "fa-spinner", "fa-spin"], [1, "fa-solid", "fa-triangle-exclamation"], [1, "aie-label-row"], ["for", "aie-avatar-prompt", 1, "aie-sublabel", "aie-sublabel--flush"], ["type", "button", "title", "Rebuild prompt using this agent's name, role, personality, and instructions", 1, "aie-link-btn", 3, "click", "disabled"], [1, "fa-solid", "fa-rotate"], ["id", "aie-avatar-prompt", "rows", "4", "placeholder", "Describe your agent's avatar \u2014 automatically tailored to your agent's name, role, personality, and instructions...", "aria-label", "Avatar generation prompt", 1, "aie-textarea", "aie-studio-prompt-textarea", 3, "ngModelChange", "input", "ngModel", "disabled"], [1, "aie-studio-generate-bar"], ["role", "group", "aria-label", "Avatar style presets", 1, "aie-chip-row"], [1, "aie-chip-hint"], ["type", "button", 1, "aie-chip", 3, "aie-chip--active", "disabled"], ["mjButton", "", "variant", "primary", "size", "sm", "type", "button", 1, "aie-studio-generate-btn", 3, "click", "disabled"], [1, "aie-refine-box"], ["type", "button", 1, "aie-chip", 3, "click", "disabled"], ["for", "aie-avatar-refine-input", 1, "aie-refine-label"], [1, "fa-solid", "fa-arrows-rotate"], [1, "aie-studio-refine-row"], ["id", "aie-avatar-refine-input", "rows", "2", "placeholder", "Describe tweaks \u2014 e.g., \"Add sleek glasses\", \"Make background deep teal\"", 1, "aie-textarea", "aie-studio-refine-textarea", 3, "ngModelChange", "ngModel", "disabled"], ["mjButton", "", "variant", "outline", "size", "sm", "type", "button", 3, "click", "disabled"], [1, "fa-solid", "fa-sliders"], [1, "aie-chip-row"], ["type", "button", 1, "aie-chip", 3, "disabled"], [1, "aie-icon-grid", "aie-icon-grid--roomy"], ["type", "button", 1, "aie-icon-tile", "aie-icon-tile--labeled", 3, "aie-icon-tile--selected", "title"], ["type", "button", 1, "aie-icon-tile", "aie-icon-tile--labeled", 3, "click", "title"], [1, "aie-icon-tile-label"], [1, "aie-upload-dropzone"], [1, "fa-solid", "fa-cloud-arrow-up"], [1, "aie-upload-sub"], ["type", "file", "accept", "image/*", 1, "aie-file-input", 3, "change"], ["for", "aie-logo-url", 1, "aie-sublabel"], ["id", "aie-logo-url", "type", "url", "placeholder", "https://example.com/avatar.png", 1, "aie-input", 3, "ngModelChange", "ngModel"], [1, "aie-identity-header"], ["type", "button", "title", "Click to pick an icon, upload an image, or generate an AI avatar", 1, "aie-avatar-trigger", 3, "click"], ["aria-hidden", "true", 1, "aie-avatar-badge"], [1, "aie-identity-context"], [1, "aie-identity-eyebrow-row"], [1, "aie-identity-eyebrow"], [1, "aie-primary-pill"], [1, "aie-identity-controls"], ["type", "button", 1, "aie-tpl-pill-btn"], [1, "aie-tpl-pill-static"], ["mjButton", "", "variant", "outline", "size", "sm", "type", "button", "title", "Set up conversationally in chat instead of using the form"], [1, "aie-identity-desc"], ["role", "region", "aria-label", "Choose base template", 1, "aie-tpl-picker"], ["Variant", "error"], [1, "aie-section"], ["for", "aie-instance-name", 1, "aie-label"], [1, "aie-required"], [1, "aie-mention-hint"], ["id", "aie-instance-name", "type", "text", "placeholder", "Give your agent a name (e.g., Pepper, Cato, Jarvis)...", "autocomplete", "off", 1, "aie-input", 3, "ngModelChange", "ngModel"], [1, "aie-label"], ["role", "group", "aria-label", "Personality vibe", 1, "aie-vibe-grid"], ["type", "button", 1, "aie-vibe-card", 3, "aie-vibe-card--active"], [1, "aie-disclosure", 3, "toggle", "open"], [1, "aie-disclosure-summary"], [1, "aie-disclosure-title"], [1, "aie-disclosure-meta"], ["aria-hidden", "true", 1, "fa-solid", "fa-chevron-down", "aie-disclosure-chevron"], [1, "aie-disclosure-body"], [1, "aie-two-col"], ["for", "aie-tone", 1, "aie-sublabel"], ["id", "aie-tone", "type", "text", "placeholder", "e.g., Direct, playful, analytical", 1, "aie-input", 3, "ngModelChange", "ngModel"], ["for", "aie-style", 1, "aie-sublabel"], ["id", "aie-style", "type", "text", "placeholder", "e.g., Crisp bullets, zero fluff", 1, "aie-input", 3, "ngModelChange", "ngModel"], ["for", "aie-instance-desc", 1, "aie-sublabel"], ["id", "aie-instance-desc", "type", "text", "placeholder", "Optional short description of what this instance focuses on", 1, "aie-input", 3, "ngModelChange", "ngModel"], ["for", "aie-instructions", 1, "aie-sublabel"], ["id", "aie-instructions", "rows", "3", "placeholder", "Custom ground rules, priorities, or domain focus stacked onto every run...", 1, "aie-textarea", 3, "ngModelChange", "ngModel"], [1, "aie-primary-row"], [1, "aie-archive-confirm"], [1, "fa-solid", "fa-star"], ["type", "button", 1, "aie-tpl-pill-btn", 3, "click"], [1, "aie-tpl-pill-label"], [1, "aie-tpl-change-hint"], [1, "fa-solid"], ["mjButton", "", "variant", "outline", "size", "sm", "type", "button", "title", "Set up conversationally in chat instead of using the form", 3, "click"], [1, "fa-solid", "fa-comments"], [1, "aie-tpl-search-wrap"], ["aria-hidden", "true", 1, "fa-solid", "fa-magnifying-glass", "aie-tpl-search-icon"], ["type", "search", "placeholder", "Filter templates by name, category, or skill...", "aria-label", "Filter base templates", 1, "aie-input", "aie-tpl-search-input", 3, "ngModelChange", "ngModel"], ["role", "group", "aria-label", "Template categories", 1, "aie-chip-row"], ["role", "listbox", "aria-label", "Available templates", 1, "aie-tpl-list"], [1, "aie-tpl-empty"], ["type", "button", 1, "aie-chip", 3, "aie-chip--active"], ["type", "button", 1, "aie-chip", 3, "click"], ["type", "button", "role", "option", 1, "aie-tpl-row", 3, "aie-tpl-row--selected"], ["type", "button", "role", "option", 1, "aie-tpl-row", 3, "click"], [1, "aie-tpl-row-icon"], [1, "aie-tpl-row-text"], [1, "aie-tpl-row-name"], [1, "aie-tpl-row-desc"], [1, "aie-pill", "aie-pill--muted"], ["type", "button", 1, "aie-vibe-card", 3, "click"], [1, "aie-vibe-head"], [1, "aie-vibe-title"], [1, "aie-vibe-sub"], [1, "aie-voice-hint"], [1, "fa-solid", "fa-earth-americas"], ["type", "button", 1, "aie-chip", 3, "aie-chip--active", "title"], ["type", "button", 1, "aie-link-btn"], ["type", "button", 1, "aie-chip", 3, "click", "title"], [1, "fa-solid", "fa-microphone-lines"], ["type", "button", 1, "aie-link-btn", 3, "click"], [1, "aie-sublabel"], ["role", "group", "aria-label", "Coordination autonomy", 1, "aie-mode-row"], ["type", "button", 1, "aie-mode-pill", 3, "aie-mode-pill--active"], ["type", "button", 1, "aie-mode-pill", 3, "click"], [1, "aie-mode-pill-title"], [1, "aie-mode-pill-hint"], [1, "aie-checkbox-label"], ["type", "checkbox", 3, "ngModelChange", "ngModel"], [1, "aie-checkbox-sub"], [1, "aie-archive-confirm-actions"], ["mjButton", "", "variant", "danger", "size", "sm", "type", "button", 3, "click", "disabled"], [1, "aie-actions-primary"], ["mjButton", "", "variant", "primary", "type", "button", 3, "click", "disabled"], [1, "fa-solid", "fa-check"], [1, "aie-studio-footer"], ["mjButton", "", "variant", "outline", "size", "sm", "type", "button", 3, "disabled"], ["mjButton", "", "variant", "flat", "size", "sm", "type", "button", 3, "disabled"], [1, "fa-solid", "fa-rotate-left"], ["mjButton", "", "variant", "flat", "size", "sm", "type", "button", 3, "click", "disabled"], ["mjButton", "", "variant", "outline", "type", "button", 3, "click", "disabled"], [1, "fa-solid", "fa-box-archive"]], template: function AgentInstanceEditorModalComponent_Template(rf, ctx) { if (rf & 1) {
|
|
2169
|
+
i0.ɵɵconditionalCreate(0, AgentInstanceEditorModalComponent_Conditional_0_Template, 8, 6, "mj-dialog", 0);
|
|
2170
|
+
} if (rf & 2) {
|
|
2171
|
+
i0.ɵɵconditional(ctx.Visible ? 0 : -1);
|
|
2172
|
+
} }, dependencies: [i1.DefaultValueAccessor, i1.CheckboxControlValueAccessor, i1.NgControlStatus, i1.NgModel, i2.MJButtonDirective, i2.MJDialogComponent, i2.MJDialogActionsComponent, i2.MJAlertComponent, i3.LoadingComponent], styles: [".aie-body[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 15px;\n max-height: 74vh;\n overflow-y: auto;\n padding: 2px;\n}\n\n.aie-loading[_ngcontent-%COMP%] {\n display: flex;\n justify-content: center;\n padding: 40px 0;\n}\n\n\n\n\n\n.aie-identity-header[_ngcontent-%COMP%] {\n display: flex;\n align-items: flex-start;\n gap: 14px;\n}\n\n.aie-avatar-trigger[_ngcontent-%COMP%] {\n position: relative;\n flex: 0 0 68px;\n width: 68px;\n height: 68px;\n padding: 0;\n border-radius: var(--mj-radius-full, 999px);\n border: 2px solid var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 12%, var(--mj-bg-surface-card));\n color: var(--mj-brand-primary);\n font-size: 26px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n cursor: pointer;\n transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;\n}\n\n.aie-avatar-trigger[_ngcontent-%COMP%]:hover {\n transform: scale(1.03);\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-brand-primary) 20%, transparent);\n}\n\n.aie-avatar-trigger--open[_ngcontent-%COMP%] {\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-brand-primary) 28%, transparent);\n}\n\n.aie-avatar-trigger[_ngcontent-%COMP%]:focus-visible {\n outline: none;\n box-shadow: var(--mj-focus-ring);\n}\n\n.aie-avatar-trigger[_ngcontent-%COMP%] img[_ngcontent-%COMP%] {\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n\n.aie-avatar-badge[_ngcontent-%COMP%] {\n position: absolute;\n left: 50%;\n bottom: 2px;\n transform: translateX(-50%);\n display: inline-flex;\n align-items: center;\n gap: 3px;\n padding: 1px 6px;\n border-radius: var(--mj-radius-full, 999px);\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n font-size: 9.5px;\n font-weight: 700;\n letter-spacing: 0.02em;\n white-space: nowrap;\n}\n\n.aie-identity-context[_ngcontent-%COMP%] {\n flex: 1 1 auto;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.aie-identity-eyebrow-row[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n flex-wrap: wrap;\n}\n\n.aie-identity-eyebrow[_ngcontent-%COMP%] {\n font-size: 10.5px;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 0.06em;\n color: var(--mj-text-muted);\n}\n\n.aie-identity-controls[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 8px;\n}\n\n.aie-tpl-pill-btn[_ngcontent-%COMP%], \n.aie-tpl-pill-static[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 5px 11px;\n border-radius: var(--mj-radius-full, 999px);\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-primary);\n font-family: inherit;\n font-size: 12px;\n line-height: 1.3;\n max-width: 100%;\n}\n\n.aie-tpl-pill-btn[_ngcontent-%COMP%] {\n appearance: none;\n cursor: pointer;\n transition: border-color 120ms ease, background 120ms ease;\n}\n\n.aie-tpl-pill-btn[_ngcontent-%COMP%]:hover {\n border-color: var(--mj-brand-primary);\n background: var(--mj-bg-surface-hover);\n}\n\n.aie-tpl-pill-btn[_ngcontent-%COMP%]:focus-visible {\n outline: none;\n box-shadow: var(--mj-focus-ring);\n}\n\n.aie-tpl-pill-label[_ngcontent-%COMP%] {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.aie-tpl-change-hint[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n color: var(--mj-brand-primary);\n font-weight: 700;\n white-space: nowrap;\n}\n\n.aie-identity-desc[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 12px;\n color: var(--mj-text-secondary);\n line-height: 1.4;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n}\n\n.aie-primary-pill[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n font-size: 10.5px;\n font-weight: 700;\n padding: 2px 7px;\n border-radius: var(--mj-radius-full, 999px);\n background: var(--mj-status-warning-bg);\n color: var(--mj-status-warning);\n}\n\n\n\n\n\n.aie-tpl-picker[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 9px;\n padding: 12px;\n border-radius: var(--mj-radius-md, 10px);\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface-card);\n}\n\n.aie-tpl-search-wrap[_ngcontent-%COMP%] {\n position: relative;\n}\n\n.aie-tpl-search-icon[_ngcontent-%COMP%] {\n position: absolute;\n left: 11px;\n top: 50%;\n transform: translateY(-50%);\n font-size: 12px;\n color: var(--mj-text-muted);\n pointer-events: none;\n}\n\n.aie-input.aie-tpl-search-input[_ngcontent-%COMP%] {\n padding-left: 34px;\n font-size: 12.5px;\n}\n\n.aie-tpl-list[_ngcontent-%COMP%] {\n max-height: 204px;\n overflow-y: auto;\n display: flex;\n flex-direction: column;\n gap: 5px;\n}\n\n.aie-tpl-empty[_ngcontent-%COMP%] {\n padding: 12px 8px;\n text-align: center;\n font-size: 12px;\n color: var(--mj-text-muted);\n}\n\n.aie-tpl-row[_ngcontent-%COMP%] {\n appearance: none;\n width: 100%;\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 8px 10px;\n text-align: left;\n font-family: inherit;\n border-radius: var(--mj-radius-md, 8px);\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n cursor: pointer;\n transition: border-color 120ms ease, background 120ms ease;\n}\n\n.aie-tpl-row[_ngcontent-%COMP%]:hover {\n background: var(--mj-bg-surface-hover);\n border-color: var(--mj-border-strong);\n}\n\n.aie-tpl-row--selected[_ngcontent-%COMP%] {\n border-color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, var(--mj-bg-surface));\n}\n\n.aie-tpl-row-icon[_ngcontent-%COMP%] {\n flex: 0 0 28px;\n width: 28px;\n height: 28px;\n border-radius: var(--mj-radius-sm, 6px);\n display: inline-flex;\n align-items: center;\n justify-content: center;\n background: color-mix(in srgb, var(--mj-brand-primary) 12%, var(--mj-bg-surface));\n color: var(--mj-brand-primary);\n font-size: 13px;\n}\n\n.aie-tpl-row-text[_ngcontent-%COMP%] {\n flex: 1 1 auto;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.aie-tpl-row-name[_ngcontent-%COMP%] {\n font-size: 12.5px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n\n.aie-tpl-row-desc[_ngcontent-%COMP%] {\n font-size: 11px;\n color: var(--mj-text-muted);\n display: -webkit-box;\n -webkit-line-clamp: 1;\n -webkit-box-orient: vertical;\n overflow: hidden;\n}\n\n\n\n\n\n.aie-avatar-studio[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 14px;\n}\n\n.aie-avatar-studio--overlay[_ngcontent-%COMP%] {\n min-height: 360px;\n}\n\n.aie-studio-topbar[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 10px;\n}\n\n.aie-studio-back-btn[_ngcontent-%COMP%] {\n appearance: none;\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-primary);\n border-radius: var(--mj-radius-full, 999px);\n padding: 5px 12px;\n font-family: inherit;\n font-size: 12px;\n font-weight: 600;\n display: inline-flex;\n align-items: center;\n gap: 6px;\n cursor: pointer;\n transition: border-color 120ms ease, background 120ms ease, color 120ms ease;\n}\n\n.aie-studio-back-btn[_ngcontent-%COMP%]:hover:not(:disabled) {\n border-color: var(--mj-brand-primary);\n color: var(--mj-brand-primary);\n background: var(--mj-bg-surface-hover);\n}\n\n.aie-studio-back-btn[_ngcontent-%COMP%]:disabled {\n opacity: 0.55;\n cursor: not-allowed;\n}\n\n.aie-studio-hero[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 16px;\n padding: 14px 16px;\n border-radius: var(--mj-radius-md, 10px);\n border: 1px solid var(--mj-border-default);\n background: color-mix(in srgb, var(--mj-brand-primary) 7%, var(--mj-bg-surface-card));\n}\n\n.aie-studio-hero-avatar[_ngcontent-%COMP%] {\n position: relative;\n flex: 0 0 92px;\n width: 92px;\n height: 92px;\n border-radius: var(--mj-radius-full, 999px);\n border: 2.5px solid var(--mj-brand-primary);\n background: var(--mj-bg-surface);\n color: var(--mj-brand-primary);\n font-size: 36px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n box-shadow: 0 4px 16px color-mix(in srgb, var(--mj-brand-primary) 18%, transparent);\n}\n\n.aie-studio-hero-avatar[_ngcontent-%COMP%] img[_ngcontent-%COMP%] {\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n\n.aie-studio-hero-spinner[_ngcontent-%COMP%] {\n position: absolute;\n inset: 0;\n background: color-mix(in srgb, var(--mj-bg-surface) 72%, transparent);\n color: var(--mj-brand-primary);\n font-size: 26px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n}\n\n.aie-studio-hero-meta[_ngcontent-%COMP%] {\n flex: 1 1 auto;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.aie-studio-hero-name[_ngcontent-%COMP%] {\n font-size: 16px;\n font-weight: 700;\n color: var(--mj-text-primary);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.aie-studio-hero-sub[_ngcontent-%COMP%] {\n font-size: 12px;\n color: var(--mj-text-secondary);\n line-height: 1.4;\n}\n\n.aie-studio-tabs[_ngcontent-%COMP%] {\n display: flex;\n gap: 6px;\n flex-wrap: wrap;\n}\n\n.aie-studio-tab[_ngcontent-%COMP%] {\n appearance: none;\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n color: var(--mj-text-secondary);\n border-radius: var(--mj-radius-full, 999px);\n padding: 6px 13px;\n font-family: inherit;\n font-size: 12.5px;\n font-weight: 600;\n display: inline-flex;\n align-items: center;\n gap: 6px;\n cursor: pointer;\n transition: border-color 120ms ease, background 120ms ease, color 120ms ease;\n}\n\n.aie-studio-tab[_ngcontent-%COMP%]:hover {\n border-color: var(--mj-border-strong);\n color: var(--mj-text-primary);\n}\n\n.aie-studio-tab--active[_ngcontent-%COMP%] {\n border-color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 13%, var(--mj-bg-surface));\n color: var(--mj-brand-primary);\n}\n\n.aie-studio-error[_ngcontent-%COMP%] {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n padding: 9px 12px;\n border-radius: var(--mj-radius-sm, 6px);\n border: 1px solid var(--mj-status-warning);\n background: var(--mj-status-warning-bg);\n color: var(--mj-status-warning-text, var(--mj-text-primary));\n font-size: 12px;\n line-height: 1.4;\n}\n\n.aie-studio-pane[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 11px;\n}\n\n.aie-sublabel--flush[_ngcontent-%COMP%] {\n margin-bottom: 0;\n}\n\n.aie-studio-prompt-textarea[_ngcontent-%COMP%] {\n min-height: 92px;\n line-height: 1.45;\n font-size: 13px;\n}\n\n.aie-studio-generate-bar[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-wrap: wrap;\n gap: 10px;\n}\n\n.aie-studio-generate-btn[_ngcontent-%COMP%] {\n margin-left: auto;\n}\n\n.aie-refine-box[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding-top: 12px;\n border-top: 1px solid var(--mj-border-default);\n}\n\n.aie-refine-label[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n font-size: 12px;\n font-weight: 700;\n color: var(--mj-brand-primary);\n}\n\n.aie-studio-refine-row[_ngcontent-%COMP%] {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n}\n\n.aie-studio-refine-textarea[_ngcontent-%COMP%] {\n flex: 1 1 auto;\n min-width: 0;\n min-height: 54px;\n line-height: 1.4;\n font-size: 12.5px;\n}\n\n.aie-upload-dropzone[_ngcontent-%COMP%] {\n position: relative;\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 16px;\n border-radius: var(--mj-radius-md, 8px);\n border: 1px dashed var(--mj-border-strong);\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-primary);\n font-size: 13px;\n cursor: pointer;\n transition: border-color 120ms ease, background 120ms ease;\n}\n\n.aie-upload-dropzone[_ngcontent-%COMP%]:hover {\n border-color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 7%, var(--mj-bg-surface-sunken));\n}\n\n.aie-upload-dropzone[_ngcontent-%COMP%] > i[_ngcontent-%COMP%] {\n font-size: 20px;\n color: var(--mj-brand-primary);\n}\n\n.aie-upload-sub[_ngcontent-%COMP%] {\n display: block;\n font-size: 11.5px;\n color: var(--mj-text-muted);\n margin-top: 2px;\n}\n\n.aie-file-input[_ngcontent-%COMP%] {\n position: absolute;\n inset: 0;\n opacity: 0;\n cursor: pointer;\n}\n\n.aie-studio-footer[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n flex-wrap: wrap;\n gap: 8px;\n}\n\n.aie-icon-grid--roomy[_ngcontent-%COMP%] {\n grid-template-columns: repeat(4, minmax(0, 1fr));\n gap: 8px;\n}\n\n.aie-icon-tile--labeled[_ngcontent-%COMP%] {\n height: auto;\n min-height: 58px;\n padding: 8px 6px;\n flex-direction: column;\n gap: 5px;\n}\n\n.aie-icon-tile-label[_ngcontent-%COMP%] {\n font-size: 11px;\n font-weight: 600;\n line-height: 1.1;\n}\n\n\n\n\n\n.aie-section[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.aie-label-row[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n flex-wrap: wrap;\n}\n\n.aie-label[_ngcontent-%COMP%] {\n font-size: 12.5px;\n font-weight: 700;\n color: var(--mj-text-primary);\n}\n\n.aie-sublabel[_ngcontent-%COMP%] {\n display: block;\n font-size: 11.5px;\n font-weight: 600;\n color: var(--mj-text-secondary);\n margin-bottom: 4px;\n}\n\n.aie-required[_ngcontent-%COMP%] {\n color: var(--mj-status-error);\n}\n\n.aie-mention-hint[_ngcontent-%COMP%] {\n font-size: 11px;\n color: var(--mj-text-muted);\n}\n\n.aie-mention-hint[_ngcontent-%COMP%] code[_ngcontent-%COMP%] {\n font-weight: 600;\n color: var(--mj-brand-primary);\n}\n\n.aie-voice-hint[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n font-size: 11px;\n color: var(--mj-text-muted);\n}\n\n.aie-pill[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n font-size: 10.5px;\n font-weight: 700;\n padding: 2px 8px;\n border-radius: var(--mj-radius-full, 999px);\n background: var(--mj-status-info-bg);\n color: var(--mj-status-info);\n white-space: nowrap;\n}\n\n.aie-pill--muted[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-secondary);\n}\n\n.aie-input[_ngcontent-%COMP%], \n.aie-textarea[_ngcontent-%COMP%] {\n width: 100%;\n box-sizing: border-box;\n padding: 9px 11px;\n font-size: 13.5px;\n font-family: inherit;\n color: var(--mj-text-primary);\n background: var(--mj-bg-surface-card);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md, 8px);\n transition: border-color 120ms ease, box-shadow 120ms ease;\n}\n\n.aie-input[_ngcontent-%COMP%]:focus, \n.aie-textarea[_ngcontent-%COMP%]:focus {\n outline: none;\n border-color: var(--mj-border-focus);\n box-shadow: var(--mj-focus-ring);\n}\n\n.aie-textarea[_ngcontent-%COMP%] {\n resize: vertical;\n min-height: 70px;\n}\n\n.aie-vibe-grid[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 8px;\n}\n\n.aie-vibe-card[_ngcontent-%COMP%] {\n appearance: none;\n text-align: left;\n font-family: inherit;\n display: flex;\n flex-direction: column;\n gap: 4px;\n padding: 10px 12px;\n min-height: 44px;\n border-radius: var(--mj-radius-md, 10px);\n border: 1.5px solid var(--mj-border-default);\n background: var(--mj-bg-surface-card);\n color: var(--mj-text-primary);\n cursor: pointer;\n transition: border-color 120ms ease, background 120ms ease;\n}\n\n.aie-vibe-card[_ngcontent-%COMP%]:hover {\n border-color: var(--mj-border-strong);\n background: var(--mj-bg-surface-hover);\n}\n\n.aie-vibe-card--active[_ngcontent-%COMP%] {\n border-color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 11%, var(--mj-bg-surface-card));\n}\n\n.aie-vibe-card[_ngcontent-%COMP%]:focus-visible {\n outline: none;\n box-shadow: var(--mj-focus-ring);\n}\n\n.aie-vibe-head[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 7px;\n font-size: 13px;\n font-weight: 700;\n color: var(--mj-text-primary);\n}\n\n.aie-vibe-head[_ngcontent-%COMP%] > i[_ngcontent-%COMP%] {\n color: var(--mj-brand-primary);\n font-size: 12.5px;\n}\n\n.aie-vibe-sub[_ngcontent-%COMP%] {\n font-size: 11.5px;\n color: var(--mj-text-secondary);\n line-height: 1.35;\n}\n\n\n\n\n\n.aie-disclosure[_ngcontent-%COMP%] {\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md, 10px);\n background: var(--mj-bg-surface-sunken);\n overflow: hidden;\n}\n\n.aie-disclosure-summary[_ngcontent-%COMP%] {\n list-style: none;\n padding: 11px 13px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 10px;\n cursor: pointer;\n font-size: 12.5px;\n font-weight: 600;\n color: var(--mj-text-primary);\n user-select: none;\n}\n\n.aie-disclosure-summary[_ngcontent-%COMP%]::-webkit-details-marker {\n display: none;\n}\n\n.aie-disclosure-summary[_ngcontent-%COMP%]:hover {\n background: var(--mj-bg-surface-hover);\n}\n\n.aie-disclosure-title[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n min-width: 0;\n}\n\n.aie-disclosure-title[_ngcontent-%COMP%] > i[_ngcontent-%COMP%] {\n color: var(--mj-brand-primary);\n}\n\n.aie-disclosure-meta[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n flex-shrink: 0;\n}\n\n.aie-disclosure-chevron[_ngcontent-%COMP%] {\n font-size: 11px;\n color: var(--mj-text-muted);\n transition: transform 150ms ease;\n}\n\n.aie-disclosure[open][_ngcontent-%COMP%] .aie-disclosure-chevron[_ngcontent-%COMP%] {\n transform: rotate(180deg);\n}\n\n.aie-disclosure-body[_ngcontent-%COMP%] {\n padding: 13px;\n border-top: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n display: flex;\n flex-direction: column;\n gap: 13px;\n}\n\n\n\n\n\n.aie-chip-row[_ngcontent-%COMP%] {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 6px;\n}\n\n.aie-chip-hint[_ngcontent-%COMP%] {\n font-size: 11.5px;\n color: var(--mj-text-muted);\n}\n\n.aie-chip[_ngcontent-%COMP%] {\n appearance: none;\n font-family: inherit;\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 4px 10px;\n font-size: 12px;\n font-weight: 500;\n border-radius: var(--mj-radius-full, 999px);\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n color: var(--mj-text-secondary);\n cursor: pointer;\n transition: background 120ms ease, border-color 120ms ease, color 120ms ease;\n}\n\n.aie-chip[_ngcontent-%COMP%]:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n}\n\n.aie-chip--active[_ngcontent-%COMP%] {\n border-color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 14%, var(--mj-bg-surface));\n color: var(--mj-brand-primary);\n font-weight: 600;\n}\n\n.aie-icon-grid[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: repeat(6, minmax(0, 1fr));\n gap: 6px;\n}\n\n.aie-icon-tile[_ngcontent-%COMP%] {\n height: 38px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: var(--mj-radius-md, 8px);\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n color: var(--mj-text-secondary);\n font-size: 15px;\n cursor: pointer;\n transition: background 120ms ease, border-color 120ms ease, color 120ms ease;\n}\n\n.aie-icon-tile[_ngcontent-%COMP%]:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n}\n\n.aie-icon-tile--selected[_ngcontent-%COMP%] {\n border-color: var(--mj-brand-primary);\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n}\n\n.aie-two-col[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 10px;\n}\n\n.aie-mode-row[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: repeat(3, minmax(0, 1fr));\n gap: 8px;\n}\n\n.aie-mode-pill[_ngcontent-%COMP%] {\n appearance: none;\n font-family: inherit;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 2px;\n padding: 9px 10px;\n min-height: 44px;\n border-radius: var(--mj-radius-md, 8px);\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface-card);\n cursor: pointer;\n text-align: left;\n transition: border-color 120ms ease, background 120ms ease;\n}\n\n.aie-mode-pill[_ngcontent-%COMP%]:hover {\n background: var(--mj-bg-surface-hover);\n}\n\n.aie-mode-pill--active[_ngcontent-%COMP%] {\n border-color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, var(--mj-bg-surface-card));\n}\n\n.aie-mode-pill-title[_ngcontent-%COMP%] {\n font-size: 12.5px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n\n.aie-mode-pill-hint[_ngcontent-%COMP%] {\n font-size: 11px;\n color: var(--mj-text-muted);\n}\n\n.aie-primary-row[_ngcontent-%COMP%] {\n padding: 10px 12px;\n border-radius: var(--mj-radius-md, 8px);\n background: var(--mj-bg-surface-sunken);\n border: 1px solid var(--mj-border-default);\n}\n\n.aie-checkbox-label[_ngcontent-%COMP%] {\n display: flex;\n align-items: flex-start;\n gap: 10px;\n cursor: pointer;\n font-size: 13px;\n color: var(--mj-text-primary);\n}\n\n.aie-checkbox-label[_ngcontent-%COMP%] input[_ngcontent-%COMP%] {\n margin-top: 3px;\n}\n\n.aie-checkbox-sub[_ngcontent-%COMP%] {\n display: block;\n font-size: 11.5px;\n color: var(--mj-text-muted);\n margin-top: 2px;\n}\n\n.aie-link-btn[_ngcontent-%COMP%] {\n border: none;\n background: transparent;\n padding: 4px 6px;\n font-family: inherit;\n font-size: 12px;\n font-weight: 600;\n color: var(--mj-brand-primary);\n cursor: pointer;\n}\n\n.aie-link-btn[_ngcontent-%COMP%]:hover {\n text-decoration: underline;\n}\n\n.aie-archive-confirm[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-wrap: wrap;\n gap: 12px;\n padding: 10px 12px;\n border-radius: var(--mj-radius-md, 8px);\n border: 1px solid color-mix(in srgb, var(--mj-status-error) 35%, var(--mj-border-default));\n background: color-mix(in srgb, var(--mj-status-error) 8%, var(--mj-bg-surface));\n font-size: 12.5px;\n color: var(--mj-text-primary);\n}\n\n.aie-archive-confirm-actions[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n flex-shrink: 0;\n}\n\n.aie-actions-bar[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n gap: 12px;\n flex-wrap: wrap;\n}\n\n.aie-actions-primary[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n flex-wrap: wrap;\n}\n\n\n\n\n\n@media (max-width: 768px) {\n .aie-body[_ngcontent-%COMP%] {\n max-height: none;\n overflow-y: visible;\n }\n}\n\n@media (max-width: 600px) {\n .aie-identity-header[_ngcontent-%COMP%] {\n flex-direction: column;\n align-items: stretch;\n }\n\n .aie-identity-controls[_ngcontent-%COMP%] {\n flex-direction: column;\n align-items: stretch;\n }\n\n .aie-tpl-pill-btn[_ngcontent-%COMP%] {\n justify-content: space-between;\n min-height: 44px;\n }\n\n .aie-studio-hero[_ngcontent-%COMP%] {\n flex-direction: column;\n text-align: center;\n }\n\n .aie-studio-refine-row[_ngcontent-%COMP%] {\n flex-direction: column;\n align-items: stretch;\n }\n\n .aie-studio-generate-bar[_ngcontent-%COMP%] {\n flex-direction: column;\n align-items: stretch;\n }\n\n .aie-studio-generate-btn[_ngcontent-%COMP%] {\n margin-left: 0;\n width: 100%;\n }\n\n .aie-icon-grid--roomy[_ngcontent-%COMP%] {\n grid-template-columns: repeat(3, minmax(0, 1fr));\n }\n\n .aie-vibe-grid[_ngcontent-%COMP%], \n .aie-two-col[_ngcontent-%COMP%], \n .aie-mode-row[_ngcontent-%COMP%] {\n grid-template-columns: 1fr;\n }\n\n .aie-input[_ngcontent-%COMP%] {\n min-height: 44px;\n }\n\n .aie-chip[_ngcontent-%COMP%], \n .aie-studio-tab[_ngcontent-%COMP%], \n .aie-disclosure-summary[_ngcontent-%COMP%], \n .aie-tpl-row[_ngcontent-%COMP%] {\n min-height: 44px;\n }\n\n .aie-icon-tile[_ngcontent-%COMP%] {\n height: 44px;\n }\n\n .aie-actions-bar[_ngcontent-%COMP%] {\n flex-direction: column;\n align-items: stretch;\n }\n\n .aie-actions-primary[_ngcontent-%COMP%] {\n width: 100%;\n }\n\n .aie-actions-primary[_ngcontent-%COMP%] > button[_ngcontent-%COMP%] {\n flex: 1 1 0;\n min-height: 44px;\n }\n}"], changeDetection: 0 });
|
|
2173
|
+
}
|
|
2174
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AgentInstanceEditorModalComponent, [{
|
|
2175
|
+
type: Component,
|
|
2176
|
+
args: [{ standalone: false, selector: 'mj-agent-instance-editor-modal', changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (Visible) {\n <mj-dialog\n [Title]=\"DialogTitle\"\n [Visible]=\"true\"\n [Width]=\"DialogWidth\"\n [MinWidth]=\"320\"\n (Close)=\"OnCancel()\">\n <div class=\"aie-body\">\n @if (IsLoading) {\n <div class=\"aie-loading\">\n <mj-loading text=\"Loading agent studio...\" size=\"medium\"></mj-loading>\n </div>\n } @else if (AvatarStudioOpen) {\n <!-- Full-Dialog Overlay AI Avatar Studio -->\n <div class=\"aie-avatar-studio aie-avatar-studio--overlay\" role=\"region\" aria-label=\"Avatar Studio\">\n <div class=\"aie-studio-topbar\">\n <button\n type=\"button\"\n class=\"aie-studio-back-btn\"\n [disabled]=\"IsGeneratingAvatar\"\n (click)=\"CloseAvatarStudio()\">\n <i class=\"fa-solid fa-arrow-left\"></i>\n <span>Back to Agent</span>\n </button>\n <span class=\"aie-pill\">{{ AvatarStatusLabel }}</span>\n </div>\n\n <div class=\"aie-studio-hero\">\n <div class=\"aie-studio-hero-avatar\" [class.aie-studio-hero-avatar--busy]=\"IsGeneratingAvatar\">\n @if (PreviewAvatarUrl) {\n <img\n [src]=\"PreviewAvatarUrl\"\n [alt]=\"InstanceName || EditingAgent?.Name || 'Agent avatar'\"\n (error)=\"AvatarPreviewError = true\" />\n } @else {\n <i [class]=\"IconClass || 'fa-solid fa-wand-magic-sparkles'\"></i>\n }\n @if (IsGeneratingAvatar) {\n <span class=\"aie-studio-hero-spinner\" aria-hidden=\"true\">\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n </span>\n }\n </div>\n\n <div class=\"aie-studio-hero-meta\">\n <div class=\"aie-studio-hero-name\">\n {{ InstanceName.trim() || EditingAgent?.Name || SelectedBaseAgent?.Name || 'Your Personal Agent' }}\n </div>\n <div class=\"aie-studio-hero-sub\">{{ StudioSubjectSubtitle }}</div>\n </div>\n </div>\n\n <div class=\"aie-studio-tabs\" role=\"tablist\" aria-label=\"Avatar source\">\n <button\n type=\"button\"\n role=\"tab\"\n class=\"aie-studio-tab\"\n [class.aie-studio-tab--active]=\"AvatarStudioTab === 'ai'\"\n [attr.aria-selected]=\"AvatarStudioTab === 'ai'\"\n (click)=\"SetAvatarStudioTab('ai')\">\n <i class=\"fa-solid fa-wand-magic-sparkles\"></i> AI Generate\n </button>\n <button\n type=\"button\"\n role=\"tab\"\n class=\"aie-studio-tab\"\n [class.aie-studio-tab--active]=\"AvatarStudioTab === 'icon'\"\n [attr.aria-selected]=\"AvatarStudioTab === 'icon'\"\n (click)=\"SetAvatarStudioTab('icon')\">\n <i class=\"fa-solid fa-icons\"></i> Curated Icons\n </button>\n <button\n type=\"button\"\n role=\"tab\"\n class=\"aie-studio-tab\"\n [class.aie-studio-tab--active]=\"AvatarStudioTab === 'upload'\"\n [attr.aria-selected]=\"AvatarStudioTab === 'upload'\"\n (click)=\"SetAvatarStudioTab('upload')\">\n <i class=\"fa-solid fa-upload\"></i> Upload / URL\n </button>\n </div>\n\n @if (AvatarErrorMessage) {\n <div class=\"aie-studio-error\" role=\"alert\">\n <i class=\"fa-solid fa-triangle-exclamation\"></i>\n <span>{{ AvatarErrorMessage }}</span>\n </div>\n }\n\n <!-- Tab 1: AI Generate & Iterative Refinement -->\n @if (AvatarStudioTab === 'ai') {\n <div class=\"aie-studio-pane\" role=\"tabpanel\">\n <div class=\"aie-label-row\">\n <label class=\"aie-sublabel aie-sublabel--flush\" for=\"aie-avatar-prompt\">\n Avatar Prompt\n </label>\n <button\n type=\"button\"\n class=\"aie-link-btn\"\n [disabled]=\"IsGeneratingAvatar\"\n (click)=\"RefreshAvatarPromptFromAgent()\"\n title=\"Rebuild prompt using this agent's name, role, personality, and instructions\">\n <i class=\"fa-solid fa-rotate\"></i> Rebuild from agent details\n </button>\n </div>\n\n <textarea\n id=\"aie-avatar-prompt\"\n class=\"aie-textarea aie-studio-prompt-textarea\"\n rows=\"4\"\n [(ngModel)]=\"AvatarPrompt\"\n (input)=\"OnAvatarPromptUserInput()\"\n [disabled]=\"IsGeneratingAvatar\"\n placeholder=\"Describe your agent's avatar \u2014 automatically tailored to your agent's name, role, personality, and instructions...\"\n aria-label=\"Avatar generation prompt\"></textarea>\n\n <div class=\"aie-studio-generate-bar\">\n <div class=\"aie-chip-row\" role=\"group\" aria-label=\"Avatar style presets\">\n <span class=\"aie-chip-hint\">Style:</span>\n @for (style of AvatarStylePresets; track style) {\n <button\n type=\"button\"\n class=\"aie-chip\"\n [class.aie-chip--active]=\"SelectedAvatarStyle === style\"\n [disabled]=\"IsGeneratingAvatar\"\n (click)=\"SelectAvatarStylePreset(style)\">\n {{ style }}\n </button>\n }\n </div>\n\n <button\n mjButton\n variant=\"primary\"\n size=\"sm\"\n type=\"button\"\n class=\"aie-studio-generate-btn\"\n [disabled]=\"IsGeneratingAvatar\"\n (click)=\"GenerateAvatar()\">\n @if (IsGeneratingAvatar) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i> Generating...\n } @else {\n <i class=\"fa-solid fa-wand-magic-sparkles\"></i> Generate Avatar\n }\n </button>\n </div>\n\n @if (HasImageAvatar) {\n <div class=\"aie-refine-box\">\n <label class=\"aie-refine-label\" for=\"aie-avatar-refine-input\">\n <i class=\"fa-solid fa-arrows-rotate\"></i> Refine current avatar\n </label>\n <div class=\"aie-studio-refine-row\">\n <textarea\n id=\"aie-avatar-refine-input\"\n class=\"aie-textarea aie-studio-refine-textarea\"\n rows=\"2\"\n [(ngModel)]=\"AvatarRefinePrompt\"\n [disabled]=\"IsGeneratingAvatar\"\n placeholder='Describe tweaks \u2014 e.g., \"Add sleek glasses\", \"Make background deep teal\"'></textarea>\n <button\n mjButton\n variant=\"outline\"\n size=\"sm\"\n type=\"button\"\n [disabled]=\"IsGeneratingAvatar || !AvatarRefinePrompt.trim()\"\n (click)=\"RefineAvatar()\">\n <i class=\"fa-solid fa-sliders\"></i> Refine\n </button>\n </div>\n <div class=\"aie-chip-row\">\n @for (quick of AvatarQuickRefinements; track quick) {\n <button\n type=\"button\"\n class=\"aie-chip\"\n [disabled]=\"IsGeneratingAvatar\"\n (click)=\"ApplyQuickRefinement(quick)\">\n {{ quick }}\n </button>\n }\n </div>\n </div>\n }\n </div>\n }\n\n <!-- Tab 2: Curated Icon Grid -->\n @if (AvatarStudioTab === 'icon') {\n <div class=\"aie-studio-pane\" role=\"tabpanel\">\n <div class=\"aie-icon-grid aie-icon-grid--roomy\">\n @for (opt of IconOptions; track opt.IconClass) {\n <button\n type=\"button\"\n class=\"aie-icon-tile aie-icon-tile--labeled\"\n [class.aie-icon-tile--selected]=\"!HasImageAvatar && IconClass === opt.IconClass\"\n [title]=\"opt.Label\"\n [attr.aria-label]=\"opt.Label\"\n (click)=\"SelectIcon(opt.IconClass)\">\n <i [class]=\"opt.IconClass\"></i>\n <span class=\"aie-icon-tile-label\">{{ opt.Label }}</span>\n </button>\n }\n </div>\n </div>\n }\n\n <!-- Tab 3: Local File Upload & Image URL -->\n @if (AvatarStudioTab === 'upload') {\n <div class=\"aie-studio-pane\" role=\"tabpanel\">\n <label class=\"aie-upload-dropzone\">\n <i class=\"fa-solid fa-cloud-arrow-up\"></i>\n <span>\n <strong>Upload image</strong>\n <span class=\"aie-upload-sub\">Auto-cropped & compressed to 128\u00D7128 WebP</span>\n </span>\n <input\n type=\"file\"\n accept=\"image/*\"\n class=\"aie-file-input\"\n (change)=\"OnAvatarFileSelected($event)\" />\n </label>\n\n <div>\n <label class=\"aie-sublabel\" for=\"aie-logo-url\">Or paste an image URL</label>\n <input\n id=\"aie-logo-url\"\n type=\"url\"\n class=\"aie-input\"\n [(ngModel)]=\"LogoURL\"\n (ngModelChange)=\"OnLogoUrlChanged()\"\n placeholder=\"https://example.com/avatar.png\" />\n </div>\n </div>\n }\n </div>\n } @else {\n <!-- 1. Compact Identity Header: 68x68 Avatar Studio Trigger + Base Template Pill + Chat to Onboard -->\n <div class=\"aie-identity-header\">\n <button\n type=\"button\"\n class=\"aie-avatar-trigger\"\n [class.aie-avatar-trigger--open]=\"AvatarStudioOpen\"\n [attr.aria-expanded]=\"AvatarStudioOpen\"\n title=\"Click to pick an icon, upload an image, or generate an AI avatar\"\n (click)=\"ToggleAvatarStudio()\">\n @if (PreviewAvatarUrl) {\n <img\n [src]=\"PreviewAvatarUrl\"\n [alt]=\"InstanceName || 'Agent avatar'\"\n (error)=\"AvatarPreviewError = true\" />\n } @else {\n <i [class]=\"IconClass || 'fa-solid fa-wand-magic-sparkles'\"></i>\n }\n <span class=\"aie-avatar-badge\" aria-hidden=\"true\">\n <i class=\"fa-solid fa-wand-magic-sparkles\"></i>\n Edit\n </span>\n </button>\n\n <div class=\"aie-identity-context\">\n <div class=\"aie-identity-eyebrow-row\">\n <span class=\"aie-identity-eyebrow\">Base Template</span>\n @if (IsPrimaryInstance && ShowPrimaryToggle) {\n <span class=\"aie-primary-pill\">\n <i class=\"fa-solid fa-star\"></i> Primary\n </span>\n }\n </div>\n\n <div class=\"aie-identity-controls\">\n @if (Mode === 'create' && InstantiableTemplates.length > 1) {\n <button\n type=\"button\"\n class=\"aie-tpl-pill-btn\"\n [attr.aria-expanded]=\"TemplatePickerOpen\"\n (click)=\"ToggleTemplatePicker()\">\n <i [class]=\"SelectedBaseAgent?.IconClass || 'fa-solid fa-robot'\"></i>\n <span class=\"aie-tpl-pill-label\">Based on: <strong>{{ SelectedBaseAgent?.Name || 'Select template' }}</strong></span>\n <span class=\"aie-tpl-change-hint\">\n Change ({{ InstantiableTemplates.length }})\n <i class=\"fa-solid\" [class.fa-chevron-up]=\"TemplatePickerOpen\" [class.fa-chevron-down]=\"!TemplatePickerOpen\"></i>\n </span>\n </button>\n } @else if (SelectedBaseAgent) {\n <span class=\"aie-tpl-pill-static\">\n <i [class]=\"SelectedBaseAgent.IconClass || 'fa-solid fa-robot'\"></i>\n <span>Based on: <strong>{{ SelectedBaseAgent.Name }}</strong></span>\n </span>\n }\n\n @if (Mode === 'create' && SelectedBaseAgent) {\n <button\n mjButton\n variant=\"outline\"\n size=\"sm\"\n type=\"button\"\n (click)=\"OnChatToOnboardClicked()\"\n title=\"Set up conversationally in chat instead of using the form\">\n <i class=\"fa-solid fa-comments\"></i> Chat to Onboard\n </button>\n }\n </div>\n\n <p class=\"aie-identity-desc\">\n @if (SelectedBaseAgent?.Description) {\n {{ SelectedBaseAgent?.Description }}\n } @else {\n Inherits all tools, skills, and live updates from {{ SelectedBaseAgent?.Name || 'its base template' }}.\n }\n </p>\n </div>\n </div>\n\n <!-- Inline Adaptive Base Template Picker (Scales 2 -> 50+ templates) -->\n @if (Mode === 'create' && TemplatePickerOpen && InstantiableTemplates.length > 1) {\n <div class=\"aie-tpl-picker\" role=\"region\" aria-label=\"Choose base template\">\n <div class=\"aie-tpl-search-wrap\">\n <i class=\"fa-solid fa-magnifying-glass aie-tpl-search-icon\" aria-hidden=\"true\"></i>\n <input\n type=\"search\"\n class=\"aie-input aie-tpl-search-input\"\n [(ngModel)]=\"TemplateSearchText\"\n placeholder=\"Filter templates by name, category, or skill...\"\n aria-label=\"Filter base templates\" />\n </div>\n\n @if (TemplateCategories.length > 2) {\n <div class=\"aie-chip-row\" role=\"group\" aria-label=\"Template categories\">\n @for (cat of TemplateCategories; track cat) {\n <button\n type=\"button\"\n class=\"aie-chip\"\n [class.aie-chip--active]=\"SelectedTemplateCategory === cat\"\n (click)=\"SetTemplateCategory(cat)\">\n {{ cat }}\n </button>\n }\n </div>\n }\n\n <div class=\"aie-tpl-list\" role=\"listbox\" aria-label=\"Available templates\">\n @if (FilteredTemplates.length === 0) {\n <div class=\"aie-tpl-empty\">No templates match \"{{ TemplateSearchText }}\".</div>\n } @else {\n @for (tpl of FilteredTemplates; track tpl.ID) {\n <button\n type=\"button\"\n class=\"aie-tpl-row\"\n role=\"option\"\n [class.aie-tpl-row--selected]=\"tpl.ID === SelectedBaseAgentId\"\n [attr.aria-selected]=\"tpl.ID === SelectedBaseAgentId\"\n (click)=\"SelectTemplate(tpl)\">\n <span class=\"aie-tpl-row-icon\">\n <i [class]=\"tpl.IconClass || 'fa-solid fa-robot'\"></i>\n </span>\n <span class=\"aie-tpl-row-text\">\n <span class=\"aie-tpl-row-name\">{{ tpl.Name }}</span>\n @if (tpl.Description) {\n <span class=\"aie-tpl-row-desc\">{{ tpl.Description }}</span>\n }\n </span>\n @if (tpl.InstantiationMode === 'Required') {\n <span class=\"aie-pill\">Recommended</span>\n } @else {\n <span class=\"aie-pill aie-pill--muted\">{{ GetTemplateCategory(tpl) }}</span>\n }\n </button>\n }\n }\n </div>\n </div>\n }\n\n @if (ErrorMessage) {\n <mj-alert Variant=\"error\">{{ ErrorMessage }}</mj-alert>\n }\n\n <!-- 2. Name (The ONLY required field) -->\n <div class=\"aie-section\">\n <div class=\"aie-label-row\">\n <label class=\"aie-label\" for=\"aie-instance-name\">\n Name <span class=\"aie-required\">*</span>\n </label>\n <span class=\"aie-mention-hint\">\n Summon with <code>@{{ MentionHandle }}</code>\n </span>\n </div>\n <input\n id=\"aie-instance-name\"\n type=\"text\"\n class=\"aie-input\"\n [(ngModel)]=\"InstanceName\"\n placeholder=\"Give your agent a name (e.g., Pepper, Cato, Jarvis)...\"\n autocomplete=\"off\" />\n @if (Mode === 'create' && SuggestedNames.length > 0) {\n <div class=\"aie-chip-row\">\n <span class=\"aie-chip-hint\">Ideas:</span>\n @for (idea of SuggestedNames; track idea) {\n <button\n type=\"button\"\n class=\"aie-chip\"\n [class.aie-chip--active]=\"InstanceName.trim().toLowerCase() === idea.toLowerCase()\"\n (click)=\"ApplySuggestedName(idea)\">\n {{ idea }}\n </button>\n }\n </div>\n }\n </div>\n\n <!-- 3. Personality Vibe 2x2 Archetype Grid -->\n <div class=\"aie-section\">\n <div class=\"aie-label-row\">\n <span class=\"aie-label\">Personality Vibe</span>\n @if (IsCustomVibe) {\n <span class=\"aie-pill\">Custom</span>\n }\n </div>\n <div class=\"aie-vibe-grid\" role=\"group\" aria-label=\"Personality vibe\">\n @for (vibe of VibeOptions; track vibe.Key) {\n <button\n type=\"button\"\n class=\"aie-vibe-card\"\n [class.aie-vibe-card--active]=\"IsVibeActive(vibe)\"\n [attr.aria-pressed]=\"IsVibeActive(vibe)\"\n (click)=\"ApplyVibe(vibe)\">\n <span class=\"aie-vibe-head\">\n <i [class]=\"vibe.IconClass\"></i>\n <span class=\"aie-vibe-title\">{{ vibe.Label }}</span>\n </span>\n <span class=\"aie-vibe-sub\">{{ vibe.Subtitle }}</span>\n </button>\n }\n </div>\n </div>\n\n <!-- 4. Progressive Disclosure Accordion: Voice, Fine-tuned Style, Role, Standing Instructions & Guardrails -->\n <details\n class=\"aie-disclosure\"\n [open]=\"AdvancedExpanded\"\n (toggle)=\"OnAdvancedToggle($event)\">\n <summary class=\"aie-disclosure-summary\">\n <span class=\"aie-disclosure-title\">\n <i class=\"fa-solid fa-sliders\"></i>\n Customize Voice, Instructions & Guardrails\n </span>\n <span class=\"aie-disclosure-meta\">\n <span class=\"aie-pill\">{{ AdvancedSummaryLabel }}</span>\n <i class=\"fa-solid fa-chevron-down aie-disclosure-chevron\" aria-hidden=\"true\"></i>\n </span>\n </summary>\n\n <div class=\"aie-disclosure-body\">\n <!-- Cross-Vendor Voice Persona -->\n @if (ActivePersonas.length > 0) {\n <div class=\"aie-section\">\n <div class=\"aie-label-row\">\n <label class=\"aie-label\">Voice</label>\n <span class=\"aie-voice-hint\">\n <i class=\"fa-solid fa-earth-americas\"></i> Universal cross-vendor voice\n </span>\n </div>\n <div class=\"aie-chip-row\">\n @for (persona of VisiblePersonas; track persona.ID) {\n <button\n type=\"button\"\n class=\"aie-chip\"\n [class.aie-chip--active]=\"IsPersonaSelected(persona)\"\n [title]=\"persona.Description || persona.Name\"\n (click)=\"SelectPersona(persona)\">\n <i class=\"fa-solid fa-microphone-lines\"></i>\n {{ persona.Name }}\n </button>\n }\n @if (ActivePersonas.length > 6) {\n <button\n type=\"button\"\n class=\"aie-link-btn\"\n (click)=\"ShowAllPersonas = !ShowAllPersonas\">\n {{ ShowAllPersonas ? 'Show fewer' : 'Show all (' + ActivePersonas.length + ')' }}\n </button>\n }\n </div>\n </div>\n }\n\n <!-- Fine-tune Tone & Speaking / Writing Style -->\n <div class=\"aie-two-col\">\n <div>\n <label class=\"aie-sublabel\" for=\"aie-tone\">Tone</label>\n <input\n id=\"aie-tone\"\n type=\"text\"\n class=\"aie-input\"\n [(ngModel)]=\"Tone\"\n placeholder=\"e.g., Direct, playful, analytical\" />\n </div>\n <div>\n <label class=\"aie-sublabel\" for=\"aie-style\">Speaking / Writing Style</label>\n <input\n id=\"aie-style\"\n type=\"text\"\n class=\"aie-input\"\n [(ngModel)]=\"SpeakingStyle\"\n placeholder=\"e.g., Crisp bullets, zero fluff\" />\n </div>\n </div>\n\n <!-- Role / Focus -->\n <div class=\"aie-section\">\n <label class=\"aie-sublabel\" for=\"aie-instance-desc\">Role / Focus</label>\n <input\n id=\"aie-instance-desc\"\n type=\"text\"\n class=\"aie-input\"\n [(ngModel)]=\"Description\"\n placeholder=\"Optional short description of what this instance focuses on\" />\n </div>\n\n <!-- Standing Instructions -->\n <div class=\"aie-section\">\n <label class=\"aie-sublabel\" for=\"aie-instructions\">Standing Instructions</label>\n <textarea\n id=\"aie-instructions\"\n class=\"aie-textarea\"\n rows=\"3\"\n [(ngModel)]=\"AdditionalInstructions\"\n placeholder=\"Custom ground rules, priorities, or domain focus stacked onto every run...\"></textarea>\n </div>\n\n <!-- Coordination Autonomy (Chief of Staff instances) -->\n @if (IsChiefOfStaffTemplate) {\n <div class=\"aie-section\">\n <label class=\"aie-sublabel\">Coordination Autonomy</label>\n <div class=\"aie-mode-row\" role=\"group\" aria-label=\"Coordination autonomy\">\n @for (opt of CoordinationModeOptions; track opt.Value) {\n <button\n type=\"button\"\n class=\"aie-mode-pill\"\n [class.aie-mode-pill--active]=\"CoordinationMode === opt.Value\"\n [attr.aria-pressed]=\"CoordinationMode === opt.Value\"\n (click)=\"SetCoordinationMode(opt.Value)\">\n <span class=\"aie-mode-pill-title\">{{ opt.Label }}</span>\n <span class=\"aie-mode-pill-hint\">{{ opt.Hint }}</span>\n </button>\n }\n </div>\n </div>\n }\n\n <!-- Primary Instance Toggle -->\n @if (ShowPrimaryToggle) {\n <div class=\"aie-primary-row\">\n <label class=\"aie-checkbox-label\">\n <input type=\"checkbox\" [(ngModel)]=\"IsPrimaryInstance\" />\n <span>\n <strong>Primary {{ SelectedBaseAgent?.Name || 'agent' }} instance</strong>\n <span class=\"aie-checkbox-sub\">\n Receives inbound wakes, colleague requests, and serves as your default switcher choice.\n </span>\n </span>\n </label>\n </div>\n }\n </div>\n </details>\n\n <!-- Archive confirmation inline callout -->\n @if (Mode === 'edit' && ConfirmArchiveOpen) {\n <div class=\"aie-archive-confirm\">\n <span>Archive <strong>{{ EditingAgent?.Name }}</strong>? Past conversations stay intact, and it will be hidden from your active agents.</span>\n <div class=\"aie-archive-confirm-actions\">\n <button\n mjButton\n variant=\"danger\"\n size=\"sm\"\n type=\"button\"\n [disabled]=\"IsArchiving\"\n (click)=\"ConfirmArchive()\">\n {{ IsArchiving ? 'Archiving...' : 'Confirm Archive' }}\n </button>\n <button\n mjButton\n variant=\"outline\"\n size=\"sm\"\n type=\"button\"\n [disabled]=\"IsArchiving\"\n (click)=\"CancelArchive()\">\n Keep\n </button>\n </div>\n </div>\n }\n }\n </div>\n\n <mj-dialog-actions>\n @if (AvatarStudioOpen) {\n <div class=\"aie-actions-bar\">\n <div class=\"aie-actions-primary\">\n <button\n mjButton\n variant=\"primary\"\n type=\"button\"\n [disabled]=\"IsGeneratingAvatar\"\n (click)=\"CloseAvatarStudio()\">\n <i class=\"fa-solid fa-check\"></i>\n Done \u2014 Use This Avatar\n </button>\n </div>\n <div class=\"aie-studio-footer\">\n @if (AvatarHistory.length > 0) {\n <button\n mjButton\n variant=\"outline\"\n size=\"sm\"\n type=\"button\"\n [disabled]=\"IsGeneratingAvatar\"\n (click)=\"UndoAvatar()\">\n <i class=\"fa-solid fa-rotate-left\"></i> Undo ({{ AvatarHistory.length }})\n </button>\n }\n @if (HasImageAvatar) {\n <button\n mjButton\n variant=\"flat\"\n size=\"sm\"\n type=\"button\"\n [disabled]=\"IsGeneratingAvatar\"\n (click)=\"ClearAvatarImage()\">\n <i class=\"fa-solid fa-icons\"></i> Use Icon Instead\n </button>\n }\n </div>\n </div>\n } @else {\n <div class=\"aie-actions-bar\">\n <div class=\"aie-actions-primary\">\n <button\n mjButton\n variant=\"primary\"\n type=\"button\"\n [disabled]=\"!CanSave\"\n (click)=\"OnSave()\">\n <i class=\"fa-solid fa-check\"></i>\n {{ SaveButtonLabel }}\n </button>\n <button\n mjButton\n variant=\"outline\"\n type=\"button\"\n [disabled]=\"IsSaving || IsArchiving\"\n (click)=\"OnCancel()\">\n Cancel\n </button>\n </div>\n @if (Mode === 'edit' && !ConfirmArchiveOpen) {\n <button\n mjButton\n variant=\"flat\"\n size=\"sm\"\n type=\"button\"\n [disabled]=\"IsSaving || IsArchiving\"\n (click)=\"RequestArchive()\">\n <i class=\"fa-solid fa-box-archive\"></i> Archive\n </button>\n }\n </div>\n }\n </mj-dialog-actions>\n </mj-dialog>\n}\n", styles: [".aie-body {\n display: flex;\n flex-direction: column;\n gap: 15px;\n max-height: 74vh;\n overflow-y: auto;\n padding: 2px;\n}\n\n.aie-loading {\n display: flex;\n justify-content: center;\n padding: 40px 0;\n}\n\n/* ========================================================================= */\n/* Compact Identity Header (68x68 Avatar Trigger + Base Template Pill) */\n/* ========================================================================= */\n\n.aie-identity-header {\n display: flex;\n align-items: flex-start;\n gap: 14px;\n}\n\n.aie-avatar-trigger {\n position: relative;\n flex: 0 0 68px;\n width: 68px;\n height: 68px;\n padding: 0;\n border-radius: var(--mj-radius-full, 999px);\n border: 2px solid var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 12%, var(--mj-bg-surface-card));\n color: var(--mj-brand-primary);\n font-size: 26px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n cursor: pointer;\n transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;\n}\n\n.aie-avatar-trigger:hover {\n transform: scale(1.03);\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-brand-primary) 20%, transparent);\n}\n\n.aie-avatar-trigger--open {\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-brand-primary) 28%, transparent);\n}\n\n.aie-avatar-trigger:focus-visible {\n outline: none;\n box-shadow: var(--mj-focus-ring);\n}\n\n.aie-avatar-trigger img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n\n.aie-avatar-badge {\n position: absolute;\n left: 50%;\n bottom: 2px;\n transform: translateX(-50%);\n display: inline-flex;\n align-items: center;\n gap: 3px;\n padding: 1px 6px;\n border-radius: var(--mj-radius-full, 999px);\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n font-size: 9.5px;\n font-weight: 700;\n letter-spacing: 0.02em;\n white-space: nowrap;\n}\n\n.aie-identity-context {\n flex: 1 1 auto;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.aie-identity-eyebrow-row {\n display: flex;\n align-items: center;\n gap: 8px;\n flex-wrap: wrap;\n}\n\n.aie-identity-eyebrow {\n font-size: 10.5px;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 0.06em;\n color: var(--mj-text-muted);\n}\n\n.aie-identity-controls {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 8px;\n}\n\n.aie-tpl-pill-btn,\n.aie-tpl-pill-static {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 5px 11px;\n border-radius: var(--mj-radius-full, 999px);\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-primary);\n font-family: inherit;\n font-size: 12px;\n line-height: 1.3;\n max-width: 100%;\n}\n\n.aie-tpl-pill-btn {\n appearance: none;\n cursor: pointer;\n transition: border-color 120ms ease, background 120ms ease;\n}\n\n.aie-tpl-pill-btn:hover {\n border-color: var(--mj-brand-primary);\n background: var(--mj-bg-surface-hover);\n}\n\n.aie-tpl-pill-btn:focus-visible {\n outline: none;\n box-shadow: var(--mj-focus-ring);\n}\n\n.aie-tpl-pill-label {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.aie-tpl-change-hint {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n color: var(--mj-brand-primary);\n font-weight: 700;\n white-space: nowrap;\n}\n\n.aie-identity-desc {\n margin: 0;\n font-size: 12px;\n color: var(--mj-text-secondary);\n line-height: 1.4;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n}\n\n.aie-primary-pill {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n font-size: 10.5px;\n font-weight: 700;\n padding: 2px 7px;\n border-radius: var(--mj-radius-full, 999px);\n background: var(--mj-status-warning-bg);\n color: var(--mj-status-warning);\n}\n\n/* ========================================================================= */\n/* Adaptive Base Template Picker (Scales 2 -> 50+ Templates) */\n/* ========================================================================= */\n\n.aie-tpl-picker {\n display: flex;\n flex-direction: column;\n gap: 9px;\n padding: 12px;\n border-radius: var(--mj-radius-md, 10px);\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface-card);\n}\n\n.aie-tpl-search-wrap {\n position: relative;\n}\n\n.aie-tpl-search-icon {\n position: absolute;\n left: 11px;\n top: 50%;\n transform: translateY(-50%);\n font-size: 12px;\n color: var(--mj-text-muted);\n pointer-events: none;\n}\n\n.aie-input.aie-tpl-search-input {\n padding-left: 34px;\n font-size: 12.5px;\n}\n\n.aie-tpl-list {\n max-height: 204px;\n overflow-y: auto;\n display: flex;\n flex-direction: column;\n gap: 5px;\n}\n\n.aie-tpl-empty {\n padding: 12px 8px;\n text-align: center;\n font-size: 12px;\n color: var(--mj-text-muted);\n}\n\n.aie-tpl-row {\n appearance: none;\n width: 100%;\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 8px 10px;\n text-align: left;\n font-family: inherit;\n border-radius: var(--mj-radius-md, 8px);\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n cursor: pointer;\n transition: border-color 120ms ease, background 120ms ease;\n}\n\n.aie-tpl-row:hover {\n background: var(--mj-bg-surface-hover);\n border-color: var(--mj-border-strong);\n}\n\n.aie-tpl-row--selected {\n border-color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, var(--mj-bg-surface));\n}\n\n.aie-tpl-row-icon {\n flex: 0 0 28px;\n width: 28px;\n height: 28px;\n border-radius: var(--mj-radius-sm, 6px);\n display: inline-flex;\n align-items: center;\n justify-content: center;\n background: color-mix(in srgb, var(--mj-brand-primary) 12%, var(--mj-bg-surface));\n color: var(--mj-brand-primary);\n font-size: 13px;\n}\n\n.aie-tpl-row-text {\n flex: 1 1 auto;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.aie-tpl-row-name {\n font-size: 12.5px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n\n.aie-tpl-row-desc {\n font-size: 11px;\n color: var(--mj-text-muted);\n display: -webkit-box;\n -webkit-line-clamp: 1;\n -webkit-box-orient: vertical;\n overflow: hidden;\n}\n\n/* ========================================================================= */\n/* Full-Dialog Overlay AI Avatar Studio */\n/* ========================================================================= */\n\n.aie-avatar-studio {\n display: flex;\n flex-direction: column;\n gap: 14px;\n}\n\n.aie-avatar-studio--overlay {\n min-height: 360px;\n}\n\n.aie-studio-topbar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 10px;\n}\n\n.aie-studio-back-btn {\n appearance: none;\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-primary);\n border-radius: var(--mj-radius-full, 999px);\n padding: 5px 12px;\n font-family: inherit;\n font-size: 12px;\n font-weight: 600;\n display: inline-flex;\n align-items: center;\n gap: 6px;\n cursor: pointer;\n transition: border-color 120ms ease, background 120ms ease, color 120ms ease;\n}\n\n.aie-studio-back-btn:hover:not(:disabled) {\n border-color: var(--mj-brand-primary);\n color: var(--mj-brand-primary);\n background: var(--mj-bg-surface-hover);\n}\n\n.aie-studio-back-btn:disabled {\n opacity: 0.55;\n cursor: not-allowed;\n}\n\n.aie-studio-hero {\n display: flex;\n align-items: center;\n gap: 16px;\n padding: 14px 16px;\n border-radius: var(--mj-radius-md, 10px);\n border: 1px solid var(--mj-border-default);\n background: color-mix(in srgb, var(--mj-brand-primary) 7%, var(--mj-bg-surface-card));\n}\n\n.aie-studio-hero-avatar {\n position: relative;\n flex: 0 0 92px;\n width: 92px;\n height: 92px;\n border-radius: var(--mj-radius-full, 999px);\n border: 2.5px solid var(--mj-brand-primary);\n background: var(--mj-bg-surface);\n color: var(--mj-brand-primary);\n font-size: 36px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n box-shadow: 0 4px 16px color-mix(in srgb, var(--mj-brand-primary) 18%, transparent);\n}\n\n.aie-studio-hero-avatar img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n\n.aie-studio-hero-spinner {\n position: absolute;\n inset: 0;\n background: color-mix(in srgb, var(--mj-bg-surface) 72%, transparent);\n color: var(--mj-brand-primary);\n font-size: 26px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n}\n\n.aie-studio-hero-meta {\n flex: 1 1 auto;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.aie-studio-hero-name {\n font-size: 16px;\n font-weight: 700;\n color: var(--mj-text-primary);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.aie-studio-hero-sub {\n font-size: 12px;\n color: var(--mj-text-secondary);\n line-height: 1.4;\n}\n\n.aie-studio-tabs {\n display: flex;\n gap: 6px;\n flex-wrap: wrap;\n}\n\n.aie-studio-tab {\n appearance: none;\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n color: var(--mj-text-secondary);\n border-radius: var(--mj-radius-full, 999px);\n padding: 6px 13px;\n font-family: inherit;\n font-size: 12.5px;\n font-weight: 600;\n display: inline-flex;\n align-items: center;\n gap: 6px;\n cursor: pointer;\n transition: border-color 120ms ease, background 120ms ease, color 120ms ease;\n}\n\n.aie-studio-tab:hover {\n border-color: var(--mj-border-strong);\n color: var(--mj-text-primary);\n}\n\n.aie-studio-tab--active {\n border-color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 13%, var(--mj-bg-surface));\n color: var(--mj-brand-primary);\n}\n\n.aie-studio-error {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n padding: 9px 12px;\n border-radius: var(--mj-radius-sm, 6px);\n border: 1px solid var(--mj-status-warning);\n background: var(--mj-status-warning-bg);\n color: var(--mj-status-warning-text, var(--mj-text-primary));\n font-size: 12px;\n line-height: 1.4;\n}\n\n.aie-studio-pane {\n display: flex;\n flex-direction: column;\n gap: 11px;\n}\n\n.aie-sublabel--flush {\n margin-bottom: 0;\n}\n\n.aie-studio-prompt-textarea {\n min-height: 92px;\n line-height: 1.45;\n font-size: 13px;\n}\n\n.aie-studio-generate-bar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-wrap: wrap;\n gap: 10px;\n}\n\n.aie-studio-generate-btn {\n margin-left: auto;\n}\n\n.aie-refine-box {\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding-top: 12px;\n border-top: 1px solid var(--mj-border-default);\n}\n\n.aie-refine-label {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n font-size: 12px;\n font-weight: 700;\n color: var(--mj-brand-primary);\n}\n\n.aie-studio-refine-row {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n}\n\n.aie-studio-refine-textarea {\n flex: 1 1 auto;\n min-width: 0;\n min-height: 54px;\n line-height: 1.4;\n font-size: 12.5px;\n}\n\n.aie-upload-dropzone {\n position: relative;\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 16px;\n border-radius: var(--mj-radius-md, 8px);\n border: 1px dashed var(--mj-border-strong);\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-primary);\n font-size: 13px;\n cursor: pointer;\n transition: border-color 120ms ease, background 120ms ease;\n}\n\n.aie-upload-dropzone:hover {\n border-color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 7%, var(--mj-bg-surface-sunken));\n}\n\n.aie-upload-dropzone > i {\n font-size: 20px;\n color: var(--mj-brand-primary);\n}\n\n.aie-upload-sub {\n display: block;\n font-size: 11.5px;\n color: var(--mj-text-muted);\n margin-top: 2px;\n}\n\n.aie-file-input {\n position: absolute;\n inset: 0;\n opacity: 0;\n cursor: pointer;\n}\n\n.aie-studio-footer {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n flex-wrap: wrap;\n gap: 8px;\n}\n\n.aie-icon-grid--roomy {\n grid-template-columns: repeat(4, minmax(0, 1fr));\n gap: 8px;\n}\n\n.aie-icon-tile--labeled {\n height: auto;\n min-height: 58px;\n padding: 8px 6px;\n flex-direction: column;\n gap: 5px;\n}\n\n.aie-icon-tile-label {\n font-size: 11px;\n font-weight: 600;\n line-height: 1.1;\n}\n\n/* ========================================================================= */\n/* Core Form Fields & Personality Vibe Cards */\n/* ========================================================================= */\n\n.aie-section {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.aie-label-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n flex-wrap: wrap;\n}\n\n.aie-label {\n font-size: 12.5px;\n font-weight: 700;\n color: var(--mj-text-primary);\n}\n\n.aie-sublabel {\n display: block;\n font-size: 11.5px;\n font-weight: 600;\n color: var(--mj-text-secondary);\n margin-bottom: 4px;\n}\n\n.aie-required {\n color: var(--mj-status-error);\n}\n\n.aie-mention-hint {\n font-size: 11px;\n color: var(--mj-text-muted);\n}\n\n.aie-mention-hint code {\n font-weight: 600;\n color: var(--mj-brand-primary);\n}\n\n.aie-voice-hint {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n font-size: 11px;\n color: var(--mj-text-muted);\n}\n\n.aie-pill {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n font-size: 10.5px;\n font-weight: 700;\n padding: 2px 8px;\n border-radius: var(--mj-radius-full, 999px);\n background: var(--mj-status-info-bg);\n color: var(--mj-status-info);\n white-space: nowrap;\n}\n\n.aie-pill--muted {\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-secondary);\n}\n\n.aie-input,\n.aie-textarea {\n width: 100%;\n box-sizing: border-box;\n padding: 9px 11px;\n font-size: 13.5px;\n font-family: inherit;\n color: var(--mj-text-primary);\n background: var(--mj-bg-surface-card);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md, 8px);\n transition: border-color 120ms ease, box-shadow 120ms ease;\n}\n\n.aie-input:focus,\n.aie-textarea:focus {\n outline: none;\n border-color: var(--mj-border-focus);\n box-shadow: var(--mj-focus-ring);\n}\n\n.aie-textarea {\n resize: vertical;\n min-height: 70px;\n}\n\n.aie-vibe-grid {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 8px;\n}\n\n.aie-vibe-card {\n appearance: none;\n text-align: left;\n font-family: inherit;\n display: flex;\n flex-direction: column;\n gap: 4px;\n padding: 10px 12px;\n min-height: 44px;\n border-radius: var(--mj-radius-md, 10px);\n border: 1.5px solid var(--mj-border-default);\n background: var(--mj-bg-surface-card);\n color: var(--mj-text-primary);\n cursor: pointer;\n transition: border-color 120ms ease, background 120ms ease;\n}\n\n.aie-vibe-card:hover {\n border-color: var(--mj-border-strong);\n background: var(--mj-bg-surface-hover);\n}\n\n.aie-vibe-card--active {\n border-color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 11%, var(--mj-bg-surface-card));\n}\n\n.aie-vibe-card:focus-visible {\n outline: none;\n box-shadow: var(--mj-focus-ring);\n}\n\n.aie-vibe-head {\n display: flex;\n align-items: center;\n gap: 7px;\n font-size: 13px;\n font-weight: 700;\n color: var(--mj-text-primary);\n}\n\n.aie-vibe-head > i {\n color: var(--mj-brand-primary);\n font-size: 12.5px;\n}\n\n.aie-vibe-sub {\n font-size: 11.5px;\n color: var(--mj-text-secondary);\n line-height: 1.35;\n}\n\n/* ========================================================================= */\n/* Progressive Disclosure Accordion */\n/* ========================================================================= */\n\n.aie-disclosure {\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md, 10px);\n background: var(--mj-bg-surface-sunken);\n overflow: hidden;\n}\n\n.aie-disclosure-summary {\n list-style: none;\n padding: 11px 13px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 10px;\n cursor: pointer;\n font-size: 12.5px;\n font-weight: 600;\n color: var(--mj-text-primary);\n user-select: none;\n}\n\n.aie-disclosure-summary::-webkit-details-marker {\n display: none;\n}\n\n.aie-disclosure-summary:hover {\n background: var(--mj-bg-surface-hover);\n}\n\n.aie-disclosure-title {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n min-width: 0;\n}\n\n.aie-disclosure-title > i {\n color: var(--mj-brand-primary);\n}\n\n.aie-disclosure-meta {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n flex-shrink: 0;\n}\n\n.aie-disclosure-chevron {\n font-size: 11px;\n color: var(--mj-text-muted);\n transition: transform 150ms ease;\n}\n\n.aie-disclosure[open] .aie-disclosure-chevron {\n transform: rotate(180deg);\n}\n\n.aie-disclosure-body {\n padding: 13px;\n border-top: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n display: flex;\n flex-direction: column;\n gap: 13px;\n}\n\n/* ========================================================================= */\n/* Chips, Icon Grid, Two-Col, Autonomy Modes, Primary & Footer */\n/* ========================================================================= */\n\n.aie-chip-row {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 6px;\n}\n\n.aie-chip-hint {\n font-size: 11.5px;\n color: var(--mj-text-muted);\n}\n\n.aie-chip {\n appearance: none;\n font-family: inherit;\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 4px 10px;\n font-size: 12px;\n font-weight: 500;\n border-radius: var(--mj-radius-full, 999px);\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n color: var(--mj-text-secondary);\n cursor: pointer;\n transition: background 120ms ease, border-color 120ms ease, color 120ms ease;\n}\n\n.aie-chip:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n}\n\n.aie-chip--active {\n border-color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 14%, var(--mj-bg-surface));\n color: var(--mj-brand-primary);\n font-weight: 600;\n}\n\n.aie-icon-grid {\n display: grid;\n grid-template-columns: repeat(6, minmax(0, 1fr));\n gap: 6px;\n}\n\n.aie-icon-tile {\n height: 38px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: var(--mj-radius-md, 8px);\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n color: var(--mj-text-secondary);\n font-size: 15px;\n cursor: pointer;\n transition: background 120ms ease, border-color 120ms ease, color 120ms ease;\n}\n\n.aie-icon-tile:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n}\n\n.aie-icon-tile--selected {\n border-color: var(--mj-brand-primary);\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n}\n\n.aie-two-col {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 10px;\n}\n\n.aie-mode-row {\n display: grid;\n grid-template-columns: repeat(3, minmax(0, 1fr));\n gap: 8px;\n}\n\n.aie-mode-pill {\n appearance: none;\n font-family: inherit;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 2px;\n padding: 9px 10px;\n min-height: 44px;\n border-radius: var(--mj-radius-md, 8px);\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface-card);\n cursor: pointer;\n text-align: left;\n transition: border-color 120ms ease, background 120ms ease;\n}\n\n.aie-mode-pill:hover {\n background: var(--mj-bg-surface-hover);\n}\n\n.aie-mode-pill--active {\n border-color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, var(--mj-bg-surface-card));\n}\n\n.aie-mode-pill-title {\n font-size: 12.5px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n\n.aie-mode-pill-hint {\n font-size: 11px;\n color: var(--mj-text-muted);\n}\n\n.aie-primary-row {\n padding: 10px 12px;\n border-radius: var(--mj-radius-md, 8px);\n background: var(--mj-bg-surface-sunken);\n border: 1px solid var(--mj-border-default);\n}\n\n.aie-checkbox-label {\n display: flex;\n align-items: flex-start;\n gap: 10px;\n cursor: pointer;\n font-size: 13px;\n color: var(--mj-text-primary);\n}\n\n.aie-checkbox-label input {\n margin-top: 3px;\n}\n\n.aie-checkbox-sub {\n display: block;\n font-size: 11.5px;\n color: var(--mj-text-muted);\n margin-top: 2px;\n}\n\n.aie-link-btn {\n border: none;\n background: transparent;\n padding: 4px 6px;\n font-family: inherit;\n font-size: 12px;\n font-weight: 600;\n color: var(--mj-brand-primary);\n cursor: pointer;\n}\n\n.aie-link-btn:hover {\n text-decoration: underline;\n}\n\n.aie-archive-confirm {\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-wrap: wrap;\n gap: 12px;\n padding: 10px 12px;\n border-radius: var(--mj-radius-md, 8px);\n border: 1px solid color-mix(in srgb, var(--mj-status-error) 35%, var(--mj-border-default));\n background: color-mix(in srgb, var(--mj-status-error) 8%, var(--mj-bg-surface));\n font-size: 12.5px;\n color: var(--mj-text-primary);\n}\n\n.aie-archive-confirm-actions {\n display: flex;\n align-items: center;\n gap: 8px;\n flex-shrink: 0;\n}\n\n.aie-actions-bar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n gap: 12px;\n flex-wrap: wrap;\n}\n\n.aie-actions-primary {\n display: flex;\n align-items: center;\n gap: 8px;\n flex-wrap: wrap;\n}\n\n/* ========================================================================= */\n/* Responsive Mobile Breakpoints */\n/* ========================================================================= */\n\n@media (max-width: 768px) {\n .aie-body {\n max-height: none;\n overflow-y: visible;\n }\n}\n\n@media (max-width: 600px) {\n .aie-identity-header {\n flex-direction: column;\n align-items: stretch;\n }\n\n .aie-identity-controls {\n flex-direction: column;\n align-items: stretch;\n }\n\n .aie-tpl-pill-btn {\n justify-content: space-between;\n min-height: 44px;\n }\n\n .aie-studio-hero {\n flex-direction: column;\n text-align: center;\n }\n\n .aie-studio-refine-row {\n flex-direction: column;\n align-items: stretch;\n }\n\n .aie-studio-generate-bar {\n flex-direction: column;\n align-items: stretch;\n }\n\n .aie-studio-generate-btn {\n margin-left: 0;\n width: 100%;\n }\n\n .aie-icon-grid--roomy {\n grid-template-columns: repeat(3, minmax(0, 1fr));\n }\n\n .aie-vibe-grid,\n .aie-two-col,\n .aie-mode-row {\n grid-template-columns: 1fr;\n }\n\n .aie-input {\n min-height: 44px;\n }\n\n .aie-chip,\n .aie-studio-tab,\n .aie-disclosure-summary,\n .aie-tpl-row {\n min-height: 44px;\n }\n\n .aie-icon-tile {\n height: 44px;\n }\n\n .aie-actions-bar {\n flex-direction: column;\n align-items: stretch;\n }\n\n .aie-actions-primary {\n width: 100%;\n }\n\n .aie-actions-primary > button {\n flex: 1 1 0;\n min-height: 44px;\n }\n}\n"] }]
|
|
2177
|
+
}], null, { Visible: [{
|
|
2178
|
+
type: Input
|
|
2179
|
+
}], VisibleChange: [{
|
|
2180
|
+
type: Output
|
|
2181
|
+
}], CurrentUser: [{
|
|
2182
|
+
type: Input
|
|
2183
|
+
}], Mode: [{
|
|
2184
|
+
type: Input
|
|
2185
|
+
}], EditingAgent: [{
|
|
2186
|
+
type: Input
|
|
2187
|
+
}], InitialBaseAgentId: [{
|
|
2188
|
+
type: Input
|
|
2189
|
+
}], Saved: [{
|
|
2190
|
+
type: Output
|
|
2191
|
+
}], ChatToOnboard: [{
|
|
2192
|
+
type: Output
|
|
2193
|
+
}], Archived: [{
|
|
2194
|
+
type: Output
|
|
2195
|
+
}], Closed: [{
|
|
2196
|
+
type: Output
|
|
2197
|
+
}], OnWindowResize: [{
|
|
2198
|
+
type: HostListener,
|
|
2199
|
+
args: ['window:resize']
|
|
2200
|
+
}] }); })();
|
|
2201
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(AgentInstanceEditorModalComponent, { className: "AgentInstanceEditorModalComponent", filePath: "src/lib/components/agent/agent-instance-editor-modal.component.ts", lineNumber: 179 }); })();
|
|
2202
|
+
//# sourceMappingURL=agent-instance-editor-modal.component.js.map
|