@dungle-scrubs/admin-ui-soft 0.0.0-stage → 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/GUIDE.md +110 -0
- package/LICENSE +21 -0
- package/README.md +36 -2
- package/THIRD-PARTY-NOTICES.md +25 -0
- package/UPSTREAM-VENDORED-CHANGES.md +317 -0
- package/VENDORED-CHANGES.md +60 -0
- package/dist/_virtual/_rolldown/runtime.js +13 -0
- package/dist/ai/compositions/agent-console/agent-console.d.ts +109 -0
- package/dist/ai/compositions/agent-console/agent-console.js +644 -0
- package/dist/ai/compositions/attention-feed/attention-feed.d.ts +127 -0
- package/dist/ai/compositions/attention-feed/attention-feed.js +626 -0
- package/dist/ai/compositions/conversation-browser/conversation-browser.d.ts +126 -0
- package/dist/ai/compositions/conversation-browser/conversation-browser.js +364 -0
- package/dist/ai/compositions/redaction-marker/redaction-marker.d.ts +42 -0
- package/dist/ai/compositions/redaction-marker/redaction-marker.js +202 -0
- package/dist/ai/compositions/run-inspector/json-view.js +164 -0
- package/dist/ai/compositions/run-inspector/run-inspector.d.ts +66 -0
- package/dist/ai/compositions/run-inspector/run-inspector.js +703 -0
- package/dist/ai/compositions/run-inspector/run-model.js +155 -0
- package/dist/ai/compositions/tool-approval/json-args.js +54 -0
- package/dist/ai/compositions/tool-approval/tool-approval.d.ts +57 -0
- package/dist/ai/compositions/tool-approval/tool-approval.js +331 -0
- package/dist/ai/compositions/tool-call-row/tool-call-row.js +74 -0
- package/dist/ai/compositions/transcript-viewer/to-thread-messages.js +65 -0
- package/dist/ai/compositions/transcript-viewer/transcript-viewer.d.ts +63 -0
- package/dist/ai/compositions/transcript-viewer/transcript-viewer.js +471 -0
- package/dist/ai/compositions/usage-meter/usage-format.js +107 -0
- package/dist/ai/compositions/usage-meter/usage-meter.d.ts +32 -0
- package/dist/ai/compositions/usage-meter/usage-meter.js +258 -0
- package/dist/ai/testing/mock-clock.d.ts +31 -0
- package/dist/ai/testing/mock-clock.js +66 -0
- package/dist/ai/testing/mock-reply.d.ts +70 -0
- package/dist/ai/testing/mock-reply.js +100 -0
- package/dist/ai/testing/mock-runtime.d.ts +86 -0
- package/dist/ai/testing/mock-runtime.js +384 -0
- package/dist/ai/types.d.ts +323 -0
- package/dist/ai.css +1088 -0
- package/dist/ai.d.ts +160 -0
- package/dist/ai.js +158 -0
- package/dist/components/assistant-ui/elements/activity-graph.d.ts +14 -0
- package/dist/components/assistant-ui/elements/activity-graph.js +69 -0
- package/dist/components/assistant-ui/elements/agent-card.d.ts +21 -0
- package/dist/components/assistant-ui/elements/agent-card.js +75 -0
- package/dist/components/assistant-ui/elements/agent-handoff.d.ts +13 -0
- package/dist/components/assistant-ui/elements/agent-handoff.js +47 -0
- package/dist/components/assistant-ui/elements/agent-plan.d.ts +16 -0
- package/dist/components/assistant-ui/elements/agent-plan.js +93 -0
- package/dist/components/assistant-ui/elements/agent-status.aui.d.ts +24 -0
- package/dist/components/assistant-ui/elements/agent-status.aui.js +161 -0
- package/dist/components/assistant-ui/elements/agent-status.d.ts +17 -0
- package/dist/components/assistant-ui/elements/agent-status.js +47 -0
- package/dist/components/assistant-ui/elements/approval-card.d.ts +31 -0
- package/dist/components/assistant-ui/elements/approval-card.js +99 -0
- package/dist/components/assistant-ui/elements/artifact-card.d.ts +12 -0
- package/dist/components/assistant-ui/elements/artifact-card.js +47 -0
- package/dist/components/assistant-ui/elements/assistant-modal.aui.d.ts +7 -0
- package/dist/components/assistant-ui/elements/assistant-modal.aui.js +276 -0
- package/dist/components/assistant-ui/elements/assistant-sidebar.aui.d.ts +7 -0
- package/dist/components/assistant-ui/elements/assistant-sidebar.aui.js +18 -0
- package/dist/components/assistant-ui/elements/attachment.aui.d.ts +9 -0
- package/dist/components/assistant-ui/elements/attachment.aui.js +143 -0
- package/dist/components/assistant-ui/elements/background-inbox.d.ts +18 -0
- package/dist/components/assistant-ui/elements/background-inbox.js +65 -0
- package/dist/components/assistant-ui/elements/canvas-split.d.ts +25 -0
- package/dist/components/assistant-ui/elements/canvas-split.js +106 -0
- package/dist/components/assistant-ui/elements/chart.d.ts +19 -0
- package/dist/components/assistant-ui/elements/chart.js +105 -0
- package/dist/components/assistant-ui/elements/chat-panel.d.ts +15 -0
- package/dist/components/assistant-ui/elements/chat-panel.js +82 -0
- package/dist/components/assistant-ui/elements/checkpoint-history.d.ts +17 -0
- package/dist/components/assistant-ui/elements/checkpoint-history.js +60 -0
- package/dist/components/assistant-ui/elements/code-diff.d.ts +18 -0
- package/dist/components/assistant-ui/elements/code-diff.js +89 -0
- package/dist/components/assistant-ui/elements/code-runner.d.ts +15 -0
- package/dist/components/assistant-ui/elements/code-runner.js +108 -0
- package/dist/components/assistant-ui/elements/command-palette.d.ts +20 -0
- package/dist/components/assistant-ui/elements/command-palette.js +129 -0
- package/dist/components/assistant-ui/elements/comparison-card.d.ts +18 -0
- package/dist/components/assistant-ui/elements/comparison-card.js +58 -0
- package/dist/components/assistant-ui/elements/composer-trigger-popover.aui.d.ts +51 -0
- package/dist/components/assistant-ui/elements/composer-trigger-popover.aui.js +104 -0
- package/dist/components/assistant-ui/elements/composer.d.ts +91 -0
- package/dist/components/assistant-ui/elements/composer.js +416 -0
- package/dist/components/assistant-ui/elements/computer-use.d.ts +19 -0
- package/dist/components/assistant-ui/elements/computer-use.js +84 -0
- package/dist/components/assistant-ui/elements/confidence-marker.d.ts +20 -0
- package/dist/components/assistant-ui/elements/confidence-marker.js +58 -0
- package/dist/components/assistant-ui/elements/connection-state.d.ts +13 -0
- package/dist/components/assistant-ui/elements/connection-state.js +59 -0
- package/dist/components/assistant-ui/elements/context-breakdown.d.ts +15 -0
- package/dist/components/assistant-ui/elements/context-breakdown.js +91 -0
- package/dist/components/assistant-ui/elements/context-display.aui.d.ts +25 -0
- package/dist/components/assistant-ui/elements/context-display.aui.js +26 -0
- package/dist/components/assistant-ui/elements/context-display.d.ts +43 -0
- package/dist/components/assistant-ui/elements/context-display.js +300 -0
- package/dist/components/assistant-ui/elements/conversation-map.aui.d.ts +9 -0
- package/dist/components/assistant-ui/elements/conversation-map.aui.js +177 -0
- package/dist/components/assistant-ui/elements/conversation-map.d.ts +19 -0
- package/dist/components/assistant-ui/elements/conversation-map.js +84 -0
- package/dist/components/assistant-ui/elements/conversation-search.d.ts +20 -0
- package/dist/components/assistant-ui/elements/conversation-search.js +75 -0
- package/dist/components/assistant-ui/elements/cost-meter.d.ts +19 -0
- package/dist/components/assistant-ui/elements/cost-meter.js +76 -0
- package/dist/components/assistant-ui/elements/data-table.d.ts +72 -0
- package/dist/components/assistant-ui/elements/data-table.js +368 -0
- package/dist/components/assistant-ui/elements/day-separator.d.ts +16 -0
- package/dist/components/assistant-ui/elements/day-separator.js +44 -0
- package/dist/components/assistant-ui/elements/diagram.d.ts +15 -0
- package/dist/components/assistant-ui/elements/diagram.js +65 -0
- package/dist/components/assistant-ui/elements/directive-text.aui.d.ts +11 -0
- package/dist/components/assistant-ui/elements/directive-text.aui.js +18 -0
- package/dist/components/assistant-ui/elements/directive-text.d.ts +32 -0
- package/dist/components/assistant-ui/elements/directive-text.js +35 -0
- package/dist/components/assistant-ui/elements/document-reference.d.ts +17 -0
- package/dist/components/assistant-ui/elements/document-reference.js +62 -0
- package/dist/components/assistant-ui/elements/draft-restore.d.ts +12 -0
- package/dist/components/assistant-ui/elements/draft-restore.js +43 -0
- package/dist/components/assistant-ui/elements/edit-message.d.ts +15 -0
- package/dist/components/assistant-ui/elements/edit-message.js +63 -0
- package/dist/components/assistant-ui/elements/elicitation-form.d.ts +23 -0
- package/dist/components/assistant-ui/elements/elicitation-form.js +112 -0
- package/dist/components/assistant-ui/elements/empty-state.d.ts +16 -0
- package/dist/components/assistant-ui/elements/empty-state.js +71 -0
- package/dist/components/assistant-ui/elements/error-state.d.ts +13 -0
- package/dist/components/assistant-ui/elements/error-state.js +52 -0
- package/dist/components/assistant-ui/elements/feedback-dialog.d.ts +15 -0
- package/dist/components/assistant-ui/elements/feedback-dialog.js +77 -0
- package/dist/components/assistant-ui/elements/file-tree.d.ts +20 -0
- package/dist/components/assistant-ui/elements/file-tree.js +74 -0
- package/dist/components/assistant-ui/elements/file.d.ts +52 -0
- package/dist/components/assistant-ui/elements/file.js +222 -0
- package/dist/components/assistant-ui/elements/flow-graph.d.ts +23 -0
- package/dist/components/assistant-ui/elements/flow-graph.js +72 -0
- package/dist/components/assistant-ui/elements/follow-up-suggestions.aui.d.ts +7 -0
- package/dist/components/assistant-ui/elements/follow-up-suggestions.aui.js +30 -0
- package/dist/components/assistant-ui/elements/generative-ui.d.ts +8 -0
- package/dist/components/assistant-ui/elements/generative-ui.js +27 -0
- package/dist/components/assistant-ui/elements/geo-map.d.ts +29 -0
- package/dist/components/assistant-ui/elements/geo-map.js +190 -0
- package/dist/components/assistant-ui/elements/guardrail-notice.d.ts +15 -0
- package/dist/components/assistant-ui/elements/guardrail-notice.js +59 -0
- package/dist/components/assistant-ui/elements/heat-graph.d.ts +9 -0
- package/dist/components/assistant-ui/elements/heat-graph.js +90 -0
- package/dist/components/assistant-ui/elements/image-gallery.d.ts +22 -0
- package/dist/components/assistant-ui/elements/image-gallery.js +192 -0
- package/dist/components/assistant-ui/elements/image-generation.d.ts +11 -0
- package/dist/components/assistant-ui/elements/image-generation.js +64 -0
- package/dist/components/assistant-ui/elements/image.d.ts +59 -0
- package/dist/components/assistant-ui/elements/image.js +416 -0
- package/dist/components/assistant-ui/elements/inline-citation.d.ts +23 -0
- package/dist/components/assistant-ui/elements/inline-citation.js +90 -0
- package/dist/components/assistant-ui/elements/job-progress.d.ts +25 -0
- package/dist/components/assistant-ui/elements/job-progress.js +102 -0
- package/dist/components/assistant-ui/elements/launcher-bubble.d.ts +15 -0
- package/dist/components/assistant-ui/elements/launcher-bubble.js +71 -0
- package/dist/components/assistant-ui/elements/link-preview.d.ts +17 -0
- package/dist/components/assistant-ui/elements/link-preview.js +77 -0
- package/dist/components/assistant-ui/elements/loading-state.d.ts +13 -0
- package/dist/components/assistant-ui/elements/loading-state.js +33 -0
- package/dist/components/assistant-ui/elements/logos.d.ts +10 -0
- package/dist/components/assistant-ui/elements/logos.js +63 -0
- package/dist/components/assistant-ui/elements/map-answer.d.ts +19 -0
- package/dist/components/assistant-ui/elements/map-answer.js +120 -0
- package/dist/components/assistant-ui/elements/markdown-text.d.ts +11 -0
- package/dist/components/assistant-ui/elements/markdown-text.js +152 -0
- package/dist/components/assistant-ui/elements/math-block.d.ts +25 -0
- package/dist/components/assistant-ui/elements/math-block.js +60 -0
- package/dist/components/assistant-ui/elements/mcp-config.aui.d.ts +28 -0
- package/dist/components/assistant-ui/elements/mcp-config.aui.js +380 -0
- package/dist/components/assistant-ui/elements/mcp-server-panel.d.ts +20 -0
- package/dist/components/assistant-ui/elements/mcp-server-panel.js +114 -0
- package/dist/components/assistant-ui/elements/media-player.d.ts +21 -0
- package/dist/components/assistant-ui/elements/media-player.js +302 -0
- package/dist/components/assistant-ui/elements/memory-chips.d.ts +16 -0
- package/dist/components/assistant-ui/elements/memory-chips.js +44 -0
- package/dist/components/assistant-ui/elements/mermaid-diagram.aui.d.ts +14 -0
- package/dist/components/assistant-ui/elements/mermaid-diagram.aui.js +43 -0
- package/dist/components/assistant-ui/elements/mermaid-diagram.d.ts +20 -0
- package/dist/components/assistant-ui/elements/mermaid-diagram.js +258 -0
- package/dist/components/assistant-ui/elements/message-actions.d.ts +17 -0
- package/dist/components/assistant-ui/elements/message-actions.js +57 -0
- package/dist/components/assistant-ui/elements/message-attachment.d.ts +18 -0
- package/dist/components/assistant-ui/elements/message-attachment.js +58 -0
- package/dist/components/assistant-ui/elements/message-branches.d.ts +12 -0
- package/dist/components/assistant-ui/elements/message-branches.js +55 -0
- package/dist/components/assistant-ui/elements/message-pair.d.ts +16 -0
- package/dist/components/assistant-ui/elements/message-pair.js +63 -0
- package/dist/components/assistant-ui/elements/message-queue.d.ts +15 -0
- package/dist/components/assistant-ui/elements/message-queue.js +70 -0
- package/dist/components/assistant-ui/elements/message-timing.aui.d.ts +30 -0
- package/dist/components/assistant-ui/elements/message-timing.aui.js +98 -0
- package/dist/components/assistant-ui/elements/message-timing.d.ts +14 -0
- package/dist/components/assistant-ui/elements/message-timing.js +26 -0
- package/dist/components/assistant-ui/elements/mobile-composer.d.ts +18 -0
- package/dist/components/assistant-ui/elements/mobile-composer.js +76 -0
- package/dist/components/assistant-ui/elements/model-picker.d.ts +19 -0
- package/dist/components/assistant-ui/elements/model-picker.js +68 -0
- package/dist/components/assistant-ui/elements/model-selector.aui.d.ts +23 -0
- package/dist/components/assistant-ui/elements/model-selector.aui.js +79 -0
- package/dist/components/assistant-ui/elements/model-selector.d.ts +130 -0
- package/dist/components/assistant-ui/elements/model-selector.js +399 -0
- package/dist/components/assistant-ui/elements/number-ticker.d.ts +10 -0
- package/dist/components/assistant-ui/elements/number-ticker.js +41 -0
- package/dist/components/assistant-ui/elements/onboarding.d.ts +17 -0
- package/dist/components/assistant-ui/elements/onboarding.js +69 -0
- package/dist/components/assistant-ui/elements/option-list.d.ts +39 -0
- package/dist/components/assistant-ui/elements/option-list.js +176 -0
- package/dist/components/assistant-ui/elements/permission-grant.d.ts +14 -0
- package/dist/components/assistant-ui/elements/permission-grant.js +84 -0
- package/dist/components/assistant-ui/elements/prompt-library.d.ts +20 -0
- package/dist/components/assistant-ui/elements/prompt-library.js +121 -0
- package/dist/components/assistant-ui/elements/question-flow.d.ts +24 -0
- package/dist/components/assistant-ui/elements/question-flow.js +180 -0
- package/dist/components/assistant-ui/elements/quota-banner.d.ts +14 -0
- package/dist/components/assistant-ui/elements/quota-banner.js +68 -0
- package/dist/components/assistant-ui/elements/quote-reply.d.ts +20 -0
- package/dist/components/assistant-ui/elements/quote-reply.js +66 -0
- package/dist/components/assistant-ui/elements/quote.aui.d.ts +61 -0
- package/dist/components/assistant-ui/elements/quote.aui.js +170 -0
- package/dist/components/assistant-ui/elements/read-aloud.d.ts +16 -0
- package/dist/components/assistant-ui/elements/read-aloud.js +66 -0
- package/dist/components/assistant-ui/elements/reasoning-effort.d.ts +17 -0
- package/dist/components/assistant-ui/elements/reasoning-effort.js +67 -0
- package/dist/components/assistant-ui/elements/reasoning-panel.d.ts +20 -0
- package/dist/components/assistant-ui/elements/reasoning-panel.js +60 -0
- package/dist/components/assistant-ui/elements/reasoning.aui.d.ts +24 -0
- package/dist/components/assistant-ui/elements/reasoning.aui.js +70 -0
- package/dist/components/assistant-ui/elements/reasoning.d.ts +38 -0
- package/dist/components/assistant-ui/elements/reasoning.js +194 -0
- package/dist/components/assistant-ui/elements/recommendation-card.d.ts +16 -0
- package/dist/components/assistant-ui/elements/recommendation-card.js +65 -0
- package/dist/components/assistant-ui/elements/regenerate-menu.d.ts +18 -0
- package/dist/components/assistant-ui/elements/regenerate-menu.js +46 -0
- package/dist/components/assistant-ui/elements/research-report.d.ts +19 -0
- package/dist/components/assistant-ui/elements/research-report.js +63 -0
- package/dist/components/assistant-ui/elements/retrieval-chunks.d.ts +19 -0
- package/dist/components/assistant-ui/elements/retrieval-chunks.js +86 -0
- package/dist/components/assistant-ui/elements/reviewable-diff.d.ts +21 -0
- package/dist/components/assistant-ui/elements/reviewable-diff.js +104 -0
- package/dist/components/assistant-ui/elements/schedule-card.d.ts +19 -0
- package/dist/components/assistant-ui/elements/schedule-card.js +80 -0
- package/dist/components/assistant-ui/elements/score-breakdown.d.ts +19 -0
- package/dist/components/assistant-ui/elements/score-breakdown.js +107 -0
- package/dist/components/assistant-ui/elements/scroll-anchor.d.ts +15 -0
- package/dist/components/assistant-ui/elements/scroll-anchor.js +104 -0
- package/dist/components/assistant-ui/elements/settings-panel.d.ts +23 -0
- package/dist/components/assistant-ui/elements/settings-panel.js +108 -0
- package/dist/components/assistant-ui/elements/shared-conversation.d.ts +18 -0
- package/dist/components/assistant-ui/elements/shared-conversation.js +56 -0
- package/dist/components/assistant-ui/elements/shiki-highlighter.aui.d.ts +29 -0
- package/dist/components/assistant-ui/elements/shiki-highlighter.aui.js +31 -0
- package/dist/components/assistant-ui/elements/shiki-highlighter.d.ts +26 -0
- package/dist/components/assistant-ui/elements/shiki-highlighter.js +49 -0
- package/dist/components/assistant-ui/elements/sources.aui.d.ts +24 -0
- package/dist/components/assistant-ui/elements/sources.aui.js +121 -0
- package/dist/components/assistant-ui/elements/sources.d.ts +21 -0
- package/dist/components/assistant-ui/elements/sources.js +109 -0
- package/dist/components/assistant-ui/elements/speaker-identity.d.ts +17 -0
- package/dist/components/assistant-ui/elements/speaker-identity.js +45 -0
- package/dist/components/assistant-ui/elements/spec-sheet.d.ts +17 -0
- package/dist/components/assistant-ui/elements/spec-sheet.js +39 -0
- package/dist/components/assistant-ui/elements/stopped-run.d.ts +12 -0
- package/dist/components/assistant-ui/elements/stopped-run.js +44 -0
- package/dist/components/assistant-ui/elements/streaming-text.d.ts +15 -0
- package/dist/components/assistant-ui/elements/streaming-text.js +45 -0
- package/dist/components/assistant-ui/elements/subagent-list.d.ts +17 -0
- package/dist/components/assistant-ui/elements/subagent-list.js +74 -0
- package/dist/components/assistant-ui/elements/suggestions.d.ts +14 -0
- package/dist/components/assistant-ui/elements/suggestions.js +25 -0
- package/dist/components/assistant-ui/elements/surfaces.d.ts +42 -0
- package/dist/components/assistant-ui/elements/surfaces.js +87 -0
- package/dist/components/assistant-ui/elements/syntax-highlighter.d.ts +7 -0
- package/dist/components/assistant-ui/elements/syntax-highlighter.js +41 -0
- package/dist/components/assistant-ui/elements/task-card.aui.d.ts +24 -0
- package/dist/components/assistant-ui/elements/task-card.aui.js +136 -0
- package/dist/components/assistant-ui/elements/task-card.d.ts +22 -0
- package/dist/components/assistant-ui/elements/task-card.js +104 -0
- package/dist/components/assistant-ui/elements/terminal-block.d.ts +27 -0
- package/dist/components/assistant-ui/elements/terminal-block.js +266 -0
- package/dist/components/assistant-ui/elements/thinking-indicator.d.ts +10 -0
- package/dist/components/assistant-ui/elements/thinking-indicator.js +30 -0
- package/dist/components/assistant-ui/elements/thread-list.aui.d.ts +39 -0
- package/dist/components/assistant-ui/elements/thread-list.aui.js +331 -0
- package/dist/components/assistant-ui/elements/thread-list.d.ts +19 -0
- package/dist/components/assistant-ui/elements/thread-list.js +72 -0
- package/dist/components/assistant-ui/elements/thread-search.d.ts +20 -0
- package/dist/components/assistant-ui/elements/thread-search.js +94 -0
- package/dist/components/assistant-ui/elements/thread.aui.d.ts +36 -0
- package/dist/components/assistant-ui/elements/thread.aui.js +625 -0
- package/dist/components/assistant-ui/elements/threadlist-sidebar.aui.d.ts +19 -0
- package/dist/components/assistant-ui/elements/threadlist-sidebar.aui.js +75 -0
- package/dist/components/assistant-ui/elements/timeline.d.ts +18 -0
- package/dist/components/assistant-ui/elements/timeline.js +40 -0
- package/dist/components/assistant-ui/elements/todo-list.d.ts +21 -0
- package/dist/components/assistant-ui/elements/todo-list.js +100 -0
- package/dist/components/assistant-ui/elements/tool-call.d.ts +17 -0
- package/dist/components/assistant-ui/elements/tool-call.js +70 -0
- package/dist/components/assistant-ui/elements/tool-error.d.ts +16 -0
- package/dist/components/assistant-ui/elements/tool-error.js +62 -0
- package/dist/components/assistant-ui/elements/tool-fallback.aui.d.ts +44 -0
- package/dist/components/assistant-ui/elements/tool-fallback.aui.js +542 -0
- package/dist/components/assistant-ui/elements/tool-group.aui.d.ts +37 -0
- package/dist/components/assistant-ui/elements/tool-group.aui.js +104 -0
- package/dist/components/assistant-ui/elements/tool-group.d.ts +20 -0
- package/dist/components/assistant-ui/elements/tool-group.js +71 -0
- package/dist/components/assistant-ui/elements/tool-timeline.d.ts +44 -0
- package/dist/components/assistant-ui/elements/tool-timeline.js +109 -0
- package/dist/components/assistant-ui/elements/tooltip-icon-button.d.ts +12 -0
- package/dist/components/assistant-ui/elements/tooltip-icon-button.js +30 -0
- package/dist/components/assistant-ui/elements/trace-waterfall.d.ts +33 -0
- package/dist/components/assistant-ui/elements/trace-waterfall.js +102 -0
- package/dist/components/assistant-ui/elements/typing-indicator.d.ts +9 -0
- package/dist/components/assistant-ui/elements/typing-indicator.js +45 -0
- package/dist/components/assistant-ui/elements/voice-conversation.aui.d.ts +11 -0
- package/dist/components/assistant-ui/elements/voice-conversation.aui.js +54 -0
- package/dist/components/assistant-ui/elements/voice-conversation.d.ts +21 -0
- package/dist/components/assistant-ui/elements/voice-conversation.js +110 -0
- package/dist/components/assistant-ui/elements/voice.aui.d.ts +22 -0
- package/dist/components/assistant-ui/elements/voice.aui.js +100 -0
- package/dist/components/assistant-ui/elements/voice.d.ts +15 -0
- package/dist/components/assistant-ui/elements/voice.js +400 -0
- package/dist/components/assistant-ui/elements/web-preview.d.ts +18 -0
- package/dist/components/assistant-ui/elements/web-preview.js +61 -0
- package/dist/components/assistant-ui/elements/web-search.d.ts +17 -0
- package/dist/components/assistant-ui/elements/web-search.js +54 -0
- package/dist/components/assistant-ui/utils/href.d.ts +13 -0
- package/dist/components/assistant-ui/utils/href.js +39 -0
- package/dist/components/assistant-ui/utils/range.d.ts +22 -0
- package/dist/components/assistant-ui/utils/range.js +48 -0
- package/dist/components/assistant-ui/utils/task.d.ts +14 -0
- package/dist/components/assistant-ui/utils/task.js +75 -0
- package/dist/components/icons/github.js +13 -0
- package/dist/components/theme-provider.d.ts +16 -0
- package/dist/components/theme-provider.js +116 -0
- package/dist/components/ui/accordion.d.ts +8 -0
- package/dist/components/ui/accordion.js +53 -0
- package/dist/components/ui/alert-dialog.d.ts +20 -0
- package/dist/components/ui/alert-dialog.js +93 -0
- package/dist/components/ui/alert.d.ts +12 -0
- package/dist/components/ui/alert.js +42 -0
- package/dist/components/ui/aspect-ratio.d.ts +6 -0
- package/dist/components/ui/aspect-ratio.js +13 -0
- package/dist/components/ui/attachment.d.ts +25 -0
- package/dist/components/ui/attachment.js +103 -0
- package/dist/components/ui/avatar.d.ts +13 -0
- package/dist/components/ui/avatar.js +50 -0
- package/dist/components/ui/badge.d.ts +14 -0
- package/dist/components/ui/badge.js +30 -0
- package/dist/components/ui/breadcrumb.d.ts +12 -0
- package/dist/components/ui/breadcrumb.js +71 -0
- package/dist/components/ui/bubble.d.ts +18 -0
- package/dist/components/ui/bubble.js +72 -0
- package/dist/components/ui/button-group.d.ts +12 -0
- package/dist/components/ui/button-group.js +41 -0
- package/dist/components/ui/button.d.ts +19 -0
- package/dist/components/ui/button.js +71 -0
- package/dist/components/ui/calendar.d.ts +12 -0
- package/dist/components/ui/calendar.js +108 -0
- package/dist/components/ui/card.d.ts +13 -0
- package/dist/components/ui/card.js +55 -0
- package/dist/components/ui/carousel.d.ts +30 -0
- package/dist/components/ui/carousel.js +131 -0
- package/dist/components/ui/chart.d.ts +46 -0
- package/dist/components/ui/chart.js +148 -0
- package/dist/components/ui/checkbox.d.ts +5 -0
- package/dist/components/ui/checkbox.js +20 -0
- package/dist/components/ui/collapsible.d.ts +7 -0
- package/dist/components/ui/collapsible.js +23 -0
- package/dist/components/ui/combobox.d.ts +26 -0
- package/dist/components/ui/combobox.js +161 -0
- package/dist/components/ui/command.d.ts +21 -0
- package/dist/components/ui/command.js +87 -0
- package/dist/components/ui/context-menu.d.ts +31 -0
- package/dist/components/ui/context-menu.js +132 -0
- package/dist/components/ui/dialog.d.ts +19 -0
- package/dist/components/ui/dialog.js +91 -0
- package/dist/components/ui/diff-viewer.d.ts +100 -0
- package/dist/components/ui/diff-viewer.js +461 -0
- package/dist/components/ui/direction.d.ts +2 -0
- package/dist/components/ui/direction.js +2 -0
- package/dist/components/ui/dot-matrix.d.ts +150 -0
- package/dist/components/ui/dot-matrix.js +248 -0
- package/dist/components/ui/drawer.d.ts +18 -0
- package/dist/components/ui/drawer.js +123 -0
- package/dist/components/ui/dropdown-menu.d.ts +31 -0
- package/dist/components/ui/dropdown-menu.js +136 -0
- package/dist/components/ui/empty.d.ts +13 -0
- package/dist/components/ui/empty.js +59 -0
- package/dist/components/ui/field.d.ts +26 -0
- package/dist/components/ui/field.js +109 -0
- package/dist/components/ui/hover-card.d.ts +7 -0
- package/dist/components/ui/hover-card.js +36 -0
- package/dist/components/ui/input-group.d.ts +20 -0
- package/dist/components/ui/input-group.js +77 -0
- package/dist/components/ui/input-otp.d.ts +13 -0
- package/dist/components/ui/input-otp.js +46 -0
- package/dist/components/ui/input.d.ts +5 -0
- package/dist/components/ui/input.js +14 -0
- package/dist/components/ui/item.d.ts +24 -0
- package/dist/components/ui/item.js +120 -0
- package/dist/components/ui/kbd.d.ts +5 -0
- package/dist/components/ui/kbd.js +19 -0
- package/dist/components/ui/label.d.ts +5 -0
- package/dist/components/ui/label.js +12 -0
- package/dist/components/ui/marker.d.ts +12 -0
- package/dist/components/ui/marker.js +42 -0
- package/dist/components/ui/menubar.d.ts +31 -0
- package/dist/components/ui/menubar.js +135 -0
- package/dist/components/ui/message-scroller.d.ts +12 -0
- package/dist/components/ui/message-scroller.js +59 -0
- package/dist/components/ui/message.d.ts +12 -0
- package/dist/components/ui/message.js +48 -0
- package/dist/components/ui/native-select.d.ts +10 -0
- package/dist/components/ui/native-select.js +37 -0
- package/dist/components/ui/navigation-menu.d.ts +13 -0
- package/dist/components/ui/navigation-menu.js +82 -0
- package/dist/components/ui/number-roll.d.ts +21 -0
- package/dist/components/ui/number-roll.js +269 -0
- package/dist/components/ui/pagination.d.ts +19 -0
- package/dist/components/ui/pagination.js +79 -0
- package/dist/components/ui/popover.d.ts +11 -0
- package/dist/components/ui/popover.js +54 -0
- package/dist/components/ui/progress.d.ts +9 -0
- package/dist/components/ui/progress.js +44 -0
- package/dist/components/ui/questionnaire.d.ts +21 -0
- package/dist/components/ui/questionnaire.js +169 -0
- package/dist/components/ui/radio-group.d.ts +7 -0
- package/dist/components/ui/radio-group.js +26 -0
- package/dist/components/ui/resizable.d.ts +9 -0
- package/dist/components/ui/resizable.js +28 -0
- package/dist/components/ui/scroll-area.d.ts +6 -0
- package/dist/components/ui/scroll-area.js +35 -0
- package/dist/components/ui/select.d.ts +17 -0
- package/dist/components/ui/select.js +96 -0
- package/dist/components/ui/separator.d.ts +5 -0
- package/dist/components/ui/separator.js +14 -0
- package/dist/components/ui/sheet.d.ts +16 -0
- package/dist/components/ui/sheet.js +87 -0
- package/dist/components/ui/sidebar.d.ts +65 -0
- package/dist/components/ui/sidebar.js +386 -0
- package/dist/components/ui/skeleton.d.ts +4 -0
- package/dist/components/ui/skeleton.js +12 -0
- package/dist/components/ui/slider.d.ts +5 -0
- package/dist/components/ui/slider.js +33 -0
- package/dist/components/ui/spinner.d.ts +4 -0
- package/dist/components/ui/spinner.js +15 -0
- package/dist/components/ui/switch.d.ts +7 -0
- package/dist/components/ui/switch.js +19 -0
- package/dist/components/ui/table.d.ts +12 -0
- package/dist/components/ui/table.js +65 -0
- package/dist/components/ui/tabs.d.ts +12 -0
- package/dist/components/ui/tabs.js +45 -0
- package/dist/components/ui/textarea.d.ts +5 -0
- package/dist/components/ui/textarea.js +12 -0
- package/dist/components/ui/toast.d.ts +18 -0
- package/dist/components/ui/toast.js +121 -0
- package/dist/components/ui/toggle-group.d.ts +13 -0
- package/dist/components/ui/toggle-group.js +51 -0
- package/dist/components/ui/toggle.d.ts +10 -0
- package/dist/components/ui/toggle.js +35 -0
- package/dist/components/ui/tooltip.d.ts +8 -0
- package/dist/components/ui/tooltip.js +43 -0
- package/dist/compositions/app-rail/app-rail.d.ts +19 -0
- package/dist/compositions/app-rail/app-rail.js +58 -0
- package/dist/compositions/app-shell/app-shell.d.ts +56 -0
- package/dist/compositions/app-shell/app-shell.js +143 -0
- package/dist/compositions/app-shell/theme-toggle.d.ts +10 -0
- package/dist/compositions/app-shell/theme-toggle.js +65 -0
- package/dist/compositions/confirm-action/confirm-action.d.ts +48 -0
- package/dist/compositions/confirm-action/confirm-action.js +48 -0
- package/dist/compositions/data-table/data-table-state.d.ts +23 -0
- package/dist/compositions/data-table/data-table-state.js +46 -0
- package/dist/compositions/data-table/data-table.d.ts +185 -0
- package/dist/compositions/data-table/data-table.js +615 -0
- package/dist/compositions/date-range-picker/date-range-options.d.ts +28 -0
- package/dist/compositions/date-range-picker/date-range-options.js +61 -0
- package/dist/compositions/date-range-picker/date-range-picker.d.ts +55 -0
- package/dist/compositions/date-range-picker/date-range-picker.js +409 -0
- package/dist/compositions/decision-queue/decision-queue.d.ts +114 -0
- package/dist/compositions/decision-queue/decision-queue.js +478 -0
- package/dist/compositions/event-feed/event-feed.d.ts +59 -0
- package/dist/compositions/event-feed/event-feed.js +105 -0
- package/dist/compositions/feedback.d.ts +20 -0
- package/dist/compositions/feedback.js +49 -0
- package/dist/compositions/fields.d.ts +64 -0
- package/dist/compositions/fields.js +293 -0
- package/dist/compositions/form-kit/form-context.d.ts +10 -0
- package/dist/compositions/form-kit/form-context.js +12 -0
- package/dist/compositions/form-kit/form-fields.d.ts +95 -0
- package/dist/compositions/form-kit/form-fields.js +233 -0
- package/dist/compositions/form-kit/form-kit.d.ts +128 -0
- package/dist/compositions/form-kit/form-kit.js +119 -0
- package/dist/compositions/inspector/inspector.d.ts +53 -0
- package/dist/compositions/inspector/inspector.js +80 -0
- package/dist/compositions/layout.d.ts +36 -0
- package/dist/compositions/layout.js +86 -0
- package/dist/compositions/state-blocks/state-blocks.d.ts +42 -0
- package/dist/compositions/state-blocks/state-blocks.js +81 -0
- package/dist/compositions/status-panel/status-panel.d.ts +94 -0
- package/dist/compositions/status-panel/status-panel.js +189 -0
- package/dist/fonts/InterVariable.woff2 +0 -0
- package/dist/fonts/inter.css +15 -0
- package/dist/hooks/use-attachment-src.js +35 -0
- package/dist/hooks/use-copy-to-clipboard.js +34 -0
- package/dist/hooks/use-mobile.d.ts +3 -0
- package/dist/hooks/use-mobile.js +18 -0
- package/dist/index.d.ts +102 -0
- package/dist/index.js +102 -0
- package/dist/lib/context-level.js +7 -0
- package/dist/lib/elapsed.js +61 -0
- package/dist/lib/iso-date.js +30 -0
- package/dist/lib/motion-loop.js +41 -0
- package/dist/lib/pointer.js +14 -0
- package/dist/lib/status-tone.d.ts +7 -0
- package/dist/lib/status-tone.js +55 -0
- package/dist/lib/triage-keys.js +229 -0
- package/dist/lib/utils.js +2 -0
- package/dist/motion/alert-toast/alert-toast.d.ts +51 -0
- package/dist/motion/alert-toast/alert-toast.js +226 -0
- package/dist/motion/branch-menu/branch-menu.d.ts +47 -0
- package/dist/motion/branch-menu/branch-menu.js +287 -0
- package/dist/motion/check-item/check-item.d.ts +24 -0
- package/dist/motion/check-item/check-item.js +110 -0
- package/dist/motion/dial/dial.d.ts +39 -0
- package/dist/motion/dial/dial.js +290 -0
- package/dist/motion/dictation-button/dictation-button.d.ts +45 -0
- package/dist/motion/dictation-button/dictation-button.js +232 -0
- package/dist/motion/hold-button/hold-button.d.ts +37 -0
- package/dist/motion/hold-button/hold-button.js +192 -0
- package/dist/motion/masonry-grid/masonry-grid.d.ts +42 -0
- package/dist/motion/masonry-grid/masonry-grid.js +145 -0
- package/dist/motion/prompt-composer/prompt-composer.d.ts +90 -0
- package/dist/motion/prompt-composer/prompt-composer.js +374 -0
- package/dist/motion/scrub-select/scrub-select.d.ts +33 -0
- package/dist/motion/scrub-select/scrub-select.js +346 -0
- package/dist/motion/spotlight-grid/spotlight-grid.d.ts +40 -0
- package/dist/motion/spotlight-grid/spotlight-grid.js +171 -0
- package/dist/motion/star-rating/star-rating.d.ts +32 -0
- package/dist/motion/star-rating/star-rating.js +191 -0
- package/dist/motion/status-glyph/status-glyph.d.ts +28 -0
- package/dist/motion/status-glyph/status-glyph.js +171 -0
- package/dist/motion/stepper/stepper.d.ts +56 -0
- package/dist/motion/stepper/stepper.js +211 -0
- package/dist/motion/swipe-row/swipe-row.d.ts +52 -0
- package/dist/motion/swipe-row/swipe-row.js +208 -0
- package/dist/motion/thinking-trace/thinking-trace.d.ts +32 -0
- package/dist/motion/thinking-trace/thinking-trace.js +186 -0
- package/dist/motion/tool-call-chip/tool-call-chip.d.ts +36 -0
- package/dist/motion/tool-call-chip/tool-call-chip.js +135 -0
- package/dist/motion/working-indicator/working-indicator.d.ts +38 -0
- package/dist/motion/working-indicator/working-indicator.js +171 -0
- package/dist/styles.css +828 -0
- package/dist/tokens.css +230 -0
- package/licenses/Inter-OFL.txt +92 -0
- package/licenses/assistant-ui-MIT.txt +21 -0
- package/licenses/shadcn-MIT.md +21 -0
- package/package.json +133 -4
|
@@ -0,0 +1,625 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { __exportAll } from "../../../_virtual/_rolldown/runtime.js";
|
|
3
|
+
import { Button } from "../../ui/button.js";
|
|
4
|
+
import { cn } from "../../../lib/utils.js";
|
|
5
|
+
import { Skeleton } from "../../ui/skeleton.js";
|
|
6
|
+
import { TooltipIconButton } from "./tooltip-icon-button.js";
|
|
7
|
+
import { MarkdownText } from "./markdown-text.js";
|
|
8
|
+
import { ToolFallback } from "./tool-fallback.aui.js";
|
|
9
|
+
import { ReasoningContent, ReasoningText, ReasoningTrigger } from "./reasoning.js";
|
|
10
|
+
import { Reasoning, ReasoningRoot } from "./reasoning.aui.js";
|
|
11
|
+
import { ComposerAddAttachment, ComposerAttachments, UserMessageAttachments } from "./attachment.aui.js";
|
|
12
|
+
import { File } from "./file.js";
|
|
13
|
+
import { ThreadFollowupSuggestions } from "./follow-up-suggestions.aui.js";
|
|
14
|
+
import { Image } from "./image.js";
|
|
15
|
+
import { ToolGroupContent, ToolGroupRoot, ToolGroupTrigger } from "./tool-group.aui.js";
|
|
16
|
+
import { createContext, useContext, useEffect, useRef, useState } from "react";
|
|
17
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
18
|
+
import { ArrowDownIcon, ArrowUpIcon, AudioLinesIcon, CheckIcon, ChevronLeftIcon, ChevronRightIcon, CopyIcon, DownloadIcon, MicIcon, MoreHorizontalIcon, PencilIcon, PhoneIcon, RefreshCwIcon, SquareIcon, ThumbsDownIcon, ThumbsUpIcon } from "lucide-react";
|
|
19
|
+
import { ActionBarMorePrimitive, ActionBarPrimitive, AuiIf, BranchPickerPrimitive, ComposerPrimitive, ErrorPrimitive, MessagePrimitive, SuggestionPrimitive, ThreadPrimitive, groupPartByType, useAuiState } from "@assistant-ui/react";
|
|
20
|
+
//#region src/components/assistant-ui/elements/thread.aui.tsx
|
|
21
|
+
var thread_aui_exports = /* @__PURE__ */ __exportAll({ Thread: () => Thread });
|
|
22
|
+
const messageGroupBy = groupPartByType({
|
|
23
|
+
reasoning: ["group-chainOfThought", "group-reasoning"],
|
|
24
|
+
"tool-call": ["group-chainOfThought", "group-tool"],
|
|
25
|
+
"standalone-tool-call": []
|
|
26
|
+
});
|
|
27
|
+
const TASK_GROUP_PATH = ["group-chainOfThought", "group-task"];
|
|
28
|
+
const taskAwareGroupBy = (part, context) => {
|
|
29
|
+
const path = messageGroupBy(part, context);
|
|
30
|
+
return part.type === "tool-call" && part.messages !== void 0 && path.length > 0 && !context?.toolUIs?.[part.toolName]?.length ? TASK_GROUP_PATH : path;
|
|
31
|
+
};
|
|
32
|
+
const EMPTY_COMPONENTS = {};
|
|
33
|
+
const ThreadComponentsContext = createContext(EMPTY_COMPONENTS);
|
|
34
|
+
const isNewChatView = (s) => s.thread.messages.length === 0 && (!s.thread.isLoading || s.threads.isLoading);
|
|
35
|
+
const isHistoryLoadingView = (s) => s.thread.messages.length === 0 && s.thread.isLoading && !s.thread.isDisabled && !s.threads.isLoading;
|
|
36
|
+
const ThreadHistorySkeleton = () => /* @__PURE__ */ jsxs("div", {
|
|
37
|
+
"data-slot": "aui_thread-history-skeleton",
|
|
38
|
+
role: "status",
|
|
39
|
+
className: "animate-in fade-in fill-mode-both flex flex-col gap-y-6 [animation-delay:150ms] [animation-duration:200ms]",
|
|
40
|
+
children: [
|
|
41
|
+
/* @__PURE__ */ jsx("span", {
|
|
42
|
+
className: "sr-only",
|
|
43
|
+
children: "Loading conversation"
|
|
44
|
+
}),
|
|
45
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "ml-auto h-9 w-2/5 rounded-xl motion-reduce:animate-none" }),
|
|
46
|
+
/* @__PURE__ */ jsxs("div", {
|
|
47
|
+
className: "flex flex-col gap-y-2",
|
|
48
|
+
children: [
|
|
49
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-11/12 motion-reduce:animate-none" }),
|
|
50
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-4/5 motion-reduce:animate-none" }),
|
|
51
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-3/5 motion-reduce:animate-none" })
|
|
52
|
+
]
|
|
53
|
+
}),
|
|
54
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "ml-auto h-9 w-1/3 rounded-xl motion-reduce:animate-none" }),
|
|
55
|
+
/* @__PURE__ */ jsxs("div", {
|
|
56
|
+
className: "flex flex-col gap-y-2",
|
|
57
|
+
children: [/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-10/12 motion-reduce:animate-none" }), /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-2/3 motion-reduce:animate-none" })]
|
|
58
|
+
})
|
|
59
|
+
]
|
|
60
|
+
});
|
|
61
|
+
const Thread = ({ components = EMPTY_COMPONENTS, autoFocus = true }) => {
|
|
62
|
+
const isEmpty = useAuiState(isNewChatView);
|
|
63
|
+
return /* @__PURE__ */ jsx(ThreadComponentsContext.Provider, {
|
|
64
|
+
value: components,
|
|
65
|
+
children: /* @__PURE__ */ jsx(ThreadRoot, {
|
|
66
|
+
isEmpty,
|
|
67
|
+
autoFocus
|
|
68
|
+
})
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
const ThreadRoot = ({ isEmpty, autoFocus }) => {
|
|
72
|
+
const { Welcome = ThreadWelcome } = useContext(ThreadComponentsContext);
|
|
73
|
+
return /* @__PURE__ */ jsx(ThreadPrimitive.Root, {
|
|
74
|
+
className: "aui-root aui-thread-root bg-background @container flex h-full flex-col",
|
|
75
|
+
style: {
|
|
76
|
+
["--thread-max-width"]: "44rem",
|
|
77
|
+
["--composer-bg"]: "color-mix(in oklab, var(--color-muted) 30%, transparent)",
|
|
78
|
+
["--composer-radius"]: "1rem",
|
|
79
|
+
["--composer-padding"]: "8px"
|
|
80
|
+
},
|
|
81
|
+
children: /* @__PURE__ */ jsx(ThreadPrimitive.Viewport, {
|
|
82
|
+
turnAnchor: "top",
|
|
83
|
+
"data-slot": "aui_thread-viewport",
|
|
84
|
+
className: "relative flex flex-1 flex-col overflow-x-auto overflow-y-scroll scroll-smooth [mask-image:linear-gradient(to_bottom,transparent,black_1.5rem)] [-webkit-mask-image:linear-gradient(to_bottom,transparent,black_1.5rem)]",
|
|
85
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
86
|
+
className: cn("mx-auto flex w-full max-w-(--thread-max-width) flex-1 flex-col px-4 pt-6", isEmpty && "justify-center"),
|
|
87
|
+
children: [
|
|
88
|
+
/* @__PURE__ */ jsx(AuiIf, {
|
|
89
|
+
condition: isNewChatView,
|
|
90
|
+
children: /* @__PURE__ */ jsx(Welcome, {})
|
|
91
|
+
}),
|
|
92
|
+
/* @__PURE__ */ jsx(AuiIf, {
|
|
93
|
+
condition: isHistoryLoadingView,
|
|
94
|
+
children: /* @__PURE__ */ jsx(ThreadHistorySkeleton, {})
|
|
95
|
+
}),
|
|
96
|
+
/* @__PURE__ */ jsx("div", {
|
|
97
|
+
"data-slot": "aui_message-group",
|
|
98
|
+
className: "mb-14 flex flex-col gap-y-6 empty:hidden",
|
|
99
|
+
children: /* @__PURE__ */ jsx(ThreadPrimitive.Messages, { children: () => /* @__PURE__ */ jsx(ThreadMessage, {}) })
|
|
100
|
+
}),
|
|
101
|
+
/* @__PURE__ */ jsxs(ThreadPrimitive.ViewportFooter, {
|
|
102
|
+
className: cn("aui-thread-viewport-footer bg-background flex flex-col gap-4 overflow-visible pb-4 md:pb-6", !isEmpty && "sticky bottom-0 mt-auto rounded-t-(--composer-radius)"),
|
|
103
|
+
children: [
|
|
104
|
+
/* @__PURE__ */ jsx(ThreadScrollToBottom, {}),
|
|
105
|
+
/* @__PURE__ */ jsx(ThreadFollowupSuggestions, {}),
|
|
106
|
+
/* @__PURE__ */ jsx(Composer, { autoFocus }),
|
|
107
|
+
/* @__PURE__ */ jsx(AuiIf, {
|
|
108
|
+
condition: (s) => isNewChatView(s) && s.composer.isEmpty,
|
|
109
|
+
children: /* @__PURE__ */ jsx(ThreadSuggestions, {})
|
|
110
|
+
})
|
|
111
|
+
]
|
|
112
|
+
})
|
|
113
|
+
]
|
|
114
|
+
})
|
|
115
|
+
})
|
|
116
|
+
});
|
|
117
|
+
};
|
|
118
|
+
const ThreadMessage = () => {
|
|
119
|
+
const { AssistantMessage: AssistantMessageComponent = AssistantMessage } = useContext(ThreadComponentsContext);
|
|
120
|
+
const role = useAuiState((s) => s.message.role);
|
|
121
|
+
const isEditing = useAuiState((s) => s.message.composer.isEditing);
|
|
122
|
+
const isSpoken = useAuiState((s) => s.message.metadata.modality === "voice");
|
|
123
|
+
if (isEditing) return /* @__PURE__ */ jsx(EditComposer, {});
|
|
124
|
+
if (isSpoken) return /* @__PURE__ */ jsx(SpokenMessage, {});
|
|
125
|
+
if (role === "user") return /* @__PURE__ */ jsx(UserMessage, {});
|
|
126
|
+
return /* @__PURE__ */ jsx(AssistantMessageComponent, {});
|
|
127
|
+
};
|
|
128
|
+
const useVoiceRunPosition = () => useAuiState((s) => {
|
|
129
|
+
const before = s.thread.messages[s.message.index - 1]?.metadata.modality === "voice";
|
|
130
|
+
const after = s.thread.messages[s.message.index + 1]?.metadata.modality === "voice";
|
|
131
|
+
if (before) return after ? "middle" : "end";
|
|
132
|
+
return after ? "start" : "single";
|
|
133
|
+
});
|
|
134
|
+
const SpokenText = ({ text }) => /* @__PURE__ */ jsx("p", {
|
|
135
|
+
className: "aui-spoken-message-text m-0",
|
|
136
|
+
children: text
|
|
137
|
+
});
|
|
138
|
+
const SpokenMessage = () => {
|
|
139
|
+
const role = useAuiState((s) => s.message.role);
|
|
140
|
+
const position = useVoiceRunPosition();
|
|
141
|
+
const isSpeaking = useAuiState((s) => s.message.role === "assistant" && s.message.status?.type === "running");
|
|
142
|
+
const opensExchange = position === "start" || position === "single";
|
|
143
|
+
return /* @__PURE__ */ jsxs(MessagePrimitive.Root, {
|
|
144
|
+
"data-slot": "aui_spoken-message-root",
|
|
145
|
+
"data-role": role,
|
|
146
|
+
"data-voice-run": position,
|
|
147
|
+
className: cn("aui-spoken-message bg-muted/40 mx-2 px-3 py-1.5 [contain-intrinsic-size:auto_48px] [content-visibility:auto]", position === "single" && "rounded-xl py-2", position === "start" && "rounded-t-xl pt-2", position === "middle" && "-mt-6", position === "end" && "-mt-6 rounded-b-xl pb-2"),
|
|
148
|
+
children: [opensExchange && /* @__PURE__ */ jsxs("div", {
|
|
149
|
+
"data-slot": "aui_spoken-exchange-header",
|
|
150
|
+
className: "text-muted-foreground mb-1.5 flex items-center gap-1.5 text-xs",
|
|
151
|
+
children: [/* @__PURE__ */ jsx(PhoneIcon, {
|
|
152
|
+
className: "size-3",
|
|
153
|
+
"aria-hidden": true
|
|
154
|
+
}), /* @__PURE__ */ jsx("span", { children: "Voice conversation" })]
|
|
155
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
156
|
+
"data-slot": "aui_spoken-message-content",
|
|
157
|
+
className: "text-foreground flex items-start gap-2 text-sm leading-relaxed",
|
|
158
|
+
children: [
|
|
159
|
+
/* @__PURE__ */ jsx("span", {
|
|
160
|
+
className: "text-muted-foreground mt-1 shrink-0",
|
|
161
|
+
"aria-hidden": true,
|
|
162
|
+
children: role === "user" ? /* @__PURE__ */ jsx(MicIcon, { className: "size-3.5" }) : /* @__PURE__ */ jsx(AudioLinesIcon, { className: "size-3.5" })
|
|
163
|
+
}),
|
|
164
|
+
/* @__PURE__ */ jsx("span", {
|
|
165
|
+
className: "sr-only",
|
|
166
|
+
children: role === "user" ? "You said" : "Assistant said"
|
|
167
|
+
}),
|
|
168
|
+
/* @__PURE__ */ jsxs("div", {
|
|
169
|
+
className: "min-w-0 flex-1 wrap-break-word",
|
|
170
|
+
children: [/* @__PURE__ */ jsx(MessagePrimitive.Parts, { components: { Text: SpokenText } }), isSpeaking && /* @__PURE__ */ jsx("span", {
|
|
171
|
+
"data-slot": "aui_spoken-message-indicator",
|
|
172
|
+
role: "status",
|
|
173
|
+
className: "text-muted-foreground ms-1 animate-pulse font-sans",
|
|
174
|
+
"aria-label": "Assistant is speaking",
|
|
175
|
+
children: "●"
|
|
176
|
+
})]
|
|
177
|
+
}),
|
|
178
|
+
/* @__PURE__ */ jsx(SpokenActionBar, {})
|
|
179
|
+
]
|
|
180
|
+
})]
|
|
181
|
+
});
|
|
182
|
+
};
|
|
183
|
+
const SpokenActionBar = () => {
|
|
184
|
+
return /* @__PURE__ */ jsx(ActionBarPrimitive.Root, {
|
|
185
|
+
hideWhenRunning: true,
|
|
186
|
+
autohide: "always",
|
|
187
|
+
className: "aui-spoken-action-bar text-muted-foreground flex shrink-0 gap-1",
|
|
188
|
+
children: /* @__PURE__ */ jsxs(ActionBarPrimitive.Copy, {
|
|
189
|
+
render: /* @__PURE__ */ jsx(TooltipIconButton, {
|
|
190
|
+
tooltip: "Copy",
|
|
191
|
+
className: "size-6"
|
|
192
|
+
}),
|
|
193
|
+
children: [/* @__PURE__ */ jsx(AuiIf, {
|
|
194
|
+
condition: (s) => s.message.isCopied,
|
|
195
|
+
children: /* @__PURE__ */ jsx(CheckIcon, { className: "animate-in zoom-in-50 fade-in duration-200 ease-out" })
|
|
196
|
+
}), /* @__PURE__ */ jsx(AuiIf, {
|
|
197
|
+
condition: (s) => !s.message.isCopied,
|
|
198
|
+
children: /* @__PURE__ */ jsx(CopyIcon, { className: "animate-in zoom-in-75 fade-in duration-150" })
|
|
199
|
+
})]
|
|
200
|
+
})
|
|
201
|
+
});
|
|
202
|
+
};
|
|
203
|
+
/**
|
|
204
|
+
* Whether the last message already ends above the viewport footer (the
|
|
205
|
+
* composer), so nothing is hidden below. The viewport can still scroll then:
|
|
206
|
+
* through the message group's bottom margin, or a top-anchored turn's
|
|
207
|
+
* reserve, which are blank.
|
|
208
|
+
*/
|
|
209
|
+
function useLastMessageInView(ref) {
|
|
210
|
+
const [inView, setInView] = useState(false);
|
|
211
|
+
useEffect(() => {
|
|
212
|
+
const button = ref.current;
|
|
213
|
+
const viewport = button?.closest("[data-slot=\"aui_thread-viewport\"]");
|
|
214
|
+
const footer = button?.parentElement;
|
|
215
|
+
const group = viewport?.querySelector("[data-slot=\"aui_message-group\"]");
|
|
216
|
+
if (!viewport || !footer || !group) return;
|
|
217
|
+
const measure = () => {
|
|
218
|
+
const last = [...group.children].filter((child) => !child.hasAttribute("data-aui-top-anchor-reserve")).at(-1);
|
|
219
|
+
const bottom = last ? last.getBoundingClientRect().bottom - Number.parseFloat(getComputedStyle(last).paddingBottom) : Number.POSITIVE_INFINITY;
|
|
220
|
+
setInView(bottom <= footer.getBoundingClientRect().top + 1);
|
|
221
|
+
};
|
|
222
|
+
measure();
|
|
223
|
+
viewport.addEventListener("scroll", measure, { passive: true });
|
|
224
|
+
const observer = new ResizeObserver(measure);
|
|
225
|
+
observer.observe(viewport);
|
|
226
|
+
observer.observe(group);
|
|
227
|
+
return () => {
|
|
228
|
+
viewport.removeEventListener("scroll", measure);
|
|
229
|
+
observer.disconnect();
|
|
230
|
+
};
|
|
231
|
+
}, [ref]);
|
|
232
|
+
return inView;
|
|
233
|
+
}
|
|
234
|
+
const ThreadScrollToBottom = () => {
|
|
235
|
+
const ref = useRef(null);
|
|
236
|
+
const lastMessageInView = useLastMessageInView(ref);
|
|
237
|
+
return /* @__PURE__ */ jsx(ThreadPrimitive.ScrollToBottom, {
|
|
238
|
+
ref,
|
|
239
|
+
render: /* @__PURE__ */ jsx(TooltipIconButton, {
|
|
240
|
+
tooltip: "Scroll to bottom",
|
|
241
|
+
variant: "outline",
|
|
242
|
+
className: cn("aui-thread-scroll-to-bottom border-border bg-background shadow-sm hover:bg-accent absolute -top-12 z-10 self-center rounded-full p-4 disabled:invisible", lastMessageInView && "invisible")
|
|
243
|
+
}),
|
|
244
|
+
children: /* @__PURE__ */ jsx(ArrowDownIcon, {})
|
|
245
|
+
});
|
|
246
|
+
};
|
|
247
|
+
const ThreadWelcome = () => {
|
|
248
|
+
return /* @__PURE__ */ jsx("div", {
|
|
249
|
+
className: "aui-thread-welcome-root mb-6 flex flex-col px-2",
|
|
250
|
+
children: /* @__PURE__ */ jsx("p", {
|
|
251
|
+
className: "aui-thread-welcome-message-inner fade-in slide-in-from-bottom-1 animate-in fill-mode-both text-2xl font-medium tracking-tight duration-200",
|
|
252
|
+
children: "How can I help you today?"
|
|
253
|
+
})
|
|
254
|
+
});
|
|
255
|
+
};
|
|
256
|
+
const ThreadSuggestions = () => {
|
|
257
|
+
return /* @__PURE__ */ jsx("div", {
|
|
258
|
+
className: "aui-thread-welcome-suggestions flex w-full flex-col",
|
|
259
|
+
children: /* @__PURE__ */ jsx(ThreadPrimitive.Suggestions, { children: () => /* @__PURE__ */ jsx(ThreadSuggestionItem, {}) })
|
|
260
|
+
});
|
|
261
|
+
};
|
|
262
|
+
const ThreadSuggestionItem = () => {
|
|
263
|
+
return /* @__PURE__ */ jsx("div", {
|
|
264
|
+
className: "aui-thread-welcome-suggestion-display fade-in slide-in-from-bottom-2 animate-in fill-mode-both duration-200",
|
|
265
|
+
children: /* @__PURE__ */ jsxs(SuggestionPrimitive.Trigger, {
|
|
266
|
+
send: true,
|
|
267
|
+
render: /* @__PURE__ */ jsx("button", {
|
|
268
|
+
type: "button",
|
|
269
|
+
className: "aui-thread-welcome-suggestion group hover:bg-foreground/[0.03] focus-visible:ring-ring/50 flex w-full items-baseline gap-2.5 rounded-md px-2 py-2 text-start text-sm transition-colors outline-none focus-visible:ring-1 motion-reduce:transition-none"
|
|
270
|
+
}),
|
|
271
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
272
|
+
"aria-hidden": true,
|
|
273
|
+
className: "text-muted-foreground/60 group-hover:text-foreground font-mono text-xs transition-colors motion-reduce:transition-none",
|
|
274
|
+
children: ">"
|
|
275
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
276
|
+
className: "min-w-0 flex-1 truncate",
|
|
277
|
+
children: [
|
|
278
|
+
/* @__PURE__ */ jsx(SuggestionPrimitive.Title, { className: "aui-thread-welcome-suggestion-text-1 text-foreground" }),
|
|
279
|
+
" ",
|
|
280
|
+
/* @__PURE__ */ jsx(SuggestionPrimitive.Description, { className: "aui-thread-welcome-suggestion-text-2 text-muted-foreground empty:hidden" })
|
|
281
|
+
]
|
|
282
|
+
})]
|
|
283
|
+
})
|
|
284
|
+
});
|
|
285
|
+
};
|
|
286
|
+
const Composer = ({ autoFocus }) => {
|
|
287
|
+
const isDisabled = useAuiState((s) => s.thread.isDisabled);
|
|
288
|
+
return /* @__PURE__ */ jsx(ComposerPrimitive.Root, {
|
|
289
|
+
className: "aui-composer-root relative flex w-full flex-col",
|
|
290
|
+
children: /* @__PURE__ */ jsxs(ComposerPrimitive.AttachmentDropzone, {
|
|
291
|
+
render: /* @__PURE__ */ jsx("div", {
|
|
292
|
+
"data-slot": "aui_composer-shell",
|
|
293
|
+
"data-disabled": isDisabled || void 0,
|
|
294
|
+
className: cn("border-foreground/10 focus-within:border-foreground/25 data-[dragging=true]:border-ring flex w-full cursor-text flex-col gap-2 rounded-(--composer-radius) border bg-(--composer-bg) p-(--composer-padding) transition-[border-color,opacity] data-[dragging=true]:border-dashed data-[dragging=true]:bg-[color-mix(in_oklab,var(--color-accent)_50%,var(--color-background))]", "data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50")
|
|
295
|
+
}),
|
|
296
|
+
children: [
|
|
297
|
+
/* @__PURE__ */ jsx(ComposerAttachments, {}),
|
|
298
|
+
/* @__PURE__ */ jsx(ComposerPrimitive.Input, {
|
|
299
|
+
placeholder: "Send a message...",
|
|
300
|
+
className: "aui-composer-input caret-primary placeholder:text-muted-foreground/60 disabled:placeholder:text-muted-foreground/40 max-h-48 min-h-10 w-full resize-none bg-transparent px-2.5 py-1 text-base leading-6 outline-none",
|
|
301
|
+
rows: 1,
|
|
302
|
+
autoFocus,
|
|
303
|
+
enterKeyHint: "send",
|
|
304
|
+
"aria-label": "Message input"
|
|
305
|
+
}),
|
|
306
|
+
/* @__PURE__ */ jsx(ComposerAction, {})
|
|
307
|
+
]
|
|
308
|
+
})
|
|
309
|
+
});
|
|
310
|
+
};
|
|
311
|
+
const ComposerAction = () => {
|
|
312
|
+
const isSending = useAuiState((s) => s.composer.submission !== void 0 && !(s.thread.isRunning && s.thread.capabilities.cancel));
|
|
313
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
314
|
+
className: "aui-composer-action-wrapper relative flex items-center justify-between",
|
|
315
|
+
children: [/* @__PURE__ */ jsx(ComposerAddAttachment, {}), /* @__PURE__ */ jsxs("div", {
|
|
316
|
+
className: "flex items-center gap-1.5",
|
|
317
|
+
children: [
|
|
318
|
+
/* @__PURE__ */ jsxs(AuiIf, {
|
|
319
|
+
condition: (s) => s.thread.capabilities.dictation,
|
|
320
|
+
children: [/* @__PURE__ */ jsx(AuiIf, {
|
|
321
|
+
condition: (s) => s.composer.dictation == null,
|
|
322
|
+
children: /* @__PURE__ */ jsx(ComposerPrimitive.Dictate, {
|
|
323
|
+
render: /* @__PURE__ */ jsx(TooltipIconButton, {
|
|
324
|
+
tooltip: "Voice input",
|
|
325
|
+
side: "bottom",
|
|
326
|
+
type: "button",
|
|
327
|
+
variant: "ghost",
|
|
328
|
+
size: "icon",
|
|
329
|
+
className: "aui-composer-dictate text-muted-foreground hover:text-foreground size-7 rounded-full",
|
|
330
|
+
"aria-label": "Start voice input"
|
|
331
|
+
}),
|
|
332
|
+
children: /* @__PURE__ */ jsx(MicIcon, { className: "aui-composer-dictate-icon size-4" })
|
|
333
|
+
})
|
|
334
|
+
}), /* @__PURE__ */ jsx(AuiIf, {
|
|
335
|
+
condition: (s) => s.composer.dictation != null,
|
|
336
|
+
children: /* @__PURE__ */ jsx(ComposerPrimitive.StopDictation, {
|
|
337
|
+
render: /* @__PURE__ */ jsx(TooltipIconButton, {
|
|
338
|
+
tooltip: "Stop dictation",
|
|
339
|
+
side: "bottom",
|
|
340
|
+
type: "button",
|
|
341
|
+
variant: "ghost",
|
|
342
|
+
size: "icon",
|
|
343
|
+
className: "aui-composer-stop-dictation text-destructive size-7 rounded-full",
|
|
344
|
+
"aria-label": "Stop voice input"
|
|
345
|
+
}),
|
|
346
|
+
children: /* @__PURE__ */ jsx(SquareIcon, { className: "aui-composer-stop-dictation-icon size-3.5 animate-pulse fill-current" })
|
|
347
|
+
})
|
|
348
|
+
})]
|
|
349
|
+
}),
|
|
350
|
+
/* @__PURE__ */ jsx(AuiIf, {
|
|
351
|
+
condition: (s) => !s.composer.canCancel || s.thread.voice !== void 0 && s.composer.submission === void 0,
|
|
352
|
+
children: /* @__PURE__ */ jsx(ComposerPrimitive.Send, {
|
|
353
|
+
render: /* @__PURE__ */ jsx(TooltipIconButton, {
|
|
354
|
+
tooltip: "Send message",
|
|
355
|
+
side: "bottom",
|
|
356
|
+
type: "button",
|
|
357
|
+
variant: "default",
|
|
358
|
+
size: "icon",
|
|
359
|
+
className: "aui-composer-send size-7 rounded-full",
|
|
360
|
+
"aria-label": "Send message"
|
|
361
|
+
}),
|
|
362
|
+
children: /* @__PURE__ */ jsx(ArrowUpIcon, { className: "aui-composer-send-icon size-4" })
|
|
363
|
+
})
|
|
364
|
+
}),
|
|
365
|
+
/* @__PURE__ */ jsx(AuiIf, {
|
|
366
|
+
condition: (s) => s.composer.canCancel && (s.thread.voice === void 0 || s.composer.submission !== void 0),
|
|
367
|
+
children: /* @__PURE__ */ jsx(ComposerPrimitive.Cancel, {
|
|
368
|
+
render: /* @__PURE__ */ jsx(Button, {
|
|
369
|
+
type: "button",
|
|
370
|
+
variant: "default",
|
|
371
|
+
size: "icon",
|
|
372
|
+
className: "aui-composer-cancel size-7 rounded-full",
|
|
373
|
+
"aria-label": isSending ? "Cancel sending" : "Stop generating"
|
|
374
|
+
}),
|
|
375
|
+
children: /* @__PURE__ */ jsx(SquareIcon, { className: "aui-composer-cancel-icon size-3.5 fill-current" })
|
|
376
|
+
})
|
|
377
|
+
})
|
|
378
|
+
]
|
|
379
|
+
})]
|
|
380
|
+
});
|
|
381
|
+
};
|
|
382
|
+
const MessageError = () => {
|
|
383
|
+
return /* @__PURE__ */ jsx(MessagePrimitive.Error, { children: /* @__PURE__ */ jsx(ErrorPrimitive.Root, {
|
|
384
|
+
className: "aui-message-error-root border-destructive bg-destructive/10 text-destructive dark:bg-destructive/5 mt-2 rounded-md border p-3 text-sm dark:text-red-200",
|
|
385
|
+
children: /* @__PURE__ */ jsx(ErrorPrimitive.Message, { className: "aui-message-error-message line-clamp-2" })
|
|
386
|
+
}) });
|
|
387
|
+
};
|
|
388
|
+
const AssistantMessage = () => {
|
|
389
|
+
const { ToolFallback: ToolFallbackComponent = ToolFallback, ToolGroup, ReasoningGroup, TaskGroup: TaskGroupComponent } = useContext(ThreadComponentsContext);
|
|
390
|
+
const groupBy = TaskGroupComponent ? taskAwareGroupBy : messageGroupBy;
|
|
391
|
+
return /* @__PURE__ */ jsxs(MessagePrimitive.Root, {
|
|
392
|
+
"data-slot": "aui_assistant-message-root",
|
|
393
|
+
"data-role": "assistant",
|
|
394
|
+
className: "fade-in slide-in-from-bottom-1 animate-in relative -mb-7.5 pb-7.5 duration-150 [contain-intrinsic-size:auto_200px] [content-visibility:auto]",
|
|
395
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
396
|
+
"data-slot": "aui_assistant-message-content",
|
|
397
|
+
className: "text-foreground px-2 leading-relaxed wrap-break-word",
|
|
398
|
+
children: [/* @__PURE__ */ jsx(MessagePrimitive.GroupedParts, {
|
|
399
|
+
groupBy,
|
|
400
|
+
children: ({ part, children }) => {
|
|
401
|
+
switch (part.type) {
|
|
402
|
+
case "group-chainOfThought": return /* @__PURE__ */ jsx("div", {
|
|
403
|
+
"data-slot": "aui_chain-of-thought",
|
|
404
|
+
children
|
|
405
|
+
});
|
|
406
|
+
case "group-task": return TaskGroupComponent ? /* @__PURE__ */ jsx(TaskGroupComponent, { group: part }) : null;
|
|
407
|
+
case "group-tool":
|
|
408
|
+
if (ToolGroup) return /* @__PURE__ */ jsx(ToolGroup, {
|
|
409
|
+
group: part,
|
|
410
|
+
children
|
|
411
|
+
});
|
|
412
|
+
return /* @__PURE__ */ jsxs(ToolGroupRoot, {
|
|
413
|
+
variant: "ghost",
|
|
414
|
+
children: [/* @__PURE__ */ jsx(ToolGroupTrigger, {
|
|
415
|
+
count: part.indices.length,
|
|
416
|
+
active: part.status.type === "running"
|
|
417
|
+
}), /* @__PURE__ */ jsx(ToolGroupContent, { children })]
|
|
418
|
+
});
|
|
419
|
+
case "group-reasoning": {
|
|
420
|
+
if (ReasoningGroup) return /* @__PURE__ */ jsx(ReasoningGroup, {
|
|
421
|
+
group: part,
|
|
422
|
+
children
|
|
423
|
+
});
|
|
424
|
+
const running = part.status.type === "running";
|
|
425
|
+
return /* @__PURE__ */ jsxs(ReasoningRoot, {
|
|
426
|
+
streaming: running,
|
|
427
|
+
children: [/* @__PURE__ */ jsx(ReasoningTrigger, { active: running }), /* @__PURE__ */ jsx(ReasoningContent, {
|
|
428
|
+
"aria-busy": running,
|
|
429
|
+
children: /* @__PURE__ */ jsx(ReasoningText, { children })
|
|
430
|
+
})]
|
|
431
|
+
});
|
|
432
|
+
}
|
|
433
|
+
case "text": return /* @__PURE__ */ jsx(MarkdownText, {});
|
|
434
|
+
case "reasoning": return /* @__PURE__ */ jsx(Reasoning, { ...part });
|
|
435
|
+
case "tool-call": return part.toolUI ?? /* @__PURE__ */ jsx(ToolFallbackComponent, { ...part });
|
|
436
|
+
case "data": return part.dataRendererUI;
|
|
437
|
+
case "file": return /* @__PURE__ */ jsx("div", {
|
|
438
|
+
"data-slot": "aui_assistant-message-file",
|
|
439
|
+
className: "py-1",
|
|
440
|
+
children: /* @__PURE__ */ jsx(File, { ...part })
|
|
441
|
+
});
|
|
442
|
+
case "image": return /* @__PURE__ */ jsx("div", {
|
|
443
|
+
"data-slot": "aui_assistant-message-image",
|
|
444
|
+
className: "py-1",
|
|
445
|
+
children: /* @__PURE__ */ jsx(Image, { ...part })
|
|
446
|
+
});
|
|
447
|
+
case "indicator": return /* @__PURE__ */ jsx("span", {
|
|
448
|
+
"data-slot": "aui_assistant-message-indicator",
|
|
449
|
+
className: "animate-pulse font-sans",
|
|
450
|
+
"aria-label": "Assistant is working",
|
|
451
|
+
children: "●"
|
|
452
|
+
});
|
|
453
|
+
default: return null;
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
}), /* @__PURE__ */ jsx(MessageError, {})]
|
|
457
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
458
|
+
"data-slot": "aui_assistant-message-footer",
|
|
459
|
+
className: cn("ms-2 flex items-center", `min-h-7.5 pt-1.5`),
|
|
460
|
+
children: [/* @__PURE__ */ jsx(BranchPicker, {}), /* @__PURE__ */ jsx(AssistantActionBar, {})]
|
|
461
|
+
})]
|
|
462
|
+
});
|
|
463
|
+
};
|
|
464
|
+
const AssistantActionBar = () => {
|
|
465
|
+
return /* @__PURE__ */ jsxs(ActionBarPrimitive.Root, {
|
|
466
|
+
hideWhenRunning: true,
|
|
467
|
+
autohide: "not-last",
|
|
468
|
+
className: "aui-assistant-action-bar-root text-muted-foreground animate-in fade-in col-start-3 row-start-2 -ms-1 flex gap-1 duration-200",
|
|
469
|
+
children: [
|
|
470
|
+
/* @__PURE__ */ jsxs(ActionBarPrimitive.Copy, {
|
|
471
|
+
render: /* @__PURE__ */ jsx(TooltipIconButton, { tooltip: "Copy" }),
|
|
472
|
+
children: [/* @__PURE__ */ jsx(AuiIf, {
|
|
473
|
+
condition: (s) => s.message.isCopied,
|
|
474
|
+
children: /* @__PURE__ */ jsx(CheckIcon, { className: "animate-in zoom-in-50 fade-in duration-200 ease-out" })
|
|
475
|
+
}), /* @__PURE__ */ jsx(AuiIf, {
|
|
476
|
+
condition: (s) => !s.message.isCopied,
|
|
477
|
+
children: /* @__PURE__ */ jsx(CopyIcon, { className: "animate-in zoom-in-75 fade-in duration-150" })
|
|
478
|
+
})]
|
|
479
|
+
}),
|
|
480
|
+
/* @__PURE__ */ jsxs(AuiIf, {
|
|
481
|
+
condition: (s) => s.thread.capabilities.feedback,
|
|
482
|
+
children: [/* @__PURE__ */ jsx(ActionBarPrimitive.FeedbackPositive, {
|
|
483
|
+
render: /* @__PURE__ */ jsx(TooltipIconButton, {
|
|
484
|
+
tooltip: "Helpful",
|
|
485
|
+
className: "data-[submitted=true]:bg-accent data-[submitted=true]:text-accent-foreground"
|
|
486
|
+
}),
|
|
487
|
+
children: /* @__PURE__ */ jsx(ThumbsUpIcon, {})
|
|
488
|
+
}), /* @__PURE__ */ jsx(ActionBarPrimitive.FeedbackNegative, {
|
|
489
|
+
render: /* @__PURE__ */ jsx(TooltipIconButton, {
|
|
490
|
+
tooltip: "Not helpful",
|
|
491
|
+
className: "data-[submitted=true]:bg-accent data-[submitted=true]:text-accent-foreground"
|
|
492
|
+
}),
|
|
493
|
+
children: /* @__PURE__ */ jsx(ThumbsDownIcon, {})
|
|
494
|
+
})]
|
|
495
|
+
}),
|
|
496
|
+
/* @__PURE__ */ jsx(ActionBarPrimitive.Reload, {
|
|
497
|
+
render: /* @__PURE__ */ jsx(TooltipIconButton, { tooltip: "Refresh" }),
|
|
498
|
+
children: /* @__PURE__ */ jsx(RefreshCwIcon, {})
|
|
499
|
+
}),
|
|
500
|
+
/* @__PURE__ */ jsxs(ActionBarMorePrimitive.Root, { children: [/* @__PURE__ */ jsx(ActionBarMorePrimitive.Trigger, {
|
|
501
|
+
render: /* @__PURE__ */ jsx(TooltipIconButton, {
|
|
502
|
+
tooltip: "More",
|
|
503
|
+
className: "data-[state=open]:bg-accent"
|
|
504
|
+
}),
|
|
505
|
+
children: /* @__PURE__ */ jsx(MoreHorizontalIcon, {})
|
|
506
|
+
}), /* @__PURE__ */ jsx(ActionBarMorePrimitive.Content, {
|
|
507
|
+
side: "bottom",
|
|
508
|
+
align: "start",
|
|
509
|
+
sideOffset: 6,
|
|
510
|
+
className: "aui-action-bar-more-content bg-popover text-popover-foreground data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:animate-out data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] overflow-hidden rounded-xl border p-1.5",
|
|
511
|
+
children: /* @__PURE__ */ jsxs(ActionBarPrimitive.ExportMarkdown, {
|
|
512
|
+
render: /* @__PURE__ */ jsx(ActionBarMorePrimitive.Item, { className: "aui-action-bar-more-item hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground flex cursor-pointer items-center gap-2 rounded-lg px-2.5 py-1.5 text-sm outline-none select-none" }),
|
|
513
|
+
children: [/* @__PURE__ */ jsx(DownloadIcon, { className: "size-4" }), "Export as Markdown"]
|
|
514
|
+
})
|
|
515
|
+
})] })
|
|
516
|
+
]
|
|
517
|
+
});
|
|
518
|
+
};
|
|
519
|
+
const UserFilePart = (part) => /* @__PURE__ */ jsx("div", {
|
|
520
|
+
"data-slot": "aui_user-message-file",
|
|
521
|
+
className: "py-1",
|
|
522
|
+
children: /* @__PURE__ */ jsx(File, { ...part })
|
|
523
|
+
});
|
|
524
|
+
const UserImagePart = (part) => /* @__PURE__ */ jsx("div", {
|
|
525
|
+
"data-slot": "aui_user-message-image",
|
|
526
|
+
className: "py-1",
|
|
527
|
+
children: /* @__PURE__ */ jsx(Image, { ...part })
|
|
528
|
+
});
|
|
529
|
+
const UserMessage = () => {
|
|
530
|
+
return /* @__PURE__ */ jsxs(MessagePrimitive.Root, {
|
|
531
|
+
"data-slot": "aui_user-message-root",
|
|
532
|
+
className: "fade-in slide-in-from-bottom-1 animate-in -mt-6 grid auto-rows-auto grid-cols-[minmax(72px,1fr)_auto] content-start gap-y-2 px-2 pt-6 duration-150 [contain-intrinsic-size:auto_200px] [content-visibility:auto] [&:where(>*)]:col-start-2",
|
|
533
|
+
"data-role": "user",
|
|
534
|
+
children: [
|
|
535
|
+
/* @__PURE__ */ jsx(UserMessageAttachments, {}),
|
|
536
|
+
/* @__PURE__ */ jsxs("div", {
|
|
537
|
+
className: "aui-user-message-content-wrapper relative col-start-2 min-w-0",
|
|
538
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
539
|
+
className: "aui-user-message-content peer bg-muted text-foreground rounded-(--composer-radius) px-4 py-2 wrap-break-word empty:hidden",
|
|
540
|
+
children: /* @__PURE__ */ jsx(MessagePrimitive.Parts, { components: {
|
|
541
|
+
File: UserFilePart,
|
|
542
|
+
Image: UserImagePart
|
|
543
|
+
} })
|
|
544
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
545
|
+
className: "aui-user-action-bar-wrapper absolute start-0 top-1/2 -translate-x-full -translate-y-1/2 pe-2 peer-empty:hidden rtl:translate-x-full",
|
|
546
|
+
children: /* @__PURE__ */ jsx(UserActionBar, {})
|
|
547
|
+
})]
|
|
548
|
+
}),
|
|
549
|
+
/* @__PURE__ */ jsx(BranchPicker, {
|
|
550
|
+
"data-slot": "aui_user-branch-picker",
|
|
551
|
+
className: "col-span-full col-start-1 -me-1 justify-end"
|
|
552
|
+
})
|
|
553
|
+
]
|
|
554
|
+
});
|
|
555
|
+
};
|
|
556
|
+
const UserActionBar = () => {
|
|
557
|
+
return /* @__PURE__ */ jsx(ActionBarPrimitive.Root, {
|
|
558
|
+
hideWhenRunning: true,
|
|
559
|
+
autohide: "not-last",
|
|
560
|
+
className: "aui-user-action-bar-root flex flex-col items-end",
|
|
561
|
+
children: /* @__PURE__ */ jsx(ActionBarPrimitive.Edit, {
|
|
562
|
+
render: /* @__PURE__ */ jsx(TooltipIconButton, {
|
|
563
|
+
tooltip: "Edit",
|
|
564
|
+
className: "aui-user-action-edit"
|
|
565
|
+
}),
|
|
566
|
+
children: /* @__PURE__ */ jsx(PencilIcon, {})
|
|
567
|
+
})
|
|
568
|
+
});
|
|
569
|
+
};
|
|
570
|
+
const EditComposer = () => {
|
|
571
|
+
return /* @__PURE__ */ jsx(MessagePrimitive.Root, {
|
|
572
|
+
"data-slot": "aui_edit-composer-wrapper",
|
|
573
|
+
className: "flex flex-col px-2 [contain-intrinsic-size:auto_200px] [content-visibility:auto]",
|
|
574
|
+
children: /* @__PURE__ */ jsxs(ComposerPrimitive.Root, {
|
|
575
|
+
className: "aui-edit-composer-root border-foreground/10 focus-within:border-foreground/25 ms-auto flex w-full max-w-[85%] cursor-text flex-col rounded-(--composer-radius) border bg-(--composer-bg) transition-[border-color]",
|
|
576
|
+
children: [/* @__PURE__ */ jsx(ComposerPrimitive.Input, {
|
|
577
|
+
className: "aui-edit-composer-input text-foreground min-h-14 w-full resize-none bg-transparent px-4 pt-3 pb-1 text-base outline-none",
|
|
578
|
+
autoFocus: true
|
|
579
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
580
|
+
className: "aui-edit-composer-footer mx-2.5 mb-2.5 flex items-center gap-1.5 self-end",
|
|
581
|
+
children: [/* @__PURE__ */ jsx(ComposerPrimitive.Cancel, {
|
|
582
|
+
render: /* @__PURE__ */ jsx(Button, {
|
|
583
|
+
variant: "ghost",
|
|
584
|
+
size: "sm",
|
|
585
|
+
className: "h-8 px-3"
|
|
586
|
+
}),
|
|
587
|
+
children: "Cancel"
|
|
588
|
+
}), /* @__PURE__ */ jsx(ComposerPrimitive.Send, {
|
|
589
|
+
render: /* @__PURE__ */ jsx(Button, {
|
|
590
|
+
size: "sm",
|
|
591
|
+
className: "h-8 px-3"
|
|
592
|
+
}),
|
|
593
|
+
children: "Update"
|
|
594
|
+
})]
|
|
595
|
+
})]
|
|
596
|
+
})
|
|
597
|
+
});
|
|
598
|
+
};
|
|
599
|
+
const BranchPicker = ({ className, ...rest }) => {
|
|
600
|
+
return /* @__PURE__ */ jsxs(BranchPickerPrimitive.Root, {
|
|
601
|
+
hideWhenSingleBranch: true,
|
|
602
|
+
className: cn("aui-branch-picker-root text-muted-foreground -ms-2 me-2 inline-flex items-center text-xs", className),
|
|
603
|
+
...rest,
|
|
604
|
+
children: [
|
|
605
|
+
/* @__PURE__ */ jsx(BranchPickerPrimitive.Previous, {
|
|
606
|
+
render: /* @__PURE__ */ jsx(TooltipIconButton, { tooltip: "Previous" }),
|
|
607
|
+
children: /* @__PURE__ */ jsx(ChevronLeftIcon, {})
|
|
608
|
+
}),
|
|
609
|
+
/* @__PURE__ */ jsxs("span", {
|
|
610
|
+
className: "aui-branch-picker-state font-medium",
|
|
611
|
+
children: [
|
|
612
|
+
/* @__PURE__ */ jsx(BranchPickerPrimitive.Number, {}),
|
|
613
|
+
" / ",
|
|
614
|
+
/* @__PURE__ */ jsx(BranchPickerPrimitive.Count, {})
|
|
615
|
+
]
|
|
616
|
+
}),
|
|
617
|
+
/* @__PURE__ */ jsx(BranchPickerPrimitive.Next, {
|
|
618
|
+
render: /* @__PURE__ */ jsx(TooltipIconButton, { tooltip: "Next" }),
|
|
619
|
+
children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
|
|
620
|
+
})
|
|
621
|
+
]
|
|
622
|
+
});
|
|
623
|
+
};
|
|
624
|
+
//#endregion
|
|
625
|
+
export { Thread, thread_aui_exports };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Sidebar } from "../../ui/sidebar.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare namespace threadlist_sidebar_aui_d_exports {
|
|
4
|
+
export { ThreadListSidebar };
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* The runtime thread list in an app sidebar. `header` and `footer` replace
|
|
8
|
+
* the registry demo's assistant-ui branding and GitHub links; they default to
|
|
9
|
+
* that demo content, so the vanilla item is unchanged until an app overrides
|
|
10
|
+
* them. Pass `null` (or `false`) to drop the footer.
|
|
11
|
+
*/
|
|
12
|
+
export declare function ThreadListSidebar({ header, footer, ...props }: React.ComponentProps<typeof Sidebar> & {
|
|
13
|
+
/** Sidebar header content; defaults to the registry demo branding. */
|
|
14
|
+
header?: React.ReactNode;
|
|
15
|
+
/** Sidebar footer content; defaults to the registry demo links. */
|
|
16
|
+
footer?: React.ReactNode;
|
|
17
|
+
}): React.JSX.Element;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { threadlist_sidebar_aui_d_exports };
|