veryfront 0.1.1048 → 0.1.1049
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 +3 -3
- package/esm/deno.d.ts +3 -0
- package/esm/deno.js +10 -6
- package/esm/src/agent/react/use-agent-metadata.js +1 -1
- package/esm/src/agent/react/use-agent.js +1 -1
- package/esm/src/agent/react/use-agents.js +1 -1
- package/esm/src/agent/react/use-chat/types.d.ts +0 -6
- package/esm/src/agent/react/use-chat/types.d.ts.map +1 -1
- package/esm/src/agent/react/use-chat/use-chat.d.ts +5 -0
- package/esm/src/agent/react/use-chat/use-chat.d.ts.map +1 -1
- package/esm/src/agent/react/use-chat/use-chat.js +87 -34
- package/esm/src/agent/react/use-completion.js +1 -1
- package/esm/src/agent/react/use-streaming.js +1 -1
- package/esm/src/agent/react/use-voice-input.js +1 -1
- package/esm/src/cache/backends/api.d.ts.map +1 -1
- package/esm/src/cache/backends/api.js +10 -7
- package/esm/src/chat/index.d.ts +8 -15
- package/esm/src/chat/index.d.ts.map +1 -1
- package/esm/src/chat/index.js +7 -16
- package/esm/src/modules/component-registry/registry.d.ts +1 -1
- package/esm/src/modules/component-registry/registry.d.ts.map +1 -1
- package/esm/src/modules/react-loader/component-loader.d.ts +1 -1
- package/esm/src/modules/react-loader/component-loader.d.ts.map +1 -1
- package/esm/src/modules/react-loader/extract-component.d.ts +1 -1
- package/esm/src/modules/react-loader/extract-component.d.ts.map +1 -1
- package/esm/src/modules/react-loader/ssr-module-loader/loader.d.ts +1 -1
- package/esm/src/modules/react-loader/ssr-module-loader/loader.d.ts.map +1 -1
- package/esm/src/modules/react-loader/types.d.ts +1 -1
- package/esm/src/modules/react-loader/types.d.ts.map +1 -1
- package/esm/src/platform/adapters/fs/veryfront/multi-project-adapter.d.ts +3 -1
- package/esm/src/platform/adapters/fs/veryfront/multi-project-adapter.d.ts.map +1 -1
- package/esm/src/platform/adapters/fs/veryfront/multi-project-adapter.js +2 -0
- package/esm/src/platform/adapters/fs/veryfront/request-context.d.ts +4 -0
- package/esm/src/platform/adapters/fs/veryfront/request-context.d.ts.map +1 -1
- package/esm/src/platform/adapters/fs/veryfront/request-context.js +1 -0
- package/esm/src/proxy/main.js +6 -5
- package/esm/src/proxy/retry.d.ts +14 -6
- package/esm/src/proxy/retry.d.ts.map +1 -1
- package/esm/src/proxy/retry.js +82 -20
- package/esm/src/react/compat/hooks-adapter.d.ts +1 -1
- package/esm/src/react/compat/hooks-adapter.d.ts.map +1 -1
- package/esm/src/react/compat/hooks-adapter.js +1 -1
- package/esm/src/react/compat/ssr-adapter/response-builder.d.ts +1 -1
- package/esm/src/react/compat/ssr-adapter/response-builder.d.ts.map +1 -1
- package/esm/src/react/compat/ssr-adapter/server-loader.d.ts +5 -5
- package/esm/src/react/compat/ssr-adapter/server-loader.d.ts.map +1 -1
- package/esm/src/react/compat/ssr-adapter/stream-renderer.d.ts +1 -1
- package/esm/src/react/compat/ssr-adapter/stream-renderer.d.ts.map +1 -1
- package/esm/src/react/compat/ssr-adapter/string-renderer.d.ts +1 -1
- package/esm/src/react/compat/ssr-adapter/string-renderer.d.ts.map +1 -1
- package/esm/src/react/compat/version-detector/feature-detector.js +1 -1
- package/esm/src/react/components/AppWrapper.d.ts +1 -1
- package/esm/src/react/components/AppWrapper.d.ts.map +1 -1
- package/esm/src/react/components/AppWrapper.js +1 -1
- package/esm/src/react/components/LayoutComponent.d.ts +1 -1
- package/esm/src/react/components/LayoutComponent.d.ts.map +1 -1
- package/esm/src/react/components/LayoutComponent.js +1 -1
- package/esm/src/react/components/MDXProvider.d.ts +1 -1
- package/esm/src/react/components/MDXProvider.d.ts.map +1 -1
- package/esm/src/react/components/MDXProvider.js +1 -1
- package/esm/src/react/components/ProviderComponent.d.ts +1 -1
- package/esm/src/react/components/ProviderComponent.d.ts.map +1 -1
- package/esm/src/react/components/ProviderComponent.js +1 -1
- package/esm/src/react/components/chat/agent-card.d.ts +15 -7
- package/esm/src/react/components/chat/agent-card.d.ts.map +1 -1
- package/esm/src/react/components/chat/agent-card.js +9 -10
- package/esm/src/react/components/chat/agent-picker-actions.d.ts +20 -0
- package/esm/src/react/components/chat/agent-picker-actions.d.ts.map +1 -0
- package/esm/src/react/components/chat/agent-picker-actions.js +24 -0
- package/esm/src/react/components/chat/agent-picker-context.d.ts +19 -0
- package/esm/src/react/components/chat/agent-picker-context.d.ts.map +1 -0
- package/esm/src/react/components/chat/agent-picker-context.js +13 -0
- package/esm/src/react/components/chat/agent-picker.d.ts +35 -42
- package/esm/src/react/components/chat/agent-picker.d.ts.map +1 -1
- package/esm/src/react/components/chat/agent-picker.js +59 -50
- package/esm/src/react/components/chat/chat/app-mode-chat.d.ts +14 -0
- package/esm/src/react/components/chat/chat/app-mode-chat.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/app-mode-chat.js +137 -0
- package/esm/src/react/components/chat/chat/chat-attachments.d.ts +7 -0
- package/esm/src/react/components/chat/chat/chat-attachments.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/chat-attachments.js +16 -0
- package/esm/src/react/components/chat/chat/chat-component.d.ts +21 -0
- package/esm/src/react/components/chat/chat/chat-component.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/chat-component.js +1 -0
- package/esm/src/react/components/chat/chat/chat-props.d.ts +114 -0
- package/esm/src/react/components/chat/chat/chat-props.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/chat-props.js +1 -0
- package/esm/src/react/components/chat/chat/components/animations.d.ts +1 -1
- package/esm/src/react/components/chat/chat/components/animations.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/animations.js +1 -1
- package/esm/src/react/components/chat/chat/components/attachment-pill.d.ts +18 -18
- 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 +11 -15
- package/esm/src/react/components/chat/chat/components/attachments-panel.d.ts +14 -3
- package/esm/src/react/components/chat/chat/components/attachments-panel.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/attachments-panel.js +3 -3
- package/esm/src/react/components/chat/chat/components/branch-picker.d.ts +44 -14
- 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 +55 -12
- package/esm/src/react/components/chat/chat/components/chat-messages-skeleton.d.ts +1 -1
- package/esm/src/react/components/chat/chat/components/chat-messages-skeleton.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/chat-messages-skeleton.js +1 -1
- package/esm/src/react/components/chat/chat/components/code-block.d.ts +7 -2
- 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 +3 -3
- package/esm/src/react/components/chat/chat/components/drop-zone.d.ts +1 -1
- 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 +1 -1
- package/esm/src/react/components/chat/chat/components/empty-state.d.ts +1 -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 +1 -1
- package/esm/src/react/components/chat/chat/components/inference-badge.d.ts +1 -1
- 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 +1 -1
- package/esm/src/react/components/chat/chat/components/inline-citation.d.ts +33 -10
- 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 +145 -51
- package/esm/src/react/components/chat/chat/components/message-actions.d.ts +49 -20
- 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 +72 -18
- package/esm/src/react/components/chat/chat/components/message-edit-form.d.ts +1 -1
- 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 +1 -1
- package/esm/src/react/components/chat/chat/components/message-feedback.d.ts +34 -14
- 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 +54 -15
- package/esm/src/react/components/chat/chat/components/quick-actions.d.ts +1 -1
- 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 +1 -1
- package/esm/src/react/components/chat/chat/components/reasoning.d.ts +14 -6
- package/esm/src/react/components/chat/chat/components/reasoning.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/reasoning.js +3 -5
- package/esm/src/react/components/chat/chat/components/sidebar.d.ts +70 -16
- package/esm/src/react/components/chat/chat/components/sidebar.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/sidebar.js +72 -23
- package/esm/src/react/components/chat/chat/components/skill-badge.d.ts +1 -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 +1 -1
- package/esm/src/react/components/chat/chat/components/skill-tool.d.ts +1 -1
- package/esm/src/react/components/chat/chat/components/skill-tool.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/skill-tool.js +1 -1
- package/esm/src/react/components/chat/chat/components/sources.d.ts +25 -15
- package/esm/src/react/components/chat/chat/components/sources.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/sources.js +7 -7
- package/esm/src/react/components/chat/chat/components/step-indicator.d.ts +14 -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 +3 -3
- 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 +1 -1
- package/esm/src/react/components/chat/chat/components/tool-ui.d.ts +16 -9
- 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 +10 -14
- package/esm/src/react/components/chat/chat/composition/agent-avatar.d.ts +1 -1
- package/esm/src/react/components/chat/chat/composition/agent-avatar.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/agent-avatar.js +1 -1
- package/esm/src/react/components/chat/chat/composition/api.d.ts +3 -3
- package/esm/src/react/components/chat/chat/composition/api.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/api.js +2 -2
- package/esm/src/react/components/chat/chat/composition/chat-composer.d.ts +72 -29
- 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 +92 -82
- package/esm/src/react/components/chat/chat/composition/chat-empty-state.d.ts +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-empty-state.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-empty-state.js +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-empty.d.ts +7 -2
- 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 +3 -3
- package/esm/src/react/components/chat/chat/composition/chat-if.d.ts +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-if.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-message-list.d.ts +25 -11
- 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 +67 -29
- package/esm/src/react/components/chat/chat/composition/chat-root.d.ts +7 -3
- 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 -5
- package/esm/src/react/components/chat/chat/composition/error-banner.d.ts +7 -2
- 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 +3 -3
- package/esm/src/react/components/chat/chat/composition/message.d.ts +85 -34
- package/esm/src/react/components/chat/chat/composition/message.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/message.js +146 -122
- package/esm/src/react/components/chat/chat/composition/model-avatar.d.ts +1 -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 +1 -1
- package/esm/src/react/components/chat/chat/composition/pending-message.d.ts +1 -1
- package/esm/src/react/components/chat/chat/composition/pending-message.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/pending-message.js +1 -1
- package/esm/src/react/components/chat/chat/contexts/chat-context.d.ts +2 -3
- package/esm/src/react/components/chat/chat/contexts/chat-context.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/contexts/chat-context.js +1 -1
- package/esm/src/react/components/chat/chat/contexts/composer-context.d.ts +2 -2
- package/esm/src/react/components/chat/chat/contexts/composer-context.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/contexts/composer-context.js +1 -1
- package/esm/src/react/components/chat/chat/contexts/conversations-context.d.ts +2 -2
- package/esm/src/react/components/chat/chat/contexts/conversations-context.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/contexts/conversations-context.js +1 -1
- 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 +15 -2
- package/esm/src/react/components/chat/chat/contexts/message-context.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/contexts/message-context.js +11 -1
- package/esm/src/react/components/chat/chat/controlled-chat.d.ts +15 -0
- package/esm/src/react/components/chat/chat/controlled-chat.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/controlled-chat.js +97 -0
- package/esm/src/react/components/chat/chat/hooks/use-clipboard.js +1 -1
- package/esm/src/react/components/chat/chat/hooks/use-conversation-chat.d.ts +54 -0
- package/esm/src/react/components/chat/chat/hooks/use-conversation-chat.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/hooks/use-conversation-chat.js +179 -0
- package/esm/src/react/components/chat/chat/hooks/use-conversation.js +1 -1
- package/esm/src/react/components/chat/chat/hooks/use-conversations.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/hooks/use-conversations.js +3 -6
- package/esm/src/react/components/chat/chat/hooks/use-drop-zone.d.ts +8 -5
- package/esm/src/react/components/chat/chat/hooks/use-drop-zone.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/hooks/use-drop-zone.js +6 -6
- package/esm/src/react/components/chat/chat/hooks/use-stick-to-bottom.d.ts +1 -1
- package/esm/src/react/components/chat/chat/hooks/use-stick-to-bottom.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/hooks/use-stick-to-bottom.js +1 -1
- package/esm/src/react/components/chat/chat/hooks/use-upload.js +1 -1
- package/esm/src/react/components/chat/chat/hooks/use-uploads-registry.js +1 -1
- package/esm/src/react/components/chat/chat/index.d.ts +13 -230
- package/esm/src/react/components/chat/chat/index.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/index.js +27 -383
- package/esm/src/react/components/chat/chat-actions.d.ts +1 -1
- package/esm/src/react/components/chat/chat-actions.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat-actions.js +1 -1
- package/esm/src/react/components/chat/chat-agent-picker.d.ts +1 -1
- package/esm/src/react/components/chat/chat-agent-picker.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat-agent-picker.js +1 -1
- package/esm/src/react/components/chat/chat-theme-scope.d.ts +1 -1
- package/esm/src/react/components/chat/chat-theme-scope.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat-theme-scope.js +1 -1
- package/esm/src/react/components/chat/chat.d.ts +6 -6
- package/esm/src/react/components/chat/chat.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat.js +4 -4
- package/esm/src/react/components/chat/error-boundary.d.ts +1 -1
- package/esm/src/react/components/chat/error-boundary.d.ts.map +1 -1
- package/esm/src/react/components/chat/error-boundary.js +1 -1
- package/esm/src/react/components/chat/markdown.d.ts +3 -5
- package/esm/src/react/components/chat/markdown.d.ts.map +1 -1
- package/esm/src/react/components/chat/markdown.js +4 -72
- package/esm/src/react/components/chat/model-selector.d.ts +21 -27
- package/esm/src/react/components/chat/model-selector.d.ts.map +1 -1
- package/esm/src/react/components/chat/model-selector.js +26 -31
- package/esm/src/react/components/optimized-image/OptimizedBackgroundImage.d.ts +1 -1
- package/esm/src/react/components/optimized-image/OptimizedBackgroundImage.d.ts.map +1 -1
- package/esm/src/react/components/optimized-image/OptimizedBackgroundImage.js +1 -1
- package/esm/src/react/components/optimized-image/OptimizedImage.d.ts +1 -1
- package/esm/src/react/components/optimized-image/OptimizedImage.d.ts.map +1 -1
- package/esm/src/react/components/optimized-image/OptimizedImage.js +1 -1
- package/esm/src/react/components/optimized-image/SimpleOptimizedImage.d.ts +1 -1
- package/esm/src/react/components/optimized-image/SimpleOptimizedImage.d.ts.map +1 -1
- package/esm/src/react/components/optimized-image/utils.d.ts +1 -1
- package/esm/src/react/components/optimized-image/utils.d.ts.map +1 -1
- package/esm/src/react/components/optimized-image/utils.js +1 -1
- package/esm/src/react/components/ui/alert.d.ts +1 -1
- package/esm/src/react/components/ui/alert.d.ts.map +1 -1
- package/esm/src/react/components/ui/alert.js +1 -1
- package/esm/src/react/components/ui/app-shell.d.ts +1 -1
- package/esm/src/react/components/ui/app-shell.d.ts.map +1 -1
- package/esm/src/react/components/ui/app-shell.js +1 -1
- package/esm/src/react/components/ui/avatar.d.ts +1 -1
- package/esm/src/react/components/ui/avatar.d.ts.map +1 -1
- package/esm/src/react/components/ui/avatar.js +1 -1
- package/esm/src/react/components/ui/badge.d.ts +1 -1
- package/esm/src/react/components/ui/badge.d.ts.map +1 -1
- package/esm/src/react/components/ui/badge.js +1 -1
- package/esm/src/react/components/ui/button.d.ts +1 -1
- package/esm/src/react/components/ui/button.d.ts.map +1 -1
- package/esm/src/react/components/ui/button.js +1 -1
- package/esm/src/react/components/ui/card.d.ts +1 -1
- package/esm/src/react/components/ui/card.d.ts.map +1 -1
- package/esm/src/react/components/ui/card.js +1 -1
- package/esm/src/react/components/ui/checkbox.d.ts +1 -1
- package/esm/src/react/components/ui/checkbox.d.ts.map +1 -1
- package/esm/src/react/components/ui/checkbox.js +1 -1
- package/esm/src/react/components/ui/code-block.d.ts +1 -1
- package/esm/src/react/components/ui/code-block.d.ts.map +1 -1
- package/esm/src/react/components/ui/code-block.js +1 -1
- package/esm/src/react/components/ui/collapsible.d.ts +1 -1
- package/esm/src/react/components/ui/collapsible.d.ts.map +1 -1
- package/esm/src/react/components/ui/collapsible.js +1 -1
- package/esm/src/react/components/ui/color-mode.d.ts +2 -2
- package/esm/src/react/components/ui/color-mode.d.ts.map +1 -1
- package/esm/src/react/components/ui/color-mode.js +1 -1
- package/esm/src/react/components/ui/command.d.ts +1 -1
- package/esm/src/react/components/ui/command.d.ts.map +1 -1
- package/esm/src/react/components/ui/command.js +1 -1
- package/esm/src/react/components/ui/dialog.d.ts +1 -1
- package/esm/src/react/components/ui/dialog.d.ts.map +1 -1
- package/esm/src/react/components/ui/dialog.js +1 -1
- package/esm/src/react/components/ui/drawer.d.ts +1 -1
- package/esm/src/react/components/ui/drawer.d.ts.map +1 -1
- package/esm/src/react/components/ui/drawer.js +1 -1
- package/esm/src/react/components/ui/dropdown-menu.d.ts +1 -1
- package/esm/src/react/components/ui/dropdown-menu.d.ts.map +1 -1
- package/esm/src/react/components/ui/dropdown-menu.js +1 -1
- package/esm/src/react/components/ui/file-type.d.ts +1 -1
- package/esm/src/react/components/ui/file-type.d.ts.map +1 -1
- package/esm/src/react/components/ui/file-type.js +1 -1
- package/esm/src/react/components/ui/floating.d.ts +1 -1
- package/esm/src/react/components/ui/floating.d.ts.map +1 -1
- package/esm/src/react/components/ui/floating.js +2 -2
- package/esm/src/react/components/ui/icon-button.d.ts +1 -1
- package/esm/src/react/components/ui/icon-button.d.ts.map +1 -1
- package/esm/src/react/components/ui/icon-button.js +1 -1
- package/esm/src/react/components/ui/icons/index.d.ts +1 -1
- package/esm/src/react/components/ui/icons/index.d.ts.map +1 -1
- package/esm/src/react/components/ui/icons/index.js +1 -1
- package/esm/src/react/components/ui/input.d.ts +1 -1
- package/esm/src/react/components/ui/input.d.ts.map +1 -1
- package/esm/src/react/components/ui/input.js +1 -1
- package/esm/src/react/components/ui/label.d.ts +1 -1
- package/esm/src/react/components/ui/label.d.ts.map +1 -1
- package/esm/src/react/components/ui/label.js +1 -1
- package/esm/src/react/components/ui/list.d.ts +1 -1
- package/esm/src/react/components/ui/list.d.ts.map +1 -1
- package/esm/src/react/components/ui/list.js +1 -1
- package/esm/src/react/components/ui/pill.d.ts +1 -1
- package/esm/src/react/components/ui/pill.d.ts.map +1 -1
- package/esm/src/react/components/ui/pill.js +1 -1
- package/esm/src/react/components/ui/popover.d.ts +1 -1
- package/esm/src/react/components/ui/popover.d.ts.map +1 -1
- package/esm/src/react/components/ui/popover.js +1 -1
- package/esm/src/react/components/ui/progress-bar.d.ts +1 -1
- package/esm/src/react/components/ui/progress-bar.d.ts.map +1 -1
- package/esm/src/react/components/ui/progress-bar.js +1 -1
- package/esm/src/react/components/ui/radio.d.ts +1 -1
- package/esm/src/react/components/ui/radio.d.ts.map +1 -1
- package/esm/src/react/components/ui/radio.js +1 -1
- package/esm/src/react/components/ui/scroll-fade.d.ts +1 -1
- package/esm/src/react/components/ui/scroll-fade.d.ts.map +1 -1
- package/esm/src/react/components/ui/scroll-fade.js +1 -1
- package/esm/src/react/components/ui/select.d.ts +1 -1
- package/esm/src/react/components/ui/select.d.ts.map +1 -1
- package/esm/src/react/components/ui/select.js +1 -1
- package/esm/src/react/components/ui/shimmer.d.ts +1 -1
- package/esm/src/react/components/ui/shimmer.d.ts.map +1 -1
- package/esm/src/react/components/ui/shimmer.js +1 -1
- package/esm/src/react/components/ui/skeleton.d.ts +1 -1
- package/esm/src/react/components/ui/skeleton.d.ts.map +1 -1
- package/esm/src/react/components/ui/skeleton.js +1 -1
- package/esm/src/react/components/ui/slot.d.ts +1 -1
- package/esm/src/react/components/ui/slot.d.ts.map +1 -1
- package/esm/src/react/components/ui/slot.js +1 -1
- package/esm/src/react/components/ui/status.d.ts +1 -1
- package/esm/src/react/components/ui/status.d.ts.map +1 -1
- package/esm/src/react/components/ui/status.js +1 -1
- package/esm/src/react/components/ui/switch.d.ts +1 -1
- package/esm/src/react/components/ui/switch.d.ts.map +1 -1
- package/esm/src/react/components/ui/switch.js +1 -1
- package/esm/src/react/components/ui/tabs.d.ts +3 -3
- package/esm/src/react/components/ui/tabs.d.ts.map +1 -1
- package/esm/src/react/components/ui/tabs.js +1 -1
- package/esm/src/react/components/ui/tag.d.ts +1 -1
- package/esm/src/react/components/ui/tag.d.ts.map +1 -1
- package/esm/src/react/components/ui/tag.js +1 -1
- package/esm/src/react/components/ui/textarea.d.ts +1 -1
- package/esm/src/react/components/ui/textarea.d.ts.map +1 -1
- package/esm/src/react/components/ui/textarea.js +1 -1
- package/esm/src/react/components/ui/tokens.d.ts +1 -1
- package/esm/src/react/components/ui/tokens.d.ts.map +1 -1
- package/esm/src/react/components/ui/tokens.js +1 -1
- package/esm/src/react/components/ui/tooltip.d.ts +1 -1
- package/esm/src/react/components/ui/tooltip.d.ts.map +1 -1
- package/esm/src/react/components/ui/tooltip.js +2 -2
- package/esm/src/react/fonts/index.d.ts +1 -1
- package/esm/src/react/fonts/index.d.ts.map +1 -1
- package/esm/src/react/fonts/index.js +1 -1
- package/esm/src/react/primitives/agent-primitives.d.ts +4 -4
- package/esm/src/react/primitives/agent-primitives.d.ts.map +1 -1
- package/esm/src/react/primitives/agent-primitives.js +1 -1
- package/esm/src/react/primitives/chat-container.d.ts +2 -2
- package/esm/src/react/primitives/chat-container.d.ts.map +1 -1
- package/esm/src/react/primitives/chat-container.js +1 -1
- package/esm/src/react/primitives/input-box.d.ts +4 -4
- package/esm/src/react/primitives/input-box.d.ts.map +1 -1
- package/esm/src/react/primitives/input-box.js +1 -1
- package/esm/src/react/primitives/message-list.d.ts +5 -5
- package/esm/src/react/primitives/message-list.d.ts.map +1 -1
- package/esm/src/react/primitives/message-list.js +1 -1
- package/esm/src/react/primitives/tool-primitives.d.ts +4 -4
- package/esm/src/react/primitives/tool-primitives.d.ts.map +1 -1
- package/esm/src/react/primitives/tool-primitives.js +1 -1
- package/esm/src/react/runtime/core.d.ts +1 -1
- package/esm/src/react/runtime/core.d.ts.map +1 -1
- package/esm/src/react/runtime/core.js +1 -1
- package/esm/src/rendering/app-reserved.d.ts +1 -1
- package/esm/src/rendering/app-reserved.d.ts.map +1 -1
- package/esm/src/rendering/app-reserved.js +1 -1
- package/esm/src/rendering/component-handling.d.ts +1 -1
- package/esm/src/rendering/component-handling.d.ts.map +1 -1
- package/esm/src/rendering/element-validator/element-normalizer.d.ts +1 -1
- package/esm/src/rendering/element-validator/element-normalizer.d.ts.map +1 -1
- package/esm/src/rendering/element-validator/element-normalizer.js +1 -1
- package/esm/src/rendering/element-validator/primitive-checks.d.ts +1 -1
- package/esm/src/rendering/element-validator/primitive-checks.d.ts.map +1 -1
- package/esm/src/rendering/element-validator/primitive-checks.js +1 -1
- package/esm/src/rendering/element-validator/validator-core.d.ts +1 -1
- package/esm/src/rendering/element-validator/validator-core.d.ts.map +1 -1
- package/esm/src/rendering/layouts/layout-applicator.d.ts +1 -1
- package/esm/src/rendering/layouts/layout-applicator.d.ts.map +1 -1
- package/esm/src/rendering/layouts/utils/applicator.d.ts +1 -1
- package/esm/src/rendering/layouts/utils/applicator.d.ts.map +1 -1
- package/esm/src/rendering/layouts/utils/component-loader.d.ts +1 -1
- package/esm/src/rendering/layouts/utils/component-loader.d.ts.map +1 -1
- package/esm/src/rendering/layouts/utils/ensure-valid-child.d.ts +1 -1
- package/esm/src/rendering/layouts/utils/ensure-valid-child.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/layout.d.ts +1 -1
- package/esm/src/rendering/orchestrator/layout.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/ssr-orchestrator.d.ts +1 -1
- package/esm/src/rendering/orchestrator/ssr-orchestrator.d.ts.map +1 -1
- package/esm/src/rendering/page-renderer.d.ts +1 -1
- package/esm/src/rendering/page-renderer.d.ts.map +1 -1
- package/esm/src/rendering/page-rendering.d.ts +1 -1
- package/esm/src/rendering/page-rendering.d.ts.map +1 -1
- package/esm/src/rendering/rsc/server-renderer/component-detector.d.ts +1 -1
- package/esm/src/rendering/rsc/server-renderer/component-detector.d.ts.map +1 -1
- package/esm/src/rendering/rsc/server-renderer/rsc-renderer.d.ts +1 -1
- package/esm/src/rendering/rsc/server-renderer/rsc-renderer.d.ts.map +1 -1
- package/esm/src/rendering/rsc/server-renderer/tree-processor.d.ts +1 -1
- package/esm/src/rendering/rsc/server-renderer/tree-processor.d.ts.map +1 -1
- package/esm/src/rendering/rsc/server-renderer/tree-processor.js +1 -1
- package/esm/src/rendering/snippet-renderer.js +2 -2
- package/esm/src/rendering/ssr/component-registry.d.ts +1 -1
- package/esm/src/rendering/ssr/component-registry.d.ts.map +1 -1
- package/esm/src/rendering/ssr/component-registry.js +1 -1
- package/esm/src/rendering/ssr/mdx-renderer.d.ts +1 -1
- package/esm/src/rendering/ssr/mdx-renderer.d.ts.map +1 -1
- package/esm/src/rendering/ssr/mdx-renderer.js +1 -1
- package/esm/src/rendering/ssr/types.d.ts +1 -1
- package/esm/src/rendering/ssr/types.d.ts.map +1 -1
- package/esm/src/rendering/ssr-renderer.d.ts +1 -1
- package/esm/src/rendering/ssr-renderer.d.ts.map +1 -1
- package/esm/src/rendering/utils/react-helpers.d.ts +1 -1
- package/esm/src/rendering/utils/react-helpers.d.ts.map +1 -1
- package/esm/src/rendering/utils/react-helpers.js +1 -1
- package/esm/src/security/http/base-handler.d.ts +2 -0
- package/esm/src/security/http/base-handler.d.ts.map +1 -1
- package/esm/src/security/http/base-handler.js +1 -0
- package/esm/src/server/handlers/dev/framework-candidates.generated.d.ts.map +1 -1
- package/esm/src/server/handlers/dev/framework-candidates.generated.js +841 -596
- package/esm/src/server/handlers/request/agent-stream.handler.d.ts.map +1 -1
- package/esm/src/server/handlers/request/agent-stream.handler.js +4 -1
- package/esm/src/transforms/mdx/esm-module-loader/components/resolver.d.ts +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/components/resolver.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/jsx/runtime-loader.js +1 -1
- package/esm/src/transforms/mdx/index.d.ts +1 -1
- package/esm/src/transforms/mdx/index.d.ts.map +1 -1
- package/esm/src/transforms/mdx/index.js +1 -1
- package/esm/src/transforms/mdx/mdx-cache-adapter.js +1 -1
- package/esm/src/transforms/mdx/module-loader/types.d.ts +1 -1
- package/esm/src/transforms/mdx/module-loader/types.d.ts.map +1 -1
- package/esm/src/transforms/mdx/types.d.ts +2 -2
- package/esm/src/transforms/mdx/types.d.ts.map +1 -1
- package/esm/src/types/app.d.ts +1 -1
- package/esm/src/types/app.d.ts.map +1 -1
- package/esm/src/types/global-guards.d.ts +1 -1
- package/esm/src/types/global-guards.d.ts.map +1 -1
- package/esm/src/types/index.d.ts +1 -1
- package/esm/src/types/index.d.ts.map +1 -1
- package/esm/src/utils/id.d.ts +7 -0
- package/esm/src/utils/id.d.ts.map +1 -1
- package/esm/src/utils/id.js +22 -0
- package/esm/src/utils/version-constant.d.ts +1 -1
- package/esm/src/utils/version-constant.js +1 -1
- package/esm/src/workflow/claude-code/react/use-claude-code-stream.js +1 -1
- package/esm/src/workflow/claude-code/react/use-claude-code-websocket.js +1 -1
- package/esm/src/workflow/react/use-approval.js +1 -1
- package/esm/src/workflow/react/use-workflow-list.js +1 -1
- package/esm/src/workflow/react/use-workflow-start.js +1 -1
- package/esm/src/workflow/react/use-workflow.js +1 -1
- package/package.json +4 -5
- package/esm/deps/esm.sh/react-dom@19.2.4/client.d.ts +0 -3
- package/esm/deps/esm.sh/react-dom@19.2.4/client.d.ts.map +0 -1
- package/esm/deps/esm.sh/react-dom@19.2.4/client.js +0 -3
- package/esm/deps/esm.sh/react-dom@19.2.4/server.d.ts +0 -3
- package/esm/deps/esm.sh/react-dom@19.2.4/server.d.ts.map +0 -1
- package/esm/deps/esm.sh/react-dom@19.2.4/server.js +0 -3
- package/esm/deps/esm.sh/react-dom@19.2.4.d.ts +0 -3
- package/esm/deps/esm.sh/react-dom@19.2.4.d.ts.map +0 -1
- package/esm/deps/esm.sh/react-dom@19.2.4.js +0 -3
- package/esm/deps/esm.sh/react@19.2.4/jsx-dev-runtime.d.ts +0 -3
- package/esm/deps/esm.sh/react@19.2.4/jsx-dev-runtime.d.ts.map +0 -1
- package/esm/deps/esm.sh/react@19.2.4/jsx-dev-runtime.js +0 -3
- package/esm/deps/esm.sh/react@19.2.4/jsx-runtime.d.ts +0 -3
- package/esm/deps/esm.sh/react@19.2.4/jsx-runtime.d.ts.map +0 -1
- package/esm/deps/esm.sh/react@19.2.4/jsx-runtime.js +0 -3
- package/esm/deps/esm.sh/react@19.2.4.d.ts +0 -3
- package/esm/deps/esm.sh/react@19.2.4.d.ts.map +0 -1
- package/esm/deps/esm.sh/react@19.2.4.js +0 -3
- package/esm/deps/esm.sh/scheduler@^0.27.0.d.ts +0 -3
- package/esm/deps/esm.sh/scheduler@^0.27.0.d.ts.map +0 -1
- package/esm/deps/esm.sh/scheduler@^0.27.0.js +0 -3
- package/esm/react/jsx-dev-runtime.d.ts +0 -2
- package/esm/react/jsx-dev-runtime.d.ts.map +0 -1
- package/esm/react/jsx-dev-runtime.js +0 -1
- package/esm/react/jsx-runtime.d.ts +0 -2
- package/esm/react/jsx-runtime.d.ts.map +0 -1
- package/esm/react/jsx-runtime.js +0 -1
- package/esm/react/react-dom-client.d.ts +0 -3
- package/esm/react/react-dom-client.d.ts.map +0 -1
- package/esm/react/react-dom-client.js +0 -2
- package/esm/react/react-dom-server.d.ts +0 -3
- package/esm/react/react-dom-server.d.ts.map +0 -1
- package/esm/react/react-dom-server.js +0 -2
- package/esm/react/react-dom.d.ts +0 -3
- package/esm/react/react-dom.d.ts.map +0 -1
- package/esm/react/react-dom.js +0 -2
- package/esm/react/react.d.ts +0 -6
- package/esm/react/react.d.ts.map +0 -1
- package/esm/react/react.js +0 -7
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* - cloud: server-side provider inference
|
|
9
9
|
* - server-local: explicit local model on the server
|
|
10
10
|
*/
|
|
11
|
-
import { useCallback, useEffect, useRef, useState } from "
|
|
11
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
12
12
|
import { createError, ensureError, toError } from "../../../errors/veryfront-error.js";
|
|
13
13
|
import { handleAgUiStreamingResponse } from "./streaming/index.js";
|
|
14
14
|
import { generateClientId } from "./utils.js";
|
|
@@ -53,6 +53,15 @@ export function resolveUseChatStreamHandler(transport) {
|
|
|
53
53
|
*/
|
|
54
54
|
const DEFAULT_CHAT_API = "/api/ag-ui";
|
|
55
55
|
export function useChat(options = {}) {
|
|
56
|
+
const { reset, ...chat } = useChatState(options);
|
|
57
|
+
void reset;
|
|
58
|
+
return chat;
|
|
59
|
+
}
|
|
60
|
+
/** @internal Chat session with the reset capability used by conversation hosts. */
|
|
61
|
+
export function useChatWithSessionReset(options = {}) {
|
|
62
|
+
return useChatState(options);
|
|
63
|
+
}
|
|
64
|
+
function useChatState(options) {
|
|
56
65
|
const api = options.api ?? DEFAULT_CHAT_API;
|
|
57
66
|
const [messages, setMessages] = useState(options.initialMessages ?? []);
|
|
58
67
|
const messagesRef = useRef(messages);
|
|
@@ -71,12 +80,15 @@ export function useChat(options = {}) {
|
|
|
71
80
|
const branchKeyByMessageIdRef = useRef(new Map());
|
|
72
81
|
// Track pending tool outputs for addToolOutput
|
|
73
82
|
const pendingToolOutputsRef = useRef(new Map());
|
|
83
|
+
const invalidateActiveRequest = useCallback(() => {
|
|
84
|
+
requestIdRef.current++;
|
|
85
|
+
abortControllerRef.current?.abort();
|
|
86
|
+
abortControllerRef.current = null;
|
|
87
|
+
}, []);
|
|
74
88
|
// Abort in-flight request on unmount
|
|
75
89
|
useEffect(() => {
|
|
76
|
-
return
|
|
77
|
-
|
|
78
|
-
};
|
|
79
|
-
}, []);
|
|
90
|
+
return invalidateActiveRequest;
|
|
91
|
+
}, [invalidateActiveRequest]);
|
|
80
92
|
/**
|
|
81
93
|
* Add tool output to pending tool-call parts.
|
|
82
94
|
* Call from onToolCall to provide results (don't await)
|
|
@@ -154,6 +166,8 @@ export function useChat(options = {}) {
|
|
|
154
166
|
message,
|
|
155
167
|
}));
|
|
156
168
|
}
|
|
169
|
+
if (!isLatestRequest(requestIdRef.current, requestId))
|
|
170
|
+
return;
|
|
157
171
|
options.onResponse?.(response);
|
|
158
172
|
if (!response.body)
|
|
159
173
|
return;
|
|
@@ -162,15 +176,19 @@ export function useChat(options = {}) {
|
|
|
162
176
|
const currentMessageIdRef = { current: streamingMessageId };
|
|
163
177
|
// Mutable local — updated by onData before onMessage/onUpdate use it.
|
|
164
178
|
let serverModel = model;
|
|
165
|
-
setActiveModel(undefined);
|
|
179
|
+
setActiveModel((current) => isLatestRequest(requestIdRef.current, requestId) ? undefined : current);
|
|
166
180
|
const handleResponse = resolveUseChatStreamHandler(options.transport);
|
|
167
181
|
await handleResponse(response.body, {
|
|
168
182
|
onMessage: (assistantMessage) => {
|
|
183
|
+
if (!isLatestRequest(requestIdRef.current, requestId))
|
|
184
|
+
return;
|
|
169
185
|
const withMeta = {
|
|
170
186
|
...assistantMessage,
|
|
171
187
|
metadata: { ...assistantMessage.metadata, model: serverModel },
|
|
172
188
|
};
|
|
173
189
|
setMessages((prev) => {
|
|
190
|
+
if (!isLatestRequest(requestIdRef.current, requestId))
|
|
191
|
+
return prev;
|
|
174
192
|
if (!hasAddedStreamingMessage)
|
|
175
193
|
return [...prev, withMeta];
|
|
176
194
|
return prev.map((m) => (m.id === currentMessageIdRef.current
|
|
@@ -185,59 +203,76 @@ export function useChat(options = {}) {
|
|
|
185
203
|
options.onFinish?.(withMeta);
|
|
186
204
|
},
|
|
187
205
|
onData: (eventData) => {
|
|
188
|
-
|
|
206
|
+
if (!isLatestRequest(requestIdRef.current, requestId))
|
|
207
|
+
return;
|
|
208
|
+
setData((current) => isLatestRequest(requestIdRef.current, requestId) ? eventData : current);
|
|
189
209
|
// Detect inference mode and resolved model from server metadata
|
|
190
210
|
if (eventData &&
|
|
191
211
|
typeof eventData === "object" &&
|
|
192
212
|
"inferenceMode" in eventData) {
|
|
193
213
|
const d = eventData;
|
|
194
214
|
if (d.inferenceMode === "server-local" || d.inferenceMode === "cloud") {
|
|
195
|
-
|
|
215
|
+
const nextInferenceMode = d.inferenceMode;
|
|
216
|
+
setInferenceMode((current) => isLatestRequest(requestIdRef.current, requestId) ? nextInferenceMode : current);
|
|
196
217
|
}
|
|
197
218
|
if (d.model) {
|
|
198
219
|
serverModel = d.model;
|
|
199
|
-
setActiveModel(d.model);
|
|
220
|
+
setActiveModel((current) => isLatestRequest(requestIdRef.current, requestId) ? d.model : current);
|
|
200
221
|
}
|
|
201
222
|
}
|
|
202
223
|
},
|
|
203
224
|
onUpdate: (parts, messageId, messageMetadata) => {
|
|
225
|
+
if (!isLatestRequest(requestIdRef.current, requestId))
|
|
226
|
+
return;
|
|
204
227
|
const id = messageId ?? streamingMessageId;
|
|
205
228
|
const metadata = { ...messageMetadata, model: serverModel };
|
|
206
229
|
if (messageId && messageId !== currentMessageIdRef.current) {
|
|
207
230
|
const oldId = currentMessageIdRef.current;
|
|
208
231
|
currentMessageIdRef.current = messageId;
|
|
209
232
|
if (hasAddedStreamingMessage) {
|
|
210
|
-
setMessages((prev) =>
|
|
211
|
-
?
|
|
212
|
-
|
|
233
|
+
setMessages((prev) => isLatestRequest(requestIdRef.current, requestId)
|
|
234
|
+
? prev.map((m) => m.id === oldId
|
|
235
|
+
? { ...m, id, parts, metadata: { ...m.metadata, ...metadata } }
|
|
236
|
+
: m)
|
|
237
|
+
: prev);
|
|
213
238
|
return;
|
|
214
239
|
}
|
|
215
240
|
}
|
|
216
241
|
if (!hasAddedStreamingMessage) {
|
|
217
242
|
hasAddedStreamingMessage = true;
|
|
218
|
-
setMessages((prev) =>
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
243
|
+
setMessages((prev) => isLatestRequest(requestIdRef.current, requestId)
|
|
244
|
+
? [
|
|
245
|
+
...prev,
|
|
246
|
+
{
|
|
247
|
+
id,
|
|
248
|
+
role: "assistant",
|
|
249
|
+
parts,
|
|
250
|
+
metadata,
|
|
251
|
+
// Stamp when the turn first appears; `onMessage` preserves it.
|
|
252
|
+
createdAt: new Date().toISOString(),
|
|
253
|
+
},
|
|
254
|
+
]
|
|
255
|
+
: prev);
|
|
229
256
|
return;
|
|
230
257
|
}
|
|
231
|
-
setMessages((prev) =>
|
|
232
|
-
?
|
|
233
|
-
|
|
258
|
+
setMessages((prev) => isLatestRequest(requestIdRef.current, requestId)
|
|
259
|
+
? prev.map((m) => m.id === currentMessageIdRef.current
|
|
260
|
+
? { ...m, parts, metadata: { ...m.metadata, ...metadata } }
|
|
261
|
+
: m)
|
|
262
|
+
: prev);
|
|
234
263
|
},
|
|
235
|
-
onToolCall: options.onToolCall
|
|
264
|
+
onToolCall: options.onToolCall
|
|
265
|
+
? (arg) => isLatestRequest(requestIdRef.current, requestId)
|
|
266
|
+
? options.onToolCall?.(arg)
|
|
267
|
+
: undefined
|
|
268
|
+
: undefined,
|
|
236
269
|
});
|
|
237
270
|
}
|
|
238
271
|
catch (error) {
|
|
239
272
|
if (error instanceof Error && error.name === "AbortError")
|
|
240
273
|
return;
|
|
274
|
+
if (!isLatestRequest(requestIdRef.current, requestId))
|
|
275
|
+
return;
|
|
241
276
|
const nextError = ensureError(error);
|
|
242
277
|
setError(nextError);
|
|
243
278
|
options.onError?.(nextError);
|
|
@@ -273,10 +308,31 @@ export function useChat(options = {}) {
|
|
|
273
308
|
* Stop generation
|
|
274
309
|
*/
|
|
275
310
|
const stop = useCallback(() => {
|
|
276
|
-
|
|
277
|
-
|
|
311
|
+
// Abort cannot retract a chunk that was already decoded. Advancing the
|
|
312
|
+
// request id also fences callbacks and state updaters queued by that chunk.
|
|
313
|
+
invalidateActiveRequest();
|
|
278
314
|
setIsLoading(false);
|
|
279
|
-
}, []);
|
|
315
|
+
}, [invalidateActiveRequest]);
|
|
316
|
+
/**
|
|
317
|
+
* Reset state that belongs to one conversation while preserving the hook
|
|
318
|
+
* instance. This gives conversation hosts the same isolation as remounting
|
|
319
|
+
* `useChat`, including branch metadata that cannot be inferred from messages.
|
|
320
|
+
*/
|
|
321
|
+
const reset = useCallback((nextMessages = []) => {
|
|
322
|
+
invalidateActiveRequest();
|
|
323
|
+
messagesRef.current = nextMessages;
|
|
324
|
+
branchMapRef.current.clear();
|
|
325
|
+
branchKeyByMessageIdRef.current.clear();
|
|
326
|
+
pendingToolOutputsRef.current.clear();
|
|
327
|
+
setMessages(nextMessages);
|
|
328
|
+
setInput("");
|
|
329
|
+
setIsLoading(false);
|
|
330
|
+
setError(null);
|
|
331
|
+
setData(null);
|
|
332
|
+
setModel(options.model);
|
|
333
|
+
setInferenceMode("cloud");
|
|
334
|
+
setActiveModel(undefined);
|
|
335
|
+
}, [invalidateActiveRequest, options.model]);
|
|
280
336
|
/**
|
|
281
337
|
* Edit a previous user message and resubmit.
|
|
282
338
|
* Saves the current messages from the edit point as a branch so the user
|
|
@@ -403,14 +459,11 @@ export function useChat(options = {}) {
|
|
|
403
459
|
switchBranch,
|
|
404
460
|
reload,
|
|
405
461
|
stop,
|
|
462
|
+
reset,
|
|
406
463
|
setMessages,
|
|
407
464
|
addToolOutput,
|
|
408
465
|
data,
|
|
409
466
|
handleInputChange,
|
|
410
467
|
handleSubmit,
|
|
411
|
-
// Aliases that match ChatProps so users can spread {...chat}
|
|
412
|
-
onChange: handleInputChange,
|
|
413
|
-
onSubmit: handleSubmit,
|
|
414
|
-
onModelChange: setModel,
|
|
415
468
|
};
|
|
416
469
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Single text completion with streaming support.
|
|
5
5
|
*/
|
|
6
|
-
import { useCallback, useRef, useState } from "
|
|
6
|
+
import { useCallback, useRef, useState } from "react";
|
|
7
7
|
import { createError, toError } from "../../errors/veryfront-error.js";
|
|
8
8
|
/**
|
|
9
9
|
* useCompletion hook for single text generation
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useCallback, useRef, useState } from "
|
|
1
|
+
import { useCallback, useRef, useState } from "react";
|
|
2
2
|
import { createError, toError } from "../../errors/veryfront-error.js";
|
|
3
3
|
/** React hook for streaming. */
|
|
4
4
|
export function useStreaming(options) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as React from "
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
/** Input payload for use voice. */
|
|
3
3
|
export function useVoiceInput(options = {}) {
|
|
4
4
|
const { language, continuous = false, interimResults = true, onTranscript, onError, onStart, onEnd, } = options;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../src/src/cache/backends/api.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../src/src/cache/backends/api.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAsDhD,qBAAa,eAAgB,YAAW,YAAY;IAClD,QAAQ,CAAC,IAAI,EAAG,KAAK,CAAU;IAC/B,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,cAAc,CAAC;gBAGrB,OAAO,GAAE;QACP,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;KACxB;IAiBR,OAAO,CAAC,SAAS;YAIH,OAAO;IAyGf,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAQxC,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC;YAuBrD,eAAe;IAKvB,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,SAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQhE,QAAQ,CAAC,OAAO,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAYrF,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI/B,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAMrD"}
|
|
@@ -66,13 +66,16 @@ export class ApiCacheBackend {
|
|
|
66
66
|
const reqCtx = getCurrentRequestContext();
|
|
67
67
|
const hostToken = getHostEnv("VERYFRONT_API_TOKEN");
|
|
68
68
|
const envToken = getEnvValue("VERYFRONT_API_TOKEN");
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
69
|
+
const verifiedRequestToken = reqCtx?.tokenTrust === "verified-control-plane"
|
|
70
|
+
? reqCtx.token
|
|
71
|
+
: undefined;
|
|
72
|
+
// Ordinary proxy headers are not cache credentials. Only a request token
|
|
73
|
+
// explicitly marked after control-plane verification may override the host.
|
|
74
|
+
const token = verifiedRequestToken || hostToken || envToken || null;
|
|
75
|
+
const tokenSource = verifiedRequestToken
|
|
76
|
+
? "verified-control-plane"
|
|
77
|
+
: hostToken
|
|
78
|
+
? "host-env"
|
|
76
79
|
: envToken
|
|
77
80
|
? "env"
|
|
78
81
|
: "none";
|
package/esm/src/chat/index.d.ts
CHANGED
|
@@ -9,14 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* export default function Page() {
|
|
11
11
|
* const chat = useChat();
|
|
12
|
-
* return
|
|
13
|
-
* <Chat
|
|
14
|
-
* messages={chat.messages}
|
|
15
|
-
* input={chat.input}
|
|
16
|
-
* onChange={chat.handleInputChange}
|
|
17
|
-
* onSubmit={chat.handleSubmit}
|
|
18
|
-
* />
|
|
19
|
-
* );
|
|
12
|
+
* return <Chat chat={chat} />;
|
|
20
13
|
* }
|
|
21
14
|
* ```
|
|
22
15
|
*
|
|
@@ -47,17 +40,17 @@
|
|
|
47
40
|
* </Message.Root>
|
|
48
41
|
* ```
|
|
49
42
|
*/
|
|
50
|
-
export { Chat,
|
|
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
|
|
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,
|
|
43
|
+
export { Chat, type ChatAgentInfo, type ChatProps, } from "../react/components/chat/chat.js";
|
|
44
|
+
export { ChatEmpty, type ChatEmptyProps, ChatEmptyState, type ChatEmptyStateAvatarProps, type ChatEmptyStateHeadingProps, type ChatEmptyStateRootProps, type ChatEmptyStateSuggestionProps, type ChatEmptyStateSuggestionsProps, ChatIf, type ChatIfProps, ChatMessageList, type ChatMessageListContentProps, type ChatMessageListProps, ChatRoot, type ChatRootProps, ErrorBanner, type ErrorBannerProps, Message, type MessageProps, type MessageRootProps, type MessageTokensProps, ModelAvatar, type ModelAvatarProps, type TokenRowProps, } from "../react/components/chat/chat.js";
|
|
45
|
+
export { ChatContextProvider, type ChatContextValue, ComposerContextProvider, type ComposerContextValue, MessageContextProvider, type MessageContextValue, type MessagePartsData, useChatContext, useChatContextOptional, useComposerContext, useComposerContextOptional, useMessageContext, useMessageContextOptional, useMessageParts, } from "../react/components/chat/chat.js";
|
|
46
|
+
export { AgentAvatar, type AgentAvatarProps, type AttachmentInfo, AttachmentsPanel, type AttachmentsPanelActionProps, type AttachmentsPanelContextValue, type AttachmentsPanelEmptyProps, type AttachmentsPanelItemProps, type AttachmentsPanelListProps, type AttachmentsPanelLoadingProps, type AttachmentsPanelProps, BranchPicker, type BranchPickerActionProps, type BranchPickerCountProps, type BranchPickerProps, ChatMessagesSkeleton, type ChatMessagesSkeletonProps, ChatSidebar, type ChatSidebarComponent, type ChatSidebarEmptyProps, type ChatSidebarGroupProps, 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 InlineCitationCardProps, type InlineCitationProps, type InlineCitationTriggerProps, isReasoningPart, isSkillToolPart, isToolPart, Loader, MessageActionBar, type MessageActionBarActionProps, type MessageActionBarProps, MessageEditForm, type MessageEditFormProps, MessageFeedback, type MessageFeedbackActionProps, type MessageFeedbackProps, type ModelOption, ModelSelector, type ModelSelectorContentProps, type ModelSelectorContextValue, type ModelSelectorItemProps, type ModelSelectorProps, type ModelSelectorSearchProps, type ModelSelectorTriggerProps, type PartGroup, type QuickAction, QuickActions, type QuickActionsProps, 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, 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";
|
|
47
|
+
export { type Conversation, type ConversationPatch, ConversationsContextProvider, ConversationsProvider, type ConversationsProviderProps, type ConversationStore, type ConversationSummary, localConversationStore, memoryConversationStore, type StorageLike, useConversation, useConversationChat, type UseConversationChatOptions, type UseConversationChatResult, type UseConversationOptions, type UseConversationResult, useConversations, useConversationsContext, useConversationsContextOptional, type UseConversationsOptions, type UseConversationsResult, } from "../react/components/chat/chat.js";
|
|
48
|
+
export { AttachmentPill, type AttachmentPillContextValue, type AttachmentPillProps, ChatInput, type ChatInputExportProps, type ChatInputProps, Reasoning, type ReasoningContextValue, type ReasoningProps, type ReasoningTriggerProps, ToolCall, type ToolCallContextValue, type ToolCallProps, type ToolCallTriggerProps, useAttachmentPill, useReasoning, useToolCall, } from "../react/components/chat/chat.js";
|
|
56
49
|
export { Markdown, type MarkdownProps } from "../react/components/chat/markdown.js";
|
|
57
50
|
export { AppShell, type AppShellHeaderProps, type AppShellOpenState, type AppShellProps, type AppShellSide, type AppShellSidebarProps, type AppShellTriggerProps, useAppShell, } from "../react/components/ui/app-shell.js";
|
|
58
51
|
export { Tabs, TabsItem, type TabsItemProps, type TabsProps, } from "../react/components/ui/tabs.js";
|
|
59
52
|
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";
|
|
53
|
+
export { type AgentOption, AgentPicker, type AgentPickerActionProps, type AgentPickerContentProps, type AgentPickerContextValue, type AgentPickerItemProps, type AgentPickerProps, type AgentPickerSearchProps, type AgentPickerSection, type AgentPickerTriggerProps, useAgentPicker, } from "../react/components/chat/agent-picker.js";
|
|
61
54
|
export { agentsToPickerOptions, ChatAgentPicker, type ChatAgentPickerProps, } from "../react/components/chat/chat-agent-picker.js";
|
|
62
55
|
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
56
|
export { CodeBlock, CodeSurface, type CodeSurfaceProps, CopyButton, type CopyButtonProps, useClipboard, type UseClipboardResult, } from "../react/components/ui/code-block.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/src/chat/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/src/chat/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,OAAO,yBAAyB,CAAC;AAGjC,OAAO,EACL,IAAI,EACJ,KAAK,aAAa,EAClB,KAAK,SAAS,GACf,MAAM,kCAAkC,CAAC;AAE1C,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,2BAA2B,EAChC,KAAK,oBAAoB,EACzB,QAAQ,EACR,KAAK,aAAa,EAClB,WAAW,EACX,KAAK,gBAAgB,EACrB,OAAO,EACP,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,WAAW,EACX,KAAK,gBAAgB,EACrB,KAAK,aAAa,GACnB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EACL,mBAAmB,EACnB,KAAK,gBAAgB,EACrB,uBAAuB,EACvB,KAAK,oBAAoB,EACzB,sBAAsB,EACtB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,cAAc,EACd,sBAAsB,EACtB,kBAAkB,EAClB,0BAA0B,EAC1B,iBAAiB,EACjB,yBAAyB,EACzB,eAAe,GAChB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EACL,WAAW,EACX,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,gBAAgB,EAChB,KAAK,2BAA2B,EAChC,KAAK,4BAA4B,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ClC,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
|
@@ -9,14 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* export default function Page() {
|
|
11
11
|
* const chat = useChat();
|
|
12
|
-
* return
|
|
13
|
-
* <Chat
|
|
14
|
-
* messages={chat.messages}
|
|
15
|
-
* input={chat.input}
|
|
16
|
-
* onChange={chat.handleInputChange}
|
|
17
|
-
* onSubmit={chat.handleSubmit}
|
|
18
|
-
* />
|
|
19
|
-
* );
|
|
12
|
+
* return <Chat chat={chat} />;
|
|
20
13
|
* }
|
|
21
14
|
* ```
|
|
22
15
|
*
|
|
@@ -47,19 +40,17 @@
|
|
|
47
40
|
* </Message.Root>
|
|
48
41
|
* ```
|
|
49
42
|
*/
|
|
50
|
-
export { Chat,
|
|
43
|
+
export { Chat, } from "../react/components/chat/chat.js";
|
|
51
44
|
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,
|
|
45
|
+
export { ChatContextProvider, ComposerContextProvider, MessageContextProvider, useChatContext, useChatContextOptional, useComposerContext, useComposerContextOptional, useMessageContext, useMessageContextOptional, useMessageParts, } from "../react/components/chat/chat.js";
|
|
46
|
+
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, RichCodeBlock, Shimmer, SkillBadge, SourcePill, Sources, StepIndicator, Suggestion, Suggestions, TabSwitcher, ToolStatusBadge, useAttachmentsPanel, useModelSelector, useSources, useStepIndicator, useStickToBottom, useUpload, useUploadsRegistry, } from "../react/components/chat/chat.js";
|
|
54
47
|
// Conversation persistence adapters — swappable async stores behind the
|
|
55
48
|
// (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";
|
|
49
|
+
export { ConversationsContextProvider, ConversationsProvider, localConversationStore, memoryConversationStore, useConversation, useConversationChat, useConversations, useConversationsContext, useConversationsContextOptional, } from "../react/components/chat/chat.js";
|
|
57
50
|
// ---------------------------------------------------------------------------
|
|
58
|
-
//
|
|
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.
|
|
51
|
+
// Canonical component names.
|
|
61
52
|
// ---------------------------------------------------------------------------
|
|
62
|
-
export { AttachmentPill,
|
|
53
|
+
export { AttachmentPill, ChatInput, Reasoning, ToolCall, useAttachmentPill, useReasoning, useToolCall, } from "../react/components/chat/chat.js";
|
|
63
54
|
export { Markdown } from "../react/components/chat/markdown.js";
|
|
64
55
|
// Layout primitives — chat-independent, re-exported from the `veryfront/ui`
|
|
65
56
|
// package (their home) so consuming apps can compose their own shell (sidebar
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../src/src/modules/component-registry/registry.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,KAAK,KAAK,KAAK,MAAM,
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../src/src/modules/component-registry/registry.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAGpC,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,gBAAgB,CAAC;CAC5B;AAED,MAAM,WAAW,wBAAwB;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,OAAO,EAAE,cAAc,CAAC;IAC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C7B,KAAK,CAAC;QACJ,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC,CACH;CA2BF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type * as React from "
|
|
1
|
+
import type * as React from "react";
|
|
2
2
|
import type { RuntimeAdapter } from "../../platform/adapters/base.js";
|
|
3
3
|
import type { LoadComponentOptions } from "./types.js";
|
|
4
4
|
export declare function loadModuleFromSource(source: string, filePath: string, projectDir: string, adapter: RuntimeAdapter, options?: LoadComponentOptions): Promise<Record<string, unknown>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-loader.d.ts","sourceRoot":"","sources":["../../../../src/src/modules/react-loader/component-loader.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,KAAK,MAAM,
|
|
1
|
+
{"version":3,"file":"component-loader.d.ts","sourceRoot":"","sources":["../../../../src/src/modules/react-loader/component-loader.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAKtE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAMvD,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,cAAc,EACvB,OAAO,CAAC,EAAE,oBAAoB,GAC7B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CA2DlC;AAED,wBAAsB,uBAAuB,CAC3C,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,cAAc,EACvB,OAAO,CAAC,EAAE,oBAAoB,GAC7B,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAGvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extract-component.d.ts","sourceRoot":"","sources":["../../../../src/src/modules/react-loader/extract-component.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,
|
|
1
|
+
{"version":3,"file":"extract-component.d.ts","sourceRoot":"","sources":["../../../../src/src/modules/react-loader/extract-component.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAGpC,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,OAAO,EACZ,QAAQ,EAAE,MAAM,GACf,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CA0B9C"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @module module-system/react-loader/ssr-module-loader/loader
|
|
7
7
|
*/
|
|
8
|
-
import type * as React from "
|
|
8
|
+
import type * as React from "react";
|
|
9
9
|
import type { SSRModuleLoaderOptions } from "./types.js";
|
|
10
10
|
/**
|
|
11
11
|
* SSR Module Loader with Redis Support.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../../../src/src/modules/react-loader/ssr-module-loader/loader.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,KAAK,KAAK,MAAM,
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../../../src/src/modules/react-loader/ssr-module-loader/loader.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAqCpC,OAAO,KAAK,EAAoB,sBAAsB,EAAE,MAAM,YAAY,CAAC;AA4B3E;;;;;GAKG;AACH,qBAAa,eAAe;IAKd,OAAO,CAAC,OAAO;IAJ3B,OAAO,CAAC,KAAK,CAAkB;IAC/B,OAAO,CAAC,cAAc,CAA2B;IACjD,OAAO,CAAC,YAAY,CAAyB;gBAEzB,OAAO,EAAE,sBAAsB;YAYrC,qBAAqB;YAgDrB,0BAA0B;IA0HxC,OAAO,CAAC,wBAAwB;YAelB,0BAA0B;IAkBxC,OAAO,CAAC,wBAAwB;IAMhC,OAAO,CAAC,kCAAkC;IAY1C,aAAa,CACX,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAwD7B,UAAU,CACd,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;YAK1C,2BAA2B;IAYzC,OAAO,CAAC,yBAAyB;YAkBnB,2BAA2B;CAiW1C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/src/modules/react-loader/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/src/modules/react-loader/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC,MAAM,WAAW,oBAAoB;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6DAA6D;IAC7D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mFAAmF;IACnF,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,wEAAwE;IACxE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,yDAAyD;IACzD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kEAAkE;IAClE,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -2,8 +2,9 @@ import type { DirectoryEntry, FSAdapter, FSAdapterConfig } from "./types.js";
|
|
|
2
2
|
import type { FileInfo, ResolveFileOptions } from "../../base.js";
|
|
3
3
|
import { ProxyFSAdapterManager } from "./proxy-manager.js";
|
|
4
4
|
import type { VeryfrontFSAdapter } from "./adapter.js";
|
|
5
|
+
import { type RequestTokenTrust } from "./request-context.js";
|
|
5
6
|
export { clearRequestScopedFileCache, getCurrentRequestContext, getRequestScopedFile, runWithRequestContext, setRequestScopedFile, wrapWithCurrentContext, } from "./request-context.js";
|
|
6
|
-
export type { RequestContext } from "./request-context.js";
|
|
7
|
+
export type { RequestContext, RequestTokenTrust } from "./request-context.js";
|
|
7
8
|
export declare class MultiProjectFSAdapter implements FSAdapter {
|
|
8
9
|
private manager;
|
|
9
10
|
private defaultAdapter?;
|
|
@@ -13,6 +14,7 @@ export declare class MultiProjectFSAdapter implements FSAdapter {
|
|
|
13
14
|
releaseId?: string | null;
|
|
14
15
|
branch?: string | null;
|
|
15
16
|
environmentName?: string | null;
|
|
17
|
+
tokenTrust?: RequestTokenTrust;
|
|
16
18
|
}): Promise<T>;
|
|
17
19
|
setRequestContext(projectSlug: string, token: string): void;
|
|
18
20
|
setProductionMode(_enabled: boolean, _releaseId?: string | null): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multi-project-adapter.d.ts","sourceRoot":"","sources":["../../../../../../src/src/platform/adapters/fs/veryfront/multi-project-adapter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7E,OAAO,KAAK,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"multi-project-adapter.d.ts","sourceRoot":"","sources":["../../../../../../src/src/platform/adapters/fs/veryfront/multi-project-adapter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7E,OAAO,KAAK,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvD,OAAO,EAIL,KAAK,iBAAiB,EACvB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,2BAA2B,EAC3B,wBAAwB,EACxB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAQ9E,qBAAa,qBAAsB,YAAW,SAAS;IACrD,OAAO,CAAC,OAAO,CAAwB;IACvC,OAAO,CAAC,cAAc,CAAC,CAAqB;gBAEhC,MAAM,EAAE,eAAe;IAanC,cAAc,CAAC,CAAC,EACd,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,EACb,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACpB,SAAS,CAAC,EA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AAO,CAAC,IAAI,CAAC;IAY3D,OAAO,IAAI,IAAI;IAOf,eAAe,IAAI,UAAU,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;IAI1D,cAAc,IAAI,OAAO,CAAC,UAAU,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAC,GAAG,SAAS,CAAC;IAUvF,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAUpE,iBAAiB,IAAI,OAAO,CAAC,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAoB9E;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,IAAI,qBAAqB,CAExF"}
|
|
@@ -40,6 +40,7 @@ export class MultiProjectFSAdapter {
|
|
|
40
40
|
projectSlug,
|
|
41
41
|
projectId,
|
|
42
42
|
token,
|
|
43
|
+
tokenTrust: options?.tokenTrust,
|
|
43
44
|
productionMode,
|
|
44
45
|
releaseId: productionMode ? releaseId : null,
|
|
45
46
|
branch: productionMode ? null : branch,
|
|
@@ -71,6 +72,7 @@ export class MultiProjectFSAdapter {
|
|
|
71
72
|
return;
|
|
72
73
|
store.projectSlug = projectSlug;
|
|
73
74
|
store.token = token;
|
|
75
|
+
store.tokenTrust = undefined;
|
|
74
76
|
}
|
|
75
77
|
setProductionMode(_enabled, _releaseId) {
|
|
76
78
|
// No-op: In proxy mode, productionMode/releaseId are passed via runWithContext().
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
2
|
+
export type RequestTokenTrust = "verified-control-plane";
|
|
2
3
|
export interface RequestContext {
|
|
3
4
|
projectSlug: string;
|
|
4
5
|
projectId?: string;
|
|
5
6
|
token: string;
|
|
7
|
+
/** Trust marker set only after the control-plane request signature is verified. */
|
|
8
|
+
tokenTrust?: RequestTokenTrust;
|
|
6
9
|
productionMode: boolean;
|
|
7
10
|
/** Release ID for production mode (mutually exclusive with branch) */
|
|
8
11
|
releaseId?: string | null;
|
|
@@ -40,6 +43,7 @@ export declare function clearRequestScopedFileCache(): number;
|
|
|
40
43
|
export declare function runWithRequestContext<T>(options: {
|
|
41
44
|
projectSlug: string;
|
|
42
45
|
token: string;
|
|
46
|
+
tokenTrust?: RequestTokenTrust;
|
|
43
47
|
projectId?: string;
|
|
44
48
|
productionMode?: boolean;
|
|
45
49
|
releaseId?: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request-context.d.ts","sourceRoot":"","sources":["../../../../../../src/src/platform/adapters/fs/veryfront/request-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,OAAO,CAAC;IACxB,sEAAsE;IACtE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,uEAAuE;IACvE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,2EAA2E;IAC3E,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC;;;;OAIG;IACH,SAAS,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC;AAED,eAAO,MAAM,iBAAiB,mCAA0C,CAAC;AAEzE,wBAAgB,wBAAwB,IAAI,cAAc,GAAG,IAAI,CAEhE;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,OAAO,EAAE,EAAE,EAAE,CAAC,GAAG,CAAC,CAOxF;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAEzE;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAE5E;AAED,wBAAgB,2BAA2B,IAAI,MAAM,CAKpD;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,EACrC,OAAO,EAAE;IACP,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC,EACD,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GACnB,OAAO,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"request-context.d.ts","sourceRoot":"","sources":["../../../../../../src/src/platform/adapters/fs/veryfront/request-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,MAAM,MAAM,iBAAiB,GAAG,wBAAwB,CAAC;AAEzD,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,mFAAmF;IACnF,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B,cAAc,EAAE,OAAO,CAAC;IACxB,sEAAsE;IACtE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,uEAAuE;IACvE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,2EAA2E;IAC3E,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC;;;;OAIG;IACH,SAAS,CAAC,EAAE,GAAG,CAA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E,MAAM,MAAM,CAAC;CAC3C;AAED,OAAO,CAAC,MAAM,CAAC;IACb,IAAI,0BAA0B,EAAE,2BAA2B,GAAG,SAAS,CAAC;CACzE"}
|
|
@@ -43,6 +43,7 @@ export function runWithRequestContext(options, fn) {
|
|
|
43
43
|
projectSlug: options.projectSlug,
|
|
44
44
|
projectId: options.projectId,
|
|
45
45
|
token: options.token,
|
|
46
|
+
tokenTrust: options.tokenTrust,
|
|
46
47
|
productionMode,
|
|
47
48
|
releaseId: options.releaseId ?? null,
|
|
48
49
|
branch: productionMode ? null : (options.branch ?? null),
|