@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,202 @@
|
|
|
1
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../../../components/ui/collapsible.js";
|
|
2
|
+
import { collapsePanel, mono, paper } from "../../../components/assistant-ui/elements/surfaces.js";
|
|
3
|
+
import { GuardrailNotice } from "../../../components/assistant-ui/elements/guardrail-notice.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { cn } from "cn";
|
|
6
|
+
import { ChevronDownIcon, CloudIcon } from "lucide-react";
|
|
7
|
+
//#region src/ai/compositions/redaction-marker/redaction-marker.tsx
|
|
8
|
+
const plural = (count, one, many) => `${count.toLocaleString("en-US")} ${count === 1 ? one : many}`;
|
|
9
|
+
/** A category id as a label: `relationship_trouble` reads "relationship trouble". */
|
|
10
|
+
const categoryLabel = (category) => category.replace(/[_-]+/g, " ").trim();
|
|
11
|
+
/**
|
|
12
|
+
* Facts with a React key each. Facts carry no id and the gate may pass the
|
|
13
|
+
* same fact twice, so the key is the fact's content plus which repeat of that
|
|
14
|
+
* content it is: unique, and stable while the list keeps its order.
|
|
15
|
+
*/
|
|
16
|
+
function keyFacts(facts) {
|
|
17
|
+
const seen = /* @__PURE__ */ new Map();
|
|
18
|
+
return facts.map((fact) => {
|
|
19
|
+
const content = JSON.stringify([fact.category, fact.statement]);
|
|
20
|
+
const repeat = seen.get(content) ?? 0;
|
|
21
|
+
seen.set(content, repeat + 1);
|
|
22
|
+
return {
|
|
23
|
+
fact,
|
|
24
|
+
key: `${content}#${repeat}`
|
|
25
|
+
};
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The withheld groups as shown: a category listed twice is one category, and
|
|
30
|
+
* a name listed twice (two values under one field) is one withheld field.
|
|
31
|
+
*/
|
|
32
|
+
function mergeGroups(withheld) {
|
|
33
|
+
const byCategory = /* @__PURE__ */ new Map();
|
|
34
|
+
for (const group of withheld) {
|
|
35
|
+
const fields = byCategory.get(group.category) ?? /* @__PURE__ */ new Set();
|
|
36
|
+
for (const field of group.fields) fields.add(field);
|
|
37
|
+
byCategory.set(group.category, fields);
|
|
38
|
+
}
|
|
39
|
+
return [...byCategory].map(([category, fields]) => ({
|
|
40
|
+
category,
|
|
41
|
+
fields: [...fields]
|
|
42
|
+
})).filter((group) => group.fields.length > 0);
|
|
43
|
+
}
|
|
44
|
+
const timeFormat = new Intl.DateTimeFormat("en-US", {
|
|
45
|
+
dateStyle: "medium",
|
|
46
|
+
timeStyle: "short"
|
|
47
|
+
});
|
|
48
|
+
function formatProducedAt(iso) {
|
|
49
|
+
const time = Date.parse(iso);
|
|
50
|
+
return Number.isNaN(time) ? void 0 : timeFormat.format(time);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* What a privacy gate let a hosted agent see: the gated summary (and the
|
|
54
|
+
* facts it itemized), next to a "N fields withheld" marker. The marker
|
|
55
|
+
* expands to the withheld field names grouped by category, with counts. The
|
|
56
|
+
* props carry names only; a withheld value cannot be passed in.
|
|
57
|
+
*
|
|
58
|
+
* Built on the registry's GuardrailNotice.
|
|
59
|
+
*/
|
|
60
|
+
function RedactionMarker({ redaction, recipient = "the hosted agent", open, defaultOpen = false, onOpenChange, className }) {
|
|
61
|
+
const { summary, facts = [], gate, producedAt } = redaction;
|
|
62
|
+
const groups = mergeGroups(redaction.withheld);
|
|
63
|
+
const withheldCount = groups.reduce((sum, group) => sum + group.fields.length, 0);
|
|
64
|
+
const producedLabel = producedAt ? formatProducedAt(producedAt) : void 0;
|
|
65
|
+
return /* @__PURE__ */ jsx("section", {
|
|
66
|
+
"aria-label": "Gated summary",
|
|
67
|
+
"data-slot": "redaction-marker",
|
|
68
|
+
className: cn("@container/redaction-marker w-full", className),
|
|
69
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
70
|
+
className: "grid grid-cols-1 items-start gap-3 @2xl/redaction-marker:grid-cols-[minmax(0,1fr)_22rem] @2xl/redaction-marker:items-stretch",
|
|
71
|
+
children: [/* @__PURE__ */ jsxs("article", {
|
|
72
|
+
"data-slot": "redaction-marker-summary",
|
|
73
|
+
className: cn(paper, "@container/redaction-summary flex min-w-0 flex-col gap-3 rounded-[20px] p-4"),
|
|
74
|
+
children: [
|
|
75
|
+
/* @__PURE__ */ jsxs("div", {
|
|
76
|
+
className: "grid grid-cols-[auto_minmax(0,1fr)] items-center gap-x-2.5 @sm/redaction-summary:grid-cols-[auto_minmax(0,1fr)_auto]",
|
|
77
|
+
children: [
|
|
78
|
+
/* @__PURE__ */ jsx("span", {
|
|
79
|
+
className: "flex size-7 shrink-0 items-center justify-center rounded-lg bg-info/12 text-info dark:text-info",
|
|
80
|
+
children: /* @__PURE__ */ jsx(CloudIcon, {
|
|
81
|
+
"aria-hidden": "true",
|
|
82
|
+
className: "size-3.5"
|
|
83
|
+
})
|
|
84
|
+
}),
|
|
85
|
+
/* @__PURE__ */ jsxs("div", {
|
|
86
|
+
className: "flex min-w-0 flex-col",
|
|
87
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
88
|
+
className: "text-[13.5px] font-medium",
|
|
89
|
+
children: "Gated summary"
|
|
90
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
91
|
+
className: "text-muted-foreground text-xs",
|
|
92
|
+
children: [
|
|
93
|
+
"What ",
|
|
94
|
+
recipient,
|
|
95
|
+
" received"
|
|
96
|
+
]
|
|
97
|
+
})]
|
|
98
|
+
}),
|
|
99
|
+
producedAt && producedLabel ? /* @__PURE__ */ jsx("time", {
|
|
100
|
+
dateTime: producedAt,
|
|
101
|
+
className: cn(mono, "text-muted-foreground col-start-2 mt-0.5 tabular-nums @sm/redaction-summary:col-start-3 @sm/redaction-summary:mt-0 @sm/redaction-summary:self-start"),
|
|
102
|
+
children: producedLabel
|
|
103
|
+
}) : null
|
|
104
|
+
]
|
|
105
|
+
}),
|
|
106
|
+
/* @__PURE__ */ jsx("p", {
|
|
107
|
+
"data-slot": "redaction-marker-summary-text",
|
|
108
|
+
className: "text-[13.5px] leading-relaxed break-words whitespace-pre-wrap",
|
|
109
|
+
children: summary
|
|
110
|
+
}),
|
|
111
|
+
facts.length > 0 ? /* @__PURE__ */ jsxs("div", {
|
|
112
|
+
className: "flex flex-col gap-1.5",
|
|
113
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
114
|
+
className: cn(mono, "text-muted-foreground"),
|
|
115
|
+
children: "facts passed"
|
|
116
|
+
}), /* @__PURE__ */ jsx("ul", {
|
|
117
|
+
"aria-label": "Facts passed",
|
|
118
|
+
className: "grid grid-cols-[auto_minmax(0,1fr)] gap-x-3 gap-y-1.5",
|
|
119
|
+
children: keyFacts(facts).map(({ fact, key }) => /* @__PURE__ */ jsxs("li", {
|
|
120
|
+
className: "col-span-2 grid grid-cols-subgrid items-baseline text-[13px]",
|
|
121
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
122
|
+
className: cn(mono, "text-muted-foreground"),
|
|
123
|
+
children: categoryLabel(fact.category)
|
|
124
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
125
|
+
className: "text-foreground/80 break-words",
|
|
126
|
+
children: fact.statement
|
|
127
|
+
})]
|
|
128
|
+
}, key))
|
|
129
|
+
})]
|
|
130
|
+
}) : null
|
|
131
|
+
]
|
|
132
|
+
}), /* @__PURE__ */ jsx(GuardrailNotice, {
|
|
133
|
+
className: "max-w-none",
|
|
134
|
+
title: withheldCount > 0 ? `${plural(withheldCount, "field", "fields")} withheld` : "Nothing withheld",
|
|
135
|
+
policy: gate ?? "privacy gate",
|
|
136
|
+
explanation: withheldCount > 0 ? `Kept on this machine: ${recipient} received the summary, not these values.` : "The gate passed the whole payload through.",
|
|
137
|
+
alternatives: [],
|
|
138
|
+
children: withheldCount > 0 ? /* @__PURE__ */ jsxs(Collapsible, {
|
|
139
|
+
...open === void 0 ? { defaultOpen } : { open },
|
|
140
|
+
onOpenChange: (next) => onOpenChange?.(next),
|
|
141
|
+
children: [/* @__PURE__ */ jsxs(CollapsibleTrigger, {
|
|
142
|
+
className: "group/withheld text-foreground/80 hover:text-foreground focus-visible:text-foreground focus-visible:ring-ring/30 -mx-1.5 flex w-[calc(100%+0.75rem)] items-center gap-1.5 rounded-md px-1.5 py-1 text-start text-[13px] outline-none transition-colors focus-visible:ring-2",
|
|
143
|
+
children: [/* @__PURE__ */ jsxs("span", {
|
|
144
|
+
className: "flex-1",
|
|
145
|
+
children: ["Field names", /* @__PURE__ */ jsxs("span", {
|
|
146
|
+
className: "text-muted-foreground",
|
|
147
|
+
children: [
|
|
148
|
+
" ",
|
|
149
|
+
"· ",
|
|
150
|
+
plural(groups.length, "category", "categories")
|
|
151
|
+
]
|
|
152
|
+
})]
|
|
153
|
+
}), /* @__PURE__ */ jsx(ChevronDownIcon, {
|
|
154
|
+
"aria-hidden": "true",
|
|
155
|
+
className: "text-muted-foreground size-3.5 transition-transform duration-200 group-data-[panel-open]/withheld:rotate-180 motion-reduce:transition-none"
|
|
156
|
+
})]
|
|
157
|
+
}), /* @__PURE__ */ jsx(CollapsibleContent, {
|
|
158
|
+
className: collapsePanel,
|
|
159
|
+
children: /* @__PURE__ */ jsx("ul", {
|
|
160
|
+
"aria-label": "Withheld fields",
|
|
161
|
+
className: "flex flex-col gap-3 pt-2",
|
|
162
|
+
children: groups.map((group) => /* @__PURE__ */ jsx(WithheldCategory, {
|
|
163
|
+
category: group.category,
|
|
164
|
+
fields: group.fields
|
|
165
|
+
}, group.category))
|
|
166
|
+
})
|
|
167
|
+
})]
|
|
168
|
+
}) : null
|
|
169
|
+
})]
|
|
170
|
+
})
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
function WithheldCategory({ category, fields }) {
|
|
174
|
+
const label = categoryLabel(category);
|
|
175
|
+
return /* @__PURE__ */ jsxs("li", {
|
|
176
|
+
"data-slot": "redaction-marker-category",
|
|
177
|
+
className: "flex flex-col gap-1.5",
|
|
178
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
179
|
+
className: "flex min-w-0 items-baseline gap-2",
|
|
180
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
181
|
+
className: "min-w-0 flex-1 truncate text-[13px] font-medium first-letter:uppercase",
|
|
182
|
+
children: label
|
|
183
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
184
|
+
className: cn(mono, "text-muted-foreground shrink-0 tabular-nums"),
|
|
185
|
+
children: plural(fields.length, "field", "fields")
|
|
186
|
+
})]
|
|
187
|
+
}), /* @__PURE__ */ jsx("ul", {
|
|
188
|
+
"aria-label": `${label} fields`,
|
|
189
|
+
className: "flex flex-wrap gap-1",
|
|
190
|
+
children: fields.map((field) => /* @__PURE__ */ jsx("li", {
|
|
191
|
+
className: "min-w-0",
|
|
192
|
+
children: /* @__PURE__ */ jsx("code", {
|
|
193
|
+
title: field,
|
|
194
|
+
className: cn(mono, "text-foreground/80 bg-foreground/[0.05] block max-w-full truncate rounded-md px-1.5 py-0.5"),
|
|
195
|
+
children: field
|
|
196
|
+
})
|
|
197
|
+
}, field))
|
|
198
|
+
})]
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
//#endregion
|
|
202
|
+
export { RedactionMarker };
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import { ChevronRightIcon } from "lucide-react";
|
|
5
|
+
//#region src/ai/compositions/run-inspector/json-view.tsx
|
|
6
|
+
function isContainer(value) {
|
|
7
|
+
return typeof value === "object" && value !== null;
|
|
8
|
+
}
|
|
9
|
+
function entriesOf(value) {
|
|
10
|
+
return Array.isArray(value) ? value.map((item, index) => [String(index), item]) : Object.entries(value);
|
|
11
|
+
}
|
|
12
|
+
function sizeLabel(value) {
|
|
13
|
+
if (Array.isArray(value)) return `${value.length} ${value.length === 1 ? "item" : "items"}`;
|
|
14
|
+
const count = Object.keys(value).length;
|
|
15
|
+
return `${count} ${count === 1 ? "key" : "keys"}`;
|
|
16
|
+
}
|
|
17
|
+
const TOKEN = {
|
|
18
|
+
key: "text-foreground",
|
|
19
|
+
string: "text-success dark:text-success",
|
|
20
|
+
number: "text-info dark:text-info",
|
|
21
|
+
literal: "text-violet-700 dark:text-violet-300",
|
|
22
|
+
punctuation: "text-muted-foreground"
|
|
23
|
+
};
|
|
24
|
+
function Primitive({ value }) {
|
|
25
|
+
if (typeof value === "string") return /* @__PURE__ */ jsx("span", {
|
|
26
|
+
className: TOKEN.string,
|
|
27
|
+
children: JSON.stringify(value)
|
|
28
|
+
});
|
|
29
|
+
if (typeof value === "number") return /* @__PURE__ */ jsx("span", {
|
|
30
|
+
className: TOKEN.number,
|
|
31
|
+
children: String(value)
|
|
32
|
+
});
|
|
33
|
+
return /* @__PURE__ */ jsx("span", {
|
|
34
|
+
className: TOKEN.literal,
|
|
35
|
+
children: String(value)
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
/** `"name": ` before a value inside an object; nothing inside an array or at the root. */
|
|
39
|
+
function KeyLabel({ name }) {
|
|
40
|
+
if (name === null) return null;
|
|
41
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
|
|
42
|
+
className: TOKEN.key,
|
|
43
|
+
children: JSON.stringify(name)
|
|
44
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
45
|
+
className: TOKEN.punctuation,
|
|
46
|
+
children: ": "
|
|
47
|
+
})] });
|
|
48
|
+
}
|
|
49
|
+
const INDENT_REM = 1;
|
|
50
|
+
function JsonNode({ name, spoken, value, depth, last, collapseDepth }) {
|
|
51
|
+
const comma = last ? null : /* @__PURE__ */ jsx("span", {
|
|
52
|
+
className: TOKEN.punctuation,
|
|
53
|
+
children: ","
|
|
54
|
+
});
|
|
55
|
+
const indent = { paddingInlineStart: `${depth * INDENT_REM + INDENT_REM}rem` };
|
|
56
|
+
if (!isContainer(value)) return /* @__PURE__ */ jsxs("div", {
|
|
57
|
+
"data-slot": "json-view-row",
|
|
58
|
+
style: indent,
|
|
59
|
+
className: "wrap-anywhere",
|
|
60
|
+
children: [
|
|
61
|
+
/* @__PURE__ */ jsx(KeyLabel, { name }),
|
|
62
|
+
/* @__PURE__ */ jsx(Primitive, { value }),
|
|
63
|
+
comma
|
|
64
|
+
]
|
|
65
|
+
});
|
|
66
|
+
return /* @__PURE__ */ jsx(JsonContainer, {
|
|
67
|
+
name,
|
|
68
|
+
spoken,
|
|
69
|
+
value,
|
|
70
|
+
depth,
|
|
71
|
+
comma,
|
|
72
|
+
collapseDepth
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
function JsonContainer({ name, spoken, value, depth, comma, collapseDepth }) {
|
|
76
|
+
const entries = entriesOf(value);
|
|
77
|
+
const [open, setOpen] = React.useState(depth < collapseDepth);
|
|
78
|
+
const [opening, closing] = Array.isArray(value) ? ["[", "]"] : ["{", "}"];
|
|
79
|
+
const indent = { paddingInlineStart: `${depth * INDENT_REM + INDENT_REM}rem` };
|
|
80
|
+
if (entries.length === 0) return /* @__PURE__ */ jsxs("div", {
|
|
81
|
+
"data-slot": "json-view-row",
|
|
82
|
+
style: indent,
|
|
83
|
+
children: [
|
|
84
|
+
/* @__PURE__ */ jsx(KeyLabel, { name }),
|
|
85
|
+
/* @__PURE__ */ jsxs("span", {
|
|
86
|
+
className: TOKEN.punctuation,
|
|
87
|
+
children: [opening, closing]
|
|
88
|
+
}),
|
|
89
|
+
comma
|
|
90
|
+
]
|
|
91
|
+
});
|
|
92
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
93
|
+
"data-slot": "json-view-node",
|
|
94
|
+
children: [/* @__PURE__ */ jsxs("button", {
|
|
95
|
+
type: "button",
|
|
96
|
+
"aria-expanded": open,
|
|
97
|
+
"aria-label": `${spoken}, ${Array.isArray(value) ? "array" : "object"}, ${sizeLabel(value)}`,
|
|
98
|
+
onClick: () => setOpen(!open),
|
|
99
|
+
style: indent,
|
|
100
|
+
className: "group/json relative block w-full rounded-sm text-start outline-none hover:bg-foreground/[0.04] focus-visible:bg-foreground/[0.04] focus-visible:ring-1 focus-visible:ring-ring/70 focus-visible:ring-inset",
|
|
101
|
+
children: [
|
|
102
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, {
|
|
103
|
+
"aria-hidden": "true",
|
|
104
|
+
className: cn("absolute top-[0.3125rem] size-3 text-muted-foreground transition-transform duration-150 motion-reduce:transition-none", open && "rotate-90"),
|
|
105
|
+
style: { insetInlineStart: `${depth * INDENT_REM + .125}rem` }
|
|
106
|
+
}),
|
|
107
|
+
/* @__PURE__ */ jsx(KeyLabel, { name }),
|
|
108
|
+
/* @__PURE__ */ jsx("span", {
|
|
109
|
+
className: TOKEN.punctuation,
|
|
110
|
+
children: opening
|
|
111
|
+
}),
|
|
112
|
+
open ? null : /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
113
|
+
/* @__PURE__ */ jsx("span", {
|
|
114
|
+
className: "mx-1 rounded-sm bg-foreground/[0.06] px-1 text-muted-foreground",
|
|
115
|
+
children: sizeLabel(value)
|
|
116
|
+
}),
|
|
117
|
+
/* @__PURE__ */ jsx("span", {
|
|
118
|
+
className: TOKEN.punctuation,
|
|
119
|
+
children: closing
|
|
120
|
+
}),
|
|
121
|
+
comma
|
|
122
|
+
] })
|
|
123
|
+
]
|
|
124
|
+
}), open ? /* @__PURE__ */ jsxs(Fragment$1, { children: [entries.map(([key, item], index) => /* @__PURE__ */ jsx(JsonNode, {
|
|
125
|
+
name: Array.isArray(value) ? null : key,
|
|
126
|
+
spoken: Array.isArray(value) ? `item ${index + 1}` : key,
|
|
127
|
+
value: item,
|
|
128
|
+
depth: depth + 1,
|
|
129
|
+
last: index === entries.length - 1,
|
|
130
|
+
collapseDepth
|
|
131
|
+
}, key)), /* @__PURE__ */ jsxs("div", {
|
|
132
|
+
"data-slot": "json-view-row",
|
|
133
|
+
style: indent,
|
|
134
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
135
|
+
className: TOKEN.punctuation,
|
|
136
|
+
children: closing
|
|
137
|
+
}), comma]
|
|
138
|
+
})] }) : null]
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* A JSON value, pretty-printed: indented, with colored tokens, and every
|
|
143
|
+
* object and array collapsible by its own disclosure button (Enter or Space).
|
|
144
|
+
* Objects and arrays nested `collapseDepth` deep or deeper start collapsed,
|
|
145
|
+
* their size shown in place. Long strings wrap; the view scrolls past 20rem.
|
|
146
|
+
*/
|
|
147
|
+
function JsonView({ value, label, collapseDepth = 2, className }) {
|
|
148
|
+
return /* @__PURE__ */ jsx("div", {
|
|
149
|
+
role: "group",
|
|
150
|
+
"aria-label": label,
|
|
151
|
+
"data-slot": "json-view",
|
|
152
|
+
className: cn("max-h-80 overflow-auto rounded-lg border border-border/60 bg-muted/40 py-2 ps-1.5 pe-3 font-mono text-[11.5px] leading-5", className),
|
|
153
|
+
children: /* @__PURE__ */ jsx(JsonNode, {
|
|
154
|
+
name: null,
|
|
155
|
+
spoken: label,
|
|
156
|
+
value,
|
|
157
|
+
depth: 0,
|
|
158
|
+
last: true,
|
|
159
|
+
collapseDepth
|
|
160
|
+
})
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
//#endregion
|
|
164
|
+
export { JsonView };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { Run } from "../../types.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
//#region src/ai/compositions/run-inspector/run-inspector.d.ts
|
|
4
|
+
/** How the steps are drawn: a step list, or bars on the run's time axis. */
|
|
5
|
+
export type RunInspectorView = "timeline" | "waterfall";
|
|
6
|
+
export interface RunInspectorProps extends Omit<React.ComponentProps<"section">, "children" | "title" | "onError"> {
|
|
7
|
+
/** The run to inspect. */
|
|
8
|
+
run: Run;
|
|
9
|
+
/**
|
|
10
|
+
* The heading. Defaults to the run's objective; pass `null` when the
|
|
11
|
+
* surrounding surface (a sheet, a page) already names the run.
|
|
12
|
+
*/
|
|
13
|
+
title?: React.ReactNode | null;
|
|
14
|
+
/** Accessible name of the inspector. Defaults to "Run" and the objective. */
|
|
15
|
+
label?: string;
|
|
16
|
+
/** The selected step's id (controlled). */
|
|
17
|
+
selectedStepId?: string | null;
|
|
18
|
+
/**
|
|
19
|
+
* The step selected on mount (uncontrolled). Defaults to the first failed
|
|
20
|
+
* step, else the running one, else the first.
|
|
21
|
+
*/
|
|
22
|
+
defaultSelectedStepId?: string | null;
|
|
23
|
+
/** The owner selected a step, by click or with the arrow keys. */
|
|
24
|
+
onSelectedStepChange?: (stepId: string) => void;
|
|
25
|
+
/** The view (controlled). */
|
|
26
|
+
view?: RunInspectorView;
|
|
27
|
+
/** The view on mount (uncontrolled). Defaults to `timeline`. */
|
|
28
|
+
defaultView?: RunInspectorView;
|
|
29
|
+
onViewChange?: (view: RunInspectorView) => void;
|
|
30
|
+
/**
|
|
31
|
+
* The reference time (ISO 8601) a running run and its open steps are
|
|
32
|
+
* measured to. The app ticks it for a live run; without it they are
|
|
33
|
+
* measured to the latest time the record carries. The inspector never
|
|
34
|
+
* reads a clock.
|
|
35
|
+
*/
|
|
36
|
+
now?: string;
|
|
37
|
+
/** Formats an ISO time for display. Defaults to the local time, such as 09:02:13. */
|
|
38
|
+
formatTime?: (iso: string) => string;
|
|
39
|
+
/** Show placeholders while the run loads. */
|
|
40
|
+
isLoading?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Plain-text load error, such as a failed refresh. It shows in place under
|
|
43
|
+
* the header, and whatever of the run is loaded stays on screen.
|
|
44
|
+
*/
|
|
45
|
+
error?: string | null;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* The timeline of one agent run: its steps, reasoning, tool calls with their
|
|
49
|
+
* input and result, timings, errors and retries, and the run's usage.
|
|
50
|
+
*
|
|
51
|
+
* Two views of the steps, switched with a ScrubSelect: a timeline (the
|
|
52
|
+
* registry's ToolTimeline, one row per step with its StatusGlyph) and a
|
|
53
|
+
* waterfall (the registry's TraceWaterfall, each step a bar on the run's time
|
|
54
|
+
* axis). Either way the steps are a listbox: a click or the arrow keys (Home
|
|
55
|
+
* and End too) select a step, and its detail shows beside the steps on a wide
|
|
56
|
+
* container and below them on a narrow one. Plan steps show their progress
|
|
57
|
+
* with a Stepper and their items with CheckItems.
|
|
58
|
+
*
|
|
59
|
+
* Dumb: the run is a prop, and selection and view are UI state the app may
|
|
60
|
+
* control. It never reads a clock: pass `now` to measure a live run.
|
|
61
|
+
*
|
|
62
|
+
* Scale limit: both views mount every step - neither the timeline nor the
|
|
63
|
+
* waterfall virtualizes - so rendering cost grows with the run's step count.
|
|
64
|
+
*/
|
|
65
|
+
export declare function RunInspector(props: RunInspectorProps): React.JSX.Element;
|
|
66
|
+
//#endregion
|