@memberjunction/ng-conversations 6.2.0-edge.2 → 6.2.0-edge.4
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 +4 -7
- package/dist/lib/components/collection/collection-view.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collection-view.component.js +1 -0
- package/dist/lib/components/collection/collection-view.component.js.map +1 -1
- package/dist/lib/components/composer/ai-composer.component.d.ts +14 -2
- package/dist/lib/components/composer/ai-composer.component.d.ts.map +1 -1
- package/dist/lib/components/composer/ai-composer.component.js +35 -4
- package/dist/lib/components/composer/ai-composer.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts +632 -55
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.js +2748 -624
- package/dist/lib/components/conversation/conversation-chat-area.component.js.map +1 -1
- package/dist/lib/components/conversation/forks-popover.component.d.ts +37 -0
- package/dist/lib/components/conversation/forks-popover.component.d.ts.map +1 -0
- package/dist/lib/components/conversation/forks-popover.component.js +164 -0
- package/dist/lib/components/conversation/forks-popover.component.js.map +1 -0
- 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 +16 -3
- package/dist/lib/components/export/export-modal.component.js.map +1 -1
- package/dist/lib/components/message/conversation-message-rating.component.d.ts.map +1 -1
- package/dist/lib/components/message/conversation-message-rating.component.js +11 -9
- package/dist/lib/components/message/conversation-message-rating.component.js.map +1 -1
- package/dist/lib/components/message/message-input.component.d.ts +121 -11
- package/dist/lib/components/message/message-input.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-input.component.js +307 -106
- package/dist/lib/components/message/message-input.component.js.map +1 -1
- package/dist/lib/components/message/message-item.component.d.ts +178 -5
- package/dist/lib/components/message/message-item.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-item.component.js +919 -306
- package/dist/lib/components/message/message-item.component.js.map +1 -1
- package/dist/lib/components/message/message-list.component.d.ts +92 -21
- package/dist/lib/components/message/message-list.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-list.component.js +337 -52
- package/dist/lib/components/message/message-list.component.js.map +1 -1
- package/dist/lib/components/realtime/avatar/realtime-avatar-channel.d.ts +34 -0
- package/dist/lib/components/realtime/avatar/realtime-avatar-channel.d.ts.map +1 -0
- package/dist/lib/components/realtime/avatar/realtime-avatar-channel.js +75 -0
- package/dist/lib/components/realtime/avatar/realtime-avatar-channel.js.map +1 -0
- package/dist/lib/components/realtime/avatar/realtime-avatar-surface.component.d.ts +80 -0
- package/dist/lib/components/realtime/avatar/realtime-avatar-surface.component.d.ts.map +1 -0
- package/dist/lib/components/realtime/avatar/realtime-avatar-surface.component.js +202 -0
- package/dist/lib/components/realtime/avatar/realtime-avatar-surface.component.js.map +1 -0
- package/dist/lib/components/realtime/capture/realtime-camera-check-card.component.d.ts +45 -0
- package/dist/lib/components/realtime/capture/realtime-camera-check-card.component.d.ts.map +1 -0
- package/dist/lib/components/realtime/capture/realtime-camera-check-card.component.js +123 -0
- package/dist/lib/components/realtime/capture/realtime-camera-check-card.component.js.map +1 -0
- package/dist/lib/components/realtime/capture/realtime-capture-channel.d.ts +90 -0
- package/dist/lib/components/realtime/capture/realtime-capture-channel.d.ts.map +1 -0
- package/dist/lib/components/realtime/capture/realtime-capture-channel.js +223 -0
- package/dist/lib/components/realtime/capture/realtime-capture-channel.js.map +1 -0
- package/dist/lib/components/realtime/capture/realtime-capture-model.d.ts +98 -0
- package/dist/lib/components/realtime/capture/realtime-capture-model.d.ts.map +1 -0
- package/dist/lib/components/realtime/capture/realtime-capture-model.js +161 -0
- package/dist/lib/components/realtime/capture/realtime-capture-model.js.map +1 -0
- package/dist/lib/components/realtime/capture/realtime-capture-surface.component.d.ts +48 -0
- package/dist/lib/components/realtime/capture/realtime-capture-surface.component.d.ts.map +1 -0
- package/dist/lib/components/realtime/capture/realtime-capture-surface.component.js +205 -0
- package/dist/lib/components/realtime/capture/realtime-capture-surface.component.js.map +1 -0
- package/dist/lib/components/realtime/channels/client-context-channel.d.ts +19 -2
- package/dist/lib/components/realtime/channels/client-context-channel.d.ts.map +1 -1
- package/dist/lib/components/realtime/channels/client-context-channel.js +83 -9
- package/dist/lib/components/realtime/channels/client-context-channel.js.map +1 -1
- package/dist/lib/components/realtime/channels/realtime-channel-pane.component.d.ts +30 -9
- package/dist/lib/components/realtime/channels/realtime-channel-pane.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/channels/realtime-channel-pane.component.js +78 -14
- package/dist/lib/components/realtime/channels/realtime-channel-pane.component.js.map +1 -1
- package/dist/lib/components/realtime/identity-verification/identity-verification-channel.d.ts +71 -0
- package/dist/lib/components/realtime/identity-verification/identity-verification-channel.d.ts.map +1 -0
- package/dist/lib/components/realtime/identity-verification/identity-verification-channel.js +259 -0
- package/dist/lib/components/realtime/identity-verification/identity-verification-channel.js.map +1 -0
- package/dist/lib/components/realtime/identity-verification/identity-verification-model.d.ts +129 -0
- package/dist/lib/components/realtime/identity-verification/identity-verification-model.d.ts.map +1 -0
- package/dist/lib/components/realtime/identity-verification/identity-verification-model.js +373 -0
- package/dist/lib/components/realtime/identity-verification/identity-verification-model.js.map +1 -0
- package/dist/lib/components/realtime/identity-verification/identity-verification-surface.component.d.ts +77 -0
- package/dist/lib/components/realtime/identity-verification/identity-verification-surface.component.d.ts.map +1 -0
- package/dist/lib/components/realtime/identity-verification/identity-verification-surface.component.js +420 -0
- package/dist/lib/components/realtime/identity-verification/identity-verification-surface.component.js.map +1 -0
- package/dist/lib/components/realtime/interactive-component/component-contract.d.ts +83 -0
- package/dist/lib/components/realtime/interactive-component/component-contract.d.ts.map +1 -0
- package/dist/lib/components/realtime/interactive-component/component-contract.js +292 -0
- package/dist/lib/components/realtime/interactive-component/component-contract.js.map +1 -0
- package/dist/lib/components/realtime/interactive-component/component-data-state.d.ts +39 -0
- package/dist/lib/components/realtime/interactive-component/component-data-state.d.ts.map +1 -0
- package/dist/lib/components/realtime/interactive-component/component-data-state.js +152 -0
- package/dist/lib/components/realtime/interactive-component/component-data-state.js.map +1 -0
- package/dist/lib/components/realtime/interactive-component/component-instance-engine.d.ts +109 -0
- package/dist/lib/components/realtime/interactive-component/component-instance-engine.d.ts.map +1 -0
- package/dist/lib/components/realtime/interactive-component/component-instance-engine.js +146 -0
- package/dist/lib/components/realtime/interactive-component/component-instance-engine.js.map +1 -0
- package/dist/lib/components/realtime/interactive-component/component-spec-content.d.ts +19 -0
- package/dist/lib/components/realtime/interactive-component/component-spec-content.d.ts.map +1 -0
- package/dist/lib/components/realtime/interactive-component/component-spec-content.js +39 -0
- package/dist/lib/components/realtime/interactive-component/component-spec-content.js.map +1 -0
- package/dist/lib/components/realtime/interactive-component/interactive-component-channel.d.ts +183 -0
- package/dist/lib/components/realtime/interactive-component/interactive-component-channel.d.ts.map +1 -0
- package/dist/lib/components/realtime/interactive-component/interactive-component-channel.js +761 -0
- package/dist/lib/components/realtime/interactive-component/interactive-component-channel.js.map +1 -0
- package/dist/lib/components/realtime/interactive-component/interactive-component-config.d.ts +25 -0
- package/dist/lib/components/realtime/interactive-component/interactive-component-config.d.ts.map +1 -0
- package/dist/lib/components/realtime/interactive-component/interactive-component-config.js +57 -0
- package/dist/lib/components/realtime/interactive-component/interactive-component-config.js.map +1 -0
- package/dist/lib/components/realtime/interactive-component/interactive-component-host.component.d.ts +40 -0
- package/dist/lib/components/realtime/interactive-component/interactive-component-host.component.d.ts.map +1 -0
- package/dist/lib/components/realtime/interactive-component/interactive-component-host.component.js +97 -0
- package/dist/lib/components/realtime/interactive-component/interactive-component-host.component.js.map +1 -0
- package/dist/lib/components/realtime/interactive-component/interactive-component-types.d.ts +144 -0
- package/dist/lib/components/realtime/interactive-component/interactive-component-types.d.ts.map +1 -0
- package/dist/lib/components/realtime/interactive-component/interactive-component-types.js +57 -0
- package/dist/lib/components/realtime/interactive-component/interactive-component-types.js.map +1 -0
- package/dist/lib/components/realtime/interactive-component/react-component-handle.d.ts +36 -0
- package/dist/lib/components/realtime/interactive-component/react-component-handle.d.ts.map +1 -0
- package/dist/lib/components/realtime/interactive-component/react-component-handle.js +55 -0
- package/dist/lib/components/realtime/interactive-component/react-component-handle.js.map +1 -0
- package/dist/lib/components/realtime/interactive-component/realtime-interactive-component-surface.component.d.ts +55 -0
- package/dist/lib/components/realtime/interactive-component/realtime-interactive-component-surface.component.d.ts.map +1 -0
- package/dist/lib/components/realtime/interactive-component/realtime-interactive-component-surface.component.js +210 -0
- package/dist/lib/components/realtime/interactive-component/realtime-interactive-component-surface.component.js.map +1 -0
- package/dist/lib/components/realtime/interactive-component/run-view-component-artifact-source.d.ts +32 -0
- package/dist/lib/components/realtime/interactive-component/run-view-component-artifact-source.d.ts.map +1 -0
- package/dist/lib/components/realtime/interactive-component/run-view-component-artifact-source.js +90 -0
- package/dist/lib/components/realtime/interactive-component/run-view-component-artifact-source.js.map +1 -0
- package/dist/lib/components/realtime/media/media-channel.d.ts +7 -0
- package/dist/lib/components/realtime/media/media-channel.d.ts.map +1 -1
- package/dist/lib/components/realtime/media/media-channel.js +28 -1
- package/dist/lib/components/realtime/media/media-channel.js.map +1 -1
- package/dist/lib/components/realtime/realtime-agent-banner.component.d.ts +8 -1
- package/dist/lib/components/realtime/realtime-agent-banner.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-agent-banner.component.js +89 -71
- package/dist/lib/components/realtime/realtime-agent-banner.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-agent-orb.component.d.ts +21 -0
- package/dist/lib/components/realtime/realtime-agent-orb.component.d.ts.map +1 -0
- package/dist/lib/components/realtime/realtime-agent-orb.component.js +49 -0
- package/dist/lib/components/realtime/realtime-agent-orb.component.js.map +1 -0
- package/dist/lib/components/realtime/realtime-agent-picker.component.d.ts +44 -11
- package/dist/lib/components/realtime/realtime-agent-picker.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-agent-picker.component.js +162 -50
- package/dist/lib/components/realtime/realtime-agent-picker.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-audio-visuals.d.ts +8 -2
- package/dist/lib/components/realtime/realtime-audio-visuals.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-audio-visuals.js +14 -18
- package/dist/lib/components/realtime/realtime-audio-visuals.js.map +1 -1
- package/dist/lib/components/realtime/realtime-composer.component.d.ts +42 -2
- package/dist/lib/components/realtime/realtime-composer.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-composer.component.js +137 -102
- package/dist/lib/components/realtime/realtime-composer.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-perception-chip.component.d.ts +71 -0
- package/dist/lib/components/realtime/realtime-perception-chip.component.d.ts.map +1 -0
- package/dist/lib/components/realtime/realtime-perception-chip.component.js +221 -0
- package/dist/lib/components/realtime/realtime-perception-chip.component.js.map +1 -0
- package/dist/lib/components/realtime/realtime-session-overlay.component.d.ts +264 -22
- package/dist/lib/components/realtime/realtime-session-overlay.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-session-overlay.component.js +851 -135
- package/dist/lib/components/realtime/realtime-session-overlay.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-surface-placement-prefs.d.ts +14 -0
- package/dist/lib/components/realtime/realtime-surface-placement-prefs.d.ts.map +1 -0
- package/dist/lib/components/realtime/realtime-surface-placement-prefs.js +14 -0
- package/dist/lib/components/realtime/realtime-surface-placement-prefs.js.map +1 -0
- package/dist/lib/components/realtime/realtime-surface-stage.model.d.ts +74 -0
- package/dist/lib/components/realtime/realtime-surface-stage.model.d.ts.map +1 -0
- package/dist/lib/components/realtime/realtime-surface-stage.model.js +171 -0
- package/dist/lib/components/realtime/realtime-surface-stage.model.js.map +1 -0
- package/dist/lib/components/realtime/realtime-surface-tabs.component.d.ts +71 -13
- package/dist/lib/components/realtime/realtime-surface-tabs.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-surface-tabs.component.js +232 -73
- package/dist/lib/components/realtime/realtime-surface-tabs.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-surface-tabs.model.d.ts +5 -0
- package/dist/lib/components/realtime/realtime-surface-tabs.model.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-surface-tabs.model.js +8 -0
- package/dist/lib/components/realtime/realtime-surface-tabs.model.js.map +1 -1
- package/dist/lib/components/realtime/realtime-ui-config.d.ts +12 -2
- package/dist/lib/components/realtime/realtime-ui-config.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-ui-config.js +5 -1
- package/dist/lib/components/realtime/realtime-ui-config.js.map +1 -1
- package/dist/lib/components/realtime/remote-browser/remote-browser-channel.d.ts +10 -1
- package/dist/lib/components/realtime/remote-browser/remote-browser-channel.d.ts.map +1 -1
- package/dist/lib/components/realtime/remote-browser/remote-browser-channel.js +42 -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 +20 -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 +44 -10
- package/dist/lib/components/realtime/remote-browser/remote-browser-surface.component.js.map +1 -1
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel.d.ts +28 -44
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel.d.ts.map +1 -1
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel.js +76 -162
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel.js.map +1 -1
- package/dist/lib/components/search/search-panel.component.d.ts +2 -0
- package/dist/lib/components/search/search-panel.component.d.ts.map +1 -1
- package/dist/lib/components/search/search-panel.component.js +25 -12
- package/dist/lib/components/search/search-panel.component.js.map +1 -1
- package/dist/lib/components/workspace/conversation-workspace.component.d.ts +22 -31
- package/dist/lib/components/workspace/conversation-workspace.component.d.ts.map +1 -1
- package/dist/lib/components/workspace/conversation-workspace.component.js +50 -63
- package/dist/lib/components/workspace/conversation-workspace.component.js.map +1 -1
- package/dist/lib/conversations.module.d.ts +30 -29
- package/dist/lib/conversations.module.d.ts.map +1 -1
- package/dist/lib/conversations.module.js +27 -5
- package/dist/lib/conversations.module.js.map +1 -1
- package/dist/lib/events/chat-events.d.ts +25 -0
- package/dist/lib/events/chat-events.d.ts.map +1 -1
- package/dist/lib/events/chat-events.js +36 -0
- package/dist/lib/events/chat-events.js.map +1 -1
- package/dist/lib/models/agent-turn.model.d.ts +5 -0
- 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 +34 -8
- package/dist/lib/services/agent-state.service.d.ts.map +1 -1
- package/dist/lib/services/agent-state.service.js +82 -29
- package/dist/lib/services/agent-state.service.js.map +1 -1
- package/dist/lib/services/artifact-state.service.d.ts +0 -9
- package/dist/lib/services/artifact-state.service.d.ts.map +1 -1
- package/dist/lib/services/artifact-state.service.js +1 -32
- package/dist/lib/services/artifact-state.service.js.map +1 -1
- package/dist/lib/services/browser-realtime-media-host.d.ts +12 -0
- package/dist/lib/services/browser-realtime-media-host.d.ts.map +1 -1
- package/dist/lib/services/browser-realtime-media-host.js +19 -0
- package/dist/lib/services/browser-realtime-media-host.js.map +1 -1
- package/dist/lib/services/browser-recording-unload-guard.d.ts +30 -0
- package/dist/lib/services/browser-recording-unload-guard.d.ts.map +1 -0
- package/dist/lib/services/browser-recording-unload-guard.js +43 -0
- package/dist/lib/services/browser-recording-unload-guard.js.map +1 -0
- package/dist/lib/services/conversation-agent.service.d.ts +35 -11
- package/dist/lib/services/conversation-agent.service.d.ts.map +1 -1
- package/dist/lib/services/conversation-agent.service.js +65 -20
- package/dist/lib/services/conversation-agent.service.js.map +1 -1
- package/dist/lib/services/conversation-detail-window.store.d.ts +22 -4
- package/dist/lib/services/conversation-detail-window.store.d.ts.map +1 -1
- package/dist/lib/services/conversation-detail-window.store.js +50 -9
- package/dist/lib/services/conversation-detail-window.store.js.map +1 -1
- package/dist/lib/services/conversation-naming.d.ts +72 -22
- package/dist/lib/services/conversation-naming.d.ts.map +1 -1
- package/dist/lib/services/conversation-naming.js +84 -10
- package/dist/lib/services/conversation-naming.js.map +1 -1
- package/dist/lib/services/data-cache.service.d.ts +13 -5
- package/dist/lib/services/data-cache.service.d.ts.map +1 -1
- package/dist/lib/services/data-cache.service.js +39 -19
- package/dist/lib/services/data-cache.service.js.map +1 -1
- package/dist/lib/services/export.service.d.ts +26 -9
- package/dist/lib/services/export.service.d.ts.map +1 -1
- package/dist/lib/services/export.service.js +61 -18
- package/dist/lib/services/export.service.js.map +1 -1
- package/dist/lib/services/realtime-audio-recorder.d.ts +33 -5
- package/dist/lib/services/realtime-audio-recorder.d.ts.map +1 -1
- package/dist/lib/services/realtime-audio-recorder.js +71 -11
- package/dist/lib/services/realtime-audio-recorder.js.map +1 -1
- package/dist/lib/services/realtime-pairing.d.ts +10 -5
- package/dist/lib/services/realtime-pairing.d.ts.map +1 -1
- package/dist/lib/services/realtime-pairing.js +15 -6
- package/dist/lib/services/realtime-pairing.js.map +1 -1
- package/dist/lib/services/realtime-session.service.d.ts +3 -2
- package/dist/lib/services/realtime-session.service.d.ts.map +1 -1
- package/dist/lib/services/realtime-session.service.js +7 -2
- package/dist/lib/services/realtime-session.service.js.map +1 -1
- package/dist/lib/services/search.service.d.ts +7 -2
- package/dist/lib/services/search.service.d.ts.map +1 -1
- package/dist/lib/services/search.service.js +13 -4
- package/dist/lib/services/search.service.js.map +1 -1
- package/dist/lib/util/frame-zone.d.ts +10 -0
- package/dist/lib/util/frame-zone.d.ts.map +1 -0
- package/dist/lib/util/frame-zone.js +10 -0
- package/dist/lib/util/frame-zone.js.map +1 -0
- package/dist/lib/utils/conversation-branching.d.ts +4 -0
- package/dist/lib/utils/conversation-branching.d.ts.map +1 -0
- package/dist/lib/utils/conversation-branching.js +5 -0
- package/dist/lib/utils/conversation-branching.js.map +1 -0
- package/dist/lib/utils/conversation-forks.d.ts +315 -0
- package/dist/lib/utils/conversation-forks.d.ts.map +1 -0
- package/dist/lib/utils/conversation-forks.js +456 -0
- package/dist/lib/utils/conversation-forks.js.map +1 -0
- package/dist/public-api.d.ts +23 -1
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +30 -1
- package/dist/public-api.js.map +1 -1
- package/package.json +37 -32
- package/dist/lib/components/thread/thread-panel.component.d.ts +0 -126
- package/dist/lib/components/thread/thread-panel.component.d.ts.map +0 -1
- package/dist/lib/components/thread/thread-panel.component.js +0 -440
- package/dist/lib/components/thread/thread-panel.component.js.map +0 -1
|
@@ -16,7 +16,7 @@ function ConversationMessageRatingComponent_Conditional_2_Conditional_1_Template
|
|
|
16
16
|
} }
|
|
17
17
|
function ConversationMessageRatingComponent_Conditional_2_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
18
18
|
i0.ɵɵelement(0, "i", 7);
|
|
19
|
-
i0.ɵɵelementStart(1, "span");
|
|
19
|
+
i0.ɵɵelementStart(1, "span", 8);
|
|
20
20
|
i0.ɵɵtext(2, "Rate response");
|
|
21
21
|
i0.ɵɵelementEnd();
|
|
22
22
|
} }
|
|
@@ -30,12 +30,13 @@ function ConversationMessageRatingComponent_Conditional_2_Template(rf, ctx) { if
|
|
|
30
30
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
31
31
|
i0.ɵɵclassProp("has-rated", ctx_r1.currentUserRating != null);
|
|
32
32
|
i0.ɵɵproperty("disabled", ctx_r1.isSaving)("title", ctx_r1.currentUserRating != null ? "Edit your rating" : "Rate this response");
|
|
33
|
+
i0.ɵɵattribute("aria-label", ctx_r1.currentUserRating != null ? null : "Rate response");
|
|
33
34
|
i0.ɵɵadvance();
|
|
34
35
|
i0.ɵɵconditional(ctx_r1.currentUserRating != null ? 1 : 2);
|
|
35
36
|
} }
|
|
36
37
|
function ConversationMessageRatingComponent_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
37
38
|
i0.ɵɵelementStart(0, "span", 3);
|
|
38
|
-
i0.ɵɵelement(1, "i",
|
|
39
|
+
i0.ɵɵelement(1, "i", 9);
|
|
39
40
|
i0.ɵɵelementStart(2, "span");
|
|
40
41
|
i0.ɵɵtext(3);
|
|
41
42
|
i0.ɵɵelementEnd()();
|
|
@@ -310,14 +311,14 @@ export class ConversationMessageRatingComponent extends BaseAngularComponent {
|
|
|
310
311
|
}
|
|
311
312
|
}
|
|
312
313
|
static ɵfac = function ConversationMessageRatingComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ConversationMessageRatingComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i1.DialogService)); };
|
|
313
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ConversationMessageRatingComponent, selectors: [["mj-conversation-message-rating"]], inputs: { ConversationDetailId: "ConversationDetailId", conversationDetailId: "conversationDetailId", CurrentUser: "CurrentUser", currentUser: "currentUser", canEdit: "canEdit", RatingEntityName: "RatingEntityName", ratingEntityName: "ratingEntityName", RatingField: "RatingField", ratingField: "ratingField", RatingCommentField: "RatingCommentField", ratingCommentField: "ratingCommentField", RatingsData: "RatingsData", ratingsData: "ratingsData" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 4, vars: 1, consts: [[1, "rating-container"], [1, "user-rating"], ["type", "button", 1, "rating-button", 3, "has-rated", "disabled", "title"], ["title", "Rating left by the conversation owner \u2014 read-only", 1, "rating-readonly"], ["type", "button", 1, "rating-button", 3, "click", "disabled", "title"], [1, "fa-solid", "fa-pen-to-square"], [1, "my-rating"], [1, "fa-regular", "fa-comment-dots"], [1, "fa-solid", "fa-comment-dots"]], template: function ConversationMessageRatingComponent_Template(rf, ctx) { if (rf & 1) {
|
|
314
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ConversationMessageRatingComponent, selectors: [["mj-conversation-message-rating"]], inputs: { ConversationDetailId: "ConversationDetailId", conversationDetailId: "conversationDetailId", CurrentUser: "CurrentUser", currentUser: "currentUser", canEdit: "canEdit", RatingEntityName: "RatingEntityName", ratingEntityName: "ratingEntityName", RatingField: "RatingField", ratingField: "ratingField", RatingCommentField: "RatingCommentField", ratingCommentField: "ratingCommentField", RatingsData: "RatingsData", ratingsData: "ratingsData" }, standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 4, vars: 1, consts: [[1, "rating-container"], [1, "user-rating"], ["type", "button", 1, "rating-button", 3, "has-rated", "disabled", "title"], ["title", "Rating left by the conversation owner \u2014 read-only", 1, "rating-readonly"], ["type", "button", 1, "rating-button", 3, "click", "disabled", "title"], [1, "fa-solid", "fa-pen-to-square"], [1, "my-rating"], ["aria-hidden", "true", 1, "fa-regular", "fa-comment-dots"], [1, "rate-label"], [1, "fa-solid", "fa-comment-dots"]], template: function ConversationMessageRatingComponent_Template(rf, ctx) { if (rf & 1) {
|
|
314
315
|
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1);
|
|
315
|
-
i0.ɵɵconditionalCreate(2, ConversationMessageRatingComponent_Conditional_2_Template, 3,
|
|
316
|
+
i0.ɵɵconditionalCreate(2, ConversationMessageRatingComponent_Conditional_2_Template, 3, 6, "button", 2)(3, ConversationMessageRatingComponent_Conditional_3_Template, 4, 1, "span", 3);
|
|
316
317
|
i0.ɵɵelementEnd()();
|
|
317
318
|
} if (rf & 2) {
|
|
318
319
|
i0.ɵɵadvance(2);
|
|
319
320
|
i0.ɵɵconditional(ctx.canEdit ? 2 : ctx.currentUserRating != null ? 3 : -1);
|
|
320
|
-
} }, styles: [".rating-container[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 4px 0;\n }\n\n .user-rating[_ngcontent-%COMP%] {\n display: flex;\n gap: 4px;\n margin-left: auto;\n }\n\n .rating-button[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap:
|
|
321
|
+
} }, styles: [".rating-container[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 4px 0;\n }\n\n .user-rating[_ngcontent-%COMP%] {\n display: flex;\n gap: 4px;\n margin-left: auto;\n }\n\n .rating-button[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: var(--mj-space-2);\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-strong);\n border-radius: 6px;\n padding: 6px 12px;\n cursor: pointer;\n font-size: 13px;\n color: var(--mj-text-primary);\n opacity: 0.85;\n transition: all 0.15s ease;\n }\n\n .rating-button[_ngcontent-%COMP%]:hover:not(:disabled) {\n opacity: 1;\n border-color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 6%, var(--mj-bg-surface));\n }\n\n .rating-button[_ngcontent-%COMP%]:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n }\n\n .rating-button.has-rated[_ngcontent-%COMP%] {\n border-color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, var(--mj-bg-surface));\n }\n\n .my-rating[_ngcontent-%COMP%] {\n font-weight: 500;\n }\n\n \n @media (max-width: 768px) {\n .rate-label[_ngcontent-%COMP%] {\n display: none;\n }\n }\n\n .rating-readonly[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 4px 10px;\n border: 1px solid var(--mj-border-default);\n border-radius: 6px;\n font-size: 12px;\n color: var(--mj-text-secondary);\n background: var(--mj-bg-surface-sunken);\n cursor: default;\n }"] });
|
|
321
322
|
}
|
|
322
323
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ConversationMessageRatingComponent, [{
|
|
323
324
|
type: Component,
|
|
@@ -331,13 +332,14 @@ export class ConversationMessageRatingComponent extends BaseAngularComponent {
|
|
|
331
332
|
[disabled]="isSaving"
|
|
332
333
|
(click)="OpenRatingDialog()"
|
|
333
334
|
[title]="currentUserRating != null ? 'Edit your rating' : 'Rate this response'"
|
|
335
|
+
[attr.aria-label]="currentUserRating != null ? null : 'Rate response'"
|
|
334
336
|
type="button">
|
|
335
337
|
@if (currentUserRating != null) {
|
|
336
338
|
<i class="fa-solid fa-pen-to-square"></i>
|
|
337
339
|
<span class="my-rating">My rating: {{ currentUserRating }}/10</span>
|
|
338
340
|
} @else {
|
|
339
|
-
<i class="fa-regular fa-comment-dots"></i>
|
|
340
|
-
<span>Rate response</span>
|
|
341
|
+
<i class="fa-regular fa-comment-dots" aria-hidden="true"></i>
|
|
342
|
+
<span class="rate-label">Rate response</span>
|
|
341
343
|
}
|
|
342
344
|
</button>
|
|
343
345
|
} @else if (currentUserRating != null) {
|
|
@@ -349,7 +351,7 @@ export class ConversationMessageRatingComponent extends BaseAngularComponent {
|
|
|
349
351
|
}
|
|
350
352
|
</div>
|
|
351
353
|
</div>
|
|
352
|
-
`, styles: ["\n .rating-container {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 4px 0;\n }\n\n .user-rating {\n display: flex;\n gap: 4px;\n margin-left: auto;\n }\n\n .rating-button {\n display: inline-flex;\n align-items: center;\n gap:
|
|
354
|
+
`, styles: ["\n .rating-container {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 4px 0;\n }\n\n .user-rating {\n display: flex;\n gap: 4px;\n margin-left: auto;\n }\n\n .rating-button {\n display: inline-flex;\n align-items: center;\n gap: var(--mj-space-2);\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-strong);\n border-radius: 6px;\n padding: 6px 12px;\n cursor: pointer;\n font-size: 13px;\n color: var(--mj-text-primary);\n opacity: 0.85;\n transition: all 0.15s ease;\n }\n\n .rating-button:hover:not(:disabled) {\n opacity: 1;\n border-color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 6%, var(--mj-bg-surface));\n }\n\n .rating-button:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n }\n\n .rating-button.has-rated {\n border-color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, var(--mj-bg-surface));\n }\n\n .my-rating {\n font-weight: 500;\n }\n\n /* Phones: \"Rate response\" collapses to its icon */\n @media (max-width: 768px) {\n .rate-label {\n display: none;\n }\n }\n\n .rating-readonly {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 4px 10px;\n border: 1px solid var(--mj-border-default);\n border-radius: 6px;\n font-size: 12px;\n color: var(--mj-text-secondary);\n background: var(--mj-bg-surface-sunken);\n cursor: default;\n }\n "] }]
|
|
353
355
|
}], () => [{ type: i0.ChangeDetectorRef }, { type: i1.DialogService }], { ConversationDetailId: [{
|
|
354
356
|
type: Input
|
|
355
357
|
}], conversationDetailId: [{
|
|
@@ -377,5 +379,5 @@ export class ConversationMessageRatingComponent extends BaseAngularComponent {
|
|
|
377
379
|
}], ratingsData: [{
|
|
378
380
|
type: Input
|
|
379
381
|
}] }); })();
|
|
380
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ConversationMessageRatingComponent, { className: "ConversationMessageRatingComponent", filePath: "src/lib/components/message/conversation-message-rating.component.ts", lineNumber:
|
|
382
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ConversationMessageRatingComponent, { className: "ConversationMessageRatingComponent", filePath: "src/lib/components/message/conversation-message-rating.component.ts", lineNumber: 134 }); })();
|
|
381
383
|
//# sourceMappingURL=conversation-message-rating.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation-message-rating.component.js","sourceRoot":"","sources":["../../../../src/lib/components/message/conversation-message-rating.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAA6B,MAAM,eAAe,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAA4B,OAAO,EAAY,MAAM,sBAAsB,CAAC;AACnF,OAAO,EAAc,cAAc,EAAE,MAAM,+BAA+B,CAAC;;;;IA0C7D,uBAAyC;IACzC,+BAA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YACT,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;YACtB,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;QAC3B,CAAC;IACH,CAAC;4HA/QU,kCAAkC;6DAAlC,kCAAkC;YA1FzC,AADF,8BAA8B,aACH;YAiBrB,AAhBF,uGAAe,+EAgByB;YAQ5C,AADE,iBAAM,EACF;;YAxBF,eAsBC;YAtBD,0EAsBC;;;iFAmEI,kCAAkC;cA/F9C,SAAS;6BACI,KAAK,YACP,gCAAgC,YAChC;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BT;;kBAiEA,KAAK;;kBAGL,KAAK;;kBAOL,KAAK;;kBAGL,KAAK;;kBAcL,KAAK;;kBAOL,KAAK;;kBAGL,KAAK;;kBASL,KAAK;;kBAGL,KAAK;;kBASL,KAAK;;kBAGL,KAAK;;kBAaL,KAAK;;kBAGL,KAAK;;kFA9EK,kCAAkC","sourcesContent":["import { Component, Input, OnInit, ChangeDetectorRef } from '@angular/core';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport { BaseEntity, CompositeKey, RunView, UserInfo } from '@memberjunction/core';\nimport { RatingJSON, UserInfoEngine } from '@memberjunction/core-entities';\nimport { DialogService } from '../../services/dialog.service';\n\nconst FEEDBACK_CONSENT_KEY = 'agent-feedback-share-consent';\nconst CONVERSATIONS_RESOURCE_TYPE_ID = '81D4BC3D-9FEB-EF11-B01A-286B35C04427';\nconst FEEDBACK_ROLE_IDS = [\n 'deafccec-6a37-ef11-86d4-000d3a4e707e', // Developer\n 'dfafccec-6a37-ef11-86d4-000d3a4e707e' // Integration\n];\n\n/** Minimal shape we use against the loaded entity. All MJ entity subclasses\n * implement `Load(ID)` via codegen but the base `BaseEntity<unknown>` type\n * doesn't expose it, so we narrow here to keep the call generic across\n * entity names without resorting to `any`. */\ntype LoadableEntity = BaseEntity<unknown> & {\n Load(KeyValuePairs: CompositeKey | string, EntityRelationshipsToLoad?: string[]): Promise<boolean>;\n};\n\n/**\n * Single-rating-per-message rating UI for an AI conversation response.\n *\n * Storage model: the rating + free-form comment live directly on the\n * ConversationDetail row, in `UserRating` (1-10, nullable) and `UserFeedback`\n * (nvarchar(max), nullable). This matches MJ's own pattern on\n * `__mj.ConversationDetail` and Skip's matching columns on\n * `Skip.ConversationDetail`. The host app picks the entity via @Input.\n */\n@Component({\n standalone: false,\n selector: 'mj-conversation-message-rating',\n template: `\n <div class=\"rating-container\">\n <div class=\"user-rating\">\n @if (canEdit) {\n <button\n class=\"rating-button\"\n [class.has-rated]=\"currentUserRating != null\"\n [disabled]=\"isSaving\"\n (click)=\"OpenRatingDialog()\"\n [title]=\"currentUserRating != null ? 'Edit your rating' : 'Rate this response'\"\n type=\"button\">\n @if (currentUserRating != null) {\n <i class=\"fa-solid fa-pen-to-square\"></i>\n <span class=\"my-rating\">My rating: {{ currentUserRating }}/10</span>\n } @else {\n <i class=\"fa-regular fa-comment-dots\"></i>\n <span>Rate response</span>\n }\n </button>\n } @else if (currentUserRating != null) {\n <span class=\"rating-readonly\"\n title=\"Rating left by the conversation owner — read-only\">\n <i class=\"fa-solid fa-comment-dots\"></i>\n <span>Rated {{ currentUserRating }}/10</span>\n </span>\n }\n </div>\n </div>\n `,\n styles: [`\n .rating-container {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 4px 0;\n }\n\n .user-rating {\n display: flex;\n gap: 4px;\n margin-left: auto;\n }\n\n .rating-button {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-strong);\n border-radius: 6px;\n padding: 6px 12px;\n cursor: pointer;\n font-size: 13px;\n color: var(--mj-text-primary);\n opacity: 0.85;\n transition: all 0.15s ease;\n }\n\n .rating-button:hover:not(:disabled) {\n opacity: 1;\n border-color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 6%, var(--mj-bg-surface));\n }\n\n .rating-button:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n }\n\n .rating-button.has-rated {\n border-color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, var(--mj-bg-surface));\n }\n\n .my-rating {\n font-weight: 500;\n }\n\n .rating-readonly {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 4px 10px;\n border: 1px solid var(--mj-border-default);\n border-radius: 6px;\n font-size: 12px;\n color: var(--mj-text-secondary);\n background: var(--mj-bg-surface-sunken);\n cursor: default;\n }\n `]\n})\nexport class ConversationMessageRatingComponent extends BaseAngularComponent implements OnInit {\n @Input() ConversationDetailId!: string;\n\n /** @deprecated Use {@link ConversationDetailId}. */\n @Input() set conversationDetailId(value: string) {\n this.ConversationDetailId = value;\n }\n /** @deprecated Use {@link ConversationDetailId}. */\n get conversationDetailId(): string {\n return this.ConversationDetailId;\n }\n @Input() CurrentUser!: UserInfo;\n\n /** @deprecated Use {@link CurrentUser}. */\n @Input() set currentUser(value: UserInfo) {\n this.CurrentUser = value;\n }\n /** @deprecated Use {@link CurrentUser}. */\n get currentUser(): UserInfo {\n return this.CurrentUser;\n }\n\n /**\n * When false, the rating UI renders as a read-only badge instead of an editable\n * button. Set by the parent (MessageItemComponent) to `false` when the current\n * user is not the conversation owner — the rating storage is a single field on\n * the ConversationDetail row, so only the owner is allowed to mutate it.\n */\n @Input() canEdit: boolean = true;\n\n /**\n * Entity name to load/update for the rating. Defaults to MJ's\n * `MJ: Conversation Details` (which has `UserRating`/`UserFeedback`).\n * Skip-Brain hosts pass `'Conversation Details__Skip'`.\n */\n @Input() RatingEntityName: string = 'MJ: Conversation Details';\n\n /** @deprecated Use {@link RatingEntityName}. */\n @Input() set ratingEntityName(value: string) {\n this.RatingEntityName = value;\n }\n /** @deprecated Use {@link RatingEntityName}. */\n get ratingEntityName(): string {\n return this.RatingEntityName;\n }\n\n /** Column on the entity that stores the 1-10 rating. */\n @Input() RatingField: string = 'UserRating';\n\n /** @deprecated Use {@link RatingField}. */\n @Input() set ratingField(value: string) {\n this.RatingField = value;\n }\n /** @deprecated Use {@link RatingField}. */\n get ratingField(): string {\n return this.RatingField;\n }\n\n /** Column on the entity that stores the free-form feedback. */\n @Input() RatingCommentField: string = 'UserFeedback';\n\n /** @deprecated Use {@link RatingCommentField}. */\n @Input() set ratingCommentField(value: string) {\n this.RatingCommentField = value;\n }\n /** @deprecated Use {@link RatingCommentField}. */\n get ratingCommentField(): string {\n return this.RatingCommentField;\n }\n\n /**\n * Optional: legacy pre-loaded ratings array (no longer used by storage; kept\n * to preserve the input shape used by existing call sites like\n * MessageItemComponent).\n */\n @Input() RatingsData?: RatingJSON[];\n\n /** @deprecated Use {@link RatingsData}. */\n @Input() set ratingsData(value: RatingJSON[] | undefined) {\n this.RatingsData = value;\n }\n /** @deprecated Use {@link RatingsData}. */\n get ratingsData(): RatingJSON[] | undefined {\n return this.RatingsData;\n }\n\n CurrentUserRating: number | null = null;\n\n /** @deprecated Use {@link CurrentUserRating}. */\n get currentUserRating(): number | null {\n return this.CurrentUserRating;\n }\n /** @deprecated Use {@link CurrentUserRating}. */\n set currentUserRating(value: number | null) {\n this.CurrentUserRating = value;\n }\n CurrentUserComments: string = '';\n\n /** @deprecated Use {@link CurrentUserComments}. */\n get currentUserComments(): string {\n return this.CurrentUserComments;\n }\n /** @deprecated Use {@link CurrentUserComments}. */\n set currentUserComments(value: string) {\n this.CurrentUserComments = value;\n }\n IsSaving = false;\n\n /** @deprecated Use {@link IsSaving}. */\n get isSaving() {\n return this.IsSaving;\n }\n /** @deprecated Use {@link IsSaving}. */\n set isSaving(value) {\n this.IsSaving = value;\n }\n\n constructor(\n private cdr: ChangeDetectorRef,\n private dialogService: DialogService\n ) {\n super();\n }\n\n async ngOnInit() {\n await this.loadRating();\n }\n\n async OpenRatingDialog(): Promise<void> {\n if (this.IsSaving) return;\n if (!this.canEdit) return;\n\n let consentAcknowledged = false;\n try {\n await UserInfoEngine.Instance.Config();\n consentAcknowledged = UserInfoEngine.Instance.GetSetting(FEEDBACK_CONSENT_KEY) === 'true';\n } catch (e) {\n console.warn('[Rating] Could not read consent flag, will require acknowledgement', e);\n }\n\n const result = await this.dialogService.rating({\n title: this.CurrentUserRating != null ? 'Edit your rating' : 'Rate this response',\n message: 'Rate the response on a 1-10 scale and (optionally) describe what was good or bad.',\n initialRating: this.CurrentUserRating,\n initialComments: this.CurrentUserComments,\n okText: 'Submit',\n requireConsent: !consentAcknowledged\n });\n\n if (result == null) return;\n\n const conversationID = await this.saveRating(result.rating, result.comments);\n\n if (result.consentNewlyAcknowledged) {\n try {\n const saved = await UserInfoEngine.Instance.SetSetting(FEEDBACK_CONSENT_KEY, 'true');\n if (!saved) {\n console.error(\n `[Rating] Failed to persist consent acknowledgement under key \"${FEEDBACK_CONSENT_KEY}\" — ` +\n `the dialog will re-prompt on next rating. Likely cause: the current user lacks ` +\n `create/update permission on the \"MJ: User Settings\" entity.`\n );\n }\n } catch (e) {\n console.error('[Rating] Could not persist consent flag', e);\n }\n }\n\n if (conversationID) {\n await this.grantConversationAccess(conversationID);\n }\n }\n\n /**\n * Grants the Integrations and Developer roles View access to the parent\n * Conversation via `MJ: Resource Permissions`. Idempotent — existing\n * permissions for the same role are not duplicated. Best-effort; any error\n * is logged but does not roll back the rating itself.\n */\n private async grantConversationAccess(conversationID: string): Promise<void> {\n try {\n const md = this.ProviderToUse;\n const rv = RunView.FromMetadataProvider(md);\n const existing = await rv.RunView({\n EntityName: 'MJ: Resource Permissions',\n ExtraFilter:\n `ResourceTypeID='${CONVERSATIONS_RESOURCE_TYPE_ID}' AND ` +\n `ResourceRecordID='${conversationID}' AND Type='Role' AND ` +\n `RoleID IN ('${FEEDBACK_ROLE_IDS.join(\"','\")}')`\n });\n\n const granted = new Set<string>(\n (existing.Results || []).map((r: any) => (r.RoleID || '').toLowerCase())\n );\n\n for (const roleID of FEEDBACK_ROLE_IDS) {\n if (granted.has(roleID.toLowerCase())) continue;\n const perm = await md.GetEntityObject('MJ: Resource Permissions');\n perm.NewRecord();\n perm.Set('ResourceTypeID', CONVERSATIONS_RESOURCE_TYPE_ID);\n perm.Set('ResourceRecordID', conversationID);\n perm.Set('Type', 'Role');\n perm.Set('RoleID', roleID);\n perm.Set('PermissionLevel', 'View');\n perm.Set('Status', 'Approved');\n const ok = await perm.Save();\n if (!ok) {\n console.warn('[Rating] Failed to create ResourcePermission for role', roleID, (perm as any).LatestResult);\n }\n }\n } catch (e) {\n console.warn('[Rating] grantConversationAccess failed:', e);\n }\n }\n\n private async loadRating(): Promise<void> {\n if (!this.ConversationDetailId) return;\n try {\n const md = this.ProviderToUse;\n const entity = (await md.GetEntityObject(this.RatingEntityName)) as LoadableEntity;\n const loaded = await entity.Load(this.ConversationDetailId);\n if (loaded) {\n const rating = entity.Get(this.RatingField);\n this.CurrentUserRating = rating != null ? Number(rating) : null;\n this.CurrentUserComments = (entity.Get(this.RatingCommentField) ?? '') as string;\n this.cdr.detectChanges();\n }\n } catch (error) {\n // Silently swallow — message may not be persisted yet, or entity lookup failed.\n console.warn('[ConversationMessageRating] Could not load existing rating:', error);\n }\n }\n\n private async saveRating(rating: number, comments: string): Promise<string | null> {\n if (this.IsSaving) return null;\n if (rating < 1 || rating > 10) return null;\n if (!this.ConversationDetailId) return null;\n\n const prevRating = this.CurrentUserRating;\n const prevComments = this.CurrentUserComments;\n\n this.IsSaving = true;\n this.CurrentUserRating = rating;\n this.CurrentUserComments = comments;\n this.cdr.detectChanges();\n\n try {\n const md = this.ProviderToUse;\n const entity = (await md.GetEntityObject(this.RatingEntityName)) as LoadableEntity;\n const loaded = await entity.Load(this.ConversationDetailId);\n if (!loaded) {\n throw new Error(`ConversationDetail ${this.ConversationDetailId} not found in ${this.RatingEntityName}`);\n }\n entity.Set(this.RatingField, rating);\n entity.Set(this.RatingCommentField, comments || null);\n const saveResult = await entity.Save();\n if (!saveResult) {\n throw new Error(`Save failed: ${(entity as any).LatestResult?.Message ?? 'unknown'}`);\n }\n const conversationID = entity.Get('ConversationID');\n return typeof conversationID === 'string' ? conversationID : null;\n } catch (error) {\n console.error('[Rating] save failed:', error);\n this.CurrentUserRating = prevRating;\n this.CurrentUserComments = prevComments;\n this.cdr.detectChanges();\n return null;\n } finally {\n this.IsSaving = false;\n this.cdr.detectChanges();\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"conversation-message-rating.component.js","sourceRoot":"","sources":["../../../../src/lib/components/message/conversation-message-rating.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAA6B,MAAM,eAAe,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAA4B,OAAO,EAAY,MAAM,sBAAsB,CAAC;AACnF,OAAO,EAAc,cAAc,EAAE,MAAM,+BAA+B,CAAC;;;;IA2C7D,uBAAyC;IACzC,+BAAwB;IAAA,YAAqC;IAAA,iBAAO;;;IAA5C,eAAqC;IAArC,qEAAqC;;;IAE7D,uBAA6D;IAC7D,+BAAyB;IAAA,6BAAa;IAAA,iBAAO;;;;IAbjD,iCAOgB;IAHd,sMAAS,yBAAkB,KAAC;IAO1B,AAHF,wGAAiC,kFAGxB;IAIX,iBAAS;;;IAbP,6DAA6C;IAG7C,AAFA,0CAAqB,uFAE0D;;IAG/E,cAMC;IAND,0DAMC;;;IAGH,+BACgE;IAC9D,uBAAwC;IACxC,4BAAM;IAAA,YAAgC;IACxC,AADwC,iBAAO,EACxC;;;IADC,eAAgC;IAAhC,gEAAgC;;AAnDlD,MAAM,oBAAoB,GAAG,8BAA8B,CAAC;AAC5D,MAAM,8BAA8B,GAAG,sCAAsC,CAAC;AAC9E,MAAM,iBAAiB,GAAG;IACxB,sCAAsC,EAAE,YAAY;IACpD,sCAAsC,CAAE,cAAc;CACvD,CAAC;AAUF;;;;;;;;GAQG;AAwGH,MAAM,OAAO,kCAAmC,SAAQ,oBAAoB;IAsHhE;IACA;IAtHD,oBAAoB,CAAU;IAEvC,oDAAoD;IACpD,IAAa,oBAAoB,CAAC,KAAa;QAC7C,IAAI,CAAC,oB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I,SAAS,EAAE,CAAC,CAAC;YACxF,CAAC;YACD,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;YACpD,OAAO,OAAO,cAAc,KAAK,QAAQ,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC;QACpE,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,uBAAuB,EAAE,KAAK,CAAC,CAAC;YAC9C,IAAI,CAAC,iBAAiB,GAAG,UAAU,CAAC;YACpC,IAAI,CAAC,mBAAmB,GAAG,YAAY,CAAC;YACxC,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;YACzB,OAAO,IAAI,CAAC;QACd,CAAC;gBAAS,CAAC;YACT,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;YACtB,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;QAC3B,CAAC;IACH,CAAC;4HA/QU,kCAAkC;6DAAlC,kCAAkC;YAlGzC,AADF,8BAA8B,aACH;YAkBrB,AAjBF,uGAAe,+EAiByB;YAQ5C,AADE,iBAAM,EACF;;YAzBF,eAuBC;YAvBD,0EAuBC;;;iFA0EI,kCAAkC;cAvG9C,SAAS;6BACI,KAAK,YACP,gCAAgC,YAChC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BT;;kBAwEA,KAAK;;kBAGL,KAAK;;kBAOL,KAAK;;kBAGL,KAAK;;kBAcL,KAAK;;kBAOL,KAAK;;kBAGL,KAAK;;kBASL,KAAK;;kBAGL,KAAK;;kBASL,KAAK;;kBAGL,KAAK;;kBAaL,KAAK;;kBAGL,KAAK;;kFA9EK,kCAAkC","sourcesContent":["import { Component, Input, OnInit, ChangeDetectorRef } from '@angular/core';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport { BaseEntity, CompositeKey, RunView, UserInfo } from '@memberjunction/core';\nimport { RatingJSON, UserInfoEngine } from '@memberjunction/core-entities';\nimport { DialogService } from '../../services/dialog.service';\n\nconst FEEDBACK_CONSENT_KEY = 'agent-feedback-share-consent';\nconst CONVERSATIONS_RESOURCE_TYPE_ID = '81D4BC3D-9FEB-EF11-B01A-286B35C04427';\nconst FEEDBACK_ROLE_IDS = [\n 'deafccec-6a37-ef11-86d4-000d3a4e707e', // Developer\n 'dfafccec-6a37-ef11-86d4-000d3a4e707e' // Integration\n];\n\n/** Minimal shape we use against the loaded entity. All MJ entity subclasses\n * implement `Load(ID)` via codegen but the base `BaseEntity<unknown>` type\n * doesn't expose it, so we narrow here to keep the call generic across\n * entity names without resorting to `any`. */\ntype LoadableEntity = BaseEntity<unknown> & {\n Load(KeyValuePairs: CompositeKey | string, EntityRelationshipsToLoad?: string[]): Promise<boolean>;\n};\n\n/**\n * Single-rating-per-message rating UI for an AI conversation response.\n *\n * Storage model: the rating + free-form comment live directly on the\n * ConversationDetail row, in `UserRating` (1-10, nullable) and `UserFeedback`\n * (nvarchar(max), nullable). This matches MJ's own pattern on\n * `__mj.ConversationDetail` and Skip's matching columns on\n * `Skip.ConversationDetail`. The host app picks the entity via @Input.\n */\n@Component({\n standalone: false,\n selector: 'mj-conversation-message-rating',\n template: `\n <div class=\"rating-container\">\n <div class=\"user-rating\">\n @if (canEdit) {\n <button\n class=\"rating-button\"\n [class.has-rated]=\"currentUserRating != null\"\n [disabled]=\"isSaving\"\n (click)=\"OpenRatingDialog()\"\n [title]=\"currentUserRating != null ? 'Edit your rating' : 'Rate this response'\"\n [attr.aria-label]=\"currentUserRating != null ? null : 'Rate response'\"\n type=\"button\">\n @if (currentUserRating != null) {\n <i class=\"fa-solid fa-pen-to-square\"></i>\n <span class=\"my-rating\">My rating: {{ currentUserRating }}/10</span>\n } @else {\n <i class=\"fa-regular fa-comment-dots\" aria-hidden=\"true\"></i>\n <span class=\"rate-label\">Rate response</span>\n }\n </button>\n } @else if (currentUserRating != null) {\n <span class=\"rating-readonly\"\n title=\"Rating left by the conversation owner — read-only\">\n <i class=\"fa-solid fa-comment-dots\"></i>\n <span>Rated {{ currentUserRating }}/10</span>\n </span>\n }\n </div>\n </div>\n `,\n styles: [`\n .rating-container {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 4px 0;\n }\n\n .user-rating {\n display: flex;\n gap: 4px;\n margin-left: auto;\n }\n\n .rating-button {\n display: inline-flex;\n align-items: center;\n gap: var(--mj-space-2);\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-strong);\n border-radius: 6px;\n padding: 6px 12px;\n cursor: pointer;\n font-size: 13px;\n color: var(--mj-text-primary);\n opacity: 0.85;\n transition: all 0.15s ease;\n }\n\n .rating-button:hover:not(:disabled) {\n opacity: 1;\n border-color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 6%, var(--mj-bg-surface));\n }\n\n .rating-button:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n }\n\n .rating-button.has-rated {\n border-color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, var(--mj-bg-surface));\n }\n\n .my-rating {\n font-weight: 500;\n }\n\n /* Phones: \"Rate response\" collapses to its icon */\n @media (max-width: 768px) {\n .rate-label {\n display: none;\n }\n }\n\n .rating-readonly {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 4px 10px;\n border: 1px solid var(--mj-border-default);\n border-radius: 6px;\n font-size: 12px;\n color: var(--mj-text-secondary);\n background: var(--mj-bg-surface-sunken);\n cursor: default;\n }\n `]\n})\nexport class ConversationMessageRatingComponent extends BaseAngularComponent implements OnInit {\n @Input() ConversationDetailId!: string;\n\n /** @deprecated Use {@link ConversationDetailId}. */\n @Input() set conversationDetailId(value: string) {\n this.ConversationDetailId = value;\n }\n /** @deprecated Use {@link ConversationDetailId}. */\n get conversationDetailId(): string {\n return this.ConversationDetailId;\n }\n @Input() CurrentUser!: UserInfo;\n\n /** @deprecated Use {@link CurrentUser}. */\n @Input() set currentUser(value: UserInfo) {\n this.CurrentUser = value;\n }\n /** @deprecated Use {@link CurrentUser}. */\n get currentUser(): UserInfo {\n return this.CurrentUser;\n }\n\n /**\n * When false, the rating UI renders as a read-only badge instead of an editable\n * button. Set by the parent (MessageItemComponent) to `false` when the current\n * user is not the conversation owner — the rating storage is a single field on\n * the ConversationDetail row, so only the owner is allowed to mutate it.\n */\n @Input() canEdit: boolean = true;\n\n /**\n * Entity name to load/update for the rating. Defaults to MJ's\n * `MJ: Conversation Details` (which has `UserRating`/`UserFeedback`).\n * Skip-Brain hosts pass `'Conversation Details__Skip'`.\n */\n @Input() RatingEntityName: string = 'MJ: Conversation Details';\n\n /** @deprecated Use {@link RatingEntityName}. */\n @Input() set ratingEntityName(value: string) {\n this.RatingEntityName = value;\n }\n /** @deprecated Use {@link RatingEntityName}. */\n get ratingEntityName(): string {\n return this.RatingEntityName;\n }\n\n /** Column on the entity that stores the 1-10 rating. */\n @Input() RatingField: string = 'UserRating';\n\n /** @deprecated Use {@link RatingField}. */\n @Input() set ratingField(value: string) {\n this.RatingField = value;\n }\n /** @deprecated Use {@link RatingField}. */\n get ratingField(): string {\n return this.RatingField;\n }\n\n /** Column on the entity that stores the free-form feedback. */\n @Input() RatingCommentField: string = 'UserFeedback';\n\n /** @deprecated Use {@link RatingCommentField}. */\n @Input() set ratingCommentField(value: string) {\n this.RatingCommentField = value;\n }\n /** @deprecated Use {@link RatingCommentField}. */\n get ratingCommentField(): string {\n return this.RatingCommentField;\n }\n\n /**\n * Optional: legacy pre-loaded ratings array (no longer used by storage; kept\n * to preserve the input shape used by existing call sites like\n * MessageItemComponent).\n */\n @Input() RatingsData?: RatingJSON[];\n\n /** @deprecated Use {@link RatingsData}. */\n @Input() set ratingsData(value: RatingJSON[] | undefined) {\n this.RatingsData = value;\n }\n /** @deprecated Use {@link RatingsData}. */\n get ratingsData(): RatingJSON[] | undefined {\n return this.RatingsData;\n }\n\n CurrentUserRating: number | null = null;\n\n /** @deprecated Use {@link CurrentUserRating}. */\n get currentUserRating(): number | null {\n return this.CurrentUserRating;\n }\n /** @deprecated Use {@link CurrentUserRating}. */\n set currentUserRating(value: number | null) {\n this.CurrentUserRating = value;\n }\n CurrentUserComments: string = '';\n\n /** @deprecated Use {@link CurrentUserComments}. */\n get currentUserComments(): string {\n return this.CurrentUserComments;\n }\n /** @deprecated Use {@link CurrentUserComments}. */\n set currentUserComments(value: string) {\n this.CurrentUserComments = value;\n }\n IsSaving = false;\n\n /** @deprecated Use {@link IsSaving}. */\n get isSaving() {\n return this.IsSaving;\n }\n /** @deprecated Use {@link IsSaving}. */\n set isSaving(value) {\n this.IsSaving = value;\n }\n\n constructor(\n private cdr: ChangeDetectorRef,\n private dialogService: DialogService\n ) {\n super();\n }\n\n async ngOnInit() {\n await this.loadRating();\n }\n\n async OpenRatingDialog(): Promise<void> {\n if (this.IsSaving) return;\n if (!this.canEdit) return;\n\n let consentAcknowledged = false;\n try {\n await UserInfoEngine.Instance.Config();\n consentAcknowledged = UserInfoEngine.Instance.GetSetting(FEEDBACK_CONSENT_KEY) === 'true';\n } catch (e) {\n console.warn('[Rating] Could not read consent flag, will require acknowledgement', e);\n }\n\n const result = await this.dialogService.rating({\n title: this.CurrentUserRating != null ? 'Edit your rating' : 'Rate this response',\n message: 'Rate the response on a 1-10 scale and (optionally) describe what was good or bad.',\n initialRating: this.CurrentUserRating,\n initialComments: this.CurrentUserComments,\n okText: 'Submit',\n requireConsent: !consentAcknowledged\n });\n\n if (result == null) return;\n\n const conversationID = await this.saveRating(result.rating, result.comments);\n\n if (result.consentNewlyAcknowledged) {\n try {\n const saved = await UserInfoEngine.Instance.SetSetting(FEEDBACK_CONSENT_KEY, 'true');\n if (!saved) {\n console.error(\n `[Rating] Failed to persist consent acknowledgement under key \"${FEEDBACK_CONSENT_KEY}\" — ` +\n `the dialog will re-prompt on next rating. Likely cause: the current user lacks ` +\n `create/update permission on the \"MJ: User Settings\" entity.`\n );\n }\n } catch (e) {\n console.error('[Rating] Could not persist consent flag', e);\n }\n }\n\n if (conversationID) {\n await this.grantConversationAccess(conversationID);\n }\n }\n\n /**\n * Grants the Integrations and Developer roles View access to the parent\n * Conversation via `MJ: Resource Permissions`. Idempotent — existing\n * permissions for the same role are not duplicated. Best-effort; any error\n * is logged but does not roll back the rating itself.\n */\n private async grantConversationAccess(conversationID: string): Promise<void> {\n try {\n const md = this.ProviderToUse;\n const rv = RunView.FromMetadataProvider(md);\n const existing = await rv.RunView({\n EntityName: 'MJ: Resource Permissions',\n ExtraFilter:\n `ResourceTypeID='${CONVERSATIONS_RESOURCE_TYPE_ID}' AND ` +\n `ResourceRecordID='${conversationID}' AND Type='Role' AND ` +\n `RoleID IN ('${FEEDBACK_ROLE_IDS.join(\"','\")}')`\n });\n\n const granted = new Set<string>(\n (existing.Results || []).map((r: any) => (r.RoleID || '').toLowerCase())\n );\n\n for (const roleID of FEEDBACK_ROLE_IDS) {\n if (granted.has(roleID.toLowerCase())) continue;\n const perm = await md.GetEntityObject('MJ: Resource Permissions');\n perm.NewRecord();\n perm.Set('ResourceTypeID', CONVERSATIONS_RESOURCE_TYPE_ID);\n perm.Set('ResourceRecordID', conversationID);\n perm.Set('Type', 'Role');\n perm.Set('RoleID', roleID);\n perm.Set('PermissionLevel', 'View');\n perm.Set('Status', 'Approved');\n const ok = await perm.Save();\n if (!ok) {\n console.warn('[Rating] Failed to create ResourcePermission for role', roleID, (perm as any).LatestResult);\n }\n }\n } catch (e) {\n console.warn('[Rating] grantConversationAccess failed:', e);\n }\n }\n\n private async loadRating(): Promise<void> {\n if (!this.ConversationDetailId) return;\n try {\n const md = this.ProviderToUse;\n const entity = (await md.GetEntityObject(this.RatingEntityName)) as LoadableEntity;\n const loaded = await entity.Load(this.ConversationDetailId);\n if (loaded) {\n const rating = entity.Get(this.RatingField);\n this.CurrentUserRating = rating != null ? Number(rating) : null;\n this.CurrentUserComments = (entity.Get(this.RatingCommentField) ?? '') as string;\n this.cdr.detectChanges();\n }\n } catch (error) {\n // Silently swallow — message may not be persisted yet, or entity lookup failed.\n console.warn('[ConversationMessageRating] Could not load existing rating:', error);\n }\n }\n\n private async saveRating(rating: number, comments: string): Promise<string | null> {\n if (this.IsSaving) return null;\n if (rating < 1 || rating > 10) return null;\n if (!this.ConversationDetailId) return null;\n\n const prevRating = this.CurrentUserRating;\n const prevComments = this.CurrentUserComments;\n\n this.IsSaving = true;\n this.CurrentUserRating = rating;\n this.CurrentUserComments = comments;\n this.cdr.detectChanges();\n\n try {\n const md = this.ProviderToUse;\n const entity = (await md.GetEntityObject(this.RatingEntityName)) as LoadableEntity;\n const loaded = await entity.Load(this.ConversationDetailId);\n if (!loaded) {\n throw new Error(`ConversationDetail ${this.ConversationDetailId} not found in ${this.RatingEntityName}`);\n }\n entity.Set(this.RatingField, rating);\n entity.Set(this.RatingCommentField, comments || null);\n const saveResult = await entity.Save();\n if (!saveResult) {\n throw new Error(`Save failed: ${(entity as any).LatestResult?.Message ?? 'unknown'}`);\n }\n const conversationID = entity.Get('ConversationID');\n return typeof conversationID === 'string' ? conversationID : null;\n } catch (error) {\n console.error('[Rating] save failed:', error);\n this.CurrentUserRating = prevRating;\n this.CurrentUserComments = prevComments;\n this.cdr.detectChanges();\n return null;\n } finally {\n this.IsSaving = false;\n this.cdr.detectChanges();\n }\n }\n}\n"]}
|
|
@@ -14,7 +14,7 @@ import { DataCacheService } from '../../services/data-cache.service';
|
|
|
14
14
|
import { ActiveTasksService } from '../../services/active-tasks.service';
|
|
15
15
|
import { ConversationStreamingService } from '../../services/conversation-streaming.service';
|
|
16
16
|
import { ExecuteAgentResult } from '@memberjunction/ai-core-plus';
|
|
17
|
-
import { PendingAttachment } from '@memberjunction/ng-composer';
|
|
17
|
+
import { PendingAttachment, SendSlotMode } from '@memberjunction/ng-composer';
|
|
18
18
|
import { AiComposerComponent } from '../composer/ai-composer.component';
|
|
19
19
|
import { MentionParserService } from '../../services/mention-parser.service';
|
|
20
20
|
import { ConversationAttachmentService } from '../../services/conversation-attachment.service';
|
|
@@ -59,6 +59,16 @@ export declare class MessageInputComponent extends BaseAngularComponent implemen
|
|
|
59
59
|
* Blocks sending. Distinct from {@link Disabled}, which means the composer is busy.
|
|
60
60
|
*/
|
|
61
61
|
ReadOnly: boolean;
|
|
62
|
+
/** What the send slot is doing; see `SendSlotMode` in `@memberjunction/ng-composer`. */
|
|
63
|
+
SendSlotMode: SendSlotMode;
|
|
64
|
+
/** How many things a stop would stop; above 1 the slot reads "Stop all". */
|
|
65
|
+
StopCount: number;
|
|
66
|
+
/** Tooltip and accessible name of the slot in `stop` mode. */
|
|
67
|
+
StopLabel: string;
|
|
68
|
+
/** Status line shown bottom-left inside the composer while non-null. */
|
|
69
|
+
StatusText: string | null;
|
|
70
|
+
/** Elapsed time after the status text, kept out of the live region and dropped on narrow screens. */
|
|
71
|
+
StatusElapsed: string | null;
|
|
62
72
|
Placeholder: string;
|
|
63
73
|
/** @deprecated Use {@link Placeholder}. */
|
|
64
74
|
set placeholder(value: string);
|
|
@@ -303,6 +313,16 @@ export declare class MessageInputComponent extends BaseAngularComponent implemen
|
|
|
303
313
|
* reading past the floor). Null (the default) reads the whole conversation.
|
|
304
314
|
*/
|
|
305
315
|
AgentHistoryFrom: Date | null;
|
|
316
|
+
/**
|
|
317
|
+
* The fork new messages from this composer go to; null (the default) is Main. The agent turn of a
|
|
318
|
+
* message, and the agent-history reads it makes, use the message's branch.
|
|
319
|
+
*/
|
|
320
|
+
TargetBranchID: string | null;
|
|
321
|
+
/**
|
|
322
|
+
* When set, called once at the start of each send to get the branch of the new user row; undefined
|
|
323
|
+
* stops the send and nothing is written. A host uses it to create a draft fork on its first send.
|
|
324
|
+
*/
|
|
325
|
+
ResolveTargetBranch: (() => Promise<string | null | undefined>) | null;
|
|
306
326
|
/**
|
|
307
327
|
* Runs agent turns on the host's server instead of MJ's own path. The chat area still picks
|
|
308
328
|
* the agent and fires {@link BeforeAgentTurn}; it then calls the handler once per turn, before
|
|
@@ -330,6 +350,8 @@ export declare class MessageInputComponent extends BaseAngularComponent implemen
|
|
|
330
350
|
* `MJ: AI Prompt Runs` row, even when the answer comes too late to be used.
|
|
331
351
|
*/
|
|
332
352
|
EnableDecisionRouting: boolean;
|
|
353
|
+
/** The send slot was clicked in `stop` mode; the chat area stops the run(s). */
|
|
354
|
+
StopClicked: EventEmitter<void>;
|
|
333
355
|
MessageSent: EventEmitter<MJConversationDetailEntity>;
|
|
334
356
|
/**
|
|
335
357
|
* @deprecated Use {@link MessageSent}.
|
|
@@ -339,6 +361,14 @@ export declare class MessageInputComponent extends BaseAngularComponent implemen
|
|
|
339
361
|
* initialise in order, and the other way round this captures undefined.
|
|
340
362
|
*/
|
|
341
363
|
messageSent: EventEmitter<MJConversationDetailEntity>;
|
|
364
|
+
/**
|
|
365
|
+
* A streamed final-response delta was applied to an in-progress message: `Message` holds the
|
|
366
|
+
* full reply so far. Informational, so no Before/After pair; coalesced to at most one emission
|
|
367
|
+
* per animation frame; silent once the message has settled, because the completion path owns
|
|
368
|
+
* the final render. Hosts refresh the bubble in place on this, while {@link MessageSent} keeps
|
|
369
|
+
* announcing new and status-changed messages.
|
|
370
|
+
*/
|
|
371
|
+
MessageStreamed: EventEmitter<MJConversationDetailEntity>;
|
|
342
372
|
AgentResponse: EventEmitter<{
|
|
343
373
|
message: MJConversationDetailEntity;
|
|
344
374
|
agentResult: any;
|
|
@@ -642,6 +672,11 @@ export declare class MessageInputComponent extends BaseAngularComponent implemen
|
|
|
642
672
|
*/
|
|
643
673
|
private scheduleFocusReassert;
|
|
644
674
|
SetDraft(text: string, focus?: boolean): void;
|
|
675
|
+
/**
|
|
676
|
+
* Puts the text of a send that did not go out back into the composer. Text the composer holds
|
|
677
|
+
* already stays first, and the returned text follows it on a new line.
|
|
678
|
+
*/
|
|
679
|
+
private restoreUnsentText;
|
|
645
680
|
IsSending: boolean;
|
|
646
681
|
/** @deprecated Use {@link IsSending}. */
|
|
647
682
|
get isSending(): boolean;
|
|
@@ -673,6 +708,7 @@ export declare class MessageInputComponent extends BaseAngularComponent implemen
|
|
|
673
708
|
/** @deprecated Use {@link ConverationManagerAgent}. */
|
|
674
709
|
set converationManagerAgent(value: MJAIAgentEntityExtended | null);
|
|
675
710
|
private completionTimestamps;
|
|
711
|
+
private readonly ngZone;
|
|
676
712
|
private registeredCallbacks;
|
|
677
713
|
private static readonly IN_FLIGHT_WATCH_BACKOFF_MS;
|
|
678
714
|
private inFlightWatches;
|
|
@@ -840,7 +876,7 @@ export declare class MessageInputComponent extends BaseAngularComponent implemen
|
|
|
840
876
|
onRealtimeOptions(): Promise<void>;
|
|
841
877
|
/** Loads the persisted co-agent preference, then shows the picker (pref preselected). */
|
|
842
878
|
private openRealtimeAgentPicker;
|
|
843
|
-
/** User confirmed an agent (+ optional co-agent / voice model) in the voice picker — start the call. */
|
|
879
|
+
/** User confirmed an agent (+ optional co-agent / voice model / voice and its avatar) in the voice picker — start the call. */
|
|
844
880
|
OnRealtimeAgentPicked(pick: RealtimeAgentPick): Promise<void>;
|
|
845
881
|
/** @deprecated Use {@link OnRealtimeAgentPicked}. */
|
|
846
882
|
onRealtimeAgentPicked(pick: RealtimeAgentPick): Promise<void>;
|
|
@@ -874,7 +910,7 @@ export declare class MessageInputComponent extends BaseAngularComponent implemen
|
|
|
874
910
|
* uses exactly that model or fails with a clear reason (no silent fallback) — and is
|
|
875
911
|
* mirrored into `configOverridesJson` (`{"realtime":{"modelPreference":…}}`, the
|
|
876
912
|
* pinned override envelope). An explicit co-agent choice (picker pick or persisted
|
|
877
|
-
* preference) rides along as `coAgentId`.
|
|
913
|
+
* preference) rides along as `coAgentId`. The session runs on {@link TargetBranchID}.
|
|
878
914
|
*
|
|
879
915
|
* Interactive-channel tools (e.g. the live whiteboard's `Whiteboard_*` set) are NOT
|
|
880
916
|
* passed here — the session service resolves the active channel plugins from the
|
|
@@ -900,6 +936,22 @@ export declare class MessageInputComponent extends BaseAngularComponent implemen
|
|
|
900
936
|
* Create a progress callback for a specific message ID.
|
|
901
937
|
* This callback will be invoked by the streaming service when progress updates arrive.
|
|
902
938
|
*/
|
|
939
|
+
/**
|
|
940
|
+
* Emits {@link MessageStreamed} for a coalesced frame of streamed deltas, unless the message
|
|
941
|
+
* settled in the meantime: then the completion path has already reconciled the bubble and a
|
|
942
|
+
* late frame has nothing to add. Settled is read off the captured entity's status and off the
|
|
943
|
+
* callback registration, which markMessageComplete drops: a frame can sleep through completion
|
|
944
|
+
* in a hidden tab, and the registration outlasts every other trace of it.
|
|
945
|
+
*/
|
|
946
|
+
private emitStreamedUpdate;
|
|
947
|
+
/**
|
|
948
|
+
* Runs `callback` on the next animation frame, outside Angular: the in-place render checks its
|
|
949
|
+
* own child view, so a zone-triggered application tick per frame would be pure waste, and the
|
|
950
|
+
* paths that do touch template-bound state re-enter the zone themselves. A hidden tab never
|
|
951
|
+
* paints a frame, so there (and without requestAnimationFrame) a short timer stands in; the
|
|
952
|
+
* browser throttles it in the background, the right cadence for a bubble nobody is looking at.
|
|
953
|
+
*/
|
|
954
|
+
private scheduleFrame;
|
|
903
955
|
private createMessageProgressCallback;
|
|
904
956
|
/**
|
|
905
957
|
* Unregister all callbacks registered by this component.
|
|
@@ -948,16 +1000,48 @@ export declare class MessageInputComponent extends BaseAngularComponent implemen
|
|
|
948
1000
|
* tick — the `attachmentsChanged` event chain hasn't propagated yet, so
|
|
949
1001
|
* `this.pendingAttachments` may not contain the attachment. Pass it in
|
|
950
1002
|
* explicitly and we merge + dedupe (by `id`) before saving.
|
|
1003
|
+
*
|
|
1004
|
+
* `options.IsResend` sends an edited copy of an earlier message. The composer's draft is left
|
|
1005
|
+
* alone: only `extraAttachments` are saved with the message, and the pending attachments and
|
|
1006
|
+
* editor text are not cleared. The send never counts as the conversation's first message, so
|
|
1007
|
+
* it does not name the conversation or claim a pending Plan Mode choice.
|
|
1008
|
+
*
|
|
1009
|
+
* `options.TargetBranchID` writes the message to that fork (null is Main) instead of the
|
|
1010
|
+
* composer's own target.
|
|
951
1011
|
*/
|
|
952
|
-
SendMessageWithText(text: string, extraAttachments?: PendingAttachment[]
|
|
1012
|
+
SendMessageWithText(text: string, extraAttachments?: PendingAttachment[], options?: {
|
|
1013
|
+
IsResend?: boolean;
|
|
1014
|
+
TargetBranchID?: string | null;
|
|
1015
|
+
}): Promise<boolean>;
|
|
953
1016
|
/** @deprecated Use {@link SendMessageWithText}. */
|
|
954
1017
|
sendMessageWithText(text: string, extraAttachments?: PendingAttachment[]): Promise<boolean>;
|
|
955
1018
|
/**
|
|
956
|
-
*
|
|
1019
|
+
* Routes an existing user message through the agent path again, so the agent writes a new reply
|
|
1020
|
+
* on `targetBranchId` (default: the message's own branch). No message is saved, and the
|
|
1021
|
+
* composer's draft and pending attachments are left alone. The rerun never counts as the
|
|
1022
|
+
* conversation's first message. `IsSending` stays true until the agent turn ends, so no other
|
|
1023
|
+
* send starts meanwhile.
|
|
1024
|
+
*
|
|
1025
|
+
* @returns false, with no agent turn, when the composer is read-only or already sending.
|
|
1026
|
+
*/
|
|
1027
|
+
RerunAgentForMessage(userMessage: MJConversationDetailEntity, targetBranchId?: string | null): Promise<boolean>;
|
|
1028
|
+
/**
|
|
1029
|
+
* The branch of a new user row: `explicit` when given, else the {@link ResolveTargetBranch} answer
|
|
1030
|
+
* when set, else {@link TargetBranchID}. Undefined when the resolver declined or failed.
|
|
1031
|
+
*/
|
|
1032
|
+
private resolveSendBranch;
|
|
1033
|
+
/**
|
|
1034
|
+
* A new AI row of an agent turn: in `conversationId`, on the turn's branch `branchId` (null is
|
|
1035
|
+
* Main), visible. The caller sets Message, ParentID, Status and AgentID, then saves it.
|
|
1036
|
+
*/
|
|
1037
|
+
private createTurnRow;
|
|
1038
|
+
/**
|
|
1039
|
+
* Creates and configures a new conversation detail message on `branchId` (null is Main)
|
|
957
1040
|
*/
|
|
958
1041
|
private createMessageDetail;
|
|
959
1042
|
/**
|
|
960
|
-
* Creates and configures a new conversation detail message from provided text
|
|
1043
|
+
* Creates and configures a new conversation detail message from provided text, on `branchId`
|
|
1044
|
+
* (null is Main)
|
|
961
1045
|
*/
|
|
962
1046
|
private createMessageDetailFromText;
|
|
963
1047
|
/**
|
|
@@ -978,6 +1062,10 @@ export declare class MessageInputComponent extends BaseAngularComponent implemen
|
|
|
978
1062
|
* last agent's place ({@link decideAgentRouting}).
|
|
979
1063
|
* {@link BeforeAgentTurn} is then fired once, before any reply row exists, and the turn runs on
|
|
980
1064
|
* MJ's path or through the host's {@link AgentTurnHandler}.
|
|
1065
|
+
*
|
|
1066
|
+
* `turnBranchId` overrides the turn's branch (a rerun into a new fork); else the turn runs on
|
|
1067
|
+
* the message's branch. The branch is fixed here and passed down the turn, so every row and
|
|
1068
|
+
* agent-history read of this turn uses it, whatever the composer targets later.
|
|
981
1069
|
*/
|
|
982
1070
|
private routeMessage;
|
|
983
1071
|
/**
|
|
@@ -986,6 +1074,7 @@ export declare class MessageInputComponent extends BaseAngularComponent implemen
|
|
|
986
1074
|
* when anything fails: the message then keeps today's routing.
|
|
987
1075
|
*
|
|
988
1076
|
* @param candidates The turn's candidates, read before any await (see {@link routeMessage}).
|
|
1077
|
+
* @param branchId The turn's branch (null is Main); the artifact versions are read on its path.
|
|
989
1078
|
*/
|
|
990
1079
|
private decideAgentRouting;
|
|
991
1080
|
/**
|
|
@@ -1001,7 +1090,7 @@ export declare class MessageInputComponent extends BaseAngularComponent implemen
|
|
|
1001
1090
|
* the recent turns still come from the full catalog, since any agent may have spoken.
|
|
1002
1091
|
*/
|
|
1003
1092
|
private buildRoutingDecisionInput;
|
|
1004
|
-
/** Every participant's artifact versions in this conversation, for the artifact question. */
|
|
1093
|
+
/** Every participant's artifact versions on the path of `branchId` in this conversation, for the artifact question. */
|
|
1005
1094
|
private loadRoutingArtifactVersions;
|
|
1006
1095
|
/** The host's rules, as the routing functions take them. */
|
|
1007
1096
|
private get agentTurnRules();
|
|
@@ -1030,6 +1119,9 @@ export declare class MessageInputComponent extends BaseAngularComponent implemen
|
|
|
1030
1119
|
* Runs a turn that {@link BeforeAgentTurn} let through, on the host's handler or MJ's path.
|
|
1031
1120
|
* The routing decision, when there was one, supplies the artifact version the turn's agent
|
|
1032
1121
|
* continues from; a host's handler receives it as `TargetArtifactVersionId`.
|
|
1122
|
+
*
|
|
1123
|
+
* @param branchId The turn's branch (null is Main): every row the turn writes and every
|
|
1124
|
+
* agent-history read it makes uses it.
|
|
1033
1125
|
*/
|
|
1034
1126
|
private runAgentTurn;
|
|
1035
1127
|
/**
|
|
@@ -1061,6 +1153,7 @@ export declare class MessageInputComponent extends BaseAngularComponent implemen
|
|
|
1061
1153
|
* ({@link decideAgentRouting}); the prompt-based check stays unused. A confident answer from it
|
|
1062
1154
|
* may name the artifact version this agent should continue from.
|
|
1063
1155
|
*
|
|
1156
|
+
* @param branchId The turn's branch (null is Main).
|
|
1064
1157
|
* @param targetArtifactVersionId The artifact version the routing decision named, or null.
|
|
1065
1158
|
*/
|
|
1066
1159
|
private handleAgentContinuity;
|
|
@@ -1068,6 +1161,8 @@ export declare class MessageInputComponent extends BaseAngularComponent implemen
|
|
|
1068
1161
|
* The conversation manager's turn. When an earlier message @mentioned the manager with a
|
|
1069
1162
|
* configuration preset, the preset keeps applying and the manager answers directly;
|
|
1070
1163
|
* otherwise it evaluates the message and may delegate.
|
|
1164
|
+
*
|
|
1165
|
+
* @param branchId The turn's branch (null is Main).
|
|
1071
1166
|
*/
|
|
1072
1167
|
private runConversationManagerTurn;
|
|
1073
1168
|
/**
|
|
@@ -1100,6 +1195,8 @@ export declare class MessageInputComponent extends BaseAngularComponent implemen
|
|
|
1100
1195
|
* Runs the turn through the host's {@link AgentTurnHandler} instead of MJ's path. Nothing is
|
|
1101
1196
|
* written here: the host writes the reply rows and reports them, and each is shown like a row
|
|
1102
1197
|
* MJ wrote — one still In-Progress is followed like any other in-progress reply.
|
|
1198
|
+
*
|
|
1199
|
+
* @param branchId The turn's branch (null is Main), sent to the handler as `BranchID`.
|
|
1103
1200
|
*/
|
|
1104
1201
|
private runHostAgentTurn;
|
|
1105
1202
|
/** Calls the host's handler; a throw is reported as a failed turn, never swallowed. */
|
|
@@ -1109,6 +1206,7 @@ export declare class MessageInputComponent extends BaseAngularComponent implemen
|
|
|
1109
1206
|
*
|
|
1110
1207
|
* @param targetArtifactVersionId The artifact version the routing decision named for this
|
|
1111
1208
|
* turn's agent, or null.
|
|
1209
|
+
* @param branchId The turn's branch (null is Main).
|
|
1112
1210
|
*/
|
|
1113
1211
|
private buildAgentTurnRequest;
|
|
1114
1212
|
/** Shows the rows a host's handler reported for its turn, oldest first. */
|
|
@@ -1116,8 +1214,8 @@ export declare class MessageInputComponent extends BaseAngularComponent implemen
|
|
|
1116
1214
|
/** Fires {@link AfterAgentTurn} for a turn that succeeded. */
|
|
1117
1215
|
private emitAfterAgentTurn;
|
|
1118
1216
|
/**
|
|
1119
|
-
* Checks if message should continue with the previous agent
|
|
1120
|
-
* Emits events to show temporary intent checking message in conversation
|
|
1217
|
+
* Checks if message should continue with the previous agent, reading the path of `branchId`
|
|
1218
|
+
* (null is Main). Emits events to show temporary intent checking message in conversation
|
|
1121
1219
|
*/
|
|
1122
1220
|
private checkContinuityIntent;
|
|
1123
1221
|
/**
|
|
@@ -1142,6 +1240,8 @@ export declare class MessageInputComponent extends BaseAngularComponent implemen
|
|
|
1142
1240
|
* Process the message through agents (multi-stage: Sage -> possible sub-agent)
|
|
1143
1241
|
* Only called when there's no @mention and no implicit agent context.
|
|
1144
1242
|
* {@link BeforeAgentTurn} has already fired — routing announces the turn before any row exists.
|
|
1243
|
+
*
|
|
1244
|
+
* @param branchId The turn's branch (null is Main).
|
|
1145
1245
|
*/
|
|
1146
1246
|
private processMessageThroughAgent;
|
|
1147
1247
|
/** Detaches the progress callback for one message — used when submission never starts. */
|
|
@@ -1162,6 +1262,8 @@ export declare class MessageInputComponent extends BaseAngularComponent implemen
|
|
|
1162
1262
|
* Single-task graphs are no longer special-cased here. The old client-side fork ran them through
|
|
1163
1263
|
* a different code path entirely; they now submit like any other graph, and the decision about
|
|
1164
1264
|
* whether a one-node graph is worth durable machinery moves server-side where it can be recorded.
|
|
1265
|
+
*
|
|
1266
|
+
* @param branchId The turn's branch (null is Main); the task-graph message is written there.
|
|
1165
1267
|
*/
|
|
1166
1268
|
private handleTaskGraphExecution;
|
|
1167
1269
|
protected updateConversationDetail(convoDetail: MJConversationDetailEntity, message: string, status: 'In-Progress' | 'Complete' | 'Error', result?: ExecuteAgentResult): Promise<void>;
|
|
@@ -1173,28 +1275,35 @@ export declare class MessageInputComponent extends BaseAngularComponent implemen
|
|
|
1173
1275
|
* artifact below the window's oldest row — and a null payload is a legal agent input, so
|
|
1174
1276
|
* the miss surfaces as the agent regenerating from scratch instead of modifying. Covers
|
|
1175
1277
|
* system-visibility artifacts (Agent Manager and friends) for free: the query filters on
|
|
1176
|
-
* Direction, not on Visibility.
|
|
1278
|
+
* Direction, not on Visibility. Only the path of `branchId` (null is Main) is read.
|
|
1177
1279
|
*/
|
|
1178
1280
|
private loadPreviousPayloadForAgent;
|
|
1179
1281
|
/**
|
|
1180
1282
|
* Handle sub-agent invocation based on Sage's payload
|
|
1181
1283
|
* Reuses the existing conversationManagerMessage to avoid creating multiple records
|
|
1284
|
+
*
|
|
1285
|
+
* @param branchId The turn's branch (null is Main).
|
|
1182
1286
|
*/
|
|
1183
1287
|
private handleSubAgentInvocation;
|
|
1184
1288
|
/**
|
|
1185
1289
|
* Handle silent observation - when Sage stays silent,
|
|
1186
1290
|
* check if we should continue with the last agent for iterative refinement
|
|
1291
|
+
*
|
|
1292
|
+
* @param branchId The turn's branch (null is Main).
|
|
1187
1293
|
*/
|
|
1188
1294
|
private handleSilentObservation;
|
|
1189
1295
|
/**
|
|
1190
1296
|
* Invoke an agent directly when mentioned with @ symbol
|
|
1191
1297
|
* Bypasses Sage completely - no status messages
|
|
1298
|
+
*
|
|
1299
|
+
* @param branchId The turn's branch (null is Main).
|
|
1192
1300
|
*/
|
|
1193
1301
|
private invokeAgentDirectly;
|
|
1194
1302
|
/**
|
|
1195
1303
|
* Continue with the same agent from previous message (implicit continuation)
|
|
1196
1304
|
* Bypasses Sage - no status messages
|
|
1197
1305
|
*
|
|
1306
|
+
* @param branchId The turn's branch (null is Main).
|
|
1198
1307
|
* @param targetArtifactVersionId Optional specific artifact version to use as payload (from intent check)
|
|
1199
1308
|
*/
|
|
1200
1309
|
private continueWithAgent;
|
|
@@ -1206,6 +1315,7 @@ export declare class MessageInputComponent extends BaseAngularComponent implemen
|
|
|
1206
1315
|
* @param agentId The agent ID to invoke
|
|
1207
1316
|
* @param agentName The agent's display name
|
|
1208
1317
|
* @param conversationId The conversation ID
|
|
1318
|
+
* @param branchId The turn's branch (null is Main); the reply row is written there
|
|
1209
1319
|
* @param previousPayload Optional payload from previous artifact
|
|
1210
1320
|
* @param previousArtifactInfo Optional artifact info (id, versionId, versionNumber)
|
|
1211
1321
|
* @param configurationId Optional configuration preset ID to use
|
|
@@ -1257,6 +1367,6 @@ export declare class MessageInputComponent extends BaseAngularComponent implemen
|
|
|
1257
1367
|
*/
|
|
1258
1368
|
private cleanupCompletionTimestamp;
|
|
1259
1369
|
static ɵfac: i0.ɵɵFactoryDeclaration<MessageInputComponent, never>;
|
|
1260
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MessageInputComponent, "mj-message-input", never, { "ConversationId": { "alias": "ConversationId"; "required": false; }; "conversationId": { "alias": "conversationId"; "required": false; }; "ConversationName": { "alias": "ConversationName"; "required": false; }; "conversationName": { "alias": "conversationName"; "required": false; }; "CurrentUser": { "alias": "CurrentUser"; "required": false; }; "currentUser": { "alias": "currentUser"; "required": false; }; "Disabled": { "alias": "Disabled"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "ReadOnly": { "alias": "ReadOnly"; "required": false; }; "Placeholder": { "alias": "Placeholder"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "ParentMessageId": { "alias": "ParentMessageId"; "required": false; }; "parentMessageId": { "alias": "parentMessageId"; "required": false; }; "EnableAttachments": { "alias": "EnableAttachments"; "required": false; }; "enableAttachments": { "alias": "enableAttachments"; "required": false; }; "EnableMentions": { "alias": "EnableMentions"; "required": false; }; "enableMentions": { "alias": "enableMentions"; "required": false; }; "EnableAgentMentions": { "alias": "EnableAgentMentions"; "required": false; }; "enableAgentMentions": { "alias": "enableAgentMentions"; "required": false; }; "EnableEntityMentions": { "alias": "EnableEntityMentions"; "required": false; }; "enableEntityMentions": { "alias": "enableEntityMentions"; "required": false; }; "EnableSkillCommands": { "alias": "EnableSkillCommands"; "required": false; }; "enableSkillCommands": { "alias": "enableSkillCommands"; "required": false; }; "EnablePlanMode": { "alias": "EnablePlanMode"; "required": false; }; "enablePlanMode": { "alias": "enablePlanMode"; "required": false; }; "EnableRealtime": { "alias": "EnableRealtime"; "required": false; }; "enableRealtime": { "alias": "enableRealtime"; "required": false; }; "MaxAttachments": { "alias": "MaxAttachments"; "required": false; }; "maxAttachments": { "alias": "maxAttachments"; "required": false; }; "MaxAttachmentSizeBytes": { "alias": "MaxAttachmentSizeBytes"; "required": false; }; "maxAttachmentSizeBytes": { "alias": "maxAttachmentSizeBytes"; "required": false; }; "AcceptedFileTypes": { "alias": "AcceptedFileTypes"; "required": false; }; "acceptedFileTypes": { "alias": "acceptedFileTypes"; "required": false; }; "ArtifactsByDetailId": { "alias": "ArtifactsByDetailId"; "required": false; }; "artifactsByDetailId": { "alias": "artifactsByDetailId"; "required": false; }; "SystemArtifactsByDetailId": { "alias": "SystemArtifactsByDetailId"; "required": false; }; "systemArtifactsByDetailId": { "alias": "systemArtifactsByDetailId"; "required": false; }; "AgentRunsByDetailId": { "alias": "AgentRunsByDetailId"; "required": false; }; "agentRunsByDetailId": { "alias": "agentRunsByDetailId"; "required": false; }; "EmptyStateMode": { "alias": "EmptyStateMode"; "required": false; }; "emptyStateMode": { "alias": "emptyStateMode"; "required": false; }; "AppContext": { "alias": "AppContext"; "required": false; }; "appContext": { "alias": "appContext"; "required": false; }; "DefaultAgentId": { "alias": "DefaultAgentId"; "required": false; }; "defaultAgentId": { "alias": "defaultAgentId"; "required": false; }; "ConversationDefaultAgentId": { "alias": "ConversationDefaultAgentId"; "required": false; }; "conversationDefaultAgentId": { "alias": "conversationDefaultAgentId"; "required": false; }; "AgentConfigurationPresetId": { "alias": "AgentConfigurationPresetId"; "required": false; }; "agentConfigurationPresetId": { "alias": "agentConfigurationPresetId"; "required": false; }; "InitialMessage": { "alias": "InitialMessage"; "required": false; }; "initialMessage": { "alias": "initialMessage"; "required": false; }; "InitialAttachments": { "alias": "InitialAttachments"; "required": false; }; "initialAttachments": { "alias": "initialAttachments"; "required": false; }; "ConversationHistory": { "alias": "ConversationHistory"; "required": false; }; "conversationHistory": { "alias": "conversationHistory"; "required": false; }; "InProgressMessageIds": { "alias": "InProgressMessageIds"; "required": false; }; "inProgressMessageIds": { "alias": "inProgressMessageIds"; "required": false; }; "ApplicationId": { "alias": "ApplicationId"; "required": false; }; "applicationId": { "alias": "applicationId"; "required": false; }; "AgentReplyMode": { "alias": "AgentReplyMode"; "required": false; }; "AllowedAgentIDs": { "alias": "AllowedAgentIDs"; "required": false; }; "MentionPeople": { "alias": "MentionPeople"; "required": false; }; "AgentHistoryFrom": { "alias": "AgentHistoryFrom"; "required": false; }; "AgentTurnHandler": { "alias": "AgentTurnHandler"; "required": false; }; "AutoNameConversation": { "alias": "AutoNameConversation"; "required": false; }; "EnableDecisionRouting": { "alias": "EnableDecisionRouting"; "required": false; }; "InitialDraft": { "alias": "InitialDraft"; "required": false; }; "initialDraft": { "alias": "initialDraft"; "required": false; }; }, { "MessageSent": "MessageSent"; "messageSent": "messageSent"; "AgentResponse": "AgentResponse"; "agentResponse": "agentResponse"; "BeforeAgentTurn": "BeforeAgentTurn"; "beforeAgentTurn": "beforeAgentTurn"; "AfterAgentTurn": "AfterAgentTurn"; "afterAgentTurn": "afterAgentTurn"; "AgentRunDetected": "AgentRunDetected"; "agentRunDetected": "agentRunDetected"; "AgentRunUpdate": "AgentRunUpdate"; "agentRunUpdate": "agentRunUpdate"; "MessageComplete": "MessageComplete"; "messageComplete": "messageComplete"; "ArtifactCreated": "ArtifactCreated"; "artifactCreated": "artifactCreated"; "ConversationRenamed": "ConversationRenamed"; "conversationRenamed": "conversationRenamed"; "IntentCheckStarted": "IntentCheckStarted"; "intentCheckStarted": "intentCheckStarted"; "IntentCheckCompleted": "IntentCheckCompleted"; "intentCheckCompleted": "intentCheckCompleted"; "InitialMessageAutoSendStarted": "InitialMessageAutoSendStarted"; "initialMessageAutoSendStarted": "initialMessageAutoSendStarted"; "InitialMessageAutoSendFailed": "InitialMessageAutoSendFailed"; "initialMessageAutoSendFailed": "initialMessageAutoSendFailed"; "EmptyStateSubmit": "EmptyStateSubmit"; "emptyStateSubmit": "emptyStateSubmit"; "UploadStateChanged": "UploadStateChanged"; "uploadStateChanged": "uploadStateChanged"; "InitialDraftApplied": "InitialDraftApplied"; "initialDraftApplied": "initialDraftApplied"; "DraftStateChanged": "DraftStateChanged"; "ComposerBlurred": "ComposerBlurred"; }, never, never, false, never>;
|
|
1370
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MessageInputComponent, "mj-message-input", never, { "ConversationId": { "alias": "ConversationId"; "required": false; }; "conversationId": { "alias": "conversationId"; "required": false; }; "ConversationName": { "alias": "ConversationName"; "required": false; }; "conversationName": { "alias": "conversationName"; "required": false; }; "CurrentUser": { "alias": "CurrentUser"; "required": false; }; "currentUser": { "alias": "currentUser"; "required": false; }; "Disabled": { "alias": "Disabled"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "ReadOnly": { "alias": "ReadOnly"; "required": false; }; "SendSlotMode": { "alias": "SendSlotMode"; "required": false; }; "StopCount": { "alias": "StopCount"; "required": false; }; "StopLabel": { "alias": "StopLabel"; "required": false; }; "StatusText": { "alias": "StatusText"; "required": false; }; "StatusElapsed": { "alias": "StatusElapsed"; "required": false; }; "Placeholder": { "alias": "Placeholder"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "ParentMessageId": { "alias": "ParentMessageId"; "required": false; }; "parentMessageId": { "alias": "parentMessageId"; "required": false; }; "EnableAttachments": { "alias": "EnableAttachments"; "required": false; }; "enableAttachments": { "alias": "enableAttachments"; "required": false; }; "EnableMentions": { "alias": "EnableMentions"; "required": false; }; "enableMentions": { "alias": "enableMentions"; "required": false; }; "EnableAgentMentions": { "alias": "EnableAgentMentions"; "required": false; }; "enableAgentMentions": { "alias": "enableAgentMentions"; "required": false; }; "EnableEntityMentions": { "alias": "EnableEntityMentions"; "required": false; }; "enableEntityMentions": { "alias": "enableEntityMentions"; "required": false; }; "EnableSkillCommands": { "alias": "EnableSkillCommands"; "required": false; }; "enableSkillCommands": { "alias": "enableSkillCommands"; "required": false; }; "EnablePlanMode": { "alias": "EnablePlanMode"; "required": false; }; "enablePlanMode": { "alias": "enablePlanMode"; "required": false; }; "EnableRealtime": { "alias": "EnableRealtime"; "required": false; }; "enableRealtime": { "alias": "enableRealtime"; "required": false; }; "MaxAttachments": { "alias": "MaxAttachments"; "required": false; }; "maxAttachments": { "alias": "maxAttachments"; "required": false; }; "MaxAttachmentSizeBytes": { "alias": "MaxAttachmentSizeBytes"; "required": false; }; "maxAttachmentSizeBytes": { "alias": "maxAttachmentSizeBytes"; "required": false; }; "AcceptedFileTypes": { "alias": "AcceptedFileTypes"; "required": false; }; "acceptedFileTypes": { "alias": "acceptedFileTypes"; "required": false; }; "ArtifactsByDetailId": { "alias": "ArtifactsByDetailId"; "required": false; }; "artifactsByDetailId": { "alias": "artifactsByDetailId"; "required": false; }; "SystemArtifactsByDetailId": { "alias": "SystemArtifactsByDetailId"; "required": false; }; "systemArtifactsByDetailId": { "alias": "systemArtifactsByDetailId"; "required": false; }; "AgentRunsByDetailId": { "alias": "AgentRunsByDetailId"; "required": false; }; "agentRunsByDetailId": { "alias": "agentRunsByDetailId"; "required": false; }; "EmptyStateMode": { "alias": "EmptyStateMode"; "required": false; }; "emptyStateMode": { "alias": "emptyStateMode"; "required": false; }; "AppContext": { "alias": "AppContext"; "required": false; }; "appContext": { "alias": "appContext"; "required": false; }; "DefaultAgentId": { "alias": "DefaultAgentId"; "required": false; }; "defaultAgentId": { "alias": "defaultAgentId"; "required": false; }; "ConversationDefaultAgentId": { "alias": "ConversationDefaultAgentId"; "required": false; }; "conversationDefaultAgentId": { "alias": "conversationDefaultAgentId"; "required": false; }; "AgentConfigurationPresetId": { "alias": "AgentConfigurationPresetId"; "required": false; }; "agentConfigurationPresetId": { "alias": "agentConfigurationPresetId"; "required": false; }; "InitialMessage": { "alias": "InitialMessage"; "required": false; }; "initialMessage": { "alias": "initialMessage"; "required": false; }; "InitialAttachments": { "alias": "InitialAttachments"; "required": false; }; "initialAttachments": { "alias": "initialAttachments"; "required": false; }; "ConversationHistory": { "alias": "ConversationHistory"; "required": false; }; "conversationHistory": { "alias": "conversationHistory"; "required": false; }; "InProgressMessageIds": { "alias": "InProgressMessageIds"; "required": false; }; "inProgressMessageIds": { "alias": "inProgressMessageIds"; "required": false; }; "ApplicationId": { "alias": "ApplicationId"; "required": false; }; "applicationId": { "alias": "applicationId"; "required": false; }; "AgentReplyMode": { "alias": "AgentReplyMode"; "required": false; }; "AllowedAgentIDs": { "alias": "AllowedAgentIDs"; "required": false; }; "MentionPeople": { "alias": "MentionPeople"; "required": false; }; "AgentHistoryFrom": { "alias": "AgentHistoryFrom"; "required": false; }; "TargetBranchID": { "alias": "TargetBranchID"; "required": false; }; "ResolveTargetBranch": { "alias": "ResolveTargetBranch"; "required": false; }; "AgentTurnHandler": { "alias": "AgentTurnHandler"; "required": false; }; "AutoNameConversation": { "alias": "AutoNameConversation"; "required": false; }; "EnableDecisionRouting": { "alias": "EnableDecisionRouting"; "required": false; }; "InitialDraft": { "alias": "InitialDraft"; "required": false; }; "initialDraft": { "alias": "initialDraft"; "required": false; }; }, { "StopClicked": "StopClicked"; "MessageSent": "MessageSent"; "messageSent": "messageSent"; "MessageStreamed": "MessageStreamed"; "AgentResponse": "AgentResponse"; "agentResponse": "agentResponse"; "BeforeAgentTurn": "BeforeAgentTurn"; "beforeAgentTurn": "beforeAgentTurn"; "AfterAgentTurn": "AfterAgentTurn"; "afterAgentTurn": "afterAgentTurn"; "AgentRunDetected": "AgentRunDetected"; "agentRunDetected": "agentRunDetected"; "AgentRunUpdate": "AgentRunUpdate"; "agentRunUpdate": "agentRunUpdate"; "MessageComplete": "MessageComplete"; "messageComplete": "messageComplete"; "ArtifactCreated": "ArtifactCreated"; "artifactCreated": "artifactCreated"; "ConversationRenamed": "ConversationRenamed"; "conversationRenamed": "conversationRenamed"; "IntentCheckStarted": "IntentCheckStarted"; "intentCheckStarted": "intentCheckStarted"; "IntentCheckCompleted": "IntentCheckCompleted"; "intentCheckCompleted": "intentCheckCompleted"; "InitialMessageAutoSendStarted": "InitialMessageAutoSendStarted"; "initialMessageAutoSendStarted": "initialMessageAutoSendStarted"; "InitialMessageAutoSendFailed": "InitialMessageAutoSendFailed"; "initialMessageAutoSendFailed": "initialMessageAutoSendFailed"; "EmptyStateSubmit": "EmptyStateSubmit"; "emptyStateSubmit": "emptyStateSubmit"; "UploadStateChanged": "UploadStateChanged"; "uploadStateChanged": "uploadStateChanged"; "InitialDraftApplied": "InitialDraftApplied"; "initialDraftApplied": "initialDraftApplied"; "DraftStateChanged": "DraftStateChanged"; "ComposerBlurred": "ComposerBlurred"; }, never, never, false, never>;
|
|
1261
1371
|
}
|
|
1262
1372
|
//# sourceMappingURL=message-input.component.d.ts.map
|