@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,276 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { __exportAll } from "../../../_virtual/_rolldown/runtime.js";
|
|
3
|
+
import { TooltipIconButton } from "./tooltip-icon-button.js";
|
|
4
|
+
import { Thread } from "./thread.aui.js";
|
|
5
|
+
import { ThreadListItems, ThreadListRoot, ThreadListSearch } from "./thread-list.aui.js";
|
|
6
|
+
import { forwardRef, useEffect, useMemo, useRef, useState } from "react";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { BotIcon, ChevronDownIcon, HistoryIcon, PlusIcon } from "lucide-react";
|
|
9
|
+
import { Popover } from "@base-ui/react/popover";
|
|
10
|
+
import { ThreadListPrimitive, useAuiEvent, useAuiState } from "@assistant-ui/react";
|
|
11
|
+
//#region src/components/assistant-ui/elements/assistant-modal.aui.tsx
|
|
12
|
+
var assistant_modal_aui_exports = /* @__PURE__ */ __exportAll({ AssistantModal: () => AssistantModal });
|
|
13
|
+
const SIZE_STORAGE_KEY = "aui-modal-size";
|
|
14
|
+
const MIN_SIZE = {
|
|
15
|
+
width: 320,
|
|
16
|
+
height: 400
|
|
17
|
+
};
|
|
18
|
+
const VIEWPORT_INSET = {
|
|
19
|
+
width: 32,
|
|
20
|
+
height: 96
|
|
21
|
+
};
|
|
22
|
+
const RESIZE_STEP = 16;
|
|
23
|
+
const clampSize = ({ width, height }) => ({
|
|
24
|
+
width: Math.round(Math.max(MIN_SIZE.width, Math.min(width, window.innerWidth - VIEWPORT_INSET.width))),
|
|
25
|
+
height: Math.round(Math.max(MIN_SIZE.height, Math.min(height, window.innerHeight - VIEWPORT_INSET.height)))
|
|
26
|
+
});
|
|
27
|
+
const readStoredSize = () => {
|
|
28
|
+
if (typeof window === "undefined") return null;
|
|
29
|
+
try {
|
|
30
|
+
const stored = JSON.parse(window.localStorage.getItem(SIZE_STORAGE_KEY) ?? "null");
|
|
31
|
+
if (typeof stored !== "object" || stored === null) return null;
|
|
32
|
+
const { width, height } = stored;
|
|
33
|
+
if (typeof width !== "number" || typeof height !== "number") return null;
|
|
34
|
+
return clampSize({
|
|
35
|
+
width,
|
|
36
|
+
height
|
|
37
|
+
});
|
|
38
|
+
} catch {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
const storeSize = (size) => {
|
|
43
|
+
try {
|
|
44
|
+
if (size) window.localStorage.setItem(SIZE_STORAGE_KEY, JSON.stringify(size));
|
|
45
|
+
else window.localStorage.removeItem(SIZE_STORAGE_KEY);
|
|
46
|
+
} catch {}
|
|
47
|
+
};
|
|
48
|
+
const isRtl = (element) => getComputedStyle(element).direction === "rtl";
|
|
49
|
+
const useModalSize = (contentRef) => {
|
|
50
|
+
const [size, setSize] = useState(readStoredSize);
|
|
51
|
+
const dragRef = useRef(null);
|
|
52
|
+
const commitSize = (next) => {
|
|
53
|
+
setSize(next);
|
|
54
|
+
storeSize(next);
|
|
55
|
+
};
|
|
56
|
+
const sizeFromPointer = (drag, event) => clampSize({
|
|
57
|
+
width: drag.width - (event.clientX - drag.x) * drag.direction,
|
|
58
|
+
height: drag.height - (event.clientY - drag.y)
|
|
59
|
+
});
|
|
60
|
+
const takeDrag = (event) => {
|
|
61
|
+
const drag = dragRef.current;
|
|
62
|
+
if (!drag || drag.pointerId !== event.pointerId) return null;
|
|
63
|
+
dragRef.current = null;
|
|
64
|
+
return drag;
|
|
65
|
+
};
|
|
66
|
+
const reset = () => {
|
|
67
|
+
dragRef.current = null;
|
|
68
|
+
commitSize(null);
|
|
69
|
+
};
|
|
70
|
+
return {
|
|
71
|
+
size,
|
|
72
|
+
reset,
|
|
73
|
+
handleProps: {
|
|
74
|
+
onPointerDown: (event) => {
|
|
75
|
+
const content = contentRef.current;
|
|
76
|
+
if (event.button !== 0 || !content) return;
|
|
77
|
+
const rect = content.getBoundingClientRect();
|
|
78
|
+
dragRef.current = {
|
|
79
|
+
pointerId: event.pointerId,
|
|
80
|
+
x: event.clientX,
|
|
81
|
+
y: event.clientY,
|
|
82
|
+
width: rect.width,
|
|
83
|
+
height: rect.height,
|
|
84
|
+
direction: isRtl(content) ? -1 : 1,
|
|
85
|
+
last: null
|
|
86
|
+
};
|
|
87
|
+
event.currentTarget.setPointerCapture(event.pointerId);
|
|
88
|
+
event.preventDefault();
|
|
89
|
+
},
|
|
90
|
+
onPointerMove: (event) => {
|
|
91
|
+
const drag = dragRef.current;
|
|
92
|
+
if (!drag || drag.pointerId !== event.pointerId) return;
|
|
93
|
+
if (!drag.last && event.clientX === drag.x && event.clientY === drag.y) return;
|
|
94
|
+
drag.last = sizeFromPointer(drag, event);
|
|
95
|
+
setSize(drag.last);
|
|
96
|
+
},
|
|
97
|
+
onPointerUp: (event) => {
|
|
98
|
+
const drag = takeDrag(event);
|
|
99
|
+
if (!drag) return;
|
|
100
|
+
if (drag.last || event.clientX !== drag.x || event.clientY !== drag.y) commitSize(sizeFromPointer(drag, event));
|
|
101
|
+
},
|
|
102
|
+
onPointerCancel: (event) => {
|
|
103
|
+
const drag = takeDrag(event);
|
|
104
|
+
if (drag?.last) commitSize(drag.last);
|
|
105
|
+
},
|
|
106
|
+
onKeyDown: (event) => {
|
|
107
|
+
const content = contentRef.current;
|
|
108
|
+
if (!content) return;
|
|
109
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
110
|
+
event.preventDefault();
|
|
111
|
+
reset();
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
const step = event.shiftKey ? 64 : RESIZE_STEP;
|
|
115
|
+
const rtl = isRtl(content);
|
|
116
|
+
const change = {
|
|
117
|
+
ArrowUp: [0, step],
|
|
118
|
+
ArrowDown: [0, -step],
|
|
119
|
+
[rtl ? "ArrowRight" : "ArrowLeft"]: [step, 0],
|
|
120
|
+
[rtl ? "ArrowLeft" : "ArrowRight"]: [-step, 0]
|
|
121
|
+
}[event.key];
|
|
122
|
+
if (!change) return;
|
|
123
|
+
event.preventDefault();
|
|
124
|
+
const rect = content.getBoundingClientRect();
|
|
125
|
+
commitSize(clampSize({
|
|
126
|
+
width: rect.width + change[0],
|
|
127
|
+
height: rect.height + change[1]
|
|
128
|
+
}));
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
const AssistantModal = () => {
|
|
134
|
+
const [open, setOpen] = useState(false);
|
|
135
|
+
const [view, setView] = useState("thread");
|
|
136
|
+
const contentRef = useRef(null);
|
|
137
|
+
const { size, reset, handleProps } = useModalSize(contentRef);
|
|
138
|
+
const thread = useMemo(() => /* @__PURE__ */ jsx(Thread, {}), []);
|
|
139
|
+
useAuiEvent("thread.runStart", () => {
|
|
140
|
+
setView("thread");
|
|
141
|
+
setOpen(true);
|
|
142
|
+
});
|
|
143
|
+
return /* @__PURE__ */ jsxs(Popover.Root, {
|
|
144
|
+
open,
|
|
145
|
+
onOpenChange: (open, eventDetails) => {
|
|
146
|
+
if (!open && (eventDetails.reason === "outside-press" || eventDetails.reason === "focus-out")) eventDetails.cancel();
|
|
147
|
+
else {
|
|
148
|
+
if (open) setView("thread");
|
|
149
|
+
setOpen(open);
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
153
|
+
className: "aui-root aui-modal-anchor fixed end-4 bottom-4 size-11",
|
|
154
|
+
children: /* @__PURE__ */ jsx(Popover.Trigger, { render: (props, state) => /* @__PURE__ */ jsx(AssistantModalButton, {
|
|
155
|
+
...props,
|
|
156
|
+
open: state.open
|
|
157
|
+
}) })
|
|
158
|
+
}), /* @__PURE__ */ jsx(Popover.Portal, { children: /* @__PURE__ */ jsx(Popover.Positioner, {
|
|
159
|
+
side: "top",
|
|
160
|
+
align: "end",
|
|
161
|
+
sideOffset: 16,
|
|
162
|
+
positionMethod: "fixed",
|
|
163
|
+
className: "isolate z-50",
|
|
164
|
+
children: /* @__PURE__ */ jsxs(Popover.Popup, {
|
|
165
|
+
ref: contentRef,
|
|
166
|
+
style: size ?? void 0,
|
|
167
|
+
className: "group/modal aui-root aui-modal-content bg-popover text-popover-foreground data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-open:slide-in-from-bottom-2 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 data-closed:slide-out-to-bottom-2 [&[data-open]_.aui-thread-viewport-footer]:animate-in [&[data-open]_.aui-thread-viewport-footer]:fade-in-0 [&[data-open]_.aui-thread-viewport-footer]:slide-in-from-bottom-2 [&[data-open]_.aui-thread-viewport-footer]:fill-mode-backwards [&_.aui-thread-viewport-footer]:bg-popover ring-foreground/10 z-50 flex h-125 max-h-(--available-height) w-100 max-w-[calc(100vw-2rem)] origin-(--transform-origin) flex-col gap-0 overflow-clip overscroll-contain rounded-xl p-0 text-base antialiased shadow-[0_16px_48px_-24px_rgb(0_0_0/0.25)] ring-1 transition-none ease-[cubic-bezier(0.32,0.72,0,1)] outline-none data-closed:duration-200 data-open:duration-300 motion-reduce:animate-none dark:shadow-[0_16px_48px_-24px_rgb(0_0_0/0.6)] [&_.aui-thread-root]:bg-inherit motion-reduce:[&_.aui-thread-viewport-footer]:animate-none [&_[data-slot=aui\\_thread-viewport]]:[scrollbar-gutter:stable_both-edges] [&[data-open]_.aui-thread-viewport-footer]:delay-100 [&[data-open]_.aui-thread-viewport-footer]:duration-300 [&[data-open]_.aui-thread-viewport-footer]:ease-[cubic-bezier(0.32,0.72,0,1)]",
|
|
168
|
+
children: [
|
|
169
|
+
/* @__PURE__ */ jsx(AssistantModalResizeHandle, {
|
|
170
|
+
...handleProps,
|
|
171
|
+
onDoubleClick: reset
|
|
172
|
+
}),
|
|
173
|
+
/* @__PURE__ */ jsx(AssistantModalHeader, {
|
|
174
|
+
view,
|
|
175
|
+
onViewChange: setView
|
|
176
|
+
}),
|
|
177
|
+
/* @__PURE__ */ jsxs("div", {
|
|
178
|
+
className: "aui-modal-body relative min-h-0 flex-1",
|
|
179
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
180
|
+
ref: (node) => {
|
|
181
|
+
if (node) node.inert = view === "list";
|
|
182
|
+
},
|
|
183
|
+
className: "aui-modal-thread h-full",
|
|
184
|
+
children: thread
|
|
185
|
+
}), view === "list" && /* @__PURE__ */ jsx(AssistantModalThreadList, { onSelect: () => setView("thread") })]
|
|
186
|
+
})
|
|
187
|
+
]
|
|
188
|
+
})
|
|
189
|
+
}) })]
|
|
190
|
+
});
|
|
191
|
+
};
|
|
192
|
+
const AssistantModalHeader = ({ view, onViewChange }) => {
|
|
193
|
+
const title = useAuiState((s) => s.threadListItem.title);
|
|
194
|
+
const hasThreads = useAuiState((s) => s.threads.threadIds.length > 0);
|
|
195
|
+
const titleRef = useRef(null);
|
|
196
|
+
const shownViewRef = useRef(view);
|
|
197
|
+
useEffect(() => {
|
|
198
|
+
if (shownViewRef.current === view) return;
|
|
199
|
+
shownViewRef.current = view;
|
|
200
|
+
const heading = titleRef.current;
|
|
201
|
+
const active = document.activeElement;
|
|
202
|
+
if (active === document.body || active === heading?.closest("[role='dialog']")) heading?.focus();
|
|
203
|
+
}, [view]);
|
|
204
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
205
|
+
className: "aui-modal-header border-foreground/10 flex h-11 shrink-0 items-center gap-2 border-b ps-3.5 pe-2",
|
|
206
|
+
children: [/* @__PURE__ */ jsx(Popover.Title, {
|
|
207
|
+
ref: titleRef,
|
|
208
|
+
tabIndex: -1,
|
|
209
|
+
className: "aui-modal-title min-w-0 flex-1 truncate text-[13px] font-medium outline-none",
|
|
210
|
+
children: view === "list" ? "Threads" : title || "New Chat"
|
|
211
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
212
|
+
className: "flex shrink-0 items-center gap-0.5",
|
|
213
|
+
children: [/* @__PURE__ */ jsx(TooltipIconButton, {
|
|
214
|
+
tooltip: "Threads",
|
|
215
|
+
side: "bottom",
|
|
216
|
+
"aria-pressed": view === "list",
|
|
217
|
+
disabled: !hasThreads && view === "thread",
|
|
218
|
+
className: "aui-modal-threads text-muted-foreground hover:text-foreground aria-pressed:bg-muted aria-pressed:text-foreground size-7 rounded-md p-0",
|
|
219
|
+
onClick: () => onViewChange(view === "list" ? "thread" : "list"),
|
|
220
|
+
children: /* @__PURE__ */ jsx(HistoryIcon, { className: "size-3.5" })
|
|
221
|
+
}), /* @__PURE__ */ jsx(ThreadListPrimitive.New, {
|
|
222
|
+
render: /* @__PURE__ */ jsx(TooltipIconButton, {
|
|
223
|
+
tooltip: "New Thread",
|
|
224
|
+
side: "bottom",
|
|
225
|
+
className: "aui-modal-new text-muted-foreground hover:text-foreground size-7 rounded-md p-0",
|
|
226
|
+
onClick: () => onViewChange("thread")
|
|
227
|
+
}),
|
|
228
|
+
children: /* @__PURE__ */ jsx(PlusIcon, { className: "size-3.5" })
|
|
229
|
+
})]
|
|
230
|
+
})]
|
|
231
|
+
});
|
|
232
|
+
};
|
|
233
|
+
const AssistantModalThreadList = ({ onSelect }) => {
|
|
234
|
+
const [search, setSearch] = useState("");
|
|
235
|
+
const hasThreads = useAuiState((s) => s.threads.threadIds.length > 0);
|
|
236
|
+
return /* @__PURE__ */ jsxs(ThreadListRoot, {
|
|
237
|
+
className: "aui-modal-thread-list bg-popover absolute inset-0 overflow-y-auto p-2",
|
|
238
|
+
onClick: (event) => {
|
|
239
|
+
if (event.target.closest("[data-slot='aui_thread-list-item-trigger']")) onSelect();
|
|
240
|
+
},
|
|
241
|
+
children: [hasThreads && /* @__PURE__ */ jsx(ThreadListSearch, {
|
|
242
|
+
value: search,
|
|
243
|
+
onValueChange: setSearch
|
|
244
|
+
}), /* @__PURE__ */ jsx(ThreadListItems, { searchQuery: hasThreads ? search : "" })]
|
|
245
|
+
});
|
|
246
|
+
};
|
|
247
|
+
const AssistantModalResizeHandle = (props) => {
|
|
248
|
+
return /* @__PURE__ */ jsx("button", {
|
|
249
|
+
type: "button",
|
|
250
|
+
"aria-label": "Resize Assistant",
|
|
251
|
+
className: "aui-modal-resize-handle group-hover/modal:border-foreground/15 hover:border-foreground/40 focus-visible:border-ring absolute start-0 top-0 z-10 size-6 cursor-nwse-resize touch-none rounded-ss-xl border-s-2 border-t-2 border-transparent transition-colors outline-none [clip-path:polygon(0_0,100%_0,100%_6px,6px_6px,6px_100%,0_100%)] motion-reduce:transition-none rtl:cursor-nesw-resize rtl:[clip-path:polygon(0_0,100%_0,100%_100%,calc(100%_-_6px)_100%,calc(100%_-_6px)_6px,0_6px)]",
|
|
252
|
+
...props
|
|
253
|
+
});
|
|
254
|
+
};
|
|
255
|
+
const AssistantModalButton = forwardRef(({ open, ...rest }, ref) => {
|
|
256
|
+
return /* @__PURE__ */ jsxs(TooltipIconButton, {
|
|
257
|
+
variant: "ghost",
|
|
258
|
+
tooltip: open ? "Close Assistant" : "Open Assistant",
|
|
259
|
+
side: "left",
|
|
260
|
+
...rest,
|
|
261
|
+
className: "aui-modal-button bg-background text-foreground border-border/60 hover:border-border hover:bg-background size-full rounded-full border transition-[border-color,scale] duration-150 ease-out active:scale-96 motion-reduce:transition-none",
|
|
262
|
+
ref,
|
|
263
|
+
children: [/* @__PURE__ */ jsx(BotIcon, {
|
|
264
|
+
"data-open": open ? "" : void 0,
|
|
265
|
+
"data-closed": open ? void 0 : "",
|
|
266
|
+
className: "aui-modal-button-closed-icon absolute size-5 transition-[scale,opacity,filter] duration-200 ease-[cubic-bezier(0.2,0,0,1)] data-closed:scale-100 data-closed:opacity-100 data-closed:blur-[0px] data-open:scale-25 data-open:opacity-0 data-open:blur-[4px] motion-reduce:transition-none"
|
|
267
|
+
}), /* @__PURE__ */ jsx(ChevronDownIcon, {
|
|
268
|
+
"data-open": open ? "" : void 0,
|
|
269
|
+
"data-closed": open ? void 0 : "",
|
|
270
|
+
className: "aui-modal-button-open-icon absolute size-5 transition-[scale,opacity,filter] duration-200 ease-[cubic-bezier(0.2,0,0,1)] data-closed:scale-25 data-closed:opacity-0 data-closed:blur-[4px] data-open:scale-100 data-open:opacity-100 data-open:blur-[0px] motion-reduce:transition-none"
|
|
271
|
+
})]
|
|
272
|
+
});
|
|
273
|
+
});
|
|
274
|
+
AssistantModalButton.displayName = "AssistantModalButton";
|
|
275
|
+
//#endregion
|
|
276
|
+
export { AssistantModal, assistant_modal_aui_exports };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { __exportAll } from "../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from "../../ui/resizable.js";
|
|
3
|
+
import { Thread } from "./thread.aui.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/assistant-ui/elements/assistant-sidebar.aui.tsx
|
|
6
|
+
var assistant_sidebar_aui_exports = /* @__PURE__ */ __exportAll({ AssistantSidebar: () => AssistantSidebar });
|
|
7
|
+
const AssistantSidebar = ({ children }) => {
|
|
8
|
+
return /* @__PURE__ */ jsxs(ResizablePanelGroup, {
|
|
9
|
+
orientation: "horizontal",
|
|
10
|
+
children: [
|
|
11
|
+
/* @__PURE__ */ jsx(ResizablePanel, { children }),
|
|
12
|
+
/* @__PURE__ */ jsx(ResizableHandle, {}),
|
|
13
|
+
/* @__PURE__ */ jsx(ResizablePanel, { children: /* @__PURE__ */ jsx(Thread, {}) })
|
|
14
|
+
]
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
//#endregion
|
|
18
|
+
export { AssistantSidebar, assistant_sidebar_aui_exports };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
declare namespace attachment_aui_d_exports {
|
|
3
|
+
export { ComposerAddAttachment, ComposerAttachments, UserMessageAttachments };
|
|
4
|
+
}
|
|
5
|
+
export declare const UserMessageAttachments: FC;
|
|
6
|
+
export declare const ComposerAttachments: FC;
|
|
7
|
+
export declare const ComposerAddAttachment: FC;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { attachment_aui_d_exports };
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { __exportAll } from "../../../_virtual/_rolldown/runtime.js";
|
|
3
|
+
import { Avatar, AvatarFallback, AvatarImage } from "../../ui/avatar.js";
|
|
4
|
+
import { Dialog, DialogContent, DialogTitle, DialogTrigger } from "../../ui/dialog.js";
|
|
5
|
+
import { cn } from "../../../lib/utils.js";
|
|
6
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../../ui/tooltip.js";
|
|
7
|
+
import { TooltipIconButton } from "./tooltip-icon-button.js";
|
|
8
|
+
import { useAttachmentSrc } from "../../../hooks/use-attachment-src.js";
|
|
9
|
+
import { isValidElement, useState } from "react";
|
|
10
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
import { AlertCircleIcon, FileText, Loader2Icon, PlusIcon, XIcon } from "lucide-react";
|
|
12
|
+
import { AttachmentPrimitive, ComposerPrimitive, MessagePrimitive, useAui, useAuiState } from "@assistant-ui/react";
|
|
13
|
+
//#region src/components/assistant-ui/elements/attachment.aui.tsx
|
|
14
|
+
var attachment_aui_exports = /* @__PURE__ */ __exportAll({
|
|
15
|
+
ComposerAddAttachment: () => ComposerAddAttachment,
|
|
16
|
+
ComposerAttachments: () => ComposerAttachments,
|
|
17
|
+
UserMessageAttachments: () => UserMessageAttachments
|
|
18
|
+
});
|
|
19
|
+
const AttachmentPreview = ({ src }) => {
|
|
20
|
+
const [isLoaded, setIsLoaded] = useState(false);
|
|
21
|
+
return /* @__PURE__ */ jsx("img", {
|
|
22
|
+
src,
|
|
23
|
+
alt: "Attachment preview",
|
|
24
|
+
className: cn("block h-auto max-h-[80vh] w-auto max-w-full rounded-sm object-contain transition-opacity duration-300 motion-reduce:transition-none", isLoaded ? "aui-attachment-preview-image-loaded opacity-100" : "aui-attachment-preview-image-loading opacity-0"),
|
|
25
|
+
onLoad: () => setIsLoaded(true)
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
const AttachmentPreviewDialog = ({ children }) => {
|
|
29
|
+
const src = useAttachmentSrc();
|
|
30
|
+
if (!src) return children;
|
|
31
|
+
return /* @__PURE__ */ jsxs(Dialog, { children: [/* @__PURE__ */ jsx(DialogTrigger, {
|
|
32
|
+
nativeButton: false,
|
|
33
|
+
className: "aui-attachment-preview-trigger cursor-zoom-in",
|
|
34
|
+
render: isValidElement(children) ? children : /* @__PURE__ */ jsx("button", {
|
|
35
|
+
type: "button",
|
|
36
|
+
children
|
|
37
|
+
})
|
|
38
|
+
}), /* @__PURE__ */ jsxs(DialogContent, {
|
|
39
|
+
className: "aui-attachment-preview-dialog-content [&>button]:bg-foreground/60 [&>button]:hover:bg-foreground/80 [&_svg]:text-background p-2 sm:max-w-3xl [&>button]:rounded-full [&>button]:p-1 [&>button]:opacity-100 [&>button]:ring-0!",
|
|
40
|
+
children: [/* @__PURE__ */ jsx(DialogTitle, {
|
|
41
|
+
className: "aui-sr-only sr-only",
|
|
42
|
+
children: "Image Attachment Preview"
|
|
43
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
44
|
+
className: "aui-attachment-preview bg-background relative mx-auto flex max-h-[80dvh] w-full items-center justify-center overflow-hidden rounded-sm",
|
|
45
|
+
children: /* @__PURE__ */ jsx(AttachmentPreview, { src })
|
|
46
|
+
})]
|
|
47
|
+
})] });
|
|
48
|
+
};
|
|
49
|
+
const AttachmentThumb = () => {
|
|
50
|
+
const src = useAttachmentSrc();
|
|
51
|
+
return /* @__PURE__ */ jsxs(Avatar, {
|
|
52
|
+
className: "aui-attachment-tile-avatar h-full w-full rounded-none after:hidden",
|
|
53
|
+
children: [/* @__PURE__ */ jsx(AvatarImage, {
|
|
54
|
+
src,
|
|
55
|
+
alt: "Attachment preview",
|
|
56
|
+
className: "aui-attachment-tile-image rounded-none object-cover"
|
|
57
|
+
}), /* @__PURE__ */ jsx(AvatarFallback, { children: /* @__PURE__ */ jsx(FileText, { className: "aui-attachment-tile-fallback-icon text-muted-foreground/80 size-6 stroke-[1.5]" }) })]
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
const AttachmentUI = () => {
|
|
61
|
+
const isComposer = useAui().attachment.source !== "message";
|
|
62
|
+
const isImage = useAuiState((s) => s.attachment.type === "image");
|
|
63
|
+
const typeLabel = useAuiState((s) => {
|
|
64
|
+
const type = s.attachment.type;
|
|
65
|
+
switch (type) {
|
|
66
|
+
case "image": return "Image";
|
|
67
|
+
case "document": return "Document";
|
|
68
|
+
case "file": return "File";
|
|
69
|
+
default: return type;
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
const uploadState = useAuiState((s) => s.attachment.status.type === "incomplete" && s.attachment.status.reason === "error" ? "error" : s.attachment.status.type === "running" || s.optional.message?.submission !== void 0 && s.attachment.status.type !== "complete" ? "uploading" : void 0);
|
|
73
|
+
const isUploading = uploadState === "uploading";
|
|
74
|
+
const isError = uploadState === "error";
|
|
75
|
+
const errorMessage = useAuiState((s) => s.attachment.status.type === "incomplete" && s.attachment.status.reason === "error" ? s.attachment.status.message ?? "Upload failed" : void 0);
|
|
76
|
+
return /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsxs(AttachmentPrimitive.Root, {
|
|
77
|
+
className: cn("aui-attachment-root relative", isComposer && "animate-in fade-in-0 zoom-in-95 duration-200 motion-reduce:animate-none", isImage && !isComposer && "aui-attachment-root-message only:*:first:size-24"),
|
|
78
|
+
children: [/* @__PURE__ */ jsx(AttachmentPreviewDialog, { children: /* @__PURE__ */ jsxs(TooltipTrigger, {
|
|
79
|
+
render: /* @__PURE__ */ jsx("div", {
|
|
80
|
+
className: cn("aui-attachment-tile bg-muted hover:after:bg-foreground/10 focus-visible:ring-ring/50 relative size-14 cursor-pointer overflow-hidden rounded-[calc(var(--composer-radius,1rem)-var(--composer-padding,8px))] transition-transform outline-none after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:ring-1 after:ring-black/10 after:transition-colors after:ring-inset focus-visible:ring-1 active:scale-[0.96] motion-reduce:transition-none dark:after:ring-white/10", isError && "after:ring-destructive/60 dark:after:ring-destructive/60"),
|
|
81
|
+
role: "button",
|
|
82
|
+
tabIndex: 0,
|
|
83
|
+
"aria-label": `${typeLabel} attachment${isError ? ", upload failed" : isUploading ? ", uploading" : ""}`
|
|
84
|
+
}),
|
|
85
|
+
children: [
|
|
86
|
+
/* @__PURE__ */ jsx(AttachmentThumb, {}),
|
|
87
|
+
isUploading && /* @__PURE__ */ jsx("div", {
|
|
88
|
+
"aria-hidden": "true",
|
|
89
|
+
className: "aui-attachment-tile-uploading bg-background/60 animate-in fade-in-0 absolute inset-0 flex items-center justify-center backdrop-blur-[2px] motion-reduce:animate-none",
|
|
90
|
+
children: /* @__PURE__ */ jsx(Loader2Icon, { className: "text-muted-foreground size-4 animate-spin" })
|
|
91
|
+
}),
|
|
92
|
+
isError && /* @__PURE__ */ jsx("div", {
|
|
93
|
+
"aria-hidden": "true",
|
|
94
|
+
className: "aui-attachment-tile-error bg-background/70 animate-in fade-in-0 absolute inset-0 flex items-center justify-center backdrop-blur-[2px] motion-reduce:animate-none",
|
|
95
|
+
children: /* @__PURE__ */ jsx(AlertCircleIcon, { className: "text-destructive size-4" })
|
|
96
|
+
})
|
|
97
|
+
]
|
|
98
|
+
}) }), isComposer && /* @__PURE__ */ jsx(AttachmentRemove, {})]
|
|
99
|
+
}), /* @__PURE__ */ jsxs(TooltipContent, {
|
|
100
|
+
side: "top",
|
|
101
|
+
children: [/* @__PURE__ */ jsx(AttachmentPrimitive.Name, {}), errorMessage && /* @__PURE__ */ jsx("p", {
|
|
102
|
+
className: "aui-attachment-error-message",
|
|
103
|
+
children: errorMessage
|
|
104
|
+
})]
|
|
105
|
+
})] }) });
|
|
106
|
+
};
|
|
107
|
+
const AttachmentRemove = () => {
|
|
108
|
+
return /* @__PURE__ */ jsx(AttachmentPrimitive.Remove, {
|
|
109
|
+
render: /* @__PURE__ */ jsx(TooltipIconButton, {
|
|
110
|
+
tooltip: "Remove file",
|
|
111
|
+
className: "aui-attachment-tile-remove absolute end-1 top-1 size-5 rounded-full bg-black/50! text-white after:absolute after:-inset-1.5 hover:bg-black/70! hover:text-white! active:scale-[0.96] motion-reduce:transition-none",
|
|
112
|
+
side: "top"
|
|
113
|
+
}),
|
|
114
|
+
children: /* @__PURE__ */ jsx(XIcon, { className: "aui-attachment-remove-icon size-3 stroke-[2.5]" })
|
|
115
|
+
});
|
|
116
|
+
};
|
|
117
|
+
const UserMessageAttachments = () => {
|
|
118
|
+
return /* @__PURE__ */ jsx("div", {
|
|
119
|
+
className: "aui-user-message-attachments-end col-span-full col-start-1 row-start-1 flex w-full flex-row justify-end gap-2 empty:hidden",
|
|
120
|
+
children: /* @__PURE__ */ jsx(MessagePrimitive.Attachments, { children: () => /* @__PURE__ */ jsx(AttachmentUI, {}) })
|
|
121
|
+
});
|
|
122
|
+
};
|
|
123
|
+
const ComposerAttachments = () => {
|
|
124
|
+
return /* @__PURE__ */ jsx("div", {
|
|
125
|
+
className: "aui-composer-attachments flex w-full flex-row items-center gap-2 overflow-x-auto empty:hidden",
|
|
126
|
+
children: /* @__PURE__ */ jsx(ComposerPrimitive.Attachments, { children: () => /* @__PURE__ */ jsx(AttachmentUI, {}) })
|
|
127
|
+
});
|
|
128
|
+
};
|
|
129
|
+
const ComposerAddAttachment = () => {
|
|
130
|
+
return /* @__PURE__ */ jsx(ComposerPrimitive.AddAttachment, {
|
|
131
|
+
render: /* @__PURE__ */ jsx(TooltipIconButton, {
|
|
132
|
+
tooltip: "Add Attachment",
|
|
133
|
+
side: "bottom",
|
|
134
|
+
variant: "ghost",
|
|
135
|
+
size: "icon",
|
|
136
|
+
className: "aui-composer-add-attachment text-muted-foreground hover:text-foreground hover:bg-muted-foreground/15 dark:hover:bg-muted-foreground/30 size-7 rounded-full active:scale-[0.96] motion-reduce:transition-none",
|
|
137
|
+
"aria-label": "Add Attachment"
|
|
138
|
+
}),
|
|
139
|
+
children: /* @__PURE__ */ jsx(PlusIcon, { className: "aui-attachment-add-icon size-4" })
|
|
140
|
+
});
|
|
141
|
+
};
|
|
142
|
+
//#endregion
|
|
143
|
+
export { ComposerAddAttachment, ComposerAttachments, UserMessageAttachments, attachment_aui_exports };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
declare namespace background_inbox_d_exports {
|
|
3
|
+
export { BackgroundInbox, BackgroundRun, BackgroundState };
|
|
4
|
+
}
|
|
5
|
+
export type BackgroundState = "running" | "ready" | "failed";
|
|
6
|
+
export interface BackgroundRun {
|
|
7
|
+
id: string;
|
|
8
|
+
title: string;
|
|
9
|
+
state: BackgroundState;
|
|
10
|
+
elapsed: string;
|
|
11
|
+
summary?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function BackgroundInbox({ runs, onCollect, className, ...props }: Omit<ComponentProps<"div">, "children" | "runs" | "onCollect"> & {
|
|
14
|
+
runs: readonly BackgroundRun[];
|
|
15
|
+
onCollect?: (id: string) => void;
|
|
16
|
+
}): import("react").JSX.Element;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { background_inbox_d_exports };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { __exportAll } from "../../../_virtual/_rolldown/runtime.js";
|
|
3
|
+
import { cn } from "../../../lib/utils.js";
|
|
4
|
+
import { mono, paper } from "./surfaces.js";
|
|
5
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { CheckIcon, Loader2Icon, XIcon } from "lucide-react";
|
|
7
|
+
//#region src/components/assistant-ui/elements/background-inbox.tsx
|
|
8
|
+
var background_inbox_exports = /* @__PURE__ */ __exportAll({ BackgroundInbox: () => BackgroundInbox });
|
|
9
|
+
function BackgroundInbox({ runs, onCollect, className, ...props }) {
|
|
10
|
+
const ready = runs.filter((run) => run.state === "ready").length;
|
|
11
|
+
const running = runs.filter((run) => run.state === "running").length;
|
|
12
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
13
|
+
"data-slot": "background-inbox",
|
|
14
|
+
className: cn(paper, "flex w-full max-w-sm flex-col gap-1 rounded-2xl p-3", className),
|
|
15
|
+
...props,
|
|
16
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
17
|
+
className: "flex items-baseline justify-between px-1 pb-1",
|
|
18
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
19
|
+
className: "text-[13.5px] font-medium",
|
|
20
|
+
children: "Running elsewhere"
|
|
21
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
22
|
+
className: cn(mono, "tabular-nums", ready > 0 ? "text-info dark:text-info" : "text-muted-foreground"),
|
|
23
|
+
children: ready > 0 ? `${ready} ready` : `${running} in flight`
|
|
24
|
+
})]
|
|
25
|
+
}), runs.length === 0 ? /* @__PURE__ */ jsx("p", {
|
|
26
|
+
role: "status",
|
|
27
|
+
className: "text-muted-foreground px-1.5 py-3 text-center text-[13px]",
|
|
28
|
+
children: "Nothing running"
|
|
29
|
+
}) : runs.map((run) => {
|
|
30
|
+
const className = cn("flex items-center gap-2.5 rounded-xl px-1.5 py-2 text-start transition-colors", "focus-visible:ring-ring/40 outline-none focus-visible:ring-1 focus-visible:ring-inset", run.state === "running" ? "cursor-default" : onCollect ? "hover:bg-foreground/[0.04] focus-visible:bg-foreground/[0.04]" : void 0);
|
|
31
|
+
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32
|
+
/* @__PURE__ */ jsx("span", {
|
|
33
|
+
className: "flex size-3.5 shrink-0 items-center justify-center",
|
|
34
|
+
children: run.state === "running" ? /* @__PURE__ */ jsx(Loader2Icon, { className: "text-muted-foreground size-3 animate-spin motion-reduce:animate-none" }) : run.state === "failed" ? /* @__PURE__ */ jsx(XIcon, { className: "size-3 text-destructive" }) : /* @__PURE__ */ jsx(CheckIcon, { className: "size-3 text-success" })
|
|
35
|
+
}),
|
|
36
|
+
/* @__PURE__ */ jsxs("span", {
|
|
37
|
+
className: "flex min-w-0 flex-1 flex-col gap-0.5",
|
|
38
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
39
|
+
className: cn("truncate text-[13px]", run.state === "running" ? "text-muted-foreground" : "text-foreground/90"),
|
|
40
|
+
children: run.title
|
|
41
|
+
}), run.summary && /* @__PURE__ */ jsx("span", {
|
|
42
|
+
className: cn("font-mono text-[11px] tracking-tight", "text-muted-foreground truncate"),
|
|
43
|
+
children: run.summary
|
|
44
|
+
})]
|
|
45
|
+
}),
|
|
46
|
+
/* @__PURE__ */ jsx("span", {
|
|
47
|
+
className: cn(mono, "text-muted-foreground shrink-0 tabular-nums"),
|
|
48
|
+
children: run.elapsed
|
|
49
|
+
})
|
|
50
|
+
] });
|
|
51
|
+
return onCollect ? /* @__PURE__ */ jsx("button", {
|
|
52
|
+
type: "button",
|
|
53
|
+
disabled: run.state === "running",
|
|
54
|
+
onClick: () => onCollect(run.id),
|
|
55
|
+
className,
|
|
56
|
+
children: content
|
|
57
|
+
}, run.id) : /* @__PURE__ */ jsx("div", {
|
|
58
|
+
className,
|
|
59
|
+
children: content
|
|
60
|
+
}, run.id);
|
|
61
|
+
})]
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
//#endregion
|
|
65
|
+
export { BackgroundInbox, background_inbox_exports };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
declare namespace canvas_split_d_exports {
|
|
3
|
+
export { CanvasSplit, CanvasSplitBody, CanvasSplitDocument, CanvasSplitHeader, CanvasSplitLine, CanvasSplitMessage, CanvasSplitThread };
|
|
4
|
+
}
|
|
5
|
+
export declare function CanvasSplit({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
|
|
6
|
+
export declare function CanvasSplitThread({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
|
|
7
|
+
export declare function CanvasSplitMessage({ speaker, className, ...props }: ComponentProps<"div"> & {
|
|
8
|
+
speaker: "user" | "assistant";
|
|
9
|
+
}): import("react").JSX.Element;
|
|
10
|
+
export declare function CanvasSplitDocument({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
|
|
11
|
+
export declare function CanvasSplitHeader({ title, version, saved, onCopy, onClose, className, ...props }: Omit<ComponentProps<"div">, "children" | "title"> & {
|
|
12
|
+
title: string;
|
|
13
|
+
version: number;
|
|
14
|
+
saved: boolean;
|
|
15
|
+
onCopy?: () => void;
|
|
16
|
+
onClose?: () => void;
|
|
17
|
+
}): import("react").JSX.Element;
|
|
18
|
+
export declare function CanvasSplitBody({ writing, className, children, ...props }: ComponentProps<"div"> & {
|
|
19
|
+
writing?: boolean;
|
|
20
|
+
}): import("react").JSX.Element;
|
|
21
|
+
export declare function CanvasSplitLine({ heading, className, ...props }: ComponentProps<"p"> & {
|
|
22
|
+
heading?: boolean;
|
|
23
|
+
}): import("react").JSX.Element;
|
|
24
|
+
//#endregion
|
|
25
|
+
export { canvas_split_d_exports };
|