@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
|
@@ -1,61 +1,213 @@
|
|
|
1
1
|
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, HostListener, Input, Output, inject, } from '@angular/core';
|
|
2
2
|
import { LogError } from '@memberjunction/core';
|
|
3
3
|
import { AIEngineBase } from '@memberjunction/ai-engine-base';
|
|
4
|
+
import { UserInfoEngine } from '@memberjunction/core-entities';
|
|
5
|
+
import { DefaultAgentResolver } from '@memberjunction/conversations-runtime';
|
|
4
6
|
import { MJNotificationService } from '@memberjunction/ng-notifications';
|
|
5
7
|
import { UUIDsEqual } from '@memberjunction/global';
|
|
6
8
|
import { IsAgentAllowed } from '@memberjunction/ai-core-plus';
|
|
9
|
+
import { ConversationAgentService } from '../../services/conversation-agent.service';
|
|
7
10
|
import * as i0 from "@angular/core";
|
|
8
11
|
const _forTrack0 = ($index, $item) => $item.ID;
|
|
9
|
-
function
|
|
10
|
-
i0.ɵɵ
|
|
11
|
-
|
|
12
|
+
function ConversationAgentPickerComponent_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
13
|
+
i0.ɵɵelement(0, "img", 2);
|
|
14
|
+
} if (rf & 2) {
|
|
15
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
16
|
+
i0.ɵɵproperty("src", ctx_r0.CurrentAgentLogoUrl, i0.ɵɵsanitizeUrl)("alt", ctx_r0.CurrentAgentLabel);
|
|
17
|
+
} }
|
|
18
|
+
function ConversationAgentPickerComponent_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
19
|
+
i0.ɵɵelement(0, "i");
|
|
20
|
+
} if (rf & 2) {
|
|
21
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
22
|
+
i0.ɵɵclassMap(ctx_r0.CurrentAgentIconClass);
|
|
23
|
+
} }
|
|
24
|
+
function ConversationAgentPickerComponent_Conditional_7_Conditional_7_For_3_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
25
|
+
i0.ɵɵelement(0, "img", 2);
|
|
26
|
+
} if (rf & 2) {
|
|
27
|
+
const agent_r4 = i0.ɵɵnextContext().$implicit;
|
|
28
|
+
i0.ɵɵproperty("src", agent_r4.LogoURL, i0.ɵɵsanitizeUrl)("alt", agent_r4.Name);
|
|
29
|
+
} }
|
|
30
|
+
function ConversationAgentPickerComponent_Conditional_7_Conditional_7_For_3_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
31
|
+
i0.ɵɵelement(0, "i");
|
|
32
|
+
} if (rf & 2) {
|
|
33
|
+
const agent_r4 = i0.ɵɵnextContext().$implicit;
|
|
34
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
35
|
+
i0.ɵɵclassMap(ctx_r0.IconClassFor(agent_r4));
|
|
36
|
+
} }
|
|
37
|
+
function ConversationAgentPickerComponent_Conditional_7_Conditional_7_For_3_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
38
|
+
i0.ɵɵelementStart(0, "span", 17);
|
|
39
|
+
i0.ɵɵtext(1, "Default");
|
|
12
40
|
i0.ɵɵelementEnd();
|
|
13
41
|
} }
|
|
14
|
-
function
|
|
42
|
+
function ConversationAgentPickerComponent_Conditional_7_Conditional_7_For_3_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
43
|
+
i0.ɵɵelementStart(0, "span", 18);
|
|
44
|
+
i0.ɵɵtext(1);
|
|
45
|
+
i0.ɵɵelementEnd();
|
|
46
|
+
} if (rf & 2) {
|
|
47
|
+
const agent_r4 = i0.ɵɵnextContext().$implicit;
|
|
48
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
49
|
+
i0.ɵɵadvance();
|
|
50
|
+
i0.ɵɵtextInterpolate(ctx_r0.BaseAgentNameFor(agent_r4));
|
|
51
|
+
} }
|
|
52
|
+
function ConversationAgentPickerComponent_Conditional_7_Conditional_7_For_3_Template(rf, ctx) { if (rf & 1) {
|
|
15
53
|
const _r3 = i0.ɵɵgetCurrentView();
|
|
16
|
-
i0.ɵɵelementStart(0, "button",
|
|
17
|
-
i0.ɵɵlistener("click", function
|
|
18
|
-
i0.ɵɵ
|
|
19
|
-
i0.ɵɵelementStart(
|
|
20
|
-
i0.ɵɵtext(
|
|
21
|
-
i0.ɵɵelementEnd()
|
|
54
|
+
i0.ɵɵelementStart(0, "button", 15);
|
|
55
|
+
i0.ɵɵlistener("click", function ConversationAgentPickerComponent_Conditional_7_Conditional_7_For_3_Template_button_click_0_listener() { const agent_r4 = i0.ɵɵrestoreView(_r3).$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.PickAgent(agent_r4)); });
|
|
56
|
+
i0.ɵɵconditionalCreate(1, ConversationAgentPickerComponent_Conditional_7_Conditional_7_For_3_Conditional_1_Template, 1, 2, "img", 2)(2, ConversationAgentPickerComponent_Conditional_7_Conditional_7_For_3_Conditional_2_Template, 1, 2, "i", 3);
|
|
57
|
+
i0.ɵɵelementStart(3, "span", 16);
|
|
58
|
+
i0.ɵɵtext(4);
|
|
59
|
+
i0.ɵɵelementEnd();
|
|
60
|
+
i0.ɵɵconditionalCreate(5, ConversationAgentPickerComponent_Conditional_7_Conditional_7_For_3_Conditional_5_Template, 2, 0, "span", 17);
|
|
61
|
+
i0.ɵɵconditionalCreate(6, ConversationAgentPickerComponent_Conditional_7_Conditional_7_For_3_Conditional_6_Template, 2, 1, "span", 18);
|
|
62
|
+
i0.ɵɵelementEnd();
|
|
22
63
|
} if (rf & 2) {
|
|
23
64
|
const agent_r4 = ctx.$implicit;
|
|
24
|
-
const
|
|
25
|
-
i0.ɵɵclassProp("mj-cv-agent-picker__item--selected",
|
|
65
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
66
|
+
i0.ɵɵclassProp("mj-cv-agent-picker__item--selected", ctx_r0.IsSelected(agent_r4));
|
|
26
67
|
i0.ɵɵproperty("title", agent_r4.Description || agent_r4.Name);
|
|
27
68
|
i0.ɵɵadvance();
|
|
28
|
-
i0.ɵɵ
|
|
29
|
-
i0.ɵɵadvance(
|
|
69
|
+
i0.ɵɵconditional(agent_r4.LogoURL ? 1 : 2);
|
|
70
|
+
i0.ɵɵadvance(3);
|
|
30
71
|
i0.ɵɵtextInterpolate(agent_r4.Name);
|
|
72
|
+
i0.ɵɵadvance();
|
|
73
|
+
i0.ɵɵconditional(ctx_r0.IsUserDefaultAgent(agent_r4) ? 5 : -1);
|
|
74
|
+
i0.ɵɵadvance();
|
|
75
|
+
i0.ɵɵconditional(ctx_r0.BaseAgentNameFor(agent_r4) ? 6 : -1);
|
|
76
|
+
} }
|
|
77
|
+
function ConversationAgentPickerComponent_Conditional_7_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
78
|
+
i0.ɵɵelementStart(0, "div", 13);
|
|
79
|
+
i0.ɵɵtext(1, "My Agents");
|
|
80
|
+
i0.ɵɵelementEnd();
|
|
81
|
+
i0.ɵɵrepeaterCreate(2, ConversationAgentPickerComponent_Conditional_7_Conditional_7_For_3_Template, 7, 7, "button", 14, _forTrack0);
|
|
82
|
+
} if (rf & 2) {
|
|
83
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
84
|
+
i0.ɵɵadvance(2);
|
|
85
|
+
i0.ɵɵrepeater(ctx_r0.MyEligibleAgents);
|
|
86
|
+
} }
|
|
87
|
+
function ConversationAgentPickerComponent_Conditional_7_Conditional_8_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
88
|
+
i0.ɵɵelementStart(0, "div", 13);
|
|
89
|
+
i0.ɵɵtext(1, "Catalog Agents");
|
|
90
|
+
i0.ɵɵelementEnd();
|
|
91
|
+
} }
|
|
92
|
+
function ConversationAgentPickerComponent_Conditional_7_Conditional_8_For_2_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
93
|
+
i0.ɵɵelement(0, "img", 2);
|
|
94
|
+
} if (rf & 2) {
|
|
95
|
+
const agent_r6 = i0.ɵɵnextContext().$implicit;
|
|
96
|
+
i0.ɵɵproperty("src", agent_r6.LogoURL, i0.ɵɵsanitizeUrl)("alt", agent_r6.Name);
|
|
31
97
|
} }
|
|
32
|
-
function
|
|
33
|
-
i0.ɵɵ
|
|
98
|
+
function ConversationAgentPickerComponent_Conditional_7_Conditional_8_For_2_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
99
|
+
i0.ɵɵelement(0, "i");
|
|
34
100
|
} if (rf & 2) {
|
|
35
|
-
const
|
|
36
|
-
i0.ɵɵ
|
|
101
|
+
const agent_r6 = i0.ɵɵnextContext().$implicit;
|
|
102
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
103
|
+
i0.ɵɵclassMap(ctx_r0.IconClassFor(agent_r6));
|
|
104
|
+
} }
|
|
105
|
+
function ConversationAgentPickerComponent_Conditional_7_Conditional_8_For_2_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
106
|
+
i0.ɵɵelementStart(0, "span", 17);
|
|
107
|
+
i0.ɵɵtext(1, "Default");
|
|
108
|
+
i0.ɵɵelementEnd();
|
|
109
|
+
} }
|
|
110
|
+
function ConversationAgentPickerComponent_Conditional_7_Conditional_8_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
111
|
+
const _r5 = i0.ɵɵgetCurrentView();
|
|
112
|
+
i0.ɵɵelementStart(0, "button", 15);
|
|
113
|
+
i0.ɵɵlistener("click", function ConversationAgentPickerComponent_Conditional_7_Conditional_8_For_2_Template_button_click_0_listener() { const agent_r6 = i0.ɵɵrestoreView(_r5).$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.PickAgent(agent_r6)); });
|
|
114
|
+
i0.ɵɵconditionalCreate(1, ConversationAgentPickerComponent_Conditional_7_Conditional_8_For_2_Conditional_1_Template, 1, 2, "img", 2)(2, ConversationAgentPickerComponent_Conditional_7_Conditional_8_For_2_Conditional_2_Template, 1, 2, "i", 3);
|
|
115
|
+
i0.ɵɵelementStart(3, "span", 16);
|
|
116
|
+
i0.ɵɵtext(4);
|
|
117
|
+
i0.ɵɵelementEnd();
|
|
118
|
+
i0.ɵɵconditionalCreate(5, ConversationAgentPickerComponent_Conditional_7_Conditional_8_For_2_Conditional_5_Template, 2, 0, "span", 17);
|
|
119
|
+
i0.ɵɵelementEnd();
|
|
120
|
+
} if (rf & 2) {
|
|
121
|
+
const agent_r6 = ctx.$implicit;
|
|
122
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
123
|
+
i0.ɵɵclassProp("mj-cv-agent-picker__item--selected", ctx_r0.IsSelected(agent_r6));
|
|
124
|
+
i0.ɵɵproperty("title", agent_r6.Description || agent_r6.Name);
|
|
125
|
+
i0.ɵɵadvance();
|
|
126
|
+
i0.ɵɵconditional(agent_r6.LogoURL ? 1 : 2);
|
|
127
|
+
i0.ɵɵadvance(3);
|
|
128
|
+
i0.ɵɵtextInterpolate(agent_r6.Name);
|
|
129
|
+
i0.ɵɵadvance();
|
|
130
|
+
i0.ɵɵconditional(ctx_r0.IsUserDefaultAgent(agent_r6) ? 5 : -1);
|
|
131
|
+
} }
|
|
132
|
+
function ConversationAgentPickerComponent_Conditional_7_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
133
|
+
i0.ɵɵconditionalCreate(0, ConversationAgentPickerComponent_Conditional_7_Conditional_8_Conditional_0_Template, 2, 0, "div", 13);
|
|
134
|
+
i0.ɵɵrepeaterCreate(1, ConversationAgentPickerComponent_Conditional_7_Conditional_8_For_2_Template, 6, 6, "button", 14, _forTrack0);
|
|
135
|
+
} if (rf & 2) {
|
|
136
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
137
|
+
i0.ɵɵconditional(ctx_r0.MyEligibleAgents.length > 0 ? 0 : -1);
|
|
138
|
+
i0.ɵɵadvance();
|
|
139
|
+
i0.ɵɵrepeater(ctx_r0.CatalogEligibleAgents);
|
|
140
|
+
} }
|
|
141
|
+
function ConversationAgentPickerComponent_Conditional_7_Conditional_9_Template(rf, ctx) { if (rf & 1) {
|
|
142
|
+
i0.ɵɵelementStart(0, "div", 11);
|
|
143
|
+
i0.ɵɵtext(1, "No agents available");
|
|
144
|
+
i0.ɵɵelementEnd();
|
|
145
|
+
} }
|
|
146
|
+
function ConversationAgentPickerComponent_Conditional_7_Conditional_10_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
147
|
+
const _r7 = i0.ɵɵgetCurrentView();
|
|
148
|
+
i0.ɵɵelementStart(0, "button", 20);
|
|
149
|
+
i0.ɵɵlistener("click", function ConversationAgentPickerComponent_Conditional_7_Conditional_10_Conditional_1_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r7); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.SetUserDefaultAgent((ctx_r0.CurrentPinnedAgent == null ? null : ctx_r0.CurrentPinnedAgent.ID) ?? null)); });
|
|
150
|
+
i0.ɵɵelement(1, "i", 21);
|
|
151
|
+
i0.ɵɵelementStart(2, "span");
|
|
152
|
+
i0.ɵɵtext(3);
|
|
153
|
+
i0.ɵɵelementEnd()();
|
|
154
|
+
} if (rf & 2) {
|
|
155
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
156
|
+
i0.ɵɵproperty("disabled", ctx_r0.IsSavingUserDefault);
|
|
157
|
+
i0.ɵɵadvance(3);
|
|
158
|
+
i0.ɵɵtextInterpolate1("Default ", ctx_r0.CurrentPinnedAgent == null ? null : ctx_r0.CurrentPinnedAgent.Name, " for new chats");
|
|
159
|
+
} }
|
|
160
|
+
function ConversationAgentPickerComponent_Conditional_7_Conditional_10_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
161
|
+
const _r8 = i0.ɵɵgetCurrentView();
|
|
162
|
+
i0.ɵɵelementStart(0, "button", 20);
|
|
163
|
+
i0.ɵɵlistener("click", function ConversationAgentPickerComponent_Conditional_7_Conditional_10_Conditional_2_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r8); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.SetUserDefaultAgent(null)); });
|
|
164
|
+
i0.ɵɵelement(1, "i", 22);
|
|
165
|
+
i0.ɵɵelementStart(2, "span");
|
|
166
|
+
i0.ɵɵtext(3, "Reset new-chat default to org default");
|
|
167
|
+
i0.ɵɵelementEnd()();
|
|
168
|
+
} if (rf & 2) {
|
|
169
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
170
|
+
i0.ɵɵproperty("disabled", ctx_r0.IsSavingUserDefault);
|
|
171
|
+
} }
|
|
172
|
+
function ConversationAgentPickerComponent_Conditional_7_Conditional_10_Template(rf, ctx) { if (rf & 1) {
|
|
173
|
+
i0.ɵɵelementStart(0, "div", 12);
|
|
174
|
+
i0.ɵɵconditionalCreate(1, ConversationAgentPickerComponent_Conditional_7_Conditional_10_Conditional_1_Template, 4, 2, "button", 19)(2, ConversationAgentPickerComponent_Conditional_7_Conditional_10_Conditional_2_Template, 4, 1, "button", 19);
|
|
175
|
+
i0.ɵɵelementEnd();
|
|
176
|
+
} if (rf & 2) {
|
|
177
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
178
|
+
i0.ɵɵadvance();
|
|
179
|
+
i0.ɵɵconditional(ctx_r0.CanSetPinnedAsUserDefault ? 1 : ctx_r0.UserDefaultAgentId ? 2 : -1);
|
|
37
180
|
} }
|
|
38
|
-
function
|
|
39
|
-
const
|
|
40
|
-
i0.ɵɵelementStart(0, "div",
|
|
41
|
-
i0.ɵɵlistener("click", function
|
|
42
|
-
i0.ɵɵelementStart(1, "div",
|
|
181
|
+
function ConversationAgentPickerComponent_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
182
|
+
const _r2 = i0.ɵɵgetCurrentView();
|
|
183
|
+
i0.ɵɵelementStart(0, "div", 7);
|
|
184
|
+
i0.ɵɵlistener("click", function ConversationAgentPickerComponent_Conditional_7_Template_div_click_0_listener($event) { return $event.stopPropagation(); });
|
|
185
|
+
i0.ɵɵelementStart(1, "div", 8);
|
|
43
186
|
i0.ɵɵtext(2, "Default agent for this conversation");
|
|
44
187
|
i0.ɵɵelementEnd();
|
|
45
|
-
i0.ɵɵelementStart(3, "button",
|
|
46
|
-
i0.ɵɵlistener("click", function
|
|
47
|
-
i0.ɵɵelement(4, "i",
|
|
188
|
+
i0.ɵɵelementStart(3, "button", 9);
|
|
189
|
+
i0.ɵɵlistener("click", function ConversationAgentPickerComponent_Conditional_7_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.PickAgent(null)); });
|
|
190
|
+
i0.ɵɵelement(4, "i", 10);
|
|
48
191
|
i0.ɵɵelementStart(5, "span");
|
|
49
192
|
i0.ɵɵtext(6, "Auto (use default)");
|
|
50
193
|
i0.ɵɵelementEnd()();
|
|
51
|
-
i0.ɵɵconditionalCreate(7,
|
|
194
|
+
i0.ɵɵconditionalCreate(7, ConversationAgentPickerComponent_Conditional_7_Conditional_7_Template, 4, 0);
|
|
195
|
+
i0.ɵɵconditionalCreate(8, ConversationAgentPickerComponent_Conditional_7_Conditional_8_Template, 3, 1);
|
|
196
|
+
i0.ɵɵconditionalCreate(9, ConversationAgentPickerComponent_Conditional_7_Conditional_9_Template, 2, 0, "div", 11);
|
|
197
|
+
i0.ɵɵconditionalCreate(10, ConversationAgentPickerComponent_Conditional_7_Conditional_10_Template, 3, 1, "div", 12);
|
|
52
198
|
i0.ɵɵelementEnd();
|
|
53
199
|
} if (rf & 2) {
|
|
54
|
-
const
|
|
200
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
55
201
|
i0.ɵɵadvance(3);
|
|
56
|
-
i0.ɵɵclassProp("mj-cv-agent-picker__item--selected", !(
|
|
202
|
+
i0.ɵɵclassProp("mj-cv-agent-picker__item--selected", !(ctx_r0.Conversation == null ? null : ctx_r0.Conversation.DefaultAgentID));
|
|
57
203
|
i0.ɵɵadvance(4);
|
|
58
|
-
i0.ɵɵconditional(
|
|
204
|
+
i0.ɵɵconditional(ctx_r0.MyEligibleAgents.length > 0 ? 7 : -1);
|
|
205
|
+
i0.ɵɵadvance();
|
|
206
|
+
i0.ɵɵconditional(ctx_r0.CatalogEligibleAgents.length > 0 ? 8 : -1);
|
|
207
|
+
i0.ɵɵadvance();
|
|
208
|
+
i0.ɵɵconditional(ctx_r0.EligibleAgents.length === 0 ? 9 : -1);
|
|
209
|
+
i0.ɵɵadvance();
|
|
210
|
+
i0.ɵɵconditional(ctx_r0.CanShowUserDefaultFooter ? 10 : -1);
|
|
59
211
|
} }
|
|
60
212
|
/**
|
|
61
213
|
* Header widget that lets a user pin a default AI agent on the active
|
|
@@ -93,10 +245,15 @@ export class ConversationAgentPickerComponent {
|
|
|
93
245
|
}
|
|
94
246
|
/** Emitted after a successful save with the new (or null) agent ID. */
|
|
95
247
|
AgentChanged = new EventEmitter();
|
|
248
|
+
/** Emitted after the user updates their per-user default agent for new chats (`Conversations.DefaultAgentID`). */
|
|
249
|
+
UserDefaultAgentChanged = new EventEmitter();
|
|
96
250
|
IsOpen = false;
|
|
97
251
|
EligibleAgents = [];
|
|
252
|
+
UserDefaultAgentId = null;
|
|
253
|
+
IsSavingUserDefault = false;
|
|
98
254
|
cdr = inject(ChangeDetectorRef);
|
|
99
255
|
notifications = inject(MJNotificationService);
|
|
256
|
+
agentService = inject(ConversationAgentService, { optional: true });
|
|
100
257
|
_allowedAgentIDs = null;
|
|
101
258
|
/** Every top-level, active agent, before the allowed list narrows it. */
|
|
102
259
|
catalogAgents = [];
|
|
@@ -106,33 +263,116 @@ export class ConversationAgentPickerComponent {
|
|
|
106
263
|
// loaded — most app shells warm it up at boot, but the picker
|
|
107
264
|
// could mount before that completes.
|
|
108
265
|
await AIEngineBase.Instance.Config(false);
|
|
109
|
-
|
|
110
|
-
.
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
this.applyAllowedAgents();
|
|
266
|
+
if (UserInfoEngine?.Instance) {
|
|
267
|
+
await UserInfoEngine.Instance.Config(false, this.CurrentUser ?? undefined);
|
|
268
|
+
}
|
|
269
|
+
this.refreshUserDefaultAgentId();
|
|
270
|
+
this.rebuildCatalog();
|
|
115
271
|
}
|
|
116
272
|
catch (err) {
|
|
117
273
|
LogError(`ConversationAgentPicker.ngOnInit: ${err instanceof Error ? err.message : String(err)}`);
|
|
118
274
|
}
|
|
119
275
|
}
|
|
276
|
+
get CurrentPinnedAgent() {
|
|
277
|
+
return this.currentPinnedAgent;
|
|
278
|
+
}
|
|
279
|
+
get CanSetPinnedAsUserDefault() {
|
|
280
|
+
const pinned = this.currentPinnedAgent;
|
|
281
|
+
if (!pinned || pinned.InstantiationMode === 'Required')
|
|
282
|
+
return false;
|
|
283
|
+
return !this.IsUserDefaultAgent(pinned);
|
|
284
|
+
}
|
|
285
|
+
get CanShowUserDefaultFooter() {
|
|
286
|
+
return Boolean(this.CurrentUser && (this.CanSetPinnedAsUserDefault || this.UserDefaultAgentId));
|
|
287
|
+
}
|
|
288
|
+
IsUserDefaultAgent(agent) {
|
|
289
|
+
return Boolean(this.UserDefaultAgentId && UUIDsEqual(agent.ID, this.UserDefaultAgentId));
|
|
290
|
+
}
|
|
291
|
+
refreshUserDefaultAgentId() {
|
|
292
|
+
if (!UserInfoEngine?.Instance || typeof UserInfoEngine.Instance.GetSetting !== 'function') {
|
|
293
|
+
this.UserDefaultAgentId = null;
|
|
294
|
+
return;
|
|
295
|
+
}
|
|
296
|
+
const raw = UserInfoEngine.Instance.GetSetting(DefaultAgentResolver.SETTING_NAME)?.trim() ||
|
|
297
|
+
UserInfoEngine.Instance.GetSetting(DefaultAgentResolver.LEGACY_USER_SETTING_NAME)?.trim() ||
|
|
298
|
+
'';
|
|
299
|
+
this.UserDefaultAgentId = raw || null;
|
|
300
|
+
}
|
|
301
|
+
async SetUserDefaultAgent(agentId) {
|
|
302
|
+
if (this.IsSavingUserDefault || !this.CurrentUser)
|
|
303
|
+
return;
|
|
304
|
+
this.IsSavingUserDefault = true;
|
|
305
|
+
this.cdr.markForCheck();
|
|
306
|
+
try {
|
|
307
|
+
const saved = await UserInfoEngine.Instance.SetSetting(DefaultAgentResolver.SETTING_NAME, agentId ?? '', this.CurrentUser);
|
|
308
|
+
if (!saved) {
|
|
309
|
+
this.notifications.CreateSimpleNotification('Failed to update your default agent for new chats.', 'error', 4500);
|
|
310
|
+
return;
|
|
311
|
+
}
|
|
312
|
+
const legacy = UserInfoEngine.Instance.GetSetting(DefaultAgentResolver.LEGACY_USER_SETTING_NAME);
|
|
313
|
+
if (legacy) {
|
|
314
|
+
await UserInfoEngine.Instance.SetSetting(DefaultAgentResolver.LEGACY_USER_SETTING_NAME, '', this.CurrentUser);
|
|
315
|
+
}
|
|
316
|
+
this.UserDefaultAgentId = agentId;
|
|
317
|
+
this.agentService?.ClearConversationManagerCache();
|
|
318
|
+
this.UserDefaultAgentChanged.emit(agentId);
|
|
319
|
+
const label = agentId
|
|
320
|
+
? (this.EligibleAgents.find(a => UUIDsEqual(a.ID, agentId))?.Name ?? 'Selected agent')
|
|
321
|
+
: 'Organization Default';
|
|
322
|
+
this.notifications.CreateSimpleNotification(`Default agent for new chats set to ${label}.`, 'success', 3500);
|
|
323
|
+
this.IsOpen = false;
|
|
324
|
+
}
|
|
325
|
+
catch (err) {
|
|
326
|
+
LogError(`ConversationAgentPicker.SetUserDefaultAgent: ${err instanceof Error ? err.message : String(err)}`);
|
|
327
|
+
}
|
|
328
|
+
finally {
|
|
329
|
+
this.IsSavingUserDefault = false;
|
|
330
|
+
this.cdr.markForCheck();
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
rebuildCatalog() {
|
|
334
|
+
this.catalogAgents = (AIEngineBase.Instance.ReadableAgents ?? [])
|
|
335
|
+
.filter(a => !a.ParentID &&
|
|
336
|
+
a.Status === 'Active' &&
|
|
337
|
+
a.InvocationMode !== 'Sub-Agent' &&
|
|
338
|
+
a.InstantiationMode !== 'Required')
|
|
339
|
+
.sort((a, b) => (a.Name ?? '').localeCompare(b.Name ?? ''));
|
|
340
|
+
this.applyAllowedAgents();
|
|
341
|
+
}
|
|
120
342
|
/** Narrows the catalog to the allowed agents. */
|
|
121
343
|
applyAllowedAgents() {
|
|
122
344
|
this.EligibleAgents = this.catalogAgents.filter(a => IsAgentAllowed(a.ID, this._allowedAgentIDs));
|
|
123
345
|
this.cdr.markForCheck();
|
|
124
346
|
}
|
|
125
|
-
get
|
|
347
|
+
get MyEligibleAgents() {
|
|
348
|
+
return this.EligibleAgents.filter(a => Boolean(a.BaseAgentID));
|
|
349
|
+
}
|
|
350
|
+
get CatalogEligibleAgents() {
|
|
351
|
+
return this.EligibleAgents.filter(a => !a.BaseAgentID);
|
|
352
|
+
}
|
|
353
|
+
get currentPinnedAgent() {
|
|
126
354
|
const id = this.Conversation?.DefaultAgentID;
|
|
127
355
|
if (!id)
|
|
128
|
-
return
|
|
129
|
-
|
|
130
|
-
// If the pinned agent is no longer eligible (deactivated, demoted to
|
|
131
|
-
// sub-agent), still surface its name from the cache so the user can
|
|
132
|
-
// see what was pinned even though they can't re-pin it.
|
|
133
|
-
const fromCache = match
|
|
356
|
+
return undefined;
|
|
357
|
+
return this.EligibleAgents.find(a => UUIDsEqual(a.ID, id))
|
|
134
358
|
?? (AIEngineBase.Instance.ReadableAgents ?? []).find(a => UUIDsEqual(a.ID, id));
|
|
135
|
-
|
|
359
|
+
}
|
|
360
|
+
get CurrentAgentLabel() {
|
|
361
|
+
if (!this.Conversation?.DefaultAgentID)
|
|
362
|
+
return 'Auto';
|
|
363
|
+
return this.currentPinnedAgent?.Name ?? 'Pinned agent';
|
|
364
|
+
}
|
|
365
|
+
get CurrentAgentLogoUrl() {
|
|
366
|
+
const url = this.currentPinnedAgent?.LogoURL?.trim();
|
|
367
|
+
return url ? url : null;
|
|
368
|
+
}
|
|
369
|
+
get CurrentAgentIconClass() {
|
|
370
|
+
return this.currentPinnedAgent ? this.IconClassFor(this.currentPinnedAgent) : 'fa-solid fa-robot';
|
|
371
|
+
}
|
|
372
|
+
BaseAgentNameFor(agent) {
|
|
373
|
+
if (!agent.BaseAgentID)
|
|
374
|
+
return null;
|
|
375
|
+
return AIEngineBase.Instance.GetAgentByID(agent.BaseAgentID)?.Name ?? null;
|
|
136
376
|
}
|
|
137
377
|
get ButtonTitle() {
|
|
138
378
|
return this.Conversation?.DefaultAgentID
|
|
@@ -140,7 +380,13 @@ export class ConversationAgentPickerComponent {
|
|
|
140
380
|
: 'No agent pinned — messages route via the standard rules. Click to pin an agent.';
|
|
141
381
|
}
|
|
142
382
|
IconClassFor(agent) {
|
|
143
|
-
|
|
383
|
+
const raw = agent.IconClass?.trim();
|
|
384
|
+
if (!raw)
|
|
385
|
+
return 'fa-solid fa-robot';
|
|
386
|
+
if (/\bfa-(solid|regular|brands|light|thin|duotone)\b|\bfa[srbltd]\b/.test(raw)) {
|
|
387
|
+
return raw;
|
|
388
|
+
}
|
|
389
|
+
return `fa-solid ${raw}`;
|
|
144
390
|
}
|
|
145
391
|
IsSelected(agent) {
|
|
146
392
|
return !!this.Conversation?.DefaultAgentID
|
|
@@ -151,6 +397,10 @@ export class ConversationAgentPickerComponent {
|
|
|
151
397
|
if (this.Disabled || !this.Conversation)
|
|
152
398
|
return;
|
|
153
399
|
this.IsOpen = !this.IsOpen;
|
|
400
|
+
if (this.IsOpen) {
|
|
401
|
+
this.refreshUserDefaultAgentId();
|
|
402
|
+
this.rebuildCatalog();
|
|
403
|
+
}
|
|
154
404
|
this.cdr.markForCheck();
|
|
155
405
|
}
|
|
156
406
|
async PickAgent(agent) {
|
|
@@ -192,26 +442,28 @@ export class ConversationAgentPickerComponent {
|
|
|
192
442
|
static ɵfac = function ConversationAgentPickerComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ConversationAgentPickerComponent)(); };
|
|
193
443
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ConversationAgentPickerComponent, selectors: [["mj-conversation-agent-picker"]], hostBindings: function ConversationAgentPickerComponent_HostBindings(rf, ctx) { if (rf & 1) {
|
|
194
444
|
i0.ɵɵlistener("click", function ConversationAgentPickerComponent_click_HostBindingHandler($event) { return ctx.OnDocumentClick($event); }, i0.ɵɵresolveDocument);
|
|
195
|
-
} }, inputs: { Conversation: "Conversation", CurrentUser: "CurrentUser", Disabled: "Disabled", AllowedAgentIDs: "AllowedAgentIDs" }, outputs: { AgentChanged: "AgentChanged" }, standalone: false, decls:
|
|
445
|
+
} }, inputs: { Conversation: "Conversation", CurrentUser: "CurrentUser", Disabled: "Disabled", AllowedAgentIDs: "AllowedAgentIDs" }, outputs: { AgentChanged: "AgentChanged", UserDefaultAgentChanged: "UserDefaultAgentChanged" }, standalone: false, decls: 8, vars: 7, consts: [[1, "mj-cv-agent-picker"], ["type", "button", 1, "mj-cv-agent-picker__trigger", 3, "click", "title", "disabled"], [1, "mj-cv-agent-picker__avatar", 3, "src", "alt"], [3, "class"], [1, "mj-cv-agent-picker__label"], [1, "fa-solid", "fa-caret-down", "mj-cv-agent-picker__caret"], [1, "mj-cv-agent-picker__menu"], [1, "mj-cv-agent-picker__menu", 3, "click"], [1, "mj-cv-agent-picker__menu-header"], ["type", "button", 1, "mj-cv-agent-picker__item", 3, "click"], [1, "fa-solid", "fa-wand-magic-sparkles"], [1, "mj-cv-agent-picker__empty"], [1, "mj-cv-agent-picker__footer"], [1, "mj-cv-agent-picker__section-label"], ["type", "button", 1, "mj-cv-agent-picker__item", 3, "mj-cv-agent-picker__item--selected", "title"], ["type", "button", 1, "mj-cv-agent-picker__item", 3, "click", "title"], [1, "mj-cv-agent-picker__item-name"], [1, "mj-cv-agent-picker__default-tag"], [1, "mj-cv-agent-picker__base-tag"], ["type", "button", 1, "mj-cv-agent-picker__footer-btn", 3, "disabled"], ["type", "button", 1, "mj-cv-agent-picker__footer-btn", 3, "click", "disabled"], [1, "fa-solid", "fa-star"], [1, "fa-solid", "fa-rotate-left"]], template: function ConversationAgentPickerComponent_Template(rf, ctx) { if (rf & 1) {
|
|
196
446
|
i0.ɵɵelementStart(0, "div", 0)(1, "button", 1);
|
|
197
447
|
i0.ɵɵlistener("click", function ConversationAgentPickerComponent_Template_button_click_1_listener($event) { return ctx.Toggle($event); });
|
|
198
|
-
i0.ɵɵ
|
|
199
|
-
i0.ɵɵelementStart(
|
|
200
|
-
i0.ɵɵtext(
|
|
448
|
+
i0.ɵɵconditionalCreate(2, ConversationAgentPickerComponent_Conditional_2_Template, 1, 2, "img", 2)(3, ConversationAgentPickerComponent_Conditional_3_Template, 1, 2, "i", 3);
|
|
449
|
+
i0.ɵɵelementStart(4, "span", 4);
|
|
450
|
+
i0.ɵɵtext(5);
|
|
201
451
|
i0.ɵɵelementEnd();
|
|
202
|
-
i0.ɵɵelement(
|
|
452
|
+
i0.ɵɵelement(6, "i", 5);
|
|
203
453
|
i0.ɵɵelementEnd();
|
|
204
|
-
i0.ɵɵconditionalCreate(
|
|
454
|
+
i0.ɵɵconditionalCreate(7, ConversationAgentPickerComponent_Conditional_7_Template, 11, 6, "div", 6);
|
|
205
455
|
i0.ɵɵelementEnd();
|
|
206
456
|
} if (rf & 2) {
|
|
207
457
|
i0.ɵɵclassProp("mj-cv-agent-picker--open", ctx.IsOpen);
|
|
208
458
|
i0.ɵɵadvance();
|
|
209
459
|
i0.ɵɵproperty("title", ctx.ButtonTitle)("disabled", ctx.Disabled || !ctx.Conversation);
|
|
460
|
+
i0.ɵɵadvance();
|
|
461
|
+
i0.ɵɵconditional(ctx.CurrentAgentLogoUrl ? 2 : 3);
|
|
210
462
|
i0.ɵɵadvance(3);
|
|
211
463
|
i0.ɵɵtextInterpolate(ctx.CurrentAgentLabel);
|
|
212
464
|
i0.ɵɵadvance(2);
|
|
213
|
-
i0.ɵɵconditional(ctx.IsOpen ?
|
|
214
|
-
} }, styles: ["\n\n\n .mj-cv-agent-picker[_ngcontent-%COMP%] { position: relative; display: inline-flex; align-items: center; }\n .mj-cv-agent-picker__trigger[_ngcontent-%COMP%] {\n display: inline-flex; align-items: center; gap: 6px;\n padding: 6px 12px; min-height: 32px; box-sizing: border-box;\n background: var(--mj-bg-surface-card); border: 1px solid var(--mj-border-default);\n border-radius: 4px; cursor: pointer;\n color: var(--mj-text-primary); font-size: 0.8125rem; line-height: 1.5;\n transition: background 120ms, border-color 120ms;\n }\n .mj-cv-agent-picker__trigger[_ngcontent-%COMP%]:hover:not(:disabled) {\n background: var(--mj-bg-surface-hover); border-color: var(--mj-border-strong);\n }\n .mj-cv-agent-picker__trigger[_ngcontent-%COMP%]:disabled { opacity: 0.5; cursor: not-allowed; }\n .mj-cv-agent-picker--open[_ngcontent-%COMP%] .mj-cv-agent-picker__trigger[_ngcontent-%COMP%] { border-color: var(--mj-border-focus); }\n .mj-cv-agent-picker__label[_ngcontent-%COMP%] { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n .mj-cv-agent-picker__caret[_ngcontent-%COMP%] { font-size: 10px; opacity: 0.7; }\n .mj-cv-agent-picker__menu[_ngcontent-%COMP%] {\n position: absolute; top: calc(100% + 4px); right: 0; z-index: 50;\n min-width:
|
|
465
|
+
i0.ɵɵconditional(ctx.IsOpen ? 7 : -1);
|
|
466
|
+
} }, styles: ["\n\n\n .mj-cv-agent-picker[_ngcontent-%COMP%] { position: relative; display: inline-flex; align-items: center; }\n .mj-cv-agent-picker__trigger[_ngcontent-%COMP%] {\n display: inline-flex; align-items: center; gap: 6px;\n padding: 6px 12px; min-height: 32px; box-sizing: border-box;\n background: var(--mj-bg-surface-card); border: 1px solid var(--mj-border-default);\n border-radius: 4px; cursor: pointer;\n color: var(--mj-text-primary); font-size: 0.8125rem; line-height: 1.5;\n transition: background 120ms, border-color 120ms;\n }\n .mj-cv-agent-picker__trigger[_ngcontent-%COMP%]:hover:not(:disabled) {\n background: var(--mj-bg-surface-hover); border-color: var(--mj-border-strong);\n }\n .mj-cv-agent-picker__trigger[_ngcontent-%COMP%]:disabled { opacity: 0.5; cursor: not-allowed; }\n .mj-cv-agent-picker--open[_ngcontent-%COMP%] .mj-cv-agent-picker__trigger[_ngcontent-%COMP%] { border-color: var(--mj-border-focus); }\n .mj-cv-agent-picker__label[_ngcontent-%COMP%] { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n .mj-cv-agent-picker__caret[_ngcontent-%COMP%] { font-size: 10px; opacity: 0.7; }\n .mj-cv-agent-picker__avatar[_ngcontent-%COMP%] {\n width: 16px; height: 16px; border-radius: var(--mj-radius-full, 999px);\n object-fit: cover; flex-shrink: 0;\n }\n .mj-cv-agent-picker__menu[_ngcontent-%COMP%] {\n position: absolute; top: calc(100% + 4px); right: 0; z-index: 50;\n min-width: 240px; max-height: 340px; overflow-y: auto;\n background: var(--mj-bg-surface-elevated); border: 1px solid var(--mj-border-default);\n border-radius: 6px; box-shadow: 0 4px 16px color-mix(in srgb, var(--mj-text-primary) 14%, transparent);\n padding: 4px 0;\n }\n .mj-cv-agent-picker__menu-header[_ngcontent-%COMP%] {\n padding: 6px 12px 4px; font-size: 11px; text-transform: uppercase;\n letter-spacing: 0.04em; color: var(--mj-text-muted);\n }\n .mj-cv-agent-picker__section-label[_ngcontent-%COMP%] {\n padding: 6px 12px 3px; font-size: 10px; font-weight: 700; text-transform: uppercase;\n letter-spacing: 0.05em; color: var(--mj-text-muted);\n border-top: 1px solid var(--mj-border-default); margin-top: 4px;\n }\n .mj-cv-agent-picker__item[_ngcontent-%COMP%] {\n display: flex; align-items: center; gap: 8px; width: 100%;\n padding: 6px 12px; background: transparent; border: none; cursor: pointer;\n color: var(--mj-text-primary); font-size: 13px; text-align: left;\n }\n .mj-cv-agent-picker__item[_ngcontent-%COMP%] i[_ngcontent-%COMP%] { width: 14px; text-align: center; color: var(--mj-text-secondary); flex-shrink: 0; }\n .mj-cv-agent-picker__item-name[_ngcontent-%COMP%] { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n .mj-cv-agent-picker__base-tag[_ngcontent-%COMP%] {\n font-size: 10px; padding: 1px 6px; border-radius: var(--mj-radius-full, 999px);\n background: var(--mj-bg-surface-sunken); color: var(--mj-text-muted); flex-shrink: 0;\n }\n .mj-cv-agent-picker__default-tag[_ngcontent-%COMP%] {\n font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: var(--mj-radius-full, 999px);\n background: color-mix(in srgb, var(--mj-brand-primary) 14%, transparent);\n color: var(--mj-brand-primary); flex-shrink: 0;\n }\n .mj-cv-agent-picker__footer[_ngcontent-%COMP%] {\n border-top: 1px solid var(--mj-border-default); margin-top: 4px; padding-top: 4px;\n }\n .mj-cv-agent-picker__footer-btn[_ngcontent-%COMP%] {\n display: flex; align-items: center; gap: 8px; width: 100%;\n padding: 6px 12px; background: transparent; border: none; cursor: pointer;\n color: var(--mj-brand-primary); font-size: 12px; font-weight: 500; text-align: left;\n }\n .mj-cv-agent-picker__footer-btn[_ngcontent-%COMP%]:hover:not(:disabled) { background: var(--mj-bg-surface-hover); }\n .mj-cv-agent-picker__footer-btn[_ngcontent-%COMP%]:disabled { opacity: 0.5; cursor: not-allowed; }\n .mj-cv-agent-picker__item[_ngcontent-%COMP%]:hover { background: var(--mj-bg-surface-hover); }\n .mj-cv-agent-picker__item--selected[_ngcontent-%COMP%] { background: color-mix(in srgb, var(--mj-brand-primary) 10%, transparent); }\n .mj-cv-agent-picker__item--selected[_ngcontent-%COMP%] i[_ngcontent-%COMP%] { color: var(--mj-brand-primary); }\n .mj-cv-agent-picker__empty[_ngcontent-%COMP%] { padding: 8px 12px; font-size: 12px; color: var(--mj-text-muted); }"], changeDetection: 0 });
|
|
215
467
|
}
|
|
216
468
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ConversationAgentPickerComponent, [{
|
|
217
469
|
type: Component,
|
|
@@ -223,7 +475,11 @@ export class ConversationAgentPickerComponent {
|
|
|
223
475
|
[title]="ButtonTitle"
|
|
224
476
|
[disabled]="Disabled || !Conversation"
|
|
225
477
|
(click)="Toggle($event)">
|
|
226
|
-
|
|
478
|
+
@if (CurrentAgentLogoUrl) {
|
|
479
|
+
<img [src]="CurrentAgentLogoUrl" [alt]="CurrentAgentLabel" class="mj-cv-agent-picker__avatar" />
|
|
480
|
+
} @else {
|
|
481
|
+
<i [class]="CurrentAgentIconClass"></i>
|
|
482
|
+
}
|
|
227
483
|
<span class="mj-cv-agent-picker__label">{{ CurrentAgentLabel }}</span>
|
|
228
484
|
<i class="fa-solid fa-caret-down mj-cv-agent-picker__caret"></i>
|
|
229
485
|
</button>
|
|
@@ -238,25 +494,83 @@ export class ConversationAgentPickerComponent {
|
|
|
238
494
|
<i class="fa-solid fa-wand-magic-sparkles"></i>
|
|
239
495
|
<span>Auto (use default)</span>
|
|
240
496
|
</button>
|
|
241
|
-
@if (
|
|
242
|
-
<div class="mj-cv-agent-
|
|
243
|
-
|
|
244
|
-
@for (agent of EligibleAgents; track agent.ID) {
|
|
497
|
+
@if (MyEligibleAgents.length > 0) {
|
|
498
|
+
<div class="mj-cv-agent-picker__section-label">My Agents</div>
|
|
499
|
+
@for (agent of MyEligibleAgents; track agent.ID) {
|
|
245
500
|
<button
|
|
246
501
|
type="button"
|
|
247
502
|
class="mj-cv-agent-picker__item"
|
|
248
503
|
[class.mj-cv-agent-picker__item--selected]="IsSelected(agent)"
|
|
249
504
|
[title]="agent.Description || agent.Name"
|
|
250
505
|
(click)="PickAgent(agent)">
|
|
251
|
-
|
|
252
|
-
|
|
506
|
+
@if (agent.LogoURL) {
|
|
507
|
+
<img [src]="agent.LogoURL" [alt]="agent.Name" class="mj-cv-agent-picker__avatar" />
|
|
508
|
+
} @else {
|
|
509
|
+
<i [class]="IconClassFor(agent)"></i>
|
|
510
|
+
}
|
|
511
|
+
<span class="mj-cv-agent-picker__item-name">{{ agent.Name }}</span>
|
|
512
|
+
@if (IsUserDefaultAgent(agent)) {
|
|
513
|
+
<span class="mj-cv-agent-picker__default-tag">Default</span>
|
|
514
|
+
}
|
|
515
|
+
@if (BaseAgentNameFor(agent)) {
|
|
516
|
+
<span class="mj-cv-agent-picker__base-tag">{{ BaseAgentNameFor(agent) }}</span>
|
|
517
|
+
}
|
|
253
518
|
</button>
|
|
254
519
|
}
|
|
255
520
|
}
|
|
521
|
+
@if (CatalogEligibleAgents.length > 0) {
|
|
522
|
+
@if (MyEligibleAgents.length > 0) {
|
|
523
|
+
<div class="mj-cv-agent-picker__section-label">Catalog Agents</div>
|
|
524
|
+
}
|
|
525
|
+
@for (agent of CatalogEligibleAgents; track agent.ID) {
|
|
526
|
+
<button
|
|
527
|
+
type="button"
|
|
528
|
+
class="mj-cv-agent-picker__item"
|
|
529
|
+
[class.mj-cv-agent-picker__item--selected]="IsSelected(agent)"
|
|
530
|
+
[title]="agent.Description || agent.Name"
|
|
531
|
+
(click)="PickAgent(agent)">
|
|
532
|
+
@if (agent.LogoURL) {
|
|
533
|
+
<img [src]="agent.LogoURL" [alt]="agent.Name" class="mj-cv-agent-picker__avatar" />
|
|
534
|
+
} @else {
|
|
535
|
+
<i [class]="IconClassFor(agent)"></i>
|
|
536
|
+
}
|
|
537
|
+
<span class="mj-cv-agent-picker__item-name">{{ agent.Name }}</span>
|
|
538
|
+
@if (IsUserDefaultAgent(agent)) {
|
|
539
|
+
<span class="mj-cv-agent-picker__default-tag">Default</span>
|
|
540
|
+
}
|
|
541
|
+
</button>
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
@if (EligibleAgents.length === 0) {
|
|
545
|
+
<div class="mj-cv-agent-picker__empty">No agents available</div>
|
|
546
|
+
}
|
|
547
|
+
@if (CanShowUserDefaultFooter) {
|
|
548
|
+
<div class="mj-cv-agent-picker__footer">
|
|
549
|
+
@if (CanSetPinnedAsUserDefault) {
|
|
550
|
+
<button
|
|
551
|
+
type="button"
|
|
552
|
+
class="mj-cv-agent-picker__footer-btn"
|
|
553
|
+
[disabled]="IsSavingUserDefault"
|
|
554
|
+
(click)="SetUserDefaultAgent(CurrentPinnedAgent?.ID ?? null)">
|
|
555
|
+
<i class="fa-solid fa-star"></i>
|
|
556
|
+
<span>Default {{ CurrentPinnedAgent?.Name }} for new chats</span>
|
|
557
|
+
</button>
|
|
558
|
+
} @else if (UserDefaultAgentId) {
|
|
559
|
+
<button
|
|
560
|
+
type="button"
|
|
561
|
+
class="mj-cv-agent-picker__footer-btn"
|
|
562
|
+
[disabled]="IsSavingUserDefault"
|
|
563
|
+
(click)="SetUserDefaultAgent(null)">
|
|
564
|
+
<i class="fa-solid fa-rotate-left"></i>
|
|
565
|
+
<span>Reset new-chat default to org default</span>
|
|
566
|
+
</button>
|
|
567
|
+
}
|
|
568
|
+
</div>
|
|
569
|
+
}
|
|
256
570
|
</div>
|
|
257
571
|
}
|
|
258
572
|
</div>
|
|
259
|
-
`, styles: ["\n /* Match mjButton size=\"sm\" so the trigger lines up with neighboring\n Export / Share buttons: min-height 32px, 6px/12px padding,\n 0.8125rem font. Same border-radius as the other chrome buttons. */\n .mj-cv-agent-picker { position: relative; display: inline-flex; align-items: center; }\n .mj-cv-agent-picker__trigger {\n display: inline-flex; align-items: center; gap: 6px;\n padding: 6px 12px; min-height: 32px; box-sizing: border-box;\n background: var(--mj-bg-surface-card); border: 1px solid var(--mj-border-default);\n border-radius: 4px; cursor: pointer;\n color: var(--mj-text-primary); font-size: 0.8125rem; line-height: 1.5;\n transition: background 120ms, border-color 120ms;\n }\n .mj-cv-agent-picker__trigger:hover:not(:disabled) {\n background: var(--mj-bg-surface-hover); border-color: var(--mj-border-strong);\n }\n .mj-cv-agent-picker__trigger:disabled { opacity: 0.5; cursor: not-allowed; }\n .mj-cv-agent-picker--open .mj-cv-agent-picker__trigger { border-color: var(--mj-border-focus); }\n .mj-cv-agent-picker__label { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n .mj-cv-agent-picker__caret { font-size: 10px; opacity: 0.7; }\n .mj-cv-agent-picker__menu {\n position: absolute; top: calc(100% + 4px); right: 0; z-index: 50;\n min-width:
|
|
573
|
+
`, styles: ["\n /* Match mjButton size=\"sm\" so the trigger lines up with neighboring\n Export / Share buttons: min-height 32px, 6px/12px padding,\n 0.8125rem font. Same border-radius as the other chrome buttons. */\n .mj-cv-agent-picker { position: relative; display: inline-flex; align-items: center; }\n .mj-cv-agent-picker__trigger {\n display: inline-flex; align-items: center; gap: 6px;\n padding: 6px 12px; min-height: 32px; box-sizing: border-box;\n background: var(--mj-bg-surface-card); border: 1px solid var(--mj-border-default);\n border-radius: 4px; cursor: pointer;\n color: var(--mj-text-primary); font-size: 0.8125rem; line-height: 1.5;\n transition: background 120ms, border-color 120ms;\n }\n .mj-cv-agent-picker__trigger:hover:not(:disabled) {\n background: var(--mj-bg-surface-hover); border-color: var(--mj-border-strong);\n }\n .mj-cv-agent-picker__trigger:disabled { opacity: 0.5; cursor: not-allowed; }\n .mj-cv-agent-picker--open .mj-cv-agent-picker__trigger { border-color: var(--mj-border-focus); }\n .mj-cv-agent-picker__label { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n .mj-cv-agent-picker__caret { font-size: 10px; opacity: 0.7; }\n .mj-cv-agent-picker__avatar {\n width: 16px; height: 16px; border-radius: var(--mj-radius-full, 999px);\n object-fit: cover; flex-shrink: 0;\n }\n .mj-cv-agent-picker__menu {\n position: absolute; top: calc(100% + 4px); right: 0; z-index: 50;\n min-width: 240px; max-height: 340px; overflow-y: auto;\n background: var(--mj-bg-surface-elevated); border: 1px solid var(--mj-border-default);\n border-radius: 6px; box-shadow: 0 4px 16px color-mix(in srgb, var(--mj-text-primary) 14%, transparent);\n padding: 4px 0;\n }\n .mj-cv-agent-picker__menu-header {\n padding: 6px 12px 4px; font-size: 11px; text-transform: uppercase;\n letter-spacing: 0.04em; color: var(--mj-text-muted);\n }\n .mj-cv-agent-picker__section-label {\n padding: 6px 12px 3px; font-size: 10px; font-weight: 700; text-transform: uppercase;\n letter-spacing: 0.05em; color: var(--mj-text-muted);\n border-top: 1px solid var(--mj-border-default); margin-top: 4px;\n }\n .mj-cv-agent-picker__item {\n display: flex; align-items: center; gap: 8px; width: 100%;\n padding: 6px 12px; background: transparent; border: none; cursor: pointer;\n color: var(--mj-text-primary); font-size: 13px; text-align: left;\n }\n .mj-cv-agent-picker__item i { width: 14px; text-align: center; color: var(--mj-text-secondary); flex-shrink: 0; }\n .mj-cv-agent-picker__item-name { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n .mj-cv-agent-picker__base-tag {\n font-size: 10px; padding: 1px 6px; border-radius: var(--mj-radius-full, 999px);\n background: var(--mj-bg-surface-sunken); color: var(--mj-text-muted); flex-shrink: 0;\n }\n .mj-cv-agent-picker__default-tag {\n font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: var(--mj-radius-full, 999px);\n background: color-mix(in srgb, var(--mj-brand-primary) 14%, transparent);\n color: var(--mj-brand-primary); flex-shrink: 0;\n }\n .mj-cv-agent-picker__footer {\n border-top: 1px solid var(--mj-border-default); margin-top: 4px; padding-top: 4px;\n }\n .mj-cv-agent-picker__footer-btn {\n display: flex; align-items: center; gap: 8px; width: 100%;\n padding: 6px 12px; background: transparent; border: none; cursor: pointer;\n color: var(--mj-brand-primary); font-size: 12px; font-weight: 500; text-align: left;\n }\n .mj-cv-agent-picker__footer-btn:hover:not(:disabled) { background: var(--mj-bg-surface-hover); }\n .mj-cv-agent-picker__footer-btn:disabled { opacity: 0.5; cursor: not-allowed; }\n .mj-cv-agent-picker__item:hover { background: var(--mj-bg-surface-hover); }\n .mj-cv-agent-picker__item--selected { background: color-mix(in srgb, var(--mj-brand-primary) 10%, transparent); }\n .mj-cv-agent-picker__item--selected i { color: var(--mj-brand-primary); }\n .mj-cv-agent-picker__empty { padding: 8px 12px; font-size: 12px; color: var(--mj-text-muted); }\n "] }]
|
|
260
574
|
}], null, { Conversation: [{
|
|
261
575
|
type: Input
|
|
262
576
|
}], CurrentUser: [{
|
|
@@ -267,9 +581,11 @@ export class ConversationAgentPickerComponent {
|
|
|
267
581
|
type: Input
|
|
268
582
|
}], AgentChanged: [{
|
|
269
583
|
type: Output
|
|
584
|
+
}], UserDefaultAgentChanged: [{
|
|
585
|
+
type: Output
|
|
270
586
|
}], OnDocumentClick: [{
|
|
271
587
|
type: HostListener,
|
|
272
588
|
args: ['document:click', ['$event']]
|
|
273
589
|
}] }); })();
|
|
274
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ConversationAgentPickerComponent, { className: "ConversationAgentPickerComponent", filePath: "src/lib/components/conversation/conversation-agent-picker.component.ts", lineNumber:
|
|
590
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ConversationAgentPickerComponent, { className: "ConversationAgentPickerComponent", filePath: "src/lib/components/conversation/conversation-agent-picker.component.ts", lineNumber: 219 }); })();
|
|
275
591
|
//# sourceMappingURL=conversation-agent-picker.component.js.map
|