veryfront 0.1.997 → 0.1.998
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/cli/templates/manifest.js +1 -1
- package/esm/deno.d.ts +7 -0
- package/esm/deno.js +11 -3
- package/esm/deps/esm.sh/react-dom@19.2.4.d.ts +2 -0
- package/esm/deps/esm.sh/react-dom@19.2.4.d.ts.map +1 -0
- package/esm/deps/esm.sh/react-dom@19.2.4.js +3 -0
- package/esm/react/react-dom.d.ts +3 -0
- package/esm/react/react-dom.d.ts.map +1 -0
- package/esm/react/react-dom.js +2 -0
- package/esm/src/agent/ag-ui/host-support.d.ts.map +1 -1
- package/esm/src/agent/ag-ui/host-support.js +12 -0
- package/esm/src/agent/react/index.d.ts +4 -2
- package/esm/src/agent/react/index.d.ts.map +1 -1
- package/esm/src/agent/react/index.js +2 -1
- package/esm/src/agent/react/use-agent-metadata.d.ts +5 -0
- package/esm/src/agent/react/use-agent-metadata.d.ts.map +1 -1
- package/esm/src/agent/react/use-agent-metadata.js +18 -9
- package/esm/src/agent/react/use-agents.d.ts +33 -0
- package/esm/src/agent/react/use-agents.d.ts.map +1 -0
- package/esm/src/agent/react/use-agents.js +72 -0
- package/esm/src/agent/react/use-chat/index.d.ts +1 -1
- package/esm/src/agent/react/use-chat/index.d.ts.map +1 -1
- package/esm/src/agent/react/use-chat/types.d.ts +3 -2
- package/esm/src/agent/react/use-chat/types.d.ts.map +1 -1
- package/esm/src/agent/react/use-chat/use-chat.d.ts +12 -1
- package/esm/src/agent/react/use-chat/use-chat.d.ts.map +1 -1
- package/esm/src/agent/react/use-chat/use-chat.js +47 -7
- package/esm/src/agent/react/use-chat/utils.d.ts.map +1 -1
- package/esm/src/agent/react/use-chat/utils.js +4 -0
- package/esm/src/agent/runtime/message-adapter.d.ts.map +1 -1
- package/esm/src/agent/runtime/message-adapter.js +3 -1
- package/esm/src/agent/runtime/text-generation-runtime-message-converter.d.ts.map +1 -1
- package/esm/src/agent/runtime/text-generation-runtime-message-converter.js +6 -2
- package/esm/src/chat/index.d.ts +17 -7
- package/esm/src/chat/index.d.ts.map +1 -1
- package/esm/src/chat/index.js +33 -7
- package/esm/src/chat/protocol.d.ts +13 -1
- package/esm/src/chat/protocol.d.ts.map +1 -1
- package/esm/src/chat/upload-handler.d.ts +55 -0
- package/esm/src/chat/upload-handler.d.ts.map +1 -0
- package/esm/src/chat/upload-handler.js +180 -0
- package/esm/src/discovery/import-rewriter.d.ts +1 -1
- package/esm/src/discovery/import-rewriter.d.ts.map +1 -1
- package/esm/src/discovery/import-rewriter.js +2 -0
- package/esm/src/discovery/transpiler.d.ts.map +1 -1
- package/esm/src/discovery/transpiler.js +2 -0
- package/esm/src/react/components/chat/agent-card.d.ts +84 -11
- package/esm/src/react/components/chat/agent-card.d.ts.map +1 -1
- package/esm/src/react/components/chat/agent-card.js +151 -57
- package/esm/src/react/components/chat/agent-picker.d.ts +166 -0
- package/esm/src/react/components/chat/agent-picker.d.ts.map +1 -0
- package/esm/src/react/components/chat/agent-picker.js +183 -0
- package/esm/src/react/components/chat/chat/components/animations.js +1 -1
- package/esm/src/react/components/chat/chat/components/attachment-pill.d.ts +125 -3
- package/esm/src/react/components/chat/chat/components/attachment-pill.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/attachment-pill.js +209 -25
- package/esm/src/react/components/chat/chat/components/attachments-panel.d.ts +149 -0
- package/esm/src/react/components/chat/chat/components/attachments-panel.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/components/attachments-panel.js +187 -0
- package/esm/src/react/components/chat/chat/components/branch-picker.d.ts +13 -2
- package/esm/src/react/components/chat/chat/components/branch-picker.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/branch-picker.js +6 -8
- package/esm/src/react/components/chat/chat/components/chat-messages-skeleton.d.ts +20 -0
- package/esm/src/react/components/chat/chat/components/chat-messages-skeleton.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/components/chat-messages-skeleton.js +31 -0
- package/esm/src/react/components/chat/chat/components/code-block.d.ts +9 -1
- package/esm/src/react/components/chat/chat/components/code-block.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/code-block.js +14 -6
- package/esm/src/react/components/chat/chat/components/drop-zone.d.ts +11 -4
- package/esm/src/react/components/chat/chat/components/drop-zone.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/drop-zone.js +10 -8
- package/esm/src/react/components/chat/chat/components/empty-state.d.ts +2 -1
- package/esm/src/react/components/chat/chat/components/empty-state.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/empty-state.js +7 -8
- package/esm/src/react/components/chat/chat/components/inference-badge.d.ts +6 -2
- package/esm/src/react/components/chat/chat/components/inference-badge.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/inference-badge.js +5 -4
- package/esm/src/react/components/chat/chat/components/inline-citation.d.ts +9 -1
- package/esm/src/react/components/chat/chat/components/inline-citation.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/inline-citation.js +19 -20
- package/esm/src/react/components/chat/chat/components/message-actions.d.ts +28 -5
- package/esm/src/react/components/chat/chat/components/message-actions.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/message-actions.js +24 -36
- package/esm/src/react/components/chat/chat/components/message-edit-form.d.ts +7 -2
- package/esm/src/react/components/chat/chat/components/message-edit-form.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/message-edit-form.js +5 -5
- package/esm/src/react/components/chat/chat/components/message-feedback.d.ts +11 -1
- package/esm/src/react/components/chat/chat/components/message-feedback.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/message-feedback.js +9 -11
- package/esm/src/react/components/chat/chat/components/quick-actions.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/quick-actions.js +3 -1
- package/esm/src/react/components/chat/chat/components/reasoning.d.ts +66 -3
- package/esm/src/react/components/chat/chat/components/reasoning.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/reasoning.js +95 -21
- package/esm/src/react/components/chat/chat/components/sidebar.d.ts +178 -12
- package/esm/src/react/components/chat/chat/components/sidebar.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/sidebar.js +228 -45
- package/esm/src/react/components/chat/chat/components/skill-badge.d.ts +6 -1
- package/esm/src/react/components/chat/chat/components/skill-badge.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/skill-badge.js +6 -5
- package/esm/src/react/components/chat/chat/components/skill-tool.d.ts +37 -0
- package/esm/src/react/components/chat/chat/components/skill-tool.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/components/skill-tool.js +46 -0
- package/esm/src/react/components/chat/chat/components/sources.d.ts +55 -3
- package/esm/src/react/components/chat/chat/components/sources.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/sources.js +50 -16
- package/esm/src/react/components/chat/chat/components/step-indicator.d.ts +42 -3
- package/esm/src/react/components/chat/chat/components/step-indicator.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/step-indicator.js +55 -12
- package/esm/src/react/components/chat/chat/components/tab-switcher.d.ts +1 -1
- package/esm/src/react/components/chat/chat/components/tab-switcher.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/tab-switcher.js +3 -3
- package/esm/src/react/components/chat/chat/components/tool-ui.d.ts +96 -3
- package/esm/src/react/components/chat/chat/components/tool-ui.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/components/tool-ui.js +158 -36
- package/esm/src/react/components/chat/chat/composition/api.d.ts +4 -2
- package/esm/src/react/components/chat/chat/composition/api.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/api.js +4 -2
- package/esm/src/react/components/chat/chat/composition/chat-composer.d.ts +112 -5
- package/esm/src/react/components/chat/chat/composition/chat-composer.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-composer.js +251 -61
- package/esm/src/react/components/chat/chat/composition/chat-empty-state.d.ts +78 -0
- package/esm/src/react/components/chat/chat/composition/chat-empty-state.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/composition/chat-empty-state.js +63 -0
- package/esm/src/react/components/chat/chat/composition/chat-empty.d.ts +4 -1
- package/esm/src/react/components/chat/chat/composition/chat-empty.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-empty.js +11 -10
- package/esm/src/react/components/chat/chat/composition/chat-message-list.d.ts +11 -3
- package/esm/src/react/components/chat/chat/composition/chat-message-list.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-message-list.js +81 -111
- package/esm/src/react/components/chat/chat/composition/chat-root.d.ts +4 -0
- package/esm/src/react/components/chat/chat/composition/chat-root.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/chat-root.js +3 -1
- package/esm/src/react/components/chat/chat/composition/error-banner.d.ts +4 -0
- package/esm/src/react/components/chat/chat/composition/error-banner.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/error-banner.js +10 -7
- package/esm/src/react/components/chat/chat/composition/message.d.ts +123 -5
- package/esm/src/react/components/chat/chat/composition/message.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/message.js +332 -53
- package/esm/src/react/components/chat/chat/composition/model-avatar.d.ts +6 -1
- package/esm/src/react/components/chat/chat/composition/model-avatar.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/composition/model-avatar.js +3 -4
- package/esm/src/react/components/chat/chat/composition/pending-message.d.ts +31 -0
- package/esm/src/react/components/chat/chat/composition/pending-message.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/composition/pending-message.js +31 -0
- package/esm/src/react/components/chat/chat/contexts/chat-context.d.ts +4 -0
- package/esm/src/react/components/chat/chat/contexts/chat-context.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/contexts/composer-context.d.ts +1 -0
- package/esm/src/react/components/chat/chat/contexts/composer-context.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/contexts/conversations-context.d.ts +29 -0
- package/esm/src/react/components/chat/chat/contexts/conversations-context.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/contexts/conversations-context.js +39 -0
- package/esm/src/react/components/chat/chat/contexts/index.d.ts +1 -1
- package/esm/src/react/components/chat/chat/contexts/index.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/contexts/index.js +1 -1
- package/esm/src/react/components/chat/chat/contexts/message-context.d.ts +2 -0
- package/esm/src/react/components/chat/chat/contexts/message-context.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/hooks/use-clipboard.d.ts +10 -0
- package/esm/src/react/components/chat/chat/hooks/use-clipboard.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/hooks/use-clipboard.js +34 -0
- package/esm/src/react/components/chat/chat/hooks/use-conversation.d.ts +21 -0
- package/esm/src/react/components/chat/chat/hooks/use-conversation.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/hooks/use-conversation.js +54 -0
- package/esm/src/react/components/chat/chat/hooks/use-conversations.d.ts +67 -0
- package/esm/src/react/components/chat/chat/hooks/use-conversations.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/hooks/use-conversations.js +317 -0
- package/esm/src/react/components/chat/chat/hooks/use-drop-zone.d.ts +27 -0
- package/esm/src/react/components/chat/chat/hooks/use-drop-zone.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/hooks/use-drop-zone.js +50 -0
- package/esm/src/react/components/chat/chat/hooks/use-stick-to-bottom.d.ts +49 -0
- package/esm/src/react/components/chat/chat/hooks/use-stick-to-bottom.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/hooks/use-stick-to-bottom.js +120 -0
- package/esm/src/react/components/chat/chat/hooks/use-upload.d.ts +34 -0
- package/esm/src/react/components/chat/chat/hooks/use-upload.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/hooks/use-upload.js +147 -0
- package/esm/src/react/components/chat/chat/hooks/use-uploads-registry.d.ts +37 -0
- package/esm/src/react/components/chat/chat/hooks/use-uploads-registry.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/hooks/use-uploads-registry.js +178 -0
- package/esm/src/react/components/chat/chat/index.d.ts +171 -31
- package/esm/src/react/components/chat/chat/index.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/index.js +371 -77
- package/esm/src/react/components/chat/chat/persistence/conversation-store.d.ts +63 -0
- package/esm/src/react/components/chat/chat/persistence/conversation-store.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/persistence/conversation-store.js +1 -0
- package/esm/src/react/components/chat/chat/persistence/local-conversation-store.d.ts +13 -0
- package/esm/src/react/components/chat/chat/persistence/local-conversation-store.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/persistence/local-conversation-store.js +102 -0
- package/esm/src/react/components/chat/chat/persistence/memory-conversation-store.d.ts +11 -0
- package/esm/src/react/components/chat/chat/persistence/memory-conversation-store.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat/persistence/memory-conversation-store.js +33 -0
- package/esm/src/react/components/chat/chat/utils/message-parts.d.ts +4 -1
- package/esm/src/react/components/chat/chat/utils/message-parts.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/utils/message-parts.js +4 -0
- package/esm/src/react/components/chat/chat-actions.d.ts +164 -0
- package/esm/src/react/components/chat/chat-actions.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat-actions.js +191 -0
- package/esm/src/react/components/chat/chat-agent-picker.d.ts +50 -0
- package/esm/src/react/components/chat/chat-agent-picker.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat-agent-picker.js +40 -0
- package/esm/src/react/components/chat/chat-theme-scope.d.ts +26 -0
- package/esm/src/react/components/chat/chat-theme-scope.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat-theme-scope.js +27 -0
- package/esm/src/react/components/chat/chat-tokens-style.d.ts +21 -0
- package/esm/src/react/components/chat/chat-tokens-style.d.ts.map +1 -0
- package/esm/src/react/components/chat/chat-tokens-style.js +24 -0
- package/esm/src/react/components/chat/chat.d.ts +5 -5
- package/esm/src/react/components/chat/chat.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat.js +5 -5
- package/esm/src/react/components/chat/color-mode.d.ts +46 -0
- package/esm/src/react/components/chat/color-mode.d.ts.map +1 -0
- package/esm/src/react/components/chat/color-mode.js +123 -0
- package/esm/src/react/components/chat/error-boundary.js +2 -2
- package/esm/src/react/components/chat/icons/index.d.ts +8 -0
- package/esm/src/react/components/chat/icons/index.d.ts.map +1 -1
- package/esm/src/react/components/chat/icons/index.js +64 -0
- package/esm/src/react/components/chat/markdown.d.ts +24 -1
- package/esm/src/react/components/chat/markdown.d.ts.map +1 -1
- package/esm/src/react/components/chat/markdown.js +122 -38
- package/esm/src/react/components/chat/model-selector.d.ts +130 -8
- package/esm/src/react/components/chat/model-selector.d.ts.map +1 -1
- package/esm/src/react/components/chat/model-selector.js +148 -121
- package/esm/src/react/components/chat/theme.d.ts +9 -12
- package/esm/src/react/components/chat/theme.d.ts.map +1 -1
- package/esm/src/react/components/chat/theme.js +149 -93
- package/esm/src/react/components/chat/ui/alert.d.ts +30 -0
- package/esm/src/react/components/chat/ui/alert.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/alert.js +35 -0
- package/esm/src/react/components/chat/ui/app-shell.d.ts +155 -0
- package/esm/src/react/components/chat/ui/app-shell.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/app-shell.js +276 -0
- package/esm/src/react/components/chat/ui/avatar.d.ts +24 -0
- package/esm/src/react/components/chat/ui/avatar.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/avatar.js +44 -0
- package/esm/src/react/components/chat/ui/badge.d.ts +24 -0
- package/esm/src/react/components/chat/ui/badge.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/badge.js +30 -0
- package/esm/src/react/components/chat/ui/button.d.ts +44 -0
- package/esm/src/react/components/chat/ui/button.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/button.js +108 -0
- package/esm/src/react/components/chat/ui/card.d.ts +42 -0
- package/esm/src/react/components/chat/ui/card.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/card.js +55 -0
- package/esm/src/react/components/chat/ui/checkbox.d.ts +28 -0
- package/esm/src/react/components/chat/ui/checkbox.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/checkbox.js +36 -0
- package/esm/src/react/components/chat/ui/code-block.d.ts +89 -0
- package/esm/src/react/components/chat/ui/code-block.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/code-block.js +277 -0
- package/esm/src/react/components/chat/ui/collapsible.d.ts +30 -0
- package/esm/src/react/components/chat/ui/collapsible.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/collapsible.js +44 -0
- package/esm/src/react/components/chat/ui/command.d.ts +65 -0
- package/esm/src/react/components/chat/ui/command.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/command.js +121 -0
- package/esm/src/react/components/chat/ui/cva.d.ts +36 -0
- package/esm/src/react/components/chat/ui/cva.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/cva.js +45 -0
- package/esm/src/react/components/chat/ui/dialog.d.ts +55 -0
- package/esm/src/react/components/chat/ui/dialog.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/dialog.js +116 -0
- package/esm/src/react/components/chat/ui/drawer.d.ts +41 -0
- package/esm/src/react/components/chat/ui/drawer.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/drawer.js +92 -0
- package/esm/src/react/components/chat/ui/dropdown-menu.d.ts +63 -0
- package/esm/src/react/components/chat/ui/dropdown-menu.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/dropdown-menu.js +76 -0
- package/esm/src/react/components/chat/ui/file-type.d.ts +26 -0
- package/esm/src/react/components/chat/ui/file-type.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/file-type.js +235 -0
- package/esm/src/react/components/chat/ui/floating.d.ts +29 -0
- package/esm/src/react/components/chat/ui/floating.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/floating.js +90 -0
- package/esm/src/react/components/chat/ui/icon-button.d.ts +19 -0
- package/esm/src/react/components/chat/ui/icon-button.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/icon-button.js +20 -0
- package/esm/src/react/components/chat/ui/index.d.ts +43 -0
- package/esm/src/react/components/chat/ui/index.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/index.js +42 -0
- package/esm/src/react/components/chat/ui/input.d.ts +27 -0
- package/esm/src/react/components/chat/ui/input.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/input.js +41 -0
- package/esm/src/react/components/chat/ui/label.d.ts +29 -0
- package/esm/src/react/components/chat/ui/label.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/label.js +40 -0
- package/esm/src/react/components/chat/ui/list.d.ts +47 -0
- package/esm/src/react/components/chat/ui/list.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/list.js +40 -0
- package/esm/src/react/components/chat/ui/pill.d.ts +26 -0
- package/esm/src/react/components/chat/ui/pill.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/pill.js +39 -0
- package/esm/src/react/components/chat/ui/popover.d.ts +47 -0
- package/esm/src/react/components/chat/ui/popover.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/popover.js +68 -0
- package/esm/src/react/components/chat/ui/progress-bar.d.ts +20 -0
- package/esm/src/react/components/chat/ui/progress-bar.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/progress-bar.js +31 -0
- package/esm/src/react/components/chat/ui/radio.d.ts +25 -0
- package/esm/src/react/components/chat/ui/radio.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/radio.js +29 -0
- package/esm/src/react/components/chat/ui/scroll-fade.d.ts +23 -0
- package/esm/src/react/components/chat/ui/scroll-fade.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/scroll-fade.js +40 -0
- package/esm/src/react/components/chat/ui/select.d.ts +64 -0
- package/esm/src/react/components/chat/ui/select.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/select.js +148 -0
- package/esm/src/react/components/chat/ui/shimmer.d.ts +25 -0
- package/esm/src/react/components/chat/ui/shimmer.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/shimmer.js +24 -0
- package/esm/src/react/components/chat/ui/skeleton.d.ts +14 -0
- package/esm/src/react/components/chat/ui/skeleton.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/skeleton.js +12 -0
- package/esm/src/react/components/chat/ui/slot.d.ts +21 -0
- package/esm/src/react/components/chat/ui/slot.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/slot.js +70 -0
- package/esm/src/react/components/chat/ui/status.d.ts +28 -0
- package/esm/src/react/components/chat/ui/status.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/status.js +23 -0
- package/esm/src/react/components/chat/ui/switch.d.ts +34 -0
- package/esm/src/react/components/chat/ui/switch.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/switch.js +58 -0
- package/esm/src/react/components/chat/ui/tabs.d.ts +44 -0
- package/esm/src/react/components/chat/ui/tabs.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/tabs.js +51 -0
- package/esm/src/react/components/chat/ui/tag.d.ts +22 -0
- package/esm/src/react/components/chat/ui/tag.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/tag.js +27 -0
- package/esm/src/react/components/chat/ui/textarea.d.ts +22 -0
- package/esm/src/react/components/chat/ui/textarea.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/textarea.js +35 -0
- package/esm/src/react/components/chat/ui/tooltip.d.ts +40 -0
- package/esm/src/react/components/chat/ui/tooltip.d.ts.map +1 -0
- package/esm/src/react/components/chat/ui/tooltip.js +132 -0
- package/esm/src/react/primitives/input-box.d.ts.map +1 -1
- package/esm/src/react/primitives/input-box.js +17 -4
- package/esm/src/server/handlers/dev/framework-candidates.generated.d.ts.map +1 -1
- package/esm/src/server/handlers/dev/framework-candidates.generated.js +9437 -1064
- package/esm/src/server/handlers/dev/projects/html-shell.d.ts +1 -1
- package/esm/src/server/handlers/dev/projects/html-shell.d.ts.map +1 -1
- package/esm/src/server/handlers/dev/projects/html-shell.js +1 -12
- package/esm/src/server/handlers/request/public-agents-list.handler.d.ts +18 -0
- package/esm/src/server/handlers/request/public-agents-list.handler.d.ts.map +1 -0
- package/esm/src/server/handlers/request/public-agents-list.handler.js +44 -0
- package/esm/src/server/runtime-handler/index.d.ts +1 -1
- package/esm/src/server/runtime-handler/index.d.ts.map +1 -1
- package/esm/src/server/runtime-handler/index.js +3 -0
- package/esm/src/studio/bridge/bridge-bundle.generated.d.ts +1 -1
- package/esm/src/studio/bridge/bridge-bundle.generated.d.ts.map +1 -1
- package/esm/src/studio/bridge/bridge-bundle.generated.js +3 -2
- package/esm/src/utils/version-constant.d.ts +1 -1
- package/esm/src/utils/version-constant.js +1 -1
- package/esm/src/workflow/blob/local-storage.d.ts +32 -0
- package/esm/src/workflow/blob/local-storage.d.ts.map +1 -0
- package/esm/src/workflow/blob/local-storage.js +179 -0
- package/esm/src/workflow/blob/types.d.ts +5 -0
- package/esm/src/workflow/blob/types.d.ts.map +1 -1
- package/esm/src/workflow/blob/veryfront-cloud-storage.d.ts +11 -0
- package/esm/src/workflow/blob/veryfront-cloud-storage.d.ts.map +1 -1
- package/esm/src/workflow/blob/veryfront-cloud-storage.js +36 -0
- package/package.json +5 -1
- package/esm/src/react/components/chat/chat/components/uploads-panel.d.ts +0 -20
- package/esm/src/react/components/chat/chat/components/uploads-panel.d.ts.map +0 -1
- package/esm/src/react/components/chat/chat/components/uploads-panel.js +0 -49
- package/esm/src/react/components/chat/chat/contexts/thread-list-context.d.ts +0 -28
- package/esm/src/react/components/chat/chat/contexts/thread-list-context.d.ts.map +0 -1
- package/esm/src/react/components/chat/chat/contexts/thread-list-context.js +0 -27
- package/esm/src/react/components/chat/chat/hooks/use-threads.d.ts +0 -28
- package/esm/src/react/components/chat/chat/hooks/use-threads.d.ts.map +0 -1
- package/esm/src/react/components/chat/chat/hooks/use-threads.js +0 -151
- package/esm/src/react/components/chat/chat-with-sidebar.d.ts +0 -110
- package/esm/src/react/components/chat/chat-with-sidebar.d.ts.map +0 -1
- package/esm/src/react/components/chat/chat-with-sidebar.js +0 -167
- package/esm/src/react/components/chat/message.d.ts +0 -42
- package/esm/src/react/components/chat/message.d.ts.map +0 -1
- package/esm/src/react/components/chat/message.js +0 -69
|
@@ -1,23 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AgentCard — a running agent rendered as a `Card` wrapping the `Message`
|
|
3
|
+
* anatomy: a header row (agent Avatar + name on the left, `<Status>` on the
|
|
4
|
+
* right) over the agent's reasoning, tool calls, and message text. Composed
|
|
5
|
+
* entirely from the shared primitives — `Card`, `Avatar`, `Status`,
|
|
6
|
+
* `Reasoning`, `ToolCall`, `Markdown` — so it reads like a `Message` inside a
|
|
7
|
+
* card (mirrors Studio's agent/message anatomy).
|
|
8
|
+
*
|
|
9
|
+
* @module react/components/chat/agent-card
|
|
10
|
+
*/
|
|
1
11
|
import * as React from "../../../../react/react.js";
|
|
2
12
|
import type { AgentMessage, AgentStatus, ToolCall } from "../../../agent/index.js";
|
|
3
|
-
import { type
|
|
13
|
+
import { type StatusColor } from "./ui/status.js";
|
|
4
14
|
/** Props accepted by agent card. */
|
|
5
15
|
export interface AgentCardProps {
|
|
6
|
-
/** Agent
|
|
16
|
+
/** Agent display name shown in the header (default "Agent"). */
|
|
17
|
+
name?: string;
|
|
18
|
+
/** Agent avatar image; falls back to an initial. */
|
|
19
|
+
avatarUrl?: string;
|
|
20
|
+
/** Agent messages — rendered as Markdown, mirroring `Message.Content`. */
|
|
7
21
|
messages?: AgentMessage[];
|
|
8
|
-
/** Tool calls */
|
|
22
|
+
/** Tool calls — rendered through the shared `ToolCall` card. */
|
|
9
23
|
toolCalls?: ToolCall[];
|
|
10
|
-
/** Agent status */
|
|
24
|
+
/** Agent status — drives the header `Status` dot + label. */
|
|
11
25
|
status: AgentStatus;
|
|
12
|
-
/** Thinking/reasoning text */
|
|
26
|
+
/** Thinking/reasoning text — rendered through the `Reasoning` component. */
|
|
13
27
|
thinking?: string;
|
|
14
|
-
/** Additional class name */
|
|
28
|
+
/** Additional class name for the card. */
|
|
15
29
|
className?: string;
|
|
16
|
-
/**
|
|
17
|
-
theme?: Partial<AgentTheme>;
|
|
18
|
-
/** Custom tool renderer */
|
|
30
|
+
/** Custom tool renderer — overrides the default `ToolCall` card. */
|
|
19
31
|
renderTool?: (toolCall: ToolCall) => React.ReactNode;
|
|
32
|
+
/** Compose your own card; when omitted, the default anatomy is rendered. */
|
|
33
|
+
children?: React.ReactNode;
|
|
20
34
|
}
|
|
21
|
-
/**
|
|
22
|
-
export
|
|
35
|
+
/** Per-card state shared with `AgentCard.*` sub-parts. */
|
|
36
|
+
export interface AgentCardContextValue {
|
|
37
|
+
name: string;
|
|
38
|
+
avatarUrl?: string;
|
|
39
|
+
messages?: AgentMessage[];
|
|
40
|
+
toolCalls: ToolCall[];
|
|
41
|
+
status: AgentStatus;
|
|
42
|
+
thinking?: string;
|
|
43
|
+
renderTool?: (toolCall: ToolCall) => React.ReactNode;
|
|
44
|
+
presentation: {
|
|
45
|
+
color: StatusColor;
|
|
46
|
+
label: string;
|
|
47
|
+
pulse: boolean;
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
/** Read the enclosing `AgentCard` state. Throws when used outside an `AgentCard`. */
|
|
51
|
+
export declare function useAgentCard(): AgentCardContextValue;
|
|
52
|
+
/**
|
|
53
|
+
* The header row: Avatar + name (left), Status (right). Mirrors
|
|
54
|
+
* `ChatMessageHeader` / `Message.Header`.
|
|
55
|
+
*/
|
|
56
|
+
declare function AgentCardHeader({ className }: {
|
|
57
|
+
className?: string;
|
|
58
|
+
}): React.JSX.Element;
|
|
59
|
+
declare namespace AgentCardHeader {
|
|
60
|
+
var displayName: string;
|
|
61
|
+
}
|
|
62
|
+
/** The reasoning block. Renders only when `thinking` text is present. */
|
|
63
|
+
declare function AgentCardReasoning({ className }: {
|
|
64
|
+
className?: string;
|
|
65
|
+
}): React.JSX.Element | null;
|
|
66
|
+
declare namespace AgentCardReasoning {
|
|
67
|
+
var displayName: string;
|
|
68
|
+
}
|
|
69
|
+
/** The tool-call list. Renders one `ToolCall` card per entry, or `renderTool`. */
|
|
70
|
+
declare function AgentCardTools({ className }: {
|
|
71
|
+
className?: string;
|
|
72
|
+
}): React.JSX.Element | null;
|
|
73
|
+
declare namespace AgentCardTools {
|
|
74
|
+
var displayName: string;
|
|
75
|
+
}
|
|
76
|
+
/** The message body — each message's text rendered as `Markdown`. */
|
|
77
|
+
declare function AgentCardBody({ className }: {
|
|
78
|
+
className?: string;
|
|
79
|
+
}): React.JSX.Element | null;
|
|
80
|
+
declare namespace AgentCardBody {
|
|
81
|
+
var displayName: string;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* AgentCard — render `<AgentCard {...props} />` for the default card, or compose
|
|
85
|
+
* `AgentCard.Header` / `Reasoning` / `Tools` / `Body` for a custom layout.
|
|
86
|
+
* Mirrors the `ToolCall` compound: render it, or compose it.
|
|
87
|
+
*/
|
|
88
|
+
export declare const AgentCard: React.ForwardRefExoticComponent<AgentCardProps & React.RefAttributes<HTMLDivElement>> & {
|
|
89
|
+
Root: React.ForwardRefExoticComponent<AgentCardProps & React.RefAttributes<HTMLDivElement>>;
|
|
90
|
+
Header: typeof AgentCardHeader;
|
|
91
|
+
Reasoning: typeof AgentCardReasoning;
|
|
92
|
+
Tools: typeof AgentCardTools;
|
|
93
|
+
Body: typeof AgentCardBody;
|
|
94
|
+
};
|
|
95
|
+
export {};
|
|
23
96
|
//# sourceMappingURL=agent-card.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-card.d.ts","sourceRoot":"","sources":["../../../../../src/src/react/components/chat/agent-card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"agent-card.d.ts","sourceRoot":"","sources":["../../../../../src/src/react/components/chat/agent-card.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAWH,OAAO,KAAK,KAAK,M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Y,IAAI,qBAAqB,CAQpD;AA0DD;;;GAGG;AACH,iBAAS,eAAe,CACtB,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GACpC,KAAK,CAAC,GAAG,CAAC,OAAO,CAgBnB;kBAlBQ,eAAe;;;AAqBxB,yEAAyE;AACzE,iBAAS,kBAAkB,CACzB,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GACpC,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAI1B;kBANQ,kBAAkB;;;AAS3B,kFAAkF;AAClF,iBAAS,cAAc,CACrB,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GACpC,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAY1B;kBAdQ,cAAc;;;AAiBvB,qEAAqE;AACrE,iBAAS,aAAa,CACpB,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GACpC,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAgB1B;kBAlBQ,aAAa;;;AAqBtB;;;;GAIG;AACH,eAAO,MAAM,SAAS;;;;;;CAMpB,CAAC"}
|
|
@@ -1,67 +1,161 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AgentCard — a running agent rendered as a `Card` wrapping the `Message`
|
|
3
|
+
* anatomy: a header row (agent Avatar + name on the left, `<Status>` on the
|
|
4
|
+
* right) over the agent's reasoning, tool calls, and message text. Composed
|
|
5
|
+
* entirely from the shared primitives — `Card`, `Avatar`, `Status`,
|
|
6
|
+
* `Reasoning`, `ToolCall`, `Markdown` — so it reads like a `Message` inside a
|
|
7
|
+
* card (mirrors Studio's agent/message anatomy).
|
|
8
|
+
*
|
|
9
|
+
* @module react/components/chat/agent-card
|
|
10
|
+
*/
|
|
11
|
+
// ---------------------------------------------------------------------------
|
|
12
|
+
// AgentCard — compound, render-or-compose (mirrors `ToolCall` / `Message`).
|
|
13
|
+
//
|
|
14
|
+
// `<AgentCard {...props} />` renders the default anatomy: `Header` (avatar +
|
|
15
|
+
// name + status) over `Reasoning`, `Tools`, and `Body` (the message text).
|
|
16
|
+
// Pass children to recompose from `AgentCard.Header`, `AgentCard.Reasoning`,
|
|
17
|
+
// `AgentCard.Tools`, `AgentCard.Body` — each reads `useAgentCard()`. Every
|
|
18
|
+
// sub-part takes `className`, merged LAST via `cn`. The preset `<AgentCard>`
|
|
19
|
+
// stays fully back-compatible.
|
|
20
|
+
// ---------------------------------------------------------------------------
|
|
1
21
|
import * as React from "../../../../react/react.js";
|
|
2
|
-
import {
|
|
3
|
-
import { cn
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
tool.error
|
|
13
|
-
? (React.createElement("div", { className: "mt-2 p-3 bg-red-50 text-red-900 rounded-xl text-sm border border-red-200" },
|
|
14
|
-
"Error: ",
|
|
15
|
-
tool.error))
|
|
16
|
-
: null)));
|
|
17
|
-
const hasToolCalls = toolCalls.length > 0;
|
|
18
|
-
const hasMessages = (messages?.length ?? 0) > 0;
|
|
19
|
-
return (React.createElement(AgentContainer, { ref: ref, className: cn(theme.container, className) },
|
|
20
|
-
React.createElement(AgentStatusPrimitive, { status: status, className: cn(theme.status, getStatusColor(status)) }),
|
|
21
|
-
thinking
|
|
22
|
-
? (React.createElement(ThinkingIndicator, { className: theme.thinking },
|
|
23
|
-
React.createElement("span", { className: "font-semibold" }, "Thinking:"),
|
|
24
|
-
thinking))
|
|
25
|
-
: null,
|
|
26
|
-
hasToolCalls
|
|
27
|
-
? (React.createElement("div", { className: "space-y-3" },
|
|
28
|
-
React.createElement("h3", { className: "text-sm font-semibold text-[var(--card-foreground)]" }, "Tool Calls"),
|
|
29
|
-
React.createElement("div", { className: "space-y-3" }, toolCalls.map((tool) => (React.createElement(React.Fragment, { key: tool.id }, toolRenderer(tool)))))))
|
|
30
|
-
: null,
|
|
31
|
-
hasMessages
|
|
32
|
-
? (React.createElement("div", { className: "space-y-3" },
|
|
33
|
-
React.createElement("h3", { className: "text-sm font-semibold text-[var(--card-foreground)]" }, "Messages"),
|
|
34
|
-
React.createElement("div", { className: "space-y-2 max-h-96 overflow-y-auto" }, messages?.map((msg) => {
|
|
35
|
-
const text = msg.parts
|
|
36
|
-
?.filter((p) => p.type === "text")
|
|
37
|
-
.map((p) => p.text)
|
|
38
|
-
.join("") ?? "";
|
|
39
|
-
return (React.createElement("div", { key: msg.id, className: "text-sm p-3 rounded-xl bg-[var(--accent)]" },
|
|
40
|
-
React.createElement("span", { className: "font-semibold capitalize text-[var(--foreground)]" },
|
|
41
|
-
msg.role,
|
|
42
|
-
":"),
|
|
43
|
-
React.createElement("span", { className: "text-[var(--card-foreground)] ml-1" },
|
|
44
|
-
text.substring(0, 200),
|
|
45
|
-
text.length > 200 ? "..." : "")));
|
|
46
|
-
}))))
|
|
47
|
-
: null));
|
|
48
|
-
});
|
|
49
|
-
AgentCard.displayName = "AgentCard";
|
|
50
|
-
function getStatusColor(status) {
|
|
22
|
+
import { COMPONENT_ERROR } from "../../../errors/error-registry.js";
|
|
23
|
+
import { cn } from "./theme.js";
|
|
24
|
+
import { Avatar } from "./ui/avatar.js";
|
|
25
|
+
import { Card } from "./ui/card.js";
|
|
26
|
+
import { Status } from "./ui/status.js";
|
|
27
|
+
import { Markdown } from "./markdown.js";
|
|
28
|
+
import { ReasoningCard } from "./chat/components/reasoning.js";
|
|
29
|
+
import { ToolCallCard } from "./chat/components/tool-ui.js";
|
|
30
|
+
/** Map the agent status to a `Status` dot colour, label, and pulse. */
|
|
31
|
+
function statusPresentation(status) {
|
|
51
32
|
switch (status) {
|
|
52
|
-
case "idle":
|
|
53
|
-
return "bg-[var(--accent)] text-[var(--card-foreground)]";
|
|
54
33
|
case "thinking":
|
|
55
|
-
return "
|
|
34
|
+
return { color: "blue", label: "Thinking", pulse: true };
|
|
56
35
|
case "tool_execution":
|
|
57
|
-
return "
|
|
36
|
+
return { color: "yellow", label: "Running tools", pulse: true };
|
|
58
37
|
case "streaming":
|
|
59
|
-
return "
|
|
38
|
+
return { color: "green", label: "Responding", pulse: true };
|
|
60
39
|
case "completed":
|
|
61
|
-
return "
|
|
40
|
+
return { color: "green", label: "Completed", pulse: false };
|
|
62
41
|
case "error":
|
|
63
|
-
return "
|
|
42
|
+
return { color: "red", label: "Error", pulse: false };
|
|
43
|
+
case "idle":
|
|
64
44
|
default:
|
|
65
|
-
return "
|
|
45
|
+
return { color: "gray", label: "Idle", pulse: false };
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
const TOOL_STATE = {
|
|
49
|
+
pending: "input-available",
|
|
50
|
+
executing: "input-streaming",
|
|
51
|
+
completed: "output-available",
|
|
52
|
+
error: "output-error",
|
|
53
|
+
};
|
|
54
|
+
/** Adapt an agent `ToolCall` to the `ToolCall` card's `ChatToolPart` shape. */
|
|
55
|
+
function toToolPart(tool) {
|
|
56
|
+
return {
|
|
57
|
+
type: `tool-${tool.name}`,
|
|
58
|
+
toolCallId: tool.id,
|
|
59
|
+
toolName: tool.name,
|
|
60
|
+
state: TOOL_STATE[tool.status],
|
|
61
|
+
input: tool.args,
|
|
62
|
+
output: tool.result,
|
|
63
|
+
errorText: tool.error,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
/** Extract plain text from an agent message's parts. */
|
|
67
|
+
function messageText(message) {
|
|
68
|
+
return message.parts
|
|
69
|
+
?.filter((p) => p.type === "text")
|
|
70
|
+
.map((p) => p.text)
|
|
71
|
+
.join("") ?? "";
|
|
72
|
+
}
|
|
73
|
+
const AgentCardContext = React.createContext(null);
|
|
74
|
+
/** Read the enclosing `AgentCard` state. Throws when used outside an `AgentCard`. */
|
|
75
|
+
export function useAgentCard() {
|
|
76
|
+
const ctx = React.useContext(AgentCardContext);
|
|
77
|
+
if (!ctx) {
|
|
78
|
+
throw COMPONENT_ERROR.create({
|
|
79
|
+
detail: "useAgentCard must be used within an AgentCard",
|
|
80
|
+
});
|
|
66
81
|
}
|
|
82
|
+
return ctx;
|
|
67
83
|
}
|
|
84
|
+
/**
|
|
85
|
+
* `AgentCard.Root` — context provider + the `Card` wrapper. No children renders
|
|
86
|
+
* the default anatomy (`Header` + `Reasoning` + `Tools` + `Body`); pass children
|
|
87
|
+
* to recompose.
|
|
88
|
+
*/
|
|
89
|
+
const AgentCardRoot = React.forwardRef(function AgentCard({ name = "Agent", avatarUrl, messages, toolCalls = [], status, thinking, className, renderTool, children, }, ref) {
|
|
90
|
+
const presentation = statusPresentation(status);
|
|
91
|
+
const context = {
|
|
92
|
+
name,
|
|
93
|
+
avatarUrl,
|
|
94
|
+
messages,
|
|
95
|
+
toolCalls,
|
|
96
|
+
status,
|
|
97
|
+
thinking,
|
|
98
|
+
renderTool,
|
|
99
|
+
presentation,
|
|
100
|
+
};
|
|
101
|
+
return (React.createElement(AgentCardContext.Provider, { value: context },
|
|
102
|
+
React.createElement(Card, { ref: ref, surface: "outline", padding: "md", className: cn("flex flex-col gap-3", className) }, children ?? (React.createElement(React.Fragment, null,
|
|
103
|
+
React.createElement(AgentCardHeader, null),
|
|
104
|
+
React.createElement(AgentCardReasoning, null),
|
|
105
|
+
React.createElement(AgentCardTools, null),
|
|
106
|
+
React.createElement(AgentCardBody, null))))));
|
|
107
|
+
});
|
|
108
|
+
AgentCardRoot.displayName = "AgentCard.Root";
|
|
109
|
+
/**
|
|
110
|
+
* The header row: Avatar + name (left), Status (right). Mirrors
|
|
111
|
+
* `ChatMessageHeader` / `Message.Header`.
|
|
112
|
+
*/
|
|
113
|
+
function AgentCardHeader({ className }) {
|
|
114
|
+
const { name, avatarUrl, presentation } = useAgentCard();
|
|
115
|
+
return (React.createElement("div", { className: cn("flex items-center gap-2", className) },
|
|
116
|
+
React.createElement(Avatar, { name: name, avatarSrc: avatarUrl, className: "size-8" }),
|
|
117
|
+
React.createElement("span", { className: "min-w-0 truncate font-medium text-[var(--foreground)]" }, name),
|
|
118
|
+
React.createElement(Status, { className: "ml-auto", color: presentation.color, label: presentation.label, pulse: presentation.pulse })));
|
|
119
|
+
}
|
|
120
|
+
AgentCardHeader.displayName = "AgentCard.Header";
|
|
121
|
+
/** The reasoning block. Renders only when `thinking` text is present. */
|
|
122
|
+
function AgentCardReasoning({ className }) {
|
|
123
|
+
const { thinking } = useAgentCard();
|
|
124
|
+
if (!thinking)
|
|
125
|
+
return null;
|
|
126
|
+
return React.createElement(ReasoningCard, { text: thinking, className: className });
|
|
127
|
+
}
|
|
128
|
+
AgentCardReasoning.displayName = "AgentCard.Reasoning";
|
|
129
|
+
/** The tool-call list. Renders one `ToolCall` card per entry, or `renderTool`. */
|
|
130
|
+
function AgentCardTools({ className }) {
|
|
131
|
+
const { toolCalls, renderTool } = useAgentCard();
|
|
132
|
+
if (toolCalls.length === 0)
|
|
133
|
+
return null;
|
|
134
|
+
return (React.createElement("div", { className: cn("flex flex-col gap-2", className) }, toolCalls.map((tool) => (React.createElement(React.Fragment, { key: tool.id }, renderTool ? renderTool(tool) : React.createElement(ToolCallCard, { tool: toToolPart(tool) }))))));
|
|
135
|
+
}
|
|
136
|
+
AgentCardTools.displayName = "AgentCard.Tools";
|
|
137
|
+
/** The message body — each message's text rendered as `Markdown`. */
|
|
138
|
+
function AgentCardBody({ className }) {
|
|
139
|
+
const { messages } = useAgentCard();
|
|
140
|
+
if (!messages || messages.length === 0)
|
|
141
|
+
return null;
|
|
142
|
+
return (React.createElement("div", { className: cn("flex flex-col gap-2", className) }, messages.map((message) => {
|
|
143
|
+
const text = messageText(message);
|
|
144
|
+
if (!text)
|
|
145
|
+
return null;
|
|
146
|
+
return (React.createElement(Markdown, { key: message.id, className: "text-[15px] leading-7" }, text));
|
|
147
|
+
})));
|
|
148
|
+
}
|
|
149
|
+
AgentCardBody.displayName = "AgentCard.Body";
|
|
150
|
+
/**
|
|
151
|
+
* AgentCard — render `<AgentCard {...props} />` for the default card, or compose
|
|
152
|
+
* `AgentCard.Header` / `Reasoning` / `Tools` / `Body` for a custom layout.
|
|
153
|
+
* Mirrors the `ToolCall` compound: render it, or compose it.
|
|
154
|
+
*/
|
|
155
|
+
export const AgentCard = Object.assign(AgentCardRoot, {
|
|
156
|
+
Root: AgentCardRoot,
|
|
157
|
+
Header: AgentCardHeader,
|
|
158
|
+
Reasoning: AgentCardReasoning,
|
|
159
|
+
Tools: AgentCardTools,
|
|
160
|
+
Body: AgentCardBody,
|
|
161
|
+
});
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AgentPicker — Popover + Command combobox for switching the active agent.
|
|
3
|
+
* Forked dependency-light 1:1 from Veryfront Studio's `AgentPicker`: a Pill (or
|
|
4
|
+
* input-style) trigger opens a searchable list of agent rows (Avatar + name),
|
|
5
|
+
* a Check marks the selection, and optional "Create Agent" / "Manage Agents"
|
|
6
|
+
* affordances sit at the bottom. Studio's mobile `Drawer`/`ResponsiveSwitch`
|
|
7
|
+
* branch is dropped (Studio-only deps) — the overlay always portals via our
|
|
8
|
+
* `Floating` (through `PopoverContent`) so it never clips in the iframe.
|
|
9
|
+
*
|
|
10
|
+
* Semantic Studio classes remapped to veryfront's `[var(--token)]` vocabulary;
|
|
11
|
+
* icons inherit the Command row's sizing. Composes the private chat/ui
|
|
12
|
+
* primitives (Popover, Command, Avatar) — no radix / cva / `@/` imports.
|
|
13
|
+
*
|
|
14
|
+
* @module react/components/chat/agent-picker
|
|
15
|
+
*/
|
|
16
|
+
import * as React from "../../../../react/react.js";
|
|
17
|
+
/** A selectable agent entry. */
|
|
18
|
+
export interface AgentOption {
|
|
19
|
+
/** Stable identifier — used as the selection value. */
|
|
20
|
+
id: string;
|
|
21
|
+
/** Display name (also the search keyword). */
|
|
22
|
+
name: string;
|
|
23
|
+
/** Avatar image URL; initials are shown when absent. */
|
|
24
|
+
avatarSrc?: string;
|
|
25
|
+
/** Dims the row and blocks selection. */
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
}
|
|
28
|
+
/** A labelled group of agents (e.g. "Connected Agents"). */
|
|
29
|
+
export interface AgentPickerSection {
|
|
30
|
+
/** Omit to render an unlabelled group. */
|
|
31
|
+
label?: string;
|
|
32
|
+
agents: AgentOption[];
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Icon overrides for {@link AgentPicker}. Each defaults to the built-in glyph.
|
|
36
|
+
*/
|
|
37
|
+
export interface AgentPickerIcons {
|
|
38
|
+
check?: React.ReactNode;
|
|
39
|
+
chevron?: React.ReactNode;
|
|
40
|
+
create?: React.ReactNode;
|
|
41
|
+
more?: React.ReactNode;
|
|
42
|
+
}
|
|
43
|
+
/** Props accepted by `<AgentPicker>`. */
|
|
44
|
+
export interface AgentPickerProps {
|
|
45
|
+
/** Agents shown in the default (top) group. */
|
|
46
|
+
agents: AgentOption[];
|
|
47
|
+
/** Selected agent id. */
|
|
48
|
+
value?: string;
|
|
49
|
+
/** Called with the chosen agent id. */
|
|
50
|
+
onValueChange?: (id: string) => void;
|
|
51
|
+
/** Extra labelled groups rendered below the default group. */
|
|
52
|
+
sections?: AgentPickerSection[];
|
|
53
|
+
/** Shows a "Manage Agents" row at the bottom when provided. */
|
|
54
|
+
onManage?: () => void;
|
|
55
|
+
/** Shows a "Create Agent" row at the bottom when provided. */
|
|
56
|
+
onCreate?: () => void;
|
|
57
|
+
/** Notified whenever the popover opens or closes. */
|
|
58
|
+
onOpenChange?: (open: boolean) => void;
|
|
59
|
+
/** Render the trigger as an input-style field instead of a pill. */
|
|
60
|
+
inputStyle?: boolean;
|
|
61
|
+
/** Mark the input-style trigger invalid. */
|
|
62
|
+
invalid?: boolean;
|
|
63
|
+
/** Show skeleton rows while agents are being fetched. */
|
|
64
|
+
isLoading?: boolean;
|
|
65
|
+
/** Additional class names for the trigger. */
|
|
66
|
+
className?: string;
|
|
67
|
+
/** Override any of the picker icons. */
|
|
68
|
+
icons?: AgentPickerIcons;
|
|
69
|
+
/**
|
|
70
|
+
* Compose your own menu from `AgentPicker.Trigger` / `Content` / `List` /
|
|
71
|
+
* `Item`. When omitted, the default data-driven preset is rendered.
|
|
72
|
+
*/
|
|
73
|
+
children?: React.ReactNode;
|
|
74
|
+
}
|
|
75
|
+
/** Shared selection + open state exposed to `AgentPicker.*` sub-parts. */
|
|
76
|
+
export interface AgentPickerContextValue {
|
|
77
|
+
/** Selected agent id. */
|
|
78
|
+
value?: string;
|
|
79
|
+
/** Select an agent by id (also closes the menu). */
|
|
80
|
+
onSelect: (id: string) => void;
|
|
81
|
+
/** Popover open state. */
|
|
82
|
+
open: boolean;
|
|
83
|
+
/** Set the popover open state (notifies `onOpenChange`). */
|
|
84
|
+
setOpen: (open: boolean) => void;
|
|
85
|
+
/** Icon overrides passed to the picker. */
|
|
86
|
+
icons?: AgentPickerIcons;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Read the enclosing `AgentPicker` selection + open state. Throws when used
|
|
90
|
+
* outside an `<AgentPicker>`.
|
|
91
|
+
*/
|
|
92
|
+
export declare function useAgentPicker(): AgentPickerContextValue;
|
|
93
|
+
/** Props for `AgentPicker.Trigger` — the pill/input combobox button. */
|
|
94
|
+
export interface AgentPickerTriggerProps {
|
|
95
|
+
/** Render as an input-style field instead of a pill. */
|
|
96
|
+
inputStyle?: boolean;
|
|
97
|
+
/** Mark the input-style trigger invalid. */
|
|
98
|
+
invalid?: boolean;
|
|
99
|
+
/** Override the trigger contents; defaults to the selected agent's row. */
|
|
100
|
+
children?: React.ReactNode;
|
|
101
|
+
className?: string;
|
|
102
|
+
}
|
|
103
|
+
/** The pill (or input-style) combobox trigger. Toggles the popover. */
|
|
104
|
+
declare function AgentPickerTrigger({ inputStyle, invalid, children, className }: AgentPickerTriggerProps): React.ReactElement;
|
|
105
|
+
declare namespace AgentPickerTrigger {
|
|
106
|
+
var displayName: string;
|
|
107
|
+
}
|
|
108
|
+
/** Props for `AgentPicker.Content` — the popover surface + `Command` shell. */
|
|
109
|
+
export interface AgentPickerContentProps {
|
|
110
|
+
/** Show the search input above the list. */
|
|
111
|
+
showSearch?: boolean;
|
|
112
|
+
/** Search input placeholder. */
|
|
113
|
+
searchPlaceholder?: string;
|
|
114
|
+
children?: React.ReactNode;
|
|
115
|
+
className?: string;
|
|
116
|
+
}
|
|
117
|
+
/** The popover surface wrapping a `Command` (search + list region). */
|
|
118
|
+
declare function AgentPickerContent({ showSearch, searchPlaceholder, children, className, }: AgentPickerContentProps): React.ReactElement;
|
|
119
|
+
declare namespace AgentPickerContent {
|
|
120
|
+
var displayName: string;
|
|
121
|
+
}
|
|
122
|
+
/** The scrollable `Command` list region. */
|
|
123
|
+
declare function AgentPickerList({ children, className }: {
|
|
124
|
+
children?: React.ReactNode;
|
|
125
|
+
className?: string;
|
|
126
|
+
}): React.ReactElement;
|
|
127
|
+
declare namespace AgentPickerList {
|
|
128
|
+
var displayName: string;
|
|
129
|
+
}
|
|
130
|
+
/** Props for `AgentPicker.Item` — a single selectable agent row. */
|
|
131
|
+
export interface AgentPickerItemProps {
|
|
132
|
+
/** The agent this row represents. Its `id` is the selection value. */
|
|
133
|
+
agent: AgentOption;
|
|
134
|
+
/** Force selected styling; defaults to matching the context `value`. */
|
|
135
|
+
selected?: boolean;
|
|
136
|
+
className?: string;
|
|
137
|
+
}
|
|
138
|
+
/** A single agent row (Avatar + name + selection check). */
|
|
139
|
+
declare function AgentPickerItem({ agent, selected, className }: AgentPickerItemProps): React.ReactElement;
|
|
140
|
+
declare namespace AgentPickerItem {
|
|
141
|
+
var displayName: string;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* `AgentPicker.Root` — context provider + the popover shell. No children
|
|
145
|
+
* renders the default data-driven preset; pass children to recompose from
|
|
146
|
+
* `AgentPicker.Trigger` / `Content` / `List` / `Item`.
|
|
147
|
+
*/
|
|
148
|
+
declare function AgentPickerRoot({ agents, value, onValueChange, sections, onManage, onCreate, onOpenChange, inputStyle, invalid, isLoading, className, icons, children, }: AgentPickerProps): React.ReactElement;
|
|
149
|
+
declare namespace AgentPickerRoot {
|
|
150
|
+
var displayName: string;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* AgentPicker — render `<AgentPicker agents={...} .../>` for the default
|
|
154
|
+
* data-driven combobox, or compose `AgentPicker.Trigger` / `Content` / `List` /
|
|
155
|
+
* `Item` for a custom menu. Mirrors the `ToolCall` compound: render it, or
|
|
156
|
+
* compose it.
|
|
157
|
+
*/
|
|
158
|
+
export declare const AgentPicker: typeof AgentPickerRoot & {
|
|
159
|
+
Root: typeof AgentPickerRoot;
|
|
160
|
+
Trigger: typeof AgentPickerTrigger;
|
|
161
|
+
Content: typeof AgentPickerContent;
|
|
162
|
+
List: typeof AgentPickerList;
|
|
163
|
+
Item: typeof AgentPickerItem;
|
|
164
|
+
};
|
|
165
|
+
export {};
|
|
166
|
+
//# sourceMappingURL=agent-picker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-picker.d.ts","sourceRoot":"","sources":["../../../../../src/src/react/components/chat/agent-picker.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,KAAK,MAAM,4BAA4B,CAAC;AAgBpD,gCAAgC;AAChC,MAAM,WAAW,WAAW;IAC1B,uDAAuD;IACvD,EAAE,EAAE,MAAM,CAAC;IACX,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yCAAyC;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,4DAA4D;AAC5D,MAAM,WAAW,kBAAkB;IACjC,0CAA0C;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,WAAW,EAAE,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS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