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,110 +0,0 @@
|
|
|
1
|
-
import * as React from "../../../../react/react.js";
|
|
2
|
-
import { type ChatProps } from "./chat/index.js";
|
|
3
|
-
type ChatMessageSetter = (messages: ChatProps["messages"]) => void;
|
|
4
|
-
type TabChangeHandler = NonNullable<ChatProps["onTabChange"]>;
|
|
5
|
-
/** Public API contract for chat with sidebar chat controller. */
|
|
6
|
-
export interface ChatWithSidebarChatController {
|
|
7
|
-
messages: ChatProps["messages"];
|
|
8
|
-
input: ChatProps["input"];
|
|
9
|
-
onChange: ChatProps["onChange"];
|
|
10
|
-
onSubmit?: ChatProps["onSubmit"];
|
|
11
|
-
stop?: ChatProps["stop"];
|
|
12
|
-
reload?: ChatProps["reload"];
|
|
13
|
-
setInput?: ChatProps["setInput"];
|
|
14
|
-
isLoading?: ChatProps["isLoading"];
|
|
15
|
-
error?: ChatProps["error"];
|
|
16
|
-
model?: ChatProps["model"];
|
|
17
|
-
activeModel?: ChatProps["activeModel"];
|
|
18
|
-
onModelChange?: ChatProps["onModelChange"];
|
|
19
|
-
inferenceMode?: ChatProps["inferenceMode"];
|
|
20
|
-
editMessage?: ChatProps["editMessage"];
|
|
21
|
-
getBranches?: ChatProps["getBranches"];
|
|
22
|
-
switchBranch?: ChatProps["switchBranch"];
|
|
23
|
-
setMessages: ChatMessageSetter;
|
|
24
|
-
}
|
|
25
|
-
interface ChatWithSidebarSidebarBaseConfig {
|
|
26
|
-
storageKey?: string;
|
|
27
|
-
visible?: boolean;
|
|
28
|
-
}
|
|
29
|
-
/** Configuration used by chat with sidebar sidebar. */
|
|
30
|
-
export type ChatWithSidebarSidebarConfig = (ChatWithSidebarSidebarBaseConfig & {
|
|
31
|
-
open: boolean;
|
|
32
|
-
onToggle: () => void;
|
|
33
|
-
}) | (ChatWithSidebarSidebarBaseConfig & {
|
|
34
|
-
open?: undefined;
|
|
35
|
-
onToggle?: () => void;
|
|
36
|
-
});
|
|
37
|
-
/** Configuration used by chat with sidebar model. */
|
|
38
|
-
export interface ChatWithSidebarModelConfig {
|
|
39
|
-
options?: ChatProps["models"];
|
|
40
|
-
}
|
|
41
|
-
/** Configuration used by chat with sidebar attachment. */
|
|
42
|
-
export interface ChatWithSidebarAttachmentConfig {
|
|
43
|
-
accept?: ChatProps["attachAccept"];
|
|
44
|
-
items?: ChatProps["attachments"];
|
|
45
|
-
uploads?: ChatProps["uploads"];
|
|
46
|
-
onAttach?: ChatProps["onAttach"];
|
|
47
|
-
onDrop?: ChatProps["onDrop"];
|
|
48
|
-
onRemoveItem?: ChatProps["onRemoveAttachment"];
|
|
49
|
-
onRemoveUpload?: ChatProps["onRemoveUpload"];
|
|
50
|
-
}
|
|
51
|
-
/** Configuration used by chat with sidebar quick actions. */
|
|
52
|
-
export interface ChatWithSidebarQuickActionsConfig {
|
|
53
|
-
suggestions?: ChatProps["suggestions"];
|
|
54
|
-
onSuggestionClick?: ChatProps["onSuggestionClick"];
|
|
55
|
-
actions?: ChatProps["quickActions"];
|
|
56
|
-
onAction?: ChatProps["onQuickAction"];
|
|
57
|
-
}
|
|
58
|
-
/** Configuration used by chat with sidebar message. */
|
|
59
|
-
export interface ChatWithSidebarMessageConfig {
|
|
60
|
-
render?: ChatProps["renderMessage"];
|
|
61
|
-
renderTool?: ChatProps["renderTool"];
|
|
62
|
-
onFeedback?: ChatProps["onFeedback"];
|
|
63
|
-
onSourceClick?: ChatProps["onSourceClick"];
|
|
64
|
-
}
|
|
65
|
-
/** Configuration used by chat with sidebar feature. */
|
|
66
|
-
export interface ChatWithSidebarFeatureConfig {
|
|
67
|
-
steps?: ChatProps["showSteps"];
|
|
68
|
-
tabs?: ChatProps["showTabs"];
|
|
69
|
-
sources?: ChatProps["showSources"];
|
|
70
|
-
export?: ChatProps["showExport"];
|
|
71
|
-
scrollButton?: ChatProps["showScrollButton"];
|
|
72
|
-
messageActions?: ChatProps["showMessageActions"];
|
|
73
|
-
}
|
|
74
|
-
/** Configuration used by chat with sidebar tabs. */
|
|
75
|
-
export type ChatWithSidebarTabsConfig = {
|
|
76
|
-
active: ChatProps["activeTab"];
|
|
77
|
-
onChange: TabChangeHandler;
|
|
78
|
-
} | {
|
|
79
|
-
active?: undefined;
|
|
80
|
-
onChange?: TabChangeHandler;
|
|
81
|
-
};
|
|
82
|
-
/** Configuration used by chat with sidebar voice. */
|
|
83
|
-
export interface ChatWithSidebarVoiceConfig {
|
|
84
|
-
enabled?: ChatProps["enableVoice"];
|
|
85
|
-
onVoice?: ChatProps["onVoice"];
|
|
86
|
-
}
|
|
87
|
-
/** Props accepted by chat with sidebar grouped. */
|
|
88
|
-
export interface ChatWithSidebarGroupedProps {
|
|
89
|
-
chat: ChatWithSidebarChatController;
|
|
90
|
-
sidebar?: ChatWithSidebarSidebarConfig;
|
|
91
|
-
models?: ChatWithSidebarModelConfig;
|
|
92
|
-
attachments?: ChatWithSidebarAttachmentConfig;
|
|
93
|
-
quickActions?: ChatWithSidebarQuickActionsConfig;
|
|
94
|
-
message?: ChatWithSidebarMessageConfig;
|
|
95
|
-
features?: ChatWithSidebarFeatureConfig;
|
|
96
|
-
tabs?: ChatWithSidebarTabsConfig;
|
|
97
|
-
voice?: ChatWithSidebarVoiceConfig;
|
|
98
|
-
className?: string;
|
|
99
|
-
maxHeight?: ChatProps["maxHeight"];
|
|
100
|
-
theme?: ChatProps["theme"];
|
|
101
|
-
placeholder?: ChatProps["placeholder"];
|
|
102
|
-
emptyState?: ChatProps["emptyState"];
|
|
103
|
-
children?: ChatProps["children"];
|
|
104
|
-
}
|
|
105
|
-
/** Props accepted by chat with sidebar. */
|
|
106
|
-
export type ChatWithSidebarProps = ChatWithSidebarGroupedProps;
|
|
107
|
-
/** Render chat with sidebar. */
|
|
108
|
-
export declare const ChatWithSidebar: React.ForwardRefExoticComponent<ChatWithSidebarGroupedProps & React.RefAttributes<HTMLDivElement>>;
|
|
109
|
-
export {};
|
|
110
|
-
//# sourceMappingURL=chat-with-sidebar.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chat-with-sidebar.d.ts","sourceRoot":"","sources":["../../../../../src/src/react/components/chat/chat-with-sidebar.tsx"],"names":[],"mappings":"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"}
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
import * as React from "../../../../react/react.js";
|
|
2
|
-
import { getDocumentNonce } from "./csp-nonce.js";
|
|
3
|
-
import { cn, generateTokenCSS } from "./theme.js";
|
|
4
|
-
import { Chat } from "./chat/index.js";
|
|
5
|
-
import { ChatSidebar } from "./chat/components/sidebar.js";
|
|
6
|
-
import { TabSwitcher } from "./chat/components/tab-switcher.js";
|
|
7
|
-
import { useThreads } from "./chat/hooks/use-threads.js";
|
|
8
|
-
import { PanelLeftIcon } from "./icons/index.js";
|
|
9
|
-
/** Render chat with sidebar. */
|
|
10
|
-
export const ChatWithSidebar = React.forwardRef(function ChatWithSidebar({ chat, sidebar, models, attachments, quickActions, message, features, tabs, voice, className, maxHeight, theme, placeholder, emptyState, children, }, ref) {
|
|
11
|
-
const nonce = getDocumentNonce();
|
|
12
|
-
const storageKey = sidebar?.storageKey;
|
|
13
|
-
const controlledOpen = sidebar?.open;
|
|
14
|
-
const onSidebarToggle = sidebar?.onToggle;
|
|
15
|
-
const showSidebar = sidebar?.visible ?? true;
|
|
16
|
-
const setMessages = chat.setMessages;
|
|
17
|
-
const messages = chat.messages;
|
|
18
|
-
const model = chat.model;
|
|
19
|
-
const onModelChange = chat.onModelChange;
|
|
20
|
-
const controlledTab = tabs?.active;
|
|
21
|
-
const chatProps = {
|
|
22
|
-
input: chat.input,
|
|
23
|
-
onChange: chat.onChange,
|
|
24
|
-
onSubmit: chat.onSubmit,
|
|
25
|
-
stop: chat.stop,
|
|
26
|
-
reload: chat.reload,
|
|
27
|
-
setInput: chat.setInput,
|
|
28
|
-
isLoading: chat.isLoading,
|
|
29
|
-
error: chat.error,
|
|
30
|
-
placeholder,
|
|
31
|
-
maxHeight,
|
|
32
|
-
theme,
|
|
33
|
-
renderMessage: message?.render,
|
|
34
|
-
renderTool: message?.renderTool,
|
|
35
|
-
suggestions: quickActions?.suggestions,
|
|
36
|
-
onSuggestionClick: quickActions?.onSuggestionClick,
|
|
37
|
-
emptyState,
|
|
38
|
-
showScrollButton: features?.scrollButton,
|
|
39
|
-
showMessageActions: features?.messageActions,
|
|
40
|
-
models: models?.options,
|
|
41
|
-
activeModel: chat.activeModel,
|
|
42
|
-
inferenceMode: chat.inferenceMode,
|
|
43
|
-
showSources: features?.sources,
|
|
44
|
-
onSourceClick: message?.onSourceClick,
|
|
45
|
-
onAttach: attachments?.onAttach,
|
|
46
|
-
onDrop: attachments?.onDrop,
|
|
47
|
-
attachAccept: attachments?.accept,
|
|
48
|
-
attachments: attachments?.items,
|
|
49
|
-
onRemoveAttachment: attachments?.onRemoveItem,
|
|
50
|
-
showExport: features?.export,
|
|
51
|
-
onFeedback: message?.onFeedback,
|
|
52
|
-
editMessage: chat.editMessage,
|
|
53
|
-
getBranches: chat.getBranches,
|
|
54
|
-
switchBranch: chat.switchBranch,
|
|
55
|
-
showSteps: features?.steps,
|
|
56
|
-
showTabs: features?.tabs,
|
|
57
|
-
uploads: attachments?.uploads,
|
|
58
|
-
onRemoveUpload: attachments?.onRemoveUpload,
|
|
59
|
-
quickActions: quickActions?.actions,
|
|
60
|
-
onQuickAction: quickActions?.onAction,
|
|
61
|
-
enableVoice: voice?.enabled,
|
|
62
|
-
onVoice: voice?.onVoice,
|
|
63
|
-
children,
|
|
64
|
-
};
|
|
65
|
-
const { activeThreadId, createThread, deleteThread, renameThread, selectThread, threads, updateThread, } = useThreads({ storageKey });
|
|
66
|
-
const [internalOpen, setInternalOpen] = React.useState(false);
|
|
67
|
-
const [internalTab, setInternalTab] = React.useState("chat");
|
|
68
|
-
const showTabs = chatProps.showTabs ?? false;
|
|
69
|
-
const isSidebarControlled = controlledOpen !== undefined;
|
|
70
|
-
const sidebarOpen = isSidebarControlled ? controlledOpen : internalOpen;
|
|
71
|
-
const toggleSidebar = React.useCallback(() => {
|
|
72
|
-
if (isSidebarControlled) {
|
|
73
|
-
onSidebarToggle?.();
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
setInternalOpen((prev) => {
|
|
77
|
-
const next = !prev;
|
|
78
|
-
onSidebarToggle?.();
|
|
79
|
-
return next;
|
|
80
|
-
});
|
|
81
|
-
}, [isSidebarControlled, onSidebarToggle]);
|
|
82
|
-
const isTabControlled = controlledTab !== undefined;
|
|
83
|
-
const activeTab = controlledTab ?? internalTab;
|
|
84
|
-
const handleTabChange = React.useCallback((tab) => {
|
|
85
|
-
if (!isTabControlled) {
|
|
86
|
-
setInternalTab(tab);
|
|
87
|
-
}
|
|
88
|
-
tabs?.onChange?.(tab);
|
|
89
|
-
}, [isTabControlled, tabs]);
|
|
90
|
-
// Keep refs in sync so callbacks always read current values
|
|
91
|
-
const activeIdRef = React.useRef(activeThreadId);
|
|
92
|
-
activeIdRef.current = activeThreadId;
|
|
93
|
-
const messagesRef = React.useRef(messages);
|
|
94
|
-
messagesRef.current = messages;
|
|
95
|
-
const threadsRef = React.useRef(threads);
|
|
96
|
-
threadsRef.current = threads;
|
|
97
|
-
// Sync current messages to active thread on change
|
|
98
|
-
const prevMessagesRef = React.useRef(messages);
|
|
99
|
-
React.useEffect(() => {
|
|
100
|
-
const currentActiveId = activeIdRef.current;
|
|
101
|
-
if (!currentActiveId || messages === prevMessagesRef.current)
|
|
102
|
-
return;
|
|
103
|
-
prevMessagesRef.current = messages;
|
|
104
|
-
if (messages.length > 0) {
|
|
105
|
-
// Auto-title from first user message — combine with message sync
|
|
106
|
-
// into a single updateThread call to avoid racing setThreads batches
|
|
107
|
-
const activeThread = threadsRef.current.find((t) => t.id === currentActiveId);
|
|
108
|
-
let title;
|
|
109
|
-
if (activeThread?.title === "New Chat") {
|
|
110
|
-
const firstUserMsg = messages.find((m) => m.role === "user");
|
|
111
|
-
if (firstUserMsg) {
|
|
112
|
-
const text = firstUserMsg.parts
|
|
113
|
-
.filter((p) => p.type === "text")
|
|
114
|
-
.map((p) => p.text)
|
|
115
|
-
.join("")
|
|
116
|
-
.trim();
|
|
117
|
-
if (text)
|
|
118
|
-
title = text.slice(0, 30);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
updateThread(currentActiveId, title ? { messages, title } : { messages });
|
|
122
|
-
}
|
|
123
|
-
}, [messages, updateThread]);
|
|
124
|
-
const setInput = chat.setInput;
|
|
125
|
-
const stopChat = chat.stop;
|
|
126
|
-
const handleSelectThread = React.useCallback((id) => {
|
|
127
|
-
stopChat?.();
|
|
128
|
-
const currentActiveId = activeIdRef.current;
|
|
129
|
-
if (currentActiveId && messagesRef.current.length > 0) {
|
|
130
|
-
updateThread(currentActiveId, { messages: messagesRef.current });
|
|
131
|
-
}
|
|
132
|
-
selectThread(id);
|
|
133
|
-
const thread = threadsRef.current.find((t) => t.id === id);
|
|
134
|
-
setMessages(thread?.messages ?? []);
|
|
135
|
-
setInput?.("");
|
|
136
|
-
}, [selectThread, updateThread, setMessages, setInput, stopChat]);
|
|
137
|
-
const handleNewThread = React.useCallback(() => {
|
|
138
|
-
stopChat?.();
|
|
139
|
-
const currentActiveId = activeIdRef.current;
|
|
140
|
-
if (currentActiveId && messagesRef.current.length > 0) {
|
|
141
|
-
updateThread(currentActiveId, { messages: messagesRef.current });
|
|
142
|
-
}
|
|
143
|
-
const nextThread = createThread();
|
|
144
|
-
setMessages(nextThread.messages);
|
|
145
|
-
setInput?.("");
|
|
146
|
-
}, [createThread, updateThread, setMessages, setInput, stopChat]);
|
|
147
|
-
if (!showSidebar) {
|
|
148
|
-
return (React.createElement(Chat, { ref: ref, messages: messages, model: model, onModelChange: onModelChange, className: className, ...chatProps }));
|
|
149
|
-
}
|
|
150
|
-
const tokenCSS = React.useMemo(() => generateTokenCSS(), []);
|
|
151
|
-
return (React.createElement("div", { ref: ref, className: cn("flex h-full bg-[var(--background)]", className), "data-vf-chat": "" },
|
|
152
|
-
React.createElement("style", { nonce: nonce, dangerouslySetInnerHTML: { __html: tokenCSS } }),
|
|
153
|
-
sidebarOpen && (React.createElement(ChatSidebar, { threads: threads, activeThreadId: activeThreadId, onSelectThread: handleSelectThread, onDeleteThread: (id) => {
|
|
154
|
-
deleteThread(id);
|
|
155
|
-
const next = threadsRef.current.find((t) => t.id !== id);
|
|
156
|
-
setMessages(next?.messages ?? []);
|
|
157
|
-
}, onRenameThread: renameThread, onNewThread: handleNewThread })),
|
|
158
|
-
React.createElement("div", { className: "flex-1 min-w-0 flex flex-col" },
|
|
159
|
-
React.createElement("div", { className: "flex items-center px-3 pt-4 pb-1 shrink-0" },
|
|
160
|
-
React.createElement("button", { type: "button", onClick: toggleSidebar, className: "size-8 inline-flex items-center justify-center rounded-full text-[var(--muted-foreground)] hover:text-[var(--foreground)] hover:bg-[var(--foreground)]/5 transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2", "aria-label": sidebarOpen ? "Close sidebar" : "Open sidebar" },
|
|
161
|
-
React.createElement(PanelLeftIcon, { className: "size-[18px]" })),
|
|
162
|
-
showTabs && (React.createElement("div", { className: "flex-1 flex justify-center" },
|
|
163
|
-
React.createElement(TabSwitcher, { activeTab: activeTab, onTabChange: handleTabChange, className: "py-0" }))),
|
|
164
|
-
showTabs && React.createElement("div", { className: "size-8 shrink-0" })),
|
|
165
|
-
React.createElement(Chat, { messages: messages, model: model, onModelChange: onModelChange, className: "flex-1 min-h-0", activeTab: activeTab, onTabChange: handleTabChange, hideTabSwitcher: true, ...chatProps }))));
|
|
166
|
-
});
|
|
167
|
-
ChatWithSidebar.displayName = "ChatWithSidebar";
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import * as React from "../../../../react/react.js";
|
|
2
|
-
import type { ChatMessage, ChatMessagePart, ChatToolPart } from "../../../agent/react/index.js";
|
|
3
|
-
import { type ChatTheme } from "./theme.js";
|
|
4
|
-
/** Props accepted by message. */
|
|
5
|
-
export interface MessageProps {
|
|
6
|
-
/** Message to display */
|
|
7
|
-
message: ChatMessage;
|
|
8
|
-
/** Additional class name */
|
|
9
|
-
className?: string;
|
|
10
|
-
/** Theme customization */
|
|
11
|
-
theme?: Partial<ChatTheme>;
|
|
12
|
-
/** Show role label */
|
|
13
|
-
showRole?: boolean;
|
|
14
|
-
/** Show timestamp */
|
|
15
|
-
showTimestamp?: boolean;
|
|
16
|
-
/** Custom renderer for tool calls (matches tool-${toolName} pattern) */
|
|
17
|
-
renderToolCall?: (part: ChatToolPart) => React.ReactNode;
|
|
18
|
-
/** Custom renderer for dynamic tools */
|
|
19
|
-
renderDynamicTool?: (part: Extract<ChatMessagePart, {
|
|
20
|
-
type: "dynamic-tool";
|
|
21
|
-
}>) => React.ReactNode;
|
|
22
|
-
/** Custom renderer for reasoning */
|
|
23
|
-
renderReasoning?: (part: Extract<ChatMessagePart, {
|
|
24
|
-
type: "reasoning";
|
|
25
|
-
}>) => React.ReactNode;
|
|
26
|
-
}
|
|
27
|
-
/** Render a standalone chat message. */
|
|
28
|
-
export declare const Message: React.ForwardRefExoticComponent<MessageProps & React.RefAttributes<HTMLDivElement>>;
|
|
29
|
-
/** Props accepted by streaming message. */
|
|
30
|
-
export interface StreamingMessageProps {
|
|
31
|
-
/** Streaming message parts */
|
|
32
|
-
parts: ChatMessagePart[];
|
|
33
|
-
/** Show typing cursor */
|
|
34
|
-
showCursor?: boolean;
|
|
35
|
-
/** Additional class name */
|
|
36
|
-
className?: string;
|
|
37
|
-
/** Theme customization */
|
|
38
|
-
theme?: Partial<ChatTheme>;
|
|
39
|
-
}
|
|
40
|
-
/** Message shape for streaming. */
|
|
41
|
-
export declare const StreamingMessage: React.ForwardRefExoticComponent<StreamingMessageProps & React.RefAttributes<HTMLDivElement>>;
|
|
42
|
-
//# sourceMappingURL=message.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../../../src/src/react/components/chat/message.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,4BAA4B,CAAC;AAEpD,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAChG,OAAO,EAAE,KAAK,SAAS,EAAqC,MAAM,YAAY,CAAC;AAE/E,iCAAiC;AACjC,MAAM,WAAW,YAAY;IAC3B,yBAAyB;IACzB,OAAO,EAAE,WAAW,CAAC;IAErB,4BAA4B;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,0BAA0B;IAC1B,KAAK,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IAE3B,sBAAsB;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,qBAAqB;IACrB,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB,wEAAwE;IACxE,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,KAAK,CAAC,SAAS,CAAC;IAEzD,wCAAwC;IACxC,iBAAiB,CAAC,EAAE,CAClB,IAAI,EAAE,OAAO,CAAC,eAAe,EAAE;QAAE,IAAI,EAAE,cAAc,CAAA;KAAE,CAAC,KACrD,KAAK,CAAC,SAAS,CAAC;IAErB,oCAAoC;IACpC,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,eAAe,EAAE;QAAE,IAAI,EAAE,WAAW,CAAA;KAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;CAC9F;AAYD,wCAAwC;AACxC,eAAO,MAAM,OAAO,qFAqFlB,CAAC;AAIH,2CAA2C;AAC3C,MAAM,WAAW,qBAAqB;IACpC,8BAA8B;IAC9B,KAAK,EAAE,eAAe,EAAE,CAAC;IAEzB,yBAAyB;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,4BAA4B;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,0BAA0B;IAC1B,KAAK,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;CAC5B;AAED,mCAAmC;AACnC,eAAO,MAAM,gBAAgB,8FAgB5B,CAAC"}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import * as React from "../../../../react/react.js";
|
|
2
|
-
import { MessageContent, MessageItem, MessageRole } from "../../primitives/index.js";
|
|
3
|
-
import { cn, defaultChatTheme, mergeThemes } from "./theme.js";
|
|
4
|
-
function getTextFromParts(parts) {
|
|
5
|
-
return parts
|
|
6
|
-
.filter((p) => p.type === "text")
|
|
7
|
-
.map((p) => p.text)
|
|
8
|
-
.join("");
|
|
9
|
-
}
|
|
10
|
-
function isToolPart(part) {
|
|
11
|
-
return part.type.startsWith("tool-") && "toolCallId" in part;
|
|
12
|
-
}
|
|
13
|
-
/** Render a standalone chat message. */
|
|
14
|
-
export const Message = React.forwardRef(function Message({ message, className, theme: userTheme, showRole = false, showTimestamp = false, renderToolCall, renderDynamicTool, renderReasoning, }, ref) {
|
|
15
|
-
const theme = mergeThemes(defaultChatTheme, userTheme);
|
|
16
|
-
const messageTheme = theme.message?.[message.role] ?? theme.message?.assistant;
|
|
17
|
-
return (React.createElement(MessageItem, { ref: ref, role: message.role, className: cn("flex", message.role === "user" ? "justify-end" : "justify-start", className) },
|
|
18
|
-
React.createElement("div", { className: messageTheme },
|
|
19
|
-
showRole && (React.createElement(MessageRole, { className: "block text-xs font-semibold mb-1 opacity-75 uppercase" }, message.role)),
|
|
20
|
-
message.parts.map((part, index) => {
|
|
21
|
-
const key = `${message.id}-part-${index}`;
|
|
22
|
-
if (part.type === "text") {
|
|
23
|
-
return React.createElement(MessageContent, { key: key }, part.text);
|
|
24
|
-
}
|
|
25
|
-
if (part.type === "reasoning") {
|
|
26
|
-
if (renderReasoning) {
|
|
27
|
-
return React.createElement(React.Fragment, { key: key }, renderReasoning(part));
|
|
28
|
-
}
|
|
29
|
-
return (React.createElement("div", { key: key, className: "text-sm italic opacity-70 my-2 pl-2 border-l-2" }, part.text));
|
|
30
|
-
}
|
|
31
|
-
if (part.type === "dynamic-tool") {
|
|
32
|
-
if (renderDynamicTool) {
|
|
33
|
-
return React.createElement(React.Fragment, { key: key }, renderDynamicTool(part));
|
|
34
|
-
}
|
|
35
|
-
return (React.createElement("div", { key: key, className: "text-xs bg-blue-50 rounded p-2 my-2" },
|
|
36
|
-
React.createElement("span", { className: "font-mono" }, part.toolName),
|
|
37
|
-
React.createElement("span", { className: "ml-2 text-blue-500" },
|
|
38
|
-
"[dynamic: ",
|
|
39
|
-
part.state,
|
|
40
|
-
"]"),
|
|
41
|
-
part.errorText && React.createElement("div", { className: "text-red-600 mt-1" }, part.errorText)));
|
|
42
|
-
}
|
|
43
|
-
if (!isToolPart(part))
|
|
44
|
-
return null;
|
|
45
|
-
if (renderToolCall) {
|
|
46
|
-
return React.createElement(React.Fragment, { key: key }, renderToolCall(part));
|
|
47
|
-
}
|
|
48
|
-
return (React.createElement("div", { key: key, className: "text-xs bg-gray-100 rounded p-2 my-2" },
|
|
49
|
-
React.createElement("span", { className: "font-mono" }, part.toolName),
|
|
50
|
-
React.createElement("span", { className: "ml-2 text-gray-500" },
|
|
51
|
-
"[",
|
|
52
|
-
part.state,
|
|
53
|
-
"]"),
|
|
54
|
-
part.errorText && React.createElement("div", { className: "text-red-600 mt-1" }, part.errorText)));
|
|
55
|
-
}),
|
|
56
|
-
showTimestamp && message.createdAt && (React.createElement("div", { className: "text-xs opacity-60 mt-1" }, new Date(message.createdAt).toLocaleTimeString())))));
|
|
57
|
-
});
|
|
58
|
-
Message.displayName = "Message";
|
|
59
|
-
/** Message shape for streaming. */
|
|
60
|
-
export const StreamingMessage = React.forwardRef(function StreamingMessage({ parts, showCursor = true, className, theme: userTheme }, ref) {
|
|
61
|
-
const theme = mergeThemes(defaultChatTheme, userTheme);
|
|
62
|
-
const textContent = getTextFromParts(parts);
|
|
63
|
-
return (React.createElement(MessageItem, { ref: ref, role: "assistant", className: cn("flex justify-start", className) },
|
|
64
|
-
React.createElement("div", { className: theme.message?.assistant },
|
|
65
|
-
React.createElement(MessageContent, null,
|
|
66
|
-
textContent,
|
|
67
|
-
showCursor && React.createElement("span", { className: "inline-block w-1 h-4 bg-current ml-1 animate-pulse" })))));
|
|
68
|
-
});
|
|
69
|
-
StreamingMessage.displayName = "StreamingMessage";
|