@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,36 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { IconFile, IconFolder } from "@tabler/icons-react";
|
|
3
|
+
import { mergeAttributes, Node } from "@tiptap/core";
|
|
4
|
+
import { NodeViewWrapper, ReactNodeViewRenderer } from "@tiptap/react";
|
|
5
|
+
const FileReferenceComponent = ({ node }) => {
|
|
6
|
+
const isFolder = node.attrs.path?.endsWith("/");
|
|
7
|
+
const cleanPath = isFolder ? node.attrs.path.slice(0, -1) : node.attrs.path;
|
|
8
|
+
const displayName = cleanPath.split("/").pop() || cleanPath;
|
|
9
|
+
return (_jsx(NodeViewWrapper, { as: "span", className: "inline", children: _jsxs("span", { className: "inline-flex items-center gap-1 rounded-md border border-input bg-muted/50 px-1.5 py-0.5 text-xs font-medium text-foreground align-middle mx-0.5 max-w-[200px] select-none", title: node.attrs.path, children: [isFolder ? (_jsx(IconFolder, { size: 14, className: "shrink-0 text-muted-foreground" })) : (_jsx(IconFile, { size: 14, className: "shrink-0 text-muted-foreground" })), _jsx("span", { className: "truncate", children: displayName })] }) }));
|
|
10
|
+
};
|
|
11
|
+
export const FileReference = Node.create({
|
|
12
|
+
name: "fileReference",
|
|
13
|
+
group: "inline",
|
|
14
|
+
inline: true,
|
|
15
|
+
selectable: true,
|
|
16
|
+
atom: true,
|
|
17
|
+
addAttributes() {
|
|
18
|
+
return {
|
|
19
|
+
path: { default: null },
|
|
20
|
+
source: { default: "codebase" },
|
|
21
|
+
};
|
|
22
|
+
},
|
|
23
|
+
parseHTML() {
|
|
24
|
+
return [{ tag: 'span[data-type="file-reference"]' }];
|
|
25
|
+
},
|
|
26
|
+
renderHTML({ HTMLAttributes }) {
|
|
27
|
+
return [
|
|
28
|
+
"span",
|
|
29
|
+
mergeAttributes({ "data-type": "file-reference" }, HTMLAttributes),
|
|
30
|
+
];
|
|
31
|
+
},
|
|
32
|
+
addNodeView() {
|
|
33
|
+
return ReactNodeViewRenderer(FileReferenceComponent);
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=FileReference.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileReference.js","sourceRoot":"","sources":["../../../src/composer/extensions/FileReference.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAEvE,MAAM,sBAAsB,GAAG,CAAC,EAAE,IAAI,EAAiB,EAAE,EAAE;IACzD,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC;IAChD,MAAM,SAAS,GAAG,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;IAC5E,MAAM,WAAW,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,IAAI,SAAS,CAAC;IAE5D,OAAO,CACL,KAAC,eAAe,IAAC,EAAE,EAAC,MAAM,EAAC,SAAS,EAAC,QAAQ,YAC3C,gBACE,SAAS,EAAC,2KAA2K,EACrL,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,aAErB,QAAQ,CAAC,CAAC,CAAC,CACV,KAAC,UAAU,IAAC,IAAI,EAAE,EAAE,EAAE,SAAS,EAAC,gCAAgC,GAAG,CACpE,CAAC,CAAC,CAAC,CACF,KAAC,QAAQ,IAAC,IAAI,EAAE,EAAE,EAAE,SAAS,EAAC,gCAAgC,GAAG,CAClE,EACD,eAAM,SAAS,EAAC,UAAU,YAAE,WAAW,GAAQ,IAC1C,GACS,CACnB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC;IACvC,IAAI,EAAE,eAAe;IACrB,KAAK,EAAE,QAAQ;IACf,MAAM,EAAE,IAAI;IACZ,UAAU,EAAE,IAAI;IAChB,IAAI,EAAE,IAAI;IAEV,aAAa;QACX,OAAO;YACL,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;YACvB,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;SAChC,CAAC;IACJ,CAAC;IAED,SAAS;QACP,OAAO,CAAC,EAAE,GAAG,EAAE,kCAAkC,EAAE,CAAC,CAAC;IACvD,CAAC;IAED,UAAU,CAAC,EAAE,cAAc,EAAE;QAC3B,OAAO;YACL,MAAM;YACN,eAAe,CAAC,EAAE,WAAW,EAAE,gBAAgB,EAAE,EAAE,cAAc,CAAC;SACnE,CAAC;IACJ,CAAC;IAED,WAAW;QACT,OAAO,qBAAqB,CAAC,sBAAsB,CAAC,CAAC;IACvD,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MentionReference.d.ts","sourceRoot":"","sources":["../../../src/composer/extensions/MentionReference.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAmB,IAAI,EAAE,MAAM,cAAc,CAAC;AA0CrD,eAAO,MAAM,gBAAgB,gBAuC3B,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { IconFile, IconFolder, IconFileText, IconCheckbox, IconMail, IconUser, IconPresentation, IconStack2, IconMessageChatbot, } from "@tabler/icons-react";
|
|
3
|
+
import { mergeAttributes, Node } from "@tiptap/core";
|
|
4
|
+
import { NodeViewWrapper, ReactNodeViewRenderer } from "@tiptap/react";
|
|
5
|
+
const iconProps = { size: 14, className: "shrink-0 text-muted-foreground" };
|
|
6
|
+
function MentionIcon({ icon }) {
|
|
7
|
+
switch (icon) {
|
|
8
|
+
case "folder":
|
|
9
|
+
return _jsx(IconFolder, { ...iconProps });
|
|
10
|
+
case "document":
|
|
11
|
+
return _jsx(IconFileText, { ...iconProps });
|
|
12
|
+
case "form":
|
|
13
|
+
return _jsx(IconCheckbox, { ...iconProps });
|
|
14
|
+
case "email":
|
|
15
|
+
return _jsx(IconMail, { ...iconProps });
|
|
16
|
+
case "user":
|
|
17
|
+
return _jsx(IconUser, { ...iconProps });
|
|
18
|
+
case "deck":
|
|
19
|
+
return _jsx(IconPresentation, { ...iconProps });
|
|
20
|
+
case "agent":
|
|
21
|
+
return _jsx(IconMessageChatbot, { ...iconProps });
|
|
22
|
+
case "file":
|
|
23
|
+
return _jsx(IconFile, { ...iconProps });
|
|
24
|
+
default:
|
|
25
|
+
return _jsx(IconStack2, { ...iconProps });
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
const MentionReferenceComponent = ({ node }) => {
|
|
29
|
+
return (_jsx(NodeViewWrapper, { as: "span", className: "inline", children: _jsxs("span", { className: "inline-flex items-center gap-1 rounded-md border border-input bg-muted/50 px-1.5 py-0.5 text-xs font-medium text-foreground align-middle mx-0.5 max-w-[200px] select-none", title: node.attrs.refPath || node.attrs.refId || node.attrs.label, children: [_jsx(MentionIcon, { icon: node.attrs.icon }), _jsx("span", { className: "truncate", children: node.attrs.label })] }) }));
|
|
30
|
+
};
|
|
31
|
+
export const MentionReference = Node.create({
|
|
32
|
+
name: "mentionReference",
|
|
33
|
+
group: "inline",
|
|
34
|
+
inline: true,
|
|
35
|
+
selectable: true,
|
|
36
|
+
atom: true,
|
|
37
|
+
addAttributes() {
|
|
38
|
+
return {
|
|
39
|
+
label: { default: null },
|
|
40
|
+
icon: { default: "file" },
|
|
41
|
+
source: { default: "" },
|
|
42
|
+
refType: { default: "file" },
|
|
43
|
+
refId: { default: null },
|
|
44
|
+
refPath: { default: null },
|
|
45
|
+
slotKey: { default: null },
|
|
46
|
+
slotLabel: { default: null },
|
|
47
|
+
metadata: { default: null },
|
|
48
|
+
};
|
|
49
|
+
},
|
|
50
|
+
parseHTML() {
|
|
51
|
+
return [{ tag: 'span[data-type="mention-reference"]' }];
|
|
52
|
+
},
|
|
53
|
+
renderHTML({ HTMLAttributes }) {
|
|
54
|
+
return [
|
|
55
|
+
"span",
|
|
56
|
+
mergeAttributes({ "data-type": "mention-reference" }, HTMLAttributes),
|
|
57
|
+
];
|
|
58
|
+
},
|
|
59
|
+
renderText({ node }) {
|
|
60
|
+
return `@${node.attrs.label}`;
|
|
61
|
+
},
|
|
62
|
+
addNodeView() {
|
|
63
|
+
return ReactNodeViewRenderer(MentionReferenceComponent);
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
//# sourceMappingURL=MentionReference.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MentionReference.js","sourceRoot":"","sources":["../../../src/composer/extensions/MentionReference.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,gBAAgB,EAChB,UAAU,EACV,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAEvE,MAAM,SAAS,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,gCAAgC,EAAE,CAAC;AAE5E,SAAS,WAAW,CAAC,EAAE,IAAI,EAAqB;IAC9C,QAAQ,IAAI,EAAE,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AI;IACZ,UAAU,EAAE,IAAI;IAChB,IAAI,EAAE,IAAI;IAEV,aAAa;QACX,OAAO;YACL,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;YACxB,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;YACzB,MAAM,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;YACvB,OAAO,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;YAC5B,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;YACxB,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;YAC1B,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;YAC1B,SAAS,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;YAC5B,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;SAC5B,CAAC;IACJ,CAAC;IAED,SAAS;QACP,OAAO,CAAC,EAAE,GAAG,EAAE,qCAAqC,EAAE,CAAC,CAAC;IAC1D,CAAC;IAED,UAAU,CAAC,EAAE,cAAc,EAAE;QAC3B,OAAO;YACL,MAAM;YACN,eAAe,CAAC,EAAE,WAAW,EAAE,mBAAmB,EAAE,EAAE,cAAc,CAAC;SACtE,CAAC;IACJ,CAAC;IAED,UAAU,CAAC,EAAE,IAAI,EAAE;QACjB,OAAO,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;IAChC,CAAC;IAED,WAAW;QACT,OAAO,qBAAqB,CAAC,yBAAyB,CAAC,CAAC;IAC1D,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SkillReference.d.ts","sourceRoot":"","sources":["../../../src/composer/extensions/SkillReference.tsx"],"names":[],"mappings":"AACA,OAAO,EAAmB,IAAI,EAAE,MAAM,cAAc,CAAC;AAyBrD,eAAO,MAAM,cAAc,gBA6BzB,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { IconStack2 } from "@tabler/icons-react";
|
|
3
|
+
import { mergeAttributes, Node } from "@tiptap/core";
|
|
4
|
+
import { NodeViewWrapper, ReactNodeViewRenderer } from "@tiptap/react";
|
|
5
|
+
const SkillReferenceComponent = ({ node }) => {
|
|
6
|
+
const displayName = (node.attrs.name || node.attrs.path || "")
|
|
7
|
+
.replace(/^(\.agents?\/)?skills\//, "")
|
|
8
|
+
.replace(/\/SKILL\.md$/i, "")
|
|
9
|
+
.replace(/\.md$/i, "")
|
|
10
|
+
.split("/")
|
|
11
|
+
.pop() || "skill";
|
|
12
|
+
return (_jsx(NodeViewWrapper, { as: "span", className: "inline", children: _jsxs("span", { className: "inline-flex items-center gap-1 rounded-md border border-input bg-muted/50 px-1.5 py-0.5 text-xs font-medium text-foreground align-middle mx-0.5 max-w-[160px] select-none", title: node.attrs.path, children: [_jsx(IconStack2, { size: 14, className: "shrink-0 text-muted-foreground" }), _jsx("span", { className: "truncate", children: displayName })] }) }));
|
|
13
|
+
};
|
|
14
|
+
export const SkillReference = Node.create({
|
|
15
|
+
name: "skillReference",
|
|
16
|
+
group: "inline",
|
|
17
|
+
inline: true,
|
|
18
|
+
selectable: true,
|
|
19
|
+
atom: true,
|
|
20
|
+
addAttributes() {
|
|
21
|
+
return {
|
|
22
|
+
name: { default: null },
|
|
23
|
+
path: { default: null },
|
|
24
|
+
source: { default: "codebase" },
|
|
25
|
+
};
|
|
26
|
+
},
|
|
27
|
+
parseHTML() {
|
|
28
|
+
return [{ tag: 'span[data-type="skill-reference"]' }];
|
|
29
|
+
},
|
|
30
|
+
renderHTML({ HTMLAttributes }) {
|
|
31
|
+
return [
|
|
32
|
+
"span",
|
|
33
|
+
mergeAttributes({ "data-type": "skill-reference" }, HTMLAttributes),
|
|
34
|
+
];
|
|
35
|
+
},
|
|
36
|
+
addNodeView() {
|
|
37
|
+
return ReactNodeViewRenderer(SkillReferenceComponent);
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
//# sourceMappingURL=SkillReference.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SkillReference.js","sourceRoot":"","sources":["../../../src/composer/extensions/SkillReference.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAEvE,MAAM,uBAAuB,GAAG,CAAC,EAAE,IAAI,EAAiB,EAAE,EAAE;IAC1D,MAAM,WAAW,GACf,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,EAAE,CAAC;SACvC,OAAO,CAAC,yBAAyB,EAAE,EAAE,CAAC;SACtC,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC;SAC5B,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;SACrB,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,EAAE,IAAI,OAAO,CAAC;IAEtB,OAAO,CACL,KAAC,eAAe,IAAC,EAAE,EAAC,MAAM,EAAC,SAAS,EAAC,QAAQ,YAC3C,gBACE,SAAS,EAAC,2KAA2K,EACrL,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,aAEtB,KAAC,UAAU,IAAC,IAAI,EAAE,EAAE,EAAE,SAAS,EAAC,gCAAgC,GAAG,EACnE,eAAM,SAAS,EAAC,UAAU,YAAE,WAAW,GAAQ,IAC1C,GACS,CACnB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,CAAC,MAAM,CAAC;IACxC,IAAI,EAAE,gBAAgB;IACtB,KAAK,EAAE,QAAQ;IACf,MAAM,EAAE,IAAI;IACZ,UAAU,EAAE,IAAI;IAChB,IAAI,EAAE,IAAI;IAEV,aAAa;QACX,OAAO;YACL,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;YACvB,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;YACvB,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;SAChC,CAAC;IACJ,CAAC;IAED,SAAS;QACP,OAAO,CAAC,EAAE,GAAG,EAAE,mCAAmC,EAAE,CAAC,CAAC;IACxD,CAAC;IAED,UAAU,CAAC,EAAE,cAAc,EAAE;QAC3B,OAAO;YACL,MAAM;YACN,eAAe,CAAC,EAAE,WAAW,EAAE,iBAAiB,EAAE,EAAE,cAAc,CAAC;SACpE,CAAC;IACJ,CAAC;IAED,WAAW;QACT,OAAO,qBAAqB,CAAC,uBAAuB,CAAC,CAAC;IACxD,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { FileReference } from "./extensions/FileReference.js";
|
|
2
|
+
export { SkillReference } from "./extensions/SkillReference.js";
|
|
3
|
+
export { MentionReference } from "./extensions/MentionReference.js";
|
|
4
|
+
export { AgentComposerFrame, type AgentComposerFrameProps, } from "./AgentComposerFrame.js";
|
|
5
|
+
export { TiptapComposer, canSubmitComposerContent, displayableComposerModeMessage, getComposerSubmitIntentForEnterKey, handleComposerFileDrop, insertComposerHardBreakAndScrollIntoView, type ComposerSubmitIntent, type TiptapComposerHandle, type TiptapComposerProps, type TiptapComposerSubmitOptions, } from "./TiptapComposer.js";
|
|
6
|
+
export { isClaudeCodeAgentId, isLunaModel, resolvePreferredAgentModel, type ComposerModelGroupLike, } from "./model-selection.js";
|
|
7
|
+
export { PromptComposer, type PromptComposerProps, type PromptComposerFile, type PromptComposerSubmitOptions, } from "./PromptComposer.js";
|
|
8
|
+
export type { ComposerTerminalModeControl } from "./ComposerPlusMenu.js";
|
|
9
|
+
export { RealtimeVoiceModeDock, RealtimeVoiceModeEntry, type RealtimeVoiceModeCopy, type RealtimeVoiceModeDockProps, type RealtimeVoiceModeEntryProps, type RealtimeVoiceModeInlineSettings, type RealtimeVoiceModeSelectSetting, type RealtimeVoiceModeSettingOption, type RealtimeVoiceModeState, } from "./RealtimeVoiceMode.js";
|
|
10
|
+
export { createRealtimeVoiceSession, createRealtimeVoiceSessionWithCapability, executeRealtimeVoiceTool, extractRealtimeVoiceFunctionCalls, readRealtimeVoiceContext, readRealtimeVoiceContextWith, RealtimeVoiceModeBoundary, RealtimeVoiceModeProvider, useRealtimeVoiceMode, useRealtimeVoiceModeCopy, useRealtimeVoiceModeOptional, type RealtimeVoiceModeApi, type RealtimeVoiceModeProviderProps, type RealtimeVoiceSessionAnswer, type RealtimeVoiceToolResult, } from "./useRealtimeVoiceMode.js";
|
|
11
|
+
export { AGENT_PROMPT_MAX_INLINE_IMAGE_BYTES, AGENT_PROMPT_MAX_INLINE_TEXT_CHARS, escapePromptAttachmentAttribute, formatPromptWithAttachments, isInlineableAgentPromptFile, readAgentPromptAttachment, type AgentPromptAttachment, type ReadAgentPromptAttachmentOptions, } from "./prompt-attachments.js";
|
|
12
|
+
export { MentionPopover } from "./MentionPopover.js";
|
|
13
|
+
export { useMentionSearch } from "./use-mention-search.js";
|
|
14
|
+
export { ComposerRuntimeAdaptersProvider, useComposerRuntimeAdapters, type ComposerRuntimeAdapters, type ComposerTranslate, } from "./runtime-adapters.js";
|
|
15
|
+
export type { AgentComposerLayoutVariant, FileResult, SkillResult, MentionItem, Reference, SlashCommand, } from "./types.js";
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/composer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EACL,kBAAkB,EAClB,KAAK,uBAAu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E,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EACL,+BAA+B,EAC/B,0BAA0B,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,GACvB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EACV,0BAA0B,EAC1B,UAAU,EACV,WAAW,EACX,WAAW,EACX,SAAS,EACT,YAAY,GACb,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { FileReference } from "./extensions/FileReference.js";
|
|
2
|
+
export { SkillReference } from "./extensions/SkillReference.js";
|
|
3
|
+
export { MentionReference } from "./extensions/MentionReference.js";
|
|
4
|
+
export { AgentComposerFrame, } from "./AgentComposerFrame.js";
|
|
5
|
+
export { TiptapComposer, canSubmitComposerContent, displayableComposerModeMessage, getComposerSubmitIntentForEnterKey, handleComposerFileDrop, insertComposerHardBreakAndScrollIntoView, } from "./TiptapComposer.js";
|
|
6
|
+
export { isClaudeCodeAgentId, isLunaModel, resolvePreferredAgentModel, } from "./model-selection.js";
|
|
7
|
+
export { PromptComposer, } from "./PromptComposer.js";
|
|
8
|
+
export { RealtimeVoiceModeDock, RealtimeVoiceModeEntry, } from "./RealtimeVoiceMode.js";
|
|
9
|
+
export { createRealtimeVoiceSession, createRealtimeVoiceSessionWithCapability, executeRealtimeVoiceTool, extractRealtimeVoiceFunctionCalls, readRealtimeVoiceContext, readRealtimeVoiceContextWith, RealtimeVoiceModeBoundary, RealtimeVoiceModeProvider, useRealtimeVoiceMode, useRealtimeVoiceModeCopy, useRealtimeVoiceModeOptional, } from "./useRealtimeVoiceMode.js";
|
|
10
|
+
export { AGENT_PROMPT_MAX_INLINE_IMAGE_BYTES, AGENT_PROMPT_MAX_INLINE_TEXT_CHARS, escapePromptAttachmentAttribute, formatPromptWithAttachments, isInlineableAgentPromptFile, readAgentPromptAttachment, } from "./prompt-attachments.js";
|
|
11
|
+
export { MentionPopover } from "./MentionPopover.js";
|
|
12
|
+
export { useMentionSearch } from "./use-mention-search.js";
|
|
13
|
+
export { ComposerRuntimeAdaptersProvider, useComposerRuntimeAdapters, } from "./runtime-adapters.js";
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/composer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EACL,kBAAkB,GAEnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,cAAc,EACd,wBAAwB,EACxB,8BAA8B,EAC9B,kCAAkC,EAClC,sBAAsB,EACtB,wCAAwC,GAKzC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,mBAAmB,EACnB,WAAW,EACX,0BAA0B,GAE3B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,cAAc,GAIf,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GAQvB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,0BAA0B,EAC1B,wCAAwC,EACxC,wBAAwB,EACxB,iCAAiC,EACjC,wBAAwB,EACxB,4BAA4B,EAC5B,yBAAyB,EACzB,yBAAyB,EACzB,oBAAoB,EACpB,wBAAwB,EACxB,4BAA4B,GAK7B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,mCAAmC,EACnC,kCAAkC,EAClC,+BAA+B,EAC/B,2BAA2B,EAC3B,2BAA2B,EAC3B,yBAAyB,GAG1B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EACL,+BAA+B,EAC/B,0BAA0B,GAG3B,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface ComposerModelGroupLike {
|
|
2
|
+
engine: string;
|
|
3
|
+
models: readonly string[];
|
|
4
|
+
configured?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function isClaudeCodeAgentId(agentId: string | undefined): boolean;
|
|
7
|
+
export declare function isLunaModel(model: string): boolean;
|
|
8
|
+
export declare function resolvePreferredAgentModel(agentId: string | undefined, groups: readonly ComposerModelGroupLike[]): {
|
|
9
|
+
model: string;
|
|
10
|
+
engine: string;
|
|
11
|
+
} | undefined;
|
|
12
|
+
//# sourceMappingURL=model-selection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-selection.d.ts","sourceRoot":"","sources":["../../src/composer/model-selection.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAExE;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAElD;AAED,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,MAAM,EAAE,SAAS,sBAAsB,EAAE,GACxC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAiC/C"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export function isClaudeCodeAgentId(agentId) {
|
|
2
|
+
return agentId === "claude-code" || agentId === "claude-cli";
|
|
3
|
+
}
|
|
4
|
+
export function isLunaModel(model) {
|
|
5
|
+
return model.toLowerCase().includes("luna");
|
|
6
|
+
}
|
|
7
|
+
export function resolvePreferredAgentModel(agentId, groups) {
|
|
8
|
+
const candidates = groups.flatMap((group) => group.models
|
|
9
|
+
.filter((model) => model !== "auto")
|
|
10
|
+
.map((model) => ({
|
|
11
|
+
model,
|
|
12
|
+
engine: group.engine,
|
|
13
|
+
configured: group.configured !== false,
|
|
14
|
+
})));
|
|
15
|
+
const orderedCandidates = [
|
|
16
|
+
...candidates.filter((candidate) => candidate.configured),
|
|
17
|
+
...candidates.filter((candidate) => !candidate.configured),
|
|
18
|
+
];
|
|
19
|
+
if (isClaudeCodeAgentId(agentId)) {
|
|
20
|
+
const preferred = orderedCandidates.find((candidate) => candidate.model.toLowerCase().includes("sonnet") &&
|
|
21
|
+
!isLunaModel(candidate.model)) ?? orderedCandidates.find((candidate) => !isLunaModel(candidate.model));
|
|
22
|
+
return preferred
|
|
23
|
+
? { model: preferred.model, engine: preferred.engine }
|
|
24
|
+
: undefined;
|
|
25
|
+
}
|
|
26
|
+
const preferred = orderedCandidates.find((candidate) => isLunaModel(candidate.model));
|
|
27
|
+
return preferred
|
|
28
|
+
? { model: preferred.model, engine: preferred.engine }
|
|
29
|
+
: undefined;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=model-selection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-selection.js","sourceRoot":"","sources":["../../src/composer/model-selection.ts"],"names":[],"mappings":"AAMA,MAAM,UAAU,mBAAmB,CAAC,OAA2B;IAC7D,OAAO,OAAO,KAAK,aAAa,IAAI,OAAO,KAAK,YAAY,CAAC;AAC/D,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,KAAa;IACvC,OAAO,KAAK,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,0BAA0B,CACxC,OAA2B,EAC3B,MAAyC;IAEzC,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAC1C,KAAK,CAAC,MAAM;SACT,MAAM,CAAC,CAA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AAC,SAAS,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-selection.spec.d.ts","sourceRoot":"","sources":["../../src/composer/model-selection.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import { isClaudeCodeAgentId, isLunaModel, resolvePreferredAgentModel, } from "./model-selection.js";
|
|
3
|
+
describe("composer agent model defaults", () => {
|
|
4
|
+
const groups = [
|
|
5
|
+
{
|
|
6
|
+
engine: "builder",
|
|
7
|
+
models: ["gpt-5-6-luna"],
|
|
8
|
+
configured: true,
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
engine: "builder",
|
|
12
|
+
models: ["claude-sonnet-5"],
|
|
13
|
+
configured: true,
|
|
14
|
+
},
|
|
15
|
+
];
|
|
16
|
+
it("identifies Claude Code and Luna model ids", () => {
|
|
17
|
+
expect(isClaudeCodeAgentId("claude-code")).toBe(true);
|
|
18
|
+
expect(isClaudeCodeAgentId("claude-cli")).toBe(true);
|
|
19
|
+
expect(isClaudeCodeAgentId("codex")).toBe(false);
|
|
20
|
+
expect(isLunaModel("gpt-5.6-luna")).toBe(true);
|
|
21
|
+
expect(isLunaModel("openai/gpt-5.6-sol")).toBe(false);
|
|
22
|
+
});
|
|
23
|
+
it("defaults Claude Code to Sonnet and other agents to Luna", () => {
|
|
24
|
+
expect(resolvePreferredAgentModel("claude-code", groups)).toEqual({
|
|
25
|
+
engine: "builder",
|
|
26
|
+
model: "claude-sonnet-5",
|
|
27
|
+
});
|
|
28
|
+
expect(resolvePreferredAgentModel("codex", groups)).toEqual({
|
|
29
|
+
engine: "builder",
|
|
30
|
+
model: "gpt-5-6-luna",
|
|
31
|
+
});
|
|
32
|
+
expect(resolvePreferredAgentModel(undefined, groups)).toEqual({
|
|
33
|
+
engine: "builder",
|
|
34
|
+
model: "gpt-5-6-luna",
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
//# sourceMappingURL=model-selection.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-selection.spec.js","sourceRoot":"","sources":["../../src/composer/model-selection.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAE9C,OAAO,EACL,mBAAmB,EACnB,WAAW,EACX,0BAA0B,GAC3B,MAAM,sBAAsB,CAAC;AAE9B,QAAQ,CAAC,+BAA+B,EAAE,GAAG,EAAE;IAC7C,MAAM,MAAM,GAAG;QACb;YACE,MAAM,EAAE,SAAS;YACjB,MAAM,EAAE,CAAC,cAAc,CAAC;YACxB,UAAU,EAAE,IAAI;SACjB;QACD;YACE,MAAM,EAAE,SAAS;YACjB,MAAM,EAAE,CAAC,iBAAiB,CAAC;YAC3B,UAAU,EAAE,IAAI;SACjB;KACF,CAAC;IAEF,EAAE,CAAC,2CAA2C,EAAE,GAAG,EAAE;QACnD,MAAM,CAAC,mBAAmB,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACtD,MAAM,CAAC,mBAAmB,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrD,MAAM,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACjD,MAAM,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/C,MAAM,CAAC,WAAW,CAAC,oBAAoB,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACxD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,yDAAyD,EAAE,GAAG,EAAE;QACjE,MAAM,CAAC,0BAA0B,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;YAChE,MAAM,EAAE,SAAS;YACjB,KAAK,EAAE,iBAAiB;SACzB,CAAC,CAAC;QACH,MAAM,CAAC,0BAA0B,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;YAC1D,MAAM,EAAE,SAAS;YACjB,KAAK,EAAE,cAAc;SACtB,CAAC,CAAC;QACH,MAAM,CAAC,0BAA0B,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;YAC5D,MAAM,EAAE,SAAS;YACjB,KAAK,EAAE,cAAc;SACtB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** The clipboard flavors we care about for a paste. */
|
|
2
|
+
export interface ClipboardPaste {
|
|
3
|
+
/** `text/plain` flavor — used for size heuristics and as the default body. */
|
|
4
|
+
text: string;
|
|
5
|
+
/** `text/html` flavor when the source provided one. */
|
|
6
|
+
html?: string;
|
|
7
|
+
}
|
|
8
|
+
/** Read the relevant clipboard flavors from a paste/drop DataTransfer. */
|
|
9
|
+
export declare function readClipboardPaste(data: {
|
|
10
|
+
getData(type: string): string;
|
|
11
|
+
} | null | undefined): ClipboardPaste;
|
|
12
|
+
export declare function shouldConvertPasteToAttachment(text: string): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Whether a clipboard paste is large enough to become a `Pasted text`
|
|
15
|
+
* attachment chip. Mirrors `shouldConvertPasteToAttachment` but evaluates the
|
|
16
|
+
* representation we'd actually store, so an HTML-only paste (empty text/plain)
|
|
17
|
+
* still converts on the strength of its markup.
|
|
18
|
+
*/
|
|
19
|
+
export declare function shouldConvertClipboardToAttachment(paste: ClipboardPaste): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Build the attachment File for a page-sized paste, preserving HTML markup when
|
|
22
|
+
* the pasted content is an HTML document so it travels the same rail as an
|
|
23
|
+
* uploaded .html file.
|
|
24
|
+
*/
|
|
25
|
+
export declare function createPastedAttachmentFile(paste: ClipboardPaste): File;
|
|
26
|
+
/** Back-compat helper for callers that only have plain text. */
|
|
27
|
+
export declare function createPastedTextFile(text: string): File;
|
|
28
|
+
export declare function isPastedTextAttachmentName(name: string | undefined): boolean;
|
|
29
|
+
export declare function unwrapAttachmentEnvelope(text: string): string;
|
|
30
|
+
export declare function countLines(text: string): number;
|
|
31
|
+
//# sourceMappingURL=pasted-text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pasted-text.d.ts","sourceRoot":"","sources":["../../src/composer/pasted-text.ts"],"names":[],"mappings":"AA4CA,uDAAuD;AACvD,MAAM,WAAW,cAAc;IAC7B,8EAA8E;IAC9E,IAAI,EAAE,MAAM,CAAC;IACb,uDAAuD;IACvD,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,0EAA0E;AAC1E,wBAAgB,kBAAkB,CAChC,IAAI,EAAE;IAAE,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,GAAG,IAAI,GAAG,SAAS,GACzD,cAAc,CAIhB;AAmCD,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAWpE;AAED;;;;;GAKG;AACH,wBAAgB,kCAAkC,CAChD,KAAK,EAAE,cAAc,GACpB,OAAO,CAET;AAQD;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,cAAc,GAAG,IAAI,CAGtE;AAED,gEAAgE;AAChE,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAEvD;AAED,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAE5E;AAKD,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAG7D;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAO/C"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
// Page-sized pastes turn into a `Pasted text` attachment chip instead of being
|
|
2
|
+
// dumped into the editor. Short paragraphs and everyday lists should stay
|
|
3
|
+
// inline so the composer still feels like a normal text field.
|
|
4
|
+
const PASTED_TEXT_MIN_CHARS = 3200;
|
|
5
|
+
const PASTED_TEXT_MIN_LINES = 24;
|
|
6
|
+
const PASTED_TEXT_FILENAME_PREFIX = "pasted-text-";
|
|
7
|
+
// A copied HTML document/source is recognizable from its markup: a closing tag
|
|
8
|
+
// (`</div>`), a doctype, or a common structural/element tag. We key off the
|
|
9
|
+
// *content* the user actually pasted, not the clipboard's `text/html` flavor —
|
|
10
|
+
// editors (VS Code) and rich-text apps (Google Docs) populate `text/html` with
|
|
11
|
+
// syntax-highlight spans or formatting wrappers even when the real content is
|
|
12
|
+
// plain code/prose, so trusting `text/html` blindly would mangle those pastes.
|
|
13
|
+
const HTML_SOURCE_SIGNAL = /<!doctype\s+html|<html[\s>]|<\/[a-z][a-z0-9-]*\s*>|<(?:body|head|div|span|section|main|header|footer|nav|article|aside|ul|ol|li|table|thead|tbody|tr|td|th|h[1-6]|p|a|img|button|input|textarea|select|form|label|script|style|link|meta|svg|canvas|template)\b/i;
|
|
14
|
+
// A real HTML *document* announces itself with a doctype / html / head / body.
|
|
15
|
+
// When one of these is present we keep the HTML classification even if an inline
|
|
16
|
+
// <script> contains JS keywords — it's a genuine page.
|
|
17
|
+
const HTML_DOCUMENT_SIGNAL = /<!doctype\s+html|<html[\s>]|<head[\s>]|<body[\s>]/i;
|
|
18
|
+
// JSX/TSX source contains the same `</div>`/`<span>` tags as an HTML document,
|
|
19
|
+
// so the HTML tag signal alone misfiles a pasted React/TS component (even a bare
|
|
20
|
+
// function component) as an `.html` artifact — the agent then mishandles it as a
|
|
21
|
+
// hostable document instead of source. These markers appear in JS/TS/JSX source
|
|
22
|
+
// but not in a plain HTML *fragment*: `className=` (JSX uses it; HTML uses
|
|
23
|
+
// `class=`), ES module import/export, arrow functions, TS type/React annotations,
|
|
24
|
+
// React hooks, and the basic JS declaration/return keywords that make up a
|
|
25
|
+
// component body.
|
|
26
|
+
const CODE_SOURCE_SIGNAL = /\bclassName=|\bimport\b|\bexport\b|=>|:\s*React\.|\buse[A-Z]\w*\(|\b(?:function|const|let|var|return|class|interface|type|enum)\b/;
|
|
27
|
+
function looksLikeHtml(value) {
|
|
28
|
+
if (!value || !HTML_SOURCE_SIGNAL.test(value))
|
|
29
|
+
return false;
|
|
30
|
+
// A self-announcing HTML document stays HTML even if it embeds a <script>.
|
|
31
|
+
if (HTML_DOCUMENT_SIGNAL.test(value))
|
|
32
|
+
return true;
|
|
33
|
+
// Otherwise it's a bare fragment — if it carries JS/TS/JSX code signals,
|
|
34
|
+
// treat it as source code, not an HTML attachment.
|
|
35
|
+
if (CODE_SOURCE_SIGNAL.test(value))
|
|
36
|
+
return false;
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
/** Read the relevant clipboard flavors from a paste/drop DataTransfer. */
|
|
40
|
+
export function readClipboardPaste(data) {
|
|
41
|
+
const text = data?.getData("text/plain") ?? "";
|
|
42
|
+
const html = data?.getData("text/html") ?? "";
|
|
43
|
+
return { text, html: html.trim() ? html : undefined };
|
|
44
|
+
}
|
|
45
|
+
// Decide what to actually store for a paste. Preserving HTML markup means a
|
|
46
|
+
// pasted HTML document behaves exactly like uploading that .html file: the agent
|
|
47
|
+
// recognizes it as a hostable artifact and reads it verbatim via
|
|
48
|
+
// `contentFromAttachment` instead of retyping it inline (which cuts off
|
|
49
|
+
// mid-stream on large files and triggers a continuation loop / "spin").
|
|
50
|
+
function selectPasteBody(paste) {
|
|
51
|
+
const plain = paste.text ?? "";
|
|
52
|
+
const html = paste.html ?? "";
|
|
53
|
+
// 1) The pasted text is itself HTML source (copied from an editor, a file, or
|
|
54
|
+
// view-source). The plain text *is* the markup, so keep it as .html.
|
|
55
|
+
if (plain.trim() && looksLikeHtml(plain)) {
|
|
56
|
+
return { body: plain, ext: "html", type: "text/html" };
|
|
57
|
+
}
|
|
58
|
+
// 2) No usable plain text, but a real HTML flavor exists (some apps only
|
|
59
|
+
// expose text/html). Fall back to the markup so nothing is dropped.
|
|
60
|
+
if (!plain.trim() && looksLikeHtml(html)) {
|
|
61
|
+
return { body: html, ext: "html", type: "text/html" };
|
|
62
|
+
}
|
|
63
|
+
// 3) Default: keep the clean plain text. Avoids the syntax-highlight /
|
|
64
|
+
// rich-text noise that lives in text/html when the plain text is already
|
|
65
|
+
// the real content (code from an editor, prose from a doc).
|
|
66
|
+
return { body: plain, ext: "txt", type: "text/plain" };
|
|
67
|
+
}
|
|
68
|
+
export function shouldConvertPasteToAttachment(text) {
|
|
69
|
+
if (!text)
|
|
70
|
+
return false;
|
|
71
|
+
if (text.length >= PASTED_TEXT_MIN_CHARS)
|
|
72
|
+
return true;
|
|
73
|
+
let lines = 1;
|
|
74
|
+
for (let i = 0; i < text.length; i++) {
|
|
75
|
+
if (text.charCodeAt(i) === 10) {
|
|
76
|
+
lines++;
|
|
77
|
+
if (lines >= PASTED_TEXT_MIN_LINES)
|
|
78
|
+
return true;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Whether a clipboard paste is large enough to become a `Pasted text`
|
|
85
|
+
* attachment chip. Mirrors `shouldConvertPasteToAttachment` but evaluates the
|
|
86
|
+
* representation we'd actually store, so an HTML-only paste (empty text/plain)
|
|
87
|
+
* still converts on the strength of its markup.
|
|
88
|
+
*/
|
|
89
|
+
export function shouldConvertClipboardToAttachment(paste) {
|
|
90
|
+
return shouldConvertPasteToAttachment(selectPasteBody(paste).body);
|
|
91
|
+
}
|
|
92
|
+
function pastedAttachmentName(ext) {
|
|
93
|
+
return `${PASTED_TEXT_FILENAME_PREFIX}${Date.now()}-${Math.random()
|
|
94
|
+
.toString(36)
|
|
95
|
+
.slice(2, 8)}.${ext}`;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Build the attachment File for a page-sized paste, preserving HTML markup when
|
|
99
|
+
* the pasted content is an HTML document so it travels the same rail as an
|
|
100
|
+
* uploaded .html file.
|
|
101
|
+
*/
|
|
102
|
+
export function createPastedAttachmentFile(paste) {
|
|
103
|
+
const { body, ext, type } = selectPasteBody(paste);
|
|
104
|
+
return new File([body], pastedAttachmentName(ext), { type });
|
|
105
|
+
}
|
|
106
|
+
/** Back-compat helper for callers that only have plain text. */
|
|
107
|
+
export function createPastedTextFile(text) {
|
|
108
|
+
return createPastedAttachmentFile({ text });
|
|
109
|
+
}
|
|
110
|
+
export function isPastedTextAttachmentName(name) {
|
|
111
|
+
return !!name && name.startsWith(PASTED_TEXT_FILENAME_PREFIX);
|
|
112
|
+
}
|
|
113
|
+
// Strips the `<attachment name=...>\n` / `\n</attachment>` envelope that
|
|
114
|
+
// SimpleTextAttachmentAdapter wraps the file body in when sending. Returns the
|
|
115
|
+
// raw body for previewing.
|
|
116
|
+
export function unwrapAttachmentEnvelope(text) {
|
|
117
|
+
const match = text.match(/^<attachment\b[^>]*>\n([\s\S]*)\n<\/attachment>$/);
|
|
118
|
+
return match ? match[1] : text;
|
|
119
|
+
}
|
|
120
|
+
export function countLines(text) {
|
|
121
|
+
if (!text)
|
|
122
|
+
return 0;
|
|
123
|
+
let lines = 1;
|
|
124
|
+
for (let i = 0; i < text.length; i++) {
|
|
125
|
+
if (text.charCodeAt(i) === 10)
|
|
126
|
+
lines++;
|
|
127
|
+
}
|
|
128
|
+
return lines;
|
|
129
|
+
}
|
|
130
|
+
//# sourceMappingURL=pasted-text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pasted-text.js","sourceRoot":"","sources":["../../src/composer/pasted-text.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,0EAA0E;AAC1E,+DAA+D;AAC/D,MAAM,qBAAqB,GAAG,IAAI,CAAC;AACnC,MAAM,qBAAqB,GAAG,EAAE,CAAC;AAEjC,MAAM,2BAA2B,GAAG,cAAc,CAAC;AAEn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K,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,IAAI,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,EAAE;YAAE,KAAK,EAAE,CAAC;IACzC,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pasted-text.spec.d.ts","sourceRoot":"","sources":["../../src/composer/pasted-text.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import { createPastedAttachmentFile, isPastedTextAttachmentName, readClipboardPaste, shouldConvertClipboardToAttachment, shouldConvertPasteToAttachment, unwrapAttachmentEnvelope, } from "./pasted-text.js";
|
|
3
|
+
function clipboard(flavors) {
|
|
4
|
+
return { getData: (type) => flavors[type] ?? "" };
|
|
5
|
+
}
|
|
6
|
+
describe("shouldConvertPasteToAttachment", () => {
|
|
7
|
+
it("keeps a paragraph or two inline", () => {
|
|
8
|
+
const twoParagraphs = [
|
|
9
|
+
"This is a normal paragraph pasted into the composer. ".repeat(16),
|
|
10
|
+
"This is a second paragraph with enough words to feel real, but it is nowhere near a page of text. ".repeat(10),
|
|
11
|
+
].join("\n\n");
|
|
12
|
+
expect(shouldConvertPasteToAttachment(twoParagraphs)).toBe(false);
|
|
13
|
+
});
|
|
14
|
+
it("keeps a basic bulleted list inline", () => {
|
|
15
|
+
const list = [
|
|
16
|
+
"- Confirm project scope",
|
|
17
|
+
"- Review current designs",
|
|
18
|
+
"- Check the edge cases",
|
|
19
|
+
"- Share implementation notes",
|
|
20
|
+
"- Follow up with QA",
|
|
21
|
+
"- Update release notes",
|
|
22
|
+
"- Coordinate rollout",
|
|
23
|
+
"- Watch for support reports",
|
|
24
|
+
].join("\n");
|
|
25
|
+
expect(shouldConvertPasteToAttachment(list)).toBe(false);
|
|
26
|
+
});
|
|
27
|
+
it("converts roughly page-sized prose to an attachment", () => {
|
|
28
|
+
const pageOfText = "This is source material for the agent to review. ".repeat(72);
|
|
29
|
+
expect(shouldConvertPasteToAttachment(pageOfText)).toBe(true);
|
|
30
|
+
});
|
|
31
|
+
it("converts page-length line-oriented text to an attachment", () => {
|
|
32
|
+
const pageOfLines = Array.from({ length: 24 }, (_, index) => `${index + 1}. A full-page outline item with supporting detail.`).join("\n");
|
|
33
|
+
expect(shouldConvertPasteToAttachment(pageOfLines)).toBe(true);
|
|
34
|
+
});
|
|
35
|
+
it("unwraps assistant-ui text attachment envelopes with attributes", () => {
|
|
36
|
+
expect(unwrapAttachmentEnvelope('<attachment name="notes.txt" contentType="text/plain">\nLine one\nLine two\n</attachment>')).toBe("Line one\nLine two");
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
describe("readClipboardPaste", () => {
|
|
40
|
+
it("returns both flavors when present", () => {
|
|
41
|
+
const paste = readClipboardPaste(clipboard({ "text/plain": "hello", "text/html": "<p>hello</p>" }));
|
|
42
|
+
expect(paste.text).toBe("hello");
|
|
43
|
+
expect(paste.html).toBe("<p>hello</p>");
|
|
44
|
+
});
|
|
45
|
+
it("omits an empty html flavor", () => {
|
|
46
|
+
const paste = readClipboardPaste(clipboard({ "text/plain": "hello", "text/html": " " }));
|
|
47
|
+
expect(paste.html).toBeUndefined();
|
|
48
|
+
});
|
|
49
|
+
it("tolerates a missing DataTransfer", () => {
|
|
50
|
+
const paste = readClipboardPaste(null);
|
|
51
|
+
expect(paste.text).toBe("");
|
|
52
|
+
expect(paste.html).toBeUndefined();
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
const pageOfHtml = `<!doctype html>\n<html><body>${"<div>Product narrative section.</div>\n".repeat(80)}</body></html>`;
|
|
56
|
+
describe("createPastedAttachmentFile", () => {
|
|
57
|
+
it("stores pasted HTML source as a real .html attachment", () => {
|
|
58
|
+
const paste = { text: pageOfHtml };
|
|
59
|
+
const file = createPastedAttachmentFile(paste);
|
|
60
|
+
expect(file.name).toMatch(/^pasted-text-.*\.html$/);
|
|
61
|
+
expect(file.type).toBe("text/html");
|
|
62
|
+
expect(isPastedTextAttachmentName(file.name)).toBe(true);
|
|
63
|
+
});
|
|
64
|
+
it("keeps plain prose as a .txt attachment (no html flavor)", () => {
|
|
65
|
+
const file = createPastedAttachmentFile({
|
|
66
|
+
text: "This is just a long block of plain prose. ".repeat(80),
|
|
67
|
+
});
|
|
68
|
+
expect(file.name).toMatch(/^pasted-text-.*\.txt$/);
|
|
69
|
+
expect(file.type).toBe("text/plain");
|
|
70
|
+
});
|
|
71
|
+
it("does NOT promote code to html just because text/html carries highlight markup", () => {
|
|
72
|
+
// VS Code / editors put syntax-highlight <span> markup in text/html even
|
|
73
|
+
// though the real content (text/plain) is plain code. Keep it as .txt.
|
|
74
|
+
const code = "const x: number = 1;\n".repeat(200);
|
|
75
|
+
const highlightHtml = `<div style="color:#abb2bf">${"<span>const</span> <span>x</span>\n".repeat(200)}</div>`;
|
|
76
|
+
const file = createPastedAttachmentFile({
|
|
77
|
+
text: code,
|
|
78
|
+
html: highlightHtml,
|
|
79
|
+
});
|
|
80
|
+
expect(file.name).toMatch(/\.txt$/);
|
|
81
|
+
expect(file.type).toBe("text/plain");
|
|
82
|
+
});
|
|
83
|
+
it("falls back to the html flavor when there is no usable plain text", () => {
|
|
84
|
+
const file = createPastedAttachmentFile({ text: " ", html: pageOfHtml });
|
|
85
|
+
expect(file.name).toMatch(/\.html$/);
|
|
86
|
+
expect(file.type).toBe("text/html");
|
|
87
|
+
});
|
|
88
|
+
it("preserves the markup verbatim in the file body", async () => {
|
|
89
|
+
const file = createPastedAttachmentFile({ text: pageOfHtml });
|
|
90
|
+
expect(await file.text()).toBe(pageOfHtml);
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
describe("shouldConvertClipboardToAttachment", () => {
|
|
94
|
+
it("converts a page-sized HTML source paste", () => {
|
|
95
|
+
expect(shouldConvertClipboardToAttachment({ text: pageOfHtml })).toBe(true);
|
|
96
|
+
});
|
|
97
|
+
it("converts an html-only paste with an empty plain flavor", () => {
|
|
98
|
+
expect(shouldConvertClipboardToAttachment({ text: "", html: pageOfHtml })).toBe(true);
|
|
99
|
+
});
|
|
100
|
+
it("keeps a short paste inline even if it carries rich html", () => {
|
|
101
|
+
expect(shouldConvertClipboardToAttachment({
|
|
102
|
+
text: "two words",
|
|
103
|
+
html: "<b>two</b> <i>words</i>",
|
|
104
|
+
})).toBe(false);
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
//# sourceMappingURL=pasted-text.spec.js.map
|