veryfront 0.1.997 → 0.1.998
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/esm/cli/templates/manifest.js +1 -1
- package/esm/deno.d.ts +7 -0
- package/esm/deno.js +11 -3
- package/esm/deps/esm.sh/react-dom@19.2.4.d.ts +2 -0
- package/esm/deps/esm.sh/react-dom@19.2.4.d.ts.map +1 -0
- package/esm/deps/esm.sh/react-dom@19.2.4.js +3 -0
- package/esm/react/react-dom.d.ts +3 -0
- package/esm/react/react-dom.d.ts.map +1 -0
- package/esm/react/react-dom.js +2 -0
- package/esm/src/agent/ag-ui/host-support.d.ts.map +1 -1
- package/esm/src/agent/ag-ui/host-support.js +12 -0
- package/esm/src/agent/react/index.d.ts +4 -2
- package/esm/src/agent/react/index.d.ts.map +1 -1
- package/esm/src/agent/react/index.js +2 -1
- package/esm/src/agent/react/use-agent-metadata.d.ts +5 -0
- package/esm/src/agent/react/use-agent-metadata.d.ts.map +1 -1
- package/esm/src/agent/react/use-agent-metadata.js +18 -9
- package/esm/src/agent/react/use-agents.d.ts +33 -0
- package/esm/src/agent/react/use-agents.d.ts.map +1 -0
- package/esm/src/agent/react/use-agents.js +72 -0
- package/esm/src/agent/react/use-chat/index.d.ts +1 -1
- package/esm/src/agent/react/use-chat/index.d.ts.map +1 -1
- package/esm/src/agent/react/use-chat/types.d.ts +3 -2
- package/esm/src/agent/react/use-chat/types.d.ts.map +1 -1
- package/esm/src/agent/react/use-chat/use-chat.d.ts +12 -1
- package/esm/src/agent/react/use-chat/use-chat.d.ts.map +1 -1
- package/esm/src/agent/react/use-chat/use-chat.js +47 -7
- package/esm/src/agent/react/use-chat/utils.d.ts.map +1 -1
- package/esm/src/agent/react/use-chat/utils.js +4 -0
- package/esm/src/agent/runtime/message-adapter.d.ts.map +1 -1
- package/esm/src/agent/runtime/message-adapter.js +3 -1
- package/esm/src/agent/runtime/text-generation-runtime-message-converter.d.ts.map +1 -1
- package/esm/src/agent/runtime/text-generation-runtime-message-converter.js +6 -2
- package/esm/src/chat/index.d.ts +17 -7
- package/esm/src/chat/index.d.ts.map +1 -1
- package/esm/src/chat/index.js +33 -7
- package/esm/src/chat/protocol.d.ts +13 -1
- package/esm/src/chat/protocol.d.ts.map +1 -1
- package/esm/src/chat/upload-handler.d.ts +55 -0
- package/esm/src/chat/upload-handler.d.ts.map +1 -0
- package/esm/src/chat/upload-handler.js +180 -0
- package/esm/src/discovery/import-rewriter.d.ts +1 -1
- package/esm/src/discovery/import-rewriter.d.ts.map +1 -1
- package/esm/src/discovery/import-rewriter.js +2 -0
- package/esm/src/discovery/transpiler.d.ts.map +1 -1
- package/esm/src/discovery/transpiler.js +2 -0
- package/esm/src/react/components/chat/agent-card.d.ts +84 -11
- package/esm/src/react/components/chat/agent-card.d.ts.map +1 -1
- package/esm/src/react/components/chat/agent-card.js +151 -57
- package/esm/src/react/components/chat/agent-picker.d.ts +166 -0
- package/esm/src/react/components/chat/agent-picker.d.ts.map +1 -0
- package/esm/src/react/components/chat/agent-picker.js +183 -0
- package/esm/src/react/components/chat/chat/components/animations.js +1 -1
- package/esm/src/react/components/chat/chat/components/attachment-pill.d.ts +125 -3
- package/esm/src/react/components/chat/chat/components/attachment-pill.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/attachment-pill.js +209 -25
- package/esm/src/react/components/chat/chat/components/attachments-panel.d.ts +149 -0
- package/esm/src/react/components/chat/chat/components/attachments-panel.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/components/attachments-panel.js +187 -0
- package/esm/src/react/components/chat/chat/components/branch-picker.d.ts +13 -2
- package/esm/src/react/components/chat/chat/components/branch-picker.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/branch-picker.js +6 -8
- package/esm/src/react/components/chat/chat/components/chat-messages-skeleton.d.ts +20 -0
- package/esm/src/react/components/chat/chat/components/chat-messages-skeleton.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/components/chat-messages-skeleton.js +31 -0
- package/esm/src/react/components/chat/chat/components/code-block.d.ts +9 -1
- package/esm/src/react/components/chat/chat/components/code-block.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/code-block.js +14 -6
- package/esm/src/react/components/chat/chat/components/drop-zone.d.ts +11 -4
- package/esm/src/react/components/chat/chat/components/drop-zone.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/drop-zone.js +10 -8
- package/esm/src/react/components/chat/chat/components/empty-state.d.ts +2 -1
- package/esm/src/react/components/chat/chat/components/empty-state.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/empty-state.js +7 -8
- package/esm/src/react/components/chat/chat/components/inference-badge.d.ts +6 -2
- package/esm/src/react/components/chat/chat/components/inference-badge.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/inference-badge.js +5 -4
- package/esm/src/react/components/chat/chat/components/inline-citation.d.ts +9 -1
- package/esm/src/react/components/chat/chat/components/inline-citation.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/inline-citation.js +19 -20
- package/esm/src/react/components/chat/chat/components/message-actions.d.ts +28 -5
- package/esm/src/react/components/chat/chat/components/message-actions.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/message-actions.js +24 -36
- package/esm/src/react/components/chat/chat/components/message-edit-form.d.ts +7 -2
- package/esm/src/react/components/chat/chat/components/message-edit-form.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/message-edit-form.js +5 -5
- package/esm/src/react/components/chat/chat/components/message-feedback.d.ts +11 -1
- package/esm/src/react/components/chat/chat/components/message-feedback.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/message-feedback.js +9 -11
- package/esm/src/react/components/chat/chat/components/quick-actions.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/quick-actions.js +3 -1
- package/esm/src/react/components/chat/chat/components/reasoning.d.ts +66 -3
- package/esm/src/react/components/chat/chat/components/reasoning.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/reasoning.js +95 -21
- package/esm/src/react/components/chat/chat/components/sidebar.d.ts +178 -12
- package/esm/src/react/components/chat/chat/components/sidebar.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/sidebar.js +228 -45
- package/esm/src/react/components/chat/chat/components/skill-badge.d.ts +6 -1
- package/esm/src/react/components/chat/chat/components/skill-badge.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/skill-badge.js +6 -5
- package/esm/src/react/components/chat/chat/components/skill-tool.d.ts +37 -0
- package/esm/src/react/components/chat/chat/components/skill-tool.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/components/skill-tool.js +46 -0
- package/esm/src/react/components/chat/chat/components/sources.d.ts +55 -3
- package/esm/src/react/components/chat/chat/components/sources.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/sources.js +50 -16
- package/esm/src/react/components/chat/chat/components/step-indicator.d.ts +42 -3
- package/esm/src/react/components/chat/chat/components/step-indicator.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/step-indicator.js +55 -12
- package/esm/src/react/components/chat/chat/components/tab-switcher.d.ts +1 -1
- package/esm/src/react/components/chat/chat/components/tab-switcher.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/tab-switcher.js +3 -3
- package/esm/src/react/components/chat/chat/components/tool-ui.d.ts +96 -3
- package/esm/src/react/components/chat/chat/components/tool-ui.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/tool-ui.js +158 -36
- package/esm/src/react/components/chat/chat/composition/api.d.ts +4 -2
- package/esm/src/react/components/chat/chat/composition/api.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/api.js +4 -2
- package/esm/src/react/components/chat/chat/composition/chat-composer.d.ts +112 -5
- package/esm/src/react/components/chat/chat/composition/chat-composer.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-composer.js +251 -61
- package/esm/src/react/components/chat/chat/composition/chat-empty-state.d.ts +78 -0
- package/esm/src/react/components/chat/chat/composition/chat-empty-state.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/composition/chat-empty-state.js +63 -0
- package/esm/src/react/components/chat/chat/composition/chat-empty.d.ts +4 -1
- package/esm/src/react/components/chat/chat/composition/chat-empty.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-empty.js +11 -10
- package/esm/src/react/components/chat/chat/composition/chat-message-list.d.ts +11 -3
- package/esm/src/react/components/chat/chat/composition/chat-message-list.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-message-list.js +81 -111
- package/esm/src/react/components/chat/chat/composition/chat-root.d.ts +4 -0
- package/esm/src/react/components/chat/chat/composition/chat-root.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-root.js +3 -1
- package/esm/src/react/components/chat/chat/composition/error-banner.d.ts +4 -0
- package/esm/src/react/components/chat/chat/composition/error-banner.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/error-banner.js +10 -7
- package/esm/src/react/components/chat/chat/composition/message.d.ts +123 -5
- package/esm/src/react/components/chat/chat/composition/message.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/message.js +332 -53
- package/esm/src/react/components/chat/chat/composition/model-avatar.d.ts +6 -1
- package/esm/src/react/components/chat/chat/composition/model-avatar.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/model-avatar.js +3 -4
- package/esm/src/react/components/chat/chat/composition/pending-message.d.ts +31 -0
- package/esm/src/react/components/chat/chat/composition/pending-message.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/composition/pending-message.js +31 -0
- package/esm/src/react/components/chat/chat/contexts/chat-context.d.ts +4 -0
- package/esm/src/react/components/chat/chat/contexts/chat-context.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/contexts/composer-context.d.ts +1 -0
- package/esm/src/react/components/chat/chat/contexts/composer-context.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/contexts/conversations-context.d.ts +29 -0
- package/esm/src/react/components/chat/chat/contexts/conversations-context.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/contexts/conversations-context.js +39 -0
- package/esm/src/react/components/chat/chat/contexts/index.d.ts +1 -1
- package/esm/src/react/components/chat/chat/contexts/index.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/contexts/index.js +1 -1
- package/esm/src/react/components/chat/chat/contexts/message-context.d.ts +2 -0
- package/esm/src/react/components/chat/chat/contexts/message-context.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/hooks/use-clipboard.d.ts +10 -0
- package/esm/src/react/components/chat/chat/hooks/use-clipboard.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/hooks/use-clipboard.js +34 -0
- package/esm/src/react/components/chat/chat/hooks/use-conversation.d.ts +21 -0
- package/esm/src/react/components/chat/chat/hooks/use-conversation.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/hooks/use-conversation.js +54 -0
- package/esm/src/react/components/chat/chat/hooks/use-conversations.d.ts +67 -0
- package/esm/src/react/components/chat/chat/hooks/use-conversations.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/hooks/use-conversations.js +317 -0
- package/esm/src/react/components/chat/chat/hooks/use-drop-zone.d.ts +27 -0
- package/esm/src/react/components/chat/chat/hooks/use-drop-zone.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/hooks/use-drop-zone.js +50 -0
- package/esm/src/react/components/chat/chat/hooks/use-stick-to-bottom.d.ts +49 -0
- package/esm/src/react/components/chat/chat/hooks/use-stick-to-bottom.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/hooks/use-stick-to-bottom.js +120 -0
- package/esm/src/react/components/chat/chat/hooks/use-upload.d.ts +34 -0
- package/esm/src/react/components/chat/chat/hooks/use-upload.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/hooks/use-upload.js +147 -0
- package/esm/src/react/components/chat/chat/hooks/use-uploads-registry.d.ts +37 -0
- package/esm/src/react/components/chat/chat/hooks/use-uploads-registry.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/hooks/use-uploads-registry.js +178 -0
- package/esm/src/react/components/chat/chat/index.d.ts +171 -31
- package/esm/src/react/components/chat/chat/index.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/index.js +371 -77
- package/esm/src/react/components/chat/chat/persistence/conversation-store.d.ts +63 -0
- package/esm/src/react/components/chat/chat/persistence/conversation-store.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/persistence/conversation-store.js +1 -0
- package/esm/src/react/components/chat/chat/persistence/local-conversation-store.d.ts +13 -0
- package/esm/src/react/components/chat/chat/persistence/local-conversation-store.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/persistence/local-conversation-store.js +102 -0
- package/esm/src/react/components/chat/chat/persistence/memory-conversation-store.d.ts +11 -0
- package/esm/src/react/components/chat/chat/persistence/memory-conversation-store.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/persistence/memory-conversation-store.js +33 -0
- package/esm/src/react/components/chat/chat/utils/message-parts.d.ts +4 -1
- package/esm/src/react/components/chat/chat/utils/message-parts.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/utils/message-parts.js +4 -0
- package/esm/src/react/components/chat/chat-actions.d.ts +164 -0
- package/esm/src/react/components/chat/chat-actions.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat-actions.js +191 -0
- package/esm/src/react/components/chat/chat-agent-picker.d.ts +50 -0
- package/esm/src/react/components/chat/chat-agent-picker.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat-agent-picker.js +40 -0
- package/esm/src/react/components/chat/chat-theme-scope.d.ts +26 -0
- package/esm/src/react/components/chat/chat-theme-scope.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat-theme-scope.js +27 -0
- package/esm/src/react/components/chat/chat-tokens-style.d.ts +21 -0
- package/esm/src/react/components/chat/chat-tokens-style.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat-tokens-style.js +24 -0
- package/esm/src/react/components/chat/chat.d.ts +5 -5
- package/esm/src/react/components/chat/chat.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat.js +5 -5
- package/esm/src/react/components/chat/color-mode.d.ts +46 -0
- package/esm/src/react/components/chat/color-mode.d.ts.map +1 -0
- package/esm/src/react/components/chat/color-mode.js +123 -0
- package/esm/src/react/components/chat/error-boundary.js +2 -2
- package/esm/src/react/components/chat/icons/index.d.ts +8 -0
- package/esm/src/react/components/chat/icons/index.d.ts.map +1 -1
- package/esm/src/react/components/chat/icons/index.js +64 -0
- package/esm/src/react/components/chat/markdown.d.ts +24 -1
- package/esm/src/react/components/chat/markdown.d.ts.map +1 -1
- package/esm/src/react/components/chat/markdown.js +122 -38
- package/esm/src/react/components/chat/model-selector.d.ts +130 -8
- package/esm/src/react/components/chat/model-selector.d.ts.map +1 -1
- package/esm/src/react/components/chat/model-selector.js +148 -121
- package/esm/src/react/components/chat/theme.d.ts +9 -12
- package/esm/src/react/components/chat/theme.d.ts.map +1 -1
- package/esm/src/react/components/chat/theme.js +149 -93
- package/esm/src/react/components/chat/ui/alert.d.ts +30 -0
- package/esm/src/react/components/chat/ui/alert.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/alert.js +35 -0
- package/esm/src/react/components/chat/ui/app-shell.d.ts +155 -0
- package/esm/src/react/components/chat/ui/app-shell.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/app-shell.js +276 -0
- package/esm/src/react/components/chat/ui/avatar.d.ts +24 -0
- package/esm/src/react/components/chat/ui/avatar.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/avatar.js +44 -0
- package/esm/src/react/components/chat/ui/badge.d.ts +24 -0
- package/esm/src/react/components/chat/ui/badge.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/badge.js +30 -0
- package/esm/src/react/components/chat/ui/button.d.ts +44 -0
- package/esm/src/react/components/chat/ui/button.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/button.js +108 -0
- package/esm/src/react/components/chat/ui/card.d.ts +42 -0
- package/esm/src/react/components/chat/ui/card.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/card.js +55 -0
- package/esm/src/react/components/chat/ui/checkbox.d.ts +28 -0
- package/esm/src/react/components/chat/ui/checkbox.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/checkbox.js +36 -0
- package/esm/src/react/components/chat/ui/code-block.d.ts +89 -0
- package/esm/src/react/components/chat/ui/code-block.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/code-block.js +277 -0
- package/esm/src/react/components/chat/ui/collapsible.d.ts +30 -0
- package/esm/src/react/components/chat/ui/collapsible.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/collapsible.js +44 -0
- package/esm/src/react/components/chat/ui/command.d.ts +65 -0
- package/esm/src/react/components/chat/ui/command.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/command.js +121 -0
- package/esm/src/react/components/chat/ui/cva.d.ts +36 -0
- package/esm/src/react/components/chat/ui/cva.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/cva.js +45 -0
- package/esm/src/react/components/chat/ui/dialog.d.ts +55 -0
- package/esm/src/react/components/chat/ui/dialog.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/dialog.js +116 -0
- package/esm/src/react/components/chat/ui/drawer.d.ts +41 -0
- package/esm/src/react/components/chat/ui/drawer.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/drawer.js +92 -0
- package/esm/src/react/components/chat/ui/dropdown-menu.d.ts +63 -0
- package/esm/src/react/components/chat/ui/dropdown-menu.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/dropdown-menu.js +76 -0
- package/esm/src/react/components/chat/ui/file-type.d.ts +26 -0
- package/esm/src/react/components/chat/ui/file-type.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/file-type.js +235 -0
- package/esm/src/react/components/chat/ui/floating.d.ts +29 -0
- package/esm/src/react/components/chat/ui/floating.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/floating.js +90 -0
- package/esm/src/react/components/chat/ui/icon-button.d.ts +19 -0
- package/esm/src/react/components/chat/ui/icon-button.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/icon-button.js +20 -0
- package/esm/src/react/components/chat/ui/index.d.ts +43 -0
- package/esm/src/react/components/chat/ui/index.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/index.js +42 -0
- package/esm/src/react/components/chat/ui/input.d.ts +27 -0
- package/esm/src/react/components/chat/ui/input.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/input.js +41 -0
- package/esm/src/react/components/chat/ui/label.d.ts +29 -0
- package/esm/src/react/components/chat/ui/label.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/label.js +40 -0
- package/esm/src/react/components/chat/ui/list.d.ts +47 -0
- package/esm/src/react/components/chat/ui/list.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/list.js +40 -0
- package/esm/src/react/components/chat/ui/pill.d.ts +26 -0
- package/esm/src/react/components/chat/ui/pill.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/pill.js +39 -0
- package/esm/src/react/components/chat/ui/popover.d.ts +47 -0
- package/esm/src/react/components/chat/ui/popover.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/popover.js +68 -0
- package/esm/src/react/components/chat/ui/progress-bar.d.ts +20 -0
- package/esm/src/react/components/chat/ui/progress-bar.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/progress-bar.js +31 -0
- package/esm/src/react/components/chat/ui/radio.d.ts +25 -0
- package/esm/src/react/components/chat/ui/radio.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/radio.js +29 -0
- package/esm/src/react/components/chat/ui/scroll-fade.d.ts +23 -0
- package/esm/src/react/components/chat/ui/scroll-fade.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/scroll-fade.js +40 -0
- package/esm/src/react/components/chat/ui/select.d.ts +64 -0
- package/esm/src/react/components/chat/ui/select.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/select.js +148 -0
- package/esm/src/react/components/chat/ui/shimmer.d.ts +25 -0
- package/esm/src/react/components/chat/ui/shimmer.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/shimmer.js +24 -0
- package/esm/src/react/components/chat/ui/skeleton.d.ts +14 -0
- package/esm/src/react/components/chat/ui/skeleton.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/skeleton.js +12 -0
- package/esm/src/react/components/chat/ui/slot.d.ts +21 -0
- package/esm/src/react/components/chat/ui/slot.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/slot.js +70 -0
- package/esm/src/react/components/chat/ui/status.d.ts +28 -0
- package/esm/src/react/components/chat/ui/status.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/status.js +23 -0
- package/esm/src/react/components/chat/ui/switch.d.ts +34 -0
- package/esm/src/react/components/chat/ui/switch.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/switch.js +58 -0
- package/esm/src/react/components/chat/ui/tabs.d.ts +44 -0
- package/esm/src/react/components/chat/ui/tabs.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/tabs.js +51 -0
- package/esm/src/react/components/chat/ui/tag.d.ts +22 -0
- package/esm/src/react/components/chat/ui/tag.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/tag.js +27 -0
- package/esm/src/react/components/chat/ui/textarea.d.ts +22 -0
- package/esm/src/react/components/chat/ui/textarea.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/textarea.js +35 -0
- package/esm/src/react/components/chat/ui/tooltip.d.ts +40 -0
- package/esm/src/react/components/chat/ui/tooltip.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/tooltip.js +132 -0
- package/esm/src/react/primitives/input-box.d.ts.map +1 -1
- package/esm/src/react/primitives/input-box.js +17 -4
- package/esm/src/server/handlers/dev/framework-candidates.generated.d.ts.map +1 -1
- package/esm/src/server/handlers/dev/framework-candidates.generated.js +9437 -1064
- package/esm/src/server/handlers/dev/projects/html-shell.d.ts +1 -1
- package/esm/src/server/handlers/dev/projects/html-shell.d.ts.map +1 -1
- package/esm/src/server/handlers/dev/projects/html-shell.js +1 -12
- package/esm/src/server/handlers/request/public-agents-list.handler.d.ts +18 -0
- package/esm/src/server/handlers/request/public-agents-list.handler.d.ts.map +1 -0
- package/esm/src/server/handlers/request/public-agents-list.handler.js +44 -0
- package/esm/src/server/runtime-handler/index.d.ts +1 -1
- package/esm/src/server/runtime-handler/index.d.ts.map +1 -1
- package/esm/src/server/runtime-handler/index.js +3 -0
- package/esm/src/studio/bridge/bridge-bundle.generated.d.ts +1 -1
- package/esm/src/studio/bridge/bridge-bundle.generated.d.ts.map +1 -1
- package/esm/src/studio/bridge/bridge-bundle.generated.js +3 -2
- package/esm/src/utils/version-constant.d.ts +1 -1
- package/esm/src/utils/version-constant.js +1 -1
- package/esm/src/workflow/blob/local-storage.d.ts +32 -0
- package/esm/src/workflow/blob/local-storage.d.ts.map +1 -0
- package/esm/src/workflow/blob/local-storage.js +179 -0
- package/esm/src/workflow/blob/types.d.ts +5 -0
- package/esm/src/workflow/blob/types.d.ts.map +1 -1
- package/esm/src/workflow/blob/veryfront-cloud-storage.d.ts +11 -0
- package/esm/src/workflow/blob/veryfront-cloud-storage.d.ts.map +1 -1
- package/esm/src/workflow/blob/veryfront-cloud-storage.js +36 -0
- package/package.json +5 -1
- package/esm/src/react/components/chat/chat/components/uploads-panel.d.ts +0 -20
- package/esm/src/react/components/chat/chat/components/uploads-panel.d.ts.map +0 -1
- package/esm/src/react/components/chat/chat/components/uploads-panel.js +0 -49
- package/esm/src/react/components/chat/chat/contexts/thread-list-context.d.ts +0 -28
- package/esm/src/react/components/chat/chat/contexts/thread-list-context.d.ts.map +0 -1
- package/esm/src/react/components/chat/chat/contexts/thread-list-context.js +0 -27
- package/esm/src/react/components/chat/chat/hooks/use-threads.d.ts +0 -28
- package/esm/src/react/components/chat/chat/hooks/use-threads.d.ts.map +0 -1
- package/esm/src/react/components/chat/chat/hooks/use-threads.js +0 -151
- package/esm/src/react/components/chat/chat-with-sidebar.d.ts +0 -110
- package/esm/src/react/components/chat/chat-with-sidebar.d.ts.map +0 -1
- package/esm/src/react/components/chat/chat-with-sidebar.js +0 -167
- package/esm/src/react/components/chat/message.d.ts +0 -42
- package/esm/src/react/components/chat/message.d.ts.map +0 -1
- package/esm/src/react/components/chat/message.js +0 -69
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* ChatInput — the composer: input area with attachments, model selector, voice,
|
|
3
|
+
* and submit. Canonical name is `ChatInput` (the composer of a chat message).
|
|
4
|
+
*
|
|
5
|
+
* Render-or-compose: `<ChatInput … />` renders the batteries-included toolbar,
|
|
6
|
+
* or compose your own from the sub-parts (`ChatInput.Field`, `ChatInput.Send`,
|
|
7
|
+
* `ChatInput.Stop`, `ChatInput.Voice`, `ChatInput.Model`, `ChatInput.Attach`) —
|
|
8
|
+
* each reads its state/handlers from `useComposerContext`, which `ChatInput`
|
|
9
|
+
* provides. Every action sub-part takes `icon`, `className`, `asChild`, and an
|
|
10
|
+
* `onClick(e, next)` wrap-signature.
|
|
3
11
|
*
|
|
4
12
|
* @module react/components/chat/composition/chat-composer
|
|
5
13
|
*/
|
|
@@ -8,8 +16,52 @@ import { type ModelOption } from "../../model-selector.js";
|
|
|
8
16
|
import type { ChatTheme } from "../../theme.js";
|
|
9
17
|
import type { AttachmentInfo } from "../components/attachment-pill.js";
|
|
10
18
|
import type { ChatMessage } from "../../../../../agent/react/index.js";
|
|
11
|
-
/**
|
|
12
|
-
export interface
|
|
19
|
+
/** Icon overrides for the batteries-included `ChatInput` toolbar. */
|
|
20
|
+
export interface ChatInputIcons {
|
|
21
|
+
send?: React.ReactNode;
|
|
22
|
+
attach?: React.ReactNode;
|
|
23
|
+
voice?: React.ReactNode;
|
|
24
|
+
stop?: React.ReactNode;
|
|
25
|
+
export?: React.ReactNode;
|
|
26
|
+
}
|
|
27
|
+
/** Wrap-signature onClick shared by the interactive `ChatInput` sub-parts. */
|
|
28
|
+
type WrapClick = (event: React.MouseEvent<HTMLElement>, next: () => void) => void;
|
|
29
|
+
/** Props accepted by `<ChatInput.Field>`. */
|
|
30
|
+
export interface ChatInputFieldProps {
|
|
31
|
+
placeholder?: string;
|
|
32
|
+
className?: string;
|
|
33
|
+
"aria-label"?: string;
|
|
34
|
+
}
|
|
35
|
+
/** The multiline text editor. */
|
|
36
|
+
export declare function ChatInputField({ placeholder, className, ...props }: ChatInputFieldProps): React.ReactElement;
|
|
37
|
+
/** Props shared by the icon action sub-parts. */
|
|
38
|
+
export interface ChatInputActionProps {
|
|
39
|
+
icon?: React.ReactNode;
|
|
40
|
+
className?: string;
|
|
41
|
+
asChild?: boolean;
|
|
42
|
+
onClick?: WrapClick;
|
|
43
|
+
}
|
|
44
|
+
/** Send button — shows when there is input (and not streaming). */
|
|
45
|
+
export declare const ChatInputSend: React.ForwardRefExoticComponent<ChatInputActionProps & React.RefAttributes<HTMLButtonElement>>;
|
|
46
|
+
/** Stop button — shows while streaming. */
|
|
47
|
+
export declare const ChatInputStop: React.ForwardRefExoticComponent<ChatInputActionProps & React.RefAttributes<HTMLButtonElement>>;
|
|
48
|
+
/** Voice button — shows when the field is empty and voice is available. */
|
|
49
|
+
export declare const ChatInputVoice: React.ForwardRefExoticComponent<ChatInputActionProps & React.RefAttributes<HTMLButtonElement>>;
|
|
50
|
+
/** Model selector — shows when models are configured. */
|
|
51
|
+
export declare function ChatInputModel({ className }: {
|
|
52
|
+
className?: string;
|
|
53
|
+
}): React.ReactElement | null;
|
|
54
|
+
/**
|
|
55
|
+
* Attachment `+` control — a portalled `+` menu (Studio `PromptForm`'s
|
|
56
|
+
* `PlusMenu`). The menu leads with "Attach files to chat" (opens the file
|
|
57
|
+
* dialog) and adds "Select document" when `onSelectAttachment` is set.
|
|
58
|
+
*/
|
|
59
|
+
export declare function ChatInputAttach({ icon, onClick }: {
|
|
60
|
+
icon?: React.ReactNode;
|
|
61
|
+
onClick?: WrapClick;
|
|
62
|
+
}): React.ReactElement | null;
|
|
63
|
+
/** Props accepted by `ChatInput`. */
|
|
64
|
+
export interface ChatInputProps {
|
|
13
65
|
input: string;
|
|
14
66
|
onChange: (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
|
|
15
67
|
onSubmit?: (e?: React.FormEvent) => void;
|
|
@@ -23,16 +75,71 @@ export interface ChatComposerProps {
|
|
|
23
75
|
models?: ModelOption[];
|
|
24
76
|
model?: string;
|
|
25
77
|
onModelChange?: (model: string) => void;
|
|
78
|
+
toolbarStart?: React.ReactNode;
|
|
26
79
|
onAttach?: (files: FileList) => void;
|
|
27
80
|
onSelectAttachment?: () => void;
|
|
81
|
+
/**
|
|
82
|
+
* Files dropped onto the composer. Defaults to `onAttach` — pass this only to
|
|
83
|
+
* treat a drop differently from the `+` menu upload.
|
|
84
|
+
*/
|
|
85
|
+
onDrop?: (files: FileList) => void;
|
|
28
86
|
attachAccept?: string;
|
|
29
87
|
attachments?: AttachmentInfo[];
|
|
30
88
|
onRemoveAttachment?: (id: string) => void;
|
|
31
89
|
showExport?: boolean;
|
|
32
90
|
messages?: ChatMessage[];
|
|
91
|
+
/** Override the toolbar button icons. */
|
|
92
|
+
icons?: ChatInputIcons;
|
|
93
|
+
/** Wrap the built-in attachment `+` click; call `next()` to run it. */
|
|
94
|
+
onAttachClick?: WrapClick;
|
|
95
|
+
/** Wrap the built-in export click; call `next()` to run it. */
|
|
96
|
+
onExportClick?: WrapClick;
|
|
33
97
|
className?: string;
|
|
34
98
|
children?: React.ReactNode;
|
|
35
99
|
}
|
|
36
|
-
/**
|
|
37
|
-
export
|
|
100
|
+
/** Composer state the context is built from (shared by `ChatInput` + `ChatInput.Root`). */
|
|
101
|
+
export interface ComposerStateProps {
|
|
102
|
+
input: string;
|
|
103
|
+
onChange: (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
|
|
104
|
+
onSubmit?: (e?: React.FormEvent) => void;
|
|
105
|
+
isLoading?: boolean;
|
|
106
|
+
stop?: () => void;
|
|
107
|
+
onVoice?: () => void;
|
|
108
|
+
isListening?: boolean;
|
|
109
|
+
transcript?: string;
|
|
110
|
+
models?: ModelOption[];
|
|
111
|
+
model?: string;
|
|
112
|
+
onModelChange?: (model: string) => void;
|
|
113
|
+
onAttach?: (files: FileList) => void;
|
|
114
|
+
onSelectAttachment?: () => void;
|
|
115
|
+
attachAccept?: string;
|
|
116
|
+
attachments?: AttachmentInfo[];
|
|
117
|
+
onRemoveAttachment?: (id: string) => void;
|
|
118
|
+
}
|
|
119
|
+
/** Props accepted by `<ChatInput.Root>`. */
|
|
120
|
+
export interface ChatInputRootProps extends ComposerStateProps {
|
|
121
|
+
className?: string;
|
|
122
|
+
children: React.ReactNode;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* `ChatInput.Root` — the provider shell for a fully custom composer. Supplies
|
|
126
|
+
* `ComposerContext` from props and renders your children, so you arrange
|
|
127
|
+
* `ChatInput.Field` + the toolbar sub-parts yourself (like `Message.Root`). The
|
|
128
|
+
* default `<ChatInput>` is exactly this Root plus the standard body.
|
|
129
|
+
*/
|
|
130
|
+
export declare const ChatInputRoot: React.ForwardRefExoticComponent<ChatInputRootProps & React.RefAttributes<HTMLDivElement>>;
|
|
131
|
+
/**
|
|
132
|
+
* ChatInput — render `<ChatInput … />` for the default composer, or compose
|
|
133
|
+
* `ChatInput.Field` + `ChatInput.Send`/`Stop`/`Voice`/`Model`/`Attach`.
|
|
134
|
+
*/
|
|
135
|
+
export declare const ChatInput: React.ForwardRefExoticComponent<ChatInputProps & React.RefAttributes<HTMLDivElement>> & {
|
|
136
|
+
Root: React.ForwardRefExoticComponent<ChatInputRootProps & React.RefAttributes<HTMLDivElement>>;
|
|
137
|
+
Field: typeof ChatInputField;
|
|
138
|
+
Send: React.ForwardRefExoticComponent<ChatInputActionProps & React.RefAttributes<HTMLButtonElement>>;
|
|
139
|
+
Stop: React.ForwardRefExoticComponent<ChatInputActionProps & React.RefAttributes<HTMLButtonElement>>;
|
|
140
|
+
Voice: React.ForwardRefExoticComponent<ChatInputActionProps & React.RefAttributes<HTMLButtonElement>>;
|
|
141
|
+
Model: typeof ChatInputModel;
|
|
142
|
+
Attach: typeof ChatInputAttach;
|
|
143
|
+
};
|
|
144
|
+
export {};
|
|
38
145
|
//# sourceMappingURL=chat-composer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-composer.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/composition/chat-composer.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"chat-composer.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/composition/chat-composer.tsx"],"names":[],"mappings":"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"}
|
|
@@ -1,72 +1,262 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* ChatInput — the composer: input area with attachments, model selector, voice,
|
|
3
|
+
* and submit. Canonical name is `ChatInput` (the composer of a chat message).
|
|
4
|
+
*
|
|
5
|
+
* Render-or-compose: `<ChatInput … />` renders the batteries-included toolbar,
|
|
6
|
+
* or compose your own from the sub-parts (`ChatInput.Field`, `ChatInput.Send`,
|
|
7
|
+
* `ChatInput.Stop`, `ChatInput.Voice`, `ChatInput.Model`, `ChatInput.Attach`) —
|
|
8
|
+
* each reads its state/handlers from `useComposerContext`, which `ChatInput`
|
|
9
|
+
* provides. Every action sub-part takes `icon`, `className`, `asChild`, and an
|
|
10
|
+
* `onClick(e, next)` wrap-signature.
|
|
3
11
|
*
|
|
4
12
|
* @module react/components/chat/composition/chat-composer
|
|
5
13
|
*/
|
|
6
14
|
import * as React from "../../../../../../react/react.js";
|
|
7
|
-
import { InputBox
|
|
15
|
+
import { InputBox } from "../../../../primitives/index.js";
|
|
8
16
|
import { cn } from "../../theme.js";
|
|
9
|
-
import { PlusIcon } from "../../icons/index.js";
|
|
17
|
+
import { ArrowUpIcon, FileTextIcon, PaperclipIcon, PlusIcon, StopIcon } from "../../icons/index.js";
|
|
18
|
+
import { Button } from "../../ui/button.js";
|
|
19
|
+
import { IconButton } from "../../ui/icon-button.js";
|
|
20
|
+
import { Slot } from "../../ui/slot.js";
|
|
21
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, } from "../../ui/dropdown-menu.js";
|
|
10
22
|
import { ModelSelector } from "../../model-selector.js";
|
|
11
23
|
import { AttachmentPill } from "../components/attachment-pill.js";
|
|
24
|
+
import { DropZoneOverlay } from "../components/drop-zone.js";
|
|
25
|
+
import { useDropZone } from "../hooks/use-drop-zone.js";
|
|
12
26
|
import { downloadMarkdown } from "../utils/export.js";
|
|
13
|
-
|
|
14
|
-
|
|
27
|
+
import { ComposerContextProvider, useComposerContext, } from "../contexts/composer-context.js";
|
|
28
|
+
/** Microphone glyph for the idle-composer voice button (not in the barrel). */
|
|
29
|
+
function MicGlyph() {
|
|
30
|
+
return (React.createElement("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true" },
|
|
31
|
+
React.createElement("path", { d: "M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z" }),
|
|
32
|
+
React.createElement("path", { d: "M19 10v2a7 7 0 0 1-14 0v-2" }),
|
|
33
|
+
React.createElement("line", { x1: "12", x2: "12", y1: "19", y2: "22" })));
|
|
34
|
+
}
|
|
35
|
+
/** Default export (download) glyph. */
|
|
36
|
+
function ExportGlyph() {
|
|
37
|
+
return (React.createElement("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" },
|
|
38
|
+
React.createElement("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
|
|
39
|
+
React.createElement("polyline", { points: "7 10 12 15 17 10" }),
|
|
40
|
+
React.createElement("line", { x1: "12", y1: "15", x2: "12", y2: "3" })));
|
|
41
|
+
}
|
|
42
|
+
/** The multiline text editor. */
|
|
43
|
+
export function ChatInputField({ placeholder = "Type a message...", className, ...props }) {
|
|
44
|
+
const c = useComposerContext();
|
|
45
|
+
const value = c.isListening ? c.transcript || c.input : c.input;
|
|
46
|
+
const label = props["aria-label"] ?? placeholder ?? "Message";
|
|
47
|
+
return (React.createElement(InputBox, { value: value, onChange: c.onChange, onSubmit: () => c.onSubmit(), placeholder: placeholder, "aria-label": label, disabled: c.isLoading || c.isListening, multiline: true, className: cn("min-h-9 w-full min-w-0 py-1.5 text-base leading-6 text-[var(--foreground)] placeholder:text-[var(--faint)]", className) }));
|
|
48
|
+
}
|
|
49
|
+
/** Send button — shows when there is input (and not streaming). */
|
|
50
|
+
export const ChatInputSend = React.forwardRef(function ChatInputSend({ icon, className, asChild, onClick }, ref) {
|
|
51
|
+
const c = useComposerContext();
|
|
52
|
+
if (c.isLoading)
|
|
53
|
+
return null;
|
|
54
|
+
if (!c.canSubmit && c.onVoice)
|
|
55
|
+
return null;
|
|
56
|
+
const run = () => c.onSubmit();
|
|
57
|
+
const Comp = asChild ? Slot : Button;
|
|
58
|
+
return (React.createElement(Comp, { ref: ref, type: "button", variant: "icon-primary", on: "card", size: "icon-lg", "aria-label": "Send", disabled: !c.canSubmit, onClick: (e) => (onClick ? onClick(e, run) : run()), className: cn("shrink-0", className) }, icon ?? React.createElement(ArrowUpIcon, null)));
|
|
59
|
+
});
|
|
60
|
+
ChatInputSend.displayName = "ChatInput.Send";
|
|
61
|
+
/** Stop button — shows while streaming. */
|
|
62
|
+
export const ChatInputStop = React.forwardRef(function ChatInputStop({ icon, className, asChild, onClick }, ref) {
|
|
63
|
+
const c = useComposerContext();
|
|
64
|
+
if (!c.isLoading)
|
|
65
|
+
return null;
|
|
66
|
+
const run = () => c.onStop?.();
|
|
67
|
+
const Comp = asChild ? Slot : Button;
|
|
68
|
+
return (React.createElement(Comp, { ref: ref, type: "button", variant: "icon-ghost", size: "icon-lg", "aria-label": "Stop", onClick: (e) => (onClick ? onClick(e, run) : run()), className: cn("shrink-0", className) }, icon ?? React.createElement(StopIcon, null)));
|
|
69
|
+
});
|
|
70
|
+
ChatInputStop.displayName = "ChatInput.Stop";
|
|
71
|
+
/** Voice button — shows when the field is empty and voice is available. */
|
|
72
|
+
export const ChatInputVoice = React.forwardRef(function ChatInputVoice({ icon, className, asChild, onClick }, ref) {
|
|
73
|
+
const c = useComposerContext();
|
|
74
|
+
if (c.isLoading || c.canSubmit || !c.onVoice)
|
|
75
|
+
return null;
|
|
76
|
+
const run = () => c.onVoice?.();
|
|
77
|
+
const Comp = asChild ? Slot : Button;
|
|
78
|
+
return (React.createElement(Comp, { ref: ref, type: "button", variant: "icon-ghost", on: "card", size: "icon-lg", "aria-label": "Voice input", "aria-pressed": c.isListening, onClick: (e) => (onClick ? onClick(e, run) : run()), className: cn("shrink-0", c.isListening && "bg-[var(--primary)] text-[var(--secondary)]", className) }, icon ?? React.createElement(MicGlyph, null)));
|
|
79
|
+
});
|
|
80
|
+
ChatInputVoice.displayName = "ChatInput.Voice";
|
|
81
|
+
/** Model selector — shows when models are configured. */
|
|
82
|
+
export function ChatInputModel({ className }) {
|
|
83
|
+
const c = useComposerContext();
|
|
84
|
+
if (!c.models || c.models.length === 0 || !c.onModelChange)
|
|
85
|
+
return null;
|
|
86
|
+
return (React.createElement(ModelSelector, { variant: "icon", models: c.models, value: c.model, onChange: c.onModelChange, disabled: c.isLoading, className: className }));
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Attachment `+` control — a portalled `+` menu (Studio `PromptForm`'s
|
|
90
|
+
* `PlusMenu`). The menu leads with "Attach files to chat" (opens the file
|
|
91
|
+
* dialog) and adds "Select document" when `onSelectAttachment` is set.
|
|
92
|
+
*/
|
|
93
|
+
export function ChatInputAttach({ icon, onClick }) {
|
|
94
|
+
const c = useComposerContext();
|
|
15
95
|
const fileInputRef = React.useRef(null);
|
|
16
|
-
const [
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
96
|
+
const [menuOpen, setMenuOpen] = React.useState(false);
|
|
97
|
+
if (!c.onAttach && !c.onSelectAttachment)
|
|
98
|
+
return null;
|
|
99
|
+
const openDialog = () => fileInputRef.current?.click();
|
|
100
|
+
// Menu selection carries no mouse event; pass a stub so the `onClick` wrap
|
|
101
|
+
// (e.g. `onAttachClick`) still gets its `next()` continuation.
|
|
102
|
+
const runUpload = () => onClick ? onClick({}, openDialog) : openDialog();
|
|
103
|
+
return (React.createElement("div", { className: "relative flex shrink-0 items-center" },
|
|
104
|
+
c.onAttach && (React.createElement("input", { ref: fileInputRef, type: "file", accept: c.attachAccept, multiple: true, "aria-label": "Upload file", onChange: (e) => {
|
|
105
|
+
if (e.target.files?.length)
|
|
106
|
+
c.onAttach?.(e.target.files);
|
|
107
|
+
e.target.value = "";
|
|
108
|
+
}, style: {
|
|
109
|
+
position: "absolute",
|
|
110
|
+
width: 1,
|
|
111
|
+
height: 1,
|
|
112
|
+
padding: 0,
|
|
113
|
+
margin: -1,
|
|
114
|
+
overflow: "hidden",
|
|
115
|
+
clip: "rect(0,0,0,0)",
|
|
116
|
+
whiteSpace: "nowrap",
|
|
117
|
+
border: 0,
|
|
118
|
+
} })),
|
|
119
|
+
React.createElement(DropdownMenu, { open: menuOpen, onOpenChange: setMenuOpen },
|
|
120
|
+
React.createElement(DropdownMenuTrigger, { asChild: true },
|
|
121
|
+
React.createElement(Button, { type: "button", variant: "icon-tertiary", size: "icon-lg", "aria-label": "Add document", className: "shrink-0" }, icon ?? React.createElement(PlusIcon, null))),
|
|
122
|
+
React.createElement(DropdownMenuContent, { align: "start" },
|
|
123
|
+
c.onAttach && (React.createElement(DropdownMenuItem, { onSelect: runUpload },
|
|
124
|
+
React.createElement(PaperclipIcon, null),
|
|
125
|
+
"Attach files to chat")),
|
|
126
|
+
c.onSelectAttachment && (React.createElement(DropdownMenuItem, { onSelect: c.onSelectAttachment },
|
|
127
|
+
React.createElement(FileTextIcon, null),
|
|
128
|
+
"Select document"))))));
|
|
129
|
+
}
|
|
130
|
+
/** Build the ComposerContext value from composer state props. */
|
|
131
|
+
function useComposerValue(p) {
|
|
132
|
+
const hasResolvedAttachment = p.attachments?.some((attachment) => Boolean(attachment.url) &&
|
|
133
|
+
attachment.state !== "uploading" &&
|
|
134
|
+
attachment.state !== "processing" &&
|
|
135
|
+
attachment.state !== "error") ?? false;
|
|
136
|
+
return React.useMemo(() => ({
|
|
137
|
+
input: p.input,
|
|
138
|
+
setInput: () => { },
|
|
139
|
+
onChange: p.onChange,
|
|
140
|
+
attachments: p.attachments ?? [],
|
|
141
|
+
onAttach: p.onAttach,
|
|
142
|
+
onSelectAttachment: p.onSelectAttachment,
|
|
143
|
+
onRemoveAttachment: p.onRemoveAttachment,
|
|
144
|
+
attachAccept: p.attachAccept,
|
|
145
|
+
onSubmit: (e) => p.onSubmit?.(e),
|
|
146
|
+
isLoading: p.isLoading ?? false,
|
|
147
|
+
canSubmit: p.input.trim().length > 0 || hasResolvedAttachment,
|
|
148
|
+
onStop: p.stop,
|
|
149
|
+
onVoice: p.onVoice,
|
|
150
|
+
isListening: p.isListening ?? false,
|
|
151
|
+
transcript: p.transcript,
|
|
152
|
+
model: p.model,
|
|
153
|
+
models: p.models ?? [],
|
|
154
|
+
onModelChange: p.onModelChange,
|
|
155
|
+
}), [
|
|
156
|
+
p.input,
|
|
157
|
+
p.onChange,
|
|
158
|
+
p.attachments,
|
|
159
|
+
p.onAttach,
|
|
160
|
+
p.onSelectAttachment,
|
|
161
|
+
p.onRemoveAttachment,
|
|
162
|
+
p.attachAccept,
|
|
163
|
+
p.onSubmit,
|
|
164
|
+
p.isLoading,
|
|
165
|
+
hasResolvedAttachment,
|
|
166
|
+
p.stop,
|
|
167
|
+
p.onVoice,
|
|
168
|
+
p.isListening,
|
|
169
|
+
p.transcript,
|
|
170
|
+
p.model,
|
|
171
|
+
p.models,
|
|
172
|
+
p.onModelChange,
|
|
173
|
+
]);
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* `ChatInput.Root` — the provider shell for a fully custom composer. Supplies
|
|
177
|
+
* `ComposerContext` from props and renders your children, so you arrange
|
|
178
|
+
* `ChatInput.Field` + the toolbar sub-parts yourself (like `Message.Root`). The
|
|
179
|
+
* default `<ChatInput>` is exactly this Root plus the standard body.
|
|
180
|
+
*/
|
|
181
|
+
export const ChatInputRoot = React.forwardRef(function ChatInputRoot({ className, children, ...state }, ref) {
|
|
182
|
+
const ctxValue = useComposerValue(state);
|
|
183
|
+
return (React.createElement(ComposerContextProvider, { value: ctxValue },
|
|
184
|
+
React.createElement("div", { ref: ref, className: cn("flex-shrink-0 pb-6 pt-2", className) },
|
|
185
|
+
React.createElement("div", { className: "mx-auto w-full max-w-[850px] px-4" }, children))));
|
|
186
|
+
});
|
|
187
|
+
ChatInputRoot.displayName = "ChatInput.Root";
|
|
188
|
+
/** Render the composer. */
|
|
189
|
+
const ChatInputBase = React.forwardRef(function ChatInput({ input, onChange, onSubmit, isLoading = false, placeholder = "Type a message...", theme, stop, onVoice, isListening = false, transcript, models, model, onModelChange, toolbarStart, onAttach, onSelectAttachment, onDrop, attachAccept, attachments, onRemoveAttachment, showExport = false, messages, icons, onAttachClick, onExportClick, className, children, }, ref) {
|
|
190
|
+
// Return focus to the editor after attaching (menu pick or drop) so the
|
|
191
|
+
// user can keep typing without clicking back into the field.
|
|
192
|
+
const fieldContainerRef = React.useRef(null);
|
|
193
|
+
const focusField = React.useCallback(() => {
|
|
194
|
+
fieldContainerRef.current?.querySelector("textarea")?.focus();
|
|
195
|
+
}, []);
|
|
196
|
+
const withFocus = React.useCallback((fn) => fn
|
|
197
|
+
? (files) => {
|
|
198
|
+
fn(files);
|
|
199
|
+
focusField();
|
|
200
|
+
}
|
|
201
|
+
: undefined, [focusField]);
|
|
202
|
+
const handleAttach = withFocus(onAttach);
|
|
203
|
+
const { isDragActive, dragProps } = useDropZone(withFocus(onDrop ?? onAttach));
|
|
204
|
+
const ctxValue = useComposerValue({
|
|
205
|
+
input,
|
|
206
|
+
onChange,
|
|
207
|
+
onSubmit,
|
|
208
|
+
isLoading,
|
|
209
|
+
stop,
|
|
210
|
+
onVoice,
|
|
211
|
+
isListening,
|
|
212
|
+
transcript,
|
|
213
|
+
models,
|
|
214
|
+
model,
|
|
215
|
+
onModelChange,
|
|
216
|
+
onAttach: handleAttach,
|
|
217
|
+
onSelectAttachment,
|
|
218
|
+
attachAccept,
|
|
219
|
+
attachments,
|
|
220
|
+
onRemoveAttachment,
|
|
221
|
+
});
|
|
222
|
+
const exportDownload = () => {
|
|
223
|
+
if (messages)
|
|
224
|
+
downloadMarkdown(messages);
|
|
225
|
+
};
|
|
226
|
+
return (React.createElement(ComposerContextProvider, { value: ctxValue },
|
|
227
|
+
React.createElement("div", { ref: ref, className: cn("flex-shrink-0 pb-6", className) },
|
|
228
|
+
React.createElement("div", { className: "mx-auto w-full max-w-[850px] px-4" },
|
|
229
|
+
React.Children.toArray(children).length > 0 && (React.createElement("div", { className: "flex flex-wrap items-center gap-1.5 pb-3" }, children)),
|
|
230
|
+
attachments && attachments.length > 0 && (React.createElement("div", { className: "flex flex-wrap items-center gap-2 pb-4" }, attachments.map((file) => (React.createElement(AttachmentPill, { key: file.id, attachment: file, onRemove: onRemoveAttachment, className: "w-[200px]" }))))),
|
|
231
|
+
React.createElement("form", { onSubmit: (e) => {
|
|
232
|
+
e.preventDefault();
|
|
233
|
+
onSubmit?.(e);
|
|
234
|
+
} },
|
|
235
|
+
React.createElement("div", { ...dragProps, ref: fieldContainerRef, className: cn("relative overflow-hidden rounded-[var(--radius-lg)] border border-transparent bg-[var(--secondary)] px-3 py-2 shadow-sm transition-all md:px-4 md:py-3", isDragActive && "border-dashed border-[var(--edge-medium)]") },
|
|
236
|
+
React.createElement(DropZoneOverlay, { visible: isDragActive }),
|
|
237
|
+
React.createElement(ChatInputField, { placeholder: placeholder, className: theme?.input }),
|
|
238
|
+
React.createElement("div", { className: "mt-2.5 flex min-h-[44px] items-center justify-between gap-1.5 md:gap-2" },
|
|
239
|
+
React.createElement("div", { className: "flex min-w-0 items-center gap-1.5 md:gap-2" },
|
|
240
|
+
React.createElement(ChatInputAttach, { icon: icons?.attach, onClick: onAttachClick }),
|
|
241
|
+
toolbarStart),
|
|
242
|
+
React.createElement("div", { className: "flex shrink-0 items-center gap-1.5 md:gap-2" },
|
|
243
|
+
React.createElement(ChatInputModel, null),
|
|
244
|
+
showExport && messages && messages.length > 0 && (React.createElement(IconButton, { type: "button", variant: "icon-ghost", size: "icon-lg", on: "card", onClick: (e) => onExportClick ? onExportClick(e, exportDownload) : exportDownload(), "aria-label": "Export conversation", tooltip: "Export as Markdown", tooltipSide: "top", className: "shrink-0" }, icons?.export ?? React.createElement(ExportGlyph, null))),
|
|
245
|
+
React.createElement(ChatInputStop, { icon: icons?.stop }),
|
|
246
|
+
React.createElement(ChatInputVoice, { icon: icons?.voice }),
|
|
247
|
+
React.createElement(ChatInputSend, { icon: icons?.send, className: theme?.button })))))))));
|
|
248
|
+
});
|
|
249
|
+
ChatInputBase.displayName = "ChatInput";
|
|
250
|
+
/**
|
|
251
|
+
* ChatInput — render `<ChatInput … />` for the default composer, or compose
|
|
252
|
+
* `ChatInput.Field` + `ChatInput.Send`/`Stop`/`Voice`/`Model`/`Attach`.
|
|
253
|
+
*/
|
|
254
|
+
export const ChatInput = Object.assign(ChatInputBase, {
|
|
255
|
+
Root: ChatInputRoot,
|
|
256
|
+
Field: ChatInputField,
|
|
257
|
+
Send: ChatInputSend,
|
|
258
|
+
Stop: ChatInputStop,
|
|
259
|
+
Voice: ChatInputVoice,
|
|
260
|
+
Model: ChatInputModel,
|
|
261
|
+
Attach: ChatInputAttach,
|
|
71
262
|
});
|
|
72
|
-
ChatComposer.displayName = "ChatComposer";
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ChatEmptyState — the conversation idle / empty view: an agent avatar, a
|
|
3
|
+
* heading, and a row of suggestion chips. Ported 1:1 from Veryfront Studio's
|
|
4
|
+
* `ChatIdleView` family (`ChatIdleView` + `…Avatar` + `…Heading` +
|
|
5
|
+
* `Suggestions`/`SuggestionItem`), restyled onto the chat primitives.
|
|
6
|
+
*
|
|
7
|
+
* Composed via children — every part is a small, focused piece you arrange
|
|
8
|
+
* yourself, so there is no monolithic prop surface:
|
|
9
|
+
*
|
|
10
|
+
* ```tsx
|
|
11
|
+
* <ChatEmptyState.Root>
|
|
12
|
+
* <ChatEmptyState.Avatar src={agent.avatarUrl} alt={agent.name} />
|
|
13
|
+
* <ChatEmptyState.Heading>{agent.name}</ChatEmptyState.Heading>
|
|
14
|
+
* <ChatEmptyState.Suggestions>
|
|
15
|
+
* <ChatEmptyState.Suggestion onClick={() => send("Create a plan")}>
|
|
16
|
+
* Create a plan
|
|
17
|
+
* </ChatEmptyState.Suggestion>
|
|
18
|
+
* </ChatEmptyState.Suggestions>
|
|
19
|
+
* </ChatEmptyState.Root>
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* @module react/components/chat/composition/chat-empty-state
|
|
23
|
+
*/
|
|
24
|
+
import * as React from "../../../../../../react/react.js";
|
|
25
|
+
import { type ButtonProps } from "../../ui/index.js";
|
|
26
|
+
/** Props accepted by `<ChatEmptyState.Root>`. */
|
|
27
|
+
export interface ChatEmptyStateRootProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
28
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
29
|
+
}
|
|
30
|
+
/** Centered container for the empty-state pieces. */
|
|
31
|
+
declare function Root({ className, children, ref, ...props }: ChatEmptyStateRootProps): React.ReactElement;
|
|
32
|
+
/** Props accepted by `<ChatEmptyState.Avatar>`. */
|
|
33
|
+
export interface ChatEmptyStateAvatarProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
|
|
34
|
+
src?: string;
|
|
35
|
+
alt?: string;
|
|
36
|
+
/** Pulse while the agent is being provisioned. */
|
|
37
|
+
isCreating?: boolean;
|
|
38
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Hero agent avatar (64px). Renders the generic {@link Avatar} in `muted`
|
|
42
|
+
* tone — the agent's image when `src` resolves, otherwise its initial. Same as
|
|
43
|
+
* Studio's `ChatIdleView` avatar: agent identity comes from the data, not a
|
|
44
|
+
* bespoke component.
|
|
45
|
+
*/
|
|
46
|
+
declare function EmptyStateAvatar({ className, isCreating, src, alt, ...props }: ChatEmptyStateAvatarProps): React.ReactElement;
|
|
47
|
+
/** Props accepted by `<ChatEmptyState.Heading>`. */
|
|
48
|
+
export interface ChatEmptyStateHeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {
|
|
49
|
+
/** Heading level, `1`–`6`. Defaults to `2`. */
|
|
50
|
+
level?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
51
|
+
ref?: React.Ref<HTMLHeadingElement>;
|
|
52
|
+
}
|
|
53
|
+
/** Balanced, centered title (e.g. the agent name). */
|
|
54
|
+
declare function Heading({ level, className, children, ref, ...props }: ChatEmptyStateHeadingProps): React.ReactElement;
|
|
55
|
+
/** Props accepted by `<ChatEmptyState.Suggestions>`. */
|
|
56
|
+
export interface ChatEmptyStateSuggestionsProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
57
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
58
|
+
}
|
|
59
|
+
/** Wrapping, centered row of suggestion chips. */
|
|
60
|
+
declare function Suggestions({ className, role, children, ref, ...props }: ChatEmptyStateSuggestionsProps): React.ReactElement;
|
|
61
|
+
/** Props accepted by `<ChatEmptyState.Suggestion>`. */
|
|
62
|
+
export interface ChatEmptyStateSuggestionProps extends Omit<ButtonProps, "variant"> {
|
|
63
|
+
}
|
|
64
|
+
/** A single filled suggestion chip. */
|
|
65
|
+
declare function Suggestion({ className, size, children, ...props }: ChatEmptyStateSuggestionProps): React.ReactElement;
|
|
66
|
+
/**
|
|
67
|
+
* Compound empty state. Use the namespaced parts to compose the view:
|
|
68
|
+
* `Root`, `Avatar`, `Heading`, `Suggestions`, `Suggestion`.
|
|
69
|
+
*/
|
|
70
|
+
export declare const ChatEmptyState: {
|
|
71
|
+
Root: typeof Root;
|
|
72
|
+
Avatar: typeof EmptyStateAvatar;
|
|
73
|
+
Heading: typeof Heading;
|
|
74
|
+
Suggestions: typeof Suggestions;
|
|
75
|
+
Suggestion: typeof Suggestion;
|
|
76
|
+
};
|
|
77
|
+
export {};
|
|
78
|
+
//# sourceMappingURL=chat-empty-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-empty-state.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/composition/chat-empty-state.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,KAAK,KAAK,MAAM,kCAAkC,CAAC;AAE1D,OAAO,EAAkB,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErE,iDAAiD;AACjD,MAAM,WAAW,uBAAwB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACnF,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;CACjC;AAED,qDAAqD;AACrD,iBAAS,IAAI,CAAC,EACZ,SAAS,EACT,QAAQ,EACR,GAAG,EACH,GAAG,KAAK,EACT,EAAE,uBAAuB,GAAG,KAAK,CAAC,YAAY,CAa9C;AAED,mDAAmD;AACnD,MAAM,WAAW,yBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC;IAC9D,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,kDAAkD;IAClD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;CACjC;AAED;;;;;GAKG;AACH,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,UAAU,EACV,GAAG,EACH,GAAuB,EACvB,GAAG,KAAK,EACT,EAAE,yBAAyB,GAAG,KAAK,CAAC,YAAY,CAUhD;AAED,oDAAoD;AACpD,MAAM,WAAW,0BAA2B,SAAQ,KAAK,CAAC,cAAc,CAAC,kBAAkB,CAAC;IAC1F,+CAA+C;IAC/C,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC9B,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;CACrC;AAED,sDAAsD;AACtD,iBAAS,OAAO,CAAC,EACf,KAAS,EACT,SAAS,EACT,QAAQ,EACR,GAAG,EACH,GAAG,KAAK,EACT,EAAE,0BAA0B,GAAG,KAAK,CAAC,YAAY,CAcjD;AAED,wDAAwD;AACxD,MAAM,WAAW,8BAA+B,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC1F,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;CACjC;AAED,kDAAkD;AAClD,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,IAAc,EACd,QAAQ,EACR,GAAG,EACH,GAAG,KAAK,EACT,EAAE,8BAA8B,GAAG,KAAK,CAAC,YAAY,CAWrD;AAED,uDAAuD;AACvD,MAAM,WAAW,6BAA8B,SAAQ,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC;CAAG;AAEtF,uCAAuC;AACvC,iBAAS,UAAU,CAAC,EAClB,SAAS,EACT,IAAW,EACX,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,6BAA6B,GAAG,KAAK,CAAC,YAAY,CAWpD;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc;;;;;;CAM1B,CAAC"}
|