@dungle-scrubs/admin-ui-soft 0.0.0-stage → 0.0.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 +133 -4
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
declare namespace agent_plan_d_exports {
|
|
3
|
+
export { AgentPlan, AgentPlanStep };
|
|
4
|
+
}
|
|
5
|
+
export type AgentPlanStep = {
|
|
6
|
+
id?: string | undefined;
|
|
7
|
+
label: string;
|
|
8
|
+
description?: string | undefined;
|
|
9
|
+
};
|
|
10
|
+
export declare function AgentPlan({ steps, activeIndex, title, className, ...props }: Omit<ComponentProps<"div">, "children" | "steps" | "activeIndex"> & {
|
|
11
|
+
steps: readonly (string | AgentPlanStep)[];
|
|
12
|
+
activeIndex: number;
|
|
13
|
+
title?: string | undefined;
|
|
14
|
+
}): import("react").JSX.Element;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { agent_plan_d_exports };
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { __exportAll } from "../../../_virtual/_rolldown/runtime.js";
|
|
3
|
+
import { cn } from "../../../lib/utils.js";
|
|
4
|
+
import { mono } from "./surfaces.js";
|
|
5
|
+
import { announced, pct, progressOf } from "../utils/range.js";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { CheckIcon, Loader2Icon } from "lucide-react";
|
|
8
|
+
//#region src/components/assistant-ui/elements/agent-plan.tsx
|
|
9
|
+
var agent_plan_exports = /* @__PURE__ */ __exportAll({ AgentPlan: () => AgentPlan });
|
|
10
|
+
function AgentPlan({ steps, activeIndex, title = "Plan", className, ...props }) {
|
|
11
|
+
const total = steps.length;
|
|
12
|
+
const completed = progressOf(activeIndex, total);
|
|
13
|
+
const allDone = completed >= total;
|
|
14
|
+
const progress = pct(completed, total);
|
|
15
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
16
|
+
"data-slot": "agent-plan",
|
|
17
|
+
className: cn("flex w-full max-w-sm flex-col gap-3", className),
|
|
18
|
+
...props,
|
|
19
|
+
children: [
|
|
20
|
+
/* @__PURE__ */ jsxs("div", {
|
|
21
|
+
className: "flex items-center justify-between",
|
|
22
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
23
|
+
className: "text-[13.5px] font-medium",
|
|
24
|
+
children: title
|
|
25
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
26
|
+
className: cn(mono, "text-muted-foreground tabular-nums"),
|
|
27
|
+
children: [
|
|
28
|
+
completed,
|
|
29
|
+
" of ",
|
|
30
|
+
total
|
|
31
|
+
]
|
|
32
|
+
})]
|
|
33
|
+
}),
|
|
34
|
+
/* @__PURE__ */ jsx("div", {
|
|
35
|
+
role: "progressbar",
|
|
36
|
+
"aria-label": `${title} progress`,
|
|
37
|
+
"aria-valuemin": 0,
|
|
38
|
+
"aria-valuemax": 100,
|
|
39
|
+
"aria-valuenow": announced(progress),
|
|
40
|
+
"aria-valuetext": `${completed} of ${total} steps`,
|
|
41
|
+
className: "bg-foreground/[0.06] h-[3px] w-full overflow-hidden rounded-full",
|
|
42
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
43
|
+
"aria-hidden": true,
|
|
44
|
+
className: "bg-foreground/80 block h-full rounded-full transition-[width] duration-500 motion-reduce:transition-none",
|
|
45
|
+
style: { width: `${progress}%` }
|
|
46
|
+
})
|
|
47
|
+
}),
|
|
48
|
+
/* @__PURE__ */ jsx("ul", {
|
|
49
|
+
className: "flex flex-col gap-2.5",
|
|
50
|
+
children: steps.map((step, i) => {
|
|
51
|
+
const item = typeof step === "string" ? { label: step } : step;
|
|
52
|
+
const done = allDone || i < completed;
|
|
53
|
+
const active = !allDone && i === completed;
|
|
54
|
+
const status = done ? "done" : active ? "in progress" : "not started";
|
|
55
|
+
return /* @__PURE__ */ jsxs("li", {
|
|
56
|
+
className: cn("flex gap-2.5 text-[13.5px]", active && item.description ? "items-start" : "items-center"),
|
|
57
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
58
|
+
className: "flex size-4 shrink-0 items-center justify-center",
|
|
59
|
+
children: done ? /* @__PURE__ */ jsx(CheckIcon, {
|
|
60
|
+
"aria-hidden": true,
|
|
61
|
+
className: "text-muted-foreground size-3.5"
|
|
62
|
+
}) : active ? /* @__PURE__ */ jsx(Loader2Icon, {
|
|
63
|
+
"aria-hidden": true,
|
|
64
|
+
className: "text-foreground/90 size-3.5 animate-spin motion-reduce:animate-none"
|
|
65
|
+
}) : /* @__PURE__ */ jsx("span", {
|
|
66
|
+
"aria-hidden": true,
|
|
67
|
+
className: "bg-foreground/15 size-1.5 rounded-full"
|
|
68
|
+
})
|
|
69
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
70
|
+
className: "min-w-0",
|
|
71
|
+
children: [
|
|
72
|
+
/* @__PURE__ */ jsx("span", {
|
|
73
|
+
className: cn(done && "text-muted-foreground", active && "text-foreground/90", !done && !active && "text-muted-foreground"),
|
|
74
|
+
children: item.label
|
|
75
|
+
}),
|
|
76
|
+
/* @__PURE__ */ jsx("span", {
|
|
77
|
+
className: "sr-only",
|
|
78
|
+
children: ` ${status}`
|
|
79
|
+
}),
|
|
80
|
+
active && item.description ? /* @__PURE__ */ jsx("span", {
|
|
81
|
+
className: "text-muted-foreground mt-0.5 block text-xs",
|
|
82
|
+
children: item.description
|
|
83
|
+
}) : null
|
|
84
|
+
]
|
|
85
|
+
})]
|
|
86
|
+
}, typeof step === "string" ? i : step.id ?? i);
|
|
87
|
+
})
|
|
88
|
+
})
|
|
89
|
+
]
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
//#endregion
|
|
93
|
+
export { AgentPlan, agent_plan_exports };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { AgentState } from "./agent-status.js";
|
|
2
|
+
import { FC } from "react";
|
|
3
|
+
declare namespace agent_status_aui_d_exports {
|
|
4
|
+
export { AgentStatus, TaskSummary, TaskTray, summaryLabel, summaryState, useTaskSummary };
|
|
5
|
+
}
|
|
6
|
+
export type TaskSummary = {
|
|
7
|
+
readonly total: number;
|
|
8
|
+
readonly running: number;
|
|
9
|
+
readonly waiting: number;
|
|
10
|
+
readonly failed: number;
|
|
11
|
+
readonly startedAt: number | undefined;
|
|
12
|
+
readonly runningLabel: string | undefined;
|
|
13
|
+
};
|
|
14
|
+
export declare const useTaskSummary: () => TaskSummary;
|
|
15
|
+
export declare const summaryState: (summary: TaskSummary) => AgentState;
|
|
16
|
+
export declare const summaryLabel: (summary: TaskSummary) => string;
|
|
17
|
+
export declare const AgentStatus: FC<{
|
|
18
|
+
className?: string;
|
|
19
|
+
}>;
|
|
20
|
+
export declare const TaskTray: FC<{
|
|
21
|
+
className?: string;
|
|
22
|
+
}>;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { agent_status_aui_d_exports };
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { __exportAll } from "../../../_virtual/_rolldown/runtime.js";
|
|
3
|
+
import { cn } from "../../../lib/utils.js";
|
|
4
|
+
import { Popover, PopoverContent, PopoverTrigger } from "../../ui/popover.js";
|
|
5
|
+
import "./surfaces.js";
|
|
6
|
+
import { AgentStatus as AgentStatus$1 } from "./agent-status.js";
|
|
7
|
+
import { formatElapsed, taskLabel, taskMeta, taskStateOf, useTaskElapsed } from "../utils/task.js";
|
|
8
|
+
import { TaskStateIcon } from "./task-card.js";
|
|
9
|
+
import { useMemo, useState } from "react";
|
|
10
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
import { ChevronDownIcon } from "lucide-react";
|
|
12
|
+
import { useAuiState } from "@assistant-ui/react";
|
|
13
|
+
//#region src/components/assistant-ui/elements/agent-status.aui.tsx
|
|
14
|
+
var agent_status_aui_exports = /* @__PURE__ */ __exportAll({
|
|
15
|
+
AgentStatus: () => AgentStatus,
|
|
16
|
+
TaskTray: () => TaskTray,
|
|
17
|
+
summaryLabel: () => summaryLabel,
|
|
18
|
+
summaryState: () => summaryState,
|
|
19
|
+
useTaskSummary: () => useTaskSummary
|
|
20
|
+
});
|
|
21
|
+
const summarize = (tasks) => {
|
|
22
|
+
let running = 0;
|
|
23
|
+
let waiting = 0;
|
|
24
|
+
let failed = 0;
|
|
25
|
+
let startedAt;
|
|
26
|
+
let runningLabel;
|
|
27
|
+
for (const task of tasks) {
|
|
28
|
+
const state = taskStateOf(task.status, task.isError);
|
|
29
|
+
if (state === "working") {
|
|
30
|
+
running += 1;
|
|
31
|
+
runningLabel ??= taskLabel(task.toolName, task.args);
|
|
32
|
+
const taskStartedAt = task.timing?.startedAt;
|
|
33
|
+
if (taskStartedAt !== void 0 && (startedAt === void 0 || taskStartedAt < startedAt)) startedAt = taskStartedAt;
|
|
34
|
+
} else if (state === "waiting") waiting += 1;
|
|
35
|
+
else if (state === "failed") failed += 1;
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
total: tasks.length,
|
|
39
|
+
running,
|
|
40
|
+
waiting,
|
|
41
|
+
failed,
|
|
42
|
+
startedAt,
|
|
43
|
+
runningLabel
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
const useTaskSummary = () => {
|
|
47
|
+
const tasks = useAuiState((s) => s.thread.tasks);
|
|
48
|
+
return useMemo(() => summarize(tasks), [tasks]);
|
|
49
|
+
};
|
|
50
|
+
const plural = (count, noun) => `${count} ${count === 1 ? noun : `${noun}s`}`;
|
|
51
|
+
const summaryState = (summary) => {
|
|
52
|
+
if (summary.running > 0) return "working";
|
|
53
|
+
if (summary.waiting > 0) return "waiting";
|
|
54
|
+
return summary.failed > 0 ? "failed" : "done";
|
|
55
|
+
};
|
|
56
|
+
const summaryLabel = (summary) => {
|
|
57
|
+
if (summary.running === 1 && summary.runningLabel !== void 0) return summary.runningLabel;
|
|
58
|
+
if (summary.running > 0) return `${summary.running} of ${plural(summary.total, "task")} running`;
|
|
59
|
+
if (summary.waiting > 0) return `${plural(summary.waiting, "task")} waiting for input`;
|
|
60
|
+
if (summary.failed > 0) return `${plural(summary.total, "task")} done, ${summary.failed} failed`;
|
|
61
|
+
return `${plural(summary.total, "task")} done`;
|
|
62
|
+
};
|
|
63
|
+
const AgentStatus = ({ className }) => {
|
|
64
|
+
const summary = useTaskSummary();
|
|
65
|
+
const elapsedMs = useTaskElapsed(summary.startedAt === void 0 ? void 0 : { startedAt: summary.startedAt }, summary.running > 0);
|
|
66
|
+
if (summary.running === 0 && summary.waiting === 0) return null;
|
|
67
|
+
return /* @__PURE__ */ jsx(AgentStatus$1, {
|
|
68
|
+
className,
|
|
69
|
+
state: summaryState(summary),
|
|
70
|
+
label: summaryLabel(summary),
|
|
71
|
+
elapsed: elapsedMs === void 0 ? void 0 : formatElapsed(elapsedMs)
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
const TaskTrayItem = ({ task }) => {
|
|
75
|
+
const state = taskStateOf(task.status, task.isError);
|
|
76
|
+
const meta = taskMeta(task.args);
|
|
77
|
+
const elapsedMs = useTaskElapsed(task.timing, task.status.type === "running" || task.status.type === "requires-action");
|
|
78
|
+
return /* @__PURE__ */ jsxs("li", {
|
|
79
|
+
"data-slot": "aui_task-tray-item",
|
|
80
|
+
"data-state": state,
|
|
81
|
+
className: "flex items-center gap-2.5 rounded-lg py-2 pe-2.5 text-[13px]",
|
|
82
|
+
style: { paddingInlineStart: `${.625 + task.depth * .75}rem` },
|
|
83
|
+
children: [
|
|
84
|
+
/* @__PURE__ */ jsx(TaskStateIcon, { state }),
|
|
85
|
+
/* @__PURE__ */ jsx("span", {
|
|
86
|
+
className: "sr-only",
|
|
87
|
+
children: state
|
|
88
|
+
}),
|
|
89
|
+
/* @__PURE__ */ jsx("span", {
|
|
90
|
+
className: "min-w-0 flex-1 truncate",
|
|
91
|
+
children: taskLabel(task.toolName, task.args)
|
|
92
|
+
}),
|
|
93
|
+
meta !== void 0 && /* @__PURE__ */ jsx("span", {
|
|
94
|
+
className: cn("font-mono text-[11px] tracking-tight", "text-muted-foreground max-w-24 shrink-0 truncate"),
|
|
95
|
+
children: meta
|
|
96
|
+
}),
|
|
97
|
+
elapsedMs !== void 0 && /* @__PURE__ */ jsx("span", {
|
|
98
|
+
className: cn("font-mono text-[11px] tracking-tight", "text-muted-foreground shrink-0 tabular-nums"),
|
|
99
|
+
children: formatElapsed(elapsedMs)
|
|
100
|
+
})
|
|
101
|
+
]
|
|
102
|
+
});
|
|
103
|
+
};
|
|
104
|
+
const TaskTray = ({ className }) => {
|
|
105
|
+
const tasks = useAuiState((s) => s.thread.tasks);
|
|
106
|
+
const summary = useMemo(() => summarize(tasks), [tasks]);
|
|
107
|
+
const elapsedMs = useTaskElapsed(summary.startedAt === void 0 ? void 0 : { startedAt: summary.startedAt }, summary.running > 0);
|
|
108
|
+
const [open, setOpen] = useState(false);
|
|
109
|
+
const [visible, setVisible] = useState(4);
|
|
110
|
+
const firstTask = tasks[0];
|
|
111
|
+
const listKey = firstTask === void 0 ? "" : `${firstTask.messageId}:${firstTask.id}`;
|
|
112
|
+
const [seenListKey, setSeenListKey] = useState(listKey);
|
|
113
|
+
if (seenListKey !== listKey) {
|
|
114
|
+
setSeenListKey(listKey);
|
|
115
|
+
setVisible(4);
|
|
116
|
+
}
|
|
117
|
+
if (summary.total === 0 && open) setOpen(false);
|
|
118
|
+
if (summary.total === 0) return null;
|
|
119
|
+
const hidden = Math.max(0, tasks.length - visible);
|
|
120
|
+
return /* @__PURE__ */ jsxs(Popover, {
|
|
121
|
+
open,
|
|
122
|
+
onOpenChange: (next) => {
|
|
123
|
+
setOpen(next);
|
|
124
|
+
if (!next) setVisible(4);
|
|
125
|
+
},
|
|
126
|
+
children: [/* @__PURE__ */ jsx(PopoverTrigger, {
|
|
127
|
+
className: cn("focus-visible:ring-ring/50 cursor-pointer appearance-none rounded-full border-0 bg-transparent p-0 text-start focus-visible:ring-[3px] focus-visible:outline-none", className),
|
|
128
|
+
children: /* @__PURE__ */ jsx(AgentStatus$1, {
|
|
129
|
+
state: summaryState(summary),
|
|
130
|
+
label: summaryLabel(summary),
|
|
131
|
+
elapsed: elapsedMs === void 0 ? void 0 : formatElapsed(elapsedMs),
|
|
132
|
+
trailing: /* @__PURE__ */ jsx(ChevronDownIcon, { className: cn("size-3 transition-transform duration-200 motion-reduce:transition-none", open && "rotate-180") })
|
|
133
|
+
})
|
|
134
|
+
}), /* @__PURE__ */ jsx(PopoverContent, {
|
|
135
|
+
align: "end",
|
|
136
|
+
"aria-label": "Tasks",
|
|
137
|
+
className: "w-80 p-1",
|
|
138
|
+
children: /* @__PURE__ */ jsxs("ul", {
|
|
139
|
+
"data-slot": "aui_task-tray",
|
|
140
|
+
"aria-label": "Tasks",
|
|
141
|
+
className: "flex max-h-80 flex-col overflow-y-auto",
|
|
142
|
+
children: [tasks.slice(0, visible).map((task, index) => /* @__PURE__ */ jsx(TaskTrayItem, { task }, `${index}:${task.id}`)), hidden > 0 && /* @__PURE__ */ jsx("li", {
|
|
143
|
+
className: "flex",
|
|
144
|
+
children: /* @__PURE__ */ jsxs("button", {
|
|
145
|
+
type: "button",
|
|
146
|
+
"data-slot": "aui_task-tray-more",
|
|
147
|
+
onClick: () => setVisible((count) => count + 4),
|
|
148
|
+
className: "text-muted-foreground hover:text-foreground px-2.5 py-2 text-xs transition-colors",
|
|
149
|
+
children: [
|
|
150
|
+
"Show ",
|
|
151
|
+
Math.min(hidden, 4),
|
|
152
|
+
" more"
|
|
153
|
+
]
|
|
154
|
+
})
|
|
155
|
+
})]
|
|
156
|
+
})
|
|
157
|
+
})]
|
|
158
|
+
});
|
|
159
|
+
};
|
|
160
|
+
//#endregion
|
|
161
|
+
export { AgentStatus, TaskTray, agent_status_aui_exports, summaryLabel, summaryState, useTaskSummary };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ComponentProps, ReactNode } from "react";
|
|
2
|
+
declare namespace agent_status_d_exports {
|
|
3
|
+
export { AgentState, AgentStatus, StatusStep };
|
|
4
|
+
}
|
|
5
|
+
export type AgentState = "working" | "waiting" | "done" | "failed";
|
|
6
|
+
export interface StatusStep {
|
|
7
|
+
state: AgentState;
|
|
8
|
+
label: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function AgentStatus({ state, label, elapsed, trailing, className, ...props }: Omit<ComponentProps<"span">, "children" | "state" | "label" | "elapsed"> & {
|
|
11
|
+
state: AgentState;
|
|
12
|
+
label: string;
|
|
13
|
+
elapsed?: string | undefined;
|
|
14
|
+
trailing?: ReactNode | undefined;
|
|
15
|
+
}): import("react").JSX.Element;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { agent_status_d_exports };
|
|
@@ -0,0 +1,47 @@
|
|
|
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, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { CheckIcon, PauseIcon, RotateCcwIcon, XIcon } from "lucide-react";
|
|
7
|
+
//#region src/components/assistant-ui/elements/agent-status.tsx
|
|
8
|
+
var agent_status_exports = /* @__PURE__ */ __exportAll({ AgentStatus: () => AgentStatus });
|
|
9
|
+
function AgentStatus({ state, label, elapsed, trailing, className, ...props }) {
|
|
10
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
11
|
+
"data-slot": "agent-status",
|
|
12
|
+
className: cn(paper, "flex items-center gap-2.5 rounded-full py-1.5 ps-3.5 pe-1.5", className),
|
|
13
|
+
...props,
|
|
14
|
+
children: [
|
|
15
|
+
state === "done" ? /* @__PURE__ */ jsx(CheckIcon, {
|
|
16
|
+
"aria-hidden": true,
|
|
17
|
+
className: "size-3 shrink-0 text-success"
|
|
18
|
+
}) : state === "failed" ? /* @__PURE__ */ jsx(XIcon, {
|
|
19
|
+
"aria-hidden": true,
|
|
20
|
+
className: "text-destructive size-3 shrink-0"
|
|
21
|
+
}) : /* @__PURE__ */ jsx("span", {
|
|
22
|
+
"aria-hidden": true,
|
|
23
|
+
className: cn("size-1.5 shrink-0 rounded-full motion-reduce:animate-none", state === "working" ? "animate-pulse bg-info dark:bg-info" : "border-foreground/35 border")
|
|
24
|
+
}),
|
|
25
|
+
/* @__PURE__ */ jsx("span", {
|
|
26
|
+
className: "sr-only",
|
|
27
|
+
children: state
|
|
28
|
+
}),
|
|
29
|
+
/* @__PURE__ */ jsx("span", {
|
|
30
|
+
className: "fade-in blur-in-[2px] animate-in max-w-44 truncate text-xs duration-300 motion-reduce:animate-none",
|
|
31
|
+
children: label
|
|
32
|
+
}, label),
|
|
33
|
+
elapsed !== void 0 && state !== "done" && state !== "failed" && /* @__PURE__ */ jsx("span", {
|
|
34
|
+
className: cn("font-mono text-[11px] tracking-tight", "text-muted-foreground tabular-nums"),
|
|
35
|
+
children: elapsed
|
|
36
|
+
}),
|
|
37
|
+
/* @__PURE__ */ jsx("span", {
|
|
38
|
+
"aria-hidden": true,
|
|
39
|
+
"data-slot": "agent-status-trailing",
|
|
40
|
+
className: "text-muted-foreground flex size-6 items-center justify-center rounded-full",
|
|
41
|
+
children: trailing !== void 0 ? trailing : state === "done" || state === "failed" ? /* @__PURE__ */ jsx(RotateCcwIcon, { className: "size-3" }) : /* @__PURE__ */ jsx(PauseIcon, { className: "size-3" })
|
|
42
|
+
})
|
|
43
|
+
]
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
export { AgentStatus, agent_status_exports };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ComponentProps, ReactNode } from "react";
|
|
2
|
+
declare namespace approval_card_d_exports {
|
|
3
|
+
export { ApprovalCard, ApprovalState };
|
|
4
|
+
}
|
|
5
|
+
export type ApprovalState = "request" | "running" | "done" | "denied";
|
|
6
|
+
export declare function ApprovalCard({ state, command, title, subtitle, description, details, variant, icon, onAllowOnce, onAlwaysAllow, onDeny, allowOnceLabel, alwaysAllowLabel, denyLabel, statusLabel, actions, children, className, ...props }: Omit<ComponentProps<"div">, "children" | "state" | "command" | "title" | "subtitle" | "description" | "details" | "variant" | "icon" | "onAllowOnce" | "onAlwaysAllow" | "onDeny" | "allowOnceLabel" | "alwaysAllowLabel" | "denyLabel" | "statusLabel" | "actions"> & {
|
|
7
|
+
state: ApprovalState;
|
|
8
|
+
command?: string | undefined;
|
|
9
|
+
title: string;
|
|
10
|
+
subtitle: string;
|
|
11
|
+
description?: string | undefined;
|
|
12
|
+
details?: readonly {
|
|
13
|
+
label: string;
|
|
14
|
+
value: string;
|
|
15
|
+
}[] | undefined;
|
|
16
|
+
variant?: "default" | "destructive" | undefined;
|
|
17
|
+
icon?: ReactNode | undefined;
|
|
18
|
+
onAllowOnce?: (() => void) | undefined;
|
|
19
|
+
onAlwaysAllow?: (() => void) | undefined;
|
|
20
|
+
onDeny?: (() => void) | undefined;
|
|
21
|
+
allowOnceLabel?: string | undefined;
|
|
22
|
+
alwaysAllowLabel?: string | undefined;
|
|
23
|
+
denyLabel?: string | undefined;
|
|
24
|
+
statusLabel?: string | undefined;
|
|
25
|
+
/** Replaces the default request buttons (deny, always allow, allow once) while `state` is "request". */
|
|
26
|
+
actions?: ReactNode | undefined;
|
|
27
|
+
/** Extra content between the details and the actions, such as a form or an error. */
|
|
28
|
+
children?: ReactNode | undefined;
|
|
29
|
+
}): import("react").JSX.Element;
|
|
30
|
+
//#endregion
|
|
31
|
+
export { approval_card_d_exports };
|
|
@@ -0,0 +1,99 @@
|
|
|
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 { useId } from "react";
|
|
6
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { CheckIcon, Loader2Icon, TerminalIcon, XIcon } from "lucide-react";
|
|
8
|
+
//#region src/components/assistant-ui/elements/approval-card.tsx
|
|
9
|
+
var approval_card_exports = /* @__PURE__ */ __exportAll({ ApprovalCard: () => ApprovalCard });
|
|
10
|
+
const receiptText = {
|
|
11
|
+
running: "Approved, running",
|
|
12
|
+
done: "Finished",
|
|
13
|
+
denied: "Denied"
|
|
14
|
+
};
|
|
15
|
+
function ApprovalCard({ state, command, title, subtitle, description, details, variant = "default", icon, onAllowOnce, onAlwaysAllow, onDeny, allowOnceLabel = "Allow once", alwaysAllowLabel = "Always allow", denyLabel = "Deny", statusLabel, actions, children, className, ...props }) {
|
|
16
|
+
const titleId = useId();
|
|
17
|
+
const descriptionId = useId();
|
|
18
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
19
|
+
...props,
|
|
20
|
+
role: "group",
|
|
21
|
+
"data-variant": variant,
|
|
22
|
+
"data-slot": "approval-card",
|
|
23
|
+
"aria-labelledby": titleId,
|
|
24
|
+
"aria-describedby": description ? descriptionId : void 0,
|
|
25
|
+
className: cn(paper, "flex w-full max-w-sm flex-col gap-3.5 rounded-[20px] p-4", className),
|
|
26
|
+
children: [
|
|
27
|
+
/* @__PURE__ */ jsxs("div", {
|
|
28
|
+
className: "flex items-center gap-3",
|
|
29
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
30
|
+
"aria-hidden": true,
|
|
31
|
+
className: cn("flex size-9 shrink-0 items-center justify-center rounded-xl", variant === "destructive" ? "bg-destructive/10 text-destructive dark:bg-destructive/10 dark:text-destructive" : "bg-foreground/[0.05] text-muted-foreground"),
|
|
32
|
+
children: icon ?? /* @__PURE__ */ jsx(TerminalIcon, { className: "size-4" })
|
|
33
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
34
|
+
className: "flex flex-col",
|
|
35
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
36
|
+
id: titleId,
|
|
37
|
+
className: "text-[13.5px] font-medium",
|
|
38
|
+
children: title
|
|
39
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
40
|
+
className: "text-muted-foreground text-xs",
|
|
41
|
+
children: subtitle
|
|
42
|
+
})]
|
|
43
|
+
})]
|
|
44
|
+
}),
|
|
45
|
+
description ? /* @__PURE__ */ jsx("p", {
|
|
46
|
+
id: descriptionId,
|
|
47
|
+
className: "text-muted-foreground text-[13px]",
|
|
48
|
+
children: description
|
|
49
|
+
}) : null,
|
|
50
|
+
command ? /* @__PURE__ */ jsx("div", {
|
|
51
|
+
className: cn(field, "text-muted-foreground rounded-xl px-3.5 py-2.5 font-mono text-xs"),
|
|
52
|
+
children: command
|
|
53
|
+
}) : null,
|
|
54
|
+
details?.length ? /* @__PURE__ */ jsx("dl", {
|
|
55
|
+
className: cn(field, "grid grid-cols-[minmax(min-content,1fr)_minmax(0,2fr)] gap-x-4 gap-y-2 rounded-xl px-3.5 py-2.5"),
|
|
56
|
+
children: details.map((detail, index) => /* @__PURE__ */ jsxs("div", {
|
|
57
|
+
className: "col-span-2 grid grid-cols-subgrid items-baseline text-xs",
|
|
58
|
+
children: [/* @__PURE__ */ jsx("dt", {
|
|
59
|
+
className: cn(mono, "text-muted-foreground"),
|
|
60
|
+
children: detail.label
|
|
61
|
+
}), /* @__PURE__ */ jsx("dd", {
|
|
62
|
+
className: "text-foreground/80 break-words",
|
|
63
|
+
children: detail.value
|
|
64
|
+
})]
|
|
65
|
+
}, `${detail.label}-${index}`))
|
|
66
|
+
}) : null,
|
|
67
|
+
children,
|
|
68
|
+
/* @__PURE__ */ jsx("div", {
|
|
69
|
+
className: "flex min-h-8 flex-wrap items-center justify-end gap-2",
|
|
70
|
+
children: state === "request" && actions !== void 0 ? actions : state === "request" ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
71
|
+
onDeny && /* @__PURE__ */ jsx("button", {
|
|
72
|
+
type: "button",
|
|
73
|
+
onClick: onDeny,
|
|
74
|
+
className: cn("flex items-center justify-center rounded-full text-muted-foreground outline-none transition-[background-color,color,scale] duration-150 hover:bg-foreground/[0.06] hover:text-foreground/90 active:scale-[0.96] focus-visible:ring-1 focus-visible:ring-foreground/20 motion-reduce:transition-none dark:hover:bg-foreground/[0.09]", "text-muted-foreground h-8 px-3.5 text-xs font-medium whitespace-nowrap"),
|
|
75
|
+
children: denyLabel
|
|
76
|
+
}),
|
|
77
|
+
onAlwaysAllow && /* @__PURE__ */ jsx("button", {
|
|
78
|
+
type: "button",
|
|
79
|
+
onClick: onAlwaysAllow,
|
|
80
|
+
className: cn("flex items-center justify-center rounded-full text-muted-foreground outline-none transition-[background-color,color,scale] duration-150 hover:bg-foreground/[0.06] hover:text-foreground/90 active:scale-[0.96] focus-visible:ring-1 focus-visible:ring-foreground/20 motion-reduce:transition-none dark:hover:bg-foreground/[0.09]", "text-muted-foreground h-8 px-3.5 text-xs font-medium whitespace-nowrap"),
|
|
81
|
+
children: alwaysAllowLabel
|
|
82
|
+
}),
|
|
83
|
+
onAllowOnce && /* @__PURE__ */ jsx("button", {
|
|
84
|
+
type: "button",
|
|
85
|
+
onClick: onAllowOnce,
|
|
86
|
+
className: cn(variant === "destructive" ? "text-background bg-destructive transition-[background-color,scale] duration-150 hover:bg-destructive/90 active:scale-[0.96] motion-reduce:transition-none dark:bg-destructive dark:text-red-950 dark:hover:bg-destructive/90" : "bg-foreground text-background transition-[opacity,scale] duration-150 ease-[cubic-bezier(0.23,1,0.32,1)] hover:opacity-90 active:scale-[0.96] motion-reduce:transition-none", "flex h-8 items-center rounded-full px-3.5 text-xs font-medium whitespace-nowrap"),
|
|
87
|
+
children: allowOnceLabel
|
|
88
|
+
})
|
|
89
|
+
] }) : /* @__PURE__ */ jsx("div", {
|
|
90
|
+
role: "status",
|
|
91
|
+
className: "fade-in animate-in text-muted-foreground flex items-center gap-2 text-xs duration-300 motion-reduce:animate-none",
|
|
92
|
+
children: state === "running" ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Loader2Icon, { className: "text-muted-foreground size-3.5 animate-spin motion-reduce:animate-none" }), statusLabel ?? receiptText.running] }) : state === "denied" ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(XIcon, { className: "text-muted-foreground size-3.5" }), statusLabel ?? receiptText.denied] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(CheckIcon, { className: "size-3.5 text-success" }), statusLabel ?? receiptText.done] })
|
|
93
|
+
}, state)
|
|
94
|
+
})
|
|
95
|
+
]
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
//#endregion
|
|
99
|
+
export { ApprovalCard, approval_card_exports };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
declare namespace artifact_card_d_exports {
|
|
3
|
+
export { ArtifactCard };
|
|
4
|
+
}
|
|
5
|
+
export declare function ArtifactCard({ title, meta, generating, words, className, ...props }: Omit<ComponentProps<"div">, "children" | "title" | "meta" | "generating" | "words"> & {
|
|
6
|
+
title: string;
|
|
7
|
+
meta: string;
|
|
8
|
+
generating?: boolean;
|
|
9
|
+
words?: number;
|
|
10
|
+
}): import("react").JSX.Element;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { artifact_card_d_exports };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { __exportAll } from "../../../_virtual/_rolldown/runtime.js";
|
|
3
|
+
import { cn } from "../../../lib/utils.js";
|
|
4
|
+
import { ShimmerLabel, mono, paper } from "./surfaces.js";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { ArrowUpRightIcon, FileTextIcon } from "lucide-react";
|
|
7
|
+
//#region src/components/assistant-ui/elements/artifact-card.tsx
|
|
8
|
+
var artifact_card_exports = /* @__PURE__ */ __exportAll({ ArtifactCard: () => ArtifactCard });
|
|
9
|
+
function ArtifactCard({ title, meta, generating = false, words = 0, className, ...props }) {
|
|
10
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
11
|
+
"data-slot": "artifact-card",
|
|
12
|
+
className: cn(paper, "group flex w-full max-w-xs cursor-pointer items-center gap-3 rounded-[20px] p-3.5 transition-transform duration-150 hover:-translate-y-px active:scale-[0.98]", className),
|
|
13
|
+
...props,
|
|
14
|
+
children: [
|
|
15
|
+
/* @__PURE__ */ jsx("span", {
|
|
16
|
+
className: "bg-foreground/[0.05] text-muted-foreground flex size-9 shrink-0 items-center justify-center rounded-xl",
|
|
17
|
+
children: /* @__PURE__ */ jsx(FileTextIcon, { className: cn("size-4", generating && "animate-pulse motion-reduce:animate-none") })
|
|
18
|
+
}),
|
|
19
|
+
/* @__PURE__ */ jsxs("div", {
|
|
20
|
+
className: "min-w-0 flex-1",
|
|
21
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
22
|
+
className: "truncate text-[13.5px] font-medium",
|
|
23
|
+
children: title
|
|
24
|
+
}), generating ? /* @__PURE__ */ jsxs("p", {
|
|
25
|
+
className: cn(mono, "text-muted-foreground flex items-center gap-1"),
|
|
26
|
+
children: [
|
|
27
|
+
/* @__PURE__ */ jsx(ShimmerLabel, {
|
|
28
|
+
className: "relative inline-block leading-none",
|
|
29
|
+
children: "Writing"
|
|
30
|
+
}),
|
|
31
|
+
/* @__PURE__ */ jsx("span", { children: "·" }),
|
|
32
|
+
/* @__PURE__ */ jsxs("span", {
|
|
33
|
+
className: "tabular-nums",
|
|
34
|
+
children: [words, " words"]
|
|
35
|
+
})
|
|
36
|
+
]
|
|
37
|
+
}) : /* @__PURE__ */ jsx("p", {
|
|
38
|
+
className: cn(mono, "fade-in blur-in-[2px] animate-in text-muted-foreground duration-300 motion-reduce:animate-none"),
|
|
39
|
+
children: meta
|
|
40
|
+
})]
|
|
41
|
+
}),
|
|
42
|
+
/* @__PURE__ */ jsx(ArrowUpRightIcon, { className: "text-muted-foreground size-3.5 opacity-0 transition-opacity group-hover:opacity-100" })
|
|
43
|
+
]
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
export { ArtifactCard, artifact_card_exports };
|