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,18 +2,68 @@ import * as React from "../../../../react/react.js";
|
|
|
2
2
|
import { cn } from "./theme.js";
|
|
3
3
|
import { isBrowserEnvironment } from "../../../platform/compat/runtime.js";
|
|
4
4
|
import { validateTrustedHtml } from "../../../security/client/html-sanitizer.js";
|
|
5
|
-
import {
|
|
5
|
+
import { CodeBlock as SyntaxCodeBlock } from "./ui/code-block.js";
|
|
6
6
|
const ESM_REACT_MARKDOWN = "https://esm.sh/react-markdown@9.0.3?target=es2022&pin=v135&deps=react@19.2.4";
|
|
7
7
|
const ESM_REMARK_GFM = "https://esm.sh/remark-gfm@4.0.1?target=es2022&pin=v135";
|
|
8
|
-
const ESM_REHYPE_HIGHLIGHT = "https://esm.sh/rehype-highlight@7.0.2?target=es2022&pin=v135";
|
|
9
8
|
const ESM_MERMAID = "https://esm.sh/mermaid@11.4.1?pin=v135";
|
|
10
|
-
|
|
9
|
+
// Self-contained prose styling. Studio's ChatMessageText leans on the
|
|
10
|
+
// `@tailwindcss/typography` `prose` plugin for element defaults (list markers,
|
|
11
|
+
// heading sizes, spacing). This package is dependency-light and must not
|
|
12
|
+
// require consumers to install that plugin, so the element styles are declared
|
|
13
|
+
// explicitly with arbitrary-variant descendant selectors — mirroring Studio's
|
|
14
|
+
// `variantStyles.default` (`prose-p:my-4 prose-ul:my-4 prose-li:my-1.5
|
|
15
|
+
// prose-h1:text-lg … prose-hr:my-5`). Tailwind's preflight strips list markers,
|
|
16
|
+
// so `list-disc`/`list-decimal` + padding are restored here.
|
|
17
|
+
const MARKDOWN_CONTAINER_CLASS = [
|
|
18
|
+
"max-w-none min-w-0 overflow-hidden break-words text-base leading-relaxed text-[var(--foreground)] [overflow-wrap:anywhere]",
|
|
19
|
+
// paragraph rhythm
|
|
20
|
+
"[&_p]:my-4",
|
|
21
|
+
// lists — restore markers + indentation preflight removes
|
|
22
|
+
"[&_ul]:my-4 [&_ul]:list-disc [&_ul]:pl-6 [&_ol]:my-4 [&_ol]:list-decimal [&_ol]:pl-6 [&_li]:my-1.5 [&_li]:pl-1",
|
|
23
|
+
"[&_ul_ul]:my-1 [&_ol_ol]:my-1 [&_ul_ol]:my-1 [&_ol_ul]:my-1",
|
|
24
|
+
"[&_li>p]:my-0 [&_li_p]:my-2",
|
|
25
|
+
// headings — Studio sizes; font-semibold (Inter reads lighter than Söhne)
|
|
26
|
+
"[&_h1]:mt-6 [&_h1]:mb-2 [&_h1]:text-lg [&_h1]:font-semibold",
|
|
27
|
+
"[&_h2]:mt-5 [&_h2]:mb-2 [&_h2]:text-base [&_h2]:font-semibold",
|
|
28
|
+
"[&_h3]:mt-4 [&_h3]:mb-1 [&_h3]:text-sm [&_h3]:font-semibold",
|
|
29
|
+
"[&_h4]:mt-3 [&_h4]:mb-1 [&_h4]:text-sm [&_h4]:font-semibold",
|
|
30
|
+
// inline emphasis
|
|
31
|
+
"[&_strong]:font-semibold [&_em]:italic",
|
|
32
|
+
// inline code — `:not(pre)>code` targets bare inline code (block code lives
|
|
33
|
+
// inside the CodeBlock's own <pre>). Mirrors Studio's `prose-inline-code`
|
|
34
|
+
// (bg-accent, rounded-xs, px-1 py-0.5, font-mono font-medium).
|
|
35
|
+
"[&_:not(pre)>code]:rounded-[var(--radius-xs)] [&_:not(pre)>code]:bg-[var(--accent)] [&_:not(pre)>code]:px-1 [&_:not(pre)>code]:py-0.5 [&_:not(pre)>code]:font-mono [&_:not(pre)>code]:text-[0.9em] [&_:not(pre)>code]:font-medium [&_:not(pre)>code]:text-[var(--foreground)]",
|
|
36
|
+
// horizontal rule
|
|
37
|
+
"[&_hr]:my-6 [&_hr]:border-0 [&_hr]:border-t [&_hr]:border-[var(--edge-medium)]",
|
|
38
|
+
// margin reset for the container edges + width guard
|
|
39
|
+
"[&>*:first-child]:mt-0 [&>*:last-child]:mb-0 [&_*]:max-w-full",
|
|
40
|
+
].join(" ");
|
|
11
41
|
async function importFromUrl(url) {
|
|
12
42
|
return await import(/* @vite-ignore */ url);
|
|
13
43
|
}
|
|
14
44
|
let ReactMarkdown = null;
|
|
15
45
|
let remarkGfm = null;
|
|
16
|
-
|
|
46
|
+
/**
|
|
47
|
+
* Recursively flatten a react-markdown child tree to plain text. Fenced code
|
|
48
|
+
* arrives as a string, but some remark/rehype plugins wrap it in nested
|
|
49
|
+
* element nodes; naive `String(children)` on those yields "[object Object]".
|
|
50
|
+
* Walking the tree keeps the raw source text intact for the shiki-based
|
|
51
|
+
* CodeBlock to highlight itself.
|
|
52
|
+
*/
|
|
53
|
+
function extractText(node) {
|
|
54
|
+
if (node == null || node === false || node === true)
|
|
55
|
+
return "";
|
|
56
|
+
if (typeof node === "string")
|
|
57
|
+
return node;
|
|
58
|
+
if (typeof node === "number")
|
|
59
|
+
return String(node);
|
|
60
|
+
if (Array.isArray(node))
|
|
61
|
+
return node.map(extractText).join("");
|
|
62
|
+
if (React.isValidElement(node)) {
|
|
63
|
+
return extractText(node.props.children);
|
|
64
|
+
}
|
|
65
|
+
return "";
|
|
66
|
+
}
|
|
17
67
|
let mermaidPromise = null;
|
|
18
68
|
let mermaidModule = null;
|
|
19
69
|
async function loadMermaid() {
|
|
@@ -61,52 +111,55 @@ function MermaidDiagram({ code }) {
|
|
|
61
111
|
};
|
|
62
112
|
}, [code]);
|
|
63
113
|
if (!isBrowserEnvironment()) {
|
|
64
|
-
return (React.createElement("pre", { className: "my-4
|
|
114
|
+
return (React.createElement("pre", { className: "my-4 overflow-auto rounded-[var(--radius-lg)] bg-[var(--secondary)] p-4" },
|
|
65
115
|
React.createElement("code", null, code)));
|
|
66
116
|
}
|
|
67
117
|
if (error) {
|
|
68
|
-
return (React.createElement("div", { className: "my-4
|
|
118
|
+
return (React.createElement("div", { className: "my-4 rounded-[var(--radius-lg)] bg-red-50 p-4 text-sm text-red-600" },
|
|
69
119
|
React.createElement("p", { className: "font-medium" }, "Mermaid Error"),
|
|
70
120
|
React.createElement("p", null, error),
|
|
71
121
|
React.createElement("pre", { className: "mt-2 text-xs overflow-auto" }, code)));
|
|
72
122
|
}
|
|
73
123
|
if (!svg) {
|
|
74
|
-
return (React.createElement("div", { className: "my-4
|
|
75
|
-
React.createElement("div", { className: "h-32
|
|
124
|
+
return (React.createElement("div", { className: "my-4 animate-pulse rounded-[var(--radius-lg)] bg-[var(--secondary)] p-4" },
|
|
125
|
+
React.createElement("div", { className: "flex h-32 items-center justify-center text-[var(--faint)]" }, "Loading diagram...")));
|
|
76
126
|
}
|
|
77
127
|
return (React.createElement("div", { className: "my-4 flex justify-center overflow-auto", dangerouslySetInnerHTML: { __html: svg } }));
|
|
78
128
|
}
|
|
79
|
-
|
|
129
|
+
/**
|
|
130
|
+
* Render a fenced (block) code region. Inline code is NOT handled here — it
|
|
131
|
+
* renders as a bare `<code>` styled by the container class (see
|
|
132
|
+
* `MARKDOWN_CONTAINER_CLASS`), matching Studio, which overrides `pre` (not
|
|
133
|
+
* `code`) so only block code reaches the syntax highlighter.
|
|
134
|
+
*/
|
|
135
|
+
function CodeBlock({ language, code, enableMermaid, renderCodeBlock, }) {
|
|
80
136
|
if (renderCodeBlock) {
|
|
81
|
-
return React.createElement(React.Fragment, null, renderCodeBlock({ language, code, inline }));
|
|
82
|
-
}
|
|
83
|
-
if (inline) {
|
|
84
|
-
return (React.createElement("code", { className: "bg-[var(--accent)] px-1.5 py-0.5 rounded text-sm font-mono" }, code));
|
|
137
|
+
return React.createElement(React.Fragment, null, renderCodeBlock({ language, code, inline: false }));
|
|
85
138
|
}
|
|
86
139
|
if (enableMermaid && language === "mermaid") {
|
|
87
140
|
return React.createElement(MermaidDiagram, { code: code });
|
|
88
141
|
}
|
|
89
|
-
|
|
142
|
+
// Block fences render through the shared syntax-highlight primitive (shiki +
|
|
143
|
+
// copy + language label + collapsible), forked from Studio's ChatCodeBlock.
|
|
144
|
+
return React.createElement(SyntaxCodeBlock, { code: code, language: language });
|
|
90
145
|
}
|
|
91
146
|
function FallbackMarkdown({ children, className, }) {
|
|
92
147
|
return (React.createElement("div", { className: cn(MARKDOWN_CONTAINER_CLASS, className) },
|
|
93
148
|
React.createElement("p", { className: "whitespace-pre-wrap" }, children)));
|
|
94
149
|
}
|
|
95
150
|
/** Render markdown. */
|
|
96
|
-
export function Markdown({ children, className, enableMermaid = true, renderCodeBlock, }) {
|
|
151
|
+
export function Markdown({ children, className, enableMermaid = true, renderCodeBlock, components, remarkPlugins, rehypePlugins, }) {
|
|
97
152
|
const [isLoaded, setIsLoaded] = React.useState(false);
|
|
98
153
|
React.useEffect(() => {
|
|
99
154
|
let cancelled = false;
|
|
100
155
|
async function load() {
|
|
101
156
|
if (!ReactMarkdown) {
|
|
102
|
-
const [rmModule, gfmModule
|
|
157
|
+
const [rmModule, gfmModule] = await Promise.all([
|
|
103
158
|
importFromUrl(ESM_REACT_MARKDOWN),
|
|
104
159
|
importFromUrl(ESM_REMARK_GFM),
|
|
105
|
-
importFromUrl(ESM_REHYPE_HIGHLIGHT),
|
|
106
160
|
]);
|
|
107
161
|
ReactMarkdown = rmModule.default;
|
|
108
162
|
remarkGfm = gfmModule.default;
|
|
109
|
-
rehypeHighlight = highlightModule.default;
|
|
110
163
|
}
|
|
111
164
|
if (cancelled)
|
|
112
165
|
return;
|
|
@@ -120,25 +173,56 @@ export function Markdown({ children, className, enableMermaid = true, renderCode
|
|
|
120
173
|
if (!isLoaded || !ReactMarkdown) {
|
|
121
174
|
return React.createElement(FallbackMarkdown, { className: className }, children);
|
|
122
175
|
}
|
|
176
|
+
const builtinComponents = {
|
|
177
|
+
// Override `pre` (not `code`) — Studio's approach. Block code arrives
|
|
178
|
+
// as `<pre><code class="language-x">…</code></pre>`; we pull the
|
|
179
|
+
// language + text off the inner (default-rendered) `<code>` element
|
|
180
|
+
// and hand it to the syntax highlighter. Inline code is left as a bare
|
|
181
|
+
// `<code>`, styled by the container class.
|
|
182
|
+
pre(props) {
|
|
183
|
+
const child = React.Children.toArray(props.children).find(React.isValidElement);
|
|
184
|
+
if (!child) {
|
|
185
|
+
return React.createElement("pre", null, props.children);
|
|
186
|
+
}
|
|
187
|
+
const codeClassName = child.props.className;
|
|
188
|
+
const match = /language-(\w+)/.exec(codeClassName || "");
|
|
189
|
+
const language = match ? match[1] : undefined;
|
|
190
|
+
const code = extractText(child.props.children).replace(/\n$/, "");
|
|
191
|
+
return (React.createElement(CodeBlock, { language: language, code: code, enableMermaid: enableMermaid, renderCodeBlock: renderCodeBlock }));
|
|
192
|
+
},
|
|
193
|
+
table(props) {
|
|
194
|
+
// Borders live on the rows, scoped by section so the header always
|
|
195
|
+
// keeps its divider (a `tr:last-child` rule would wrongly strip the
|
|
196
|
+
// lone header row in <thead>). Only the final body row drops its
|
|
197
|
+
// border so it doesn't double up with the container edge.
|
|
198
|
+
return (React.createElement("div", { className: "my-4 max-w-full overflow-x-auto rounded-[var(--radius-md)] border border-[var(--outline-border)]" },
|
|
199
|
+
React.createElement("table", { className: "w-full text-sm [&_thead_tr]:border-b [&_thead_tr]:border-[var(--edge)] [&_tbody_tr]:border-b [&_tbody_tr]:border-[var(--edge)] [&_tbody_tr:last-child]:border-b-0" }, props.children)));
|
|
200
|
+
},
|
|
201
|
+
th(props) {
|
|
202
|
+
return (React.createElement("th", { style: props.style, className: "px-4 py-2 text-left font-medium text-[var(--foreground)]" }, props.children));
|
|
203
|
+
},
|
|
204
|
+
td(props) {
|
|
205
|
+
return (React.createElement("td", { style: props.style, className: "px-4 py-2 text-[var(--foreground)]" }, props.children));
|
|
206
|
+
},
|
|
207
|
+
a(props) {
|
|
208
|
+
// Studio: links are foreground (black), underlined, and drop the
|
|
209
|
+
// underline on hover — not the default browser blue.
|
|
210
|
+
return (React.createElement("a", { href: props.href, className: "break-words text-[var(--foreground)] underline underline-offset-4 hover:no-underline [overflow-wrap:anywhere]", target: "_blank", rel: "noopener noreferrer" }, props.children));
|
|
211
|
+
},
|
|
212
|
+
blockquote(props) {
|
|
213
|
+
return (React.createElement("blockquote", { className: "border-l-4 border-[var(--outline-border)] pl-4 my-4 text-[var(--foreground)] italic" }, props.children));
|
|
214
|
+
},
|
|
215
|
+
};
|
|
216
|
+
// Consumer entries win over the built-ins (merge order matters). Cast is
|
|
217
|
+
// needed because the built-ins are typed with local prop interfaces while
|
|
218
|
+
// `components` uses react-markdown's `Components`.
|
|
219
|
+
const mergedComponents = {
|
|
220
|
+
...builtinComponents,
|
|
221
|
+
...components,
|
|
222
|
+
};
|
|
123
223
|
return (React.createElement("div", { className: cn(MARKDOWN_CONTAINER_CLASS, className) },
|
|
124
|
-
React.createElement(ReactMarkdown, { remarkPlugins:
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
const language = match ? match[1] : undefined;
|
|
129
|
-
const code = String(codeChildren).replace(/\n$/, "");
|
|
130
|
-
const isInline = !node?.position?.start?.line;
|
|
131
|
-
return (React.createElement(CodeBlock, { language: language, code: code, inline: isInline, enableMermaid: enableMermaid, renderCodeBlock: renderCodeBlock }));
|
|
132
|
-
},
|
|
133
|
-
table(props) {
|
|
134
|
-
return (React.createElement("div", { className: "my-4 max-w-full overflow-x-auto rounded-md border border-[var(--border)]" },
|
|
135
|
-
React.createElement("table", { className: "w-full divide-y divide-[var(--border)]" }, props.children)));
|
|
136
|
-
},
|
|
137
|
-
a(props) {
|
|
138
|
-
return (React.createElement("a", { href: props.href, className: "break-words text-blue-600 hover:underline [overflow-wrap:anywhere]", target: "_blank", rel: "noopener noreferrer" }, props.children));
|
|
139
|
-
},
|
|
140
|
-
blockquote(props) {
|
|
141
|
-
return (React.createElement("blockquote", { className: "border-l-4 border-[var(--border)] pl-4 my-4 text-[var(--card-foreground)] italic" }, props.children));
|
|
142
|
-
},
|
|
143
|
-
} }, children)));
|
|
224
|
+
React.createElement(ReactMarkdown, { remarkPlugins: [
|
|
225
|
+
...(remarkGfm ? [remarkGfm] : []),
|
|
226
|
+
...(remarkPlugins ?? []),
|
|
227
|
+
], rehypePlugins: (rehypePlugins ?? []), components: mergedComponents }, children)));
|
|
144
228
|
}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* ModelSelector
|
|
2
|
+
* ModelSelector — Popover + Command combobox for switching models at runtime.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Built on the same primitives as `AgentPicker` (Popover → Command), so the
|
|
5
|
+
* dropdown portals via `Floating` (never clips in the composer/iframe) and gets
|
|
6
|
+
* keyboard nav + search for free. Rows show the real provider logo from
|
|
7
|
+
* models.dev. Two trigger styles via `variant`: `pill` (logo + label + chevron)
|
|
8
|
+
* or `icon` (logo only, like Studio's desktop picker).
|
|
6
9
|
*
|
|
7
|
-
*
|
|
10
|
+
* @module react/components/chat/model-selector
|
|
8
11
|
*/
|
|
9
12
|
import * as React from "../../../../react/react.js";
|
|
10
13
|
/** A "provider/model" value and its display label. */
|
|
@@ -13,7 +16,7 @@ export interface ModelOption {
|
|
|
13
16
|
value: string;
|
|
14
17
|
/** Display label (e.g. "GPT-4o") */
|
|
15
18
|
label: string;
|
|
16
|
-
/** Provider name for grouping (e.g. "openai") */
|
|
19
|
+
/** Provider name for grouping + logo (e.g. "openai") */
|
|
17
20
|
provider?: string;
|
|
18
21
|
/** Short description shown beneath the label */
|
|
19
22
|
description?: string;
|
|
@@ -28,11 +31,130 @@ export interface ModelSelectorProps {
|
|
|
28
31
|
value?: string;
|
|
29
32
|
/** Called when user selects a model */
|
|
30
33
|
onChange: (model: string) => void;
|
|
31
|
-
/** Additional class names */
|
|
34
|
+
/** Additional class names for the trigger */
|
|
32
35
|
className?: string;
|
|
33
36
|
/** Disabled state */
|
|
34
37
|
disabled?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Trigger style: `pill` (logo + label + chevron) or `icon` (provider logo
|
|
40
|
+
* only, like Studio's desktop picker). @default "pill"
|
|
41
|
+
*/
|
|
42
|
+
variant?: "pill" | "icon";
|
|
43
|
+
/**
|
|
44
|
+
* Custom trigger renderer. When provided, replaces the default pill/icon
|
|
45
|
+
* trigger. `model` is the currently-selected option (resolved from `value`);
|
|
46
|
+
* `open` is the popover open state. Rendered inside the existing
|
|
47
|
+
* `PopoverTrigger asChild`, so the returned element still toggles the popover.
|
|
48
|
+
*/
|
|
49
|
+
renderTrigger?: (opts: {
|
|
50
|
+
model?: ModelOption;
|
|
51
|
+
open: boolean;
|
|
52
|
+
}) => React.ReactNode;
|
|
53
|
+
/**
|
|
54
|
+
* Custom row renderer. When provided, each option renders through it instead
|
|
55
|
+
* of the default `ModelRow`. Wire `onSelect` to trigger selection (which also
|
|
56
|
+
* closes the popover).
|
|
57
|
+
*/
|
|
58
|
+
renderRow?: (opts: {
|
|
59
|
+
model: ModelOption;
|
|
60
|
+
selected: boolean;
|
|
61
|
+
onSelect: () => void;
|
|
62
|
+
}) => React.ReactNode;
|
|
63
|
+
/**
|
|
64
|
+
* Compose your own menu from `ModelSelector.Trigger` / `Content` / `List` /
|
|
65
|
+
* `Item`. When omitted, the default data-driven preset is rendered.
|
|
66
|
+
*/
|
|
67
|
+
children?: React.ReactNode;
|
|
35
68
|
}
|
|
36
|
-
/**
|
|
37
|
-
export
|
|
69
|
+
/** Shared selection + open state exposed to `ModelSelector.*` sub-parts. */
|
|
70
|
+
export interface ModelSelectorContextValue {
|
|
71
|
+
/** Selected model value ("provider/model"). */
|
|
72
|
+
value?: string;
|
|
73
|
+
/** The resolved selected option (from `value`, else the first model). */
|
|
74
|
+
selected?: ModelOption;
|
|
75
|
+
/** Select a model by value (also closes the menu). */
|
|
76
|
+
onSelect: (value: string) => void;
|
|
77
|
+
/** Popover open state. */
|
|
78
|
+
open: boolean;
|
|
79
|
+
/** Set the popover open state. */
|
|
80
|
+
setOpen: (open: boolean) => void;
|
|
81
|
+
/** Whether the selector is disabled. */
|
|
82
|
+
disabled?: boolean;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Read the enclosing `ModelSelector` selection + open state. Throws when used
|
|
86
|
+
* outside a `<ModelSelector>`.
|
|
87
|
+
*/
|
|
88
|
+
export declare function useModelSelector(): ModelSelectorContextValue;
|
|
89
|
+
/** Props for `ModelSelector.Trigger` — the pill/icon combobox button. */
|
|
90
|
+
export interface ModelSelectorTriggerProps {
|
|
91
|
+
/** Trigger style. @default "pill" */
|
|
92
|
+
variant?: "pill" | "icon";
|
|
93
|
+
/** Override the trigger contents; defaults to the selected model. */
|
|
94
|
+
children?: React.ReactNode;
|
|
95
|
+
className?: string;
|
|
96
|
+
}
|
|
97
|
+
/** The pill (or icon) combobox trigger. Toggles the popover. */
|
|
98
|
+
declare function ModelSelectorTrigger({ variant, children, className }: ModelSelectorTriggerProps): React.ReactElement;
|
|
99
|
+
declare namespace ModelSelectorTrigger {
|
|
100
|
+
var displayName: string;
|
|
101
|
+
}
|
|
102
|
+
/** Props for `ModelSelector.Content` — the popover surface + `Command` shell. */
|
|
103
|
+
export interface ModelSelectorContentProps {
|
|
104
|
+
/** Show the search input above the list. */
|
|
105
|
+
showSearch?: boolean;
|
|
106
|
+
/** Search input placeholder. */
|
|
107
|
+
searchPlaceholder?: string;
|
|
108
|
+
children?: React.ReactNode;
|
|
109
|
+
className?: string;
|
|
110
|
+
}
|
|
111
|
+
/** The popover surface wrapping a `Command` (search + list region). */
|
|
112
|
+
declare function ModelSelectorContent({ showSearch, searchPlaceholder, children, className, }: ModelSelectorContentProps): React.ReactElement;
|
|
113
|
+
declare namespace ModelSelectorContent {
|
|
114
|
+
var displayName: string;
|
|
115
|
+
}
|
|
116
|
+
/** The scrollable `Command` list region. */
|
|
117
|
+
declare function ModelSelectorList({ children, className }: {
|
|
118
|
+
children?: React.ReactNode;
|
|
119
|
+
className?: string;
|
|
120
|
+
}): React.ReactElement;
|
|
121
|
+
declare namespace ModelSelectorList {
|
|
122
|
+
var displayName: string;
|
|
123
|
+
}
|
|
124
|
+
/** Props for `ModelSelector.Item` — a single selectable model row. */
|
|
125
|
+
export interface ModelSelectorItemProps {
|
|
126
|
+
/** The model this row represents. Its `value` is the selection value. */
|
|
127
|
+
model: ModelOption;
|
|
128
|
+
/** Force selected styling; defaults to matching the context `value`. */
|
|
129
|
+
selected?: boolean;
|
|
130
|
+
className?: string;
|
|
131
|
+
}
|
|
132
|
+
/** A single model row (provider logo + label + optional badge + check). */
|
|
133
|
+
declare function ModelSelectorItem({ model, selected, className }: ModelSelectorItemProps): React.ReactElement;
|
|
134
|
+
declare namespace ModelSelectorItem {
|
|
135
|
+
var displayName: string;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* `ModelSelector.Root` — context provider + the popover shell. No children
|
|
139
|
+
* renders the default data-driven preset; pass children to recompose from
|
|
140
|
+
* `ModelSelector.Trigger` / `Content` / `List` / `Item`.
|
|
141
|
+
*/
|
|
142
|
+
declare function ModelSelectorRoot({ models, value, onChange, className, disabled, variant, renderTrigger, renderRow, children, }: ModelSelectorProps): React.ReactElement;
|
|
143
|
+
declare namespace ModelSelectorRoot {
|
|
144
|
+
var displayName: string;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* ModelSelector — render `<ModelSelector models={...} .../>` for the default
|
|
148
|
+
* data-driven combobox, or compose `ModelSelector.Trigger` / `Content` /
|
|
149
|
+
* `List` / `Item` for a custom menu. Mirrors the `ToolCall` compound: render
|
|
150
|
+
* it, or compose it.
|
|
151
|
+
*/
|
|
152
|
+
export declare const ModelSelector: typeof ModelSelectorRoot & {
|
|
153
|
+
Root: typeof ModelSelectorRoot;
|
|
154
|
+
Trigger: typeof ModelSelectorTrigger;
|
|
155
|
+
Content: typeof ModelSelectorContent;
|
|
156
|
+
List: typeof ModelSelectorList;
|
|
157
|
+
Item: typeof ModelSelectorItem;
|
|
158
|
+
};
|
|
159
|
+
export {};
|
|
38
160
|
//# sourceMappingURL=model-selector.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-selector.d.ts","sourceRoot":"","sources":["../../../../../src/src/react/components/chat/model-selector.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"model-selector.d.ts","sourceRoot":"","sources":["../../../../../src/src/react/components/chat/model-selector.tsx"],"names":[],"mappings":"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"}
|