@agent-native/toolkit 0.0.0-beta-20260819143124
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 +151 -0
- package/agent-native.eject.json +588 -0
- package/dist/app-shell/header-actions.d.ts +18 -0
- package/dist/app-shell/header-actions.d.ts.map +1 -0
- package/dist/app-shell/header-actions.js +52 -0
- package/dist/app-shell/header-actions.js.map +1 -0
- package/dist/app-shell/index.d.ts +3 -0
- package/dist/app-shell/index.d.ts.map +1 -0
- package/dist/app-shell/index.js +3 -0
- package/dist/app-shell/index.js.map +1 -0
- package/dist/app-shell/sidebar-footer-actions.d.ts +14 -0
- package/dist/app-shell/sidebar-footer-actions.d.ts.map +1 -0
- package/dist/app-shell/sidebar-footer-actions.js +10 -0
- package/dist/app-shell/sidebar-footer-actions.js.map +1 -0
- package/dist/app-shell/sidebar-footer-actions.spec.d.ts +2 -0
- package/dist/app-shell/sidebar-footer-actions.spec.d.ts.map +1 -0
- package/dist/app-shell/sidebar-footer-actions.spec.js +43 -0
- package/dist/app-shell/sidebar-footer-actions.spec.js.map +1 -0
- package/dist/canvas-annotations/CanvasCommentPins.d.ts +68 -0
- package/dist/canvas-annotations/CanvasCommentPins.d.ts.map +1 -0
- package/dist/canvas-annotations/CanvasCommentPins.js +513 -0
- package/dist/canvas-annotations/CanvasCommentPins.js.map +1 -0
- package/dist/canvas-annotations/DrawOverlay.d.ts +108 -0
- package/dist/canvas-annotations/DrawOverlay.d.ts.map +1 -0
- package/dist/canvas-annotations/DrawOverlay.js +746 -0
- package/dist/canvas-annotations/DrawOverlay.js.map +1 -0
- package/dist/canvas-annotations/DrawOverlay.spec.d.ts +2 -0
- package/dist/canvas-annotations/DrawOverlay.spec.d.ts.map +1 -0
- package/dist/canvas-annotations/DrawOverlay.spec.js +111 -0
- package/dist/canvas-annotations/DrawOverlay.spec.js.map +1 -0
- package/dist/canvas-annotations/index.d.ts +4 -0
- package/dist/canvas-annotations/index.d.ts.map +1 -0
- package/dist/canvas-annotations/index.js +3 -0
- package/dist/canvas-annotations/index.js.map +1 -0
- package/dist/canvas-annotations/types.d.ts +8 -0
- package/dist/canvas-annotations/types.d.ts.map +1 -0
- package/dist/canvas-annotations/types.js +2 -0
- package/dist/canvas-annotations/types.js.map +1 -0
- package/dist/canvas-interactions/canvas-interactions.d.ts +334 -0
- package/dist/canvas-interactions/canvas-interactions.d.ts.map +1 -0
- package/dist/canvas-interactions/canvas-interactions.js +486 -0
- package/dist/canvas-interactions/canvas-interactions.js.map +1 -0
- package/dist/canvas-interactions/canvas-interactions.spec.d.ts +2 -0
- package/dist/canvas-interactions/canvas-interactions.spec.d.ts.map +1 -0
- package/dist/canvas-interactions/canvas-interactions.spec.js +593 -0
- package/dist/canvas-interactions/canvas-interactions.spec.js.map +1 -0
- package/dist/canvas-interactions/index.d.ts +2 -0
- package/dist/canvas-interactions/index.d.ts.map +1 -0
- package/dist/canvas-interactions/index.js +2 -0
- package/dist/canvas-interactions/index.js.map +1 -0
- package/dist/chat-history/ChatHistoryList.d.ts +103 -0
- package/dist/chat-history/ChatHistoryList.d.ts.map +1 -0
- package/dist/chat-history/ChatHistoryList.js +102 -0
- package/dist/chat-history/ChatHistoryList.js.map +1 -0
- package/dist/chat-history/ChatHistoryList.spec.d.ts +2 -0
- package/dist/chat-history/ChatHistoryList.spec.d.ts.map +1 -0
- package/dist/chat-history/ChatHistoryList.spec.js +293 -0
- package/dist/chat-history/ChatHistoryList.spec.js.map +1 -0
- package/dist/chat-history/ChatHistoryRail.d.ts +33 -0
- package/dist/chat-history/ChatHistoryRail.d.ts.map +1 -0
- package/dist/chat-history/ChatHistoryRail.js +35 -0
- package/dist/chat-history/ChatHistoryRail.js.map +1 -0
- package/dist/chat-history/ChatHistoryRail.spec.d.ts +2 -0
- package/dist/chat-history/ChatHistoryRail.spec.d.ts.map +1 -0
- package/dist/chat-history/ChatHistoryRail.spec.js +157 -0
- package/dist/chat-history/ChatHistoryRail.spec.js.map +1 -0
- package/dist/chat-history/index.d.ts +4 -0
- package/dist/chat-history/index.d.ts.map +1 -0
- package/dist/chat-history/index.js +4 -0
- package/dist/chat-history/index.js.map +1 -0
- package/dist/chat-history/useChatHistoryRailController.d.ts +26 -0
- package/dist/chat-history/useChatHistoryRailController.d.ts.map +1 -0
- package/dist/chat-history/useChatHistoryRailController.js +36 -0
- package/dist/chat-history/useChatHistoryRailController.js.map +1 -0
- package/dist/chat-history/useChatHistoryRailController.spec.d.ts +2 -0
- package/dist/chat-history/useChatHistoryRailController.spec.d.ts.map +1 -0
- package/dist/chat-history/useChatHistoryRailController.spec.js +101 -0
- package/dist/chat-history/useChatHistoryRailController.spec.js.map +1 -0
- package/dist/chat-history.css +469 -0
- package/dist/collab-ui/AgentPresenceChip.d.ts +12 -0
- package/dist/collab-ui/AgentPresenceChip.d.ts.map +1 -0
- package/dist/collab-ui/AgentPresenceChip.js +42 -0
- package/dist/collab-ui/AgentPresenceChip.js.map +1 -0
- package/dist/collab-ui/LiveCursorOverlay.d.ts +46 -0
- package/dist/collab-ui/LiveCursorOverlay.d.ts.map +1 -0
- package/dist/collab-ui/LiveCursorOverlay.js +125 -0
- package/dist/collab-ui/LiveCursorOverlay.js.map +1 -0
- package/dist/collab-ui/PresenceBar.d.ts +30 -0
- package/dist/collab-ui/PresenceBar.d.ts.map +1 -0
- package/dist/collab-ui/PresenceBar.js +172 -0
- package/dist/collab-ui/PresenceBar.js.map +1 -0
- package/dist/collab-ui/PresenceBar.spec.d.ts +2 -0
- package/dist/collab-ui/PresenceBar.spec.d.ts.map +1 -0
- package/dist/collab-ui/PresenceBar.spec.js +30 -0
- package/dist/collab-ui/PresenceBar.spec.js.map +1 -0
- package/dist/collab-ui/RecentEditHighlights.d.ts +46 -0
- package/dist/collab-ui/RecentEditHighlights.d.ts.map +1 -0
- package/dist/collab-ui/RecentEditHighlights.js +154 -0
- package/dist/collab-ui/RecentEditHighlights.js.map +1 -0
- package/dist/collab-ui/RemoteSelectionRings.d.ts +53 -0
- package/dist/collab-ui/RemoteSelectionRings.d.ts.map +1 -0
- package/dist/collab-ui/RemoteSelectionRings.js +130 -0
- package/dist/collab-ui/RemoteSelectionRings.js.map +1 -0
- package/dist/collab-ui/agent-identity.d.ts +9 -0
- package/dist/collab-ui/agent-identity.d.ts.map +1 -0
- package/dist/collab-ui/agent-identity.js +9 -0
- package/dist/collab-ui/agent-identity.js.map +1 -0
- package/dist/collab-ui/index.d.ts +9 -0
- package/dist/collab-ui/index.d.ts.map +1 -0
- package/dist/collab-ui/index.js +9 -0
- package/dist/collab-ui/index.js.map +1 -0
- package/dist/collab-ui/lead-client.d.ts +3 -0
- package/dist/collab-ui/lead-client.d.ts.map +1 -0
- package/dist/collab-ui/lead-client.js +29 -0
- package/dist/collab-ui/lead-client.js.map +1 -0
- package/dist/collab-ui/types.d.ts +48 -0
- package/dist/collab-ui/types.d.ts.map +1 -0
- package/dist/collab-ui/types.js +52 -0
- package/dist/collab-ui/types.js.map +1 -0
- package/dist/collab-ui/types.spec.d.ts +2 -0
- package/dist/collab-ui/types.spec.d.ts.map +1 -0
- package/dist/collab-ui/types.spec.js +15 -0
- package/dist/collab-ui/types.spec.js.map +1 -0
- package/dist/composer/AgentComposerFrame.d.ts +19 -0
- package/dist/composer/AgentComposerFrame.d.ts.map +1 -0
- package/dist/composer/AgentComposerFrame.js +17 -0
- package/dist/composer/AgentComposerFrame.js.map +1 -0
- package/dist/composer/ComposerPlusMenu.d.ts +30 -0
- package/dist/composer/ComposerPlusMenu.d.ts.map +1 -0
- package/dist/composer/ComposerPlusMenu.js +635 -0
- package/dist/composer/ComposerPlusMenu.js.map +1 -0
- package/dist/composer/ComposerPlusMenu.spec.d.ts +2 -0
- package/dist/composer/ComposerPlusMenu.spec.d.ts.map +1 -0
- package/dist/composer/ComposerPlusMenu.spec.js +12 -0
- package/dist/composer/ComposerPlusMenu.spec.js.map +1 -0
- package/dist/composer/MentionPopover.d.ts +29 -0
- package/dist/composer/MentionPopover.d.ts.map +1 -0
- package/dist/composer/MentionPopover.js +221 -0
- package/dist/composer/MentionPopover.js.map +1 -0
- package/dist/composer/PastedTextChip.d.ts +9 -0
- package/dist/composer/PastedTextChip.d.ts.map +1 -0
- package/dist/composer/PastedTextChip.js +71 -0
- package/dist/composer/PastedTextChip.js.map +1 -0
- package/dist/composer/PastedTextChip.spec.d.ts +2 -0
- package/dist/composer/PastedTextChip.spec.d.ts.map +1 -0
- package/dist/composer/PastedTextChip.spec.js +42 -0
- package/dist/composer/PastedTextChip.spec.js.map +1 -0
- package/dist/composer/PromptComposer.d.ts +151 -0
- package/dist/composer/PromptComposer.d.ts.map +1 -0
- package/dist/composer/PromptComposer.js +322 -0
- package/dist/composer/PromptComposer.js.map +1 -0
- package/dist/composer/PromptComposer.spec.d.ts +2 -0
- package/dist/composer/PromptComposer.spec.d.ts.map +1 -0
- package/dist/composer/PromptComposer.spec.js +87 -0
- package/dist/composer/PromptComposer.spec.js.map +1 -0
- package/dist/composer/RealtimeVoiceMode.d.ts +108 -0
- package/dist/composer/RealtimeVoiceMode.d.ts.map +1 -0
- package/dist/composer/RealtimeVoiceMode.js +312 -0
- package/dist/composer/RealtimeVoiceMode.js.map +1 -0
- package/dist/composer/RealtimeVoiceMode.spec.d.ts +2 -0
- package/dist/composer/RealtimeVoiceMode.spec.d.ts.map +1 -0
- package/dist/composer/RealtimeVoiceMode.spec.js +540 -0
- package/dist/composer/RealtimeVoiceMode.spec.js.map +1 -0
- package/dist/composer/TiptapComposer.d.ts +288 -0
- package/dist/composer/TiptapComposer.d.ts.map +1 -0
- package/dist/composer/TiptapComposer.js +2233 -0
- package/dist/composer/TiptapComposer.js.map +1 -0
- package/dist/composer/TiptapComposer.spec.d.ts +2 -0
- package/dist/composer/TiptapComposer.spec.d.ts.map +1 -0
- package/dist/composer/TiptapComposer.spec.js +415 -0
- package/dist/composer/TiptapComposer.spec.js.map +1 -0
- package/dist/composer/VoiceButton.d.ts +27 -0
- package/dist/composer/VoiceButton.d.ts.map +1 -0
- package/dist/composer/VoiceButton.js +151 -0
- package/dist/composer/VoiceButton.js.map +1 -0
- package/dist/composer/VoiceButton.spec.d.ts +2 -0
- package/dist/composer/VoiceButton.spec.d.ts.map +1 -0
- package/dist/composer/VoiceButton.spec.js +27 -0
- package/dist/composer/VoiceButton.spec.js.map +1 -0
- package/dist/composer/asset-picker-url.d.ts +16 -0
- package/dist/composer/asset-picker-url.d.ts.map +1 -0
- package/dist/composer/asset-picker-url.js +64 -0
- package/dist/composer/asset-picker-url.js.map +1 -0
- package/dist/composer/asset-picker-url.spec.d.ts +2 -0
- package/dist/composer/asset-picker-url.spec.d.ts.map +1 -0
- package/dist/composer/asset-picker-url.spec.js +23 -0
- package/dist/composer/asset-picker-url.spec.js.map +1 -0
- package/dist/composer/attachment-accept.d.ts +9 -0
- package/dist/composer/attachment-accept.d.ts.map +1 -0
- package/dist/composer/attachment-accept.js +69 -0
- package/dist/composer/attachment-accept.js.map +1 -0
- package/dist/composer/attachment-accept.spec.d.ts +2 -0
- package/dist/composer/attachment-accept.spec.d.ts.map +1 -0
- package/dist/composer/attachment-accept.spec.js +24 -0
- package/dist/composer/attachment-accept.spec.js.map +1 -0
- package/dist/composer/draft-key.d.ts +2 -0
- package/dist/composer/draft-key.d.ts.map +1 -0
- package/dist/composer/draft-key.js +8 -0
- package/dist/composer/draft-key.js.map +1 -0
- package/dist/composer/draft-key.spec.d.ts +2 -0
- package/dist/composer/draft-key.spec.d.ts.map +1 -0
- package/dist/composer/draft-key.spec.js +13 -0
- package/dist/composer/draft-key.spec.js.map +1 -0
- package/dist/composer/extensions/FileReference.d.ts +3 -0
- package/dist/composer/extensions/FileReference.d.ts.map +1 -0
- package/dist/composer/extensions/FileReference.js +36 -0
- package/dist/composer/extensions/FileReference.js.map +1 -0
- package/dist/composer/extensions/MentionReference.d.ts +3 -0
- package/dist/composer/extensions/MentionReference.d.ts.map +1 -0
- package/dist/composer/extensions/MentionReference.js +66 -0
- package/dist/composer/extensions/MentionReference.js.map +1 -0
- package/dist/composer/extensions/SkillReference.d.ts +3 -0
- package/dist/composer/extensions/SkillReference.d.ts.map +1 -0
- package/dist/composer/extensions/SkillReference.js +40 -0
- package/dist/composer/extensions/SkillReference.js.map +1 -0
- package/dist/composer/index.d.ts +16 -0
- package/dist/composer/index.d.ts.map +1 -0
- package/dist/composer/index.js +14 -0
- package/dist/composer/index.js.map +1 -0
- package/dist/composer/model-selection.d.ts +12 -0
- package/dist/composer/model-selection.d.ts.map +1 -0
- package/dist/composer/model-selection.js +31 -0
- package/dist/composer/model-selection.js.map +1 -0
- package/dist/composer/model-selection.spec.d.ts +2 -0
- package/dist/composer/model-selection.spec.d.ts.map +1 -0
- package/dist/composer/model-selection.spec.js +38 -0
- package/dist/composer/model-selection.spec.js.map +1 -0
- package/dist/composer/pasted-text.d.ts +31 -0
- package/dist/composer/pasted-text.d.ts.map +1 -0
- package/dist/composer/pasted-text.js +130 -0
- package/dist/composer/pasted-text.js.map +1 -0
- package/dist/composer/pasted-text.spec.d.ts +2 -0
- package/dist/composer/pasted-text.spec.d.ts.map +1 -0
- package/dist/composer/pasted-text.spec.js +107 -0
- package/dist/composer/pasted-text.spec.js.map +1 -0
- package/dist/composer/prompt-attachments.d.ts +18 -0
- package/dist/composer/prompt-attachments.d.ts.map +1 -0
- package/dist/composer/prompt-attachments.js +65 -0
- package/dist/composer/prompt-attachments.js.map +1 -0
- package/dist/composer/prompt-attachments.spec.d.ts +2 -0
- package/dist/composer/prompt-attachments.spec.d.ts.map +1 -0
- package/dist/composer/prompt-attachments.spec.js +63 -0
- package/dist/composer/prompt-attachments.spec.js.map +1 -0
- package/dist/composer/realtime-voice-audio-level.d.ts +14 -0
- package/dist/composer/realtime-voice-audio-level.d.ts.map +1 -0
- package/dist/composer/realtime-voice-audio-level.js +48 -0
- package/dist/composer/realtime-voice-audio-level.js.map +1 -0
- package/dist/composer/realtime-voice-audio-level.spec.d.ts +2 -0
- package/dist/composer/realtime-voice-audio-level.spec.d.ts.map +1 -0
- package/dist/composer/realtime-voice-audio-level.spec.js +32 -0
- package/dist/composer/realtime-voice-audio-level.spec.js.map +1 -0
- package/dist/composer/realtime-voice-transcript.d.ts +26 -0
- package/dist/composer/realtime-voice-transcript.d.ts.map +1 -0
- package/dist/composer/realtime-voice-transcript.js +103 -0
- package/dist/composer/realtime-voice-transcript.js.map +1 -0
- package/dist/composer/realtime-voice-transcript.spec.d.ts +2 -0
- package/dist/composer/realtime-voice-transcript.spec.d.ts.map +1 -0
- package/dist/composer/realtime-voice-transcript.spec.js +76 -0
- package/dist/composer/realtime-voice-transcript.spec.js.map +1 -0
- package/dist/composer/runtime-adapters.d.ts +169 -0
- package/dist/composer/runtime-adapters.d.ts.map +1 -0
- package/dist/composer/runtime-adapters.js +141 -0
- package/dist/composer/runtime-adapters.js.map +1 -0
- package/dist/composer/runtime-adapters.spec.d.ts +2 -0
- package/dist/composer/runtime-adapters.spec.d.ts.map +1 -0
- package/dist/composer/runtime-adapters.spec.js +69 -0
- package/dist/composer/runtime-adapters.spec.js.map +1 -0
- package/dist/composer/types.d.ts +60 -0
- package/dist/composer/types.d.ts.map +1 -0
- package/dist/composer/types.js +2 -0
- package/dist/composer/types.js.map +1 -0
- package/dist/composer/use-file-search.d.ts +6 -0
- package/dist/composer/use-file-search.d.ts.map +1 -0
- package/dist/composer/use-file-search.js +53 -0
- package/dist/composer/use-file-search.js.map +1 -0
- package/dist/composer/use-mention-search.d.ts +6 -0
- package/dist/composer/use-mention-search.d.ts.map +1 -0
- package/dist/composer/use-mention-search.js +75 -0
- package/dist/composer/use-mention-search.js.map +1 -0
- package/dist/composer/use-skills.d.ts +7 -0
- package/dist/composer/use-skills.d.ts.map +1 -0
- package/dist/composer/use-skills.js +40 -0
- package/dist/composer/use-skills.js.map +1 -0
- package/dist/composer/useRealtimeVoiceMode.d.ts +189 -0
- package/dist/composer/useRealtimeVoiceMode.d.ts.map +1 -0
- package/dist/composer/useRealtimeVoiceMode.js +1899 -0
- package/dist/composer/useRealtimeVoiceMode.js.map +1 -0
- package/dist/composer/useRealtimeVoiceMode.spec.d.ts +2 -0
- package/dist/composer/useRealtimeVoiceMode.spec.d.ts.map +1 -0
- package/dist/composer/useRealtimeVoiceMode.spec.js +716 -0
- package/dist/composer/useRealtimeVoiceMode.spec.js.map +1 -0
- package/dist/composer/useVoiceDictation.browser.spec.d.ts +2 -0
- package/dist/composer/useVoiceDictation.browser.spec.d.ts.map +1 -0
- package/dist/composer/useVoiceDictation.browser.spec.js +220 -0
- package/dist/composer/useVoiceDictation.browser.spec.js.map +1 -0
- package/dist/composer/useVoiceDictation.d.ts +58 -0
- package/dist/composer/useVoiceDictation.d.ts.map +1 -0
- package/dist/composer/useVoiceDictation.js +1058 -0
- package/dist/composer/useVoiceDictation.js.map +1 -0
- package/dist/composer/useVoiceDictation.spec.d.ts +2 -0
- package/dist/composer/useVoiceDictation.spec.d.ts.map +1 -0
- package/dist/composer/useVoiceDictation.spec.js +32 -0
- package/dist/composer/useVoiceDictation.spec.js.map +1 -0
- package/dist/conformance/__fixtures__/css-in-js-adapter.d.ts +7 -0
- package/dist/conformance/__fixtures__/css-in-js-adapter.d.ts.map +1 -0
- package/dist/conformance/__fixtures__/css-in-js-adapter.js +84 -0
- package/dist/conformance/__fixtures__/css-in-js-adapter.js.map +1 -0
- package/dist/conformance/conformance.spec.d.ts +2 -0
- package/dist/conformance/conformance.spec.d.ts.map +1 -0
- package/dist/conformance/conformance.spec.js +87 -0
- package/dist/conformance/conformance.spec.js.map +1 -0
- package/dist/conformance/index.d.ts +4 -0
- package/dist/conformance/index.d.ts.map +1 -0
- package/dist/conformance/index.js +4 -0
- package/dist/conformance/index.js.map +1 -0
- package/dist/conformance/runner.d.ts +12 -0
- package/dist/conformance/runner.d.ts.map +1 -0
- package/dist/conformance/runner.js +515 -0
- package/dist/conformance/runner.js.map +1 -0
- package/dist/conformance/types.d.ts +26 -0
- package/dist/conformance/types.d.ts.map +1 -0
- package/dist/conformance/types.js +13 -0
- package/dist/conformance/types.js.map +1 -0
- package/dist/conformance/version.d.ts +6 -0
- package/dist/conformance/version.d.ts.map +1 -0
- package/dist/conformance/version.js +14 -0
- package/dist/conformance/version.js.map +1 -0
- package/dist/context-ui/ContextMeter.d.ts +11 -0
- package/dist/context-ui/ContextMeter.d.ts.map +1 -0
- package/dist/context-ui/ContextMeter.js +40 -0
- package/dist/context-ui/ContextMeter.js.map +1 -0
- package/dist/context-ui/ContextMeter.spec.d.ts +2 -0
- package/dist/context-ui/ContextMeter.spec.d.ts.map +1 -0
- package/dist/context-ui/ContextMeter.spec.js +52 -0
- package/dist/context-ui/ContextMeter.spec.js.map +1 -0
- package/dist/context-ui/ContextSegmentRow.d.ts +16 -0
- package/dist/context-ui/ContextSegmentRow.d.ts.map +1 -0
- package/dist/context-ui/ContextSegmentRow.js +92 -0
- package/dist/context-ui/ContextSegmentRow.js.map +1 -0
- package/dist/context-ui/ContextTreemap.d.ts +8 -0
- package/dist/context-ui/ContextTreemap.d.ts.map +1 -0
- package/dist/context-ui/ContextTreemap.js +58 -0
- package/dist/context-ui/ContextTreemap.js.map +1 -0
- package/dist/context-ui/ContextXRayPanel.d.ts +14 -0
- package/dist/context-ui/ContextXRayPanel.d.ts.map +1 -0
- package/dist/context-ui/ContextXRayPanel.js +209 -0
- package/dist/context-ui/ContextXRayPanel.js.map +1 -0
- package/dist/context-ui/format.d.ts +6 -0
- package/dist/context-ui/format.d.ts.map +1 -0
- package/dist/context-ui/format.js +58 -0
- package/dist/context-ui/format.js.map +1 -0
- package/dist/context-ui/index.d.ts +7 -0
- package/dist/context-ui/index.d.ts.map +1 -0
- package/dist/context-ui/index.js +6 -0
- package/dist/context-ui/index.js.map +1 -0
- package/dist/context-ui/types.d.ts +41 -0
- package/dist/context-ui/types.d.ts.map +1 -0
- package/dist/context-ui/types.js +8 -0
- package/dist/context-ui/types.js.map +1 -0
- package/dist/dashboard/DataTable.d.ts +20 -0
- package/dist/dashboard/DataTable.d.ts.map +1 -0
- package/dist/dashboard/DataTable.js +87 -0
- package/dist/dashboard/DataTable.js.map +1 -0
- package/dist/dashboard/DateRangePicker.d.ts +15 -0
- package/dist/dashboard/DateRangePicker.d.ts.map +1 -0
- package/dist/dashboard/DateRangePicker.js +15 -0
- package/dist/dashboard/DateRangePicker.js.map +1 -0
- package/dist/dashboard/GenericChartPanel.d.ts +57 -0
- package/dist/dashboard/GenericChartPanel.d.ts.map +1 -0
- package/dist/dashboard/GenericChartPanel.js +119 -0
- package/dist/dashboard/GenericChartPanel.js.map +1 -0
- package/dist/dashboard/GenericChartPanel.spec.d.ts +2 -0
- package/dist/dashboard/GenericChartPanel.spec.d.ts.map +1 -0
- package/dist/dashboard/GenericChartPanel.spec.js +41 -0
- package/dist/dashboard/GenericChartPanel.spec.js.map +1 -0
- package/dist/dashboard/MetricCard.d.ts +14 -0
- package/dist/dashboard/MetricCard.d.ts.map +1 -0
- package/dist/dashboard/MetricCard.js +10 -0
- package/dist/dashboard/MetricCard.js.map +1 -0
- package/dist/dashboard/StatsCard.d.ts +16 -0
- package/dist/dashboard/StatsCard.d.ts.map +1 -0
- package/dist/dashboard/StatsCard.js +8 -0
- package/dist/dashboard/StatsCard.js.map +1 -0
- package/dist/dashboard/dashboard-layout.d.ts +49 -0
- package/dist/dashboard/dashboard-layout.d.ts.map +1 -0
- package/dist/dashboard/dashboard-layout.js +231 -0
- package/dist/dashboard/dashboard-layout.js.map +1 -0
- package/dist/dashboard/dashboard-layout.spec.d.ts +2 -0
- package/dist/dashboard/dashboard-layout.spec.d.ts.map +1 -0
- package/dist/dashboard/dashboard-layout.spec.js +52 -0
- package/dist/dashboard/dashboard-layout.spec.js.map +1 -0
- package/dist/dashboard/index.d.ts +7 -0
- package/dist/dashboard/index.d.ts.map +1 -0
- package/dist/dashboard/index.js +7 -0
- package/dist/dashboard/index.js.map +1 -0
- package/dist/data-grid/DataGrid.d.ts +92 -0
- package/dist/data-grid/DataGrid.d.ts.map +1 -0
- package/dist/data-grid/DataGrid.js +315 -0
- package/dist/data-grid/DataGrid.js.map +1 -0
- package/dist/data-grid/DataGrid.spec.d.ts +2 -0
- package/dist/data-grid/DataGrid.spec.d.ts.map +1 -0
- package/dist/data-grid/DataGrid.spec.js +134 -0
- package/dist/data-grid/DataGrid.spec.js.map +1 -0
- package/dist/data-grid/index.d.ts +2 -0
- package/dist/data-grid/index.d.ts.map +1 -0
- package/dist/data-grid/index.js +2 -0
- package/dist/data-grid/index.js.map +1 -0
- package/dist/design-system/components.d.ts +58 -0
- package/dist/design-system/components.d.ts.map +1 -0
- package/dist/design-system/components.js +88 -0
- package/dist/design-system/components.js.map +1 -0
- package/dist/design-system/context.d.ts +11 -0
- package/dist/design-system/context.d.ts.map +1 -0
- package/dist/design-system/context.js +17 -0
- package/dist/design-system/context.js.map +1 -0
- package/dist/design-system/default-adapter.d.ts +3 -0
- package/dist/design-system/default-adapter.d.ts.map +1 -0
- package/dist/design-system/default-adapter.js +172 -0
- package/dist/design-system/default-adapter.js.map +1 -0
- package/dist/design-system/default-adapter.spec.d.ts +2 -0
- package/dist/design-system/default-adapter.spec.d.ts.map +1 -0
- package/dist/design-system/default-adapter.spec.js +108 -0
- package/dist/design-system/default-adapter.spec.js.map +1 -0
- package/dist/design-system/definition.d.ts +9 -0
- package/dist/design-system/definition.d.ts.map +1 -0
- package/dist/design-system/definition.js +4 -0
- package/dist/design-system/definition.js.map +1 -0
- package/dist/design-system/design-system.spec.d.ts +2 -0
- package/dist/design-system/design-system.spec.d.ts.map +1 -0
- package/dist/design-system/design-system.spec.js +208 -0
- package/dist/design-system/design-system.spec.js.map +1 -0
- package/dist/design-system/error-boundary.d.ts +18 -0
- package/dist/design-system/error-boundary.d.ts.map +1 -0
- package/dist/design-system/error-boundary.js +16 -0
- package/dist/design-system/error-boundary.js.map +1 -0
- package/dist/design-system/index.d.ts +8 -0
- package/dist/design-system/index.d.ts.map +1 -0
- package/dist/design-system/index.js +8 -0
- package/dist/design-system/index.js.map +1 -0
- package/dist/design-system/theme.d.ts +30 -0
- package/dist/design-system/theme.d.ts.map +1 -0
- package/dist/design-system/theme.js +95 -0
- package/dist/design-system/theme.js.map +1 -0
- package/dist/design-system/theme.spec.d.ts +2 -0
- package/dist/design-system/theme.spec.d.ts.map +1 -0
- package/dist/design-system/theme.spec.js +43 -0
- package/dist/design-system/theme.spec.js.map +1 -0
- package/dist/design-system/types.d.ts +292 -0
- package/dist/design-system/types.d.ts.map +1 -0
- package/dist/design-system/types.js +2 -0
- package/dist/design-system/types.js.map +1 -0
- package/dist/design-tweaks/index.d.ts +2 -0
- package/dist/design-tweaks/index.d.ts.map +1 -0
- package/dist/design-tweaks/index.js +2 -0
- package/dist/design-tweaks/index.js.map +1 -0
- package/dist/design-tweaks/scrub-input-utils.d.ts +61 -0
- package/dist/design-tweaks/scrub-input-utils.d.ts.map +1 -0
- package/dist/design-tweaks/scrub-input-utils.js +235 -0
- package/dist/design-tweaks/scrub-input-utils.js.map +1 -0
- package/dist/design-tweaks/scrub-input.d.ts +70 -0
- package/dist/design-tweaks/scrub-input.d.ts.map +1 -0
- package/dist/design-tweaks/scrub-input.js +319 -0
- package/dist/design-tweaks/scrub-input.js.map +1 -0
- package/dist/design-tweaks/visual-style-controls.d.ts +90 -0
- package/dist/design-tweaks/visual-style-controls.d.ts.map +1 -0
- package/dist/design-tweaks/visual-style-controls.js +423 -0
- package/dist/design-tweaks/visual-style-controls.js.map +1 -0
- package/dist/design-tweaks/visual-style-controls.spec.d.ts +2 -0
- package/dist/design-tweaks/visual-style-controls.spec.d.ts.map +1 -0
- package/dist/design-tweaks/visual-style-controls.spec.js +84 -0
- package/dist/design-tweaks/visual-style-controls.spec.js.map +1 -0
- package/dist/editor/BubbleToolbar.d.ts +37 -0
- package/dist/editor/BubbleToolbar.d.ts.map +1 -0
- package/dist/editor/BubbleToolbar.js +171 -0
- package/dist/editor/BubbleToolbar.js.map +1 -0
- package/dist/editor/CodeBlockNode.d.ts +49 -0
- package/dist/editor/CodeBlockNode.d.ts.map +1 -0
- package/dist/editor/CodeBlockNode.js +127 -0
- package/dist/editor/CodeBlockNode.js.map +1 -0
- package/dist/editor/DragHandle.d.ts +103 -0
- package/dist/editor/DragHandle.d.ts.map +1 -0
- package/dist/editor/DragHandle.js +1101 -0
- package/dist/editor/DragHandle.js.map +1 -0
- package/dist/editor/DragHandle.spec.d.ts +2 -0
- package/dist/editor/DragHandle.spec.d.ts.map +1 -0
- package/dist/editor/DragHandle.spec.js +495 -0
- package/dist/editor/DragHandle.spec.js.map +1 -0
- package/dist/editor/ImageExtension.d.ts +63 -0
- package/dist/editor/ImageExtension.d.ts.map +1 -0
- package/dist/editor/ImageExtension.js +243 -0
- package/dist/editor/ImageExtension.js.map +1 -0
- package/dist/editor/ImageExtension.roundtrip.spec.d.ts +2 -0
- package/dist/editor/ImageExtension.roundtrip.spec.d.ts.map +1 -0
- package/dist/editor/ImageExtension.roundtrip.spec.js +103 -0
- package/dist/editor/ImageExtension.roundtrip.spec.js.map +1 -0
- package/dist/editor/RegistryBlockContext.d.ts +68 -0
- package/dist/editor/RegistryBlockContext.d.ts.map +1 -0
- package/dist/editor/RegistryBlockContext.js +10 -0
- package/dist/editor/RegistryBlockContext.js.map +1 -0
- package/dist/editor/RegistryBlockNode.d.ts +66 -0
- package/dist/editor/RegistryBlockNode.d.ts.map +1 -0
- package/dist/editor/RegistryBlockNode.js +406 -0
- package/dist/editor/RegistryBlockNode.js.map +1 -0
- package/dist/editor/RegistryBlockNode.spec.d.ts +2 -0
- package/dist/editor/RegistryBlockNode.spec.d.ts.map +1 -0
- package/dist/editor/RegistryBlockNode.spec.js +215 -0
- package/dist/editor/RegistryBlockNode.spec.js.map +1 -0
- package/dist/editor/RichMarkdownEditor.collab.spec.d.ts +2 -0
- package/dist/editor/RichMarkdownEditor.collab.spec.d.ts.map +1 -0
- package/dist/editor/RichMarkdownEditor.collab.spec.js +65 -0
- package/dist/editor/RichMarkdownEditor.collab.spec.js.map +1 -0
- package/dist/editor/RichMarkdownEditor.d.ts +52 -0
- package/dist/editor/RichMarkdownEditor.d.ts.map +1 -0
- package/dist/editor/RichMarkdownEditor.js +38 -0
- package/dist/editor/RichMarkdownEditor.js.map +1 -0
- package/dist/editor/RichMarkdownEditor.roundtrip.spec.d.ts +2 -0
- package/dist/editor/RichMarkdownEditor.roundtrip.spec.d.ts.map +1 -0
- package/dist/editor/RichMarkdownEditor.roundtrip.spec.js +186 -0
- package/dist/editor/RichMarkdownEditor.roundtrip.spec.js.map +1 -0
- package/dist/editor/RunId.d.ts +28 -0
- package/dist/editor/RunId.d.ts.map +1 -0
- package/dist/editor/RunId.js +60 -0
- package/dist/editor/RunId.js.map +1 -0
- package/dist/editor/SharedRichEditor.d.ts +112 -0
- package/dist/editor/SharedRichEditor.d.ts.map +1 -0
- package/dist/editor/SharedRichEditor.js +159 -0
- package/dist/editor/SharedRichEditor.js.map +1 -0
- package/dist/editor/SharedRichEditor.spec.d.ts +2 -0
- package/dist/editor/SharedRichEditor.spec.d.ts.map +1 -0
- package/dist/editor/SharedRichEditor.spec.js +63 -0
- package/dist/editor/SharedRichEditor.spec.js.map +1 -0
- package/dist/editor/SlashCommandMenu.d.ts +59 -0
- package/dist/editor/SlashCommandMenu.d.ts.map +1 -0
- package/dist/editor/SlashCommandMenu.js +279 -0
- package/dist/editor/SlashCommandMenu.js.map +1 -0
- package/dist/editor/SlashCommandMenu.spec.d.ts +2 -0
- package/dist/editor/SlashCommandMenu.spec.d.ts.map +1 -0
- package/dist/editor/SlashCommandMenu.spec.js +67 -0
- package/dist/editor/SlashCommandMenu.spec.js.map +1 -0
- package/dist/editor/disableHistory.spec.d.ts +2 -0
- package/dist/editor/disableHistory.spec.d.ts.map +1 -0
- package/dist/editor/disableHistory.spec.js +73 -0
- package/dist/editor/disableHistory.spec.js.map +1 -0
- package/dist/editor/extensions.d.ts +178 -0
- package/dist/editor/extensions.d.ts.map +1 -0
- package/dist/editor/extensions.js +264 -0
- package/dist/editor/extensions.js.map +1 -0
- package/dist/editor/gfmDoc.d.ts +24 -0
- package/dist/editor/gfmDoc.d.ts.map +1 -0
- package/dist/editor/gfmDoc.js +83 -0
- package/dist/editor/gfmDoc.js.map +1 -0
- package/dist/editor/gfmDoc.spec.d.ts +2 -0
- package/dist/editor/gfmDoc.spec.d.ts.map +1 -0
- package/dist/editor/gfmDoc.spec.js +194 -0
- package/dist/editor/gfmDoc.spec.js.map +1 -0
- package/dist/editor/index.d.ts +16 -0
- package/dist/editor/index.d.ts.map +1 -0
- package/dist/editor/index.js +15 -0
- package/dist/editor/index.js.map +1 -0
- package/dist/editor/registrySlashCommands.d.ts +68 -0
- package/dist/editor/registrySlashCommands.d.ts.map +1 -0
- package/dist/editor/registrySlashCommands.js +51 -0
- package/dist/editor/registrySlashCommands.js.map +1 -0
- package/dist/editor/structuralReorderUndo.spec.d.ts +2 -0
- package/dist/editor/structuralReorderUndo.spec.d.ts.map +1 -0
- package/dist/editor/structuralReorderUndo.spec.js +120 -0
- package/dist/editor/structuralReorderUndo.spec.js.map +1 -0
- package/dist/editor/surgical-apply.d.ts +66 -0
- package/dist/editor/surgical-apply.d.ts.map +1 -0
- package/dist/editor/surgical-apply.js +147 -0
- package/dist/editor/surgical-apply.js.map +1 -0
- package/dist/editor/surgical-apply.spec.d.ts +2 -0
- package/dist/editor/surgical-apply.spec.d.ts.map +1 -0
- package/dist/editor/surgical-apply.spec.js +257 -0
- package/dist/editor/surgical-apply.spec.js.map +1 -0
- package/dist/editor/useCollabReconcile.concurrent.spec.d.ts +2 -0
- package/dist/editor/useCollabReconcile.concurrent.spec.d.ts.map +1 -0
- package/dist/editor/useCollabReconcile.concurrent.spec.js +641 -0
- package/dist/editor/useCollabReconcile.concurrent.spec.js.map +1 -0
- package/dist/editor/useCollabReconcile.d.ts +117 -0
- package/dist/editor/useCollabReconcile.d.ts.map +1 -0
- package/dist/editor/useCollabReconcile.idempotent.spec.d.ts +2 -0
- package/dist/editor/useCollabReconcile.idempotent.spec.d.ts.map +1 -0
- package/dist/editor/useCollabReconcile.idempotent.spec.js +248 -0
- package/dist/editor/useCollabReconcile.idempotent.spec.js.map +1 -0
- package/dist/editor/useCollabReconcile.js +521 -0
- package/dist/editor/useCollabReconcile.js.map +1 -0
- package/dist/editor.css +587 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +3 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/use-mobile.d.ts +2 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -0
- package/dist/hooks/use-mobile.js +16 -0
- package/dist/hooks/use-mobile.js.map +1 -0
- package/dist/hooks/use-toast.d.ts +45 -0
- package/dist/hooks/use-toast.d.ts.map +1 -0
- package/dist/hooks/use-toast.js +127 -0
- package/dist/hooks/use-toast.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -0
- package/dist/onboarding/index.d.ts +2 -0
- package/dist/onboarding/index.d.ts.map +1 -0
- package/dist/onboarding/index.js +2 -0
- package/dist/onboarding/index.js.map +1 -0
- package/dist/provider.d.ts +15 -0
- package/dist/provider.d.ts.map +1 -0
- package/dist/provider.js +60 -0
- package/dist/provider.js.map +1 -0
- package/dist/sharing/SharePrimitives.d.ts +42 -0
- package/dist/sharing/SharePrimitives.d.ts.map +1 -0
- package/dist/sharing/SharePrimitives.js +53 -0
- package/dist/sharing/SharePrimitives.js.map +1 -0
- package/dist/sharing/VisibilityBadge.d.ts +11 -0
- package/dist/sharing/VisibilityBadge.d.ts.map +1 -0
- package/dist/sharing/VisibilityBadge.js +19 -0
- package/dist/sharing/VisibilityBadge.js.map +1 -0
- package/dist/sharing/VisibilityBadge.spec.d.ts +2 -0
- package/dist/sharing/VisibilityBadge.spec.d.ts.map +1 -0
- package/dist/sharing/VisibilityBadge.spec.js +60 -0
- package/dist/sharing/VisibilityBadge.spec.js.map +1 -0
- package/dist/sharing/index.d.ts +3 -0
- package/dist/sharing/index.d.ts.map +1 -0
- package/dist/sharing/index.js +3 -0
- package/dist/sharing/index.js.map +1 -0
- package/dist/styles.css +232 -0
- package/dist/ui/accordion.d.ts +8 -0
- package/dist/ui/accordion.d.ts.map +1 -0
- package/dist/ui/accordion.js +14 -0
- package/dist/ui/accordion.js.map +1 -0
- package/dist/ui/alert-dialog.d.ts +21 -0
- package/dist/ui/alert-dialog.d.ts.map +1 -0
- package/dist/ui/alert-dialog.js +27 -0
- package/dist/ui/alert-dialog.js.map +1 -0
- package/dist/ui/alert.d.ts +9 -0
- package/dist/ui/alert.d.ts.map +1 -0
- package/dist/ui/alert.js +23 -0
- package/dist/ui/alert.js.map +1 -0
- package/dist/ui/aspect-ratio.d.ts +4 -0
- package/dist/ui/aspect-ratio.d.ts.map +1 -0
- package/dist/ui/aspect-ratio.js +4 -0
- package/dist/ui/aspect-ratio.js.map +1 -0
- package/dist/ui/avatar.d.ts +7 -0
- package/dist/ui/avatar.d.ts.map +1 -0
- package/dist/ui/avatar.js +12 -0
- package/dist/ui/avatar.js.map +1 -0
- package/dist/ui/badge.d.ts +10 -0
- package/dist/ui/badge.d.ts.map +1 -0
- package/dist/ui/badge.js +21 -0
- package/dist/ui/badge.js.map +1 -0
- package/dist/ui/breadcrumb.d.ts +20 -0
- package/dist/ui/breadcrumb.d.ts.map +1 -0
- package/dist/ui/breadcrumb.js +24 -0
- package/dist/ui/breadcrumb.js.map +1 -0
- package/dist/ui/button.d.ts +18 -0
- package/dist/ui/button.d.ts.map +1 -0
- package/dist/ui/button.js +67 -0
- package/dist/ui/button.js.map +1 -0
- package/dist/ui/calendar.d.ts +9 -0
- package/dist/ui/calendar.d.ts.map +1 -0
- package/dist/ui/calendar.js +74 -0
- package/dist/ui/calendar.js.map +1 -0
- package/dist/ui/card.d.ts +9 -0
- package/dist/ui/card.d.ts.map +1 -0
- package/dist/ui/card.js +17 -0
- package/dist/ui/card.js.map +1 -0
- package/dist/ui/carousel.d.ts +19 -0
- package/dist/ui/carousel.d.ts.map +1 -0
- package/dist/ui/carousel.js +99 -0
- package/dist/ui/carousel.js.map +1 -0
- package/dist/ui/chart.d.ts +80 -0
- package/dist/ui/chart.d.ts.map +1 -0
- package/dist/ui/chart.js +131 -0
- package/dist/ui/chart.js.map +1 -0
- package/dist/ui/checkbox.d.ts +5 -0
- package/dist/ui/checkbox.d.ts.map +1 -0
- package/dist/ui/checkbox.js +9 -0
- package/dist/ui/checkbox.js.map +1 -0
- package/dist/ui/collapsible.d.ts +6 -0
- package/dist/ui/collapsible.d.ts.map +1 -0
- package/dist/ui/collapsible.js +6 -0
- package/dist/ui/collapsible.js.map +1 -0
- package/dist/ui/command.d.ts +85 -0
- package/dist/ui/command.d.ts.map +1 -0
- package/dist/ui/command.js +29 -0
- package/dist/ui/command.js.map +1 -0
- package/dist/ui/command.spec.d.ts +2 -0
- package/dist/ui/command.spec.d.ts.map +1 -0
- package/dist/ui/command.spec.js +29 -0
- package/dist/ui/command.spec.js.map +1 -0
- package/dist/ui/context-menu.d.ts +28 -0
- package/dist/ui/context-menu.d.ts.map +1 -0
- package/dist/ui/context-menu.js +34 -0
- package/dist/ui/context-menu.js.map +1 -0
- package/dist/ui/date-picker.d.ts +10 -0
- package/dist/ui/date-picker.d.ts.map +1 -0
- package/dist/ui/date-picker.js +20 -0
- package/dist/ui/date-picker.js.map +1 -0
- package/dist/ui/dialog.d.ts +32 -0
- package/dist/ui/dialog.d.ts.map +1 -0
- package/dist/ui/dialog.js +26 -0
- package/dist/ui/dialog.js.map +1 -0
- package/dist/ui/dialog.spec.d.ts +2 -0
- package/dist/ui/dialog.spec.d.ts.map +1 -0
- package/dist/ui/dialog.spec.js +21 -0
- package/dist/ui/dialog.spec.js.map +1 -0
- package/dist/ui/drawer.d.ts +35 -0
- package/dist/ui/drawer.d.ts.map +1 -0
- package/dist/ui/drawer.js +25 -0
- package/dist/ui/drawer.js.map +1 -0
- package/dist/ui/dropdown-menu.d.ts +32 -0
- package/dist/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/ui/dropdown-menu.js +42 -0
- package/dist/ui/dropdown-menu.js.map +1 -0
- package/dist/ui/form.d.ts +26 -0
- package/dist/ui/form.d.ts.map +1 -0
- package/dist/ui/form.js +63 -0
- package/dist/ui/form.js.map +1 -0
- package/dist/ui/hover-card.d.ts +7 -0
- package/dist/ui/hover-card.d.ts.map +1 -0
- package/dist/ui/hover-card.js +10 -0
- package/dist/ui/hover-card.js.map +1 -0
- package/dist/ui/index.d.ts +53 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +53 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/input-otp.d.ts +35 -0
- package/dist/ui/input-otp.d.ts.map +1 -0
- package/dist/ui/input-otp.js +19 -0
- package/dist/ui/input-otp.js.map +1 -0
- package/dist/ui/input.d.ts +4 -0
- package/dist/ui/input.d.ts.map +1 -0
- package/dist/ui/input.js +9 -0
- package/dist/ui/input.js.map +1 -0
- package/dist/ui/label.d.ts +6 -0
- package/dist/ui/label.d.ts.map +1 -0
- package/dist/ui/label.js +10 -0
- package/dist/ui/label.js.map +1 -0
- package/dist/ui/logo.d.ts +7 -0
- package/dist/ui/logo.d.ts.map +1 -0
- package/dist/ui/logo.js +10 -0
- package/dist/ui/logo.js.map +1 -0
- package/dist/ui/menubar.d.ts +29 -0
- package/dist/ui/menubar.d.ts.map +1 -0
- package/dist/ui/menubar.js +36 -0
- package/dist/ui/menubar.js.map +1 -0
- package/dist/ui/navigation-menu.d.ts +13 -0
- package/dist/ui/navigation-menu.d.ts.map +1 -0
- package/dist/ui/navigation-menu.js +25 -0
- package/dist/ui/navigation-menu.js.map +1 -0
- package/dist/ui/pagination.d.ts +29 -0
- package/dist/ui/pagination.d.ts.map +1 -0
- package/dist/ui/pagination.js +24 -0
- package/dist/ui/pagination.js.map +1 -0
- package/dist/ui/popover.d.ts +11 -0
- package/dist/ui/popover.d.ts.map +1 -0
- package/dist/ui/popover.js +16 -0
- package/dist/ui/popover.js.map +1 -0
- package/dist/ui/progress.d.ts +5 -0
- package/dist/ui/progress.d.ts.map +1 -0
- package/dist/ui/progress.js +8 -0
- package/dist/ui/progress.js.map +1 -0
- package/dist/ui/radio-group.d.ts +6 -0
- package/dist/ui/radio-group.d.ts.map +1 -0
- package/dist/ui/radio-group.js +15 -0
- package/dist/ui/radio-group.js.map +1 -0
- package/dist/ui/resizable.d.ts +8 -0
- package/dist/ui/resizable.d.ts.map +1 -0
- package/dist/ui/resizable.js +9 -0
- package/dist/ui/resizable.js.map +1 -0
- package/dist/ui/scroll-area.d.ts +6 -0
- package/dist/ui/scroll-area.d.ts.map +1 -0
- package/dist/ui/scroll-area.js +12 -0
- package/dist/ui/scroll-area.js.map +1 -0
- package/dist/ui/select.d.ts +16 -0
- package/dist/ui/select.d.ts.map +1 -0
- package/dist/ui/select.js +27 -0
- package/dist/ui/select.js.map +1 -0
- package/dist/ui/separator.d.ts +5 -0
- package/dist/ui/separator.d.ts.map +1 -0
- package/dist/ui/separator.js +8 -0
- package/dist/ui/separator.js.map +1 -0
- package/dist/ui/sheet.d.ts +29 -0
- package/dist/ui/sheet.d.ts.map +1 -0
- package/dist/ui/sheet.js +37 -0
- package/dist/ui/sheet.js.map +1 -0
- package/dist/ui/sidebar.d.ts +71 -0
- package/dist/ui/sidebar.d.ts.map +1 -0
- package/dist/ui/sidebar.js +230 -0
- package/dist/ui/sidebar.js.map +1 -0
- package/dist/ui/skeleton.d.ts +3 -0
- package/dist/ui/skeleton.d.ts.map +1 -0
- package/dist/ui/skeleton.js +7 -0
- package/dist/ui/skeleton.js.map +1 -0
- package/dist/ui/slider.d.ts +5 -0
- package/dist/ui/slider.d.ts.map +1 -0
- package/dist/ui/slider.js +8 -0
- package/dist/ui/slider.js.map +1 -0
- package/dist/ui/sonner.d.ts +5 -0
- package/dist/ui/sonner.d.ts.map +1 -0
- package/dist/ui/sonner.js +25 -0
- package/dist/ui/sonner.js.map +1 -0
- package/dist/ui/spinner.d.ts +3 -0
- package/dist/ui/spinner.d.ts.map +1 -0
- package/dist/ui/spinner.js +7 -0
- package/dist/ui/spinner.js.map +1 -0
- package/dist/ui/switch.d.ts +5 -0
- package/dist/ui/switch.d.ts.map +1 -0
- package/dist/ui/switch.js +8 -0
- package/dist/ui/switch.js.map +1 -0
- package/dist/ui/table.d.ts +11 -0
- package/dist/ui/table.d.ts.map +1 -0
- package/dist/ui/table.js +21 -0
- package/dist/ui/table.js.map +1 -0
- package/dist/ui/tabs.d.ts +8 -0
- package/dist/ui/tabs.d.ts.map +1 -0
- package/dist/ui/tabs.js +13 -0
- package/dist/ui/tabs.js.map +1 -0
- package/dist/ui/textarea.d.ts +6 -0
- package/dist/ui/textarea.d.ts.map +1 -0
- package/dist/ui/textarea.js +9 -0
- package/dist/ui/textarea.js.map +1 -0
- package/dist/ui/toast.d.ts +16 -0
- package/dist/ui/toast.d.ts.map +1 -0
- package/dist/ui/toast.js +34 -0
- package/dist/ui/toast.js.map +1 -0
- package/dist/ui/toaster.d.ts +2 -0
- package/dist/ui/toaster.d.ts.map +1 -0
- package/dist/ui/toaster.js +10 -0
- package/dist/ui/toaster.js.map +1 -0
- package/dist/ui/toggle-group.d.ts +13 -0
- package/dist/ui/toggle-group.d.ts.map +1 -0
- package/dist/ui/toggle-group.js +21 -0
- package/dist/ui/toggle-group.js.map +1 -0
- package/dist/ui/toggle.d.ts +13 -0
- package/dist/ui/toggle.d.ts.map +1 -0
- package/dist/ui/toggle.js +26 -0
- package/dist/ui/toggle.js.map +1 -0
- package/dist/ui/tooltip.d.ts +11 -0
- package/dist/ui/tooltip.d.ts.map +1 -0
- package/dist/ui/tooltip.js +18 -0
- package/dist/ui/tooltip.js.map +1 -0
- package/dist/ui/use-toast.d.ts +3 -0
- package/dist/ui/use-toast.d.ts.map +1 -0
- package/dist/ui/use-toast.js +3 -0
- package/dist/ui/use-toast.js.map +1 -0
- package/dist/utils.d.ts +4 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +7 -0
- package/dist/utils.js.map +1 -0
- package/migration-manifest.json +4 -0
- package/package.json +369 -0
- package/src/app-shell/header-actions.tsx +84 -0
- package/src/app-shell/index.ts +2 -0
- package/src/app-shell/sidebar-footer-actions.spec.tsx +81 -0
- package/src/app-shell/sidebar-footer-actions.tsx +45 -0
- package/src/canvas-annotations/CanvasCommentPins.tsx +861 -0
- package/src/canvas-annotations/DrawOverlay.spec.tsx +145 -0
- package/src/canvas-annotations/DrawOverlay.tsx +1233 -0
- package/src/canvas-annotations/index.ts +15 -0
- package/src/canvas-annotations/types.ts +14 -0
- package/src/canvas-interactions/canvas-interactions.spec.ts +765 -0
- package/src/canvas-interactions/canvas-interactions.ts +965 -0
- package/src/canvas-interactions/index.ts +67 -0
- package/src/chat-history/ChatHistoryList.spec.tsx +485 -0
- package/src/chat-history/ChatHistoryList.tsx +481 -0
- package/src/chat-history/ChatHistoryRail.spec.tsx +312 -0
- package/src/chat-history/ChatHistoryRail.tsx +150 -0
- package/src/chat-history/index.ts +21 -0
- package/src/chat-history/useChatHistoryRailController.spec.tsx +131 -0
- package/src/chat-history/useChatHistoryRailController.ts +76 -0
- package/src/chat-history.css +469 -0
- package/src/collab-ui/AgentPresenceChip.tsx +69 -0
- package/src/collab-ui/LiveCursorOverlay.tsx +241 -0
- package/src/collab-ui/PresenceBar.spec.tsx +44 -0
- package/src/collab-ui/PresenceBar.tsx +373 -0
- package/src/collab-ui/RecentEditHighlights.tsx +239 -0
- package/src/collab-ui/RemoteSelectionRings.tsx +227 -0
- package/src/collab-ui/agent-identity.ts +16 -0
- package/src/collab-ui/index.ts +39 -0
- package/src/collab-ui/lead-client.ts +32 -0
- package/src/collab-ui/types.spec.ts +18 -0
- package/src/collab-ui/types.ts +96 -0
- package/src/composer/AgentComposerFrame.tsx +62 -0
- package/src/composer/ComposerPlusMenu.spec.ts +14 -0
- package/src/composer/ComposerPlusMenu.tsx +1266 -0
- package/src/composer/MentionPopover.tsx +483 -0
- package/src/composer/PastedTextChip.spec.tsx +58 -0
- package/src/composer/PastedTextChip.tsx +178 -0
- package/src/composer/PromptComposer.spec.ts +110 -0
- package/src/composer/PromptComposer.tsx +796 -0
- package/src/composer/RealtimeVoiceMode.spec.tsx +998 -0
- package/src/composer/RealtimeVoiceMode.tsx +1019 -0
- package/src/composer/TiptapComposer.spec.ts +592 -0
- package/src/composer/TiptapComposer.tsx +3746 -0
- package/src/composer/VoiceButton.spec.ts +49 -0
- package/src/composer/VoiceButton.tsx +329 -0
- package/src/composer/asset-picker-url.spec.ts +56 -0
- package/src/composer/asset-picker-url.ts +80 -0
- package/src/composer/attachment-accept.spec.ts +32 -0
- package/src/composer/attachment-accept.ts +75 -0
- package/src/composer/draft-key.spec.ts +19 -0
- package/src/composer/draft-key.ts +7 -0
- package/src/composer/extensions/FileReference.tsx +55 -0
- package/src/composer/extensions/MentionReference.tsx +93 -0
- package/src/composer/extensions/SkillReference.tsx +56 -0
- package/src/composer/index.ts +86 -0
- package/src/composer/model-selection.spec.ts +45 -0
- package/src/composer/model-selection.ts +51 -0
- package/src/composer/pasted-text.spec.ts +162 -0
- package/src/composer/pasted-text.ts +160 -0
- package/src/composer/prompt-attachments.spec.ts +80 -0
- package/src/composer/prompt-attachments.ts +93 -0
- package/src/composer/realtime-voice-audio-level.spec.ts +47 -0
- package/src/composer/realtime-voice-audio-level.ts +65 -0
- package/src/composer/realtime-voice-transcript.spec.ts +95 -0
- package/src/composer/realtime-voice-transcript.ts +134 -0
- package/src/composer/runtime-adapters.spec.tsx +102 -0
- package/src/composer/runtime-adapters.tsx +364 -0
- package/src/composer/types.ts +66 -0
- package/src/composer/use-file-search.ts +64 -0
- package/src/composer/use-mention-search.ts +90 -0
- package/src/composer/use-skills.ts +45 -0
- package/src/composer/useRealtimeVoiceMode.spec.ts +952 -0
- package/src/composer/useRealtimeVoiceMode.tsx +2388 -0
- package/src/composer/useVoiceDictation.browser.spec.tsx +265 -0
- package/src/composer/useVoiceDictation.spec.ts +45 -0
- package/src/composer/useVoiceDictation.ts +1256 -0
- package/src/conformance/__fixtures__/css-in-js-adapter.tsx +401 -0
- package/src/conformance/conformance.spec.tsx +143 -0
- package/src/conformance/index.ts +3 -0
- package/src/conformance/runner.tsx +862 -0
- package/src/conformance/types.ts +45 -0
- package/src/conformance/version.ts +22 -0
- package/src/context-ui/ContextMeter.spec.tsx +73 -0
- package/src/context-ui/ContextMeter.tsx +131 -0
- package/src/context-ui/ContextSegmentRow.tsx +273 -0
- package/src/context-ui/ContextTreemap.tsx +131 -0
- package/src/context-ui/ContextXRayPanel.tsx +491 -0
- package/src/context-ui/format.ts +42 -0
- package/src/context-ui/index.ts +15 -0
- package/src/context-ui/types.ts +57 -0
- package/src/dashboard/DataTable.tsx +273 -0
- package/src/dashboard/DateRangePicker.tsx +57 -0
- package/src/dashboard/GenericChartPanel.spec.tsx +53 -0
- package/src/dashboard/GenericChartPanel.tsx +461 -0
- package/src/dashboard/MetricCard.tsx +54 -0
- package/src/dashboard/StatsCard.tsx +49 -0
- package/src/dashboard/dashboard-layout.spec.ts +79 -0
- package/src/dashboard/dashboard-layout.ts +329 -0
- package/src/dashboard/index.ts +6 -0
- package/src/data-grid/DataGrid.spec.tsx +243 -0
- package/src/data-grid/DataGrid.tsx +754 -0
- package/src/data-grid/index.ts +15 -0
- package/src/design-system/components.tsx +196 -0
- package/src/design-system/context.tsx +31 -0
- package/src/design-system/default-adapter.spec.tsx +158 -0
- package/src/design-system/default-adapter.tsx +923 -0
- package/src/design-system/definition.ts +14 -0
- package/src/design-system/design-system.spec.tsx +356 -0
- package/src/design-system/error-boundary.tsx +37 -0
- package/src/design-system/index.ts +7 -0
- package/src/design-system/theme.spec.ts +61 -0
- package/src/design-system/theme.ts +145 -0
- package/src/design-system/types.ts +367 -0
- package/src/design-tweaks/index.ts +1 -0
- package/src/design-tweaks/scrub-input-utils.ts +311 -0
- package/src/design-tweaks/scrub-input.tsx +525 -0
- package/src/design-tweaks/visual-style-controls.spec.tsx +172 -0
- package/src/design-tweaks/visual-style-controls.tsx +1043 -0
- package/src/editor/BubbleToolbar.tsx +253 -0
- package/src/editor/CodeBlockNode.tsx +254 -0
- package/src/editor/DragHandle.spec.ts +694 -0
- package/src/editor/DragHandle.ts +1491 -0
- package/src/editor/ImageExtension.roundtrip.spec.ts +117 -0
- package/src/editor/ImageExtension.ts +306 -0
- package/src/editor/RegistryBlockContext.tsx +107 -0
- package/src/editor/RegistryBlockNode.spec.ts +279 -0
- package/src/editor/RegistryBlockNode.tsx +652 -0
- package/src/editor/RichMarkdownEditor.collab.spec.ts +79 -0
- package/src/editor/RichMarkdownEditor.roundtrip.spec.ts +226 -0
- package/src/editor/RichMarkdownEditor.tsx +81 -0
- package/src/editor/RunId.ts +61 -0
- package/src/editor/SharedRichEditor.spec.tsx +82 -0
- package/src/editor/SharedRichEditor.tsx +353 -0
- package/src/editor/SlashCommandMenu.spec.ts +90 -0
- package/src/editor/SlashCommandMenu.tsx +396 -0
- package/src/editor/disableHistory.spec.ts +85 -0
- package/src/editor/extensions.ts +454 -0
- package/src/editor/gfmDoc.spec.ts +230 -0
- package/src/editor/gfmDoc.ts +92 -0
- package/src/editor/index.ts +96 -0
- package/src/editor/registrySlashCommands.ts +131 -0
- package/src/editor/structuralReorderUndo.spec.ts +144 -0
- package/src/editor/surgical-apply.spec.ts +279 -0
- package/src/editor/surgical-apply.ts +192 -0
- package/src/editor/useCollabReconcile.concurrent.spec.ts +781 -0
- package/src/editor/useCollabReconcile.idempotent.spec.ts +324 -0
- package/src/editor/useCollabReconcile.ts +684 -0
- package/src/editor.css +587 -0
- package/src/hooks/index.ts +2 -0
- package/src/hooks/use-mobile.tsx +21 -0
- package/src/hooks/use-toast.ts +188 -0
- package/src/index.ts +10 -0
- package/src/onboarding/index.ts +1 -0
- package/src/provider.tsx +148 -0
- package/src/sharing/SharePrimitives.tsx +224 -0
- package/src/sharing/VisibilityBadge.spec.ts +96 -0
- package/src/sharing/VisibilityBadge.tsx +37 -0
- package/src/sharing/index.ts +16 -0
- package/src/styles.css +232 -0
- package/src/ui/accordion.tsx +56 -0
- package/src/ui/alert-dialog.tsx +141 -0
- package/src/ui/alert.tsx +59 -0
- package/src/ui/aspect-ratio.tsx +5 -0
- package/src/ui/avatar.tsx +48 -0
- package/src/ui/badge.tsx +37 -0
- package/src/ui/breadcrumb.tsx +115 -0
- package/src/ui/button.tsx +167 -0
- package/src/ui/calendar.tsx +214 -0
- package/src/ui/card.tsx +86 -0
- package/src/ui/carousel.tsx +260 -0
- package/src/ui/chart.tsx +375 -0
- package/src/ui/checkbox.tsx +28 -0
- package/src/ui/collapsible.tsx +9 -0
- package/src/ui/command.spec.tsx +51 -0
- package/src/ui/command.tsx +174 -0
- package/src/ui/context-menu.tsx +202 -0
- package/src/ui/date-picker.tsx +67 -0
- package/src/ui/dialog.spec.tsx +43 -0
- package/src/ui/dialog.tsx +171 -0
- package/src/ui/drawer.tsx +126 -0
- package/src/ui/dropdown-menu.tsx +222 -0
- package/src/ui/form.tsx +177 -0
- package/src/ui/hover-card.tsx +27 -0
- package/src/ui/index.ts +52 -0
- package/src/ui/input-otp.tsx +69 -0
- package/src/ui/input.tsx +22 -0
- package/src/ui/label.tsx +24 -0
- package/src/ui/logo.tsx +36 -0
- package/src/ui/menubar.tsx +235 -0
- package/src/ui/navigation-menu.tsx +128 -0
- package/src/ui/pagination.tsx +121 -0
- package/src/ui/popover.tsx +58 -0
- package/src/ui/progress.tsx +27 -0
- package/src/ui/radio-group.tsx +42 -0
- package/src/ui/resizable.tsx +43 -0
- package/src/ui/scroll-area.tsx +46 -0
- package/src/ui/select.tsx +162 -0
- package/src/ui/separator.tsx +29 -0
- package/src/ui/sheet.tsx +160 -0
- package/src/ui/sidebar.tsx +776 -0
- package/src/ui/skeleton.tsx +18 -0
- package/src/ui/slider.tsx +26 -0
- package/src/ui/sonner.tsx +58 -0
- package/src/ui/spinner.tsx +17 -0
- package/src/ui/switch.tsx +27 -0
- package/src/ui/table.tsx +110 -0
- package/src/ui/tabs.tsx +53 -0
- package/src/ui/textarea.tsx +23 -0
- package/src/ui/toast.tsx +127 -0
- package/src/ui/toaster.tsx +33 -0
- package/src/ui/toggle-group.tsx +59 -0
- package/src/ui/toggle.tsx +43 -0
- package/src/ui/tooltip.tsx +57 -0
- package/src/ui/use-toast.ts +3 -0
- package/src/utils.ts +8 -0
|
@@ -0,0 +1,796 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AssistantRuntimeProvider,
|
|
3
|
+
ThreadPrimitive,
|
|
4
|
+
useAui,
|
|
5
|
+
useComposer,
|
|
6
|
+
useLocalRuntime,
|
|
7
|
+
} from "@assistant-ui/react";
|
|
8
|
+
import type {
|
|
9
|
+
Attachment,
|
|
10
|
+
AttachmentAdapter,
|
|
11
|
+
ChatModelAdapter,
|
|
12
|
+
CompleteAttachment,
|
|
13
|
+
PendingAttachment,
|
|
14
|
+
} from "@assistant-ui/react";
|
|
15
|
+
import {
|
|
16
|
+
CompositeAttachmentAdapter,
|
|
17
|
+
SimpleImageAttachmentAdapter,
|
|
18
|
+
} from "@assistant-ui/react";
|
|
19
|
+
import { IconX } from "@tabler/icons-react";
|
|
20
|
+
import {
|
|
21
|
+
useCallback,
|
|
22
|
+
useEffect,
|
|
23
|
+
useMemo,
|
|
24
|
+
useRef,
|
|
25
|
+
useState,
|
|
26
|
+
type CSSProperties,
|
|
27
|
+
type Ref,
|
|
28
|
+
type ReactNode,
|
|
29
|
+
} from "react";
|
|
30
|
+
|
|
31
|
+
import { TooltipProvider } from "../ui/tooltip.js";
|
|
32
|
+
import { cn } from "../utils.js";
|
|
33
|
+
import { AgentComposerFrame } from "./AgentComposerFrame.js";
|
|
34
|
+
import { IMAGE_ATTACHMENT_ACCEPT } from "./attachment-accept.js";
|
|
35
|
+
import {
|
|
36
|
+
PROMPT_DOCUMENT_ATTACHMENT_ACCEPT,
|
|
37
|
+
TextAttachmentAdapter,
|
|
38
|
+
} from "./attachment-accept.js";
|
|
39
|
+
import type { ComposerTerminalModeControl } from "./ComposerPlusMenu.js";
|
|
40
|
+
import { isPastedTextAttachmentName } from "./pasted-text.js";
|
|
41
|
+
import { PastedTextChip } from "./PastedTextChip.js";
|
|
42
|
+
import { escapePromptAttachmentAttribute } from "./prompt-attachments.js";
|
|
43
|
+
import {
|
|
44
|
+
type EngineModelGroup,
|
|
45
|
+
type ReasoningEffort,
|
|
46
|
+
useComposerRuntimeAdapters,
|
|
47
|
+
} from "./runtime-adapters.js";
|
|
48
|
+
import {
|
|
49
|
+
DEFAULT_VOICE_DICTATION_ENABLED,
|
|
50
|
+
TiptapComposer,
|
|
51
|
+
type ComposerAgentOption,
|
|
52
|
+
type ComposerSubmitIntent,
|
|
53
|
+
type TiptapComposerHandle,
|
|
54
|
+
type TiptapComposerSubmitOptions,
|
|
55
|
+
} from "./TiptapComposer.js";
|
|
56
|
+
import type {
|
|
57
|
+
AgentComposerLayoutVariant,
|
|
58
|
+
Reference,
|
|
59
|
+
SkillResult,
|
|
60
|
+
SlashCommand,
|
|
61
|
+
} from "./types.js";
|
|
62
|
+
|
|
63
|
+
const MAX_INLINE_TEXT_FILE_CHARS = 60_000;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Files the user attached via the "+" button in PromptComposer. The host owns
|
|
67
|
+
* what to do with them — typically POST to a per-app upload endpoint and pass
|
|
68
|
+
* the resulting URLs/paths into the prompt that gets sent to the agent.
|
|
69
|
+
*/
|
|
70
|
+
export type PromptComposerFile = File;
|
|
71
|
+
|
|
72
|
+
export interface PromptComposerSubmitOptions {
|
|
73
|
+
intent?: ComposerSubmitIntent;
|
|
74
|
+
model?: string;
|
|
75
|
+
engine?: string;
|
|
76
|
+
effort?: ReasoningEffort;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export interface PromptComposerProps {
|
|
80
|
+
/** Called when the user submits the composer. */
|
|
81
|
+
onSubmit: (
|
|
82
|
+
text: string,
|
|
83
|
+
files: PromptComposerFile[],
|
|
84
|
+
references: Reference[],
|
|
85
|
+
options: PromptComposerSubmitOptions,
|
|
86
|
+
) => void | Promise<void>;
|
|
87
|
+
placeholder?: string;
|
|
88
|
+
disabled?: boolean;
|
|
89
|
+
/** Called when a host-gated composer is clicked while it is disabled. */
|
|
90
|
+
onDisabledClick?: () => void;
|
|
91
|
+
/** Override the generic document attachment cap for a multipart host. */
|
|
92
|
+
maxDocumentAttachmentBytes?: number;
|
|
93
|
+
/** Label used in the visible document attachment limit error. */
|
|
94
|
+
documentAttachmentLimitLabel?: string;
|
|
95
|
+
autoFocus?: boolean;
|
|
96
|
+
className?: string;
|
|
97
|
+
style?: CSSProperties;
|
|
98
|
+
rootClassName?: string;
|
|
99
|
+
rootStyle?: CSSProperties;
|
|
100
|
+
/** Forwarded to TiptapComposer for draft persistence. */
|
|
101
|
+
draftScope?: string;
|
|
102
|
+
/** Keep the submitted prompt in the editor. Default: false. */
|
|
103
|
+
preserveDraftOnSubmit?: boolean;
|
|
104
|
+
/** Show the model selector (default: true). */
|
|
105
|
+
showModelSelector?: boolean;
|
|
106
|
+
/** Controlled open state for hosts that resize around the model picker. */
|
|
107
|
+
modelSelectorOpen?: boolean;
|
|
108
|
+
/** Show the legacy provider-level Auto model option (default: true). */
|
|
109
|
+
showAutoModelOption?: boolean;
|
|
110
|
+
/** Show the voice dictation button. Defaults to DEFAULT_VOICE_DICTATION_ENABLED. */
|
|
111
|
+
voiceEnabled?: boolean;
|
|
112
|
+
/** Show file upload controls and pass submitted files to onSubmit (default: true). */
|
|
113
|
+
attachmentsEnabled?: boolean;
|
|
114
|
+
/**
|
|
115
|
+
* Controls the shared "+" affordance. Defaults to upload-only for standalone
|
|
116
|
+
* prompt forms; chat surfaces can opt into the full sidebar menu.
|
|
117
|
+
*/
|
|
118
|
+
plusMenuMode?: "full" | "upload-only" | "terminal" | "hidden";
|
|
119
|
+
/** Controls the terminal-specific plus menu when `plusMenuMode` is terminal. */
|
|
120
|
+
terminalModeControl?: ComposerTerminalModeControl;
|
|
121
|
+
/**
|
|
122
|
+
* Include extension creation in the full "+" menu. Defaults to false.
|
|
123
|
+
*/
|
|
124
|
+
extensionTools?: boolean;
|
|
125
|
+
/** Programmatically seed the composer with plain text. */
|
|
126
|
+
initialText?: string;
|
|
127
|
+
/** Stable key used to re-apply `initialText` when the host picks a preset. */
|
|
128
|
+
initialTextKey?: string | number;
|
|
129
|
+
/** Optional host-owned control rendered directly after the "+" button. */
|
|
130
|
+
modeControl?: ReactNode;
|
|
131
|
+
/** Explicit host-owned toolbar slot rendered directly after the "+" button. */
|
|
132
|
+
toolbarSlot?: ReactNode;
|
|
133
|
+
/** Custom attachment button to render instead of the default "+" affordance. */
|
|
134
|
+
attachButton?: ReactNode;
|
|
135
|
+
/** Custom action button to render instead of the default send button. */
|
|
136
|
+
actionButton?: ReactNode;
|
|
137
|
+
/** Extra button rendered alongside the default send button. */
|
|
138
|
+
extraActionButton?: ReactNode;
|
|
139
|
+
/** Shared sizing/layout variant for host surfaces. Default keeps sidebar behavior. */
|
|
140
|
+
layoutVariant?: AgentComposerLayoutVariant;
|
|
141
|
+
/** Additional slash commands surfaced in the shared / menu. */
|
|
142
|
+
slashCommands?: SlashCommand[];
|
|
143
|
+
/** Additional slash skills surfaced in the shared / menu. */
|
|
144
|
+
slashSkills?: SkillResult[];
|
|
145
|
+
/** Include built-in sidebar slash commands like /clear and /help. Default true. */
|
|
146
|
+
includeDefaultSlashCommands?: boolean;
|
|
147
|
+
/** Include app-discovered skills from the default agent endpoint. Default true. */
|
|
148
|
+
includeDefaultSlashSkills?: boolean;
|
|
149
|
+
/** Called when a slash command from the shared / menu is executed. */
|
|
150
|
+
onSlashCommand?: (command: string) => void;
|
|
151
|
+
/** External model list for hosts that already resolve models outside the app. */
|
|
152
|
+
availableModels?: EngineModelGroup[];
|
|
153
|
+
/** Whether the external model list is still being resolved. */
|
|
154
|
+
modelListLoading?: boolean;
|
|
155
|
+
selectedModel?: string;
|
|
156
|
+
selectedEngine?: string;
|
|
157
|
+
selectedEffort?: ReasoningEffort;
|
|
158
|
+
onModelChange?: (model: string, engine: string) => void;
|
|
159
|
+
onEffortChange?: (effort: ReasoningEffort) => void;
|
|
160
|
+
/** Local or hosted agent runtimes shown above the model list. */
|
|
161
|
+
availableAgents?: ComposerAgentOption[];
|
|
162
|
+
/** Selected agent runtime identifier. */
|
|
163
|
+
selectedAgent?: string;
|
|
164
|
+
/** Show only the selected agent in the model control. */
|
|
165
|
+
agentOnly?: boolean;
|
|
166
|
+
/** Callback when the user picks an agent runtime. */
|
|
167
|
+
onAgentChange?: (agent: string) => void;
|
|
168
|
+
/** Called when the shared model picker opens or closes. */
|
|
169
|
+
onModelSelectorOpenChange?: (open: boolean) => void;
|
|
170
|
+
/**
|
|
171
|
+
* Enable server-backed model/provider status checks. Defaults off when the
|
|
172
|
+
* host supplies model state and callbacks, otherwise on.
|
|
173
|
+
*/
|
|
174
|
+
modelStatusChecksEnabled?: boolean;
|
|
175
|
+
/** Called whenever the plain editor text changes. */
|
|
176
|
+
onTextChange?: (text: string) => void;
|
|
177
|
+
/**
|
|
178
|
+
* Override the Builder.io connect action in the model picker. When provided,
|
|
179
|
+
* clicking "Connect Builder.io" calls this instead of opening a browser popup.
|
|
180
|
+
* Used by the Electron desktop app to route through the native IPC handler.
|
|
181
|
+
*/
|
|
182
|
+
onConnectProvider?: () => void;
|
|
183
|
+
/** Called when a local runtime needs its native sign-in/setup flow. */
|
|
184
|
+
onConnectLocalRuntime?: (engine: string) => void;
|
|
185
|
+
/** Imperative handle for focusing the composer. */
|
|
186
|
+
composerRef?: Ref<TiptapComposerHandle>;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
// Minimal pass-through adapter. PromptComposer always submits through
|
|
190
|
+
// onSubmitOverride, so the runtime never actually calls this — but
|
|
191
|
+
// `useLocalRuntime` needs *something* shaped like a ChatModelAdapter.
|
|
192
|
+
const NOOP_ADAPTER: ChatModelAdapter = {
|
|
193
|
+
async *run() {
|
|
194
|
+
return;
|
|
195
|
+
},
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Local binary document adapter so reference PDFs, decks, and docs can be
|
|
200
|
+
* attached without dragging the whole assistant chat module into bundles that
|
|
201
|
+
* just want a prompt popover.
|
|
202
|
+
*/
|
|
203
|
+
class BinaryDocumentAttachmentAdapter implements AttachmentAdapter {
|
|
204
|
+
public accept = PROMPT_DOCUMENT_ATTACHMENT_ACCEPT;
|
|
205
|
+
|
|
206
|
+
public async add(state: { file: File }): Promise<PendingAttachment> {
|
|
207
|
+
return {
|
|
208
|
+
id: state.file.name,
|
|
209
|
+
type: "document",
|
|
210
|
+
name: state.file.name,
|
|
211
|
+
contentType: state.file.type || "application/octet-stream",
|
|
212
|
+
file: state.file,
|
|
213
|
+
status: { type: "requires-action", reason: "composer-send" },
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
public async send(
|
|
218
|
+
attachment: PendingAttachment,
|
|
219
|
+
): Promise<CompleteAttachment> {
|
|
220
|
+
return {
|
|
221
|
+
...attachment,
|
|
222
|
+
status: { type: "complete" },
|
|
223
|
+
content: [],
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
public async remove() {
|
|
228
|
+
/* noop */
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
class RasterImageAttachmentAdapter extends SimpleImageAttachmentAdapter {
|
|
233
|
+
public accept = IMAGE_ATTACHMENT_ACCEPT;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
function isInlineableTextFile(file: File): boolean {
|
|
237
|
+
if (file.type.startsWith("text/")) return true;
|
|
238
|
+
if (file.type === "application/json") return true;
|
|
239
|
+
return /\.(txt|md|markdown|csv|json|yaml|yml|html?|css|xml)$/i.test(
|
|
240
|
+
file.name,
|
|
241
|
+
);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
function formatInlineTextFile(name: string, text: string): string {
|
|
245
|
+
const truncated = text.length > MAX_INLINE_TEXT_FILE_CHARS;
|
|
246
|
+
const body = truncated ? text.slice(0, MAX_INLINE_TEXT_FILE_CHARS) : text;
|
|
247
|
+
return [
|
|
248
|
+
`<uploaded-text-file name="${escapePromptAttachmentAttribute(name)}">`,
|
|
249
|
+
body,
|
|
250
|
+
truncated
|
|
251
|
+
? `[Truncated after ${MAX_INLINE_TEXT_FILE_CHARS} characters.]`
|
|
252
|
+
: "",
|
|
253
|
+
"</uploaded-text-file>",
|
|
254
|
+
]
|
|
255
|
+
.filter(Boolean)
|
|
256
|
+
.join("\n");
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Only a confirmed-missing engine that also has a setup component to render
|
|
261
|
+
* may block typing: a disabled composer with no way out is never an acceptable
|
|
262
|
+
* terminal state, and `unknown`/`unavailable` mean the status check has not
|
|
263
|
+
* answered — not that no provider is configured.
|
|
264
|
+
*/
|
|
265
|
+
export function shouldGateComposerForMissingEngine(input: {
|
|
266
|
+
state: string;
|
|
267
|
+
hasSetupComponent: boolean;
|
|
268
|
+
}): boolean {
|
|
269
|
+
return input.state === "missing" && input.hasSetupComponent;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
export async function buildPromptComposerSubmission(options: {
|
|
273
|
+
text: string;
|
|
274
|
+
attachments?: ReadonlyArray<unknown>;
|
|
275
|
+
}): Promise<{ text: string; files: File[] }> {
|
|
276
|
+
const files: File[] = [];
|
|
277
|
+
const pastedTextBlocks: string[] = [];
|
|
278
|
+
const rawText = options.text;
|
|
279
|
+
|
|
280
|
+
for (const att of options.attachments ?? []) {
|
|
281
|
+
const a = att as Attachment;
|
|
282
|
+
if ("file" in a && a.file instanceof File) {
|
|
283
|
+
const file = a.file;
|
|
284
|
+
if (isPastedTextAttachmentName(file.name)) {
|
|
285
|
+
try {
|
|
286
|
+
pastedTextBlocks.push(await file.text());
|
|
287
|
+
} catch {
|
|
288
|
+
files.push(file);
|
|
289
|
+
}
|
|
290
|
+
} else {
|
|
291
|
+
if (isInlineableTextFile(file)) {
|
|
292
|
+
try {
|
|
293
|
+
pastedTextBlocks.push(
|
|
294
|
+
formatInlineTextFile(file.name, await file.text()),
|
|
295
|
+
);
|
|
296
|
+
} catch {
|
|
297
|
+
// Keep the upload path fallback below.
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
// Note: images are NOT inlined into the prompt text even when small.
|
|
301
|
+
// Inlining a base64 data-URL into a text string consumes an enormous
|
|
302
|
+
// number of tokens (≈ 700 K per MB) and most hosts handle images via
|
|
303
|
+
// proper attachment channels. The `files` array below carries the image
|
|
304
|
+
// for the host to process through a dedicated attachment pipeline.
|
|
305
|
+
files.push(file);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
return {
|
|
311
|
+
text: pastedTextBlocks.length
|
|
312
|
+
? [rawText.trim(), ...pastedTextBlocks].filter(Boolean).join("\n\n")
|
|
313
|
+
: rawText,
|
|
314
|
+
files,
|
|
315
|
+
};
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
function getImageSrc(attachment: Attachment): string | null {
|
|
319
|
+
if (attachment.type !== "image") return null;
|
|
320
|
+
if ("file" in attachment && attachment.file) {
|
|
321
|
+
return URL.createObjectURL(attachment.file);
|
|
322
|
+
}
|
|
323
|
+
const imagePart = attachment.content?.find((part) => part.type === "image");
|
|
324
|
+
return imagePart && "image" in imagePart ? imagePart.image : null;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
function ImagePreviewLightbox({
|
|
328
|
+
src,
|
|
329
|
+
alt,
|
|
330
|
+
onClose,
|
|
331
|
+
}: {
|
|
332
|
+
src: string;
|
|
333
|
+
alt: string;
|
|
334
|
+
onClose: () => void;
|
|
335
|
+
}) {
|
|
336
|
+
const t = useComposerRuntimeAdapters().translate!;
|
|
337
|
+
useEffect(() => {
|
|
338
|
+
const handler = (e: KeyboardEvent) => {
|
|
339
|
+
if (e.key === "Escape") onClose();
|
|
340
|
+
};
|
|
341
|
+
document.addEventListener("keydown", handler);
|
|
342
|
+
document.body.style.overflow = "hidden";
|
|
343
|
+
return () => {
|
|
344
|
+
document.removeEventListener("keydown", handler);
|
|
345
|
+
document.body.style.overflow = "";
|
|
346
|
+
};
|
|
347
|
+
}, [onClose]);
|
|
348
|
+
|
|
349
|
+
return (
|
|
350
|
+
<div
|
|
351
|
+
role="dialog"
|
|
352
|
+
aria-label={t("agentChat.composer.imagePreview", {
|
|
353
|
+
defaultValue: "Image preview",
|
|
354
|
+
})}
|
|
355
|
+
onClick={onClose}
|
|
356
|
+
className="fixed inset-0 z-[300] flex items-center justify-center bg-black/80 p-6 cursor-zoom-out"
|
|
357
|
+
>
|
|
358
|
+
<img
|
|
359
|
+
src={src}
|
|
360
|
+
alt={alt}
|
|
361
|
+
onClick={(e) => e.stopPropagation()}
|
|
362
|
+
className="max-h-full max-w-full object-contain rounded-md shadow-2xl cursor-default"
|
|
363
|
+
/>
|
|
364
|
+
<button
|
|
365
|
+
type="button"
|
|
366
|
+
onClick={onClose}
|
|
367
|
+
aria-label={t("agentChat.composer.closePreview", {
|
|
368
|
+
defaultValue: "Close preview",
|
|
369
|
+
})}
|
|
370
|
+
className="absolute end-4 top-4 flex h-8 w-8 cursor-pointer items-center justify-center rounded-full border border-white/30 bg-black/40 text-white hover:bg-black/60"
|
|
371
|
+
>
|
|
372
|
+
<IconX className="h-4 w-4" />
|
|
373
|
+
</button>
|
|
374
|
+
</div>
|
|
375
|
+
);
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
function AttachmentChip({
|
|
379
|
+
attachment,
|
|
380
|
+
onRemove,
|
|
381
|
+
}: {
|
|
382
|
+
attachment: Attachment;
|
|
383
|
+
onRemove: (id: string) => void;
|
|
384
|
+
}) {
|
|
385
|
+
const src = useMemo(() => getImageSrc(attachment), [attachment]);
|
|
386
|
+
const [previewOpen, setPreviewOpen] = useState(false);
|
|
387
|
+
const t = useComposerRuntimeAdapters().translate!;
|
|
388
|
+
useEffect(
|
|
389
|
+
() => () => {
|
|
390
|
+
if (src?.startsWith("blob:")) URL.revokeObjectURL(src);
|
|
391
|
+
},
|
|
392
|
+
[src],
|
|
393
|
+
);
|
|
394
|
+
|
|
395
|
+
if (isPastedTextAttachmentName(attachment.name)) {
|
|
396
|
+
return <PastedTextChip attachment={attachment} onRemove={onRemove} />;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
if (src) {
|
|
400
|
+
return (
|
|
401
|
+
<>
|
|
402
|
+
<button
|
|
403
|
+
type="button"
|
|
404
|
+
onClick={() => setPreviewOpen(true)}
|
|
405
|
+
aria-label={t("agentChat.composer.previewAttachment", {
|
|
406
|
+
name: attachment.name,
|
|
407
|
+
defaultValue: `Preview ${attachment.name}`,
|
|
408
|
+
})}
|
|
409
|
+
className="agent-composer-attachment-image group relative flex h-16 min-w-16 max-w-28 cursor-zoom-in items-center justify-center overflow-hidden rounded-lg border border-border/70 bg-muted/50"
|
|
410
|
+
>
|
|
411
|
+
<img
|
|
412
|
+
src={src}
|
|
413
|
+
alt={attachment.name}
|
|
414
|
+
className="max-h-full max-w-full object-contain p-1"
|
|
415
|
+
/>
|
|
416
|
+
<span
|
|
417
|
+
role="button"
|
|
418
|
+
tabIndex={0}
|
|
419
|
+
onClick={(e) => {
|
|
420
|
+
e.stopPropagation();
|
|
421
|
+
onRemove(attachment.id);
|
|
422
|
+
}}
|
|
423
|
+
onKeyDown={(e) => {
|
|
424
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
425
|
+
e.preventDefault();
|
|
426
|
+
e.stopPropagation();
|
|
427
|
+
onRemove(attachment.id);
|
|
428
|
+
}
|
|
429
|
+
}}
|
|
430
|
+
aria-label={t("agentChat.composer.removeAttachment", {
|
|
431
|
+
name: attachment.name,
|
|
432
|
+
defaultValue: `Remove ${attachment.name}`,
|
|
433
|
+
})}
|
|
434
|
+
className="absolute end-1 top-1 flex h-5 w-5 cursor-pointer items-center justify-center rounded-full border border-border/60 bg-background/90 text-muted-foreground hover:text-foreground"
|
|
435
|
+
>
|
|
436
|
+
<IconX className="h-3 w-3" />
|
|
437
|
+
</span>
|
|
438
|
+
</button>
|
|
439
|
+
{previewOpen ? (
|
|
440
|
+
<ImagePreviewLightbox
|
|
441
|
+
src={src}
|
|
442
|
+
alt={attachment.name}
|
|
443
|
+
onClose={() => setPreviewOpen(false)}
|
|
444
|
+
/>
|
|
445
|
+
) : null}
|
|
446
|
+
</>
|
|
447
|
+
);
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
return (
|
|
451
|
+
<div className="agent-composer-attachment-chip group relative inline-flex max-w-[200px] items-center gap-2 rounded-md border border-border/70 bg-muted/50 px-2 py-1.5 text-xs">
|
|
452
|
+
<div className="flex h-6 w-6 shrink-0 items-center justify-center rounded bg-background text-[9px] font-semibold uppercase text-muted-foreground">
|
|
453
|
+
{attachment.name.split(".").pop() ||
|
|
454
|
+
t("agentChat.composer.file", { defaultValue: "file" })}
|
|
455
|
+
</div>
|
|
456
|
+
<span className="min-w-0 truncate font-medium">{attachment.name}</span>
|
|
457
|
+
<button
|
|
458
|
+
type="button"
|
|
459
|
+
onClick={() => onRemove(attachment.id)}
|
|
460
|
+
aria-label={t("agentChat.composer.removeAttachment", {
|
|
461
|
+
name: attachment.name,
|
|
462
|
+
defaultValue: `Remove ${attachment.name}`,
|
|
463
|
+
})}
|
|
464
|
+
className="flex h-5 w-5 shrink-0 cursor-pointer items-center justify-center rounded text-muted-foreground hover:text-foreground"
|
|
465
|
+
>
|
|
466
|
+
<IconX className="h-3 w-3" />
|
|
467
|
+
</button>
|
|
468
|
+
</div>
|
|
469
|
+
);
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
function PromptAttachmentStrip() {
|
|
473
|
+
const attachments = useComposer((state) => state.attachments);
|
|
474
|
+
const aui = useAui();
|
|
475
|
+
|
|
476
|
+
const handleRemove = useCallback(
|
|
477
|
+
(id: string) => {
|
|
478
|
+
void aui.composer().attachment({ id }).remove();
|
|
479
|
+
},
|
|
480
|
+
[aui],
|
|
481
|
+
);
|
|
482
|
+
|
|
483
|
+
if (attachments.length === 0) return null;
|
|
484
|
+
return (
|
|
485
|
+
<div className="agent-composer-attachment-strip flex flex-wrap gap-2 px-2 pt-2">
|
|
486
|
+
{attachments.map((attachment) => (
|
|
487
|
+
<AttachmentChip
|
|
488
|
+
key={attachment.id}
|
|
489
|
+
attachment={attachment}
|
|
490
|
+
onRemove={handleRemove}
|
|
491
|
+
/>
|
|
492
|
+
))}
|
|
493
|
+
</div>
|
|
494
|
+
);
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
function PromptComposerInner({
|
|
498
|
+
onSubmit,
|
|
499
|
+
placeholder,
|
|
500
|
+
disabled,
|
|
501
|
+
onDisabledClick,
|
|
502
|
+
maxDocumentAttachmentBytes,
|
|
503
|
+
documentAttachmentLimitLabel,
|
|
504
|
+
autoFocus,
|
|
505
|
+
className,
|
|
506
|
+
style,
|
|
507
|
+
rootClassName,
|
|
508
|
+
rootStyle,
|
|
509
|
+
draftScope,
|
|
510
|
+
preserveDraftOnSubmit = false,
|
|
511
|
+
showModelSelector = true,
|
|
512
|
+
modelSelectorOpen,
|
|
513
|
+
showAutoModelOption = true,
|
|
514
|
+
voiceEnabled = DEFAULT_VOICE_DICTATION_ENABLED,
|
|
515
|
+
attachmentsEnabled = true,
|
|
516
|
+
plusMenuMode,
|
|
517
|
+
terminalModeControl,
|
|
518
|
+
extensionTools = false,
|
|
519
|
+
initialText,
|
|
520
|
+
initialTextKey,
|
|
521
|
+
modeControl,
|
|
522
|
+
toolbarSlot,
|
|
523
|
+
attachButton,
|
|
524
|
+
actionButton,
|
|
525
|
+
extraActionButton,
|
|
526
|
+
layoutVariant,
|
|
527
|
+
slashCommands,
|
|
528
|
+
slashSkills,
|
|
529
|
+
includeDefaultSlashCommands,
|
|
530
|
+
includeDefaultSlashSkills,
|
|
531
|
+
onSlashCommand,
|
|
532
|
+
availableModels,
|
|
533
|
+
modelListLoading,
|
|
534
|
+
selectedModel,
|
|
535
|
+
selectedEngine,
|
|
536
|
+
selectedEffort,
|
|
537
|
+
onModelChange,
|
|
538
|
+
onEffortChange,
|
|
539
|
+
availableAgents,
|
|
540
|
+
selectedAgent,
|
|
541
|
+
agentOnly = false,
|
|
542
|
+
onAgentChange,
|
|
543
|
+
onModelSelectorOpenChange,
|
|
544
|
+
modelStatusChecksEnabled,
|
|
545
|
+
onTextChange,
|
|
546
|
+
onConnectProvider,
|
|
547
|
+
onConnectLocalRuntime,
|
|
548
|
+
composerRef,
|
|
549
|
+
}: PromptComposerProps) {
|
|
550
|
+
const adapters = useComposerRuntimeAdapters();
|
|
551
|
+
const t = adapters.translate!;
|
|
552
|
+
const modelsAdapter = adapters.models!;
|
|
553
|
+
const BuilderSetupCard = modelsAdapter.BuilderSetupCard;
|
|
554
|
+
const BuilderSetupContent = modelsAdapter.BuilderSetupContent;
|
|
555
|
+
const localRef = useRef<TiptapComposerHandle>(null);
|
|
556
|
+
const handleRef = composerRef ?? localRef;
|
|
557
|
+
const hostManagedModels = Boolean(
|
|
558
|
+
availableModels && selectedModel && onModelChange,
|
|
559
|
+
);
|
|
560
|
+
const resolvedModelStatusChecksEnabled =
|
|
561
|
+
modelStatusChecksEnabled ?? !hostManagedModels;
|
|
562
|
+
const models = modelsAdapter.useChatModels!({
|
|
563
|
+
enabled: showModelSelector && resolvedModelStatusChecksEnabled,
|
|
564
|
+
});
|
|
565
|
+
const composerModel = showModelSelector
|
|
566
|
+
? (selectedModel ?? models.selectedModel)
|
|
567
|
+
: undefined;
|
|
568
|
+
const composerEngine = showModelSelector
|
|
569
|
+
? (selectedEngine ?? models.selectedEngine)
|
|
570
|
+
: undefined;
|
|
571
|
+
const composerEffort = showModelSelector
|
|
572
|
+
? (selectedEffort ?? models.selectedEffort)
|
|
573
|
+
: undefined;
|
|
574
|
+
const composerModelGroups = showModelSelector
|
|
575
|
+
? (availableModels ?? models.availableModels)
|
|
576
|
+
: undefined;
|
|
577
|
+
const composerModelListLoading =
|
|
578
|
+
showModelSelector &&
|
|
579
|
+
(modelListLoading ??
|
|
580
|
+
(availableModels ? availableModels.length === 0 : models.isLoading));
|
|
581
|
+
const handleModelChange = showModelSelector
|
|
582
|
+
? (onModelChange ?? models.onModelChange)
|
|
583
|
+
: undefined;
|
|
584
|
+
const handleEffortChange = showModelSelector
|
|
585
|
+
? (onEffortChange ?? models.onEffortChange)
|
|
586
|
+
: undefined;
|
|
587
|
+
const agentEngineConfigured = modelsAdapter.useAgentEngineConfigured!(
|
|
588
|
+
resolvedModelStatusChecksEnabled,
|
|
589
|
+
);
|
|
590
|
+
const missingApiKey = agentEngineConfigured.missing;
|
|
591
|
+
const [missingKeyBouncePulse, setMissingKeyBouncePulse] = useState(0);
|
|
592
|
+
const bounceMissingKeySetup = useCallback(() => {
|
|
593
|
+
setMissingKeyBouncePulse((pulse) => pulse + 1);
|
|
594
|
+
if (typeof window !== "undefined") {
|
|
595
|
+
window.dispatchEvent(new Event("agent-chat:missing-api-key"));
|
|
596
|
+
}
|
|
597
|
+
}, []);
|
|
598
|
+
const handleBuilderConnected = useCallback(() => {
|
|
599
|
+
if (typeof window !== "undefined") {
|
|
600
|
+
window.dispatchEvent(new Event("agent-engine:configured-changed"));
|
|
601
|
+
}
|
|
602
|
+
}, []);
|
|
603
|
+
|
|
604
|
+
useEffect(() => {
|
|
605
|
+
if (!autoFocus) return;
|
|
606
|
+
const id = window.setTimeout(() => {
|
|
607
|
+
const target =
|
|
608
|
+
typeof handleRef === "object" && handleRef && "current" in handleRef
|
|
609
|
+
? handleRef.current
|
|
610
|
+
: null;
|
|
611
|
+
target?.focus();
|
|
612
|
+
}, 50);
|
|
613
|
+
return () => window.clearTimeout(id);
|
|
614
|
+
}, [autoFocus, handleRef]);
|
|
615
|
+
|
|
616
|
+
const handleSubmit = useCallback(
|
|
617
|
+
async (
|
|
618
|
+
text: string,
|
|
619
|
+
references: Reference[],
|
|
620
|
+
attachments?: ReadonlyArray<unknown>,
|
|
621
|
+
submitOptions?: TiptapComposerSubmitOptions,
|
|
622
|
+
) => {
|
|
623
|
+
// PromptComposer hosts (NewWorkspaceAppFlow, create-extension, create-deck,
|
|
624
|
+
// …) submit a single string prompt — they don't run the assistant-ui
|
|
625
|
+
// attachment send pipeline. TiptapComposer auto-converts large pastes
|
|
626
|
+
// into a "Pasted text" chip, which would otherwise disappear into an
|
|
627
|
+
// unprocessed File. Inline the chip body back into the prompt text so
|
|
628
|
+
// newlines and full content survive the round-trip.
|
|
629
|
+
const { text: finalText, files } = await buildPromptComposerSubmission({
|
|
630
|
+
text,
|
|
631
|
+
attachments,
|
|
632
|
+
});
|
|
633
|
+
await onSubmit(finalText, files, references, {
|
|
634
|
+
intent: submitOptions?.intent ?? "immediate",
|
|
635
|
+
model: composerModel,
|
|
636
|
+
engine: composerEngine,
|
|
637
|
+
effort: composerEffort,
|
|
638
|
+
});
|
|
639
|
+
},
|
|
640
|
+
[composerEffort, composerEngine, composerModel, onSubmit],
|
|
641
|
+
);
|
|
642
|
+
const useInlineMissingKeySetup = layoutVariant === "compact";
|
|
643
|
+
const gateComposer = shouldGateComposerForMissingEngine({
|
|
644
|
+
state: agentEngineConfigured.state,
|
|
645
|
+
hasSetupComponent: Boolean(
|
|
646
|
+
useInlineMissingKeySetup ? BuilderSetupContent : BuilderSetupCard,
|
|
647
|
+
),
|
|
648
|
+
});
|
|
649
|
+
|
|
650
|
+
return (
|
|
651
|
+
<>
|
|
652
|
+
{missingApiKey && !useInlineMissingKeySetup && BuilderSetupCard ? (
|
|
653
|
+
<BuilderSetupCard
|
|
654
|
+
onConnected={handleBuilderConnected}
|
|
655
|
+
bouncePulse={missingKeyBouncePulse}
|
|
656
|
+
attached
|
|
657
|
+
fullWidth
|
|
658
|
+
layout="sidebar"
|
|
659
|
+
/>
|
|
660
|
+
) : null}
|
|
661
|
+
{missingApiKey && useInlineMissingKeySetup && BuilderSetupContent ? (
|
|
662
|
+
<div className="agent-builder-setup-inline--attached mb-0 rounded-md border border-border/80 bg-background/80 p-2.5 text-start shadow-sm">
|
|
663
|
+
<BuilderSetupContent
|
|
664
|
+
onConnected={handleBuilderConnected}
|
|
665
|
+
layout="sidebar"
|
|
666
|
+
/>
|
|
667
|
+
</div>
|
|
668
|
+
) : null}
|
|
669
|
+
<AgentComposerFrame
|
|
670
|
+
className={cn(
|
|
671
|
+
"text-start",
|
|
672
|
+
gateComposer && "cursor-pointer",
|
|
673
|
+
(gateComposer || onDisabledClick) &&
|
|
674
|
+
"agent-composer-area--attached-above",
|
|
675
|
+
className,
|
|
676
|
+
)}
|
|
677
|
+
rootClassName={rootClassName}
|
|
678
|
+
style={style}
|
|
679
|
+
rootStyle={rootStyle}
|
|
680
|
+
layoutVariant={layoutVariant}
|
|
681
|
+
onClick={
|
|
682
|
+
gateComposer
|
|
683
|
+
? bounceMissingKeySetup
|
|
684
|
+
: onDisabledClick
|
|
685
|
+
? () => onDisabledClick()
|
|
686
|
+
: undefined
|
|
687
|
+
}
|
|
688
|
+
>
|
|
689
|
+
<PromptAttachmentStrip />
|
|
690
|
+
<TiptapComposer
|
|
691
|
+
focusRef={handleRef}
|
|
692
|
+
disabled={disabled || gateComposer}
|
|
693
|
+
maxDocumentAttachmentBytes={maxDocumentAttachmentBytes}
|
|
694
|
+
documentAttachmentLimitLabel={documentAttachmentLimitLabel}
|
|
695
|
+
placeholder={
|
|
696
|
+
gateComposer
|
|
697
|
+
? t("agentChat.composer.connectAbove", {
|
|
698
|
+
defaultValue: "Connect AI above to continue...",
|
|
699
|
+
})
|
|
700
|
+
: placeholder
|
|
701
|
+
}
|
|
702
|
+
initialText={initialText}
|
|
703
|
+
initialTextKey={initialTextKey}
|
|
704
|
+
onSubmit={handleSubmit}
|
|
705
|
+
clearOnSubmit={!preserveDraftOnSubmit}
|
|
706
|
+
plusMenuMode={
|
|
707
|
+
plusMenuMode ?? (attachmentsEnabled ? "upload-only" : "hidden")
|
|
708
|
+
}
|
|
709
|
+
terminalModeControl={terminalModeControl}
|
|
710
|
+
extensionTools={extensionTools}
|
|
711
|
+
attachButton={attachButton}
|
|
712
|
+
modeControl={modeControl}
|
|
713
|
+
toolbarSlot={toolbarSlot}
|
|
714
|
+
actionButton={actionButton}
|
|
715
|
+
extraActionButton={extraActionButton}
|
|
716
|
+
layoutVariant={layoutVariant}
|
|
717
|
+
slashCommands={slashCommands}
|
|
718
|
+
slashSkills={slashSkills}
|
|
719
|
+
includeDefaultSlashCommands={includeDefaultSlashCommands}
|
|
720
|
+
includeDefaultSlashSkills={includeDefaultSlashSkills}
|
|
721
|
+
onSlashCommand={onSlashCommand}
|
|
722
|
+
voiceEnabled={voiceEnabled}
|
|
723
|
+
onTextChange={onTextChange}
|
|
724
|
+
draftScope={draftScope}
|
|
725
|
+
selectedModel={composerModel}
|
|
726
|
+
modelSelectorOpen={modelSelectorOpen}
|
|
727
|
+
selectedEffort={composerEffort}
|
|
728
|
+
availableModels={composerModelGroups}
|
|
729
|
+
availableAgents={availableAgents}
|
|
730
|
+
selectedAgent={selectedAgent}
|
|
731
|
+
agentOnly={agentOnly}
|
|
732
|
+
showAutoModelOption={showAutoModelOption}
|
|
733
|
+
modelListLoading={composerModelListLoading}
|
|
734
|
+
onModelChange={handleModelChange}
|
|
735
|
+
onEffortChange={handleEffortChange}
|
|
736
|
+
onAgentChange={onAgentChange}
|
|
737
|
+
onModelSelectorOpenChange={onModelSelectorOpenChange}
|
|
738
|
+
providerConnectStatusEnabled={resolvedModelStatusChecksEnabled}
|
|
739
|
+
onConnectProvider={onConnectProvider}
|
|
740
|
+
onConnectLocalRuntime={onConnectLocalRuntime}
|
|
741
|
+
/>
|
|
742
|
+
</AgentComposerFrame>
|
|
743
|
+
</>
|
|
744
|
+
);
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
/**
|
|
748
|
+
* Standalone composer that mirrors the agent sidebar's input experience —
|
|
749
|
+
* voice dictation, file upload, model selector, submit-on-Enter — for use in
|
|
750
|
+
* popovers and inline prompt forms (create tool, create deck, create dashboard,
|
|
751
|
+
* the Dispatch new-app flow, etc.).
|
|
752
|
+
*
|
|
753
|
+
* The host owns submission: when the user presses Enter or clicks submit,
|
|
754
|
+
* `onSubmit(text, files, references, options)` is called. PromptComposer runs
|
|
755
|
+
* its own minimal assistant-ui runtime so it can be dropped into any subtree
|
|
756
|
+
* without needing the outer chat to be mounted.
|
|
757
|
+
*/
|
|
758
|
+
export function PromptComposer(props: PromptComposerProps) {
|
|
759
|
+
const StaleIndexBoundary =
|
|
760
|
+
useComposerRuntimeAdapters().agentChat!.StaleIndexBoundary!;
|
|
761
|
+
const attachmentAdapter = useMemo(
|
|
762
|
+
() =>
|
|
763
|
+
new CompositeAttachmentAdapter([
|
|
764
|
+
new RasterImageAttachmentAdapter(),
|
|
765
|
+
new BinaryDocumentAttachmentAdapter(),
|
|
766
|
+
new TextAttachmentAdapter(),
|
|
767
|
+
]),
|
|
768
|
+
[],
|
|
769
|
+
);
|
|
770
|
+
const runtime = useLocalRuntime(NOOP_ADAPTER, {
|
|
771
|
+
adapters: { attachments: attachmentAdapter },
|
|
772
|
+
});
|
|
773
|
+
const resetKey = [
|
|
774
|
+
props.draftScope ?? "",
|
|
775
|
+
props.initialTextKey ?? "",
|
|
776
|
+
props.initialText ?? "",
|
|
777
|
+
].join(":");
|
|
778
|
+
|
|
779
|
+
return (
|
|
780
|
+
<TooltipProvider delayDuration={200}>
|
|
781
|
+
<AssistantRuntimeProvider runtime={runtime}>
|
|
782
|
+
<ThreadPrimitive.Root
|
|
783
|
+
className="contents"
|
|
784
|
+
style={{ display: "contents" }}
|
|
785
|
+
>
|
|
786
|
+
<StaleIndexBoundary
|
|
787
|
+
resetKey={resetKey}
|
|
788
|
+
componentName="PromptComposer"
|
|
789
|
+
>
|
|
790
|
+
<PromptComposerInner {...props} />
|
|
791
|
+
</StaleIndexBoundary>
|
|
792
|
+
</ThreadPrimitive.Root>
|
|
793
|
+
</AssistantRuntimeProvider>
|
|
794
|
+
</TooltipProvider>
|
|
795
|
+
);
|
|
796
|
+
}
|