@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,15 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
declare namespace streaming_text_d_exports {
|
|
3
|
+
export { Segment, StreamingText };
|
|
4
|
+
}
|
|
5
|
+
export interface Segment {
|
|
6
|
+
text: string;
|
|
7
|
+
mono?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function StreamingText({ segments, count, streaming, className, ...props }: Omit<ComponentProps<"p">, "children" | "segments" | "count" | "streaming"> & {
|
|
10
|
+
segments: Segment[];
|
|
11
|
+
count: number;
|
|
12
|
+
streaming: boolean;
|
|
13
|
+
}): import("react").JSX.Element;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { streaming_text_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 { take } from "../utils/range.js";
|
|
5
|
+
import { useMemo } from "react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
//#region src/components/assistant-ui/elements/streaming-text.tsx
|
|
8
|
+
var streaming_text_exports = /* @__PURE__ */ __exportAll({ StreamingText: () => StreamingText });
|
|
9
|
+
function StreamingText({ segments, count, streaming, className, ...props }) {
|
|
10
|
+
const words = useMemo(() => segments.flatMap((segment) => segment.text.split(" ").map((word) => ({
|
|
11
|
+
word,
|
|
12
|
+
mono: segment.mono ?? false
|
|
13
|
+
}))), [segments]);
|
|
14
|
+
const shown = take(words, count);
|
|
15
|
+
return /* @__PURE__ */ jsxs("p", {
|
|
16
|
+
"data-slot": "streaming-text",
|
|
17
|
+
className: cn("min-h-[8.5rem] max-w-sm text-sm leading-relaxed text-pretty", className),
|
|
18
|
+
...props,
|
|
19
|
+
children: [
|
|
20
|
+
shown.map(({ word, mono: isMono }, i) => /* @__PURE__ */ jsxs("span", {
|
|
21
|
+
className: "fade-in animate-in fill-mode-both duration-500 motion-reduce:animate-none",
|
|
22
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
23
|
+
className: cn(isMono && "bg-foreground/[0.06] rounded-md px-1.5 py-0.5 font-mono text-[0.85em]"),
|
|
24
|
+
children: word
|
|
25
|
+
}), " "]
|
|
26
|
+
}, i)),
|
|
27
|
+
streaming && shown.length === 0 && /* @__PURE__ */ jsxs("span", {
|
|
28
|
+
role: "status",
|
|
29
|
+
"aria-label": "Waiting for the reply",
|
|
30
|
+
className: "inline-flex items-center gap-1 py-2 align-middle",
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ jsx("span", { className: "size-1.5 animate-pulse rounded-full bg-muted-foreground motion-reduce:animate-none" }),
|
|
33
|
+
/* @__PURE__ */ jsx("span", { className: "size-1.5 animate-pulse rounded-full bg-muted-foreground [animation-delay:-0.7s] motion-reduce:animate-none" }),
|
|
34
|
+
/* @__PURE__ */ jsx("span", { className: "size-1.5 animate-pulse rounded-full bg-muted-foreground [animation-delay:-1.4s] motion-reduce:animate-none" })
|
|
35
|
+
]
|
|
36
|
+
}),
|
|
37
|
+
streaming && shown.length > 0 && /* @__PURE__ */ jsx("span", {
|
|
38
|
+
"aria-hidden": true,
|
|
39
|
+
className: "-mb-0.5 ml-0.5 inline-block h-4 w-0.5 animate-pulse rounded-full bg-foreground motion-reduce:animate-none"
|
|
40
|
+
})
|
|
41
|
+
]
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
//#endregion
|
|
45
|
+
export { StreamingText, streaming_text_exports };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
declare namespace subagent_list_d_exports {
|
|
3
|
+
export { SubagentItem, SubagentList };
|
|
4
|
+
}
|
|
5
|
+
export interface SubagentItem {
|
|
6
|
+
name: string;
|
|
7
|
+
model: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function SubagentList({ agents, completedCount, progress, showSummary, summaryAgent, className, ...props }: Omit<ComponentProps<"div">, "children" | "agents" | "completedCount" | "progress" | "showSummary" | "summaryAgent"> & {
|
|
10
|
+
agents: readonly SubagentItem[];
|
|
11
|
+
completedCount: number;
|
|
12
|
+
progress: readonly number[];
|
|
13
|
+
showSummary: boolean;
|
|
14
|
+
summaryAgent: SubagentItem;
|
|
15
|
+
}): import("react").JSX.Element;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { subagent_list_d_exports };
|
|
@@ -0,0 +1,74 @@
|
|
|
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 } 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/subagent-list.tsx
|
|
9
|
+
var subagent_list_exports = /* @__PURE__ */ __exportAll({ SubagentList: () => SubagentList });
|
|
10
|
+
function SubagentList({ agents, completedCount, progress, showSummary, summaryAgent, className, ...props }) {
|
|
11
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
12
|
+
"data-slot": "subagent-list",
|
|
13
|
+
className: cn("flex min-h-[14.5rem] w-full max-w-xs flex-col gap-2", className),
|
|
14
|
+
...props,
|
|
15
|
+
children: [agents.map((agent, index) => {
|
|
16
|
+
const done = index < completedCount;
|
|
17
|
+
const width = progress[index] ?? 0;
|
|
18
|
+
const percentage = pct(width, 100);
|
|
19
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
20
|
+
className: cn(paper, "flex flex-col gap-2 rounded-2xl px-3.5 py-2.5"),
|
|
21
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
22
|
+
className: "flex items-center gap-2",
|
|
23
|
+
children: [
|
|
24
|
+
done ? /* @__PURE__ */ jsx(CheckIcon, { className: "fade-in zoom-in-90 animate-in size-3.5 shrink-0 text-success duration-200" }) : /* @__PURE__ */ jsx(Loader2Icon, { className: "text-muted-foreground size-3.5 shrink-0 animate-spin motion-reduce:animate-none" }),
|
|
25
|
+
/* @__PURE__ */ jsx("span", {
|
|
26
|
+
className: "flex-1 truncate text-[13.5px]",
|
|
27
|
+
children: agent.name
|
|
28
|
+
}),
|
|
29
|
+
/* @__PURE__ */ jsx("span", {
|
|
30
|
+
className: cn(mono, "text-muted-foreground"),
|
|
31
|
+
children: agent.model
|
|
32
|
+
})
|
|
33
|
+
]
|
|
34
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
35
|
+
role: "progressbar",
|
|
36
|
+
"aria-label": `${agent.name} progress`,
|
|
37
|
+
"aria-valuemin": 0,
|
|
38
|
+
"aria-valuemax": 100,
|
|
39
|
+
"aria-valuenow": percentage,
|
|
40
|
+
className: "bg-foreground/[0.06] h-[3px] w-full overflow-hidden rounded-full",
|
|
41
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
42
|
+
className: cn("block h-full rounded-full transition-[width] duration-700", done ? "bg-success/70" : "bg-foreground/60"),
|
|
43
|
+
style: { width: `${percentage}%` }
|
|
44
|
+
})
|
|
45
|
+
})]
|
|
46
|
+
}, agent.name);
|
|
47
|
+
}), showSummary && /* @__PURE__ */ jsxs("div", {
|
|
48
|
+
className: cn("bg-card border border-border shadow-sm", "fade-in slide-in-from-bottom-2 animate-in flex flex-col gap-2 rounded-2xl px-3.5 py-2.5 duration-300"),
|
|
49
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
50
|
+
className: "flex items-center gap-2",
|
|
51
|
+
children: [
|
|
52
|
+
/* @__PURE__ */ jsx(Loader2Icon, { className: "text-muted-foreground size-3.5 shrink-0 animate-spin motion-reduce:animate-none" }),
|
|
53
|
+
/* @__PURE__ */ jsx("span", {
|
|
54
|
+
className: "flex-1 truncate text-[13.5px]",
|
|
55
|
+
children: summaryAgent.name
|
|
56
|
+
}),
|
|
57
|
+
/* @__PURE__ */ jsx("span", {
|
|
58
|
+
className: cn("font-mono text-[11px] tracking-tight", "text-muted-foreground"),
|
|
59
|
+
children: summaryAgent.model
|
|
60
|
+
})
|
|
61
|
+
]
|
|
62
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
63
|
+
role: "progressbar",
|
|
64
|
+
"aria-label": `${summaryAgent.name} progress`,
|
|
65
|
+
"aria-valuemin": 0,
|
|
66
|
+
"aria-valuemax": 100,
|
|
67
|
+
className: "bg-foreground/[0.06] h-[3px] w-full overflow-hidden rounded-full",
|
|
68
|
+
children: /* @__PURE__ */ jsx("span", { className: "shimmer shimmer-bg block h-full w-full rounded-full motion-reduce:animate-none" })
|
|
69
|
+
})]
|
|
70
|
+
})]
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
//#endregion
|
|
74
|
+
export { SubagentList, subagent_list_exports };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
declare namespace suggestions_d_exports {
|
|
3
|
+
export { Suggestions, SuggestionsProps };
|
|
4
|
+
}
|
|
5
|
+
export interface SuggestionsProps extends Omit<ComponentProps<"div">, "children"> {
|
|
6
|
+
suggestions: readonly string[];
|
|
7
|
+
selectedSuggestion: string | null;
|
|
8
|
+
cycle: number;
|
|
9
|
+
onSuggestion: (suggestion: string) => void;
|
|
10
|
+
variant?: "pills" | "list";
|
|
11
|
+
}
|
|
12
|
+
export declare function Suggestions({ suggestions, selectedSuggestion, cycle, onSuggestion, variant, className, ...props }: SuggestionsProps): import("react").JSX.Element;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { suggestions_d_exports };
|
|
@@ -0,0 +1,25 @@
|
|
|
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/suggestions.tsx
|
|
7
|
+
var suggestions_exports = /* @__PURE__ */ __exportAll({ Suggestions: () => Suggestions });
|
|
8
|
+
function Suggestions({ suggestions, selectedSuggestion, cycle, onSuggestion, variant = "pills", className, ...props }) {
|
|
9
|
+
const list = variant === "list";
|
|
10
|
+
return /* @__PURE__ */ jsx("div", {
|
|
11
|
+
"data-slot": "suggestions",
|
|
12
|
+
className: cn(list ? "flex w-full max-w-sm flex-col gap-2" : "flex max-w-md flex-wrap justify-center gap-2", className),
|
|
13
|
+
...props,
|
|
14
|
+
children: suggestions.map((suggestion, index) => /* @__PURE__ */ jsx("button", {
|
|
15
|
+
type: "button",
|
|
16
|
+
"aria-pressed": selectedSuggestion === suggestion,
|
|
17
|
+
onClick: () => onSuggestion(suggestion),
|
|
18
|
+
className: cn(paper, "fade-in slide-in-from-bottom-2 animate-in fill-mode-both flex cursor-pointer items-center text-[13px] transition-transform duration-300 hover:-translate-y-px active:scale-[0.96] motion-reduce:animate-none", list ? "w-full rounded-2xl px-4 py-2.5 text-start" : "rounded-full px-4 py-2", selectedSuggestion === suggestion && "bg-foreground text-background dark:bg-foreground"),
|
|
19
|
+
style: { animationDelay: `${index * 70}ms` },
|
|
20
|
+
children: suggestion
|
|
21
|
+
}, suggestion))
|
|
22
|
+
}, cycle);
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { Suggestions, suggestions_exports };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
declare namespace surfaces_d_exports {
|
|
3
|
+
export { ShimmerLabel, SwapLabel, codeScroll, codeSurface, collapsePanel, field, fieldInteractive, floating, ghostButton, iconSwap, iconSwapIn, iconSwapOut, inkButton, labelSwap, labelSwapIn, labelSwapOut, live, mono, paper, pressable };
|
|
4
|
+
}
|
|
5
|
+
export declare const paper = "bg-card border border-border shadow-sm";
|
|
6
|
+
export declare const floating = "bg-popover border border-border shadow-lg";
|
|
7
|
+
export declare const field = "bg-muted";
|
|
8
|
+
export declare const fieldInteractive = "bg-muted transition-colors hover:bg-accent";
|
|
9
|
+
export declare const pressable = "transition-transform duration-150 ease-[cubic-bezier(0.23,1,0.32,1)] active:scale-[0.96] motion-reduce:transition-none";
|
|
10
|
+
export declare const ghostButton = "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]";
|
|
11
|
+
export declare const inkButton = "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";
|
|
12
|
+
export declare const iconSwap = "[grid-area:1/1] transition-[opacity,scale,filter] duration-200 ease-[cubic-bezier(0.2,0,0,1)] motion-reduce:transition-none";
|
|
13
|
+
export declare const iconSwapIn = "scale-100 opacity-100 blur-none";
|
|
14
|
+
export declare const iconSwapOut = "scale-[0.25] opacity-0 blur-[4px]";
|
|
15
|
+
export declare const labelSwap = "col-start-1 row-start-1 flex w-max items-center gap-1.5 leading-none transition-[opacity,filter] duration-300 ease-[cubic-bezier(0.23,1,0.32,1)] motion-reduce:transition-none";
|
|
16
|
+
export declare const labelSwapIn = "opacity-100 blur-none";
|
|
17
|
+
export declare const labelSwapOut = "pointer-events-none select-none opacity-0 blur-[2px]";
|
|
18
|
+
export declare const collapsePanel = "h-(--collapsible-panel-height) overflow-hidden transition-[height] duration-200 ease-[cubic-bezier(0.32,0.72,0,1)] data-[ending-style]:h-0 data-[starting-style]:h-0 motion-reduce:transition-none";
|
|
19
|
+
export declare const live = "text-info";
|
|
20
|
+
export declare const mono = "font-mono text-[11px] tracking-tight";
|
|
21
|
+
export declare function ShimmerLabel({ active, className, ...props }: ComponentProps<"span"> & {
|
|
22
|
+
active?: boolean;
|
|
23
|
+
}): import("react").JSX.Element;
|
|
24
|
+
/**
|
|
25
|
+
* Scroll region for content that keeps its own whitespace. `whitespace-pre` in
|
|
26
|
+
* a bounded box clips a long line with no way to reach it, so the rows scroll
|
|
27
|
+
* instead.
|
|
28
|
+
*
|
|
29
|
+
* `codeSurface` wraps all the rows as one block, and the rows are its children.
|
|
30
|
+
* It cannot go on each row: `min-width: 100%` resolves against the scroll
|
|
31
|
+
* container's visible width rather than its scroll width, so a per-row width
|
|
32
|
+
* leaves every row except the longest ending its background at the fold.
|
|
33
|
+
*/
|
|
34
|
+
export declare const codeScroll = "overflow-x-auto";
|
|
35
|
+
export declare const codeSurface = "w-max min-w-full";
|
|
36
|
+
export declare function SwapLabel({ active, children, className }: {
|
|
37
|
+
active: 0 | 1;
|
|
38
|
+
children: [React.ReactNode, React.ReactNode];
|
|
39
|
+
className?: string;
|
|
40
|
+
}): import("react").JSX.Element;
|
|
41
|
+
//#endregion
|
|
42
|
+
export { surfaces_d_exports };
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { __exportAll } from "../../../_virtual/_rolldown/runtime.js";
|
|
3
|
+
import { cn } from "../../../lib/utils.js";
|
|
4
|
+
import { useLayoutEffect, useRef, useState } from "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/assistant-ui/elements/surfaces.tsx
|
|
7
|
+
var surfaces_exports = /* @__PURE__ */ __exportAll({
|
|
8
|
+
ShimmerLabel: () => ShimmerLabel,
|
|
9
|
+
SwapLabel: () => SwapLabel,
|
|
10
|
+
codeScroll: () => codeScroll,
|
|
11
|
+
codeSurface: () => codeSurface,
|
|
12
|
+
collapsePanel: () => collapsePanel,
|
|
13
|
+
field: () => field,
|
|
14
|
+
fieldInteractive: () => fieldInteractive,
|
|
15
|
+
floating: () => floating,
|
|
16
|
+
ghostButton: () => ghostButton,
|
|
17
|
+
iconSwap: () => iconSwap,
|
|
18
|
+
iconSwapIn: () => iconSwapIn,
|
|
19
|
+
iconSwapOut: () => iconSwapOut,
|
|
20
|
+
inkButton: () => inkButton,
|
|
21
|
+
labelSwap: () => labelSwap,
|
|
22
|
+
labelSwapIn: () => labelSwapIn,
|
|
23
|
+
labelSwapOut: () => labelSwapOut,
|
|
24
|
+
live: () => live,
|
|
25
|
+
mono: () => mono,
|
|
26
|
+
paper: () => paper,
|
|
27
|
+
pressable: () => pressable
|
|
28
|
+
});
|
|
29
|
+
const paper = "bg-card border border-border shadow-sm";
|
|
30
|
+
const floating = "bg-popover border border-border shadow-lg";
|
|
31
|
+
const field = "bg-muted";
|
|
32
|
+
const fieldInteractive = "bg-muted transition-colors hover:bg-accent";
|
|
33
|
+
const pressable = "transition-transform duration-150 ease-[cubic-bezier(0.23,1,0.32,1)] active:scale-[0.96] motion-reduce:transition-none";
|
|
34
|
+
const ghostButton = "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]";
|
|
35
|
+
const inkButton = "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";
|
|
36
|
+
const iconSwap = "[grid-area:1/1] transition-[opacity,scale,filter] duration-200 ease-[cubic-bezier(0.2,0,0,1)] motion-reduce:transition-none";
|
|
37
|
+
const iconSwapIn = "scale-100 opacity-100 blur-none";
|
|
38
|
+
const iconSwapOut = "scale-[0.25] opacity-0 blur-[4px]";
|
|
39
|
+
const labelSwap = "col-start-1 row-start-1 flex w-max items-center gap-1.5 leading-none transition-[opacity,filter] duration-300 ease-[cubic-bezier(0.23,1,0.32,1)] motion-reduce:transition-none";
|
|
40
|
+
const labelSwapIn = "opacity-100 blur-none";
|
|
41
|
+
const labelSwapOut = "pointer-events-none select-none opacity-0 blur-[2px]";
|
|
42
|
+
const collapsePanel = "h-(--collapsible-panel-height) overflow-hidden transition-[height] duration-200 ease-[cubic-bezier(0.32,0.72,0,1)] data-[ending-style]:h-0 data-[starting-style]:h-0 motion-reduce:transition-none";
|
|
43
|
+
const live = "text-info";
|
|
44
|
+
const mono = "font-mono text-[11px] tracking-tight";
|
|
45
|
+
function ShimmerLabel({ active = true, className, ...props }) {
|
|
46
|
+
return /* @__PURE__ */ jsx("span", {
|
|
47
|
+
className: cn(active && "shimmer [--shimmer-color:var(--color-foreground)] dark:[--shimmer-color:initial] motion-reduce:animate-none", className),
|
|
48
|
+
...props
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Scroll region for content that keeps its own whitespace. `whitespace-pre` in
|
|
53
|
+
* a bounded box clips a long line with no way to reach it, so the rows scroll
|
|
54
|
+
* instead.
|
|
55
|
+
*
|
|
56
|
+
* `codeSurface` wraps all the rows as one block, and the rows are its children.
|
|
57
|
+
* It cannot go on each row: `min-width: 100%` resolves against the scroll
|
|
58
|
+
* container's visible width rather than its scroll width, so a per-row width
|
|
59
|
+
* leaves every row except the longest ending its background at the fold.
|
|
60
|
+
*/
|
|
61
|
+
const codeScroll = "overflow-x-auto";
|
|
62
|
+
const codeSurface = "w-max min-w-full";
|
|
63
|
+
function SwapLabel({ active, children, className }) {
|
|
64
|
+
const layers = [useRef(null), useRef(null)];
|
|
65
|
+
const [width, setWidth] = useState(null);
|
|
66
|
+
useLayoutEffect(() => {
|
|
67
|
+
const target = layers[active]?.current;
|
|
68
|
+
if (!target) return void 0;
|
|
69
|
+
const measure = () => setWidth(Math.ceil(target.getBoundingClientRect().width));
|
|
70
|
+
measure();
|
|
71
|
+
const observer = new ResizeObserver(measure);
|
|
72
|
+
observer.observe(target);
|
|
73
|
+
return () => observer.disconnect();
|
|
74
|
+
}, [active]);
|
|
75
|
+
return /* @__PURE__ */ jsx("span", {
|
|
76
|
+
style: width === null ? void 0 : { width },
|
|
77
|
+
className: cn("grid overflow-x-clip transition-[width] duration-300 ease-[cubic-bezier(0.23,1,0.32,1)] motion-reduce:transition-none", className),
|
|
78
|
+
children: children.map((layer, index) => /* @__PURE__ */ jsx("span", {
|
|
79
|
+
ref: layers[index],
|
|
80
|
+
"aria-hidden": active !== index,
|
|
81
|
+
className: cn(labelSwap, active === index ? labelSwapIn : labelSwapOut),
|
|
82
|
+
children: layer
|
|
83
|
+
}, index))
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
//#endregion
|
|
87
|
+
export { ShimmerLabel, SwapLabel, codeScroll, codeSurface, collapsePanel, field, fieldInteractive, floating, ghostButton, iconSwap, iconSwapIn, iconSwapOut, inkButton, labelSwap, labelSwapIn, labelSwapOut, live, mono, paper, pressable, surfaces_exports };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SyntaxHighlighterProps } from "@assistant-ui/react-markdown";
|
|
2
|
+
declare namespace syntax_highlighter_d_exports {
|
|
3
|
+
export { SyntaxHighlighter };
|
|
4
|
+
}
|
|
5
|
+
export declare const SyntaxHighlighter: (props: SyntaxHighlighterProps) => import("react").JSX.Element;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { syntax_highlighter_d_exports };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { __exportAll } from "../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { PrismLight } from "react-syntax-highlighter";
|
|
4
|
+
import json from "react-syntax-highlighter/dist/esm/languages/prism/json";
|
|
5
|
+
import python from "react-syntax-highlighter/dist/esm/languages/prism/python";
|
|
6
|
+
import tsx from "react-syntax-highlighter/dist/esm/languages/prism/tsx";
|
|
7
|
+
import { makePrismLightSyntaxHighlighter } from "@assistant-ui/react-syntax-highlighter";
|
|
8
|
+
import { coldarkCold, coldarkDark } from "react-syntax-highlighter/dist/cjs/styles/prism";
|
|
9
|
+
//#region src/components/assistant-ui/elements/syntax-highlighter.tsx
|
|
10
|
+
var syntax_highlighter_exports = /* @__PURE__ */ __exportAll({ SyntaxHighlighter: () => SyntaxHighlighter });
|
|
11
|
+
PrismLight.registerLanguage("js", tsx);
|
|
12
|
+
PrismLight.registerLanguage("jsx", tsx);
|
|
13
|
+
PrismLight.registerLanguage("ts", tsx);
|
|
14
|
+
PrismLight.registerLanguage("tsx", tsx);
|
|
15
|
+
PrismLight.registerLanguage("python", python);
|
|
16
|
+
PrismLight.registerLanguage("json", json);
|
|
17
|
+
const withoutPreBackground = (theme) => {
|
|
18
|
+
const { background: _background, ...pre } = theme["pre[class*=\"language-\"]"] ?? {};
|
|
19
|
+
return {
|
|
20
|
+
...theme,
|
|
21
|
+
"pre[class*=\"language-\"]": pre
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
const syntaxHighlighterCustomStyle = {
|
|
25
|
+
margin: 0,
|
|
26
|
+
width: "100%",
|
|
27
|
+
padding: "1.5rem 1rem"
|
|
28
|
+
};
|
|
29
|
+
const LightSyntaxHighlighter = makePrismLightSyntaxHighlighter({
|
|
30
|
+
style: withoutPreBackground(coldarkCold),
|
|
31
|
+
customStyle: syntaxHighlighterCustomStyle,
|
|
32
|
+
className: "dark:hidden"
|
|
33
|
+
});
|
|
34
|
+
const DarkSyntaxHighlighter = makePrismLightSyntaxHighlighter({
|
|
35
|
+
style: withoutPreBackground(coldarkDark),
|
|
36
|
+
customStyle: syntaxHighlighterCustomStyle,
|
|
37
|
+
className: "hidden dark:block"
|
|
38
|
+
});
|
|
39
|
+
const SyntaxHighlighter = (props) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(LightSyntaxHighlighter, { ...props }), /* @__PURE__ */ jsx(DarkSyntaxHighlighter, { ...props })] });
|
|
40
|
+
//#endregion
|
|
41
|
+
export { SyntaxHighlighter, syntax_highlighter_exports };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { TaskCardState } from "./task-card.js";
|
|
2
|
+
import { TASK_PAGE_SIZE } from "../utils/task.js";
|
|
3
|
+
import { FC } from "react";
|
|
4
|
+
import { MessagePrimitive, ToolCallMessagePart, ToolCallMessagePartProps, ToolCallMessagePartStatus } from "@assistant-ui/react";
|
|
5
|
+
declare namespace task_card_aui_d_exports {
|
|
6
|
+
export { TASK_PAGE_SIZE, TaskCard, TaskCardState, TaskGroup, TaskPart, isTaskPart };
|
|
7
|
+
}
|
|
8
|
+
export type TaskPart = ToolCallMessagePart & {
|
|
9
|
+
readonly status: ToolCallMessagePartStatus;
|
|
10
|
+
} & Partial<Pick<ToolCallMessagePartProps, "addResult" | "resume" | "respondToApproval">>;
|
|
11
|
+
export declare const isTaskPart: (part: {
|
|
12
|
+
readonly type: string;
|
|
13
|
+
readonly messages?: unknown;
|
|
14
|
+
}) => boolean;
|
|
15
|
+
export declare const TaskCard: FC<{
|
|
16
|
+
part: TaskPart;
|
|
17
|
+
className?: string;
|
|
18
|
+
}>;
|
|
19
|
+
export declare const TaskGroup: FC<{
|
|
20
|
+
group: MessagePrimitive.GroupedParts.GroupPart;
|
|
21
|
+
className?: string;
|
|
22
|
+
}>;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { TASK_PAGE_SIZE, type TaskCardState, task_card_aui_d_exports };
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { __exportAll } from "../../../_virtual/_rolldown/runtime.js";
|
|
3
|
+
import { cn } from "../../../lib/utils.js";
|
|
4
|
+
import { MarkdownText } from "./markdown-text.js";
|
|
5
|
+
import { ToolFallback, ToolFallbackApproval, ToolFallbackError, formatUnknownValue, offersInterruptAction } from "./tool-fallback.aui.js";
|
|
6
|
+
import { mono } from "./surfaces.js";
|
|
7
|
+
import { formatElapsed, taskLabel, taskMeta, taskStateOf, useTaskElapsed } from "../utils/task.js";
|
|
8
|
+
import { TaskCard as TaskCard$1 } from "./task-card.js";
|
|
9
|
+
import { useState } from "react";
|
|
10
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
import { MessagePrimitive, ReadonlyThreadProvider, ThreadPrimitive, useAui, useAuiState } from "@assistant-ui/react";
|
|
12
|
+
//#region src/components/assistant-ui/elements/task-card.aui.tsx
|
|
13
|
+
var task_card_aui_exports = /* @__PURE__ */ __exportAll({
|
|
14
|
+
TASK_PAGE_SIZE: () => 4,
|
|
15
|
+
TaskCard: () => TaskCard,
|
|
16
|
+
TaskGroup: () => TaskGroup,
|
|
17
|
+
isTaskPart: () => isTaskPart
|
|
18
|
+
});
|
|
19
|
+
const isTaskPart = (part) => part.type === "tool-call" && part.messages !== void 0;
|
|
20
|
+
const KEY_SEPARATOR = String.fromCharCode(31);
|
|
21
|
+
const ROLE_LABELS = {
|
|
22
|
+
user: "instruction",
|
|
23
|
+
assistant: "agent",
|
|
24
|
+
system: "system"
|
|
25
|
+
};
|
|
26
|
+
const NestedToolCall = (part) => isTaskPart(part) ? /* @__PURE__ */ jsx(TaskCard, { part }) : /* @__PURE__ */ jsx(ToolFallback, { ...part });
|
|
27
|
+
const NestedMessage = () => {
|
|
28
|
+
const role = useAuiState((s) => s.message.role);
|
|
29
|
+
return /* @__PURE__ */ jsxs(MessagePrimitive.Root, {
|
|
30
|
+
"data-slot": "aui_task-transcript-message",
|
|
31
|
+
"data-role": role,
|
|
32
|
+
className: "flex flex-col gap-1 text-xs leading-relaxed",
|
|
33
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
34
|
+
className: cn(mono, "text-muted-foreground"),
|
|
35
|
+
children: ROLE_LABELS[role]
|
|
36
|
+
}), /* @__PURE__ */ jsx(MessagePrimitive.Parts, { components: {
|
|
37
|
+
Text: MarkdownText,
|
|
38
|
+
tools: { Fallback: NestedToolCall }
|
|
39
|
+
} })]
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
const TaskTranscript = ({ messages }) => /* @__PURE__ */ jsx(ReadonlyThreadProvider, {
|
|
43
|
+
messages,
|
|
44
|
+
children: /* @__PURE__ */ jsx(ThreadPrimitive.Messages, { children: () => /* @__PURE__ */ jsx(NestedMessage, {}) })
|
|
45
|
+
});
|
|
46
|
+
const TaskResult = ({ result }) => typeof result === "string" ? /* @__PURE__ */ jsx("p", {
|
|
47
|
+
className: "m-0 whitespace-pre-wrap",
|
|
48
|
+
children: result
|
|
49
|
+
}) : /* @__PURE__ */ jsx("pre", {
|
|
50
|
+
className: "m-0 overflow-x-auto whitespace-pre-wrap",
|
|
51
|
+
children: formatUnknownValue(result, 2)
|
|
52
|
+
});
|
|
53
|
+
const TaskCard = ({ part, className }) => {
|
|
54
|
+
const elapsedMs = useTaskElapsed(part.timing, part.status.type === "running" || part.status.type === "requires-action");
|
|
55
|
+
const canAnswer = useAuiState((s) => s.thread.capabilities.answerToolCall);
|
|
56
|
+
const messages = part.messages ?? [];
|
|
57
|
+
const showError = part.status.type === "incomplete" && part.status.error !== void 0 && part.status.error !== null;
|
|
58
|
+
const result = showError || part.result !== void 0 ? /* @__PURE__ */ jsxs(Fragment$1, { children: [showError && /* @__PURE__ */ jsx(ToolFallbackError, { status: part.status }), part.result !== void 0 && /* @__PURE__ */ jsx(TaskResult, { result: part.result })] }) : void 0;
|
|
59
|
+
const approvalPending = part.approval == null || part.approval.approved === void 0 && part.approval.resolution === void 0;
|
|
60
|
+
const actions = part.status.type === "requires-action" && approvalPending && offersInterruptAction(part.status, part.approval, part.interrupt) && (canAnswer || part.approval?.prompt) ? /* @__PURE__ */ jsx(ToolFallbackApproval, {
|
|
61
|
+
status: part.status,
|
|
62
|
+
...part.approval !== void 0 && { approval: part.approval },
|
|
63
|
+
...part.interrupt !== void 0 && { interrupt: part.interrupt },
|
|
64
|
+
...part.addResult && { addResult: part.addResult },
|
|
65
|
+
...part.resume && { resume: part.resume },
|
|
66
|
+
...part.respondToApproval && { respondToApproval: part.respondToApproval }
|
|
67
|
+
}) : void 0;
|
|
68
|
+
return /* @__PURE__ */ jsx(TaskCard$1, {
|
|
69
|
+
className,
|
|
70
|
+
label: taskLabel(part.toolName, part.args),
|
|
71
|
+
meta: taskMeta(part.args),
|
|
72
|
+
state: taskStateOf(part.status, part.isError),
|
|
73
|
+
elapsed: elapsedMs === void 0 ? void 0 : formatElapsed(elapsedMs),
|
|
74
|
+
actions,
|
|
75
|
+
result,
|
|
76
|
+
children: messages.length > 0 ? /* @__PURE__ */ jsx(TaskTranscript, { messages }) : void 0
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
const TaskLane = ({ index }) => {
|
|
80
|
+
const aui = useAui();
|
|
81
|
+
const part = useAuiState((s) => s.message.parts[index]);
|
|
82
|
+
if (part?.type !== "tool-call") return null;
|
|
83
|
+
const client = aui.message.part({ toolCallId: part.toolCallId });
|
|
84
|
+
return /* @__PURE__ */ jsx(TaskCard, { part: {
|
|
85
|
+
...part,
|
|
86
|
+
addResult: client.addToolResult,
|
|
87
|
+
resume: client.resumeToolCall,
|
|
88
|
+
respondToApproval: client.respondToToolApproval
|
|
89
|
+
} });
|
|
90
|
+
};
|
|
91
|
+
const TaskGroup = ({ group, className }) => {
|
|
92
|
+
const [visible, setVisible] = useState(4);
|
|
93
|
+
const { indices, counts } = group;
|
|
94
|
+
const laneKeys = useAuiState((s) => indices.map((index) => {
|
|
95
|
+
const part = s.message.parts[index];
|
|
96
|
+
return part?.type === "tool-call" ? part.toolCallId : String(index);
|
|
97
|
+
}).join(KEY_SEPARATOR)).split(KEY_SEPARATOR);
|
|
98
|
+
const failed = useAuiState((s) => indices.reduce((count, index) => {
|
|
99
|
+
const part = s.message.parts[index];
|
|
100
|
+
return part?.type === "tool-call" && taskStateOf(part.status, part.isError) === "failed" ? count + 1 : count;
|
|
101
|
+
}, 0));
|
|
102
|
+
if (indices.length === 1) return /* @__PURE__ */ jsx(TaskLane, { index: indices[0] });
|
|
103
|
+
const shown = indices.slice(0, visible);
|
|
104
|
+
const hidden = indices.length - shown.length;
|
|
105
|
+
const summary = [
|
|
106
|
+
`${indices.length} tasks`,
|
|
107
|
+
counts.running > 0 && `${counts.running} running`,
|
|
108
|
+
counts.requiresAction > 0 && `${counts.requiresAction} waiting`,
|
|
109
|
+
failed > 0 && `${failed} failed`
|
|
110
|
+
].filter((entry) => typeof entry === "string");
|
|
111
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
112
|
+
"data-slot": "aui_task-group",
|
|
113
|
+
className: cn("flex w-full max-w-sm flex-col gap-2", className),
|
|
114
|
+
children: [
|
|
115
|
+
/* @__PURE__ */ jsx("div", {
|
|
116
|
+
"data-slot": "aui_task-group-summary",
|
|
117
|
+
className: "text-muted-foreground px-1 text-xs",
|
|
118
|
+
children: summary.join(" · ")
|
|
119
|
+
}),
|
|
120
|
+
shown.map((index, position) => /* @__PURE__ */ jsx(TaskLane, { index }, laneKeys[position] ?? index)),
|
|
121
|
+
hidden > 0 && /* @__PURE__ */ jsxs("button", {
|
|
122
|
+
type: "button",
|
|
123
|
+
"data-slot": "aui_task-group-more",
|
|
124
|
+
onClick: () => setVisible((count) => count + 4),
|
|
125
|
+
className: "text-muted-foreground hover:text-foreground w-fit px-1 text-xs transition-colors",
|
|
126
|
+
children: [
|
|
127
|
+
"Show ",
|
|
128
|
+
Math.min(hidden, 4),
|
|
129
|
+
" more"
|
|
130
|
+
]
|
|
131
|
+
})
|
|
132
|
+
]
|
|
133
|
+
});
|
|
134
|
+
};
|
|
135
|
+
//#endregion
|
|
136
|
+
export { TaskCard, TaskGroup, isTaskPart, task_card_aui_exports };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ComponentProps, ReactNode } from "react";
|
|
2
|
+
declare namespace task_card_d_exports {
|
|
3
|
+
export { TaskCard, TaskCardState, TaskStateIcon };
|
|
4
|
+
}
|
|
5
|
+
export type TaskCardState = "working" | "waiting" | "done" | "failed" | "cancelled";
|
|
6
|
+
export declare function TaskStateIcon({ state, className }: {
|
|
7
|
+
state: TaskCardState;
|
|
8
|
+
className?: string;
|
|
9
|
+
}): import("react").JSX.Element;
|
|
10
|
+
export declare function TaskCard({ label, meta, state, elapsed, actions, result, open, onOpenChange, children, className, ...props }: Omit<ComponentProps<"div">, "children" | "label" | "state" | "result" | "open" | "onOpenChange"> & {
|
|
11
|
+
label: string;
|
|
12
|
+
meta?: string | undefined;
|
|
13
|
+
state: TaskCardState;
|
|
14
|
+
elapsed?: string | undefined;
|
|
15
|
+
actions?: ReactNode | undefined;
|
|
16
|
+
result?: ReactNode | undefined;
|
|
17
|
+
open?: boolean | undefined;
|
|
18
|
+
onOpenChange?: ((open: boolean) => void) | undefined;
|
|
19
|
+
children?: ReactNode | undefined;
|
|
20
|
+
}): import("react").JSX.Element;
|
|
21
|
+
//#endregion
|
|
22
|
+
export { task_card_d_exports };
|