@memberjunction/ng-conversations 6.2.2 → 6.3.0-edge.1
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 +49 -24
- package/dist/assets/edge-ai.worker.js +32515 -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 +620 -74
- package/dist/lib/components/artifact/artifact-share-modal.component.js.map +1 -1
- package/dist/lib/components/collection/artifact-create-modal.component.js +4 -4
- package/dist/lib/components/collection/artifact-create-modal.component.js.map +1 -1
- package/dist/lib/components/collection/collection-form-modal.component.js +3 -3
- package/dist/lib/components/collection/collection-form-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 +109 -107
- package/dist/lib/components/collection/collections-full-view.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts +76 -11
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.js +236 -50
- package/dist/lib/components/conversation/conversation-chat-area.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-list.component.d.ts +49 -1
- package/dist/lib/components/conversation/conversation-list.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-list.component.js +151 -41
- package/dist/lib/components/conversation/conversation-list.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-remote-browser-controller.d.ts +11 -3
- package/dist/lib/components/conversation/conversation-remote-browser-controller.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-remote-browser-controller.js +40 -4
- package/dist/lib/components/conversation/conversation-remote-browser-controller.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 +265 -0
- package/dist/lib/components/library/library-workspace.component.d.ts.map +1 -0
- package/dist/lib/components/library/library-workspace.component.js +4420 -0
- package/dist/lib/components/library/library-workspace.component.js.map +1 -0
- package/dist/lib/components/library/library.models.d.ts +162 -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/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 +26 -14
- package/dist/lib/components/message/message-input.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-input.component.js +91 -56
- package/dist/lib/components/message/message-input.component.js.map +1 -1
- package/dist/lib/components/message/message-item.component.d.ts +35 -1
- package/dist/lib/components/message/message-item.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-item.component.js +583 -392
- package/dist/lib/components/message/message-item.component.js.map +1 -1
- package/dist/lib/components/message/message-list.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-list.component.js +2 -0
- 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 +944 -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/channels/client-context-channel.d.ts +20 -4
- package/dist/lib/components/realtime/channels/client-context-channel.d.ts.map +1 -1
- package/dist/lib/components/realtime/channels/client-context-channel.js +62 -8
- 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/realtime-agent-banner.component.js +2 -2
- 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 +5 -3
- package/dist/lib/components/realtime/realtime-composer.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-session-overlay.component.d.ts +81 -32
- package/dist/lib/components/realtime/realtime-session-overlay.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-session-overlay.component.js +506 -185
- package/dist/lib/components/realtime/realtime-session-overlay.component.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 +89 -4
- 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 +4 -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 +5 -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 +12 -13
- 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 +27 -0
- 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 +141 -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/remote-browser/remote-browser-tools.d.ts.map +1 -1
- package/dist/lib/components/realtime/remote-browser/remote-browser-tools.js +2 -2
- package/dist/lib/components/realtime/remote-browser/remote-browser-tools.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/sidebar/conversation-sidebar.component.d.ts +28 -1
- package/dist/lib/components/sidebar/conversation-sidebar.component.d.ts.map +1 -1
- package/dist/lib/components/sidebar/conversation-sidebar.component.js +51 -6
- package/dist/lib/components/sidebar/conversation-sidebar.component.js.map +1 -1
- 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 +692 -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/conversations.module.d.ts +66 -61
- package/dist/lib/conversations.module.d.ts.map +1 -1
- package/dist/lib/conversations.module.js +60 -1
- package/dist/lib/conversations.module.js.map +1 -1
- package/dist/lib/events/chat-events.d.ts +45 -0
- package/dist/lib/events/chat-events.d.ts.map +1 -1
- package/dist/lib/events/chat-events.js +64 -0
- package/dist/lib/events/chat-events.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 +8 -3
- package/dist/lib/services/conversation-agent.service.d.ts.map +1 -1
- package/dist/lib/services/conversation-agent.service.js +9 -3
- 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-audio-recorder.d.ts +10 -8
- package/dist/lib/services/realtime-audio-recorder.d.ts.map +1 -1
- package/dist/lib/services/realtime-audio-recorder.js +28 -12
- package/dist/lib/services/realtime-audio-recorder.js.map +1 -1
- 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 +10 -3
- package/dist/lib/services/realtime-session.service.d.ts.map +1 -1
- package/dist/lib/services/realtime-session.service.js +8 -3
- 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-artifact-summary.d.ts +1 -1
- package/dist/lib/utils/agent-artifact-summary.d.ts.map +1 -1
- package/dist/lib/utils/agent-artifact-summary.js +1 -1
- package/dist/lib/utils/agent-artifact-summary.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 +13 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +15 -1
- package/dist/public-api.js.map +1 -1
- package/package.json +42 -37
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"realtime-agent-banner.component.js","sourceRoot":"","sources":["../../../../src/lib/components/realtime/realtime-agent-banner.component.ts","../../../../src/lib/components/realtime/realtime-agent-banner.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACrF,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;;;;;ICSvC,+BAAwC;IAAA,YAAsB;IAAA,iBAAO;;;IAA7B,cAAsB;IAAtB,6CAAsB;;;IAG9D,+BAAqF;IAAA,YAA4B;IAAA,iBAAO;;;IAAlF,mEAA8C;IAAC,cAA4B;IAA5B,mDAA4B;;;;IAGjH,kCAC8C;IADP,+MAAS,oBAAa,KAAC;IAE5D,wBAAyE;IACzE,4BAAM;IAAA,4BAAY;IACpB,AADoB,iBAAO,EAClB;;;;IAWT,kCACuD;IADT,gNAAS,gCAAyB,KAAC;IAE/E,wBAAoD;IACpD,4BAAM;IAAA,kCAAkB;IAC1B,AAD0B,iBAAO,EACxB;;;;IA/Bb,yBAAkE;IAGhE,AADF,8BAAwB,cACK;IAAA,YAAyB;IAAA,iBAAO;IAC3D,+BAAgC;IAAA,uBAAgE;IAAC,+BAAc;IAAA,iBAAO;IACtH,6GAAwB;IAGxB,6GAA8B;IAG9B,+GAAuB;IAOzB,iBAAM;IAEN,+BAAiD;IAC/C,yBAA0D;IAC1D,iCAA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AAO,IAAI,CAAC,UAAU,IAAI,kBAAkB,CAAC;YAC3D,KAAK,QAAQ,CAAC,CAAC,OAAO,YAAY,CAAC;YACnC,OAAO,CAAC,CAAC,OAAO,EAAE,CAAC;QACrB,CAAC;IACH,CAAC;IAED,+EAA+E;IACxE,MAAM,CAAC,KAA8B;QAC1C,OAAO,KAAK,KAAK,YAAY,IAAI,KAAK,KAAK,UAAU,CAAC;IACxD,CAAC;sHAlOU,4BAA4B;6DAA5B,4BAA4B;YAA5B,iGAAA,qBAAiB,0BAAW;;YC/BzC,8BAAyG;YAoErG,AA1BA,AAzCF,qFAAkB,8DAyCI,+DA0Bb;YAwFX,iBAAM;;YA5JkD,AAApC,gDAAmC,mDAAiD;YACtG,cA0JC;YA1JD,0DA0JC;4BDhIS,YAAY;;iFAIX,4BAA4B;cAPxC,SAAS;6BACI,IAAI,YACN,0BAA0B,WAC3B,CAAC,YAAY,CAAC;;kBAMtB,KAAK;mBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;;kBAUxB,KAAK;;kBAML,KAAK;;kBAGL,KAAK;;kBAML,KAAK;;kBAML,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAOL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAUL,KAAK;;kBAmBL,KAAK;;kBAML,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAgCN,YAAY;mBAAC,gBAAgB;;kFArJnB,4BAA4B","sourcesContent":["import { Component, EventEmitter, HostListener, Input, Output } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { RealtimeConnectionState } from '@memberjunction/realtime-runtime';\nimport { RealtimeUxDensity } from './realtime-disclosure';\n\n/**\n * The call overlay's UNIFIED APP-BAR (per Redesign A — `plans/realtime/mockups/redesign-a.html`):\n * ONE header that owns identity, state, and every session action.\n *\n * - LEFT: the glowing agent orb (motion = turn-state), agent name + \"Co-Agent\" badge,\n * \"speaking as\" subline (+ subtle realtime-model suffix), and the state pill that swaps\n * between a waveform (speaking/listening) and a spinner (connecting/thinking).\n * - RIGHT (live): STATE + WINDOW-CHROME only — the gear (level 2+, opens a popover hosting the\n * Simple/Standard/Pro/Auto INTERFACE DENSITY control — the progressive-disclosure escape hatch,\n * where Simple IS the pure-audio surface — plus the developer-links toggle) and Minimize (hide\n * the call view, call stays live). Call actions (Mute / Captions / Details / Type / End) live in\n * the bottom dock, the single home for each; Captions & End used to duplicate here and were\n * removed, and the standalone pure-audio headphones was folded into the gear's Density = Simple.\n * - RIGHT (review): \"Start live session\" (resume, affirmative leads) + Close — the\n * review session's exit lives up here in the header bar, not floating in the body.\n *\n * Which controls render is decided by the OVERLAY (it owns the disclosure model) and\n * passed down as booleans — this component stays purely presentational.\n */\n@Component({\n standalone: true,\n selector: 'mj-realtime-agent-banner',\n imports: [CommonModule],\n templateUrl: './realtime-agent-banner.component.html',\n styleUrl: './realtime-agent-banner.component.css'\n})\nexport class RealtimeAgentBannerComponent {\n /** Current connection / turn state — drives the orb animation + state label. */\n @Input({ required: true }) State!: RealtimeConnectionState;\n\n /**\n * COMPACT (orb/overlay) presentation: collapse the app-bar to a minimal identity + state\n * row. The duplicate orb, the redundant state pill, and the headphones / gear / expand\n * controls are dropped — the body already shows the big orb + name + state, and the lean\n * bottom dock (Mute / End / •••) owns the session actions. Minimize stays reachable so the\n * user can hide the call without ending it. Fed from the overlay's resolved `Ui.compact`.\n * Default `false` (the full console banner is unchanged).\n */\n @Input() Compact = false;\n\n /**\n * Whether to suppress the turn-state pill and redundant \"speaking as\" label in the banner\n * because the center hero orb is already displaying the agent's name and live turn state.\n */\n @Input() HideState = false;\n\n /** Display name of the agent the voice session fronts (e.g. \"Sage\"). */\n @Input() AgentName = 'the agent';\n\n /**\n * What the state label says in the `'error'` state when the call said why it ended (`DescribeCallEnd`'s `Label`, such\n * as \"Time limit reached\"); `null` keeps \"Connection error\".\n */\n @Input() ErrorLabel: string | null = null;\n\n /**\n * Display name of the realtime model the live session runs on (e.g. \"GPT Realtime 2\").\n * Rendered as a subtle suffix in the identity line; hidden when null/empty.\n */\n @Input() ModelName: string | null = null;\n\n /** Whether developer affordances (the \"Open session\" link) are revealed (gear-gated). */\n @Input() DevMode = false;\n\n /** ID of the server-side agent session record (`MJ: AI Agent Sessions`), when known. */\n @Input() SessionID: string | null = null;\n\n /**\n * SESSION REVIEW presentation: the banner shows the past session's identity\n * (review badge, started→closed range, close-reason chip) instead of live turn-state,\n * and the action cluster swaps to Start-live + Close.\n */\n @Input() ReviewMode = false;\n\n /** When reviewing: when the past session started (`__mj_CreatedAt`). */\n @Input() ReviewStartedAt: Date | null = null;\n\n /** When reviewing: when the past session closed (null while it is still open). */\n @Input() ReviewClosedAt: Date | null = null;\n\n /** When reviewing: why the past session closed (`Explicit` | `Janitor` | `Shutdown` | `Error` | `TimeLimit` | `Idle`), when known. */\n @Input() ReviewCloseReason: string | null = null;\n\n // ── App-bar action cluster (disclosure-gated by the overlay) ────────────────\n // STATE + WINDOW-CHROME only. Captions & End were removed (they duplicated the bottom dock's\n // controls — one home per control), and \"pure audio\" was folded into the gear's Density = Simple.\n\n /**\n * Whether the gear (density escape hatch + dev toggle) renders (disclosure level 2+). Taking the\n * gear away also closes its popover, so no empty popover outlives the button that opened it.\n */\n @Input()\n set ShowGear(value: boolean) {\n this._showGear = value;\n if (!value) {\n this.GearOpen = false;\n }\n }\n get ShowGear(): boolean {\n return this._showGear;\n }\n private _showGear = false;\n\n /**\n * Whether the interface-density segmented control renders inside the gear popover.\n * Default `true` (historical behaviour); a host may hide it via the overlay's\n * `[ShowDensityPicker]` input. The gear itself still renders when {@link ShowGear} is true\n * even if the density picker is hidden; its developer-links toggle renders only when\n * {@link AllowDevLinks} is also true.\n */\n @Input() ShowDensityPicker = true;\n\n /**\n * Host ceiling for developer links: `false` removes the gear's \"Developer links\" toggle.\n * Per-session {@link DevMode} still decides whether links render when allowed.\n */\n @Input() AllowDevLinks = true;\n\n /** Whether the Minimize control renders (live sessions only). */\n @Input() ShowMinimize = false;\n\n /** Review only: whether the \"Start live session\" action renders. */\n @Input() ShowStartLive = true;\n\n /** The user's current interface-density override (selected state in the gear popover). */\n @Input() Density: RealtimeUxDensity = 'auto';\n\n /** Emitted with the session record's ID when the dev \"Open session\" link is clicked. */\n @Output() OpenSessionRequested = new EventEmitter<string>();\n\n /** Emitted when the user toggles developer links from the gear popover. */\n @Output() DevModeToggled = new EventEmitter<boolean>();\n\n /** Emitted when the user picks an interface density in the gear popover. */\n @Output() DensityChanged = new EventEmitter<RealtimeUxDensity>();\n\n /** Emitted when the user minimizes the call view (the call stays live). */\n @Output() MinimizeRequested = new EventEmitter<void>();\n\n /** Review only: the user asked to RESUME the reviewed session as a new live call. */\n @Output() StartLiveRequested = new EventEmitter<void>();\n\n /** Review only: the user asked to close the review and return to the conversation. */\n @Output() CloseRequested = new EventEmitter<void>();\n\n /** Whether the gear popover is open (closed by any outside click). */\n public GearOpen = false;\n\n /** The density choices the gear popover offers, in display order. */\n public readonly Densities: ReadonlyArray<{ Key: RealtimeUxDensity; Label: string }> = [\n { Key: 'simple', Label: 'Simple' },\n { Key: 'standard', Label: 'Standard' },\n { Key: 'pro', Label: 'Pro' },\n { Key: 'auto', Label: 'Auto' }\n ];\n\n /** True when the dev \"Open session\" link should render (gear on + session id known). */\n public get ShowOpenSession(): boolean {\n return this.DevMode && !!this.SessionID;\n }\n\n /** Emits the open-session request for the live agent session record. */\n public OpenSession(): void {\n if (this.SessionID) {\n this.OpenSessionRequested.emit(this.SessionID);\n }\n }\n\n /** Opens/closes the gear popover (stops propagation so the outside-click close skips it). */\n public ToggleGear(event: MouseEvent): void {\n event.stopPropagation();\n this.GearOpen = !this.GearOpen;\n }\n\n /** Any outside click closes the gear popover. */\n @HostListener('document:click')\n public OnDocumentClick(): void {\n if (this.GearOpen) {\n this.GearOpen = false;\n }\n }\n\n /** Gear popover: pick an interface density (the overlay applies + persists it). */\n public SelectDensity(density: RealtimeUxDensity): void {\n this.DensityChanged.emit(density);\n }\n\n /** Gear popover: toggle developer links. */\n public ToggleDev(): void {\n this.DevMode = !this.DevMode;\n this.DevModeToggled.emit(this.DevMode);\n }\n\n /** The review banner's \"started → closed\" time-range label (empty when the start is unknown). */\n public get ReviewRangeLabel(): string {\n if (!this.ReviewStartedAt) {\n return '';\n }\n const start = this.formatStamp(this.ReviewStartedAt);\n if (!this.ReviewClosedAt) {\n return start;\n }\n return `${start} → ${this.formatStamp(this.ReviewClosedAt, this.ReviewStartedAt)}`;\n }\n\n /** Human label for the close-reason chip (empty hides the chip). */\n public get ReviewCloseReasonLabel(): string {\n switch (this.ReviewCloseReason) {\n case 'Explicit': return 'Ended by user';\n case 'Janitor': return 'Closed by janitor';\n case 'TimeLimit': return 'Time limit';\n case 'Idle': return 'Idle — no activity';\n case 'Shutdown': return 'Closed at shutdown';\n case 'Error': return 'Ended with error';\n default: return '';\n }\n }\n\n /** Compact date+time stamp; same-day end stamps drop the redundant date part. */\n private formatStamp(date: Date, sameDayAs?: Date | null): string {\n const time = date.toLocaleTimeString([], { hour: 'numeric', minute: '2-digit' }).toLowerCase();\n if (sameDayAs && date.toDateString() === sameDayAs.toDateString()) {\n return time;\n }\n return `${date.toLocaleDateString([], { month: 'short', day: 'numeric' })}, ${time}`;\n }\n\n /** Maps the realtime state to the orb's `data-state` (the orb only models active turn-states). */\n public OrbState(state: RealtimeConnectionState): 'speaking' | 'listening' | 'thinking' {\n switch (state) {\n case 'speaking': return 'speaking';\n case 'thinking': return 'thinking';\n default: return 'listening';\n }\n }\n\n /** Human-readable state label, agent-aware where it reads better. */\n public StateLabel(state: RealtimeConnectionState): string {\n switch (state) {\n case 'connecting': return 'Connecting…';\n case 'listening': return 'Listening';\n case 'speaking': return `${this.AgentName} is speaking…`;\n case 'thinking': return 'Working on it…';\n case 'error': return this.ErrorLabel ?? 'Connection error';\n case 'closed': return 'Call ended';\n default: return '';\n }\n }\n\n /** True while the state pill should show a spinner instead of the waveform. */\n public IsBusy(state: RealtimeConnectionState): boolean {\n return state === 'connecting' || state === 'thinking';\n }\n}\n","<div class=\"banner\" [class.banner--review]=\"ReviewMode\" [class.banner--compact]=\"Compact && !ReviewMode\">\n @if (ReviewMode) {\n <!-- SESSION REVIEW: static orb · name · review badge · started→closed · close-reason chip,\n with the review's exit actions up here in the header bar (Start live leads, Close trails). -->\n <div class=\"agent-orb agent-orb--review\" aria-hidden=\"true\"></div>\n\n <div class=\"banner__id\">\n <span class=\"banner__name\">Voice for {{ AgentName }}</span>\n <span class=\"pill pill--review\"><i class=\"fa-solid fa-clock-rotate-left\" aria-hidden=\"true\"></i> Session review</span>\n @if (ReviewRangeLabel) {\n <span class=\"banner__for banner__range\">{{ ReviewRangeLabel }}</span>\n }\n @if (ReviewCloseReasonLabel) {\n <span class=\"pill pill--close-reason\" [title]=\"'Close reason: ' + ReviewCloseReason\">{{ ReviewCloseReasonLabel }}</span>\n }\n @if (ShowOpenSession) {\n <button type=\"button\" class=\"dev-link\" (click)=\"OpenSession()\"\n title=\"Open the agent session record\">\n <i class=\"fa-solid fa-arrow-up-right-from-square\" aria-hidden=\"true\"></i>\n <span>Open session</span>\n </button>\n }\n </div>\n\n <div class=\"banner__state banner__state--review\">\n <i class=\"fa-solid fa-box-archive\" aria-hidden=\"true\"></i>\n <span class=\"banner__state-label banner__state-label--review\">Reviewing past session</span>\n </div>\n\n <div class=\"bar-actions\">\n @if (ShowStartLive) {\n <button type=\"button\" class=\"start-live-pill\" (click)=\"StartLiveRequested.emit()\"\n title=\"Resume this session as a new live call\">\n <i class=\"fa-solid fa-phone\" aria-hidden=\"true\"></i>\n <span>Start live session</span>\n </button>\n }\n <button type=\"button\" class=\"iconb\" (click)=\"CloseRequested.emit()\"\n title=\"Close review\" aria-label=\"Close session review\">\n <i class=\"fa-solid fa-xmark\" aria-hidden=\"true\"></i>\n </button>\n </div>\n } @else if (Compact) {\n <!-- COMPACT (Calm Orb · overlay): a tiny identity + state row only. No duplicate orb,\n no state pill, no headphones / gear / expand — the body shows the big orb + name +\n state, and the lean dock owns the actions. Minimize stays reachable here. -->\n <div class=\"banner__id banner__id--compact\">\n <span class=\"banner__avatar\" aria-hidden=\"true\">{{ AgentName.charAt(0) }}</span>\n <span class=\"banner__name banner__name--compact\">{{ AgentName }}</span>\n @if (!HideState) {\n <span class=\"banner__state-chip\">\n @if (IsBusy(State)) {\n <i class=\"fa-solid fa-spinner fa-spin\" aria-hidden=\"true\"></i>\n } @else {\n <span class=\"banner__state-dot\" [attr.data-state]=\"OrbState(State)\" aria-hidden=\"true\"></span>\n }\n <span class=\"banner__state-chip-label\">{{ StateLabel(State) }}</span>\n </span>\n }\n </div>\n\n @if (ShowMinimize) {\n <button type=\"button\" class=\"iconb banner__minimize--compact\" (click)=\"MinimizeRequested.emit()\"\n title=\"Hide the call view — the call stays live\"\n aria-label=\"Minimize the call view\">\n <i class=\"fa-solid fa-minus\" aria-hidden=\"true\"></i>\n </button>\n }\n } @else {\n <div class=\"agent-orb\" [attr.data-state]=\"OrbState(State)\" aria-hidden=\"true\"></div>\n\n <div class=\"banner__id\">\n <span class=\"banner__name\">Voice for {{ AgentName }}</span>\n <span class=\"pill pill--sage\"><i class=\"fa-solid fa-feather\" aria-hidden=\"true\"></i> Co-Agent</span>\n @if (!HideState) {\n <span class=\"banner__for\">speaking as <b>{{ AgentName }}</b></span>\n }\n @if (ModelName) {\n <span class=\"banner__model\" [title]=\"'Realtime voice model: ' + ModelName\">· {{ ModelName }}</span>\n }\n @if (ShowOpenSession) {\n <button type=\"button\" class=\"dev-link\" (click)=\"OpenSession()\"\n title=\"Open the agent session record\">\n <i class=\"fa-solid fa-arrow-up-right-from-square\" aria-hidden=\"true\"></i>\n <span>Open session</span>\n </button>\n }\n </div>\n\n @if (!HideState) {\n <div class=\"banner__state\" [class.banner__state--busy]=\"IsBusy(State)\">\n @if (IsBusy(State)) {\n <i class=\"fa-solid fa-spinner fa-spin\" aria-hidden=\"true\"></i>\n } @else {\n <div class=\"waveform\" [class.waveform--idle]=\"State !== 'speaking'\" aria-hidden=\"true\">\n <span></span><span></span><span></span><span></span>\n <span></span><span></span><span></span><span></span>\n </div>\n }\n <span class=\"banner__state-label\">{{ StateLabel(State) }}</span>\n </div>\n }\n\n <!-- Disclosure-gated app-bar action cluster: STATE + WINDOW-CHROME only. Call actions\n (Mute / Captions / Details / Type / End) live in the bottom dock — the single home for\n each control. Captions & End were removed from here (they were exact duplicates of the\n dock's), and the standalone \"pure audio\" headphones was folded into the gear's Density =\n Simple. What remains up here is non-duplicated chrome: the gear (density + dev links) and\n Minimize. -->\n <div class=\"bar-actions\">\n @if (ShowGear) {\n <button type=\"button\" class=\"iconb\" [class.iconb--on]=\"GearOpen || DevMode\"\n (click)=\"ToggleGear($event)\"\n title=\"Interface density & developer links\"\n [attr.aria-expanded]=\"GearOpen\">\n <i class=\"fa-solid fa-gear\" aria-hidden=\"true\"></i>\n </button>\n }\n @if (ShowMinimize) {\n <button type=\"button\" class=\"iconb\" (click)=\"MinimizeRequested.emit()\"\n title=\"Hide the call view — the call stays live\"\n aria-label=\"Minimize the call view\">\n <i class=\"fa-solid fa-down-left-and-up-right-to-center\" aria-hidden=\"true\"></i>\n </button>\n }\n </div>\n\n <!-- Gear popover: interface density (the disclosure escape hatch) + developer links. -->\n @if (GearOpen) {\n <div class=\"gear-pop\" (click)=\"$event.stopPropagation()\" role=\"menu\" aria-label=\"Interface settings\">\n <div class=\"gp-h\">Interface</div>\n @if (ShowDensityPicker) {\n <div class=\"gp-row\">\n <span class=\"gp-l\">Density</span>\n <div class=\"gp-seg\" role=\"radiogroup\" aria-label=\"Interface density\">\n @for (d of Densities; track d.Key) {\n <button type=\"button\" [class.on]=\"Density === d.Key\"\n (click)=\"SelectDensity(d.Key)\"\n [attr.aria-checked]=\"Density === d.Key\" role=\"radio\">{{ d.Label }}</button>\n }\n </div>\n </div>\n <div class=\"gp-note\">Simple returns to the pure-audio surface. Auto grows the console as you use it.</div>\n }\n @if (ShowDensityPicker && AllowDevLinks) {\n <div class=\"gp-div\"></div>\n }\n @if (AllowDevLinks) {\n <button type=\"button\" class=\"gp-link\" (click)=\"ToggleDev()\" [attr.aria-pressed]=\"DevMode\">\n <i class=\"fa-solid\" [ngClass]=\"DevMode ? 'fa-toggle-on' : 'fa-toggle-off'\" aria-hidden=\"true\"></i>\n Developer links {{ DevMode ? 'on' : 'off' }}\n </button>\n }\n </div>\n }\n }\n</div>\n"]}
|
|
1
|
+
{"version":3,"file":"realtime-agent-banner.component.js","sourceRoot":"","sources":["../../../../src/lib/components/realtime/realtime-agent-banner.component.ts","../../../../src/lib/components/realtime/realtime-agent-banner.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACrF,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;;;;;ICSvC,+BAAwC;IAAA,YAAsB;IAAA,iBAAO;;;IAA7B,cAAsB;IAAtB,6CAAsB;;;IAG9D,+BAAqF;IAAA,YAA4B;IAAA,iBAAO;;;IAAlF,mEAA8C;IAAC,cAA4B;IAA5B,mDAA4B;;;;IAGjH,kCAC8C;IADP,+MAAS,oBAAa,KAAC;IAE5D,wBAAyE;IACzE,4BAAM;IAAA,4BAAY;IACpB,AADoB,iBAAO,EAClB;;;;IAWT,kCACuD;IADT,gNAAS,gCAAyB,KAAC;IAE/E,wBAAoD;IACpD,4BAAM;IAAA,8BAAc;IACtB,AADsB,iBAAO,EACpB;;;;IA/Bb,yBAAkE;IAGhE,AADF,8BAAwB,cACK;IAAA,YAAyB;IAAA,iBAAO;IAC3D,+BAAgC;IAAA,uBAAgE;IAAC,+BAAc;IAAA,iBAAO;IACtH,6GAAwB;IAGxB,6GAA8B;IAG9B,+GAAuB;IAOzB,iBAAM;IAEN,+BAAiD;IAC/C,yB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AAO,CAAC,CAAC,OAAO,IAAI,CAAC,UAAU,IAAI,kBAAkB,CAAC;YAC3D,KAAK,QAAQ,CAAC,CAAC,OAAO,YAAY,CAAC;YACnC,OAAO,CAAC,CAAC,OAAO,EAAE,CAAC;QACrB,CAAC;IACH,CAAC;IAED,+EAA+E;IACxE,MAAM,CAAC,KAA8B;QAC1C,OAAO,KAAK,KAAK,YAAY,IAAI,KAAK,KAAK,UAAU,CAAC;IACxD,CAAC;sHAlOU,4BAA4B;6DAA5B,4BAA4B;YAA5B,iGAAA,qBAAiB,0BAAW;;YC/BzC,8BAAyG;YAoErG,AA1BA,AAzCF,qFAAkB,8DAyCI,+DA0Bb;YAwFX,iBAAM;;YA5JkD,AAApC,gDAAmC,mDAAiD;YACtG,cA0JC;YA1JD,0DA0JC;4BDhIS,YAAY;;iFAIX,4BAA4B;cAPxC,SAAS;6BACI,IAAI,YACN,0BAA0B,WAC3B,CAAC,YAAY,CAAC;;kBAMtB,KAAK;mBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;;kBAUxB,KAAK;;kBAML,KAAK;;kBAGL,KAAK;;kBAML,KAAK;;kBAML,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAOL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAUL,KAAK;;kBAmBL,KAAK;;kBAML,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAGN,MAAM;;kBAgCN,YAAY;mBAAC,gBAAgB;;kFArJnB,4BAA4B","sourcesContent":["import { Component, EventEmitter, HostListener, Input, Output } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { RealtimeConnectionState } from '@memberjunction/realtime-runtime';\nimport { RealtimeUxDensity } from './realtime-disclosure';\n\n/**\n * The call overlay's UNIFIED APP-BAR (per Redesign A — `plans/realtime/mockups/redesign-a.html`):\n * ONE header that owns identity, state, and every session action.\n *\n * - LEFT: the glowing agent orb (motion = turn-state), agent name + \"Co-Agent\" badge,\n * \"speaking as\" subline (+ subtle realtime-model suffix), and the state pill that swaps\n * between a waveform (speaking/listening) and a spinner (connecting/thinking).\n * - RIGHT (live): STATE + WINDOW-CHROME only — the gear (level 2+, opens a popover hosting the\n * Simple/Standard/Pro/Auto INTERFACE DENSITY control — the progressive-disclosure escape hatch,\n * where Simple IS the pure-audio surface — plus the developer-links toggle) and Minimize (hide\n * the call view, call stays live). Call actions (Mute / Captions / Details / Type / End) live in\n * the bottom dock, the single home for each; Captions & End used to duplicate here and were\n * removed, and the standalone pure-audio headphones was folded into the gear's Density = Simple.\n * - RIGHT (review): \"Start live session\" (resume, affirmative leads) + Close — the\n * review session's exit lives up here in the header bar, not floating in the body.\n *\n * Which controls render is decided by the OVERLAY (it owns the disclosure model) and\n * passed down as booleans — this component stays purely presentational.\n */\n@Component({\n standalone: true,\n selector: 'mj-realtime-agent-banner',\n imports: [CommonModule],\n templateUrl: './realtime-agent-banner.component.html',\n styleUrl: './realtime-agent-banner.component.css'\n})\nexport class RealtimeAgentBannerComponent {\n /** Current connection / turn state — drives the orb animation + state label. */\n @Input({ required: true }) State!: RealtimeConnectionState;\n\n /**\n * COMPACT (orb/overlay) presentation: collapse the app-bar to a minimal identity + state\n * row. The duplicate orb, the redundant state pill, and the headphones / gear / expand\n * controls are dropped — the body already shows the big orb + name + state, and the lean\n * bottom dock (Mute / End / •••) owns the session actions. Minimize stays reachable so the\n * user can hide the call without ending it. Fed from the overlay's resolved `Ui.compact`.\n * Default `false` (the full console banner is unchanged).\n */\n @Input() Compact = false;\n\n /**\n * Whether to suppress the turn-state pill and redundant \"speaking as\" label in the banner\n * because the center hero orb is already displaying the agent's name and live turn state.\n */\n @Input() HideState = false;\n\n /** Display name of the agent the voice session fronts (e.g. \"Sage\"). */\n @Input() AgentName = 'the agent';\n\n /**\n * What the state label says in the `'error'` state when the call said why it ended (`DescribeCallEnd`'s `Label`, such\n * as \"Time limit reached\"); `null` keeps \"Connection error\".\n */\n @Input() ErrorLabel: string | null = null;\n\n /**\n * Display name of the realtime model the live session runs on (e.g. \"GPT Realtime 2\").\n * Rendered as a subtle suffix in the identity line; hidden when null/empty.\n */\n @Input() ModelName: string | null = null;\n\n /** Whether developer affordances (the \"Open session\" link) are revealed (gear-gated). */\n @Input() DevMode = false;\n\n /** ID of the server-side agent session record (`MJ: AI Agent Sessions`), when known. */\n @Input() SessionID: string | null = null;\n\n /**\n * SESSION REVIEW presentation: the banner shows the past session's identity\n * (review badge, started→closed range, close-reason chip) instead of live turn-state,\n * and the action cluster swaps to Start-live + Close.\n */\n @Input() ReviewMode = false;\n\n /** When reviewing: when the past session started (`__mj_CreatedAt`). */\n @Input() ReviewStartedAt: Date | null = null;\n\n /** When reviewing: when the past session closed (null while it is still open). */\n @Input() ReviewClosedAt: Date | null = null;\n\n /** When reviewing: why the past session closed (`Explicit` | `Janitor` | `Shutdown` | `Error` | `TimeLimit` | `Idle`), when known. */\n @Input() ReviewCloseReason: string | null = null;\n\n // ── App-bar action cluster (disclosure-gated by the overlay) ────────────────\n // STATE + WINDOW-CHROME only. Captions & End were removed (they duplicated the bottom dock's\n // controls — one home per control), and \"pure audio\" was folded into the gear's Density = Simple.\n\n /**\n * Whether the gear (density escape hatch + dev toggle) renders (disclosure level 2+). Taking the\n * gear away also closes its popover, so no empty popover outlives the button that opened it.\n */\n @Input()\n set ShowGear(value: boolean) {\n this._showGear = value;\n if (!value) {\n this.GearOpen = false;\n }\n }\n get ShowGear(): boolean {\n return this._showGear;\n }\n private _showGear = false;\n\n /**\n * Whether the interface-density segmented control renders inside the gear popover.\n * Default `true` (historical behaviour); a host may hide it via the overlay's\n * `[ShowDensityPicker]` input. The gear itself still renders when {@link ShowGear} is true\n * even if the density picker is hidden; its developer-links toggle renders only when\n * {@link AllowDevLinks} is also true.\n */\n @Input() ShowDensityPicker = true;\n\n /**\n * Host ceiling for developer links: `false` removes the gear's \"Developer links\" toggle.\n * Per-session {@link DevMode} still decides whether links render when allowed.\n */\n @Input() AllowDevLinks = true;\n\n /** Whether the Minimize control renders (live sessions only). */\n @Input() ShowMinimize = false;\n\n /** Review only: whether the \"Start live session\" action renders. */\n @Input() ShowStartLive = true;\n\n /** The user's current interface-density override (selected state in the gear popover). */\n @Input() Density: RealtimeUxDensity = 'auto';\n\n /** Emitted with the session record's ID when the dev \"Open session\" link is clicked. */\n @Output() OpenSessionRequested = new EventEmitter<string>();\n\n /** Emitted when the user toggles developer links from the gear popover. */\n @Output() DevModeToggled = new EventEmitter<boolean>();\n\n /** Emitted when the user picks an interface density in the gear popover. */\n @Output() DensityChanged = new EventEmitter<RealtimeUxDensity>();\n\n /** Emitted when the user minimizes the call view (the call stays live). */\n @Output() MinimizeRequested = new EventEmitter<void>();\n\n /** Review only: the user asked to RESUME the reviewed session as a new live call. */\n @Output() StartLiveRequested = new EventEmitter<void>();\n\n /** Review only: the user asked to close the review and return to the conversation. */\n @Output() CloseRequested = new EventEmitter<void>();\n\n /** Whether the gear popover is open (closed by any outside click). */\n public GearOpen = false;\n\n /** The density choices the gear popover offers, in display order. */\n public readonly Densities: ReadonlyArray<{ Key: RealtimeUxDensity; Label: string }> = [\n { Key: 'simple', Label: 'Simple' },\n { Key: 'standard', Label: 'Standard' },\n { Key: 'pro', Label: 'Pro' },\n { Key: 'auto', Label: 'Auto' }\n ];\n\n /** True when the dev \"Open session\" link should render (gear on + session id known). */\n public get ShowOpenSession(): boolean {\n return this.DevMode && !!this.SessionID;\n }\n\n /** Emits the open-session request for the live agent session record. */\n public OpenSession(): void {\n if (this.SessionID) {\n this.OpenSessionRequested.emit(this.SessionID);\n }\n }\n\n /** Opens/closes the gear popover (stops propagation so the outside-click close skips it). */\n public ToggleGear(event: MouseEvent): void {\n event.stopPropagation();\n this.GearOpen = !this.GearOpen;\n }\n\n /** Any outside click closes the gear popover. */\n @HostListener('document:click')\n public OnDocumentClick(): void {\n if (this.GearOpen) {\n this.GearOpen = false;\n }\n }\n\n /** Gear popover: pick an interface density (the overlay applies + persists it). */\n public SelectDensity(density: RealtimeUxDensity): void {\n this.DensityChanged.emit(density);\n }\n\n /** Gear popover: toggle developer links. */\n public ToggleDev(): void {\n this.DevMode = !this.DevMode;\n this.DevModeToggled.emit(this.DevMode);\n }\n\n /** The review banner's \"started → closed\" time-range label (empty when the start is unknown). */\n public get ReviewRangeLabel(): string {\n if (!this.ReviewStartedAt) {\n return '';\n }\n const start = this.formatStamp(this.ReviewStartedAt);\n if (!this.ReviewClosedAt) {\n return start;\n }\n return `${start} → ${this.formatStamp(this.ReviewClosedAt, this.ReviewStartedAt)}`;\n }\n\n /** Human label for the close-reason chip (empty hides the chip). */\n public get ReviewCloseReasonLabel(): string {\n switch (this.ReviewCloseReason) {\n case 'Explicit': return 'Ended by user';\n case 'Janitor': return 'Closed by janitor';\n case 'TimeLimit': return 'Time limit';\n case 'Idle': return 'Idle — no activity';\n case 'Shutdown': return 'Closed at shutdown';\n case 'Error': return 'Ended with error';\n default: return '';\n }\n }\n\n /** Compact date+time stamp; same-day end stamps drop the redundant date part. */\n private formatStamp(date: Date, sameDayAs?: Date | null): string {\n const time = date.toLocaleTimeString([], { hour: 'numeric', minute: '2-digit' }).toLowerCase();\n if (sameDayAs && date.toDateString() === sameDayAs.toDateString()) {\n return time;\n }\n return `${date.toLocaleDateString([], { month: 'short', day: 'numeric' })}, ${time}`;\n }\n\n /** Maps the realtime state to the orb's `data-state` (the orb only models active turn-states). */\n public OrbState(state: RealtimeConnectionState): 'speaking' | 'listening' | 'thinking' {\n switch (state) {\n case 'speaking': return 'speaking';\n case 'thinking': return 'thinking';\n default: return 'listening';\n }\n }\n\n /** Human-readable state label, agent-aware where it reads better. */\n public StateLabel(state: RealtimeConnectionState): string {\n switch (state) {\n case 'connecting': return 'Connecting…';\n case 'listening': return 'Listening';\n case 'speaking': return `${this.AgentName} is speaking…`;\n case 'thinking': return 'Working on it…';\n case 'error': return this.ErrorLabel ?? 'Connection error';\n case 'closed': return 'Call ended';\n default: return '';\n }\n }\n\n /** True while the state pill should show a spinner instead of the waveform. */\n public IsBusy(state: RealtimeConnectionState): boolean {\n return state === 'connecting' || state === 'thinking';\n }\n}\n","<div class=\"banner\" [class.banner--review]=\"ReviewMode\" [class.banner--compact]=\"Compact && !ReviewMode\">\n @if (ReviewMode) {\n <!-- SESSION REVIEW: static orb · name · review badge · started→closed · close-reason chip,\n with the review's exit actions up here in the header bar (Start live leads, Close trails). -->\n <div class=\"agent-orb agent-orb--review\" aria-hidden=\"true\"></div>\n\n <div class=\"banner__id\">\n <span class=\"banner__name\">Voice for {{ AgentName }}</span>\n <span class=\"pill pill--review\"><i class=\"fa-solid fa-clock-rotate-left\" aria-hidden=\"true\"></i> Session review</span>\n @if (ReviewRangeLabel) {\n <span class=\"banner__for banner__range\">{{ ReviewRangeLabel }}</span>\n }\n @if (ReviewCloseReasonLabel) {\n <span class=\"pill pill--close-reason\" [title]=\"'Close reason: ' + ReviewCloseReason\">{{ ReviewCloseReasonLabel }}</span>\n }\n @if (ShowOpenSession) {\n <button type=\"button\" class=\"dev-link\" (click)=\"OpenSession()\"\n title=\"Open the agent session record\">\n <i class=\"fa-solid fa-arrow-up-right-from-square\" aria-hidden=\"true\"></i>\n <span>Open session</span>\n </button>\n }\n </div>\n\n <div class=\"banner__state banner__state--review\">\n <i class=\"fa-solid fa-box-archive\" aria-hidden=\"true\"></i>\n <span class=\"banner__state-label banner__state-label--review\">Reviewing past session</span>\n </div>\n\n <div class=\"bar-actions\">\n @if (ShowStartLive) {\n <button type=\"button\" class=\"start-live-pill\" (click)=\"StartLiveRequested.emit()\"\n title=\"Resume this session as a new live call\">\n <i class=\"fa-solid fa-phone\" aria-hidden=\"true\"></i>\n <span>Resume session</span>\n </button>\n }\n <button type=\"button\" class=\"iconb\" (click)=\"CloseRequested.emit()\"\n title=\"Close review\" aria-label=\"Close session review\">\n <i class=\"fa-solid fa-xmark\" aria-hidden=\"true\"></i>\n </button>\n </div>\n } @else if (Compact) {\n <!-- COMPACT (Calm Orb · overlay): a tiny identity + state row only. No duplicate orb,\n no state pill, no headphones / gear / expand — the body shows the big orb + name +\n state, and the lean dock owns the actions. Minimize stays reachable here. -->\n <div class=\"banner__id banner__id--compact\">\n <span class=\"banner__avatar\" aria-hidden=\"true\">{{ AgentName.charAt(0) }}</span>\n <span class=\"banner__name banner__name--compact\">{{ AgentName }}</span>\n @if (!HideState) {\n <span class=\"banner__state-chip\">\n @if (IsBusy(State)) {\n <i class=\"fa-solid fa-spinner fa-spin\" aria-hidden=\"true\"></i>\n } @else {\n <span class=\"banner__state-dot\" [attr.data-state]=\"OrbState(State)\" aria-hidden=\"true\"></span>\n }\n <span class=\"banner__state-chip-label\">{{ StateLabel(State) }}</span>\n </span>\n }\n </div>\n\n @if (ShowMinimize) {\n <button type=\"button\" class=\"iconb banner__minimize--compact\" (click)=\"MinimizeRequested.emit()\"\n title=\"Hide the call view — the call stays live\"\n aria-label=\"Minimize the call view\">\n <i class=\"fa-solid fa-minus\" aria-hidden=\"true\"></i>\n </button>\n }\n } @else {\n <div class=\"agent-orb\" [attr.data-state]=\"OrbState(State)\" aria-hidden=\"true\"></div>\n\n <div class=\"banner__id\">\n <span class=\"banner__name\">Voice for {{ AgentName }}</span>\n <span class=\"pill pill--sage\"><i class=\"fa-solid fa-feather\" aria-hidden=\"true\"></i> Co-Agent</span>\n @if (!HideState) {\n <span class=\"banner__for\">speaking as <b>{{ AgentName }}</b></span>\n }\n @if (ModelName) {\n <span class=\"banner__model\" [title]=\"'Realtime voice model: ' + ModelName\">· {{ ModelName }}</span>\n }\n @if (ShowOpenSession) {\n <button type=\"button\" class=\"dev-link\" (click)=\"OpenSession()\"\n title=\"Open the agent session record\">\n <i class=\"fa-solid fa-arrow-up-right-from-square\" aria-hidden=\"true\"></i>\n <span>Open session</span>\n </button>\n }\n </div>\n\n @if (!HideState) {\n <div class=\"banner__state\" [class.banner__state--busy]=\"IsBusy(State)\">\n @if (IsBusy(State)) {\n <i class=\"fa-solid fa-spinner fa-spin\" aria-hidden=\"true\"></i>\n } @else {\n <div class=\"waveform\" [class.waveform--idle]=\"State !== 'speaking'\" aria-hidden=\"true\">\n <span></span><span></span><span></span><span></span>\n <span></span><span></span><span></span><span></span>\n </div>\n }\n <span class=\"banner__state-label\">{{ StateLabel(State) }}</span>\n </div>\n }\n\n <!-- Disclosure-gated app-bar action cluster: STATE + WINDOW-CHROME only. Call actions\n (Mute / Captions / Details / Type / End) live in the bottom dock — the single home for\n each control. Captions & End were removed from here (they were exact duplicates of the\n dock's), and the standalone \"pure audio\" headphones was folded into the gear's Density =\n Simple. What remains up here is non-duplicated chrome: the gear (density + dev links) and\n Minimize. -->\n <div class=\"bar-actions\">\n @if (ShowGear) {\n <button type=\"button\" class=\"iconb\" [class.iconb--on]=\"GearOpen || DevMode\"\n (click)=\"ToggleGear($event)\"\n title=\"Interface density & developer links\"\n [attr.aria-expanded]=\"GearOpen\">\n <i class=\"fa-solid fa-gear\" aria-hidden=\"true\"></i>\n </button>\n }\n @if (ShowMinimize) {\n <button type=\"button\" class=\"iconb\" (click)=\"MinimizeRequested.emit()\"\n title=\"Hide the call view — the call stays live\"\n aria-label=\"Minimize the call view\">\n <i class=\"fa-solid fa-down-left-and-up-right-to-center\" aria-hidden=\"true\"></i>\n </button>\n }\n </div>\n\n <!-- Gear popover: interface density (the disclosure escape hatch) + developer links. -->\n @if (GearOpen) {\n <div class=\"gear-pop\" (click)=\"$event.stopPropagation()\" role=\"menu\" aria-label=\"Interface settings\">\n <div class=\"gp-h\">Interface</div>\n @if (ShowDensityPicker) {\n <div class=\"gp-row\">\n <span class=\"gp-l\">Density</span>\n <div class=\"gp-seg\" role=\"radiogroup\" aria-label=\"Interface density\">\n @for (d of Densities; track d.Key) {\n <button type=\"button\" [class.on]=\"Density === d.Key\"\n (click)=\"SelectDensity(d.Key)\"\n [attr.aria-checked]=\"Density === d.Key\" role=\"radio\">{{ d.Label }}</button>\n }\n </div>\n </div>\n <div class=\"gp-note\">Simple returns to the pure-audio surface. Auto grows the console as you use it.</div>\n }\n @if (ShowDensityPicker && AllowDevLinks) {\n <div class=\"gp-div\"></div>\n }\n @if (AllowDevLinks) {\n <button type=\"button\" class=\"gp-link\" (click)=\"ToggleDev()\" [attr.aria-pressed]=\"DevMode\">\n <i class=\"fa-solid\" [ngClass]=\"DevMode ? 'fa-toggle-on' : 'fa-toggle-off'\" aria-hidden=\"true\"></i>\n Developer links {{ DevMode ? 'on' : 'off' }}\n </button>\n }\n </div>\n }\n }\n</div>\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"realtime-agent-picker.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/realtime/realtime-agent-picker.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAKH,YAAY,EAGZ,MAAM,EAGN,aAAa,EAEhB,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAE5E,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE,OAAO,EAKH,mBAAmB,EACnB,sBAAsB,EACzB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAA6C,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;;AAE3I;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IAC9B,6CAA6C;IAC7C,KAAK,EAAE,uBAAuB,CAAC;IAC/B,kFAAkF;IAClF,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,mGAAmG;IACnG,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,6GAA6G;IAC7G,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,6EAA6E;IAC7E,gBAAgB,EAAE,OAAO,CAAC;CAC7B;AAKD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,
|
|
1
|
+
{"version":3,"file":"realtime-agent-picker.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/realtime/realtime-agent-picker.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAKH,YAAY,EAGZ,MAAM,EAGN,aAAa,EAEhB,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAE5E,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE,OAAO,EAKH,mBAAmB,EACnB,sBAAsB,EACzB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAA6C,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;;AAE3I;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IAC9B,6CAA6C;IAC7C,KAAK,EAAE,uBAAuB,CAAC;IAC/B,kFAAkF;IAClF,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,mGAAmG;IACnG,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,6GAA6G;IAC7G,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,6EAA6E;IAC7E,gBAAgB,EAAE,OAAO,CAAC;CAC7B;AAKD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,qBAkWa,4BAA6B,SAAQ,oBAAqB,YAAW,MAAM,EAAE,aAAa;IACnG;;;OAGG;IACM,WAAW,EAAE,QAAQ,GAAG,IAAI,C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aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAWlC,MAAM,CAAC,KAAK,EAAE,uBAAuB,GAAG,IAAI;IAKnD,oEAAoE;IAC7D,IAAI,CAAC,KAAK,EAAE,uBAAuB,GAAG,IAAI;IAI1C,SAAS,IAAI,IAAI;IAOjB,MAAM,IAAI,IAAI;IAIrB;;;;2BAIuB;IAEhB,eAAe,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAOxC,QAAQ,IAAI,IAAI;IAIvB;;;;OAIG;IACH,OAAO,CAAC,SAAS;IAYjB,wGAAwG;IACxG,OAAO,CAAC,mBAAmB;IAI3B,OAAO,CAAC,SAAS;IAIjB,OAAO,CAAC,SAAS;yCA9aR,4BAA4B;2CAA5B,4BAA4B;CAibxC"}
|
|
@@ -660,7 +660,7 @@ export class RealtimeAgentPickerComponent extends BaseAngularComponent {
|
|
|
660
660
|
i0.ɵɵproperty("checked", ctx.RecordingConsent);
|
|
661
661
|
i0.ɵɵadvance(3);
|
|
662
662
|
i0.ɵɵproperty("disabled", !ctx.SelectedAgent);
|
|
663
|
-
} }, dependencies: [MJButtonDirective, MJDropdownComponent, FormsModule, i1.NgSelectOption, i1.ɵNgSelectMultipleOption, i1.NgControlStatus, i1.NgModel], styles: ["[_nghost-%COMP%] {\n \n\n\n\n\n display: block;\n max-height: min(440px, calc(100vh - 24px));\n }\n .mj-voice-picker[_ngcontent-%COMP%] {\n width: 300px;\n max-width: calc(100vw - 24px);\n display: flex; flex-direction: column;\n \n\n max-height: min(440px, calc(100vh - 120px));\n background: var(--mj-bg-surface-elevated);\n border: 1px solid var(--mj-border-default);\n border-radius: 8px;\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);\n overflow: hidden;\n }\n .mj-voice-picker__header[_ngcontent-%COMP%] {\n display: flex; align-items: center; gap: 8px;\n padding: 10px 12px 8px;\n font-size: 13px; font-weight: 600;\n color: var(--mj-text-primary);\n }\n .mj-voice-picker__header[_ngcontent-%COMP%] i[_ngcontent-%COMP%] { color: var(--mj-brand-primary); }\n .mj-voice-picker__search[_ngcontent-%COMP%] {\n display: flex; align-items: center; gap: 8px;\n margin: 0 12px 8px;\n padding: 0 10px;\n background: var(--mj-bg-surface-sunken);\n border: 1px solid var(--mj-border-subtle);\n border-radius: 6px;\n }\n .mj-voice-picker__search[_ngcontent-%COMP%] i[_ngcontent-%COMP%] { font-size: 12px; color: var(--mj-text-muted); }\n .mj-voice-picker__search[_ngcontent-%COMP%] input[_ngcontent-%COMP%] {\n flex: 1; min-width: 0;\n padding: 7px 0;\n background: transparent; border: none; outline: none;\n font-size: 13px; color: var(--mj-text-primary);\n }\n .mj-voice-picker__search[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::placeholder { color: var(--mj-text-disabled); }\n .mj-voice-picker__search[_ngcontent-%COMP%]:focus-within { border-color: var(--mj-border-focus); }\n .mj-voice-picker__list[_ngcontent-%COMP%] {\n \n\n\n\n flex: 1 1 auto;\n min-height: 0;\n max-height: 220px; overflow-y: auto;\n border-top: 1px solid var(--mj-border-subtle);\n border-bottom: 1px solid var(--mj-border-subtle);\n padding: 4px 0;\n }\n \n .mj-voice-picker__header[_ngcontent-%COMP%], \n .mj-voice-picker__search[_ngcontent-%COMP%], \n .mj-voice-picker__select-row[_ngcontent-%COMP%], \n .mj-voice-picker__record-row[_ngcontent-%COMP%], \n .mj-voice-picker__footer[_ngcontent-%COMP%] { flex-shrink: 0; }\n .mj-voice-picker__item[_ngcontent-%COMP%] {\n display: flex; align-items: center; gap: 8px; width: 100%;\n padding: 7px 12px;\n background: transparent; border: none; cursor: pointer;\n color: var(--mj-text-primary); font-size: 13px; text-align: left;\n }\n .mj-voice-picker__item[_ngcontent-%COMP%] i[_ngcontent-%COMP%] { width: 16px; text-align: center; color: var(--mj-text-secondary); }\n .mj-voice-picker__item[_ngcontent-%COMP%]:hover { background: var(--mj-bg-surface-hover); }\n .mj-voice-picker__item--selected[_ngcontent-%COMP%] {\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n }\n .mj-voice-picker__item--selected[_ngcontent-%COMP%] i[_ngcontent-%COMP%] { color: var(--mj-brand-primary); }\n .mj-voice-picker__item-name[_ngcontent-%COMP%] {\n flex: 1; min-width: 0;\n overflow: hidden; text-overflow: ellipsis; white-space: nowrap;\n }\n .mj-voice-picker__default-badge[_ngcontent-%COMP%] {\n flex-shrink: 0;\n padding: 1px 6px;\n border-radius: 999px;\n font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em;\n color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 12%, transparent);\n }\n .mj-voice-picker__empty[_ngcontent-%COMP%] {\n padding: 12px; font-size: 12px; color: var(--mj-text-muted); text-align: center;\n }\n .mj-voice-picker__select-row[_ngcontent-%COMP%] {\n display: flex; align-items: center; gap: 8px;\n padding: 0 12px 8px;\n }\n .mj-voice-picker__select-row--model[_ngcontent-%COMP%] {\n padding: 8px 12px 0;\n }\n .mj-voice-picker__select-label[_ngcontent-%COMP%] {\n display: flex; align-items: center; gap: 6px;\n flex-shrink: 0;\n font-size: 12px; color: var(--mj-text-secondary);\n }\n .mj-voice-picker__select-label[_ngcontent-%COMP%] i[_ngcontent-%COMP%] { font-size: 11px; color: var(--mj-text-muted); }\n .mj-voice-picker__select[_ngcontent-%COMP%] {\n flex: 1; min-width: 0;\n padding: 5px 8px;\n font-size: 12px;\n color: var(--mj-text-primary);\n background: var(--mj-bg-surface-sunken);\n border: 1px solid var(--mj-border-subtle);\n border-radius: 6px;\n outline: none;\n }\n .mj-voice-picker__select[_ngcontent-%COMP%]:focus { border-color: var(--mj-border-focus); }\n \n\n\n .mj-voice-picker__voice-row[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: auto minmax(0, 1fr);\n column-gap: 8px;\n align-items: center;\n }\n .mj-voice-picker__voice-dropdown[_ngcontent-%COMP%] { min-width: 0; }\n .mj-voice-picker__voice-hint[_ngcontent-%COMP%] { grid-column: 2; }\n .mj-voice-picker__voice-hint-line[_ngcontent-%COMP%] {\n display: flex; align-items: center; gap: 6px;\n padding-top: 4px;\n font-size: 11px; color: var(--mj-text-secondary);\n }\n .mj-voice-picker__voice-hint-line[_ngcontent-%COMP%] i[_ngcontent-%COMP%] { font-size: 10px; color: var(--mj-brand-primary); }\n [_nghost-%COMP%] .mj-voice-picker__voice-row .mj-dropdown {\n min-height: 0;\n padding: 5px 8px;\n font-size: 12px;\n background: var(--mj-bg-surface-sunken);\n border: 1px solid var(--mj-border-subtle);\n border-radius: 6px;\n }\n [_nghost-%COMP%] .mj-voice-picker__voice-row .mj-dropdown--open, \n [_nghost-%COMP%] .mj-voice-picker__voice-row .mj-dropdown:focus-visible { border-color: var(--mj-border-focus); }\n .mj-voice-picker__voice[_ngcontent-%COMP%] { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; }\n .mj-voice-picker__voice-image[_ngcontent-%COMP%] {\n width: 20px; height: 20px; flex-shrink: 0;\n border-radius: 50%; object-fit: cover;\n background: var(--mj-bg-surface-sunken);\n }\n .mj-voice-picker__voice-name[_ngcontent-%COMP%] { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n .mj-voice-picker__voice-avatar[_ngcontent-%COMP%] { flex-shrink: 0; font-size: 11px; color: var(--mj-brand-primary); }\n .mj-voice-picker__sr-only[_ngcontent-%COMP%] {\n position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;\n overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;\n }\n .mj-voice-picker__record-row[_ngcontent-%COMP%] {\n display: flex; align-items: center; justify-content: space-between; gap: 10px;\n margin: 10px 12px 2px;\n padding: 10px 0 2px;\n border-top: 1px solid var(--mj-border-subtle);\n }\n .mj-voice-picker__record-label[_ngcontent-%COMP%] {\n display: flex; align-items: center; gap: 8px;\n font-size: 12px; color: var(--mj-text-secondary);\n }\n .mj-voice-picker__record-label[_ngcontent-%COMP%] > i[_ngcontent-%COMP%] { font-size: 12px; color: var(--mj-text-muted); }\n .mj-voice-picker__record-copy[_ngcontent-%COMP%] { display: flex; flex-direction: column; line-height: 1.3; }\n .mj-voice-picker__record-copy[_ngcontent-%COMP%] small[_ngcontent-%COMP%] { font-size: 10px; color: var(--mj-text-muted); }\n .mj-voice-picker__switch[_ngcontent-%COMP%] { position: relative; flex-shrink: 0; display: inline-flex; cursor: pointer; }\n .mj-voice-picker__switch[_ngcontent-%COMP%] input[_ngcontent-%COMP%] {\n position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer;\n }\n .mj-voice-picker__switch-track[_ngcontent-%COMP%] {\n position: relative; width: 34px; height: 18px; border-radius: 999px;\n background: var(--mj-border-strong); transition: background 150ms ease;\n }\n .mj-voice-picker__switch-track[_ngcontent-%COMP%]::after {\n content: ''; position: absolute; top: 2px; left: 2px;\n width: 14px; height: 14px; border-radius: 50%;\n background: var(--mj-bg-surface); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);\n transition: transform 150ms ease;\n }\n .mj-voice-picker__switch[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:checked + .mj-voice-picker__switch-track[_ngcontent-%COMP%] { background: var(--mj-brand-primary); }\n .mj-voice-picker__switch[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:checked + .mj-voice-picker__switch-track[_ngcontent-%COMP%]::after { transform: translateX(16px); }\n .mj-voice-picker__switch[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus-visible + .mj-voice-picker__switch-track[_ngcontent-%COMP%] {\n outline: 2px solid var(--mj-border-focus); outline-offset: 2px;\n }\n @media (prefers-reduced-motion: reduce) {\n .mj-voice-picker__switch-track[_ngcontent-%COMP%], .mj-voice-picker__switch-track[_ngcontent-%COMP%]::after { transition: none; }\n }\n .mj-voice-picker__footer[_ngcontent-%COMP%] {\n display: flex; align-items: center; gap: 8px;\n padding: 10px 12px;\n }"], changeDetection: 0 });
|
|
663
|
+
} }, dependencies: [MJButtonDirective, MJDropdownComponent, FormsModule, i1.NgSelectOption, i1.ɵNgSelectMultipleOption, i1.NgControlStatus, i1.NgModel], styles: ["[_nghost-%COMP%] {\n \n\n\n\n\n display: block;\n max-height: min(440px, calc(100vh - 24px));\n }\n .mj-voice-picker[_ngcontent-%COMP%] {\n width: 300px;\n max-width: calc(100vw - 24px);\n display: flex; flex-direction: column;\n \n\n max-height: min(440px, calc(100vh - 120px));\n background: var(--mj-bg-surface-elevated);\n border: 1px solid var(--mj-border-default);\n border-radius: 8px;\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);\n overflow: hidden;\n }\n .mj-voice-picker__header[_ngcontent-%COMP%] {\n display: flex; align-items: center; gap: 8px;\n padding: 10px 12px 8px;\n font-size: 13px; font-weight: 600;\n color: var(--mj-text-primary);\n }\n .mj-voice-picker__header[_ngcontent-%COMP%] i[_ngcontent-%COMP%] { color: var(--mj-brand-primary); }\n .mj-voice-picker__search[_ngcontent-%COMP%] {\n display: flex; align-items: center; gap: 8px;\n margin: 0 12px 8px;\n padding: 0 10px;\n background: var(--mj-bg-surface-sunken);\n border: 1px solid var(--mj-border-subtle);\n border-radius: 6px;\n }\n .mj-voice-picker__search[_ngcontent-%COMP%] i[_ngcontent-%COMP%] { font-size: 12px; color: var(--mj-text-muted); }\n .mj-voice-picker__search[_ngcontent-%COMP%] input[_ngcontent-%COMP%] {\n flex: 1; min-width: 0;\n padding: 7px 0;\n background: transparent; border: none; outline: none;\n font-size: 13px; color: var(--mj-text-primary);\n }\n .mj-voice-picker__search[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::placeholder { color: var(--mj-text-disabled); }\n .mj-voice-picker__search[_ngcontent-%COMP%]:focus-within { border-color: var(--mj-border-focus); }\n .mj-voice-picker__list[_ngcontent-%COMP%] {\n \n\n\n\n flex: 1 1 auto;\n min-height: 0;\n max-height: 220px; overflow-y: auto;\n border-top: 1px solid var(--mj-border-subtle);\n border-bottom: 1px solid var(--mj-border-subtle);\n padding: 4px 0;\n }\n \n .mj-voice-picker__header[_ngcontent-%COMP%], \n .mj-voice-picker__search[_ngcontent-%COMP%], \n .mj-voice-picker__select-row[_ngcontent-%COMP%], \n .mj-voice-picker__record-row[_ngcontent-%COMP%], \n .mj-voice-picker__footer[_ngcontent-%COMP%] { flex-shrink: 0; }\n .mj-voice-picker__item[_ngcontent-%COMP%] {\n display: flex; align-items: center; gap: 8px; width: 100%;\n padding: 7px 12px;\n background: transparent; border: none; cursor: pointer;\n color: var(--mj-text-primary); font-size: 13px; text-align: left;\n }\n .mj-voice-picker__item[_ngcontent-%COMP%] i[_ngcontent-%COMP%] { width: 16px; text-align: center; color: var(--mj-text-secondary); }\n .mj-voice-picker__item[_ngcontent-%COMP%]:hover { background: var(--mj-bg-surface-hover); }\n .mj-voice-picker__item--selected[_ngcontent-%COMP%] {\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n }\n .mj-voice-picker__item--selected[_ngcontent-%COMP%] i[_ngcontent-%COMP%] { color: var(--mj-brand-primary); }\n .mj-voice-picker__item-name[_ngcontent-%COMP%] {\n flex: 1; min-width: 0;\n overflow: hidden; text-overflow: ellipsis; white-space: nowrap;\n }\n .mj-voice-picker__default-badge[_ngcontent-%COMP%] {\n flex-shrink: 0;\n padding: 1px 6px;\n border-radius: 999px;\n font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em;\n color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 12%, transparent);\n }\n .mj-voice-picker__empty[_ngcontent-%COMP%] {\n padding: 12px; font-size: 12px; color: var(--mj-text-muted); text-align: center;\n }\n .mj-voice-picker__select-row[_ngcontent-%COMP%] {\n display: flex; align-items: center; gap: 8px;\n padding: 0 12px 8px;\n }\n .mj-voice-picker__select-row--model[_ngcontent-%COMP%] {\n padding: 8px 12px 0;\n }\n .mj-voice-picker__select-label[_ngcontent-%COMP%] {\n display: flex; align-items: center; gap: 6px;\n flex-shrink: 0;\n font-size: 12px; color: var(--mj-text-secondary);\n }\n .mj-voice-picker__select-label[_ngcontent-%COMP%] i[_ngcontent-%COMP%] { font-size: 11px; color: var(--mj-text-muted); }\n .mj-voice-picker__select[_ngcontent-%COMP%] {\n flex: 1; min-width: 0;\n padding: 5px 8px;\n font-size: 12px;\n color: var(--mj-text-primary);\n background: var(--mj-bg-surface-sunken);\n border: 1px solid var(--mj-border-subtle);\n border-radius: 6px;\n outline: none;\n }\n .mj-voice-picker__select[_ngcontent-%COMP%]:focus { border-color: var(--mj-border-focus); }\n \n\n\n .mj-voice-picker__voice-row[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: auto minmax(0, 1fr);\n column-gap: 8px;\n align-items: center;\n }\n .mj-voice-picker__voice-dropdown[_ngcontent-%COMP%] { min-width: 0; }\n .mj-voice-picker__voice-hint[_ngcontent-%COMP%] { grid-column: 2; }\n .mj-voice-picker__voice-hint-line[_ngcontent-%COMP%] {\n display: flex; align-items: center; gap: 6px;\n padding-top: 4px;\n font-size: 11px; color: var(--mj-text-secondary);\n }\n .mj-voice-picker__voice-hint-line[_ngcontent-%COMP%] i[_ngcontent-%COMP%] { font-size: 10px; color: var(--mj-brand-primary); }\n [_nghost-%COMP%] .mj-voice-picker__voice-row .mj-dropdown {\n min-height: 0;\n padding: 5px 8px;\n font-size: 12px;\n background: var(--mj-bg-surface-sunken);\n border: 1px solid var(--mj-border-subtle);\n border-radius: 6px;\n }\n [_nghost-%COMP%] .mj-voice-picker__voice-row .mj-dropdown--open, \n [_nghost-%COMP%] .mj-voice-picker__voice-row .mj-dropdown:focus-visible { border-color: var(--mj-border-focus); }\n .mj-voice-picker__voice[_ngcontent-%COMP%] { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; }\n .mj-voice-picker__voice-image[_ngcontent-%COMP%] {\n width: 20px; height: 20px; flex-shrink: 0;\n border-radius: 50%; object-fit: cover;\n background: var(--mj-bg-surface-sunken);\n }\n .mj-voice-picker__voice-name[_ngcontent-%COMP%] { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n .mj-voice-picker__voice-avatar[_ngcontent-%COMP%] { flex-shrink: 0; font-size: 11px; color: var(--mj-brand-primary); }\n .mj-voice-picker__sr-only[_ngcontent-%COMP%] {\n position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;\n overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;\n }\n .mj-voice-picker__record-row[_ngcontent-%COMP%] {\n display: flex; align-items: center; justify-content: space-between; gap: 10px;\n margin: 10px 12px 2px;\n padding: 10px 0 2px;\n border-top: 1px solid var(--mj-border-subtle);\n }\n \n .mj-voice-picker__list[_ngcontent-%COMP%] + .mj-voice-picker__record-row[_ngcontent-%COMP%] {\n margin-top: 0;\n border-top: none;\n }\n .mj-voice-picker__record-label[_ngcontent-%COMP%] {\n display: flex; align-items: center; gap: 8px;\n font-size: 12px; color: var(--mj-text-secondary);\n }\n .mj-voice-picker__record-label[_ngcontent-%COMP%] > i[_ngcontent-%COMP%] { font-size: 12px; color: var(--mj-text-muted); }\n .mj-voice-picker__record-copy[_ngcontent-%COMP%] { display: flex; flex-direction: column; line-height: 1.3; }\n .mj-voice-picker__record-copy[_ngcontent-%COMP%] small[_ngcontent-%COMP%] { font-size: 10px; color: var(--mj-text-muted); }\n .mj-voice-picker__switch[_ngcontent-%COMP%] { position: relative; flex-shrink: 0; display: inline-flex; cursor: pointer; }\n .mj-voice-picker__switch[_ngcontent-%COMP%] input[_ngcontent-%COMP%] {\n position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer;\n }\n .mj-voice-picker__switch-track[_ngcontent-%COMP%] {\n position: relative; width: 34px; height: 18px; border-radius: 999px;\n background: var(--mj-border-strong); transition: background 150ms ease;\n }\n .mj-voice-picker__switch-track[_ngcontent-%COMP%]::after {\n content: ''; position: absolute; top: 2px; left: 2px;\n width: 14px; height: 14px; border-radius: 50%;\n background: var(--mj-bg-surface); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);\n transition: transform 150ms ease;\n }\n .mj-voice-picker__switch[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:checked + .mj-voice-picker__switch-track[_ngcontent-%COMP%] { background: var(--mj-brand-primary); }\n .mj-voice-picker__switch[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:checked + .mj-voice-picker__switch-track[_ngcontent-%COMP%]::after { transform: translateX(16px); }\n .mj-voice-picker__switch[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus-visible + .mj-voice-picker__switch-track[_ngcontent-%COMP%] {\n outline: 2px solid var(--mj-border-focus); outline-offset: 2px;\n }\n @media (prefers-reduced-motion: reduce) {\n .mj-voice-picker__switch-track[_ngcontent-%COMP%], .mj-voice-picker__switch-track[_ngcontent-%COMP%]::after { transition: none; }\n }\n .mj-voice-picker__footer[_ngcontent-%COMP%] {\n display: flex; align-items: center; gap: 8px;\n padding: 10px 12px;\n }"], changeDetection: 0 });
|
|
664
664
|
}
|
|
665
665
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(RealtimeAgentPickerComponent, [{
|
|
666
666
|
type: Component,
|
|
@@ -811,7 +811,7 @@ export class RealtimeAgentPickerComponent extends BaseAngularComponent {
|
|
|
811
811
|
<button mjButton variant="outline" size="sm" (click)="Cancel()">Cancel</button>
|
|
812
812
|
</div>
|
|
813
813
|
</div>
|
|
814
|
-
`, styles: ["\n :host {\n /* Rendered inside a body-level CDK connected overlay (see message-input) \u2014 CDK\n owns the positioning + z-index, so the host is just a plain block. The height\n cap keeps the popover from growing past the viewport; the agent list inside\n scrolls when content exceeds it. CDK's push keeps it on-screen, and because\n it lives at the body level it can never be clipped by the chat overlay border. */\n display: block;\n max-height: min(440px, calc(100vh - 24px));\n }\n .mj-voice-picker {\n width: 300px;\n max-width: calc(100vw - 24px);\n display: flex; flex-direction: column;\n /* Match the host cap so the inner flex column knows its bound and lets the agent\n list ('mj-voice-picker__list') take the remaining space + scroll. */\n max-height: min(440px, calc(100vh - 120px));\n background: var(--mj-bg-surface-elevated);\n border: 1px solid var(--mj-border-default);\n border-radius: 8px;\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);\n overflow: hidden;\n }\n .mj-voice-picker__header {\n display: flex; align-items: center; gap: 8px;\n padding: 10px 12px 8px;\n font-size: 13px; font-weight: 600;\n color: var(--mj-text-primary);\n }\n .mj-voice-picker__header i { color: var(--mj-brand-primary); }\n .mj-voice-picker__search {\n display: flex; align-items: center; gap: 8px;\n margin: 0 12px 8px;\n padding: 0 10px;\n background: var(--mj-bg-surface-sunken);\n border: 1px solid var(--mj-border-subtle);\n border-radius: 6px;\n }\n .mj-voice-picker__search i { font-size: 12px; color: var(--mj-text-muted); }\n .mj-voice-picker__search input {\n flex: 1; min-width: 0;\n padding: 7px 0;\n background: transparent; border: none; outline: none;\n font-size: 13px; color: var(--mj-text-primary);\n }\n .mj-voice-picker__search input::placeholder { color: var(--mj-text-disabled); }\n .mj-voice-picker__search:focus-within { border-color: var(--mj-border-focus); }\n .mj-voice-picker__list {\n /* The agent list is the flexible region: it scrolls internally and gives way\n first when the whole popup is capped to the overlay height. min-height:0 lets\n it actually shrink inside the flex column; the 220px max keeps it tidy when\n there's plenty of room. */\n flex: 1 1 auto;\n min-height: 0;\n max-height: 220px; overflow-y: auto;\n border-top: 1px solid var(--mj-border-subtle);\n border-bottom: 1px solid var(--mj-border-subtle);\n padding: 4px 0;\n }\n /* Keep the chrome around the list from collapsing when the popup is height-capped. */\n .mj-voice-picker__header,\n .mj-voice-picker__search,\n .mj-voice-picker__select-row,\n .mj-voice-picker__record-row,\n .mj-voice-picker__footer { flex-shrink: 0; }\n .mj-voice-picker__item {\n display: flex; align-items: center; gap: 8px; width: 100%;\n padding: 7px 12px;\n background: transparent; border: none; cursor: pointer;\n color: var(--mj-text-primary); font-size: 13px; text-align: left;\n }\n .mj-voice-picker__item i { width: 16px; text-align: center; color: var(--mj-text-secondary); }\n .mj-voice-picker__item:hover { background: var(--mj-bg-surface-hover); }\n .mj-voice-picker__item--selected {\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n }\n .mj-voice-picker__item--selected i { color: var(--mj-brand-primary); }\n .mj-voice-picker__item-name {\n flex: 1; min-width: 0;\n overflow: hidden; text-overflow: ellipsis; white-space: nowrap;\n }\n .mj-voice-picker__default-badge {\n flex-shrink: 0;\n padding: 1px 6px;\n border-radius: 999px;\n font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em;\n color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 12%, transparent);\n }\n .mj-voice-picker__empty {\n padding: 12px; font-size: 12px; color: var(--mj-text-muted); text-align: center;\n }\n .mj-voice-picker__select-row {\n display: flex; align-items: center; gap: 8px;\n padding: 0 12px 8px;\n }\n .mj-voice-picker__select-row--model {\n padding: 8px 12px 0;\n }\n .mj-voice-picker__select-label {\n display: flex; align-items: center; gap: 6px;\n flex-shrink: 0;\n font-size: 12px; color: var(--mj-text-secondary);\n }\n .mj-voice-picker__select-label i { font-size: 11px; color: var(--mj-text-muted); }\n .mj-voice-picker__select {\n flex: 1; min-width: 0;\n padding: 5px 8px;\n font-size: 12px;\n color: var(--mj-text-primary);\n background: var(--mj-bg-surface-sunken);\n border: 1px solid var(--mj-border-subtle);\n border-radius: 6px;\n outline: none;\n }\n .mj-voice-picker__select:focus { border-color: var(--mj-border-focus); }\n /* The voice list is an mj-dropdown so its options can carry the avatar mark. The global dropdown styles size\n it for forms; scoped to this row, its trigger matches the native selects above it. The row is a grid so\n the hint sits under the dropdown, and an empty hint takes no space. */\n .mj-voice-picker__voice-row {\n display: grid;\n grid-template-columns: auto minmax(0, 1fr);\n column-gap: 8px;\n align-items: center;\n }\n .mj-voice-picker__voice-dropdown { min-width: 0; }\n .mj-voice-picker__voice-hint { grid-column: 2; }\n .mj-voice-picker__voice-hint-line {\n display: flex; align-items: center; gap: 6px;\n padding-top: 4px;\n font-size: 11px; color: var(--mj-text-secondary);\n }\n .mj-voice-picker__voice-hint-line i { font-size: 10px; color: var(--mj-brand-primary); }\n :host ::ng-deep .mj-voice-picker__voice-row .mj-dropdown {\n min-height: 0;\n padding: 5px 8px;\n font-size: 12px;\n background: var(--mj-bg-surface-sunken);\n border: 1px solid var(--mj-border-subtle);\n border-radius: 6px;\n }\n :host ::ng-deep .mj-voice-picker__voice-row .mj-dropdown--open,\n :host ::ng-deep .mj-voice-picker__voice-row .mj-dropdown:focus-visible { border-color: var(--mj-border-focus); }\n .mj-voice-picker__voice { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; }\n .mj-voice-picker__voice-image {\n width: 20px; height: 20px; flex-shrink: 0;\n border-radius: 50%; object-fit: cover;\n background: var(--mj-bg-surface-sunken);\n }\n .mj-voice-picker__voice-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n .mj-voice-picker__voice-avatar { flex-shrink: 0; font-size: 11px; color: var(--mj-brand-primary); }\n .mj-voice-picker__sr-only {\n position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;\n overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;\n }\n .mj-voice-picker__record-row {\n display: flex; align-items: center; justify-content: space-between; gap: 10px;\n margin: 10px 12px 2px;\n padding: 10px 0 2px;\n border-top: 1px solid var(--mj-border-subtle);\n }\n .mj-voice-picker__record-label {\n display: flex; align-items: center; gap: 8px;\n font-size: 12px; color: var(--mj-text-secondary);\n }\n .mj-voice-picker__record-label > i { font-size: 12px; color: var(--mj-text-muted); }\n .mj-voice-picker__record-copy { display: flex; flex-direction: column; line-height: 1.3; }\n .mj-voice-picker__record-copy small { font-size: 10px; color: var(--mj-text-muted); }\n .mj-voice-picker__switch { position: relative; flex-shrink: 0; display: inline-flex; cursor: pointer; }\n .mj-voice-picker__switch input {\n position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer;\n }\n .mj-voice-picker__switch-track {\n position: relative; width: 34px; height: 18px; border-radius: 999px;\n background: var(--mj-border-strong); transition: background 150ms ease;\n }\n .mj-voice-picker__switch-track::after {\n content: ''; position: absolute; top: 2px; left: 2px;\n width: 14px; height: 14px; border-radius: 50%;\n background: var(--mj-bg-surface); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);\n transition: transform 150ms ease;\n }\n .mj-voice-picker__switch input:checked + .mj-voice-picker__switch-track { background: var(--mj-brand-primary); }\n .mj-voice-picker__switch input:checked + .mj-voice-picker__switch-track::after { transform: translateX(16px); }\n .mj-voice-picker__switch input:focus-visible + .mj-voice-picker__switch-track {\n outline: 2px solid var(--mj-border-focus); outline-offset: 2px;\n }\n @media (prefers-reduced-motion: reduce) {\n .mj-voice-picker__switch-track, .mj-voice-picker__switch-track::after { transition: none; }\n }\n .mj-voice-picker__footer {\n display: flex; align-items: center; gap: 8px;\n padding: 10px 12px;\n }\n "] }]
|
|
814
|
+
`, styles: ["\n :host {\n /* Rendered inside a body-level CDK connected overlay (see message-input) \u2014 CDK\n owns the positioning + z-index, so the host is just a plain block. The height\n cap keeps the popover from growing past the viewport; the agent list inside\n scrolls when content exceeds it. CDK's push keeps it on-screen, and because\n it lives at the body level it can never be clipped by the chat overlay border. */\n display: block;\n max-height: min(440px, calc(100vh - 24px));\n }\n .mj-voice-picker {\n width: 300px;\n max-width: calc(100vw - 24px);\n display: flex; flex-direction: column;\n /* Match the host cap so the inner flex column knows its bound and lets the agent\n list ('mj-voice-picker__list') take the remaining space + scroll. */\n max-height: min(440px, calc(100vh - 120px));\n background: var(--mj-bg-surface-elevated);\n border: 1px solid var(--mj-border-default);\n border-radius: 8px;\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);\n overflow: hidden;\n }\n .mj-voice-picker__header {\n display: flex; align-items: center; gap: 8px;\n padding: 10px 12px 8px;\n font-size: 13px; font-weight: 600;\n color: var(--mj-text-primary);\n }\n .mj-voice-picker__header i { color: var(--mj-brand-primary); }\n .mj-voice-picker__search {\n display: flex; align-items: center; gap: 8px;\n margin: 0 12px 8px;\n padding: 0 10px;\n background: var(--mj-bg-surface-sunken);\n border: 1px solid var(--mj-border-subtle);\n border-radius: 6px;\n }\n .mj-voice-picker__search i { font-size: 12px; color: var(--mj-text-muted); }\n .mj-voice-picker__search input {\n flex: 1; min-width: 0;\n padding: 7px 0;\n background: transparent; border: none; outline: none;\n font-size: 13px; color: var(--mj-text-primary);\n }\n .mj-voice-picker__search input::placeholder { color: var(--mj-text-disabled); }\n .mj-voice-picker__search:focus-within { border-color: var(--mj-border-focus); }\n .mj-voice-picker__list {\n /* The agent list is the flexible region: it scrolls internally and gives way\n first when the whole popup is capped to the overlay height. min-height:0 lets\n it actually shrink inside the flex column; the 220px max keeps it tidy when\n there's plenty of room. */\n flex: 1 1 auto;\n min-height: 0;\n max-height: 220px; overflow-y: auto;\n border-top: 1px solid var(--mj-border-subtle);\n border-bottom: 1px solid var(--mj-border-subtle);\n padding: 4px 0;\n }\n /* Keep the chrome around the list from collapsing when the popup is height-capped. */\n .mj-voice-picker__header,\n .mj-voice-picker__search,\n .mj-voice-picker__select-row,\n .mj-voice-picker__record-row,\n .mj-voice-picker__footer { flex-shrink: 0; }\n .mj-voice-picker__item {\n display: flex; align-items: center; gap: 8px; width: 100%;\n padding: 7px 12px;\n background: transparent; border: none; cursor: pointer;\n color: var(--mj-text-primary); font-size: 13px; text-align: left;\n }\n .mj-voice-picker__item i { width: 16px; text-align: center; color: var(--mj-text-secondary); }\n .mj-voice-picker__item:hover { background: var(--mj-bg-surface-hover); }\n .mj-voice-picker__item--selected {\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n }\n .mj-voice-picker__item--selected i { color: var(--mj-brand-primary); }\n .mj-voice-picker__item-name {\n flex: 1; min-width: 0;\n overflow: hidden; text-overflow: ellipsis; white-space: nowrap;\n }\n .mj-voice-picker__default-badge {\n flex-shrink: 0;\n padding: 1px 6px;\n border-radius: 999px;\n font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em;\n color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 12%, transparent);\n }\n .mj-voice-picker__empty {\n padding: 12px; font-size: 12px; color: var(--mj-text-muted); text-align: center;\n }\n .mj-voice-picker__select-row {\n display: flex; align-items: center; gap: 8px;\n padding: 0 12px 8px;\n }\n .mj-voice-picker__select-row--model {\n padding: 8px 12px 0;\n }\n .mj-voice-picker__select-label {\n display: flex; align-items: center; gap: 6px;\n flex-shrink: 0;\n font-size: 12px; color: var(--mj-text-secondary);\n }\n .mj-voice-picker__select-label i { font-size: 11px; color: var(--mj-text-muted); }\n .mj-voice-picker__select {\n flex: 1; min-width: 0;\n padding: 5px 8px;\n font-size: 12px;\n color: var(--mj-text-primary);\n background: var(--mj-bg-surface-sunken);\n border: 1px solid var(--mj-border-subtle);\n border-radius: 6px;\n outline: none;\n }\n .mj-voice-picker__select:focus { border-color: var(--mj-border-focus); }\n /* The voice list is an mj-dropdown so its options can carry the avatar mark. The global dropdown styles size\n it for forms; scoped to this row, its trigger matches the native selects above it. The row is a grid so\n the hint sits under the dropdown, and an empty hint takes no space. */\n .mj-voice-picker__voice-row {\n display: grid;\n grid-template-columns: auto minmax(0, 1fr);\n column-gap: 8px;\n align-items: center;\n }\n .mj-voice-picker__voice-dropdown { min-width: 0; }\n .mj-voice-picker__voice-hint { grid-column: 2; }\n .mj-voice-picker__voice-hint-line {\n display: flex; align-items: center; gap: 6px;\n padding-top: 4px;\n font-size: 11px; color: var(--mj-text-secondary);\n }\n .mj-voice-picker__voice-hint-line i { font-size: 10px; color: var(--mj-brand-primary); }\n :host ::ng-deep .mj-voice-picker__voice-row .mj-dropdown {\n min-height: 0;\n padding: 5px 8px;\n font-size: 12px;\n background: var(--mj-bg-surface-sunken);\n border: 1px solid var(--mj-border-subtle);\n border-radius: 6px;\n }\n :host ::ng-deep .mj-voice-picker__voice-row .mj-dropdown--open,\n :host ::ng-deep .mj-voice-picker__voice-row .mj-dropdown:focus-visible { border-color: var(--mj-border-focus); }\n .mj-voice-picker__voice { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; }\n .mj-voice-picker__voice-image {\n width: 20px; height: 20px; flex-shrink: 0;\n border-radius: 50%; object-fit: cover;\n background: var(--mj-bg-surface-sunken);\n }\n .mj-voice-picker__voice-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n .mj-voice-picker__voice-avatar { flex-shrink: 0; font-size: 11px; color: var(--mj-brand-primary); }\n .mj-voice-picker__sr-only {\n position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;\n overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;\n }\n .mj-voice-picker__record-row {\n display: flex; align-items: center; justify-content: space-between; gap: 10px;\n margin: 10px 12px 2px;\n padding: 10px 0 2px;\n border-top: 1px solid var(--mj-border-subtle);\n }\n /* When no model/voice rows sit between the list and record row, the list's bottom border already divides them. */\n .mj-voice-picker__list + .mj-voice-picker__record-row {\n margin-top: 0;\n border-top: none;\n }\n .mj-voice-picker__record-label {\n display: flex; align-items: center; gap: 8px;\n font-size: 12px; color: var(--mj-text-secondary);\n }\n .mj-voice-picker__record-label > i { font-size: 12px; color: var(--mj-text-muted); }\n .mj-voice-picker__record-copy { display: flex; flex-direction: column; line-height: 1.3; }\n .mj-voice-picker__record-copy small { font-size: 10px; color: var(--mj-text-muted); }\n .mj-voice-picker__switch { position: relative; flex-shrink: 0; display: inline-flex; cursor: pointer; }\n .mj-voice-picker__switch input {\n position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer;\n }\n .mj-voice-picker__switch-track {\n position: relative; width: 34px; height: 18px; border-radius: 999px;\n background: var(--mj-border-strong); transition: background 150ms ease;\n }\n .mj-voice-picker__switch-track::after {\n content: ''; position: absolute; top: 2px; left: 2px;\n width: 14px; height: 14px; border-radius: 50%;\n background: var(--mj-bg-surface); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);\n transition: transform 150ms ease;\n }\n .mj-voice-picker__switch input:checked + .mj-voice-picker__switch-track { background: var(--mj-brand-primary); }\n .mj-voice-picker__switch input:checked + .mj-voice-picker__switch-track::after { transform: translateX(16px); }\n .mj-voice-picker__switch input:focus-visible + .mj-voice-picker__switch-track {\n outline: 2px solid var(--mj-border-focus); outline-offset: 2px;\n }\n @media (prefers-reduced-motion: reduce) {\n .mj-voice-picker__switch-track, .mj-voice-picker__switch-track::after { transition: none; }\n }\n .mj-voice-picker__footer {\n display: flex; align-items: center; gap: 8px;\n padding: 10px 12px;\n }\n "] }]
|
|
815
815
|
}], null, { CurrentUser: [{
|
|
816
816
|
type: Input
|
|
817
817
|
}], Agents: [{
|
|
@@ -836,5 +836,5 @@ export class RealtimeAgentPickerComponent extends BaseAngularComponent {
|
|
|
836
836
|
type: HostListener,
|
|
837
837
|
args: ['document:keydown.escape']
|
|
838
838
|
}] }); })();
|
|
839
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(RealtimeAgentPickerComponent, { className: "RealtimeAgentPickerComponent", filePath: "src/lib/components/realtime/realtime-agent-picker.component.ts", lineNumber:
|
|
839
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(RealtimeAgentPickerComponent, { className: "RealtimeAgentPickerComponent", filePath: "src/lib/components/realtime/realtime-agent-picker.component.ts", lineNumber: 452 }); })();
|
|
840
840
|
//# sourceMappingURL=realtime-agent-picker.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"realtime-agent-picker.component.js","sourceRoot":"","sources":["../../../../src/lib/components/realtime/realtime-agent-picker.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,uBAAuB,EACvB,iBAAiB,EACjB,SAAS,EACT,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,KAAK,EAEL,MAAM,EACN,SAAS,EAET,MAAM,GACT,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,iBAAiB,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EACJ;;YA5IF,eAkBC;YAlBD,gDAkBC;YAOO,eAAoB;YAApB,sCAAoB;YAOxB,eAkBC;YAlBD,2DAkBC;YAEL,eAgEC;YAhED,iFAgEC;YAYW,eAA4B;YAA5B,8CAA4B;YAOS,eAA2B;YAA3B,6CAA2B;4BA/I1E,iBAAiB,EAAE,mBAAmB,EAAE,WAAW;;iFA0VpD,4BAA4B;cA7VxC,SAAS;6BACM,IAAI,YACN,0BAA0B,WAC3B,CAAC,iBAAiB,EAAE,mBAAmB,EAAE,WAAW,CAAC,mBAC7C,uBAAuB,CAAC,MAAM,YACrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAmJT;;kBA0MA,KAAK;;kBAQL,KAAK;;kBAGL,KAAK;;kBAQL,KAAK;;kBAML,KAAK;;kBAGL,MAAM;;kBAGN,MAAM;;kBAEN,SAAS;mBAAC,aAAa;;kBAkWvB,YAAY;mBAAC,gBAAgB,EAAE,CAAC,QAAQ,CAAC;;kBAOzC,YAAY;mBAAC,yBAAyB;;kFA/Y9B,4BAA4B","sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n HostListener,\n Input,\n OnInit,\n Output,\n ViewChild,\n AfterViewInit,\n inject,\n} from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport type { MJAIAgentEntityExtended } from '@memberjunction/ai-core-plus';\nimport { MJButtonDirective, MJDropdownComponent } from '@memberjunction/ng-ui-components';\nimport { UUIDsEqual } from '@memberjunction/global';\nimport { AIEngineBase } from '@memberjunction/ai-engine-base';\nimport { UserInfo } from '@memberjunction/core';\nimport { UserInfoEngine } from '@memberjunction/core-entities';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport { REALTIME_ADVANCED_SESSION_CONTROLS, UserHoldsAuthorization } from '../../services/user-authorization';\nimport {\n BuildRealtimeModelOptions,\n ConstrainTargetsToPairings,\n DefaultPairedTargetId,\n LoadCoAgentPairings,\n RealtimeModelOption,\n RealtimePairedAgentRow,\n} from '../../services/realtime-pairing';\nimport { GraphQLLiveKitClient, GraphQLDataProvider, RealtimeModelVoices, RealtimeVoiceOption } from '@memberjunction/graphql-dataprovider';\n\n/**\n * The user's confirmed choice from the realtime picker: the agent to call, an optional\n * EXPLICIT realtime model (`null` = \"Auto (recommended)\", i.e. let the server pick —\n * always `null` for users without the `Realtime: Advanced Session Controls`\n * authorization, who never see the model selector), and an optional EXPLICIT co-agent\n * (`null` = the server's co-agent resolution chain).\n */\nexport interface RealtimeAgentPick {\n /** The agent the voice call should front. */\n Agent: MJAIAgentEntityExtended;\n /** Explicit realtime model id, or `null` for the server's automatic selection. */\n PreferredModelId: string | null;\n /** Explicit provider-native voice id (e.g. `echo`), or `null` for the configured/default voice. */\n PreferredVoice: string | null;\n /**\n * The avatar that comes with the picked voice (its `RealtimeVoiceOption.AvatarID`), or `null`/absent when the voice\n * has none or no voice was picked. The session then asks for that face, with video on.\n */\n PreferredAvatarId?: string | null;\n /** Explicit co-agent id (`MJ: AI Agents.ID`, Realtime type), or `null` for the server's resolution chain. */\n CoAgentId: string | null;\n /** Whether the user consented to recording this call (mic + agent audio). */\n RecordingConsent: boolean;\n}\n\n/** `MJ: User Settings` key for the per-user \"record this call\" consent toggle (string `'true'`/`'false'`). */\nconst RECORDING_CONSENT_KEY = 'mj.realtimeVoice.recordingConsent.v1';\n\n/**\n * Compact anchored popover that lets the user choose WHICH agent a realtime\n * voice call should front — shown by {@link MessageInputComponent} when the\n * phone button is clicked on a conversation with **no prior agent\n * participation** (new / empty conversation), and on demand via the caret\n * button next to the phone (any conversation), where it doubles as the way\n * to pick a specific **co-agent** (the Realtime-type agent that voices the\n * call) and — for authorized users — a specific **voice model**. The plain\n * phone click on an existing conversation keeps its friction-free \"call the\n * resolved agent immediately\" behavior.\n *\n * Mostly dumb: the host supplies the agent list (the same cached set the\n * @mention autocomplete / routing logic uses), the Realtime-type co-agent\n * candidates (filtered from that same set), and the defaults to preselect;\n * the picker emits the user's choice. The data it loads itself:\n * - the compact \"Voice model\" option list (active Realtime models via a\n * narrow RunView) and each model's voices — loaded and rendered ONLY when\n * the current user holds the `Realtime: Advanced Session Controls`\n * authorization (pure UX disclosure; the server enforces the authorization\n * on the mint). The voice list marks the voices whose persona comes with an\n * avatar (a camera icon) and shows a persona's preview image when it has\n * one; picking such a voice also picks its avatar, and\n * - the chosen co-agent's pairing rows (`MJ: AI Agent Co Agents`, Active 'CoAgent'-type rows): a\n * co-agent with pairing rows may only front its paired targets, so the\n * agent list constrains to those rows (Sequence order) with the IsDefault\n * row preselected; a co-agent with zero rows is universal and the list is\n * untouched.\n *\n * It does NOT persist anything (the host persists the co-agent preference\n * via `UserInfoEngine`; `mj-conversation-agent-picker` pins\n * `MJConversationEntity.DefaultAgentID` — different jobs, which is why this\n * is a separate component).\n *\n * Anchors itself bottom-right above the composer — the host's\n * `.message-input-wrapper` is `position: relative`.\n */\n@Component({\n standalone: true,\n selector: 'mj-realtime-agent-picker',\n imports: [MJButtonDirective, MJDropdownComponent, FormsModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div class=\"mj-voice-picker\" (click)=\"$event.stopPropagation()\">\n <div class=\"mj-voice-picker__header\">\n <i class=\"fa-solid fa-phone\"></i>\n <span>Start a voice call with…</span>\n </div>\n @if (ShowCoAgentSelect) {\n <div class=\"mj-voice-picker__select-row\">\n <label class=\"mj-voice-picker__select-label\" for=\"mjRealtimeCoAgentSelect\">\n <i class=\"fa-solid fa-headset\"></i>\n <span>Co-agent</span>\n </label>\n <select\n #coAgentSelect\n id=\"mjRealtimeCoAgentSelect\"\n class=\"mj-voice-picker__select\"\n [value]=\"SelectedCoAgentId ?? ''\"\n (change)=\"OnCoAgentChange(coAgentSelect.value)\">\n <option value=\"\">Auto (recommended)</option>\n @for (coAgent of CoAgents; track coAgent.ID) {\n <option [value]=\"coAgent.ID\">{{ coAgent.Name }}</option>\n }\n </select>\n </div>\n }\n <div class=\"mj-voice-picker__search\">\n <i class=\"fa-solid fa-magnifying-glass\"></i>\n <input\n #searchInput\n type=\"text\"\n placeholder=\"Search agents\"\n [value]=\"SearchText\"\n (input)=\"OnSearchInput(searchInput.value)\"\n (keydown.enter)=\"StartCall()\"\n (keydown.arrowdown)=\"MoveSelection(1); $event.preventDefault()\"\n (keydown.arrowup)=\"MoveSelection(-1); $event.preventDefault()\" />\n </div>\n <div class=\"mj-voice-picker__list\">\n @if (FilteredAgents.length === 0) {\n <div class=\"mj-voice-picker__empty\">{{ IsConstrainedByPairings ? 'No paired agents available' : 'No matching agents' }}</div>\n } @else {\n @for (agent of FilteredAgents; track agent.ID) {\n <button\n type=\"button\"\n class=\"mj-voice-picker__item\"\n [class.mj-voice-picker__item--selected]=\"IsSelected(agent)\"\n [title]=\"agent.Description || agent.Name\"\n (click)=\"Select(agent)\"\n (dblclick)=\"Pick(agent)\">\n <i [class]=\"IconClassFor(agent)\"></i>\n <span class=\"mj-voice-picker__item-name\">{{ agent.Name }}</span>\n @if (IsDefaultChoice(agent)) {\n <span class=\"mj-voice-picker__default-badge\">default</span>\n }\n </button>\n }\n }\n </div>\n @if (CanOverrideSessionConfig && Models.length > 0) {\n <div class=\"mj-voice-picker__select-row mj-voice-picker__select-row--model\">\n <label class=\"mj-voice-picker__select-label\" for=\"mjRealtimeModelSelect\">\n <i class=\"fa-solid fa-microchip\"></i>\n <span>Voice model</span>\n </label>\n <select\n #modelSelect\n id=\"mjRealtimeModelSelect\"\n class=\"mj-voice-picker__select\"\n [value]=\"SelectedModelId ?? ''\"\n (change)=\"OnModelChange(modelSelect.value)\">\n <option value=\"\">Auto (recommended)</option>\n @for (model of Models; track model.ID) {\n <option [value]=\"model.ID\">{{ model.Name }}</option>\n }\n </select>\n </div>\n @if (SelectedModelVoices.length) {\n <div class=\"mj-voice-picker__select-row mj-voice-picker__select-row--model mj-voice-picker__voice-row\">\n <span class=\"mj-voice-picker__select-label\" id=\"mjRealtimeVoiceLabel\">\n <i class=\"fa-solid fa-wave-square\"></i>\n <span>Voice</span>\n </span>\n <!-- No ValueField: an option is its voice object, one per persona, because two personas\n can share a voice id (a voice, and the same voice with a face). -->\n <mj-dropdown\n class=\"mj-voice-picker__voice-dropdown\"\n InputId=\"mjRealtimeVoiceSelect\"\n AriaLabelledBy=\"mjRealtimeVoiceLabel\"\n AriaDescribedBy=\"mjRealtimeVoiceHint\"\n [Data]=\"SelectedModelVoices\"\n TextField=\"Name\"\n DefaultItem=\"Default\"\n [ngModel]=\"SelectedVoice\"\n (ValueChange)=\"OnVoiceChange($event)\">\n <ng-template #mjDropdownItem let-item>\n @if (VoiceOptionFor(item); as voice) {\n <span class=\"mj-voice-picker__voice\">\n @if (PreviewImageFor(voice); as image) {\n <img class=\"mj-voice-picker__voice-image\" [src]=\"image\" alt=\"\" (error)=\"OnPreviewImageError(image)\" />\n }\n <span class=\"mj-voice-picker__voice-name\">{{ voice.Name }}</span>\n @if (voice.AvatarID) {\n <span class=\"mj-voice-picker__voice-avatar\" title=\"Comes with an avatar\">\n <i class=\"fa-solid fa-video\" aria-hidden=\"true\"></i>\n <span class=\"mj-voice-picker__sr-only\">Comes with an avatar</span>\n </span>\n }\n </span>\n }\n </ng-template>\n </mj-dropdown>\n <!-- Always present, so screen readers announce the hint when a pick adds it. -->\n <div class=\"mj-voice-picker__voice-hint\" id=\"mjRealtimeVoiceHint\" aria-live=\"polite\">\n @if (SelectedVoiceHasAvatar) {\n <span class=\"mj-voice-picker__voice-hint-line\">\n <i class=\"fa-solid fa-video\" aria-hidden=\"true\"></i>\n <span>Comes with an avatar</span>\n </span>\n }\n </div>\n </div>\n }\n }\n <div class=\"mj-voice-picker__record-row\">\n <span class=\"mj-voice-picker__record-label\">\n <i class=\"fa-solid fa-microphone\"></i>\n <span class=\"mj-voice-picker__record-copy\">\n Record this call\n <small>Audio stored securely</small>\n </span>\n </span>\n <label class=\"mj-voice-picker__switch\">\n <input\n type=\"checkbox\"\n [checked]=\"RecordingConsent\"\n (change)=\"OnRecordingConsentChange($any($event.target).checked)\"\n aria-label=\"Record this call (audio stored securely)\" />\n <span class=\"mj-voice-picker__switch-track\"></span>\n </label>\n </div>\n <div class=\"mj-voice-picker__footer\">\n <button mjButton variant=\"primary\" size=\"sm\" [disabled]=\"!SelectedAgent\" (click)=\"StartCall()\">\n <i class=\"fa-solid fa-phone\"></i> Start\n </button>\n <button mjButton variant=\"outline\" size=\"sm\" (click)=\"Cancel()\">Cancel</button>\n </div>\n </div>\n `,\n styles: [`\n :host {\n /* Rendered inside a body-level CDK connected overlay (see message-input) — CDK\n owns the positioning + z-index, so the host is just a plain block. The height\n cap keeps the popover from growing past the viewport; the agent list inside\n scrolls when content exceeds it. CDK's push keeps it on-screen, and because\n it lives at the body level it can never be clipped by the chat overlay border. */\n display: block;\n max-height: min(440px, calc(100vh - 24px));\n }\n .mj-voice-picker {\n width: 300px;\n max-width: calc(100vw - 24px);\n display: flex; flex-direction: column;\n /* Match the host cap so the inner flex column knows its bound and lets the agent\n list ('mj-voice-picker__list') take the remaining space + scroll. */\n max-height: min(440px, calc(100vh - 120px));\n background: var(--mj-bg-surface-elevated);\n border: 1px solid var(--mj-border-default);\n border-radius: 8px;\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);\n overflow: hidden;\n }\n .mj-voice-picker__header {\n display: flex; align-items: center; gap: 8px;\n padding: 10px 12px 8px;\n font-size: 13px; font-weight: 600;\n color: var(--mj-text-primary);\n }\n .mj-voice-picker__header i { color: var(--mj-brand-primary); }\n .mj-voice-picker__search {\n display: flex; align-items: center; gap: 8px;\n margin: 0 12px 8px;\n padding: 0 10px;\n background: var(--mj-bg-surface-sunken);\n border: 1px solid var(--mj-border-subtle);\n border-radius: 6px;\n }\n .mj-voice-picker__search i { font-size: 12px; color: var(--mj-text-muted); }\n .mj-voice-picker__search input {\n flex: 1; min-width: 0;\n padding: 7px 0;\n background: transparent; border: none; outline: none;\n font-size: 13px; color: var(--mj-text-primary);\n }\n .mj-voice-picker__search input::placeholder { color: var(--mj-text-disabled); }\n .mj-voice-picker__search:focus-within { border-color: var(--mj-border-focus); }\n .mj-voice-picker__list {\n /* The agent list is the flexible region: it scrolls internally and gives way\n first when the whole popup is capped to the overlay height. min-height:0 lets\n it actually shrink inside the flex column; the 220px max keeps it tidy when\n there's plenty of room. */\n flex: 1 1 auto;\n min-height: 0;\n max-height: 220px; overflow-y: auto;\n border-top: 1px solid var(--mj-border-subtle);\n border-bottom: 1px solid var(--mj-border-subtle);\n padding: 4px 0;\n }\n /* Keep the chrome around the list from collapsing when the popup is height-capped. */\n .mj-voice-picker__header,\n .mj-voice-picker__search,\n .mj-voice-picker__select-row,\n .mj-voice-picker__record-row,\n .mj-voice-picker__footer { flex-shrink: 0; }\n .mj-voice-picker__item {\n display: flex; align-items: center; gap: 8px; width: 100%;\n padding: 7px 12px;\n background: transparent; border: none; cursor: pointer;\n color: var(--mj-text-primary); font-size: 13px; text-align: left;\n }\n .mj-voice-picker__item i { width: 16px; text-align: center; color: var(--mj-text-secondary); }\n .mj-voice-picker__item:hover { background: var(--mj-bg-surface-hover); }\n .mj-voice-picker__item--selected {\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n }\n .mj-voice-picker__item--selected i { color: var(--mj-brand-primary); }\n .mj-voice-picker__item-name {\n flex: 1; min-width: 0;\n overflow: hidden; text-overflow: ellipsis; white-space: nowrap;\n }\n .mj-voice-picker__default-badge {\n flex-shrink: 0;\n padding: 1px 6px;\n border-radius: 999px;\n font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em;\n color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 12%, transparent);\n }\n .mj-voice-picker__empty {\n padding: 12px; font-size: 12px; color: var(--mj-text-muted); text-align: center;\n }\n .mj-voice-picker__select-row {\n display: flex; align-items: center; gap: 8px;\n padding: 0 12px 8px;\n }\n .mj-voice-picker__select-row--model {\n padding: 8px 12px 0;\n }\n .mj-voice-picker__select-label {\n display: flex; align-items: center; gap: 6px;\n flex-shrink: 0;\n font-size: 12px; color: var(--mj-text-secondary);\n }\n .mj-voice-picker__select-label i { font-size: 11px; color: var(--mj-text-muted); }\n .mj-voice-picker__select {\n flex: 1; min-width: 0;\n padding: 5px 8px;\n font-size: 12px;\n color: var(--mj-text-primary);\n background: var(--mj-bg-surface-sunken);\n border: 1px solid var(--mj-border-subtle);\n border-radius: 6px;\n outline: none;\n }\n .mj-voice-picker__select:focus { border-color: var(--mj-border-focus); }\n /* The voice list is an mj-dropdown so its options can carry the avatar mark. The global dropdown styles size\n it for forms; scoped to this row, its trigger matches the native selects above it. The row is a grid so\n the hint sits under the dropdown, and an empty hint takes no space. */\n .mj-voice-picker__voice-row {\n display: grid;\n grid-template-columns: auto minmax(0, 1fr);\n column-gap: 8px;\n align-items: center;\n }\n .mj-voice-picker__voice-dropdown { min-width: 0; }\n .mj-voice-picker__voice-hint { grid-column: 2; }\n .mj-voice-picker__voice-hint-line {\n display: flex; align-items: center; gap: 6px;\n padding-top: 4px;\n font-size: 11px; color: var(--mj-text-secondary);\n }\n .mj-voice-picker__voice-hint-line i { font-size: 10px; color: var(--mj-brand-primary); }\n :host ::ng-deep .mj-voice-picker__voice-row .mj-dropdown {\n min-height: 0;\n padding: 5px 8px;\n font-size: 12px;\n background: var(--mj-bg-surface-sunken);\n border: 1px solid var(--mj-border-subtle);\n border-radius: 6px;\n }\n :host ::ng-deep .mj-voice-picker__voice-row .mj-dropdown--open,\n :host ::ng-deep .mj-voice-picker__voice-row .mj-dropdown:focus-visible { border-color: var(--mj-border-focus); }\n .mj-voice-picker__voice { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; }\n .mj-voice-picker__voice-image {\n width: 20px; height: 20px; flex-shrink: 0;\n border-radius: 50%; object-fit: cover;\n background: var(--mj-bg-surface-sunken);\n }\n .mj-voice-picker__voice-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n .mj-voice-picker__voice-avatar { flex-shrink: 0; font-size: 11px; color: var(--mj-brand-primary); }\n .mj-voice-picker__sr-only {\n position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;\n overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;\n }\n .mj-voice-picker__record-row {\n display: flex; align-items: center; justify-content: space-between; gap: 10px;\n margin: 10px 12px 2px;\n padding: 10px 0 2px;\n border-top: 1px solid var(--mj-border-subtle);\n }\n .mj-voice-picker__record-label {\n display: flex; align-items: center; gap: 8px;\n font-size: 12px; color: var(--mj-text-secondary);\n }\n .mj-voice-picker__record-label > i { font-size: 12px; color: var(--mj-text-muted); }\n .mj-voice-picker__record-copy { display: flex; flex-direction: column; line-height: 1.3; }\n .mj-voice-picker__record-copy small { font-size: 10px; color: var(--mj-text-muted); }\n .mj-voice-picker__switch { position: relative; flex-shrink: 0; display: inline-flex; cursor: pointer; }\n .mj-voice-picker__switch input {\n position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer;\n }\n .mj-voice-picker__switch-track {\n position: relative; width: 34px; height: 18px; border-radius: 999px;\n background: var(--mj-border-strong); transition: background 150ms ease;\n }\n .mj-voice-picker__switch-track::after {\n content: ''; position: absolute; top: 2px; left: 2px;\n width: 14px; height: 14px; border-radius: 50%;\n background: var(--mj-bg-surface); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);\n transition: transform 150ms ease;\n }\n .mj-voice-picker__switch input:checked + .mj-voice-picker__switch-track { background: var(--mj-brand-primary); }\n .mj-voice-picker__switch input:checked + .mj-voice-picker__switch-track::after { transform: translateX(16px); }\n .mj-voice-picker__switch input:focus-visible + .mj-voice-picker__switch-track {\n outline: 2px solid var(--mj-border-focus); outline-offset: 2px;\n }\n @media (prefers-reduced-motion: reduce) {\n .mj-voice-picker__switch-track, .mj-voice-picker__switch-track::after { transition: none; }\n }\n .mj-voice-picker__footer {\n display: flex; align-items: center; gap: 8px;\n padding: 10px 12px;\n }\n `]\n})\nexport class RealtimeAgentPickerComponent extends BaseAngularComponent implements OnInit, AfterViewInit {\n /**\n * The authenticated user context (forwarded from the host composer / chat area).\n * Falls back to `this.ProviderToUse?.CurrentUser` when not provided.\n */\n @Input() CurrentUser: UserInfo | null = null;\n\n /** Returns the explicit CurrentUser input or falls back to ProviderToUse.CurrentUser. */\n public get EffectiveUser(): UserInfo | null {\n return this.CurrentUser ?? this.ProviderToUse?.CurrentUser ?? null;\n }\n\n /** Agents the user can call — same cached set the @mention / routing logic uses. */\n @Input() Agents: MJAIAgentEntityExtended[] = [];\n\n /** The agent the default resolution would pick — preselected and listed first. */\n @Input() DefaultAgentId: string | null = null;\n\n /**\n * The ACTIVE Realtime-type co-agent candidates the user can run (host-filtered from\n * the same cached, run-permission-filtered agent set as {@link Agents}). The co-agent\n * selector renders only when MORE THAN ONE candidate exists — with zero or one\n * there's nothing meaningful to choose and the server's resolution chain applies.\n */\n @Input() CoAgents: MJAIAgentEntityExtended[] = [];\n\n /**\n * The user's persisted co-agent preference (host-loaded via `UserInfoEngine`) —\n * preselected in the co-agent selector when it's still a valid candidate.\n */\n @Input() DefaultCoAgentId: string | null = null;\n\n /** Emitted with the chosen agent + optional explicit voice model / co-agent when the user confirms. */\n @Output() AgentPicked = new EventEmitter<RealtimeAgentPick>();\n\n /** Emitted when the user dismisses without starting a call. */\n @Output() Cancelled = new EventEmitter<void>();\n\n @ViewChild('searchInput') private searchInput?: ElementRef<HTMLInputElement>;\n\n public SearchText = '';\n public SelectedAgentId: string | null = null;\n\n /** Active Realtime models the model selector offers (loaded only for authorized users). */\n public Models: RealtimeModelOption[] = [];\n\n /** The explicitly chosen voice model id, or `null` for \"Auto (recommended)\" (the default). */\n public SelectedModelId: string | null = null;\n\n /** Active Realtime models + their voices (for the voice selector); loaded only for authorized users. */\n public VoiceModels: RealtimeModelVoices[] = [];\n\n /**\n * The explicitly chosen voice option (one of {@link SelectedModelVoices}: a persona, so two personas sharing a voice\n * id stay apart), or `null` for the configured/default voice.\n */\n public SelectedVoice: RealtimeVoiceOption | null = null;\n\n /** The explicitly chosen voice id, or `null` for the configured/default voice. */\n public get SelectedVoiceId(): string | null {\n return this.SelectedVoice?.ID ?? null;\n }\n\n /** Whether the chosen voice comes with an avatar: the hint under the voice list says so. */\n public get SelectedVoiceHasAvatar(): boolean {\n return !!this.SelectedVoice?.AvatarID?.trim();\n }\n\n /** Voices for the currently-selected model (empty when no model picked or it declares none). */\n public get SelectedModelVoices(): RealtimeVoiceOption[] {\n return this.VoiceModels.find((m) => UUIDsEqual(m.ModelID, this.SelectedModelId))?.Voices ?? [];\n }\n\n /** Preview images that failed to load; their voices show no image rather than a broken one. */\n private readonly failedPreviewImages = new Set<string>();\n\n /** The explicitly chosen co-agent id, or `null` for \"Auto (recommended)\" (the server's chain). */\n public SelectedCoAgentId: string | null = null;\n\n /**\n * Whether the user has opted to record this call (mic + agent audio). Loaded from the\n * per-user persisted preference (`mj.realtimeVoice.recordingConsent.v1`) on init and\n * persisted cross-device on change. Defaults to off.\n */\n public RecordingConsent = false;\n\n /**\n * Whether the current user holds the `Realtime: Advanced Session Controls`\n * authorization. Gates the voice-model selector (and any future config-override\n * controls) — pure disclosure; the server enforces the authorization on the mint.\n */\n public CanOverrideSessionConfig = false;\n\n /** The selected co-agent's pairing rows; empty = universal co-agent (no constraint). */\n public Pairings: RealtimePairedAgentRow[] = [];\n\n // Template helper — expose the shared UUID comparator to the view.\n public readonly UUIDsEqual = UUIDsEqual;\n\n private readonly cdr = inject(ChangeDetectorRef);\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n /** Monotonic guard so a stale pairing load can't clobber a newer co-agent choice. */\n private pairingLoadToken = 0;\n\n /** Co-agent selector visibility: only when there is a real choice to make. */\n public get ShowCoAgentSelect(): boolean {\n return this.CoAgents.length > 1;\n }\n\n /** True while the agent list is constrained to the selected co-agent's paired targets. */\n public get IsConstrainedByPairings(): boolean {\n return this.Pairings.length > 0;\n }\n\n public ngOnInit(): void {\n const initial = this.DefaultAgentId && this.findAgent(this.DefaultAgentId)\n ? this.DefaultAgentId\n : this.FilteredAgents[0]?.ID ?? null;\n this.SelectedAgentId = initial;\n void this.checkAuthorizationAndLoadModels();\n // Preselect the persisted co-agent preference when it's still a valid candidate.\n if (this.DefaultCoAgentId && this.CoAgents.some(a => UUIDsEqual(a.ID, this.DefaultCoAgentId))) {\n this.SelectedCoAgentId = this.DefaultCoAgentId;\n void this.reloadPairings();\n }\n this.RecordingConsent = this.readPersistedRecordingConsent();\n }\n\n /**\n * Checks whether the user holds the advanced-session-controls authorization and, if so,\n * loads the available realtime voice models and voices. If the initially evaluated user\n * lacks the authorization, attempts a one-time RefreshCurrentUser() on the provider in\n * case role assignments were granted after client metadata was cached.\n */\n private async checkAuthorizationAndLoadModels(): Promise<void> {\n this.CanOverrideSessionConfig = UserHoldsAuthorization(\n this.EffectiveUser,\n REALTIME_ADVANCED_SESSION_CONTROLS,\n this.ProviderToUse\n );\n\n if (!this.CanOverrideSessionConfig && this.ProviderToUse?.RefreshCurrentUser) {\n try {\n const refreshed = await this.ProviderToUse.RefreshCurrentUser();\n if (refreshed) {\n this.CanOverrideSessionConfig = UserHoldsAuthorization(\n refreshed,\n REALTIME_ADVANCED_SESSION_CONTROLS,\n this.ProviderToUse\n );\n }\n } catch (e) {\n console.warn('[RealtimeAgentPicker] Failed to refresh CurrentUser for authorization check:', e);\n }\n }\n\n if (this.CanOverrideSessionConfig) {\n await this.loadVoiceModels();\n }\n this.cdr.markForCheck();\n }\n\n /** Reads the per-user recording-consent preference (defensive: any failure → off). */\n private readPersistedRecordingConsent(): boolean {\n try {\n return UserInfoEngine.Instance.GetSetting(RECORDING_CONSENT_KEY) === 'true';\n } catch {\n return false;\n }\n }\n\n /** Records + persists (cross-device, debounced) the user's recording-consent choice. */\n public OnRecordingConsentChange(checked: boolean): void {\n this.RecordingConsent = checked;\n try {\n UserInfoEngine.Instance.SetSettingDebounced(RECORDING_CONSENT_KEY, String(checked));\n } catch (error) {\n console.warn('[RealtimeAgentPicker] Failed to persist recording consent:', error);\n }\n this.cdr.markForCheck();\n }\n\n /**\n * Loads the \"Voice model\" options: active models whose type is `Realtime`, filtered from\n * {@link AIEngineBase}'s already-cached `Models` (provider-scoped engine instance, lazy\n * `Config` — no RunView round-trip). Called ONLY for users who hold the\n * advanced-session-controls authorization. Tolerant — a failure simply leaves\n * the selector hidden (the server's automatic selection still applies).\n */\n private async loadVoiceModels(): Promise<void> {\n try {\n const engine = AIEngineBase.GetProviderInstance<AIEngineBase>(this.ProviderToUse, AIEngineBase) as AIEngineBase;\n await engine.Config(false, undefined, this.ProviderToUse);\n this.Models = BuildRealtimeModelOptions(engine.Models ?? []);\n } catch (error) {\n console.error('[RealtimeAgentPicker] Failed to load realtime models:', error);\n this.Models = [];\n }\n // Voices come from the driver via a server query (the cached models carry no voice list).\n try {\n const client = new GraphQLLiveKitClient(this.ProviderToUse as unknown as GraphQLDataProvider);\n this.VoiceModels = await client.GetRealtimeModelVoices();\n } catch (error) {\n console.error('[RealtimeAgentPicker] Failed to load realtime voices:', error);\n this.VoiceModels = [];\n }\n this.cdr.markForCheck();\n }\n\n /** Records the voice-model choice (`''` = Auto → `null`); clears the voice (and its avatar) so it can't outlive a switch. */\n public OnModelChange(value: string): void {\n this.SelectedModelId = value && value.length > 0 ? value : null;\n this.SelectedVoice = null;\n this.cdr.markForCheck();\n }\n\n /**\n * Records the voice choice from the voice list: one of {@link SelectedModelVoices}, or `null` for \"Default\". The\n * voice's avatar, when it has one, goes with it.\n */\n public OnVoiceChange(value: unknown): void {\n this.SelectedVoice = this.VoiceOptionFor(value) ?? null;\n this.cdr.markForCheck();\n }\n\n /**\n * The voice an item of the voice list is. The list's items are {@link SelectedModelVoices}' own objects, matched by\n * identity: an option is a persona, and two personas can share a voice id.\n */\n public VoiceOptionFor(item: unknown): RealtimeVoiceOption | undefined {\n return this.SelectedModelVoices.find((voice) => voice === item);\n }\n\n /** The voice's persona preview image to show, or `null` when it has none or the image failed to load. */\n public PreviewImageFor(voice: RealtimeVoiceOption): string | null {\n const url = voice.PreviewImageURL?.trim();\n return url && !this.failedPreviewImages.has(url) ? url : null;\n }\n\n /** Hides a preview image that failed to load. */\n public OnPreviewImageError(url: string): void {\n this.failedPreviewImages.add(url);\n this.cdr.markForCheck();\n }\n\n /** Records the co-agent choice (`''` = Auto → `null`) and refreshes the pairing constraint. */\n public OnCoAgentChange(value: string): void {\n this.SelectedCoAgentId = value && value.length > 0 ? value : null;\n void this.reloadPairings();\n }\n\n /**\n * Loads the selected co-agent's pairing rows and re-applies the target constraint:\n * with rows present, the agent list narrows to the paired targets (Sequence order)\n * and the IsDefault row's target is preselected; with zero rows (or Auto co-agent)\n * the list returns to the unconstrained default. Guarded against stale loads when\n * the user changes co-agents quickly.\n */\n private async reloadPairings(): Promise<void> {\n const token = ++this.pairingLoadToken;\n const coAgentId = this.SelectedCoAgentId;\n const pairings = coAgentId ? await LoadCoAgentPairings(this.ProviderToUse, coAgentId) : [];\n if (token !== this.pairingLoadToken) {\n return; // a newer co-agent choice superseded this load\n }\n this.Pairings = pairings;\n this.ensureSelectionVisible();\n this.cdr.markForCheck();\n }\n\n /**\n * Keeps the target selection coherent after the visible list changes: prefers the\n * pairing default (when constrained), then the host default, then keeps the current\n * selection when still visible, then the first visible row.\n */\n private ensureSelectionVisible(): void {\n const visible = this.FilteredAgents;\n if (this.IsConstrainedByPairings) {\n const pairedDefault = DefaultPairedTargetId(this.Pairings);\n if (pairedDefault && visible.some(a => UUIDsEqual(a.ID, pairedDefault))) {\n this.SelectedAgentId = pairedDefault;\n return;\n }\n }\n if (this.SelectedAgentId && visible.some(a => UUIDsEqual(a.ID, this.SelectedAgentId))) {\n return; // current selection still valid\n }\n if (this.DefaultAgentId && visible.some(a => UUIDsEqual(a.ID, this.DefaultAgentId))) {\n this.SelectedAgentId = this.DefaultAgentId;\n return;\n }\n this.SelectedAgentId = visible[0]?.ID ?? null;\n }\n\n public ngAfterViewInit(): void {\n // Microtask so focus lands after the popover renders without\n // triggering ExpressionChangedAfterItHasBeenChecked.\n Promise.resolve().then(() => this.searchInput?.nativeElement.focus());\n }\n\n /**\n * The visible target list: pairing-constrained first (a co-agent WITH pairing rows may\n * only front its paired targets, kept in pairing Sequence order), then search-filtered.\n * Unconstrained lists keep the default-first + alphabetical ordering.\n */\n public get FilteredAgents(): MJAIAgentEntityExtended[] {\n const base = ConstrainTargetsToPairings(this.Agents, this.Pairings);\n const needle = this.SearchText.trim().toLowerCase();\n const filtered = base.filter(a => !needle || (a.Name ?? '').toLowerCase().includes(needle));\n if (this.IsConstrainedByPairings) {\n return filtered; // pairing Sequence order is the canonical order\n }\n return filtered.sort((a, b) => {\n const aDefault = this.isDefault(a) ? 0 : 1;\n const bDefault = this.isDefault(b) ? 0 : 1;\n if (aDefault !== bDefault) return aDefault - bDefault;\n return (a.Name ?? '').localeCompare(b.Name ?? '');\n });\n }\n\n public get SelectedAgent(): MJAIAgentEntityExtended | null {\n return this.SelectedAgentId ? this.findAgent(this.SelectedAgentId) : null;\n }\n\n public IsSelected(agent: MJAIAgentEntityExtended): boolean {\n return !!this.SelectedAgentId && UUIDsEqual(agent.ID, this.SelectedAgentId);\n }\n\n /**\n * Whether `agent` carries the \"default\" badge: under a pairing constraint that's the\n * co-agent's IsDefault target; otherwise the host-resolved default agent.\n */\n public IsDefaultChoice(agent: MJAIAgentEntityExtended): boolean {\n if (this.IsConstrainedByPairings) {\n const pairedDefault = DefaultPairedTargetId(this.Pairings);\n return !!pairedDefault && UUIDsEqual(agent.ID, pairedDefault);\n }\n return this.isDefault(agent);\n }\n\n public IconClassFor(agent: MJAIAgentEntityExtended): string {\n return agent.IconClass?.trim() || 'fa-solid fa-robot';\n }\n\n public OnSearchInput(value: string): void {\n this.SearchText = value;\n // Keep the selection on a visible row.\n const visible = this.FilteredAgents;\n if (!visible.some(a => this.IsSelected(a))) {\n this.SelectedAgentId = visible[0]?.ID ?? null;\n }\n this.cdr.markForCheck();\n }\n\n /** Arrow-key navigation through the filtered list. */\n public MoveSelection(delta: number): void {\n const visible = this.FilteredAgents;\n if (visible.length === 0) return;\n const currentIndex = visible.findIndex(a => this.IsSelected(a));\n const nextIndex = currentIndex < 0\n ? 0\n : Math.min(visible.length - 1, Math.max(0, currentIndex + delta));\n this.SelectedAgentId = visible[nextIndex].ID;\n this.cdr.markForCheck();\n }\n\n public Select(agent: MJAIAgentEntityExtended): void {\n this.SelectedAgentId = agent.ID;\n this.cdr.markForCheck();\n }\n\n /** Confirm a specific agent immediately (double-click shortcut). */\n public Pick(agent: MJAIAgentEntityExtended): void {\n this.AgentPicked.emit(this.buildPick(agent));\n }\n\n public StartCall(): void {\n const agent = this.SelectedAgent;\n if (agent) {\n this.AgentPicked.emit(this.buildPick(agent));\n }\n }\n\n public Cancel(): void {\n this.Cancelled.emit();\n }\n\n /** Dismiss when the user clicks anywhere outside the popover. (The phone\n * button that opens it stops propagation, so the opening click never\n * reaches this handler.) The voice list opens in its own overlay outside\n * this element; a click on it, or on the backdrop that closes it, only\n * closes the list. */\n @HostListener('document:click', ['$event'])\n public OnDocumentClick(event: MouseEvent): void {\n if (!this.elementRef.nativeElement.contains(event.target as Node) && !this.isInDropdownOverlay(event.target)) {\n this.Cancelled.emit();\n }\n }\n\n @HostListener('document:keydown.escape')\n public OnEscape(): void {\n this.Cancelled.emit();\n }\n\n /**\n * Assembles the emitted pick. The model, voice and avatar preferences are hard-gated\n * on the authorization here (defense in depth — unauthorized users never see the\n * selectors, so they should already be null).\n */\n private buildPick(agent: MJAIAgentEntityExtended): RealtimeAgentPick {\n const voice = this.CanOverrideSessionConfig ? this.SelectedVoice : null;\n return {\n Agent: agent,\n PreferredModelId: this.CanOverrideSessionConfig ? this.SelectedModelId : null,\n PreferredVoice: voice?.ID ?? null,\n PreferredAvatarId: voice?.AvatarID?.trim() || null,\n CoAgentId: this.SelectedCoAgentId,\n RecordingConsent: this.RecordingConsent\n };\n }\n\n /** Whether a click landed in a dropdown's overlay (its option panel or the backdrop that closes it). */\n private isInDropdownOverlay(target: EventTarget | null): boolean {\n return target instanceof Element && target.closest('.mj-dropdown-panel, .mj-dropdown-backdrop') != null;\n }\n\n private isDefault(agent: MJAIAgentEntityExtended): boolean {\n return !!this.DefaultAgentId && UUIDsEqual(agent.ID, this.DefaultAgentId);\n }\n\n private findAgent(id: string): MJAIAgentEntityExtended | null {\n return this.Agents.find(a => UUIDsEqual(a.ID, id)) ?? null;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"realtime-agent-picker.component.js","sourceRoot":"","sources":["../../../../src/lib/components/realtime/realtime-agent-picker.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,uBAAuB,EACvB,iBAAiB,EACjB,SAAS,EACT,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,KAAK,EAEL,MAAM,EACN,SAAS,EAET,MAAM,GACT,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAC1F,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAE9D,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,kCAAkC,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC/G,OAAO,EACH,yBAAyB,EACzB,0BAA0B,EAC1B,qBAAqB,EACrB,mBAAmB,GAGtB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAiE,MAAM,sCAAsC,CAAC;;;;;;IA2F/G,kCAA6B;IAAA,YAAkB;IAAA,iBAAS;;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;;;;;;;;;;;;;;;;;;;;;;;;KAmJT;;kBA+MA,KAAK;;kBAQL,KAAK;;kBAGL,KAAK;;kBAQL,KAAK;;kBAML,KAAK;;kBAGL,MAAM;;kBAGN,MAAM;;kBAEN,SAAS;mBAAC,aAAa;;kBAkWvB,YAAY;mBAAC,gBAAgB,EAAE,CAAC,QAAQ,CAAC;;kBAOzC,YAAY;mBAAC,yBAAyB;;kFA/Y9B,4BAA4B","sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n HostListener,\n Input,\n OnInit,\n Output,\n ViewChild,\n AfterViewInit,\n inject,\n} from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport type { MJAIAgentEntityExtended } from '@memberjunction/ai-core-plus';\nimport { MJButtonDirective, MJDropdownComponent } from '@memberjunction/ng-ui-components';\nimport { UUIDsEqual } from '@memberjunction/global';\nimport { AIEngineBase } from '@memberjunction/ai-engine-base';\nimport { UserInfo } from '@memberjunction/core';\nimport { UserInfoEngine } from '@memberjunction/core-entities';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport { REALTIME_ADVANCED_SESSION_CONTROLS, UserHoldsAuthorization } from '../../services/user-authorization';\nimport {\n BuildRealtimeModelOptions,\n ConstrainTargetsToPairings,\n DefaultPairedTargetId,\n LoadCoAgentPairings,\n RealtimeModelOption,\n RealtimePairedAgentRow,\n} from '../../services/realtime-pairing';\nimport { GraphQLLiveKitClient, GraphQLDataProvider, RealtimeModelVoices, RealtimeVoiceOption } from '@memberjunction/graphql-dataprovider';\n\n/**\n * The user's confirmed choice from the realtime picker: the agent to call, an optional\n * EXPLICIT realtime model (`null` = \"Auto (recommended)\", i.e. let the server pick —\n * always `null` for users without the `Realtime: Advanced Session Controls`\n * authorization, who never see the model selector), and an optional EXPLICIT co-agent\n * (`null` = the server's co-agent resolution chain).\n */\nexport interface RealtimeAgentPick {\n /** The agent the voice call should front. */\n Agent: MJAIAgentEntityExtended;\n /** Explicit realtime model id, or `null` for the server's automatic selection. */\n PreferredModelId: string | null;\n /** Explicit provider-native voice id (e.g. `echo`), or `null` for the configured/default voice. */\n PreferredVoice: string | null;\n /**\n * The avatar that comes with the picked voice (its `RealtimeVoiceOption.AvatarID`), or `null`/absent when the voice\n * has none or no voice was picked. The session then asks for that face, with video on.\n */\n PreferredAvatarId?: string | null;\n /** Explicit co-agent id (`MJ: AI Agents.ID`, Realtime type), or `null` for the server's resolution chain. */\n CoAgentId: string | null;\n /** Whether the user consented to recording this call (mic + agent audio). */\n RecordingConsent: boolean;\n}\n\n/** `MJ: User Settings` key for the per-user \"record this call\" consent toggle (string `'true'`/`'false'`). */\nconst RECORDING_CONSENT_KEY = 'mj.realtimeVoice.recordingConsent.v1';\n\n/**\n * Compact anchored popover that lets the user choose WHICH agent a realtime\n * voice call should front — shown by {@link MessageInputComponent} when the\n * phone button is clicked on a conversation with **no prior agent\n * participation** (new / empty conversation), and on demand via the caret\n * button next to the phone (any conversation), where it doubles as the way\n * to pick a specific **co-agent** (the Realtime-type agent that voices the\n * call) and — for authorized users — a specific **voice model**. The plain\n * phone click on an existing conversation keeps its friction-free \"call the\n * resolved agent immediately\" behavior.\n *\n * Mostly dumb: the host supplies the agent list (the same cached set the\n * @mention autocomplete / routing logic uses), the Realtime-type co-agent\n * candidates (filtered from that same set), and the defaults to preselect;\n * the picker emits the user's choice. The data it loads itself:\n * - the compact \"Voice model\" option list (active Realtime models via a\n * narrow RunView) and each model's voices — loaded and rendered ONLY when\n * the current user holds the `Realtime: Advanced Session Controls`\n * authorization (pure UX disclosure; the server enforces the authorization\n * on the mint). The voice list marks the voices whose persona comes with an\n * avatar (a camera icon) and shows a persona's preview image when it has\n * one; picking such a voice also picks its avatar, and\n * - the chosen co-agent's pairing rows (`MJ: AI Agent Co Agents`, Active 'CoAgent'-type rows): a\n * co-agent with pairing rows may only front its paired targets, so the\n * agent list constrains to those rows (Sequence order) with the IsDefault\n * row preselected; a co-agent with zero rows is universal and the list is\n * untouched.\n *\n * It does NOT persist anything (the host persists the co-agent preference\n * via `UserInfoEngine`; `mj-conversation-agent-picker` pins\n * `MJConversationEntity.DefaultAgentID` — different jobs, which is why this\n * is a separate component).\n *\n * Anchors itself bottom-right above the composer — the host's\n * `.message-input-wrapper` is `position: relative`.\n */\n@Component({\n standalone: true,\n selector: 'mj-realtime-agent-picker',\n imports: [MJButtonDirective, MJDropdownComponent, FormsModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div class=\"mj-voice-picker\" (click)=\"$event.stopPropagation()\">\n <div class=\"mj-voice-picker__header\">\n <i class=\"fa-solid fa-phone\"></i>\n <span>Start a voice call with…</span>\n </div>\n @if (ShowCoAgentSelect) {\n <div class=\"mj-voice-picker__select-row\">\n <label class=\"mj-voice-picker__select-label\" for=\"mjRealtimeCoAgentSelect\">\n <i class=\"fa-solid fa-headset\"></i>\n <span>Co-agent</span>\n </label>\n <select\n #coAgentSelect\n id=\"mjRealtimeCoAgentSelect\"\n class=\"mj-voice-picker__select\"\n [value]=\"SelectedCoAgentId ?? ''\"\n (change)=\"OnCoAgentChange(coAgentSelect.value)\">\n <option value=\"\">Auto (recommended)</option>\n @for (coAgent of CoAgents; track coAgent.ID) {\n <option [value]=\"coAgent.ID\">{{ coAgent.Name }}</option>\n }\n </select>\n </div>\n }\n <div class=\"mj-voice-picker__search\">\n <i class=\"fa-solid fa-magnifying-glass\"></i>\n <input\n #searchInput\n type=\"text\"\n placeholder=\"Search agents\"\n [value]=\"SearchText\"\n (input)=\"OnSearchInput(searchInput.value)\"\n (keydown.enter)=\"StartCall()\"\n (keydown.arrowdown)=\"MoveSelection(1); $event.preventDefault()\"\n (keydown.arrowup)=\"MoveSelection(-1); $event.preventDefault()\" />\n </div>\n <div class=\"mj-voice-picker__list\">\n @if (FilteredAgents.length === 0) {\n <div class=\"mj-voice-picker__empty\">{{ IsConstrainedByPairings ? 'No paired agents available' : 'No matching agents' }}</div>\n } @else {\n @for (agent of FilteredAgents; track agent.ID) {\n <button\n type=\"button\"\n class=\"mj-voice-picker__item\"\n [class.mj-voice-picker__item--selected]=\"IsSelected(agent)\"\n [title]=\"agent.Description || agent.Name\"\n (click)=\"Select(agent)\"\n (dblclick)=\"Pick(agent)\">\n <i [class]=\"IconClassFor(agent)\"></i>\n <span class=\"mj-voice-picker__item-name\">{{ agent.Name }}</span>\n @if (IsDefaultChoice(agent)) {\n <span class=\"mj-voice-picker__default-badge\">default</span>\n }\n </button>\n }\n }\n </div>\n @if (CanOverrideSessionConfig && Models.length > 0) {\n <div class=\"mj-voice-picker__select-row mj-voice-picker__select-row--model\">\n <label class=\"mj-voice-picker__select-label\" for=\"mjRealtimeModelSelect\">\n <i class=\"fa-solid fa-microchip\"></i>\n <span>Voice model</span>\n </label>\n <select\n #modelSelect\n id=\"mjRealtimeModelSelect\"\n class=\"mj-voice-picker__select\"\n [value]=\"SelectedModelId ?? ''\"\n (change)=\"OnModelChange(modelSelect.value)\">\n <option value=\"\">Auto (recommended)</option>\n @for (model of Models; track model.ID) {\n <option [value]=\"model.ID\">{{ model.Name }}</option>\n }\n </select>\n </div>\n @if (SelectedModelVoices.length) {\n <div class=\"mj-voice-picker__select-row mj-voice-picker__select-row--model mj-voice-picker__voice-row\">\n <span class=\"mj-voice-picker__select-label\" id=\"mjRealtimeVoiceLabel\">\n <i class=\"fa-solid fa-wave-square\"></i>\n <span>Voice</span>\n </span>\n <!-- No ValueField: an option is its voice object, one per persona, because two personas\n can share a voice id (a voice, and the same voice with a face). -->\n <mj-dropdown\n class=\"mj-voice-picker__voice-dropdown\"\n InputId=\"mjRealtimeVoiceSelect\"\n AriaLabelledBy=\"mjRealtimeVoiceLabel\"\n AriaDescribedBy=\"mjRealtimeVoiceHint\"\n [Data]=\"SelectedModelVoices\"\n TextField=\"Name\"\n DefaultItem=\"Default\"\n [ngModel]=\"SelectedVoice\"\n (ValueChange)=\"OnVoiceChange($event)\">\n <ng-template #mjDropdownItem let-item>\n @if (VoiceOptionFor(item); as voice) {\n <span class=\"mj-voice-picker__voice\">\n @if (PreviewImageFor(voice); as image) {\n <img class=\"mj-voice-picker__voice-image\" [src]=\"image\" alt=\"\" (error)=\"OnPreviewImageError(image)\" />\n }\n <span class=\"mj-voice-picker__voice-name\">{{ voice.Name }}</span>\n @if (voice.AvatarID) {\n <span class=\"mj-voice-picker__voice-avatar\" title=\"Comes with an avatar\">\n <i class=\"fa-solid fa-video\" aria-hidden=\"true\"></i>\n <span class=\"mj-voice-picker__sr-only\">Comes with an avatar</span>\n </span>\n }\n </span>\n }\n </ng-template>\n </mj-dropdown>\n <!-- Always present, so screen readers announce the hint when a pick adds it. -->\n <div class=\"mj-voice-picker__voice-hint\" id=\"mjRealtimeVoiceHint\" aria-live=\"polite\">\n @if (SelectedVoiceHasAvatar) {\n <span class=\"mj-voice-picker__voice-hint-line\">\n <i class=\"fa-solid fa-video\" aria-hidden=\"true\"></i>\n <span>Comes with an avatar</span>\n </span>\n }\n </div>\n </div>\n }\n }\n <div class=\"mj-voice-picker__record-row\">\n <span class=\"mj-voice-picker__record-label\">\n <i class=\"fa-solid fa-microphone\"></i>\n <span class=\"mj-voice-picker__record-copy\">\n Record this call\n <small>Audio stored securely</small>\n </span>\n </span>\n <label class=\"mj-voice-picker__switch\">\n <input\n type=\"checkbox\"\n [checked]=\"RecordingConsent\"\n (change)=\"OnRecordingConsentChange($any($event.target).checked)\"\n aria-label=\"Record this call (audio stored securely)\" />\n <span class=\"mj-voice-picker__switch-track\"></span>\n </label>\n </div>\n <div class=\"mj-voice-picker__footer\">\n <button mjButton variant=\"primary\" size=\"sm\" [disabled]=\"!SelectedAgent\" (click)=\"StartCall()\">\n <i class=\"fa-solid fa-phone\"></i> Start\n </button>\n <button mjButton variant=\"outline\" size=\"sm\" (click)=\"Cancel()\">Cancel</button>\n </div>\n </div>\n `,\n styles: [`\n :host {\n /* Rendered inside a body-level CDK connected overlay (see message-input) — CDK\n owns the positioning + z-index, so the host is just a plain block. The height\n cap keeps the popover from growing past the viewport; the agent list inside\n scrolls when content exceeds it. CDK's push keeps it on-screen, and because\n it lives at the body level it can never be clipped by the chat overlay border. */\n display: block;\n max-height: min(440px, calc(100vh - 24px));\n }\n .mj-voice-picker {\n width: 300px;\n max-width: calc(100vw - 24px);\n display: flex; flex-direction: column;\n /* Match the host cap so the inner flex column knows its bound and lets the agent\n list ('mj-voice-picker__list') take the remaining space + scroll. */\n max-height: min(440px, calc(100vh - 120px));\n background: var(--mj-bg-surface-elevated);\n border: 1px solid var(--mj-border-default);\n border-radius: 8px;\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);\n overflow: hidden;\n }\n .mj-voice-picker__header {\n display: flex; align-items: center; gap: 8px;\n padding: 10px 12px 8px;\n font-size: 13px; font-weight: 600;\n color: var(--mj-text-primary);\n }\n .mj-voice-picker__header i { color: var(--mj-brand-primary); }\n .mj-voice-picker__search {\n display: flex; align-items: center; gap: 8px;\n margin: 0 12px 8px;\n padding: 0 10px;\n background: var(--mj-bg-surface-sunken);\n border: 1px solid var(--mj-border-subtle);\n border-radius: 6px;\n }\n .mj-voice-picker__search i { font-size: 12px; color: var(--mj-text-muted); }\n .mj-voice-picker__search input {\n flex: 1; min-width: 0;\n padding: 7px 0;\n background: transparent; border: none; outline: none;\n font-size: 13px; color: var(--mj-text-primary);\n }\n .mj-voice-picker__search input::placeholder { color: var(--mj-text-disabled); }\n .mj-voice-picker__search:focus-within { border-color: var(--mj-border-focus); }\n .mj-voice-picker__list {\n /* The agent list is the flexible region: it scrolls internally and gives way\n first when the whole popup is capped to the overlay height. min-height:0 lets\n it actually shrink inside the flex column; the 220px max keeps it tidy when\n there's plenty of room. */\n flex: 1 1 auto;\n min-height: 0;\n max-height: 220px; overflow-y: auto;\n border-top: 1px solid var(--mj-border-subtle);\n border-bottom: 1px solid var(--mj-border-subtle);\n padding: 4px 0;\n }\n /* Keep the chrome around the list from collapsing when the popup is height-capped. */\n .mj-voice-picker__header,\n .mj-voice-picker__search,\n .mj-voice-picker__select-row,\n .mj-voice-picker__record-row,\n .mj-voice-picker__footer { flex-shrink: 0; }\n .mj-voice-picker__item {\n display: flex; align-items: center; gap: 8px; width: 100%;\n padding: 7px 12px;\n background: transparent; border: none; cursor: pointer;\n color: var(--mj-text-primary); font-size: 13px; text-align: left;\n }\n .mj-voice-picker__item i { width: 16px; text-align: center; color: var(--mj-text-secondary); }\n .mj-voice-picker__item:hover { background: var(--mj-bg-surface-hover); }\n .mj-voice-picker__item--selected {\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n }\n .mj-voice-picker__item--selected i { color: var(--mj-brand-primary); }\n .mj-voice-picker__item-name {\n flex: 1; min-width: 0;\n overflow: hidden; text-overflow: ellipsis; white-space: nowrap;\n }\n .mj-voice-picker__default-badge {\n flex-shrink: 0;\n padding: 1px 6px;\n border-radius: 999px;\n font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em;\n color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 12%, transparent);\n }\n .mj-voice-picker__empty {\n padding: 12px; font-size: 12px; color: var(--mj-text-muted); text-align: center;\n }\n .mj-voice-picker__select-row {\n display: flex; align-items: center; gap: 8px;\n padding: 0 12px 8px;\n }\n .mj-voice-picker__select-row--model {\n padding: 8px 12px 0;\n }\n .mj-voice-picker__select-label {\n display: flex; align-items: center; gap: 6px;\n flex-shrink: 0;\n font-size: 12px; color: var(--mj-text-secondary);\n }\n .mj-voice-picker__select-label i { font-size: 11px; color: var(--mj-text-muted); }\n .mj-voice-picker__select {\n flex: 1; min-width: 0;\n padding: 5px 8px;\n font-size: 12px;\n color: var(--mj-text-primary);\n background: var(--mj-bg-surface-sunken);\n border: 1px solid var(--mj-border-subtle);\n border-radius: 6px;\n outline: none;\n }\n .mj-voice-picker__select:focus { border-color: var(--mj-border-focus); }\n /* The voice list is an mj-dropdown so its options can carry the avatar mark. The global dropdown styles size\n it for forms; scoped to this row, its trigger matches the native selects above it. The row is a grid so\n the hint sits under the dropdown, and an empty hint takes no space. */\n .mj-voice-picker__voice-row {\n display: grid;\n grid-template-columns: auto minmax(0, 1fr);\n column-gap: 8px;\n align-items: center;\n }\n .mj-voice-picker__voice-dropdown { min-width: 0; }\n .mj-voice-picker__voice-hint { grid-column: 2; }\n .mj-voice-picker__voice-hint-line {\n display: flex; align-items: center; gap: 6px;\n padding-top: 4px;\n font-size: 11px; color: var(--mj-text-secondary);\n }\n .mj-voice-picker__voice-hint-line i { font-size: 10px; color: var(--mj-brand-primary); }\n :host ::ng-deep .mj-voice-picker__voice-row .mj-dropdown {\n min-height: 0;\n padding: 5px 8px;\n font-size: 12px;\n background: var(--mj-bg-surface-sunken);\n border: 1px solid var(--mj-border-subtle);\n border-radius: 6px;\n }\n :host ::ng-deep .mj-voice-picker__voice-row .mj-dropdown--open,\n :host ::ng-deep .mj-voice-picker__voice-row .mj-dropdown:focus-visible { border-color: var(--mj-border-focus); }\n .mj-voice-picker__voice { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; }\n .mj-voice-picker__voice-image {\n width: 20px; height: 20px; flex-shrink: 0;\n border-radius: 50%; object-fit: cover;\n background: var(--mj-bg-surface-sunken);\n }\n .mj-voice-picker__voice-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n .mj-voice-picker__voice-avatar { flex-shrink: 0; font-size: 11px; color: var(--mj-brand-primary); }\n .mj-voice-picker__sr-only {\n position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;\n overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;\n }\n .mj-voice-picker__record-row {\n display: flex; align-items: center; justify-content: space-between; gap: 10px;\n margin: 10px 12px 2px;\n padding: 10px 0 2px;\n border-top: 1px solid var(--mj-border-subtle);\n }\n /* When no model/voice rows sit between the list and record row, the list's bottom border already divides them. */\n .mj-voice-picker__list + .mj-voice-picker__record-row {\n margin-top: 0;\n border-top: none;\n }\n .mj-voice-picker__record-label {\n display: flex; align-items: center; gap: 8px;\n font-size: 12px; color: var(--mj-text-secondary);\n }\n .mj-voice-picker__record-label > i { font-size: 12px; color: var(--mj-text-muted); }\n .mj-voice-picker__record-copy { display: flex; flex-direction: column; line-height: 1.3; }\n .mj-voice-picker__record-copy small { font-size: 10px; color: var(--mj-text-muted); }\n .mj-voice-picker__switch { position: relative; flex-shrink: 0; display: inline-flex; cursor: pointer; }\n .mj-voice-picker__switch input {\n position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer;\n }\n .mj-voice-picker__switch-track {\n position: relative; width: 34px; height: 18px; border-radius: 999px;\n background: var(--mj-border-strong); transition: background 150ms ease;\n }\n .mj-voice-picker__switch-track::after {\n content: ''; position: absolute; top: 2px; left: 2px;\n width: 14px; height: 14px; border-radius: 50%;\n background: var(--mj-bg-surface); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);\n transition: transform 150ms ease;\n }\n .mj-voice-picker__switch input:checked + .mj-voice-picker__switch-track { background: var(--mj-brand-primary); }\n .mj-voice-picker__switch input:checked + .mj-voice-picker__switch-track::after { transform: translateX(16px); }\n .mj-voice-picker__switch input:focus-visible + .mj-voice-picker__switch-track {\n outline: 2px solid var(--mj-border-focus); outline-offset: 2px;\n }\n @media (prefers-reduced-motion: reduce) {\n .mj-voice-picker__switch-track, .mj-voice-picker__switch-track::after { transition: none; }\n }\n .mj-voice-picker__footer {\n display: flex; align-items: center; gap: 8px;\n padding: 10px 12px;\n }\n `]\n})\nexport class RealtimeAgentPickerComponent extends BaseAngularComponent implements OnInit, AfterViewInit {\n /**\n * The authenticated user context (forwarded from the host composer / chat area).\n * Falls back to `this.ProviderToUse?.CurrentUser` when not provided.\n */\n @Input() CurrentUser: UserInfo | null = null;\n\n /** Returns the explicit CurrentUser input or falls back to ProviderToUse.CurrentUser. */\n public get EffectiveUser(): UserInfo | null {\n return this.CurrentUser ?? this.ProviderToUse?.CurrentUser ?? null;\n }\n\n /** Agents the user can call — same cached set the @mention / routing logic uses. */\n @Input() Agents: MJAIAgentEntityExtended[] = [];\n\n /** The agent the default resolution would pick — preselected and listed first. */\n @Input() DefaultAgentId: string | null = null;\n\n /**\n * The ACTIVE Realtime-type co-agent candidates the user can run (host-filtered from\n * the same cached, run-permission-filtered agent set as {@link Agents}). The co-agent\n * selector renders only when MORE THAN ONE candidate exists — with zero or one\n * there's nothing meaningful to choose and the server's resolution chain applies.\n */\n @Input() CoAgents: MJAIAgentEntityExtended[] = [];\n\n /**\n * The user's persisted co-agent preference (host-loaded via `UserInfoEngine`) —\n * preselected in the co-agent selector when it's still a valid candidate.\n */\n @Input() DefaultCoAgentId: string | null = null;\n\n /** Emitted with the chosen agent + optional explicit voice model / co-agent when the user confirms. */\n @Output() AgentPicked = new EventEmitter<RealtimeAgentPick>();\n\n /** Emitted when the user dismisses without starting a call. */\n @Output() Cancelled = new EventEmitter<void>();\n\n @ViewChild('searchInput') private searchInput?: ElementRef<HTMLInputElement>;\n\n public SearchText = '';\n public SelectedAgentId: string | null = null;\n\n /** Active Realtime models the model selector offers (loaded only for authorized users). */\n public Models: RealtimeModelOption[] = [];\n\n /** The explicitly chosen voice model id, or `null` for \"Auto (recommended)\" (the default). */\n public SelectedModelId: string | null = null;\n\n /** Active Realtime models + their voices (for the voice selector); loaded only for authorized users. */\n public VoiceModels: RealtimeModelVoices[] = [];\n\n /**\n * The explicitly chosen voice option (one of {@link SelectedModelVoices}: a persona, so two personas sharing a voice\n * id stay apart), or `null` for the configured/default voice.\n */\n public SelectedVoice: RealtimeVoiceOption | null = null;\n\n /** The explicitly chosen voice id, or `null` for the configured/default voice. */\n public get SelectedVoiceId(): string | null {\n return this.SelectedVoice?.ID ?? null;\n }\n\n /** Whether the chosen voice comes with an avatar: the hint under the voice list says so. */\n public get SelectedVoiceHasAvatar(): boolean {\n return !!this.SelectedVoice?.AvatarID?.trim();\n }\n\n /** Voices for the currently-selected model (empty when no model picked or it declares none). */\n public get SelectedModelVoices(): RealtimeVoiceOption[] {\n return this.VoiceModels.find((m) => UUIDsEqual(m.ModelID, this.SelectedModelId))?.Voices ?? [];\n }\n\n /** Preview images that failed to load; their voices show no image rather than a broken one. */\n private readonly failedPreviewImages = new Set<string>();\n\n /** The explicitly chosen co-agent id, or `null` for \"Auto (recommended)\" (the server's chain). */\n public SelectedCoAgentId: string | null = null;\n\n /**\n * Whether the user has opted to record this call (mic + agent audio). Loaded from the\n * per-user persisted preference (`mj.realtimeVoice.recordingConsent.v1`) on init and\n * persisted cross-device on change. Defaults to off.\n */\n public RecordingConsent = false;\n\n /**\n * Whether the current user holds the `Realtime: Advanced Session Controls`\n * authorization. Gates the voice-model selector (and any future config-override\n * controls) — pure disclosure; the server enforces the authorization on the mint.\n */\n public CanOverrideSessionConfig = false;\n\n /** The selected co-agent's pairing rows; empty = universal co-agent (no constraint). */\n public Pairings: RealtimePairedAgentRow[] = [];\n\n // Template helper — expose the shared UUID comparator to the view.\n public readonly UUIDsEqual = UUIDsEqual;\n\n private readonly cdr = inject(ChangeDetectorRef);\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n /** Monotonic guard so a stale pairing load can't clobber a newer co-agent choice. */\n private pairingLoadToken = 0;\n\n /** Co-agent selector visibility: only when there is a real choice to make. */\n public get ShowCoAgentSelect(): boolean {\n return this.CoAgents.length > 1;\n }\n\n /** True while the agent list is constrained to the selected co-agent's paired targets. */\n public get IsConstrainedByPairings(): boolean {\n return this.Pairings.length > 0;\n }\n\n public ngOnInit(): void {\n const initial = this.DefaultAgentId && this.findAgent(this.DefaultAgentId)\n ? this.DefaultAgentId\n : this.FilteredAgents[0]?.ID ?? null;\n this.SelectedAgentId = initial;\n void this.checkAuthorizationAndLoadModels();\n // Preselect the persisted co-agent preference when it's still a valid candidate.\n if (this.DefaultCoAgentId && this.CoAgents.some(a => UUIDsEqual(a.ID, this.DefaultCoAgentId))) {\n this.SelectedCoAgentId = this.DefaultCoAgentId;\n void this.reloadPairings();\n }\n this.RecordingConsent = this.readPersistedRecordingConsent();\n }\n\n /**\n * Checks whether the user holds the advanced-session-controls authorization and, if so,\n * loads the available realtime voice models and voices. If the initially evaluated user\n * lacks the authorization, attempts a one-time RefreshCurrentUser() on the provider in\n * case role assignments were granted after client metadata was cached.\n */\n private async checkAuthorizationAndLoadModels(): Promise<void> {\n this.CanOverrideSessionConfig = UserHoldsAuthorization(\n this.EffectiveUser,\n REALTIME_ADVANCED_SESSION_CONTROLS,\n this.ProviderToUse\n );\n\n if (!this.CanOverrideSessionConfig && this.ProviderToUse?.RefreshCurrentUser) {\n try {\n const refreshed = await this.ProviderToUse.RefreshCurrentUser();\n if (refreshed) {\n this.CanOverrideSessionConfig = UserHoldsAuthorization(\n refreshed,\n REALTIME_ADVANCED_SESSION_CONTROLS,\n this.ProviderToUse\n );\n }\n } catch (e) {\n console.warn('[RealtimeAgentPicker] Failed to refresh CurrentUser for authorization check:', e);\n }\n }\n\n if (this.CanOverrideSessionConfig) {\n await this.loadVoiceModels();\n }\n this.cdr.markForCheck();\n }\n\n /** Reads the per-user recording-consent preference (defensive: any failure → off). */\n private readPersistedRecordingConsent(): boolean {\n try {\n return UserInfoEngine.Instance.GetSetting(RECORDING_CONSENT_KEY) === 'true';\n } catch {\n return false;\n }\n }\n\n /** Records + persists (cross-device, debounced) the user's recording-consent choice. */\n public OnRecordingConsentChange(checked: boolean): void {\n this.RecordingConsent = checked;\n try {\n UserInfoEngine.Instance.SetSettingDebounced(RECORDING_CONSENT_KEY, String(checked));\n } catch (error) {\n console.warn('[RealtimeAgentPicker] Failed to persist recording consent:', error);\n }\n this.cdr.markForCheck();\n }\n\n /**\n * Loads the \"Voice model\" options: active models whose type is `Realtime`, filtered from\n * {@link AIEngineBase}'s already-cached `Models` (provider-scoped engine instance, lazy\n * `Config` — no RunView round-trip). Called ONLY for users who hold the\n * advanced-session-controls authorization. Tolerant — a failure simply leaves\n * the selector hidden (the server's automatic selection still applies).\n */\n private async loadVoiceModels(): Promise<void> {\n try {\n const engine = AIEngineBase.GetProviderInstance<AIEngineBase>(this.ProviderToUse, AIEngineBase) as AIEngineBase;\n await engine.Config(false, undefined, this.ProviderToUse);\n this.Models = BuildRealtimeModelOptions(engine.Models ?? []);\n } catch (error) {\n console.error('[RealtimeAgentPicker] Failed to load realtime models:', error);\n this.Models = [];\n }\n // Voices come from the driver via a server query (the cached models carry no voice list).\n try {\n const client = new GraphQLLiveKitClient(this.ProviderToUse as unknown as GraphQLDataProvider);\n this.VoiceModels = await client.GetRealtimeModelVoices();\n } catch (error) {\n console.error('[RealtimeAgentPicker] Failed to load realtime voices:', error);\n this.VoiceModels = [];\n }\n this.cdr.markForCheck();\n }\n\n /** Records the voice-model choice (`''` = Auto → `null`); clears the voice (and its avatar) so it can't outlive a switch. */\n public OnModelChange(value: string): void {\n this.SelectedModelId = value && value.length > 0 ? value : null;\n this.SelectedVoice = null;\n this.cdr.markForCheck();\n }\n\n /**\n * Records the voice choice from the voice list: one of {@link SelectedModelVoices}, or `null` for \"Default\". The\n * voice's avatar, when it has one, goes with it.\n */\n public OnVoiceChange(value: unknown): void {\n this.SelectedVoice = this.VoiceOptionFor(value) ?? null;\n this.cdr.markForCheck();\n }\n\n /**\n * The voice an item of the voice list is. The list's items are {@link SelectedModelVoices}' own objects, matched by\n * identity: an option is a persona, and two personas can share a voice id.\n */\n public VoiceOptionFor(item: unknown): RealtimeVoiceOption | undefined {\n return this.SelectedModelVoices.find((voice) => voice === item);\n }\n\n /** The voice's persona preview image to show, or `null` when it has none or the image failed to load. */\n public PreviewImageFor(voice: RealtimeVoiceOption): string | null {\n const url = voice.PreviewImageURL?.trim();\n return url && !this.failedPreviewImages.has(url) ? url : null;\n }\n\n /** Hides a preview image that failed to load. */\n public OnPreviewImageError(url: string): void {\n this.failedPreviewImages.add(url);\n this.cdr.markForCheck();\n }\n\n /** Records the co-agent choice (`''` = Auto → `null`) and refreshes the pairing constraint. */\n public OnCoAgentChange(value: string): void {\n this.SelectedCoAgentId = value && value.length > 0 ? value : null;\n void this.reloadPairings();\n }\n\n /**\n * Loads the selected co-agent's pairing rows and re-applies the target constraint:\n * with rows present, the agent list narrows to the paired targets (Sequence order)\n * and the IsDefault row's target is preselected; with zero rows (or Auto co-agent)\n * the list returns to the unconstrained default. Guarded against stale loads when\n * the user changes co-agents quickly.\n */\n private async reloadPairings(): Promise<void> {\n const token = ++this.pairingLoadToken;\n const coAgentId = this.SelectedCoAgentId;\n const pairings = coAgentId ? await LoadCoAgentPairings(this.ProviderToUse, coAgentId) : [];\n if (token !== this.pairingLoadToken) {\n return; // a newer co-agent choice superseded this load\n }\n this.Pairings = pairings;\n this.ensureSelectionVisible();\n this.cdr.markForCheck();\n }\n\n /**\n * Keeps the target selection coherent after the visible list changes: prefers the\n * pairing default (when constrained), then the host default, then keeps the current\n * selection when still visible, then the first visible row.\n */\n private ensureSelectionVisible(): void {\n const visible = this.FilteredAgents;\n if (this.IsConstrainedByPairings) {\n const pairedDefault = DefaultPairedTargetId(this.Pairings);\n if (pairedDefault && visible.some(a => UUIDsEqual(a.ID, pairedDefault))) {\n this.SelectedAgentId = pairedDefault;\n return;\n }\n }\n if (this.SelectedAgentId && visible.some(a => UUIDsEqual(a.ID, this.SelectedAgentId))) {\n return; // current selection still valid\n }\n if (this.DefaultAgentId && visible.some(a => UUIDsEqual(a.ID, this.DefaultAgentId))) {\n this.SelectedAgentId = this.DefaultAgentId;\n return;\n }\n this.SelectedAgentId = visible[0]?.ID ?? null;\n }\n\n public ngAfterViewInit(): void {\n // Microtask so focus lands after the popover renders without\n // triggering ExpressionChangedAfterItHasBeenChecked.\n Promise.resolve().then(() => this.searchInput?.nativeElement.focus());\n }\n\n /**\n * The visible target list: pairing-constrained first (a co-agent WITH pairing rows may\n * only front its paired targets, kept in pairing Sequence order), then search-filtered.\n * Unconstrained lists keep the default-first + alphabetical ordering.\n */\n public get FilteredAgents(): MJAIAgentEntityExtended[] {\n const base = ConstrainTargetsToPairings(this.Agents, this.Pairings);\n const needle = this.SearchText.trim().toLowerCase();\n const filtered = base.filter(a => !needle || (a.Name ?? '').toLowerCase().includes(needle));\n if (this.IsConstrainedByPairings) {\n return filtered; // pairing Sequence order is the canonical order\n }\n return filtered.sort((a, b) => {\n const aDefault = this.isDefault(a) ? 0 : 1;\n const bDefault = this.isDefault(b) ? 0 : 1;\n if (aDefault !== bDefault) return aDefault - bDefault;\n return (a.Name ?? '').localeCompare(b.Name ?? '');\n });\n }\n\n public get SelectedAgent(): MJAIAgentEntityExtended | null {\n return this.SelectedAgentId ? this.findAgent(this.SelectedAgentId) : null;\n }\n\n public IsSelected(agent: MJAIAgentEntityExtended): boolean {\n return !!this.SelectedAgentId && UUIDsEqual(agent.ID, this.SelectedAgentId);\n }\n\n /**\n * Whether `agent` carries the \"default\" badge: under a pairing constraint that's the\n * co-agent's IsDefault target; otherwise the host-resolved default agent.\n */\n public IsDefaultChoice(agent: MJAIAgentEntityExtended): boolean {\n if (this.IsConstrainedByPairings) {\n const pairedDefault = DefaultPairedTargetId(this.Pairings);\n return !!pairedDefault && UUIDsEqual(agent.ID, pairedDefault);\n }\n return this.isDefault(agent);\n }\n\n public IconClassFor(agent: MJAIAgentEntityExtended): string {\n return agent.IconClass?.trim() || 'fa-solid fa-robot';\n }\n\n public OnSearchInput(value: string): void {\n this.SearchText = value;\n // Keep the selection on a visible row.\n const visible = this.FilteredAgents;\n if (!visible.some(a => this.IsSelected(a))) {\n this.SelectedAgentId = visible[0]?.ID ?? null;\n }\n this.cdr.markForCheck();\n }\n\n /** Arrow-key navigation through the filtered list. */\n public MoveSelection(delta: number): void {\n const visible = this.FilteredAgents;\n if (visible.length === 0) return;\n const currentIndex = visible.findIndex(a => this.IsSelected(a));\n const nextIndex = currentIndex < 0\n ? 0\n : Math.min(visible.length - 1, Math.max(0, currentIndex + delta));\n this.SelectedAgentId = visible[nextIndex].ID;\n this.cdr.markForCheck();\n }\n\n public Select(agent: MJAIAgentEntityExtended): void {\n this.SelectedAgentId = agent.ID;\n this.cdr.markForCheck();\n }\n\n /** Confirm a specific agent immediately (double-click shortcut). */\n public Pick(agent: MJAIAgentEntityExtended): void {\n this.AgentPicked.emit(this.buildPick(agent));\n }\n\n public StartCall(): void {\n const agent = this.SelectedAgent;\n if (agent) {\n this.AgentPicked.emit(this.buildPick(agent));\n }\n }\n\n public Cancel(): void {\n this.Cancelled.emit();\n }\n\n /** Dismiss when the user clicks anywhere outside the popover. (The phone\n * button that opens it stops propagation, so the opening click never\n * reaches this handler.) The voice list opens in its own overlay outside\n * this element; a click on it, or on the backdrop that closes it, only\n * closes the list. */\n @HostListener('document:click', ['$event'])\n public OnDocumentClick(event: MouseEvent): void {\n if (!this.elementRef.nativeElement.contains(event.target as Node) && !this.isInDropdownOverlay(event.target)) {\n this.Cancelled.emit();\n }\n }\n\n @HostListener('document:keydown.escape')\n public OnEscape(): void {\n this.Cancelled.emit();\n }\n\n /**\n * Assembles the emitted pick. The model, voice and avatar preferences are hard-gated\n * on the authorization here (defense in depth — unauthorized users never see the\n * selectors, so they should already be null).\n */\n private buildPick(agent: MJAIAgentEntityExtended): RealtimeAgentPick {\n const voice = this.CanOverrideSessionConfig ? this.SelectedVoice : null;\n return {\n Agent: agent,\n PreferredModelId: this.CanOverrideSessionConfig ? this.SelectedModelId : null,\n PreferredVoice: voice?.ID ?? null,\n PreferredAvatarId: voice?.AvatarID?.trim() || null,\n CoAgentId: this.SelectedCoAgentId,\n RecordingConsent: this.RecordingConsent\n };\n }\n\n /** Whether a click landed in a dropdown's overlay (its option panel or the backdrop that closes it). */\n private isInDropdownOverlay(target: EventTarget | null): boolean {\n return target instanceof Element && target.closest('.mj-dropdown-panel, .mj-dropdown-backdrop') != null;\n }\n\n private isDefault(agent: MJAIAgentEntityExtended): boolean {\n return !!this.DefaultAgentId && UUIDsEqual(agent.ID, this.DefaultAgentId);\n }\n\n private findAgent(id: string): MJAIAgentEntityExtended | null {\n return this.Agents.find(a => UUIDsEqual(a.ID, id)) ?? null;\n }\n}\n"]}
|