@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,104 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { __exportAll } from "../../../_virtual/_rolldown/runtime.js";
|
|
3
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../../ui/collapsible.js";
|
|
4
|
+
import { cn } from "../../../lib/utils.js";
|
|
5
|
+
import { memo, useCallback, useRef, useState } from "react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { ChevronDownIcon, LoaderIcon } from "lucide-react";
|
|
8
|
+
import { cva } from "class-variance-authority";
|
|
9
|
+
import { useScrollLock } from "@assistant-ui/react";
|
|
10
|
+
//#region src/components/assistant-ui/elements/tool-group.aui.tsx
|
|
11
|
+
var tool_group_aui_exports = /* @__PURE__ */ __exportAll({
|
|
12
|
+
ToolGroup: () => ToolGroup,
|
|
13
|
+
ToolGroupContent: () => ToolGroupContent,
|
|
14
|
+
ToolGroupRoot: () => ToolGroupRoot,
|
|
15
|
+
ToolGroupTrigger: () => ToolGroupTrigger,
|
|
16
|
+
toolGroupVariants: () => toolGroupVariants
|
|
17
|
+
});
|
|
18
|
+
const ANIMATION_DURATION = 200;
|
|
19
|
+
const toolGroupVariants = cva("aui-tool-group-root group/tool-group w-full", {
|
|
20
|
+
variants: { variant: {
|
|
21
|
+
outline: "rounded-lg border py-3",
|
|
22
|
+
ghost: "",
|
|
23
|
+
muted: "border-muted-foreground/30 bg-muted/30 rounded-lg border py-3"
|
|
24
|
+
} },
|
|
25
|
+
defaultVariants: { variant: "outline" }
|
|
26
|
+
});
|
|
27
|
+
function ToolGroupRoot({ className, variant, open: controlledOpen, onOpenChange: controlledOnOpenChange, defaultOpen = false, children, ...props }) {
|
|
28
|
+
const collapsibleRef = useRef(null);
|
|
29
|
+
const [uncontrolledOpen, setUncontrolledOpen] = useState(defaultOpen);
|
|
30
|
+
const lockScroll = useScrollLock(collapsibleRef, ANIMATION_DURATION);
|
|
31
|
+
const isControlled = controlledOpen !== void 0;
|
|
32
|
+
const isOpen = isControlled ? controlledOpen : uncontrolledOpen;
|
|
33
|
+
const handleOpenChange = useCallback((open) => {
|
|
34
|
+
lockScroll();
|
|
35
|
+
if (!isControlled) setUncontrolledOpen(open);
|
|
36
|
+
controlledOnOpenChange?.(open);
|
|
37
|
+
}, [
|
|
38
|
+
lockScroll,
|
|
39
|
+
isControlled,
|
|
40
|
+
controlledOnOpenChange
|
|
41
|
+
]);
|
|
42
|
+
return /* @__PURE__ */ jsx(Collapsible, {
|
|
43
|
+
ref: collapsibleRef,
|
|
44
|
+
"data-slot": "tool-group-root",
|
|
45
|
+
"data-variant": variant ?? "outline",
|
|
46
|
+
open: isOpen,
|
|
47
|
+
onOpenChange: handleOpenChange,
|
|
48
|
+
className: cn(toolGroupVariants({ variant }), "group/tool-group-root", className),
|
|
49
|
+
style: { "--animation-duration": `${ANIMATION_DURATION}ms` },
|
|
50
|
+
...props,
|
|
51
|
+
children
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
function ToolGroupTrigger({ count, active = false, className, ...props }) {
|
|
55
|
+
const label = `${count} tool ${count === 1 ? "call" : "calls"}`;
|
|
56
|
+
return /* @__PURE__ */ jsxs(CollapsibleTrigger, {
|
|
57
|
+
"data-slot": "tool-group-trigger",
|
|
58
|
+
className: cn("aui-tool-group-trigger group/trigger flex origin-left items-center gap-2 rounded-md text-sm transition-[color,scale] outline-none active:scale-[0.98]", "focus-visible:ring-[3px] focus-visible:ring-ring/50", "group-data-[variant=ghost]/tool-group-root:text-muted-foreground group-data-[variant=ghost]/tool-group-root:hover:text-foreground group-data-[variant=ghost]/tool-group-root:-mx-1 group-data-[variant=ghost]/tool-group-root:px-1 group-data-[variant=ghost]/tool-group-root:py-1.5", "group-data-[variant=outline]/tool-group-root:w-full group-data-[variant=outline]/tool-group-root:px-4 group-data-[variant=outline]/tool-group-root:-my-3 group-data-[variant=outline]/tool-group-root:min-h-9 group-data-[variant=outline]/tool-group-root:focus-visible:ring-inset", "group-data-[variant=muted]/tool-group-root:w-full group-data-[variant=muted]/tool-group-root:px-4 group-data-[variant=muted]/tool-group-root:-my-3 group-data-[variant=muted]/tool-group-root:min-h-9 group-data-[variant=muted]/tool-group-root:focus-visible:ring-inset", className),
|
|
59
|
+
...props,
|
|
60
|
+
children: [
|
|
61
|
+
active && /* @__PURE__ */ jsx(LoaderIcon, {
|
|
62
|
+
"data-slot": "tool-group-trigger-loader",
|
|
63
|
+
className: "aui-tool-group-trigger-loader size-3 shrink-0 animate-spin [animation-duration:0.6s]"
|
|
64
|
+
}),
|
|
65
|
+
/* @__PURE__ */ jsx("span", {
|
|
66
|
+
"data-slot": "tool-group-trigger-label",
|
|
67
|
+
className: cn("aui-tool-group-trigger-label-wrapper inline-block text-start text-xs leading-none font-medium", "group-data-[variant=ghost]/tool-group-root:font-normal", "group-data-[variant=outline]/tool-group-root:grow", "group-data-[variant=muted]/tool-group-root:grow", active && "shimmer motion-reduce:animate-none"),
|
|
68
|
+
children: label
|
|
69
|
+
}),
|
|
70
|
+
/* @__PURE__ */ jsx(ChevronDownIcon, {
|
|
71
|
+
"data-slot": "tool-group-trigger-chevron",
|
|
72
|
+
className: cn("aui-tool-group-trigger-chevron size-3 shrink-0", "transition-transform duration-(--animation-duration) ease-[cubic-bezier(0.32,0.72,0,1)] motion-reduce:transition-none", "-rotate-90", "group-data-open/trigger:rotate-0", "group-data-panel-open/trigger:rotate-0")
|
|
73
|
+
})
|
|
74
|
+
]
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
function ToolGroupContent({ className, children, ...props }) {
|
|
78
|
+
return /* @__PURE__ */ jsx(CollapsibleContent, {
|
|
79
|
+
"data-slot": "tool-group-content",
|
|
80
|
+
className: cn("aui-tool-group-content relative overflow-hidden text-sm outline-none", "group/collapsible-content ease-[cubic-bezier(0.32,0.72,0,1)] motion-reduce:animate-none", "data-closed:animate-collapsible-up", "data-open:animate-collapsible-down", "data-closed:fill-mode-forwards", "data-closed:pointer-events-none", "[--tw-duration:var(--animation-duration)]", className),
|
|
81
|
+
...props,
|
|
82
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
83
|
+
className: cn("mt-2 flex flex-col gap-2", "group-data-[variant=ghost]/tool-group-root:mt-1 group-data-[variant=ghost]/tool-group-root:gap-1", "group-data-[variant=outline]/tool-group-root:mt-3 group-data-[variant=outline]/tool-group-root:border-t group-data-[variant=outline]/tool-group-root:px-4 group-data-[variant=outline]/tool-group-root:pt-3", "group-data-[variant=muted]/tool-group-root:mt-3 group-data-[variant=muted]/tool-group-root:border-t group-data-[variant=muted]/tool-group-root:px-4 group-data-[variant=muted]/tool-group-root:pt-3", "[&>*]:animate-in [&>*]:fade-in-0 [&>*]:blur-in-[2px] [&>*]:slide-in-from-top-1 [&>*]:animation-duration-(--animation-duration) [&>*]:ease-[cubic-bezier(0.32,0.72,0,1)]", "[&>*]:motion-reduce:animate-none", "[&>*:nth-child(2)]:[animation-delay:40ms]", "[&>*:nth-child(3)]:[animation-delay:80ms]", "[&>*:nth-child(4)]:[animation-delay:120ms]", "[&>*:nth-child(n+5)]:[animation-delay:160ms]"),
|
|
84
|
+
children
|
|
85
|
+
})
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
const ToolGroupImpl = ({ children, startIndex, endIndex }) => {
|
|
89
|
+
const toolCount = endIndex - startIndex + 1;
|
|
90
|
+
return /* @__PURE__ */ jsxs(ToolGroupRoot, { children: [/* @__PURE__ */ jsx(ToolGroupTrigger, { count: toolCount }), /* @__PURE__ */ jsx(ToolGroupContent, { children })] });
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* @deprecated This wrapper targets the legacy `components.ToolGroup` prop
|
|
94
|
+
* on `<MessagePrimitive.Parts>`. Use `<MessagePrimitive.GroupedParts>` with
|
|
95
|
+
* a `groupBy` returning `"group-tool"` and compose `ToolGroupRoot` /
|
|
96
|
+
* `ToolGroupTrigger` / `ToolGroupContent` directly. See `thread.tsx`.
|
|
97
|
+
*/
|
|
98
|
+
const ToolGroup = memo(ToolGroupImpl);
|
|
99
|
+
ToolGroup.displayName = "ToolGroup";
|
|
100
|
+
ToolGroup.Root = ToolGroupRoot;
|
|
101
|
+
ToolGroup.Trigger = ToolGroupTrigger;
|
|
102
|
+
ToolGroup.Content = ToolGroupContent;
|
|
103
|
+
//#endregion
|
|
104
|
+
export { ToolGroup, ToolGroupContent, ToolGroupRoot, ToolGroupTrigger, toolGroupVariants, tool_group_aui_exports };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
declare namespace tool_group_d_exports {
|
|
3
|
+
export { GroupedTool, GroupedToolState, ToolGroup };
|
|
4
|
+
}
|
|
5
|
+
export type GroupedToolState = "running" | "done" | "failed";
|
|
6
|
+
export interface GroupedTool {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
target: string;
|
|
10
|
+
state: GroupedToolState;
|
|
11
|
+
durationMs?: number;
|
|
12
|
+
}
|
|
13
|
+
export declare function ToolGroup({ label, tools, open, onOpenChange, className, ...props }: Omit<ComponentProps<"div">, "children" | "label" | "tools" | "open" | "onOpenChange"> & {
|
|
14
|
+
label: string;
|
|
15
|
+
tools: readonly GroupedTool[];
|
|
16
|
+
open: boolean;
|
|
17
|
+
onOpenChange?: (open: boolean) => void;
|
|
18
|
+
}): import("react").JSX.Element;
|
|
19
|
+
//#endregion
|
|
20
|
+
export { tool_group_d_exports };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { __exportAll } from "../../../_virtual/_rolldown/runtime.js";
|
|
3
|
+
import { cn } from "../../../lib/utils.js";
|
|
4
|
+
import { mono, paper } from "./surfaces.js";
|
|
5
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { CheckIcon, ChevronRightIcon, Loader2Icon, XIcon } from "lucide-react";
|
|
7
|
+
//#region src/components/assistant-ui/elements/tool-group.tsx
|
|
8
|
+
var tool_group_exports = /* @__PURE__ */ __exportAll({ ToolGroup: () => ToolGroup });
|
|
9
|
+
function ToolGroup({ label, tools, open, onOpenChange, className, ...props }) {
|
|
10
|
+
const running = tools.filter((tool) => tool.state === "running").length;
|
|
11
|
+
const failed = tools.filter((tool) => tool.state === "failed").length;
|
|
12
|
+
const headerClassName = cn("flex items-center gap-2.5 px-3.5 py-2.5 text-start", onOpenChange && "hover:bg-foreground/[0.03] transition-colors", onOpenChange && "rounded-t-2xl outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring/50");
|
|
13
|
+
const header = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
14
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, { className: cn("text-muted-foreground size-3 shrink-0 transition-transform duration-200 motion-reduce:transition-none", open && "rotate-90") }),
|
|
15
|
+
/* @__PURE__ */ jsx("span", {
|
|
16
|
+
className: "min-w-0 flex-1 truncate text-[13.5px]",
|
|
17
|
+
children: label
|
|
18
|
+
}),
|
|
19
|
+
/* @__PURE__ */ jsx("span", {
|
|
20
|
+
className: cn(mono, "text-muted-foreground shrink-0 tabular-nums"),
|
|
21
|
+
children: running > 0 ? `${tools.length - running}/${tools.length}` : failed > 0 ? `${failed} failed` : `${tools.length} done`
|
|
22
|
+
}),
|
|
23
|
+
running > 0 ? /* @__PURE__ */ jsx(Loader2Icon, { className: "text-muted-foreground size-3.5 shrink-0 animate-spin motion-reduce:animate-none" }) : failed > 0 ? /* @__PURE__ */ jsx(XIcon, { className: "size-3.5 shrink-0 text-destructive" }) : /* @__PURE__ */ jsx(CheckIcon, { className: "size-3.5 shrink-0 text-success" })
|
|
24
|
+
] });
|
|
25
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
26
|
+
"data-slot": "tool-group",
|
|
27
|
+
className: cn(paper, "flex w-full max-w-sm flex-col overflow-hidden rounded-2xl", className),
|
|
28
|
+
...props,
|
|
29
|
+
children: [onOpenChange ? /* @__PURE__ */ jsx("button", {
|
|
30
|
+
type: "button",
|
|
31
|
+
"aria-expanded": open,
|
|
32
|
+
onClick: () => onOpenChange(!open),
|
|
33
|
+
className: headerClassName,
|
|
34
|
+
children: header
|
|
35
|
+
}) : /* @__PURE__ */ jsx("div", {
|
|
36
|
+
className: headerClassName,
|
|
37
|
+
children: header
|
|
38
|
+
}), open && /* @__PURE__ */ jsx("div", {
|
|
39
|
+
className: "border-foreground/[0.06] fade-in slide-in-from-top-1 animate-in flex flex-col border-t duration-200",
|
|
40
|
+
children: tools.map((tool) => /* @__PURE__ */ jsxs("div", {
|
|
41
|
+
className: "flex items-center gap-2.5 px-3.5 py-2",
|
|
42
|
+
children: [
|
|
43
|
+
/* @__PURE__ */ jsx("span", {
|
|
44
|
+
className: "flex size-3.5 shrink-0 items-center justify-center",
|
|
45
|
+
children: tool.state === "running" ? /* @__PURE__ */ jsx(Loader2Icon, { className: "text-muted-foreground size-3 animate-spin motion-reduce:animate-none" }) : tool.state === "failed" ? /* @__PURE__ */ jsx(XIcon, {
|
|
46
|
+
strokeWidth: 2.75,
|
|
47
|
+
className: "size-3 text-destructive"
|
|
48
|
+
}) : /* @__PURE__ */ jsx(CheckIcon, {
|
|
49
|
+
strokeWidth: 2.75,
|
|
50
|
+
className: "size-3 text-success"
|
|
51
|
+
})
|
|
52
|
+
}),
|
|
53
|
+
/* @__PURE__ */ jsx("span", {
|
|
54
|
+
className: cn("font-mono text-[11px] tracking-tight", "text-muted-foreground shrink-0"),
|
|
55
|
+
children: tool.name
|
|
56
|
+
}),
|
|
57
|
+
/* @__PURE__ */ jsx("span", {
|
|
58
|
+
className: "text-foreground/80 min-w-0 flex-1 truncate text-[13px]",
|
|
59
|
+
children: tool.target
|
|
60
|
+
}),
|
|
61
|
+
tool.durationMs !== void 0 && /* @__PURE__ */ jsxs("span", {
|
|
62
|
+
className: cn("font-mono text-[11px] tracking-tight", "text-muted-foreground shrink-0 tabular-nums"),
|
|
63
|
+
children: [tool.durationMs, "ms"]
|
|
64
|
+
})
|
|
65
|
+
]
|
|
66
|
+
}, tool.id))
|
|
67
|
+
})]
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
//#endregion
|
|
71
|
+
export { ToolGroup, tool_group_exports };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ComponentType } from "react";
|
|
2
|
+
declare namespace tool_timeline_d_exports {
|
|
3
|
+
export { TimelineStat, TimelineStep, ToolTimeline, ToolTimelineProps };
|
|
4
|
+
}
|
|
5
|
+
export interface TimelineStep {
|
|
6
|
+
verb: string;
|
|
7
|
+
chip: string;
|
|
8
|
+
/** A lucide icon, or any component that takes a className (such as a status mark). */
|
|
9
|
+
icon: ComponentType<{
|
|
10
|
+
className?: string;
|
|
11
|
+
}>;
|
|
12
|
+
/** A stable id. Required for selection when two steps share a chip. Defaults to the chip. */
|
|
13
|
+
id?: string;
|
|
14
|
+
/** The row's accessible name when steps are selectable. Defaults to the verb and chip. */
|
|
15
|
+
label?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface TimelineStat {
|
|
18
|
+
file: string;
|
|
19
|
+
added?: number;
|
|
20
|
+
removed?: number;
|
|
21
|
+
}
|
|
22
|
+
export interface ToolTimelineProps {
|
|
23
|
+
steps: readonly TimelineStep[];
|
|
24
|
+
visibleSteps: number;
|
|
25
|
+
streaming: boolean;
|
|
26
|
+
open: boolean;
|
|
27
|
+
onOpenChange: (open: boolean) => void;
|
|
28
|
+
restingLabel: string;
|
|
29
|
+
activeLabel: string;
|
|
30
|
+
stats: TimelineStat[];
|
|
31
|
+
className?: string;
|
|
32
|
+
/** The selected step's id, when steps are selectable. */
|
|
33
|
+
selectedId?: string | null;
|
|
34
|
+
/**
|
|
35
|
+
* Makes the steps a single-select listbox: a click or the arrow keys (Home
|
|
36
|
+
* and End too) select a step.
|
|
37
|
+
*/
|
|
38
|
+
onSelectedIdChange?: (id: string) => void;
|
|
39
|
+
/** Accessible name of the step list when steps are selectable. */
|
|
40
|
+
listLabel?: string;
|
|
41
|
+
}
|
|
42
|
+
export declare function ToolTimeline({ steps, visibleSteps, streaming, open, onOpenChange, restingLabel, activeLabel, stats, className, selectedId, onSelectedIdChange, listLabel }: ToolTimelineProps): import("react").JSX.Element;
|
|
43
|
+
//#endregion
|
|
44
|
+
export { tool_timeline_d_exports };
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { __exportAll } from "../../../_virtual/_rolldown/runtime.js";
|
|
3
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../../ui/collapsible.js";
|
|
4
|
+
import { cn } from "../../../lib/utils.js";
|
|
5
|
+
import { ShimmerLabel, SwapLabel, collapsePanel } from "./surfaces.js";
|
|
6
|
+
import { take } from "../utils/range.js";
|
|
7
|
+
import { useId, useRef } from "react";
|
|
8
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { ChevronRightIcon } from "lucide-react";
|
|
10
|
+
//#region src/components/assistant-ui/elements/tool-timeline.tsx
|
|
11
|
+
var tool_timeline_exports = /* @__PURE__ */ __exportAll({ ToolTimeline: () => ToolTimeline });
|
|
12
|
+
const stepId = (step) => step.id ?? step.chip;
|
|
13
|
+
function ToolTimeline({ steps, visibleSteps, streaming, open, onOpenChange, restingLabel, activeLabel, stats, className, selectedId, onSelectedIdChange, listLabel = "Steps" }) {
|
|
14
|
+
const baseId = useId();
|
|
15
|
+
const listRef = useRef(null);
|
|
16
|
+
const selectable = onSelectedIdChange !== void 0;
|
|
17
|
+
const shown = take(steps, visibleSteps);
|
|
18
|
+
const optionId = (id) => `${baseId}-step-${encodeURIComponent(id)}`;
|
|
19
|
+
const selectedVisible = shown.some((step) => stepId(step) === selectedId);
|
|
20
|
+
const onKeyDown = (event) => {
|
|
21
|
+
if (!onSelectedIdChange || shown.length === 0) return;
|
|
22
|
+
const at = shown.findIndex((step) => stepId(step) === selectedId);
|
|
23
|
+
const next = event.key === "ArrowDown" ? Math.min(at + 1, shown.length - 1) : event.key === "ArrowUp" ? Math.max(at - 1, 0) : event.key === "Home" ? 0 : event.key === "End" ? shown.length - 1 : null;
|
|
24
|
+
if (next === null) return;
|
|
25
|
+
event.preventDefault();
|
|
26
|
+
const target = shown[next];
|
|
27
|
+
if (!target || stepId(target) === selectedId) return;
|
|
28
|
+
onSelectedIdChange(stepId(target));
|
|
29
|
+
listRef.current?.querySelector(`#${CSS.escape(optionId(stepId(target)))}`)?.scrollIntoView({ block: "nearest" });
|
|
30
|
+
};
|
|
31
|
+
const statChips = stats.length > 0 ? /* @__PURE__ */ jsx("div", {
|
|
32
|
+
className: cn("flex flex-wrap gap-1.5 pt-1", selectable && "ps-4 pt-2"),
|
|
33
|
+
children: stats.map((stat) => /* @__PURE__ */ jsxs("span", {
|
|
34
|
+
className: "bg-foreground/[0.06] text-foreground inline-flex items-center gap-1 rounded-md px-1.5 py-0.5 font-mono text-[11px]",
|
|
35
|
+
children: [
|
|
36
|
+
/* @__PURE__ */ jsx("span", { children: stat.file }),
|
|
37
|
+
stat.added !== void 0 && /* @__PURE__ */ jsxs("span", {
|
|
38
|
+
className: "text-success dark:text-success",
|
|
39
|
+
children: ["+", stat.added]
|
|
40
|
+
}),
|
|
41
|
+
stat.removed !== void 0 && /* @__PURE__ */ jsxs("span", {
|
|
42
|
+
className: "text-destructive dark:text-destructive",
|
|
43
|
+
children: ["−", stat.removed]
|
|
44
|
+
})
|
|
45
|
+
]
|
|
46
|
+
}, stat.file))
|
|
47
|
+
}) : null;
|
|
48
|
+
return /* @__PURE__ */ jsxs(Collapsible, {
|
|
49
|
+
"data-slot": "tool-timeline",
|
|
50
|
+
open,
|
|
51
|
+
onOpenChange,
|
|
52
|
+
className: cn("w-full max-w-sm", className),
|
|
53
|
+
children: [/* @__PURE__ */ jsxs(CollapsibleTrigger, {
|
|
54
|
+
className: "group/trigger text-muted-foreground hover:text-foreground/90 flex items-center gap-1.5 rounded-md py-1 text-[13.5px] transition-colors outline-none",
|
|
55
|
+
children: [/* @__PURE__ */ jsx(ChevronRightIcon, { className: "size-3.5 shrink-0 opacity-60 transition-transform duration-200 ease-[cubic-bezier(0.32,0.72,0,1)] group-data-open/trigger:rotate-90 group-data-panel-open/trigger:rotate-90 motion-reduce:transition-none" }), /* @__PURE__ */ jsxs(SwapLabel, {
|
|
56
|
+
active: streaming ? 0 : 1,
|
|
57
|
+
className: "text-start tabular-nums",
|
|
58
|
+
children: [/* @__PURE__ */ jsx(ShimmerLabel, {
|
|
59
|
+
active: streaming,
|
|
60
|
+
className: "shimmer-color-foreground relative inline-block leading-none",
|
|
61
|
+
children: activeLabel
|
|
62
|
+
}), /* @__PURE__ */ jsx(Fragment$1, { children: restingLabel })]
|
|
63
|
+
})]
|
|
64
|
+
}), /* @__PURE__ */ jsxs(CollapsibleContent, {
|
|
65
|
+
className: cn(collapsePanel, "outline-none"),
|
|
66
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
67
|
+
ref: listRef,
|
|
68
|
+
className: cn("flex flex-col gap-2.5 ps-4 pt-2.5", selectable && "@container/timeline-steps ms-2 mt-2 gap-0.5 rounded-lg p-1 outline-none focus-visible:ring-1 focus-visible:ring-ring/70 focus-visible:ring-inset"),
|
|
69
|
+
...selectable ? {
|
|
70
|
+
role: "listbox",
|
|
71
|
+
"aria-label": listLabel,
|
|
72
|
+
tabIndex: 0,
|
|
73
|
+
"aria-activedescendant": selectedId && selectedVisible ? optionId(selectedId) : void 0,
|
|
74
|
+
onKeyDown
|
|
75
|
+
} : {},
|
|
76
|
+
children: [shown.map((step, index) => {
|
|
77
|
+
const Icon = step.icon;
|
|
78
|
+
const active = streaming && index === shown.length - 1;
|
|
79
|
+
const id = stepId(step);
|
|
80
|
+
const selected = selectable && id === selectedId;
|
|
81
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
82
|
+
className: cn("fade-in slide-in-from-bottom-1 animate-in fill-mode-both text-muted-foreground text-[13.5px] duration-300", selectable ? "grid min-w-0 grid-cols-[auto_minmax(0,1fr)] items-center gap-x-2 gap-y-0.5 rounded-md px-1.5 py-1 transition-colors hover:bg-foreground/[0.03] aria-selected:bg-foreground/[0.06] aria-selected:text-foreground aria-selected:hover:bg-foreground/[0.06] @sm/timeline-steps:grid-cols-[auto_minmax(0,1fr)_auto]" : "flex items-center gap-2"),
|
|
83
|
+
...selectable ? {
|
|
84
|
+
id: optionId(id),
|
|
85
|
+
role: "option",
|
|
86
|
+
"aria-selected": selected,
|
|
87
|
+
"aria-label": step.label ?? `${step.verb}, ${step.chip}`,
|
|
88
|
+
onClick: () => onSelectedIdChange(id)
|
|
89
|
+
} : {},
|
|
90
|
+
children: [
|
|
91
|
+
/* @__PURE__ */ jsx(Icon, { className: cn("text-muted-foreground size-3.5 shrink-0", selectable && "mt-[3px] self-start") }),
|
|
92
|
+
/* @__PURE__ */ jsx(ShimmerLabel, {
|
|
93
|
+
active,
|
|
94
|
+
className: cn("relative inline-block leading-none", selectable && "min-w-0 leading-normal @sm/timeline-steps:truncate"),
|
|
95
|
+
children: step.verb
|
|
96
|
+
}),
|
|
97
|
+
/* @__PURE__ */ jsx("span", {
|
|
98
|
+
className: cn("bg-foreground/[0.06] text-foreground rounded-md px-1.5 py-0.5 font-mono text-[11px]", selectable && "col-start-2 max-w-full min-w-0 justify-self-start truncate @sm/timeline-steps:col-start-3 @sm/timeline-steps:max-w-[45cqw] @sm/timeline-steps:justify-self-end"),
|
|
99
|
+
children: step.chip
|
|
100
|
+
})
|
|
101
|
+
]
|
|
102
|
+
}, id);
|
|
103
|
+
}), selectable ? null : statChips]
|
|
104
|
+
}), selectable ? statChips : null]
|
|
105
|
+
})]
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
//#endregion
|
|
109
|
+
export { ToolTimeline, tool_timeline_exports };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Button } from "../../ui/button.js";
|
|
2
|
+
import { ComponentPropsWithRef } from "react";
|
|
3
|
+
declare namespace tooltip_icon_button_d_exports {
|
|
4
|
+
export { TooltipIconButton, TooltipIconButtonProps };
|
|
5
|
+
}
|
|
6
|
+
export type TooltipIconButtonProps = ComponentPropsWithRef<typeof Button> & {
|
|
7
|
+
tooltip: string;
|
|
8
|
+
side?: "top" | "bottom" | "left" | "right";
|
|
9
|
+
};
|
|
10
|
+
export declare const TooltipIconButton: import("react").ForwardRefExoticComponent<Omit<TooltipIconButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { tooltip_icon_button_d_exports };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { __exportAll } from "../../../_virtual/_rolldown/runtime.js";
|
|
3
|
+
import { Button } from "../../ui/button.js";
|
|
4
|
+
import { cn } from "../../../lib/utils.js";
|
|
5
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../../ui/tooltip.js";
|
|
6
|
+
import { forwardRef } from "react";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
//#region src/components/assistant-ui/elements/tooltip-icon-button.tsx
|
|
9
|
+
var tooltip_icon_button_exports = /* @__PURE__ */ __exportAll({ TooltipIconButton: () => TooltipIconButton });
|
|
10
|
+
const TooltipIconButton = forwardRef(({ children, tooltip, side = "bottom", className, ...rest }, ref) => {
|
|
11
|
+
return /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsxs(TooltipTrigger, {
|
|
12
|
+
render: /* @__PURE__ */ jsx(Button, {
|
|
13
|
+
variant: "ghost",
|
|
14
|
+
size: "icon",
|
|
15
|
+
...rest,
|
|
16
|
+
className: cn("aui-button-icon size-6 p-1 active:scale-90", className),
|
|
17
|
+
ref
|
|
18
|
+
}),
|
|
19
|
+
children: [children, /* @__PURE__ */ jsx("span", {
|
|
20
|
+
className: "aui-sr-only sr-only",
|
|
21
|
+
children: tooltip
|
|
22
|
+
})]
|
|
23
|
+
}), /* @__PURE__ */ jsx(TooltipContent, {
|
|
24
|
+
side,
|
|
25
|
+
children: tooltip
|
|
26
|
+
})] }) });
|
|
27
|
+
});
|
|
28
|
+
TooltipIconButton.displayName = "TooltipIconButton";
|
|
29
|
+
//#endregion
|
|
30
|
+
export { TooltipIconButton, tooltip_icon_button_exports };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
declare namespace trace_waterfall_d_exports {
|
|
3
|
+
export { SpanStatus, TraceSpan, TraceWaterfall };
|
|
4
|
+
}
|
|
5
|
+
export type SpanStatus = "running" | "completed" | "failed";
|
|
6
|
+
export interface TraceSpan {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
depth: number;
|
|
10
|
+
startMs: number;
|
|
11
|
+
durationMs: number;
|
|
12
|
+
status: SpanStatus;
|
|
13
|
+
/** The row's accessible name when spans are selectable. Defaults to name, status and timing. */
|
|
14
|
+
label?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare function TraceWaterfall({ spans, totalMs, visibleCount, selectedId, onSelectedIdChange, listLabel, formatDuration, className, ...props }: Omit<ComponentProps<"div">, "children" | "spans" | "totalMs" | "visibleCount" | "selectedId" | "onSelectedIdChange" | "formatDuration"> & {
|
|
17
|
+
spans: readonly TraceSpan[];
|
|
18
|
+
totalMs: number;
|
|
19
|
+
visibleCount: number;
|
|
20
|
+
/** The selected span's id, when spans are selectable. */
|
|
21
|
+
selectedId?: string | null;
|
|
22
|
+
/**
|
|
23
|
+
* Makes the spans a single-select listbox: a click or the arrow keys (Home
|
|
24
|
+
* and End too) select a span.
|
|
25
|
+
*/
|
|
26
|
+
onSelectedIdChange?: (id: string) => void;
|
|
27
|
+
/** Accessible name of the span list when spans are selectable. */
|
|
28
|
+
listLabel?: string;
|
|
29
|
+
/** Formats the total and each span's duration. Defaults to bare milliseconds. */
|
|
30
|
+
formatDuration?: (ms: number) => string;
|
|
31
|
+
}): import("react").JSX.Element;
|
|
32
|
+
//#endregion
|
|
33
|
+
export { trace_waterfall_d_exports };
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { __exportAll } from "../../../_virtual/_rolldown/runtime.js";
|
|
3
|
+
import { cn } from "../../../lib/utils.js";
|
|
4
|
+
import { mono, paper } from "./surfaces.js";
|
|
5
|
+
import { pct, take } from "../utils/range.js";
|
|
6
|
+
import { useId, useRef } from "react";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
//#region src/components/assistant-ui/elements/trace-waterfall.tsx
|
|
9
|
+
var trace_waterfall_exports = /* @__PURE__ */ __exportAll({ TraceWaterfall: () => TraceWaterfall });
|
|
10
|
+
const TONE = {
|
|
11
|
+
running: "bg-chart-2",
|
|
12
|
+
completed: "bg-foreground/35",
|
|
13
|
+
failed: "bg-destructive/80"
|
|
14
|
+
};
|
|
15
|
+
function TraceWaterfall({ spans, totalMs, visibleCount, selectedId, onSelectedIdChange, listLabel = "Trace spans", formatDuration, className, ...props }) {
|
|
16
|
+
const span = totalMs || 1;
|
|
17
|
+
const baseId = useId();
|
|
18
|
+
const listRef = useRef(null);
|
|
19
|
+
const selectable = onSelectedIdChange !== void 0;
|
|
20
|
+
const shown = take(spans, visibleCount);
|
|
21
|
+
const optionId = (id) => `${baseId}-span-${encodeURIComponent(id)}`;
|
|
22
|
+
const selectedVisible = shown.some((item) => item.id === selectedId);
|
|
23
|
+
const onKeyDown = (event) => {
|
|
24
|
+
if (!onSelectedIdChange || shown.length === 0) return;
|
|
25
|
+
const at = shown.findIndex((item) => item.id === selectedId);
|
|
26
|
+
const next = event.key === "ArrowDown" ? Math.min(at + 1, shown.length - 1) : event.key === "ArrowUp" ? Math.max(at - 1, 0) : event.key === "Home" ? 0 : event.key === "End" ? shown.length - 1 : null;
|
|
27
|
+
if (next === null) return;
|
|
28
|
+
event.preventDefault();
|
|
29
|
+
const target = shown[next];
|
|
30
|
+
if (!target || target.id === selectedId) return;
|
|
31
|
+
onSelectedIdChange(target.id);
|
|
32
|
+
listRef.current?.querySelector(`#${CSS.escape(optionId(target.id))}`)?.scrollIntoView({ block: "nearest" });
|
|
33
|
+
};
|
|
34
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
35
|
+
"data-slot": "trace-waterfall",
|
|
36
|
+
className: cn(paper, "flex w-full max-w-md flex-col gap-2 rounded-2xl p-4", className),
|
|
37
|
+
...props,
|
|
38
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
39
|
+
className: "flex items-baseline justify-between",
|
|
40
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
41
|
+
className: "text-[13.5px] font-medium",
|
|
42
|
+
children: "Trace"
|
|
43
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
44
|
+
className: cn(mono, "text-muted-foreground tabular-nums"),
|
|
45
|
+
children: formatDuration ? formatDuration(totalMs) : `${totalMs}ms`
|
|
46
|
+
})]
|
|
47
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
48
|
+
ref: listRef,
|
|
49
|
+
className: cn("flex flex-col gap-1", selectable && "group/trace-list -mx-2.5 rounded-lg p-1 outline-none focus-visible:ring-1 focus-visible:ring-ring/70 focus-visible:ring-inset"),
|
|
50
|
+
...selectable ? {
|
|
51
|
+
role: "listbox",
|
|
52
|
+
"aria-label": listLabel,
|
|
53
|
+
tabIndex: 0,
|
|
54
|
+
"aria-activedescendant": selectedId && selectedVisible ? optionId(selectedId) : void 0,
|
|
55
|
+
onKeyDown
|
|
56
|
+
} : {},
|
|
57
|
+
children: shown.map((item) => {
|
|
58
|
+
const left = pct(item.startMs, span);
|
|
59
|
+
const width = Math.max(1.5, pct(item.durationMs, span));
|
|
60
|
+
const selected = selectable && item.id === selectedId;
|
|
61
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
62
|
+
className: cn("fade-in slide-in-from-left-1 animate-in fill-mode-both grid items-center gap-2 duration-300", selectable ? "grid-cols-[minmax(0,3fr)_minmax(0,2fr)_3.5rem] rounded-md px-1.5 py-0.5 transition-colors hover:bg-foreground/[0.03] aria-selected:bg-foreground/[0.06] aria-selected:hover:bg-foreground/[0.06]" : "grid-cols-[7.5rem_1fr_2.5rem]"),
|
|
63
|
+
...selectable ? {
|
|
64
|
+
id: optionId(item.id),
|
|
65
|
+
role: "option",
|
|
66
|
+
"aria-selected": selected,
|
|
67
|
+
"aria-label": item.label ?? `${item.name}, ${item.status}, starts at ${item.startMs}ms, runs ${item.durationMs}ms`,
|
|
68
|
+
onClick: () => onSelectedIdChange(item.id)
|
|
69
|
+
} : {},
|
|
70
|
+
children: [
|
|
71
|
+
/* @__PURE__ */ jsx("span", {
|
|
72
|
+
className: cn("min-w-0 truncate text-xs", selected ? "text-foreground font-medium" : "text-muted-foreground"),
|
|
73
|
+
style: { paddingInlineStart: `${item.depth * .75}rem` },
|
|
74
|
+
title: item.name,
|
|
75
|
+
children: item.name
|
|
76
|
+
}),
|
|
77
|
+
/* @__PURE__ */ jsx("span", {
|
|
78
|
+
...selectable ? { "aria-hidden": true } : {
|
|
79
|
+
role: "img",
|
|
80
|
+
"aria-label": `${item.status}, starts at ${item.startMs}ms, runs ${item.durationMs}ms`
|
|
81
|
+
},
|
|
82
|
+
className: "relative flex h-4 min-w-0 items-center",
|
|
83
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
84
|
+
className: cn("absolute h-[7px] rounded-full transition-[width] duration-500 ease-out motion-reduce:transition-none", TONE[item.status], item.status === "running" && "animate-pulse"),
|
|
85
|
+
style: {
|
|
86
|
+
insetInlineStart: `${left}%`,
|
|
87
|
+
width: `${width}%`
|
|
88
|
+
}
|
|
89
|
+
})
|
|
90
|
+
}),
|
|
91
|
+
/* @__PURE__ */ jsx("span", {
|
|
92
|
+
className: cn(mono, "text-end tabular-nums", selected ? "text-foreground/80" : "text-muted-foreground"),
|
|
93
|
+
children: formatDuration ? formatDuration(item.durationMs) : item.durationMs
|
|
94
|
+
})
|
|
95
|
+
]
|
|
96
|
+
}, item.id);
|
|
97
|
+
})
|
|
98
|
+
})]
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
//#endregion
|
|
102
|
+
export { TraceWaterfall, trace_waterfall_exports };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
declare namespace typing_indicator_d_exports {
|
|
3
|
+
export { TypingIndicator };
|
|
4
|
+
}
|
|
5
|
+
export declare function TypingIndicator({ variant, className, ...props }: Omit<ComponentProps<"div">, "children" | "variant" | "role" | "aria-label"> & {
|
|
6
|
+
variant?: "bubble" | "bare";
|
|
7
|
+
}): import("react").JSX.Element;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { typing_indicator_d_exports };
|
|
@@ -0,0 +1,45 @@
|
|
|
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 { jsx } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/assistant-ui/elements/typing-indicator.tsx
|
|
7
|
+
var typing_indicator_exports = /* @__PURE__ */ __exportAll({ TypingIndicator: () => TypingIndicator });
|
|
8
|
+
const DOT_DELAYS = [
|
|
9
|
+
"-0.32s",
|
|
10
|
+
"-0.16s",
|
|
11
|
+
"0s"
|
|
12
|
+
];
|
|
13
|
+
function TypingIndicator({ variant = "bubble", className, ...props }) {
|
|
14
|
+
const dots = DOT_DELAYS.map((delay) => /* @__PURE__ */ jsx("span", {
|
|
15
|
+
"aria-hidden": true,
|
|
16
|
+
className: "bg-foreground/40 size-1.5 animate-bounce rounded-full motion-reduce:animate-none",
|
|
17
|
+
style: {
|
|
18
|
+
animationDelay: delay,
|
|
19
|
+
animationDuration: "1.1s"
|
|
20
|
+
}
|
|
21
|
+
}, delay));
|
|
22
|
+
if (variant === "bare") return /* @__PURE__ */ jsx("div", {
|
|
23
|
+
"data-slot": "typing-indicator",
|
|
24
|
+
"data-variant": "bare",
|
|
25
|
+
role: "status",
|
|
26
|
+
"aria-label": "Assistant is typing",
|
|
27
|
+
className: cn("flex gap-1", className),
|
|
28
|
+
...props,
|
|
29
|
+
children: dots
|
|
30
|
+
});
|
|
31
|
+
return /* @__PURE__ */ jsx("div", {
|
|
32
|
+
"data-slot": "typing-indicator",
|
|
33
|
+
"data-variant": "bubble",
|
|
34
|
+
className: cn(paper, "w-fit rounded-full px-4 py-3.5", className),
|
|
35
|
+
...props,
|
|
36
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
37
|
+
role: "status",
|
|
38
|
+
"aria-label": "Assistant is typing",
|
|
39
|
+
className: "flex gap-1",
|
|
40
|
+
children: dots
|
|
41
|
+
})
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
//#endregion
|
|
45
|
+
export { TypingIndicator, typing_indicator_exports };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { VoiceMode, VoiceTurn } from "./voice-conversation.js";
|
|
2
|
+
import { FC } from "react";
|
|
3
|
+
declare namespace voice_conversation_aui_d_exports {
|
|
4
|
+
export { VoiceConversation, VoiceMode, VoiceTurn, useVoiceTranscript };
|
|
5
|
+
}
|
|
6
|
+
export declare const useVoiceTranscript: () => readonly VoiceTurn[];
|
|
7
|
+
export declare const VoiceConversation: FC<{
|
|
8
|
+
className?: string;
|
|
9
|
+
}>;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { type VoiceMode, type VoiceTurn, voice_conversation_aui_d_exports };
|