@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,52 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
//#region src/elements/settings-panel.d.ts
|
|
3
|
+
interface SettingToggle {
|
|
4
|
+
/** What `onToggle` is called with, and the row's key. Keep it unique. */
|
|
5
|
+
key: string;
|
|
6
|
+
/** The capability's name, on the switch's own line. */
|
|
7
|
+
label: string;
|
|
8
|
+
/** One line saying what turning it on actually does. */
|
|
9
|
+
detail: string;
|
|
10
|
+
/** Whether it is on. The panel holds no state; this is the caller's. */
|
|
11
|
+
on: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Model, system prompt, temperature, and what the assistant is allowed to do.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* import { SettingsPanel } from "@cueplusplus/ui/elements";
|
|
18
|
+
*
|
|
19
|
+
* <SettingsPanel
|
|
20
|
+
* model={model}
|
|
21
|
+
* models={models}
|
|
22
|
+
* systemPrompt={prompt}
|
|
23
|
+
* temperature={0.7}
|
|
24
|
+
* toggles={toggles}
|
|
25
|
+
* onModelChange={setModel}
|
|
26
|
+
* />
|
|
27
|
+
*/
|
|
28
|
+
declare function SettingsPanel({ model, models, systemPrompt, temperature, toggles, onModelChange, onSystemPromptChange, onTemperatureChange, onToggle, className, ...props }: Omit<ComponentProps<"div">, "children" | "model" | "models" | "systemPrompt" | "temperature" | "toggles" | "onModelChange" | "onSystemPromptChange" | "onTemperatureChange" | "onToggle"> & {
|
|
29
|
+
/** Selected model. */
|
|
30
|
+
model: string;
|
|
31
|
+
/**
|
|
32
|
+
* Models offered in the segmented control. Keep it to a few; more wants the model
|
|
33
|
+
* picker.
|
|
34
|
+
*/
|
|
35
|
+
models: readonly string[];
|
|
36
|
+
/** Current system prompt. */
|
|
37
|
+
systemPrompt: string;
|
|
38
|
+
/** Current temperature, 0 to 2. */
|
|
39
|
+
temperature: number;
|
|
40
|
+
/** Capability switches with a line each explaining what they turn on. */
|
|
41
|
+
toggles: readonly SettingToggle[];
|
|
42
|
+
/** Called when the model changes. */
|
|
43
|
+
onModelChange?: (model: string) => void;
|
|
44
|
+
/** Called as the prompt is edited. */
|
|
45
|
+
onSystemPromptChange?: (prompt: string) => void;
|
|
46
|
+
/** Called as the slider moves. */
|
|
47
|
+
onTemperatureChange?: (temperature: number) => void;
|
|
48
|
+
/** Called with the switched capability's key. */
|
|
49
|
+
onToggle?: (key: string) => void;
|
|
50
|
+
}): import("react").JSX.Element;
|
|
51
|
+
//#endregion
|
|
52
|
+
export { SettingToggle, SettingsPanel };
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { field, mono, paper } from "./surfaces.js";
|
|
4
|
+
import { clamp } from "./range.js";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
//#region src/elements/settings-panel.tsx
|
|
7
|
+
/**
|
|
8
|
+
* Model, system prompt, temperature, and what the assistant is allowed to do.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* import { SettingsPanel } from "@cueplusplus/ui/elements";
|
|
12
|
+
*
|
|
13
|
+
* <SettingsPanel
|
|
14
|
+
* model={model}
|
|
15
|
+
* models={models}
|
|
16
|
+
* systemPrompt={prompt}
|
|
17
|
+
* temperature={0.7}
|
|
18
|
+
* toggles={toggles}
|
|
19
|
+
* onModelChange={setModel}
|
|
20
|
+
* />
|
|
21
|
+
*/
|
|
22
|
+
function SettingsPanel({ model, models, systemPrompt, temperature, toggles, onModelChange, onSystemPromptChange, onTemperatureChange, onToggle, className, ...props }) {
|
|
23
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
24
|
+
"data-slot": "settings-panel",
|
|
25
|
+
className: cn(paper, "flex w-full max-w-sm flex-col gap-4 rounded-(--radius-overlay) p-4", className),
|
|
26
|
+
...props,
|
|
27
|
+
children: [
|
|
28
|
+
/* @__PURE__ */ jsxs("div", {
|
|
29
|
+
className: "flex flex-col gap-1.5",
|
|
30
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
31
|
+
className: cn(mono, "text-fg-subtle"),
|
|
32
|
+
children: "model"
|
|
33
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
34
|
+
className: cn(field, "flex gap-0.5 rounded-full p-0.5"),
|
|
35
|
+
children: models.map((option) => /* @__PURE__ */ jsx("button", {
|
|
36
|
+
type: "button",
|
|
37
|
+
"aria-pressed": option === model,
|
|
38
|
+
onClick: () => onModelChange?.(option),
|
|
39
|
+
className: cn("flex-1 rounded-full py-1 text-(length:--cue-text-ui) font-medium transition-[background-color,color,scale] duration-150 active:scale-[0.97]", option === model ? "bg-bg text-fg" : "text-fg-muted hover:text-fg-muted"),
|
|
40
|
+
children: option
|
|
41
|
+
}, option))
|
|
42
|
+
})]
|
|
43
|
+
}),
|
|
44
|
+
/* @__PURE__ */ jsxs("div", {
|
|
45
|
+
className: "flex flex-col gap-1.5",
|
|
46
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
47
|
+
className: cn(mono, "text-fg-subtle"),
|
|
48
|
+
children: "system prompt"
|
|
49
|
+
}), /* @__PURE__ */ jsx("textarea", {
|
|
50
|
+
value: systemPrompt,
|
|
51
|
+
onChange: (event) => onSystemPromptChange?.(event.target.value),
|
|
52
|
+
rows: 3,
|
|
53
|
+
"aria-label": "System prompt",
|
|
54
|
+
className: cn(field, "text-fg-muted focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-offset-1 focus-visible:outline-accent resize-none rounded-(--radius-surface) px-3 py-2 text-(length:--cue-text-ui) leading-relaxed outline-none")
|
|
55
|
+
})]
|
|
56
|
+
}),
|
|
57
|
+
/* @__PURE__ */ jsxs("div", {
|
|
58
|
+
className: "flex flex-col gap-1.5",
|
|
59
|
+
children: [/* @__PURE__ */ jsxs("span", {
|
|
60
|
+
className: "flex items-baseline justify-between",
|
|
61
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
62
|
+
className: cn(mono, "text-fg-subtle"),
|
|
63
|
+
children: "temperature"
|
|
64
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
65
|
+
className: cn(mono, "text-fg-muted tabular-nums"),
|
|
66
|
+
children: clamp(temperature, 0, 2).toFixed(1)
|
|
67
|
+
})]
|
|
68
|
+
}), /* @__PURE__ */ jsx("input", {
|
|
69
|
+
type: "range",
|
|
70
|
+
min: 0,
|
|
71
|
+
max: 2,
|
|
72
|
+
step: .1,
|
|
73
|
+
value: clamp(temperature, 0, 2),
|
|
74
|
+
"aria-label": "Temperature",
|
|
75
|
+
onChange: (event) => onTemperatureChange?.(Number(event.target.value)),
|
|
76
|
+
className: "accent-fg-muted h-1 w-full cursor-pointer"
|
|
77
|
+
})]
|
|
78
|
+
}),
|
|
79
|
+
/* @__PURE__ */ jsx("div", {
|
|
80
|
+
className: "flex flex-col gap-2.5",
|
|
81
|
+
children: toggles.map((toggle) => /* @__PURE__ */ jsxs("div", {
|
|
82
|
+
className: "flex items-center gap-3",
|
|
83
|
+
children: [/* @__PURE__ */ jsxs("span", {
|
|
84
|
+
className: "flex min-w-0 flex-1 flex-col",
|
|
85
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
86
|
+
className: "truncate text-(length:--cue-text-body)",
|
|
87
|
+
children: toggle.label
|
|
88
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
89
|
+
className: "text-fg-subtle truncate text-(length:--cue-text-ui)",
|
|
90
|
+
children: toggle.detail
|
|
91
|
+
})]
|
|
92
|
+
}), /* @__PURE__ */ jsx("button", {
|
|
93
|
+
type: "button",
|
|
94
|
+
role: "switch",
|
|
95
|
+
"aria-checked": toggle.on,
|
|
96
|
+
"aria-label": toggle.label,
|
|
97
|
+
onClick: () => onToggle?.(toggle.key),
|
|
98
|
+
className: cn("flex h-5 w-9 shrink-0 items-center rounded-full p-0.5 transition-colors duration-200", toggle.on ? "bg-accent" : "bg-surface-3"),
|
|
99
|
+
children: /* @__PURE__ */ jsx("span", { className: cn("bg-bg size-4 rounded-full transition-transform duration-200 motion-reduce:transition-none", toggle.on && "translate-x-4") })
|
|
100
|
+
})]
|
|
101
|
+
}, toggle.key))
|
|
102
|
+
})
|
|
103
|
+
]
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
//#endregion
|
|
107
|
+
export { SettingsPanel };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
//#region src/elements/shared-conversation.d.ts
|
|
3
|
+
/** One turn of a published transcript: who said it, and what they said. */
|
|
4
|
+
interface SharedTurn {
|
|
5
|
+
/** The row's key, and what a deep link into the transcript would name. */
|
|
6
|
+
id: string;
|
|
7
|
+
/** Who is speaking. The person gets a bubble, the model gets plain text. */
|
|
8
|
+
role: "user" | "assistant";
|
|
9
|
+
/** The turn itself, rendered verbatim. */
|
|
10
|
+
text: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* A read-only transcript someone sent you, with a way to pick it up yourself.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* import { SharedConversation } from "@cueplusplus/ui/elements";
|
|
17
|
+
*
|
|
18
|
+
* <SharedConversation
|
|
19
|
+
* title="Draft restore across threads"
|
|
20
|
+
* sharedBy="harry"
|
|
21
|
+
* sharedAt="2 days ago"
|
|
22
|
+
* turns={turns}
|
|
23
|
+
* onContinue={fork}
|
|
24
|
+
* />
|
|
25
|
+
*/
|
|
26
|
+
declare function SharedConversation({ title, sharedBy, sharedAt, turns, onContinue, className, ...props }: Omit<ComponentProps<"div">, "children" | "title" | "sharedBy" | "sharedAt" | "turns" | "onContinue"> & {
|
|
27
|
+
/** Name of the shared thread. */
|
|
28
|
+
title: string;
|
|
29
|
+
/** Who shared it. */
|
|
30
|
+
sharedBy: string;
|
|
31
|
+
/** Pre-formatted share time. */
|
|
32
|
+
sharedAt: string;
|
|
33
|
+
/** The transcript, read only. */
|
|
34
|
+
turns: readonly SharedTurn[];
|
|
35
|
+
/** Called to fork the transcript into the reader's own thread. */
|
|
36
|
+
onContinue?: () => void;
|
|
37
|
+
}): import("react").JSX.Element;
|
|
38
|
+
//#endregion
|
|
39
|
+
export { SharedConversation, SharedTurn };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { inkButton, mono, paper } from "./surfaces.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { LinkIcon } from "lucide-react";
|
|
6
|
+
//#region src/elements/shared-conversation.tsx
|
|
7
|
+
/**
|
|
8
|
+
* A read-only transcript someone sent you, with a way to pick it up yourself.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* import { SharedConversation } from "@cueplusplus/ui/elements";
|
|
12
|
+
*
|
|
13
|
+
* <SharedConversation
|
|
14
|
+
* title="Draft restore across threads"
|
|
15
|
+
* sharedBy="harry"
|
|
16
|
+
* sharedAt="2 days ago"
|
|
17
|
+
* turns={turns}
|
|
18
|
+
* onContinue={fork}
|
|
19
|
+
* />
|
|
20
|
+
*/
|
|
21
|
+
function SharedConversation({ title, sharedBy, sharedAt, turns, onContinue, className, ...props }) {
|
|
22
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
23
|
+
"data-slot": "shared-conversation",
|
|
24
|
+
className: cn(paper, "flex w-full max-w-sm flex-col overflow-hidden rounded-(--radius-overlay)", className),
|
|
25
|
+
...props,
|
|
26
|
+
children: [
|
|
27
|
+
/* @__PURE__ */ jsxs("div", {
|
|
28
|
+
className: "flex items-center gap-2.5 px-4 pt-3.5 pb-3",
|
|
29
|
+
children: [/* @__PURE__ */ jsx(LinkIcon, { className: "text-fg-subtle size-3.5 shrink-0" }), /* @__PURE__ */ jsxs("div", {
|
|
30
|
+
className: "flex min-w-0 flex-1 flex-col",
|
|
31
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
32
|
+
className: "truncate text-(length:--cue-text-body) font-medium",
|
|
33
|
+
children: title
|
|
34
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
35
|
+
className: cn(mono, "text-fg-subtle truncate"),
|
|
36
|
+
children: [
|
|
37
|
+
"shared by ",
|
|
38
|
+
sharedBy,
|
|
39
|
+
" · ",
|
|
40
|
+
sharedAt
|
|
41
|
+
]
|
|
42
|
+
})]
|
|
43
|
+
})]
|
|
44
|
+
}),
|
|
45
|
+
/* @__PURE__ */ jsx("div", {
|
|
46
|
+
className: "border-border flex flex-col gap-2.5 border-t px-4 py-3.5",
|
|
47
|
+
children: turns.map((turn) => /* @__PURE__ */ jsx("div", {
|
|
48
|
+
className: cn("text-(length:--cue-text-body) leading-relaxed", turn.role === "user" ? "bg-surface-1 ms-auto max-w-[85%] rounded-(--radius-overlay) px-3 py-2" : "text-fg-muted"),
|
|
49
|
+
children: turn.text
|
|
50
|
+
}, turn.id))
|
|
51
|
+
}),
|
|
52
|
+
/* @__PURE__ */ jsxs("div", {
|
|
53
|
+
className: "border-border flex items-center gap-2 border-t px-4 py-3",
|
|
54
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
55
|
+
className: cn(mono, "text-fg-subtle"),
|
|
56
|
+
children: "read only"
|
|
57
|
+
}), /* @__PURE__ */ jsx("button", {
|
|
58
|
+
type: "button",
|
|
59
|
+
onClick: onContinue,
|
|
60
|
+
className: cn(inkButton, "ms-auto flex h-8 items-center rounded-full px-3.5 text-(length:--cue-text-ui) font-medium"),
|
|
61
|
+
children: "Continue in your own chat"
|
|
62
|
+
})]
|
|
63
|
+
})
|
|
64
|
+
]
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
//#endregion
|
|
68
|
+
export { SharedConversation };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
//#region src/elements/sources.d.ts
|
|
2
|
+
/** One citation behind an answer: the site it came from, and what the page is called. */
|
|
3
|
+
interface Source {
|
|
4
|
+
/** The site, as a bare host. Also the card's key, so one domain appears once. */
|
|
5
|
+
domain: string;
|
|
6
|
+
/** The page's own title, clamped to two lines on the card. */
|
|
7
|
+
title: string;
|
|
8
|
+
}
|
|
9
|
+
interface SourcesProps {
|
|
10
|
+
/** Citation cards revealed when the sources pill expands. */
|
|
11
|
+
sources: readonly Source[];
|
|
12
|
+
/** Whether the source list is expanded under the pill. */
|
|
13
|
+
open: boolean;
|
|
14
|
+
/** Called when the user expands or collapses the sources. */
|
|
15
|
+
onOpenChange: (open: boolean) => void;
|
|
16
|
+
/** Extra classes merged onto the root. */
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Citations collapsed into a pill, expanding into scannable source cards.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* import { Sources } from "@cueplusplus/ui/elements";
|
|
24
|
+
*
|
|
25
|
+
* <Sources
|
|
26
|
+
* sources={[{ domain: "docs.example.com", title: "Composer guide" }]}
|
|
27
|
+
* open
|
|
28
|
+
* onOpenChange={setOpen}
|
|
29
|
+
* />
|
|
30
|
+
*/
|
|
31
|
+
declare function Sources({ sources, open, onOpenChange, className }: SourcesProps): import("react").JSX.Element;
|
|
32
|
+
//#endregion
|
|
33
|
+
export { Source, Sources, SourcesProps };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { collapsePanel, fieldInteractive, mono, paper } from "./surfaces.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { Collapsible } from "@base-ui/react/collapsible";
|
|
6
|
+
import { ChevronDownIcon } from "lucide-react";
|
|
7
|
+
//#region src/elements/sources.tsx
|
|
8
|
+
/**
|
|
9
|
+
* Citations collapsed into a pill, expanding into scannable source cards.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* import { Sources } from "@cueplusplus/ui/elements";
|
|
13
|
+
*
|
|
14
|
+
* <Sources
|
|
15
|
+
* sources={[{ domain: "docs.example.com", title: "Composer guide" }]}
|
|
16
|
+
* open
|
|
17
|
+
* onOpenChange={setOpen}
|
|
18
|
+
* />
|
|
19
|
+
*/
|
|
20
|
+
function Sources({ sources, open, onOpenChange, className }) {
|
|
21
|
+
return /* @__PURE__ */ jsxs(Collapsible.Root, {
|
|
22
|
+
"data-slot": "sources",
|
|
23
|
+
open,
|
|
24
|
+
onOpenChange,
|
|
25
|
+
className: cn("w-full max-w-sm", className),
|
|
26
|
+
children: [/* @__PURE__ */ jsxs(Collapsible.Trigger, {
|
|
27
|
+
className: cn(fieldInteractive, "group/trigger text-fg-muted hover:text-fg inline-flex w-fit items-center gap-1.5 rounded-full px-3.5 py-2 text-(length:--cue-text-ui) outline-none focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-offset-1 focus-visible:outline-accent"),
|
|
28
|
+
children: [
|
|
29
|
+
/* @__PURE__ */ jsx("span", { children: "Sources" }),
|
|
30
|
+
/* @__PURE__ */ jsx("span", {
|
|
31
|
+
className: cn(mono, "text-fg-subtle tabular-nums"),
|
|
32
|
+
children: sources.length
|
|
33
|
+
}),
|
|
34
|
+
/* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-3 opacity-60 transition-transform duration-200 ease-[cubic-bezier(0.32,0.72,0,1)] group-data-[panel-open]/trigger:rotate-180 motion-reduce:transition-none" })
|
|
35
|
+
]
|
|
36
|
+
}), /* @__PURE__ */ jsx(Collapsible.Panel, {
|
|
37
|
+
className: cn(collapsePanel, "outline-none"),
|
|
38
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
39
|
+
className: "grid grid-cols-2 gap-2 pt-2.5",
|
|
40
|
+
children: sources.map((source) => /* @__PURE__ */ jsxs("div", {
|
|
41
|
+
className: cn(paper, "flex flex-col gap-1.5 rounded-(--radius-overlay) p-3 transition-transform hover:-translate-y-px"),
|
|
42
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
43
|
+
className: "flex items-center gap-1.5",
|
|
44
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
45
|
+
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",
|
|
46
|
+
children: source.domain.charAt(0).toUpperCase()
|
|
47
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
48
|
+
className: cn(mono, "text-fg-subtle truncate"),
|
|
49
|
+
children: source.domain
|
|
50
|
+
})]
|
|
51
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
52
|
+
className: "text-fg line-clamp-2 text-(length:--cue-text-body) leading-snug font-medium",
|
|
53
|
+
children: source.title
|
|
54
|
+
})]
|
|
55
|
+
}, source.domain))
|
|
56
|
+
})
|
|
57
|
+
})]
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
//#endregion
|
|
61
|
+
export { Sources };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
//#region src/elements/speaker-identity.d.ts
|
|
3
|
+
type SpeakerKind = "user" | "agent" | "subagent" | "tool";
|
|
4
|
+
interface SpeakerTurn {
|
|
5
|
+
/** Stable identity for the row key. */
|
|
6
|
+
id: string;
|
|
7
|
+
/**
|
|
8
|
+
* Chooses the badge shape and tone. Subagents get a round badge so they read as
|
|
9
|
+
* delegated.
|
|
10
|
+
*/
|
|
11
|
+
kind: SpeakerKind;
|
|
12
|
+
/** Display name for the speaker. */
|
|
13
|
+
name: string;
|
|
14
|
+
/** Secondary fact next to the name: the model, a duration. */
|
|
15
|
+
detail?: string;
|
|
16
|
+
/** What this speaker said. */
|
|
17
|
+
text: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Who is talking, once a thread holds more than a user and one model.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* import { SpeakerIdentity } from "@cueplusplus/ui/elements";
|
|
24
|
+
*
|
|
25
|
+
* <SpeakerIdentity turns={turns} />
|
|
26
|
+
*/
|
|
27
|
+
declare function SpeakerIdentity({ turns, className, ...props }: Omit<ComponentProps<"div">, "children" | "turns"> & {
|
|
28
|
+
/** Turns in order, each naming who produced it. */
|
|
29
|
+
turns: readonly SpeakerTurn[];
|
|
30
|
+
}): import("react").JSX.Element;
|
|
31
|
+
//#endregion
|
|
32
|
+
export { SpeakerIdentity, SpeakerKind, SpeakerTurn };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import "./surfaces.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { BotIcon, UserIcon, WrenchIcon } from "lucide-react";
|
|
6
|
+
//#region src/elements/speaker-identity.tsx
|
|
7
|
+
const TONE = {
|
|
8
|
+
user: "bg-surface-2 text-fg-muted",
|
|
9
|
+
agent: "bg-stream/15 text-stream",
|
|
10
|
+
subagent: "bg-surface-2 text-fg-muted",
|
|
11
|
+
tool: "bg-surface-1 text-fg-subtle"
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Who is talking, once a thread holds more than a user and one model.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* import { SpeakerIdentity } from "@cueplusplus/ui/elements";
|
|
18
|
+
*
|
|
19
|
+
* <SpeakerIdentity turns={turns} />
|
|
20
|
+
*/
|
|
21
|
+
function SpeakerIdentity({ turns, className, ...props }) {
|
|
22
|
+
return /* @__PURE__ */ jsx("div", {
|
|
23
|
+
"data-slot": "speaker-identity",
|
|
24
|
+
className: cn("flex w-full max-w-sm flex-col gap-3.5", className),
|
|
25
|
+
...props,
|
|
26
|
+
children: turns.map((turn) => /* @__PURE__ */ jsxs("div", {
|
|
27
|
+
className: "flex gap-2.5",
|
|
28
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
29
|
+
className: cn("flex size-6 shrink-0 items-center justify-center rounded-(--radius-surface)", TONE[turn.kind], turn.kind === "subagent" && "rounded-full"),
|
|
30
|
+
children: turn.kind === "user" ? /* @__PURE__ */ jsx(UserIcon, { className: "size-3" }) : turn.kind === "tool" ? /* @__PURE__ */ jsx(WrenchIcon, { className: "size-3" }) : /* @__PURE__ */ jsx(BotIcon, { className: "size-3" })
|
|
31
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
32
|
+
className: "flex min-w-0 flex-1 flex-col gap-0.5",
|
|
33
|
+
children: [/* @__PURE__ */ jsxs("span", {
|
|
34
|
+
className: "flex items-baseline gap-1.5",
|
|
35
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
36
|
+
className: "text-(length:--cue-text-body) font-medium",
|
|
37
|
+
children: turn.name
|
|
38
|
+
}), turn.detail && /* @__PURE__ */ jsx("span", {
|
|
39
|
+
className: cn("font-mono text-(length:--cue-text-label) tracking-tight", "text-fg-subtle"),
|
|
40
|
+
children: turn.detail
|
|
41
|
+
})]
|
|
42
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
43
|
+
className: "text-fg-muted text-(length:--cue-text-body) leading-relaxed break-words",
|
|
44
|
+
children: turn.text
|
|
45
|
+
})]
|
|
46
|
+
})]
|
|
47
|
+
}, turn.id))
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
//#endregion
|
|
51
|
+
export { SpeakerIdentity };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
//#region src/elements/spec-sheet.d.ts
|
|
3
|
+
/** One labelled fact of a structured answer. */
|
|
4
|
+
interface SpecRow {
|
|
5
|
+
/** Field name, rendered in mono on the left. */
|
|
6
|
+
label: string;
|
|
7
|
+
/** Pre-formatted value. The element never formats numbers itself. */
|
|
8
|
+
value: string;
|
|
9
|
+
/** Renders the value in full ink. Use it for the one row that answers the question. */
|
|
10
|
+
emphasis?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The most common structured answer after a table: one object, labeled.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* import { SpecSheet } from "@cueplusplus/ui/elements";
|
|
17
|
+
*
|
|
18
|
+
* <SpecSheet title="Opus 5" subtitle="claude-opus-5" rows={rows} visibleCount={6} />
|
|
19
|
+
*/
|
|
20
|
+
declare function SpecSheet({ title, subtitle, rows, visibleCount, className, ...props }: Omit<ComponentProps<"div">, "children" | "title" | "subtitle" | "rows" | "visibleCount"> & {
|
|
21
|
+
/** What the sheet describes. */
|
|
22
|
+
title: string;
|
|
23
|
+
/** Secondary identifier: a model id, a SKU, a version. */
|
|
24
|
+
subtitle?: string;
|
|
25
|
+
/** Label and value pairs. Values are pre-formatted and right-aligned on tabular figures. */
|
|
26
|
+
rows: readonly SpecRow[];
|
|
27
|
+
/** How many rows have landed. */
|
|
28
|
+
visibleCount: number;
|
|
29
|
+
}): import("react").JSX.Element;
|
|
30
|
+
//#endregion
|
|
31
|
+
export { SpecRow, SpecSheet };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { mono, paper } from "./surfaces.js";
|
|
4
|
+
import { take } from "./range.js";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
//#region src/elements/spec-sheet.tsx
|
|
7
|
+
/**
|
|
8
|
+
* The most common structured answer after a table: one object, labeled.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* import { SpecSheet } from "@cueplusplus/ui/elements";
|
|
12
|
+
*
|
|
13
|
+
* <SpecSheet title="Opus 5" subtitle="claude-opus-5" rows={rows} visibleCount={6} />
|
|
14
|
+
*/
|
|
15
|
+
function SpecSheet({ title, subtitle, rows, visibleCount, className, ...props }) {
|
|
16
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
17
|
+
"data-slot": "spec-sheet",
|
|
18
|
+
className: cn(paper, "flex w-full max-w-sm flex-col gap-3 rounded-(--radius-overlay) p-4", className),
|
|
19
|
+
...props,
|
|
20
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
21
|
+
className: "flex flex-col gap-0.5",
|
|
22
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
23
|
+
className: "text-(length:--cue-text-body) font-medium",
|
|
24
|
+
children: title
|
|
25
|
+
}), subtitle && /* @__PURE__ */ jsx("span", {
|
|
26
|
+
className: "text-fg-muted text-(length:--cue-text-ui)",
|
|
27
|
+
children: subtitle
|
|
28
|
+
})]
|
|
29
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
30
|
+
className: "flex flex-col",
|
|
31
|
+
children: take(rows, visibleCount).map((row) => /* @__PURE__ */ jsxs("div", {
|
|
32
|
+
className: "border-border cue-elements-fade-in cue-elements-animate-in cue-elements-fill-mode-both flex items-baseline gap-3 border-t py-1.5 duration-300 first:border-t-0 first:pt-0",
|
|
33
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
34
|
+
className: cn(mono, "text-fg-subtle w-24 shrink-0"),
|
|
35
|
+
children: row.label
|
|
36
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
37
|
+
className: cn("min-w-0 flex-1 text-end text-(length:--cue-text-body) tabular-nums", row.emphasis ? "text-fg font-medium" : "text-fg-muted"),
|
|
38
|
+
children: row.value
|
|
39
|
+
})]
|
|
40
|
+
}, row.label))
|
|
41
|
+
})]
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
//#endregion
|
|
45
|
+
export { SpecSheet };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
//#region src/elements/stopped-run.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* You pressed stop. The half-written answer stays, and continuing is one tap away.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* import { StoppedRun } from "@cueplusplus/ui/elements";
|
|
8
|
+
*
|
|
9
|
+
* <StoppedRun words={words} reason="stopped by you" onContinue={resume} />
|
|
10
|
+
*/
|
|
11
|
+
declare function StoppedRun({ words, reason, onContinue, onDiscard, className, ...props }: Omit<ComponentProps<"div">, "children" | "words" | "reason" | "onContinue" | "onDiscard"> & {
|
|
12
|
+
/** The partial answer as it stood when the run stopped. It stays on screen. */
|
|
13
|
+
words: readonly string[];
|
|
14
|
+
/** Why it ended: stopped by you, hit the token limit, timed out. */
|
|
15
|
+
reason: string;
|
|
16
|
+
/** Called to resume from where the answer left off. */
|
|
17
|
+
onContinue?: () => void;
|
|
18
|
+
/** Called to drop the partial answer. */
|
|
19
|
+
onDiscard?: () => void;
|
|
20
|
+
}): import("react").JSX.Element;
|
|
21
|
+
//#endregion
|
|
22
|
+
export { StoppedRun };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/cn.js";
|
|
3
|
+
import { field, mono } from "./surfaces.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { ArrowRightIcon, SquareIcon } from "lucide-react";
|
|
6
|
+
//#region src/elements/stopped-run.tsx
|
|
7
|
+
/**
|
|
8
|
+
* You pressed stop. The half-written answer stays, and continuing is one tap away.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* import { StoppedRun } from "@cueplusplus/ui/elements";
|
|
12
|
+
*
|
|
13
|
+
* <StoppedRun words={words} reason="stopped by you" onContinue={resume} />
|
|
14
|
+
*/
|
|
15
|
+
function StoppedRun({ words, reason, onContinue, onDiscard, className, ...props }) {
|
|
16
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
17
|
+
"data-slot": "stopped-run",
|
|
18
|
+
className: cn("flex w-full max-w-sm flex-col gap-3", className),
|
|
19
|
+
...props,
|
|
20
|
+
children: [/* @__PURE__ */ jsxs("p", {
|
|
21
|
+
className: "text-fg-muted text-(length:--cue-text-body) leading-relaxed",
|
|
22
|
+
children: [words.join(" "), /* @__PURE__ */ jsx("span", {
|
|
23
|
+
"aria-hidden": true,
|
|
24
|
+
className: "bg-surface-3 ms-1 inline-block h-[1em] w-[2px] translate-y-[0.15em] rounded-full"
|
|
25
|
+
})]
|
|
26
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
27
|
+
className: "flex items-center gap-2",
|
|
28
|
+
children: [
|
|
29
|
+
/* @__PURE__ */ jsxs("span", {
|
|
30
|
+
className: cn(field, mono, "text-fg-muted inline-flex items-center gap-1.5 rounded-full px-2.5 py-1"),
|
|
31
|
+
children: [/* @__PURE__ */ jsx(SquareIcon, { className: "size-2.5 fill-current" }), reason]
|
|
32
|
+
}),
|
|
33
|
+
/* @__PURE__ */ jsxs("button", {
|
|
34
|
+
type: "button",
|
|
35
|
+
onClick: onContinue,
|
|
36
|
+
className: "text-fg-muted hover:bg-surface-2 hover:text-fg ms-auto flex h-7 items-center gap-1 rounded-full px-2.5 text-(length:--cue-text-ui) font-medium transition-[background-color,color,scale] duration-150 active:scale-[0.96]",
|
|
37
|
+
children: ["Continue", /* @__PURE__ */ jsx(ArrowRightIcon, { className: "size-3" })]
|
|
38
|
+
}),
|
|
39
|
+
/* @__PURE__ */ jsx("button", {
|
|
40
|
+
type: "button",
|
|
41
|
+
onClick: onDiscard,
|
|
42
|
+
className: "text-fg-muted hover:bg-surface-2 hover:text-fg flex h-7 items-center rounded-full px-2.5 text-(length:--cue-text-ui) font-medium transition-[background-color,color,scale] duration-150 active:scale-[0.96]",
|
|
43
|
+
children: "Discard"
|
|
44
|
+
})
|
|
45
|
+
]
|
|
46
|
+
})]
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
export { StoppedRun };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
//#region src/elements/streaming-text.d.ts
|
|
3
|
+
/** A run of the answer that shares one treatment: prose, or a span set in mono. */
|
|
4
|
+
interface Segment {
|
|
5
|
+
/** The run itself. Split on spaces, so the stream arrives a word at a time. */
|
|
6
|
+
text: string;
|
|
7
|
+
/** Set the run in mono on a faint chip — a path, an identifier, a command. */
|
|
8
|
+
mono?: boolean;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Tokens arrive softly: the newest words land in blue and settle into ink.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* import { StreamingText } from "@cueplusplus/ui/elements";
|
|
15
|
+
*
|
|
16
|
+
* <StreamingText
|
|
17
|
+
* segments={[{ text: "Hello world" }, { text: "thread.tsx", mono: true }]}
|
|
18
|
+
* count={3}
|
|
19
|
+
* streaming
|
|
20
|
+
* />
|
|
21
|
+
*/
|
|
22
|
+
declare function StreamingText({ segments, count, streaming, className, ...props }: Omit<ComponentProps<"p">, "children" | "segments" | "count" | "streaming"> & {
|
|
23
|
+
/** Text chunks to stream, optionally marked mono for inline code chips. */
|
|
24
|
+
segments: Segment[];
|
|
25
|
+
/** How many words from the flattened segments are visible. */
|
|
26
|
+
count: number;
|
|
27
|
+
/** When true the newest words tint blue and a caret blinks at the end. */
|
|
28
|
+
streaming: boolean;
|
|
29
|
+
}): import("react").JSX.Element;
|
|
30
|
+
//#endregion
|
|
31
|
+
export { Segment, StreamingText };
|