@dungle-scrubs/admin-ui-soft 0.0.0-stage → 0.1.0
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/GUIDE.md +110 -0
- package/LICENSE +21 -0
- package/README.md +36 -2
- package/THIRD-PARTY-NOTICES.md +25 -0
- package/UPSTREAM-VENDORED-CHANGES.md +317 -0
- package/VENDORED-CHANGES.md +60 -0
- package/dist/_virtual/_rolldown/runtime.js +13 -0
- package/dist/ai/compositions/agent-console/agent-console.d.ts +109 -0
- package/dist/ai/compositions/agent-console/agent-console.js +644 -0
- package/dist/ai/compositions/attention-feed/attention-feed.d.ts +127 -0
- package/dist/ai/compositions/attention-feed/attention-feed.js +626 -0
- package/dist/ai/compositions/conversation-browser/conversation-browser.d.ts +126 -0
- package/dist/ai/compositions/conversation-browser/conversation-browser.js +364 -0
- package/dist/ai/compositions/redaction-marker/redaction-marker.d.ts +42 -0
- package/dist/ai/compositions/redaction-marker/redaction-marker.js +202 -0
- package/dist/ai/compositions/run-inspector/json-view.js +164 -0
- package/dist/ai/compositions/run-inspector/run-inspector.d.ts +66 -0
- package/dist/ai/compositions/run-inspector/run-inspector.js +703 -0
- package/dist/ai/compositions/run-inspector/run-model.js +155 -0
- package/dist/ai/compositions/tool-approval/json-args.js +54 -0
- package/dist/ai/compositions/tool-approval/tool-approval.d.ts +57 -0
- package/dist/ai/compositions/tool-approval/tool-approval.js +331 -0
- package/dist/ai/compositions/tool-call-row/tool-call-row.js +74 -0
- package/dist/ai/compositions/transcript-viewer/to-thread-messages.js +65 -0
- package/dist/ai/compositions/transcript-viewer/transcript-viewer.d.ts +63 -0
- package/dist/ai/compositions/transcript-viewer/transcript-viewer.js +471 -0
- package/dist/ai/compositions/usage-meter/usage-format.js +107 -0
- package/dist/ai/compositions/usage-meter/usage-meter.d.ts +32 -0
- package/dist/ai/compositions/usage-meter/usage-meter.js +258 -0
- package/dist/ai/testing/mock-clock.d.ts +31 -0
- package/dist/ai/testing/mock-clock.js +66 -0
- package/dist/ai/testing/mock-reply.d.ts +70 -0
- package/dist/ai/testing/mock-reply.js +100 -0
- package/dist/ai/testing/mock-runtime.d.ts +86 -0
- package/dist/ai/testing/mock-runtime.js +384 -0
- package/dist/ai/types.d.ts +323 -0
- package/dist/ai.css +1088 -0
- package/dist/ai.d.ts +160 -0
- package/dist/ai.js +158 -0
- package/dist/components/assistant-ui/elements/activity-graph.d.ts +14 -0
- package/dist/components/assistant-ui/elements/activity-graph.js +69 -0
- package/dist/components/assistant-ui/elements/agent-card.d.ts +21 -0
- package/dist/components/assistant-ui/elements/agent-card.js +75 -0
- package/dist/components/assistant-ui/elements/agent-handoff.d.ts +13 -0
- package/dist/components/assistant-ui/elements/agent-handoff.js +47 -0
- package/dist/components/assistant-ui/elements/agent-plan.d.ts +16 -0
- package/dist/components/assistant-ui/elements/agent-plan.js +93 -0
- package/dist/components/assistant-ui/elements/agent-status.aui.d.ts +24 -0
- package/dist/components/assistant-ui/elements/agent-status.aui.js +161 -0
- package/dist/components/assistant-ui/elements/agent-status.d.ts +17 -0
- package/dist/components/assistant-ui/elements/agent-status.js +47 -0
- package/dist/components/assistant-ui/elements/approval-card.d.ts +31 -0
- package/dist/components/assistant-ui/elements/approval-card.js +99 -0
- package/dist/components/assistant-ui/elements/artifact-card.d.ts +12 -0
- package/dist/components/assistant-ui/elements/artifact-card.js +47 -0
- package/dist/components/assistant-ui/elements/assistant-modal.aui.d.ts +7 -0
- package/dist/components/assistant-ui/elements/assistant-modal.aui.js +276 -0
- package/dist/components/assistant-ui/elements/assistant-sidebar.aui.d.ts +7 -0
- package/dist/components/assistant-ui/elements/assistant-sidebar.aui.js +18 -0
- package/dist/components/assistant-ui/elements/attachment.aui.d.ts +9 -0
- package/dist/components/assistant-ui/elements/attachment.aui.js +143 -0
- package/dist/components/assistant-ui/elements/background-inbox.d.ts +18 -0
- package/dist/components/assistant-ui/elements/background-inbox.js +65 -0
- package/dist/components/assistant-ui/elements/canvas-split.d.ts +25 -0
- package/dist/components/assistant-ui/elements/canvas-split.js +106 -0
- package/dist/components/assistant-ui/elements/chart.d.ts +19 -0
- package/dist/components/assistant-ui/elements/chart.js +105 -0
- package/dist/components/assistant-ui/elements/chat-panel.d.ts +15 -0
- package/dist/components/assistant-ui/elements/chat-panel.js +82 -0
- package/dist/components/assistant-ui/elements/checkpoint-history.d.ts +17 -0
- package/dist/components/assistant-ui/elements/checkpoint-history.js +60 -0
- package/dist/components/assistant-ui/elements/code-diff.d.ts +18 -0
- package/dist/components/assistant-ui/elements/code-diff.js +89 -0
- package/dist/components/assistant-ui/elements/code-runner.d.ts +15 -0
- package/dist/components/assistant-ui/elements/code-runner.js +108 -0
- package/dist/components/assistant-ui/elements/command-palette.d.ts +20 -0
- package/dist/components/assistant-ui/elements/command-palette.js +129 -0
- package/dist/components/assistant-ui/elements/comparison-card.d.ts +18 -0
- package/dist/components/assistant-ui/elements/comparison-card.js +58 -0
- package/dist/components/assistant-ui/elements/composer-trigger-popover.aui.d.ts +51 -0
- package/dist/components/assistant-ui/elements/composer-trigger-popover.aui.js +104 -0
- package/dist/components/assistant-ui/elements/composer.d.ts +91 -0
- package/dist/components/assistant-ui/elements/composer.js +416 -0
- package/dist/components/assistant-ui/elements/computer-use.d.ts +19 -0
- package/dist/components/assistant-ui/elements/computer-use.js +84 -0
- package/dist/components/assistant-ui/elements/confidence-marker.d.ts +20 -0
- package/dist/components/assistant-ui/elements/confidence-marker.js +58 -0
- package/dist/components/assistant-ui/elements/connection-state.d.ts +13 -0
- package/dist/components/assistant-ui/elements/connection-state.js +59 -0
- package/dist/components/assistant-ui/elements/context-breakdown.d.ts +15 -0
- package/dist/components/assistant-ui/elements/context-breakdown.js +91 -0
- package/dist/components/assistant-ui/elements/context-display.aui.d.ts +25 -0
- package/dist/components/assistant-ui/elements/context-display.aui.js +26 -0
- package/dist/components/assistant-ui/elements/context-display.d.ts +43 -0
- package/dist/components/assistant-ui/elements/context-display.js +300 -0
- package/dist/components/assistant-ui/elements/conversation-map.aui.d.ts +9 -0
- package/dist/components/assistant-ui/elements/conversation-map.aui.js +177 -0
- package/dist/components/assistant-ui/elements/conversation-map.d.ts +19 -0
- package/dist/components/assistant-ui/elements/conversation-map.js +84 -0
- package/dist/components/assistant-ui/elements/conversation-search.d.ts +20 -0
- package/dist/components/assistant-ui/elements/conversation-search.js +75 -0
- package/dist/components/assistant-ui/elements/cost-meter.d.ts +19 -0
- package/dist/components/assistant-ui/elements/cost-meter.js +76 -0
- package/dist/components/assistant-ui/elements/data-table.d.ts +72 -0
- package/dist/components/assistant-ui/elements/data-table.js +368 -0
- package/dist/components/assistant-ui/elements/day-separator.d.ts +16 -0
- package/dist/components/assistant-ui/elements/day-separator.js +44 -0
- package/dist/components/assistant-ui/elements/diagram.d.ts +15 -0
- package/dist/components/assistant-ui/elements/diagram.js +65 -0
- package/dist/components/assistant-ui/elements/directive-text.aui.d.ts +11 -0
- package/dist/components/assistant-ui/elements/directive-text.aui.js +18 -0
- package/dist/components/assistant-ui/elements/directive-text.d.ts +32 -0
- package/dist/components/assistant-ui/elements/directive-text.js +35 -0
- package/dist/components/assistant-ui/elements/document-reference.d.ts +17 -0
- package/dist/components/assistant-ui/elements/document-reference.js +62 -0
- package/dist/components/assistant-ui/elements/draft-restore.d.ts +12 -0
- package/dist/components/assistant-ui/elements/draft-restore.js +43 -0
- package/dist/components/assistant-ui/elements/edit-message.d.ts +15 -0
- package/dist/components/assistant-ui/elements/edit-message.js +63 -0
- package/dist/components/assistant-ui/elements/elicitation-form.d.ts +23 -0
- package/dist/components/assistant-ui/elements/elicitation-form.js +112 -0
- package/dist/components/assistant-ui/elements/empty-state.d.ts +16 -0
- package/dist/components/assistant-ui/elements/empty-state.js +71 -0
- package/dist/components/assistant-ui/elements/error-state.d.ts +13 -0
- package/dist/components/assistant-ui/elements/error-state.js +52 -0
- package/dist/components/assistant-ui/elements/feedback-dialog.d.ts +15 -0
- package/dist/components/assistant-ui/elements/feedback-dialog.js +77 -0
- package/dist/components/assistant-ui/elements/file-tree.d.ts +20 -0
- package/dist/components/assistant-ui/elements/file-tree.js +74 -0
- package/dist/components/assistant-ui/elements/file.d.ts +52 -0
- package/dist/components/assistant-ui/elements/file.js +222 -0
- package/dist/components/assistant-ui/elements/flow-graph.d.ts +23 -0
- package/dist/components/assistant-ui/elements/flow-graph.js +72 -0
- package/dist/components/assistant-ui/elements/follow-up-suggestions.aui.d.ts +7 -0
- package/dist/components/assistant-ui/elements/follow-up-suggestions.aui.js +30 -0
- package/dist/components/assistant-ui/elements/generative-ui.d.ts +8 -0
- package/dist/components/assistant-ui/elements/generative-ui.js +27 -0
- package/dist/components/assistant-ui/elements/geo-map.d.ts +29 -0
- package/dist/components/assistant-ui/elements/geo-map.js +190 -0
- package/dist/components/assistant-ui/elements/guardrail-notice.d.ts +15 -0
- package/dist/components/assistant-ui/elements/guardrail-notice.js +59 -0
- package/dist/components/assistant-ui/elements/heat-graph.d.ts +9 -0
- package/dist/components/assistant-ui/elements/heat-graph.js +90 -0
- package/dist/components/assistant-ui/elements/image-gallery.d.ts +22 -0
- package/dist/components/assistant-ui/elements/image-gallery.js +192 -0
- package/dist/components/assistant-ui/elements/image-generation.d.ts +11 -0
- package/dist/components/assistant-ui/elements/image-generation.js +64 -0
- package/dist/components/assistant-ui/elements/image.d.ts +59 -0
- package/dist/components/assistant-ui/elements/image.js +416 -0
- package/dist/components/assistant-ui/elements/inline-citation.d.ts +23 -0
- package/dist/components/assistant-ui/elements/inline-citation.js +90 -0
- package/dist/components/assistant-ui/elements/job-progress.d.ts +25 -0
- package/dist/components/assistant-ui/elements/job-progress.js +102 -0
- package/dist/components/assistant-ui/elements/launcher-bubble.d.ts +15 -0
- package/dist/components/assistant-ui/elements/launcher-bubble.js +71 -0
- package/dist/components/assistant-ui/elements/link-preview.d.ts +17 -0
- package/dist/components/assistant-ui/elements/link-preview.js +77 -0
- package/dist/components/assistant-ui/elements/loading-state.d.ts +13 -0
- package/dist/components/assistant-ui/elements/loading-state.js +33 -0
- package/dist/components/assistant-ui/elements/logos.d.ts +10 -0
- package/dist/components/assistant-ui/elements/logos.js +63 -0
- package/dist/components/assistant-ui/elements/map-answer.d.ts +19 -0
- package/dist/components/assistant-ui/elements/map-answer.js +120 -0
- package/dist/components/assistant-ui/elements/markdown-text.d.ts +11 -0
- package/dist/components/assistant-ui/elements/markdown-text.js +152 -0
- package/dist/components/assistant-ui/elements/math-block.d.ts +25 -0
- package/dist/components/assistant-ui/elements/math-block.js +60 -0
- package/dist/components/assistant-ui/elements/mcp-config.aui.d.ts +28 -0
- package/dist/components/assistant-ui/elements/mcp-config.aui.js +380 -0
- package/dist/components/assistant-ui/elements/mcp-server-panel.d.ts +20 -0
- package/dist/components/assistant-ui/elements/mcp-server-panel.js +114 -0
- package/dist/components/assistant-ui/elements/media-player.d.ts +21 -0
- package/dist/components/assistant-ui/elements/media-player.js +302 -0
- package/dist/components/assistant-ui/elements/memory-chips.d.ts +16 -0
- package/dist/components/assistant-ui/elements/memory-chips.js +44 -0
- package/dist/components/assistant-ui/elements/mermaid-diagram.aui.d.ts +14 -0
- package/dist/components/assistant-ui/elements/mermaid-diagram.aui.js +43 -0
- package/dist/components/assistant-ui/elements/mermaid-diagram.d.ts +20 -0
- package/dist/components/assistant-ui/elements/mermaid-diagram.js +258 -0
- package/dist/components/assistant-ui/elements/message-actions.d.ts +17 -0
- package/dist/components/assistant-ui/elements/message-actions.js +57 -0
- package/dist/components/assistant-ui/elements/message-attachment.d.ts +18 -0
- package/dist/components/assistant-ui/elements/message-attachment.js +58 -0
- package/dist/components/assistant-ui/elements/message-branches.d.ts +12 -0
- package/dist/components/assistant-ui/elements/message-branches.js +55 -0
- package/dist/components/assistant-ui/elements/message-pair.d.ts +16 -0
- package/dist/components/assistant-ui/elements/message-pair.js +63 -0
- package/dist/components/assistant-ui/elements/message-queue.d.ts +15 -0
- package/dist/components/assistant-ui/elements/message-queue.js +70 -0
- package/dist/components/assistant-ui/elements/message-timing.aui.d.ts +30 -0
- package/dist/components/assistant-ui/elements/message-timing.aui.js +98 -0
- package/dist/components/assistant-ui/elements/message-timing.d.ts +14 -0
- package/dist/components/assistant-ui/elements/message-timing.js +26 -0
- package/dist/components/assistant-ui/elements/mobile-composer.d.ts +18 -0
- package/dist/components/assistant-ui/elements/mobile-composer.js +76 -0
- package/dist/components/assistant-ui/elements/model-picker.d.ts +19 -0
- package/dist/components/assistant-ui/elements/model-picker.js +68 -0
- package/dist/components/assistant-ui/elements/model-selector.aui.d.ts +23 -0
- package/dist/components/assistant-ui/elements/model-selector.aui.js +79 -0
- package/dist/components/assistant-ui/elements/model-selector.d.ts +130 -0
- package/dist/components/assistant-ui/elements/model-selector.js +399 -0
- package/dist/components/assistant-ui/elements/number-ticker.d.ts +10 -0
- package/dist/components/assistant-ui/elements/number-ticker.js +41 -0
- package/dist/components/assistant-ui/elements/onboarding.d.ts +17 -0
- package/dist/components/assistant-ui/elements/onboarding.js +69 -0
- package/dist/components/assistant-ui/elements/option-list.d.ts +39 -0
- package/dist/components/assistant-ui/elements/option-list.js +176 -0
- package/dist/components/assistant-ui/elements/permission-grant.d.ts +14 -0
- package/dist/components/assistant-ui/elements/permission-grant.js +84 -0
- package/dist/components/assistant-ui/elements/prompt-library.d.ts +20 -0
- package/dist/components/assistant-ui/elements/prompt-library.js +121 -0
- package/dist/components/assistant-ui/elements/question-flow.d.ts +24 -0
- package/dist/components/assistant-ui/elements/question-flow.js +180 -0
- package/dist/components/assistant-ui/elements/quota-banner.d.ts +14 -0
- package/dist/components/assistant-ui/elements/quota-banner.js +68 -0
- package/dist/components/assistant-ui/elements/quote-reply.d.ts +20 -0
- package/dist/components/assistant-ui/elements/quote-reply.js +66 -0
- package/dist/components/assistant-ui/elements/quote.aui.d.ts +61 -0
- package/dist/components/assistant-ui/elements/quote.aui.js +170 -0
- package/dist/components/assistant-ui/elements/read-aloud.d.ts +16 -0
- package/dist/components/assistant-ui/elements/read-aloud.js +66 -0
- package/dist/components/assistant-ui/elements/reasoning-effort.d.ts +17 -0
- package/dist/components/assistant-ui/elements/reasoning-effort.js +67 -0
- package/dist/components/assistant-ui/elements/reasoning-panel.d.ts +20 -0
- package/dist/components/assistant-ui/elements/reasoning-panel.js +60 -0
- package/dist/components/assistant-ui/elements/reasoning.aui.d.ts +24 -0
- package/dist/components/assistant-ui/elements/reasoning.aui.js +70 -0
- package/dist/components/assistant-ui/elements/reasoning.d.ts +38 -0
- package/dist/components/assistant-ui/elements/reasoning.js +194 -0
- package/dist/components/assistant-ui/elements/recommendation-card.d.ts +16 -0
- package/dist/components/assistant-ui/elements/recommendation-card.js +65 -0
- package/dist/components/assistant-ui/elements/regenerate-menu.d.ts +18 -0
- package/dist/components/assistant-ui/elements/regenerate-menu.js +46 -0
- package/dist/components/assistant-ui/elements/research-report.d.ts +19 -0
- package/dist/components/assistant-ui/elements/research-report.js +63 -0
- package/dist/components/assistant-ui/elements/retrieval-chunks.d.ts +19 -0
- package/dist/components/assistant-ui/elements/retrieval-chunks.js +86 -0
- package/dist/components/assistant-ui/elements/reviewable-diff.d.ts +21 -0
- package/dist/components/assistant-ui/elements/reviewable-diff.js +104 -0
- package/dist/components/assistant-ui/elements/schedule-card.d.ts +19 -0
- package/dist/components/assistant-ui/elements/schedule-card.js +80 -0
- package/dist/components/assistant-ui/elements/score-breakdown.d.ts +19 -0
- package/dist/components/assistant-ui/elements/score-breakdown.js +107 -0
- package/dist/components/assistant-ui/elements/scroll-anchor.d.ts +15 -0
- package/dist/components/assistant-ui/elements/scroll-anchor.js +104 -0
- package/dist/components/assistant-ui/elements/settings-panel.d.ts +23 -0
- package/dist/components/assistant-ui/elements/settings-panel.js +108 -0
- package/dist/components/assistant-ui/elements/shared-conversation.d.ts +18 -0
- package/dist/components/assistant-ui/elements/shared-conversation.js +56 -0
- package/dist/components/assistant-ui/elements/shiki-highlighter.aui.d.ts +29 -0
- package/dist/components/assistant-ui/elements/shiki-highlighter.aui.js +31 -0
- package/dist/components/assistant-ui/elements/shiki-highlighter.d.ts +26 -0
- package/dist/components/assistant-ui/elements/shiki-highlighter.js +49 -0
- package/dist/components/assistant-ui/elements/sources.aui.d.ts +24 -0
- package/dist/components/assistant-ui/elements/sources.aui.js +121 -0
- package/dist/components/assistant-ui/elements/sources.d.ts +21 -0
- package/dist/components/assistant-ui/elements/sources.js +109 -0
- package/dist/components/assistant-ui/elements/speaker-identity.d.ts +17 -0
- package/dist/components/assistant-ui/elements/speaker-identity.js +45 -0
- package/dist/components/assistant-ui/elements/spec-sheet.d.ts +17 -0
- package/dist/components/assistant-ui/elements/spec-sheet.js +39 -0
- package/dist/components/assistant-ui/elements/stopped-run.d.ts +12 -0
- package/dist/components/assistant-ui/elements/stopped-run.js +44 -0
- package/dist/components/assistant-ui/elements/streaming-text.d.ts +15 -0
- package/dist/components/assistant-ui/elements/streaming-text.js +45 -0
- package/dist/components/assistant-ui/elements/subagent-list.d.ts +17 -0
- package/dist/components/assistant-ui/elements/subagent-list.js +74 -0
- package/dist/components/assistant-ui/elements/suggestions.d.ts +14 -0
- package/dist/components/assistant-ui/elements/suggestions.js +25 -0
- package/dist/components/assistant-ui/elements/surfaces.d.ts +42 -0
- package/dist/components/assistant-ui/elements/surfaces.js +87 -0
- package/dist/components/assistant-ui/elements/syntax-highlighter.d.ts +7 -0
- package/dist/components/assistant-ui/elements/syntax-highlighter.js +41 -0
- package/dist/components/assistant-ui/elements/task-card.aui.d.ts +24 -0
- package/dist/components/assistant-ui/elements/task-card.aui.js +136 -0
- package/dist/components/assistant-ui/elements/task-card.d.ts +22 -0
- package/dist/components/assistant-ui/elements/task-card.js +104 -0
- package/dist/components/assistant-ui/elements/terminal-block.d.ts +27 -0
- package/dist/components/assistant-ui/elements/terminal-block.js +266 -0
- package/dist/components/assistant-ui/elements/thinking-indicator.d.ts +10 -0
- package/dist/components/assistant-ui/elements/thinking-indicator.js +30 -0
- package/dist/components/assistant-ui/elements/thread-list.aui.d.ts +39 -0
- package/dist/components/assistant-ui/elements/thread-list.aui.js +331 -0
- package/dist/components/assistant-ui/elements/thread-list.d.ts +19 -0
- package/dist/components/assistant-ui/elements/thread-list.js +72 -0
- package/dist/components/assistant-ui/elements/thread-search.d.ts +20 -0
- package/dist/components/assistant-ui/elements/thread-search.js +94 -0
- package/dist/components/assistant-ui/elements/thread.aui.d.ts +36 -0
- package/dist/components/assistant-ui/elements/thread.aui.js +625 -0
- package/dist/components/assistant-ui/elements/threadlist-sidebar.aui.d.ts +19 -0
- package/dist/components/assistant-ui/elements/threadlist-sidebar.aui.js +75 -0
- package/dist/components/assistant-ui/elements/timeline.d.ts +18 -0
- package/dist/components/assistant-ui/elements/timeline.js +40 -0
- package/dist/components/assistant-ui/elements/todo-list.d.ts +21 -0
- package/dist/components/assistant-ui/elements/todo-list.js +100 -0
- package/dist/components/assistant-ui/elements/tool-call.d.ts +17 -0
- package/dist/components/assistant-ui/elements/tool-call.js +70 -0
- package/dist/components/assistant-ui/elements/tool-error.d.ts +16 -0
- package/dist/components/assistant-ui/elements/tool-error.js +62 -0
- package/dist/components/assistant-ui/elements/tool-fallback.aui.d.ts +44 -0
- package/dist/components/assistant-ui/elements/tool-fallback.aui.js +542 -0
- package/dist/components/assistant-ui/elements/tool-group.aui.d.ts +37 -0
- package/dist/components/assistant-ui/elements/tool-group.aui.js +104 -0
- package/dist/components/assistant-ui/elements/tool-group.d.ts +20 -0
- package/dist/components/assistant-ui/elements/tool-group.js +71 -0
- package/dist/components/assistant-ui/elements/tool-timeline.d.ts +44 -0
- package/dist/components/assistant-ui/elements/tool-timeline.js +109 -0
- package/dist/components/assistant-ui/elements/tooltip-icon-button.d.ts +12 -0
- package/dist/components/assistant-ui/elements/tooltip-icon-button.js +30 -0
- package/dist/components/assistant-ui/elements/trace-waterfall.d.ts +33 -0
- package/dist/components/assistant-ui/elements/trace-waterfall.js +102 -0
- package/dist/components/assistant-ui/elements/typing-indicator.d.ts +9 -0
- package/dist/components/assistant-ui/elements/typing-indicator.js +45 -0
- package/dist/components/assistant-ui/elements/voice-conversation.aui.d.ts +11 -0
- package/dist/components/assistant-ui/elements/voice-conversation.aui.js +54 -0
- package/dist/components/assistant-ui/elements/voice-conversation.d.ts +21 -0
- package/dist/components/assistant-ui/elements/voice-conversation.js +110 -0
- package/dist/components/assistant-ui/elements/voice.aui.d.ts +22 -0
- package/dist/components/assistant-ui/elements/voice.aui.js +100 -0
- package/dist/components/assistant-ui/elements/voice.d.ts +15 -0
- package/dist/components/assistant-ui/elements/voice.js +400 -0
- package/dist/components/assistant-ui/elements/web-preview.d.ts +18 -0
- package/dist/components/assistant-ui/elements/web-preview.js +61 -0
- package/dist/components/assistant-ui/elements/web-search.d.ts +17 -0
- package/dist/components/assistant-ui/elements/web-search.js +54 -0
- package/dist/components/assistant-ui/utils/href.d.ts +13 -0
- package/dist/components/assistant-ui/utils/href.js +39 -0
- package/dist/components/assistant-ui/utils/range.d.ts +22 -0
- package/dist/components/assistant-ui/utils/range.js +48 -0
- package/dist/components/assistant-ui/utils/task.d.ts +14 -0
- package/dist/components/assistant-ui/utils/task.js +75 -0
- package/dist/components/icons/github.js +13 -0
- package/dist/components/theme-provider.d.ts +16 -0
- package/dist/components/theme-provider.js +116 -0
- package/dist/components/ui/accordion.d.ts +8 -0
- package/dist/components/ui/accordion.js +53 -0
- package/dist/components/ui/alert-dialog.d.ts +20 -0
- package/dist/components/ui/alert-dialog.js +93 -0
- package/dist/components/ui/alert.d.ts +12 -0
- package/dist/components/ui/alert.js +42 -0
- package/dist/components/ui/aspect-ratio.d.ts +6 -0
- package/dist/components/ui/aspect-ratio.js +13 -0
- package/dist/components/ui/attachment.d.ts +25 -0
- package/dist/components/ui/attachment.js +103 -0
- package/dist/components/ui/avatar.d.ts +13 -0
- package/dist/components/ui/avatar.js +50 -0
- package/dist/components/ui/badge.d.ts +14 -0
- package/dist/components/ui/badge.js +30 -0
- package/dist/components/ui/breadcrumb.d.ts +12 -0
- package/dist/components/ui/breadcrumb.js +71 -0
- package/dist/components/ui/bubble.d.ts +18 -0
- package/dist/components/ui/bubble.js +72 -0
- package/dist/components/ui/button-group.d.ts +12 -0
- package/dist/components/ui/button-group.js +41 -0
- package/dist/components/ui/button.d.ts +19 -0
- package/dist/components/ui/button.js +71 -0
- package/dist/components/ui/calendar.d.ts +12 -0
- package/dist/components/ui/calendar.js +108 -0
- package/dist/components/ui/card.d.ts +13 -0
- package/dist/components/ui/card.js +55 -0
- package/dist/components/ui/carousel.d.ts +30 -0
- package/dist/components/ui/carousel.js +131 -0
- package/dist/components/ui/chart.d.ts +46 -0
- package/dist/components/ui/chart.js +148 -0
- package/dist/components/ui/checkbox.d.ts +5 -0
- package/dist/components/ui/checkbox.js +20 -0
- package/dist/components/ui/collapsible.d.ts +7 -0
- package/dist/components/ui/collapsible.js +23 -0
- package/dist/components/ui/combobox.d.ts +26 -0
- package/dist/components/ui/combobox.js +161 -0
- package/dist/components/ui/command.d.ts +21 -0
- package/dist/components/ui/command.js +87 -0
- package/dist/components/ui/context-menu.d.ts +31 -0
- package/dist/components/ui/context-menu.js +132 -0
- package/dist/components/ui/dialog.d.ts +19 -0
- package/dist/components/ui/dialog.js +91 -0
- package/dist/components/ui/diff-viewer.d.ts +100 -0
- package/dist/components/ui/diff-viewer.js +461 -0
- package/dist/components/ui/direction.d.ts +2 -0
- package/dist/components/ui/direction.js +2 -0
- package/dist/components/ui/dot-matrix.d.ts +150 -0
- package/dist/components/ui/dot-matrix.js +248 -0
- package/dist/components/ui/drawer.d.ts +18 -0
- package/dist/components/ui/drawer.js +123 -0
- package/dist/components/ui/dropdown-menu.d.ts +31 -0
- package/dist/components/ui/dropdown-menu.js +136 -0
- package/dist/components/ui/empty.d.ts +13 -0
- package/dist/components/ui/empty.js +59 -0
- package/dist/components/ui/field.d.ts +26 -0
- package/dist/components/ui/field.js +109 -0
- package/dist/components/ui/hover-card.d.ts +7 -0
- package/dist/components/ui/hover-card.js +36 -0
- package/dist/components/ui/input-group.d.ts +20 -0
- package/dist/components/ui/input-group.js +77 -0
- package/dist/components/ui/input-otp.d.ts +13 -0
- package/dist/components/ui/input-otp.js +46 -0
- package/dist/components/ui/input.d.ts +5 -0
- package/dist/components/ui/input.js +14 -0
- package/dist/components/ui/item.d.ts +24 -0
- package/dist/components/ui/item.js +120 -0
- package/dist/components/ui/kbd.d.ts +5 -0
- package/dist/components/ui/kbd.js +19 -0
- package/dist/components/ui/label.d.ts +5 -0
- package/dist/components/ui/label.js +12 -0
- package/dist/components/ui/marker.d.ts +12 -0
- package/dist/components/ui/marker.js +42 -0
- package/dist/components/ui/menubar.d.ts +31 -0
- package/dist/components/ui/menubar.js +135 -0
- package/dist/components/ui/message-scroller.d.ts +12 -0
- package/dist/components/ui/message-scroller.js +59 -0
- package/dist/components/ui/message.d.ts +12 -0
- package/dist/components/ui/message.js +48 -0
- package/dist/components/ui/native-select.d.ts +10 -0
- package/dist/components/ui/native-select.js +37 -0
- package/dist/components/ui/navigation-menu.d.ts +13 -0
- package/dist/components/ui/navigation-menu.js +82 -0
- package/dist/components/ui/number-roll.d.ts +21 -0
- package/dist/components/ui/number-roll.js +269 -0
- package/dist/components/ui/pagination.d.ts +19 -0
- package/dist/components/ui/pagination.js +79 -0
- package/dist/components/ui/popover.d.ts +11 -0
- package/dist/components/ui/popover.js +54 -0
- package/dist/components/ui/progress.d.ts +9 -0
- package/dist/components/ui/progress.js +44 -0
- package/dist/components/ui/questionnaire.d.ts +21 -0
- package/dist/components/ui/questionnaire.js +169 -0
- package/dist/components/ui/radio-group.d.ts +7 -0
- package/dist/components/ui/radio-group.js +26 -0
- package/dist/components/ui/resizable.d.ts +9 -0
- package/dist/components/ui/resizable.js +28 -0
- package/dist/components/ui/scroll-area.d.ts +6 -0
- package/dist/components/ui/scroll-area.js +35 -0
- package/dist/components/ui/select.d.ts +17 -0
- package/dist/components/ui/select.js +96 -0
- package/dist/components/ui/separator.d.ts +5 -0
- package/dist/components/ui/separator.js +14 -0
- package/dist/components/ui/sheet.d.ts +16 -0
- package/dist/components/ui/sheet.js +87 -0
- package/dist/components/ui/sidebar.d.ts +65 -0
- package/dist/components/ui/sidebar.js +386 -0
- package/dist/components/ui/skeleton.d.ts +4 -0
- package/dist/components/ui/skeleton.js +12 -0
- package/dist/components/ui/slider.d.ts +5 -0
- package/dist/components/ui/slider.js +33 -0
- package/dist/components/ui/spinner.d.ts +4 -0
- package/dist/components/ui/spinner.js +15 -0
- package/dist/components/ui/switch.d.ts +7 -0
- package/dist/components/ui/switch.js +19 -0
- package/dist/components/ui/table.d.ts +12 -0
- package/dist/components/ui/table.js +65 -0
- package/dist/components/ui/tabs.d.ts +12 -0
- package/dist/components/ui/tabs.js +45 -0
- package/dist/components/ui/textarea.d.ts +5 -0
- package/dist/components/ui/textarea.js +12 -0
- package/dist/components/ui/toast.d.ts +18 -0
- package/dist/components/ui/toast.js +121 -0
- package/dist/components/ui/toggle-group.d.ts +13 -0
- package/dist/components/ui/toggle-group.js +51 -0
- package/dist/components/ui/toggle.d.ts +10 -0
- package/dist/components/ui/toggle.js +35 -0
- package/dist/components/ui/tooltip.d.ts +8 -0
- package/dist/components/ui/tooltip.js +43 -0
- package/dist/compositions/app-rail/app-rail.d.ts +19 -0
- package/dist/compositions/app-rail/app-rail.js +58 -0
- package/dist/compositions/app-shell/app-shell.d.ts +56 -0
- package/dist/compositions/app-shell/app-shell.js +143 -0
- package/dist/compositions/app-shell/theme-toggle.d.ts +10 -0
- package/dist/compositions/app-shell/theme-toggle.js +65 -0
- package/dist/compositions/confirm-action/confirm-action.d.ts +48 -0
- package/dist/compositions/confirm-action/confirm-action.js +48 -0
- package/dist/compositions/data-table/data-table-state.d.ts +23 -0
- package/dist/compositions/data-table/data-table-state.js +46 -0
- package/dist/compositions/data-table/data-table.d.ts +185 -0
- package/dist/compositions/data-table/data-table.js +615 -0
- package/dist/compositions/date-range-picker/date-range-options.d.ts +28 -0
- package/dist/compositions/date-range-picker/date-range-options.js +61 -0
- package/dist/compositions/date-range-picker/date-range-picker.d.ts +55 -0
- package/dist/compositions/date-range-picker/date-range-picker.js +409 -0
- package/dist/compositions/decision-queue/decision-queue.d.ts +114 -0
- package/dist/compositions/decision-queue/decision-queue.js +478 -0
- package/dist/compositions/event-feed/event-feed.d.ts +59 -0
- package/dist/compositions/event-feed/event-feed.js +105 -0
- package/dist/compositions/feedback.d.ts +20 -0
- package/dist/compositions/feedback.js +49 -0
- package/dist/compositions/fields.d.ts +64 -0
- package/dist/compositions/fields.js +293 -0
- package/dist/compositions/form-kit/form-context.d.ts +10 -0
- package/dist/compositions/form-kit/form-context.js +12 -0
- package/dist/compositions/form-kit/form-fields.d.ts +95 -0
- package/dist/compositions/form-kit/form-fields.js +233 -0
- package/dist/compositions/form-kit/form-kit.d.ts +128 -0
- package/dist/compositions/form-kit/form-kit.js +119 -0
- package/dist/compositions/inspector/inspector.d.ts +53 -0
- package/dist/compositions/inspector/inspector.js +80 -0
- package/dist/compositions/layout.d.ts +36 -0
- package/dist/compositions/layout.js +86 -0
- package/dist/compositions/state-blocks/state-blocks.d.ts +42 -0
- package/dist/compositions/state-blocks/state-blocks.js +81 -0
- package/dist/compositions/status-panel/status-panel.d.ts +94 -0
- package/dist/compositions/status-panel/status-panel.js +189 -0
- package/dist/fonts/InterVariable.woff2 +0 -0
- package/dist/fonts/inter.css +15 -0
- package/dist/hooks/use-attachment-src.js +35 -0
- package/dist/hooks/use-copy-to-clipboard.js +34 -0
- package/dist/hooks/use-mobile.d.ts +3 -0
- package/dist/hooks/use-mobile.js +18 -0
- package/dist/index.d.ts +102 -0
- package/dist/index.js +102 -0
- package/dist/lib/context-level.js +7 -0
- package/dist/lib/elapsed.js +61 -0
- package/dist/lib/iso-date.js +30 -0
- package/dist/lib/motion-loop.js +41 -0
- package/dist/lib/pointer.js +14 -0
- package/dist/lib/status-tone.d.ts +7 -0
- package/dist/lib/status-tone.js +55 -0
- package/dist/lib/triage-keys.js +229 -0
- package/dist/lib/utils.js +2 -0
- package/dist/motion/alert-toast/alert-toast.d.ts +51 -0
- package/dist/motion/alert-toast/alert-toast.js +226 -0
- package/dist/motion/branch-menu/branch-menu.d.ts +47 -0
- package/dist/motion/branch-menu/branch-menu.js +287 -0
- package/dist/motion/check-item/check-item.d.ts +24 -0
- package/dist/motion/check-item/check-item.js +110 -0
- package/dist/motion/dial/dial.d.ts +39 -0
- package/dist/motion/dial/dial.js +290 -0
- package/dist/motion/dictation-button/dictation-button.d.ts +45 -0
- package/dist/motion/dictation-button/dictation-button.js +232 -0
- package/dist/motion/hold-button/hold-button.d.ts +37 -0
- package/dist/motion/hold-button/hold-button.js +192 -0
- package/dist/motion/masonry-grid/masonry-grid.d.ts +42 -0
- package/dist/motion/masonry-grid/masonry-grid.js +145 -0
- package/dist/motion/prompt-composer/prompt-composer.d.ts +90 -0
- package/dist/motion/prompt-composer/prompt-composer.js +374 -0
- package/dist/motion/scrub-select/scrub-select.d.ts +33 -0
- package/dist/motion/scrub-select/scrub-select.js +346 -0
- package/dist/motion/spotlight-grid/spotlight-grid.d.ts +40 -0
- package/dist/motion/spotlight-grid/spotlight-grid.js +171 -0
- package/dist/motion/star-rating/star-rating.d.ts +32 -0
- package/dist/motion/star-rating/star-rating.js +191 -0
- package/dist/motion/status-glyph/status-glyph.d.ts +28 -0
- package/dist/motion/status-glyph/status-glyph.js +171 -0
- package/dist/motion/stepper/stepper.d.ts +56 -0
- package/dist/motion/stepper/stepper.js +211 -0
- package/dist/motion/swipe-row/swipe-row.d.ts +52 -0
- package/dist/motion/swipe-row/swipe-row.js +208 -0
- package/dist/motion/thinking-trace/thinking-trace.d.ts +32 -0
- package/dist/motion/thinking-trace/thinking-trace.js +186 -0
- package/dist/motion/tool-call-chip/tool-call-chip.d.ts +36 -0
- package/dist/motion/tool-call-chip/tool-call-chip.js +135 -0
- package/dist/motion/working-indicator/working-indicator.d.ts +38 -0
- package/dist/motion/working-indicator/working-indicator.js +171 -0
- package/dist/styles.css +828 -0
- package/dist/tokens.css +230 -0
- package/licenses/Inter-OFL.txt +92 -0
- package/licenses/assistant-ui-MIT.txt +21 -0
- package/licenses/shadcn-MIT.md +21 -0
- package/package.json +131 -3
|
@@ -0,0 +1,416 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { __exportAll } from "../../../_virtual/_rolldown/runtime.js";
|
|
3
|
+
import { cn } from "../../../lib/utils.js";
|
|
4
|
+
import { ShimmerLabel, field, floating, ghostButton, iconSwap, iconSwapIn, iconSwapOut, inkButton, mono, paper } from "./surfaces.js";
|
|
5
|
+
import { clamp, pct } from "../utils/range.js";
|
|
6
|
+
import { useMemo } from "react";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { ArrowUpIcon, CheckIcon, ChevronDownIcon, FileArchiveIcon, FileImageIcon, FileTextIcon, Loader2Icon, MicIcon, PlusIcon, SquareIcon, XIcon } from "lucide-react";
|
|
9
|
+
//#region src/components/assistant-ui/elements/composer.tsx
|
|
10
|
+
var composer_exports = /* @__PURE__ */ __exportAll({
|
|
11
|
+
Composer: () => Composer,
|
|
12
|
+
ComposerActions: () => ComposerActions,
|
|
13
|
+
ComposerAttachButton: () => ComposerAttachButton,
|
|
14
|
+
ComposerAttachmentChip: () => ComposerAttachmentChip,
|
|
15
|
+
ComposerAttachments: () => ComposerAttachments,
|
|
16
|
+
ComposerBar: () => ComposerBar,
|
|
17
|
+
ComposerCommandItem: () => ComposerCommandItem,
|
|
18
|
+
ComposerContext: () => ComposerContext,
|
|
19
|
+
ComposerInput: () => ComposerInput,
|
|
20
|
+
ComposerMenu: () => ComposerMenu,
|
|
21
|
+
ComposerMenuItem: () => ComposerMenuItem,
|
|
22
|
+
ComposerModelItem: () => ComposerModelItem,
|
|
23
|
+
ComposerModelTrigger: () => ComposerModelTrigger,
|
|
24
|
+
ComposerPersonItem: () => ComposerPersonItem,
|
|
25
|
+
ComposerSend: () => ComposerSend,
|
|
26
|
+
ComposerToolbar: () => ComposerToolbar,
|
|
27
|
+
ComposerVoice: () => ComposerVoice,
|
|
28
|
+
ComposerVoiceButton: () => ComposerVoiceButton,
|
|
29
|
+
applyMention: () => applyMention,
|
|
30
|
+
useMentionMatches: () => useMentionMatches,
|
|
31
|
+
useSlashMatches: () => useSlashMatches
|
|
32
|
+
});
|
|
33
|
+
const ATTACHMENT_ICONS = {
|
|
34
|
+
image: FileImageIcon,
|
|
35
|
+
text: FileTextIcon,
|
|
36
|
+
archive: FileArchiveIcon
|
|
37
|
+
};
|
|
38
|
+
const BARS = Array.from({ length: 14 }, (_, i) => i);
|
|
39
|
+
function barHeight(bar, tick) {
|
|
40
|
+
return 5 + Math.abs(Math.sin(bar * 1.35 + tick * .55)) * 13;
|
|
41
|
+
}
|
|
42
|
+
/** Commands whose name starts with the slash query, or none when not typing one. */
|
|
43
|
+
function useSlashMatches(value, commands) {
|
|
44
|
+
return useMemo(() => {
|
|
45
|
+
if (!commands || !value.startsWith("/")) return [];
|
|
46
|
+
const query = value.slice(1).toLowerCase();
|
|
47
|
+
return commands.filter((command) => command.name.startsWith(query));
|
|
48
|
+
}, [commands, value]);
|
|
49
|
+
}
|
|
50
|
+
/** People matching a trailing @mention, or none when the caret is not in one. */
|
|
51
|
+
function useMentionMatches(value, people) {
|
|
52
|
+
return useMemo(() => {
|
|
53
|
+
if (!people) return [];
|
|
54
|
+
const match = /@([\w]*)$/.exec(value);
|
|
55
|
+
if (!match) return [];
|
|
56
|
+
const query = match[1]?.toLowerCase() ?? "";
|
|
57
|
+
return people.filter((person) => person.name.toLowerCase().startsWith(query));
|
|
58
|
+
}, [people, value]);
|
|
59
|
+
}
|
|
60
|
+
/** Replaces the trailing @mention with the chosen name. */
|
|
61
|
+
function applyMention(value, name) {
|
|
62
|
+
return value.replace(/@[\w]*$/, `@${name} `);
|
|
63
|
+
}
|
|
64
|
+
function Composer({ className, ...props }) {
|
|
65
|
+
return /* @__PURE__ */ jsx("div", {
|
|
66
|
+
"data-slot": "composer",
|
|
67
|
+
className: cn("relative w-full max-w-lg", className),
|
|
68
|
+
...props
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
function ComposerBar({ dragActive = false, className, ...props }) {
|
|
72
|
+
return /* @__PURE__ */ jsx("div", {
|
|
73
|
+
"data-slot": "composer-bar",
|
|
74
|
+
"data-drag-active": dragActive || void 0,
|
|
75
|
+
className: cn(paper, "flex w-full flex-col gap-2 rounded-[24px] p-2.5 transition-colors", dragActive && "bg-info/[0.04] dark:bg-info/10", className),
|
|
76
|
+
...props
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
function ComposerMenu({ open, align = "start", className, ...props }) {
|
|
80
|
+
return /* @__PURE__ */ jsx("div", {
|
|
81
|
+
"data-slot": "composer-menu",
|
|
82
|
+
"data-open": open || void 0,
|
|
83
|
+
className: cn(floating, "absolute bottom-full z-10 mb-2 flex w-72 flex-col gap-0.5 rounded-2xl p-1.5", align === "start" ? "start-0 origin-bottom-left" : "end-0 origin-bottom-right", "transition-[opacity,scale] duration-200 ease-[cubic-bezier(0.23,1,0.32,1)] motion-reduce:transition-none", open ? "scale-100 opacity-100" : "pointer-events-none scale-[0.97] opacity-0", className),
|
|
84
|
+
...props
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
function ComposerMenuItem({ active = false, className, ...props }) {
|
|
88
|
+
return /* @__PURE__ */ jsx("button", {
|
|
89
|
+
type: "button",
|
|
90
|
+
"data-slot": "composer-menu-item",
|
|
91
|
+
"data-active": active || void 0,
|
|
92
|
+
className: cn("flex w-full items-center gap-2.5 rounded-[10px] px-2.5 py-2 text-[13.5px] transition-colors", active ? field : "hover:bg-foreground/[0.04]", className),
|
|
93
|
+
...props
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
function ComposerCommandItem({ command, active, ...props }) {
|
|
97
|
+
return /* @__PURE__ */ jsxs(ComposerMenuItem, {
|
|
98
|
+
active,
|
|
99
|
+
...props,
|
|
100
|
+
children: [
|
|
101
|
+
/* @__PURE__ */ jsx(command.icon, { className: "text-muted-foreground size-3.5 shrink-0" }),
|
|
102
|
+
/* @__PURE__ */ jsxs("span", {
|
|
103
|
+
className: "font-medium",
|
|
104
|
+
children: ["/", command.name]
|
|
105
|
+
}),
|
|
106
|
+
/* @__PURE__ */ jsx("span", {
|
|
107
|
+
className: "text-muted-foreground flex-1 truncate text-start text-xs",
|
|
108
|
+
children: command.description
|
|
109
|
+
}),
|
|
110
|
+
active && /* @__PURE__ */ jsx("kbd", {
|
|
111
|
+
className: "bg-foreground/[0.06] text-muted-foreground rounded px-1 font-mono text-[10px]",
|
|
112
|
+
children: "↵"
|
|
113
|
+
})
|
|
114
|
+
]
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
function ComposerPersonItem({ person, active, ...props }) {
|
|
118
|
+
return /* @__PURE__ */ jsxs(ComposerMenuItem, {
|
|
119
|
+
active,
|
|
120
|
+
...props,
|
|
121
|
+
children: [
|
|
122
|
+
/* @__PURE__ */ jsx("span", {
|
|
123
|
+
className: "bg-foreground/[0.06] text-muted-foreground flex size-5 shrink-0 items-center justify-center rounded-full text-[9px] font-medium",
|
|
124
|
+
children: person.name[0]
|
|
125
|
+
}),
|
|
126
|
+
/* @__PURE__ */ jsx("span", {
|
|
127
|
+
className: "flex-1 truncate text-start",
|
|
128
|
+
children: person.name
|
|
129
|
+
}),
|
|
130
|
+
/* @__PURE__ */ jsx("span", {
|
|
131
|
+
className: cn(mono, "text-muted-foreground"),
|
|
132
|
+
children: person.role
|
|
133
|
+
})
|
|
134
|
+
]
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
function ComposerAttachments({ className, ...props }) {
|
|
138
|
+
return /* @__PURE__ */ jsx("div", {
|
|
139
|
+
"data-slot": "composer-attachments",
|
|
140
|
+
className: cn("flex flex-wrap gap-2", className),
|
|
141
|
+
...props
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
function ComposerAttachmentChip({ attachment, onRemove, className, ...props }) {
|
|
145
|
+
const Icon = ATTACHMENT_ICONS[attachment.kind ?? "text"];
|
|
146
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
147
|
+
"data-slot": "composer-attachment",
|
|
148
|
+
"data-state": attachment.state,
|
|
149
|
+
className: cn(field, "relative flex items-center gap-2.5 overflow-hidden rounded-[14px] py-1.5 ps-1.5 pe-2.5", className),
|
|
150
|
+
...props,
|
|
151
|
+
children: [
|
|
152
|
+
/* @__PURE__ */ jsx("span", {
|
|
153
|
+
className: "bg-background text-muted-foreground flex size-8 shrink-0 items-center justify-center rounded-[10px] dark:bg-white/10",
|
|
154
|
+
children: /* @__PURE__ */ jsx(Icon, { className: "size-4" })
|
|
155
|
+
}),
|
|
156
|
+
/* @__PURE__ */ jsxs("span", {
|
|
157
|
+
className: "flex flex-col",
|
|
158
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
159
|
+
className: "max-w-36 truncate text-xs font-medium",
|
|
160
|
+
children: attachment.name
|
|
161
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
162
|
+
className: cn("text-[11px]", attachment.state === "error" ? "text-destructive dark:text-destructive" : "text-muted-foreground"),
|
|
163
|
+
children: attachment.meta
|
|
164
|
+
})]
|
|
165
|
+
}),
|
|
166
|
+
/* @__PURE__ */ jsx("span", {
|
|
167
|
+
className: "ms-1 flex w-5 items-center justify-end",
|
|
168
|
+
children: attachment.state === "uploading" ? /* @__PURE__ */ jsx(Loader2Icon, { className: "text-muted-foreground size-3.5 animate-spin motion-reduce:animate-none" }) : attachment.state === "done" && onRemove ? /* @__PURE__ */ jsx("button", {
|
|
169
|
+
type: "button",
|
|
170
|
+
"aria-label": `Remove ${attachment.name}`,
|
|
171
|
+
onClick: () => onRemove(attachment.name),
|
|
172
|
+
className: cn(ghostButton, "size-5 [&_svg]:size-3"),
|
|
173
|
+
children: /* @__PURE__ */ jsx(XIcon, {})
|
|
174
|
+
}) : attachment.state === "done" ? /* @__PURE__ */ jsx(CheckIcon, { className: "size-3.5 text-success" }) : null
|
|
175
|
+
}),
|
|
176
|
+
attachment.state === "uploading" && /* @__PURE__ */ jsx("span", {
|
|
177
|
+
"aria-hidden": true,
|
|
178
|
+
className: "absolute inset-x-0 bottom-0 h-0.5 bg-info/70 transition-[width] duration-300 dark:bg-info/70",
|
|
179
|
+
style: { width: `${pct(attachment.progress ?? 0, 100)}%` }
|
|
180
|
+
})
|
|
181
|
+
]
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
function ComposerInput({ onSubmit, onKeyDown, className, ...props }) {
|
|
185
|
+
return /* @__PURE__ */ jsx("input", {
|
|
186
|
+
"data-slot": "composer-input",
|
|
187
|
+
onKeyDown: (event) => {
|
|
188
|
+
onKeyDown?.(event);
|
|
189
|
+
if (event.defaultPrevented) return;
|
|
190
|
+
if (event.key !== "Enter" || event.nativeEvent.isComposing) return;
|
|
191
|
+
onSubmit?.();
|
|
192
|
+
},
|
|
193
|
+
className: cn("placeholder:text-muted-foreground min-h-11 w-full bg-transparent px-3 text-[15px] caret-blue-500 outline-none dark:caret-blue-400", className),
|
|
194
|
+
...props
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
function ComposerVoice({ recording, seconds, className, ...props }) {
|
|
198
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
199
|
+
"data-slot": "composer-voice",
|
|
200
|
+
"data-recording": recording || void 0,
|
|
201
|
+
className: cn("flex min-h-11 items-center gap-3 ps-3", className),
|
|
202
|
+
...props,
|
|
203
|
+
children: [
|
|
204
|
+
recording && /* @__PURE__ */ jsx("span", {
|
|
205
|
+
"aria-hidden": true,
|
|
206
|
+
className: "size-1.5 animate-pulse rounded-full bg-info dark:bg-info"
|
|
207
|
+
}),
|
|
208
|
+
/* @__PURE__ */ jsx("div", {
|
|
209
|
+
className: "flex h-6 items-center gap-[3px]",
|
|
210
|
+
"aria-hidden": true,
|
|
211
|
+
children: BARS.map((bar) => /* @__PURE__ */ jsx("span", {
|
|
212
|
+
className: cn("w-0.5 rounded-full transition-[height,background-color] duration-150 motion-reduce:transition-none", recording ? "bg-foreground/50" : "bg-foreground/25"),
|
|
213
|
+
style: { height: recording ? barHeight(bar, seconds * 10) : 3 }
|
|
214
|
+
}, bar))
|
|
215
|
+
}),
|
|
216
|
+
recording ? /* @__PURE__ */ jsxs("span", {
|
|
217
|
+
className: cn(mono, "text-muted-foreground tabular-nums"),
|
|
218
|
+
children: ["0:", String(seconds).padStart(2, "0")]
|
|
219
|
+
}) : /* @__PURE__ */ jsx(ShimmerLabel, {
|
|
220
|
+
className: "text-muted-foreground relative text-[13px]",
|
|
221
|
+
children: "Transcribing"
|
|
222
|
+
})
|
|
223
|
+
]
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
function ComposerToolbar({ className, ...props }) {
|
|
227
|
+
return /* @__PURE__ */ jsx("div", {
|
|
228
|
+
"data-slot": "composer-toolbar",
|
|
229
|
+
className: cn("flex items-center justify-between", className),
|
|
230
|
+
...props
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
function ComposerActions({ className, ...props }) {
|
|
234
|
+
return /* @__PURE__ */ jsx("div", {
|
|
235
|
+
"data-slot": "composer-actions",
|
|
236
|
+
className: cn("flex items-center gap-1.5", className),
|
|
237
|
+
...props
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
function ComposerAttachButton({ className, ...props }) {
|
|
241
|
+
return /* @__PURE__ */ jsx("button", {
|
|
242
|
+
type: "button",
|
|
243
|
+
"aria-label": "Add attachment",
|
|
244
|
+
"data-slot": "composer-attach",
|
|
245
|
+
disabled: !props.onClick,
|
|
246
|
+
className: cn(ghostButton, "size-8 disabled:pointer-events-none disabled:opacity-30", className),
|
|
247
|
+
...props,
|
|
248
|
+
children: /* @__PURE__ */ jsx(PlusIcon, { className: "size-4" })
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
function ComposerModelTrigger({ model, open, className, ...props }) {
|
|
252
|
+
return /* @__PURE__ */ jsxs("button", {
|
|
253
|
+
type: "button",
|
|
254
|
+
"aria-expanded": open,
|
|
255
|
+
"data-slot": "composer-model-trigger",
|
|
256
|
+
className: cn("text-muted-foreground hover:bg-foreground/[0.06] hover:text-foreground/90 dark:hover:bg-foreground/[0.09] flex h-8 items-center gap-1.5 rounded-full px-3 text-[12.5px] transition-colors", className),
|
|
257
|
+
...props,
|
|
258
|
+
children: [model, /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-3 opacity-60" })]
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
function ComposerModelItem({ entry, selected, ...props }) {
|
|
262
|
+
return /* @__PURE__ */ jsxs(ComposerMenuItem, {
|
|
263
|
+
active: selected,
|
|
264
|
+
...props,
|
|
265
|
+
children: [
|
|
266
|
+
/* @__PURE__ */ jsx("span", {
|
|
267
|
+
className: "flex-1 text-start",
|
|
268
|
+
children: entry.name
|
|
269
|
+
}),
|
|
270
|
+
/* @__PURE__ */ jsx("span", {
|
|
271
|
+
className: cn(mono, "text-muted-foreground tabular-nums"),
|
|
272
|
+
children: entry.meta
|
|
273
|
+
}),
|
|
274
|
+
/* @__PURE__ */ jsx("span", {
|
|
275
|
+
className: "flex w-4 justify-end",
|
|
276
|
+
children: selected && /* @__PURE__ */ jsx(CheckIcon, { className: "fade-in zoom-in-90 animate-in size-3.5 duration-200" })
|
|
277
|
+
})
|
|
278
|
+
]
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
function ComposerContext({ usage, className, ...props }) {
|
|
282
|
+
const used = usage.system + usage.tools + usage.messages;
|
|
283
|
+
const fraction = usage.total === 0 ? 0 : used / usage.total;
|
|
284
|
+
const warn = fraction > .85;
|
|
285
|
+
const circumference = 2 * Math.PI * 6;
|
|
286
|
+
const segments = [
|
|
287
|
+
{
|
|
288
|
+
label: "System",
|
|
289
|
+
value: usage.system,
|
|
290
|
+
className: "bg-foreground/25"
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
label: "Tools",
|
|
294
|
+
value: usage.tools,
|
|
295
|
+
className: "bg-foreground/45"
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
label: "Messages",
|
|
299
|
+
value: usage.messages,
|
|
300
|
+
className: "bg-foreground/80"
|
|
301
|
+
}
|
|
302
|
+
];
|
|
303
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
304
|
+
"data-slot": "composer-context",
|
|
305
|
+
className: cn("group/ctx", className),
|
|
306
|
+
...props,
|
|
307
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
308
|
+
className: cn(floating, "absolute end-0 bottom-full z-10 mb-2 flex w-60 origin-bottom-right flex-col gap-3.5 rounded-2xl p-4", "transition-[opacity,scale] duration-200 ease-[cubic-bezier(0.23,1,0.32,1)] motion-reduce:transition-none", "pointer-events-none scale-[0.97] opacity-0", "group-hover/ctx:pointer-events-auto group-hover/ctx:scale-100 group-hover/ctx:opacity-100", "group-focus-within/ctx:pointer-events-auto group-focus-within/ctx:scale-100 group-focus-within/ctx:opacity-100"),
|
|
309
|
+
children: [
|
|
310
|
+
/* @__PURE__ */ jsxs("div", {
|
|
311
|
+
className: "flex items-baseline justify-between",
|
|
312
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
313
|
+
className: "text-[13.5px] font-medium",
|
|
314
|
+
children: "Context"
|
|
315
|
+
}), /* @__PURE__ */ jsxs("p", {
|
|
316
|
+
className: cn(mono, "tabular-nums", warn ? "text-destructive dark:text-destructive" : "text-muted-foreground"),
|
|
317
|
+
children: [Math.round(fraction * 100), "%"]
|
|
318
|
+
})]
|
|
319
|
+
}),
|
|
320
|
+
/* @__PURE__ */ jsx("div", {
|
|
321
|
+
className: "bg-foreground/[0.06] flex h-[5px] w-full gap-px overflow-hidden rounded-full",
|
|
322
|
+
children: segments.map((segment) => /* @__PURE__ */ jsx("span", {
|
|
323
|
+
className: cn("h-full transition-[width] duration-700 motion-reduce:transition-none", segment.className),
|
|
324
|
+
style: { width: `${pct(segment.value, usage.total)}%` }
|
|
325
|
+
}, segment.label))
|
|
326
|
+
}),
|
|
327
|
+
/* @__PURE__ */ jsx("div", {
|
|
328
|
+
className: "flex flex-col gap-2",
|
|
329
|
+
children: segments.map((segment) => /* @__PURE__ */ jsxs("div", {
|
|
330
|
+
className: "text-muted-foreground flex items-center gap-2.5 text-[13px]",
|
|
331
|
+
children: [
|
|
332
|
+
/* @__PURE__ */ jsx("span", {
|
|
333
|
+
"aria-hidden": true,
|
|
334
|
+
className: cn("size-1.5 rounded-full", segment.className)
|
|
335
|
+
}),
|
|
336
|
+
/* @__PURE__ */ jsx("span", {
|
|
337
|
+
className: "flex-1",
|
|
338
|
+
children: segment.label
|
|
339
|
+
}),
|
|
340
|
+
/* @__PURE__ */ jsxs("span", {
|
|
341
|
+
className: cn(mono, "text-muted-foreground tabular-nums"),
|
|
342
|
+
children: [segment.value, "k"]
|
|
343
|
+
})
|
|
344
|
+
]
|
|
345
|
+
}, segment.label))
|
|
346
|
+
}),
|
|
347
|
+
/* @__PURE__ */ jsx("div", { className: "bg-foreground/[0.06] h-px" }),
|
|
348
|
+
/* @__PURE__ */ jsxs("div", {
|
|
349
|
+
className: "text-muted-foreground flex items-center justify-between text-[13px]",
|
|
350
|
+
children: [/* @__PURE__ */ jsx("span", { children: "Total" }), /* @__PURE__ */ jsxs("span", {
|
|
351
|
+
className: cn(mono, "text-muted-foreground tabular-nums"),
|
|
352
|
+
children: [
|
|
353
|
+
used,
|
|
354
|
+
"k / ",
|
|
355
|
+
usage.total,
|
|
356
|
+
"k"
|
|
357
|
+
]
|
|
358
|
+
})]
|
|
359
|
+
})
|
|
360
|
+
]
|
|
361
|
+
}), /* @__PURE__ */ jsxs("button", {
|
|
362
|
+
type: "button",
|
|
363
|
+
"aria-label": "Context usage",
|
|
364
|
+
className: cn(ghostButton, "h-8 gap-1.5 px-2", warn && "text-destructive dark:text-destructive"),
|
|
365
|
+
children: [/* @__PURE__ */ jsxs("span", {
|
|
366
|
+
"aria-hidden": true,
|
|
367
|
+
className: cn(mono, "tabular-nums"),
|
|
368
|
+
children: [Math.round(fraction * 100), "%"]
|
|
369
|
+
}), /* @__PURE__ */ jsxs("svg", {
|
|
370
|
+
viewBox: "0 0 16 16",
|
|
371
|
+
className: "size-4 -rotate-90",
|
|
372
|
+
"aria-hidden": true,
|
|
373
|
+
children: [/* @__PURE__ */ jsx("circle", {
|
|
374
|
+
cx: "8",
|
|
375
|
+
cy: "8",
|
|
376
|
+
r: "6",
|
|
377
|
+
fill: "none",
|
|
378
|
+
strokeWidth: "2.5",
|
|
379
|
+
className: "stroke-foreground/25"
|
|
380
|
+
}), /* @__PURE__ */ jsx("circle", {
|
|
381
|
+
cx: "8",
|
|
382
|
+
cy: "8",
|
|
383
|
+
r: "6",
|
|
384
|
+
fill: "none",
|
|
385
|
+
strokeWidth: "2.5",
|
|
386
|
+
strokeLinecap: "round",
|
|
387
|
+
className: "stroke-current transition-[stroke-dashoffset] duration-700 motion-reduce:transition-none",
|
|
388
|
+
strokeDasharray: circumference,
|
|
389
|
+
strokeDashoffset: circumference * (1 - clamp(fraction, 0, 1))
|
|
390
|
+
})]
|
|
391
|
+
})]
|
|
392
|
+
})]
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
function ComposerVoiceButton({ active, className, ...props }) {
|
|
396
|
+
return /* @__PURE__ */ jsx("button", {
|
|
397
|
+
type: "button",
|
|
398
|
+
"aria-label": active ? "Stop recording" : "Start voice input",
|
|
399
|
+
"data-slot": "composer-voice-button",
|
|
400
|
+
className: cn(active ? cn(inkButton, "flex size-8 items-center justify-center rounded-full") : cn(ghostButton, "size-8"), className),
|
|
401
|
+
...props,
|
|
402
|
+
children: active ? /* @__PURE__ */ jsx(SquareIcon, { className: "size-3 fill-current" }) : /* @__PURE__ */ jsx(MicIcon, { className: "size-4" })
|
|
403
|
+
});
|
|
404
|
+
}
|
|
405
|
+
function ComposerSend({ streaming, idle, className, ...props }) {
|
|
406
|
+
return /* @__PURE__ */ jsxs("button", {
|
|
407
|
+
type: "button",
|
|
408
|
+
"aria-label": streaming ? "Stop generating" : "Send message",
|
|
409
|
+
"data-slot": "composer-send",
|
|
410
|
+
className: cn("grid size-8 place-items-center rounded-full", streaming || !idle ? inkButton : "bg-foreground/[0.06] text-muted-foreground dark:bg-foreground/[0.09] transition-colors", className),
|
|
411
|
+
...props,
|
|
412
|
+
children: [/* @__PURE__ */ jsx(ArrowUpIcon, { className: cn(iconSwap, "size-4", streaming ? iconSwapOut : iconSwapIn) }), /* @__PURE__ */ jsx(SquareIcon, { className: cn(iconSwap, "size-3 fill-current", streaming ? iconSwapIn : iconSwapOut) })]
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
//#endregion
|
|
416
|
+
export { Composer, ComposerActions, ComposerAttachButton, ComposerAttachmentChip, ComposerAttachments, ComposerBar, ComposerCommandItem, ComposerContext, ComposerInput, ComposerMenu, ComposerMenuItem, ComposerModelItem, ComposerModelTrigger, ComposerPersonItem, ComposerSend, ComposerToolbar, ComposerVoice, ComposerVoiceButton, applyMention, composer_exports, useMentionMatches, useSlashMatches };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
declare namespace computer_use_d_exports {
|
|
3
|
+
export { ComputerStep, ComputerUse };
|
|
4
|
+
}
|
|
5
|
+
export interface ComputerStep {
|
|
6
|
+
id: string;
|
|
7
|
+
action: string;
|
|
8
|
+
target: string;
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
}
|
|
12
|
+
export declare function ComputerUse({ url, steps, activeIndex, children, className, ...props }: Omit<ComponentProps<"div">, "url" | "steps" | "activeIndex" | "children"> & {
|
|
13
|
+
url: string;
|
|
14
|
+
steps: readonly ComputerStep[];
|
|
15
|
+
activeIndex: number;
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
}): import("react").JSX.Element;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { computer_use_d_exports };
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { __exportAll } from "../../../_virtual/_rolldown/runtime.js";
|
|
3
|
+
import { cn } from "../../../lib/utils.js";
|
|
4
|
+
import { field, mono, paper } from "./surfaces.js";
|
|
5
|
+
import { at, indexIn } from "../utils/range.js";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { MousePointer2Icon } from "lucide-react";
|
|
8
|
+
//#region src/components/assistant-ui/elements/computer-use.tsx
|
|
9
|
+
var computer_use_exports = /* @__PURE__ */ __exportAll({ ComputerUse: () => ComputerUse });
|
|
10
|
+
function ComputerUse({ url, steps, activeIndex, children, className, ...props }) {
|
|
11
|
+
const index = indexIn(steps, activeIndex);
|
|
12
|
+
const active = at(steps, index);
|
|
13
|
+
const trail = steps.slice(Math.max(0, index - 2), index + 1);
|
|
14
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
15
|
+
"data-slot": "computer-use",
|
|
16
|
+
className: cn(paper, "flex w-full max-w-md flex-col overflow-hidden rounded-2xl", className),
|
|
17
|
+
...props,
|
|
18
|
+
children: [
|
|
19
|
+
/* @__PURE__ */ jsxs("div", {
|
|
20
|
+
className: "flex items-center gap-2 px-3 py-2",
|
|
21
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
22
|
+
className: "flex shrink-0 gap-1",
|
|
23
|
+
children: [
|
|
24
|
+
"bg-destructive/50",
|
|
25
|
+
"bg-warning/50",
|
|
26
|
+
"bg-success/50"
|
|
27
|
+
].map((tint) => /* @__PURE__ */ jsx("span", {
|
|
28
|
+
"aria-hidden": true,
|
|
29
|
+
className: cn("size-2 rounded-full", tint)
|
|
30
|
+
}, tint))
|
|
31
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
32
|
+
className: cn(field, mono, "text-muted-foreground min-w-0 flex-1 truncate rounded-full px-2.5 py-1"),
|
|
33
|
+
children: url
|
|
34
|
+
})]
|
|
35
|
+
}),
|
|
36
|
+
/* @__PURE__ */ jsxs("div", {
|
|
37
|
+
className: "border-foreground/[0.07] relative min-h-[8.5rem] overflow-hidden border-t",
|
|
38
|
+
children: [
|
|
39
|
+
children,
|
|
40
|
+
trail.map((step, i) => /* @__PURE__ */ jsx("span", {
|
|
41
|
+
"aria-hidden": true,
|
|
42
|
+
className: "border-info pointer-events-none absolute size-2.5 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 bg-transparent transition-opacity duration-300 dark:border-info",
|
|
43
|
+
style: {
|
|
44
|
+
left: `${step.x}%`,
|
|
45
|
+
top: `${step.y}%`,
|
|
46
|
+
opacity: .14 * (i + 1)
|
|
47
|
+
}
|
|
48
|
+
}, step.id)),
|
|
49
|
+
active && /* @__PURE__ */ jsx(MousePointer2Icon, {
|
|
50
|
+
"aria-hidden": true,
|
|
51
|
+
className: "pointer-events-none absolute -mt-[3px] -ml-[3px] size-4 fill-info text-info transition-[left,top] duration-500 ease-out motion-reduce:transition-none dark:fill-info dark:text-info",
|
|
52
|
+
style: {
|
|
53
|
+
left: `${active.x}%`,
|
|
54
|
+
top: `${active.y}%`
|
|
55
|
+
}
|
|
56
|
+
})
|
|
57
|
+
]
|
|
58
|
+
}),
|
|
59
|
+
active && /* @__PURE__ */ jsxs("div", {
|
|
60
|
+
className: "border-foreground/[0.07] flex items-center gap-2 border-t px-3.5 py-2",
|
|
61
|
+
children: [
|
|
62
|
+
/* @__PURE__ */ jsx("span", {
|
|
63
|
+
className: cn("font-mono text-[11px] tracking-tight", "text-muted-foreground shrink-0"),
|
|
64
|
+
children: active.action
|
|
65
|
+
}),
|
|
66
|
+
/* @__PURE__ */ jsx("span", {
|
|
67
|
+
className: "text-foreground/80 min-w-0 flex-1 truncate text-[13px]",
|
|
68
|
+
children: active.target
|
|
69
|
+
}),
|
|
70
|
+
/* @__PURE__ */ jsxs("span", {
|
|
71
|
+
className: cn("font-mono text-[11px] tracking-tight", "text-muted-foreground shrink-0 tabular-nums"),
|
|
72
|
+
children: [
|
|
73
|
+
index + 1,
|
|
74
|
+
"/",
|
|
75
|
+
steps.length
|
|
76
|
+
]
|
|
77
|
+
})
|
|
78
|
+
]
|
|
79
|
+
})
|
|
80
|
+
]
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
//#endregion
|
|
84
|
+
export { ComputerUse, computer_use_exports };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
declare namespace confidence_marker_d_exports {
|
|
3
|
+
export { Confidence, ConfidenceClaim, ConfidenceMarker };
|
|
4
|
+
}
|
|
5
|
+
export type Confidence = "grounded" | "inferred" | "uncertain";
|
|
6
|
+
export interface ConfidenceClaim {
|
|
7
|
+
id: string;
|
|
8
|
+
text: string;
|
|
9
|
+
confidence: Confidence;
|
|
10
|
+
basis: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function ConfidenceMarker({ claims, hoveredId, onHover, labels, className, ...props }: Omit<ComponentProps<"div">, "children" | "claims" | "hoveredId" | "onHover"> & {
|
|
13
|
+
claims: readonly ConfidenceClaim[];
|
|
14
|
+
hoveredId: string;
|
|
15
|
+
onHover?: (id: string) => void;
|
|
16
|
+
/** Replaces the label shown before a claim's basis, per confidence. */
|
|
17
|
+
labels?: Partial<Record<Confidence, string>>;
|
|
18
|
+
}): import("react").JSX.Element;
|
|
19
|
+
//#endregion
|
|
20
|
+
export { confidence_marker_d_exports };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { __exportAll } from "../../../_virtual/_rolldown/runtime.js";
|
|
3
|
+
import { cn } from "../../../lib/utils.js";
|
|
4
|
+
import "./surfaces.js";
|
|
5
|
+
import { Fragment, useId } from "react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
//#region src/components/assistant-ui/elements/confidence-marker.tsx
|
|
8
|
+
var confidence_marker_exports = /* @__PURE__ */ __exportAll({ ConfidenceMarker: () => ConfidenceMarker });
|
|
9
|
+
const UNDERLINE = {
|
|
10
|
+
grounded: "decoration-emerald-500/50",
|
|
11
|
+
inferred: "decoration-amber-500/60",
|
|
12
|
+
uncertain: "decoration-red-500/50 decoration-dotted"
|
|
13
|
+
};
|
|
14
|
+
const LABEL = {
|
|
15
|
+
grounded: "from a source",
|
|
16
|
+
inferred: "inferred",
|
|
17
|
+
uncertain: "unverified"
|
|
18
|
+
};
|
|
19
|
+
function ConfidenceMarker({ claims, hoveredId, onHover, labels, className, ...props }) {
|
|
20
|
+
const basisId = useId();
|
|
21
|
+
const hovered = claims.find((claim) => claim.id === hoveredId);
|
|
22
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
23
|
+
"data-slot": "confidence-marker",
|
|
24
|
+
className: cn("flex w-full max-w-sm flex-col gap-2.5", className),
|
|
25
|
+
...props,
|
|
26
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
27
|
+
className: "text-[13.5px] leading-relaxed",
|
|
28
|
+
children: claims.map((claim) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("button", {
|
|
29
|
+
type: "button",
|
|
30
|
+
"aria-describedby": hoveredId === claim.id ? basisId : void 0,
|
|
31
|
+
onMouseEnter: () => onHover?.(claim.id),
|
|
32
|
+
onMouseLeave: () => onHover?.(""),
|
|
33
|
+
onFocus: () => onHover?.(claim.id),
|
|
34
|
+
onBlur: () => onHover?.(""),
|
|
35
|
+
className: cn("focus-visible:ring-foreground/20 inline cursor-help rounded text-start underline decoration-2 underline-offset-[3px] transition-colors outline-none focus-visible:ring-1", UNDERLINE[claim.confidence], hoveredId === claim.id ? "text-foreground/95" : "text-muted-foreground"),
|
|
36
|
+
children: claim.text
|
|
37
|
+
}), " "] }, claim.id))
|
|
38
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
39
|
+
className: "flex min-h-0 items-start",
|
|
40
|
+
children: hovered && /* @__PURE__ */ jsxs("span", {
|
|
41
|
+
id: basisId,
|
|
42
|
+
role: "status",
|
|
43
|
+
className: cn("bg-popover border border-border shadow-lg", "font-mono text-[11px] tracking-tight", "fade-in zoom-in-95 animate-in text-muted-foreground flex items-center gap-1.5 rounded-full px-2.5 py-1.5 duration-150"),
|
|
44
|
+
children: [
|
|
45
|
+
/* @__PURE__ */ jsx("span", {
|
|
46
|
+
"aria-hidden": true,
|
|
47
|
+
className: cn("size-1.5 rounded-full", hovered.confidence === "grounded" && "bg-success", hovered.confidence === "inferred" && "bg-warning", hovered.confidence === "uncertain" && "bg-destructive")
|
|
48
|
+
}),
|
|
49
|
+
labels?.[hovered.confidence] ?? LABEL[hovered.confidence],
|
|
50
|
+
" · ",
|
|
51
|
+
hovered.basis
|
|
52
|
+
]
|
|
53
|
+
})
|
|
54
|
+
})]
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
//#endregion
|
|
58
|
+
export { ConfidenceMarker, confidence_marker_exports };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
declare namespace connection_state_d_exports {
|
|
3
|
+
export { ConnectionPhase, ConnectionState };
|
|
4
|
+
}
|
|
5
|
+
export type ConnectionPhase = "online" | "dropped" | "reconnecting" | "resumed";
|
|
6
|
+
export declare function ConnectionState({ phase, attempt, resumedTokens, onRetry, className, ...props }: Omit<ComponentProps<"div">, "children" | "phase" | "attempt" | "resumedTokens" | "onRetry"> & {
|
|
7
|
+
phase: ConnectionPhase;
|
|
8
|
+
attempt?: number;
|
|
9
|
+
resumedTokens?: number;
|
|
10
|
+
onRetry?: () => void;
|
|
11
|
+
}): import("react").JSX.Element | null;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { connection_state_d_exports };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { __exportAll } from "../../../_virtual/_rolldown/runtime.js";
|
|
3
|
+
import { cn } from "../../../lib/utils.js";
|
|
4
|
+
import { paper } from "./surfaces.js";
|
|
5
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { CheckIcon, CloudOffIcon, Loader2Icon } from "lucide-react";
|
|
7
|
+
//#region src/components/assistant-ui/elements/connection-state.tsx
|
|
8
|
+
var connection_state_exports = /* @__PURE__ */ __exportAll({ ConnectionState: () => ConnectionState });
|
|
9
|
+
function ConnectionState({ phase, attempt, resumedTokens, onRetry, className, ...props }) {
|
|
10
|
+
if (phase === "online") return null;
|
|
11
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
12
|
+
"data-slot": "connection-state",
|
|
13
|
+
className: cn(paper, "fade-in slide-in-from-top-1 animate-in flex w-full max-w-sm items-center gap-2.5 rounded-2xl px-3.5 py-2.5 duration-300", className),
|
|
14
|
+
...props,
|
|
15
|
+
children: [
|
|
16
|
+
phase === "dropped" && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
17
|
+
/* @__PURE__ */ jsx(CloudOffIcon, { className: "size-3.5 shrink-0 text-warning dark:text-warning" }),
|
|
18
|
+
/* @__PURE__ */ jsx("span", {
|
|
19
|
+
className: "min-w-0 flex-1 text-[13px]",
|
|
20
|
+
children: "Connection lost. The run kept going on the server."
|
|
21
|
+
}),
|
|
22
|
+
/* @__PURE__ */ jsx("button", {
|
|
23
|
+
type: "button",
|
|
24
|
+
onClick: onRetry,
|
|
25
|
+
className: "text-muted-foreground hover:bg-foreground/[0.06] hover:text-foreground/95 shrink-0 rounded-full px-2.5 py-1 text-xs font-medium transition-[background-color,color,scale] duration-150 active:scale-[0.96]",
|
|
26
|
+
children: "Reconnect"
|
|
27
|
+
})
|
|
28
|
+
] }),
|
|
29
|
+
phase === "reconnecting" && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
30
|
+
/* @__PURE__ */ jsx(Loader2Icon, { className: "text-muted-foreground size-3.5 shrink-0 animate-spin motion-reduce:animate-none" }),
|
|
31
|
+
/* @__PURE__ */ jsx("span", {
|
|
32
|
+
className: "min-w-0 flex-1 text-[13px]",
|
|
33
|
+
children: "Reconnecting"
|
|
34
|
+
}),
|
|
35
|
+
attempt !== void 0 && /* @__PURE__ */ jsxs("span", {
|
|
36
|
+
className: cn("font-mono text-[11px] tracking-tight", "text-muted-foreground shrink-0 tabular-nums"),
|
|
37
|
+
children: ["attempt ", attempt]
|
|
38
|
+
})
|
|
39
|
+
] }),
|
|
40
|
+
phase === "resumed" && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
41
|
+
/* @__PURE__ */ jsx(CheckIcon, { className: "size-3.5 shrink-0 text-success" }),
|
|
42
|
+
/* @__PURE__ */ jsx("span", {
|
|
43
|
+
className: "min-w-0 flex-1 text-[13px]",
|
|
44
|
+
children: "Picked the stream back up."
|
|
45
|
+
}),
|
|
46
|
+
resumedTokens !== void 0 && /* @__PURE__ */ jsxs("span", {
|
|
47
|
+
className: cn("font-mono text-[11px] tracking-tight", "text-muted-foreground shrink-0 tabular-nums"),
|
|
48
|
+
children: [
|
|
49
|
+
"+",
|
|
50
|
+
resumedTokens,
|
|
51
|
+
" tokens"
|
|
52
|
+
]
|
|
53
|
+
})
|
|
54
|
+
] })
|
|
55
|
+
]
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
59
|
+
export { ConnectionState, connection_state_exports };
|