@cueplusplus/ui 0.3.0 → 0.5.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/CHANGELOG.md +2229 -0
- package/dist/agent-runtime/_glyphs.js +43 -0
- package/dist/agent-runtime/branch-picker.d.ts +45 -0
- package/dist/agent-runtime/branch-picker.js +87 -0
- package/dist/agent-runtime/index.d.ts +4 -0
- package/dist/agent-runtime/index.js +4 -0
- package/dist/agent-runtime/tool-call-card.d.ts +69 -0
- package/dist/agent-runtime/tool-call-card.js +187 -0
- package/dist/agent-runtime/use-agent-thread.d.ts +164 -0
- package/dist/agent-runtime/use-agent-thread.js +251 -0
- package/dist/chat/index.d.ts +2 -2
- package/dist/chat/message-list.d.ts +6 -0
- package/dist/chat/message-list.js +35 -0
- package/dist/chrome/app-shell.d.ts +52 -2
- package/dist/chrome/app-shell.js +80 -8
- package/dist/chrome/index.d.ts +2 -2
- package/dist/configurator/_export.js +3 -2
- package/dist/configurator/_overrides.d.ts +1 -1
- package/dist/configurator/token-editor.js +4 -1
- package/dist/date/_segments.js +37 -2
- package/dist/elements/activity-graph.d.ts +40 -0
- package/dist/elements/activity-graph.js +81 -0
- package/dist/elements/agent-card.d.ts +49 -0
- package/dist/elements/agent-card.js +91 -0
- package/dist/elements/agent-handoff.d.ts +24 -0
- package/dist/elements/agent-handoff.js +53 -0
- package/dist/elements/agent-mode-badge.d.ts +72 -0
- package/dist/elements/agent-mode-badge.js +110 -0
- package/dist/elements/agent-plan.d.ts +24 -0
- package/dist/elements/agent-plan.js +74 -0
- package/dist/elements/agent-status.d.ts +29 -0
- package/dist/elements/agent-status.js +46 -0
- package/dist/elements/agent-surface.d.ts +65 -0
- package/dist/elements/agent-surface.js +68 -0
- package/dist/elements/animated-number.d.ts +86 -0
- package/dist/elements/animated-number.js +118 -0
- package/dist/elements/approval-card.d.ts +40 -0
- package/dist/elements/approval-card.js +78 -0
- package/dist/elements/artifact-card.d.ts +30 -0
- package/dist/elements/artifact-card.js +58 -0
- package/dist/elements/background-inbox.d.ts +39 -0
- package/dist/elements/background-inbox.js +60 -0
- package/dist/elements/canvas-split.d.ts +77 -0
- package/dist/elements/canvas-split.js +138 -0
- package/dist/elements/chart.d.ts +41 -0
- package/dist/elements/chart.js +117 -0
- package/dist/elements/chat-panel.d.ts +46 -0
- package/dist/elements/chat-panel.js +104 -0
- package/dist/elements/checkpoint-history.d.ts +31 -0
- package/dist/elements/checkpoint-history.js +65 -0
- package/dist/elements/clamp.d.ts +90 -0
- package/dist/elements/clamp.js +109 -0
- package/dist/elements/code-diff.d.ts +42 -0
- package/dist/elements/code-diff.js +69 -0
- package/dist/elements/code-runner.d.ts +38 -0
- package/dist/elements/code-runner.js +84 -0
- package/dist/elements/command-palette.d.ts +48 -0
- package/dist/elements/command-palette.js +129 -0
- package/dist/elements/compaction-row.d.ts +63 -0
- package/dist/elements/compaction-row.js +110 -0
- package/dist/elements/comparison-card.d.ts +47 -0
- package/dist/elements/comparison-card.js +69 -0
- package/dist/elements/composer.d.ts +274 -0
- package/dist/elements/composer.js +505 -0
- package/dist/elements/computer-use.d.ts +40 -0
- package/dist/elements/computer-use.js +92 -0
- package/dist/elements/confidence-marker.d.ts +39 -0
- package/dist/elements/confidence-marker.js +64 -0
- package/dist/elements/connection-state.d.ts +29 -0
- package/dist/elements/connection-state.js +66 -0
- package/dist/elements/context-breakdown.d.ts +30 -0
- package/dist/elements/context-breakdown.js +86 -0
- package/dist/elements/context-usage.d.ts +99 -0
- package/dist/elements/context-usage.js +225 -0
- package/dist/elements/conversation-search.d.ts +48 -0
- package/dist/elements/conversation-search.js +88 -0
- package/dist/elements/cost-meter.d.ts +33 -0
- package/dist/elements/cost-meter.js +75 -0
- package/dist/elements/data-table.d.ts +31 -0
- package/dist/elements/data-table.js +67 -0
- package/dist/elements/day-separator.d.ts +34 -0
- package/dist/elements/day-separator.js +50 -0
- package/dist/elements/diagram.d.ts +34 -0
- package/dist/elements/diagram.js +75 -0
- package/dist/elements/document-reference.d.ts +37 -0
- package/dist/elements/document-reference.js +66 -0
- package/dist/elements/draft-restore.d.ts +27 -0
- package/dist/elements/draft-restore.js +54 -0
- package/dist/elements/edit-message.d.ts +36 -0
- package/dist/elements/edit-message.js +77 -0
- package/dist/elements/elements.css +459 -0
- package/dist/elements/elicitation-form.d.ts +48 -0
- package/dist/elements/elicitation-form.js +106 -0
- package/dist/elements/empty-state.d.ts +52 -0
- package/dist/elements/empty-state.js +98 -0
- package/dist/elements/end-of-turn-summary.d.ts +60 -0
- package/dist/elements/end-of-turn-summary.js +75 -0
- package/dist/elements/error-state.d.ts +29 -0
- package/dist/elements/error-state.js +55 -0
- package/dist/elements/feedback-dialog.d.ts +36 -0
- package/dist/elements/feedback-dialog.js +81 -0
- package/dist/elements/file-tree.d.ts +45 -0
- package/dist/elements/file-tree.js +84 -0
- package/dist/elements/flow-graph.d.ts +45 -0
- package/dist/elements/flow-graph.js +78 -0
- package/dist/elements/generative/chart.js +200 -0
- package/dist/elements/generative/faults.js +111 -0
- package/dist/elements/generative/icons.d.ts +41 -0
- package/dist/elements/generative/icons.js +190 -0
- package/dist/elements/generative/intrinsics.js +483 -0
- package/dist/elements/generative/spec.d.ts +110 -0
- package/dist/elements/generative/spec.js +366 -0
- package/dist/elements/generative.css +1145 -0
- package/dist/elements/generative.d.ts +144 -0
- package/dist/elements/generative.js +126 -0
- package/dist/elements/guardrail-notice.d.ts +29 -0
- package/dist/elements/guardrail-notice.js +63 -0
- package/dist/elements/image-generation.d.ts +18 -0
- package/dist/elements/image-generation.js +64 -0
- package/dist/elements/index.d.ts +116 -0
- package/dist/elements/index.js +115 -0
- package/dist/elements/inline-citation.d.ts +43 -0
- package/dist/elements/inline-citation.js +93 -0
- package/dist/elements/job-progress.d.ts +49 -0
- package/dist/elements/job-progress.js +74 -0
- package/dist/elements/launcher-bubble.d.ts +34 -0
- package/dist/elements/launcher-bubble.js +72 -0
- package/dist/elements/live-region-announcer.d.ts +130 -0
- package/dist/elements/live-region-announcer.js +230 -0
- package/dist/elements/loading-state.d.ts +27 -0
- package/dist/elements/loading-state.js +36 -0
- package/dist/elements/map-answer.d.ts +38 -0
- package/dist/elements/map-answer.js +93 -0
- package/dist/elements/markdown.d.ts +131 -0
- package/dist/elements/markdown.js +528 -0
- package/dist/elements/math-block.d.ts +51 -0
- package/dist/elements/math-block.js +70 -0
- package/dist/elements/mcp-server-panel.d.ts +41 -0
- package/dist/elements/mcp-server-panel.js +115 -0
- package/dist/elements/memory-chips.d.ts +30 -0
- package/dist/elements/memory-chips.js +43 -0
- package/dist/elements/message-actions.d.ts +38 -0
- package/dist/elements/message-actions.js +71 -0
- package/dist/elements/message-attachment.d.ts +48 -0
- package/dist/elements/message-attachment.js +63 -0
- package/dist/elements/message-branches.d.ts +25 -0
- package/dist/elements/message-branches.js +65 -0
- package/dist/elements/message-pair.d.ts +33 -0
- package/dist/elements/message-pair.js +65 -0
- package/dist/elements/message-queue.d.ts +31 -0
- package/dist/elements/message-queue.js +80 -0
- package/dist/elements/message-timing.d.ts +33 -0
- package/dist/elements/message-timing.js +37 -0
- package/dist/elements/mobile-composer.d.ts +44 -0
- package/dist/elements/mobile-composer.js +88 -0
- package/dist/elements/model-picker.d.ts +38 -0
- package/dist/elements/model-picker.js +69 -0
- package/dist/elements/number-ticker.d.ts +18 -0
- package/dist/elements/number-ticker.js +47 -0
- package/dist/elements/onboarding.d.ts +30 -0
- package/dist/elements/onboarding.js +75 -0
- package/dist/elements/permission-grant.d.ts +35 -0
- package/dist/elements/permission-grant.js +86 -0
- package/dist/elements/permission-scopes.d.ts +215 -0
- package/dist/elements/permission-scopes.js +249 -0
- package/dist/elements/prompt-library.d.ts +43 -0
- package/dist/elements/prompt-library.js +117 -0
- package/dist/elements/queue-dock.d.ts +101 -0
- package/dist/elements/queue-dock.js +132 -0
- package/dist/elements/quota-banner.d.ts +26 -0
- package/dist/elements/quota-banner.js +66 -0
- package/dist/elements/quote-reply.d.ts +44 -0
- package/dist/elements/quote-reply.js +79 -0
- package/dist/elements/range.d.ts +29 -0
- package/dist/elements/range.js +45 -0
- package/dist/elements/read-aloud.d.ts +45 -0
- package/dist/elements/read-aloud.js +75 -0
- package/dist/elements/reasoning-effort.d.ts +36 -0
- package/dist/elements/reasoning-effort.js +67 -0
- package/dist/elements/reasoning-panel.d.ts +46 -0
- package/dist/elements/reasoning-panel.js +75 -0
- package/dist/elements/recommendation-card.d.ts +45 -0
- package/dist/elements/recommendation-card.js +83 -0
- package/dist/elements/regenerate-menu.d.ts +45 -0
- package/dist/elements/regenerate-menu.js +51 -0
- package/dist/elements/replay.d.ts +217 -0
- package/dist/elements/replay.js +498 -0
- package/dist/elements/research-report.d.ts +38 -0
- package/dist/elements/research-report.js +69 -0
- package/dist/elements/retrieval-chunks.d.ts +43 -0
- package/dist/elements/retrieval-chunks.js +81 -0
- package/dist/elements/revert-dock.d.ts +159 -0
- package/dist/elements/revert-dock.js +327 -0
- package/dist/elements/reviewable-diff.d.ts +45 -0
- package/dist/elements/reviewable-diff.js +110 -0
- package/dist/elements/risk-badge.d.ts +52 -0
- package/dist/elements/risk-badge.js +91 -0
- package/dist/elements/schedule-card.d.ts +42 -0
- package/dist/elements/schedule-card.js +90 -0
- package/dist/elements/score-breakdown.d.ts +47 -0
- package/dist/elements/score-breakdown.js +82 -0
- package/dist/elements/scroll-anchor.d.ts +32 -0
- package/dist/elements/scroll-anchor.js +121 -0
- package/dist/elements/settings-panel.d.ts +52 -0
- package/dist/elements/settings-panel.js +107 -0
- package/dist/elements/shared-conversation.d.ts +39 -0
- package/dist/elements/shared-conversation.js +68 -0
- package/dist/elements/sources.d.ts +33 -0
- package/dist/elements/sources.js +61 -0
- package/dist/elements/speaker-identity.d.ts +32 -0
- package/dist/elements/speaker-identity.js +51 -0
- package/dist/elements/spec-sheet.d.ts +31 -0
- package/dist/elements/spec-sheet.js +45 -0
- package/dist/elements/stopped-run.d.ts +22 -0
- package/dist/elements/stopped-run.js +50 -0
- package/dist/elements/streaming-text.d.ts +31 -0
- package/dist/elements/streaming-text.js +45 -0
- package/dist/elements/subagent-list.d.ts +37 -0
- package/dist/elements/subagent-list.js +79 -0
- package/dist/elements/suggestions.d.ts +30 -0
- package/dist/elements/suggestions.js +36 -0
- package/dist/elements/surfaces.d.ts +85 -0
- package/dist/elements/surfaces.js +107 -0
- package/dist/elements/tail-status.d.ts +131 -0
- package/dist/elements/tail-status.js +94 -0
- package/dist/elements/terminal-block.d.ts +29 -0
- package/dist/elements/terminal-block.js +54 -0
- package/dist/elements/thinking-indicator.d.ts +18 -0
- package/dist/elements/thinking-indicator.js +36 -0
- package/dist/elements/thread-list.d.ts +35 -0
- package/dist/elements/thread-list.js +68 -0
- package/dist/elements/thread-search.d.ts +42 -0
- package/dist/elements/thread-search.js +99 -0
- package/dist/elements/timeline.d.ts +37 -0
- package/dist/elements/timeline.js +46 -0
- package/dist/elements/todo-list.d.ts +42 -0
- package/dist/elements/todo-list.js +59 -0
- package/dist/elements/tool-call.d.ts +41 -0
- package/dist/elements/tool-call.js +85 -0
- package/dist/elements/tool-error.d.ts +39 -0
- package/dist/elements/tool-error.js +76 -0
- package/dist/elements/tool-group.d.ts +45 -0
- package/dist/elements/tool-group.js +71 -0
- package/dist/elements/tool-timeline.d.ts +65 -0
- package/dist/elements/tool-timeline.js +88 -0
- package/dist/elements/trace-waterfall.d.ts +37 -0
- package/dist/elements/trace-waterfall.js +69 -0
- package/dist/elements/transcript-rules.d.ts +67 -0
- package/dist/elements/transcript-rules.js +95 -0
- package/dist/elements/turn-footer.d.ts +74 -0
- package/dist/elements/turn-footer.js +101 -0
- package/dist/elements/typing-indicator.d.ts +16 -0
- package/dist/elements/typing-indicator.js +51 -0
- package/dist/elements/verdict-row.d.ts +89 -0
- package/dist/elements/verdict-row.js +150 -0
- package/dist/elements/vocabulary.d.ts +612 -0
- package/dist/elements/vocabulary.js +611 -0
- package/dist/elements/voice-conversation.d.ts +49 -0
- package/dist/elements/voice-conversation.js +123 -0
- package/dist/elements/web-preview.d.ts +32 -0
- package/dist/elements/web-preview.js +66 -0
- package/dist/elements/web-search.d.ts +37 -0
- package/dist/elements/web-search.js +66 -0
- package/dist/elements/work-collapse.d.ts +103 -0
- package/dist/elements/work-collapse.js +131 -0
- package/dist/icons/containers.d.ts +89 -0
- package/dist/icons/containers.js +295 -0
- package/dist/icons/index.d.ts +2 -0
- package/dist/index.d.ts +6 -4
- package/dist/index.js +2 -1
- package/dist/instruments/two-step-button.js +25 -6
- package/dist/layout/sidebar.d.ts +19 -1
- package/dist/layout/sidebar.js +19 -1
- package/dist/primitives/button.js +11 -1
- package/dist/primitives/chip.d.ts +35 -9
- package/dist/primitives/chip.js +97 -11
- package/dist/system/agent-skin.d.ts +27 -0
- package/dist/system/agent-skin.js +20 -0
- package/dist/system/portal.d.ts +5 -3
- package/dist/system/portal.js +19 -5
- package/dist/system/theme-provider.js +54 -9
- package/dist/system/use-density.d.ts +9 -0
- package/dist/system/use-density.js +9 -0
- package/dist/system/use-isomorphic-layout-effect.js +19 -1
- package/dist/theming/_presets.d.ts +1 -1
- package/dist/theming/_presets.js +71 -8
- package/dist/theming/contrast.d.ts +16 -4
- package/dist/theming/contrast.js +33 -6
- package/dist/theming/create-theme.d.ts +6 -2
- package/dist/theming/create-theme.js +32 -5
- package/dist/theming/serialize.d.ts +10 -1
- package/dist/theming/serialize.js +62 -8
- package/manifest/components/activity-graph.json +88 -0
- package/manifest/components/agent-card.json +120 -0
- package/manifest/components/agent-handoff.json +87 -0
- package/manifest/components/agent-mode-badge.json +84 -0
- package/manifest/components/agent-plan.json +67 -0
- package/manifest/components/agent-status.json +73 -0
- package/manifest/components/agent-surface.json +78 -0
- package/manifest/components/alert-dialog.json +1 -1
- package/manifest/components/animated-number.json +67 -0
- package/manifest/components/app-shell.json +99 -7
- package/manifest/components/approval-card.json +106 -0
- package/manifest/components/artifact-card.json +81 -0
- package/manifest/components/audience-icon.json +52 -0
- package/manifest/components/background-inbox.json +71 -0
- package/manifest/components/branch-picker.json +124 -0
- package/manifest/components/button.json +1 -0
- package/manifest/components/canvas-split-body.json +62 -0
- package/manifest/components/canvas-split-document.json +54 -0
- package/manifest/components/canvas-split-header.json +83 -0
- package/manifest/components/canvas-split-line.json +62 -0
- package/manifest/components/canvas-split-message.json +62 -0
- package/manifest/components/canvas-split-thread.json +54 -0
- package/manifest/components/canvas-split.json +60 -0
- package/manifest/components/catalogue-icon.json +52 -0
- package/manifest/components/channel-beta-icon.json +52 -0
- package/manifest/components/channel-released-icon.json +52 -0
- package/manifest/components/chart.json +93 -0
- package/manifest/components/chat-empty-state.json +55 -0
- package/manifest/components/chat-panel-assistant-message.json +51 -0
- package/manifest/components/chat-panel-composer.json +66 -0
- package/manifest/components/chat-panel-messages.json +51 -0
- package/manifest/components/chat-panel-typing.json +51 -0
- package/manifest/components/chat-panel-user-message.json +51 -0
- package/manifest/components/chat-panel.json +57 -0
- package/manifest/components/checkpoint-history.json +80 -0
- package/manifest/components/chip.json +24 -12
- package/manifest/components/clamp.json +102 -0
- package/manifest/components/cli-tool-icon.json +52 -0
- package/manifest/components/code-diff.json +87 -0
- package/manifest/components/code-runner.json +97 -0
- package/manifest/components/compaction-row.json +100 -0
- package/manifest/components/comparison-card.json +83 -0
- package/manifest/components/composer-actions.json +65 -0
- package/manifest/components/composer-attach-button.json +65 -0
- package/manifest/components/composer-attachment-chip.json +75 -0
- package/manifest/components/composer-attachments.json +60 -0
- package/manifest/components/composer-bar.json +73 -0
- package/manifest/components/composer-command-item.json +79 -0
- package/manifest/components/composer-context.json +67 -0
- package/manifest/components/composer-input.json +73 -0
- package/manifest/components/composer-menu-item.json +72 -0
- package/manifest/components/composer-menu.json +79 -0
- package/manifest/components/composer-model-item.json +75 -0
- package/manifest/components/composer-model-trigger.json +75 -0
- package/manifest/components/composer-person-item.json +79 -0
- package/manifest/components/composer-send.json +80 -0
- package/manifest/components/composer-toolbar.json +65 -0
- package/manifest/components/composer-voice-button.json +68 -0
- package/manifest/components/composer-voice.json +75 -0
- package/manifest/components/computer-use.json +84 -0
- package/manifest/components/confidence-marker.json +74 -0
- package/manifest/components/connection-state.json +84 -0
- package/manifest/components/context-breakdown.json +65 -0
- package/manifest/components/context-usage.json +85 -0
- package/manifest/components/conversation-search.json +92 -0
- package/manifest/components/cost-meter.json +74 -0
- package/manifest/components/cue-portal-frame.json +1 -1
- package/manifest/components/day-separator.json +58 -0
- package/manifest/components/delegation-card.json +1 -1
- package/manifest/components/density.json +1 -1
- package/manifest/components/diagram.json +100 -0
- package/manifest/components/document-reference.json +90 -0
- package/manifest/components/draft-restore.json +82 -0
- package/manifest/components/drawer.json +1 -1
- package/manifest/components/dropdown-menu.json +1 -1
- package/manifest/components/edit-message.json +105 -0
- package/manifest/components/elements-command-palette.json +100 -0
- package/manifest/components/elements-composer.json +71 -0
- package/manifest/components/elements-data-table.json +68 -0
- package/manifest/components/elements-timeline.json +69 -0
- package/manifest/components/elicitation-form.json +103 -0
- package/manifest/components/empty-state-composer.json +64 -0
- package/manifest/components/empty-state-greeting.json +49 -0
- package/manifest/components/empty-state-suggestion.json +57 -0
- package/manifest/components/empty-state-suggestions.json +49 -0
- package/manifest/components/end-of-turn-summary.json +77 -0
- package/manifest/components/error-state.json +80 -0
- package/manifest/components/feedback-dialog.json +107 -0
- package/manifest/components/file-tree.json +83 -0
- package/manifest/components/flow-graph.json +75 -0
- package/manifest/components/folder-icon.json +52 -0
- package/manifest/components/frac.json +59 -0
- package/manifest/components/generation-loader.json +64 -0
- package/manifest/components/generative-ui.json +93 -0
- package/manifest/components/guardrail-notice.json +91 -0
- package/manifest/components/hover-card.json +1 -1
- package/manifest/components/image-generation.json +67 -0
- package/manifest/components/info-tip.json +1 -1
- package/manifest/components/inline-citation.json +77 -0
- package/manifest/components/job-progress.json +96 -0
- package/manifest/components/launcher-bubble.json +105 -0
- package/manifest/components/live-region-announcer.json +79 -0
- package/manifest/components/map-answer.json +83 -0
- package/manifest/components/markdown-text.json +94 -0
- package/manifest/components/math-block.json +74 -0
- package/manifest/components/mcp-server-icon.json +52 -0
- package/manifest/components/mcp-server-panel.json +87 -0
- package/manifest/components/memory-chips.json +65 -0
- package/manifest/components/message-actions.json +99 -0
- package/manifest/components/message-attachments.json +63 -0
- package/manifest/components/message-branches.json +71 -0
- package/manifest/components/message-list.json +1 -1
- package/manifest/components/message-pair.json +86 -0
- package/manifest/components/message-queue.json +74 -0
- package/manifest/components/message-timing.json +62 -0
- package/manifest/components/mobile-composer.json +126 -0
- package/manifest/components/model-picker.json +76 -0
- package/manifest/components/node-card.json +1 -1
- package/manifest/components/node-handle.json +1 -1
- package/manifest/components/number-ticker.json +61 -0
- package/manifest/components/onboarding.json +84 -0
- package/manifest/components/otp-field.json +7 -7
- package/manifest/components/permission-grant.json +92 -0
- package/manifest/components/permission-scopes.json +139 -0
- package/manifest/components/popover.json +1 -1
- package/manifest/components/prompt-library.json +99 -0
- package/manifest/components/queue-dock.json +110 -0
- package/manifest/components/quota-banner.json +94 -0
- package/manifest/components/quote-reply.json +105 -0
- package/manifest/components/read-aloud.json +111 -0
- package/manifest/components/reasoning-effort.json +81 -0
- package/manifest/components/reasoning-panel.json +108 -0
- package/manifest/components/recommendation-card.json +107 -0
- package/manifest/components/regenerate-menu.json +89 -0
- package/manifest/components/replay-player.json +102 -0
- package/manifest/components/research-report.json +76 -0
- package/manifest/components/retrieval-chunks.json +84 -0
- package/manifest/components/revert-dock.json +150 -0
- package/manifest/components/reviewable-diff.json +93 -0
- package/manifest/components/risk-badge.json +74 -0
- package/manifest/components/schedule-card.json +101 -0
- package/manifest/components/score-breakdown.json +91 -0
- package/manifest/components/scroll-anchor.json +72 -0
- package/manifest/components/scroll-area.json +7 -7
- package/manifest/components/search-input.json +7 -7
- package/manifest/components/segmented-control.json +21 -21
- package/manifest/components/settings-panel.json +118 -0
- package/manifest/components/shared-conversation.json +89 -0
- package/manifest/components/shimmer-label.json +59 -0
- package/manifest/components/skill-icon.json +52 -0
- package/manifest/components/sources.json +83 -0
- package/manifest/components/speaker-identity.json +61 -0
- package/manifest/components/spec-sheet.json +80 -0
- package/manifest/components/stack-icon.json +52 -0
- package/manifest/components/stacks-matrix-icon.json +52 -0
- package/manifest/components/stat.json +1 -1
- package/manifest/components/status-dot.json +1 -1
- package/manifest/components/stopped-run.json +81 -0
- package/manifest/components/streaming-text.json +71 -0
- package/manifest/components/sub.json +44 -0
- package/manifest/components/subagent-list.json +88 -0
- package/manifest/components/suggestions.json +84 -0
- package/manifest/components/sup.json +44 -0
- package/manifest/components/swap-label.json +71 -0
- package/manifest/components/tail-status.json +109 -0
- package/manifest/components/terminal-block.json +91 -0
- package/manifest/components/theme-provider.json +2 -2
- package/manifest/components/thinking-indicator.json +63 -0
- package/manifest/components/thread-list.json +76 -0
- package/manifest/components/thread-search.json +90 -0
- package/manifest/components/threshold-rail.json +2 -2
- package/manifest/components/time-boundary.json +62 -0
- package/manifest/components/timeline.json +1 -1
- package/manifest/components/todo-list.json +69 -0
- package/manifest/components/toggle-group.json +7 -7
- package/manifest/components/token-editor.json +1 -1
- package/manifest/components/tool-call-card.json +200 -0
- package/manifest/components/tool-call.json +119 -0
- package/manifest/components/tool-error.json +114 -0
- package/manifest/components/tool-group.json +83 -0
- package/manifest/components/tool-timeline.json +119 -0
- package/manifest/components/toolbar.json +7 -7
- package/manifest/components/tooltip.json +1 -1
- package/manifest/components/trace-waterfall.json +74 -0
- package/manifest/components/turn-footer.json +105 -0
- package/manifest/components/typing-indicator.json +53 -0
- package/manifest/components/unread-divider.json +55 -0
- package/manifest/components/usage-chart.json +1 -1
- package/manifest/components/verdict-row.json +91 -0
- package/manifest/components/voice-conversation.json +109 -0
- package/manifest/components/web-preview.json +87 -0
- package/manifest/components/web-search.json +92 -0
- package/manifest/components/work-collapse.json +102 -0
- package/manifest/manifest.json +2670 -33
- package/manifest/tokens.json +22 -1
- package/package.json +46 -4
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { ghostButton, mono, paper } from "./surfaces.js";
|
|
4
|
+
import { clamp } from "./range.js";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { MicIcon, MicOffIcon, PhoneOffIcon } from "lucide-react";
|
|
7
|
+
//#region src/elements/voice-conversation.tsx
|
|
8
|
+
const CAPTION = {
|
|
9
|
+
connecting: "Connecting",
|
|
10
|
+
listening: "Listening",
|
|
11
|
+
thinking: "Thinking",
|
|
12
|
+
speaking: "Speaking"
|
|
13
|
+
};
|
|
14
|
+
const HINT = {
|
|
15
|
+
connecting: "Opening the mic",
|
|
16
|
+
listening: "Listening for you",
|
|
17
|
+
thinking: "Working on it",
|
|
18
|
+
speaking: "Playing the reply"
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* A live call: the orb tracks your voice, the caption names the turn, the transcript
|
|
22
|
+
* follows.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* import { VoiceConversation } from "@cueplusplus/ui/elements";
|
|
26
|
+
*
|
|
27
|
+
* <VoiceConversation
|
|
28
|
+
* mode="listening"
|
|
29
|
+
* amplitude={0.6}
|
|
30
|
+
* transcript={transcript}
|
|
31
|
+
* onToggleMute={toggleMute}
|
|
32
|
+
* onEnd={hangUp}
|
|
33
|
+
* />
|
|
34
|
+
*/
|
|
35
|
+
function VoiceConversation({ mode, amplitude, transcript, muted, onToggleMute, onInterrupt, onEnd, className, ...props }) {
|
|
36
|
+
const level = clamp(amplitude, 0, 1);
|
|
37
|
+
const active = mode === "listening" || mode === "speaking";
|
|
38
|
+
const canInterrupt = mode === "speaking" && onInterrupt !== void 0;
|
|
39
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
40
|
+
"data-slot": "voice-conversation",
|
|
41
|
+
className: cn(paper, "flex w-full max-w-xs flex-col items-center gap-4 rounded-(--radius-overlay) px-5 py-5", className),
|
|
42
|
+
...props,
|
|
43
|
+
children: [
|
|
44
|
+
/* @__PURE__ */ jsxs("button", {
|
|
45
|
+
type: "button",
|
|
46
|
+
onClick: onInterrupt,
|
|
47
|
+
disabled: !canInterrupt,
|
|
48
|
+
"aria-label": "Interrupt the assistant",
|
|
49
|
+
className: "focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-offset-1 focus-visible:outline-accent relative flex size-24 items-center justify-center rounded-full outline-none disabled:cursor-default",
|
|
50
|
+
children: [
|
|
51
|
+
/* @__PURE__ */ jsx("span", {
|
|
52
|
+
"aria-hidden": true,
|
|
53
|
+
className: cn("absolute rounded-full transition-[transform,opacity] duration-200 ease-out motion-reduce:transition-none", mode === "speaking" ? "bg-stream/15" : "bg-surface-1"),
|
|
54
|
+
style: {
|
|
55
|
+
width: "6rem",
|
|
56
|
+
height: "6rem",
|
|
57
|
+
transform: `scale(${active ? .72 + level * .28 : .62})`,
|
|
58
|
+
opacity: active ? 1 : .5
|
|
59
|
+
}
|
|
60
|
+
}),
|
|
61
|
+
/* @__PURE__ */ jsx("span", {
|
|
62
|
+
"aria-hidden": true,
|
|
63
|
+
className: cn("absolute rounded-full transition-[transform,opacity] duration-150 ease-out motion-reduce:transition-none", mode === "speaking" ? "bg-stream/25" : "bg-surface-2"),
|
|
64
|
+
style: {
|
|
65
|
+
width: "4.25rem",
|
|
66
|
+
height: "4.25rem",
|
|
67
|
+
transform: `scale(${active ? .8 + level * .22 : .7})`
|
|
68
|
+
}
|
|
69
|
+
}),
|
|
70
|
+
/* @__PURE__ */ jsx("span", {
|
|
71
|
+
"aria-hidden": true,
|
|
72
|
+
className: cn("relative size-10 rounded-full transition-[transform,background-color] duration-150 ease-out motion-reduce:transition-none", mode === "connecting" && "bg-surface-3 animate-pulse", mode === "listening" && "bg-accent", mode === "thinking" && "bg-surface-3 animate-pulse", mode === "speaking" && "bg-stream"),
|
|
73
|
+
style: { transform: `scale(${active ? .9 + level * .2 : .85})` }
|
|
74
|
+
})
|
|
75
|
+
]
|
|
76
|
+
}),
|
|
77
|
+
/* @__PURE__ */ jsxs("div", {
|
|
78
|
+
className: "flex flex-col items-center gap-1",
|
|
79
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
80
|
+
className: "text-(length:--cue-text-body) font-medium",
|
|
81
|
+
children: CAPTION[mode]
|
|
82
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
83
|
+
className: cn(mono, "text-fg-subtle"),
|
|
84
|
+
children: muted ? "Mic off" : canInterrupt ? "Tap to interrupt" : HINT[mode]
|
|
85
|
+
})]
|
|
86
|
+
}),
|
|
87
|
+
/* @__PURE__ */ jsx("div", {
|
|
88
|
+
className: "flex min-h-[4.5rem] w-full flex-col gap-1.5",
|
|
89
|
+
children: transcript.map((turn) => /* @__PURE__ */ jsxs("div", {
|
|
90
|
+
className: "cue-elements-fade-in cue-elements-slide-in-from-bottom-1 cue-elements-animate-in cue-elements-fill-mode-both flex gap-2 text-(length:--cue-text-ui) leading-relaxed duration-300",
|
|
91
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
92
|
+
className: cn(mono, "w-8 shrink-0", turn.role === "user" ? "text-fg-subtle" : "text-stream/70"),
|
|
93
|
+
children: turn.role === "user" ? "you" : "ai"
|
|
94
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
95
|
+
className: cn("min-w-0 flex-1 break-words", turn.role === "user" ? "text-fg-muted" : "text-fg-muted"),
|
|
96
|
+
children: turn.text
|
|
97
|
+
})]
|
|
98
|
+
}, turn.id))
|
|
99
|
+
}),
|
|
100
|
+
/* @__PURE__ */ jsxs("div", {
|
|
101
|
+
className: "flex items-center gap-2",
|
|
102
|
+
children: [/* @__PURE__ */ jsx("button", {
|
|
103
|
+
type: "button",
|
|
104
|
+
"aria-label": muted ? "Turn the microphone on" : "Turn the microphone off",
|
|
105
|
+
"aria-pressed": muted,
|
|
106
|
+
onClick: onToggleMute,
|
|
107
|
+
disabled: !onToggleMute,
|
|
108
|
+
className: cn(ghostButton, "size-10 disabled:pointer-events-none disabled:opacity-30", muted && "bg-surface-2 text-fg"),
|
|
109
|
+
children: muted ? /* @__PURE__ */ jsx(MicOffIcon, { className: "size-4" }) : /* @__PURE__ */ jsx(MicIcon, { className: "size-4" })
|
|
110
|
+
}), /* @__PURE__ */ jsx("button", {
|
|
111
|
+
type: "button",
|
|
112
|
+
"aria-label": "End the call",
|
|
113
|
+
onClick: onEnd,
|
|
114
|
+
disabled: !onEnd,
|
|
115
|
+
className: "flex size-10 items-center justify-center rounded-full bg-danger text-danger-fg transition-[opacity,scale] duration-150 hover:opacity-90 active:scale-[0.96] disabled:pointer-events-none disabled:opacity-30 motion-reduce:transition-none",
|
|
116
|
+
children: /* @__PURE__ */ jsx(PhoneOffIcon, { className: "size-4" })
|
|
117
|
+
})]
|
|
118
|
+
})
|
|
119
|
+
]
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
//#endregion
|
|
123
|
+
export { VoiceConversation };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
//#region src/elements/web-preview.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Chrome around a preview: a URL bar, reload, and open-in-new. It renders
|
|
5
|
+
* `children` as given and enforces no isolation of its own, so the caller is
|
|
6
|
+
* responsible for passing an already-sandboxed frame.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* import { WebPreview } from "@cueplusplus/ui/elements";
|
|
10
|
+
*
|
|
11
|
+
* <WebPreview origin="scf.auiusercontent.com" loading={false} onReload={reload}>
|
|
12
|
+
* <iframe title="Preview" src={sandboxUrl} sandbox="allow-scripts" />
|
|
13
|
+
* </WebPreview>
|
|
14
|
+
*/
|
|
15
|
+
declare function WebPreview({ origin, loading, children, onReload, onOpenExternal, className, ...props }: Omit<ComponentProps<"div">, "origin" | "loading" | "children" | "onReload" | "onOpenExternal"> & {
|
|
16
|
+
/**
|
|
17
|
+
* Host the content is served from. Show the sandbox origin, not your own, so the
|
|
18
|
+
* isolation is legible. Displaying it does not create the isolation; the frame you
|
|
19
|
+
* pass as children must already be sandboxed.
|
|
20
|
+
*/
|
|
21
|
+
origin: string;
|
|
22
|
+
/** Fades the frame out and shimmers a status while the sandbox is being set up. */
|
|
23
|
+
loading: boolean;
|
|
24
|
+
/** The frame itself. In production this is a sandboxed iframe, not inline markup. */
|
|
25
|
+
children: React.ReactNode;
|
|
26
|
+
/** Called from the reload control. */
|
|
27
|
+
onReload?: () => void;
|
|
28
|
+
/** Called from the open-in-new-tab control. */
|
|
29
|
+
onOpenExternal?: () => void;
|
|
30
|
+
}): import("react").JSX.Element;
|
|
31
|
+
//#endregion
|
|
32
|
+
export { WebPreview };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { ShimmerLabel, field, ghostButton, mono, paper } from "./surfaces.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { ExternalLinkIcon, RotateCwIcon } from "lucide-react";
|
|
6
|
+
//#region src/elements/web-preview.tsx
|
|
7
|
+
/**
|
|
8
|
+
* Chrome around a preview: a URL bar, reload, and open-in-new. It renders
|
|
9
|
+
* `children` as given and enforces no isolation of its own, so the caller is
|
|
10
|
+
* responsible for passing an already-sandboxed frame.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* import { WebPreview } from "@cueplusplus/ui/elements";
|
|
14
|
+
*
|
|
15
|
+
* <WebPreview origin="scf.auiusercontent.com" loading={false} onReload={reload}>
|
|
16
|
+
* <iframe title="Preview" src={sandboxUrl} sandbox="allow-scripts" />
|
|
17
|
+
* </WebPreview>
|
|
18
|
+
*/
|
|
19
|
+
function WebPreview({ origin, loading, children, onReload, onOpenExternal, className, ...props }) {
|
|
20
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
21
|
+
"data-slot": "web-preview",
|
|
22
|
+
className: cn(paper, "flex w-full max-w-md flex-col overflow-hidden rounded-(--radius-overlay)", className),
|
|
23
|
+
...props,
|
|
24
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
25
|
+
className: "flex items-center gap-1.5 px-2.5 py-2",
|
|
26
|
+
children: [
|
|
27
|
+
/* @__PURE__ */ jsx("button", {
|
|
28
|
+
type: "button",
|
|
29
|
+
"aria-label": "Reload the preview",
|
|
30
|
+
onClick: onReload,
|
|
31
|
+
className: cn(ghostButton, "size-7 shrink-0"),
|
|
32
|
+
children: /* @__PURE__ */ jsx(RotateCwIcon, { className: cn("size-3.5", loading && "animate-spin motion-reduce:animate-none") })
|
|
33
|
+
}),
|
|
34
|
+
/* @__PURE__ */ jsx("span", {
|
|
35
|
+
className: cn(field, "flex min-w-0 flex-1 items-center gap-1.5 rounded-full px-2.5 py-1"),
|
|
36
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
37
|
+
className: cn(mono, "text-fg-muted min-w-0 truncate"),
|
|
38
|
+
children: origin
|
|
39
|
+
})
|
|
40
|
+
}),
|
|
41
|
+
/* @__PURE__ */ jsx("button", {
|
|
42
|
+
type: "button",
|
|
43
|
+
"aria-label": "Open the preview in a new tab",
|
|
44
|
+
onClick: onOpenExternal,
|
|
45
|
+
className: cn(ghostButton, "size-7 shrink-0"),
|
|
46
|
+
children: /* @__PURE__ */ jsx(ExternalLinkIcon, { className: "size-3.5" })
|
|
47
|
+
})
|
|
48
|
+
]
|
|
49
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
50
|
+
className: "border-border relative min-h-[9rem] border-t",
|
|
51
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
52
|
+
"aria-hidden": loading,
|
|
53
|
+
className: cn("transition-opacity duration-300 motion-reduce:transition-none", loading && "invisible opacity-0"),
|
|
54
|
+
children
|
|
55
|
+
}), loading && /* @__PURE__ */ jsx("div", {
|
|
56
|
+
className: "absolute inset-0 flex items-center justify-center",
|
|
57
|
+
children: /* @__PURE__ */ jsx(ShimmerLabel, {
|
|
58
|
+
className: "text-fg-subtle relative inline-block text-(length:--cue-text-ui) leading-none",
|
|
59
|
+
children: "Loading preview"
|
|
60
|
+
})
|
|
61
|
+
})]
|
|
62
|
+
})]
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
//#endregion
|
|
66
|
+
export { WebPreview };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
//#region src/elements/web-search.d.ts
|
|
3
|
+
/** One hit the agent read: the page's title and the site it sits on. */
|
|
4
|
+
interface WebSearchResult {
|
|
5
|
+
/** The page's title, truncated to the row. */
|
|
6
|
+
title: string;
|
|
7
|
+
/** The site, in mono at the end of the row. With `cycle`, it keys the row. */
|
|
8
|
+
domain: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* A search query and its results landing one by one as the agent reads.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* import { WebSearch } from "@cueplusplus/ui/elements";
|
|
15
|
+
*
|
|
16
|
+
* <WebSearch
|
|
17
|
+
* query="assistant-ui composer"
|
|
18
|
+
* results={[{ title: "Composer guide", domain: "docs.example.com" }]}
|
|
19
|
+
* visibleResults={1}
|
|
20
|
+
* searching={false}
|
|
21
|
+
* cycle={0}
|
|
22
|
+
* />
|
|
23
|
+
*/
|
|
24
|
+
declare function WebSearch({ query, results, visibleResults, searching, cycle, className, ...props }: Omit<ComponentProps<"div">, "children" | "query" | "results" | "visibleResults" | "searching" | "cycle"> & {
|
|
25
|
+
/** Search query shown in the query pill. */
|
|
26
|
+
query: string;
|
|
27
|
+
/** Result cards available to reveal one by one. */
|
|
28
|
+
results: readonly WebSearchResult[];
|
|
29
|
+
/** How many results from the start are currently shown. */
|
|
30
|
+
visibleResults: number;
|
|
31
|
+
/** When true a shimmering Searching label replaces the result count. */
|
|
32
|
+
searching: boolean;
|
|
33
|
+
/** Identity key that remounts the list so entrance animation can replay. */
|
|
34
|
+
cycle: number;
|
|
35
|
+
}): import("react").JSX.Element;
|
|
36
|
+
//#endregion
|
|
37
|
+
export { WebSearch, WebSearchResult };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { ShimmerLabel, field, mono } from "./surfaces.js";
|
|
4
|
+
import { take } from "./range.js";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { SearchIcon } from "lucide-react";
|
|
7
|
+
//#region src/elements/web-search.tsx
|
|
8
|
+
/**
|
|
9
|
+
* A search query and its results landing one by one as the agent reads.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* import { WebSearch } from "@cueplusplus/ui/elements";
|
|
13
|
+
*
|
|
14
|
+
* <WebSearch
|
|
15
|
+
* query="assistant-ui composer"
|
|
16
|
+
* results={[{ title: "Composer guide", domain: "docs.example.com" }]}
|
|
17
|
+
* visibleResults={1}
|
|
18
|
+
* searching={false}
|
|
19
|
+
* cycle={0}
|
|
20
|
+
* />
|
|
21
|
+
*/
|
|
22
|
+
function WebSearch({ query, results, visibleResults, searching, cycle, className, ...props }) {
|
|
23
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
24
|
+
"data-slot": "web-search",
|
|
25
|
+
className: cn("flex w-full max-w-sm flex-col gap-2.5", className),
|
|
26
|
+
...props,
|
|
27
|
+
children: [
|
|
28
|
+
/* @__PURE__ */ jsxs("span", {
|
|
29
|
+
className: cn(field, "text-fg-muted inline-flex w-fit items-center gap-1.5 rounded-full px-3.5 py-2 text-(length:--cue-text-ui)"),
|
|
30
|
+
children: [/* @__PURE__ */ jsx(SearchIcon, { className: "text-fg-subtle size-3" }), query]
|
|
31
|
+
}),
|
|
32
|
+
/* @__PURE__ */ jsx("div", {
|
|
33
|
+
className: "text-fg-muted text-(length:--cue-text-ui)",
|
|
34
|
+
children: searching ? /* @__PURE__ */ jsx(ShimmerLabel, {
|
|
35
|
+
className: "relative inline-block leading-none",
|
|
36
|
+
children: "Searching"
|
|
37
|
+
}) : /* @__PURE__ */ jsx("span", {
|
|
38
|
+
className: "cue-elements-fade-in cue-elements-animate-in duration-300",
|
|
39
|
+
children: "Read 3 sources"
|
|
40
|
+
})
|
|
41
|
+
}),
|
|
42
|
+
/* @__PURE__ */ jsx("div", {
|
|
43
|
+
className: "flex min-h-[5.75rem] flex-col",
|
|
44
|
+
children: take(results, visibleResults).map((result) => /* @__PURE__ */ jsxs("div", {
|
|
45
|
+
className: "cue-elements-fade-in cue-elements-slide-in-from-bottom-1 cue-elements-animate-in cue-elements-fill-mode-both hover:bg-surface-1 -mx-2.5 flex items-center gap-2.5 rounded-(--radius-surface) px-2.5 py-1.5 transition-colors duration-300",
|
|
46
|
+
children: [
|
|
47
|
+
/* @__PURE__ */ jsx("span", {
|
|
48
|
+
className: "bg-surface-2 text-fg-muted flex size-4 shrink-0 items-center justify-center rounded-(--radius-control) text-(length:--cue-text-micro) font-medium",
|
|
49
|
+
children: result.domain.charAt(0).toUpperCase()
|
|
50
|
+
}),
|
|
51
|
+
/* @__PURE__ */ jsx("span", {
|
|
52
|
+
className: "text-fg min-w-0 flex-1 truncate text-(length:--cue-text-body)",
|
|
53
|
+
children: result.title
|
|
54
|
+
}),
|
|
55
|
+
/* @__PURE__ */ jsx("span", {
|
|
56
|
+
className: cn(mono, "text-fg-subtle shrink-0"),
|
|
57
|
+
children: result.domain
|
|
58
|
+
})
|
|
59
|
+
]
|
|
60
|
+
}, `${cycle}-${result.domain}`))
|
|
61
|
+
})
|
|
62
|
+
]
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
//#endregion
|
|
66
|
+
export { WebSearch };
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
//#region src/elements/work-collapse.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* A duration as a run's summary line says it: `3s`, `4m 12s`, `1h 3m`.
|
|
5
|
+
*
|
|
6
|
+
* Cline's three shapes, and the rule behind them is that each keeps exactly two
|
|
7
|
+
* significant units — nobody reading "worked for" wants `1h 3m 12s`, and
|
|
8
|
+
* everybody wants the seconds when the whole run took eleven of them. Anything
|
|
9
|
+
* that is not a finite, positive number of milliseconds is `0s`, because this
|
|
10
|
+
* formats a caller's arithmetic and a run that has not started yet is a real
|
|
11
|
+
* state.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* formatWorkDuration(3_000); // "3s"
|
|
15
|
+
* formatWorkDuration(252_000); // "4m 12s"
|
|
16
|
+
* formatWorkDuration(3_780_000); // "1h 3m"
|
|
17
|
+
*/
|
|
18
|
+
declare function formatWorkDuration(durationMs: number): string;
|
|
19
|
+
/** What a collapsed run knows about itself. */
|
|
20
|
+
interface WorkSummary {
|
|
21
|
+
/** How long the run took, in milliseconds. Omit when it is not known. */
|
|
22
|
+
durationMs?: number;
|
|
23
|
+
/** How many tool calls it made. Omit when it is not counted. */
|
|
24
|
+
toolCalls?: number;
|
|
25
|
+
/** Whether the run is still going, which decides the tense. */
|
|
26
|
+
running?: boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The summary line: `Worked for 4m 12s and made 14 tool calls`.
|
|
30
|
+
*
|
|
31
|
+
* Every combination has an answer, including the two empty ones, because a
|
|
32
|
+
* collapsed run always has to say something: a trigger labelled `undefined` is
|
|
33
|
+
* a row a reader cannot decide whether to open. Cline's fallbacks are `Worked`
|
|
34
|
+
* and `Made 3 tool calls`; the present-tense half is Hermes's rule that a live
|
|
35
|
+
* run narrates in the present and settles into the past.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* formatWorkLabel({ durationMs: 252_000, toolCalls: 14 });
|
|
39
|
+
* // "Worked for 4m 12s and made 14 tool calls"
|
|
40
|
+
* @example
|
|
41
|
+
* formatWorkLabel({ durationMs: 252_000, toolCalls: 14, running: true });
|
|
42
|
+
* // "Working for 4m 12s, 14 tool calls so far"
|
|
43
|
+
*/
|
|
44
|
+
declare function formatWorkLabel({ durationMs, toolCalls, running }: WorkSummary): string;
|
|
45
|
+
interface WorkCollapseProps extends Omit<React.ComponentPropsWithoutRef<"div">, "children" | "onToggle"> {
|
|
46
|
+
/** How long the run took, in milliseconds. Omit when it is not known. */
|
|
47
|
+
durationMs?: number;
|
|
48
|
+
/** How many tool calls it made. Omit when it is not counted. */
|
|
49
|
+
toolCalls?: number;
|
|
50
|
+
/**
|
|
51
|
+
* Whether the run is still going: the label goes present tense and the sweep
|
|
52
|
+
* runs. Hermes's rule, and the one that keeps a collapsed live run from
|
|
53
|
+
* claiming to be finished.
|
|
54
|
+
*/
|
|
55
|
+
running?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* The whole summary line, replacing the one {@link formatWorkLabel} would
|
|
58
|
+
* build. This is where a category summary goes — "Explored 3 files, ran 5
|
|
59
|
+
* commands", composed from `VERB_TRIADS` — which is a sentence no formatter
|
|
60
|
+
* over a duration and a count could produce.
|
|
61
|
+
*/
|
|
62
|
+
label?: string;
|
|
63
|
+
/** Whether the rows are showing. */
|
|
64
|
+
open: boolean;
|
|
65
|
+
/** Called when the row is expanded or collapsed. */
|
|
66
|
+
onOpenChange?: (open: boolean) => void;
|
|
67
|
+
/** The rows the run folded away: tool calls, reasoning, whatever ran. */
|
|
68
|
+
children?: React.ReactNode;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* A finished run, folded into one row: `Worked for 4m 12s and made 14 tool calls`.
|
|
72
|
+
*
|
|
73
|
+
* The counterpart to {@link TailStatus}. That one says what is happening while
|
|
74
|
+
* it happens; this one is what fourteen rows of it become once nobody needs
|
|
75
|
+
* them — and it is the element that makes a long transcript readable at a
|
|
76
|
+
* glance without hiding anything, because the rows are still there, one click
|
|
77
|
+
* away, in their original order.
|
|
78
|
+
*
|
|
79
|
+
* The expanded body deliberately draws no rail, no indent and no border. That
|
|
80
|
+
* is Cline's decision and its reasoning is worth keeping: the rows inside a
|
|
81
|
+
* work group are tool disclosures and reasoning panels that already carry their
|
|
82
|
+
* own nesting when *they* open, and a second level of indent around them makes
|
|
83
|
+
* a transcript that steps rightwards every time it explains itself. So an open
|
|
84
|
+
* `WorkCollapse` looks exactly like the transcript would have looked, plus one
|
|
85
|
+
* summary line above it.
|
|
86
|
+
*
|
|
87
|
+
* Open state is a prop, like everything else here: a scripted replay of this
|
|
88
|
+
* component is a caller changing `open`, and a component that owned the
|
|
89
|
+
* disclosure could not be replayed at all.
|
|
90
|
+
*
|
|
91
|
+
* @example
|
|
92
|
+
* import { WorkCollapse } from "@cueplusplus/ui/elements";
|
|
93
|
+
*
|
|
94
|
+
* <WorkCollapse durationMs={252_000} toolCalls={14} open={open} onOpenChange={setOpen}>
|
|
95
|
+
* {rows}
|
|
96
|
+
* </WorkCollapse>
|
|
97
|
+
* @example
|
|
98
|
+
* // Live, in the present tense, with the label composed from the verb table.
|
|
99
|
+
* <WorkCollapse running toolCalls={5} label="Exploring 3 files, running 5 commands" open={false} />
|
|
100
|
+
*/
|
|
101
|
+
declare const WorkCollapse: React.ForwardRefExoticComponent<WorkCollapseProps & React.RefAttributes<HTMLDivElement>>;
|
|
102
|
+
//#endregion
|
|
103
|
+
export { WorkCollapse, WorkCollapseProps, WorkSummary, formatWorkDuration, formatWorkLabel };
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { ShimmerLabel } from "./surfaces.js";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { ChevronRightIcon } from "lucide-react";
|
|
7
|
+
//#region src/elements/work-collapse.tsx
|
|
8
|
+
/**
|
|
9
|
+
* A duration as a run's summary line says it: `3s`, `4m 12s`, `1h 3m`.
|
|
10
|
+
*
|
|
11
|
+
* Cline's three shapes, and the rule behind them is that each keeps exactly two
|
|
12
|
+
* significant units — nobody reading "worked for" wants `1h 3m 12s`, and
|
|
13
|
+
* everybody wants the seconds when the whole run took eleven of them. Anything
|
|
14
|
+
* that is not a finite, positive number of milliseconds is `0s`, because this
|
|
15
|
+
* formats a caller's arithmetic and a run that has not started yet is a real
|
|
16
|
+
* state.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* formatWorkDuration(3_000); // "3s"
|
|
20
|
+
* formatWorkDuration(252_000); // "4m 12s"
|
|
21
|
+
* formatWorkDuration(3_780_000); // "1h 3m"
|
|
22
|
+
*/
|
|
23
|
+
function formatWorkDuration(durationMs) {
|
|
24
|
+
if (!Number.isFinite(durationMs) || durationMs <= 0) return "0s";
|
|
25
|
+
const total = Math.round(durationMs / 1e3);
|
|
26
|
+
if (total < 60) return `${total}s`;
|
|
27
|
+
if (total < 3600) {
|
|
28
|
+
const minutes = Math.floor(total / 60);
|
|
29
|
+
const seconds = total % 60;
|
|
30
|
+
return seconds === 0 ? `${minutes}m` : `${minutes}m ${seconds}s`;
|
|
31
|
+
}
|
|
32
|
+
const hours = Math.floor(total / 3600);
|
|
33
|
+
const minutes = Math.floor(total % 3600 / 60);
|
|
34
|
+
return minutes === 0 ? `${hours}h` : `${hours}h ${minutes}m`;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* The summary line: `Worked for 4m 12s and made 14 tool calls`.
|
|
38
|
+
*
|
|
39
|
+
* Every combination has an answer, including the two empty ones, because a
|
|
40
|
+
* collapsed run always has to say something: a trigger labelled `undefined` is
|
|
41
|
+
* a row a reader cannot decide whether to open. Cline's fallbacks are `Worked`
|
|
42
|
+
* and `Made 3 tool calls`; the present-tense half is Hermes's rule that a live
|
|
43
|
+
* run narrates in the present and settles into the past.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* formatWorkLabel({ durationMs: 252_000, toolCalls: 14 });
|
|
47
|
+
* // "Worked for 4m 12s and made 14 tool calls"
|
|
48
|
+
* @example
|
|
49
|
+
* formatWorkLabel({ durationMs: 252_000, toolCalls: 14, running: true });
|
|
50
|
+
* // "Working for 4m 12s, 14 tool calls so far"
|
|
51
|
+
*/
|
|
52
|
+
function formatWorkLabel({ durationMs, toolCalls, running = false }) {
|
|
53
|
+
const spent = durationMs === void 0 ? void 0 : formatWorkDuration(durationMs);
|
|
54
|
+
const calls = toolCalls === void 0 ? void 0 : `${toolCalls} tool call${toolCalls === 1 ? "" : "s"}`;
|
|
55
|
+
if (running) {
|
|
56
|
+
if (spent !== void 0 && calls !== void 0) return `Working for ${spent}, ${calls} so far`;
|
|
57
|
+
if (spent !== void 0) return `Working for ${spent}`;
|
|
58
|
+
if (calls !== void 0) return `${calls} so far`;
|
|
59
|
+
return "Working";
|
|
60
|
+
}
|
|
61
|
+
if (spent !== void 0 && calls !== void 0) return `Worked for ${spent} and made ${calls}`;
|
|
62
|
+
if (spent !== void 0) return `Worked for ${spent}`;
|
|
63
|
+
if (calls !== void 0) return `Made ${calls}`;
|
|
64
|
+
return "Worked";
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* A finished run, folded into one row: `Worked for 4m 12s and made 14 tool calls`.
|
|
68
|
+
*
|
|
69
|
+
* The counterpart to {@link TailStatus}. That one says what is happening while
|
|
70
|
+
* it happens; this one is what fourteen rows of it become once nobody needs
|
|
71
|
+
* them — and it is the element that makes a long transcript readable at a
|
|
72
|
+
* glance without hiding anything, because the rows are still there, one click
|
|
73
|
+
* away, in their original order.
|
|
74
|
+
*
|
|
75
|
+
* The expanded body deliberately draws no rail, no indent and no border. That
|
|
76
|
+
* is Cline's decision and its reasoning is worth keeping: the rows inside a
|
|
77
|
+
* work group are tool disclosures and reasoning panels that already carry their
|
|
78
|
+
* own nesting when *they* open, and a second level of indent around them makes
|
|
79
|
+
* a transcript that steps rightwards every time it explains itself. So an open
|
|
80
|
+
* `WorkCollapse` looks exactly like the transcript would have looked, plus one
|
|
81
|
+
* summary line above it.
|
|
82
|
+
*
|
|
83
|
+
* Open state is a prop, like everything else here: a scripted replay of this
|
|
84
|
+
* component is a caller changing `open`, and a component that owned the
|
|
85
|
+
* disclosure could not be replayed at all.
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* import { WorkCollapse } from "@cueplusplus/ui/elements";
|
|
89
|
+
*
|
|
90
|
+
* <WorkCollapse durationMs={252_000} toolCalls={14} open={open} onOpenChange={setOpen}>
|
|
91
|
+
* {rows}
|
|
92
|
+
* </WorkCollapse>
|
|
93
|
+
* @example
|
|
94
|
+
* // Live, in the present tense, with the label composed from the verb table.
|
|
95
|
+
* <WorkCollapse running toolCalls={5} label="Exploring 3 files, running 5 commands" open={false} />
|
|
96
|
+
*/
|
|
97
|
+
const WorkCollapse = React.forwardRef(function WorkCollapse({ durationMs, toolCalls, running = false, label, open, onOpenChange, children, className, ...elementProps }, ref) {
|
|
98
|
+
const summary = label ?? formatWorkLabel({
|
|
99
|
+
durationMs,
|
|
100
|
+
toolCalls,
|
|
101
|
+
running
|
|
102
|
+
});
|
|
103
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
104
|
+
ref,
|
|
105
|
+
"data-slot": "work-collapse",
|
|
106
|
+
"data-open": String(open),
|
|
107
|
+
"data-running": String(running),
|
|
108
|
+
className: cn("flex w-full flex-col gap-1.5", className),
|
|
109
|
+
...elementProps,
|
|
110
|
+
children: [/* @__PURE__ */ jsxs("button", {
|
|
111
|
+
type: "button",
|
|
112
|
+
"aria-expanded": open,
|
|
113
|
+
onClick: () => onOpenChange?.(!open),
|
|
114
|
+
className: "hover:bg-surface-1 -mx-2 flex items-center gap-2.5 rounded-(--radius-control) px-2 py-1 text-start transition-colors focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-offset-1 focus-visible:outline-accent motion-reduce:transition-none",
|
|
115
|
+
children: [/* @__PURE__ */ jsx(ChevronRightIcon, {
|
|
116
|
+
"aria-hidden": true,
|
|
117
|
+
className: cn("text-fg-subtle size-3 shrink-0 transition-transform duration-200 motion-reduce:transition-none", open && "rotate-90")
|
|
118
|
+
}), /* @__PURE__ */ jsx(ShimmerLabel, {
|
|
119
|
+
active: running,
|
|
120
|
+
className: "text-fg-muted min-w-0 flex-1 truncate text-(length:--cue-text-ui)",
|
|
121
|
+
children: summary
|
|
122
|
+
})]
|
|
123
|
+
}), open && children !== void 0 ? /* @__PURE__ */ jsx("div", {
|
|
124
|
+
"data-slot": "work-collapse-content",
|
|
125
|
+
className: "flex flex-col gap-2",
|
|
126
|
+
children
|
|
127
|
+
}) : null]
|
|
128
|
+
});
|
|
129
|
+
});
|
|
130
|
+
//#endregion
|
|
131
|
+
export { WorkCollapse, formatWorkDuration, formatWorkLabel };
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
//#region src/icons/containers.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* The catalogue itself: everything there is, before anything has been narrowed.
|
|
5
|
+
*
|
|
6
|
+
* One tile repeated over a 2×2 rather than a stack of rows, because the row
|
|
7
|
+
* this marks is the one that *undoes* a filter — "all of it" is a shape, and a
|
|
8
|
+
* list glyph would have promised an ordering the row does not have.
|
|
9
|
+
*/
|
|
10
|
+
declare function CatalogueIcon(props: React.SVGProps<SVGSVGElement>): React.JSX.Element;
|
|
11
|
+
/**
|
|
12
|
+
* One person's stack: the set of things they have actually installed.
|
|
13
|
+
*
|
|
14
|
+
* Plates seen edge-on — the layers idiom — because a stack is an accumulation
|
|
15
|
+
* and not a container: things go into it one at a time and the order they went
|
|
16
|
+
* in is part of what it is.
|
|
17
|
+
*/
|
|
18
|
+
declare function StackIcon(props: React.SVGProps<SVGSVGElement>): React.JSX.Element;
|
|
19
|
+
/**
|
|
20
|
+
* Every stack at once, one column each: who has what, read across.
|
|
21
|
+
*
|
|
22
|
+
* A table rather than more plates. The head rule and the name column are what
|
|
23
|
+
* make it a matrix instead of a grid — the question it answers is "which of
|
|
24
|
+
* these does that person not have", and that is a question with two axes.
|
|
25
|
+
*/
|
|
26
|
+
declare function StacksMatrixIcon(props: React.SVGProps<SVGSVGElement>): React.JSX.Element;
|
|
27
|
+
/**
|
|
28
|
+
* An audience: a named group of people something is published to.
|
|
29
|
+
*
|
|
30
|
+
* People, not an abstract shape. An audience is the one container in this set
|
|
31
|
+
* whose members are humans rather than artefacts, and drawing it as a diamond
|
|
32
|
+
* or a tag would have filed it with the folders — which is exactly the mistake
|
|
33
|
+
* a reader makes when deciding where to publish something.
|
|
34
|
+
*/
|
|
35
|
+
declare function AudienceIcon(props: React.SVGProps<SVGSVGElement>): React.JSX.Element;
|
|
36
|
+
/**
|
|
37
|
+
* The released channel: what a colleague gets when they install without asking
|
|
38
|
+
* for anything in particular.
|
|
39
|
+
*
|
|
40
|
+
* A ring filled solid. Its pair, {@link ChannelBetaIcon}, is the same ring
|
|
41
|
+
* filled halfway — the two are one mark told twice, so a reader never has to
|
|
42
|
+
* learn which of two unrelated pictures means "finished".
|
|
43
|
+
*/
|
|
44
|
+
declare function ChannelReleasedIcon(props: React.SVGProps<SVGSVGElement>): React.JSX.Element;
|
|
45
|
+
/**
|
|
46
|
+
* The beta channel: the same things, one merge earlier.
|
|
47
|
+
*
|
|
48
|
+
* The released ring at half fill. Half rather than empty because a beta is not
|
|
49
|
+
* an absence of a release — it is a release that has not finished happening,
|
|
50
|
+
* and an empty ring would have read as "nothing here yet".
|
|
51
|
+
*/
|
|
52
|
+
declare function ChannelBetaIcon(props: React.SVGProps<SVGSVGElement>): React.JSX.Element;
|
|
53
|
+
/**
|
|
54
|
+
* A folder somebody made: a shelf of bookmarks, filed by hand.
|
|
55
|
+
*
|
|
56
|
+
* The tab is the whole glyph. A plain rounded box in this library is a panel,
|
|
57
|
+
* a card or a dialog, and the one thing a folder has to say is that a person
|
|
58
|
+
* put these here on purpose rather than a query having returned them.
|
|
59
|
+
*/
|
|
60
|
+
declare function FolderIcon(props: React.SVGProps<SVGSVGElement>): React.JSX.Element;
|
|
61
|
+
/**
|
|
62
|
+
* An MCP server in the registry: a thing an agent connects *to*.
|
|
63
|
+
*
|
|
64
|
+
* Two rack units with a status lamp each. It is drawn as hardware on purpose —
|
|
65
|
+
* an MCP server is the one entry in a catalogue of files that is a running
|
|
66
|
+
* process somewhere, with an address and a session, and a row that looked like
|
|
67
|
+
* a document would hide the only fact about it that matters operationally.
|
|
68
|
+
*/
|
|
69
|
+
declare function McpServerIcon(props: React.SVGProps<SVGSVGElement>): React.JSX.Element;
|
|
70
|
+
/**
|
|
71
|
+
* A CLI tool in the registry: a thing that runs in a terminal.
|
|
72
|
+
*
|
|
73
|
+
* A window with a prompt in it, rather than a bare chevron. A chevron on its
|
|
74
|
+
* own is a disclosure everywhere else in this library, and a navigation row
|
|
75
|
+
* that appeared to expand and then navigated instead is a worse failure than a
|
|
76
|
+
* slightly busier glyph at 10px.
|
|
77
|
+
*/
|
|
78
|
+
declare function CliToolIcon(props: React.SVGProps<SVGSVGElement>): React.JSX.Element;
|
|
79
|
+
/**
|
|
80
|
+
* A skill: the thing every other container in this set holds.
|
|
81
|
+
*
|
|
82
|
+
* One mark, and a spark rather than a document, because what is being filed is
|
|
83
|
+
* a capability. The file it happens to be written in is an implementation
|
|
84
|
+
* detail of how it travels, and a page glyph would have made the catalogue look
|
|
85
|
+
* like a folder of documents rather than a list of things an agent can now do.
|
|
86
|
+
*/
|
|
87
|
+
declare function SkillIcon(props: React.SVGProps<SVGSVGElement>): React.JSX.Element;
|
|
88
|
+
//#endregion
|
|
89
|
+
export { AudienceIcon, CatalogueIcon, ChannelBetaIcon, ChannelReleasedIcon, CliToolIcon, FolderIcon, McpServerIcon, SkillIcon, StackIcon, StacksMatrixIcon };
|