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
|
@@ -2,10 +2,14 @@ export function generateClientId(prefix) {
|
|
|
2
2
|
return `${prefix}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`;
|
|
3
3
|
}
|
|
4
4
|
export function createAssistantMessage(messageId, parts, metadata) {
|
|
5
|
+
// Prefer a server-supplied timestamp (from message metadata); otherwise stamp
|
|
6
|
+
// the client clock so the message header always has a time to render.
|
|
7
|
+
const metaCreatedAt = typeof metadata?.createdAt === "string" ? metadata.createdAt : undefined;
|
|
5
8
|
return {
|
|
6
9
|
id: messageId || generateClientId("msg"),
|
|
7
10
|
role: "assistant",
|
|
8
11
|
parts,
|
|
12
|
+
createdAt: metaCreatedAt ?? new Date().toISOString(),
|
|
9
13
|
...(metadata && Object.keys(metadata).length > 0 ? { metadata } : {}),
|
|
10
14
|
};
|
|
11
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message-adapter.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/runtime/message-adapter.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,kBAAkB,EAEvB,KAAK,oBAAoB,EAE1B,MAAM,qBAAqB,CAAC;AAO7B,KAAK,2BAA2B,GAC5B;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC9B;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,GAC/E;IACA,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE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EACb,gBAAgB,CAAC,EAAE,MAAM,GACxB;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,CAuBlE;AAWD,sCAAsC;AACtC,wBAAgB,oBAAoB,CAAC,IAAI,EAAE;IACzC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;CACjB,GAAG,kBAAkB,CAOrB;AA4OD,2DAA2D;AAC3D,wBAAgB,6CAA6C,CAC3D,QAAQ,EAAE,SAAS,oBAAoB,EAAE,GACxC,mBAAmB,EAAE,CAOvB;AAED,2DAA2D;AAC3D,wBAAgB,6CAA6C,CAC3D,QAAQ,EAAE,aAAa,CACrB,IAAI,CAAC,mBAAmB,EAAE,MAAM,CAAC,GAAG;IAAE,KAAK,EAAE,aAAa,CAAC,2BAA2B,CAAC,CAAA;CAAE,CAC1F,GACA,oBAAoB,EAAE,CAQxB"}
|
|
@@ -27,7 +27,9 @@ function createTextAgentRuntimePart(text) {
|
|
|
27
27
|
function toNativeFilePart(type, part) {
|
|
28
28
|
const url = getOptionalStringField(part, "url");
|
|
29
29
|
const mediaType = getOptionalStringField(part, "mediaType");
|
|
30
|
-
|
|
30
|
+
// `data:` URLs (inline base64) are kept: guest / no-project attachments ride
|
|
31
|
+
// inline so the model sees them without a fetchable upload URL.
|
|
32
|
+
if (!url || !mediaType) {
|
|
31
33
|
return null;
|
|
32
34
|
}
|
|
33
35
|
return type === "file"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-generation-runtime-message-converter.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/runtime/text-generation-runtime-message-converter.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAGV,4BAA4B,EAK7B,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAAsC,KAAK,OAAO,EAAqB,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"text-generation-runtime-message-converter.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/runtime/text-generation-runtime-message-converter.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAGV,4BAA4B,EAK7B,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAAsC,KAAK,OAAO,EAAqB,MAAM,aAAa,CAAC;AA4MlG;;GAEG;AACH,wBAAgB,qCAAqC,CACnD,GAAG,EAAE,OAAO,EACZ,OAAO,GAAE;IAAE,2BAA2B,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAAO,GAC1D,4BAA4B,CA6F9B;AAuHD;;GAEG;AACH,wBAAgB,sCAAsC,CACpD,QAAQ,EAAE,OAAO,EAAE,GAClB,4BAA4B,EAAE,CAyChC;AAED;;;;;;;GAOG;AACH,wBAAgB,6CAA6C,CAC3D,QAAQ,EAAE,OAAO,EAAE,GAClB,4BAA4B,EAAE,CAQhC"}
|
|
@@ -125,7 +125,9 @@ function buildAttachmentContextFromParts(parts) {
|
|
|
125
125
|
mediaType,
|
|
126
126
|
...(uploadId ? { uploadId } : {}),
|
|
127
127
|
...(uploadPath ? { path: uploadPath } : {}),
|
|
128
|
-
|
|
128
|
+
// Never inline a `data:` URL here — it would dump the whole base64 blob
|
|
129
|
+
// into the prompt as text. The bytes ride in the native file part below.
|
|
130
|
+
...(url && !url.startsWith("data:") ? { url } : {}),
|
|
129
131
|
}];
|
|
130
132
|
});
|
|
131
133
|
return refs.length > 0 ? buildDataFileAnnotation(refs) : "";
|
|
@@ -154,7 +156,9 @@ function getUserFileParts(parts) {
|
|
|
154
156
|
return [];
|
|
155
157
|
const mediaType = getStringPartField(part, "mediaType");
|
|
156
158
|
const url = getStringPartField(part, "url");
|
|
157
|
-
|
|
159
|
+
// `data:` URLs (inline base64) are kept so the model receives the bytes as a
|
|
160
|
+
// native image/file part (guest / no-project attachments have no fetchable URL).
|
|
161
|
+
if (!mediaType || !url)
|
|
158
162
|
return [];
|
|
159
163
|
return [{
|
|
160
164
|
type,
|
package/esm/src/chat/index.d.ts
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
* <Chat.Root messages={chat.messages} input={chat.input}>
|
|
31
31
|
* <Chat.Empty title="Ask me anything" />
|
|
32
32
|
* <Chat.MessageList messages={chat.messages} />
|
|
33
|
-
* <Chat.
|
|
33
|
+
* <Chat.Input input={chat.input} onChange={chat.handleInputChange} onSubmit={chat.handleSubmit} />
|
|
34
34
|
* </Chat.Root>
|
|
35
35
|
* );
|
|
36
36
|
* }
|
|
@@ -48,17 +48,27 @@
|
|
|
48
48
|
* ```
|
|
49
49
|
*/
|
|
50
50
|
export { Chat, ChatComponents, type ChatProps } from "../react/components/chat/chat.js";
|
|
51
|
-
export {
|
|
52
|
-
export { ChatContextProvider, type ChatContextValue, ComposerContextProvider, type ComposerContextValue, MessageContextProvider, type MessageContextValue,
|
|
53
|
-
export { type AttachmentInfo,
|
|
54
|
-
export {
|
|
55
|
-
export {
|
|
51
|
+
export { ChatEmpty, type ChatEmptyProps, ChatEmptyState, type ChatEmptyStateAvatarProps, type ChatEmptyStateHeadingProps, type ChatEmptyStateRootProps, type ChatEmptyStateSuggestionProps, type ChatEmptyStateSuggestionsProps, ChatIf, type ChatIfProps, ChatMessageList, type ChatMessageListProps, ChatRoot, type ChatRootProps, ErrorBanner, type ErrorBannerProps, Message, type MessageProps, type MessageRootProps, ModelAvatar, type ModelAvatarProps, } from "../react/components/chat/chat.js";
|
|
52
|
+
export { ChatContextProvider, type ChatContextValue, ComposerContextProvider, type ComposerContextValue, MessageContextProvider, type MessageContextValue, useChatContext, useChatContextOptional, useComposerContext, useComposerContextOptional, useMessageContext, useMessageContextOptional, } from "../react/components/chat/chat.js";
|
|
53
|
+
export { AgentAvatar, type AgentAvatarProps, type AttachmentInfo, AttachmentsPanel, type AttachmentsPanelActionProps, type AttachmentsPanelContextValue, type AttachmentsPanelEmptyProps, type AttachmentsPanelItemProps, type AttachmentsPanelListProps, type AttachmentsPanelLoadingProps, type AttachmentsPanelProps, BranchPicker, type BranchPickerProps, ChatMessagesSkeleton, type ChatMessagesSkeletonProps, ChatSidebar, type ChatSidebarComponent, type ChatSidebarEmptyProps, type ChatSidebarGroupProps, type ChatSidebarIcons, type ChatSidebarItemProps, type ChatSidebarListProps, type ChatSidebarNewButtonProps, type ChatSidebarProps, type ChatSidebarRootProps, type ChatTab, type CodeBlockProps, ConversationEmptyState, type ConversationEmptyStateProps, ConversationScrollButton, type ConversationScrollButtonProps, downloadMarkdown, DropZoneOverlay, type DropZoneOverlayProps, exportAsMarkdown, extractSourcesFromParts, FadeIn, type FeedbackValue, getTextContent, groupPartsInOrder, InferenceBadge, type InferenceBadgeProps, InlineCitation, type InlineCitationProps, isReasoningPart, isSkillToolPart, isToolPart, Loader, MessageActionBar, type MessageActionBarProps, MessageEditForm, type MessageEditFormProps, MessageFeedback, type MessageFeedbackProps, type ModelOption, ModelSelector, type ModelSelectorContentProps, type ModelSelectorContextValue, type ModelSelectorItemProps, type ModelSelectorProps, type ModelSelectorTriggerProps, type PartGroup, type QuickAction, QuickActions, type QuickActionsProps, ReasoningCard, RichCodeBlock, Shimmer, SkillBadge, type SkillBadgeProps, type Source, SourcePill, type SourcePillProps, Sources, type SourcesContextValue, type SourcesListProps, type SourcesProps, StepIndicator, type StepIndicatorContextValue, type StepIndicatorProps, Suggestion, type SuggestionProps, Suggestions, type SuggestionsProps, TabSwitcher, type TabSwitcherProps, ToolCallCard, ToolStatusBadge, type UploadedFile, useAttachmentsPanel, useModelSelector, useSources, useStepIndicator, useStickToBottom, type UseStickToBottomOptions, type UseStickToBottomResult, useUpload, type UseUploadOptions, type UseUploadResult, useUploadsRegistry, type UseUploadsRegistryOptions, type UseUploadsRegistryResult, } from "../react/components/chat/chat.js";
|
|
54
|
+
export { type Conversation, type ConversationPatch, ConversationsContextProvider, ConversationsProvider, type ConversationsProviderProps, type ConversationStore, type ConversationSummary, localConversationStore, memoryConversationStore, type StorageLike, useConversation, type UseConversationOptions, type UseConversationResult, useConversations, useConversationsContext, useConversationsContextOptional, type UseConversationsOptions, type UseConversationsResult, } from "../react/components/chat/chat.js";
|
|
55
|
+
export { AttachmentPill, AttachmentPill as Attachment, type AttachmentPillContextValue, type AttachmentPillProps, type AttachmentPillProps as AttachmentProps, AttachmentsPanel as UploadsPanel, type AttachmentsPanelProps as UploadsPanelProps, ChatInput, ChatInput as ChatComposer, type ChatInputProps, type ChatInputProps as ChatComposerProps, Message as StandaloneMessage, Message as StreamingMessage, MessageActionBar as MessageActions, type MessageActionBarProps as MessageActionsProps, type MessageProps as StandaloneMessageProps, type MessageProps as StreamingMessageProps, Reasoning, type ReasoningContextValue, type ReasoningProps, type ReasoningTriggerProps, ToolCall, type ToolCallContextValue, type ToolCallProps, type ToolCallTriggerProps, useAttachmentPill, useReasoning, useToolCall, } from "../react/components/chat/chat.js";
|
|
56
|
+
export { Markdown, type MarkdownProps } from "../react/components/chat/markdown.js";
|
|
57
|
+
export { AppShell, type AppShellHeaderProps, type AppShellOpenState, type AppShellProps, type AppShellSide, type AppShellSidebarProps, type AppShellTriggerProps, useAppShell, } from "../react/components/chat/ui/app-shell.js";
|
|
58
|
+
export { Tabs, TabsItem, type TabsItemProps, type TabsProps, } from "../react/components/chat/ui/tabs.js";
|
|
59
|
+
export { ChatThemeScope, type ChatThemeScopeProps, } from "../react/components/chat/chat-theme-scope.js";
|
|
60
|
+
export { type AgentOption, AgentPicker, type AgentPickerContentProps, type AgentPickerContextValue, type AgentPickerItemProps, type AgentPickerProps, type AgentPickerSection, type AgentPickerTriggerProps, useAgentPicker, } from "../react/components/chat/agent-picker.js";
|
|
61
|
+
export { agentsToPickerOptions, ChatAgentPicker, type ChatAgentPickerProps, } from "../react/components/chat/chat-agent-picker.js";
|
|
62
|
+
export { type ChatActionItem, ChatActions, type ChatActionsContentProps, type ChatActionsContextValue, type ChatActionsItemProps, type ChatActionsProps, type ChatActionsSettings, type ChatActionsTriggerProps, useChatActions, } from "../react/components/chat/chat-actions.js";
|
|
63
|
+
export { CodeBlock, CodeSurface, type CodeSurfaceProps, CopyButton, type CopyButtonProps, useClipboard, type UseClipboardResult, } from "../react/components/chat/ui/code-block.js";
|
|
64
|
+
export { AgentCard, type AgentCardContextValue, type AgentCardProps, useAgentCard, } from "../react/components/chat/agent-card.js";
|
|
56
65
|
export { ChatErrorBoundary, type ChatErrorBoundaryProps, useChatErrorHandler, } from "../react/components/chat/error-boundary.js";
|
|
57
66
|
export type { AgentTheme, ChatTheme } from "../react/components/chat/theme.js";
|
|
58
67
|
export { type BranchInfo, type ChatDynamicToolPart, type ChatFinishReason, type ChatMessage, type ChatMessagePart, type ChatReasoningPart, type ChatStepPart, type ChatStreamEvent, type ChatTextPart, type ChatToolPart, type ChatToolResultPart, type ChatToolState, type InferenceMode, type OnToolCallArg, type ToolOutput, useChat, type UseChatOptions, type UseChatResult, } from "../agent/react/use-chat/index.js";
|
|
59
68
|
export type { ChatMessageMetadata, ChatMessageMetadataUsage, ChatUiMessageChunk, ChildRunAudit, ChildRunAuditToolCall, ChildRunAuditToolResult, } from "./protocol.js";
|
|
60
69
|
export { useAgent, type UseAgentOptions, type UseAgentResult, } from "../agent/react/use-agent.js";
|
|
61
|
-
export { type AgentMetadata, type AgentMetadataPromptSuggestion, type AgentMetadataSuggestion, type AgentMetadataSuggestions, type AgentMetadataTaskSuggestion, getAgentPromptSuggestions, normalizeAgentMetadataResponse, useAgentMetadata, type UseAgentMetadataResult, } from "../agent/react/use-agent-metadata.js";
|
|
70
|
+
export { type AgentMetadata, type AgentMetadataPromptSuggestion, type AgentMetadataSuggestion, type AgentMetadataSuggestions, type AgentMetadataTaskSuggestion, getAgentPromptSuggestions, normalizeAgentMetadata, normalizeAgentMetadataResponse, useAgentMetadata, type UseAgentMetadataResult, } from "../agent/react/use-agent-metadata.js";
|
|
71
|
+
export { normalizeAgentsListResponse, useAgents, type UseAgentsOptions, type UseAgentsResult, } from "../agent/react/use-agents.js";
|
|
62
72
|
export { buildChatStreamChunkMessageMetadata, type BuildChatStreamChunkMessageMetadataInput, dedupeChatUiMessageChunks, extractChatMessageMetadata, normalizeChatMessageMetadata, normalizeChatUiMessageChunk, normalizeChatUiMessageStream, } from "./chat-ui-message-helpers.js";
|
|
63
73
|
export { type HostedStreamPartForUiChunkMapping, type HostedUiChunkMappingOptions, mapHostedStreamPartToChatUiChunks, } from "./hosted-ui-chunk-mapping.js";
|
|
64
74
|
export { useCompletion, type UseCompletionOptions, type UseCompletionResult, } from "../agent/react/use-completion.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/src/chat/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,OAAO,yBAAyB,CAAC;AAGjC,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAExF,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/src/chat/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,OAAO,yBAAyB,CAAC;AAGjC,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAExF,OAAO,EACL,SAAS,EACT,KAAK,cAAc,EACnB,cAAc,EACd,KAAK,yBAAyB,EAC9B,KAAK,0BAA0B,EAC/B,KAAK,uBAAuB,EAC5B,KAAK,6BAA6B,EAClC,KAAK,8BAA8B,EACnC,MAAM,EACN,KAAK,WAAW,EAChB,eAAe,EACf,KAAK,oBAAoB,EACzB,QAAQ,EACR,KAAK,aAAa,EAClB,WAAW,EACX,KAAK,gBAAgB,EACrB,OAAO,EACP,KAAK,YAAY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6BAA6B,CAAC;AAErC,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,6BAA6B,EAClC,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,KAAK,2BAA2B,EAChC,yBAAyB,EACzB,sBAAsB,EACtB,8BAA8B,EAC9B,gBAAgB,EAChB,KAAK,sBAAsB,GAC5B,MAAM,sCAAsC,CAAC;AAE9C,OAAO,EACL,2BAA2B,EAC3B,SAAS,EACT,KAAK,gBAAgB,EACrB,KAAK,eAAe,GACrB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EACL,mCAAmC,EACnC,KAAK,wCAAwC,EAC7C,yBAAyB,EACzB,0BAA0B,EAC1B,4BAA4B,EAC5B,2BAA2B,EAC3B,4BAA4B,GAC7B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,KAAK,iCAAiC,EACtC,KAAK,2BAA2B,EAChC,iCAAiC,GAClC,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EACL,aAAa,EACb,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,GACzB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EACL,YAAY,EACZ,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,GACxB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EACL,aAAa,EACb,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,GACzB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EACL,0BAA0B,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,wBAAwB,EACxB,6BAA6B,EAC7B,mCAAmC,EACnC,2CAA2C,EAC3C,8BAA8B,EAC9B,4BAA4B,EAC5B,wBAAwB,GACzB,MAAM,sBAAsB,CAAC"}
|
package/esm/src/chat/index.js
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
* <Chat.Root messages={chat.messages} input={chat.input}>
|
|
31
31
|
* <Chat.Empty title="Ask me anything" />
|
|
32
32
|
* <Chat.MessageList messages={chat.messages} />
|
|
33
|
-
* <Chat.
|
|
33
|
+
* <Chat.Input input={chat.input} onChange={chat.handleInputChange} onSubmit={chat.handleSubmit} />
|
|
34
34
|
* </Chat.Root>
|
|
35
35
|
* );
|
|
36
36
|
* }
|
|
@@ -48,15 +48,41 @@
|
|
|
48
48
|
* ```
|
|
49
49
|
*/
|
|
50
50
|
export { Chat, ChatComponents } from "../react/components/chat/chat.js";
|
|
51
|
-
export {
|
|
52
|
-
export { ChatContextProvider, ComposerContextProvider, MessageContextProvider,
|
|
53
|
-
export {
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
export { ChatEmpty, ChatEmptyState, ChatIf, ChatMessageList, ChatRoot, ErrorBanner, Message, ModelAvatar, } from "../react/components/chat/chat.js";
|
|
52
|
+
export { ChatContextProvider, ComposerContextProvider, MessageContextProvider, useChatContext, useChatContextOptional, useComposerContext, useComposerContextOptional, useMessageContext, useMessageContextOptional, } from "../react/components/chat/chat.js";
|
|
53
|
+
export { AgentAvatar, AttachmentsPanel, BranchPicker, ChatMessagesSkeleton, ChatSidebar, ConversationEmptyState, ConversationScrollButton, downloadMarkdown, DropZoneOverlay, exportAsMarkdown, extractSourcesFromParts, FadeIn, getTextContent, groupPartsInOrder, InferenceBadge, InlineCitation, isReasoningPart, isSkillToolPart, isToolPart, Loader, MessageActionBar, MessageEditForm, MessageFeedback, ModelSelector, QuickActions, ReasoningCard, RichCodeBlock, Shimmer, SkillBadge, SourcePill, Sources, StepIndicator, Suggestion, Suggestions, TabSwitcher, ToolCallCard, ToolStatusBadge, useAttachmentsPanel, useModelSelector, useSources, useStepIndicator, useStickToBottom, useUpload, useUploadsRegistry, } from "../react/components/chat/chat.js";
|
|
54
|
+
// Conversation persistence adapters — swappable async stores behind the
|
|
55
|
+
// (upcoming) `useConversations` hook. localStorage default; idb/api are follow-ups.
|
|
56
|
+
export { ConversationsContextProvider, ConversationsProvider, localConversationStore, memoryConversationStore, useConversation, useConversations, useConversationsContext, useConversationsContextOptional, } from "../react/components/chat/chat.js";
|
|
57
|
+
// ---------------------------------------------------------------------------
|
|
58
|
+
// Target component names. This chat surface intentionally completes the
|
|
59
|
+
// migration away from the old Thread, Composer, and standalone message exports.
|
|
60
|
+
// Use these names for new code and see the chat UI guide for migration notes.
|
|
61
|
+
// ---------------------------------------------------------------------------
|
|
62
|
+
export { AttachmentPill, AttachmentPill as Attachment, AttachmentsPanel as UploadsPanel, ChatInput, ChatInput as ChatComposer, Message as StandaloneMessage, Message as StreamingMessage, MessageActionBar as MessageActions, Reasoning, ToolCall, useAttachmentPill, useReasoning, useToolCall, } from "../react/components/chat/chat.js";
|
|
63
|
+
export { Markdown } from "../react/components/chat/markdown.js";
|
|
64
|
+
// Layout primitives — chat-independent, promoted from the private `chat/ui`
|
|
65
|
+
// barrel so consuming apps can compose their own shell (sidebar in the layout,
|
|
66
|
+
// pages in the content slot). Eventual home is a top-level `veryfront/ui`.
|
|
67
|
+
export { AppShell, useAppShell, } from "../react/components/chat/ui/app-shell.js";
|
|
68
|
+
export { Tabs, TabsItem, } from "../react/components/chat/ui/tabs.js";
|
|
69
|
+
export { ChatThemeScope, } from "../react/components/chat/chat-theme-scope.js";
|
|
70
|
+
// New target components (Studio 1:1, dependency-light forks).
|
|
71
|
+
export { AgentPicker, useAgentPicker, } from "../react/components/chat/agent-picker.js";
|
|
72
|
+
export { agentsToPickerOptions, ChatAgentPicker, } from "../react/components/chat/chat-agent-picker.js";
|
|
73
|
+
export { ChatActions, useChatActions, } from "../react/components/chat/chat-actions.js";
|
|
74
|
+
// `SkillTool` retired as a standalone export — a skill tool is now a presentation
|
|
75
|
+
// variant of `ToolCall` (`<ToolCall variant="compact" />`, auto-default for skill
|
|
76
|
+
// parts). The row impl stays internal to `tool-ui.tsx`.
|
|
77
|
+
// Shared syntax-highlight primitive (`CodeBlockProps` name is already taken by
|
|
78
|
+
// the Markdown code-block props, so only the runtime `CodeBlock` is re-exported).
|
|
79
|
+
export { CodeBlock, CodeSurface, CopyButton, useClipboard, } from "../react/components/chat/ui/code-block.js";
|
|
80
|
+
export { AgentCard, useAgentCard, } from "../react/components/chat/agent-card.js";
|
|
56
81
|
export { ChatErrorBoundary, useChatErrorHandler, } from "../react/components/chat/error-boundary.js";
|
|
57
82
|
export { useChat, } from "../agent/react/use-chat/index.js";
|
|
58
83
|
export { useAgent, } from "../agent/react/use-agent.js";
|
|
59
|
-
export { getAgentPromptSuggestions, normalizeAgentMetadataResponse, useAgentMetadata, } from "../agent/react/use-agent-metadata.js";
|
|
84
|
+
export { getAgentPromptSuggestions, normalizeAgentMetadata, normalizeAgentMetadataResponse, useAgentMetadata, } from "../agent/react/use-agent-metadata.js";
|
|
85
|
+
export { normalizeAgentsListResponse, useAgents, } from "../agent/react/use-agents.js";
|
|
60
86
|
export { buildChatStreamChunkMessageMetadata, dedupeChatUiMessageChunks, extractChatMessageMetadata, normalizeChatMessageMetadata, normalizeChatUiMessageChunk, normalizeChatUiMessageStream, } from "./chat-ui-message-helpers.js";
|
|
61
87
|
export { mapHostedStreamPartToChatUiChunks, } from "./hosted-ui-chunk-mapping.js";
|
|
62
88
|
export { useCompletion, } from "../agent/react/use-completion.js";
|
|
@@ -19,6 +19,18 @@ export interface ChatReasoningPart {
|
|
|
19
19
|
redactedData?: string;
|
|
20
20
|
state?: ChatPartState;
|
|
21
21
|
}
|
|
22
|
+
/** Chat message part that carries an uploaded file or image attachment. */
|
|
23
|
+
export interface ChatFilePart {
|
|
24
|
+
type: "file";
|
|
25
|
+
/** MIME type of the file, e.g. "image/png" or "application/pdf". */
|
|
26
|
+
mediaType: string;
|
|
27
|
+
/** Resolved URL of the uploaded file (from the upload endpoint). */
|
|
28
|
+
url: string;
|
|
29
|
+
/** Original filename shown to the user. */
|
|
30
|
+
filename?: string;
|
|
31
|
+
/** File size in bytes, when known — shown in the read-only message pill. */
|
|
32
|
+
size?: number;
|
|
33
|
+
}
|
|
22
34
|
/** State for chat tool. */
|
|
23
35
|
export type ChatToolState = "input-streaming" | "input-available" | "output-streaming" | "output-available" | "output-error";
|
|
24
36
|
/** Public API contract for chat tool part. */
|
|
@@ -60,7 +72,7 @@ export interface ChatDataPart {
|
|
|
60
72
|
data: unknown;
|
|
61
73
|
}
|
|
62
74
|
/** Public API contract for chat message part. */
|
|
63
|
-
export type ChatMessagePart = ChatTextPart | ChatReasoningPart | ChatToolPart | ChatToolResultPart | ChatDynamicToolPart | ChatStepPart | ChatDataPart;
|
|
75
|
+
export type ChatMessagePart = ChatTextPart | ChatReasoningPart | ChatFilePart | ChatToolPart | ChatToolResultPart | ChatDynamicToolPart | ChatStepPart | ChatDataPart;
|
|
64
76
|
/** Message shape for chat. */
|
|
65
77
|
export interface ChatMessage {
|
|
66
78
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../../src/src/chat/protocol.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,yBAAyB,CAAC;AAGjC,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG,MAAM,CAAC;AAEjD,2CAA2C;AAC3C,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAED,qDAAqD;AACrD,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAED,2BAA2B;AAC3B,MAAM,MAAM,aAAa,GACrB,iBAAiB,GACjB,iBAAiB,GACjB,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,CAAC;AAEnB,8CAA8C;AAC9C,MAAM,WAAW,YAAY,CAAC,IAAI,SAAS,MAAM,GAAG,MAAM,EAAE,KAAK,GAAG,OAAO,EAAE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AS,EAAE,MAAM,CAAC;CACnB,GACC;IACA,IAAI,EAAE,QAAQ,MAAM,EAAE,CAAC;IACvB,IAAI,EAAE,OAAO,CAAC;CACf,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chat upload handler: the server side of `<Chat>`'s batteries-included
|
|
3
|
+
* attachments. Mount it at `app/api/uploads/route.ts` (the same endpoint the
|
|
4
|
+
* composer POSTs to) and files "just work": stored on the local disk in dev,
|
|
5
|
+
* on Veryfront Cloud (or a `BlobStorage` you pass) once deployed.
|
|
6
|
+
*
|
|
7
|
+
* ```ts
|
|
8
|
+
* // app/api/uploads/route.ts
|
|
9
|
+
* import { createChatUploadHandler } from "veryfront/chat/uploads";
|
|
10
|
+
*
|
|
11
|
+
* function authorize(request: Request) {
|
|
12
|
+
* const token = Deno.env.get("UPLOAD_TOKEN");
|
|
13
|
+
* return Boolean(token && request.headers.get("authorization") === `Bearer ${token}`);
|
|
14
|
+
* }
|
|
15
|
+
*
|
|
16
|
+
* export const { POST, GET, DELETE } = createChatUploadHandler({ authorize });
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* `POST` stores the multipart `file` field and returns `{ id, url, name,
|
|
20
|
+
* mediaType, size }`. The composer sends that `url` as a `file` message part,
|
|
21
|
+
* which the runtime fetches, so the URL must be reachable by the runtime
|
|
22
|
+
* (true for local dev, where `GET` streams the file back from the same origin).
|
|
23
|
+
*
|
|
24
|
+
* @module chat/upload-handler
|
|
25
|
+
*/
|
|
26
|
+
import "../../_dnt.polyfills.js";
|
|
27
|
+
import type { BlobStorage } from "../workflow/blob/types.js";
|
|
28
|
+
/** Configuration for {@link createChatUploadHandler}. */
|
|
29
|
+
export interface ChatUploadHandlerConfig {
|
|
30
|
+
/** Max accepted file size in bytes. @default 25 MB */
|
|
31
|
+
maxFileSize?: number;
|
|
32
|
+
/** Storage backend. Defaults to local disk in dev, Veryfront Cloud when deployed. */
|
|
33
|
+
storage?: BlobStorage;
|
|
34
|
+
/**
|
|
35
|
+
* Gate every request. Return `false` or a `Response` to reject.
|
|
36
|
+
* Required unless `allowUnauthenticated` is explicitly set.
|
|
37
|
+
*/
|
|
38
|
+
authorize?: (request: Request) => boolean | Response | void | Promise<boolean | Response | void>;
|
|
39
|
+
/**
|
|
40
|
+
* Allow POST, GET, and DELETE without an authorization callback.
|
|
41
|
+
* Use this only for local prototypes or deliberately public upload routes.
|
|
42
|
+
*/
|
|
43
|
+
allowUnauthenticated?: boolean;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Build `{ POST, GET, DELETE }` route handlers for chat attachments.
|
|
47
|
+
* Auto-selects local disk storage in dev and Veryfront Cloud once deployed, or
|
|
48
|
+
* the `storage` you provide. `DELETE ?id=` removes the file from storage.
|
|
49
|
+
*/
|
|
50
|
+
export declare function createChatUploadHandler(config?: ChatUploadHandlerConfig): {
|
|
51
|
+
POST: (request: Request) => Promise<Response>;
|
|
52
|
+
GET: (request: Request) => Promise<Response>;
|
|
53
|
+
DELETE: (request: Request) => Promise<Response>;
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=upload-handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload-handler.d.ts","sourceRoot":"","sources":["../../../src/src/chat/upload-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,yBAAyB,CAAC;AAOjC,OAAO,KAAK,EAAW,WAAW,EAAE,MAAM,2BAA2B,CAAC;AActE,yDAAyD;AACzD,MAAM,WAAW,uBAAuB;IACtC,sDAAsD;IACtD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qFAAqF;IACrF,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB;;;OAGG;IACH,SAAS,CAAC,EAAE,CACV,OAAO,EAAE,OAAO,KACb,OAAO,GAAG,QAAQ,GAAG,IAAI,GAAG,OAAO,CAAC,OAAO,GAAG,QAAQ,GAAG,IAAI,CAAC,CAAC;IACpE;;;OAGG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAiDD;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,GAAE,uBAA4B,GACnC;IACD,IAAI,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC9C,GAAG,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC7C,MAAM,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;CACjD,CAgHA"}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chat upload handler: the server side of `<Chat>`'s batteries-included
|
|
3
|
+
* attachments. Mount it at `app/api/uploads/route.ts` (the same endpoint the
|
|
4
|
+
* composer POSTs to) and files "just work": stored on the local disk in dev,
|
|
5
|
+
* on Veryfront Cloud (or a `BlobStorage` you pass) once deployed.
|
|
6
|
+
*
|
|
7
|
+
* ```ts
|
|
8
|
+
* // app/api/uploads/route.ts
|
|
9
|
+
* import { createChatUploadHandler } from "veryfront/chat/uploads";
|
|
10
|
+
*
|
|
11
|
+
* function authorize(request: Request) {
|
|
12
|
+
* const token = Deno.env.get("UPLOAD_TOKEN");
|
|
13
|
+
* return Boolean(token && request.headers.get("authorization") === `Bearer ${token}`);
|
|
14
|
+
* }
|
|
15
|
+
*
|
|
16
|
+
* export const { POST, GET, DELETE } = createChatUploadHandler({ authorize });
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* `POST` stores the multipart `file` field and returns `{ id, url, name,
|
|
20
|
+
* mediaType, size }`. The composer sends that `url` as a `file` message part,
|
|
21
|
+
* which the runtime fetches, so the URL must be reachable by the runtime
|
|
22
|
+
* (true for local dev, where `GET` streams the file back from the same origin).
|
|
23
|
+
*
|
|
24
|
+
* @module chat/upload-handler
|
|
25
|
+
*/
|
|
26
|
+
import "../../_dnt.polyfills.js";
|
|
27
|
+
import * as dntShim from "../../_dnt.shims.js";
|
|
28
|
+
import { LocalBlobStorage } from "../workflow/blob/local-storage.js";
|
|
29
|
+
import { VeryfrontCloudBlobStorage } from "../workflow/blob/veryfront-cloud-storage.js";
|
|
30
|
+
import { isVeryfrontCloudEnabled } from "../platform/cloud/resolver.js";
|
|
31
|
+
import { isProduction } from "../platform/environment.js";
|
|
32
|
+
import { CONFIG_INVALID } from "../errors/index.js";
|
|
33
|
+
/** 25 MB default cap. Attachments are references, not bulk transfer. */
|
|
34
|
+
const DEFAULT_MAX_FILE_SIZE = 25 * 1024 * 1024;
|
|
35
|
+
const MAX_FILE_NAME_LENGTH = 200;
|
|
36
|
+
/** Ids are storage-issued UUIDs; this guards the `GET ?id=` path against traversal. */
|
|
37
|
+
const SAFE_ID = /^[A-Za-z0-9_-]{1,128}$/;
|
|
38
|
+
const CLOUD_PREFIX = ".veryfront/chat-uploads/";
|
|
39
|
+
const FileCtor = globalThis.File;
|
|
40
|
+
/** Strip path separators, HTML-significant and control chars from a filename. */
|
|
41
|
+
function sanitizeFileName(raw) {
|
|
42
|
+
const cleaned = raw
|
|
43
|
+
.replace(/[/\\]/g, "_")
|
|
44
|
+
.replace(/[<>"'`&]/g, "")
|
|
45
|
+
// deno-lint-ignore no-control-regex
|
|
46
|
+
.replace(/[\x00-\x1f\x7f]/g, "")
|
|
47
|
+
.trim()
|
|
48
|
+
.slice(0, MAX_FILE_NAME_LENGTH);
|
|
49
|
+
return cleaned || "untitled";
|
|
50
|
+
}
|
|
51
|
+
function resolveStorage(config) {
|
|
52
|
+
if (config.storage)
|
|
53
|
+
return config.storage;
|
|
54
|
+
// Cloud storage only when actually deployed. In local dev the cloud bootstrap
|
|
55
|
+
// is present (you're logged in) but the project isn't, so default to disk.
|
|
56
|
+
if (isProduction() && isVeryfrontCloudEnabled()) {
|
|
57
|
+
return new VeryfrontCloudBlobStorage({ prefix: CLOUD_PREFIX });
|
|
58
|
+
}
|
|
59
|
+
return new LocalBlobStorage(`${dntShim.Deno.cwd()}/.veryfront/uploads`);
|
|
60
|
+
}
|
|
61
|
+
function fallbackUrl(requestUrl, id) {
|
|
62
|
+
const url = new URL(requestUrl);
|
|
63
|
+
url.search = "";
|
|
64
|
+
url.searchParams.set("id", id);
|
|
65
|
+
return url.href;
|
|
66
|
+
}
|
|
67
|
+
function rejectsDeclaredSize(request, maxFileSize) {
|
|
68
|
+
const value = request.headers.get("content-length");
|
|
69
|
+
if (!value)
|
|
70
|
+
return false;
|
|
71
|
+
const declared = Number.parseInt(value, 10);
|
|
72
|
+
return Number.isFinite(declared) && declared > maxFileSize;
|
|
73
|
+
}
|
|
74
|
+
async function reject(request, authorize) {
|
|
75
|
+
if (!authorize)
|
|
76
|
+
return null;
|
|
77
|
+
const result = await authorize(request);
|
|
78
|
+
if (result instanceof Response)
|
|
79
|
+
return result;
|
|
80
|
+
if (result === false)
|
|
81
|
+
return Response.json({ error: "Unauthorized" }, { status: 401 });
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Build `{ POST, GET, DELETE }` route handlers for chat attachments.
|
|
86
|
+
* Auto-selects local disk storage in dev and Veryfront Cloud once deployed, or
|
|
87
|
+
* the `storage` you provide. `DELETE ?id=` removes the file from storage.
|
|
88
|
+
*/
|
|
89
|
+
export function createChatUploadHandler(config = {}) {
|
|
90
|
+
const maxFileSize = config.maxFileSize ?? DEFAULT_MAX_FILE_SIZE;
|
|
91
|
+
if (!config.authorize && config.allowUnauthenticated !== true) {
|
|
92
|
+
throw CONFIG_INVALID.create({
|
|
93
|
+
message: "createChatUploadHandler requires `authorize` or `allowUnauthenticated: true`.",
|
|
94
|
+
detail: "Pass authorize to protect upload requests, or set allowUnauthenticated: true for a deliberately public endpoint.",
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
const storage = resolveStorage(config);
|
|
98
|
+
async function POST(request) {
|
|
99
|
+
const denied = await reject(request, config.authorize);
|
|
100
|
+
if (denied)
|
|
101
|
+
return denied;
|
|
102
|
+
if (rejectsDeclaredSize(request, maxFileSize)) {
|
|
103
|
+
return Response.json({ error: `File exceeds ${Math.round(maxFileSize / 1024 / 1024)} MB limit` }, { status: 413 });
|
|
104
|
+
}
|
|
105
|
+
const form = await request.formData();
|
|
106
|
+
const file = form.get("file");
|
|
107
|
+
if (!FileCtor || !(file instanceof FileCtor)) {
|
|
108
|
+
return Response.json({ error: "No file provided" }, { status: 400 });
|
|
109
|
+
}
|
|
110
|
+
if (file.size > maxFileSize) {
|
|
111
|
+
return Response.json({ error: `File exceeds ${Math.round(maxFileSize / 1024 / 1024)} MB limit` }, { status: 413 });
|
|
112
|
+
}
|
|
113
|
+
const name = sanitizeFileName(file.name);
|
|
114
|
+
const mediaType = file.type || "application/octet-stream";
|
|
115
|
+
const ref = await storage.put(file, {
|
|
116
|
+
mimeType: mediaType,
|
|
117
|
+
metadata: { filename: name },
|
|
118
|
+
});
|
|
119
|
+
// Use the backend's own URL when it has one (cloud/S3); otherwise serve the
|
|
120
|
+
// bytes back ourselves from the same origin (local disk in dev).
|
|
121
|
+
const external = ref.url ?? (await storage.stat(ref.id))?.url;
|
|
122
|
+
const url = external ?? fallbackUrl(request.url, ref.id);
|
|
123
|
+
return Response.json({ id: ref.id, url, name, mediaType, size: file.size });
|
|
124
|
+
}
|
|
125
|
+
function toListItem(ref, requestUrl) {
|
|
126
|
+
return {
|
|
127
|
+
id: ref.id,
|
|
128
|
+
url: ref.url ?? fallbackUrl(requestUrl, ref.id),
|
|
129
|
+
name: ref.metadata?.filename ?? ref.id,
|
|
130
|
+
mediaType: ref.mimeType,
|
|
131
|
+
size: ref.size,
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
async function GET(request) {
|
|
135
|
+
const denied = await reject(request, config.authorize);
|
|
136
|
+
if (denied)
|
|
137
|
+
return denied;
|
|
138
|
+
const id = new URL(request.url).searchParams.get("id");
|
|
139
|
+
// No `id` → list the adapter's stored files (newest first). This is the
|
|
140
|
+
// source of truth for an "Uploads" surface, so it survives across sessions
|
|
141
|
+
// and browsers, unlike a client-only index.
|
|
142
|
+
if (!id) {
|
|
143
|
+
if (!storage.list) {
|
|
144
|
+
return Response.json({ error: "This storage backend does not support listing", items: [] }, { status: 501 });
|
|
145
|
+
}
|
|
146
|
+
const refs = await storage.list();
|
|
147
|
+
return Response.json({ items: refs.map((ref) => toListItem(ref, request.url)) });
|
|
148
|
+
}
|
|
149
|
+
if (!SAFE_ID.test(id)) {
|
|
150
|
+
return Response.json({ error: "Invalid id" }, { status: 400 });
|
|
151
|
+
}
|
|
152
|
+
const ref = await storage.stat(id);
|
|
153
|
+
const stream = ref ? await storage.getStream(id) : null;
|
|
154
|
+
if (!ref || !stream) {
|
|
155
|
+
return Response.json({ error: "Not found" }, { status: 404 });
|
|
156
|
+
}
|
|
157
|
+
return new Response(stream, {
|
|
158
|
+
headers: {
|
|
159
|
+
"Content-Type": ref.mimeType,
|
|
160
|
+
"Content-Length": String(ref.size),
|
|
161
|
+
"Content-Disposition": `attachment; filename="${ref.metadata?.filename ?? ref.id}"`,
|
|
162
|
+
"X-Content-Type-Options": "nosniff",
|
|
163
|
+
"Cache-Control": "private, max-age=3600",
|
|
164
|
+
},
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
async function DELETE(request) {
|
|
168
|
+
const denied = await reject(request, config.authorize);
|
|
169
|
+
if (denied)
|
|
170
|
+
return denied;
|
|
171
|
+
const id = new URL(request.url).searchParams.get("id");
|
|
172
|
+
if (!id || !SAFE_ID.test(id)) {
|
|
173
|
+
return Response.json({ error: "Invalid id" }, { status: 400 });
|
|
174
|
+
}
|
|
175
|
+
// Idempotent: deleting an already-gone file is a success, not a 404.
|
|
176
|
+
await storage.delete(id);
|
|
177
|
+
return Response.json({ id, deleted: true });
|
|
178
|
+
}
|
|
179
|
+
return { POST, GET, DELETE };
|
|
180
|
+
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* (Deno, Node.js) and handles veryfront package resolution.
|
|
6
6
|
*/
|
|
7
7
|
import { createFileSystem } from "../platform/compat/fs.js";
|
|
8
|
-
export declare const DISCOVERY_GLOBAL_VERYFRONT_MODULES: readonly ["veryfront/agent", "veryfront/tool", "veryfront/platform", "veryfront/prompt", "veryfront/resource", "veryfront/embedding", "veryfront/knowledge", "veryfront/workflow", "veryfront/work", "veryfront/eval", "veryfront/metrics", "veryfront/schemas"];
|
|
8
|
+
export declare const DISCOVERY_GLOBAL_VERYFRONT_MODULES: readonly ["veryfront/agent", "veryfront/tool", "veryfront/platform", "veryfront/prompt", "veryfront/resource", "veryfront/embedding", "veryfront/knowledge", "veryfront/workflow", "veryfront/work", "veryfront/eval", "veryfront/metrics", "veryfront/schemas", "veryfront/chat/uploads"];
|
|
9
9
|
interface DenoRewriteOptions {
|
|
10
10
|
compiled?: boolean;
|
|
11
11
|
resolveSpecifier?: (specifier: string) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"import-rewriter.d.ts","sourceRoot":"","sources":["../../../src/src/discovery/import-rewriter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAI5D,eAAO,MAAM,kCAAkC,
|
|
1
|
+
{"version":3,"file":"import-rewriter.d.ts","sourceRoot":"","sources":["../../../src/src/discovery/import-rewriter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAI5D,eAAO,MAAM,kCAAkC,4RAerC,CAAC;AAEX,UAAU,kBAAkB;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,CAAC;CAClD;AAkHD;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,kBAAuB,GAC/B,MAAM,CA2BR;AAqFD;;;;;GAKG;AACH,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,EAClB,EAAE,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,EACvC,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,MAAM,CAAC,CA2PjB"}
|
|
@@ -20,6 +20,8 @@ export const DISCOVERY_GLOBAL_VERYFRONT_MODULES = [
|
|
|
20
20
|
"veryfront/eval",
|
|
21
21
|
"veryfront/metrics",
|
|
22
22
|
"veryfront/schemas",
|
|
23
|
+
// Server-side chat upload route handler (app/api/uploads/route.ts).
|
|
24
|
+
"veryfront/chat/uploads",
|
|
23
25
|
];
|
|
24
26
|
function escapeRegExp(value) {
|
|
25
27
|
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transpiler.d.ts","sourceRoot":"","sources":["../../../src/src/discovery/transpiler.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"transpiler.d.ts","sourceRoot":"","sources":["../../../src/src/discovery/transpiler.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AA6IvD;;GAEG;AACH,wBAAsB,YAAY,CAChC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,OAAO,CAAC,CAkGlB;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAE1C"}
|
|
@@ -25,6 +25,7 @@ import * as workMod from "../work/index.js";
|
|
|
25
25
|
import * as evalMod from "../eval/index.js";
|
|
26
26
|
import * as metricsMod from "../metrics/index.js";
|
|
27
27
|
import * as schemasMod from "../schemas/index.js";
|
|
28
|
+
import * as chatUploadsMod from "../chat/upload-handler.js";
|
|
28
29
|
const transpileCache = new Map();
|
|
29
30
|
// Setup veryfront modules as globals for compiled binary support
|
|
30
31
|
let veryfrontGlobalsInitialized = false;
|
|
@@ -47,6 +48,7 @@ async function ensureVeryfrontGlobals() {
|
|
|
47
48
|
"veryfront/eval": evalMod,
|
|
48
49
|
"veryfront/metrics": metricsMod,
|
|
49
50
|
"veryfront/schemas": schemasMod,
|
|
51
|
+
"veryfront/chat/uploads": chatUploadsMod,
|
|
50
52
|
};
|
|
51
53
|
dntShim.dntGlobalThis.__VERYFRONT_MODULES__ = modules;
|
|
52
54
|
veryfrontGlobalsInitialized = true;
|