@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,126 @@
|
|
|
1
|
+
import { Run, RunStatus, TranscriptMessage, Usage } from "../../types.js";
|
|
2
|
+
import { DataTableState } from "../../../compositions/data-table/data-table-state.js";
|
|
3
|
+
import "../../../compositions/data-table/data-table.js";
|
|
4
|
+
import { RunInspectorProps } from "../run-inspector/run-inspector.js";
|
|
5
|
+
import { TranscriptViewerProps } from "../transcript-viewer/transcript-viewer.js";
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
//#region src/ai/compositions/conversation-browser/conversation-browser.d.ts
|
|
8
|
+
type ConversationRowBase = {
|
|
9
|
+
/** Stable id: the session id for a thread, the task id for a run. */
|
|
10
|
+
readonly id: string;
|
|
11
|
+
/** The thread's title, or the run's objective. */
|
|
12
|
+
readonly title: string;
|
|
13
|
+
/** The agent, as a display name, such as "Email agent". */
|
|
14
|
+
readonly agent: string;
|
|
15
|
+
/** When the thread or run started (ISO 8601). */
|
|
16
|
+
readonly startedAt: string;
|
|
17
|
+
/** Where it stands. A thread takes the status of its latest run. */
|
|
18
|
+
readonly status: RunStatus;
|
|
19
|
+
/** How many messages it holds, when known. */
|
|
20
|
+
readonly messageCount?: number;
|
|
21
|
+
/** Model usage for the whole thread or run, when recorded. */
|
|
22
|
+
readonly usage?: Usage;
|
|
23
|
+
};
|
|
24
|
+
/** A conversation thread. It opens in a TranscriptViewer. */
|
|
25
|
+
export type ConversationThreadRow = ConversationRowBase & {
|
|
26
|
+
readonly kind: "thread";
|
|
27
|
+
/** The conversation, once loaded. Until then the sheet shows a placeholder. */
|
|
28
|
+
readonly messages?: readonly TranscriptMessage[];
|
|
29
|
+
};
|
|
30
|
+
/** An agent run. It opens in a RunInspector. */
|
|
31
|
+
export type ConversationRunRow = ConversationRowBase & {
|
|
32
|
+
readonly kind: "run";
|
|
33
|
+
/** The run, once loaded. Until then the sheet shows a placeholder. */
|
|
34
|
+
readonly run?: Run;
|
|
35
|
+
};
|
|
36
|
+
/** One row of the browser: a thread or a run. */
|
|
37
|
+
export type ConversationRow = ConversationThreadRow | ConversationRunRow;
|
|
38
|
+
type ConversationBrowserBaseProps = {
|
|
39
|
+
/** The rows: every row in client mode, the current page in server mode. */
|
|
40
|
+
rows: readonly ConversationRow[];
|
|
41
|
+
/** Accessible name of the table, also used for its search field. Defaults to "Conversations". */
|
|
42
|
+
label?: string;
|
|
43
|
+
/**
|
|
44
|
+
* The row open in the sheet, by id (controlled). When it names a row not
|
|
45
|
+
* in `rows` (for example after a server-mode page change), the sheet stays
|
|
46
|
+
* closed and `onOpenChange` fires with `null` so the app's state converges.
|
|
47
|
+
*/
|
|
48
|
+
openId?: string | null;
|
|
49
|
+
/** The row open on mount (uncontrolled). */
|
|
50
|
+
defaultOpenId?: string | null;
|
|
51
|
+
/**
|
|
52
|
+
* The owner opened a row (its id) or closed the sheet (`null`). Load the
|
|
53
|
+
* row's `messages` or `run` here if the rows do not carry them yet.
|
|
54
|
+
*/
|
|
55
|
+
onOpenChange?: (id: string | null) => void;
|
|
56
|
+
/** Plain-text error loading the open row's transcript or run, shown in the sheet. */
|
|
57
|
+
detailError?: string | null;
|
|
58
|
+
/** Offer a retry next to `detailError`. */
|
|
59
|
+
onDetailRetry?: () => void;
|
|
60
|
+
/** The agent filter's choices. Defaults to the agents in `rows`; pass them in server mode. */
|
|
61
|
+
agents?: readonly string[];
|
|
62
|
+
/**
|
|
63
|
+
* Shows a BranchMenu beside the table: one section per agent, holding its
|
|
64
|
+
* threads and runs. In server mode these are the agents and threads on
|
|
65
|
+
* the current page (the `rows` passed in), not the whole result set.
|
|
66
|
+
*/
|
|
67
|
+
sideNav?: boolean;
|
|
68
|
+
/** Formats an ISO time for the Started column and the sheet. Defaults to the local date and time. */
|
|
69
|
+
formatTime?: (iso: string) => string;
|
|
70
|
+
/** The rows are loading (see DataTable). */
|
|
71
|
+
isLoading?: boolean;
|
|
72
|
+
/** A load error for the rows (see DataTable). */
|
|
73
|
+
error?: string | null;
|
|
74
|
+
/** Shows a retry with `error`. */
|
|
75
|
+
onRetry?: () => void;
|
|
76
|
+
/** The empty state's title when there are no rows. */
|
|
77
|
+
emptyLabel?: string;
|
|
78
|
+
/**
|
|
79
|
+
* The table's scroll area's maximum height (any CSS length); rows virtualize
|
|
80
|
+
* inside it. Under 40rem wide the browser drops it and the page scrolls
|
|
81
|
+
* instead: a nested scroll box on a phone cuts rows in half.
|
|
82
|
+
*/
|
|
83
|
+
maxHeight?: string;
|
|
84
|
+
/** Props passed to the RunInspector a run row opens in. */
|
|
85
|
+
runInspectorProps?: Partial<Omit<RunInspectorProps, "run" | "title" | "isLoading" | "error">>;
|
|
86
|
+
/** Props passed to the TranscriptViewer a thread row opens in. */
|
|
87
|
+
transcriptProps?: Partial<Omit<TranscriptViewerProps, "messages" | "isLoading" | "error">>;
|
|
88
|
+
className?: string;
|
|
89
|
+
};
|
|
90
|
+
/** Client mode: the table searches, filters, sorts and pages `rows` itself. */
|
|
91
|
+
export type ConversationBrowserClientProps = ConversationBrowserBaseProps & {
|
|
92
|
+
mode?: "client";
|
|
93
|
+
/** Table state (controlled). */
|
|
94
|
+
state?: DataTableState;
|
|
95
|
+
/** The starting table state. */
|
|
96
|
+
defaultState?: Partial<DataTableState>;
|
|
97
|
+
onStateChange?: (state: DataTableState) => void;
|
|
98
|
+
total?: never;
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* Server mode: the app owns the query. Every search, filter, sort and page
|
|
102
|
+
* change goes to `onStateChange`; `rows` is the current page and `total` the
|
|
103
|
+
* number of matches.
|
|
104
|
+
*/
|
|
105
|
+
export type ConversationBrowserServerProps = ConversationBrowserBaseProps & {
|
|
106
|
+
mode: "server";
|
|
107
|
+
state: DataTableState;
|
|
108
|
+
onStateChange: (state: DataTableState) => void;
|
|
109
|
+
total: number;
|
|
110
|
+
defaultState?: never;
|
|
111
|
+
};
|
|
112
|
+
export type ConversationBrowserProps = ConversationBrowserClientProps | ConversationBrowserServerProps;
|
|
113
|
+
/**
|
|
114
|
+
* A DataTable of an agent's threads and runs: the conversation, agent,
|
|
115
|
+
* start time, status (StatusGlyph), message count and usage, with search
|
|
116
|
+
* and filters by agent and status. Opening a row (a click anywhere on it, or
|
|
117
|
+
* Enter on its title) shows a Sheet with a TranscriptViewer for a thread or a
|
|
118
|
+
* RunInspector for a run. With `sideNav`, a BranchMenu lists the agents and,
|
|
119
|
+
* under each, its threads and runs.
|
|
120
|
+
*
|
|
121
|
+
* Dumb: rows come from props, and a row's transcript or run arrives on the
|
|
122
|
+
* row once the app loads it (`onOpenChange` says which). Server mode hands
|
|
123
|
+
* every query change to `onStateChange`, as DataTable does.
|
|
124
|
+
*/
|
|
125
|
+
export declare function ConversationBrowser(props: ConversationBrowserProps): React.JSX.Element;
|
|
126
|
+
//#endregion
|
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle } from "../../../components/ui/sheet.js";
|
|
2
|
+
import { DataTable, createDataTableColumnHelper } from "../../../compositions/data-table/data-table.js";
|
|
3
|
+
import { ErrorState, Loading } from "../../../compositions/state-blocks/state-blocks.js";
|
|
4
|
+
import { BranchMenu } from "../../../motion/branch-menu/branch-menu.js";
|
|
5
|
+
import { StatusGlyph } from "../../../motion/status-glyph/status-glyph.js";
|
|
6
|
+
import { formatCost, formatTokens } from "../usage-meter/usage-format.js";
|
|
7
|
+
import { RunInspector } from "../run-inspector/run-inspector.js";
|
|
8
|
+
import { TranscriptViewer } from "../transcript-viewer/transcript-viewer.js";
|
|
9
|
+
import * as React from "react";
|
|
10
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
import { cn } from "cn";
|
|
12
|
+
import { BotIcon, MessagesSquareIcon, WorkflowIcon } from "lucide-react";
|
|
13
|
+
import { useControllableValue } from "ahooks";
|
|
14
|
+
//#region src/ai/compositions/conversation-browser/conversation-browser.tsx
|
|
15
|
+
const dateTimeFormat = new Intl.DateTimeFormat("en-GB", {
|
|
16
|
+
day: "numeric",
|
|
17
|
+
month: "short",
|
|
18
|
+
hour: "2-digit",
|
|
19
|
+
minute: "2-digit"
|
|
20
|
+
});
|
|
21
|
+
function defaultFormatTime(iso) {
|
|
22
|
+
const ms = Date.parse(iso);
|
|
23
|
+
return Number.isNaN(ms) ? iso : dateTimeFormat.format(ms);
|
|
24
|
+
}
|
|
25
|
+
const STATUS_GLYPH = {
|
|
26
|
+
pending: "pending",
|
|
27
|
+
running: "running",
|
|
28
|
+
waiting: "pending",
|
|
29
|
+
succeeded: "done",
|
|
30
|
+
failed: "failed",
|
|
31
|
+
cancelled: "cancelled"
|
|
32
|
+
};
|
|
33
|
+
/** Status words for a thread or run in the table and its filter. */
|
|
34
|
+
const CONVERSATION_STATUS_LABEL = {
|
|
35
|
+
pending: "Queued",
|
|
36
|
+
running: "Running",
|
|
37
|
+
waiting: "Waiting",
|
|
38
|
+
succeeded: "Done",
|
|
39
|
+
failed: "Failed",
|
|
40
|
+
cancelled: "Cancelled"
|
|
41
|
+
};
|
|
42
|
+
const STATUS_ORDER = [
|
|
43
|
+
"running",
|
|
44
|
+
"waiting",
|
|
45
|
+
"pending",
|
|
46
|
+
"succeeded",
|
|
47
|
+
"failed",
|
|
48
|
+
"cancelled"
|
|
49
|
+
];
|
|
50
|
+
const KIND_LABEL = {
|
|
51
|
+
thread: "Thread",
|
|
52
|
+
run: "Run"
|
|
53
|
+
};
|
|
54
|
+
function totalTokens(usage) {
|
|
55
|
+
if (!usage || usage.inputTokens === void 0 && usage.outputTokens === void 0) return null;
|
|
56
|
+
return (usage.inputTokens ?? 0) + (usage.outputTokens ?? 0);
|
|
57
|
+
}
|
|
58
|
+
const helper = createDataTableColumnHelper();
|
|
59
|
+
function buildColumns({ agents, formatTime, open, sideNav }) {
|
|
60
|
+
return helper.columns([
|
|
61
|
+
helper.accessor("title", {
|
|
62
|
+
header: "Conversation",
|
|
63
|
+
cell: ({ row }) => {
|
|
64
|
+
const item = row.original;
|
|
65
|
+
const Icon = item.kind === "run" ? WorkflowIcon : MessagesSquareIcon;
|
|
66
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
67
|
+
className: "flex min-w-0 flex-col gap-0.5",
|
|
68
|
+
children: [/* @__PURE__ */ jsxs("button", {
|
|
69
|
+
type: "button",
|
|
70
|
+
"data-slot": "conversation-browser-open",
|
|
71
|
+
onClick: () => open(item.id),
|
|
72
|
+
className: "flex min-w-0 items-center gap-2 text-start font-medium text-foreground outline-none after:absolute after:inset-0 after:rounded-[inherit] focus-visible:after:ring-1 focus-visible:after:ring-ring/40 focus-visible:after:ring-inset",
|
|
73
|
+
children: [
|
|
74
|
+
/* @__PURE__ */ jsx(Icon, {
|
|
75
|
+
"aria-hidden": "true",
|
|
76
|
+
className: "size-3.5 shrink-0 text-muted-foreground"
|
|
77
|
+
}),
|
|
78
|
+
/* @__PURE__ */ jsx("span", {
|
|
79
|
+
className: "truncate",
|
|
80
|
+
children: item.title
|
|
81
|
+
}),
|
|
82
|
+
/* @__PURE__ */ jsxs("span", {
|
|
83
|
+
className: "sr-only",
|
|
84
|
+
children: [", ", KIND_LABEL[item.kind].toLowerCase()]
|
|
85
|
+
})
|
|
86
|
+
]
|
|
87
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
88
|
+
className: "truncate ps-5.5 text-muted-foreground @min-[640px]/data-table-scroll:hidden",
|
|
89
|
+
children: [
|
|
90
|
+
item.agent,
|
|
91
|
+
" · ",
|
|
92
|
+
formatTime(item.startedAt)
|
|
93
|
+
]
|
|
94
|
+
})]
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
}),
|
|
98
|
+
helper.accessor("agent", {
|
|
99
|
+
header: "Agent",
|
|
100
|
+
meta: {
|
|
101
|
+
width: "8rem",
|
|
102
|
+
hideBelow: "sm",
|
|
103
|
+
...agents.length > 0 ? { filter: { options: agents.map((agent) => ({
|
|
104
|
+
label: agent,
|
|
105
|
+
value: agent
|
|
106
|
+
})) } } : {}
|
|
107
|
+
}
|
|
108
|
+
}),
|
|
109
|
+
helper.accessor("startedAt", {
|
|
110
|
+
header: "Started",
|
|
111
|
+
sortFn: "text",
|
|
112
|
+
cell: ({ getValue }) => /* @__PURE__ */ jsx("time", {
|
|
113
|
+
dateTime: getValue(),
|
|
114
|
+
className: "tabular-nums",
|
|
115
|
+
children: formatTime(getValue())
|
|
116
|
+
}),
|
|
117
|
+
meta: {
|
|
118
|
+
width: "6.75rem",
|
|
119
|
+
hideBelow: "sm"
|
|
120
|
+
}
|
|
121
|
+
}),
|
|
122
|
+
helper.accessor("status", {
|
|
123
|
+
header: "Status",
|
|
124
|
+
cell: ({ row }) => /* @__PURE__ */ jsxs("span", {
|
|
125
|
+
className: "flex items-center gap-1.5",
|
|
126
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
127
|
+
"aria-hidden": "true",
|
|
128
|
+
className: "flex shrink-0",
|
|
129
|
+
children: /* @__PURE__ */ jsx(StatusGlyph, {
|
|
130
|
+
status: STATUS_GLYPH[row.original.status],
|
|
131
|
+
size: 14
|
|
132
|
+
})
|
|
133
|
+
}), CONVERSATION_STATUS_LABEL[row.original.status]]
|
|
134
|
+
}),
|
|
135
|
+
meta: {
|
|
136
|
+
width: "7rem",
|
|
137
|
+
filter: { options: STATUS_ORDER.map((status) => ({
|
|
138
|
+
label: CONVERSATION_STATUS_LABEL[status],
|
|
139
|
+
value: status
|
|
140
|
+
})) }
|
|
141
|
+
}
|
|
142
|
+
}),
|
|
143
|
+
helper.accessor((row) => row.messageCount ?? null, {
|
|
144
|
+
id: "messages",
|
|
145
|
+
header: "Messages",
|
|
146
|
+
cell: ({ getValue }) => {
|
|
147
|
+
const count = getValue();
|
|
148
|
+
return count === null ? /* @__PURE__ */ jsx("span", {
|
|
149
|
+
className: "text-muted-foreground",
|
|
150
|
+
children: "-"
|
|
151
|
+
}) : count;
|
|
152
|
+
},
|
|
153
|
+
meta: {
|
|
154
|
+
label: "Messages",
|
|
155
|
+
width: "7rem",
|
|
156
|
+
align: "end",
|
|
157
|
+
hideBelow: sideNav ? "lg" : "md"
|
|
158
|
+
}
|
|
159
|
+
}),
|
|
160
|
+
helper.accessor((row) => totalTokens(row.usage), {
|
|
161
|
+
id: "usage",
|
|
162
|
+
header: "Usage",
|
|
163
|
+
cell: ({ row }) => {
|
|
164
|
+
const tokens = totalTokens(row.original.usage);
|
|
165
|
+
const cost = row.original.usage?.costUsd;
|
|
166
|
+
if (tokens === null && cost === void 0) return /* @__PURE__ */ jsx("span", {
|
|
167
|
+
className: "text-muted-foreground",
|
|
168
|
+
children: "-"
|
|
169
|
+
});
|
|
170
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
171
|
+
className: "whitespace-nowrap",
|
|
172
|
+
children: [
|
|
173
|
+
tokens === null ? null : `${formatTokens(tokens)} tokens`,
|
|
174
|
+
tokens !== null && cost !== void 0 ? /* @__PURE__ */ jsx("span", {
|
|
175
|
+
"aria-hidden": "true",
|
|
176
|
+
className: "text-muted-foreground",
|
|
177
|
+
children: " · "
|
|
178
|
+
}) : null,
|
|
179
|
+
cost === void 0 ? null : /* @__PURE__ */ jsx("span", {
|
|
180
|
+
className: "text-muted-foreground",
|
|
181
|
+
children: formatCost(cost)
|
|
182
|
+
})
|
|
183
|
+
]
|
|
184
|
+
});
|
|
185
|
+
},
|
|
186
|
+
meta: {
|
|
187
|
+
label: "Usage",
|
|
188
|
+
width: "9.5rem",
|
|
189
|
+
align: "end",
|
|
190
|
+
hideBelow: "md"
|
|
191
|
+
}
|
|
192
|
+
})
|
|
193
|
+
]);
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* The facts under the sheet's title. A run's status is left to the
|
|
197
|
+
* RunInspector's header just below, which words it in full with its glyph.
|
|
198
|
+
*/
|
|
199
|
+
function rowFacts(row, formatTime) {
|
|
200
|
+
return [
|
|
201
|
+
KIND_LABEL[row.kind],
|
|
202
|
+
row.agent,
|
|
203
|
+
`Started ${formatTime(row.startedAt)}`,
|
|
204
|
+
row.kind === "run" ? null : CONVERSATION_STATUS_LABEL[row.status],
|
|
205
|
+
row.messageCount === void 0 ? null : `${row.messageCount} ${row.messageCount === 1 ? "message" : "messages"}`
|
|
206
|
+
].filter((fact) => fact !== null).join(" · ");
|
|
207
|
+
}
|
|
208
|
+
function SheetBody({ row, detailError, onDetailRetry, runInspectorProps, transcriptProps }) {
|
|
209
|
+
if (row.kind === "thread") {
|
|
210
|
+
if (detailError && !row.messages) return /* @__PURE__ */ jsx("div", {
|
|
211
|
+
className: "p-4",
|
|
212
|
+
children: /* @__PURE__ */ jsx(ErrorState, {
|
|
213
|
+
title: detailError,
|
|
214
|
+
onRetry: onDetailRetry
|
|
215
|
+
})
|
|
216
|
+
});
|
|
217
|
+
return /* @__PURE__ */ jsx(TranscriptViewer, {
|
|
218
|
+
...transcriptProps,
|
|
219
|
+
messages: row.messages ?? [],
|
|
220
|
+
isLoading: row.messages === void 0,
|
|
221
|
+
error: row.messages ? detailError ?? null : null,
|
|
222
|
+
onRetry: onDetailRetry,
|
|
223
|
+
label: transcriptProps?.label ?? `Transcript: ${row.title}`,
|
|
224
|
+
className: cn("min-h-0 flex-1 p-4", transcriptProps?.className)
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
return /* @__PURE__ */ jsx("div", {
|
|
228
|
+
"data-slot": "conversation-browser-run",
|
|
229
|
+
className: "min-h-0 flex-1 overflow-y-auto p-4",
|
|
230
|
+
children: row.run ? /* @__PURE__ */ jsx(RunInspector, {
|
|
231
|
+
...runInspectorProps,
|
|
232
|
+
run: row.run,
|
|
233
|
+
title: null,
|
|
234
|
+
error: detailError ?? null
|
|
235
|
+
}) : detailError ? /* @__PURE__ */ jsx(ErrorState, {
|
|
236
|
+
title: detailError,
|
|
237
|
+
onRetry: onDetailRetry
|
|
238
|
+
}) : /* @__PURE__ */ jsx(Loading, {
|
|
239
|
+
label: "Loading run",
|
|
240
|
+
variant: "text",
|
|
241
|
+
rows: 6
|
|
242
|
+
})
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* A DataTable of an agent's threads and runs: the conversation, agent,
|
|
247
|
+
* start time, status (StatusGlyph), message count and usage, with search
|
|
248
|
+
* and filters by agent and status. Opening a row (a click anywhere on it, or
|
|
249
|
+
* Enter on its title) shows a Sheet with a TranscriptViewer for a thread or a
|
|
250
|
+
* RunInspector for a run. With `sideNav`, a BranchMenu lists the agents and,
|
|
251
|
+
* under each, its threads and runs.
|
|
252
|
+
*
|
|
253
|
+
* Dumb: rows come from props, and a row's transcript or run arrives on the
|
|
254
|
+
* row once the app loads it (`onOpenChange` says which). Server mode hands
|
|
255
|
+
* every query change to `onStateChange`, as DataTable does.
|
|
256
|
+
*/
|
|
257
|
+
function ConversationBrowser(props) {
|
|
258
|
+
const { rows, label = "Conversations", openId: _openId, defaultOpenId: _defaultOpenId, onOpenChange: _onOpenChange, detailError, onDetailRetry, agents: _agents, sideNav = false, formatTime = defaultFormatTime, isLoading, error, onRetry, emptyLabel = "No conversations yet", maxHeight, runInspectorProps, transcriptProps, className } = props;
|
|
259
|
+
const controllable = {};
|
|
260
|
+
if (_openId !== void 0) controllable.openId = _openId;
|
|
261
|
+
if (_defaultOpenId !== void 0) controllable.defaultOpenId = _defaultOpenId;
|
|
262
|
+
if (_onOpenChange) controllable.onOpenChange = _onOpenChange;
|
|
263
|
+
const [openId, setOpenId] = useControllableValue(controllable, {
|
|
264
|
+
valuePropName: "openId",
|
|
265
|
+
defaultValuePropName: "defaultOpenId",
|
|
266
|
+
trigger: "onOpenChange",
|
|
267
|
+
defaultValue: null
|
|
268
|
+
});
|
|
269
|
+
const openRow = openId ? rows.find((row) => row.id === openId) : void 0;
|
|
270
|
+
React.useEffect(() => {
|
|
271
|
+
if (openId && !openRow) setOpenId(null);
|
|
272
|
+
}, [
|
|
273
|
+
openId,
|
|
274
|
+
openRow,
|
|
275
|
+
setOpenId
|
|
276
|
+
]);
|
|
277
|
+
const [shownRow, setShownRow] = React.useState(openRow);
|
|
278
|
+
if (openRow && openRow !== shownRow) setShownRow(openRow);
|
|
279
|
+
const agents = React.useMemo(() => _agents ?? [...new Set(rows.map((row) => row.agent))].sort(), [_agents, rows]);
|
|
280
|
+
const openRef = React.useRef(setOpenId);
|
|
281
|
+
openRef.current = setOpenId;
|
|
282
|
+
const formatRef = React.useRef(formatTime);
|
|
283
|
+
formatRef.current = formatTime;
|
|
284
|
+
const columns = React.useMemo(() => buildColumns({
|
|
285
|
+
agents,
|
|
286
|
+
formatTime: (iso) => formatRef.current(iso),
|
|
287
|
+
open: (id) => openRef.current(id),
|
|
288
|
+
sideNav
|
|
289
|
+
}), [agents, sideNav]);
|
|
290
|
+
const navItems = React.useMemo(() => agents.map((agent) => ({
|
|
291
|
+
id: `agent:${agent}`,
|
|
292
|
+
label: agent,
|
|
293
|
+
icon: /* @__PURE__ */ jsx(BotIcon, {}),
|
|
294
|
+
children: rows.filter((row) => row.agent === agent).map((row) => ({
|
|
295
|
+
id: row.id,
|
|
296
|
+
label: row.title,
|
|
297
|
+
icon: row.kind === "run" ? /* @__PURE__ */ jsx(WorkflowIcon, {}) : /* @__PURE__ */ jsx(MessagesSquareIcon, {})
|
|
298
|
+
}))
|
|
299
|
+
})), [agents, rows]);
|
|
300
|
+
const tableModeProps = props.mode === "server" ? {
|
|
301
|
+
mode: "server",
|
|
302
|
+
state: props.state,
|
|
303
|
+
onStateChange: props.onStateChange,
|
|
304
|
+
total: props.total
|
|
305
|
+
} : {
|
|
306
|
+
...props.state ? { state: props.state } : {},
|
|
307
|
+
...props.defaultState ? { defaultState: props.defaultState } : {},
|
|
308
|
+
...props.onStateChange ? { onStateChange: props.onStateChange } : {}
|
|
309
|
+
};
|
|
310
|
+
const sheetRef = React.useRef(null);
|
|
311
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
312
|
+
"data-slot": "conversation-browser",
|
|
313
|
+
className: cn("@container/browser min-w-0", className),
|
|
314
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
315
|
+
className: cn("grid min-w-0 gap-4", sideNav && "@3xl/browser:grid-cols-[13rem_minmax(0,1fr)] @3xl/browser:items-start"),
|
|
316
|
+
children: [sideNav ? /* @__PURE__ */ jsx(BranchMenu, {
|
|
317
|
+
label: `${label} by agent`,
|
|
318
|
+
items: navItems,
|
|
319
|
+
active: openId ?? null,
|
|
320
|
+
onActiveChange: (id) => setOpenId(id),
|
|
321
|
+
className: "min-w-0 @max-3xl/browser:-ms-3"
|
|
322
|
+
}) : null, /* @__PURE__ */ jsx(DataTable, {
|
|
323
|
+
label,
|
|
324
|
+
columns,
|
|
325
|
+
rows,
|
|
326
|
+
getRowId: (row) => row.id,
|
|
327
|
+
getRowLabel: (row) => row.title,
|
|
328
|
+
isLoading,
|
|
329
|
+
error,
|
|
330
|
+
onRetry,
|
|
331
|
+
emptyLabel,
|
|
332
|
+
emptyDescription: "Threads and runs show here once an agent records any.",
|
|
333
|
+
searchPlaceholder: "Search conversations...",
|
|
334
|
+
...maxHeight ? { maxHeight } : {},
|
|
335
|
+
className: "min-w-0 [&_tbody_tr]:relative [&_tbody_tr:has([data-slot=conversation-browser-open]:focus-visible)]:bg-muted/50 @max-[40rem]/browser:**:data-[slot=data-table-scroll]:max-h-none",
|
|
336
|
+
...tableModeProps
|
|
337
|
+
})]
|
|
338
|
+
}), /* @__PURE__ */ jsx(Sheet, {
|
|
339
|
+
open: openRow !== void 0,
|
|
340
|
+
onOpenChange: (open) => {
|
|
341
|
+
if (!open) setOpenId(null);
|
|
342
|
+
},
|
|
343
|
+
children: /* @__PURE__ */ jsx(SheetContent, {
|
|
344
|
+
side: "right",
|
|
345
|
+
"data-slot": "conversation-browser-sheet",
|
|
346
|
+
ref: sheetRef,
|
|
347
|
+
initialFocus: sheetRef,
|
|
348
|
+
className: "gap-0 outline-none data-[side=right]:w-full data-[side=right]:sm:max-w-4xl",
|
|
349
|
+
children: shownRow ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs(SheetHeader, {
|
|
350
|
+
className: "border-b p-4 pr-12",
|
|
351
|
+
children: [/* @__PURE__ */ jsx(SheetTitle, { children: shownRow.title }), /* @__PURE__ */ jsx(SheetDescription, { children: rowFacts(shownRow, formatTime) })]
|
|
352
|
+
}), /* @__PURE__ */ jsx(SheetBody, {
|
|
353
|
+
row: shownRow,
|
|
354
|
+
detailError,
|
|
355
|
+
onDetailRetry,
|
|
356
|
+
runInspectorProps,
|
|
357
|
+
transcriptProps
|
|
358
|
+
})] }) : null
|
|
359
|
+
})
|
|
360
|
+
})]
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
//#endregion
|
|
364
|
+
export { ConversationBrowser };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Redaction, WithheldGroup } from "../../types.js";
|
|
2
|
+
//#region src/ai/compositions/redaction-marker/redaction-marker.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* `T` with every key `Shape` does not name typed `never`: an object that
|
|
5
|
+
* carries any key beyond the contract fails to type-check, even when it is
|
|
6
|
+
* passed through a variable (where TypeScript skips its excess-property check).
|
|
7
|
+
*/
|
|
8
|
+
type Only<T, Shape> = T & { readonly [Key in Exclude<keyof T, keyof Shape>]: never; };
|
|
9
|
+
/**
|
|
10
|
+
* A Redaction with nothing beyond its contract, down to each withheld group:
|
|
11
|
+
* field names and categories only. A withheld value has no key to ride in, so
|
|
12
|
+
* the props cannot carry one (RFC-02 Design 4, Security Considerations).
|
|
13
|
+
*/
|
|
14
|
+
export type GatedRedaction<R extends Redaction> = Only<R, Redaction> & {
|
|
15
|
+
readonly withheld: readonly Only<R["withheld"][number], WithheldGroup>[];
|
|
16
|
+
};
|
|
17
|
+
export interface RedactionMarkerProps<R extends Redaction = Redaction> {
|
|
18
|
+
/**
|
|
19
|
+
* The gated summary and what the gate withheld, as names grouped by
|
|
20
|
+
* category. The type admits names and counts only, never withheld values.
|
|
21
|
+
*/
|
|
22
|
+
redaction: GatedRedaction<R>;
|
|
23
|
+
/** Who received the summary, in running text. Defaults to "the hosted agent". */
|
|
24
|
+
recipient?: string;
|
|
25
|
+
/** Whether the withheld field list is expanded (controlled). */
|
|
26
|
+
open?: boolean;
|
|
27
|
+
/** Whether the withheld field list starts expanded (uncontrolled). */
|
|
28
|
+
defaultOpen?: boolean;
|
|
29
|
+
/** Called when the owner expands or collapses the withheld field list. */
|
|
30
|
+
onOpenChange?: (open: boolean) => void;
|
|
31
|
+
className?: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* What a privacy gate let a hosted agent see: the gated summary (and the
|
|
35
|
+
* facts it itemized), next to a "N fields withheld" marker. The marker
|
|
36
|
+
* expands to the withheld field names grouped by category, with counts. The
|
|
37
|
+
* props carry names only; a withheld value cannot be passed in.
|
|
38
|
+
*
|
|
39
|
+
* Built on the registry's GuardrailNotice.
|
|
40
|
+
*/
|
|
41
|
+
export declare function RedactionMarker<const R extends Redaction>({ redaction, recipient, open, defaultOpen, onOpenChange, className }: RedactionMarkerProps<R>): import("react").JSX.Element;
|
|
42
|
+
//#endregion
|