@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
package/dist/chat/AthenaChat.js
CHANGED
|
@@ -12,9 +12,12 @@ import { WakeMarkerMessage } from "../chat-ui/messages/wake-marker.js";
|
|
|
12
12
|
import { ToolFallback, ToolFallbackAppearanceProvider } from "../tools/tool-fallback.js";
|
|
13
13
|
import { AppendDocumentToolUI } from "../tools/append-document-tool-ui.js";
|
|
14
14
|
import { ReadAssetToolUI } from "../tools/read-asset-tool-ui.js";
|
|
15
|
+
import { isSdkInlineTool } from "../tools/inline-tools.js";
|
|
16
|
+
import { SubagentTaskToolUI } from "../tools/subagent-task-tool-ui.js";
|
|
15
17
|
import { TOOL_UI_REGISTRY } from "../tools/tool-uis.js";
|
|
16
18
|
import { SuperGroupingFinalText } from "./super-grouping/SuperGroupingCard.js";
|
|
17
19
|
import { SuperGroupingTranscript } from "./super-grouping/SuperGroupingTranscript.js";
|
|
20
|
+
import { useApprovalWaitInScope, StatewireApprovalWaitProvider } from "./use-statewire-approval-request.js";
|
|
18
21
|
import { NestedPtcComponentsProvider, useNestedPtcComponents, NestedPtcMessages } from "../tools/NestedPtcMessages.js";
|
|
19
22
|
import { TooltipIconButton } from "./tooltip-icon-button.js";
|
|
20
23
|
import { Button } from "../ui/button.js";
|
|
@@ -42,8 +45,9 @@ import { DEFAULT_WELCOME_SUGGESTIONS, AthenaChatWelcomeSuggestions, AthenaChatWe
|
|
|
42
45
|
import { AthenaComposerSendButton, ATHENA_COMPOSER_COMPONENTS, AthenaComposerMentionButton } from "./athena-composer-controls.js";
|
|
43
46
|
import { useComposerKeyboardHint, ComposerKeyboardHint } from "./composer-keyboard-hint.js";
|
|
44
47
|
import { usePrefersReducedMotion } from "../lib/use-prefers-reduced-motion.js";
|
|
48
|
+
import { useStatewireSessionLane } from "../runtime/statewire-session-lane.js";
|
|
45
49
|
import { AthenaAuthContext } from "../auth/AthenaAuthContext.js";
|
|
46
|
-
import { useAuiState, ActionBarPrimitive, ActionBarMorePrimitive, MessagePrimitive,
|
|
50
|
+
import { useAuiState, ActionBarPrimitive, ActionBarMorePrimitive, MessagePrimitive, AuiIf, ErrorPrimitive, ThreadPrimitive, useAui } from "@assistant-ui/react";
|
|
47
51
|
import { MoreHorizontalIcon, DownloadIcon, ExternalLinkIcon, BrainIcon, ChevronRightIcon, CheckIcon, CopyIcon, RefreshCwIcon, AlertCircleIcon, ArrowUpIcon, PencilIcon } from "lucide-react";
|
|
48
52
|
import { useMemo, useContext, useState, useRef, useEffect, createContext, useCallback } from "react";
|
|
49
53
|
import { useAthenaThreadId, AthenaStatewireThreadIdContext, useAthenaStatewireThreadId } from "../threads/thread-id-context.js";
|
|
@@ -55,7 +59,7 @@ import { ComposerAttachmentPreview } from "../composer/ComposerAttachmentPreview
|
|
|
55
59
|
import { ComposerDropZone } from "../composer/ComposerDropZone.js";
|
|
56
60
|
import { QuoteProvider, useQuoteFromPostMessage, useQuote } from "../composer/QuoteContext.js";
|
|
57
61
|
import { AttachmentProvider, useAttachments } from "../composer/AttachmentContext.js";
|
|
58
|
-
import { buildComposedSend } from "../composer/build-composed-message.js";
|
|
62
|
+
import { buildComposedSend, holdComposedSend } from "../composer/build-composed-message.js";
|
|
59
63
|
import { useAttachFiles } from "../composer/useAttachFiles.js";
|
|
60
64
|
import { useAthenaConfig } from "../provider/AthenaContext.js";
|
|
61
65
|
import { createAthenaSpacesUrl } from "../lib/athena-urls.js";
|
|
@@ -64,9 +68,17 @@ import { getToolkitDisplayInfo } from "../toolkits/index.js";
|
|
|
64
68
|
import { runActivityKey, runActivityVerb, isToolCallInFlight, runActivityLabel, runProgressKey, runElapsedLabel, isRunActivityStalled } from "./run-activity.js";
|
|
65
69
|
import { readMessageCreatedAt, parseMessageTime, isSameCalendarDay, formatDayLabel, formatMessageTime, formatMessageDateTime } from "./message-time.js";
|
|
66
70
|
import { ThreadScrollToBottom } from "./thread-scroll-to-bottom.js";
|
|
71
|
+
import { QueryClientProvider } from "@tanstack/react-query";
|
|
72
|
+
import { useCatalogQueryClient } from "../catalog/runtime-catalog.js";
|
|
73
|
+
import { isStatewireChannelLive } from "../runtime/statewire-lifecycle.js";
|
|
74
|
+
import { useComposerChatVoice, ChatVoiceButton, ChatVoiceStatus } from "./chat-voice-controls.js";
|
|
75
|
+
import { TASK_TOOL_NAME } from "../agent-runtime/src/tool-names.js";
|
|
76
|
+
import { useTurnToolCallsAwaitingApproval } from "../agent-runtime/src/subagents.js";
|
|
67
77
|
import { isGithubWakeMessage } from "../agent-runtime/src/github-wake-event.js";
|
|
68
78
|
import { isSubscriptionWakeMessage } from "../agent-runtime/src/subscription-wake-event.js";
|
|
69
79
|
import { useDeepAgentConnection, readRunLive } from "../agent-runtime/src/thread-status.js";
|
|
80
|
+
import { useChatOutboxReachable, useDeepAgentChatOutboxContext } from "../agent-runtime/src/use-deep-agent-chat-outbox.js";
|
|
81
|
+
import { CHAT_EDIT_UNREACHABLE_LABEL } from "../agent-runtime/src/chat-outbox.js";
|
|
70
82
|
import { cn } from "cnfast";
|
|
71
83
|
const DEFAULT_COMPOSER_PLACEHOLDER = "Type @ to tag an asset";
|
|
72
84
|
function QuotePostMessageBridge() {
|
|
@@ -136,7 +148,11 @@ const withNestedPtcMessages = (ToolUI) => {
|
|
|
136
148
|
};
|
|
137
149
|
return ToolUIWithNestedPtcMessages;
|
|
138
150
|
};
|
|
139
|
-
const AthenaChat = ({
|
|
151
|
+
const AthenaChat = (props) => {
|
|
152
|
+
const queryClient = useCatalogQueryClient();
|
|
153
|
+
return /* @__PURE__ */ jsx(QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ jsx(AthenaChatContent, { ...props }) });
|
|
154
|
+
};
|
|
155
|
+
const AthenaChatContent = ({
|
|
140
156
|
className,
|
|
141
157
|
welcomeMessage = "Hello there!",
|
|
142
158
|
welcomeSubtext = "What can I help you with?",
|
|
@@ -149,7 +165,8 @@ const AthenaChat = ({
|
|
|
149
165
|
components,
|
|
150
166
|
groupToolCalls = true,
|
|
151
167
|
composer: composerSlots,
|
|
152
|
-
dictation = true
|
|
168
|
+
dictation = true,
|
|
169
|
+
voice = true
|
|
153
170
|
}) => {
|
|
154
171
|
var _a, _b, _c, _d, _e, _f;
|
|
155
172
|
const athenaConfig = useAthenaConfig();
|
|
@@ -249,7 +266,7 @@ const AthenaChat = ({
|
|
|
249
266
|
}),
|
|
250
267
|
[AssistantMessageComponent, UserMessageComponent]
|
|
251
268
|
);
|
|
252
|
-
return /* @__PURE__ */ jsx(AthenaChatDefaultComponentsContext.Provider, { value: defaultComponentsContextValue, children: /* @__PURE__ */ jsx(AthenaChatErrorBoundary, { children: /* @__PURE__ */ jsx(ToolFallbackAppearanceProvider, { appearance: "thread", children: /* @__PURE__ */ jsx(MentionAuthCtx.Provider, { value: mentionAuth, children: /* @__PURE__ */ jsx(
|
|
269
|
+
return /* @__PURE__ */ jsx(AthenaChatDefaultComponentsContext.Provider, { value: defaultComponentsContextValue, children: /* @__PURE__ */ jsx(AthenaChatErrorBoundary, { children: /* @__PURE__ */ jsx(StatewireApprovalWaitProvider, { children: /* @__PURE__ */ jsx(ToolFallbackAppearanceProvider, { appearance: "thread", children: /* @__PURE__ */ jsx(MentionAuthCtx.Provider, { value: mentionAuth, children: /* @__PURE__ */ jsx(
|
|
253
270
|
ChatThreadShell,
|
|
254
271
|
{
|
|
255
272
|
overlay: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -291,13 +308,14 @@ const AthenaChat = ({
|
|
|
291
308
|
tools,
|
|
292
309
|
slots: composerSlots,
|
|
293
310
|
dictation,
|
|
311
|
+
voice: readOnly ? false : voice,
|
|
294
312
|
welcomeSuggestionCount: welcomeSuggestions.length
|
|
295
313
|
}
|
|
296
314
|
)
|
|
297
315
|
] }) })
|
|
298
316
|
] })
|
|
299
317
|
}
|
|
300
|
-
) }) }) }, statewireThreadId ?? void 0) });
|
|
318
|
+
) }) }) }) }, statewireThreadId ?? void 0) });
|
|
301
319
|
};
|
|
302
320
|
const THREAD_VIEWPORT_ATTR = "data-aui-thread-viewport";
|
|
303
321
|
const useScrollToTop = () => {
|
|
@@ -349,20 +367,32 @@ const ATHENA_CHAT_MENTION_CATEGORIES = [
|
|
|
349
367
|
"projects",
|
|
350
368
|
"folders"
|
|
351
369
|
];
|
|
352
|
-
const AthenaChatComposer = ({ tools, slots, dictation, welcomeSuggestionCount }) => {
|
|
370
|
+
const AthenaChatComposer = ({ tools, slots, dictation, voice: voiceOptions, welcomeSuggestionCount }) => {
|
|
353
371
|
const aui = useAui();
|
|
354
372
|
const threadId = useAthenaStatewireThreadId();
|
|
355
373
|
const { appUrl } = useAthenaConfig();
|
|
356
|
-
const { attachments, clearAttachments, isUploading } = useAttachments();
|
|
374
|
+
const { attachments, clearAttachments, isUploading, notice: attachNotice, setNotice: setAttachNotice } = useAttachments();
|
|
357
375
|
const { quote, clearQuote } = useQuote();
|
|
358
376
|
const { attachFiles } = useAttachFiles();
|
|
377
|
+
const sessionLane = useStatewireSessionLane();
|
|
359
378
|
const composerRef = useRef(null);
|
|
360
379
|
const [hasText, setHasText] = useState(false);
|
|
380
|
+
const [composerNotice, setComposerNotice] = useState(null);
|
|
381
|
+
const onDraftStateChange = useCallback(
|
|
382
|
+
(next) => {
|
|
383
|
+
setHasText(next);
|
|
384
|
+
setComposerNotice(null);
|
|
385
|
+
setAttachNotice(null);
|
|
386
|
+
},
|
|
387
|
+
[setAttachNotice]
|
|
388
|
+
);
|
|
389
|
+
const notice = composerNotice ?? attachNotice;
|
|
361
390
|
const isRunning = useAuiState((state) => {
|
|
362
391
|
var _a;
|
|
363
392
|
return ((_a = state.optional.thread) == null ? void 0 : _a.isRunning) ?? false;
|
|
364
393
|
});
|
|
365
394
|
const connection = useDeepAgentConnection();
|
|
395
|
+
const { voice, active: voiceActive, enabled: voiceEnabled, audioRef } = useComposerChatVoice({ options: voiceOptions });
|
|
366
396
|
const runLive = useAuiState((state) => {
|
|
367
397
|
const thread = state.optional.thread;
|
|
368
398
|
return thread ? readRunLive(thread, connection) : false;
|
|
@@ -399,7 +429,7 @@ const AthenaChatComposer = ({ tools, slots, dictation, welcomeSuggestionCount })
|
|
|
399
429
|
onAutoEnd: appendSpokenText
|
|
400
430
|
});
|
|
401
431
|
const recording = dictationEnabled && dictationCtl.isActive;
|
|
402
|
-
const showMic = dictationEnabled && dictationCtl.isSupported;
|
|
432
|
+
const showMic = dictationEnabled && dictationCtl.isSupported && !voiceActive;
|
|
403
433
|
const { isActive: dictationActive, cancel: cancelDictation } = dictationCtl;
|
|
404
434
|
useEffect(() => {
|
|
405
435
|
if (!dictationEnabled && dictationActive) cancelDictation();
|
|
@@ -449,8 +479,38 @@ const AthenaChatComposer = ({ tools, slots, dictation, welcomeSuggestionCount })
|
|
|
449
479
|
[appUrl, aui, clearAttachments, clearQuote, threadId]
|
|
450
480
|
);
|
|
451
481
|
const interceptSubmit = useCallback(
|
|
452
|
-
(text, draftMarkdown) =>
|
|
453
|
-
|
|
482
|
+
async (text, draftMarkdown) => {
|
|
483
|
+
if (attachmentsRef.current.length > 0 || quoteRef.current !== null) {
|
|
484
|
+
return sendComposed({ text, draftMarkdown });
|
|
485
|
+
}
|
|
486
|
+
return voice.phase === "live" && text.length > 0 ? voice.sendUserText(text) : false;
|
|
487
|
+
},
|
|
488
|
+
[sendComposed, voice.phase, voice.sendUserText]
|
|
489
|
+
);
|
|
490
|
+
const hasPendingExtras = useCallback(
|
|
491
|
+
() => attachmentsRef.current.length > 0 || quoteRef.current !== null,
|
|
492
|
+
[]
|
|
493
|
+
);
|
|
494
|
+
const holdPendingExtras = useCallback(
|
|
495
|
+
({
|
|
496
|
+
outbox,
|
|
497
|
+
send,
|
|
498
|
+
attachments: attachments2
|
|
499
|
+
}) => {
|
|
500
|
+
const held = holdComposedSend({
|
|
501
|
+
outbox,
|
|
502
|
+
attachments: attachmentsRef.current,
|
|
503
|
+
carried: attachments2,
|
|
504
|
+
quote: quoteRef.current,
|
|
505
|
+
send,
|
|
506
|
+
appUrl
|
|
507
|
+
});
|
|
508
|
+
if (!held) return false;
|
|
509
|
+
clearAttachments();
|
|
510
|
+
clearQuote();
|
|
511
|
+
return true;
|
|
512
|
+
},
|
|
513
|
+
[appUrl, clearAttachments, clearQuote]
|
|
454
514
|
);
|
|
455
515
|
const fileIntake = useMemo(
|
|
456
516
|
() => ({
|
|
@@ -468,6 +528,7 @@ const AthenaChatComposer = ({ tools, slots, dictation, welcomeSuggestionCount })
|
|
|
468
528
|
const { text: spoken, error } = await dictationCtl.stop();
|
|
469
529
|
appendSpokenText(spoken);
|
|
470
530
|
if (error) return;
|
|
531
|
+
if (sessionLane == null ? void 0 : sessionLane.isPending()) await sessionLane.whenKnown();
|
|
471
532
|
const send = ((_b = (_a = composerRef.current) == null ? void 0 : _a.captureSend) == null ? void 0 : _b.call(_a)) ?? {
|
|
472
533
|
text: aui.composer.getState().text ?? "",
|
|
473
534
|
draftMarkdown: aui.composer.getState().text ?? ""
|
|
@@ -495,101 +556,111 @@ const AthenaChatComposer = ({ tools, slots, dictation, welcomeSuggestionCount })
|
|
|
495
556
|
prepareComposerSend({ threadId, ...send });
|
|
496
557
|
aui.composer.setText(send.text);
|
|
497
558
|
aui.composer.send({ steer: false });
|
|
498
|
-
}, [appendSpokenText, aui, dictationCtl, isRunning, sendComposed, slots, threadId]);
|
|
499
|
-
return /* @__PURE__ */
|
|
500
|
-
"
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
/* @__PURE__ */ jsx(
|
|
513
|
-
/* @__PURE__ */
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
transcript: dictationCtl.transcript,
|
|
537
|
-
stream: dictationCtl.stream,
|
|
538
|
-
stoppingLabel: dictationCtl.engine.stoppingLabel
|
|
539
|
-
}
|
|
540
|
-
),
|
|
541
|
-
dictationEnabled && dictationCtl.status === DICTATION_STATUSES.error && dictationCtl.error && /* @__PURE__ */ jsx("p", { className: "aui-dictation-error px-1.5 pb-1 text-destructive text-xs", role: "alert", children: dictationCtl.error.message })
|
|
542
|
-
] }),
|
|
543
|
-
toolbarStart: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-1", children: recording ? /* @__PURE__ */ jsx(DictationCancelButton, { onClick: dictationCtl.cancel }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
544
|
-
/* @__PURE__ */ jsx(FileUploadButton, { className: "aui-composer-attach size-8 rounded-full p-0 disabled:opacity-30" }),
|
|
545
|
-
/* @__PURE__ */ jsx(
|
|
546
|
-
AthenaComposerMentionButton,
|
|
547
|
-
{
|
|
548
|
-
onClick: () => {
|
|
549
|
-
var _a, _b;
|
|
550
|
-
return (_b = (_a = composerRef.current) == null ? void 0 : _a.openMentionMenu) == null ? void 0 : _b.call(_a);
|
|
559
|
+
}, [appendSpokenText, aui, dictationCtl, isRunning, sendComposed, sessionLane, slots, threadId]);
|
|
560
|
+
return /* @__PURE__ */ jsxs(ComposerDropZone, { onDragActiveChange: setDragActive, children: [
|
|
561
|
+
/* @__PURE__ */ jsx("audio", { ref: audioRef, autoPlay: true, playsInline: true }),
|
|
562
|
+
/* @__PURE__ */ jsx(
|
|
563
|
+
"div",
|
|
564
|
+
{
|
|
565
|
+
className: cn("aui-composer-entrance", entrance.className),
|
|
566
|
+
style: entrance.style,
|
|
567
|
+
onFocus: keyboardHint.onFocus,
|
|
568
|
+
children: /* @__PURE__ */ jsx(
|
|
569
|
+
ChatComposerDock,
|
|
570
|
+
{
|
|
571
|
+
appearance: "paper",
|
|
572
|
+
dragActive,
|
|
573
|
+
aboveSurface: /* @__PURE__ */ jsx(ThreadScrollToBottom, {}),
|
|
574
|
+
beforeEditor: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
575
|
+
/* @__PURE__ */ jsx(ChatVoiceStatus, { voice }),
|
|
576
|
+
/* @__PURE__ */ jsx(ComposerQuotePreview, {}),
|
|
577
|
+
/* @__PURE__ */ jsx(ComposerAttachmentPreview, {})
|
|
578
|
+
] }),
|
|
579
|
+
editor: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
580
|
+
/* @__PURE__ */ jsx("div", { className: cn(recording && "hidden"), children: /* @__PURE__ */ jsx(
|
|
581
|
+
TiptapComposer,
|
|
582
|
+
{
|
|
583
|
+
ref: composerRef,
|
|
584
|
+
threadId,
|
|
585
|
+
appearance: "paper",
|
|
586
|
+
placeholder: (runLive ? slots == null ? void 0 : slots.runningPlaceholder : void 0) ?? (slots == null ? void 0 : slots.placeholder) ?? DEFAULT_COMPOSER_PLACEHOLDER,
|
|
587
|
+
tools,
|
|
588
|
+
rootCategories,
|
|
589
|
+
onDraftStateChange,
|
|
590
|
+
waitForHostUploads,
|
|
591
|
+
interceptSubmit,
|
|
592
|
+
hasPendingExtras,
|
|
593
|
+
holdPendingExtras,
|
|
594
|
+
onAttachmentError: setComposerNotice,
|
|
595
|
+
fileIntake,
|
|
596
|
+
onSubmitted: keyboardHint.onSubmitted
|
|
551
597
|
}
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
}
|
|
564
|
-
),
|
|
565
|
-
/* @__PURE__ */ jsx(
|
|
566
|
-
|
|
567
|
-
|
|
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
|
-
|
|
598
|
+
) }),
|
|
599
|
+
notice && /* @__PURE__ */ jsx("p", { className: "aui-composer-notice px-1.5 pb-1 text-destructive text-xs", role: "alert", children: notice }),
|
|
600
|
+
recording && /* @__PURE__ */ jsx(
|
|
601
|
+
DictationStrip,
|
|
602
|
+
{
|
|
603
|
+
status: dictationCtl.status,
|
|
604
|
+
transcript: dictationCtl.transcript,
|
|
605
|
+
stream: dictationCtl.stream,
|
|
606
|
+
stoppingLabel: dictationCtl.engine.stoppingLabel
|
|
607
|
+
}
|
|
608
|
+
),
|
|
609
|
+
dictationEnabled && dictationCtl.status === DICTATION_STATUSES.error && dictationCtl.error && /* @__PURE__ */ jsx("p", { className: "aui-dictation-error px-1.5 pb-1 text-destructive text-xs", role: "alert", children: dictationCtl.error.message })
|
|
610
|
+
] }),
|
|
611
|
+
toolbarStart: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-1", children: recording ? /* @__PURE__ */ jsx(DictationCancelButton, { onClick: dictationCtl.cancel }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
612
|
+
/* @__PURE__ */ jsx(FileUploadButton, { className: "aui-composer-attach size-8 rounded-full p-0 disabled:opacity-30" }),
|
|
613
|
+
/* @__PURE__ */ jsx(
|
|
614
|
+
AthenaComposerMentionButton,
|
|
615
|
+
{
|
|
616
|
+
onClick: () => {
|
|
617
|
+
var _a, _b;
|
|
618
|
+
return (_b = (_a = composerRef.current) == null ? void 0 : _a.openMentionMenu) == null ? void 0 : _b.call(_a);
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
),
|
|
622
|
+
/* @__PURE__ */ jsx(AthenaChatModeMenu, {}),
|
|
623
|
+
slots == null ? void 0 : slots.toolbarStart
|
|
624
|
+
] }) }),
|
|
625
|
+
toolbarEnd: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-1", children: recording ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
626
|
+
/* @__PURE__ */ jsx(
|
|
627
|
+
DictationStopButton,
|
|
628
|
+
{
|
|
629
|
+
onClick: () => void stopDictation(),
|
|
630
|
+
disabled: dictationCtl.status === DICTATION_STATUSES.stopping
|
|
631
|
+
}
|
|
632
|
+
),
|
|
633
|
+
/* @__PURE__ */ jsx(
|
|
634
|
+
AthenaComposerSendButton,
|
|
635
|
+
{
|
|
636
|
+
action: isRunning ? "queue" : "send",
|
|
637
|
+
onSend: () => void sendDictation(),
|
|
638
|
+
disabled: dictationCtl.status !== DICTATION_STATUSES.listening || isUploading,
|
|
639
|
+
title: isUploading ? "Upload in progress..." : void 0
|
|
640
|
+
}
|
|
641
|
+
)
|
|
642
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
643
|
+
slots == null ? void 0 : slots.toolbarEnd,
|
|
644
|
+
showMic && /* @__PURE__ */ jsx(DictationMicButton, { onClick: dictationCtl.start, disabled: isUploading }),
|
|
645
|
+
voiceEnabled && /* @__PURE__ */ jsx(ChatVoiceButton, { voice, disabled: isUploading || dictationCtl.isActive || !isStatewireChannelLive(connection) }),
|
|
646
|
+
/* @__PURE__ */ jsx(
|
|
647
|
+
ComposerSendOrStop,
|
|
648
|
+
{
|
|
649
|
+
composerRef,
|
|
650
|
+
hasDraft: hasText || hasExtras,
|
|
651
|
+
liveVoice: voice.phase === "live" && !hasExtras,
|
|
652
|
+
sendBlockedReason: isUploading ? "Upload in progress..." : null,
|
|
653
|
+
onBeforeSend: slots == null ? void 0 : slots.onBeforeSend,
|
|
654
|
+
components: ATHENA_COMPOSER_COMPONENTS
|
|
655
|
+
}
|
|
656
|
+
)
|
|
657
|
+
] }) }),
|
|
658
|
+
belowSurface: /* @__PURE__ */ jsx(ComposerKeyboardHint, { visible: keyboardHint.visible })
|
|
659
|
+
}
|
|
660
|
+
)
|
|
661
|
+
}
|
|
662
|
+
)
|
|
663
|
+
] });
|
|
593
664
|
};
|
|
594
665
|
const MessageError = () => /* @__PURE__ */ jsx(MessagePrimitive.Error, { children: /* @__PURE__ */ jsxs(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: [
|
|
595
666
|
/* @__PURE__ */ jsx(AlertCircleIcon, { className: "mt-0.5 size-4 shrink-0" }),
|
|
@@ -840,6 +911,7 @@ const AthenaReasoningPart = ({
|
|
|
840
911
|
);
|
|
841
912
|
};
|
|
842
913
|
const noToolGrouping = () => null;
|
|
914
|
+
const isInlineToolOrSubagent = (toolName) => toolName === TASK_TOOL_NAME || isSdkInlineTool(toolName);
|
|
843
915
|
const AthenaAssistantMessage = ({
|
|
844
916
|
toolUIs,
|
|
845
917
|
AvatarComponent,
|
|
@@ -857,6 +929,8 @@ const AthenaAssistantMessage = ({
|
|
|
857
929
|
}
|
|
858
930
|
return wrappedToolUIs;
|
|
859
931
|
}, [toolUIs]);
|
|
932
|
+
const isInlineTool = toolUIs[TASK_TOOL_NAME] === SubagentTaskToolUI ? isInlineToolOrSubagent : isSdkInlineTool;
|
|
933
|
+
const waitingToolCallIds = useTurnToolCallsAwaitingApproval(useApprovalWaitInScope().toolCallIds);
|
|
860
934
|
const nestedPtcComponents = useMemo(
|
|
861
935
|
() => ({
|
|
862
936
|
Text: TextComponent,
|
|
@@ -894,6 +968,8 @@ const AthenaAssistantMessage = ({
|
|
|
894
968
|
toolUIs: toolUIsWithNestedMessages,
|
|
895
969
|
TextComponent,
|
|
896
970
|
ReasoningComponent: effectiveReasoningComponent,
|
|
971
|
+
isInlineTool,
|
|
972
|
+
waitingToolCallIds,
|
|
897
973
|
renderRunningMeta: renderGroupedRunningMeta
|
|
898
974
|
}
|
|
899
975
|
),
|
|
@@ -951,7 +1027,20 @@ const EditMessageButton = () => {
|
|
|
951
1027
|
const allowEdit = useAuiState((s) => s.thread.capabilities.edit);
|
|
952
1028
|
const isRunning = useAthenaRunLive();
|
|
953
1029
|
const readOnly = useMessageActionsReadOnly();
|
|
1030
|
+
const reachable = useChatOutboxReachable(useDeepAgentChatOutboxContext());
|
|
954
1031
|
if (!allowEdit || isRunning || readOnly) return null;
|
|
1032
|
+
if (!reachable) {
|
|
1033
|
+
return /* @__PURE__ */ jsx(
|
|
1034
|
+
TooltipIconButton,
|
|
1035
|
+
{
|
|
1036
|
+
tooltip: CHAT_EDIT_UNREACHABLE_LABEL,
|
|
1037
|
+
"aria-disabled": true,
|
|
1038
|
+
"data-testid": "chat-message-edit-unreachable",
|
|
1039
|
+
className: "cursor-not-allowed opacity-50",
|
|
1040
|
+
children: /* @__PURE__ */ jsx(PencilIcon, {})
|
|
1041
|
+
}
|
|
1042
|
+
);
|
|
1043
|
+
}
|
|
955
1044
|
return /* @__PURE__ */ jsx(ActionBarPrimitive.Edit, { asChild: true, children: /* @__PURE__ */ jsx(TooltipIconButton, { tooltip: "Edit", children: /* @__PURE__ */ jsx(PencilIcon, {}) }) });
|
|
956
1045
|
};
|
|
957
1046
|
const AthenaUserActionBar = () => {
|