@athenaintel/react 0.19.0 → 0.21.0
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 +171 -11
- package/dist/assets/AssetPanel.cjs +277 -0
- package/dist/assets/AssetPanel.cjs.map +1 -0
- package/dist/assets/AssetPanel.js +277 -0
- package/dist/assets/AssetPanel.js.map +1 -0
- package/dist/assets/AthenaAssetEmbed.cjs +151 -0
- package/dist/assets/AthenaAssetEmbed.cjs.map +1 -0
- package/dist/assets/AthenaAssetEmbed.js +151 -0
- package/dist/assets/AthenaAssetEmbed.js.map +1 -0
- package/dist/assets/AthenaLayout.cjs +69 -0
- package/dist/assets/AthenaLayout.cjs.map +1 -0
- package/dist/assets/AthenaLayout.js +69 -0
- package/dist/assets/AthenaLayout.js.map +1 -0
- package/dist/assets/asset-embed-messages.cjs +39 -0
- package/dist/assets/asset-embed-messages.cjs.map +1 -0
- package/dist/assets/asset-embed-messages.js +39 -0
- package/dist/assets/asset-embed-messages.js.map +1 -0
- package/dist/assets/asset-panel-store.cjs +124 -0
- package/dist/assets/asset-panel-store.cjs.map +1 -0
- package/dist/assets/asset-panel-store.js +124 -0
- package/dist/assets/asset-panel-store.js.map +1 -0
- package/dist/assets/asset-panel-url.cjs +40 -0
- package/dist/assets/asset-panel-url.cjs.map +1 -0
- package/dist/assets/asset-panel-url.js +40 -0
- package/dist/assets/asset-panel-url.js.map +1 -0
- package/dist/assets/use-asset-embed.cjs +370 -0
- package/dist/assets/use-asset-embed.cjs.map +1 -0
- package/dist/assets/use-asset-embed.js +370 -0
- package/dist/assets/use-asset-embed.js.map +1 -0
- package/dist/{AthenaAuthContext-B3AwLA5Z.cjs → auth/AthenaAuthContext.cjs} +5 -4
- package/dist/auth/AthenaAuthContext.cjs.map +1 -0
- package/dist/{AthenaAuthContext-DQsdayH2.js → auth/AthenaAuthContext.js} +3 -3
- package/dist/auth/AthenaAuthContext.js.map +1 -0
- package/dist/auth/AthenaAuthProvider.cjs +141 -0
- package/dist/auth/AthenaAuthProvider.cjs.map +1 -0
- package/dist/auth/AthenaAuthProvider.js +141 -0
- package/dist/auth/AthenaAuthProvider.js.map +1 -0
- package/dist/{auth.cjs → auth/AthenaSSOProvider.cjs} +14 -151
- package/dist/auth/AthenaSSOProvider.cjs.map +1 -0
- package/dist/{auth.js → auth/AthenaSSOProvider.js} +4 -142
- package/dist/auth/AthenaSSOProvider.js.map +1 -0
- package/dist/auth/index.cjs +10 -0
- package/dist/auth/index.cjs.map +1 -0
- package/dist/auth/index.js +10 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/chat/AthenaChat.cjs +753 -0
- package/dist/chat/AthenaChat.cjs.map +1 -0
- package/dist/chat/AthenaChat.d.ts +3 -2
- package/dist/chat/AthenaChat.js +753 -0
- package/dist/chat/AthenaChat.js.map +1 -0
- package/dist/chat/AthenaChatErrorBoundary.cjs +53 -0
- package/dist/chat/AthenaChatErrorBoundary.cjs.map +1 -0
- package/dist/chat/AthenaChatErrorBoundary.js +53 -0
- package/dist/chat/AthenaChatErrorBoundary.js.map +1 -0
- package/dist/chat/StatewireApprovalCard.cjs +189 -0
- package/dist/chat/StatewireApprovalCard.cjs.map +1 -0
- package/dist/chat/StatewireApprovalCard.d.ts +14 -0
- package/dist/chat/StatewireApprovalCard.js +189 -0
- package/dist/chat/StatewireApprovalCard.js.map +1 -0
- package/dist/chat/StatewireClientToolBridge.cjs +51 -0
- package/dist/chat/StatewireClientToolBridge.cjs.map +1 -0
- package/dist/chat/StatewireClientToolBridge.js +51 -0
- package/dist/chat/StatewireClientToolBridge.js.map +1 -0
- package/dist/chat/StatewireQueuedMessages.cjs +433 -0
- package/dist/chat/StatewireQueuedMessages.cjs.map +1 -0
- package/dist/chat/StatewireQueuedMessages.d.ts +3 -4
- package/dist/chat/StatewireQueuedMessages.js +433 -0
- package/dist/chat/StatewireQueuedMessages.js.map +1 -0
- package/dist/chat/athena-citation-links.cjs +342 -0
- package/dist/chat/athena-citation-links.cjs.map +1 -0
- package/dist/chat/athena-citation-links.js +342 -0
- package/dist/chat/athena-citation-links.js.map +1 -0
- package/dist/chat/run-activity.cjs +28 -0
- package/dist/chat/run-activity.cjs.map +1 -0
- package/dist/chat/run-activity.js +28 -0
- package/dist/chat/run-activity.js.map +1 -0
- package/dist/chat/statewire-banners.cjs +83 -0
- package/dist/chat/statewire-banners.cjs.map +1 -0
- package/dist/chat/statewire-banners.js +83 -0
- package/dist/chat/statewire-banners.js.map +1 -0
- package/dist/chat/statewire-client-tools.cjs +74 -0
- package/dist/chat/statewire-client-tools.cjs.map +1 -0
- package/dist/chat/statewire-client-tools.js +74 -0
- package/dist/chat/statewire-client-tools.js.map +1 -0
- package/dist/chat/super-grouping/CollapsibleGroup.cjs +158 -0
- package/dist/chat/super-grouping/CollapsibleGroup.cjs.map +1 -0
- package/dist/chat/super-grouping/CollapsibleGroup.js +158 -0
- package/dist/chat/super-grouping/CollapsibleGroup.js.map +1 -0
- package/dist/chat/super-grouping/SuperGroupingCard.cjs +243 -0
- package/dist/chat/super-grouping/SuperGroupingCard.cjs.map +1 -0
- package/dist/chat/super-grouping/SuperGroupingCard.d.ts +14 -7
- package/dist/chat/super-grouping/SuperGroupingCard.js +243 -0
- package/dist/chat/super-grouping/SuperGroupingCard.js.map +1 -0
- package/dist/chat/super-grouping/ToolTimeline.cjs +131 -0
- package/dist/chat/super-grouping/ToolTimeline.cjs.map +1 -0
- package/dist/chat/super-grouping/ToolTimeline.d.ts +16 -0
- package/dist/chat/super-grouping/ToolTimeline.js +131 -0
- package/dist/chat/super-grouping/ToolTimeline.js.map +1 -0
- package/dist/chat/super-grouping/activity-timeline.cjs +157 -0
- package/dist/chat/super-grouping/activity-timeline.cjs.map +1 -0
- package/dist/chat/super-grouping/activity-timeline.d.ts +6 -3
- package/dist/chat/super-grouping/activity-timeline.js +157 -0
- package/dist/chat/super-grouping/activity-timeline.js.map +1 -0
- package/dist/chat/super-grouping/grouping-function.cjs +55 -0
- package/dist/chat/super-grouping/grouping-function.cjs.map +1 -0
- package/dist/chat/super-grouping/grouping-function.js +55 -0
- package/dist/chat/super-grouping/grouping-function.js.map +1 -0
- package/dist/chat/super-grouping/index.cjs +26 -0
- package/dist/chat/super-grouping/index.cjs.map +1 -0
- package/dist/chat/super-grouping/index.js +26 -0
- package/dist/chat/super-grouping/index.js.map +1 -0
- package/dist/chat/super-grouping/timeline-step.cjs +65 -0
- package/dist/chat/super-grouping/timeline-step.cjs.map +1 -0
- package/dist/chat/super-grouping/timeline-step.d.ts +17 -0
- package/dist/chat/super-grouping/timeline-step.js +65 -0
- package/dist/chat/super-grouping/timeline-step.js.map +1 -0
- package/dist/chat/super-grouping/toolkit-map.cjs +96 -0
- package/dist/chat/super-grouping/toolkit-map.cjs.map +1 -0
- package/dist/chat/super-grouping/toolkit-map.js +96 -0
- package/dist/chat/super-grouping/toolkit-map.js.map +1 -0
- package/dist/chat/tiptap-text.cjs +101 -0
- package/dist/chat/tiptap-text.cjs.map +1 -0
- package/dist/chat/tiptap-text.js +101 -0
- package/dist/chat/tiptap-text.js.map +1 -0
- package/dist/chat/tooltip-icon-button.cjs +32 -0
- package/dist/chat/tooltip-icon-button.cjs.map +1 -0
- package/dist/chat/tooltip-icon-button.js +32 -0
- package/dist/chat/tooltip-icon-button.js.map +1 -0
- package/dist/chat/use-athena-run-live.cjs +24 -0
- package/dist/chat/use-athena-run-live.cjs.map +1 -0
- package/dist/chat/use-athena-run-live.d.ts +10 -0
- package/dist/chat/use-athena-run-live.js +24 -0
- package/dist/chat/use-athena-run-live.js.map +1 -0
- package/dist/chat/use-statewire-approval-request.cjs +51 -0
- package/dist/chat/use-statewire-approval-request.cjs.map +1 -0
- package/dist/chat/use-statewire-approval-request.d.ts +12 -2
- package/dist/chat/use-statewire-approval-request.js +51 -0
- package/dist/chat/use-statewire-approval-request.js.map +1 -0
- package/dist/chat-ui/auth/sign-in-card.cjs +128 -0
- package/dist/chat-ui/auth/sign-in-card.cjs.map +1 -0
- package/dist/chat-ui/auth/sign-in-card.js +128 -0
- package/dist/chat-ui/auth/sign-in-card.js.map +1 -0
- package/dist/chat-ui/composer/composer-action.cjs +11 -0
- package/dist/chat-ui/composer/composer-action.cjs.map +1 -0
- package/dist/chat-ui/composer/composer-action.d.ts +5 -8
- package/dist/chat-ui/composer/composer-action.js +11 -0
- package/dist/chat-ui/composer/composer-action.js.map +1 -0
- package/dist/chat-ui/composer/pending-attachment-uploads.cjs +25 -0
- package/dist/chat-ui/composer/pending-attachment-uploads.cjs.map +1 -0
- package/dist/chat-ui/composer/pending-attachment-uploads.js +25 -0
- package/dist/chat-ui/composer/pending-attachment-uploads.js.map +1 -0
- package/dist/chat-ui/composer/tiptap-composer.cjs +549 -0
- package/dist/chat-ui/composer/tiptap-composer.cjs.map +1 -0
- package/dist/chat-ui/composer/tiptap-composer.d.ts +44 -7
- package/dist/chat-ui/composer/tiptap-composer.js +549 -0
- package/dist/chat-ui/composer/tiptap-composer.js.map +1 -0
- package/dist/chat-ui/header/chat-header.cjs +33 -0
- package/dist/chat-ui/header/chat-header.cjs.map +1 -0
- package/dist/chat-ui/header/chat-header.js +33 -0
- package/dist/chat-ui/header/chat-header.js.map +1 -0
- package/dist/chat-ui/header/conversation-history-panel.cjs +369 -0
- package/dist/chat-ui/header/conversation-history-panel.cjs.map +1 -0
- package/dist/chat-ui/header/conversation-history-panel.js +369 -0
- package/dist/chat-ui/header/conversation-history-panel.js.map +1 -0
- package/dist/chat-ui/index.cjs +140 -0
- package/dist/chat-ui/index.cjs.map +1 -0
- package/dist/chat-ui/index.d.ts +4 -3
- package/dist/chat-ui/index.js +140 -0
- package/dist/chat-ui/index.js.map +1 -0
- package/dist/chat-ui/lib/asset-urls.cjs +18 -0
- package/dist/chat-ui/lib/asset-urls.cjs.map +1 -0
- package/dist/chat-ui/lib/asset-urls.js +18 -0
- package/dist/chat-ui/lib/asset-urls.js.map +1 -0
- package/dist/chat-ui/mentions/mention-chip.cjs +253 -0
- package/dist/chat-ui/mentions/mention-chip.cjs.map +1 -0
- package/dist/chat-ui/mentions/mention-chip.d.ts +11 -0
- package/dist/chat-ui/mentions/mention-chip.js +253 -0
- package/dist/chat-ui/mentions/mention-chip.js.map +1 -0
- package/dist/chat-ui/mentions/mention-extension.cjs +196 -0
- package/dist/chat-ui/mentions/mention-extension.cjs.map +1 -0
- package/dist/chat-ui/mentions/mention-extension.d.ts +26 -2
- package/dist/chat-ui/mentions/mention-extension.js +196 -0
- package/dist/chat-ui/mentions/mention-extension.js.map +1 -0
- package/dist/chat-ui/mentions/suggestions/components/get-scope-name.cjs +35 -0
- package/dist/chat-ui/mentions/suggestions/components/get-scope-name.cjs.map +1 -0
- package/dist/chat-ui/mentions/suggestions/components/get-scope-name.js +35 -0
- package/dist/chat-ui/mentions/suggestions/components/get-scope-name.js.map +1 -0
- package/dist/chat-ui/mentions/suggestions/components/mention-icon.cjs +95 -0
- package/dist/chat-ui/mentions/suggestions/components/mention-icon.cjs.map +1 -0
- package/dist/chat-ui/mentions/suggestions/components/mention-icon.d.ts +5 -0
- package/dist/chat-ui/mentions/suggestions/components/mention-icon.js +95 -0
- package/dist/chat-ui/mentions/suggestions/components/mention-icon.js.map +1 -0
- package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-list.cjs +116 -0
- package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-list.cjs.map +1 -0
- package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-list.js +116 -0
- package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-list.js.map +1 -0
- package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-popup.cjs +31 -0
- package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-popup.cjs.map +1 -0
- package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-popup.js +31 -0
- package/dist/chat-ui/mentions/suggestions/components/mention-suggestion-popup.js.map +1 -0
- package/dist/chat-ui/mentions/suggestions/components/menu-breadcrumbs.cjs +27 -0
- package/dist/chat-ui/mentions/suggestions/components/menu-breadcrumbs.cjs.map +1 -0
- package/dist/chat-ui/mentions/suggestions/components/menu-breadcrumbs.js +27 -0
- package/dist/chat-ui/mentions/suggestions/components/menu-breadcrumbs.js.map +1 -0
- package/dist/chat-ui/mentions/suggestions/components/menu-item.cjs +65 -0
- package/dist/chat-ui/mentions/suggestions/components/menu-item.cjs.map +1 -0
- package/dist/chat-ui/mentions/suggestions/components/menu-item.d.ts +2 -2
- package/dist/chat-ui/mentions/suggestions/components/menu-item.js +65 -0
- package/dist/chat-ui/mentions/suggestions/components/menu-item.js.map +1 -0
- package/dist/chat-ui/mentions/suggestions/components/menu-list.cjs +63 -0
- package/dist/chat-ui/mentions/suggestions/components/menu-list.cjs.map +1 -0
- package/dist/chat-ui/mentions/suggestions/components/menu-list.d.ts +2 -2
- package/dist/chat-ui/mentions/suggestions/components/menu-list.js +63 -0
- package/dist/chat-ui/mentions/suggestions/components/menu-list.js.map +1 -0
- package/dist/chat-ui/mentions/suggestions/components/menu-skeleton.cjs +11 -0
- package/dist/chat-ui/mentions/suggestions/components/menu-skeleton.cjs.map +1 -0
- package/dist/chat-ui/mentions/suggestions/components/menu-skeleton.js +11 -0
- package/dist/chat-ui/mentions/suggestions/components/menu-skeleton.js.map +1 -0
- package/dist/chat-ui/mentions/suggestions/components/menu-summary.cjs +33 -0
- package/dist/chat-ui/mentions/suggestions/components/menu-summary.cjs.map +1 -0
- package/dist/chat-ui/mentions/suggestions/components/menu-summary.js +33 -0
- package/dist/chat-ui/mentions/suggestions/components/menu-summary.js.map +1 -0
- package/dist/chat-ui/mentions/suggestions/components/use-keyboard-navigation.cjs +58 -0
- package/dist/chat-ui/mentions/suggestions/components/use-keyboard-navigation.cjs.map +1 -0
- package/dist/chat-ui/mentions/suggestions/components/use-keyboard-navigation.js +58 -0
- package/dist/chat-ui/mentions/suggestions/components/use-keyboard-navigation.js.map +1 -0
- package/dist/chat-ui/mentions/suggestions/components/use-menu-navigation.cjs +81 -0
- package/dist/chat-ui/mentions/suggestions/components/use-menu-navigation.cjs.map +1 -0
- package/dist/chat-ui/mentions/suggestions/components/use-menu-navigation.js +81 -0
- package/dist/chat-ui/mentions/suggestions/components/use-menu-navigation.js.map +1 -0
- package/dist/chat-ui/mentions/suggestions/components/utils.cjs +18 -0
- package/dist/chat-ui/mentions/suggestions/components/utils.cjs.map +1 -0
- package/dist/chat-ui/mentions/suggestions/components/utils.js +18 -0
- package/dist/chat-ui/mentions/suggestions/components/utils.js.map +1 -0
- package/dist/chat-ui/mentions/suggestions/data/api-client.cjs +124 -0
- package/dist/chat-ui/mentions/suggestions/data/api-client.cjs.map +1 -0
- package/dist/chat-ui/mentions/suggestions/data/api-client.d.ts +13 -2
- package/dist/chat-ui/mentions/suggestions/data/api-client.js +124 -0
- package/dist/chat-ui/mentions/suggestions/data/api-client.js.map +1 -0
- package/dist/chat-ui/mentions/suggestions/data/item-cache.cjs +37 -0
- package/dist/chat-ui/mentions/suggestions/data/item-cache.cjs.map +1 -0
- package/dist/chat-ui/mentions/suggestions/data/item-cache.js +37 -0
- package/dist/chat-ui/mentions/suggestions/data/item-cache.js.map +1 -0
- package/dist/chat-ui/mentions/suggestions/data/orchestrator.cjs +134 -0
- package/dist/chat-ui/mentions/suggestions/data/orchestrator.cjs.map +1 -0
- package/dist/chat-ui/mentions/suggestions/data/orchestrator.js +134 -0
- package/dist/chat-ui/mentions/suggestions/data/orchestrator.js.map +1 -0
- package/dist/chat-ui/mentions/suggestions/data/scope-registry.cjs +91 -0
- package/dist/chat-ui/mentions/suggestions/data/scope-registry.cjs.map +1 -0
- package/dist/chat-ui/mentions/suggestions/data/scope-registry.js +91 -0
- package/dist/chat-ui/mentions/suggestions/data/scope-registry.js.map +1 -0
- package/dist/chat-ui/mentions/suggestions/data/sources/asset-type-icons.cjs +137 -0
- package/dist/chat-ui/mentions/suggestions/data/sources/asset-type-icons.cjs.map +1 -0
- package/dist/chat-ui/mentions/suggestions/data/sources/asset-type-icons.js +137 -0
- package/dist/chat-ui/mentions/suggestions/data/sources/asset-type-icons.js.map +1 -0
- package/dist/chat-ui/mentions/suggestions/data/sources/index.cjs +375 -0
- package/dist/chat-ui/mentions/suggestions/data/sources/index.cjs.map +1 -0
- package/dist/chat-ui/mentions/suggestions/data/sources/index.d.ts +16 -1
- package/dist/chat-ui/mentions/suggestions/data/sources/index.js +375 -0
- package/dist/chat-ui/mentions/suggestions/data/sources/index.js.map +1 -0
- package/dist/chat-ui/mentions/suggestions/data/types.cjs +9 -0
- package/dist/chat-ui/mentions/suggestions/data/types.cjs.map +1 -0
- package/dist/chat-ui/mentions/suggestions/data/types.d.ts +14 -0
- package/dist/chat-ui/mentions/suggestions/data/types.js +9 -0
- package/dist/chat-ui/mentions/suggestions/data/types.js.map +1 -0
- package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.cjs +173 -0
- package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.cjs.map +1 -0
- package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.d.ts +14 -4
- package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.js +173 -0
- package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.js.map +1 -0
- package/dist/chat-ui/mentions/suggestions/data/use-menu-items.cjs +45 -0
- package/dist/chat-ui/mentions/suggestions/data/use-menu-items.cjs.map +1 -0
- package/dist/chat-ui/mentions/suggestions/data/use-menu-items.js +45 -0
- package/dist/chat-ui/mentions/suggestions/data/use-menu-items.js.map +1 -0
- package/dist/chat-ui/mentions/suggestions/data/utils/filter-items.cjs +43 -0
- package/dist/chat-ui/mentions/suggestions/data/utils/filter-items.cjs.map +1 -0
- package/dist/chat-ui/mentions/suggestions/data/utils/filter-items.js +43 -0
- package/dist/chat-ui/mentions/suggestions/data/utils/filter-items.js.map +1 -0
- package/dist/chat-ui/mentions/suggestions/data/utils/match-query.cjs +14 -0
- package/dist/chat-ui/mentions/suggestions/data/utils/match-query.cjs.map +1 -0
- package/dist/chat-ui/mentions/suggestions/data/utils/match-query.js +14 -0
- package/dist/chat-ui/mentions/suggestions/data/utils/match-query.js.map +1 -0
- package/dist/chat-ui/mentions/suggestions/data/utils/score-match.cjs +48 -0
- package/dist/chat-ui/mentions/suggestions/data/utils/score-match.cjs.map +1 -0
- package/dist/chat-ui/mentions/suggestions/data/utils/score-match.js +48 -0
- package/dist/chat-ui/mentions/suggestions/data/utils/score-match.js.map +1 -0
- package/dist/chat-ui/mentions/suggestions/mention-suggestions.extension.cjs +71 -0
- package/dist/chat-ui/mentions/suggestions/mention-suggestions.extension.cjs.map +1 -0
- package/dist/chat-ui/mentions/suggestions/mention-suggestions.extension.js +71 -0
- package/dist/chat-ui/mentions/suggestions/mention-suggestions.extension.js.map +1 -0
- package/dist/chat-ui/messages/continue-pill.cjs +54 -0
- package/dist/chat-ui/messages/continue-pill.cjs.map +1 -0
- package/dist/chat-ui/messages/continue-pill.js +54 -0
- package/dist/chat-ui/messages/continue-pill.js.map +1 -0
- package/dist/chat-ui/messages/message-actions-config.cjs +12 -0
- package/dist/chat-ui/messages/message-actions-config.cjs.map +1 -0
- package/dist/chat-ui/messages/message-actions-config.js +12 -0
- package/dist/chat-ui/messages/message-actions-config.js.map +1 -0
- package/dist/chat-ui/messages/message-components.cjs +320 -0
- package/dist/chat-ui/messages/message-components.cjs.map +1 -0
- package/dist/chat-ui/messages/message-components.d.ts +1 -1
- package/dist/chat-ui/messages/message-components.js +320 -0
- package/dist/chat-ui/messages/message-components.js.map +1 -0
- package/dist/chat-ui/messages/running-indicator.cjs +49 -0
- package/dist/chat-ui/messages/running-indicator.cjs.map +1 -0
- package/dist/chat-ui/messages/running-indicator.js +49 -0
- package/dist/chat-ui/messages/running-indicator.js.map +1 -0
- package/dist/chat-ui/messages/runtime-message.cjs +66 -0
- package/dist/chat-ui/messages/runtime-message.cjs.map +1 -0
- package/dist/chat-ui/messages/runtime-message.js +66 -0
- package/dist/chat-ui/messages/runtime-message.js.map +1 -0
- package/dist/{statewire-continue-run-nE9VCKUh.cjs → chat-ui/messages/statewire-continue-run.cjs} +61 -23
- package/dist/chat-ui/messages/statewire-continue-run.cjs.map +1 -0
- package/dist/chat-ui/messages/statewire-continue-run.d.ts +19 -5
- package/dist/{statewire-continue-run-D34gS7_1.js → chat-ui/messages/statewire-continue-run.js} +51 -14
- package/dist/chat-ui/messages/statewire-continue-run.js.map +1 -0
- package/dist/chat-ui/messages/user-edit-composer.cjs +62 -0
- package/dist/chat-ui/messages/user-edit-composer.cjs.map +1 -0
- package/dist/chat-ui/messages/user-edit-composer.js +62 -0
- package/dist/chat-ui/messages/user-edit-composer.js.map +1 -0
- package/dist/chat-ui/messages/voice-delegation-card.cjs +51 -0
- package/dist/chat-ui/messages/voice-delegation-card.cjs.map +1 -0
- package/dist/chat-ui/messages/voice-delegation-card.d.ts +26 -0
- package/dist/chat-ui/messages/voice-delegation-card.js +51 -0
- package/dist/chat-ui/messages/voice-delegation-card.js.map +1 -0
- package/dist/chat-ui/rich-text/chat-message-body.cjs +76 -0
- package/dist/chat-ui/rich-text/chat-message-body.cjs.map +1 -0
- package/dist/chat-ui/rich-text/chat-message-body.d.ts +5 -0
- package/dist/chat-ui/rich-text/chat-message-body.js +76 -0
- package/dist/chat-ui/rich-text/chat-message-body.js.map +1 -0
- package/dist/chat-ui/rich-text/chat-node-views.cjs +51 -0
- package/dist/chat-ui/rich-text/chat-node-views.cjs.map +1 -0
- package/dist/chat-ui/rich-text/chat-node-views.d.ts +13 -0
- package/dist/chat-ui/rich-text/chat-node-views.js +51 -0
- package/dist/chat-ui/rich-text/chat-node-views.js.map +1 -0
- package/dist/chat-ui/rich-text/chat-text-schema.cjs +70 -0
- package/dist/chat-ui/rich-text/chat-text-schema.cjs.map +1 -0
- package/dist/chat-ui/rich-text/chat-text-schema.d.ts +7 -0
- package/dist/chat-ui/rich-text/chat-text-schema.js +70 -0
- package/dist/chat-ui/rich-text/chat-text-schema.js.map +1 -0
- package/dist/chat-ui/rich-text/dom-output-spec.cjs +83 -0
- package/dist/chat-ui/rich-text/dom-output-spec.cjs.map +1 -0
- package/dist/chat-ui/rich-text/dom-output-spec.d.ts +11 -0
- package/dist/chat-ui/rich-text/dom-output-spec.js +83 -0
- package/dist/chat-ui/rich-text/dom-output-spec.js.map +1 -0
- package/dist/chat-ui/statewire.cjs +40 -0
- package/dist/chat-ui/statewire.cjs.map +1 -0
- package/dist/chat-ui/statewire.js +40 -0
- package/dist/chat-ui/statewire.js.map +1 -0
- package/dist/chat-ui/thread/chat-composer-dock.cjs +37 -0
- package/dist/chat-ui/thread/chat-composer-dock.cjs.map +1 -0
- package/dist/chat-ui/thread/chat-composer-dock.js +37 -0
- package/dist/chat-ui/thread/chat-composer-dock.js.map +1 -0
- package/dist/chat-ui/thread/chat-thread-shell.cjs +102 -0
- package/dist/chat-ui/thread/chat-thread-shell.cjs.map +1 -0
- package/dist/chat-ui/thread/chat-thread-shell.js +102 -0
- package/dist/chat-ui/thread/chat-thread-shell.js.map +1 -0
- package/dist/chat-ui/thread/composer-send-or-stop.cjs +75 -0
- package/dist/chat-ui/thread/composer-send-or-stop.cjs.map +1 -0
- package/dist/chat-ui/thread/composer-send-or-stop.d.ts +0 -6
- package/dist/chat-ui/thread/composer-send-or-stop.js +75 -0
- package/dist/chat-ui/thread/composer-send-or-stop.js.map +1 -0
- package/dist/chat-ui/thread/statewire-history-edge.cjs +135 -0
- package/dist/chat-ui/thread/statewire-history-edge.cjs.map +1 -0
- package/dist/chat-ui/thread/statewire-history-edge.js +135 -0
- package/dist/chat-ui/thread/statewire-history-edge.js.map +1 -0
- package/dist/{collab.cjs → collab/client.cjs} +6 -166
- package/dist/collab/client.cjs.map +1 -0
- package/dist/{collab.js → collab/client.js} +5 -164
- package/dist/collab/client.js.map +1 -0
- package/dist/collab/close-policy.cjs +14 -0
- package/dist/collab/close-policy.cjs.map +1 -0
- package/dist/collab/close-policy.js +14 -0
- package/dist/collab/close-policy.js.map +1 -0
- package/dist/collab/index.cjs +17 -0
- package/dist/collab/index.cjs.map +1 -0
- package/dist/collab/index.js +17 -0
- package/dist/collab/index.js.map +1 -0
- package/dist/collab/mint.cjs +59 -0
- package/dist/collab/mint.cjs.map +1 -0
- package/dist/collab/mint.js +59 -0
- package/dist/collab/mint.js.map +1 -0
- package/dist/collab/react.cjs +58 -0
- package/dist/collab/react.cjs.map +1 -0
- package/dist/collab/react.js +58 -0
- package/dist/collab/react.js.map +1 -0
- package/dist/collab/shape.cjs +45 -0
- package/dist/collab/shape.cjs.map +1 -0
- package/dist/collab/shape.js +45 -0
- package/dist/collab/shape.js.map +1 -0
- package/dist/composer/AttachmentContext.cjs +40 -0
- package/dist/composer/AttachmentContext.cjs.map +1 -0
- package/dist/composer/AttachmentContext.js +40 -0
- package/dist/composer/AttachmentContext.js.map +1 -0
- package/dist/composer/ComposerAttachmentPreview.cjs +39 -0
- package/dist/composer/ComposerAttachmentPreview.cjs.map +1 -0
- package/dist/composer/ComposerAttachmentPreview.js +39 -0
- package/dist/composer/ComposerAttachmentPreview.js.map +1 -0
- package/dist/composer/ComposerDropZone.cjs +61 -0
- package/dist/composer/ComposerDropZone.cjs.map +1 -0
- package/dist/composer/ComposerDropZone.d.ts +1 -1
- package/dist/composer/ComposerDropZone.js +61 -0
- package/dist/composer/ComposerDropZone.js.map +1 -0
- package/dist/composer/ComposerQuotePreview.cjs +42 -0
- package/dist/composer/ComposerQuotePreview.cjs.map +1 -0
- package/dist/composer/ComposerQuotePreview.js +42 -0
- package/dist/composer/ComposerQuotePreview.js.map +1 -0
- package/dist/composer/FileUploadButton.cjs +65 -0
- package/dist/composer/FileUploadButton.cjs.map +1 -0
- package/dist/composer/FileUploadButton.d.ts +1 -1
- package/dist/composer/FileUploadButton.js +65 -0
- package/dist/composer/FileUploadButton.js.map +1 -0
- package/dist/composer/QuoteContext.cjs +68 -0
- package/dist/composer/QuoteContext.cjs.map +1 -0
- package/dist/composer/QuoteContext.js +68 -0
- package/dist/composer/QuoteContext.js.map +1 -0
- package/dist/composer/build-composed-message.cjs +25 -0
- package/dist/composer/build-composed-message.cjs.map +1 -0
- package/dist/composer/build-composed-message.js +25 -0
- package/dist/composer/build-composed-message.js.map +1 -0
- package/dist/composer/clipboard.cjs +62 -0
- package/dist/composer/clipboard.cjs.map +1 -0
- package/dist/composer/clipboard.d.ts +27 -3
- package/dist/composer/clipboard.js +62 -0
- package/dist/composer/clipboard.js.map +1 -0
- package/dist/composer/useAppendToComposer.cjs +21 -0
- package/dist/composer/useAppendToComposer.cjs.map +1 -0
- package/dist/composer/useAppendToComposer.js +21 -0
- package/dist/composer/useAppendToComposer.js.map +1 -0
- package/dist/composer/useAttachFiles.cjs +40 -0
- package/dist/composer/useAttachFiles.cjs.map +1 -0
- package/dist/composer/useAttachFiles.d.ts +24 -0
- package/dist/composer/useAttachFiles.js +40 -0
- package/dist/composer/useAttachFiles.js.map +1 -0
- package/dist/composer/useComposerAttachment.cjs +25 -0
- package/dist/composer/useComposerAttachment.cjs.map +1 -0
- package/dist/composer/useComposerAttachment.js +25 -0
- package/dist/composer/useComposerAttachment.js.map +1 -0
- package/dist/composer/useFileUpload.cjs +123 -0
- package/dist/composer/useFileUpload.cjs.map +1 -0
- package/dist/composer/useFileUpload.js +123 -0
- package/dist/composer/useFileUpload.js.map +1 -0
- package/dist/composer/useSendMessage.cjs +22 -0
- package/dist/composer/useSendMessage.cjs.map +1 -0
- package/dist/composer/useSendMessage.js +22 -0
- package/dist/composer/useSendMessage.js.map +1 -0
- package/dist/diagnostics/athena-diagnostics.cjs +329 -0
- package/dist/diagnostics/athena-diagnostics.cjs.map +1 -0
- package/dist/diagnostics/athena-diagnostics.js +329 -0
- package/dist/diagnostics/athena-diagnostics.js.map +1 -0
- package/dist/diagnostics/errors.cjs +89 -0
- package/dist/diagnostics/errors.cjs.map +1 -0
- package/dist/diagnostics/errors.js +89 -0
- package/dist/diagnostics/errors.js.map +1 -0
- package/dist/diagnostics/useAthenaDiagnostics.cjs +16 -0
- package/dist/diagnostics/useAthenaDiagnostics.cjs.map +1 -0
- package/dist/diagnostics/useAthenaDiagnostics.js +16 -0
- package/dist/diagnostics/useAthenaDiagnostics.js.map +1 -0
- package/dist/index.cjs +275 -27882
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +6 -4
- package/dist/index.js +162 -27759
- package/dist/index.js.map +1 -1
- package/dist/lib/athena-urls.cjs +194 -0
- package/dist/lib/athena-urls.cjs.map +1 -0
- package/dist/lib/athena-urls.d.ts +20 -5
- package/dist/lib/athena-urls.js +194 -0
- package/dist/lib/athena-urls.js.map +1 -0
- package/dist/lib/posthog/before-send.cjs +58 -0
- package/dist/lib/posthog/before-send.cjs.map +1 -0
- package/dist/lib/posthog/before-send.js +58 -0
- package/dist/lib/posthog/before-send.js.map +1 -0
- package/dist/lib/posthog/capture-gate.cjs +322 -0
- package/dist/lib/posthog/capture-gate.cjs.map +1 -0
- package/dist/lib/posthog/capture-gate.js +322 -0
- package/dist/lib/posthog/capture-gate.js.map +1 -0
- package/dist/lib/posthog/wrap-posthog-client.cjs +163 -0
- package/dist/lib/posthog/wrap-posthog-client.cjs.map +1 -0
- package/dist/lib/posthog/wrap-posthog-client.js +163 -0
- package/dist/lib/posthog/wrap-posthog-client.js.map +1 -0
- package/dist/lib/utils.cjs +12 -0
- package/dist/lib/utils.cjs.map +1 -0
- package/dist/lib/utils.js +9 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/node_modules/@assistant-ui/react-langchain/dist/converter.cjs +77 -0
- package/dist/node_modules/@assistant-ui/react-langchain/dist/converter.cjs.map +1 -0
- package/dist/node_modules/@assistant-ui/react-langchain/dist/converter.js +77 -0
- package/dist/node_modules/@assistant-ui/react-langchain/dist/converter.js.map +1 -0
- package/dist/node_modules/@assistant-ui/react-langgraph/dist/convertLangChainMessages.cjs +181 -0
- package/dist/node_modules/@assistant-ui/react-langgraph/dist/convertLangChainMessages.cjs.map +1 -0
- package/dist/node_modules/@assistant-ui/react-langgraph/dist/convertLangChainMessages.js +181 -0
- package/dist/node_modules/@assistant-ui/react-langgraph/dist/convertLangChainMessages.js.map +1 -0
- package/dist/node_modules/qrcode-generator/dist/qrcode.cjs +32 -0
- package/dist/node_modules/qrcode-generator/dist/qrcode.cjs.map +1 -0
- package/dist/node_modules/qrcode-generator/dist/qrcode.js +31 -0
- package/dist/node_modules/qrcode-generator/dist/qrcode.js.map +1 -0
- package/dist/node_modules/zod/v4/classic/errors.cjs +44 -0
- package/dist/node_modules/zod/v4/classic/errors.cjs.map +1 -0
- package/dist/node_modules/zod/v4/classic/errors.js +44 -0
- package/dist/node_modules/zod/v4/classic/errors.js.map +1 -0
- package/dist/node_modules/zod/v4/classic/iso.cjs +43 -0
- package/dist/node_modules/zod/v4/classic/iso.cjs.map +1 -0
- package/dist/node_modules/zod/v4/classic/iso.js +43 -0
- package/dist/node_modules/zod/v4/classic/iso.js.map +1 -0
- package/dist/node_modules/zod/v4/classic/parse.cjs +29 -0
- package/dist/node_modules/zod/v4/classic/parse.cjs.map +1 -0
- package/dist/node_modules/zod/v4/classic/parse.js +29 -0
- package/dist/node_modules/zod/v4/classic/parse.js.map +1 -0
- package/dist/node_modules/zod/v4/classic/schemas.cjs +871 -0
- package/dist/node_modules/zod/v4/classic/schemas.cjs.map +1 -0
- package/dist/node_modules/zod/v4/classic/schemas.js +871 -0
- package/dist/node_modules/zod/v4/classic/schemas.js.map +1 -0
- package/dist/node_modules/zod/v4/core/api.cjs +570 -0
- package/dist/node_modules/zod/v4/core/api.cjs.map +1 -0
- package/dist/node_modules/zod/v4/core/api.js +570 -0
- package/dist/node_modules/zod/v4/core/api.js.map +1 -0
- package/dist/node_modules/zod/v4/core/checks.cjs +411 -0
- package/dist/node_modules/zod/v4/core/checks.cjs.map +1 -0
- package/dist/node_modules/zod/v4/core/checks.js +411 -0
- package/dist/node_modules/zod/v4/core/checks.js.map +1 -0
- package/dist/node_modules/zod/v4/core/core.cjs +77 -0
- package/dist/node_modules/zod/v4/core/core.cjs.map +1 -0
- package/dist/node_modules/zod/v4/core/core.js +77 -0
- package/dist/node_modules/zod/v4/core/core.js.map +1 -0
- package/dist/node_modules/zod/v4/core/doc.cjs +38 -0
- package/dist/node_modules/zod/v4/core/doc.cjs.map +1 -0
- package/dist/node_modules/zod/v4/core/doc.js +38 -0
- package/dist/node_modules/zod/v4/core/doc.js.map +1 -0
- package/dist/node_modules/zod/v4/core/errors.cjs +76 -0
- package/dist/node_modules/zod/v4/core/errors.cjs.map +1 -0
- package/dist/node_modules/zod/v4/core/errors.js +76 -0
- package/dist/node_modules/zod/v4/core/errors.js.map +1 -0
- package/dist/node_modules/zod/v4/core/json-schema-processors.cjs +312 -0
- package/dist/node_modules/zod/v4/core/json-schema-processors.cjs.map +1 -0
- package/dist/node_modules/zod/v4/core/json-schema-processors.js +312 -0
- package/dist/node_modules/zod/v4/core/json-schema-processors.js.map +1 -0
- package/dist/node_modules/zod/v4/core/parse.cjs +96 -0
- package/dist/node_modules/zod/v4/core/parse.cjs.map +1 -0
- package/dist/node_modules/zod/v4/core/parse.js +96 -0
- package/dist/node_modules/zod/v4/core/parse.js.map +1 -0
- package/dist/node_modules/zod/v4/core/regexes.cjs +86 -0
- package/dist/node_modules/zod/v4/core/regexes.cjs.map +1 -0
- package/dist/node_modules/zod/v4/core/regexes.js +86 -0
- package/dist/node_modules/zod/v4/core/regexes.js.map +1 -0
- package/dist/node_modules/zod/v4/core/registries.cjs +52 -0
- package/dist/node_modules/zod/v4/core/registries.cjs.map +1 -0
- package/dist/node_modules/zod/v4/core/registries.js +52 -0
- package/dist/node_modules/zod/v4/core/registries.js.map +1 -0
- package/dist/node_modules/zod/v4/core/schemas.cjs +1412 -0
- package/dist/node_modules/zod/v4/core/schemas.cjs.map +1 -0
- package/dist/node_modules/zod/v4/core/schemas.js +1413 -0
- package/dist/node_modules/zod/v4/core/schemas.js.map +1 -0
- package/dist/node_modules/zod/v4/core/to-json-schema.cjs +370 -0
- package/dist/node_modules/zod/v4/core/to-json-schema.cjs.map +1 -0
- package/dist/node_modules/zod/v4/core/to-json-schema.js +370 -0
- package/dist/node_modules/zod/v4/core/to-json-schema.js.map +1 -0
- package/dist/node_modules/zod/v4/core/util.cjs +444 -0
- package/dist/node_modules/zod/v4/core/util.cjs.map +1 -0
- package/dist/node_modules/zod/v4/core/util.js +444 -0
- package/dist/node_modules/zod/v4/core/util.js.map +1 -0
- package/dist/node_modules/zod/v4/core/versions.cjs +9 -0
- package/dist/node_modules/zod/v4/core/versions.cjs.map +1 -0
- package/dist/node_modules/zod/v4/core/versions.js +9 -0
- package/dist/node_modules/zod/v4/core/versions.js.map +1 -0
- package/dist/packages/agent-runtime/src/asset-attachment.cjs +19 -0
- package/dist/packages/agent-runtime/src/asset-attachment.cjs.map +1 -0
- package/dist/packages/agent-runtime/src/asset-attachment.js +19 -0
- package/dist/packages/agent-runtime/src/asset-attachment.js.map +1 -0
- package/dist/packages/agent-runtime/src/auth-denial.cjs +28 -0
- package/dist/packages/agent-runtime/src/auth-denial.cjs.map +1 -0
- package/dist/packages/agent-runtime/src/auth-denial.js +28 -0
- package/dist/packages/agent-runtime/src/auth-denial.js.map +1 -0
- package/dist/packages/agent-runtime/src/client-tool-bridge.cjs +276 -0
- package/dist/packages/agent-runtime/src/client-tool-bridge.cjs.map +1 -0
- package/dist/packages/agent-runtime/src/client-tool-bridge.js +276 -0
- package/dist/packages/agent-runtime/src/client-tool-bridge.js.map +1 -0
- package/dist/packages/agent-runtime/src/client-tools.cjs +137 -0
- package/dist/packages/agent-runtime/src/client-tools.cjs.map +1 -0
- package/dist/packages/agent-runtime/src/client-tools.js +137 -0
- package/dist/packages/agent-runtime/src/client-tools.js.map +1 -0
- package/dist/packages/agent-runtime/src/conversation-index.cjs +80 -0
- package/dist/packages/agent-runtime/src/conversation-index.cjs.map +1 -0
- package/dist/packages/agent-runtime/src/conversation-index.js +80 -0
- package/dist/packages/agent-runtime/src/conversation-index.js.map +1 -0
- package/dist/packages/agent-runtime/src/conversation-list.cjs +90 -0
- package/dist/packages/agent-runtime/src/conversation-list.cjs.map +1 -0
- package/dist/packages/agent-runtime/src/conversation-list.js +90 -0
- package/dist/packages/agent-runtime/src/conversation-list.js.map +1 -0
- package/dist/packages/agent-runtime/src/deep-agent-transport-recipe.cjs +55 -0
- package/dist/packages/agent-runtime/src/deep-agent-transport-recipe.cjs.map +1 -0
- package/dist/packages/agent-runtime/src/deep-agent-transport-recipe.js +55 -0
- package/dist/packages/agent-runtime/src/deep-agent-transport-recipe.js.map +1 -0
- package/dist/packages/agent-runtime/src/edit-command.cjs +89 -0
- package/dist/packages/agent-runtime/src/edit-command.cjs.map +1 -0
- package/dist/packages/agent-runtime/src/edit-command.js +89 -0
- package/dist/packages/agent-runtime/src/edit-command.js.map +1 -0
- package/dist/packages/agent-runtime/src/errors.cjs +95 -0
- package/dist/packages/agent-runtime/src/errors.cjs.map +1 -0
- package/dist/packages/agent-runtime/src/errors.js +95 -0
- package/dist/packages/agent-runtime/src/errors.js.map +1 -0
- package/dist/packages/agent-runtime/src/generated/runconfig-contract.cjs +238 -0
- package/dist/packages/agent-runtime/src/generated/runconfig-contract.cjs.map +1 -0
- package/dist/packages/agent-runtime/src/generated/runconfig-contract.js +238 -0
- package/dist/packages/agent-runtime/src/generated/runconfig-contract.js.map +1 -0
- package/dist/packages/agent-runtime/src/interrupts.cjs +141 -0
- package/dist/packages/agent-runtime/src/interrupts.cjs.map +1 -0
- package/dist/packages/agent-runtime/src/interrupts.js +141 -0
- package/dist/packages/agent-runtime/src/interrupts.js.map +1 -0
- package/dist/packages/agent-runtime/src/message-author.cjs +31 -0
- package/dist/packages/agent-runtime/src/message-author.cjs.map +1 -0
- package/dist/packages/agent-runtime/src/message-author.js +31 -0
- package/dist/packages/agent-runtime/src/message-author.js.map +1 -0
- package/dist/packages/agent-runtime/src/message-window.cjs +85 -0
- package/dist/packages/agent-runtime/src/message-window.cjs.map +1 -0
- package/dist/packages/agent-runtime/src/message-window.js +85 -0
- package/dist/packages/agent-runtime/src/message-window.js.map +1 -0
- package/dist/packages/agent-runtime/src/messages.cjs +463 -0
- package/dist/packages/agent-runtime/src/messages.cjs.map +1 -0
- package/dist/packages/agent-runtime/src/messages.js +463 -0
- package/dist/packages/agent-runtime/src/messages.js.map +1 -0
- package/dist/packages/agent-runtime/src/model-context.cjs +13 -0
- package/dist/packages/agent-runtime/src/model-context.cjs.map +1 -0
- package/dist/packages/agent-runtime/src/model-context.js +13 -0
- package/dist/packages/agent-runtime/src/model-context.js.map +1 -0
- package/dist/packages/agent-runtime/src/optimistic-content.cjs +17 -0
- package/dist/packages/agent-runtime/src/optimistic-content.cjs.map +1 -0
- package/dist/packages/agent-runtime/src/optimistic-content.js +17 -0
- package/dist/packages/agent-runtime/src/optimistic-content.js.map +1 -0
- package/dist/packages/agent-runtime/src/protocol.cjs +31 -0
- package/dist/packages/agent-runtime/src/protocol.cjs.map +1 -0
- package/dist/packages/agent-runtime/src/protocol.js +31 -0
- package/dist/packages/agent-runtime/src/protocol.js.map +1 -0
- package/dist/packages/agent-runtime/src/queue.cjs +67 -0
- package/dist/packages/agent-runtime/src/queue.cjs.map +1 -0
- package/dist/packages/agent-runtime/src/queue.js +67 -0
- package/dist/packages/agent-runtime/src/queue.js.map +1 -0
- package/dist/packages/agent-runtime/src/quota-safe-local-storage-session.cjs +329 -0
- package/dist/packages/agent-runtime/src/quota-safe-local-storage-session.cjs.map +1 -0
- package/dist/packages/agent-runtime/src/quota-safe-local-storage-session.js +329 -0
- package/dist/packages/agent-runtime/src/quota-safe-local-storage-session.js.map +1 -0
- package/dist/packages/agent-runtime/src/runtime-messages.cjs +187 -0
- package/dist/packages/agent-runtime/src/runtime-messages.cjs.map +1 -0
- package/dist/packages/agent-runtime/src/runtime-messages.js +187 -0
- package/dist/packages/agent-runtime/src/runtime-messages.js.map +1 -0
- package/dist/packages/agent-runtime/src/screen-point.cjs +68 -0
- package/dist/packages/agent-runtime/src/screen-point.cjs.map +1 -0
- package/dist/packages/agent-runtime/src/screen-point.js +68 -0
- package/dist/packages/agent-runtime/src/screen-point.js.map +1 -0
- package/dist/packages/agent-runtime/src/send-recovery.cjs +128 -0
- package/dist/packages/agent-runtime/src/send-recovery.cjs.map +1 -0
- package/dist/packages/agent-runtime/src/send-recovery.js +128 -0
- package/dist/packages/agent-runtime/src/send-recovery.js.map +1 -0
- package/dist/packages/agent-runtime/src/statewire-attach-observer.cjs +249 -0
- package/dist/packages/agent-runtime/src/statewire-attach-observer.cjs.map +1 -0
- package/dist/packages/agent-runtime/src/statewire-attach-observer.js +249 -0
- package/dist/packages/agent-runtime/src/statewire-attach-observer.js.map +1 -0
- package/dist/packages/agent-runtime/src/statewire-state.cjs +16 -0
- package/dist/packages/agent-runtime/src/statewire-state.cjs.map +1 -0
- package/dist/packages/agent-runtime/src/statewire-state.js +16 -0
- package/dist/packages/agent-runtime/src/statewire-state.js.map +1 -0
- package/dist/packages/agent-runtime/src/statewire-suspended.cjs +41 -0
- package/dist/packages/agent-runtime/src/statewire-suspended.cjs.map +1 -0
- package/dist/packages/agent-runtime/src/statewire-suspended.js +41 -0
- package/dist/packages/agent-runtime/src/statewire-suspended.js.map +1 -0
- package/dist/packages/agent-runtime/src/statewire-transport.cjs +11 -0
- package/dist/packages/agent-runtime/src/statewire-transport.cjs.map +1 -0
- package/dist/packages/agent-runtime/src/statewire-transport.js +11 -0
- package/dist/packages/agent-runtime/src/statewire-transport.js.map +1 -0
- package/dist/packages/agent-runtime/src/streaming-markdown.cjs +214 -0
- package/dist/packages/agent-runtime/src/streaming-markdown.cjs.map +1 -0
- package/dist/packages/agent-runtime/src/streaming-markdown.js +214 -0
- package/dist/packages/agent-runtime/src/streaming-markdown.js.map +1 -0
- package/dist/packages/agent-runtime/src/thread-extras.cjs +38 -0
- package/dist/packages/agent-runtime/src/thread-extras.cjs.map +1 -0
- package/dist/packages/agent-runtime/src/thread-extras.js +38 -0
- package/dist/packages/agent-runtime/src/thread-extras.js.map +1 -0
- package/dist/packages/agent-runtime/src/thread-handoff.cjs +85 -0
- package/dist/packages/agent-runtime/src/thread-handoff.cjs.map +1 -0
- package/dist/packages/agent-runtime/src/thread-handoff.js +85 -0
- package/dist/packages/agent-runtime/src/thread-handoff.js.map +1 -0
- package/dist/packages/agent-runtime/src/thread-snapshot-cache.cjs +90 -0
- package/dist/packages/agent-runtime/src/thread-snapshot-cache.cjs.map +1 -0
- package/dist/packages/agent-runtime/src/thread-snapshot-cache.js +90 -0
- package/dist/packages/agent-runtime/src/thread-snapshot-cache.js.map +1 -0
- package/dist/packages/agent-runtime/src/thread-status.cjs +49 -0
- package/dist/packages/agent-runtime/src/thread-status.cjs.map +1 -0
- package/dist/packages/agent-runtime/src/thread-status.js +49 -0
- package/dist/packages/agent-runtime/src/thread-status.js.map +1 -0
- package/dist/packages/agent-runtime/src/tool-metadata.cjs +1794 -0
- package/dist/packages/agent-runtime/src/tool-metadata.cjs.map +1 -0
- package/dist/packages/agent-runtime/src/tool-metadata.js +1794 -0
- package/dist/packages/agent-runtime/src/tool-metadata.js.map +1 -0
- package/dist/packages/agent-runtime/src/tool-outputs.cjs +46 -0
- package/dist/packages/agent-runtime/src/tool-outputs.cjs.map +1 -0
- package/dist/packages/agent-runtime/src/tool-outputs.js +46 -0
- package/dist/packages/agent-runtime/src/tool-outputs.js.map +1 -0
- package/dist/packages/agent-runtime/src/tool-result.cjs +151 -0
- package/dist/packages/agent-runtime/src/tool-result.cjs.map +1 -0
- package/dist/packages/agent-runtime/src/tool-result.js +151 -0
- package/dist/packages/agent-runtime/src/tool-result.js.map +1 -0
- package/dist/packages/agent-runtime/src/use-conversation-list.cjs +139 -0
- package/dist/packages/agent-runtime/src/use-conversation-list.cjs.map +1 -0
- package/dist/packages/agent-runtime/src/use-conversation-list.js +139 -0
- package/dist/packages/agent-runtime/src/use-conversation-list.js.map +1 -0
- package/dist/packages/agent-runtime/src/use-deep-agent-config.cjs +14 -0
- package/dist/packages/agent-runtime/src/use-deep-agent-config.cjs.map +1 -0
- package/dist/packages/agent-runtime/src/use-deep-agent-config.js +14 -0
- package/dist/packages/agent-runtime/src/use-deep-agent-config.js.map +1 -0
- package/dist/packages/agent-runtime/src/use-deep-agent-edit-submit.cjs +44 -0
- package/dist/packages/agent-runtime/src/use-deep-agent-edit-submit.cjs.map +1 -0
- package/dist/packages/agent-runtime/src/use-deep-agent-edit-submit.js +44 -0
- package/dist/packages/agent-runtime/src/use-deep-agent-edit-submit.js.map +1 -0
- package/dist/packages/agent-runtime/src/use-deep-agent-runtime.cjs +148 -0
- package/dist/packages/agent-runtime/src/use-deep-agent-runtime.cjs.map +1 -0
- package/dist/packages/agent-runtime/src/use-deep-agent-runtime.js +148 -0
- package/dist/packages/agent-runtime/src/use-deep-agent-runtime.js.map +1 -0
- package/dist/packages/agent-runtime/src/use-deep-agent-thread.cjs +407 -0
- package/dist/packages/agent-runtime/src/use-deep-agent-thread.cjs.map +1 -0
- package/dist/packages/agent-runtime/src/use-deep-agent-thread.js +407 -0
- package/dist/packages/agent-runtime/src/use-deep-agent-thread.js.map +1 -0
- package/dist/packages/agent-runtime/src/use-deep-agent-window-sync.cjs +133 -0
- package/dist/packages/agent-runtime/src/use-deep-agent-window-sync.cjs.map +1 -0
- package/dist/packages/agent-runtime/src/use-deep-agent-window-sync.js +133 -0
- package/dist/packages/agent-runtime/src/use-deep-agent-window-sync.js.map +1 -0
- package/dist/packages/agent-runtime/src/voice-presentation.cjs +37 -0
- package/dist/packages/agent-runtime/src/voice-presentation.cjs.map +1 -0
- package/dist/packages/agent-runtime/src/voice-presentation.js +37 -0
- package/dist/packages/agent-runtime/src/voice-presentation.js.map +1 -0
- package/dist/packages/react/package.json.cjs +9 -0
- package/dist/packages/react/package.json.cjs.map +1 -0
- package/dist/packages/react/package.json.js +9 -0
- package/dist/packages/react/package.json.js.map +1 -0
- package/dist/{AthenaContext-B1QMhIP-.cjs → provider/AthenaContext.cjs} +5 -4
- package/dist/provider/AthenaContext.cjs.map +1 -0
- package/dist/{AthenaContext-MOslgOmE.js → provider/AthenaContext.js} +3 -3
- package/dist/provider/AthenaContext.js.map +1 -0
- package/dist/provider/AthenaProvider.cjs +404 -0
- package/dist/provider/AthenaProvider.cjs.map +1 -0
- package/dist/provider/AthenaProvider.js +404 -0
- package/dist/provider/AthenaProvider.js.map +1 -0
- package/dist/provider/PostHogProvider.cjs +81 -0
- package/dist/provider/PostHogProvider.cjs.map +1 -0
- package/dist/provider/PostHogProvider.js +59 -0
- package/dist/provider/PostHogProvider.js.map +1 -0
- package/dist/provider/config.d.ts +8 -7
- package/dist/provider/statewire-lifecycle-context.cjs +10 -0
- package/dist/provider/statewire-lifecycle-context.cjs.map +1 -0
- package/dist/provider/statewire-lifecycle-context.js +10 -0
- package/dist/provider/statewire-lifecycle-context.js.map +1 -0
- package/dist/provider/statewire-window-context.cjs +10 -0
- package/dist/provider/statewire-window-context.cjs.map +1 -0
- package/dist/provider/statewire-window-context.js +10 -0
- package/dist/provider/statewire-window-context.js.map +1 -0
- package/dist/runtime/auth.cjs +309 -0
- package/dist/runtime/auth.cjs.map +1 -0
- package/dist/runtime/auth.d.ts +19 -18
- package/dist/runtime/auth.js +309 -0
- package/dist/runtime/auth.js.map +1 -0
- package/dist/runtime/statewire-auth-headers.cjs +18 -0
- package/dist/runtime/statewire-auth-headers.cjs.map +1 -0
- package/dist/runtime/statewire-auth-headers.js +18 -0
- package/dist/runtime/statewire-auth-headers.js.map +1 -0
- package/dist/runtime/statewire-lifecycle.cjs +68 -0
- package/dist/runtime/statewire-lifecycle.cjs.map +1 -0
- package/dist/runtime/statewire-lifecycle.js +68 -0
- package/dist/runtime/statewire-lifecycle.js.map +1 -0
- package/dist/runtime/statewire-run-config.cjs +68 -0
- package/dist/runtime/statewire-run-config.cjs.map +1 -0
- package/dist/runtime/statewire-run-config.js +68 -0
- package/dist/runtime/statewire-run-config.js.map +1 -0
- package/dist/runtime/statewire-session-key.cjs +11 -0
- package/dist/runtime/statewire-session-key.cjs.map +1 -0
- package/dist/runtime/statewire-session-key.js +11 -0
- package/dist/runtime/statewire-session-key.js.map +1 -0
- package/dist/runtime/useAthenaStatewireRuntime.cjs +180 -0
- package/dist/runtime/useAthenaStatewireRuntime.cjs.map +1 -0
- package/dist/runtime/useAthenaStatewireRuntime.js +181 -0
- package/dist/runtime/useAthenaStatewireRuntime.js.map +1 -0
- package/dist/styles.css +1 -1
- package/dist/theme/index.cjs +182 -0
- package/dist/theme/index.cjs.map +1 -0
- package/dist/theme/index.js +182 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/threads/ThreadList.cjs +55 -0
- package/dist/threads/ThreadList.cjs.map +1 -0
- package/dist/threads/ThreadList.js +55 -0
- package/dist/threads/ThreadList.js.map +1 -0
- package/dist/threads/api.cjs +208 -0
- package/dist/threads/api.cjs.map +1 -0
- package/dist/threads/api.js +208 -0
- package/dist/threads/api.js.map +1 -0
- package/dist/threads/conversation-list-fetcher.cjs +74 -0
- package/dist/threads/conversation-list-fetcher.cjs.map +1 -0
- package/dist/threads/conversation-list-fetcher.js +74 -0
- package/dist/threads/conversation-list-fetcher.js.map +1 -0
- package/dist/threads/mint-thread-id.cjs +7 -0
- package/dist/threads/mint-thread-id.cjs.map +1 -0
- package/dist/threads/mint-thread-id.js +7 -0
- package/dist/threads/mint-thread-id.js.map +1 -0
- package/dist/threads/statewire-thread-list.cjs +232 -0
- package/dist/threads/statewire-thread-list.cjs.map +1 -0
- package/dist/threads/statewire-thread-list.js +232 -0
- package/dist/threads/statewire-thread-list.js.map +1 -0
- package/dist/threads/thread-id-context.cjs +22 -0
- package/dist/threads/thread-id-context.cjs.map +1 -0
- package/dist/threads/thread-id-context.d.ts +9 -0
- package/dist/threads/thread-id-context.js +22 -0
- package/dist/threads/thread-id-context.js.map +1 -0
- package/dist/threads/title.cjs +95 -0
- package/dist/threads/title.cjs.map +1 -0
- package/dist/threads/title.js +95 -0
- package/dist/threads/title.js.map +1 -0
- package/dist/threads/use-rest-conversation-history.cjs +80 -0
- package/dist/threads/use-rest-conversation-history.cjs.map +1 -0
- package/dist/threads/use-rest-conversation-history.js +80 -0
- package/dist/threads/use-rest-conversation-history.js.map +1 -0
- package/dist/threads/use-statewire-conversation-history.cjs +244 -0
- package/dist/threads/use-statewire-conversation-history.cjs.map +1 -0
- package/dist/threads/use-statewire-conversation-history.d.ts +1 -0
- package/dist/threads/use-statewire-conversation-history.js +244 -0
- package/dist/threads/use-statewire-conversation-history.js.map +1 -0
- package/dist/threads/useAthenaThreadManager.cjs +24 -0
- package/dist/threads/useAthenaThreadManager.cjs.map +1 -0
- package/dist/threads/useAthenaThreadManager.js +24 -0
- package/dist/threads/useAthenaThreadManager.js.map +1 -0
- package/dist/toolkits/index.cjs +279 -0
- package/dist/toolkits/index.cjs.map +1 -0
- package/dist/toolkits/index.js +279 -0
- package/dist/toolkits/index.js.map +1 -0
- package/dist/tools/NestedPtcMessages.cjs +46 -0
- package/dist/tools/NestedPtcMessages.cjs.map +1 -0
- package/dist/tools/NestedPtcMessages.js +46 -0
- package/dist/tools/NestedPtcMessages.js.map +1 -0
- package/dist/tools/append-document-tool-ui.cjs +145 -0
- package/dist/tools/append-document-tool-ui.cjs.map +1 -0
- package/dist/tools/append-document-tool-ui.js +145 -0
- package/dist/tools/append-document-tool-ui.js.map +1 -0
- package/dist/tools/asset-utils.cjs +16 -0
- package/dist/tools/asset-utils.cjs.map +1 -0
- package/dist/tools/asset-utils.js +16 -0
- package/dist/tools/asset-utils.js.map +1 -0
- package/dist/tools/auto-open-tools.cjs +121 -0
- package/dist/tools/auto-open-tools.cjs.map +1 -0
- package/dist/tools/auto-open-tools.js +121 -0
- package/dist/tools/auto-open-tools.js.map +1 -0
- package/dist/tools/file-tool-uis.cjs +108 -0
- package/dist/tools/file-tool-uis.cjs.map +1 -0
- package/dist/tools/file-tool-uis.js +108 -0
- package/dist/tools/file-tool-uis.js.map +1 -0
- package/dist/tools/index.cjs +57 -0
- package/dist/tools/index.cjs.map +1 -0
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/index.js +57 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/misc-tool-uis.cjs +55 -0
- package/dist/tools/misc-tool-uis.cjs.map +1 -0
- package/dist/{misc-tool-uis-gAiQw0Yl.js → tools/misc-tool-uis.js} +18 -7
- package/dist/tools/misc-tool-uis.js.map +1 -0
- package/dist/tools/primitives.cjs +167 -0
- package/dist/tools/primitives.cjs.map +1 -0
- package/dist/tools/primitives.js +167 -0
- package/dist/tools/primitives.js.map +1 -0
- package/dist/tools/read-asset-tool-ui.cjs +284 -0
- package/dist/tools/read-asset-tool-ui.cjs.map +1 -0
- package/dist/tools/read-asset-tool-ui.js +284 -0
- package/dist/tools/read-asset-tool-ui.js.map +1 -0
- package/dist/tools/todo-plan-store.cjs +88 -0
- package/dist/tools/todo-plan-store.cjs.map +1 -0
- package/dist/tools/todo-plan-store.js +88 -0
- package/dist/tools/todo-plan-store.js.map +1 -0
- package/dist/tools/tool-fallback.cjs +668 -0
- package/dist/tools/tool-fallback.cjs.map +1 -0
- package/dist/tools/tool-fallback.js +668 -0
- package/dist/tools/tool-fallback.js.map +1 -0
- package/dist/tools/tool-icons.cjs +61 -0
- package/dist/tools/tool-icons.cjs.map +1 -0
- package/dist/tools/tool-icons.js +61 -0
- package/dist/tools/tool-icons.js.map +1 -0
- package/dist/tools/tool-uis.cjs +3049 -0
- package/dist/tools/tool-uis.cjs.map +1 -0
- package/dist/tools/tool-uis.js +3049 -0
- package/dist/tools/tool-uis.js.map +1 -0
- package/dist/tools/voice-update-tool-ui.cjs +90 -0
- package/dist/tools/voice-update-tool-ui.cjs.map +1 -0
- package/dist/tools/voice-update-tool-ui.d.ts +27 -0
- package/dist/tools/voice-update-tool-ui.js +90 -0
- package/dist/tools/voice-update-tool-ui.js.map +1 -0
- package/dist/tools/write-todos-tool-ui.cjs +270 -0
- package/dist/tools/write-todos-tool-ui.cjs.map +1 -0
- package/dist/tools/write-todos-tool-ui.js +270 -0
- package/dist/tools/write-todos-tool-ui.js.map +1 -0
- package/dist/ui/button.cjs +57 -0
- package/dist/ui/button.cjs.map +1 -0
- package/dist/ui/button.js +57 -0
- package/dist/ui/button.js.map +1 -0
- package/dist/ui/collapsible.cjs +17 -0
- package/dist/ui/collapsible.cjs.map +1 -0
- package/dist/ui/collapsible.js +17 -0
- package/dist/ui/collapsible.js.map +1 -0
- package/dist/ui/tooltip.cjs +48 -0
- package/dist/ui/tooltip.cjs.map +1 -0
- package/dist/ui/tooltip.js +48 -0
- package/dist/ui/tooltip.js.map +1 -0
- package/dist/version.cjs +6 -0
- package/dist/version.cjs.map +1 -0
- package/dist/version.js +6 -0
- package/dist/version.js.map +1 -0
- package/dist/voice/index.cjs +6 -0
- package/dist/voice/index.cjs.map +1 -0
- package/dist/voice/index.d.ts +2 -0
- package/dist/voice/index.js +6 -0
- package/dist/voice/index.js.map +1 -0
- package/dist/voice/use-athena-voice-session.cjs +315 -0
- package/dist/voice/use-athena-voice-session.cjs.map +1 -0
- package/dist/voice/use-athena-voice-session.d.ts +145 -0
- package/dist/voice/use-athena-voice-session.js +315 -0
- package/dist/voice/use-athena-voice-session.js.map +1 -0
- package/package.json +32 -20
- package/dist/AthenaAuthContext-B3AwLA5Z.cjs.map +0 -1
- package/dist/AthenaAuthContext-DQsdayH2.js.map +0 -1
- package/dist/AthenaContext-B1QMhIP-.cjs.map +0 -1
- package/dist/AthenaContext-MOslgOmE.js.map +0 -1
- package/dist/SuperGroupingCard-BsWbHyV_.js +0 -795
- package/dist/SuperGroupingCard-BsWbHyV_.js.map +0 -1
- package/dist/SuperGroupingCard-CRRFUgjN.cjs +0 -794
- package/dist/SuperGroupingCard-CRRFUgjN.cjs.map +0 -1
- package/dist/auth.cjs.map +0 -1
- package/dist/auth.js.map +0 -1
- package/dist/chat/ComposerEditorContext.d.ts +0 -36
- package/dist/chat/tiptap-composer.d.ts +0 -7
- package/dist/chat-ui-statewire.cjs +0 -25
- package/dist/chat-ui-statewire.cjs.map +0 -1
- package/dist/chat-ui-statewire.js +0 -25
- package/dist/chat-ui-statewire.js.map +0 -1
- package/dist/chat-ui.cjs +0 -2484
- package/dist/chat-ui.cjs.map +0 -1
- package/dist/chat-ui.js +0 -2486
- package/dist/chat-ui.js.map +0 -1
- package/dist/collab.cjs.map +0 -1
- package/dist/collab.js.map +0 -1
- package/dist/mentions/composer-keybinds.d.ts +0 -5
- package/dist/mentions/mention-extension.d.ts +0 -6
- package/dist/mentions/mention-icons.d.ts +0 -4
- package/dist/mentions/mention-node-view.d.ts +0 -2
- package/dist/mentions/mention-suggestion-list.d.ts +0 -14
- package/dist/mentions/mention-suggestion-popup.d.ts +0 -15
- package/dist/mentions/mention-suggestions-extension.d.ts +0 -11
- package/dist/mentions/mention-types.d.ts +0 -21
- package/dist/mentions/mention-utils.d.ts +0 -23
- package/dist/mentions/use-mention-suggestions.d.ts +0 -29
- package/dist/misc-tool-uis-B2e0Okkn.cjs +0 -43
- package/dist/misc-tool-uis-B2e0Okkn.cjs.map +0 -1
- package/dist/misc-tool-uis-gAiQw0Yl.js.map +0 -1
- package/dist/statewire-continue-run-D34gS7_1.js.map +0 -1
- package/dist/statewire-continue-run-nE9VCKUh.cjs.map +0 -1
- package/dist/statewire-history-edge-C8uyTEjX.cjs +0 -1711
- package/dist/statewire-history-edge-C8uyTEjX.cjs.map +0 -1
- package/dist/statewire-history-edge-CPohUKMt.js +0 -1712
- package/dist/statewire-history-edge-CPohUKMt.js.map +0 -1
- package/dist/super-grouping.cjs +0 -22
- package/dist/super-grouping.cjs.map +0 -1
- package/dist/super-grouping.js +0 -22
- package/dist/super-grouping.js.map +0 -1
- package/dist/tool-fallback-DkQ3DLkn.js +0 -4281
- package/dist/tool-fallback-DkQ3DLkn.js.map +0 -1
- package/dist/tool-fallback-kfhpJQZa.cjs +0 -4297
- package/dist/tool-fallback-kfhpJQZa.cjs.map +0 -1
- package/dist/tools.cjs +0 -41
- package/dist/tools.cjs.map +0 -1
- package/dist/tools.js +0 -41
- package/dist/tools.js.map +0 -1
- package/dist/trash-2-B5OaNAL7.cjs +0 -5096
- package/dist/trash-2-B5OaNAL7.cjs.map +0 -1
- package/dist/trash-2-CCwSURL-.js +0 -5081
- package/dist/trash-2-CCwSURL-.js.map +0 -1
- package/dist/use-rest-conversation-history-Cm8qMRxp.cjs +0 -32397
- package/dist/use-rest-conversation-history-Cm8qMRxp.cjs.map +0 -1
- package/dist/use-rest-conversation-history-veDZS-oL.js +0 -32361
- package/dist/use-rest-conversation-history-veDZS-oL.js.map +0 -1
- package/dist/wrench-BEf72cyP.cjs +0 -417
- package/dist/wrench-BEf72cyP.cjs.map +0 -1
- package/dist/wrench-CbrOlVYm.js +0 -418
- package/dist/wrench-CbrOlVYm.js.map +0 -1
- package/dist/x-Dfd2NzK0.cjs +0 -42
- package/dist/x-Dfd2NzK0.cjs.map +0 -1
- package/dist/x-_DntAa_a.js +0 -43
- package/dist/x-_DntAa_a.js.map +0 -1
package/dist/chat-ui.js
DELETED
|
@@ -1,2486 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
-
import { T as THREAD_HEADER_ACTIONS_CLASS, a as THREAD_HEADER_PILL_CLASS, b as THREAD_HEADER_CLASS, R as RefreshCw, P as Plus, c as conversationDisplayTitle, d as assetTypeToThumb, N as Node, m as mergeAttributes, E as Extension, S as Suggestion, u as useFloating, F as FloatingPortal, e as autoUpdate, o as offset, f as flip, s as shift, g as getFilteredItems, h as getFetchState, i as getEntry, j as updateFetchState, k as addItems, r as registerSource, l as bindScopes, n as athenaDiagnostics, p as useStore, q as File$1, t as Sheet, L as LayoutGrid, v as FolderKanban, w as Store, x as getSearchScope, y as fetchGraphQL, z as PAGINATED_ASSETS_QUERY, W as WORKSPACE_MEMBERS_QUERY, A as SIMPLE_SEARCH_QUERY, B as assetTypeToIcon, C as TOOL_CATALOG_QUERY, D as useMentionAuth, G as createScopeRegistry, H as createItemCache, I as useEditor, J as StarterKit, K as Placeholder, M as EditorContent } from "./use-rest-conversation-history-veDZS-oL.js";
|
|
5
|
-
import { O, Q, U, V, X, Y, Z, _, $, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, aa, ab, ac, ad, ae, af, ag, ah, ai, aj, ak, al, am } from "./use-rest-conversation-history-veDZS-oL.js";
|
|
6
|
-
import { L as LoaderCircle, Z as Zap } from "./statewire-history-edge-CPohUKMt.js";
|
|
7
|
-
import { C, g, H, a, R, S, b, c, d, T, u, e } from "./statewire-history-edge-CPohUKMt.js";
|
|
8
|
-
import { jsx, jsxs, Fragment as Fragment$1 } from "react/jsx-runtime";
|
|
9
|
-
import { b as createLucideIcon, c as cn } from "./trash-2-CCwSURL-.js";
|
|
10
|
-
import { useRef, useCallback, useEffect, useMemo, useState, Fragment, useImperativeHandle, forwardRef, useId } from "react";
|
|
11
|
-
import { S as Search, B as Bot, M as MessageSquare, F as FileText, W as Workflow, a as Sparkles, b as BookOpen, L as LayoutDashboard, c as Palette, T as Table, D as Database, d as Phone, C as Calendar, e as Mail, V as Video, I as Image, f as Monitor, g as Code, h as Camera, H as HardDrive, P as Package, i as Wrench, U as Users, j as Star, G as Globe, k as Folder } from "./wrench-CbrOlVYm.js";
|
|
12
|
-
import { useAui, unstable_useComposerInput } from "@assistant-ui/react";
|
|
13
|
-
import "@assistant-ui/tap";
|
|
14
|
-
import "statewire";
|
|
15
|
-
import "@assistant-ui/react-statewire";
|
|
16
|
-
import "@assistant-ui/store";
|
|
17
|
-
import "@assistant-ui/core";
|
|
18
|
-
import { S as S2, a as a10, b as b2 } from "./statewire-continue-run-D34gS7_1.js";
|
|
19
|
-
const mentionHandlersByThread = /* @__PURE__ */ new Map();
|
|
20
|
-
function registerChatAssetMentionHandler(threadId, handler) {
|
|
21
|
-
mentionHandlersByThread.set(threadId, handler);
|
|
22
|
-
return () => {
|
|
23
|
-
if (mentionHandlersByThread.get(threadId) === handler) {
|
|
24
|
-
mentionHandlersByThread.delete(threadId);
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* @license lucide-react v0.575.0 - ISC
|
|
30
|
-
*
|
|
31
|
-
* This source code is licensed under the ISC license.
|
|
32
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/
|
|
34
|
-
const __iconNode$e = [
|
|
35
|
-
["rect", { width: "20", height: "5", x: "2", y: "3", rx: "1", key: "1wp1u1" }],
|
|
36
|
-
["path", { d: "M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8", key: "1s80jp" }],
|
|
37
|
-
["path", { d: "M10 12h4", key: "a56b0p" }]
|
|
38
|
-
];
|
|
39
|
-
const Archive = createLucideIcon("archive", __iconNode$e);
|
|
40
|
-
/**
|
|
41
|
-
* @license lucide-react v0.575.0 - ISC
|
|
42
|
-
*
|
|
43
|
-
* This source code is licensed under the ISC license.
|
|
44
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
45
|
-
*/
|
|
46
|
-
const __iconNode$d = [
|
|
47
|
-
["path", { d: "M10 12h4", key: "a56b0p" }],
|
|
48
|
-
["path", { d: "M10 8h4", key: "1sr2af" }],
|
|
49
|
-
["path", { d: "M14 21v-3a2 2 0 0 0-4 0v3", key: "1rgiei" }],
|
|
50
|
-
[
|
|
51
|
-
"path",
|
|
52
|
-
{
|
|
53
|
-
d: "M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",
|
|
54
|
-
key: "secmi2"
|
|
55
|
-
}
|
|
56
|
-
],
|
|
57
|
-
["path", { d: "M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16", key: "16ra0t" }]
|
|
58
|
-
];
|
|
59
|
-
const Building2 = createLucideIcon("building-2", __iconNode$d);
|
|
60
|
-
/**
|
|
61
|
-
* @license lucide-react v0.575.0 - ISC
|
|
62
|
-
*
|
|
63
|
-
* This source code is licensed under the ISC license.
|
|
64
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
65
|
-
*/
|
|
66
|
-
const __iconNode$c = [
|
|
67
|
-
["path", { d: "M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z", key: "p7xjir" }]
|
|
68
|
-
];
|
|
69
|
-
const Cloud = createLucideIcon("cloud", __iconNode$c);
|
|
70
|
-
/**
|
|
71
|
-
* @license lucide-react v0.575.0 - ISC
|
|
72
|
-
*
|
|
73
|
-
* This source code is licensed under the ISC license.
|
|
74
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
-
*/
|
|
76
|
-
const __iconNode$b = [
|
|
77
|
-
[
|
|
78
|
-
"path",
|
|
79
|
-
{
|
|
80
|
-
d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",
|
|
81
|
-
key: "1nclc0"
|
|
82
|
-
}
|
|
83
|
-
],
|
|
84
|
-
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
85
|
-
];
|
|
86
|
-
const Eye = createLucideIcon("eye", __iconNode$b);
|
|
87
|
-
/**
|
|
88
|
-
* @license lucide-react v0.575.0 - ISC
|
|
89
|
-
*
|
|
90
|
-
* This source code is licensed under the ISC license.
|
|
91
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
92
|
-
*/
|
|
93
|
-
const __iconNode$a = [
|
|
94
|
-
[
|
|
95
|
-
"path",
|
|
96
|
-
{
|
|
97
|
-
d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
|
|
98
|
-
key: "1oefj6"
|
|
99
|
-
}
|
|
100
|
-
],
|
|
101
|
-
["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }],
|
|
102
|
-
["path", { d: "M10 12.5 8 15l2 2.5", key: "1tg20x" }],
|
|
103
|
-
["path", { d: "m14 12.5 2 2.5-2 2.5", key: "yinavb" }]
|
|
104
|
-
];
|
|
105
|
-
const FileCode = createLucideIcon("file-code", __iconNode$a);
|
|
106
|
-
/**
|
|
107
|
-
* @license lucide-react v0.575.0 - ISC
|
|
108
|
-
*
|
|
109
|
-
* This source code is licensed under the ISC license.
|
|
110
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
-
*/
|
|
112
|
-
const __iconNode$9 = [
|
|
113
|
-
[
|
|
114
|
-
"path",
|
|
115
|
-
{
|
|
116
|
-
d: "M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",
|
|
117
|
-
key: "1xhozi"
|
|
118
|
-
}
|
|
119
|
-
]
|
|
120
|
-
];
|
|
121
|
-
const Headphones = createLucideIcon("headphones", __iconNode$9);
|
|
122
|
-
/**
|
|
123
|
-
* @license lucide-react v0.575.0 - ISC
|
|
124
|
-
*
|
|
125
|
-
* This source code is licensed under the ISC license.
|
|
126
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
127
|
-
*/
|
|
128
|
-
const __iconNode$8 = [
|
|
129
|
-
["path", { d: "m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4", key: "g0fldk" }],
|
|
130
|
-
["path", { d: "m21 2-9.6 9.6", key: "1j0ho8" }],
|
|
131
|
-
["circle", { cx: "7.5", cy: "15.5", r: "5.5", key: "yqb3hr" }]
|
|
132
|
-
];
|
|
133
|
-
const Key = createLucideIcon("key", __iconNode$8);
|
|
134
|
-
/**
|
|
135
|
-
* @license lucide-react v0.575.0 - ISC
|
|
136
|
-
*
|
|
137
|
-
* This source code is licensed under the ISC license.
|
|
138
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
139
|
-
*/
|
|
140
|
-
const __iconNode$7 = [
|
|
141
|
-
["path", { d: "M10 8h.01", key: "1r9ogq" }],
|
|
142
|
-
["path", { d: "M12 12h.01", key: "1mp3jc" }],
|
|
143
|
-
["path", { d: "M14 8h.01", key: "1primd" }],
|
|
144
|
-
["path", { d: "M16 12h.01", key: "1l6xoz" }],
|
|
145
|
-
["path", { d: "M18 8h.01", key: "emo2bl" }],
|
|
146
|
-
["path", { d: "M6 8h.01", key: "x9i8wu" }],
|
|
147
|
-
["path", { d: "M7 16h10", key: "wp8him" }],
|
|
148
|
-
["path", { d: "M8 12h.01", key: "czm47f" }],
|
|
149
|
-
["rect", { width: "20", height: "16", x: "2", y: "4", rx: "2", key: "18n3k1" }]
|
|
150
|
-
];
|
|
151
|
-
const Keyboard = createLucideIcon("keyboard", __iconNode$7);
|
|
152
|
-
/**
|
|
153
|
-
* @license lucide-react v0.575.0 - ISC
|
|
154
|
-
*
|
|
155
|
-
* This source code is licensed under the ISC license.
|
|
156
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
157
|
-
*/
|
|
158
|
-
const __iconNode$6 = [
|
|
159
|
-
["path", { d: "m16 6 4 14", key: "ji33uf" }],
|
|
160
|
-
["path", { d: "M12 6v14", key: "1n7gus" }],
|
|
161
|
-
["path", { d: "M8 8v12", key: "1gg7y9" }],
|
|
162
|
-
["path", { d: "M4 4v16", key: "6qkkli" }]
|
|
163
|
-
];
|
|
164
|
-
const Library = createLucideIcon("library", __iconNode$6);
|
|
165
|
-
/**
|
|
166
|
-
* @license lucide-react v0.575.0 - ISC
|
|
167
|
-
*
|
|
168
|
-
* This source code is licensed under the ISC license.
|
|
169
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
170
|
-
*/
|
|
171
|
-
const __iconNode$5 = [
|
|
172
|
-
["path", { d: "M12 19v3", key: "npa21l" }],
|
|
173
|
-
["path", { d: "M19 10v2a7 7 0 0 1-14 0v-2", key: "1vc78b" }],
|
|
174
|
-
["rect", { x: "9", y: "2", width: "6", height: "13", rx: "3", key: "s6n7sd" }]
|
|
175
|
-
];
|
|
176
|
-
const Mic = createLucideIcon("mic", __iconNode$5);
|
|
177
|
-
/**
|
|
178
|
-
* @license lucide-react v0.575.0 - ISC
|
|
179
|
-
*
|
|
180
|
-
* This source code is licensed under the ISC license.
|
|
181
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
182
|
-
*/
|
|
183
|
-
const __iconNode$4 = [
|
|
184
|
-
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
185
|
-
["path", { d: "M3 9h18", key: "1pudct" }],
|
|
186
|
-
["path", { d: "M9 21V9", key: "1oto5p" }]
|
|
187
|
-
];
|
|
188
|
-
const PanelsTopLeft = createLucideIcon("panels-top-left", __iconNode$4);
|
|
189
|
-
/**
|
|
190
|
-
* @license lucide-react v0.575.0 - ISC
|
|
191
|
-
*
|
|
192
|
-
* This source code is licensed under the ISC license.
|
|
193
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
194
|
-
*/
|
|
195
|
-
const __iconNode$3 = [
|
|
196
|
-
[
|
|
197
|
-
"path",
|
|
198
|
-
{
|
|
199
|
-
d: "M15.707 21.293a1 1 0 0 1-1.414 0l-1.586-1.586a1 1 0 0 1 0-1.414l5.586-5.586a1 1 0 0 1 1.414 0l1.586 1.586a1 1 0 0 1 0 1.414z",
|
|
200
|
-
key: "nt11vn"
|
|
201
|
-
}
|
|
202
|
-
],
|
|
203
|
-
[
|
|
204
|
-
"path",
|
|
205
|
-
{
|
|
206
|
-
d: "m18 13-1.375-6.874a1 1 0 0 0-.746-.776L3.235 2.028a1 1 0 0 0-1.207 1.207L5.35 15.879a1 1 0 0 0 .776.746L13 18",
|
|
207
|
-
key: "15qc1e"
|
|
208
|
-
}
|
|
209
|
-
],
|
|
210
|
-
["path", { d: "m2.3 2.3 7.286 7.286", key: "1wuzzi" }],
|
|
211
|
-
["circle", { cx: "11", cy: "11", r: "2", key: "xmgehs" }]
|
|
212
|
-
];
|
|
213
|
-
const PenTool = createLucideIcon("pen-tool", __iconNode$3);
|
|
214
|
-
/**
|
|
215
|
-
* @license lucide-react v0.575.0 - ISC
|
|
216
|
-
*
|
|
217
|
-
* This source code is licensed under the ISC license.
|
|
218
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
219
|
-
*/
|
|
220
|
-
const __iconNode$2 = [
|
|
221
|
-
["rect", { width: "14", height: "20", x: "5", y: "2", rx: "2", ry: "2", key: "1yt0o3" }],
|
|
222
|
-
["path", { d: "M12 18h.01", key: "mhygvu" }]
|
|
223
|
-
];
|
|
224
|
-
const Smartphone = createLucideIcon("smartphone", __iconNode$2);
|
|
225
|
-
/**
|
|
226
|
-
* @license lucide-react v0.575.0 - ISC
|
|
227
|
-
*
|
|
228
|
-
* This source code is licensed under the ISC license.
|
|
229
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
230
|
-
*/
|
|
231
|
-
const __iconNode$1 = [
|
|
232
|
-
[
|
|
233
|
-
"path",
|
|
234
|
-
{ d: "M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344", key: "2acyp4" }
|
|
235
|
-
],
|
|
236
|
-
["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
|
|
237
|
-
];
|
|
238
|
-
const SquareCheckBig = createLucideIcon("square-check-big", __iconNode$1);
|
|
239
|
-
/**
|
|
240
|
-
* @license lucide-react v0.575.0 - ISC
|
|
241
|
-
*
|
|
242
|
-
* This source code is licensed under the ISC license.
|
|
243
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
244
|
-
*/
|
|
245
|
-
const __iconNode = [
|
|
246
|
-
["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
|
|
247
|
-
["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
|
|
248
|
-
];
|
|
249
|
-
const User = createLucideIcon("user", __iconNode);
|
|
250
|
-
function ChatHeaderRoot({
|
|
251
|
-
children,
|
|
252
|
-
className
|
|
253
|
-
}) {
|
|
254
|
-
return /* @__PURE__ */ jsx("div", { className: cn(THREAD_HEADER_CLASS, className), children });
|
|
255
|
-
}
|
|
256
|
-
function ChatHeaderIdentity({
|
|
257
|
-
children,
|
|
258
|
-
className
|
|
259
|
-
}) {
|
|
260
|
-
return /* @__PURE__ */ jsx("div", { className: cn(THREAD_HEADER_PILL_CLASS, className), children });
|
|
261
|
-
}
|
|
262
|
-
function ChatHeaderActions({
|
|
263
|
-
children,
|
|
264
|
-
className
|
|
265
|
-
}) {
|
|
266
|
-
return /* @__PURE__ */ jsx("div", { className: cn(THREAD_HEADER_ACTIONS_CLASS, className), children });
|
|
267
|
-
}
|
|
268
|
-
const ChatHeader = {
|
|
269
|
-
Root: ChatHeaderRoot,
|
|
270
|
-
Identity: ChatHeaderIdentity,
|
|
271
|
-
Actions: ChatHeaderActions
|
|
272
|
-
};
|
|
273
|
-
const TIME_GROUPS = [
|
|
274
|
-
"Today",
|
|
275
|
-
"Yesterday",
|
|
276
|
-
"This Week",
|
|
277
|
-
"This Month",
|
|
278
|
-
"Older"
|
|
279
|
-
];
|
|
280
|
-
const AUTOMATED_SOURCE_CHANNELS = /* @__PURE__ */ new Set([
|
|
281
|
-
"api",
|
|
282
|
-
"email",
|
|
283
|
-
"orchestration",
|
|
284
|
-
"slack",
|
|
285
|
-
"sms",
|
|
286
|
-
"task",
|
|
287
|
-
"teams"
|
|
288
|
-
]);
|
|
289
|
-
function isAutomatedConversation(conversation) {
|
|
290
|
-
var _a, _b;
|
|
291
|
-
const sourceChannel = (_a = conversation.sourceChannel) == null ? void 0 : _a.trim().toLowerCase();
|
|
292
|
-
if (sourceChannel && AUTOMATED_SOURCE_CHANNELS.has(sourceChannel))
|
|
293
|
-
return true;
|
|
294
|
-
const triggerType = (_b = conversation.triggerType) == null ? void 0 : _b.trim().toLowerCase();
|
|
295
|
-
return Boolean(triggerType && triggerType !== "manual");
|
|
296
|
-
}
|
|
297
|
-
function conversationTimeGroup(value, now = /* @__PURE__ */ new Date()) {
|
|
298
|
-
const date = new Date(value);
|
|
299
|
-
if (Number.isNaN(date.getTime())) return "Older";
|
|
300
|
-
const startOfToday = new Date(
|
|
301
|
-
now.getFullYear(),
|
|
302
|
-
now.getMonth(),
|
|
303
|
-
now.getDate()
|
|
304
|
-
);
|
|
305
|
-
const startOfYesterday = new Date(startOfToday.getTime() - 864e5);
|
|
306
|
-
const startOfWeek = new Date(
|
|
307
|
-
startOfToday.getTime() - startOfToday.getDay() * 864e5
|
|
308
|
-
);
|
|
309
|
-
const startOfMonth = new Date(now.getFullYear(), now.getMonth(), 1);
|
|
310
|
-
if (date >= startOfToday) return "Today";
|
|
311
|
-
if (date >= startOfYesterday) return "Yesterday";
|
|
312
|
-
if (date >= startOfWeek) return "This Week";
|
|
313
|
-
if (date >= startOfMonth) return "This Month";
|
|
314
|
-
return "Older";
|
|
315
|
-
}
|
|
316
|
-
function originKey(conversation) {
|
|
317
|
-
return conversation.appId ?? conversation.sourceChannel ?? "unknown";
|
|
318
|
-
}
|
|
319
|
-
function originLabel(value) {
|
|
320
|
-
const normalized = value.toLowerCase();
|
|
321
|
-
if (normalized.includes("chrome")) return "Chrome";
|
|
322
|
-
if (normalized.includes("powerpoint")) return "PowerPoint";
|
|
323
|
-
if (normalized.includes("word")) return "Word";
|
|
324
|
-
if (normalized.includes("excel")) return "Excel";
|
|
325
|
-
if (normalized.includes("office")) return "Office";
|
|
326
|
-
if (normalized === "web" || normalized.includes("olympus")) return "Athena";
|
|
327
|
-
if (normalized.includes("mobile")) return "Mobile";
|
|
328
|
-
if (value === "unknown") return "Legacy";
|
|
329
|
-
return value.replace(/^athena[-_]/, "").replaceAll("_", " ");
|
|
330
|
-
}
|
|
331
|
-
function relativeTime(value) {
|
|
332
|
-
const timestamp = Date.parse(value);
|
|
333
|
-
if (!Number.isFinite(timestamp)) return "";
|
|
334
|
-
const elapsed = Math.max(0, Date.now() - timestamp);
|
|
335
|
-
const minutes = Math.floor(elapsed / 6e4);
|
|
336
|
-
if (minutes < 1) return "<1m ago";
|
|
337
|
-
if (minutes < 60) return `${minutes}m ago`;
|
|
338
|
-
const hours = Math.floor(minutes / 60);
|
|
339
|
-
if (hours < 24) return `${hours}h ${minutes % 60}m ago`;
|
|
340
|
-
const days = Math.floor(hours / 24);
|
|
341
|
-
return days < 7 ? `${days}d ago` : new Date(timestamp).toLocaleDateString();
|
|
342
|
-
}
|
|
343
|
-
function ConversationTypeIcon({
|
|
344
|
-
conversation,
|
|
345
|
-
automated
|
|
346
|
-
}) {
|
|
347
|
-
if (conversation.state === "running") {
|
|
348
|
-
return /* @__PURE__ */ jsx(
|
|
349
|
-
LoaderCircle,
|
|
350
|
-
{
|
|
351
|
-
"aria-label": "Conversation running",
|
|
352
|
-
className: "mt-0.5 size-4 shrink-0 animate-spin text-primary"
|
|
353
|
-
}
|
|
354
|
-
);
|
|
355
|
-
}
|
|
356
|
-
const thumbnail = assetTypeToThumb(conversation.assetType ?? "session");
|
|
357
|
-
if (thumbnail) {
|
|
358
|
-
return /* @__PURE__ */ jsx("img", { src: thumbnail, alt: "", className: "mt-0.5 size-4 shrink-0" });
|
|
359
|
-
}
|
|
360
|
-
return automated ? /* @__PURE__ */ jsx(Bot, { className: "mt-0.5 size-4 shrink-0 text-primary" }) : /* @__PURE__ */ jsx(MessageSquare, { className: "mt-0.5 size-4 shrink-0 text-emerald-500" });
|
|
361
|
-
}
|
|
362
|
-
function ConversationHistoryPanel({
|
|
363
|
-
conversations,
|
|
364
|
-
activeThreadId,
|
|
365
|
-
search,
|
|
366
|
-
onSearchChange,
|
|
367
|
-
activityFilter,
|
|
368
|
-
onActivityFilterChange,
|
|
369
|
-
originFilter,
|
|
370
|
-
onOriginFilterChange,
|
|
371
|
-
onSelect,
|
|
372
|
-
onNewChat,
|
|
373
|
-
onRefresh,
|
|
374
|
-
onArchive,
|
|
375
|
-
onSetReadState,
|
|
376
|
-
isLoading = false,
|
|
377
|
-
isRefreshing = false,
|
|
378
|
-
hasNextPage = false,
|
|
379
|
-
isFetchingNextPage = false,
|
|
380
|
-
onLoadMore,
|
|
381
|
-
onHoverIntent,
|
|
382
|
-
onHoverIntentEnd,
|
|
383
|
-
hoverIntentDelayMs = 150
|
|
384
|
-
}) {
|
|
385
|
-
const hoverTimer = useRef(null);
|
|
386
|
-
const hoverIntentThreadId = useRef(null);
|
|
387
|
-
const onHoverIntentRef = useRef(onHoverIntent);
|
|
388
|
-
onHoverIntentRef.current = onHoverIntent;
|
|
389
|
-
const onHoverIntentEndRef = useRef(onHoverIntentEnd);
|
|
390
|
-
onHoverIntentEndRef.current = onHoverIntentEnd;
|
|
391
|
-
const cancelHoverTimer = useCallback(() => {
|
|
392
|
-
if (hoverTimer.current === null) return;
|
|
393
|
-
clearTimeout(hoverTimer.current);
|
|
394
|
-
hoverTimer.current = null;
|
|
395
|
-
}, []);
|
|
396
|
-
const endHoverIntent = useCallback(() => {
|
|
397
|
-
var _a;
|
|
398
|
-
const threadId = hoverIntentThreadId.current;
|
|
399
|
-
if (threadId === null) return;
|
|
400
|
-
hoverIntentThreadId.current = null;
|
|
401
|
-
(_a = onHoverIntentEndRef.current) == null ? void 0 : _a.call(onHoverIntentEndRef, threadId);
|
|
402
|
-
}, []);
|
|
403
|
-
useEffect(
|
|
404
|
-
() => () => {
|
|
405
|
-
cancelHoverTimer();
|
|
406
|
-
endHoverIntent();
|
|
407
|
-
},
|
|
408
|
-
[cancelHoverTimer, endHoverIntent]
|
|
409
|
-
);
|
|
410
|
-
const handleRowEnter = (threadId) => {
|
|
411
|
-
if (!onHoverIntentRef.current) return;
|
|
412
|
-
cancelHoverTimer();
|
|
413
|
-
hoverTimer.current = setTimeout(() => {
|
|
414
|
-
var _a;
|
|
415
|
-
hoverTimer.current = null;
|
|
416
|
-
hoverIntentThreadId.current = threadId;
|
|
417
|
-
(_a = onHoverIntentRef.current) == null ? void 0 : _a.call(onHoverIntentRef, threadId);
|
|
418
|
-
}, hoverIntentDelayMs);
|
|
419
|
-
};
|
|
420
|
-
const handleRowLeave = (threadId) => {
|
|
421
|
-
cancelHoverTimer();
|
|
422
|
-
if (hoverIntentThreadId.current !== threadId) return;
|
|
423
|
-
endHoverIntent();
|
|
424
|
-
};
|
|
425
|
-
const origins = useMemo(
|
|
426
|
-
() => [...new Set(conversations.map(originKey))].sort(),
|
|
427
|
-
[conversations]
|
|
428
|
-
);
|
|
429
|
-
const grouped = useMemo(() => {
|
|
430
|
-
const visible = conversations.filter((conversation) => {
|
|
431
|
-
const automated = isAutomatedConversation(conversation);
|
|
432
|
-
if (activityFilter === "chat" && automated) return false;
|
|
433
|
-
if (activityFilter === "automated" && !automated) return false;
|
|
434
|
-
return originFilter === "all" || originKey(conversation) === originFilter;
|
|
435
|
-
});
|
|
436
|
-
const byGroup = /* @__PURE__ */ new Map();
|
|
437
|
-
for (const conversation of visible) {
|
|
438
|
-
const group = conversationTimeGroup(conversation.updatedAt);
|
|
439
|
-
const items = byGroup.get(group) ?? [];
|
|
440
|
-
items.push(conversation);
|
|
441
|
-
byGroup.set(group, items);
|
|
442
|
-
}
|
|
443
|
-
return TIME_GROUPS.flatMap((group) => {
|
|
444
|
-
const items = byGroup.get(group);
|
|
445
|
-
return items ? [{ group, items }] : [];
|
|
446
|
-
});
|
|
447
|
-
}, [activityFilter, conversations, originFilter]);
|
|
448
|
-
useEffect(() => {
|
|
449
|
-
const threadId = hoverIntentThreadId.current;
|
|
450
|
-
if (threadId === null) return;
|
|
451
|
-
const stillVisible = grouped.some(
|
|
452
|
-
({ items }) => items.some((conversation) => conversation.threadId === threadId)
|
|
453
|
-
);
|
|
454
|
-
if (!stillVisible) endHoverIntent();
|
|
455
|
-
}, [grouped, endHoverIntent]);
|
|
456
|
-
const visibleCount = grouped.reduce(
|
|
457
|
-
(count, group) => count + group.items.length,
|
|
458
|
-
0
|
|
459
|
-
);
|
|
460
|
-
const handleSearch = (event) => onSearchChange(event.target.value);
|
|
461
|
-
return /* @__PURE__ */ jsxs(
|
|
462
|
-
"section",
|
|
463
|
-
{
|
|
464
|
-
"aria-label": "Conversation history",
|
|
465
|
-
className: "border-b border-border bg-background px-2 pb-2",
|
|
466
|
-
"data-testid": "conversation-history-panel",
|
|
467
|
-
children: [
|
|
468
|
-
/* @__PURE__ */ jsxs("div", { className: "flex h-10 items-center gap-1.5 px-1", children: [
|
|
469
|
-
/* @__PURE__ */ jsx("h2", { className: "text-[11px] font-semibold uppercase tracking-[0.08em] text-muted-foreground", children: "Sessions" }),
|
|
470
|
-
/* @__PURE__ */ jsx(
|
|
471
|
-
"button",
|
|
472
|
-
{
|
|
473
|
-
type: "button",
|
|
474
|
-
"aria-label": "Refresh sessions",
|
|
475
|
-
title: "Refresh sessions",
|
|
476
|
-
disabled: isRefreshing,
|
|
477
|
-
onClick: onRefresh,
|
|
478
|
-
className: "ml-auto rounded-md p-1.5 text-muted-foreground hover:bg-accent hover:text-foreground disabled:opacity-50",
|
|
479
|
-
children: /* @__PURE__ */ jsx(
|
|
480
|
-
RefreshCw,
|
|
481
|
-
{
|
|
482
|
-
className: cn("size-3.5", isRefreshing && "animate-spin")
|
|
483
|
-
}
|
|
484
|
-
)
|
|
485
|
-
}
|
|
486
|
-
),
|
|
487
|
-
/* @__PURE__ */ jsxs(
|
|
488
|
-
"button",
|
|
489
|
-
{
|
|
490
|
-
type: "button",
|
|
491
|
-
onClick: onNewChat,
|
|
492
|
-
className: "flex h-7 shrink-0 items-center gap-1 rounded-md bg-primary px-2 text-[11px] font-medium text-primary-foreground",
|
|
493
|
-
children: [
|
|
494
|
-
/* @__PURE__ */ jsx(Plus, { className: "size-3" }),
|
|
495
|
-
" New"
|
|
496
|
-
]
|
|
497
|
-
}
|
|
498
|
-
)
|
|
499
|
-
] }),
|
|
500
|
-
/* @__PURE__ */ jsxs("label", { className: "relative block min-w-0 px-1 pb-2", children: [
|
|
501
|
-
/* @__PURE__ */ jsx(Search, { className: "pointer-events-none absolute left-3 top-1/2 size-3.5 -translate-y-[calc(50%+0.25rem)] text-muted-foreground" }),
|
|
502
|
-
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Search sessions" }),
|
|
503
|
-
/* @__PURE__ */ jsx(
|
|
504
|
-
"input",
|
|
505
|
-
{
|
|
506
|
-
value: search,
|
|
507
|
-
onChange: handleSearch,
|
|
508
|
-
placeholder: "Search sessions...",
|
|
509
|
-
className: "h-8 w-full rounded-md border border-border bg-muted/40 pl-7 pr-2 text-xs outline-none focus:border-primary focus:bg-background"
|
|
510
|
-
}
|
|
511
|
-
)
|
|
512
|
-
] }),
|
|
513
|
-
/* @__PURE__ */ jsxs("div", { className: "flex gap-1 overflow-x-auto px-1 pb-2 text-[11px]", children: [
|
|
514
|
-
["all", "chat", "automated"].map((filter) => /* @__PURE__ */ jsx(
|
|
515
|
-
"button",
|
|
516
|
-
{
|
|
517
|
-
type: "button",
|
|
518
|
-
onClick: () => onActivityFilterChange(filter),
|
|
519
|
-
className: cn(
|
|
520
|
-
"rounded-full border px-2 py-1 capitalize",
|
|
521
|
-
activityFilter === filter ? "border-primary bg-primary/10 text-primary" : "border-border text-muted-foreground"
|
|
522
|
-
),
|
|
523
|
-
children: filter === "chat" ? "Chats" : filter === "automated" ? "Automations" : "All"
|
|
524
|
-
},
|
|
525
|
-
filter
|
|
526
|
-
)),
|
|
527
|
-
/* @__PURE__ */ jsxs(
|
|
528
|
-
"select",
|
|
529
|
-
{
|
|
530
|
-
"aria-label": "Filter by origin",
|
|
531
|
-
value: originFilter,
|
|
532
|
-
onChange: (event) => onOriginFilterChange(event.target.value),
|
|
533
|
-
className: "ml-auto rounded-full border border-border bg-background px-2 text-[11px] text-muted-foreground",
|
|
534
|
-
children: [
|
|
535
|
-
/* @__PURE__ */ jsx("option", { value: "all", children: "All origins" }),
|
|
536
|
-
origins.map((origin) => /* @__PURE__ */ jsx("option", { value: origin, children: originLabel(origin) }, origin))
|
|
537
|
-
]
|
|
538
|
-
}
|
|
539
|
-
)
|
|
540
|
-
] }),
|
|
541
|
-
/* @__PURE__ */ jsxs("div", { className: "max-h-[min(60vh,28rem)] overflow-y-auto px-0.5", children: [
|
|
542
|
-
isLoading ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 px-2 py-4 text-xs text-muted-foreground", children: [
|
|
543
|
-
/* @__PURE__ */ jsx(LoaderCircle, { className: "size-3.5 animate-spin" }),
|
|
544
|
-
" Loading sessions…"
|
|
545
|
-
] }) : visibleCount === 0 ? /* @__PURE__ */ jsx("p", { className: "px-2 py-4 text-xs text-muted-foreground", children: "No matching sessions." }) : grouped.map(({ group, items }) => /* @__PURE__ */ jsxs("div", { children: [
|
|
546
|
-
/* @__PURE__ */ jsx("h3", { className: "px-2 pb-1 pt-2 text-[10px] font-semibold uppercase tracking-[0.08em] text-muted-foreground/75", children: group }),
|
|
547
|
-
items.map((conversation) => {
|
|
548
|
-
const automated = isAutomatedConversation(conversation);
|
|
549
|
-
return /* @__PURE__ */ jsxs(
|
|
550
|
-
"div",
|
|
551
|
-
{
|
|
552
|
-
className: cn(
|
|
553
|
-
"group flex items-start gap-2 rounded-md px-2 py-2 hover:bg-accent",
|
|
554
|
-
conversation.threadId === activeThreadId && "bg-primary/10 text-primary"
|
|
555
|
-
),
|
|
556
|
-
onMouseEnter: () => handleRowEnter(conversation.threadId),
|
|
557
|
-
onMouseLeave: () => handleRowLeave(conversation.threadId),
|
|
558
|
-
children: [
|
|
559
|
-
/* @__PURE__ */ jsxs(
|
|
560
|
-
"button",
|
|
561
|
-
{
|
|
562
|
-
type: "button",
|
|
563
|
-
onClick: () => {
|
|
564
|
-
onSelect(conversation.threadId);
|
|
565
|
-
if (conversation.isUnread) {
|
|
566
|
-
onSetReadState(conversation.threadId, false);
|
|
567
|
-
}
|
|
568
|
-
},
|
|
569
|
-
className: "flex min-w-0 flex-1 items-start gap-2 text-left",
|
|
570
|
-
children: [
|
|
571
|
-
/* @__PURE__ */ jsx(
|
|
572
|
-
ConversationTypeIcon,
|
|
573
|
-
{
|
|
574
|
-
conversation,
|
|
575
|
-
automated
|
|
576
|
-
}
|
|
577
|
-
),
|
|
578
|
-
/* @__PURE__ */ jsxs("span", { className: "min-w-0 flex-1", children: [
|
|
579
|
-
/* @__PURE__ */ jsxs("span", { className: "flex items-start gap-1", children: [
|
|
580
|
-
/* @__PURE__ */ jsx("span", { className: "line-clamp-2 flex-1 text-xs font-medium leading-snug", children: conversationDisplayTitle(conversation) }),
|
|
581
|
-
conversation.isUnread ? /* @__PURE__ */ jsx(
|
|
582
|
-
"span",
|
|
583
|
-
{
|
|
584
|
-
"aria-label": "Unread",
|
|
585
|
-
className: "mt-1 size-1.5 shrink-0 rounded-full bg-primary"
|
|
586
|
-
}
|
|
587
|
-
) : null
|
|
588
|
-
] }),
|
|
589
|
-
/* @__PURE__ */ jsxs("span", { className: "mt-0.5 flex items-center gap-1.5 text-[10px] text-muted-foreground", children: [
|
|
590
|
-
/* @__PURE__ */ jsx("span", { children: relativeTime(conversation.updatedAt) }),
|
|
591
|
-
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: "·" }),
|
|
592
|
-
/* @__PURE__ */ jsx("span", { className: "truncate", children: originLabel(originKey(conversation)) })
|
|
593
|
-
] })
|
|
594
|
-
] })
|
|
595
|
-
]
|
|
596
|
-
}
|
|
597
|
-
),
|
|
598
|
-
/* @__PURE__ */ jsx(
|
|
599
|
-
"button",
|
|
600
|
-
{
|
|
601
|
-
type: "button",
|
|
602
|
-
"aria-label": `Archive ${conversationDisplayTitle(conversation)}`,
|
|
603
|
-
title: "Archive conversation",
|
|
604
|
-
onClick: () => onArchive(conversation.threadId),
|
|
605
|
-
className: "invisible rounded p-1 text-muted-foreground hover:bg-background hover:text-foreground group-hover:visible focus:visible",
|
|
606
|
-
children: /* @__PURE__ */ jsx(Archive, { className: "size-3.5" })
|
|
607
|
-
}
|
|
608
|
-
)
|
|
609
|
-
]
|
|
610
|
-
},
|
|
611
|
-
conversation.threadId
|
|
612
|
-
);
|
|
613
|
-
})
|
|
614
|
-
] }, group)),
|
|
615
|
-
hasNextPage ? /* @__PURE__ */ jsx(
|
|
616
|
-
"button",
|
|
617
|
-
{
|
|
618
|
-
type: "button",
|
|
619
|
-
disabled: isFetchingNextPage,
|
|
620
|
-
onClick: onLoadMore,
|
|
621
|
-
className: "mt-1 w-full rounded-lg py-2 text-xs text-muted-foreground hover:bg-accent disabled:opacity-50",
|
|
622
|
-
children: isFetchingNextPage ? "Loading…" : "Load older sessions"
|
|
623
|
-
}
|
|
624
|
-
) : visibleCount > 0 ? /* @__PURE__ */ jsx("p", { className: "py-2 text-center text-[10px] text-muted-foreground/70", children: "No more sessions" }) : null
|
|
625
|
-
] })
|
|
626
|
-
]
|
|
627
|
-
}
|
|
628
|
-
);
|
|
629
|
-
}
|
|
630
|
-
function makeMentionUrl(attrs) {
|
|
631
|
-
if (attrs.type === "tool" || attrs.type === "toolkit") {
|
|
632
|
-
return `mention://${attrs.type}?name=${encodeURIComponent(attrs.id)}&description=${encodeURIComponent(attrs.description ?? "")}`;
|
|
633
|
-
}
|
|
634
|
-
if (attrs.type === "asset") {
|
|
635
|
-
const params2 = new URLSearchParams({ asset_ids: attrs.id });
|
|
636
|
-
if (attrs.assetType) params2.set("assetType", attrs.assetType);
|
|
637
|
-
return `/dashboard/spaces?${params2.toString()}`;
|
|
638
|
-
}
|
|
639
|
-
if (attrs.type === "tab") {
|
|
640
|
-
const params2 = new URLSearchParams({
|
|
641
|
-
tab_id: attrs.id,
|
|
642
|
-
url: attrs.url ?? "",
|
|
643
|
-
title: attrs.title ?? attrs.name
|
|
644
|
-
});
|
|
645
|
-
return `mention://webpage?${params2.toString()}`;
|
|
646
|
-
}
|
|
647
|
-
const params = new URLSearchParams();
|
|
648
|
-
params.set("id", attrs.id);
|
|
649
|
-
if (attrs.assetType) params.set("assetType", attrs.assetType);
|
|
650
|
-
if (attrs.thumbnailUrl) params.set("thumb", attrs.thumbnailUrl);
|
|
651
|
-
return `mention://${encodeURIComponent(attrs.type)}?${params.toString()}`;
|
|
652
|
-
}
|
|
653
|
-
function parseMentionAnchorAttributes({
|
|
654
|
-
href,
|
|
655
|
-
textContent
|
|
656
|
-
}) {
|
|
657
|
-
const url = new URL(href);
|
|
658
|
-
const isWebpage = url.hostname === "webpage";
|
|
659
|
-
return {
|
|
660
|
-
type: isWebpage ? "tab" : url.hostname || "tool",
|
|
661
|
-
name: (textContent == null ? void 0 : textContent.replace(/^@/, "")) || "",
|
|
662
|
-
id: isWebpage ? url.searchParams.get("tab_id") || "" : url.searchParams.get("name") || url.searchParams.get("id") || "",
|
|
663
|
-
title: url.searchParams.get("title") || "",
|
|
664
|
-
url: url.searchParams.get("url") || "",
|
|
665
|
-
description: url.searchParams.get("description") || "",
|
|
666
|
-
thumbnailUrl: url.searchParams.get("thumb") || "",
|
|
667
|
-
fallbackIcon: "",
|
|
668
|
-
assetType: url.searchParams.get("assetType") || ""
|
|
669
|
-
};
|
|
670
|
-
}
|
|
671
|
-
const MentionExtension = Node.create({
|
|
672
|
-
name: "mention",
|
|
673
|
-
group: "inline",
|
|
674
|
-
inline: true,
|
|
675
|
-
selectable: false,
|
|
676
|
-
atom: true,
|
|
677
|
-
addAttributes() {
|
|
678
|
-
return {
|
|
679
|
-
type: { default: "tool" },
|
|
680
|
-
name: { default: "" },
|
|
681
|
-
id: { default: "" },
|
|
682
|
-
title: { default: "" },
|
|
683
|
-
url: { default: "" },
|
|
684
|
-
description: { default: "" },
|
|
685
|
-
thumbnailUrl: { default: "" },
|
|
686
|
-
fallbackIcon: { default: "" },
|
|
687
|
-
assetType: { default: "" }
|
|
688
|
-
};
|
|
689
|
-
},
|
|
690
|
-
parseHTML() {
|
|
691
|
-
return [
|
|
692
|
-
{
|
|
693
|
-
tag: "span[data-mention]",
|
|
694
|
-
getAttrs: (dom) => {
|
|
695
|
-
var _a;
|
|
696
|
-
const el = dom;
|
|
697
|
-
return {
|
|
698
|
-
type: el.getAttribute("data-type") || "tool",
|
|
699
|
-
name: el.getAttribute("data-name") || ((_a = el.textContent) == null ? void 0 : _a.replace(/^@/, "")) || "",
|
|
700
|
-
id: el.getAttribute("data-id") || "",
|
|
701
|
-
title: el.getAttribute("data-title") || "",
|
|
702
|
-
url: el.getAttribute("data-url") || "",
|
|
703
|
-
description: el.getAttribute("data-description") || "",
|
|
704
|
-
thumbnailUrl: el.getAttribute("data-thumbnail-url") || "",
|
|
705
|
-
fallbackIcon: el.getAttribute("data-fallback-icon") || "",
|
|
706
|
-
assetType: el.getAttribute("data-asset-type") || ""
|
|
707
|
-
};
|
|
708
|
-
}
|
|
709
|
-
},
|
|
710
|
-
{
|
|
711
|
-
tag: "a[href^='mention://']",
|
|
712
|
-
getAttrs: (dom) => {
|
|
713
|
-
const el = dom;
|
|
714
|
-
return parseMentionAnchorAttributes({
|
|
715
|
-
href: el.href,
|
|
716
|
-
textContent: el.textContent
|
|
717
|
-
});
|
|
718
|
-
}
|
|
719
|
-
}
|
|
720
|
-
];
|
|
721
|
-
},
|
|
722
|
-
renderHTML({ node, HTMLAttributes }) {
|
|
723
|
-
const thumbnailUrl = node.attrs.thumbnailUrl;
|
|
724
|
-
const children = [];
|
|
725
|
-
if (thumbnailUrl) {
|
|
726
|
-
children.push([
|
|
727
|
-
"img",
|
|
728
|
-
{
|
|
729
|
-
src: thumbnailUrl,
|
|
730
|
-
alt: "",
|
|
731
|
-
class: "mention-chip-icon",
|
|
732
|
-
draggable: "false"
|
|
733
|
-
}
|
|
734
|
-
]);
|
|
735
|
-
}
|
|
736
|
-
children.push(["span", { class: "mention-chip-text" }, node.attrs.name]);
|
|
737
|
-
return [
|
|
738
|
-
"span",
|
|
739
|
-
mergeAttributes(HTMLAttributes, {
|
|
740
|
-
"data-mention": "",
|
|
741
|
-
"data-type": node.attrs.type,
|
|
742
|
-
"data-name": node.attrs.name,
|
|
743
|
-
"data-id": node.attrs.id,
|
|
744
|
-
"data-title": node.attrs.title || "",
|
|
745
|
-
"data-url": node.attrs.url || "",
|
|
746
|
-
"data-thumbnail-url": node.attrs.thumbnailUrl || "",
|
|
747
|
-
"data-asset-type": node.attrs.assetType || "",
|
|
748
|
-
class: "mention-chip"
|
|
749
|
-
}),
|
|
750
|
-
...children
|
|
751
|
-
];
|
|
752
|
-
},
|
|
753
|
-
renderText({ node }) {
|
|
754
|
-
const url = makeMentionUrl({
|
|
755
|
-
id: node.attrs.id,
|
|
756
|
-
type: node.attrs.type,
|
|
757
|
-
name: node.attrs.name,
|
|
758
|
-
title: node.attrs.title,
|
|
759
|
-
url: node.attrs.url,
|
|
760
|
-
description: node.attrs.description,
|
|
761
|
-
thumbnailUrl: node.attrs.thumbnailUrl,
|
|
762
|
-
assetType: node.attrs.assetType
|
|
763
|
-
});
|
|
764
|
-
return `[@${node.attrs.name}](${url})`;
|
|
765
|
-
}
|
|
766
|
-
});
|
|
767
|
-
const MentionSuggestionsExtension = Extension.create({
|
|
768
|
-
name: "mentionSuggestions",
|
|
769
|
-
addOptions() {
|
|
770
|
-
return {
|
|
771
|
-
store: null,
|
|
772
|
-
callbacks: null
|
|
773
|
-
};
|
|
774
|
-
},
|
|
775
|
-
addProseMirrorPlugins() {
|
|
776
|
-
const callbacks = this.options.callbacks;
|
|
777
|
-
return [
|
|
778
|
-
Suggestion({
|
|
779
|
-
editor: this.editor,
|
|
780
|
-
char: "@",
|
|
781
|
-
allowSpaces: false,
|
|
782
|
-
startOfLine: false,
|
|
783
|
-
allowedPrefixes: [" ", " ", "\n", "\r", "(", "[", "{", '"', "'", " "],
|
|
784
|
-
items: () => [],
|
|
785
|
-
command: ({ editor, range, props }) => {
|
|
786
|
-
var _a, _b, _c;
|
|
787
|
-
const item = props;
|
|
788
|
-
if (item.navigatesToScope || item.isNavigationOnly) return;
|
|
789
|
-
editor.chain().focus().deleteRange(range).insertContent({
|
|
790
|
-
type: "mention",
|
|
791
|
-
attrs: {
|
|
792
|
-
type: item.type,
|
|
793
|
-
name: item.name,
|
|
794
|
-
id: item.type === "tab" && typeof ((_a = item.extra) == null ? void 0 : _a.tabId) === "number" ? String(item.extra.tabId) : item.id,
|
|
795
|
-
title: item.type === "tab" && typeof ((_b = item.extra) == null ? void 0 : _b.title) === "string" ? item.extra.title : item.name,
|
|
796
|
-
url: item.url ?? "",
|
|
797
|
-
description: item.description ?? "",
|
|
798
|
-
thumbnailUrl: item.thumbnailUrl ?? "",
|
|
799
|
-
fallbackIcon: item.fallbackIcon ?? "",
|
|
800
|
-
assetType: typeof ((_c = item.extra) == null ? void 0 : _c.athenaOriginalType) === "string" ? item.extra.athenaOriginalType : ""
|
|
801
|
-
}
|
|
802
|
-
}).insertContent(" ").run();
|
|
803
|
-
},
|
|
804
|
-
render: () => ({
|
|
805
|
-
onStart: (props) => {
|
|
806
|
-
callbacks == null ? void 0 : callbacks.onStart({
|
|
807
|
-
query: props.query,
|
|
808
|
-
command: (item) => props.command(item),
|
|
809
|
-
clientRect: props.clientRect ?? null,
|
|
810
|
-
editor: props.editor
|
|
811
|
-
});
|
|
812
|
-
},
|
|
813
|
-
onUpdate: (props) => {
|
|
814
|
-
callbacks == null ? void 0 : callbacks.onUpdate({
|
|
815
|
-
query: props.query,
|
|
816
|
-
command: (item) => props.command(item),
|
|
817
|
-
clientRect: props.clientRect ?? null,
|
|
818
|
-
editor: props.editor
|
|
819
|
-
});
|
|
820
|
-
},
|
|
821
|
-
onKeyDown: ({ event }) => {
|
|
822
|
-
return (callbacks == null ? void 0 : callbacks.onKeyDown(event)) ?? false;
|
|
823
|
-
},
|
|
824
|
-
onExit: () => {
|
|
825
|
-
callbacks == null ? void 0 : callbacks.onExit();
|
|
826
|
-
}
|
|
827
|
-
})
|
|
828
|
-
})
|
|
829
|
-
];
|
|
830
|
-
}
|
|
831
|
-
});
|
|
832
|
-
const MentionSuggestionPopup = ({ clientRect, children }) => {
|
|
833
|
-
const { refs, floatingStyles } = useFloating({
|
|
834
|
-
placement: "bottom-start",
|
|
835
|
-
middleware: [offset(10), flip(), shift({ padding: 8 })],
|
|
836
|
-
whileElementsMounted: autoUpdate
|
|
837
|
-
});
|
|
838
|
-
useEffect(() => {
|
|
839
|
-
if (clientRect) {
|
|
840
|
-
refs.setPositionReference({
|
|
841
|
-
getBoundingClientRect: () => clientRect() ?? new DOMRect()
|
|
842
|
-
});
|
|
843
|
-
}
|
|
844
|
-
}, [clientRect, refs]);
|
|
845
|
-
return /* @__PURE__ */ jsx(FloatingPortal, { children: /* @__PURE__ */ jsx(
|
|
846
|
-
"div",
|
|
847
|
-
{
|
|
848
|
-
ref: refs.setFloating,
|
|
849
|
-
style: floatingStyles,
|
|
850
|
-
className: "z-[9999]",
|
|
851
|
-
onMouseDown: (e2) => e2.preventDefault(),
|
|
852
|
-
children
|
|
853
|
-
}
|
|
854
|
-
) });
|
|
855
|
-
};
|
|
856
|
-
const MAX_ERROR_RETRIES = 3;
|
|
857
|
-
function selectItems(store, scope, query, _targetCount, parentScope) {
|
|
858
|
-
const state = store.state;
|
|
859
|
-
const scopeId = typeof scope === "string" ? scope : scope.id;
|
|
860
|
-
const parentScopeId = parentScope ? typeof parentScope === "string" ? parentScope : parentScope.id : void 0;
|
|
861
|
-
const items = getFilteredItems(state.cache, scopeId, query);
|
|
862
|
-
let isFetching = false;
|
|
863
|
-
let hasMore = true;
|
|
864
|
-
try {
|
|
865
|
-
const fetchState = getFetchState(state.registry, scopeId, query, parentScopeId);
|
|
866
|
-
isFetching = fetchState.isFetching;
|
|
867
|
-
hasMore = fetchState.hasNextPage;
|
|
868
|
-
} catch {
|
|
869
|
-
hasMore = false;
|
|
870
|
-
}
|
|
871
|
-
return { items, isFetching, hasMore };
|
|
872
|
-
}
|
|
873
|
-
function triggerFetchIfNeeded(store, scope, query, _targetCount, parentScope) {
|
|
874
|
-
const scopeId = typeof scope === "string" ? scope : scope.id;
|
|
875
|
-
const parentScopeId = parentScope ? typeof parentScope === "string" ? parentScope : parentScope.id : void 0;
|
|
876
|
-
const state = store.state;
|
|
877
|
-
let entry;
|
|
878
|
-
try {
|
|
879
|
-
entry = getEntry(state.registry, scopeId, parentScopeId);
|
|
880
|
-
} catch {
|
|
881
|
-
return;
|
|
882
|
-
}
|
|
883
|
-
const fetchState = getFetchState(state.registry, scopeId, query, parentScopeId);
|
|
884
|
-
if (fetchState.isFetching || !fetchState.hasNextPage || fetchState.error) {
|
|
885
|
-
return;
|
|
886
|
-
}
|
|
887
|
-
const meta = fetchState.meta || {};
|
|
888
|
-
if ((meta.fetchAttempts || 0) >= 10) return;
|
|
889
|
-
updateFetchState(state.registry, scopeId, query, { isFetching: true }, parentScopeId);
|
|
890
|
-
store.setState((prev) => ({ ...prev }));
|
|
891
|
-
const sourceFn = entry.sourceFn;
|
|
892
|
-
const sourceConfig = entry.sourceConfig;
|
|
893
|
-
sourceFn({
|
|
894
|
-
scope: scopeId,
|
|
895
|
-
query,
|
|
896
|
-
fetchState,
|
|
897
|
-
sourceConfig
|
|
898
|
-
}).then((result) => {
|
|
899
|
-
var _a, _b;
|
|
900
|
-
const currentState = store.state;
|
|
901
|
-
addItems(currentState.cache, result.items, scopeId);
|
|
902
|
-
if (result.sources) {
|
|
903
|
-
for (const src of result.sources) {
|
|
904
|
-
try {
|
|
905
|
-
getEntry(currentState.registry, src.scope);
|
|
906
|
-
} catch {
|
|
907
|
-
registerSource(
|
|
908
|
-
currentState.registry,
|
|
909
|
-
src.scope,
|
|
910
|
-
src.sourceFn,
|
|
911
|
-
src.sourceConfig,
|
|
912
|
-
src.isFlat
|
|
913
|
-
);
|
|
914
|
-
}
|
|
915
|
-
}
|
|
916
|
-
}
|
|
917
|
-
if (result.bindings) {
|
|
918
|
-
for (const binding of result.bindings) {
|
|
919
|
-
bindScopes(currentState.registry, binding.browseScope, binding.searchScope);
|
|
920
|
-
}
|
|
921
|
-
}
|
|
922
|
-
const currentMeta = fetchState.meta || {};
|
|
923
|
-
const consumed = ((_a = result.pagination) == null ? void 0 : _a.consumedCount) ?? result.items.length;
|
|
924
|
-
const newValidated = (currentMeta.validatedCount || 0) + consumed;
|
|
925
|
-
updateFetchState(
|
|
926
|
-
currentState.registry,
|
|
927
|
-
scopeId,
|
|
928
|
-
query,
|
|
929
|
-
{
|
|
930
|
-
isFetching: false,
|
|
931
|
-
hasNextPage: ((_b = result.pagination) == null ? void 0 : _b.hasMore) ?? false,
|
|
932
|
-
error: null,
|
|
933
|
-
meta: {
|
|
934
|
-
...currentMeta,
|
|
935
|
-
...result.meta,
|
|
936
|
-
validatedCount: newValidated,
|
|
937
|
-
fetchAttempts: (currentMeta.fetchAttempts || 0) + 1,
|
|
938
|
-
errorAttempts: 0
|
|
939
|
-
}
|
|
940
|
-
},
|
|
941
|
-
parentScopeId
|
|
942
|
-
);
|
|
943
|
-
store.setState((prev) => ({ ...prev }));
|
|
944
|
-
}).catch((error) => {
|
|
945
|
-
const currentState = store.state;
|
|
946
|
-
const currentMeta = fetchState.meta || {};
|
|
947
|
-
const errorAttempts = (currentMeta.errorAttempts || 0) + 1;
|
|
948
|
-
const retriable = errorAttempts < MAX_ERROR_RETRIES;
|
|
949
|
-
if (retriable) {
|
|
950
|
-
athenaDiagnostics.emit("mentions.fetch.error", {
|
|
951
|
-
level: "warn",
|
|
952
|
-
data: {
|
|
953
|
-
scopeId,
|
|
954
|
-
attempt: errorAttempts,
|
|
955
|
-
retriable,
|
|
956
|
-
error: error instanceof Error ? error.message : String(error)
|
|
957
|
-
}
|
|
958
|
-
});
|
|
959
|
-
} else {
|
|
960
|
-
athenaDiagnostics.error(
|
|
961
|
-
"mentions.fetch.error",
|
|
962
|
-
error,
|
|
963
|
-
{ code: "mentions_fetch_failed", message: `Mention suggestions failed for ${scopeId}` },
|
|
964
|
-
{ scopeId, attempt: errorAttempts, retriable }
|
|
965
|
-
);
|
|
966
|
-
}
|
|
967
|
-
updateFetchState(
|
|
968
|
-
currentState.registry,
|
|
969
|
-
scopeId,
|
|
970
|
-
query,
|
|
971
|
-
{
|
|
972
|
-
isFetching: false,
|
|
973
|
-
hasNextPage: retriable,
|
|
974
|
-
error: retriable ? null : error instanceof Error ? error : new Error(String(error)),
|
|
975
|
-
meta: { ...currentMeta, errorAttempts }
|
|
976
|
-
},
|
|
977
|
-
parentScopeId
|
|
978
|
-
);
|
|
979
|
-
store.setState((prev) => ({ ...prev }));
|
|
980
|
-
});
|
|
981
|
-
}
|
|
982
|
-
function useMenuItems(store, options) {
|
|
983
|
-
const { scope, query = "", minItems = 50, parentScope } = options;
|
|
984
|
-
const [targetCount, setTargetCount] = useState(minItems);
|
|
985
|
-
useEffect(() => {
|
|
986
|
-
setTargetCount(minItems);
|
|
987
|
-
}, [scope, query, minItems]);
|
|
988
|
-
const snapshot = useStore(
|
|
989
|
-
store,
|
|
990
|
-
() => selectItems(store, scope, query, targetCount, parentScope)
|
|
991
|
-
);
|
|
992
|
-
useEffect(() => {
|
|
993
|
-
if (snapshot.items.length < targetCount && snapshot.hasMore && !snapshot.isFetching) {
|
|
994
|
-
triggerFetchIfNeeded(store, scope, query, targetCount, parentScope);
|
|
995
|
-
}
|
|
996
|
-
}, [
|
|
997
|
-
store,
|
|
998
|
-
scope,
|
|
999
|
-
query,
|
|
1000
|
-
targetCount,
|
|
1001
|
-
parentScope,
|
|
1002
|
-
snapshot.items.length,
|
|
1003
|
-
snapshot.hasMore,
|
|
1004
|
-
snapshot.isFetching
|
|
1005
|
-
]);
|
|
1006
|
-
const loadMore = () => {
|
|
1007
|
-
if (snapshot.hasMore && !snapshot.isFetching) {
|
|
1008
|
-
setTargetCount((prev) => prev + 50);
|
|
1009
|
-
}
|
|
1010
|
-
};
|
|
1011
|
-
return {
|
|
1012
|
-
items: snapshot.items,
|
|
1013
|
-
isFetching: snapshot.isFetching,
|
|
1014
|
-
hasMore: snapshot.hasMore,
|
|
1015
|
-
loadMore,
|
|
1016
|
-
targetCount
|
|
1017
|
-
// Expose for debugging
|
|
1018
|
-
};
|
|
1019
|
-
}
|
|
1020
|
-
const KNOWN_SCOPE_NAMES = {
|
|
1021
|
-
root: "All",
|
|
1022
|
-
global_search: "Search",
|
|
1023
|
-
// Legacy order: my_spaces, favorites, assets, folders, tools, toolkits, team, workspace, drives
|
|
1024
|
-
my_spaces: "My Spaces",
|
|
1025
|
-
favorites: "Favorites",
|
|
1026
|
-
athena_assets: "Assets",
|
|
1027
|
-
athena_folders: "Folders",
|
|
1028
|
-
tools: "Tools",
|
|
1029
|
-
toolkits: "Toolkits",
|
|
1030
|
-
team: "Team",
|
|
1031
|
-
workspace: "Workspace",
|
|
1032
|
-
drive_catalogs: "Drives",
|
|
1033
|
-
athena_projects: "Projects",
|
|
1034
|
-
athena_browse_profiles: "Browse Profiles",
|
|
1035
|
-
// Additional scopes
|
|
1036
|
-
asset_search: "Search"
|
|
1037
|
-
};
|
|
1038
|
-
function getScopeName(scope, store) {
|
|
1039
|
-
const knownName = KNOWN_SCOPE_NAMES[scope];
|
|
1040
|
-
if (knownName) {
|
|
1041
|
-
return knownName;
|
|
1042
|
-
}
|
|
1043
|
-
const { cache } = store.state;
|
|
1044
|
-
const allItems = Object.values(cache.items);
|
|
1045
|
-
const item = allItems.find((item2) => item2.navigatesToScope === scope);
|
|
1046
|
-
if (item) {
|
|
1047
|
-
return item.name;
|
|
1048
|
-
}
|
|
1049
|
-
return scope.split("_").map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join(" ");
|
|
1050
|
-
}
|
|
1051
|
-
const MentionMenuSection = {
|
|
1052
|
-
CURRENT_WEBPAGE: "current-webpage",
|
|
1053
|
-
OTHER_WEBPAGES: "other-webpages",
|
|
1054
|
-
LIBRARY: "library"
|
|
1055
|
-
};
|
|
1056
|
-
const ICON_MAP = {
|
|
1057
|
-
// General
|
|
1058
|
-
file: File$1,
|
|
1059
|
-
"file-text": FileText,
|
|
1060
|
-
"file-code": FileCode,
|
|
1061
|
-
folder: Folder,
|
|
1062
|
-
"folder-kanban": FolderKanban,
|
|
1063
|
-
globe: Globe,
|
|
1064
|
-
search: Search,
|
|
1065
|
-
star: Star,
|
|
1066
|
-
users: Users,
|
|
1067
|
-
user: User,
|
|
1068
|
-
wrench: Wrench,
|
|
1069
|
-
package: Package,
|
|
1070
|
-
"building-2": Building2,
|
|
1071
|
-
"hard-drive": HardDrive,
|
|
1072
|
-
"layout-grid": LayoutGrid,
|
|
1073
|
-
zap: Zap,
|
|
1074
|
-
eye: Eye,
|
|
1075
|
-
// Chrome tools
|
|
1076
|
-
camera: Camera,
|
|
1077
|
-
keyboard: Keyboard,
|
|
1078
|
-
code: Code,
|
|
1079
|
-
monitor: Monitor,
|
|
1080
|
-
// Asset types
|
|
1081
|
-
image: Image,
|
|
1082
|
-
video: Video,
|
|
1083
|
-
headphones: Headphones,
|
|
1084
|
-
mic: Mic,
|
|
1085
|
-
mail: Mail,
|
|
1086
|
-
calendar: Calendar,
|
|
1087
|
-
phone: Phone,
|
|
1088
|
-
database: Database,
|
|
1089
|
-
table: Table,
|
|
1090
|
-
sheet: Sheet,
|
|
1091
|
-
palette: Palette,
|
|
1092
|
-
"pen-tool": PenTool,
|
|
1093
|
-
layout: PanelsTopLeft,
|
|
1094
|
-
"layout-dashboard": LayoutDashboard,
|
|
1095
|
-
library: Library,
|
|
1096
|
-
"book-open": BookOpen,
|
|
1097
|
-
sparkles: Sparkles,
|
|
1098
|
-
"check-square": SquareCheckBig,
|
|
1099
|
-
key: Key,
|
|
1100
|
-
smartphone: Smartphone,
|
|
1101
|
-
cloud: Cloud,
|
|
1102
|
-
workflow: Workflow,
|
|
1103
|
-
presentation: FileText
|
|
1104
|
-
// Fallback for presentation type
|
|
1105
|
-
};
|
|
1106
|
-
function toKebabIconName(name) {
|
|
1107
|
-
return name.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1-$2").toLowerCase();
|
|
1108
|
-
}
|
|
1109
|
-
function resolveIcon(name) {
|
|
1110
|
-
return ICON_MAP[name] ?? ICON_MAP[toKebabIconName(name)];
|
|
1111
|
-
}
|
|
1112
|
-
const ICON_NAME_PATTERN = /^[A-Za-z][A-Za-z0-9-]*$/;
|
|
1113
|
-
function MentionIcon({
|
|
1114
|
-
fallbackIcon,
|
|
1115
|
-
thumbnailUrl,
|
|
1116
|
-
alt,
|
|
1117
|
-
className = "w-4 h-4 flex-shrink-0"
|
|
1118
|
-
}) {
|
|
1119
|
-
if (thumbnailUrl) {
|
|
1120
|
-
return /* @__PURE__ */ jsx("img", { src: thumbnailUrl, alt: alt ?? "", className });
|
|
1121
|
-
}
|
|
1122
|
-
const Icon = fallbackIcon ? resolveIcon(fallbackIcon) : void 0;
|
|
1123
|
-
if (Icon) return /* @__PURE__ */ jsx(Icon, { className });
|
|
1124
|
-
if (fallbackIcon && !ICON_NAME_PATTERN.test(fallbackIcon)) {
|
|
1125
|
-
return /* @__PURE__ */ jsx("span", { className: "text-sm flex-shrink-0", children: fallbackIcon });
|
|
1126
|
-
}
|
|
1127
|
-
return /* @__PURE__ */ jsx(File$1, { className });
|
|
1128
|
-
}
|
|
1129
|
-
function MenuItemRow({
|
|
1130
|
-
item,
|
|
1131
|
-
isSelected,
|
|
1132
|
-
onMouseEnter,
|
|
1133
|
-
onClick,
|
|
1134
|
-
showArrow
|
|
1135
|
-
}) {
|
|
1136
|
-
var _a, _b, _c, _d;
|
|
1137
|
-
const hasTwoLines = item.type === "tool" && item.description || item.type === "user" && item.email || item.type === "workspace_item" && item.description || item.type === "tab" && item.description;
|
|
1138
|
-
return /* @__PURE__ */ jsxs(
|
|
1139
|
-
"div",
|
|
1140
|
-
{
|
|
1141
|
-
role: "button",
|
|
1142
|
-
tabIndex: -1,
|
|
1143
|
-
onClick,
|
|
1144
|
-
onMouseEnter,
|
|
1145
|
-
className: cn(
|
|
1146
|
-
"mention-item flex items-center justify-between gap-2 px-2 py-1.5 rounded cursor-pointer transition-colors",
|
|
1147
|
-
"hover:bg-gray-100",
|
|
1148
|
-
item.menuSection === MentionMenuSection.CURRENT_WEBPAGE && !isSelected && "bg-sky-50/70",
|
|
1149
|
-
isSelected && "bg-gray-100 is-selected"
|
|
1150
|
-
),
|
|
1151
|
-
children: [
|
|
1152
|
-
/* @__PURE__ */ jsx(
|
|
1153
|
-
"span",
|
|
1154
|
-
{
|
|
1155
|
-
className: `flex items-center flex-shrink-0 ${hasTwoLines ? "self-start mt-0.5" : ""}`,
|
|
1156
|
-
children: /* @__PURE__ */ jsx(
|
|
1157
|
-
MentionIcon,
|
|
1158
|
-
{
|
|
1159
|
-
fallbackIcon: item.fallbackIcon,
|
|
1160
|
-
thumbnailUrl: item.thumbnailUrl,
|
|
1161
|
-
alt: item.name
|
|
1162
|
-
}
|
|
1163
|
-
)
|
|
1164
|
-
}
|
|
1165
|
-
),
|
|
1166
|
-
hasTwoLines ? /* @__PURE__ */ jsxs("div", { className: "flex-1 flex flex-col gap-0 min-w-0 -mt-0.5", children: [
|
|
1167
|
-
/* @__PURE__ */ jsxs("span", { className: "text-sm leading-tight flex items-center gap-1.5", children: [
|
|
1168
|
-
item.name,
|
|
1169
|
-
((_a = item.extra) == null ? void 0 : _a.isAdminOnly) && /* @__PURE__ */ jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-purple-400 flex-shrink-0" }),
|
|
1170
|
-
((_b = item.extra) == null ? void 0 : _b.isExperimental) && /* @__PURE__ */ jsx("span", { className: "rounded-full bg-blue-50 px-1.5 py-0.5 text-[9px] font-medium text-blue-700", children: "Experimental" })
|
|
1171
|
-
] }),
|
|
1172
|
-
/* @__PURE__ */ jsx("span", { className: "text-xs text-gray-500 leading-tight mt-0.5 truncate", children: item.type === "user" ? item.email : item.description })
|
|
1173
|
-
] }) : /* @__PURE__ */ jsxs("span", { className: "flex-1 text-sm truncate min-w-0 flex items-center gap-1.5", children: [
|
|
1174
|
-
item.name,
|
|
1175
|
-
((_c = item.extra) == null ? void 0 : _c.isAdminOnly) && /* @__PURE__ */ jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-purple-400 flex-shrink-0" }),
|
|
1176
|
-
((_d = item.extra) == null ? void 0 : _d.isExperimental) && /* @__PURE__ */ jsx("span", { className: "rounded-full bg-blue-50 px-1.5 py-0.5 text-[9px] font-medium text-blue-700", children: "Experimental" })
|
|
1177
|
-
] }),
|
|
1178
|
-
showArrow && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-1 flex-shrink-0", children: /* @__PURE__ */ jsx("span", { className: "text-gray-400 text-sm px-1 rounded transition-all cursor-pointer hover:text-gray-600 hover:bg-gray-200", children: "→" }) })
|
|
1179
|
-
]
|
|
1180
|
-
}
|
|
1181
|
-
);
|
|
1182
|
-
}
|
|
1183
|
-
function MenuSkeleton() {
|
|
1184
|
-
return /* @__PURE__ */ jsx("div", { className: "px-1 py-1", children: [1, 2, 3, 4].map((i) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 px-2 py-1.5 rounded animate-pulse", children: [
|
|
1185
|
-
/* @__PURE__ */ jsx("div", { className: "w-4 h-4 bg-gray-200 rounded flex-shrink-0" }),
|
|
1186
|
-
/* @__PURE__ */ jsx("div", { className: "h-3.5 bg-gray-200 rounded flex-1", style: { maxWidth: `${50 + i * 10}%` } })
|
|
1187
|
-
] }, i)) });
|
|
1188
|
-
}
|
|
1189
|
-
function MenuList({
|
|
1190
|
-
items,
|
|
1191
|
-
selectedIndex,
|
|
1192
|
-
isLoading,
|
|
1193
|
-
hasMore,
|
|
1194
|
-
onSelect,
|
|
1195
|
-
onMouseEnter,
|
|
1196
|
-
onLoadMore
|
|
1197
|
-
}) {
|
|
1198
|
-
const selectedRef = useRef(null);
|
|
1199
|
-
useEffect(() => {
|
|
1200
|
-
var _a;
|
|
1201
|
-
(_a = selectedRef.current) == null ? void 0 : _a.scrollIntoView({ block: "nearest" });
|
|
1202
|
-
}, [selectedIndex]);
|
|
1203
|
-
if (isLoading && items.length === 0) return /* @__PURE__ */ jsx(MenuSkeleton, {});
|
|
1204
|
-
if (items.length === 0) {
|
|
1205
|
-
return /* @__PURE__ */ jsx("div", { className: "px-1 py-1", children: /* @__PURE__ */ jsxs("div", { className: "px-2 py-9 text-center text-sm text-gray-500", children: [
|
|
1206
|
-
/* @__PURE__ */ jsx("div", { className: "mb-1", children: "No results found" }),
|
|
1207
|
-
/* @__PURE__ */ jsx("div", { className: "text-xs text-gray-400", children: "Try a different search or go back" })
|
|
1208
|
-
] }) });
|
|
1209
|
-
}
|
|
1210
|
-
return /* @__PURE__ */ jsxs("div", { className: "px-1 py-1", children: [
|
|
1211
|
-
items.map((item, index) => {
|
|
1212
|
-
var _a;
|
|
1213
|
-
const previousSection = (_a = items[index - 1]) == null ? void 0 : _a.menuSection;
|
|
1214
|
-
const startsOtherWebpages = item.menuSection === MentionMenuSection.OTHER_WEBPAGES && previousSection !== MentionMenuSection.OTHER_WEBPAGES;
|
|
1215
|
-
const startsLibrary = item.menuSection === MentionMenuSection.LIBRARY && (previousSection === MentionMenuSection.CURRENT_WEBPAGE || previousSection === MentionMenuSection.OTHER_WEBPAGES);
|
|
1216
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1217
|
-
startsOtherWebpages && /* @__PURE__ */ jsx("div", { className: "px-2 pb-1 pt-2 text-[11px] font-medium uppercase tracking-wide text-gray-400", children: "Other webpages in this group" }),
|
|
1218
|
-
startsLibrary && /* @__PURE__ */ jsx("div", { className: "mx-2 my-1 border-t border-gray-100" }),
|
|
1219
|
-
/* @__PURE__ */ jsx("div", { ref: index === selectedIndex ? selectedRef : void 0, children: /* @__PURE__ */ jsx(
|
|
1220
|
-
MenuItemRow,
|
|
1221
|
-
{
|
|
1222
|
-
item,
|
|
1223
|
-
isSelected: index === selectedIndex,
|
|
1224
|
-
onMouseEnter: () => onMouseEnter(index),
|
|
1225
|
-
onClick: () => onSelect(item),
|
|
1226
|
-
showArrow: !!item.navigatesToScope
|
|
1227
|
-
}
|
|
1228
|
-
) })
|
|
1229
|
-
] }, item.id);
|
|
1230
|
-
}),
|
|
1231
|
-
isLoading && items.length > 0 && /* @__PURE__ */ jsx("div", { className: "px-2 py-2 text-center", children: /* @__PURE__ */ jsx("span", { className: "text-xs text-gray-400", children: "Loading more..." }) }),
|
|
1232
|
-
hasMore && !isLoading && onLoadMore && /* @__PURE__ */ jsx(
|
|
1233
|
-
"button",
|
|
1234
|
-
{
|
|
1235
|
-
type: "button",
|
|
1236
|
-
onClick: onLoadMore,
|
|
1237
|
-
className: "w-full px-2 py-1.5 text-xs text-gray-500 hover:text-gray-700 hover:bg-gray-50 rounded transition-colors text-center",
|
|
1238
|
-
children: "··· Load more"
|
|
1239
|
-
}
|
|
1240
|
-
)
|
|
1241
|
-
] });
|
|
1242
|
-
}
|
|
1243
|
-
function MenuBreadcrumbs({
|
|
1244
|
-
scopePath,
|
|
1245
|
-
onNavigate
|
|
1246
|
-
}) {
|
|
1247
|
-
return /* @__PURE__ */ jsx("div", { className: "flex items-center gap-1 text-xs text-gray-600 min-w-0", children: scopePath.map((item, index) => {
|
|
1248
|
-
const isLast = index === scopePath.length - 1;
|
|
1249
|
-
const isClickable = !isLast;
|
|
1250
|
-
return /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1 min-w-0", children: [
|
|
1251
|
-
isClickable ? /* @__PURE__ */ jsx(
|
|
1252
|
-
"button",
|
|
1253
|
-
{
|
|
1254
|
-
type: "button",
|
|
1255
|
-
onClick: () => onNavigate(item.id),
|
|
1256
|
-
className: "truncate hover:underline cursor-pointer transition-all hover:text-gray-800",
|
|
1257
|
-
title: `Go to ${item.name}`,
|
|
1258
|
-
children: item.name
|
|
1259
|
-
}
|
|
1260
|
-
) : /* @__PURE__ */ jsx("span", { className: "truncate font-medium text-gray-800", children: item.name }),
|
|
1261
|
-
!isLast && /* @__PURE__ */ jsx("span", { className: "text-gray-400 flex-shrink-0", children: "→" })
|
|
1262
|
-
] }, item.id);
|
|
1263
|
-
}) });
|
|
1264
|
-
}
|
|
1265
|
-
function MenuSummary({
|
|
1266
|
-
scopePath,
|
|
1267
|
-
onNavigate,
|
|
1268
|
-
onBackClick,
|
|
1269
|
-
isFetching
|
|
1270
|
-
}) {
|
|
1271
|
-
if (scopePath.length <= 1 && !isFetching) return null;
|
|
1272
|
-
return /* @__PURE__ */ jsx("div", { className: "border-t border-gray-200 px-2 py-2 bg-gray-50", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
1273
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 flex-1 min-w-0", children: [
|
|
1274
|
-
scopePath.length > 1 && /* @__PURE__ */ jsx(MenuBreadcrumbs, { scopePath, onNavigate }),
|
|
1275
|
-
isFetching && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0 inline-block w-3 h-3 border border-gray-400 border-t-transparent rounded-full animate-spin" })
|
|
1276
|
-
] }),
|
|
1277
|
-
onBackClick && /* @__PURE__ */ jsxs(
|
|
1278
|
-
"button",
|
|
1279
|
-
{
|
|
1280
|
-
type: "button",
|
|
1281
|
-
onClick: onBackClick,
|
|
1282
|
-
className: "text-xs text-gray-600 hover:text-gray-800 px-2 py-1 rounded hover:bg-gray-200 transition-colors flex items-center gap-1 flex-shrink-0",
|
|
1283
|
-
title: "Go back (or press ←)",
|
|
1284
|
-
children: [
|
|
1285
|
-
/* @__PURE__ */ jsx("span", { children: "←" }),
|
|
1286
|
-
/* @__PURE__ */ jsx("span", { children: "Back" })
|
|
1287
|
-
]
|
|
1288
|
-
}
|
|
1289
|
-
)
|
|
1290
|
-
] }) });
|
|
1291
|
-
}
|
|
1292
|
-
function useKeyboardNavigation(ref, opts) {
|
|
1293
|
-
const { items, selectedIndex, setSelectedIndex, onSelect, onBack, onClose } = opts;
|
|
1294
|
-
useImperativeHandle(
|
|
1295
|
-
ref,
|
|
1296
|
-
() => ({
|
|
1297
|
-
onKeyDown: (event) => {
|
|
1298
|
-
if (items.length === 0 && event.key !== "Escape") return false;
|
|
1299
|
-
switch (event.key) {
|
|
1300
|
-
case "ArrowDown": {
|
|
1301
|
-
const next = (selectedIndex + 1) % items.length;
|
|
1302
|
-
setSelectedIndex(next);
|
|
1303
|
-
return true;
|
|
1304
|
-
}
|
|
1305
|
-
case "ArrowUp": {
|
|
1306
|
-
const prev = (selectedIndex - 1 + items.length) % items.length;
|
|
1307
|
-
setSelectedIndex(prev);
|
|
1308
|
-
return true;
|
|
1309
|
-
}
|
|
1310
|
-
case "Enter": {
|
|
1311
|
-
const item = items[selectedIndex];
|
|
1312
|
-
if (item) onSelect(item);
|
|
1313
|
-
return true;
|
|
1314
|
-
}
|
|
1315
|
-
case "ArrowLeft": {
|
|
1316
|
-
if (onBack) {
|
|
1317
|
-
onBack();
|
|
1318
|
-
return true;
|
|
1319
|
-
}
|
|
1320
|
-
return false;
|
|
1321
|
-
}
|
|
1322
|
-
case "Backspace": {
|
|
1323
|
-
return false;
|
|
1324
|
-
}
|
|
1325
|
-
case "ArrowRight": {
|
|
1326
|
-
const item = items[selectedIndex];
|
|
1327
|
-
if (item == null ? void 0 : item.navigatesToScope) {
|
|
1328
|
-
onSelect(item);
|
|
1329
|
-
return true;
|
|
1330
|
-
}
|
|
1331
|
-
return false;
|
|
1332
|
-
}
|
|
1333
|
-
case "Escape": {
|
|
1334
|
-
onClose();
|
|
1335
|
-
return true;
|
|
1336
|
-
}
|
|
1337
|
-
default:
|
|
1338
|
-
return false;
|
|
1339
|
-
}
|
|
1340
|
-
}
|
|
1341
|
-
}),
|
|
1342
|
-
[items, selectedIndex, setSelectedIndex, onSelect, onBack, onClose]
|
|
1343
|
-
);
|
|
1344
|
-
}
|
|
1345
|
-
function getCurrentScope(state) {
|
|
1346
|
-
const lastEntry = state.scopeStack[state.scopeStack.length - 1];
|
|
1347
|
-
return (lastEntry == null ? void 0 : lastEntry.scope) ?? "root";
|
|
1348
|
-
}
|
|
1349
|
-
function getSelectedIndex(state) {
|
|
1350
|
-
const lastEntry = state.scopeStack[state.scopeStack.length - 1];
|
|
1351
|
-
return (lastEntry == null ? void 0 : lastEntry.selectedIndex) ?? 0;
|
|
1352
|
-
}
|
|
1353
|
-
function useMenuNavigation() {
|
|
1354
|
-
const [store] = useState(() => {
|
|
1355
|
-
const baseStore = new Store({
|
|
1356
|
-
scopeStack: [{ scope: "root", selectedIndex: 0 }],
|
|
1357
|
-
query: "",
|
|
1358
|
-
isActive: false
|
|
1359
|
-
});
|
|
1360
|
-
const navigationStore = baseStore;
|
|
1361
|
-
navigationStore.navigateTo = (scope, currentSelectedIndex, options) => {
|
|
1362
|
-
const state = baseStore.state;
|
|
1363
|
-
const updatedStack = [...state.scopeStack];
|
|
1364
|
-
if (updatedStack.length > 0) {
|
|
1365
|
-
updatedStack[updatedStack.length - 1] = {
|
|
1366
|
-
...updatedStack[updatedStack.length - 1],
|
|
1367
|
-
selectedIndex: currentSelectedIndex
|
|
1368
|
-
};
|
|
1369
|
-
}
|
|
1370
|
-
const newStack = [
|
|
1371
|
-
...updatedStack,
|
|
1372
|
-
{
|
|
1373
|
-
scope,
|
|
1374
|
-
selectedIndex: 0,
|
|
1375
|
-
breadcrumbLabel: options == null ? void 0 : options.breadcrumbLabel,
|
|
1376
|
-
parentScope: options == null ? void 0 : options.parentScope
|
|
1377
|
-
}
|
|
1378
|
-
];
|
|
1379
|
-
baseStore.setState((prev) => ({
|
|
1380
|
-
...prev,
|
|
1381
|
-
scopeStack: newStack,
|
|
1382
|
-
query: ""
|
|
1383
|
-
}));
|
|
1384
|
-
};
|
|
1385
|
-
navigationStore.navigateBack = () => {
|
|
1386
|
-
const state = baseStore.state;
|
|
1387
|
-
if (state.scopeStack.length <= 1) {
|
|
1388
|
-
return;
|
|
1389
|
-
}
|
|
1390
|
-
const newStack = state.scopeStack.slice(0, -1);
|
|
1391
|
-
baseStore.setState((prev) => ({
|
|
1392
|
-
...prev,
|
|
1393
|
-
scopeStack: newStack,
|
|
1394
|
-
query: ""
|
|
1395
|
-
}));
|
|
1396
|
-
};
|
|
1397
|
-
navigationStore.setQuery = (query) => {
|
|
1398
|
-
baseStore.setState((prev) => ({ ...prev, query }));
|
|
1399
|
-
};
|
|
1400
|
-
navigationStore.open = () => {
|
|
1401
|
-
baseStore.setState(() => ({
|
|
1402
|
-
scopeStack: [{ scope: "root", selectedIndex: 0 }],
|
|
1403
|
-
query: "",
|
|
1404
|
-
isActive: true
|
|
1405
|
-
}));
|
|
1406
|
-
};
|
|
1407
|
-
navigationStore.close = () => {
|
|
1408
|
-
baseStore.setState(() => ({
|
|
1409
|
-
scopeStack: [{ scope: "root", selectedIndex: 0 }],
|
|
1410
|
-
query: "",
|
|
1411
|
-
isActive: false
|
|
1412
|
-
}));
|
|
1413
|
-
};
|
|
1414
|
-
return navigationStore;
|
|
1415
|
-
});
|
|
1416
|
-
return store;
|
|
1417
|
-
}
|
|
1418
|
-
function clearTextAfterTrigger(editor) {
|
|
1419
|
-
const { state } = editor;
|
|
1420
|
-
const { from: cursorPos } = state.selection;
|
|
1421
|
-
const backwardText = state.doc.textBetween(0, cursorPos, void 0, "");
|
|
1422
|
-
const triggerIndex = backwardText.lastIndexOf("@");
|
|
1423
|
-
if (triggerIndex === -1) return;
|
|
1424
|
-
const offset2 = backwardText.length - triggerIndex;
|
|
1425
|
-
const from = cursorPos - offset2 + 1;
|
|
1426
|
-
const to = cursorPos;
|
|
1427
|
-
if (from < to) {
|
|
1428
|
-
const tr = state.tr.deleteRange(from, to);
|
|
1429
|
-
editor.view.dispatch(tr);
|
|
1430
|
-
}
|
|
1431
|
-
}
|
|
1432
|
-
const MentionSuggestionList = forwardRef(({ store, editor, query, command, closeMenu }, ref) => {
|
|
1433
|
-
const [selectedIndexOverride, setSelectedIndexOverride] = useState(null);
|
|
1434
|
-
const navStore = useMenuNavigation();
|
|
1435
|
-
const currentScopeId = useStore(navStore, (s) => getCurrentScope(s));
|
|
1436
|
-
const navSelectedIndex = useStore(navStore, (s) => getSelectedIndex(s));
|
|
1437
|
-
const selectedIndex = selectedIndexOverride ?? navSelectedIndex;
|
|
1438
|
-
const scopeStack = useStore(navStore, (s) => s.scopeStack);
|
|
1439
|
-
let effectiveScopeId = currentScopeId;
|
|
1440
|
-
if (query) {
|
|
1441
|
-
try {
|
|
1442
|
-
const searchScope = getSearchScope(store.state.registry, currentScopeId);
|
|
1443
|
-
if (searchScope) {
|
|
1444
|
-
effectiveScopeId = searchScope;
|
|
1445
|
-
}
|
|
1446
|
-
} catch {
|
|
1447
|
-
}
|
|
1448
|
-
}
|
|
1449
|
-
const { items, isFetching, hasMore, loadMore } = useMenuItems(store, {
|
|
1450
|
-
scope: effectiveScopeId,
|
|
1451
|
-
query,
|
|
1452
|
-
minItems: 50,
|
|
1453
|
-
parentScope: currentScopeId !== effectiveScopeId ? currentScopeId : void 0
|
|
1454
|
-
});
|
|
1455
|
-
useEffect(() => {
|
|
1456
|
-
setSelectedIndexOverride(null);
|
|
1457
|
-
}, [query, effectiveScopeId]);
|
|
1458
|
-
const scopePath = scopeStack.map((entry) => ({
|
|
1459
|
-
id: entry.scope,
|
|
1460
|
-
name: entry.breadcrumbLabel ?? getScopeName(entry.scope, store)
|
|
1461
|
-
}));
|
|
1462
|
-
const handleSelect = useCallback(
|
|
1463
|
-
(item) => {
|
|
1464
|
-
if (item.navigatesToScope) {
|
|
1465
|
-
navStore.navigateTo(item.navigatesToScope, selectedIndex, {
|
|
1466
|
-
breadcrumbLabel: item.name,
|
|
1467
|
-
parentScope: currentScopeId
|
|
1468
|
-
});
|
|
1469
|
-
clearTextAfterTrigger(editor);
|
|
1470
|
-
setSelectedIndexOverride(null);
|
|
1471
|
-
return;
|
|
1472
|
-
}
|
|
1473
|
-
command(item);
|
|
1474
|
-
},
|
|
1475
|
-
[command, editor, navStore, selectedIndex, currentScopeId]
|
|
1476
|
-
);
|
|
1477
|
-
const handleBack = useCallback(() => {
|
|
1478
|
-
navStore.navigateBack();
|
|
1479
|
-
clearTextAfterTrigger(editor);
|
|
1480
|
-
setSelectedIndexOverride(null);
|
|
1481
|
-
}, [editor, navStore]);
|
|
1482
|
-
const handleBreadcrumbNavigate = useCallback(
|
|
1483
|
-
(targetScopeId) => {
|
|
1484
|
-
const targetIdx = scopeStack.findIndex((entry) => entry.scope === targetScopeId);
|
|
1485
|
-
if (targetIdx >= 0) {
|
|
1486
|
-
const popsNeeded = scopeStack.length - 1 - targetIdx;
|
|
1487
|
-
for (let i = 0; i < popsNeeded; i++) {
|
|
1488
|
-
navStore.navigateBack();
|
|
1489
|
-
}
|
|
1490
|
-
clearTextAfterTrigger(editor);
|
|
1491
|
-
setSelectedIndexOverride(null);
|
|
1492
|
-
}
|
|
1493
|
-
},
|
|
1494
|
-
[editor, navStore, scopeStack]
|
|
1495
|
-
);
|
|
1496
|
-
useKeyboardNavigation(ref, {
|
|
1497
|
-
items,
|
|
1498
|
-
selectedIndex,
|
|
1499
|
-
onSelect: handleSelect,
|
|
1500
|
-
onBack: currentScopeId !== "root" ? handleBack : void 0,
|
|
1501
|
-
onClose: () => closeMenu(true),
|
|
1502
|
-
setSelectedIndex: (idx) => {
|
|
1503
|
-
setSelectedIndexOverride(idx);
|
|
1504
|
-
}
|
|
1505
|
-
});
|
|
1506
|
-
return /* @__PURE__ */ jsxs("div", { className: "bg-white border border-gray-300 rounded shadow-lg min-w-[280px] max-w-[380px] max-h-[320px] flex flex-col", children: [
|
|
1507
|
-
/* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsx(
|
|
1508
|
-
MenuList,
|
|
1509
|
-
{
|
|
1510
|
-
items,
|
|
1511
|
-
selectedIndex,
|
|
1512
|
-
isLoading: isFetching,
|
|
1513
|
-
hasMore,
|
|
1514
|
-
onSelect: handleSelect,
|
|
1515
|
-
onMouseEnter: (idx) => {
|
|
1516
|
-
setSelectedIndexOverride(idx);
|
|
1517
|
-
},
|
|
1518
|
-
onLoadMore: loadMore
|
|
1519
|
-
}
|
|
1520
|
-
) }),
|
|
1521
|
-
/* @__PURE__ */ jsx(
|
|
1522
|
-
MenuSummary,
|
|
1523
|
-
{
|
|
1524
|
-
scopePath,
|
|
1525
|
-
onNavigate: handleBreadcrumbNavigate,
|
|
1526
|
-
onBackClick: currentScopeId !== "root" ? handleBack : void 0,
|
|
1527
|
-
isFetching
|
|
1528
|
-
}
|
|
1529
|
-
)
|
|
1530
|
-
] });
|
|
1531
|
-
});
|
|
1532
|
-
MentionSuggestionList.displayName = "MentionSuggestionList";
|
|
1533
|
-
function assetToMenuItem(asset) {
|
|
1534
|
-
const isFolder = asset.athenaOriginalType === "folder";
|
|
1535
|
-
const displayType = asset.athenaConvertedType || asset.athenaOriginalType;
|
|
1536
|
-
return {
|
|
1537
|
-
id: asset.id,
|
|
1538
|
-
name: asset.title || "Untitled",
|
|
1539
|
-
type: isFolder ? "folder" : "asset",
|
|
1540
|
-
thumbnailUrl: assetTypeToThumb(displayType),
|
|
1541
|
-
fallbackIcon: assetTypeToIcon(displayType),
|
|
1542
|
-
navigatesToScope: isFolder ? asset.id : void 0,
|
|
1543
|
-
visibleInScopes: /* @__PURE__ */ new Set(),
|
|
1544
|
-
updatedAt: asset.updatedAt ?? void 0,
|
|
1545
|
-
extra: {
|
|
1546
|
-
athenaOriginalType: asset.athenaOriginalType,
|
|
1547
|
-
athenaConvertedType: asset.athenaConvertedType,
|
|
1548
|
-
parentFolderId: asset.parentFolderId
|
|
1549
|
-
}
|
|
1550
|
-
};
|
|
1551
|
-
}
|
|
1552
|
-
async function querySimpleSearch(auth, opts) {
|
|
1553
|
-
var _a, _b;
|
|
1554
|
-
const searchRequest = {
|
|
1555
|
-
query: ((_a = opts.query) == null ? void 0 : _a.trim()) || "",
|
|
1556
|
-
type: opts.includeTypes || [],
|
|
1557
|
-
notType: opts.excludeTypes || [],
|
|
1558
|
-
limit: opts.limit,
|
|
1559
|
-
offset: opts.offset
|
|
1560
|
-
};
|
|
1561
|
-
const input = {
|
|
1562
|
-
searchRequest,
|
|
1563
|
-
returnFullAsset: true,
|
|
1564
|
-
shouldCalculateTotal: false,
|
|
1565
|
-
sort: { field: "UPDATED_AT", direction: "DESC" },
|
|
1566
|
-
filterColumns: { isArchived: false, isHidden: false }
|
|
1567
|
-
};
|
|
1568
|
-
const data = await fetchGraphQL(auth, SIMPLE_SEARCH_QUERY, { input });
|
|
1569
|
-
const assets = ((_b = data.simpleSearch) == null ? void 0 : _b.assets) || [];
|
|
1570
|
-
return {
|
|
1571
|
-
items: assets.map(assetToMenuItem),
|
|
1572
|
-
hasMore: assets.length === opts.limit
|
|
1573
|
-
};
|
|
1574
|
-
}
|
|
1575
|
-
const CATEGORY_DEFS = {
|
|
1576
|
-
favorites: { name: "Favorites", icon: "star", scope: "favorites" },
|
|
1577
|
-
assets: { name: "Assets", icon: "file-text", scope: "athena_assets" },
|
|
1578
|
-
projects: {
|
|
1579
|
-
name: "Projects",
|
|
1580
|
-
icon: "folder-kanban",
|
|
1581
|
-
scope: "athena_projects"
|
|
1582
|
-
},
|
|
1583
|
-
browse_profiles: {
|
|
1584
|
-
name: "Browse Profiles",
|
|
1585
|
-
icon: "globe",
|
|
1586
|
-
scope: "athena_browse_profiles"
|
|
1587
|
-
},
|
|
1588
|
-
folders: { name: "Folders", icon: "folder", scope: "athena_folders" },
|
|
1589
|
-
tools: { name: "Tools", icon: "wrench", scope: "tools" },
|
|
1590
|
-
toolkits: { name: "Toolkits", icon: "package", scope: "toolkits" },
|
|
1591
|
-
team: { name: "Team", icon: "users", scope: "team" },
|
|
1592
|
-
drives: { name: "Drives", icon: "hard-drive", scope: "drive_catalogs" }
|
|
1593
|
-
};
|
|
1594
|
-
function webpageDescription(webpage) {
|
|
1595
|
-
try {
|
|
1596
|
-
const hostname = new URL(webpage.url).hostname;
|
|
1597
|
-
return webpage.isCurrent ? `${webpage.title} · ${hostname}` : hostname;
|
|
1598
|
-
} catch {
|
|
1599
|
-
return webpage.title;
|
|
1600
|
-
}
|
|
1601
|
-
}
|
|
1602
|
-
function webpageToMenuItem(webpage) {
|
|
1603
|
-
return {
|
|
1604
|
-
id: `webpage-tab-${webpage.tabId}`,
|
|
1605
|
-
name: webpage.isCurrent ? "This webpage" : webpage.title,
|
|
1606
|
-
type: "tab",
|
|
1607
|
-
thumbnailUrl: assetTypeToThumb("web_page"),
|
|
1608
|
-
fallbackIcon: "globe",
|
|
1609
|
-
visibleInScopes: /* @__PURE__ */ new Set(["root"]),
|
|
1610
|
-
description: webpageDescription(webpage),
|
|
1611
|
-
url: webpage.url,
|
|
1612
|
-
menuSection: webpage.isCurrent ? MentionMenuSection.CURRENT_WEBPAGE : MentionMenuSection.OTHER_WEBPAGES,
|
|
1613
|
-
extra: {
|
|
1614
|
-
tabId: webpage.tabId,
|
|
1615
|
-
title: webpage.title,
|
|
1616
|
-
isCurrent: webpage.isCurrent
|
|
1617
|
-
}
|
|
1618
|
-
};
|
|
1619
|
-
}
|
|
1620
|
-
function buildRootMenuItems({
|
|
1621
|
-
categories,
|
|
1622
|
-
webpages
|
|
1623
|
-
}) {
|
|
1624
|
-
const webpageItems = webpages.map(webpageToMenuItem);
|
|
1625
|
-
const categoryItems = categories.filter((cat) => CATEGORY_DEFS[cat]).map((cat) => {
|
|
1626
|
-
const def = CATEGORY_DEFS[cat];
|
|
1627
|
-
return {
|
|
1628
|
-
id: cat,
|
|
1629
|
-
name: def.name,
|
|
1630
|
-
type: "menu",
|
|
1631
|
-
fallbackIcon: def.icon,
|
|
1632
|
-
visibleInScopes: /* @__PURE__ */ new Set(["root"]),
|
|
1633
|
-
navigatesToScope: def.scope,
|
|
1634
|
-
isNavigationOnly: true,
|
|
1635
|
-
menuSection: MentionMenuSection.LIBRARY
|
|
1636
|
-
};
|
|
1637
|
-
});
|
|
1638
|
-
return [...webpageItems, ...categoryItems];
|
|
1639
|
-
}
|
|
1640
|
-
const transformRootCategories = async (context) => {
|
|
1641
|
-
const { sourceConfig } = context;
|
|
1642
|
-
const items = buildRootMenuItems({
|
|
1643
|
-
categories: sourceConfig.categories,
|
|
1644
|
-
webpages: sourceConfig.getWebpages()
|
|
1645
|
-
});
|
|
1646
|
-
return { items, pagination: { hasMore: false } };
|
|
1647
|
-
};
|
|
1648
|
-
const fetchAssets = async (context) => {
|
|
1649
|
-
const { query, fetchState, sourceConfig } = context;
|
|
1650
|
-
const limit = sourceConfig.limit ?? 50;
|
|
1651
|
-
const meta = fetchState.meta || {};
|
|
1652
|
-
const offset2 = meta.validatedCount || 0;
|
|
1653
|
-
const result = await querySimpleSearch(sourceConfig.auth, {
|
|
1654
|
-
query,
|
|
1655
|
-
limit,
|
|
1656
|
-
offset: offset2,
|
|
1657
|
-
excludeTypes: [
|
|
1658
|
-
"folder",
|
|
1659
|
-
"catalog",
|
|
1660
|
-
"spaces",
|
|
1661
|
-
"session",
|
|
1662
|
-
"table",
|
|
1663
|
-
"task_item"
|
|
1664
|
-
]
|
|
1665
|
-
});
|
|
1666
|
-
return {
|
|
1667
|
-
items: result.items,
|
|
1668
|
-
pagination: { hasMore: result.hasMore }
|
|
1669
|
-
};
|
|
1670
|
-
};
|
|
1671
|
-
const fetchFavorites = async (context) => {
|
|
1672
|
-
const { query, fetchState, sourceConfig } = context;
|
|
1673
|
-
const limit = sourceConfig.limit ?? 50;
|
|
1674
|
-
const meta = fetchState.meta || {};
|
|
1675
|
-
const offset2 = meta.validatedCount || 0;
|
|
1676
|
-
const data = await fetchGraphQL(sourceConfig.auth, PAGINATED_ASSETS_QUERY, {
|
|
1677
|
-
limit,
|
|
1678
|
-
offset: offset2,
|
|
1679
|
-
parentFolderId: null,
|
|
1680
|
-
filterTypes: null,
|
|
1681
|
-
filterColumns: {
|
|
1682
|
-
isFavorited: true,
|
|
1683
|
-
isArchived: false,
|
|
1684
|
-
isHidden: false
|
|
1685
|
-
}
|
|
1686
|
-
});
|
|
1687
|
-
const assets = data.getPaginatedAssetsForWorkspace || [];
|
|
1688
|
-
const items = assets.map(assetToMenuItem);
|
|
1689
|
-
return {
|
|
1690
|
-
items,
|
|
1691
|
-
pagination: { hasMore: assets.length === limit }
|
|
1692
|
-
};
|
|
1693
|
-
};
|
|
1694
|
-
const fetchFolders = async (context) => {
|
|
1695
|
-
const { query, fetchState, sourceConfig } = context;
|
|
1696
|
-
const limit = sourceConfig.limit ?? 50;
|
|
1697
|
-
const meta = fetchState.meta || {};
|
|
1698
|
-
const offset2 = meta.validatedCount || 0;
|
|
1699
|
-
const result = await querySimpleSearch(sourceConfig.auth, {
|
|
1700
|
-
query,
|
|
1701
|
-
limit,
|
|
1702
|
-
offset: offset2,
|
|
1703
|
-
includeTypes: ["folder"]
|
|
1704
|
-
});
|
|
1705
|
-
return {
|
|
1706
|
-
items: result.items,
|
|
1707
|
-
pagination: { hasMore: result.hasMore }
|
|
1708
|
-
};
|
|
1709
|
-
};
|
|
1710
|
-
const fetchFolderContents = async (context) => {
|
|
1711
|
-
const { scope, query, fetchState, sourceConfig } = context;
|
|
1712
|
-
const limit = sourceConfig.limit ?? 50;
|
|
1713
|
-
const meta = fetchState.meta || {};
|
|
1714
|
-
const offset2 = meta.validatedCount || 0;
|
|
1715
|
-
const parentFolderId = scope === "internal_drive" ? null : scope;
|
|
1716
|
-
const data = await fetchGraphQL(sourceConfig.auth, PAGINATED_ASSETS_QUERY, {
|
|
1717
|
-
limit,
|
|
1718
|
-
offset: offset2,
|
|
1719
|
-
parentFolderId,
|
|
1720
|
-
filterTypes: null,
|
|
1721
|
-
filterColumns: {
|
|
1722
|
-
isArchived: false,
|
|
1723
|
-
isHidden: false,
|
|
1724
|
-
...query ? { title: [{ op: "LIKE", value: `%${query}%` }] } : {}
|
|
1725
|
-
}
|
|
1726
|
-
});
|
|
1727
|
-
const rawAssets = data.getPaginatedAssetsForWorkspace || [];
|
|
1728
|
-
const assets = rawAssets.filter(
|
|
1729
|
-
(a11) => a11.athenaConvertedType !== "catalog" && a11.athenaOriginalType !== "catalog"
|
|
1730
|
-
);
|
|
1731
|
-
const items = assets.map(assetToMenuItem);
|
|
1732
|
-
return {
|
|
1733
|
-
items,
|
|
1734
|
-
pagination: {
|
|
1735
|
-
hasMore: rawAssets.length === limit,
|
|
1736
|
-
consumedCount: rawAssets.length
|
|
1737
|
-
}
|
|
1738
|
-
};
|
|
1739
|
-
};
|
|
1740
|
-
const fetchTypedAssets = async (context) => {
|
|
1741
|
-
const { query, fetchState, sourceConfig } = context;
|
|
1742
|
-
const limit = sourceConfig.limit ?? 50;
|
|
1743
|
-
const meta = fetchState.meta || {};
|
|
1744
|
-
const offset2 = meta.validatedCount || 0;
|
|
1745
|
-
const result = await querySimpleSearch(sourceConfig.auth, {
|
|
1746
|
-
query,
|
|
1747
|
-
limit,
|
|
1748
|
-
offset: offset2,
|
|
1749
|
-
includeTypes: sourceConfig.includeOnlyTypes
|
|
1750
|
-
});
|
|
1751
|
-
return {
|
|
1752
|
-
items: result.items,
|
|
1753
|
-
pagination: { hasMore: result.hasMore }
|
|
1754
|
-
};
|
|
1755
|
-
};
|
|
1756
|
-
const fetchTeam = async (context) => {
|
|
1757
|
-
const { sourceConfig } = context;
|
|
1758
|
-
const { auth } = sourceConfig;
|
|
1759
|
-
if (!auth.workspaceId) {
|
|
1760
|
-
return { items: [], pagination: { hasMore: false } };
|
|
1761
|
-
}
|
|
1762
|
-
const data = await fetchGraphQL(
|
|
1763
|
-
auth,
|
|
1764
|
-
WORKSPACE_MEMBERS_QUERY,
|
|
1765
|
-
{ workspaceId: auth.workspaceId }
|
|
1766
|
-
);
|
|
1767
|
-
const members = data.getUsersInWorkspace || [];
|
|
1768
|
-
const items = members.map((member) => {
|
|
1769
|
-
const displayName = [member.firstName, member.lastName].filter(Boolean).join(" ").trim() || member.email || "Unknown User";
|
|
1770
|
-
return {
|
|
1771
|
-
id: member.email || member.id,
|
|
1772
|
-
name: displayName,
|
|
1773
|
-
type: "user",
|
|
1774
|
-
fallbackIcon: "user",
|
|
1775
|
-
visibleInScopes: /* @__PURE__ */ new Set(),
|
|
1776
|
-
email: member.email ?? void 0,
|
|
1777
|
-
extra: { isAdmin: member.isAdmin }
|
|
1778
|
-
};
|
|
1779
|
-
});
|
|
1780
|
-
return { items, pagination: { hasMore: false } };
|
|
1781
|
-
};
|
|
1782
|
-
async function queryToolCatalog(auth) {
|
|
1783
|
-
const data = await fetchGraphQL(auth, TOOL_CATALOG_QUERY);
|
|
1784
|
-
return data.getToolkitToToolsMapping;
|
|
1785
|
-
}
|
|
1786
|
-
const fetchTools = async (context) => {
|
|
1787
|
-
const catalog = await queryToolCatalog(context.sourceConfig.auth);
|
|
1788
|
-
const items = catalog.tools.filter((tool) => tool.isMentionable).map((tool) => ({
|
|
1789
|
-
id: tool.id,
|
|
1790
|
-
name: tool.name,
|
|
1791
|
-
type: "tool",
|
|
1792
|
-
fallbackIcon: tool.icon,
|
|
1793
|
-
description: tool.description ?? void 0,
|
|
1794
|
-
visibleInScopes: /* @__PURE__ */ new Set(),
|
|
1795
|
-
...tool.adminOnly ? { extra: { isAdminOnly: true } } : {}
|
|
1796
|
-
}));
|
|
1797
|
-
return { items, pagination: { hasMore: false } };
|
|
1798
|
-
};
|
|
1799
|
-
const fetchToolkits = async (context) => {
|
|
1800
|
-
const catalog = await queryToolCatalog(context.sourceConfig.auth);
|
|
1801
|
-
const items = catalog.toolkits.filter((toolkit) => toolkit.isMentionable && !toolkit.hideFromMenu).map((toolkit) => ({
|
|
1802
|
-
id: toolkit.name,
|
|
1803
|
-
name: toolkit.displayName,
|
|
1804
|
-
type: "toolkit",
|
|
1805
|
-
fallbackIcon: toolkit.icon,
|
|
1806
|
-
description: toolkit.description || void 0,
|
|
1807
|
-
visibleInScopes: /* @__PURE__ */ new Set(),
|
|
1808
|
-
...toolkit.onlyAdmin ? { extra: { isAdminOnly: true } } : {}
|
|
1809
|
-
}));
|
|
1810
|
-
return { items, pagination: { hasMore: false } };
|
|
1811
|
-
};
|
|
1812
|
-
const fetchDrives = async (context) => {
|
|
1813
|
-
const { fetchState, sourceConfig } = context;
|
|
1814
|
-
const meta = fetchState.meta || {};
|
|
1815
|
-
const offset2 = meta.validatedCount || 0;
|
|
1816
|
-
const result = await querySimpleSearch(sourceConfig.auth, {
|
|
1817
|
-
limit: 50,
|
|
1818
|
-
offset: offset2,
|
|
1819
|
-
includeTypes: ["catalog"]
|
|
1820
|
-
});
|
|
1821
|
-
const items = result.items.map((item) => ({
|
|
1822
|
-
...item,
|
|
1823
|
-
type: "drive_catalog",
|
|
1824
|
-
fallbackIcon: "hard-drive",
|
|
1825
|
-
isNavigationOnly: true,
|
|
1826
|
-
navigatesToScope: item.id
|
|
1827
|
-
}));
|
|
1828
|
-
const sources = items.map((item) => ({
|
|
1829
|
-
scope: item.id,
|
|
1830
|
-
sourceFn: fetchFolderContents,
|
|
1831
|
-
sourceConfig: { auth: sourceConfig.auth, limit: 50 }
|
|
1832
|
-
}));
|
|
1833
|
-
return {
|
|
1834
|
-
items,
|
|
1835
|
-
pagination: { hasMore: result.hasMore },
|
|
1836
|
-
sources
|
|
1837
|
-
};
|
|
1838
|
-
};
|
|
1839
|
-
const fetchGlobalSearch = async (context) => {
|
|
1840
|
-
const { query, fetchState, sourceConfig } = context;
|
|
1841
|
-
if (!(query == null ? void 0 : query.trim())) return { items: [], pagination: { hasMore: false } };
|
|
1842
|
-
const meta = fetchState.meta || {};
|
|
1843
|
-
const offset2 = meta.validatedCount || 0;
|
|
1844
|
-
const result = await querySimpleSearch(sourceConfig.auth, {
|
|
1845
|
-
query,
|
|
1846
|
-
limit: 50,
|
|
1847
|
-
offset: offset2,
|
|
1848
|
-
excludeTypes: ["table", "catalog", "spaces", "task_item", "session"]
|
|
1849
|
-
});
|
|
1850
|
-
return {
|
|
1851
|
-
items: result.items,
|
|
1852
|
-
pagination: { hasMore: result.hasMore }
|
|
1853
|
-
};
|
|
1854
|
-
};
|
|
1855
|
-
function webpageMentionFingerprint(webpages) {
|
|
1856
|
-
return JSON.stringify(
|
|
1857
|
-
webpages.map(({ tabId, title, url, isCurrent }) => [
|
|
1858
|
-
tabId,
|
|
1859
|
-
title,
|
|
1860
|
-
url,
|
|
1861
|
-
isCurrent
|
|
1862
|
-
])
|
|
1863
|
-
);
|
|
1864
|
-
}
|
|
1865
|
-
const ROOT_MENTION_CATEGORIES = [
|
|
1866
|
-
"favorites",
|
|
1867
|
-
"assets",
|
|
1868
|
-
"projects",
|
|
1869
|
-
"browse_profiles",
|
|
1870
|
-
"folders",
|
|
1871
|
-
"tools",
|
|
1872
|
-
"toolkits",
|
|
1873
|
-
"team",
|
|
1874
|
-
"drives"
|
|
1875
|
-
];
|
|
1876
|
-
function buildStore({
|
|
1877
|
-
auth,
|
|
1878
|
-
getWebpages,
|
|
1879
|
-
rootCategories
|
|
1880
|
-
}) {
|
|
1881
|
-
const registry = createScopeRegistry();
|
|
1882
|
-
const cache = createItemCache();
|
|
1883
|
-
registerSource(registry, "root", transformRootCategories, {
|
|
1884
|
-
categories: [...rootCategories],
|
|
1885
|
-
getWebpages
|
|
1886
|
-
});
|
|
1887
|
-
registerSource(registry, "global_search", fetchGlobalSearch, { auth });
|
|
1888
|
-
bindScopes(registry, "root", "global_search");
|
|
1889
|
-
registerSource(registry, "athena_assets", fetchAssets, { auth, limit: 50 });
|
|
1890
|
-
registerSource(registry, "favorites", fetchFavorites, { auth, limit: 50 });
|
|
1891
|
-
registerSource(
|
|
1892
|
-
registry,
|
|
1893
|
-
"athena_folders",
|
|
1894
|
-
fetchFolders,
|
|
1895
|
-
{ auth, limit: 50 },
|
|
1896
|
-
true
|
|
1897
|
-
);
|
|
1898
|
-
registerSource(registry, "internal_drive", fetchFolderContents, {
|
|
1899
|
-
auth,
|
|
1900
|
-
limit: 50
|
|
1901
|
-
});
|
|
1902
|
-
registerSource(registry, "athena_projects", fetchTypedAssets, {
|
|
1903
|
-
auth,
|
|
1904
|
-
includeOnlyTypes: ["project"],
|
|
1905
|
-
limit: 50
|
|
1906
|
-
});
|
|
1907
|
-
registerSource(registry, "athena_browse_profiles", fetchTypedAssets, {
|
|
1908
|
-
auth,
|
|
1909
|
-
includeOnlyTypes: ["browse_profile"],
|
|
1910
|
-
limit: 50
|
|
1911
|
-
});
|
|
1912
|
-
registerSource(registry, "tools", fetchTools, { auth });
|
|
1913
|
-
registerSource(registry, "toolkits", fetchToolkits, { auth });
|
|
1914
|
-
registerSource(registry, "team", fetchTeam, { auth });
|
|
1915
|
-
registerSource(registry, "drive_catalogs", fetchDrives, { auth });
|
|
1916
|
-
return new Store({ registry, cache });
|
|
1917
|
-
}
|
|
1918
|
-
function useMentionSuggestions({
|
|
1919
|
-
webpages,
|
|
1920
|
-
rootCategories = ROOT_MENTION_CATEGORIES
|
|
1921
|
-
}) {
|
|
1922
|
-
const auth = useMentionAuth();
|
|
1923
|
-
const webpagesRef = useRef(webpages);
|
|
1924
|
-
webpagesRef.current = webpages;
|
|
1925
|
-
const store = useMemo(
|
|
1926
|
-
() => buildStore({
|
|
1927
|
-
auth,
|
|
1928
|
-
getWebpages: () => webpagesRef.current,
|
|
1929
|
-
rootCategories
|
|
1930
|
-
}),
|
|
1931
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1932
|
-
[
|
|
1933
|
-
auth.backendUrl,
|
|
1934
|
-
auth.accessToken,
|
|
1935
|
-
auth.apiKey,
|
|
1936
|
-
auth.workspaceId,
|
|
1937
|
-
auth.userId,
|
|
1938
|
-
rootCategories.join(",")
|
|
1939
|
-
]
|
|
1940
|
-
);
|
|
1941
|
-
const invalidate = useMemo(
|
|
1942
|
-
() => (scope) => {
|
|
1943
|
-
const state = store.state;
|
|
1944
|
-
const { registry, cache } = state;
|
|
1945
|
-
if (cache.items) {
|
|
1946
|
-
for (const item of Object.values(cache.items)) {
|
|
1947
|
-
item.visibleInScopes.delete(scope);
|
|
1948
|
-
}
|
|
1949
|
-
for (const [id, item] of Object.entries(cache.items)) {
|
|
1950
|
-
if (item.visibleInScopes.size === 0) {
|
|
1951
|
-
delete cache.items[id];
|
|
1952
|
-
}
|
|
1953
|
-
}
|
|
1954
|
-
}
|
|
1955
|
-
if (registry.entries[scope]) {
|
|
1956
|
-
registry.entries[scope].fetchStates = {};
|
|
1957
|
-
}
|
|
1958
|
-
store.setState((prev) => ({ ...prev }));
|
|
1959
|
-
},
|
|
1960
|
-
[store]
|
|
1961
|
-
);
|
|
1962
|
-
const webpageFingerprint = webpageMentionFingerprint(webpages);
|
|
1963
|
-
const previousWebpageFingerprintRef = useRef(null);
|
|
1964
|
-
useEffect(() => {
|
|
1965
|
-
if (previousWebpageFingerprintRef.current === webpageFingerprint) return;
|
|
1966
|
-
previousWebpageFingerprintRef.current = webpageFingerprint;
|
|
1967
|
-
invalidate("root");
|
|
1968
|
-
}, [invalidate, webpageFingerprint]);
|
|
1969
|
-
return { store, invalidate };
|
|
1970
|
-
}
|
|
1971
|
-
class PendingAttachmentUploads {
|
|
1972
|
-
constructor() {
|
|
1973
|
-
__publicField(this, "pending", /* @__PURE__ */ new Set());
|
|
1974
|
-
}
|
|
1975
|
-
track(upload) {
|
|
1976
|
-
this.pending.add(upload);
|
|
1977
|
-
void upload.then(
|
|
1978
|
-
() => this.pending.delete(upload),
|
|
1979
|
-
() => this.pending.delete(upload)
|
|
1980
|
-
);
|
|
1981
|
-
return upload;
|
|
1982
|
-
}
|
|
1983
|
-
async waitForIdle() {
|
|
1984
|
-
while (this.pending.size > 0) {
|
|
1985
|
-
await Promise.allSettled([...this.pending]);
|
|
1986
|
-
}
|
|
1987
|
-
}
|
|
1988
|
-
}
|
|
1989
|
-
const SubmitKeybind = Extension.create({
|
|
1990
|
-
name: "submitKeybind",
|
|
1991
|
-
priority: 1e3,
|
|
1992
|
-
addOptions() {
|
|
1993
|
-
return { onSubmit: () => {
|
|
1994
|
-
}, isMentionOpen: () => false };
|
|
1995
|
-
},
|
|
1996
|
-
addKeyboardShortcuts() {
|
|
1997
|
-
return {
|
|
1998
|
-
Enter: () => {
|
|
1999
|
-
if (this.options.isMentionOpen()) return false;
|
|
2000
|
-
this.options.onSubmit();
|
|
2001
|
-
return true;
|
|
2002
|
-
},
|
|
2003
|
-
"Shift-Enter": () => {
|
|
2004
|
-
this.editor.commands.setHardBreak();
|
|
2005
|
-
return true;
|
|
2006
|
-
}
|
|
2007
|
-
};
|
|
2008
|
-
}
|
|
2009
|
-
});
|
|
2010
|
-
const MENTION_STYLES = `
|
|
2011
|
-
.mention-chip {
|
|
2012
|
-
display: inline-flex;
|
|
2013
|
-
align-items: center;
|
|
2014
|
-
gap: 4px;
|
|
2015
|
-
background: rgba(148, 163, 184, 0.1);
|
|
2016
|
-
color: #475569;
|
|
2017
|
-
border: 1px solid #cbd5e1;
|
|
2018
|
-
border-radius: 6px;
|
|
2019
|
-
padding: 1px 6px;
|
|
2020
|
-
font-size: 0.85em;
|
|
2021
|
-
font-weight: 500;
|
|
2022
|
-
white-space: nowrap;
|
|
2023
|
-
user-select: all;
|
|
2024
|
-
vertical-align: middle;
|
|
2025
|
-
height: 20px;
|
|
2026
|
-
line-height: 1;
|
|
2027
|
-
}
|
|
2028
|
-
.mention-chip-icon {
|
|
2029
|
-
width: 14px;
|
|
2030
|
-
height: 14px;
|
|
2031
|
-
flex-shrink: 0;
|
|
2032
|
-
}
|
|
2033
|
-
.mention-chip-text {
|
|
2034
|
-
white-space: nowrap;
|
|
2035
|
-
overflow: hidden;
|
|
2036
|
-
text-overflow: ellipsis;
|
|
2037
|
-
max-width: 180px;
|
|
2038
|
-
}
|
|
2039
|
-
.ProseMirror {
|
|
2040
|
-
outline: none;
|
|
2041
|
-
min-height: 36px;
|
|
2042
|
-
max-height: 120px;
|
|
2043
|
-
overflow-y: auto;
|
|
2044
|
-
}
|
|
2045
|
-
.ProseMirror p {
|
|
2046
|
-
margin: 0;
|
|
2047
|
-
}
|
|
2048
|
-
.ProseMirror p.is-editor-empty:first-child::before {
|
|
2049
|
-
content: attr(data-placeholder);
|
|
2050
|
-
float: left;
|
|
2051
|
-
color: #9ca3af;
|
|
2052
|
-
pointer-events: none;
|
|
2053
|
-
height: 0;
|
|
2054
|
-
}
|
|
2055
|
-
`;
|
|
2056
|
-
function plainTextToTiptapContent(text) {
|
|
2057
|
-
return {
|
|
2058
|
-
type: "doc",
|
|
2059
|
-
content: text.split("\n").map((line) => ({
|
|
2060
|
-
type: "paragraph",
|
|
2061
|
-
...line.length > 0 ? { content: [{ type: "text", text: line }] } : {}
|
|
2062
|
-
}))
|
|
2063
|
-
};
|
|
2064
|
-
}
|
|
2065
|
-
const NO_WEBPAGES = [];
|
|
2066
|
-
const TiptapComposer = forwardRef(({ placeholder = "Message Athena... (type @ to mention)", threadId, disabled = false, webpages = NO_WEBPAGES, rootCategories, onDraftStateChange, interceptSubmit }, outerRef) => {
|
|
2067
|
-
const aui = useAui();
|
|
2068
|
-
const composerInput = unstable_useComposerInput();
|
|
2069
|
-
const applyingRuntimeTextRef = useRef(false);
|
|
2070
|
-
const listRef = useRef(null);
|
|
2071
|
-
const pendingUploadsRef = useRef(new PendingAttachmentUploads());
|
|
2072
|
-
const submitInFlightRef = useRef(false);
|
|
2073
|
-
const { store } = useMentionSuggestions({ webpages, rootCategories });
|
|
2074
|
-
const [popupOpen, setPopupOpen] = useState(false);
|
|
2075
|
-
const popupOpenRef = useRef(false);
|
|
2076
|
-
const [popupProps, setPopupProps] = useState(null);
|
|
2077
|
-
const callbacksRef = useRef({
|
|
2078
|
-
onStart: (props) => {
|
|
2079
|
-
setPopupOpen(true);
|
|
2080
|
-
popupOpenRef.current = true;
|
|
2081
|
-
setPopupProps(props);
|
|
2082
|
-
},
|
|
2083
|
-
onUpdate: (props) => {
|
|
2084
|
-
setPopupProps(props);
|
|
2085
|
-
},
|
|
2086
|
-
onKeyDown: (event) => {
|
|
2087
|
-
var _a;
|
|
2088
|
-
return ((_a = listRef.current) == null ? void 0 : _a.onKeyDown(event)) ?? false;
|
|
2089
|
-
},
|
|
2090
|
-
onExit: () => {
|
|
2091
|
-
setPopupOpen(false);
|
|
2092
|
-
popupOpenRef.current = false;
|
|
2093
|
-
setPopupProps(null);
|
|
2094
|
-
}
|
|
2095
|
-
});
|
|
2096
|
-
const editorRef = useRef(null);
|
|
2097
|
-
const handleSubmit = useCallback(async () => {
|
|
2098
|
-
var _a;
|
|
2099
|
-
if (disabled) return;
|
|
2100
|
-
if (submitInFlightRef.current) return;
|
|
2101
|
-
submitInFlightRef.current = true;
|
|
2102
|
-
try {
|
|
2103
|
-
await pendingUploadsRef.current.waitForIdle();
|
|
2104
|
-
const ed = editorRef.current;
|
|
2105
|
-
if (!ed) return;
|
|
2106
|
-
const text = ed.getText({ blockSeparator: "\n" }).trim();
|
|
2107
|
-
if (!text) return;
|
|
2108
|
-
if (!composerInput.canSend) return;
|
|
2109
|
-
if (interceptSubmit) {
|
|
2110
|
-
const hasAttachments = (((_a = aui.composer.getState().attachments) == null ? void 0 : _a.length) ?? 0) > 0;
|
|
2111
|
-
if (!hasAttachments && await interceptSubmit(text)) {
|
|
2112
|
-
ed.commands.clearContent();
|
|
2113
|
-
onDraftStateChange == null ? void 0 : onDraftStateChange(false);
|
|
2114
|
-
return;
|
|
2115
|
-
}
|
|
2116
|
-
}
|
|
2117
|
-
composerInput.setText(text);
|
|
2118
|
-
composerInput.send({ steer: false });
|
|
2119
|
-
ed.commands.clearContent();
|
|
2120
|
-
onDraftStateChange == null ? void 0 : onDraftStateChange(false);
|
|
2121
|
-
} finally {
|
|
2122
|
-
submitInFlightRef.current = false;
|
|
2123
|
-
}
|
|
2124
|
-
}, [composerInput, disabled, interceptSubmit, onDraftStateChange]);
|
|
2125
|
-
const handleSubmitRef = useRef(handleSubmit);
|
|
2126
|
-
handleSubmitRef.current = handleSubmit;
|
|
2127
|
-
const addAttachment = useCallback(
|
|
2128
|
-
(file) => pendingUploadsRef.current.track(aui.composer.addAttachment(file)),
|
|
2129
|
-
[aui]
|
|
2130
|
-
);
|
|
2131
|
-
const handlePaste = useCallback(
|
|
2132
|
-
(_view, event) => {
|
|
2133
|
-
var _a;
|
|
2134
|
-
const items = (_a = event.clipboardData) == null ? void 0 : _a.items;
|
|
2135
|
-
if (!items) return false;
|
|
2136
|
-
let handled = false;
|
|
2137
|
-
for (const item of items) {
|
|
2138
|
-
if (item.type.startsWith("image/")) {
|
|
2139
|
-
event.preventDefault();
|
|
2140
|
-
const blob = item.getAsFile();
|
|
2141
|
-
if (blob) {
|
|
2142
|
-
const ext = item.type.split("/")[1] || "png";
|
|
2143
|
-
const file = new File([blob], `pasted-image-${Date.now()}.${ext}`, { type: item.type });
|
|
2144
|
-
void addAttachment(file).catch((error) => {
|
|
2145
|
-
athenaDiagnostics.error(
|
|
2146
|
-
"composer.attachment.error",
|
|
2147
|
-
error,
|
|
2148
|
-
{ code: "attachment_failed", message: "Pasted image upload failed" },
|
|
2149
|
-
{ source: "paste", type: file.type }
|
|
2150
|
-
);
|
|
2151
|
-
});
|
|
2152
|
-
}
|
|
2153
|
-
handled = true;
|
|
2154
|
-
}
|
|
2155
|
-
}
|
|
2156
|
-
return handled;
|
|
2157
|
-
},
|
|
2158
|
-
[addAttachment]
|
|
2159
|
-
);
|
|
2160
|
-
const handleDrop = useCallback(
|
|
2161
|
-
(_view, event) => {
|
|
2162
|
-
var _a;
|
|
2163
|
-
const files = (_a = event.dataTransfer) == null ? void 0 : _a.files;
|
|
2164
|
-
if (!(files == null ? void 0 : files.length)) return false;
|
|
2165
|
-
let handled = false;
|
|
2166
|
-
for (const file of files) {
|
|
2167
|
-
if (file.type.startsWith("image/")) {
|
|
2168
|
-
event.preventDefault();
|
|
2169
|
-
void addAttachment(file).catch((error) => {
|
|
2170
|
-
athenaDiagnostics.error(
|
|
2171
|
-
"composer.attachment.error",
|
|
2172
|
-
error,
|
|
2173
|
-
{ code: "attachment_failed", message: "Dropped image upload failed" },
|
|
2174
|
-
{ source: "drop", type: file.type }
|
|
2175
|
-
);
|
|
2176
|
-
});
|
|
2177
|
-
handled = true;
|
|
2178
|
-
}
|
|
2179
|
-
}
|
|
2180
|
-
return handled;
|
|
2181
|
-
},
|
|
2182
|
-
[addAttachment]
|
|
2183
|
-
);
|
|
2184
|
-
const editor = useEditor({
|
|
2185
|
-
editable: !disabled,
|
|
2186
|
-
extensions: [
|
|
2187
|
-
StarterKit.configure({
|
|
2188
|
-
heading: false,
|
|
2189
|
-
blockquote: false,
|
|
2190
|
-
bulletList: false,
|
|
2191
|
-
orderedList: false,
|
|
2192
|
-
codeBlock: false,
|
|
2193
|
-
horizontalRule: false
|
|
2194
|
-
}),
|
|
2195
|
-
Placeholder.configure({ placeholder }),
|
|
2196
|
-
MentionExtension,
|
|
2197
|
-
MentionSuggestionsExtension.configure({
|
|
2198
|
-
store,
|
|
2199
|
-
callbacks: callbacksRef.current
|
|
2200
|
-
}),
|
|
2201
|
-
SubmitKeybind.configure({
|
|
2202
|
-
onSubmit: () => void handleSubmitRef.current(),
|
|
2203
|
-
isMentionOpen: () => popupOpenRef.current
|
|
2204
|
-
})
|
|
2205
|
-
],
|
|
2206
|
-
editorProps: {
|
|
2207
|
-
attributes: {
|
|
2208
|
-
class: "w-full resize-none bg-transparent px-1.5 py-2 text-sm leading-snug outline-none",
|
|
2209
|
-
"data-testid": "athena-chat-composer"
|
|
2210
|
-
},
|
|
2211
|
-
handlePaste,
|
|
2212
|
-
handleDrop
|
|
2213
|
-
},
|
|
2214
|
-
onUpdate: ({ editor: updatedEditor }) => {
|
|
2215
|
-
const nextText = updatedEditor.getText({ blockSeparator: "\n" });
|
|
2216
|
-
if (!applyingRuntimeTextRef.current) {
|
|
2217
|
-
composerInput.setText(nextText);
|
|
2218
|
-
}
|
|
2219
|
-
onDraftStateChange == null ? void 0 : onDraftStateChange(nextText.trim().length > 0);
|
|
2220
|
-
},
|
|
2221
|
-
immediatelyRender: false
|
|
2222
|
-
});
|
|
2223
|
-
editorRef.current = editor;
|
|
2224
|
-
useEffect(() => {
|
|
2225
|
-
editor == null ? void 0 : editor.setEditable(!disabled);
|
|
2226
|
-
}, [disabled, editor]);
|
|
2227
|
-
useEffect(() => {
|
|
2228
|
-
if (!editor) return;
|
|
2229
|
-
const editorText = editor.getText({ blockSeparator: "\n" });
|
|
2230
|
-
if (editorText === composerInput.value) return;
|
|
2231
|
-
applyingRuntimeTextRef.current = true;
|
|
2232
|
-
editor.commands.setContent(plainTextToTiptapContent(composerInput.value));
|
|
2233
|
-
applyingRuntimeTextRef.current = false;
|
|
2234
|
-
onDraftStateChange == null ? void 0 : onDraftStateChange(composerInput.value.trim().length > 0);
|
|
2235
|
-
}, [composerInput.value, editor, onDraftStateChange]);
|
|
2236
|
-
const insertAssetMention = useCallback((asset) => {
|
|
2237
|
-
const currentEditor = editorRef.current;
|
|
2238
|
-
if (!currentEditor) throw new Error("The chat composer is not ready.");
|
|
2239
|
-
currentEditor.chain().focus().insertContent({
|
|
2240
|
-
type: "mention",
|
|
2241
|
-
attrs: {
|
|
2242
|
-
type: "asset",
|
|
2243
|
-
name: asset.title,
|
|
2244
|
-
id: asset.id,
|
|
2245
|
-
assetType: asset.assetType
|
|
2246
|
-
}
|
|
2247
|
-
}).insertContent(" ").run();
|
|
2248
|
-
}, []);
|
|
2249
|
-
useEffect(
|
|
2250
|
-
() => registerChatAssetMentionHandler(threadId, insertAssetMention),
|
|
2251
|
-
[insertAssetMention, threadId]
|
|
2252
|
-
);
|
|
2253
|
-
useImperativeHandle(
|
|
2254
|
-
outerRef,
|
|
2255
|
-
() => ({ submit: handleSubmit, addAttachment, insertAssetMention }),
|
|
2256
|
-
[addAttachment, handleSubmit, insertAssetMention]
|
|
2257
|
-
);
|
|
2258
|
-
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
2259
|
-
/* @__PURE__ */ jsx("style", { children: MENTION_STYLES }),
|
|
2260
|
-
/* @__PURE__ */ jsx(
|
|
2261
|
-
"div",
|
|
2262
|
-
{
|
|
2263
|
-
className: "flex-1 min-w-0",
|
|
2264
|
-
"aria-label": "Message composer",
|
|
2265
|
-
"aria-disabled": disabled,
|
|
2266
|
-
children: /* @__PURE__ */ jsx(EditorContent, { editor })
|
|
2267
|
-
}
|
|
2268
|
-
),
|
|
2269
|
-
popupOpen && popupProps && editor && /* @__PURE__ */ jsx(MentionSuggestionPopup, { clientRect: popupProps.clientRect, children: /* @__PURE__ */ jsx(
|
|
2270
|
-
MentionSuggestionList,
|
|
2271
|
-
{
|
|
2272
|
-
ref: listRef,
|
|
2273
|
-
store,
|
|
2274
|
-
editor,
|
|
2275
|
-
query: popupProps.query,
|
|
2276
|
-
command: (item) => popupProps.command(item),
|
|
2277
|
-
closeMenu: () => {
|
|
2278
|
-
setPopupOpen(false);
|
|
2279
|
-
editor.commands.focus();
|
|
2280
|
-
}
|
|
2281
|
-
}
|
|
2282
|
-
) })
|
|
2283
|
-
] });
|
|
2284
|
-
});
|
|
2285
|
-
TiptapComposer.displayName = "TiptapComposer";
|
|
2286
|
-
const SignInCard = ({
|
|
2287
|
-
buildLabel,
|
|
2288
|
-
subtitle,
|
|
2289
|
-
children,
|
|
2290
|
-
error,
|
|
2291
|
-
notice,
|
|
2292
|
-
primaryLabel,
|
|
2293
|
-
primaryPendingLabel,
|
|
2294
|
-
isPending,
|
|
2295
|
-
disabled = false,
|
|
2296
|
-
onPrimary,
|
|
2297
|
-
footer
|
|
2298
|
-
}) => (
|
|
2299
|
-
// `min-h-full` centers the card in hosts whose root is not a flex container.
|
|
2300
|
-
/* @__PURE__ */ jsx("div", { className: "flex min-h-full flex-1 flex-col items-center justify-center bg-muted/20 p-5", children: /* @__PURE__ */ jsxs("div", { className: "w-full max-w-sm space-y-5 rounded-2xl border bg-background/95 p-5 shadow-sm", children: [
|
|
2301
|
-
/* @__PURE__ */ jsxs("div", { className: "text-center", children: [
|
|
2302
|
-
/* @__PURE__ */ jsx("h2", { className: "text-base font-semibold tracking-tight text-foreground", children: "Sign in to Athena" }),
|
|
2303
|
-
buildLabel ? /* @__PURE__ */ jsx("p", { className: "mt-1 text-[11px] font-medium uppercase tracking-wide text-muted-foreground", children: buildLabel }) : null,
|
|
2304
|
-
subtitle ? /* @__PURE__ */ jsx("p", { className: "mt-1.5 text-xs leading-relaxed text-muted-foreground", children: subtitle }) : null
|
|
2305
|
-
] }),
|
|
2306
|
-
children ? /* @__PURE__ */ jsx("div", { className: "space-y-3", children }) : null,
|
|
2307
|
-
notice ? /* @__PURE__ */ jsx("p", { className: "text-xs leading-relaxed text-muted-foreground", children: notice }) : null,
|
|
2308
|
-
/* @__PURE__ */ jsx("div", { role: "status", "aria-live": "polite", children: error ? /* @__PURE__ */ jsx("p", { className: "text-xs text-destructive", children: error }) : null }),
|
|
2309
|
-
/* @__PURE__ */ jsx(
|
|
2310
|
-
"button",
|
|
2311
|
-
{
|
|
2312
|
-
type: "button",
|
|
2313
|
-
className: "h-10 w-full rounded-lg bg-primary px-4 text-sm font-semibold text-primary-foreground shadow-sm transition-colors hover:bg-primary/90 disabled:cursor-not-allowed disabled:opacity-40",
|
|
2314
|
-
onClick: onPrimary,
|
|
2315
|
-
disabled: isPending || disabled,
|
|
2316
|
-
children: isPending ? primaryPendingLabel : primaryLabel
|
|
2317
|
-
}
|
|
2318
|
-
),
|
|
2319
|
-
footer
|
|
2320
|
-
] }) })
|
|
2321
|
-
);
|
|
2322
|
-
const SignInSelect = ({ id, label, value, options, onChange, hint }) => /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
|
|
2323
|
-
/* @__PURE__ */ jsx(
|
|
2324
|
-
"label",
|
|
2325
|
-
{
|
|
2326
|
-
htmlFor: id,
|
|
2327
|
-
className: "text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",
|
|
2328
|
-
children: label
|
|
2329
|
-
}
|
|
2330
|
-
),
|
|
2331
|
-
/* @__PURE__ */ jsx(
|
|
2332
|
-
"select",
|
|
2333
|
-
{
|
|
2334
|
-
id,
|
|
2335
|
-
className: "h-10 w-full rounded-lg border bg-background px-3 text-sm outline-none transition-shadow focus:ring-2 focus:ring-ring/20",
|
|
2336
|
-
value,
|
|
2337
|
-
onChange: (event) => onChange(event.target.value),
|
|
2338
|
-
children: options.map((option) => /* @__PURE__ */ jsx("option", { value: option.value, children: option.label }, option.value))
|
|
2339
|
-
}
|
|
2340
|
-
),
|
|
2341
|
-
hint ? /* @__PURE__ */ jsx("p", { className: "px-1 text-[10px] text-muted-foreground", children: hint }) : null
|
|
2342
|
-
] });
|
|
2343
|
-
const SignInTextField = ({ label, placeholder, value, onChange, type = "text", className }) => /* @__PURE__ */ jsxs("label", { className: "block space-y-1", children: [
|
|
2344
|
-
/* @__PURE__ */ jsx("span", { className: "text-[10px] font-semibold uppercase tracking-wide text-muted-foreground", children: label }),
|
|
2345
|
-
/* @__PURE__ */ jsx(
|
|
2346
|
-
"input",
|
|
2347
|
-
{
|
|
2348
|
-
className: cn(
|
|
2349
|
-
"h-9 w-full rounded-md border bg-background px-2.5 text-xs outline-none focus:ring-2 focus:ring-ring/20",
|
|
2350
|
-
className
|
|
2351
|
-
),
|
|
2352
|
-
type,
|
|
2353
|
-
placeholder,
|
|
2354
|
-
value,
|
|
2355
|
-
onChange: (event) => onChange(event.target.value)
|
|
2356
|
-
}
|
|
2357
|
-
)
|
|
2358
|
-
] });
|
|
2359
|
-
const SignInFallbackSection = ({ isOpen, onToggle, label, children }) => {
|
|
2360
|
-
const contentId = useId();
|
|
2361
|
-
return /* @__PURE__ */ jsxs("div", { className: "border-t pt-3", children: [
|
|
2362
|
-
/* @__PURE__ */ jsxs(
|
|
2363
|
-
"button",
|
|
2364
|
-
{
|
|
2365
|
-
type: "button",
|
|
2366
|
-
"aria-expanded": isOpen,
|
|
2367
|
-
"aria-controls": contentId,
|
|
2368
|
-
className: "w-full text-left text-[11px] font-medium text-muted-foreground hover:text-foreground",
|
|
2369
|
-
onClick: onToggle,
|
|
2370
|
-
children: [
|
|
2371
|
-
isOpen ? "Hide" : "Show",
|
|
2372
|
-
" ",
|
|
2373
|
-
label
|
|
2374
|
-
]
|
|
2375
|
-
}
|
|
2376
|
-
),
|
|
2377
|
-
isOpen ? /* @__PURE__ */ jsx("div", { id: contentId, className: "mt-3 space-y-2", children }) : null
|
|
2378
|
-
] });
|
|
2379
|
-
};
|
|
2380
|
-
const SignInSecondaryButton = ({ onClick, disabled = false, children }) => /* @__PURE__ */ jsx(
|
|
2381
|
-
"button",
|
|
2382
|
-
{
|
|
2383
|
-
type: "button",
|
|
2384
|
-
className: "h-9 w-full rounded-lg border bg-background text-xs font-medium hover:bg-muted disabled:opacity-40",
|
|
2385
|
-
disabled,
|
|
2386
|
-
onClick,
|
|
2387
|
-
children
|
|
2388
|
-
}
|
|
2389
|
-
);
|
|
2390
|
-
const SignInConsent = ({ checked, onChange, children }) => /* @__PURE__ */ jsxs("label", { className: "flex cursor-pointer items-start gap-2.5 rounded-lg border bg-muted/30 p-3 text-xs leading-relaxed text-muted-foreground", children: [
|
|
2391
|
-
/* @__PURE__ */ jsx(
|
|
2392
|
-
"input",
|
|
2393
|
-
{
|
|
2394
|
-
type: "checkbox",
|
|
2395
|
-
className: "mt-0.5 h-4 w-4 shrink-0 accent-primary",
|
|
2396
|
-
checked,
|
|
2397
|
-
onChange: (event) => onChange(event.target.checked)
|
|
2398
|
-
}
|
|
2399
|
-
),
|
|
2400
|
-
/* @__PURE__ */ jsx("span", { children })
|
|
2401
|
-
] });
|
|
2402
|
-
export {
|
|
2403
|
-
O as BranchPicker,
|
|
2404
|
-
Q as COMPOSER_DOCK_CLASS,
|
|
2405
|
-
U as COMPOSER_EDITOR_ROW_CLASS,
|
|
2406
|
-
V as COMPOSER_SURFACE_CLASS,
|
|
2407
|
-
X as COMPOSER_TOOLBAR_CLASS,
|
|
2408
|
-
Y as ChatComposerDock,
|
|
2409
|
-
ChatHeader,
|
|
2410
|
-
ChatHeaderActions,
|
|
2411
|
-
ChatHeaderIdentity,
|
|
2412
|
-
ChatHeaderRoot,
|
|
2413
|
-
Z as ChatThreadShell,
|
|
2414
|
-
_ as ComposerSendButton,
|
|
2415
|
-
$ as ComposerSendOrStop,
|
|
2416
|
-
a0 as ComposerStopButton,
|
|
2417
|
-
C as ContinuePill,
|
|
2418
|
-
ConversationHistoryPanel,
|
|
2419
|
-
g as HISTORY_EDGE_NEAR_MARGIN_PX,
|
|
2420
|
-
H as HITL_PENDING_RESUME_GRACE_MS,
|
|
2421
|
-
a as HistoryEdgeRow,
|
|
2422
|
-
a1 as IconButton,
|
|
2423
|
-
a2 as MarkdownText,
|
|
2424
|
-
a3 as MentionAuthCtx,
|
|
2425
|
-
a4 as MentionChip,
|
|
2426
|
-
MentionExtension,
|
|
2427
|
-
MentionIcon,
|
|
2428
|
-
a5 as MentionLink,
|
|
2429
|
-
MentionMenuSection,
|
|
2430
|
-
MentionSuggestionList,
|
|
2431
|
-
MentionSuggestionPopup,
|
|
2432
|
-
MentionSuggestionsExtension,
|
|
2433
|
-
MenuList,
|
|
2434
|
-
a6 as MessageActionsReadOnlyProvider,
|
|
2435
|
-
PendingAttachmentUploads,
|
|
2436
|
-
ROOT_MENTION_CATEGORIES,
|
|
2437
|
-
R as RuntimeMessageCard,
|
|
2438
|
-
SIMPLE_SEARCH_QUERY,
|
|
2439
|
-
SignInCard,
|
|
2440
|
-
SignInConsent,
|
|
2441
|
-
SignInFallbackSection,
|
|
2442
|
-
SignInSecondaryButton,
|
|
2443
|
-
SignInSelect,
|
|
2444
|
-
SignInTextField,
|
|
2445
|
-
a7 as SmallIconButton,
|
|
2446
|
-
S as StatewireApprovalCard,
|
|
2447
|
-
S2 as StatewireContinueRunAffordance,
|
|
2448
|
-
a10 as StatewireContinueRunButton,
|
|
2449
|
-
b as StatewireHistoryEdge,
|
|
2450
|
-
c as StatewireQueuedMessages,
|
|
2451
|
-
b2 as StatewireRunEndedFooter,
|
|
2452
|
-
d as StatewireToolOutputsContext,
|
|
2453
|
-
THREAD_HEADER_ACTIONS_CLASS,
|
|
2454
|
-
THREAD_HEADER_CLASS,
|
|
2455
|
-
a8 as THREAD_HEADER_ICON_CLASS,
|
|
2456
|
-
THREAD_HEADER_PILL_CLASS,
|
|
2457
|
-
a9 as THREAD_PANEL_CLASS,
|
|
2458
|
-
aa as THREAD_SCROLL_TO_BOTTOM_CLASS,
|
|
2459
|
-
T as THREAD_VIEWPORT_ATTR,
|
|
2460
|
-
ab as TextShimmerLoader,
|
|
2461
|
-
ac as ThreadRunningIndicator,
|
|
2462
|
-
TiptapComposer,
|
|
2463
|
-
ad as UserEditComposer,
|
|
2464
|
-
ae as UserMessage,
|
|
2465
|
-
assetTypeToIcon,
|
|
2466
|
-
assetTypeToThumb,
|
|
2467
|
-
buildRootMenuItems,
|
|
2468
|
-
af as configureAssetIconBasePath,
|
|
2469
|
-
ag as createAssistantMessage,
|
|
2470
|
-
ah as createOlympusAssetUrl,
|
|
2471
|
-
fetchGraphQL,
|
|
2472
|
-
makeMentionUrl,
|
|
2473
|
-
ai as normalizeAthenaMentionHtml,
|
|
2474
|
-
parseMentionAnchorAttributes,
|
|
2475
|
-
aj as parseMentionUrl,
|
|
2476
|
-
ak as parseMentionsInText,
|
|
2477
|
-
plainTextToTiptapContent,
|
|
2478
|
-
al as resolveComposerAction,
|
|
2479
|
-
useMentionAuth,
|
|
2480
|
-
useMentionSuggestions,
|
|
2481
|
-
am as useMessageActionsReadOnly,
|
|
2482
|
-
u as useStatewireApprovalRequest,
|
|
2483
|
-
e as useStatewireToolOutputs,
|
|
2484
|
-
webpageMentionFingerprint
|
|
2485
|
-
};
|
|
2486
|
-
//# sourceMappingURL=chat-ui.js.map
|