@athenaintel/react 0.41.3 → 0.42.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +132 -10
- package/dist/agent-runtime/src/asset-attachment.d.ts +98 -0
- package/dist/agent-runtime/src/athena-asset-drag.d.ts +32 -0
- package/dist/agent-runtime/src/auth-denial.d.ts +29 -0
- package/dist/agent-runtime/src/chat-outbox-attachments.cjs +41 -0
- package/dist/agent-runtime/src/chat-outbox-attachments.cjs.map +1 -0
- package/dist/agent-runtime/src/chat-outbox-attachments.d.ts +38 -0
- package/dist/agent-runtime/src/chat-outbox-attachments.js +41 -0
- package/dist/agent-runtime/src/chat-outbox-attachments.js.map +1 -0
- package/dist/agent-runtime/src/chat-outbox-signals.cjs +63 -0
- package/dist/agent-runtime/src/chat-outbox-signals.cjs.map +1 -0
- package/dist/agent-runtime/src/chat-outbox-signals.d.ts +12 -0
- package/dist/agent-runtime/src/chat-outbox-signals.js +63 -0
- package/dist/agent-runtime/src/chat-outbox-signals.js.map +1 -0
- package/dist/agent-runtime/src/chat-outbox-store.cjs +509 -0
- package/dist/agent-runtime/src/chat-outbox-store.cjs.map +1 -0
- package/dist/agent-runtime/src/chat-outbox-store.d.ts +203 -0
- package/dist/agent-runtime/src/chat-outbox-store.js +509 -0
- package/dist/agent-runtime/src/chat-outbox-store.js.map +1 -0
- package/dist/agent-runtime/src/chat-outbox-thread.cjs +136 -0
- package/dist/agent-runtime/src/chat-outbox-thread.cjs.map +1 -0
- package/dist/agent-runtime/src/chat-outbox-thread.d.ts +118 -0
- package/dist/agent-runtime/src/chat-outbox-thread.js +136 -0
- package/dist/agent-runtime/src/chat-outbox-thread.js.map +1 -0
- package/dist/agent-runtime/src/chat-outbox.cjs +696 -0
- package/dist/agent-runtime/src/chat-outbox.cjs.map +1 -0
- package/dist/agent-runtime/src/chat-outbox.d.ts +285 -0
- package/dist/agent-runtime/src/chat-outbox.js +696 -0
- package/dist/agent-runtime/src/chat-outbox.js.map +1 -0
- package/dist/agent-runtime/src/chat-socket-reachability.d.ts +45 -0
- package/dist/agent-runtime/src/client-tool-bridge.d.ts +152 -0
- package/dist/agent-runtime/src/client-tools.d.ts +133 -0
- package/dist/agent-runtime/src/composer-markdown.cjs +10 -0
- package/dist/agent-runtime/src/composer-markdown.cjs.map +1 -1
- package/dist/agent-runtime/src/composer-markdown.d.ts +108 -0
- package/dist/agent-runtime/src/composer-markdown.js +10 -0
- package/dist/agent-runtime/src/composer-markdown.js.map +1 -1
- package/dist/agent-runtime/src/config-mutations.d.ts +51 -0
- package/dist/agent-runtime/src/conversation-index.d.ts +110 -0
- package/dist/agent-runtime/src/conversation-list.d.ts +343 -0
- package/dist/agent-runtime/src/deep-agent-transport-recipe.cjs +3 -2
- package/dist/agent-runtime/src/deep-agent-transport-recipe.cjs.map +1 -1
- package/dist/agent-runtime/src/deep-agent-transport-recipe.d.ts +166 -0
- package/dist/agent-runtime/src/deep-agent-transport-recipe.js +3 -2
- package/dist/agent-runtime/src/deep-agent-transport-recipe.js.map +1 -1
- package/dist/agent-runtime/src/desktop-handoff.d.ts +139 -0
- package/dist/agent-runtime/src/durable-thread-snapshot-cache.d.ts +60 -0
- package/dist/agent-runtime/src/edit-command.d.ts +156 -0
- package/dist/agent-runtime/src/errors.d.ts +174 -0
- package/dist/agent-runtime/src/execute-output.d.ts +31 -0
- package/dist/agent-runtime/src/generated/runconfig-contract.cjs +16 -2
- package/dist/agent-runtime/src/generated/runconfig-contract.cjs.map +1 -1
- package/dist/agent-runtime/src/generated/runconfig-contract.d.ts +202 -0
- package/dist/agent-runtime/src/generated/runconfig-contract.js +16 -2
- package/dist/agent-runtime/src/generated/runconfig-contract.js.map +1 -1
- package/dist/agent-runtime/src/github-wake-event.d.ts +77 -0
- package/dist/agent-runtime/src/index.d.ts +74 -0
- package/dist/agent-runtime/src/interrupts.cjs +17 -0
- package/dist/agent-runtime/src/interrupts.cjs.map +1 -1
- package/dist/agent-runtime/src/interrupts.d.ts +348 -0
- package/dist/agent-runtime/src/interrupts.js +17 -0
- package/dist/agent-runtime/src/interrupts.js.map +1 -1
- package/dist/agent-runtime/src/lane-follow.d.ts +121 -0
- package/dist/agent-runtime/src/lane-history.cjs +209 -0
- package/dist/agent-runtime/src/lane-history.cjs.map +1 -0
- package/dist/agent-runtime/src/lane-history.d.ts +175 -0
- package/dist/agent-runtime/src/lane-history.js +209 -0
- package/dist/agent-runtime/src/lane-history.js.map +1 -0
- package/dist/agent-runtime/src/lane-images.d.ts +184 -0
- package/dist/agent-runtime/src/message-author.d.ts +43 -0
- package/dist/agent-runtime/src/message-text.cjs +15 -0
- package/dist/agent-runtime/src/message-text.cjs.map +1 -0
- package/dist/agent-runtime/src/message-text.d.ts +47 -0
- package/dist/agent-runtime/src/message-text.js +15 -0
- package/dist/agent-runtime/src/message-text.js.map +1 -0
- package/dist/agent-runtime/src/message-window.cjs +15 -1
- package/dist/agent-runtime/src/message-window.cjs.map +1 -1
- package/dist/agent-runtime/src/message-window.d.ts +159 -0
- package/dist/agent-runtime/src/message-window.js +16 -2
- package/dist/agent-runtime/src/message-window.js.map +1 -1
- package/dist/agent-runtime/src/messages.cjs +123 -8
- package/dist/agent-runtime/src/messages.cjs.map +1 -1
- package/dist/agent-runtime/src/messages.d.ts +621 -0
- package/dist/agent-runtime/src/messages.js +123 -8
- package/dist/agent-runtime/src/messages.js.map +1 -1
- package/dist/agent-runtime/src/model-context.d.ts +22 -0
- package/dist/agent-runtime/src/offline-status.d.ts +157 -0
- package/dist/agent-runtime/src/optimistic-content.d.ts +21 -0
- package/dist/agent-runtime/src/protocol.cjs +12 -4
- package/dist/agent-runtime/src/protocol.cjs.map +1 -1
- package/dist/agent-runtime/src/protocol.d.ts +119 -0
- package/dist/agent-runtime/src/protocol.js +13 -5
- package/dist/agent-runtime/src/protocol.js.map +1 -1
- package/dist/agent-runtime/src/ptc-subcalls.d.ts +51 -0
- package/dist/agent-runtime/src/queue.d.ts +138 -0
- package/dist/agent-runtime/src/quota-safe-local-storage-session.cjs +10 -0
- package/dist/agent-runtime/src/quota-safe-local-storage-session.cjs.map +1 -1
- package/dist/agent-runtime/src/quota-safe-local-storage-session.d.ts +161 -0
- package/dist/agent-runtime/src/quota-safe-local-storage-session.js +10 -0
- package/dist/agent-runtime/src/quota-safe-local-storage-session.js.map +1 -1
- package/dist/agent-runtime/src/running-tool-placeholder.cjs +11 -0
- package/dist/agent-runtime/src/running-tool-placeholder.cjs.map +1 -0
- package/dist/agent-runtime/src/running-tool-placeholder.d.ts +25 -0
- package/dist/agent-runtime/src/running-tool-placeholder.js +11 -0
- package/dist/agent-runtime/src/running-tool-placeholder.js.map +1 -0
- package/dist/agent-runtime/src/runtime-messages.d.ts +104 -0
- package/dist/agent-runtime/src/screen-point.d.ts +151 -0
- package/dist/agent-runtime/src/sealed-idb.cjs +112 -0
- package/dist/agent-runtime/src/sealed-idb.cjs.map +1 -0
- package/dist/agent-runtime/src/sealed-idb.d.ts +106 -0
- package/dist/agent-runtime/src/sealed-idb.js +112 -0
- package/dist/agent-runtime/src/sealed-idb.js.map +1 -0
- package/dist/agent-runtime/src/send-recovery.d.ts +40 -0
- package/dist/agent-runtime/src/session-lane-scope.cjs +25 -0
- package/dist/agent-runtime/src/session-lane-scope.cjs.map +1 -0
- package/dist/agent-runtime/src/session-lane-scope.d.ts +59 -0
- package/dist/agent-runtime/src/session-lane-scope.js +25 -0
- package/dist/agent-runtime/src/session-lane-scope.js.map +1 -0
- package/dist/agent-runtime/src/statewire-attach-observer.d.ts +194 -0
- package/dist/agent-runtime/src/statewire-diagnostics.d.ts +74 -0
- package/dist/agent-runtime/src/statewire-state.d.ts +29 -0
- package/dist/agent-runtime/src/statewire-suspended.cjs.map +1 -1
- package/dist/agent-runtime/src/statewire-suspended.d.ts +27 -0
- package/dist/agent-runtime/src/statewire-suspended.js.map +1 -1
- package/dist/agent-runtime/src/statewire-transport.d.ts +40 -0
- package/dist/agent-runtime/src/streaming-markdown.d.ts +46 -0
- package/dist/agent-runtime/src/subagent-transcripts.cjs +209 -0
- package/dist/agent-runtime/src/subagent-transcripts.cjs.map +1 -0
- package/dist/agent-runtime/src/subagent-transcripts.d.ts +71 -0
- package/dist/agent-runtime/src/subagent-transcripts.js +209 -0
- package/dist/agent-runtime/src/subagent-transcripts.js.map +1 -0
- package/dist/agent-runtime/src/subagents.cjs +253 -0
- package/dist/agent-runtime/src/subagents.cjs.map +1 -0
- package/dist/agent-runtime/src/subagents.d.ts +311 -0
- package/dist/agent-runtime/src/subagents.js +253 -0
- package/dist/agent-runtime/src/subagents.js.map +1 -0
- package/dist/agent-runtime/src/subscription-wake-event.d.ts +111 -0
- package/dist/agent-runtime/src/thread-extras.d.ts +43 -0
- package/dist/agent-runtime/src/thread-handoff.d.ts +364 -0
- package/dist/agent-runtime/src/thread-prewarm-controller.d.ts +76 -0
- package/dist/agent-runtime/src/thread-prewarm.d.ts +118 -0
- package/dist/agent-runtime/src/thread-snapshot-cache.d.ts +99 -0
- package/dist/agent-runtime/src/thread-snapshot-mirror.cjs +46 -117
- package/dist/agent-runtime/src/thread-snapshot-mirror.cjs.map +1 -1
- package/dist/agent-runtime/src/thread-snapshot-mirror.d.ts +101 -0
- package/dist/agent-runtime/src/thread-snapshot-mirror.js +17 -88
- package/dist/agent-runtime/src/thread-snapshot-mirror.js.map +1 -1
- package/dist/agent-runtime/src/thread-status.d.ts +53 -0
- package/dist/agent-runtime/src/tool-metadata.d.ts +146 -0
- package/dist/agent-runtime/src/tool-names.cjs +71 -0
- package/dist/agent-runtime/src/tool-names.cjs.map +1 -1
- package/dist/agent-runtime/src/tool-names.d.ts +67 -0
- package/dist/agent-runtime/src/tool-names.js +72 -1
- package/dist/agent-runtime/src/tool-names.js.map +1 -1
- package/dist/agent-runtime/src/tool-outputs.d.ts +35 -0
- package/dist/agent-runtime/src/tool-result.cjs +1 -0
- package/dist/agent-runtime/src/tool-result.cjs.map +1 -1
- package/dist/agent-runtime/src/tool-result.d.ts +126 -0
- package/dist/agent-runtime/src/tool-result.js +1 -0
- package/dist/agent-runtime/src/tool-result.js.map +1 -1
- package/dist/agent-runtime/src/types.d.ts +159 -0
- package/dist/agent-runtime/src/use-conversation-list.d.ts +76 -0
- package/dist/agent-runtime/src/use-deep-agent-chat-outbox.cjs +136 -0
- package/dist/agent-runtime/src/use-deep-agent-chat-outbox.cjs.map +1 -0
- package/dist/agent-runtime/src/use-deep-agent-chat-outbox.d.ts +64 -0
- package/dist/agent-runtime/src/use-deep-agent-chat-outbox.js +136 -0
- package/dist/agent-runtime/src/use-deep-agent-chat-outbox.js.map +1 -0
- package/dist/agent-runtime/src/use-deep-agent-config.d.ts +169 -0
- package/dist/agent-runtime/src/use-deep-agent-edit-submit.cjs +13 -0
- package/dist/agent-runtime/src/use-deep-agent-edit-submit.cjs.map +1 -1
- package/dist/agent-runtime/src/use-deep-agent-edit-submit.d.ts +22 -0
- package/dist/agent-runtime/src/use-deep-agent-edit-submit.js +13 -0
- package/dist/agent-runtime/src/use-deep-agent-edit-submit.js.map +1 -1
- package/dist/agent-runtime/src/use-deep-agent-runtime.cjs +37 -2
- package/dist/agent-runtime/src/use-deep-agent-runtime.cjs.map +1 -1
- package/dist/agent-runtime/src/use-deep-agent-runtime.d.ts +177 -0
- package/dist/agent-runtime/src/use-deep-agent-runtime.js +38 -3
- package/dist/agent-runtime/src/use-deep-agent-runtime.js.map +1 -1
- package/dist/agent-runtime/src/use-deep-agent-thread.cjs +39 -13
- package/dist/agent-runtime/src/use-deep-agent-thread.cjs.map +1 -1
- package/dist/agent-runtime/src/use-deep-agent-thread.d.ts +352 -0
- package/dist/agent-runtime/src/use-deep-agent-thread.js +39 -13
- package/dist/agent-runtime/src/use-deep-agent-thread.js.map +1 -1
- package/dist/agent-runtime/src/use-deep-agent-voice.cjs +1019 -0
- package/dist/agent-runtime/src/use-deep-agent-voice.cjs.map +1 -0
- package/dist/agent-runtime/src/use-deep-agent-voice.d.ts +409 -0
- package/dist/agent-runtime/src/use-deep-agent-voice.js +1019 -0
- package/dist/agent-runtime/src/use-deep-agent-voice.js.map +1 -0
- package/dist/agent-runtime/src/use-deep-agent-window-sync.d.ts +102 -0
- package/dist/agent-runtime/src/use-historical-edit-attachments.d.ts +2 -0
- package/dist/agent-runtime/src/use-thread-handoff-flow.d.ts +84 -0
- package/dist/agent-runtime/src/voice-presentation.cjs +2 -0
- package/dist/agent-runtime/src/voice-presentation.cjs.map +1 -1
- package/dist/agent-runtime/src/voice-presentation.d.ts +80 -0
- package/dist/agent-runtime/src/voice-presentation.js +2 -0
- package/dist/agent-runtime/src/voice-presentation.js.map +1 -1
- package/dist/agent-runtime/src/voice-turn-grouping.d.ts +28 -0
- package/dist/agent-runtime/src/voice-wire-types.d.ts +15 -0
- package/dist/agent-runtime/src/withdrawn-turns.d.ts +97 -0
- package/dist/catalog/runtime-catalog.js +1 -1
- package/dist/chat/AthenaChat.cjs +192 -103
- package/dist/chat/AthenaChat.cjs.map +1 -1
- package/dist/chat/AthenaChat.d.ts +9 -0
- package/dist/chat/AthenaChat.js +194 -105
- package/dist/chat/AthenaChat.js.map +1 -1
- package/dist/chat/StatewireApprovalCard.d.ts +1 -1
- package/dist/chat/StatewireClientToolBridge.d.ts +1 -1
- package/dist/chat/StatewireQueuedMessages.cjs +11 -4
- package/dist/chat/StatewireQueuedMessages.cjs.map +1 -1
- package/dist/chat/StatewireQueuedMessages.d.ts +1 -1
- package/dist/chat/StatewireQueuedMessages.js +11 -4
- package/dist/chat/StatewireQueuedMessages.js.map +1 -1
- package/dist/chat/chat-outbox-rows.cjs +223 -0
- package/dist/chat/chat-outbox-rows.cjs.map +1 -0
- package/dist/chat/chat-outbox-rows.d.ts +29 -0
- package/dist/chat/chat-outbox-rows.js +223 -0
- package/dist/chat/chat-outbox-rows.js.map +1 -0
- package/dist/chat/chat-voice-controls.cjs +128 -0
- package/dist/chat/chat-voice-controls.cjs.map +1 -0
- package/dist/chat/chat-voice-controls.d.ts +19 -0
- package/dist/chat/chat-voice-controls.js +128 -0
- package/dist/chat/chat-voice-controls.js.map +1 -0
- package/dist/chat/statewire-approval.d.ts +1 -1
- package/dist/chat/statewire-client-tools.d.ts +1 -1
- package/dist/chat/super-grouping/SuperGroupingCard.cjs +3 -1
- package/dist/chat/super-grouping/SuperGroupingCard.cjs.map +1 -1
- package/dist/chat/super-grouping/SuperGroupingCard.d.ts +7 -1
- package/dist/chat/super-grouping/SuperGroupingCard.js +3 -1
- package/dist/chat/super-grouping/SuperGroupingCard.js.map +1 -1
- package/dist/chat/super-grouping/SuperGroupingTranscript.cjs +7 -2
- package/dist/chat/super-grouping/SuperGroupingTranscript.cjs.map +1 -1
- package/dist/chat/super-grouping/SuperGroupingTranscript.d.ts +2 -2
- package/dist/chat/super-grouping/SuperGroupingTranscript.js +7 -2
- package/dist/chat/super-grouping/SuperGroupingTranscript.js.map +1 -1
- package/dist/chat/super-grouping/activity-timeline.cjs +15 -8
- package/dist/chat/super-grouping/activity-timeline.cjs.map +1 -1
- package/dist/chat/super-grouping/activity-timeline.d.ts +18 -8
- package/dist/chat/super-grouping/activity-timeline.js +15 -8
- package/dist/chat/super-grouping/activity-timeline.js.map +1 -1
- package/dist/chat/use-statewire-approval-request.cjs +36 -0
- package/dist/chat/use-statewire-approval-request.cjs.map +1 -1
- package/dist/chat/use-statewire-approval-request.d.ts +49 -1
- package/dist/chat/use-statewire-approval-request.js +39 -3
- package/dist/chat/use-statewire-approval-request.js.map +1 -1
- package/dist/chat-ui/composer/tiptap-composer.cjs +133 -14
- package/dist/chat-ui/composer/tiptap-composer.cjs.map +1 -1
- package/dist/chat-ui/composer/tiptap-composer.d.ts +33 -1
- package/dist/chat-ui/composer/tiptap-composer.js +135 -16
- package/dist/chat-ui/composer/tiptap-composer.js.map +1 -1
- package/dist/chat-ui/header/conversation-history-panel.d.ts +1 -1
- package/dist/chat-ui/index.d.ts +1 -1
- package/dist/chat-ui/mentions/suggestions/data/api-client.cjs +2 -1
- package/dist/chat-ui/mentions/suggestions/data/api-client.cjs.map +1 -1
- package/dist/chat-ui/mentions/suggestions/data/api-client.d.ts +3 -1
- package/dist/chat-ui/mentions/suggestions/data/api-client.js +2 -1
- package/dist/chat-ui/mentions/suggestions/data/api-client.js.map +1 -1
- package/dist/chat-ui/mentions/use-account-workspace-id.cjs +29 -51
- package/dist/chat-ui/mentions/use-account-workspace-id.cjs.map +1 -1
- package/dist/chat-ui/mentions/use-account-workspace-id.d.ts +2 -2
- package/dist/chat-ui/mentions/use-account-workspace-id.js +30 -52
- package/dist/chat-ui/mentions/use-account-workspace-id.js.map +1 -1
- package/dist/chat-ui/messages/message-components.cjs +15 -0
- package/dist/chat-ui/messages/message-components.cjs.map +1 -1
- package/dist/chat-ui/messages/message-components.js +15 -0
- package/dist/chat-ui/messages/message-components.js.map +1 -1
- package/dist/chat-ui/messages/runtime-message.d.ts +1 -1
- package/dist/chat-ui/messages/statewire-continue-run.d.ts +1 -1
- package/dist/chat-ui/messages/user-edit-composer.cjs +15 -2
- package/dist/chat-ui/messages/user-edit-composer.cjs.map +1 -1
- package/dist/chat-ui/messages/user-edit-composer.d.ts +4 -2
- package/dist/chat-ui/messages/user-edit-composer.js +15 -2
- package/dist/chat-ui/messages/user-edit-composer.js.map +1 -1
- package/dist/chat-ui/messages/wake-marker.d.ts +1 -1
- package/dist/chat-ui/rich-text/chat-text-schema.cjs +1 -0
- package/dist/chat-ui/rich-text/chat-text-schema.cjs.map +1 -1
- package/dist/chat-ui/rich-text/chat-text-schema.d.ts +3 -0
- package/dist/chat-ui/rich-text/chat-text-schema.js +1 -0
- package/dist/chat-ui/rich-text/chat-text-schema.js.map +1 -1
- package/dist/chat-ui/statewire.cjs +1 -0
- package/dist/chat-ui/statewire.cjs.map +1 -1
- package/dist/chat-ui/statewire.d.ts +2 -2
- package/dist/chat-ui/statewire.js +2 -1
- package/dist/chat-ui/thread/composer-send-or-stop.cjs +2 -1
- package/dist/chat-ui/thread/composer-send-or-stop.cjs.map +1 -1
- package/dist/chat-ui/thread/composer-send-or-stop.d.ts +2 -0
- package/dist/chat-ui/thread/composer-send-or-stop.js +2 -1
- package/dist/chat-ui/thread/composer-send-or-stop.js.map +1 -1
- package/dist/chat-ui/thread/statewire-history-edge.d.ts +1 -1
- package/dist/composer/AttachmentContext.cjs +8 -4
- package/dist/composer/AttachmentContext.cjs.map +1 -1
- package/dist/composer/AttachmentContext.d.ts +7 -0
- package/dist/composer/AttachmentContext.js +8 -4
- package/dist/composer/AttachmentContext.js.map +1 -1
- package/dist/composer/build-composed-message.cjs +34 -0
- package/dist/composer/build-composed-message.cjs.map +1 -1
- package/dist/composer/build-composed-message.d.ts +20 -0
- package/dist/composer/build-composed-message.js +35 -1
- package/dist/composer/build-composed-message.js.map +1 -1
- package/dist/composer/composer-handoff.cjs +39 -2
- package/dist/composer/composer-handoff.cjs.map +1 -1
- package/dist/composer/composer-handoff.d.ts +28 -3
- package/dist/composer/composer-handoff.js +39 -2
- package/dist/composer/composer-handoff.js.map +1 -1
- package/dist/composer/useAttachFiles.cjs +15 -2
- package/dist/composer/useAttachFiles.cjs.map +1 -1
- package/dist/composer/useAttachFiles.d.ts +11 -0
- package/dist/composer/useAttachFiles.js +15 -2
- package/dist/composer/useAttachFiles.js.map +1 -1
- package/dist/composer/useSendMessage.cjs.map +1 -1
- package/dist/composer/useSendMessage.d.ts +4 -3
- package/dist/composer/useSendMessage.js.map +1 -1
- package/dist/diagnostics/athena-diagnostics.cjs.map +1 -1
- package/dist/diagnostics/athena-diagnostics.d.ts +3 -1
- package/dist/diagnostics/athena-diagnostics.js.map +1 -1
- package/dist/index.cjs +13 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +14 -7
- package/dist/index.js +14 -1
- package/dist/index.js.map +1 -1
- package/dist/offline/chat-outbox.cjs +57 -0
- package/dist/offline/chat-outbox.cjs.map +1 -0
- package/dist/offline/chat-outbox.d.ts +80 -0
- package/dist/offline/chat-outbox.js +57 -0
- package/dist/offline/chat-outbox.js.map +1 -0
- package/dist/offline/offline-history.d.ts +1 -1
- package/dist/provider/AthenaProvider.cjs +162 -8
- package/dist/provider/AthenaProvider.cjs.map +1 -1
- package/dist/provider/AthenaProvider.d.ts +15 -1
- package/dist/provider/AthenaProvider.js +163 -9
- package/dist/provider/AthenaProvider.js.map +1 -1
- package/dist/provider/statewire-window-context.d.ts +1 -1
- package/dist/react/package.json.cjs +1 -1
- package/dist/react/package.json.js +1 -1
- package/dist/references/src/anchors/file-line-range.d.ts +58 -0
- package/dist/references/src/anchors/format.d.ts +21 -0
- package/dist/references/src/anchors/message-anchors.d.ts +71 -0
- package/dist/references/src/anchors/parse.d.ts +8 -0
- package/dist/references/src/anchors/registry-contract.d.ts +24 -0
- package/dist/references/src/anchors/registry.d.ts +19 -0
- package/dist/references/src/anchors/schemas.d.ts +194 -0
- package/dist/references/src/anchors/serialize.d.ts +8 -0
- package/dist/references/src/anchors/time.d.ts +78 -0
- package/dist/references/src/anchors/types.d.ts +474 -0
- package/dist/references/src/asset-bounds.d.ts +27 -0
- package/dist/references/src/asset-links.d.ts +23 -0
- package/dist/references/src/asset-reference.d.ts +16 -0
- package/dist/references/src/formats/format-catalog.d.ts +79 -0
- package/dist/references/src/formats/markdown/parse-reference-markdown.d.ts +28 -0
- package/dist/references/src/formats/markdown/reference-display-name.d.ts +6 -0
- package/dist/references/src/formats/object/asset-object.d.ts +9 -0
- package/dist/references/src/formats/object/callable-object.d.ts +6 -0
- package/dist/references/src/formats/object/decode-reference-object-payload.d.ts +3 -0
- package/dist/references/src/formats/object/external-url-object.d.ts +9 -0
- package/dist/references/src/formats/object/group-object.d.ts +9 -0
- package/dist/references/src/formats/object/navigation-object.d.ts +9 -0
- package/dist/references/src/formats/object/parse-reference-object.d.ts +11 -0
- package/dist/references/src/formats/object/person-object.d.ts +9 -0
- package/dist/references/src/formats/uri/asset-mention-uri.d.ts +9 -0
- package/dist/references/src/formats/uri/asset-spaces-url.d.ts +9 -0
- package/dist/references/src/formats/uri/callable-mention-uris.d.ts +9 -0
- package/dist/references/src/formats/uri/detect-uri-wire.d.ts +9 -0
- package/dist/references/src/formats/uri/group-mention-uri.d.ts +12 -0
- package/dist/references/src/formats/uri/navigation-spaces-url.d.ts +14 -0
- package/dist/references/src/formats/uri/parse-reference-uri.d.ts +20 -0
- package/dist/references/src/formats/uri/person-mention-uri.d.ts +9 -0
- package/dist/references/src/formats/uri/template-placeholder.d.ts +12 -0
- package/dist/references/src/index.d.ts +47 -0
- package/dist/references/src/legacy/index.d.ts +14 -0
- package/dist/references/src/legacy/pre-reference-asset-url.d.ts +57 -0
- package/dist/references/src/legacy/pre-reference-citation-bridge.d.ts +22 -0
- package/dist/references/src/legacy/pre-reference-citation.d.ts +138 -0
- package/dist/references/src/legacy/pre-reference-external-url.d.ts +31 -0
- package/dist/references/src/legacy/pre-reference-format.d.ts +8 -0
- package/dist/references/src/legacy/pre-reference-mention.d.ts +27 -0
- package/dist/references/src/legacy/pre-reference-object.d.ts +8 -0
- package/dist/references/src/legacy/pre-reference-uri.d.ts +12 -0
- package/dist/references/src/legacy.d.ts +2 -0
- package/dist/references/src/mention-href-patterns.d.ts +19 -0
- package/dist/references/src/mention-node/index.d.ts +5 -0
- package/dist/references/src/mention-node/mention-node.d.ts +31 -0
- package/dist/references/src/mention-node/resolve-node-attrs.d.ts +27 -0
- package/dist/references/src/parse-reference.d.ts +23 -0
- package/dist/references/src/schemas.d.ts +463 -0
- package/dist/references/src/serialize-reference.d.ts +50 -0
- package/dist/references/src/sheet-name.d.ts +10 -0
- package/dist/references/src/tool-option-schemas.d.ts +597 -0
- package/dist/references/src/types.d.ts +125 -0
- package/dist/references/src/version-ref.d.ts +30 -0
- package/dist/runtime/statewire-lifecycle.d.ts +1 -1
- package/dist/runtime/statewire-model-lane.d.ts +1 -1
- package/dist/runtime/statewire-server-lane-context.d.ts +1 -1
- package/dist/runtime/statewire-session-key.cjs +7 -0
- package/dist/runtime/statewire-session-key.cjs.map +1 -1
- package/dist/runtime/statewire-session-key.d.ts +19 -0
- package/dist/runtime/statewire-session-key.js +8 -1
- package/dist/runtime/statewire-session-key.js.map +1 -1
- package/dist/runtime/statewire-session-lane.cjs +48 -0
- package/dist/runtime/statewire-session-lane.cjs.map +1 -0
- package/dist/runtime/statewire-session-lane.d.ts +29 -0
- package/dist/runtime/statewire-session-lane.js +48 -0
- package/dist/runtime/statewire-session-lane.js.map +1 -0
- package/dist/runtime/statewire-thread-config-lane.d.ts +1 -1
- package/dist/runtime/useAthenaStatewireRuntime.cjs +19 -5
- package/dist/runtime/useAthenaStatewireRuntime.cjs.map +1 -1
- package/dist/runtime/useAthenaStatewireRuntime.d.ts +15 -1
- package/dist/runtime/useAthenaStatewireRuntime.js +20 -6
- package/dist/runtime/useAthenaStatewireRuntime.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/threads/api.d.ts +1 -1
- package/dist/threads/conversation-list-fetcher.d.ts +1 -1
- package/dist/threads/index-triggered-refresh.cjs +164 -0
- package/dist/threads/index-triggered-refresh.cjs.map +1 -0
- package/dist/threads/index-triggered-refresh.d.ts +70 -0
- package/dist/threads/index-triggered-refresh.js +164 -0
- package/dist/threads/index-triggered-refresh.js.map +1 -0
- package/dist/threads/offline-session-list.d.ts +1 -1
- package/dist/threads/pull-request-display.d.ts +1 -1
- package/dist/threads/session-list-model.d.ts +1 -1
- package/dist/threads/session-list-tab-share.cjs +150 -0
- package/dist/threads/session-list-tab-share.cjs.map +1 -0
- package/dist/threads/session-list-tab-share.d.ts +73 -0
- package/dist/threads/session-list-tab-share.js +150 -0
- package/dist/threads/session-list-tab-share.js.map +1 -0
- package/dist/threads/session-row-parts.d.ts +1 -1
- package/dist/threads/sessions-query.d.ts +1 -1
- package/dist/threads/statewire-thread-list.cjs +42 -16
- package/dist/threads/statewire-thread-list.cjs.map +1 -1
- package/dist/threads/statewire-thread-list.d.ts +11 -2
- package/dist/threads/statewire-thread-list.js +43 -17
- package/dist/threads/statewire-thread-list.js.map +1 -1
- package/dist/threads/thread-prefetcher.d.ts +1 -1
- package/dist/threads/use-athena-session-attention.d.ts +1 -1
- package/dist/threads/use-athena-sessions.cjs +32 -22
- package/dist/threads/use-athena-sessions.cjs.map +1 -1
- package/dist/threads/use-athena-sessions.js +33 -23
- package/dist/threads/use-athena-sessions.js.map +1 -1
- package/dist/threads/use-rest-conversation-history.d.ts +1 -1
- package/dist/threads/use-statewire-conversation-history.d.ts +5 -5
- package/dist/tiptap-markdown-table/src/markdown-table-serializer.d.ts +56 -0
- package/dist/tools/NestedPtcMessages.cjs +14 -9
- package/dist/tools/NestedPtcMessages.cjs.map +1 -1
- package/dist/tools/NestedPtcMessages.d.ts +9 -0
- package/dist/tools/NestedPtcMessages.js +6 -1
- package/dist/tools/NestedPtcMessages.js.map +1 -1
- package/dist/tools/index.d.ts +1 -1
- package/dist/tools/primitives.d.ts +1 -1
- package/dist/tools/subagent-task-tool-ui.cjs +494 -0
- package/dist/tools/subagent-task-tool-ui.cjs.map +1 -0
- package/dist/tools/subagent-task-tool-ui.d.ts +109 -0
- package/dist/tools/subagent-task-tool-ui.js +494 -0
- package/dist/tools/subagent-task-tool-ui.js.map +1 -0
- package/dist/tools/tool-fallback.d.ts +1 -1
- package/dist/tools/tool-icons.d.ts +1 -1
- package/dist/tools/tool-summary.d.ts +1 -1
- package/dist/tools/tool-uis.cjs +4 -0
- package/dist/tools/tool-uis.cjs.map +1 -1
- package/dist/tools/tool-uis.js +4 -0
- package/dist/tools/tool-uis.js.map +1 -1
- package/dist/voice/chat.cjs +6 -0
- package/dist/voice/chat.cjs.map +1 -0
- package/dist/voice/chat.d.ts +2 -0
- package/dist/voice/chat.js +6 -0
- package/dist/voice/chat.js.map +1 -0
- package/dist/voice/livekit-join.cjs +119 -0
- package/dist/voice/livekit-join.cjs.map +1 -0
- package/dist/voice/livekit-join.d.ts +8 -0
- package/dist/voice/livekit-join.js +119 -0
- package/dist/voice/livekit-join.js.map +1 -0
- package/dist/voice/livekit.cjs +32 -0
- package/dist/voice/livekit.cjs.map +1 -0
- package/dist/voice/livekit.d.ts +80 -0
- package/dist/voice/livekit.js +32 -0
- package/dist/voice/livekit.js.map +1 -0
- package/dist/voice/use-chat-voice-enabled.cjs +43 -0
- package/dist/voice/use-chat-voice-enabled.cjs.map +1 -0
- package/dist/voice/use-chat-voice-enabled.d.ts +9 -0
- package/dist/voice/use-chat-voice-enabled.js +43 -0
- package/dist/voice/use-chat-voice-enabled.js.map +1 -0
- package/package.json +22 -16
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"voice-presentation.js","sources":["../../../../agent-runtime/src/voice-presentation.ts"],"sourcesContent":["/**\n * How voice-mode transcript entries present, shared by every chat surface\n * (Olympus, the Chrome side panel, the mobile app) so a spoken turn, a\n * delegation the live voice model handed off, and an interim spoken update\n * read the same everywhere. The wire contract is the deep-agent host's\n * `additional_kwargs.metadata` (exposed as `message.metadata.custom`):\n *\n * - `source: \"voice\"` — a spoken turn; `voice_live: true` while it is still\n * being heard or spoken (the ephemeral entry the durable row replaces);\n * - `source: \"text\"` — a message typed into the live conversation;\n * - `source: \"voice_delegation\"` (id prefix `voicetask_`) — the unit of work\n * the live voice model delegated to the thread.\n */\nimport { getExternalStoreMessages, type ThreadMessage } from '@assistant-ui/core';\n\n/** `metadata.custom.source` of a spoken turn. */\nexport const VOICE_SOURCE_SPOKEN = 'voice';\n/** `metadata.custom.source` of a message typed into the live conversation. */\nexport const VOICE_SOURCE_TYPED = 'text';\n/** `metadata.custom.source` of a voice delegation's anchor message. */\nexport const VOICE_SOURCE_DELEGATION = 'voice_delegation';\n/** Id prefix of a voice delegation's anchor message (the working signal on\n * hosts that drop the command's metadata). */\nexport const VOICE_DELEGATION_ID_PREFIX = 'voicetask_';\n/** `metadata.custom` flag on a spoken turn still in flight. */\nexport const VOICE_LIVE_KEY = 'voice_live';\n/** `metadata.custom` list of the wire ids a grouped spoken bubble stands for\n * (see `groupSpokenUserTurns`), so id-keyed lookups such as checkpoint markers\n * can resolve any member to the bubble. */\nexport const VOICE_TURN_IDS_KEY = 'voice_turn_ids';\n\n/** The delegated run's interim-update tool (agora `send_voice_update`). */\nexport const VOICE_UPDATE_TOOL_NAME = 'send_voice_update';\n\n/** Trailing hint on the live-session strip, worded once for every surface. */\nexport const VOICE_LIVE_TYPED_HINT = 'typed messages go to the voice conversation';\n\nexport interface VoiceMessageMarker {\n /** The thread message id; a host may not have assigned one yet. */\n messageId: string | undefined;\n /** The thread message's `metadata.custom`, when any. */\n custom: Record<string, unknown> | undefined;\n}\n\n/** Whether a thread message is a voice delegation's anchor (the ask the live\n * voice model handed to the thread), by source or by id prefix. */\nexport function isVoiceDelegationMessage({ messageId, custom }: VoiceMessageMarker): boolean {\n return (\n custom?.source === VOICE_SOURCE_DELEGATION ||\n (typeof messageId === 'string' && messageId.startsWith(VOICE_DELEGATION_ID_PREFIX))\n );\n}\n\nexport interface VoiceProvenance {\n /** Chip copy: \"Listening\", \"Speaking\", \"Spoken\", or \"Delegated from voice\". */\n readonly label: string;\n /** True while the turn is still being heard or spoken. */\n readonly live: boolean;\n}\n\n// These values are read directly by useAuiState/useSyncExternalStore selectors.\n// Equal presentation must retain its identity, even when a transport replaces\n// the message metadata. Fresh objects here cause React's update-depth crash.\nconst SPOKEN_PROVENANCE: VoiceProvenance = Object.freeze({\n label: 'Spoken',\n live: false,\n});\nconst LISTENING_PROVENANCE: VoiceProvenance = Object.freeze({\n label: 'Listening',\n live: true,\n});\nconst SPEAKING_PROVENANCE: VoiceProvenance = Object.freeze({\n label: 'Speaking',\n live: true,\n});\nconst DELEGATED_PROVENANCE: VoiceProvenance = Object.freeze({\n label: 'Delegated from voice',\n live: false,\n});\n\n/**\n * The provenance chip for a message, or `null` for ordinary chat messages so\n * the chip is free to mount on every row. A spoken turn still in flight reads\n * as what is happening (\"Listening\" for the user, \"Speaking\" for the\n * assistant) rather than as a finished \"Spoken\" turn; a typed-in-voice turn\n * is a normal message and gets no chip. Results are immutable and stable for\n * equal presentation, so all surfaces can use this function as a selector.\n */\nexport function voiceProvenanceLabel({\n messageId,\n custom,\n role,\n}: VoiceMessageMarker & { role: 'user' | 'assistant' | string }): VoiceProvenance | null {\n const source = custom?.source;\n if (source === VOICE_SOURCE_SPOKEN) {\n if (custom?.[VOICE_LIVE_KEY] === true) {\n return role === 'user' ? LISTENING_PROVENANCE : SPEAKING_PROVENANCE;\n }\n return SPOKEN_PROVENANCE;\n }\n if (isVoiceDelegationMessage({ messageId, custom })) {\n return DELEGATED_PROVENANCE;\n }\n return null;\n}\n\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n typeof value === 'object' && value !== null && !Array.isArray(value);\n\n/**\n * Whether a part of an assistant message holds the words of a spoken\n * assistant turn.\n *\n * The converter joins consecutive assistant entries into one message. The\n * host appends a live turn while it is heard, and a delegated run keeps\n * appending its own steps after it, so a turn spoken during a run becomes a\n * text part inside the run's message, before the run's later tool calls.\n * Grouped views put the text before the last tool call in the details panel\n * as the run's narration; they use this to keep the spoken words visible.\n *\n * The joined message's `metadata.custom` merges every entry in it, so this\n * reads the part's own entry, which the converter binds to the part.\n */\nexport function isSpokenTurnTextPart(part: { readonly type: string }): boolean {\n if (part.type !== 'text') return false;\n const entries: readonly unknown[] = getExternalStoreMessages<unknown>(\n part as ThreadMessage['content'][number]\n );\n return entries.some((entry) => {\n if (!isRecord(entry) || entry.role !== 'assistant' || !isRecord(entry.metadata)) return false;\n const custom = entry.metadata.custom;\n return isRecord(custom) && custom.source === VOICE_SOURCE_SPOKEN;\n });\n}\n\nexport interface VoiceUpdateToolCall {\n /** `mode: \"speak\"` — read aloud to the user; otherwise a silent progress note. */\n spoken: boolean;\n /** The update's words. */\n text: string;\n /** Whether the live session took it; `null` while the call is still running. */\n delivered: boolean | null;\n}\n\n/**\n * What a `send_voice_update` tool call did, from its arguments and the tool's\n * teaching-text result (agora returns prose, not JSON, so the run can read it).\n */\nexport function describeVoiceUpdateToolCall({\n args,\n result,\n}: {\n args: Record<string, unknown> | undefined;\n result: unknown;\n}): VoiceUpdateToolCall {\n const text = typeof args?.text === 'string' ? args.text.trim() : '';\n const spoken = args?.mode === 'speak';\n if (typeof result !== 'string' || result.trim() === '') {\n return { spoken, text, delivered: null };\n }\n const outcome = result.toLowerCase();\n const failed =\n outcome.includes('could not be delivered') ||\n outcome.includes('was not delivered') ||\n outcome.includes('rejected the update') ||\n outcome.includes('has ended') ||\n outcome.includes('not configured') ||\n outcome.includes('no voice session');\n return { spoken, text, delivered: !failed };\n}\n\n/** The card's status line for a voice update in a given tool-call state. */\nexport function voiceUpdateStatusLabel(\n call: VoiceUpdateToolCall,\n status: 'running' | 'complete' | 'incomplete' | 'requires-action' | undefined\n): string {\n if (status === 'running' || (call.delivered === null && status !== 'incomplete')) {\n return call.spoken ? 'Saying to you…' : 'Noting progress…';\n }\n if (call.delivered === false || status === 'incomplete') {\n return call.spoken ? 'Could not say this to you' : 'Progress note not delivered';\n }\n return call.spoken ? 'Said aloud' : 'Progress noted silently';\n}\n"],"names":[],"mappings":";AAgBO,MAAM,sBAAsB;AAI5B,MAAM,0BAA0B;AAGhC,MAAM,6BAA6B;AAEnC,MAAM,iBAAiB;AAIvB,MAAM,qBAAqB;AAG3B,MAAM,yBAAyB;
|
|
1
|
+
{"version":3,"file":"voice-presentation.js","sources":["../../../../agent-runtime/src/voice-presentation.ts"],"sourcesContent":["/**\n * How voice-mode transcript entries present, shared by every chat surface\n * (Olympus, the Chrome side panel, the mobile app) so a spoken turn, a\n * delegation the live voice model handed off, and an interim spoken update\n * read the same everywhere. The wire contract is the deep-agent host's\n * `additional_kwargs.metadata` (exposed as `message.metadata.custom`):\n *\n * - `source: \"voice\"` — a spoken turn; `voice_live: true` while it is still\n * being heard or spoken (the ephemeral entry the durable row replaces);\n * - `source: \"text\"` — a message typed into the live conversation;\n * - `source: \"voice_delegation\"` (id prefix `voicetask_`) — the unit of work\n * the live voice model delegated to the thread.\n */\nimport { getExternalStoreMessages, type ThreadMessage } from '@assistant-ui/core';\n\n/** `metadata.custom.source` of a spoken turn. */\nexport const VOICE_SOURCE_SPOKEN = 'voice';\n/** `metadata.custom.source` of a message typed into the live conversation. */\nexport const VOICE_SOURCE_TYPED = 'text';\n/** `metadata.custom.source` of a voice delegation's anchor message. */\nexport const VOICE_SOURCE_DELEGATION = 'voice_delegation';\n/** Id prefix of a voice delegation's anchor message (the working signal on\n * hosts that drop the command's metadata). */\nexport const VOICE_DELEGATION_ID_PREFIX = 'voicetask_';\n/** `metadata.custom` flag on a spoken turn still in flight. */\nexport const VOICE_LIVE_KEY = 'voice_live';\n/** `metadata.custom` list of the wire ids a grouped spoken bubble stands for\n * (see `groupSpokenUserTurns`), so id-keyed lookups such as checkpoint markers\n * can resolve any member to the bubble. */\nexport const VOICE_TURN_IDS_KEY = 'voice_turn_ids';\n\n/** The delegated run's interim-update tool (agora `send_voice_update`). */\nexport const VOICE_UPDATE_TOOL_NAME = 'send_voice_update';\n\n/** Trailing hint on the live-session strip, worded once for every surface. */\nexport const VOICE_LIVE_TYPED_HINT = 'typed messages go to the voice conversation';\n\nexport interface VoiceMessageMarker {\n /** The thread message id; a host may not have assigned one yet. */\n messageId: string | undefined;\n /** The thread message's `metadata.custom`, when any. */\n custom: Record<string, unknown> | undefined;\n}\n\n/** Whether a thread message is a voice delegation's anchor (the ask the live\n * voice model handed to the thread), by source or by id prefix. */\nexport function isVoiceDelegationMessage({ messageId, custom }: VoiceMessageMarker): boolean {\n return (\n custom?.source === VOICE_SOURCE_DELEGATION ||\n (typeof messageId === 'string' && messageId.startsWith(VOICE_DELEGATION_ID_PREFIX))\n );\n}\n\nexport interface VoiceProvenance {\n /** Chip copy: \"Listening\", \"Speaking\", \"Spoken\", or \"Delegated from voice\". */\n readonly label: string;\n /** True while the turn is still being heard or spoken. */\n readonly live: boolean;\n}\n\n// These values are read directly by useAuiState/useSyncExternalStore selectors.\n// Equal presentation must retain its identity, even when a transport replaces\n// the message metadata. Fresh objects here cause React's update-depth crash.\nconst SPOKEN_PROVENANCE: VoiceProvenance = Object.freeze({\n label: 'Spoken',\n live: false,\n});\nconst LISTENING_PROVENANCE: VoiceProvenance = Object.freeze({\n label: 'Listening',\n live: true,\n});\nconst SPEAKING_PROVENANCE: VoiceProvenance = Object.freeze({\n label: 'Speaking',\n live: true,\n});\nconst DELEGATED_PROVENANCE: VoiceProvenance = Object.freeze({\n label: 'Delegated from voice',\n live: false,\n});\n\n/**\n * The provenance chip for a message, or `null` for ordinary chat messages so\n * the chip is free to mount on every row. A spoken turn still in flight reads\n * as what is happening (\"Listening\" for the user, \"Speaking\" for the\n * assistant) rather than as a finished \"Spoken\" turn; a typed-in-voice turn\n * is a normal message and gets no chip. Results are immutable and stable for\n * equal presentation, so all surfaces can use this function as a selector.\n */\nexport function voiceProvenanceLabel({\n messageId,\n custom,\n role,\n}: VoiceMessageMarker & { role: 'user' | 'assistant' | string }): VoiceProvenance | null {\n const source = custom?.source;\n if (source === VOICE_SOURCE_SPOKEN) {\n if (custom?.[VOICE_LIVE_KEY] === true) {\n return role === 'user' ? LISTENING_PROVENANCE : SPEAKING_PROVENANCE;\n }\n return SPOKEN_PROVENANCE;\n }\n if (isVoiceDelegationMessage({ messageId, custom })) {\n return DELEGATED_PROVENANCE;\n }\n return null;\n}\n\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n typeof value === 'object' && value !== null && !Array.isArray(value);\n\n/**\n * Whether a part of an assistant message holds the words of a spoken\n * assistant turn.\n *\n * The converter joins consecutive assistant entries into one message. The\n * host appends a live turn while it is heard, and a delegated run keeps\n * appending its own steps after it, so a turn spoken during a run becomes a\n * text part inside the run's message, before the run's later tool calls.\n * Grouped views put the text before the last tool call in the details panel\n * as the run's narration; they use this to keep the spoken words visible.\n *\n * The joined message's `metadata.custom` merges every entry in it, so this\n * reads the part's own entry, which the converter binds to the part.\n */\nexport function isSpokenTurnTextPart(part: { readonly type: string }): boolean {\n if (part.type !== 'text') return false;\n const entries: readonly unknown[] = getExternalStoreMessages<unknown>(\n part as ThreadMessage['content'][number]\n );\n return entries.some((entry) => {\n if (!isRecord(entry) || entry.role !== 'assistant' || !isRecord(entry.metadata)) return false;\n const custom = entry.metadata.custom;\n return isRecord(custom) && custom.source === VOICE_SOURCE_SPOKEN;\n });\n}\n\nexport interface VoiceUpdateToolCall {\n /** `mode: \"speak\"` — read aloud to the user; otherwise a silent progress note. */\n spoken: boolean;\n /** The update's words. */\n text: string;\n /** Whether the live session took it; `null` while the call is still running. */\n delivered: boolean | null;\n}\n\n/**\n * What a `send_voice_update` tool call did, from its arguments and the tool's\n * teaching-text result (agora returns prose, not JSON, so the run can read it).\n */\nexport function describeVoiceUpdateToolCall({\n args,\n result,\n}: {\n args: Record<string, unknown> | undefined;\n result: unknown;\n}): VoiceUpdateToolCall {\n const text = typeof args?.text === 'string' ? args.text.trim() : '';\n const spoken = args?.mode === 'speak';\n if (typeof result !== 'string' || result.trim() === '') {\n return { spoken, text, delivered: null };\n }\n const outcome = result.toLowerCase();\n const failed =\n outcome.includes('could not be delivered') ||\n outcome.includes('was not delivered') ||\n outcome.includes('rejected the update') ||\n outcome.includes('has ended') ||\n outcome.includes('not configured') ||\n outcome.includes('no voice session');\n return { spoken, text, delivered: !failed };\n}\n\n/** The card's status line for a voice update in a given tool-call state. */\nexport function voiceUpdateStatusLabel(\n call: VoiceUpdateToolCall,\n status: 'running' | 'complete' | 'incomplete' | 'requires-action' | undefined\n): string {\n if (status === 'running' || (call.delivered === null && status !== 'incomplete')) {\n return call.spoken ? 'Saying to you…' : 'Noting progress…';\n }\n if (call.delivered === false || status === 'incomplete') {\n return call.spoken ? 'Could not say this to you' : 'Progress note not delivered';\n }\n return call.spoken ? 'Said aloud' : 'Progress noted silently';\n}\n"],"names":[],"mappings":";AAgBO,MAAM,sBAAsB;AAI5B,MAAM,0BAA0B;AAGhC,MAAM,6BAA6B;AAEnC,MAAM,iBAAiB;AAIvB,MAAM,qBAAqB;AAG3B,MAAM,yBAAyB;AAG/B,MAAM,wBAAwB;AAW9B,SAAS,yBAAyB,EAAE,WAAW,UAAuC;AAC3F,UACE,iCAAQ,YAAW,2BAClB,OAAO,cAAc,YAAY,UAAU,WAAW,0BAA0B;AAErF;AAuDA,MAAM,WAAW,CAAC,UAChB,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AAgB9D,SAAS,qBAAqB,MAA0C;AAC7E,MAAI,KAAK,SAAS,OAAQ,QAAO;AACjC,QAAM,UAA8B;AAAA,IAClC;AAAA,EAAA;AAEF,SAAO,QAAQ,KAAK,CAAC,UAAU;AAC7B,QAAI,CAAC,SAAS,KAAK,KAAK,MAAM,SAAS,eAAe,CAAC,SAAS,MAAM,QAAQ,EAAG,QAAO;AACxF,UAAM,SAAS,MAAM,SAAS;AAC9B,WAAO,SAAS,MAAM,KAAK,OAAO,WAAW;AAAA,EAC/C,CAAC;AACH;AAeO,SAAS,4BAA4B;AAAA,EAC1C;AAAA,EACA;AACF,GAGwB;AACtB,QAAM,OAAO,QAAO,6BAAM,UAAS,WAAW,KAAK,KAAK,SAAS;AACjE,QAAM,UAAS,6BAAM,UAAS;AAC9B,MAAI,OAAO,WAAW,YAAY,OAAO,KAAA,MAAW,IAAI;AACtD,WAAO,EAAE,QAAQ,MAAM,WAAW,KAAA;AAAA,EACpC;AACA,QAAM,UAAU,OAAO,YAAA;AACvB,QAAM,SACJ,QAAQ,SAAS,wBAAwB,KACzC,QAAQ,SAAS,mBAAmB,KACpC,QAAQ,SAAS,qBAAqB,KACtC,QAAQ,SAAS,WAAW,KAC5B,QAAQ,SAAS,gBAAgB,KACjC,QAAQ,SAAS,kBAAkB;AACrC,SAAO,EAAE,QAAQ,MAAM,WAAW,CAAC,OAAA;AACrC;AAGO,SAAS,uBACd,MACA,QACQ;AACR,MAAI,WAAW,aAAc,KAAK,cAAc,QAAQ,WAAW,cAAe;AAChF,WAAO,KAAK,SAAS,mBAAmB;AAAA,EAC1C;AACA,MAAI,KAAK,cAAc,SAAS,WAAW,cAAc;AACvD,WAAO,KAAK,SAAS,8BAA8B;AAAA,EACrD;AACA,SAAO,KAAK,SAAS,eAAe;AACtC;"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { LangChainMessage } from '@assistant-ui/react-langgraph';
|
|
2
|
+
/**
|
|
3
|
+
* A live voice session commits a spoken turn per utterance, so one breath of
|
|
4
|
+
* speech reaches the wire as several short human rows. Every chat surface
|
|
5
|
+
* renders consecutive spoken user turns as ONE user message: the run stays
|
|
6
|
+
* grouped until something other than a spoken user turn (the assistant's
|
|
7
|
+
* reply, a typed message, a delegation anchor) closes it. There is no pause
|
|
8
|
+
* threshold on purpose — the transcript is easier to read and reason about as
|
|
9
|
+
* one bubble per exchange.
|
|
10
|
+
*
|
|
11
|
+
* The merged message keeps the FIRST turn's id and metadata, so message
|
|
12
|
+
* actions (edit, retry) anchor where the user started speaking; lists every
|
|
13
|
+
* member's id under `voice_turn_ids`, so a checkpoint written after a later
|
|
14
|
+
* member still finds the bubble; and reads live while any member is still
|
|
15
|
+
* being heard. A turn the history forks at (its branch fan-out lists siblings)
|
|
16
|
+
* always starts a group: the branch picker reads `metadata.custom.branch` off
|
|
17
|
+
* the presented message, so a fork buried inside a group would be unreachable.
|
|
18
|
+
*/
|
|
19
|
+
type SpokenUserTurn = Extract<LangChainMessage, {
|
|
20
|
+
type: 'human';
|
|
21
|
+
}> & {
|
|
22
|
+
content: string;
|
|
23
|
+
};
|
|
24
|
+
/** A spoken (not typed, not delegated) user turn with plain text content. */
|
|
25
|
+
export declare function isSpokenUserTurn(message: LangChainMessage): message is SpokenUserTurn;
|
|
26
|
+
/** Collapse each run of consecutive spoken user turns into one human message. */
|
|
27
|
+
export declare function groupSpokenUserTurns(messages: readonly LangChainMessage[]): LangChainMessage[];
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A Live API rejection the voice host projected (`state.voiceLastError`):
|
|
3
|
+
* the API's error code and message plus, when the host could correlate the
|
|
4
|
+
* error to the command it rejected, that command's event type and target.
|
|
5
|
+
* `null` while the session has had no rejection; reset by every `voice/start`.
|
|
6
|
+
*/
|
|
7
|
+
export interface DeepAgentVoiceWireError {
|
|
8
|
+
code: string;
|
|
9
|
+
message: string;
|
|
10
|
+
requestType: string | null;
|
|
11
|
+
delegationItemId: string | null;
|
|
12
|
+
channel: string | null;
|
|
13
|
+
/** UTC ISO timestamp of the rejection. */
|
|
14
|
+
at: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* User turns this client took back before the run answered them.
|
|
3
|
+
*
|
|
4
|
+
* A user stop before any assistant output retracts the turn server-side — the
|
|
5
|
+
* host drops it from the wire and hands its text back through the stop verdict
|
|
6
|
+
* (see `run/stop` → `retracted`). That verdict is a network round trip away;
|
|
7
|
+
* the client that asked for it already knows the outcome, so it withdraws the
|
|
8
|
+
* turn locally the moment it stops: the converter omits the message (and the
|
|
9
|
+
* "thinking" placeholder it would otherwise earn) until the wire agrees, and
|
|
10
|
+
* the host restores the text to its composer at once. The seam is
|
|
11
|
+
* subscribable so the thread re-converts when a withdrawal opens or closes,
|
|
12
|
+
* the same way a fetched tool output re-runs the converter.
|
|
13
|
+
*/
|
|
14
|
+
export interface DeepAgentWithdrawnTurns {
|
|
15
|
+
/** Whether the transcript should omit the user message `messageId`. */
|
|
16
|
+
isWithdrawn(messageId: string): boolean;
|
|
17
|
+
subscribe(listener: () => void): () => void;
|
|
18
|
+
}
|
|
19
|
+
/** The user turn a stop right now would take back, read off a raw statewire state. */
|
|
20
|
+
export interface DeepAgentWithdrawableTurn {
|
|
21
|
+
messageId: string;
|
|
22
|
+
text: string;
|
|
23
|
+
/** The composer markdown the turn was sent from (see `composer-markdown.ts`), when it carries one. */
|
|
24
|
+
composerMarkdown: string | null;
|
|
25
|
+
runId: string;
|
|
26
|
+
epoch: number | undefined;
|
|
27
|
+
/** The turn is the transcript's only visible message: taking it back empties the chat. */
|
|
28
|
+
first: boolean;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* The turn an immediate user stop retracts, or `null` when the stop would be
|
|
32
|
+
* an ordinary one. Mirrors the host's own predicate from the client's side:
|
|
33
|
+
* the run is live and the transcript's last visible message is the user's —
|
|
34
|
+
* nothing has answered it yet. A run whose latest visible message is the
|
|
35
|
+
* assistant's (any output, a notice) keeps its turn; so does a run the wire
|
|
36
|
+
* does not show as running.
|
|
37
|
+
*/
|
|
38
|
+
export declare function readDeepAgentWithdrawableTurn(state: unknown): DeepAgentWithdrawableTurn | null;
|
|
39
|
+
/** A send the transport failed, as the thread retains it in its failed lane. */
|
|
40
|
+
export interface DeepAgentFailedSend {
|
|
41
|
+
/** The failed message's id — the lane keeps entries by identity. */
|
|
42
|
+
id: string;
|
|
43
|
+
/** The message's text parts joined the way the library hands them back to the composer. */
|
|
44
|
+
text: string;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* The sends the thread retains in its failed lane (`runs.failed`, read
|
|
48
|
+
* structurally off the thread extras). A withdrawn turn never lands there —
|
|
49
|
+
* its send was accepted — so the lane tells a failed send's text apart from a
|
|
50
|
+
* stop verdict's echo of the same words. Absent extras or lane read as empty.
|
|
51
|
+
*/
|
|
52
|
+
export declare function readDeepAgentFailedSends(extras: unknown): DeepAgentFailedSend[];
|
|
53
|
+
/**
|
|
54
|
+
* Whether `text`, just handed to the composer, is a failed send's rather than
|
|
55
|
+
* a stop verdict's echo: some failed-lane entry carries that text and is new
|
|
56
|
+
* since `seen` last recorded the lane. Every entry now in the lane is recorded
|
|
57
|
+
* as seen — a failure the composer has already been handed back (or that
|
|
58
|
+
* predates a withdrawal, see the caller) cannot be the one returning this
|
|
59
|
+
* text, however many times the same words come back later.
|
|
60
|
+
*/
|
|
61
|
+
export declare function claimDeepAgentFailedSendText({ extras, text, seen, }: {
|
|
62
|
+
extras: unknown;
|
|
63
|
+
text: string;
|
|
64
|
+
seen: Set<string>;
|
|
65
|
+
}): boolean;
|
|
66
|
+
/**
|
|
67
|
+
* The wire's answer to a withdrawal: `retracted` once the turn is gone from
|
|
68
|
+
* the wire altogether — dropped from the transcript and held in no lane —
|
|
69
|
+
* with the run at rest (or the host's retraction named); `kept` once the wire
|
|
70
|
+
* shows it stayed — the run answered it, or rested with it durably in place
|
|
71
|
+
* and no retraction named, so the stop was an ordinary one — and `pending`
|
|
72
|
+
* while neither has happened (or before any snapshot).
|
|
73
|
+
*
|
|
74
|
+
* The stop lifecycle passes through snapshots that look like neither: the
|
|
75
|
+
* run's status leaves `running` (`stopping`, or the mount's `ready` before the
|
|
76
|
+
* host admits the dispatch) while the turn is still materialized from the
|
|
77
|
+
* `dispatching` lane, and the host hands a retracted turn back through the
|
|
78
|
+
* queue lane for the stopping client to pop. A turn the host still holds in a
|
|
79
|
+
* lane is not durably kept, and a turn missing from a run that is still live
|
|
80
|
+
* is not durably gone — both stay `pending`. A live run that is not the one
|
|
81
|
+
* the turn was withdrawn from (`withdrawnFrom`: a newer send's epoch) says
|
|
82
|
+
* nothing about it, so a turn missing under it is gone. `retractionNamed` is
|
|
83
|
+
* the host's own verdict for this run (`retractedRun`), which lands ahead of
|
|
84
|
+
* the drop.
|
|
85
|
+
*/
|
|
86
|
+
export type DeepAgentWithdrawnTurnVerdict = 'pending' | 'retracted' | 'kept';
|
|
87
|
+
/** The run a turn was withdrawn from, as the withdrawal recorded it. */
|
|
88
|
+
export interface DeepAgentWithdrawnFromRun {
|
|
89
|
+
runId: string;
|
|
90
|
+
epoch: number | undefined;
|
|
91
|
+
}
|
|
92
|
+
export declare function readDeepAgentWithdrawnTurnVerdict({ state, messageId, retractionNamed, withdrawnFrom, }: {
|
|
93
|
+
state: unknown;
|
|
94
|
+
messageId: string;
|
|
95
|
+
retractionNamed: boolean;
|
|
96
|
+
withdrawnFrom?: DeepAgentWithdrawnFromRun;
|
|
97
|
+
}): DeepAgentWithdrawnTurnVerdict;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useQuery, QueryClientContext, QueryClient } from "@tanstack/react-query";
|
|
2
|
-
import {
|
|
2
|
+
import { useContext, useState, useMemo, useCallback } from "react";
|
|
3
3
|
import { AthenaAuthContext } from "../auth/AthenaAuthContext.js";
|
|
4
4
|
import { fetchGraphQL, AthenaGraphQLError } from "../chat-ui/mentions/suggestions/data/api-client.js";
|
|
5
5
|
import { useAthenaConfig } from "../provider/AthenaContext.js";
|
package/dist/chat/AthenaChat.cjs
CHANGED
|
@@ -14,9 +14,12 @@ const wakeMarker = require("../chat-ui/messages/wake-marker.cjs");
|
|
|
14
14
|
const toolFallback = require("../tools/tool-fallback.cjs");
|
|
15
15
|
const appendDocumentToolUi = require("../tools/append-document-tool-ui.cjs");
|
|
16
16
|
const readAssetToolUi = require("../tools/read-asset-tool-ui.cjs");
|
|
17
|
+
const inlineTools = require("../tools/inline-tools.cjs");
|
|
18
|
+
const subagentTaskToolUi = require("../tools/subagent-task-tool-ui.cjs");
|
|
17
19
|
const toolUis = require("../tools/tool-uis.cjs");
|
|
18
20
|
const SuperGroupingCard = require("./super-grouping/SuperGroupingCard.cjs");
|
|
19
21
|
const SuperGroupingTranscript = require("./super-grouping/SuperGroupingTranscript.cjs");
|
|
22
|
+
const useStatewireApprovalRequest = require("./use-statewire-approval-request.cjs");
|
|
20
23
|
const NestedPtcMessages = require("../tools/NestedPtcMessages.cjs");
|
|
21
24
|
const tooltipIconButton = require("./tooltip-icon-button.cjs");
|
|
22
25
|
const button = require("../ui/button.cjs");
|
|
@@ -44,6 +47,7 @@ const athenaChatWelcome = require("./athena-chat-welcome.cjs");
|
|
|
44
47
|
const athenaComposerControls = require("./athena-composer-controls.cjs");
|
|
45
48
|
const composerKeyboardHint = require("./composer-keyboard-hint.cjs");
|
|
46
49
|
const usePrefersReducedMotion = require("../lib/use-prefers-reduced-motion.cjs");
|
|
50
|
+
const statewireSessionLane = require("../runtime/statewire-session-lane.cjs");
|
|
47
51
|
const AthenaAuthContext = require("../auth/AthenaAuthContext.cjs");
|
|
48
52
|
const react = require("@assistant-ui/react");
|
|
49
53
|
const lucideReact = require("lucide-react");
|
|
@@ -66,9 +70,17 @@ const index = require("../toolkits/index.cjs");
|
|
|
66
70
|
const runActivity = require("./run-activity.cjs");
|
|
67
71
|
const messageTime = require("./message-time.cjs");
|
|
68
72
|
const threadScrollToBottom = require("./thread-scroll-to-bottom.cjs");
|
|
73
|
+
const reactQuery = require("@tanstack/react-query");
|
|
74
|
+
const runtimeCatalog = require("../catalog/runtime-catalog.cjs");
|
|
75
|
+
const statewireLifecycle = require("../runtime/statewire-lifecycle.cjs");
|
|
76
|
+
const chatVoiceControls = require("./chat-voice-controls.cjs");
|
|
77
|
+
const toolNames = require("../agent-runtime/src/tool-names.cjs");
|
|
78
|
+
const subagents = require("../agent-runtime/src/subagents.cjs");
|
|
69
79
|
const githubWakeEvent = require("../agent-runtime/src/github-wake-event.cjs");
|
|
70
80
|
const subscriptionWakeEvent = require("../agent-runtime/src/subscription-wake-event.cjs");
|
|
71
81
|
const threadStatus = require("../agent-runtime/src/thread-status.cjs");
|
|
82
|
+
const useDeepAgentChatOutbox = require("../agent-runtime/src/use-deep-agent-chat-outbox.cjs");
|
|
83
|
+
const chatOutbox = require("../agent-runtime/src/chat-outbox.cjs");
|
|
72
84
|
const cnfast = require("cnfast");
|
|
73
85
|
const DEFAULT_COMPOSER_PLACEHOLDER = "Type @ to tag an asset";
|
|
74
86
|
function QuotePostMessageBridge() {
|
|
@@ -138,7 +150,11 @@ const withNestedPtcMessages = (ToolUI) => {
|
|
|
138
150
|
};
|
|
139
151
|
return ToolUIWithNestedPtcMessages;
|
|
140
152
|
};
|
|
141
|
-
const AthenaChat = ({
|
|
153
|
+
const AthenaChat = (props) => {
|
|
154
|
+
const queryClient = runtimeCatalog.useCatalogQueryClient();
|
|
155
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactQuery.QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ jsxRuntime.jsx(AthenaChatContent, { ...props }) });
|
|
156
|
+
};
|
|
157
|
+
const AthenaChatContent = ({
|
|
142
158
|
className,
|
|
143
159
|
welcomeMessage = "Hello there!",
|
|
144
160
|
welcomeSubtext = "What can I help you with?",
|
|
@@ -151,7 +167,8 @@ const AthenaChat = ({
|
|
|
151
167
|
components,
|
|
152
168
|
groupToolCalls = true,
|
|
153
169
|
composer: composerSlots,
|
|
154
|
-
dictation = true
|
|
170
|
+
dictation = true,
|
|
171
|
+
voice = true
|
|
155
172
|
}) => {
|
|
156
173
|
var _a, _b, _c, _d, _e, _f;
|
|
157
174
|
const athenaConfig = AthenaContext.useAthenaConfig();
|
|
@@ -251,7 +268,7 @@ const AthenaChat = ({
|
|
|
251
268
|
}),
|
|
252
269
|
[AssistantMessageComponent, UserMessageComponent]
|
|
253
270
|
);
|
|
254
|
-
return /* @__PURE__ */ jsxRuntime.jsx(AthenaChatDefaultComponentsContext.Provider, { value: defaultComponentsContextValue, children: /* @__PURE__ */ jsxRuntime.jsx(AthenaChatErrorBoundary.AthenaChatErrorBoundary, { children: /* @__PURE__ */ jsxRuntime.jsx(toolFallback.ToolFallbackAppearanceProvider, { appearance: "thread", children: /* @__PURE__ */ jsxRuntime.jsx(apiClient.MentionAuthCtx.Provider, { value: mentionAuth, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
271
|
+
return /* @__PURE__ */ jsxRuntime.jsx(AthenaChatDefaultComponentsContext.Provider, { value: defaultComponentsContextValue, children: /* @__PURE__ */ jsxRuntime.jsx(AthenaChatErrorBoundary.AthenaChatErrorBoundary, { children: /* @__PURE__ */ jsxRuntime.jsx(useStatewireApprovalRequest.StatewireApprovalWaitProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(toolFallback.ToolFallbackAppearanceProvider, { appearance: "thread", children: /* @__PURE__ */ jsxRuntime.jsx(apiClient.MentionAuthCtx.Provider, { value: mentionAuth, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
255
272
|
chatThreadShell.ChatThreadShell,
|
|
256
273
|
{
|
|
257
274
|
overlay: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -293,13 +310,14 @@ const AthenaChat = ({
|
|
|
293
310
|
tools,
|
|
294
311
|
slots: composerSlots,
|
|
295
312
|
dictation,
|
|
313
|
+
voice: readOnly ? false : voice,
|
|
296
314
|
welcomeSuggestionCount: welcomeSuggestions.length
|
|
297
315
|
}
|
|
298
316
|
)
|
|
299
317
|
] }) })
|
|
300
318
|
] })
|
|
301
319
|
}
|
|
302
|
-
) }) }) }, statewireThreadId ?? void 0) });
|
|
320
|
+
) }) }) }) }, statewireThreadId ?? void 0) });
|
|
303
321
|
};
|
|
304
322
|
const THREAD_VIEWPORT_ATTR = "data-aui-thread-viewport";
|
|
305
323
|
const useScrollToTop = () => {
|
|
@@ -351,20 +369,32 @@ const ATHENA_CHAT_MENTION_CATEGORIES = [
|
|
|
351
369
|
"projects",
|
|
352
370
|
"folders"
|
|
353
371
|
];
|
|
354
|
-
const AthenaChatComposer = ({ tools, slots, dictation, welcomeSuggestionCount }) => {
|
|
372
|
+
const AthenaChatComposer = ({ tools, slots, dictation, voice: voiceOptions, welcomeSuggestionCount }) => {
|
|
355
373
|
const aui = react.useAui();
|
|
356
374
|
const threadId = threadIdContext.useAthenaStatewireThreadId();
|
|
357
375
|
const { appUrl } = AthenaContext.useAthenaConfig();
|
|
358
|
-
const { attachments, clearAttachments, isUploading } = AttachmentContext.useAttachments();
|
|
376
|
+
const { attachments, clearAttachments, isUploading, notice: attachNotice, setNotice: setAttachNotice } = AttachmentContext.useAttachments();
|
|
359
377
|
const { quote, clearQuote } = QuoteContext.useQuote();
|
|
360
378
|
const { attachFiles } = useAttachFiles.useAttachFiles();
|
|
379
|
+
const sessionLane = statewireSessionLane.useStatewireSessionLane();
|
|
361
380
|
const composerRef = react$1.useRef(null);
|
|
362
381
|
const [hasText, setHasText] = react$1.useState(false);
|
|
382
|
+
const [composerNotice, setComposerNotice] = react$1.useState(null);
|
|
383
|
+
const onDraftStateChange = react$1.useCallback(
|
|
384
|
+
(next) => {
|
|
385
|
+
setHasText(next);
|
|
386
|
+
setComposerNotice(null);
|
|
387
|
+
setAttachNotice(null);
|
|
388
|
+
},
|
|
389
|
+
[setAttachNotice]
|
|
390
|
+
);
|
|
391
|
+
const notice = composerNotice ?? attachNotice;
|
|
363
392
|
const isRunning = react.useAuiState((state) => {
|
|
364
393
|
var _a;
|
|
365
394
|
return ((_a = state.optional.thread) == null ? void 0 : _a.isRunning) ?? false;
|
|
366
395
|
});
|
|
367
396
|
const connection = threadStatus.useDeepAgentConnection();
|
|
397
|
+
const { voice, active: voiceActive, enabled: voiceEnabled, audioRef } = chatVoiceControls.useComposerChatVoice({ options: voiceOptions });
|
|
368
398
|
const runLive = react.useAuiState((state) => {
|
|
369
399
|
const thread = state.optional.thread;
|
|
370
400
|
return thread ? threadStatus.readRunLive(thread, connection) : false;
|
|
@@ -401,7 +431,7 @@ const AthenaChatComposer = ({ tools, slots, dictation, welcomeSuggestionCount })
|
|
|
401
431
|
onAutoEnd: appendSpokenText
|
|
402
432
|
});
|
|
403
433
|
const recording = dictationEnabled && dictationCtl.isActive;
|
|
404
|
-
const showMic = dictationEnabled && dictationCtl.isSupported;
|
|
434
|
+
const showMic = dictationEnabled && dictationCtl.isSupported && !voiceActive;
|
|
405
435
|
const { isActive: dictationActive, cancel: cancelDictation } = dictationCtl;
|
|
406
436
|
react$1.useEffect(() => {
|
|
407
437
|
if (!dictationEnabled && dictationActive) cancelDictation();
|
|
@@ -451,8 +481,38 @@ const AthenaChatComposer = ({ tools, slots, dictation, welcomeSuggestionCount })
|
|
|
451
481
|
[appUrl, aui, clearAttachments, clearQuote, threadId]
|
|
452
482
|
);
|
|
453
483
|
const interceptSubmit = react$1.useCallback(
|
|
454
|
-
(text, draftMarkdown) =>
|
|
455
|
-
|
|
484
|
+
async (text, draftMarkdown) => {
|
|
485
|
+
if (attachmentsRef.current.length > 0 || quoteRef.current !== null) {
|
|
486
|
+
return sendComposed({ text, draftMarkdown });
|
|
487
|
+
}
|
|
488
|
+
return voice.phase === "live" && text.length > 0 ? voice.sendUserText(text) : false;
|
|
489
|
+
},
|
|
490
|
+
[sendComposed, voice.phase, voice.sendUserText]
|
|
491
|
+
);
|
|
492
|
+
const hasPendingExtras = react$1.useCallback(
|
|
493
|
+
() => attachmentsRef.current.length > 0 || quoteRef.current !== null,
|
|
494
|
+
[]
|
|
495
|
+
);
|
|
496
|
+
const holdPendingExtras = react$1.useCallback(
|
|
497
|
+
({
|
|
498
|
+
outbox,
|
|
499
|
+
send,
|
|
500
|
+
attachments: attachments2
|
|
501
|
+
}) => {
|
|
502
|
+
const held = buildComposedMessage.holdComposedSend({
|
|
503
|
+
outbox,
|
|
504
|
+
attachments: attachmentsRef.current,
|
|
505
|
+
carried: attachments2,
|
|
506
|
+
quote: quoteRef.current,
|
|
507
|
+
send,
|
|
508
|
+
appUrl
|
|
509
|
+
});
|
|
510
|
+
if (!held) return false;
|
|
511
|
+
clearAttachments();
|
|
512
|
+
clearQuote();
|
|
513
|
+
return true;
|
|
514
|
+
},
|
|
515
|
+
[appUrl, clearAttachments, clearQuote]
|
|
456
516
|
);
|
|
457
517
|
const fileIntake = react$1.useMemo(
|
|
458
518
|
() => ({
|
|
@@ -470,6 +530,7 @@ const AthenaChatComposer = ({ tools, slots, dictation, welcomeSuggestionCount })
|
|
|
470
530
|
const { text: spoken, error } = await dictationCtl.stop();
|
|
471
531
|
appendSpokenText(spoken);
|
|
472
532
|
if (error) return;
|
|
533
|
+
if (sessionLane == null ? void 0 : sessionLane.isPending()) await sessionLane.whenKnown();
|
|
473
534
|
const send = ((_b = (_a = composerRef.current) == null ? void 0 : _a.captureSend) == null ? void 0 : _b.call(_a)) ?? {
|
|
474
535
|
text: aui.composer.getState().text ?? "",
|
|
475
536
|
draftMarkdown: aui.composer.getState().text ?? ""
|
|
@@ -497,101 +558,111 @@ const AthenaChatComposer = ({ tools, slots, dictation, welcomeSuggestionCount })
|
|
|
497
558
|
composerMessage.prepareComposerSend({ threadId, ...send });
|
|
498
559
|
aui.composer.setText(send.text);
|
|
499
560
|
aui.composer.send({ steer: false });
|
|
500
|
-
}, [appendSpokenText, aui, dictationCtl, isRunning, sendComposed, slots, threadId]);
|
|
501
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
502
|
-
"
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
515
|
-
/* @__PURE__ */ jsxRuntime.
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
transcript: dictationCtl.transcript,
|
|
539
|
-
stream: dictationCtl.stream,
|
|
540
|
-
stoppingLabel: dictationCtl.engine.stoppingLabel
|
|
541
|
-
}
|
|
542
|
-
),
|
|
543
|
-
dictationEnabled && dictationCtl.status === dictationState.DICTATION_STATUSES.error && dictationCtl.error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "aui-dictation-error px-1.5 pb-1 text-destructive text-xs", role: "alert", children: dictationCtl.error.message })
|
|
544
|
-
] }),
|
|
545
|
-
toolbarStart: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1", children: recording ? /* @__PURE__ */ jsxRuntime.jsx(dictationControls.DictationCancelButton, { onClick: dictationCtl.cancel }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
546
|
-
/* @__PURE__ */ jsxRuntime.jsx(FileUploadButton.FileUploadButton, { className: "aui-composer-attach size-8 rounded-full p-0 disabled:opacity-30" }),
|
|
547
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
548
|
-
athenaComposerControls.AthenaComposerMentionButton,
|
|
549
|
-
{
|
|
550
|
-
onClick: () => {
|
|
551
|
-
var _a, _b;
|
|
552
|
-
return (_b = (_a = composerRef.current) == null ? void 0 : _a.openMentionMenu) == null ? void 0 : _b.call(_a);
|
|
561
|
+
}, [appendSpokenText, aui, dictationCtl, isRunning, sendComposed, sessionLane, slots, threadId]);
|
|
562
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(ComposerDropZone.ComposerDropZone, { onDragActiveChange: setDragActive, children: [
|
|
563
|
+
/* @__PURE__ */ jsxRuntime.jsx("audio", { ref: audioRef, autoPlay: true, playsInline: true }),
|
|
564
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
565
|
+
"div",
|
|
566
|
+
{
|
|
567
|
+
className: cnfast.cn("aui-composer-entrance", entrance.className),
|
|
568
|
+
style: entrance.style,
|
|
569
|
+
onFocus: keyboardHint.onFocus,
|
|
570
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
571
|
+
chatComposerDock.ChatComposerDock,
|
|
572
|
+
{
|
|
573
|
+
appearance: "paper",
|
|
574
|
+
dragActive,
|
|
575
|
+
aboveSurface: /* @__PURE__ */ jsxRuntime.jsx(threadScrollToBottom.ThreadScrollToBottom, {}),
|
|
576
|
+
beforeEditor: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
577
|
+
/* @__PURE__ */ jsxRuntime.jsx(chatVoiceControls.ChatVoiceStatus, { voice }),
|
|
578
|
+
/* @__PURE__ */ jsxRuntime.jsx(ComposerQuotePreview.ComposerQuotePreview, {}),
|
|
579
|
+
/* @__PURE__ */ jsxRuntime.jsx(ComposerAttachmentPreview.ComposerAttachmentPreview, {})
|
|
580
|
+
] }),
|
|
581
|
+
editor: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
582
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cnfast.cn(recording && "hidden"), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
583
|
+
tiptapComposer.TiptapComposer,
|
|
584
|
+
{
|
|
585
|
+
ref: composerRef,
|
|
586
|
+
threadId,
|
|
587
|
+
appearance: "paper",
|
|
588
|
+
placeholder: (runLive ? slots == null ? void 0 : slots.runningPlaceholder : void 0) ?? (slots == null ? void 0 : slots.placeholder) ?? DEFAULT_COMPOSER_PLACEHOLDER,
|
|
589
|
+
tools,
|
|
590
|
+
rootCategories,
|
|
591
|
+
onDraftStateChange,
|
|
592
|
+
waitForHostUploads,
|
|
593
|
+
interceptSubmit,
|
|
594
|
+
hasPendingExtras,
|
|
595
|
+
holdPendingExtras,
|
|
596
|
+
onAttachmentError: setComposerNotice,
|
|
597
|
+
fileIntake,
|
|
598
|
+
onSubmitted: keyboardHint.onSubmitted
|
|
553
599
|
}
|
|
554
|
-
}
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
}
|
|
566
|
-
),
|
|
567
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
600
|
+
) }),
|
|
601
|
+
notice && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "aui-composer-notice px-1.5 pb-1 text-destructive text-xs", role: "alert", children: notice }),
|
|
602
|
+
recording && /* @__PURE__ */ jsxRuntime.jsx(
|
|
603
|
+
DictationStrip.DictationStrip,
|
|
604
|
+
{
|
|
605
|
+
status: dictationCtl.status,
|
|
606
|
+
transcript: dictationCtl.transcript,
|
|
607
|
+
stream: dictationCtl.stream,
|
|
608
|
+
stoppingLabel: dictationCtl.engine.stoppingLabel
|
|
609
|
+
}
|
|
610
|
+
),
|
|
611
|
+
dictationEnabled && dictationCtl.status === dictationState.DICTATION_STATUSES.error && dictationCtl.error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "aui-dictation-error px-1.5 pb-1 text-destructive text-xs", role: "alert", children: dictationCtl.error.message })
|
|
612
|
+
] }),
|
|
613
|
+
toolbarStart: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1", children: recording ? /* @__PURE__ */ jsxRuntime.jsx(dictationControls.DictationCancelButton, { onClick: dictationCtl.cancel }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
614
|
+
/* @__PURE__ */ jsxRuntime.jsx(FileUploadButton.FileUploadButton, { className: "aui-composer-attach size-8 rounded-full p-0 disabled:opacity-30" }),
|
|
615
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
616
|
+
athenaComposerControls.AthenaComposerMentionButton,
|
|
617
|
+
{
|
|
618
|
+
onClick: () => {
|
|
619
|
+
var _a, _b;
|
|
620
|
+
return (_b = (_a = composerRef.current) == null ? void 0 : _a.openMentionMenu) == null ? void 0 : _b.call(_a);
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
),
|
|
624
|
+
/* @__PURE__ */ jsxRuntime.jsx(chatPickers.AthenaChatModeMenu, {}),
|
|
625
|
+
slots == null ? void 0 : slots.toolbarStart
|
|
626
|
+
] }) }),
|
|
627
|
+
toolbarEnd: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1", children: recording ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
628
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
629
|
+
dictationControls.DictationStopButton,
|
|
630
|
+
{
|
|
631
|
+
onClick: () => void stopDictation(),
|
|
632
|
+
disabled: dictationCtl.status === dictationState.DICTATION_STATUSES.stopping
|
|
633
|
+
}
|
|
634
|
+
),
|
|
635
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
636
|
+
athenaComposerControls.AthenaComposerSendButton,
|
|
637
|
+
{
|
|
638
|
+
action: isRunning ? "queue" : "send",
|
|
639
|
+
onSend: () => void sendDictation(),
|
|
640
|
+
disabled: dictationCtl.status !== dictationState.DICTATION_STATUSES.listening || isUploading,
|
|
641
|
+
title: isUploading ? "Upload in progress..." : void 0
|
|
642
|
+
}
|
|
643
|
+
)
|
|
644
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
645
|
+
slots == null ? void 0 : slots.toolbarEnd,
|
|
646
|
+
showMic && /* @__PURE__ */ jsxRuntime.jsx(dictationControls.DictationMicButton, { onClick: dictationCtl.start, disabled: isUploading }),
|
|
647
|
+
voiceEnabled && /* @__PURE__ */ jsxRuntime.jsx(chatVoiceControls.ChatVoiceButton, { voice, disabled: isUploading || dictationCtl.isActive || !statewireLifecycle.isStatewireChannelLive(connection) }),
|
|
648
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
649
|
+
composerSendOrStop.ComposerSendOrStop,
|
|
650
|
+
{
|
|
651
|
+
composerRef,
|
|
652
|
+
hasDraft: hasText || hasExtras,
|
|
653
|
+
liveVoice: voice.phase === "live" && !hasExtras,
|
|
654
|
+
sendBlockedReason: isUploading ? "Upload in progress..." : null,
|
|
655
|
+
onBeforeSend: slots == null ? void 0 : slots.onBeforeSend,
|
|
656
|
+
components: athenaComposerControls.ATHENA_COMPOSER_COMPONENTS
|
|
657
|
+
}
|
|
658
|
+
)
|
|
659
|
+
] }) }),
|
|
660
|
+
belowSurface: /* @__PURE__ */ jsxRuntime.jsx(composerKeyboardHint.ComposerKeyboardHint, { visible: keyboardHint.visible })
|
|
661
|
+
}
|
|
662
|
+
)
|
|
663
|
+
}
|
|
664
|
+
)
|
|
665
|
+
] });
|
|
595
666
|
};
|
|
596
667
|
const MessageError = () => /* @__PURE__ */ jsxRuntime.jsx(react.MessagePrimitive.Error, { children: /* @__PURE__ */ jsxRuntime.jsxs(react.ErrorPrimitive.Root, { className: "aui-message-error-root mt-2 flex items-start gap-2 rounded-md border border-destructive bg-destructive/10 p-3 text-destructive text-sm dark:bg-destructive/5 dark:text-red-200", children: [
|
|
597
668
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertCircleIcon, { className: "mt-0.5 size-4 shrink-0" }),
|
|
@@ -842,6 +913,7 @@ const AthenaReasoningPart = ({
|
|
|
842
913
|
);
|
|
843
914
|
};
|
|
844
915
|
const noToolGrouping = () => null;
|
|
916
|
+
const isInlineToolOrSubagent = (toolName) => toolName === toolNames.TASK_TOOL_NAME || inlineTools.isSdkInlineTool(toolName);
|
|
845
917
|
const AthenaAssistantMessage = ({
|
|
846
918
|
toolUIs,
|
|
847
919
|
AvatarComponent,
|
|
@@ -859,6 +931,8 @@ const AthenaAssistantMessage = ({
|
|
|
859
931
|
}
|
|
860
932
|
return wrappedToolUIs;
|
|
861
933
|
}, [toolUIs]);
|
|
934
|
+
const isInlineTool = toolUIs[toolNames.TASK_TOOL_NAME] === subagentTaskToolUi.SubagentTaskToolUI ? isInlineToolOrSubagent : inlineTools.isSdkInlineTool;
|
|
935
|
+
const waitingToolCallIds = subagents.useTurnToolCallsAwaitingApproval(useStatewireApprovalRequest.useApprovalWaitInScope().toolCallIds);
|
|
862
936
|
const nestedPtcComponents = react$1.useMemo(
|
|
863
937
|
() => ({
|
|
864
938
|
Text: TextComponent,
|
|
@@ -896,6 +970,8 @@ const AthenaAssistantMessage = ({
|
|
|
896
970
|
toolUIs: toolUIsWithNestedMessages,
|
|
897
971
|
TextComponent,
|
|
898
972
|
ReasoningComponent: effectiveReasoningComponent,
|
|
973
|
+
isInlineTool,
|
|
974
|
+
waitingToolCallIds,
|
|
899
975
|
renderRunningMeta: renderGroupedRunningMeta
|
|
900
976
|
}
|
|
901
977
|
),
|
|
@@ -953,7 +1029,20 @@ const EditMessageButton = () => {
|
|
|
953
1029
|
const allowEdit = react.useAuiState((s) => s.thread.capabilities.edit);
|
|
954
1030
|
const isRunning = useAthenaRunLive.useAthenaRunLive();
|
|
955
1031
|
const readOnly = messageActionsConfig.useMessageActionsReadOnly();
|
|
1032
|
+
const reachable = useDeepAgentChatOutbox.useChatOutboxReachable(useDeepAgentChatOutbox.useDeepAgentChatOutboxContext());
|
|
956
1033
|
if (!allowEdit || isRunning || readOnly) return null;
|
|
1034
|
+
if (!reachable) {
|
|
1035
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1036
|
+
tooltipIconButton.TooltipIconButton,
|
|
1037
|
+
{
|
|
1038
|
+
tooltip: chatOutbox.CHAT_EDIT_UNREACHABLE_LABEL,
|
|
1039
|
+
"aria-disabled": true,
|
|
1040
|
+
"data-testid": "chat-message-edit-unreachable",
|
|
1041
|
+
className: "cursor-not-allowed opacity-50",
|
|
1042
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.PencilIcon, {})
|
|
1043
|
+
}
|
|
1044
|
+
);
|
|
1045
|
+
}
|
|
957
1046
|
return /* @__PURE__ */ jsxRuntime.jsx(react.ActionBarPrimitive.Edit, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(tooltipIconButton.TooltipIconButton, { tooltip: "Edit", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.PencilIcon, {}) }) });
|
|
958
1047
|
};
|
|
959
1048
|
const AthenaUserActionBar = () => {
|