@athenaintel/react 0.22.4 → 0.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +394 -4
- package/dist/chat/AthenaChat.cjs +346 -244
- package/dist/chat/AthenaChat.cjs.map +1 -1
- package/dist/chat/AthenaChat.d.ts +19 -8
- package/dist/chat/AthenaChat.js +350 -248
- package/dist/chat/AthenaChat.js.map +1 -1
- package/dist/chat/StatewireApprovalCard.cjs +2 -1
- package/dist/chat/StatewireApprovalCard.cjs.map +1 -1
- package/dist/chat/StatewireApprovalCard.js +2 -1
- package/dist/chat/StatewireApprovalCard.js.map +1 -1
- package/dist/chat/StatewireClientToolBridge.cjs +1 -0
- package/dist/chat/StatewireClientToolBridge.cjs.map +1 -1
- package/dist/chat/StatewireClientToolBridge.js +1 -0
- package/dist/chat/StatewireClientToolBridge.js.map +1 -1
- package/dist/chat/StatewireQueuedMessages.cjs +1 -0
- package/dist/chat/StatewireQueuedMessages.cjs.map +1 -1
- package/dist/chat/StatewireQueuedMessages.js +1 -0
- package/dist/chat/StatewireQueuedMessages.js.map +1 -1
- package/dist/chat/WaitingOnYouBanner.cjs +100 -0
- package/dist/chat/WaitingOnYouBanner.cjs.map +1 -0
- package/dist/chat/WaitingOnYouBanner.d.ts +29 -0
- package/dist/chat/WaitingOnYouBanner.js +100 -0
- package/dist/chat/WaitingOnYouBanner.js.map +1 -0
- package/dist/chat/athena-chat-welcome.cjs +148 -0
- package/dist/chat/athena-chat-welcome.cjs.map +1 -0
- package/dist/chat/athena-chat-welcome.d.ts +54 -0
- package/dist/chat/athena-chat-welcome.js +148 -0
- package/dist/chat/athena-chat-welcome.js.map +1 -0
- package/dist/chat/athena-composer-controls.cjs +76 -0
- package/dist/chat/athena-composer-controls.cjs.map +1 -0
- package/dist/chat/athena-composer-controls.d.ts +21 -0
- package/dist/chat/athena-composer-controls.js +76 -0
- package/dist/chat/athena-composer-controls.js.map +1 -0
- package/dist/chat/composer-keyboard-hint.cjs +61 -0
- package/dist/chat/composer-keyboard-hint.cjs.map +1 -0
- package/dist/chat/composer-keyboard-hint.d.ts +33 -0
- package/dist/chat/composer-keyboard-hint.js +61 -0
- package/dist/chat/composer-keyboard-hint.js.map +1 -0
- package/dist/chat/message-time.cjs +64 -0
- package/dist/chat/message-time.cjs.map +1 -0
- package/dist/chat/message-time.d.ts +45 -0
- package/dist/chat/message-time.js +64 -0
- package/dist/chat/message-time.js.map +1 -0
- package/dist/chat/run-activity.cjs +38 -7
- package/dist/chat/run-activity.cjs.map +1 -1
- package/dist/chat/run-activity.d.ts +14 -3
- package/dist/chat/run-activity.js +39 -8
- package/dist/chat/run-activity.js.map +1 -1
- package/dist/chat/statewire-client-tools.cjs +2 -1
- package/dist/chat/statewire-client-tools.cjs.map +1 -1
- package/dist/chat/statewire-client-tools.js +2 -1
- package/dist/chat/statewire-client-tools.js.map +1 -1
- package/dist/chat/super-grouping/activity-timeline.cjs +2 -1
- package/dist/chat/super-grouping/activity-timeline.cjs.map +1 -1
- package/dist/chat/super-grouping/activity-timeline.js +2 -1
- package/dist/chat/super-grouping/activity-timeline.js.map +1 -1
- package/dist/chat/thread-scroll-to-bottom.cjs +24 -0
- package/dist/chat/thread-scroll-to-bottom.cjs.map +1 -0
- package/dist/chat/thread-scroll-to-bottom.d.ts +11 -0
- package/dist/chat/thread-scroll-to-bottom.js +24 -0
- package/dist/chat/thread-scroll-to-bottom.js.map +1 -0
- package/dist/chat/tiptap-text.cjs +26 -95
- package/dist/chat/tiptap-text.cjs.map +1 -1
- package/dist/chat/tiptap-text.d.ts +13 -0
- package/dist/chat/tiptap-text.js +26 -95
- package/dist/chat/tiptap-text.js.map +1 -1
- package/dist/chat/use-athena-run-live.cjs +2 -1
- package/dist/chat/use-athena-run-live.cjs.map +1 -1
- package/dist/chat/use-athena-run-live.js +2 -1
- package/dist/chat/use-athena-run-live.js.map +1 -1
- package/dist/chat/use-statewire-approval-request.cjs +1 -0
- package/dist/chat/use-statewire-approval-request.cjs.map +1 -1
- package/dist/chat/use-statewire-approval-request.js +1 -0
- package/dist/chat/use-statewire-approval-request.js.map +1 -1
- package/dist/chat-ui/composer/tiptap-composer.cjs +39 -4
- package/dist/chat-ui/composer/tiptap-composer.cjs.map +1 -1
- package/dist/chat-ui/composer/tiptap-composer.d.ts +21 -0
- package/dist/chat-ui/composer/tiptap-composer.js +39 -4
- package/dist/chat-ui/composer/tiptap-composer.js.map +1 -1
- package/dist/chat-ui/index.cjs +15 -1
- package/dist/chat-ui/index.cjs.map +1 -1
- package/dist/chat-ui/index.d.ts +6 -3
- package/dist/chat-ui/index.js +16 -2
- package/dist/chat-ui/index.js.map +1 -1
- package/dist/chat-ui/mentions/mention-chip.cjs +31 -4
- package/dist/chat-ui/mentions/mention-chip.cjs.map +1 -1
- package/dist/chat-ui/mentions/mention-chip.js +31 -4
- package/dist/chat-ui/mentions/mention-chip.js.map +1 -1
- package/dist/chat-ui/messages/message-components.cjs +19 -1
- package/dist/chat-ui/messages/message-components.cjs.map +1 -1
- package/dist/chat-ui/messages/message-components.d.ts +13 -0
- package/dist/chat-ui/messages/message-components.js +19 -1
- package/dist/chat-ui/messages/message-components.js.map +1 -1
- package/dist/chat-ui/messages/runtime-message.cjs +2 -1
- package/dist/chat-ui/messages/runtime-message.cjs.map +1 -1
- package/dist/chat-ui/messages/runtime-message.js +2 -1
- package/dist/chat-ui/messages/runtime-message.js.map +1 -1
- package/dist/chat-ui/messages/statewire-continue-run.cjs +1 -0
- package/dist/chat-ui/messages/statewire-continue-run.cjs.map +1 -1
- package/dist/chat-ui/messages/statewire-continue-run.js +1 -0
- package/dist/chat-ui/messages/statewire-continue-run.js.map +1 -1
- package/dist/chat-ui/messages/user-edit-composer.cjs +3 -1
- package/dist/chat-ui/messages/user-edit-composer.cjs.map +1 -1
- package/dist/chat-ui/messages/user-edit-composer.js +3 -1
- package/dist/chat-ui/messages/user-edit-composer.js.map +1 -1
- package/dist/chat-ui/messages/wake-marker.cjs +84 -0
- package/dist/chat-ui/messages/wake-marker.cjs.map +1 -0
- package/dist/chat-ui/messages/wake-marker.d.ts +16 -0
- package/dist/chat-ui/messages/wake-marker.js +84 -0
- package/dist/chat-ui/messages/wake-marker.js.map +1 -0
- package/dist/chat-ui/rich-text/chat-blocks.cjs +177 -0
- package/dist/chat-ui/rich-text/chat-blocks.cjs.map +1 -0
- package/dist/chat-ui/rich-text/chat-blocks.d.ts +58 -0
- package/dist/chat-ui/rich-text/chat-blocks.js +177 -0
- package/dist/chat-ui/rich-text/chat-blocks.js.map +1 -0
- package/dist/chat-ui/rich-text/chat-link.cjs +69 -0
- package/dist/chat-ui/rich-text/chat-link.cjs.map +1 -0
- package/dist/chat-ui/rich-text/chat-link.d.ts +24 -0
- package/dist/chat-ui/rich-text/chat-link.js +69 -0
- package/dist/chat-ui/rich-text/chat-link.js.map +1 -0
- package/dist/chat-ui/rich-text/chat-message-body.cjs +144 -18
- package/dist/chat-ui/rich-text/chat-message-body.cjs.map +1 -1
- package/dist/chat-ui/rich-text/chat-message-body.d.ts +10 -1
- package/dist/chat-ui/rich-text/chat-message-body.js +149 -23
- package/dist/chat-ui/rich-text/chat-message-body.js.map +1 -1
- package/dist/chat-ui/rich-text/chat-node-views.cjs +38 -5
- package/dist/chat-ui/rich-text/chat-node-views.cjs.map +1 -1
- package/dist/chat-ui/rich-text/chat-node-views.d.ts +11 -0
- package/dist/chat-ui/rich-text/chat-node-views.js +39 -6
- package/dist/chat-ui/rich-text/chat-node-views.js.map +1 -1
- package/dist/chat-ui/rich-text/chat-text-schema.cjs +20 -3
- package/dist/chat-ui/rich-text/chat-text-schema.cjs.map +1 -1
- package/dist/chat-ui/rich-text/chat-text-schema.d.ts +15 -2
- package/dist/chat-ui/rich-text/chat-text-schema.js +20 -3
- package/dist/chat-ui/rich-text/chat-text-schema.js.map +1 -1
- package/dist/chat-ui/rich-text/citation-anchors.cjs +139 -0
- package/dist/chat-ui/rich-text/citation-anchors.cjs.map +1 -0
- package/dist/chat-ui/rich-text/citation-anchors.d.ts +74 -0
- package/dist/chat-ui/rich-text/citation-anchors.js +139 -0
- package/dist/chat-ui/rich-text/citation-anchors.js.map +1 -0
- package/dist/chat-ui/statewire.cjs +8 -1
- package/dist/chat-ui/statewire.cjs.map +1 -1
- package/dist/chat-ui/statewire.d.ts +2 -0
- package/dist/chat-ui/statewire.js +8 -1
- package/dist/chat-ui/statewire.js.map +1 -1
- package/dist/chat-ui/thread/chat-composer-dock.cjs +27 -6
- package/dist/chat-ui/thread/chat-composer-dock.cjs.map +1 -1
- package/dist/chat-ui/thread/chat-composer-dock.d.ts +21 -1
- package/dist/chat-ui/thread/chat-composer-dock.js +28 -7
- package/dist/chat-ui/thread/chat-composer-dock.js.map +1 -1
- package/dist/chat-ui/thread/statewire-history-edge.cjs +12 -13
- package/dist/chat-ui/thread/statewire-history-edge.cjs.map +1 -1
- package/dist/chat-ui/thread/statewire-history-edge.d.ts +11 -10
- package/dist/chat-ui/thread/statewire-history-edge.js +13 -14
- package/dist/chat-ui/thread/statewire-history-edge.js.map +1 -1
- package/dist/chat-ui/thread/thread-loading-overlay.cjs +31 -0
- package/dist/chat-ui/thread/thread-loading-overlay.cjs.map +1 -0
- package/dist/chat-ui/thread/thread-loading-overlay.d.ts +14 -0
- package/dist/chat-ui/thread/thread-loading-overlay.js +31 -0
- package/dist/chat-ui/thread/thread-loading-overlay.js.map +1 -0
- package/dist/composer/ComposerDropZone.cjs +8 -1
- package/dist/composer/ComposerDropZone.cjs.map +1 -1
- package/dist/composer/ComposerDropZone.d.ts +6 -0
- package/dist/composer/ComposerDropZone.js +9 -2
- package/dist/composer/ComposerDropZone.js.map +1 -1
- package/dist/diagnostics/errors.cjs +20 -0
- package/dist/diagnostics/errors.cjs.map +1 -1
- package/dist/diagnostics/errors.d.ts +20 -0
- package/dist/diagnostics/errors.js +20 -0
- package/dist/diagnostics/errors.js.map +1 -1
- package/dist/index.cjs +47 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +26 -7
- package/dist/index.js +51 -5
- package/dist/index.js.map +1 -1
- package/dist/lib/use-prefers-reduced-motion.cjs +29 -0
- package/dist/lib/use-prefers-reduced-motion.cjs.map +1 -0
- package/dist/lib/use-prefers-reduced-motion.d.ts +6 -0
- package/dist/lib/use-prefers-reduced-motion.js +29 -0
- package/dist/lib/use-prefers-reduced-motion.js.map +1 -0
- package/dist/packages/agent-runtime/src/conversation-index.cjs.map +1 -1
- package/dist/packages/agent-runtime/src/conversation-index.js.map +1 -1
- package/dist/packages/agent-runtime/src/conversation-list.cjs +59 -0
- package/dist/packages/agent-runtime/src/conversation-list.cjs.map +1 -1
- package/dist/packages/agent-runtime/src/conversation-list.js +60 -1
- package/dist/packages/agent-runtime/src/conversation-list.js.map +1 -1
- package/dist/packages/agent-runtime/src/deep-agent-transport-recipe.cjs +5 -3
- package/dist/packages/agent-runtime/src/deep-agent-transport-recipe.cjs.map +1 -1
- package/dist/packages/agent-runtime/src/deep-agent-transport-recipe.js +5 -3
- package/dist/packages/agent-runtime/src/deep-agent-transport-recipe.js.map +1 -1
- package/dist/packages/agent-runtime/src/edit-command.cjs +21 -17
- package/dist/packages/agent-runtime/src/edit-command.cjs.map +1 -1
- package/dist/packages/agent-runtime/src/edit-command.js +22 -18
- package/dist/packages/agent-runtime/src/edit-command.js.map +1 -1
- package/dist/packages/agent-runtime/src/generated/runconfig-contract.cjs +9 -11
- package/dist/packages/agent-runtime/src/generated/runconfig-contract.cjs.map +1 -1
- package/dist/packages/agent-runtime/src/generated/runconfig-contract.js +9 -11
- package/dist/packages/agent-runtime/src/generated/runconfig-contract.js.map +1 -1
- package/dist/packages/agent-runtime/src/github-wake-event.cjs +86 -0
- package/dist/packages/agent-runtime/src/github-wake-event.cjs.map +1 -0
- package/dist/packages/agent-runtime/src/github-wake-event.js +86 -0
- package/dist/packages/agent-runtime/src/github-wake-event.js.map +1 -0
- package/dist/packages/agent-runtime/src/message-window.cjs +150 -42
- package/dist/packages/agent-runtime/src/message-window.cjs.map +1 -1
- package/dist/packages/agent-runtime/src/message-window.js +151 -43
- package/dist/packages/agent-runtime/src/message-window.js.map +1 -1
- package/dist/packages/agent-runtime/src/quota-safe-local-storage-session.cjs +13 -9
- package/dist/packages/agent-runtime/src/quota-safe-local-storage-session.cjs.map +1 -1
- package/dist/packages/agent-runtime/src/quota-safe-local-storage-session.js +13 -9
- package/dist/packages/agent-runtime/src/quota-safe-local-storage-session.js.map +1 -1
- package/dist/packages/agent-runtime/src/statewire-suspended.cjs +1 -3
- package/dist/packages/agent-runtime/src/statewire-suspended.cjs.map +1 -1
- package/dist/packages/agent-runtime/src/statewire-suspended.js +1 -3
- package/dist/packages/agent-runtime/src/statewire-suspended.js.map +1 -1
- package/dist/packages/agent-runtime/src/use-deep-agent-edit-submit.cjs.map +1 -1
- package/dist/packages/agent-runtime/src/use-deep-agent-edit-submit.js.map +1 -1
- package/dist/packages/agent-runtime/src/use-deep-agent-thread.cjs +61 -30
- package/dist/packages/agent-runtime/src/use-deep-agent-thread.cjs.map +1 -1
- package/dist/packages/agent-runtime/src/use-deep-agent-thread.js +59 -28
- package/dist/packages/agent-runtime/src/use-deep-agent-thread.js.map +1 -1
- package/dist/packages/agent-runtime/src/use-deep-agent-window-sync.cjs +56 -36
- package/dist/packages/agent-runtime/src/use-deep-agent-window-sync.cjs.map +1 -1
- package/dist/packages/agent-runtime/src/use-deep-agent-window-sync.js +59 -39
- package/dist/packages/agent-runtime/src/use-deep-agent-window-sync.js.map +1 -1
- package/dist/packages/react/package.json.cjs +1 -1
- package/dist/packages/react/package.json.js +1 -1
- package/dist/provider/AthenaContext.cjs.map +1 -1
- package/dist/provider/AthenaContext.d.ts +3 -0
- package/dist/provider/AthenaContext.js.map +1 -1
- package/dist/provider/AthenaProvider.cjs +93 -45
- package/dist/provider/AthenaProvider.cjs.map +1 -1
- package/dist/provider/AthenaProvider.d.ts +6 -1
- package/dist/provider/AthenaProvider.js +97 -49
- package/dist/provider/AthenaProvider.js.map +1 -1
- package/dist/runtime/statewire-lifecycle.cjs +2 -1
- package/dist/runtime/statewire-lifecycle.cjs.map +1 -1
- package/dist/runtime/statewire-lifecycle.js +2 -1
- package/dist/runtime/statewire-lifecycle.js.map +1 -1
- package/dist/runtime/useAthenaStatewireRuntime.cjs +3 -2
- package/dist/runtime/useAthenaStatewireRuntime.cjs.map +1 -1
- package/dist/runtime/useAthenaStatewireRuntime.d.ts +8 -12
- package/dist/runtime/useAthenaStatewireRuntime.js +3 -2
- package/dist/runtime/useAthenaStatewireRuntime.js.map +1 -1
- package/dist/search/useAthenaRepoSearch.cjs +94 -0
- package/dist/search/useAthenaRepoSearch.cjs.map +1 -0
- package/dist/search/useAthenaRepoSearch.d.ts +95 -0
- package/dist/search/useAthenaRepoSearch.js +94 -0
- package/dist/search/useAthenaRepoSearch.js.map +1 -0
- package/dist/styles.css +1 -1
- package/dist/threads/SessionList.cjs +486 -0
- package/dist/threads/SessionList.cjs.map +1 -0
- package/dist/threads/SessionList.d.ts +60 -0
- package/dist/threads/SessionList.js +486 -0
- package/dist/threads/SessionList.js.map +1 -0
- package/dist/threads/api.cjs +112 -4
- package/dist/threads/api.cjs.map +1 -1
- package/dist/threads/api.d.ts +128 -1
- package/dist/threads/api.js +113 -5
- package/dist/threads/api.js.map +1 -1
- package/dist/threads/conversation-list-fetcher.cjs +27 -3
- package/dist/threads/conversation-list-fetcher.cjs.map +1 -1
- package/dist/threads/conversation-list-fetcher.d.ts +16 -3
- package/dist/threads/conversation-list-fetcher.js +27 -3
- package/dist/threads/conversation-list-fetcher.js.map +1 -1
- package/dist/threads/index.d.ts +5 -1
- package/dist/threads/session-list-model.cjs +130 -0
- package/dist/threads/session-list-model.cjs.map +1 -0
- package/dist/threads/session-list-model.d.ts +62 -0
- package/dist/threads/session-list-model.js +130 -0
- package/dist/threads/session-list-model.js.map +1 -0
- package/dist/threads/statewire-thread-list.cjs +220 -38
- package/dist/threads/statewire-thread-list.cjs.map +1 -1
- package/dist/threads/statewire-thread-list.d.ts +152 -2
- package/dist/threads/statewire-thread-list.js +222 -40
- package/dist/threads/statewire-thread-list.js.map +1 -1
- package/dist/threads/thread-prefetcher.cjs +63 -0
- package/dist/threads/thread-prefetcher.cjs.map +1 -0
- package/dist/threads/thread-prefetcher.d.ts +54 -0
- package/dist/threads/thread-prefetcher.js +63 -0
- package/dist/threads/thread-prefetcher.js.map +1 -0
- package/dist/threads/use-athena-session-attention.cjs +22 -0
- package/dist/threads/use-athena-session-attention.cjs.map +1 -0
- package/dist/threads/use-athena-session-attention.d.ts +24 -0
- package/dist/threads/use-athena-session-attention.js +22 -0
- package/dist/threads/use-athena-session-attention.js.map +1 -0
- package/dist/threads/use-rest-conversation-history.cjs +25 -2
- package/dist/threads/use-rest-conversation-history.cjs.map +1 -1
- package/dist/threads/use-rest-conversation-history.d.ts +8 -1
- package/dist/threads/use-rest-conversation-history.js +25 -2
- package/dist/threads/use-rest-conversation-history.js.map +1 -1
- package/dist/threads/use-statewire-conversation-history.cjs +40 -16
- package/dist/threads/use-statewire-conversation-history.cjs.map +1 -1
- package/dist/threads/use-statewire-conversation-history.d.ts +13 -0
- package/dist/threads/use-statewire-conversation-history.js +40 -16
- package/dist/threads/use-statewire-conversation-history.js.map +1 -1
- package/dist/threads/use-thread-archive.cjs +128 -0
- package/dist/threads/use-thread-archive.cjs.map +1 -0
- package/dist/threads/use-thread-archive.d.ts +26 -0
- package/dist/threads/use-thread-archive.js +128 -0
- package/dist/threads/use-thread-archive.js.map +1 -0
- package/dist/threads/use-thread-favorite.cjs +53 -0
- package/dist/threads/use-thread-favorite.cjs.map +1 -0
- package/dist/threads/use-thread-favorite.d.ts +49 -0
- package/dist/threads/use-thread-favorite.js +53 -0
- package/dist/threads/use-thread-favorite.js.map +1 -0
- package/dist/threads/use-thread-field-override.cjs +184 -0
- package/dist/threads/use-thread-field-override.cjs.map +1 -0
- package/dist/threads/use-thread-field-override.d.ts +55 -0
- package/dist/threads/use-thread-field-override.js +184 -0
- package/dist/threads/use-thread-field-override.js.map +1 -0
- package/dist/threads/use-thread-rename.cjs +53 -0
- package/dist/threads/use-thread-rename.cjs.map +1 -0
- package/dist/threads/use-thread-rename.d.ts +48 -0
- package/dist/threads/use-thread-rename.js +53 -0
- package/dist/threads/use-thread-rename.js.map +1 -0
- package/dist/tools/index.cjs +5 -1
- package/dist/tools/index.cjs.map +1 -1
- package/dist/tools/index.d.ts +1 -1
- package/dist/tools/index.js +7 -3
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/misc-tool-uis.cjs +2 -1
- package/dist/tools/misc-tool-uis.cjs.map +1 -1
- package/dist/tools/misc-tool-uis.js +2 -1
- package/dist/tools/misc-tool-uis.js.map +1 -1
- package/dist/tools/primitives.cjs +25 -2
- package/dist/tools/primitives.cjs.map +1 -1
- package/dist/tools/primitives.d.ts +9 -2
- package/dist/tools/primitives.js +26 -3
- package/dist/tools/primitives.js.map +1 -1
- package/dist/tools/tool-appearance.cjs +11 -0
- package/dist/tools/tool-appearance.cjs.map +1 -0
- package/dist/tools/tool-appearance.d.ts +29 -0
- package/dist/tools/tool-appearance.js +11 -0
- package/dist/tools/tool-appearance.js.map +1 -0
- package/dist/tools/tool-fallback.cjs +211 -13
- package/dist/tools/tool-fallback.cjs.map +1 -1
- package/dist/tools/tool-fallback.d.ts +31 -4
- package/dist/tools/tool-fallback.js +214 -16
- package/dist/tools/tool-fallback.js.map +1 -1
- package/dist/tools/use-elapsed-seconds.cjs +24 -0
- package/dist/tools/use-elapsed-seconds.cjs.map +1 -0
- package/dist/tools/use-elapsed-seconds.d.ts +10 -0
- package/dist/tools/use-elapsed-seconds.js +24 -0
- package/dist/tools/use-elapsed-seconds.js.map +1 -0
- package/dist/tools/voice-update-tool-ui.cjs +2 -1
- package/dist/tools/voice-update-tool-ui.cjs.map +1 -1
- package/dist/tools/voice-update-tool-ui.js +2 -1
- package/dist/tools/voice-update-tool-ui.js.map +1 -1
- package/package.json +3 -3
- package/src/chat-ui/tailwind-preset.js +14 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thread-loading-overlay.cjs","sources":["../../../src/chat-ui/thread/thread-loading-overlay.tsx"],"sourcesContent":["import { AuiIf } from '@assistant-ui/react';\nimport type { FC } from 'react';\nimport { useEffect, useState } from 'react';\nimport { useAthenaThreadId } from '../../threads/thread-id-context';\n\n/** How long the overlay covers an empty thread with server history before giving up. */\nexport const THREAD_LOADING_OVERLAY_TIMEOUT_MS = 15_000;\n\n/**\n * The scrim `AthenaChat` mounts over the thread panel while a thread that\n * has server history (`useAthenaThreadId()` defined) is still empty — the\n * attach has not delivered its snapshot yet. A never-started chat is empty\n * on purpose and gets no scrim; a switch to a thread the snapshot cache\n * holds (a recently visited or hover-prefetched session) mounts with its\n * messages and never shows it either. Gives up after\n * {@link THREAD_LOADING_OVERLAY_TIMEOUT_MS} so a thread that is genuinely\n * empty on the server does not stay covered.\n */\nexport const ThreadLoadingOverlay: FC = () => {\n const remoteId = useAthenaThreadId();\n const [timedOut, setTimedOut] = useState(false);\n\n useEffect(() => {\n if (!remoteId) return;\n setTimedOut(false);\n const timer = setTimeout(() => setTimedOut(true), THREAD_LOADING_OVERLAY_TIMEOUT_MS);\n return () => clearTimeout(timer);\n }, [remoteId]);\n\n if (!remoteId || timedOut) return null;\n\n return (\n <AuiIf condition={(s) => s.thread.isEmpty}>\n <div\n data-testid=\"thread-loading-overlay\"\n role=\"status\"\n aria-label=\"Loading conversation\"\n className=\"absolute inset-0 z-10 flex items-center justify-center bg-background/80\"\n >\n <div className=\"size-5 animate-spin rounded-full border-2 border-muted-foreground border-t-transparent\" />\n </div>\n </AuiIf>\n );\n};\n"],"names":["useAthenaThreadId","useState","useEffect","AuiIf","jsx"],"mappings":";;;;;;AAMO,MAAM,oCAAoC;AAY1C,MAAM,uBAA2B,MAAM;AAC5C,QAAM,WAAWA,gBAAAA,kBAAA;AACjB,QAAM,CAAC,UAAU,WAAW,IAAIC,MAAAA,SAAS,KAAK;AAE9CC,QAAAA,UAAU,MAAM;AACd,QAAI,CAAC,SAAU;AACf,gBAAY,KAAK;AACjB,UAAM,QAAQ,WAAW,MAAM,YAAY,IAAI,GAAG,iCAAiC;AACnF,WAAO,MAAM,aAAa,KAAK;AAAA,EACjC,GAAG,CAAC,QAAQ,CAAC;AAEb,MAAI,CAAC,YAAY,SAAU,QAAO;AAElC,wCACGC,eAAA,EAAM,WAAW,CAAC,MAAM,EAAE,OAAO,SAChC,UAAAC,2BAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,eAAY;AAAA,MACZ,MAAK;AAAA,MACL,cAAW;AAAA,MACX,WAAU;AAAA,MAEV,UAAAA,2BAAAA,IAAC,OAAA,EAAI,WAAU,yFAAA,CAAyF;AAAA,IAAA;AAAA,EAAA,GAE5G;AAEJ;;;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
/** How long the overlay covers an empty thread with server history before giving up. */
|
|
3
|
+
export declare const THREAD_LOADING_OVERLAY_TIMEOUT_MS = 15000;
|
|
4
|
+
/**
|
|
5
|
+
* The scrim `AthenaChat` mounts over the thread panel while a thread that
|
|
6
|
+
* has server history (`useAthenaThreadId()` defined) is still empty — the
|
|
7
|
+
* attach has not delivered its snapshot yet. A never-started chat is empty
|
|
8
|
+
* on purpose and gets no scrim; a switch to a thread the snapshot cache
|
|
9
|
+
* holds (a recently visited or hover-prefetched session) mounts with its
|
|
10
|
+
* messages and never shows it either. Gives up after
|
|
11
|
+
* {@link THREAD_LOADING_OVERLAY_TIMEOUT_MS} so a thread that is genuinely
|
|
12
|
+
* empty on the server does not stay covered.
|
|
13
|
+
*/
|
|
14
|
+
export declare const ThreadLoadingOverlay: FC;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { AuiIf } from "@assistant-ui/react";
|
|
3
|
+
import { useState, useEffect } from "react";
|
|
4
|
+
import { useAthenaThreadId } from "../../threads/thread-id-context.js";
|
|
5
|
+
const THREAD_LOADING_OVERLAY_TIMEOUT_MS = 15e3;
|
|
6
|
+
const ThreadLoadingOverlay = () => {
|
|
7
|
+
const remoteId = useAthenaThreadId();
|
|
8
|
+
const [timedOut, setTimedOut] = useState(false);
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
if (!remoteId) return;
|
|
11
|
+
setTimedOut(false);
|
|
12
|
+
const timer = setTimeout(() => setTimedOut(true), THREAD_LOADING_OVERLAY_TIMEOUT_MS);
|
|
13
|
+
return () => clearTimeout(timer);
|
|
14
|
+
}, [remoteId]);
|
|
15
|
+
if (!remoteId || timedOut) return null;
|
|
16
|
+
return /* @__PURE__ */ jsx(AuiIf, { condition: (s) => s.thread.isEmpty, children: /* @__PURE__ */ jsx(
|
|
17
|
+
"div",
|
|
18
|
+
{
|
|
19
|
+
"data-testid": "thread-loading-overlay",
|
|
20
|
+
role: "status",
|
|
21
|
+
"aria-label": "Loading conversation",
|
|
22
|
+
className: "absolute inset-0 z-10 flex items-center justify-center bg-background/80",
|
|
23
|
+
children: /* @__PURE__ */ jsx("div", { className: "size-5 animate-spin rounded-full border-2 border-muted-foreground border-t-transparent" })
|
|
24
|
+
}
|
|
25
|
+
) });
|
|
26
|
+
};
|
|
27
|
+
export {
|
|
28
|
+
THREAD_LOADING_OVERLAY_TIMEOUT_MS,
|
|
29
|
+
ThreadLoadingOverlay
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=thread-loading-overlay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thread-loading-overlay.js","sources":["../../../src/chat-ui/thread/thread-loading-overlay.tsx"],"sourcesContent":["import { AuiIf } from '@assistant-ui/react';\nimport type { FC } from 'react';\nimport { useEffect, useState } from 'react';\nimport { useAthenaThreadId } from '../../threads/thread-id-context';\n\n/** How long the overlay covers an empty thread with server history before giving up. */\nexport const THREAD_LOADING_OVERLAY_TIMEOUT_MS = 15_000;\n\n/**\n * The scrim `AthenaChat` mounts over the thread panel while a thread that\n * has server history (`useAthenaThreadId()` defined) is still empty — the\n * attach has not delivered its snapshot yet. A never-started chat is empty\n * on purpose and gets no scrim; a switch to a thread the snapshot cache\n * holds (a recently visited or hover-prefetched session) mounts with its\n * messages and never shows it either. Gives up after\n * {@link THREAD_LOADING_OVERLAY_TIMEOUT_MS} so a thread that is genuinely\n * empty on the server does not stay covered.\n */\nexport const ThreadLoadingOverlay: FC = () => {\n const remoteId = useAthenaThreadId();\n const [timedOut, setTimedOut] = useState(false);\n\n useEffect(() => {\n if (!remoteId) return;\n setTimedOut(false);\n const timer = setTimeout(() => setTimedOut(true), THREAD_LOADING_OVERLAY_TIMEOUT_MS);\n return () => clearTimeout(timer);\n }, [remoteId]);\n\n if (!remoteId || timedOut) return null;\n\n return (\n <AuiIf condition={(s) => s.thread.isEmpty}>\n <div\n data-testid=\"thread-loading-overlay\"\n role=\"status\"\n aria-label=\"Loading conversation\"\n className=\"absolute inset-0 z-10 flex items-center justify-center bg-background/80\"\n >\n <div className=\"size-5 animate-spin rounded-full border-2 border-muted-foreground border-t-transparent\" />\n </div>\n </AuiIf>\n );\n};\n"],"names":[],"mappings":";;;;AAMO,MAAM,oCAAoC;AAY1C,MAAM,uBAA2B,MAAM;AAC5C,QAAM,WAAW,kBAAA;AACjB,QAAM,CAAC,UAAU,WAAW,IAAI,SAAS,KAAK;AAE9C,YAAU,MAAM;AACd,QAAI,CAAC,SAAU;AACf,gBAAY,KAAK;AACjB,UAAM,QAAQ,WAAW,MAAM,YAAY,IAAI,GAAG,iCAAiC;AACnF,WAAO,MAAM,aAAa,KAAK;AAAA,EACjC,GAAG,CAAC,QAAQ,CAAC;AAEb,MAAI,CAAC,YAAY,SAAU,QAAO;AAElC,6BACG,OAAA,EAAM,WAAW,CAAC,MAAM,EAAE,OAAO,SAChC,UAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,eAAY;AAAA,MACZ,MAAK;AAAA,MACL,cAAW;AAAA,MACX,WAAU;AAAA,MAEV,UAAA,oBAAC,OAAA,EAAI,WAAU,yFAAA,CAAyF;AAAA,IAAA;AAAA,EAAA,GAE5G;AAEJ;"}
|
|
@@ -8,11 +8,18 @@ const cnfast = require("cnfast");
|
|
|
8
8
|
const ComposerDropZone = ({
|
|
9
9
|
children,
|
|
10
10
|
className,
|
|
11
|
-
onUpload
|
|
11
|
+
onUpload,
|
|
12
|
+
onDragActiveChange
|
|
12
13
|
}) => {
|
|
13
14
|
const [isDragOver, setIsDragOver] = react.useState(false);
|
|
14
15
|
const { attachFiles } = useAttachFiles.useAttachFiles();
|
|
15
16
|
const { isUploading } = AttachmentContext.useAttachments();
|
|
17
|
+
const onDragActiveChangeRef = react.useRef(onDragActiveChange);
|
|
18
|
+
onDragActiveChangeRef.current = onDragActiveChange;
|
|
19
|
+
react.useEffect(() => {
|
|
20
|
+
var _a;
|
|
21
|
+
(_a = onDragActiveChangeRef.current) == null ? void 0 : _a.call(onDragActiveChangeRef, isDragOver);
|
|
22
|
+
}, [isDragOver]);
|
|
16
23
|
const handleDragOver = react.useCallback((e) => {
|
|
17
24
|
e.preventDefault();
|
|
18
25
|
e.stopPropagation();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComposerDropZone.cjs","sources":["../../src/composer/ComposerDropZone.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"ComposerDropZone.cjs","sources":["../../src/composer/ComposerDropZone.tsx"],"sourcesContent":["import {\n useCallback,\n useEffect,\n useRef,\n useState,\n type DragEvent,\n type FC,\n type ReactNode,\n} from 'react';\nimport { useAttachments } from './AttachmentContext';\nimport { useAttachFiles } from './useAttachFiles';\nimport type { UploadedAsset } from './useFileUpload';\nimport { cn } from '../lib/utils';\n\nexport interface ComposerDropZoneProps {\n children: ReactNode;\n className?: string;\n /** Called after files are uploaded via drag-and-drop. */\n onUpload?: (assets: UploadedAsset[]) => void;\n /**\n * Reports whether files are being dragged over the zone, so the composer\n * surface inside can tint itself (`ChatComposerDock dragActive`). Called\n * with `false` on mount and again on every change.\n */\n onDragActiveChange?: (active: boolean) => void;\n}\n\n/**\n * Wraps the composer area with drag-and-drop file upload support.\n * Shows a visual drop indicator when files are dragged over.\n */\nexport const ComposerDropZone: FC<ComposerDropZoneProps> = ({\n children,\n className,\n onUpload,\n onDragActiveChange,\n}) => {\n const [isDragOver, setIsDragOver] = useState(false);\n const { attachFiles } = useAttachFiles();\n const { isUploading } = useAttachments();\n\n const onDragActiveChangeRef = useRef(onDragActiveChange);\n onDragActiveChangeRef.current = onDragActiveChange;\n useEffect(() => {\n onDragActiveChangeRef.current?.(isDragOver);\n }, [isDragOver]);\n\n const handleDragOver = useCallback((e: DragEvent) => {\n e.preventDefault();\n e.stopPropagation();\n if (e.dataTransfer.types.includes('Files')) {\n setIsDragOver(true);\n }\n }, []);\n\n const handleDragLeave = useCallback((e: DragEvent) => {\n e.preventDefault();\n e.stopPropagation();\n const rect = (e.currentTarget as HTMLElement).getBoundingClientRect();\n const { clientX, clientY } = e;\n if (\n clientX < rect.left ||\n clientX > rect.right ||\n clientY < rect.top ||\n clientY > rect.bottom\n ) {\n setIsDragOver(false);\n }\n }, []);\n\n const handleDrop = useCallback(\n async (e: DragEvent) => {\n e.preventDefault();\n e.stopPropagation();\n setIsDragOver(false);\n\n const files = Array.from(e.dataTransfer.files);\n if (files.length === 0) return;\n\n const assets = await attachFiles(files, 'drop');\n if (assets.length > 0) {\n onUpload?.(assets);\n }\n },\n [attachFiles, onUpload],\n );\n\n return (\n <div\n className={cn('relative', className)}\n onDragOver={handleDragOver}\n onDragLeave={handleDragLeave}\n onDrop={handleDrop}\n >\n {children}\n {isDragOver && !isUploading && (\n <div className=\"aui-drop-overlay pointer-events-none absolute inset-0 z-20 flex items-center justify-center rounded-2xl border-2 border-dashed border-primary/50 bg-primary/5\">\n <span className=\"text-sm font-medium text-primary\">Drop files to upload</span>\n </div>\n )}\n </div>\n );\n};\n"],"names":["useState","useAttachFiles","useAttachments","useRef","useEffect","useCallback","jsxs","cn","jsx"],"mappings":";;;;;;;AA+BO,MAAM,mBAA8C,CAAC;AAAA,EAC1D;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,CAAC,YAAY,aAAa,IAAIA,MAAAA,SAAS,KAAK;AAClD,QAAM,EAAE,YAAA,IAAgBC,8BAAA;AACxB,QAAM,EAAE,YAAA,IAAgBC,iCAAA;AAExB,QAAM,wBAAwBC,MAAAA,OAAO,kBAAkB;AACvD,wBAAsB,UAAU;AAChCC,QAAAA,UAAU,MAAM;;AACd,gCAAsB,YAAtB,+CAAgC;AAAA,EAClC,GAAG,CAAC,UAAU,CAAC;AAEf,QAAM,iBAAiBC,kBAAY,CAAC,MAAiB;AACnD,MAAE,eAAA;AACF,MAAE,gBAAA;AACF,QAAI,EAAE,aAAa,MAAM,SAAS,OAAO,GAAG;AAC1C,oBAAc,IAAI;AAAA,IACpB;AAAA,EACF,GAAG,CAAA,CAAE;AAEL,QAAM,kBAAkBA,kBAAY,CAAC,MAAiB;AACpD,MAAE,eAAA;AACF,MAAE,gBAAA;AACF,UAAM,OAAQ,EAAE,cAA8B,sBAAA;AAC9C,UAAM,EAAE,SAAS,QAAA,IAAY;AAC7B,QACE,UAAU,KAAK,QACf,UAAU,KAAK,SACf,UAAU,KAAK,OACf,UAAU,KAAK,QACf;AACA,oBAAc,KAAK;AAAA,IACrB;AAAA,EACF,GAAG,CAAA,CAAE;AAEL,QAAM,aAAaA,MAAAA;AAAAA,IACjB,OAAO,MAAiB;AACtB,QAAE,eAAA;AACF,QAAE,gBAAA;AACF,oBAAc,KAAK;AAEnB,YAAM,QAAQ,MAAM,KAAK,EAAE,aAAa,KAAK;AAC7C,UAAI,MAAM,WAAW,EAAG;AAExB,YAAM,SAAS,MAAM,YAAY,OAAO,MAAM;AAC9C,UAAI,OAAO,SAAS,GAAG;AACrB,6CAAW;AAAA,MACb;AAAA,IACF;AAAA,IACA,CAAC,aAAa,QAAQ;AAAA,EAAA;AAGxB,SACEC,2BAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,OAAAA,GAAG,YAAY,SAAS;AAAA,MACnC,YAAY;AAAA,MACZ,aAAa;AAAA,MACb,QAAQ;AAAA,MAEP,UAAA;AAAA,QAAA;AAAA,QACA,cAAc,CAAC,eACdC,2BAAAA,IAAC,OAAA,EAAI,WAAU,iKACb,UAAAA,2BAAAA,IAAC,QAAA,EAAK,WAAU,oCAAmC,UAAA,uBAAA,CAAoB,EAAA,CACzE;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR;;"}
|
|
@@ -5,6 +5,12 @@ export interface ComposerDropZoneProps {
|
|
|
5
5
|
className?: string;
|
|
6
6
|
/** Called after files are uploaded via drag-and-drop. */
|
|
7
7
|
onUpload?: (assets: UploadedAsset[]) => void;
|
|
8
|
+
/**
|
|
9
|
+
* Reports whether files are being dragged over the zone, so the composer
|
|
10
|
+
* surface inside can tint itself (`ChatComposerDock dragActive`). Called
|
|
11
|
+
* with `false` on mount and again on every change.
|
|
12
|
+
*/
|
|
13
|
+
onDragActiveChange?: (active: boolean) => void;
|
|
8
14
|
}
|
|
9
15
|
/**
|
|
10
16
|
* Wraps the composer area with drag-and-drop file upload support.
|
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useState, useCallback } from "react";
|
|
2
|
+
import { useState, useRef, useEffect, useCallback } from "react";
|
|
3
3
|
import { useAttachments } from "./AttachmentContext.js";
|
|
4
4
|
import { useAttachFiles } from "./useAttachFiles.js";
|
|
5
5
|
import { cn } from "cnfast";
|
|
6
6
|
const ComposerDropZone = ({
|
|
7
7
|
children,
|
|
8
8
|
className,
|
|
9
|
-
onUpload
|
|
9
|
+
onUpload,
|
|
10
|
+
onDragActiveChange
|
|
10
11
|
}) => {
|
|
11
12
|
const [isDragOver, setIsDragOver] = useState(false);
|
|
12
13
|
const { attachFiles } = useAttachFiles();
|
|
13
14
|
const { isUploading } = useAttachments();
|
|
15
|
+
const onDragActiveChangeRef = useRef(onDragActiveChange);
|
|
16
|
+
onDragActiveChangeRef.current = onDragActiveChange;
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
var _a;
|
|
19
|
+
(_a = onDragActiveChangeRef.current) == null ? void 0 : _a.call(onDragActiveChangeRef, isDragOver);
|
|
20
|
+
}, [isDragOver]);
|
|
14
21
|
const handleDragOver = useCallback((e) => {
|
|
15
22
|
e.preventDefault();
|
|
16
23
|
e.stopPropagation();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComposerDropZone.js","sources":["../../src/composer/ComposerDropZone.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"ComposerDropZone.js","sources":["../../src/composer/ComposerDropZone.tsx"],"sourcesContent":["import {\n useCallback,\n useEffect,\n useRef,\n useState,\n type DragEvent,\n type FC,\n type ReactNode,\n} from 'react';\nimport { useAttachments } from './AttachmentContext';\nimport { useAttachFiles } from './useAttachFiles';\nimport type { UploadedAsset } from './useFileUpload';\nimport { cn } from '../lib/utils';\n\nexport interface ComposerDropZoneProps {\n children: ReactNode;\n className?: string;\n /** Called after files are uploaded via drag-and-drop. */\n onUpload?: (assets: UploadedAsset[]) => void;\n /**\n * Reports whether files are being dragged over the zone, so the composer\n * surface inside can tint itself (`ChatComposerDock dragActive`). Called\n * with `false` on mount and again on every change.\n */\n onDragActiveChange?: (active: boolean) => void;\n}\n\n/**\n * Wraps the composer area with drag-and-drop file upload support.\n * Shows a visual drop indicator when files are dragged over.\n */\nexport const ComposerDropZone: FC<ComposerDropZoneProps> = ({\n children,\n className,\n onUpload,\n onDragActiveChange,\n}) => {\n const [isDragOver, setIsDragOver] = useState(false);\n const { attachFiles } = useAttachFiles();\n const { isUploading } = useAttachments();\n\n const onDragActiveChangeRef = useRef(onDragActiveChange);\n onDragActiveChangeRef.current = onDragActiveChange;\n useEffect(() => {\n onDragActiveChangeRef.current?.(isDragOver);\n }, [isDragOver]);\n\n const handleDragOver = useCallback((e: DragEvent) => {\n e.preventDefault();\n e.stopPropagation();\n if (e.dataTransfer.types.includes('Files')) {\n setIsDragOver(true);\n }\n }, []);\n\n const handleDragLeave = useCallback((e: DragEvent) => {\n e.preventDefault();\n e.stopPropagation();\n const rect = (e.currentTarget as HTMLElement).getBoundingClientRect();\n const { clientX, clientY } = e;\n if (\n clientX < rect.left ||\n clientX > rect.right ||\n clientY < rect.top ||\n clientY > rect.bottom\n ) {\n setIsDragOver(false);\n }\n }, []);\n\n const handleDrop = useCallback(\n async (e: DragEvent) => {\n e.preventDefault();\n e.stopPropagation();\n setIsDragOver(false);\n\n const files = Array.from(e.dataTransfer.files);\n if (files.length === 0) return;\n\n const assets = await attachFiles(files, 'drop');\n if (assets.length > 0) {\n onUpload?.(assets);\n }\n },\n [attachFiles, onUpload],\n );\n\n return (\n <div\n className={cn('relative', className)}\n onDragOver={handleDragOver}\n onDragLeave={handleDragLeave}\n onDrop={handleDrop}\n >\n {children}\n {isDragOver && !isUploading && (\n <div className=\"aui-drop-overlay pointer-events-none absolute inset-0 z-20 flex items-center justify-center rounded-2xl border-2 border-dashed border-primary/50 bg-primary/5\">\n <span className=\"text-sm font-medium text-primary\">Drop files to upload</span>\n </div>\n )}\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;AA+BO,MAAM,mBAA8C,CAAC;AAAA,EAC1D;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,CAAC,YAAY,aAAa,IAAI,SAAS,KAAK;AAClD,QAAM,EAAE,YAAA,IAAgB,eAAA;AACxB,QAAM,EAAE,YAAA,IAAgB,eAAA;AAExB,QAAM,wBAAwB,OAAO,kBAAkB;AACvD,wBAAsB,UAAU;AAChC,YAAU,MAAM;;AACd,gCAAsB,YAAtB,+CAAgC;AAAA,EAClC,GAAG,CAAC,UAAU,CAAC;AAEf,QAAM,iBAAiB,YAAY,CAAC,MAAiB;AACnD,MAAE,eAAA;AACF,MAAE,gBAAA;AACF,QAAI,EAAE,aAAa,MAAM,SAAS,OAAO,GAAG;AAC1C,oBAAc,IAAI;AAAA,IACpB;AAAA,EACF,GAAG,CAAA,CAAE;AAEL,QAAM,kBAAkB,YAAY,CAAC,MAAiB;AACpD,MAAE,eAAA;AACF,MAAE,gBAAA;AACF,UAAM,OAAQ,EAAE,cAA8B,sBAAA;AAC9C,UAAM,EAAE,SAAS,QAAA,IAAY;AAC7B,QACE,UAAU,KAAK,QACf,UAAU,KAAK,SACf,UAAU,KAAK,OACf,UAAU,KAAK,QACf;AACA,oBAAc,KAAK;AAAA,IACrB;AAAA,EACF,GAAG,CAAA,CAAE;AAEL,QAAM,aAAa;AAAA,IACjB,OAAO,MAAiB;AACtB,QAAE,eAAA;AACF,QAAE,gBAAA;AACF,oBAAc,KAAK;AAEnB,YAAM,QAAQ,MAAM,KAAK,EAAE,aAAa,KAAK;AAC7C,UAAI,MAAM,WAAW,EAAG;AAExB,YAAM,SAAS,MAAM,YAAY,OAAO,MAAM;AAC9C,UAAI,OAAO,SAAS,GAAG;AACrB,6CAAW;AAAA,MACb;AAAA,IACF;AAAA,IACA,CAAC,aAAa,QAAQ;AAAA,EAAA;AAGxB,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW,GAAG,YAAY,SAAS;AAAA,MACnC,YAAY;AAAA,MACZ,aAAa;AAAA,MACb,QAAQ;AAAA,MAEP,UAAA;AAAA,QAAA;AAAA,QACA,cAAc,CAAC,eACd,oBAAC,OAAA,EAAI,WAAU,iKACb,UAAA,oBAAC,QAAA,EAAK,WAAU,oCAAmC,UAAA,uBAAA,CAAoB,EAAA,CACzE;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR;"}
|
|
@@ -18,6 +18,24 @@ const ATHENA_SDK_ERROR_CODES = {
|
|
|
18
18
|
threads_list_failed: "threads_list_failed",
|
|
19
19
|
/** Loading a thread's history failed. */
|
|
20
20
|
thread_load_failed: "thread_load_failed",
|
|
21
|
+
/**
|
|
22
|
+
* Pinning / unpinning a thread failed. `status` 404 / 405 means the backend
|
|
23
|
+
* predates `POST /api/conversations/threads/favorite` (see
|
|
24
|
+
* `isThreadFavoriteUnavailableError`); the pin then stays read-only.
|
|
25
|
+
*/
|
|
26
|
+
thread_favorite_failed: "thread_favorite_failed",
|
|
27
|
+
/**
|
|
28
|
+
* Renaming a thread failed. `status` 404 / 405 means the backend predates
|
|
29
|
+
* `POST /api/conversations/threads/rename` (see
|
|
30
|
+
* `isThreadRenameUnavailableError`); the list then offers no rename.
|
|
31
|
+
*/
|
|
32
|
+
thread_rename_failed: "thread_rename_failed",
|
|
33
|
+
/**
|
|
34
|
+
* Archiving a thread failed. `status` 404 / 405 means the backend has no
|
|
35
|
+
* archive route (see `isThreadArchiveUnavailableError`); the list then
|
|
36
|
+
* offers no archive action.
|
|
37
|
+
*/
|
|
38
|
+
thread_archive_failed: "thread_archive_failed",
|
|
21
39
|
/** The statewire host rejected a command (structured `{status, detail}`). */
|
|
22
40
|
statewire_rejected: "statewire_rejected",
|
|
23
41
|
/** The statewire connection is gone and will not reconnect on its own. */
|
|
@@ -30,6 +48,8 @@ const ATHENA_SDK_ERROR_CODES = {
|
|
|
30
48
|
attachment_failed: "attachment_failed",
|
|
31
49
|
/** Mention suggestions for a scope failed after every retry. */
|
|
32
50
|
mentions_fetch_failed: "mentions_fetch_failed",
|
|
51
|
+
/** The repository code search request (`/api/search/repositories`) failed. */
|
|
52
|
+
repo_search_failed: "repo_search_failed",
|
|
33
53
|
/** Anything else. */
|
|
34
54
|
unknown: "unknown"
|
|
35
55
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.cjs","sources":["../../src/diagnostics/errors.ts"],"sourcesContent":["/**\n * Typed SDK errors. Every failure the SDK surfaces to a consumer carries a\n * stable `code` (matchable in code), a human `message`, and a `hint` — the\n * one-line \"what to do about it\" that turns a silent failure into a debuggable\n * one. Backend rejections keep their structured `{ status, detail }` payload.\n */\n\nexport const ATHENA_SDK_ERROR_CODES = {\n /** No token and no API key resolved before a request had to be sent. */\n auth_missing: 'auth_missing',\n /** The server refused the credential (401 / statewire `unauthorized` fin). */\n auth_rejected: 'auth_rejected',\n /** `/_athena/auth` or the iframe bridge did not answer within the timeout. */\n auth_bridge_timeout: 'auth_bridge_timeout',\n /** `/_athena/auth` answered with a non-404 error. */\n auth_bridge_failed: 'auth_bridge_failed',\n /** The statewire sync URL could not be derived from the configuration. */\n config_invalid: 'config_invalid',\n /** The thread list request failed. */\n threads_list_failed: 'threads_list_failed',\n /** Loading a thread's history failed. */\n thread_load_failed: 'thread_load_failed',\n /** The statewire host rejected a command (structured `{status, detail}`). */\n statewire_rejected: 'statewire_rejected',\n /** The statewire connection is gone and will not reconnect on its own. */\n statewire_gone: 'statewire_gone',\n /** The selected collab agent / channel was refused by the backend. */\n collab_agent_rejected: 'collab_agent_rejected',\n /** A React render error crashed the chat surface (caught by the SDK's error boundary). */\n chat_render_crash: 'chat_render_crash',\n /** A pasted or dropped file could not be uploaded as a composer attachment. */\n attachment_failed: 'attachment_failed',\n /** Mention suggestions for a scope failed after every retry. */\n mentions_fetch_failed: 'mentions_fetch_failed',\n /** Anything else. */\n unknown: 'unknown',\n} as const;\n\nexport type AthenaSdkErrorCode =\n (typeof ATHENA_SDK_ERROR_CODES)[keyof typeof ATHENA_SDK_ERROR_CODES];\n\nexport interface AthenaSdkErrorOptions {\n code: AthenaSdkErrorCode;\n message: string;\n /** One line telling the integrator what to check or change. */\n hint?: string;\n /** HTTP-ish status when the failure came from a server. */\n status?: number;\n /** Structured server detail (e.g. `{ code, message }` from agora). */\n detail?: unknown;\n cause?: unknown;\n /** Extra structured context safe to log (never credentials). */\n context?: Record<string, unknown>;\n}\n\nexport class AthenaSdkError extends Error {\n readonly code: AthenaSdkErrorCode;\n readonly hint: string | undefined;\n readonly status: number | undefined;\n readonly detail: unknown;\n readonly context: Record<string, unknown>;\n\n constructor(options: AthenaSdkErrorOptions) {\n super(options.message, options.cause === undefined ? undefined : { cause: options.cause });\n this.name = 'AthenaSdkError';\n this.code = options.code;\n this.hint = options.hint;\n this.status = options.status;\n this.detail = options.detail;\n this.context = options.context ?? {};\n }\n\n /** A log/console-friendly one-liner: `[code] message — hint`. */\n describe(): string {\n return `[${this.code}] ${this.message}${this.hint ? ` — ${this.hint}` : ''}`;\n }\n\n toJSON(): Record<string, unknown> {\n return {\n name: this.name,\n code: this.code,\n message: this.message,\n hint: this.hint,\n status: this.status,\n detail: this.detail,\n context: this.context,\n };\n }\n}\n\nexport function isAthenaSdkError(value: unknown): value is AthenaSdkError {\n return value instanceof AthenaSdkError;\n}\n\n/** Wrap any thrown value as an `AthenaSdkError` (idempotent for SDK errors). */\nexport function toAthenaSdkError(\n value: unknown,\n fallback: Omit<AthenaSdkErrorOptions, 'cause'>,\n): AthenaSdkError {\n if (isAthenaSdkError(value)) return value;\n const message =\n value instanceof Error && value.message ? value.message : fallback.message;\n return new AthenaSdkError({ ...fallback, message, cause: value });\n}\n\n/** Structured `{ code, message }` detail from an agora rejection, if present. */\nexport function readRejectionDetail(\n detail: unknown,\n): { code: string | null; message: string | null } {\n if (typeof detail === 'string') return { code: null, message: detail || null };\n if (!detail || typeof detail !== 'object') return { code: null, message: null };\n const record = detail as { code?: unknown; message?: unknown };\n return {\n code: typeof record.code === 'string' ? record.code : null,\n message: typeof record.message === 'string' ? record.message : null,\n };\n}\n"],"names":[],"mappings":";;;;;AAOO,MAAM,yBAAyB;AAAA;AAAA,EAEpC,cAAc;AAAA;AAAA,EAEd,eAAe;AAAA;AAAA,EAEf,qBAAqB;AAAA;AAAA,EAErB,oBAAoB;AAAA;AAAA,EAEpB,gBAAgB;AAAA;AAAA,EAEhB,qBAAqB;AAAA;AAAA,EAErB,oBAAoB;AAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"errors.cjs","sources":["../../src/diagnostics/errors.ts"],"sourcesContent":["/**\n * Typed SDK errors. Every failure the SDK surfaces to a consumer carries a\n * stable `code` (matchable in code), a human `message`, and a `hint` — the\n * one-line \"what to do about it\" that turns a silent failure into a debuggable\n * one. Backend rejections keep their structured `{ status, detail }` payload.\n */\n\nexport const ATHENA_SDK_ERROR_CODES = {\n /** No token and no API key resolved before a request had to be sent. */\n auth_missing: 'auth_missing',\n /** The server refused the credential (401 / statewire `unauthorized` fin). */\n auth_rejected: 'auth_rejected',\n /** `/_athena/auth` or the iframe bridge did not answer within the timeout. */\n auth_bridge_timeout: 'auth_bridge_timeout',\n /** `/_athena/auth` answered with a non-404 error. */\n auth_bridge_failed: 'auth_bridge_failed',\n /** The statewire sync URL could not be derived from the configuration. */\n config_invalid: 'config_invalid',\n /** The thread list request failed. */\n threads_list_failed: 'threads_list_failed',\n /** Loading a thread's history failed. */\n thread_load_failed: 'thread_load_failed',\n /**\n * Pinning / unpinning a thread failed. `status` 404 / 405 means the backend\n * predates `POST /api/conversations/threads/favorite` (see\n * `isThreadFavoriteUnavailableError`); the pin then stays read-only.\n */\n thread_favorite_failed: 'thread_favorite_failed',\n /**\n * Renaming a thread failed. `status` 404 / 405 means the backend predates\n * `POST /api/conversations/threads/rename` (see\n * `isThreadRenameUnavailableError`); the list then offers no rename.\n */\n thread_rename_failed: 'thread_rename_failed',\n /**\n * Archiving a thread failed. `status` 404 / 405 means the backend has no\n * archive route (see `isThreadArchiveUnavailableError`); the list then\n * offers no archive action.\n */\n thread_archive_failed: 'thread_archive_failed',\n /** The statewire host rejected a command (structured `{status, detail}`). */\n statewire_rejected: 'statewire_rejected',\n /** The statewire connection is gone and will not reconnect on its own. */\n statewire_gone: 'statewire_gone',\n /** The selected collab agent / channel was refused by the backend. */\n collab_agent_rejected: 'collab_agent_rejected',\n /** A React render error crashed the chat surface (caught by the SDK's error boundary). */\n chat_render_crash: 'chat_render_crash',\n /** A pasted or dropped file could not be uploaded as a composer attachment. */\n attachment_failed: 'attachment_failed',\n /** Mention suggestions for a scope failed after every retry. */\n mentions_fetch_failed: 'mentions_fetch_failed',\n /** The repository code search request (`/api/search/repositories`) failed. */\n repo_search_failed: 'repo_search_failed',\n /** Anything else. */\n unknown: 'unknown',\n} as const;\n\nexport type AthenaSdkErrorCode =\n (typeof ATHENA_SDK_ERROR_CODES)[keyof typeof ATHENA_SDK_ERROR_CODES];\n\nexport interface AthenaSdkErrorOptions {\n code: AthenaSdkErrorCode;\n message: string;\n /** One line telling the integrator what to check or change. */\n hint?: string;\n /** HTTP-ish status when the failure came from a server. */\n status?: number;\n /** Structured server detail (e.g. `{ code, message }` from agora). */\n detail?: unknown;\n cause?: unknown;\n /** Extra structured context safe to log (never credentials). */\n context?: Record<string, unknown>;\n}\n\nexport class AthenaSdkError extends Error {\n readonly code: AthenaSdkErrorCode;\n readonly hint: string | undefined;\n readonly status: number | undefined;\n readonly detail: unknown;\n readonly context: Record<string, unknown>;\n\n constructor(options: AthenaSdkErrorOptions) {\n super(options.message, options.cause === undefined ? undefined : { cause: options.cause });\n this.name = 'AthenaSdkError';\n this.code = options.code;\n this.hint = options.hint;\n this.status = options.status;\n this.detail = options.detail;\n this.context = options.context ?? {};\n }\n\n /** A log/console-friendly one-liner: `[code] message — hint`. */\n describe(): string {\n return `[${this.code}] ${this.message}${this.hint ? ` — ${this.hint}` : ''}`;\n }\n\n toJSON(): Record<string, unknown> {\n return {\n name: this.name,\n code: this.code,\n message: this.message,\n hint: this.hint,\n status: this.status,\n detail: this.detail,\n context: this.context,\n };\n }\n}\n\nexport function isAthenaSdkError(value: unknown): value is AthenaSdkError {\n return value instanceof AthenaSdkError;\n}\n\n/** Wrap any thrown value as an `AthenaSdkError` (idempotent for SDK errors). */\nexport function toAthenaSdkError(\n value: unknown,\n fallback: Omit<AthenaSdkErrorOptions, 'cause'>,\n): AthenaSdkError {\n if (isAthenaSdkError(value)) return value;\n const message =\n value instanceof Error && value.message ? value.message : fallback.message;\n return new AthenaSdkError({ ...fallback, message, cause: value });\n}\n\n/** Structured `{ code, message }` detail from an agora rejection, if present. */\nexport function readRejectionDetail(\n detail: unknown,\n): { code: string | null; message: string | null } {\n if (typeof detail === 'string') return { code: null, message: detail || null };\n if (!detail || typeof detail !== 'object') return { code: null, message: null };\n const record = detail as { code?: unknown; message?: unknown };\n return {\n code: typeof record.code === 'string' ? record.code : null,\n message: typeof record.message === 'string' ? record.message : null,\n };\n}\n"],"names":[],"mappings":";;;;;AAOO,MAAM,yBAAyB;AAAA;AAAA,EAEpC,cAAc;AAAA;AAAA,EAEd,eAAe;AAAA;AAAA,EAEf,qBAAqB;AAAA;AAAA,EAErB,oBAAoB;AAAA;AAAA,EAEpB,gBAAgB;AAAA;AAAA,EAEhB,qBAAqB;AAAA;AAAA,EAErB,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMpB,wBAAwB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMxB,sBAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMtB,uBAAuB;AAAA;AAAA,EAEvB,oBAAoB;AAAA;AAAA,EAEpB,gBAAgB;AAAA;AAAA,EAEhB,uBAAuB;AAAA;AAAA,EAEvB,mBAAmB;AAAA;AAAA,EAEnB,mBAAmB;AAAA;AAAA,EAEnB,uBAAuB;AAAA;AAAA,EAEvB,oBAAoB;AAAA;AAAA,EAEpB,SAAS;AACX;AAmBO,MAAM,uBAAuB,MAAM;AAAA,EAOxC,YAAY,SAAgC;AAC1C,UAAM,QAAQ,SAAS,QAAQ,UAAU,SAAY,SAAY,EAAE,OAAO,QAAQ,MAAA,CAAO;AAPlF;AACA;AACA;AACA;AACA;AAIP,SAAK,OAAO;AACZ,SAAK,OAAO,QAAQ;AACpB,SAAK,OAAO,QAAQ;AACpB,SAAK,SAAS,QAAQ;AACtB,SAAK,SAAS,QAAQ;AACtB,SAAK,UAAU,QAAQ,WAAW,CAAA;AAAA,EACpC;AAAA;AAAA,EAGA,WAAmB;AACjB,WAAO,IAAI,KAAK,IAAI,KAAK,KAAK,OAAO,GAAG,KAAK,OAAO,MAAM,KAAK,IAAI,KAAK,EAAE;AAAA,EAC5E;AAAA,EAEA,SAAkC;AAChC,WAAO;AAAA,MACL,MAAM,KAAK;AAAA,MACX,MAAM,KAAK;AAAA,MACX,SAAS,KAAK;AAAA,MACd,MAAM,KAAK;AAAA,MACX,QAAQ,KAAK;AAAA,MACb,QAAQ,KAAK;AAAA,MACb,SAAS,KAAK;AAAA,IAAA;AAAA,EAElB;AACF;AAEO,SAAS,iBAAiB,OAAyC;AACxE,SAAO,iBAAiB;AAC1B;AAGO,SAAS,iBACd,OACA,UACgB;AAChB,MAAI,iBAAiB,KAAK,EAAG,QAAO;AACpC,QAAM,UACJ,iBAAiB,SAAS,MAAM,UAAU,MAAM,UAAU,SAAS;AACrE,SAAO,IAAI,eAAe,EAAE,GAAG,UAAU,SAAS,OAAO,OAAO;AAClE;AAGO,SAAS,oBACd,QACiD;AACjD,MAAI,OAAO,WAAW,SAAU,QAAO,EAAE,MAAM,MAAM,SAAS,UAAU,KAAA;AACxE,MAAI,CAAC,UAAU,OAAO,WAAW,iBAAiB,EAAE,MAAM,MAAM,SAAS,KAAA;AACzE,QAAM,SAAS;AACf,SAAO;AAAA,IACL,MAAM,OAAO,OAAO,SAAS,WAAW,OAAO,OAAO;AAAA,IACtD,SAAS,OAAO,OAAO,YAAY,WAAW,OAAO,UAAU;AAAA,EAAA;AAEnE;;;;;;"}
|
|
@@ -19,6 +19,24 @@ export declare const ATHENA_SDK_ERROR_CODES: {
|
|
|
19
19
|
readonly threads_list_failed: 'threads_list_failed';
|
|
20
20
|
/** Loading a thread's history failed. */
|
|
21
21
|
readonly thread_load_failed: 'thread_load_failed';
|
|
22
|
+
/**
|
|
23
|
+
* Pinning / unpinning a thread failed. `status` 404 / 405 means the backend
|
|
24
|
+
* predates `POST /api/conversations/threads/favorite` (see
|
|
25
|
+
* `isThreadFavoriteUnavailableError`); the pin then stays read-only.
|
|
26
|
+
*/
|
|
27
|
+
readonly thread_favorite_failed: 'thread_favorite_failed';
|
|
28
|
+
/**
|
|
29
|
+
* Renaming a thread failed. `status` 404 / 405 means the backend predates
|
|
30
|
+
* `POST /api/conversations/threads/rename` (see
|
|
31
|
+
* `isThreadRenameUnavailableError`); the list then offers no rename.
|
|
32
|
+
*/
|
|
33
|
+
readonly thread_rename_failed: 'thread_rename_failed';
|
|
34
|
+
/**
|
|
35
|
+
* Archiving a thread failed. `status` 404 / 405 means the backend has no
|
|
36
|
+
* archive route (see `isThreadArchiveUnavailableError`); the list then
|
|
37
|
+
* offers no archive action.
|
|
38
|
+
*/
|
|
39
|
+
readonly thread_archive_failed: 'thread_archive_failed';
|
|
22
40
|
/** The statewire host rejected a command (structured `{status, detail}`). */
|
|
23
41
|
readonly statewire_rejected: 'statewire_rejected';
|
|
24
42
|
/** The statewire connection is gone and will not reconnect on its own. */
|
|
@@ -31,6 +49,8 @@ export declare const ATHENA_SDK_ERROR_CODES: {
|
|
|
31
49
|
readonly attachment_failed: 'attachment_failed';
|
|
32
50
|
/** Mention suggestions for a scope failed after every retry. */
|
|
33
51
|
readonly mentions_fetch_failed: 'mentions_fetch_failed';
|
|
52
|
+
/** The repository code search request (`/api/search/repositories`) failed. */
|
|
53
|
+
readonly repo_search_failed: 'repo_search_failed';
|
|
34
54
|
/** Anything else. */
|
|
35
55
|
readonly unknown: 'unknown';
|
|
36
56
|
};
|
|
@@ -16,6 +16,24 @@ const ATHENA_SDK_ERROR_CODES = {
|
|
|
16
16
|
threads_list_failed: "threads_list_failed",
|
|
17
17
|
/** Loading a thread's history failed. */
|
|
18
18
|
thread_load_failed: "thread_load_failed",
|
|
19
|
+
/**
|
|
20
|
+
* Pinning / unpinning a thread failed. `status` 404 / 405 means the backend
|
|
21
|
+
* predates `POST /api/conversations/threads/favorite` (see
|
|
22
|
+
* `isThreadFavoriteUnavailableError`); the pin then stays read-only.
|
|
23
|
+
*/
|
|
24
|
+
thread_favorite_failed: "thread_favorite_failed",
|
|
25
|
+
/**
|
|
26
|
+
* Renaming a thread failed. `status` 404 / 405 means the backend predates
|
|
27
|
+
* `POST /api/conversations/threads/rename` (see
|
|
28
|
+
* `isThreadRenameUnavailableError`); the list then offers no rename.
|
|
29
|
+
*/
|
|
30
|
+
thread_rename_failed: "thread_rename_failed",
|
|
31
|
+
/**
|
|
32
|
+
* Archiving a thread failed. `status` 404 / 405 means the backend has no
|
|
33
|
+
* archive route (see `isThreadArchiveUnavailableError`); the list then
|
|
34
|
+
* offers no archive action.
|
|
35
|
+
*/
|
|
36
|
+
thread_archive_failed: "thread_archive_failed",
|
|
19
37
|
/** The statewire host rejected a command (structured `{status, detail}`). */
|
|
20
38
|
statewire_rejected: "statewire_rejected",
|
|
21
39
|
/** The statewire connection is gone and will not reconnect on its own. */
|
|
@@ -28,6 +46,8 @@ const ATHENA_SDK_ERROR_CODES = {
|
|
|
28
46
|
attachment_failed: "attachment_failed",
|
|
29
47
|
/** Mention suggestions for a scope failed after every retry. */
|
|
30
48
|
mentions_fetch_failed: "mentions_fetch_failed",
|
|
49
|
+
/** The repository code search request (`/api/search/repositories`) failed. */
|
|
50
|
+
repo_search_failed: "repo_search_failed",
|
|
31
51
|
/** Anything else. */
|
|
32
52
|
unknown: "unknown"
|
|
33
53
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sources":["../../src/diagnostics/errors.ts"],"sourcesContent":["/**\n * Typed SDK errors. Every failure the SDK surfaces to a consumer carries a\n * stable `code` (matchable in code), a human `message`, and a `hint` — the\n * one-line \"what to do about it\" that turns a silent failure into a debuggable\n * one. Backend rejections keep their structured `{ status, detail }` payload.\n */\n\nexport const ATHENA_SDK_ERROR_CODES = {\n /** No token and no API key resolved before a request had to be sent. */\n auth_missing: 'auth_missing',\n /** The server refused the credential (401 / statewire `unauthorized` fin). */\n auth_rejected: 'auth_rejected',\n /** `/_athena/auth` or the iframe bridge did not answer within the timeout. */\n auth_bridge_timeout: 'auth_bridge_timeout',\n /** `/_athena/auth` answered with a non-404 error. */\n auth_bridge_failed: 'auth_bridge_failed',\n /** The statewire sync URL could not be derived from the configuration. */\n config_invalid: 'config_invalid',\n /** The thread list request failed. */\n threads_list_failed: 'threads_list_failed',\n /** Loading a thread's history failed. */\n thread_load_failed: 'thread_load_failed',\n /** The statewire host rejected a command (structured `{status, detail}`). */\n statewire_rejected: 'statewire_rejected',\n /** The statewire connection is gone and will not reconnect on its own. */\n statewire_gone: 'statewire_gone',\n /** The selected collab agent / channel was refused by the backend. */\n collab_agent_rejected: 'collab_agent_rejected',\n /** A React render error crashed the chat surface (caught by the SDK's error boundary). */\n chat_render_crash: 'chat_render_crash',\n /** A pasted or dropped file could not be uploaded as a composer attachment. */\n attachment_failed: 'attachment_failed',\n /** Mention suggestions for a scope failed after every retry. */\n mentions_fetch_failed: 'mentions_fetch_failed',\n /** Anything else. */\n unknown: 'unknown',\n} as const;\n\nexport type AthenaSdkErrorCode =\n (typeof ATHENA_SDK_ERROR_CODES)[keyof typeof ATHENA_SDK_ERROR_CODES];\n\nexport interface AthenaSdkErrorOptions {\n code: AthenaSdkErrorCode;\n message: string;\n /** One line telling the integrator what to check or change. */\n hint?: string;\n /** HTTP-ish status when the failure came from a server. */\n status?: number;\n /** Structured server detail (e.g. `{ code, message }` from agora). */\n detail?: unknown;\n cause?: unknown;\n /** Extra structured context safe to log (never credentials). */\n context?: Record<string, unknown>;\n}\n\nexport class AthenaSdkError extends Error {\n readonly code: AthenaSdkErrorCode;\n readonly hint: string | undefined;\n readonly status: number | undefined;\n readonly detail: unknown;\n readonly context: Record<string, unknown>;\n\n constructor(options: AthenaSdkErrorOptions) {\n super(options.message, options.cause === undefined ? undefined : { cause: options.cause });\n this.name = 'AthenaSdkError';\n this.code = options.code;\n this.hint = options.hint;\n this.status = options.status;\n this.detail = options.detail;\n this.context = options.context ?? {};\n }\n\n /** A log/console-friendly one-liner: `[code] message — hint`. */\n describe(): string {\n return `[${this.code}] ${this.message}${this.hint ? ` — ${this.hint}` : ''}`;\n }\n\n toJSON(): Record<string, unknown> {\n return {\n name: this.name,\n code: this.code,\n message: this.message,\n hint: this.hint,\n status: this.status,\n detail: this.detail,\n context: this.context,\n };\n }\n}\n\nexport function isAthenaSdkError(value: unknown): value is AthenaSdkError {\n return value instanceof AthenaSdkError;\n}\n\n/** Wrap any thrown value as an `AthenaSdkError` (idempotent for SDK errors). */\nexport function toAthenaSdkError(\n value: unknown,\n fallback: Omit<AthenaSdkErrorOptions, 'cause'>,\n): AthenaSdkError {\n if (isAthenaSdkError(value)) return value;\n const message =\n value instanceof Error && value.message ? value.message : fallback.message;\n return new AthenaSdkError({ ...fallback, message, cause: value });\n}\n\n/** Structured `{ code, message }` detail from an agora rejection, if present. */\nexport function readRejectionDetail(\n detail: unknown,\n): { code: string | null; message: string | null } {\n if (typeof detail === 'string') return { code: null, message: detail || null };\n if (!detail || typeof detail !== 'object') return { code: null, message: null };\n const record = detail as { code?: unknown; message?: unknown };\n return {\n code: typeof record.code === 'string' ? record.code : null,\n message: typeof record.message === 'string' ? record.message : null,\n };\n}\n"],"names":[],"mappings":";;;AAOO,MAAM,yBAAyB;AAAA;AAAA,EAEpC,cAAc;AAAA;AAAA,EAEd,eAAe;AAAA;AAAA,EAEf,qBAAqB;AAAA;AAAA,EAErB,oBAAoB;AAAA;AAAA,EAEpB,gBAAgB;AAAA;AAAA,EAEhB,qBAAqB;AAAA;AAAA,EAErB,oBAAoB;AAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"errors.js","sources":["../../src/diagnostics/errors.ts"],"sourcesContent":["/**\n * Typed SDK errors. Every failure the SDK surfaces to a consumer carries a\n * stable `code` (matchable in code), a human `message`, and a `hint` — the\n * one-line \"what to do about it\" that turns a silent failure into a debuggable\n * one. Backend rejections keep their structured `{ status, detail }` payload.\n */\n\nexport const ATHENA_SDK_ERROR_CODES = {\n /** No token and no API key resolved before a request had to be sent. */\n auth_missing: 'auth_missing',\n /** The server refused the credential (401 / statewire `unauthorized` fin). */\n auth_rejected: 'auth_rejected',\n /** `/_athena/auth` or the iframe bridge did not answer within the timeout. */\n auth_bridge_timeout: 'auth_bridge_timeout',\n /** `/_athena/auth` answered with a non-404 error. */\n auth_bridge_failed: 'auth_bridge_failed',\n /** The statewire sync URL could not be derived from the configuration. */\n config_invalid: 'config_invalid',\n /** The thread list request failed. */\n threads_list_failed: 'threads_list_failed',\n /** Loading a thread's history failed. */\n thread_load_failed: 'thread_load_failed',\n /**\n * Pinning / unpinning a thread failed. `status` 404 / 405 means the backend\n * predates `POST /api/conversations/threads/favorite` (see\n * `isThreadFavoriteUnavailableError`); the pin then stays read-only.\n */\n thread_favorite_failed: 'thread_favorite_failed',\n /**\n * Renaming a thread failed. `status` 404 / 405 means the backend predates\n * `POST /api/conversations/threads/rename` (see\n * `isThreadRenameUnavailableError`); the list then offers no rename.\n */\n thread_rename_failed: 'thread_rename_failed',\n /**\n * Archiving a thread failed. `status` 404 / 405 means the backend has no\n * archive route (see `isThreadArchiveUnavailableError`); the list then\n * offers no archive action.\n */\n thread_archive_failed: 'thread_archive_failed',\n /** The statewire host rejected a command (structured `{status, detail}`). */\n statewire_rejected: 'statewire_rejected',\n /** The statewire connection is gone and will not reconnect on its own. */\n statewire_gone: 'statewire_gone',\n /** The selected collab agent / channel was refused by the backend. */\n collab_agent_rejected: 'collab_agent_rejected',\n /** A React render error crashed the chat surface (caught by the SDK's error boundary). */\n chat_render_crash: 'chat_render_crash',\n /** A pasted or dropped file could not be uploaded as a composer attachment. */\n attachment_failed: 'attachment_failed',\n /** Mention suggestions for a scope failed after every retry. */\n mentions_fetch_failed: 'mentions_fetch_failed',\n /** The repository code search request (`/api/search/repositories`) failed. */\n repo_search_failed: 'repo_search_failed',\n /** Anything else. */\n unknown: 'unknown',\n} as const;\n\nexport type AthenaSdkErrorCode =\n (typeof ATHENA_SDK_ERROR_CODES)[keyof typeof ATHENA_SDK_ERROR_CODES];\n\nexport interface AthenaSdkErrorOptions {\n code: AthenaSdkErrorCode;\n message: string;\n /** One line telling the integrator what to check or change. */\n hint?: string;\n /** HTTP-ish status when the failure came from a server. */\n status?: number;\n /** Structured server detail (e.g. `{ code, message }` from agora). */\n detail?: unknown;\n cause?: unknown;\n /** Extra structured context safe to log (never credentials). */\n context?: Record<string, unknown>;\n}\n\nexport class AthenaSdkError extends Error {\n readonly code: AthenaSdkErrorCode;\n readonly hint: string | undefined;\n readonly status: number | undefined;\n readonly detail: unknown;\n readonly context: Record<string, unknown>;\n\n constructor(options: AthenaSdkErrorOptions) {\n super(options.message, options.cause === undefined ? undefined : { cause: options.cause });\n this.name = 'AthenaSdkError';\n this.code = options.code;\n this.hint = options.hint;\n this.status = options.status;\n this.detail = options.detail;\n this.context = options.context ?? {};\n }\n\n /** A log/console-friendly one-liner: `[code] message — hint`. */\n describe(): string {\n return `[${this.code}] ${this.message}${this.hint ? ` — ${this.hint}` : ''}`;\n }\n\n toJSON(): Record<string, unknown> {\n return {\n name: this.name,\n code: this.code,\n message: this.message,\n hint: this.hint,\n status: this.status,\n detail: this.detail,\n context: this.context,\n };\n }\n}\n\nexport function isAthenaSdkError(value: unknown): value is AthenaSdkError {\n return value instanceof AthenaSdkError;\n}\n\n/** Wrap any thrown value as an `AthenaSdkError` (idempotent for SDK errors). */\nexport function toAthenaSdkError(\n value: unknown,\n fallback: Omit<AthenaSdkErrorOptions, 'cause'>,\n): AthenaSdkError {\n if (isAthenaSdkError(value)) return value;\n const message =\n value instanceof Error && value.message ? value.message : fallback.message;\n return new AthenaSdkError({ ...fallback, message, cause: value });\n}\n\n/** Structured `{ code, message }` detail from an agora rejection, if present. */\nexport function readRejectionDetail(\n detail: unknown,\n): { code: string | null; message: string | null } {\n if (typeof detail === 'string') return { code: null, message: detail || null };\n if (!detail || typeof detail !== 'object') return { code: null, message: null };\n const record = detail as { code?: unknown; message?: unknown };\n return {\n code: typeof record.code === 'string' ? record.code : null,\n message: typeof record.message === 'string' ? record.message : null,\n };\n}\n"],"names":[],"mappings":";;;AAOO,MAAM,yBAAyB;AAAA;AAAA,EAEpC,cAAc;AAAA;AAAA,EAEd,eAAe;AAAA;AAAA,EAEf,qBAAqB;AAAA;AAAA,EAErB,oBAAoB;AAAA;AAAA,EAEpB,gBAAgB;AAAA;AAAA,EAEhB,qBAAqB;AAAA;AAAA,EAErB,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMpB,wBAAwB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMxB,sBAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMtB,uBAAuB;AAAA;AAAA,EAEvB,oBAAoB;AAAA;AAAA,EAEpB,gBAAgB;AAAA;AAAA,EAEhB,uBAAuB;AAAA;AAAA,EAEvB,mBAAmB;AAAA;AAAA,EAEnB,mBAAmB;AAAA;AAAA,EAEnB,uBAAuB;AAAA;AAAA,EAEvB,oBAAoB;AAAA;AAAA,EAEpB,SAAS;AACX;AAmBO,MAAM,uBAAuB,MAAM;AAAA,EAOxC,YAAY,SAAgC;AAC1C,UAAM,QAAQ,SAAS,QAAQ,UAAU,SAAY,SAAY,EAAE,OAAO,QAAQ,MAAA,CAAO;AAPlF;AACA;AACA;AACA;AACA;AAIP,SAAK,OAAO;AACZ,SAAK,OAAO,QAAQ;AACpB,SAAK,OAAO,QAAQ;AACpB,SAAK,SAAS,QAAQ;AACtB,SAAK,SAAS,QAAQ;AACtB,SAAK,UAAU,QAAQ,WAAW,CAAA;AAAA,EACpC;AAAA;AAAA,EAGA,WAAmB;AACjB,WAAO,IAAI,KAAK,IAAI,KAAK,KAAK,OAAO,GAAG,KAAK,OAAO,MAAM,KAAK,IAAI,KAAK,EAAE;AAAA,EAC5E;AAAA,EAEA,SAAkC;AAChC,WAAO;AAAA,MACL,MAAM,KAAK;AAAA,MACX,MAAM,KAAK;AAAA,MACX,SAAS,KAAK;AAAA,MACd,MAAM,KAAK;AAAA,MACX,QAAQ,KAAK;AAAA,MACb,QAAQ,KAAK;AAAA,MACb,SAAS,KAAK;AAAA,IAAA;AAAA,EAElB;AACF;AAEO,SAAS,iBAAiB,OAAyC;AACxE,SAAO,iBAAiB;AAC1B;AAGO,SAAS,iBACd,OACA,UACgB;AAChB,MAAI,iBAAiB,KAAK,EAAG,QAAO;AACpC,QAAM,UACJ,iBAAiB,SAAS,MAAM,UAAU,MAAM,UAAU,SAAS;AACrE,SAAO,IAAI,eAAe,EAAE,GAAG,UAAU,SAAS,OAAO,OAAO;AAClE;AAGO,SAAS,oBACd,QACiD;AACjD,MAAI,OAAO,WAAW,SAAU,QAAO,EAAE,MAAM,MAAM,SAAS,UAAU,KAAA;AACxE,MAAI,CAAC,UAAU,OAAO,WAAW,iBAAiB,EAAE,MAAM,MAAM,SAAS,KAAA;AACzE,QAAM,SAAS;AACf,SAAO;AAAA,IACL,MAAM,OAAO,OAAO,SAAS,WAAW,OAAO,OAAO;AAAA,IACtD,SAAS,OAAO,OAAO,YAAY,WAAW,OAAO,UAAU;AAAA,EAAA;AAEnE;"}
|
package/dist/index.cjs
CHANGED
|
@@ -5,6 +5,7 @@ const athenaDiagnostics = require("./diagnostics/athena-diagnostics.cjs");
|
|
|
5
5
|
const useAthenaDiagnostics = require("./diagnostics/useAthenaDiagnostics.cjs");
|
|
6
6
|
const errors = require("./diagnostics/errors.cjs");
|
|
7
7
|
const statewireRunConfig = require("./runtime/statewire-run-config.cjs");
|
|
8
|
+
const useAthenaRepoSearch = require("./search/useAthenaRepoSearch.cjs");
|
|
8
9
|
const AthenaProvider = require("./provider/AthenaProvider.cjs");
|
|
9
10
|
const PostHogProvider = require("./provider/PostHogProvider.cjs");
|
|
10
11
|
const wrapPosthogClient = require("./lib/posthog/wrap-posthog-client.cjs");
|
|
@@ -20,6 +21,7 @@ const StatewireApprovalCard = require("./chat/StatewireApprovalCard.cjs");
|
|
|
20
21
|
const useStatewireApprovalRequest = require("./chat/use-statewire-approval-request.cjs");
|
|
21
22
|
const useAthenaRunLive = require("./chat/use-athena-run-live.cjs");
|
|
22
23
|
const statewireHistoryEdge = require("./chat-ui/thread/statewire-history-edge.cjs");
|
|
24
|
+
const threadLoadingOverlay = require("./chat-ui/thread/thread-loading-overlay.cjs");
|
|
23
25
|
const statewireWindowContext = require("./provider/statewire-window-context.cjs");
|
|
24
26
|
const useAthenaStatewireRuntime = require("./runtime/useAthenaStatewireRuntime.cjs");
|
|
25
27
|
const StatewireQueuedMessages = require("./chat/StatewireQueuedMessages.cjs");
|
|
@@ -29,6 +31,8 @@ const statewireClientTools = require("./chat/statewire-client-tools.cjs");
|
|
|
29
31
|
const statewireLifecycleContext = require("./provider/statewire-lifecycle-context.cjs");
|
|
30
32
|
const statewireLifecycle = require("./runtime/statewire-lifecycle.cjs");
|
|
31
33
|
const statewireThreadList = require("./threads/statewire-thread-list.cjs");
|
|
34
|
+
const WaitingOnYouBanner = require("./chat/WaitingOnYouBanner.cjs");
|
|
35
|
+
const wakeMarker = require("./chat-ui/messages/wake-marker.cjs");
|
|
32
36
|
const tiptapText = require("./chat/tiptap-text.cjs");
|
|
33
37
|
const athenaCitationLinks = require("./chat/athena-citation-links.cjs");
|
|
34
38
|
const tooltipIconButton = require("./chat/tooltip-icon-button.cjs");
|
|
@@ -41,6 +45,7 @@ require("react");
|
|
|
41
45
|
require("@assistant-ui/tap");
|
|
42
46
|
require("statewire");
|
|
43
47
|
require("./packages/agent-runtime/src/statewire-suspended.cjs");
|
|
48
|
+
const conversationList = require("./packages/agent-runtime/src/conversation-list.cjs");
|
|
44
49
|
const toolMetadata = require("./packages/agent-runtime/src/tool-metadata.cjs");
|
|
45
50
|
const toolResult = require("./packages/agent-runtime/src/tool-result.cjs");
|
|
46
51
|
require("@tanstack/react-query");
|
|
@@ -48,11 +53,12 @@ const interrupts = require("./packages/agent-runtime/src/interrupts.cjs");
|
|
|
48
53
|
require("./packages/agent-runtime/src/messages.cjs");
|
|
49
54
|
require("./packages/agent-runtime/src/statewire-state.cjs");
|
|
50
55
|
const threadExtras = require("./packages/agent-runtime/src/thread-extras.cjs");
|
|
51
|
-
require("@assistant-ui/react-statewire");
|
|
52
56
|
require("@assistant-ui/store");
|
|
53
57
|
require("./packages/agent-runtime/src/quota-safe-local-storage-session.cjs");
|
|
54
58
|
require("./packages/agent-runtime/src/statewire-attach-observer.cjs");
|
|
55
59
|
require("./packages/agent-runtime/src/thread-status.cjs");
|
|
60
|
+
require("@assistant-ui/react-statewire");
|
|
61
|
+
const githubWakeEvent = require("./packages/agent-runtime/src/github-wake-event.cjs");
|
|
56
62
|
require("@assistant-ui/core");
|
|
57
63
|
require("./packages/agent-runtime/src/thread-handoff.cjs");
|
|
58
64
|
const writeTodosToolUi = require("./tools/write-todos-tool-ui.cjs");
|
|
@@ -73,8 +79,12 @@ const assetPanelStore = require("./assets/asset-panel-store.cjs");
|
|
|
73
79
|
const useAssetEmbed = require("./assets/use-asset-embed.cjs");
|
|
74
80
|
const AthenaContext = require("./provider/AthenaContext.cjs");
|
|
75
81
|
const ThreadList = require("./threads/ThreadList.cjs");
|
|
82
|
+
const SessionList = require("./threads/SessionList.cjs");
|
|
83
|
+
const useAthenaSessionAttention = require("./threads/use-athena-session-attention.cjs");
|
|
84
|
+
const sessionListModel = require("./threads/session-list-model.cjs");
|
|
76
85
|
const threadIdContext = require("./threads/thread-id-context.cjs");
|
|
77
86
|
const api = require("./threads/api.cjs");
|
|
87
|
+
const threadPrefetcher = require("./threads/thread-prefetcher.cjs");
|
|
78
88
|
const useRestConversationHistory = require("./threads/use-rest-conversation-history.cjs");
|
|
79
89
|
const useStatewireConversationHistory = require("./threads/use-statewire-conversation-history.cjs");
|
|
80
90
|
const useAthenaThreadManager = require("./threads/useAthenaThreadManager.cjs");
|
|
@@ -94,6 +104,7 @@ const collapsible = require("./ui/collapsible.cjs");
|
|
|
94
104
|
const index = require("./toolkits/index.cjs");
|
|
95
105
|
const index$1 = require("./theme/index.cjs");
|
|
96
106
|
const cnfast = require("cnfast");
|
|
107
|
+
const toolAppearance = require("./tools/tool-appearance.cjs");
|
|
97
108
|
exports.ATHENA_REACT_SDK_VERSION = version.ATHENA_REACT_SDK_VERSION;
|
|
98
109
|
exports.athenaDiagnostics = athenaDiagnostics.athenaDiagnostics;
|
|
99
110
|
exports.installAthenaDiagnosticsGlobal = athenaDiagnostics.installAthenaDiagnosticsGlobal;
|
|
@@ -109,6 +120,10 @@ exports.DEFAULT_STATEWIRE_MODEL = statewireRunConfig.DEFAULT_STATEWIRE_MODEL;
|
|
|
109
120
|
exports.buildStatewireRunConfig = statewireRunConfig.buildStatewireRunConfig;
|
|
110
121
|
exports.parseCollabAgentRef = statewireRunConfig.parseCollabAgentRef;
|
|
111
122
|
exports.resolveAgentProp = statewireRunConfig.resolveAgentProp;
|
|
123
|
+
exports.ATHENA_REPO_SEARCH_PATH = useAthenaRepoSearch.ATHENA_REPO_SEARCH_PATH;
|
|
124
|
+
exports.fetchRepoSearch = useAthenaRepoSearch.fetchRepoSearch;
|
|
125
|
+
exports.repoSearchRequestBody = useAthenaRepoSearch.repoSearchRequestBody;
|
|
126
|
+
exports.useAthenaRepoSearch = useAthenaRepoSearch.useAthenaRepoSearch;
|
|
112
127
|
exports.AthenaProvider = AthenaProvider.AthenaProvider;
|
|
113
128
|
exports.getPostHogInstance = PostHogProvider.getPostHogInstance;
|
|
114
129
|
exports.capturePosthogEvent = wrapPosthogClient.capturePosthogEvent;
|
|
@@ -146,6 +161,7 @@ exports.StatewireApprovalCard = StatewireApprovalCard.StatewireApprovalCard;
|
|
|
146
161
|
exports.useStatewireApprovalRequest = useStatewireApprovalRequest.useStatewireApprovalRequest;
|
|
147
162
|
exports.useAthenaRunLive = useAthenaRunLive.useAthenaRunLive;
|
|
148
163
|
exports.StatewireHistoryEdge = statewireHistoryEdge.StatewireHistoryEdge;
|
|
164
|
+
exports.ThreadLoadingOverlay = threadLoadingOverlay.ThreadLoadingOverlay;
|
|
149
165
|
exports.useStatewireToolOutputs = statewireWindowContext.useStatewireToolOutputs;
|
|
150
166
|
exports.ATHENA_SDK_MESSAGE_WINDOW = useAthenaStatewireRuntime.ATHENA_SDK_MESSAGE_WINDOW;
|
|
151
167
|
exports.useAthenaStatewireRuntime = useAthenaStatewireRuntime.useAthenaStatewireRuntime;
|
|
@@ -157,8 +173,13 @@ exports.collectStatewireClientTools = statewireClientTools.collectStatewireClien
|
|
|
157
173
|
exports.statewireClientToolWireEntries = statewireClientTools.statewireClientToolWireEntries;
|
|
158
174
|
exports.useAthenaStatewireLifecycle = statewireLifecycleContext.useAthenaStatewireLifecycle;
|
|
159
175
|
exports.athenaStatewireErrorNotice = statewireLifecycle.athenaStatewireErrorNotice;
|
|
176
|
+
exports.threadSummaryFromConversation = statewireThreadList.threadSummaryFromConversation;
|
|
160
177
|
exports.useAthenaStatewireThreadList = statewireThreadList.useAthenaStatewireThreadList;
|
|
161
178
|
exports.useRefreshThreadList = statewireThreadList.useRefreshThreadList;
|
|
179
|
+
exports.WaitingOnYouBanner = WaitingOnYouBanner.WaitingOnYouBanner;
|
|
180
|
+
exports.WaitingOnYouBannerView = WaitingOnYouBanner.WaitingOnYouBannerView;
|
|
181
|
+
exports.WakeMarkerCard = wakeMarker.WakeMarkerCard;
|
|
182
|
+
exports.WakeMarkerMessage = wakeMarker.WakeMarkerMessage;
|
|
162
183
|
exports.TiptapText = tiptapText.TiptapText;
|
|
163
184
|
exports.isAthenaCitationUrl = athenaCitationLinks.isAthenaCitationUrl;
|
|
164
185
|
exports.parseAthenaCitationLink = athenaCitationLinks.parseAthenaCitationLink;
|
|
@@ -192,6 +213,7 @@ exports.truncate = primitives.truncate;
|
|
|
192
213
|
exports.InstallPackageToolUI = miscToolUis.InstallPackageToolUI;
|
|
193
214
|
exports.TOOL_ICONS = toolIcons.TOOL_ICONS;
|
|
194
215
|
exports.toolIcon = toolIcons.toolIcon;
|
|
216
|
+
exports.deriveConversationAttention = conversationList.deriveConversationAttention;
|
|
195
217
|
exports.describeToolArgs = toolMetadata.describeToolArgs;
|
|
196
218
|
exports.formatToolName = toolMetadata.formatToolName;
|
|
197
219
|
exports.getToolDisplayMeta = toolMetadata.getToolDisplayMeta;
|
|
@@ -205,6 +227,10 @@ exports.asHitlApproval = interrupts.asHitlApproval;
|
|
|
205
227
|
exports.isPendingInterrupt = interrupts.isPendingInterrupt;
|
|
206
228
|
exports.readInterruptMessage = interrupts.readInterruptMessage;
|
|
207
229
|
exports.hasStatewireThreadExtras = threadExtras.hasStatewireThreadExtras;
|
|
230
|
+
exports.githubWakeEventLabel = githubWakeEvent.githubWakeEventLabel;
|
|
231
|
+
exports.githubWakeMarkerText = githubWakeEvent.githubWakeMarkerText;
|
|
232
|
+
exports.isGithubWakeMessage = githubWakeEvent.isGithubWakeMessage;
|
|
233
|
+
exports.readGithubWakeEvent = githubWakeEvent.readGithubWakeEvent;
|
|
208
234
|
exports.HiddenWriteTodosToolUI = writeTodosToolUi.HiddenWriteTodosToolUI;
|
|
209
235
|
exports.WriteTodosToolUI = writeTodosToolUi.WriteTodosToolUI;
|
|
210
236
|
exports.parseTodoPlan = writeTodosToolUi.parseTodoPlan;
|
|
@@ -216,6 +242,7 @@ exports.SearchFilesToolUI = fileToolUis.SearchFilesToolUI;
|
|
|
216
242
|
exports.WriteFileToolUI = fileToolUis.WriteFileToolUI;
|
|
217
243
|
exports.friendlyWorkspacePath = fileToolUis.friendlyWorkspacePath;
|
|
218
244
|
exports.ToolFallback = toolFallback.ToolFallback;
|
|
245
|
+
exports.ToolFallbackAppearanceProvider = toolFallback.ToolFallbackAppearanceProvider;
|
|
219
246
|
exports.ToolFallbackArgs = toolFallback.ToolFallbackArgs;
|
|
220
247
|
exports.ToolFallbackContent = toolFallback.ToolFallbackContent;
|
|
221
248
|
exports.ToolFallbackError = toolFallback.ToolFallbackError;
|
|
@@ -243,13 +270,31 @@ exports.useAssetPanelStore = assetPanelStore.useAssetPanelStore;
|
|
|
243
270
|
exports.useAssetEmbed = useAssetEmbed.useAssetEmbed;
|
|
244
271
|
exports.useAthenaConfig = AthenaContext.useAthenaConfig;
|
|
245
272
|
exports.ThreadList = ThreadList.ThreadList;
|
|
273
|
+
exports.SessionList = SessionList.SessionList;
|
|
274
|
+
exports.useAthenaSessionAttention = useAthenaSessionAttention.useAthenaSessionAttention;
|
|
275
|
+
exports.groupSessions = sessionListModel.groupSessions;
|
|
276
|
+
exports.pullRequestChip = sessionListModel.pullRequestChip;
|
|
277
|
+
exports.pullRequestChipState = sessionListModel.pullRequestChipState;
|
|
278
|
+
exports.sessionIndicator = sessionListModel.sessionIndicator;
|
|
279
|
+
exports.sessionListGroupOf = sessionListModel.sessionListGroupOf;
|
|
280
|
+
exports.sessionOriginLabel = sessionListModel.sessionOriginLabel;
|
|
281
|
+
exports.sessionSecondaryLine = sessionListModel.sessionSecondaryLine;
|
|
246
282
|
exports.AthenaThreadIdContext = threadIdContext.AthenaThreadIdContext;
|
|
283
|
+
exports.useAthenaStatewireThreadId = threadIdContext.useAthenaStatewireThreadId;
|
|
247
284
|
exports.useAthenaThreadId = threadIdContext.useAthenaThreadId;
|
|
285
|
+
exports.THREAD_TITLE_MAX_LENGTH = api.THREAD_TITLE_MAX_LENGTH;
|
|
248
286
|
exports.archiveThread = api.archiveThread;
|
|
249
287
|
exports.createThread = api.createThread;
|
|
250
288
|
exports.getThreadState = api.getThreadState;
|
|
289
|
+
exports.isThreadArchiveUnavailableError = api.isThreadArchiveUnavailableError;
|
|
290
|
+
exports.isThreadFavoriteUnavailableError = api.isThreadFavoriteUnavailableError;
|
|
291
|
+
exports.isThreadRenameUnavailableError = api.isThreadRenameUnavailableError;
|
|
251
292
|
exports.listThreads = api.listThreads;
|
|
293
|
+
exports.renameThread = api.renameThread;
|
|
294
|
+
exports.setThreadFavorite = api.setThreadFavorite;
|
|
252
295
|
exports.setThreadReadState = api.setThreadReadState;
|
|
296
|
+
exports.THREAD_PREFETCH_HOVER_DELAY_MS = threadPrefetcher.THREAD_PREFETCH_HOVER_DELAY_MS;
|
|
297
|
+
exports.THREAD_PREFETCH_MAX_CONCURRENT = threadPrefetcher.THREAD_PREFETCH_MAX_CONCURRENT;
|
|
253
298
|
exports.conversationDisplayTitle = useRestConversationHistory.conversationDisplayTitle;
|
|
254
299
|
exports.useRestConversationHistory = useRestConversationHistory.useRestConversationHistory;
|
|
255
300
|
exports.conversationSummaryFromIndexEntry = useStatewireConversationHistory.conversationSummaryFromIndexEntry;
|
|
@@ -288,4 +333,5 @@ Object.defineProperty(exports, "cn", {
|
|
|
288
333
|
enumerable: true,
|
|
289
334
|
get: () => cnfast.cn
|
|
290
335
|
});
|
|
336
|
+
exports.useToolAppearance = toolAppearance.useToolAppearance;
|
|
291
337
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ export { useAthenaDiagnostics } from './diagnostics/useAthenaDiagnostics';
|
|
|
6
6
|
export { ATHENA_SDK_ERROR_CODES, AthenaSdkError, isAthenaSdkError, readRejectionDetail, toAthenaSdkError, } from './diagnostics/errors';
|
|
7
7
|
export type { AthenaSdkErrorCode, AthenaSdkErrorOptions } from './diagnostics/errors';
|
|
8
8
|
export { COLLAB_AGENT_REF_PREFIX, COLLAB_AGENT_REF_SHAPE, parseCollabAgentRef, resolveAgentProp, } from './runtime/statewire-run-config';
|
|
9
|
+
export { ATHENA_REPO_SEARCH_PATH, fetchRepoSearch, repoSearchRequestBody, useAthenaRepoSearch, } from './search/useAthenaRepoSearch';
|
|
10
|
+
export type { AthenaRepoSearchHit, AthenaRepoSearchMode, AthenaRepoSearchParams, AthenaRepoSearchRequestBody, AthenaRepoSearchResponse, UseAthenaRepoSearchOptions, } from './search/useAthenaRepoSearch';
|
|
9
11
|
export { AthenaProvider } from './provider/AthenaProvider';
|
|
10
12
|
export type { AthenaProviderProps } from './provider/AthenaProvider';
|
|
11
13
|
export type { AthenaProviderConfig } from './provider/config';
|
|
@@ -15,7 +17,8 @@ export { getPostHogInstance } from './provider/PostHogProvider';
|
|
|
15
17
|
export { capturePosthogEvent, capturePosthogException, getPosthogCaptureGate, wrapPosthogClient, } from './lib/posthog/wrap-posthog-client';
|
|
16
18
|
export { buildCoalescedCaptureProperties, isCriticalPosthogEvent, withCaptureGateBypass, type CaptureGateSnapshot, type CoalescedCapturePayload, } from './lib/posthog/capture-gate';
|
|
17
19
|
export { AthenaAssistantActionBar, AthenaAssistantMessage, AthenaChat, AthenaReasoningPart, AthenaUserMessage, } from './chat/AthenaChat';
|
|
18
|
-
export type { AthenaAssistantActionBarProps, AthenaAssistantMessageProps, AthenaChatComponents, AthenaChatMessagePartComponents, AthenaChatProps, AthenaReasoningPartProps, AthenaUserMessageProps,
|
|
20
|
+
export type { AthenaAssistantActionBarProps, AthenaAssistantMessageProps, AthenaChatComponents, AthenaChatMessagePartComponents, AthenaChatProps, AthenaReasoningPartProps, AthenaUserMessageProps, } from './chat/AthenaChat';
|
|
21
|
+
export type { WelcomeSuggestion } from './chat/athena-chat-welcome';
|
|
19
22
|
export { AthenaChatErrorBoundary } from './chat/AthenaChatErrorBoundary';
|
|
20
23
|
export { type ActivityItem, type ActivityPhase, type ActivityTimelineOptions, type ActivityToolState, buildActivityTimeline, CollapsibleGroup, type CollapsibleGroupProps, countActivityTools, createToolBasedGroupingFunction, DEFAULT_TOOLKIT_THEME, defaultGetToolGroupKey, excludeFinalTextFromGroups, type FinalTextPart, getActivityItemLabel, getActivitySummary, getActivityToolState, getFinalText, type GetToolGroupKey, type GroupablePart, type GroupingFunction, type MessagePartGroup, resetRememberedExpansionsForTests, resolveActivityPhase, SuperGroupingCard, type SuperGroupingCardProps, SuperGroupingFinalText, SuperGroupingProvider, TOOLKIT_THEMES, type ToolGroupKeyOptions, type ToolkitTheme, useActivityExpansion, } from './chat/super-grouping';
|
|
21
24
|
export { StatewireApprovalCard } from './chat/StatewireApprovalCard';
|
|
@@ -25,6 +28,7 @@ export type { StatewireApprovalRequest, StatewireInterruptPredicate, UseStatewir
|
|
|
25
28
|
export { useAthenaRunLive } from './chat/use-athena-run-live';
|
|
26
29
|
export { StatewireHistoryEdge } from './chat-ui/thread/statewire-history-edge';
|
|
27
30
|
export type { StatewireHistoryEdgeProps } from './chat-ui/thread/statewire-history-edge';
|
|
31
|
+
export { ThreadLoadingOverlay } from './chat-ui/thread/thread-loading-overlay';
|
|
28
32
|
export { useStatewireToolOutputs } from './provider/statewire-window-context';
|
|
29
33
|
export { ATHENA_SDK_MESSAGE_WINDOW } from './runtime/useAthenaStatewireRuntime';
|
|
30
34
|
export { StatewireQueuedMessages } from './chat/StatewireQueuedMessages';
|
|
@@ -36,8 +40,12 @@ export type { StatewireClientTool } from './chat/statewire-client-tools';
|
|
|
36
40
|
export { useAthenaStatewireLifecycle } from './provider/statewire-lifecycle-context';
|
|
37
41
|
export { athenaStatewireErrorNotice } from './runtime/statewire-lifecycle';
|
|
38
42
|
export type { AthenaStatewireErrorNotice, AthenaStatewireLifecycleState, } from './runtime/statewire-lifecycle';
|
|
39
|
-
export { useAthenaStatewireThreadList } from './threads/statewire-thread-list';
|
|
43
|
+
export { threadSummaryFromConversation, useAthenaStatewireThreadList, } from './threads/statewire-thread-list';
|
|
40
44
|
export type { AthenaStatewireThreadListState, AthenaStatewireThreadSummary, } from './threads/statewire-thread-list';
|
|
45
|
+
export { WaitingOnYouBanner, WaitingOnYouBannerView } from './chat/WaitingOnYouBanner';
|
|
46
|
+
export type { WaitingOnYouBannerProps, WaitingOnYouBannerViewProps, } from './chat/WaitingOnYouBanner';
|
|
47
|
+
export { WakeMarkerCard, WakeMarkerMessage } from './chat-ui/messages/wake-marker';
|
|
48
|
+
export type { WakeMarkerCardProps } from './chat-ui/messages/wake-marker';
|
|
41
49
|
export { asHitlApproval, hasStatewireThreadExtras, HITL_PENDING_RESUME_GRACE_MS, isPendingInterrupt, readInterruptMessage, } from './chat/statewire-approval';
|
|
42
50
|
export type { HitlApprovalPayload } from './chat/statewire-approval';
|
|
43
51
|
export { TiptapText } from './chat/tiptap-text';
|
|
@@ -58,8 +66,8 @@ export { useLatestTodoPlan } from './tools/todo-plan-store';
|
|
|
58
66
|
export type { LatestTodoPlan } from './tools/todo-plan-store';
|
|
59
67
|
export { EditFileToolUI, friendlyWorkspacePath, ListFilesToolUI, ReadFileToolUI, SearchFilesToolUI, WriteFileToolUI, } from './tools/file-tool-uis';
|
|
60
68
|
export type { PlanStep, PlanStepStatus, TodoPlan, } from './tools/write-todos-tool-ui';
|
|
61
|
-
export { ToolFallback, ToolFallbackRoot, ToolFallbackTrigger, ToolFallbackContent, ToolFallbackArgs, ToolFallbackResult, ToolFallbackError, ToolFallbackNotice, } from './tools/tool-fallback';
|
|
62
|
-
export type { ToolFallbackContext, ToolFallbackOptions, ToolFallbackProps, ToolFallbackRootProps, ToolFallbackTriggerProps, } from './tools/tool-fallback';
|
|
69
|
+
export { ToolFallback, ToolFallbackAppearanceProvider, ToolFallbackRoot, ToolFallbackTrigger, ToolFallbackContent, ToolFallbackArgs, ToolFallbackResult, ToolFallbackError, ToolFallbackNotice, useToolAppearance, } from './tools/tool-fallback';
|
|
70
|
+
export type { ToolAppearance, ToolFallbackContext, ToolFallbackOptions, ToolFallbackProps, ToolFallbackRootProps, ToolFallbackTriggerProps, } from './tools/tool-fallback';
|
|
63
71
|
export { VoiceUpdateCard, VoiceUpdateToolUI } from './tools/voice-update-tool-ui';
|
|
64
72
|
export type { VoiceUpdateCardProps } from './tools/voice-update-tool-ui';
|
|
65
73
|
export { VoiceDelegationCard, VoiceDelegationMessage, } from './chat-ui/messages/voice-delegation-card';
|
|
@@ -87,10 +95,21 @@ export type { AthenaCitationLinkMetadata, AthenaCitationLinkClickContext, Athena
|
|
|
87
95
|
export { clearAutoOpenedAssets } from './tools/tool-fallback';
|
|
88
96
|
export { ThreadList } from './threads/ThreadList';
|
|
89
97
|
export type { ThreadListProps } from './threads/ThreadList';
|
|
90
|
-
export
|
|
98
|
+
export { SessionList } from './threads/SessionList';
|
|
99
|
+
export type { SessionListProps } from './threads/SessionList';
|
|
100
|
+
export { useAthenaSessionAttention } from './threads/use-athena-session-attention';
|
|
101
|
+
export type { AthenaSessionAttention } from './threads/use-athena-session-attention';
|
|
102
|
+
export { groupSessions, pullRequestChip, pullRequestChipState, sessionIndicator, sessionListGroupOf, sessionOriginLabel, sessionSecondaryLine, } from './threads/session-list-model';
|
|
103
|
+
export type { PullRequestChip, PullRequestChipState, SessionIndicator, SessionLineTone, SessionListGroup, SessionListSection, SessionSecondaryLine, } from './threads/session-list-model';
|
|
104
|
+
export { deriveConversationAttention, githubWakeEventLabel, githubWakeMarkerText, isGithubWakeMessage, readGithubWakeEvent, } from '@athenaintel/agent-runtime';
|
|
105
|
+
export type { ConversationAttention, ConversationAttentionSource, ConversationPullRequest, ConversationSummary, ConversationWake, GithubWakeEvent, } from '@athenaintel/agent-runtime';
|
|
106
|
+
export type { ThreadFavoriteResponse, ThreadPullRequest, ThreadRenameResponse, ThreadSummary, ThreadWake, } from './threads/api';
|
|
91
107
|
export { useRefreshThreadList } from './threads/statewire-thread-list';
|
|
92
|
-
export { useAthenaThreadId, AthenaThreadIdContext } from './threads/thread-id-context';
|
|
93
|
-
export { listThreads, archiveThread, getThreadState, createThread, setThreadReadState } from './threads/api';
|
|
108
|
+
export { useAthenaThreadId, AthenaThreadIdContext, useAthenaStatewireThreadId, } from './threads/thread-id-context';
|
|
109
|
+
export { listThreads, archiveThread, getThreadState, createThread, renameThread, setThreadReadState, setThreadFavorite, isThreadArchiveUnavailableError, isThreadFavoriteUnavailableError, isThreadRenameUnavailableError, THREAD_TITLE_MAX_LENGTH, } from './threads/api';
|
|
110
|
+
export type { ThreadFavoriteTarget } from './threads/use-thread-favorite';
|
|
111
|
+
export type { ThreadRenameTarget } from './threads/use-thread-rename';
|
|
112
|
+
export { THREAD_PREFETCH_HOVER_DELAY_MS, THREAD_PREFETCH_MAX_CONCURRENT, } from './threads/thread-prefetcher';
|
|
94
113
|
export { conversationDisplayTitle, useRestConversationHistory, type RestConversationAuth, type UseRestConversationHistoryOptions, } from './threads/use-rest-conversation-history';
|
|
95
114
|
export { conversationSummaryFromIndexEntry, useStatewireConversationHistory, type UseStatewireConversationHistoryOptions, } from './threads/use-statewire-conversation-history';
|
|
96
115
|
export { useAthenaThreadManager } from './threads/useAthenaThreadManager';
|