@oh-my-pi/pi-tui 18.2.3 → 18.2.5
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 +29 -0
- package/README.md +43 -0
- package/dist/types/app-keybindings.d.ts +395 -0
- package/dist/types/apps/autoresearch-dashboard.d.ts +43 -0
- package/dist/types/apps/autoresearch-data.d.ts +15 -0
- package/dist/types/apps/cleanse-board.d.ts +66 -0
- package/dist/types/apps/cleanse-picker.d.ts +23 -0
- package/dist/types/apps/debug/log-formatting.d.ts +6 -0
- package/dist/types/apps/debug/log-viewer.d.ts +81 -0
- package/dist/types/apps/debug/protocol-probe.d.ts +42 -0
- package/dist/types/apps/debug/raw-sse-buffer.d.ts +58 -0
- package/dist/types/apps/debug/raw-sse.d.ts +26 -0
- package/dist/types/apps/debug/terminal-info.d.ts +34 -0
- package/dist/types/apps/debug/viewer-frame.d.ts +52 -0
- package/dist/types/apps/git/avatar.d.ts +9 -0
- package/dist/types/apps/git/colors.d.ts +49 -0
- package/dist/types/apps/git/diff-pane.d.ts +188 -0
- package/dist/types/apps/git/git-tui.d.ts +66 -0
- package/dist/types/apps/git/sidebar.d.ts +149 -0
- package/dist/types/apps/git/state.d.ts +117 -0
- package/dist/types/apps/if-bench-board.d.ts +75 -0
- package/dist/types/apps/live-visualizer.d.ts +33 -0
- package/dist/types/apps/ps-data.d.ts +51 -0
- package/dist/types/apps/ps-top.d.ts +33 -0
- package/dist/types/apps/session-picker.d.ts +26 -0
- package/dist/types/apps/setup-model-picker.d.ts +13 -0
- package/dist/types/apps/standalone-picker.d.ts +42 -0
- package/dist/types/autocomplete.d.ts +4 -0
- package/dist/types/chat/advisor-message.d.ts +11 -0
- package/dist/types/chat/assistant-message.d.ts +106 -0
- package/dist/types/chat/background-tan-message.d.ts +9 -0
- package/dist/types/chat/bash-execution.d.ts +47 -0
- package/dist/types/chat/cache-invalidation-marker.d.ts +50 -0
- package/dist/types/chat/chat-transcript-builder.d.ts +50 -0
- package/dist/types/chat/collab-prompt-message.d.ts +10 -0
- package/dist/types/chat/compaction-summary-message.d.ts +54 -0
- package/dist/types/chat/custom-message.d.ts +10 -0
- package/dist/types/chat/display-preferences.d.ts +13 -0
- package/dist/types/chat/eval-execution.d.ts +29 -0
- package/dist/types/chat/execution-shared.d.ts +51 -0
- package/dist/types/chat/extension-types.d.ts +28 -0
- package/dist/types/chat/hook-message.d.ts +10 -0
- package/dist/types/chat/image-loading.d.ts +46 -0
- package/dist/types/chat/late-diagnostics-message.d.ts +21 -0
- package/dist/types/chat/messages.d.ts +189 -0
- package/dist/types/chat/reaction.d.ts +30 -0
- package/dist/types/chat/read-target.d.ts +4 -0
- package/dist/types/chat/read-tool-group.d.ts +67 -0
- package/dist/types/chat/served-model-marker.d.ts +47 -0
- package/dist/types/chat/skill-message.d.ts +33 -0
- package/dist/types/chat/skill-title-input.d.ts +14 -0
- package/dist/types/chat/stripped-tool-calls-placeholder.d.ts +12 -0
- package/dist/types/chat/thinking-display.d.ts +12 -0
- package/dist/types/chat/todo-reminder.d.ts +13 -0
- package/dist/types/chat/tool-execution.d.ts +138 -0
- package/dist/types/chat/transcript-browser.d.ts +93 -0
- package/dist/types/chat/transcript-entry.d.ts +45 -0
- package/dist/types/chat/transcript-outline.d.ts +86 -0
- package/dist/types/chat/transcript-render-helpers.d.ts +92 -0
- package/dist/types/chat/ttsr-notification.d.ts +23 -0
- package/dist/types/chat/user-message.d.ts +52 -0
- package/dist/types/chrome/chat-block.d.ts +64 -0
- package/dist/types/chrome/collab-qrcode.d.ts +28 -0
- package/dist/types/chrome/context-thresholds.d.ts +10 -0
- package/dist/types/chrome/countdown-timer.d.ts +14 -0
- package/dist/types/chrome/diff.d.ts +14 -0
- package/dist/types/chrome/dynamic-border.d.ts +16 -0
- package/dist/types/chrome/error-block.d.ts +17 -0
- package/dist/types/chrome/form-theme.d.ts +3 -0
- package/dist/types/chrome/format.d.ts +12 -0
- package/dist/types/chrome/index.d.ts +20 -0
- package/dist/types/chrome/keybinding-hints.d.ts +40 -0
- package/dist/types/chrome/live-board.d.ts +23 -0
- package/dist/types/chrome/local-date.d.ts +4 -0
- package/dist/types/chrome/message-divider.d.ts +22 -0
- package/dist/types/chrome/message-frame.d.ts +52 -0
- package/dist/types/chrome/message-notice.d.ts +35 -0
- package/dist/types/chrome/overlay-box.d.ts +74 -0
- package/dist/types/chrome/qrcode.d.ts +48 -0
- package/dist/types/chrome/segment-track.d.ts +27 -0
- package/dist/types/chrome/select-list-mouse-routing.d.ts +4 -0
- package/dist/types/chrome/selector-helpers.d.ts +52 -0
- package/dist/types/chrome/shared.d.ts +5 -0
- package/dist/types/chrome/streaming-panel.d.ts +19 -0
- package/dist/types/chrome/tool-activity.d.ts +17 -0
- package/dist/types/chrome/transcript-container.d.ts +129 -0
- package/dist/types/chrome/transcript-status.d.ts +12 -0
- package/dist/types/chrome/visual-truncate.d.ts +19 -0
- package/dist/types/components/disclosure.d.ts +42 -0
- package/dist/types/components/form.d.ts +130 -0
- package/dist/types/components/image.d.ts +18 -16
- package/dist/types/components/key-value-list.d.ts +24 -0
- package/dist/types/components/layout/geometry.d.ts +73 -0
- package/dist/types/components/layout/row.d.ts +55 -0
- package/dist/types/components/layout/split-pane.d.ts +80 -0
- package/dist/types/components/layout/stack.d.ts +50 -0
- package/dist/types/components/menu-selection.d.ts +71 -0
- package/dist/types/components/metric.d.ts +44 -0
- package/dist/types/components/progress-bar.d.ts +36 -0
- package/dist/types/components/scroll-view.d.ts +53 -19
- package/dist/types/components/scroll-viewport.d.ts +46 -0
- package/dist/types/components/section.d.ts +19 -0
- package/dist/types/components/select-list.d.ts +46 -2
- package/dist/types/components/settings-list.d.ts +20 -0
- package/dist/types/components/table.d.ts +32 -0
- package/dist/types/components/tree-view.d.ts +130 -0
- package/dist/types/components/wizard-step.d.ts +60 -0
- package/dist/types/hotkeys-markdown.d.ts +7 -0
- package/dist/types/index.d.ts +17 -0
- package/dist/types/keybinding-matchers.d.ts +35 -0
- package/dist/types/keys.d.ts +2 -2
- package/dist/types/lang-from-path.d.ts +9 -0
- package/dist/types/overlays/advisor-config.d.ts +114 -0
- package/dist/types/overlays/agent-activity.d.ts +41 -0
- package/dist/types/overlays/agent-hub-projection.d.ts +33 -0
- package/dist/types/overlays/agent-hub-renderer.d.ts +53 -0
- package/dist/types/overlays/agent-hub-types.d.ts +99 -0
- package/dist/types/overlays/agent-hub.d.ts +126 -0
- package/dist/types/overlays/agent-transcript-viewer.d.ts +71 -0
- package/dist/types/overlays/agents-hub.d.ts +72 -0
- package/dist/types/overlays/ask-dialog.d.ts +88 -0
- package/dist/types/overlays/bordered-loader.d.ts +11 -0
- package/dist/types/overlays/btw-history-panel.d.ts +29 -0
- package/dist/types/overlays/btw-history.d.ts +17 -0
- package/dist/types/overlays/btw-panel.d.ts +26 -0
- package/dist/types/overlays/cleanse-panel.d.ts +36 -0
- package/dist/types/overlays/codex-reset-fireworks.d.ts +52 -0
- package/dist/types/overlays/composer-shape-preview.d.ts +47 -0
- package/dist/types/overlays/composer-shape-registry.d.ts +50 -0
- package/dist/types/overlays/copy-selector.d.ts +48 -0
- package/dist/types/overlays/copy-targets.d.ts +63 -0
- package/dist/types/overlays/error-banner.d.ts +13 -0
- package/dist/types/overlays/extensions/display-text.d.ts +10 -0
- package/dist/types/overlays/extensions/extension-dashboard.d.ts +63 -0
- package/dist/types/overlays/extensions/extension-list.d.ts +54 -0
- package/dist/types/overlays/extensions/inspector-model.d.ts +109 -0
- package/dist/types/overlays/extensions/inspector-panel.d.ts +17 -0
- package/dist/types/overlays/extensions/live-tool-session.d.ts +28 -0
- package/dist/types/overlays/extensions/mcp-runtime.d.ts +107 -0
- package/dist/types/overlays/extensions/state-manager.d.ts +42 -0
- package/dist/types/overlays/extensions/types.d.ts +165 -0
- package/dist/types/overlays/history-search.d.ts +16 -0
- package/dist/types/overlays/hook-editor.d.ts +44 -0
- package/dist/types/overlays/hook-input.d.ts +20 -0
- package/dist/types/overlays/hook-selector.d.ts +71 -0
- package/dist/types/overlays/hub-frame.d.ts +77 -0
- package/dist/types/overlays/login-dialog.d.ts +43 -0
- package/dist/types/overlays/logout-account-selector.d.ts +15 -0
- package/dist/types/overlays/mcp-add-wizard.d.ts +87 -0
- package/dist/types/overlays/model-browser.d.ts +213 -0
- package/dist/types/overlays/model-hub.d.ts +72 -0
- package/dist/types/overlays/model-picker.d.ts +74 -0
- package/dist/types/overlays/model-selector.d.ts +52 -0
- package/dist/types/overlays/move-overlay.d.ts +39 -0
- package/dist/types/overlays/oauth-selector.d.ts +41 -0
- package/dist/types/overlays/omfg-panel.d.ts +20 -0
- package/dist/types/overlays/pause-screen.d.ts +43 -0
- package/dist/types/overlays/plan-review-overlay.d.ts +89 -0
- package/dist/types/overlays/plan-save-overlay.d.ts +19 -0
- package/dist/types/overlays/plan-toc.d.ts +41 -0
- package/dist/types/overlays/plugin-selector.d.ts +28 -0
- package/dist/types/overlays/plugin-settings.d.ts +180 -0
- package/dist/types/overlays/queue-mode-selector.d.ts +11 -0
- package/dist/types/overlays/reset-usage-selector.d.ts +23 -0
- package/dist/types/overlays/rewind-selector.d.ts +61 -0
- package/dist/types/overlays/running-subagent-badge.d.ts +6 -0
- package/dist/types/overlays/session-account-selector.d.ts +24 -0
- package/dist/types/overlays/session-info-overlay.d.ts +17 -0
- package/dist/types/overlays/session-observer-registry.d.ts +77 -0
- package/dist/types/overlays/session-selector.d.ts +131 -0
- package/dist/types/overlays/settings-defs.d.ts +119 -0
- package/dist/types/overlays/settings-selector.d.ts +73 -0
- package/dist/types/overlays/show-images-selector.d.ts +11 -0
- package/dist/types/overlays/snapcompact-shape-preview.d.ts +31 -0
- package/dist/types/overlays/theme-selector.d.ts +12 -0
- package/dist/types/overlays/thinking-selector.d.ts +12 -0
- package/dist/types/overlays/tiny-title-download-progress.d.ts +21 -0
- package/dist/types/overlays/tree-selector.d.ts +92 -0
- package/dist/types/overlays/usage-dashboard.d.ts +94 -0
- package/dist/types/overlays/usage-display.d.ts +5 -0
- package/dist/types/overlays/usage-row.d.ts +17 -0
- package/dist/types/prompt/attachment-chips.d.ts +19 -0
- package/dist/types/prompt/composer-attachments.d.ts +71 -0
- package/dist/types/prompt/composer-cache.d.ts +37 -0
- package/dist/types/prompt/composer.d.ts +159 -0
- package/dist/types/prompt/custom-editor.d.ts +261 -0
- package/dist/types/prompt/editor-top-gap.d.ts +18 -0
- package/dist/types/prompt/emoji-autocomplete.d.ts +16 -0
- package/dist/types/prompt/github-ref-autocomplete.d.ts +35 -0
- package/dist/types/prompt/gradient-highlight.d.ts +32 -0
- package/dist/types/prompt/image-format.d.ts +4 -0
- package/dist/types/prompt/image-references.d.ts +26 -0
- package/dist/types/prompt/interactive-context-helpers.d.ts +43 -0
- package/dist/types/prompt/internal-url-autocomplete.d.ts +56 -0
- package/dist/types/prompt/macos-spelling.d.ts +44 -0
- package/dist/types/prompt/magic-keyword-boundary.d.ts +9 -0
- package/dist/types/prompt/magic-keywords.d.ts +26 -0
- package/dist/types/prompt/markdown-prose.d.ts +15 -0
- package/dist/types/prompt/model-mention-autocomplete.d.ts +25 -0
- package/dist/types/prompt/model-mention-syntax.d.ts +24 -0
- package/dist/types/prompt/orchestrate.d.ts +13 -0
- package/dist/types/prompt/prompt-action-autocomplete.d.ts +56 -0
- package/dist/types/prompt/queue-input.d.ts +8 -0
- package/dist/types/prompt/skill-tokens.d.ts +13 -0
- package/dist/types/prompt/tools-markdown.d.ts +12 -0
- package/dist/types/prompt/ultrathink.d.ts +13 -0
- package/dist/types/prompt/usage-amounts.d.ts +26 -0
- package/dist/types/prompt/video.d.ts +18 -0
- package/dist/types/prompt/welcome.d.ts +83 -0
- package/dist/types/prompt/workflow.d.ts +13 -0
- package/dist/types/render/code-cell.d.ts +51 -0
- package/dist/types/render/file-list.d.ts +22 -0
- package/dist/types/render/hyperlink.d.ts +80 -0
- package/dist/types/render/index.d.ts +16 -0
- package/dist/types/render/output-block.d.ts +54 -0
- package/dist/types/render/output-pane.d.ts +80 -0
- package/dist/types/render/render-utils.d.ts +312 -0
- package/dist/types/render/sixel.d.ts +21 -0
- package/dist/types/render/status-line.d.ts +23 -0
- package/dist/types/render/tool-card.d.ts +71 -0
- package/dist/types/render/tree-list.d.ts +29 -0
- package/dist/types/render/types.d.ts +17 -0
- package/dist/types/render/utils.d.ts +43 -0
- package/dist/types/render/width-aware-text.d.ts +23 -0
- package/dist/types/setup/lazy.d.ts +3 -0
- package/dist/types/setup/scenes/composer.d.ts +3 -0
- package/dist/types/setup/scenes/glyph.d.ts +3 -0
- package/dist/types/setup/scenes/model.d.ts +3 -0
- package/dist/types/setup/scenes/outro.d.ts +2 -0
- package/dist/types/setup/scenes/providers.d.ts +3 -0
- package/dist/types/setup/scenes/sign-in.d.ts +21 -0
- package/dist/types/setup/scenes/splash.d.ts +11 -0
- package/dist/types/setup/scenes/theme.d.ts +3 -0
- package/dist/types/setup/scenes/types.d.ts +110 -0
- package/dist/types/setup/scenes/web-search.d.ts +22 -0
- package/dist/types/setup/setup-version.d.ts +11 -0
- package/dist/types/setup/startup-splash.d.ts +9 -0
- package/dist/types/setup/wizard-overlay.d.ts +16 -0
- package/dist/types/setup/wizard.d.ts +25 -0
- package/dist/types/status-line/component.d.ts +182 -0
- package/dist/types/status-line/context-usage.d.ts +156 -0
- package/dist/types/status-line/footer.d.ts +30 -0
- package/dist/types/status-line/git-utils.d.ts +22 -0
- package/dist/types/status-line/host.d.ts +129 -0
- package/dist/types/status-line/index.d.ts +6 -0
- package/dist/types/status-line/loop.d.ts +18 -0
- package/dist/types/status-line/metrics.d.ts +21 -0
- package/dist/types/status-line/presets.d.ts +3 -0
- package/dist/types/status-line/schema.d.ts +15 -0
- package/dist/types/status-line/segments.d.ts +5 -0
- package/dist/types/status-line/separators.d.ts +3 -0
- package/dist/types/status-line/types.d.ts +236 -0
- package/dist/types/stdin-buffer.d.ts +4 -0
- package/dist/types/theme/color.d.ts +24 -0
- package/dist/types/theme/defaults/index.d.ts +9489 -0
- package/dist/types/theme/index.d.ts +4 -0
- package/dist/types/theme/loader.d.ts +23 -0
- package/dist/types/theme/mermaid-cache.d.ts +26 -0
- package/dist/types/theme/schema-validation.d.ts +3 -0
- package/dist/types/theme/schema.d.ts +25 -0
- package/dist/types/theme/session-color.d.ts +43 -0
- package/dist/types/theme/shimmer.d.ts +44 -0
- package/dist/types/theme/symbols.d.ts +34 -0
- package/dist/types/theme/theme-class.d.ts +299 -0
- package/dist/types/theme/theme.d.ts +111 -0
- package/dist/types/theme/tui-adapters.d.ts +30 -0
- package/dist/types/thinking.d.ts +165 -0
- package/dist/types/tools/agent-tree.d.ts +36 -0
- package/dist/types/tools/ask.d.ts +67 -0
- package/dist/types/tools/ast-edit.d.ts +53 -0
- package/dist/types/tools/ast-grep.d.ts +52 -0
- package/dist/types/tools/autoresearch.d.ts +156 -0
- package/dist/types/tools/bash-interactive.d.ts +28 -0
- package/dist/types/tools/bash.d.ts +103 -0
- package/dist/types/tools/conflict-detect.d.ts +43 -0
- package/dist/types/tools/debug.d.ts +60 -0
- package/dist/types/tools/default-renderer.d.ts +24 -0
- package/dist/types/tools/edit.d.ts +158 -0
- package/dist/types/tools/eval-format/code-mode-declarations.d.ts +5 -0
- package/dist/types/tools/eval-format/index.d.ts +5 -0
- package/dist/types/tools/eval-format/javascript.d.ts +2 -0
- package/dist/types/tools/eval-format/python.d.ts +2 -0
- package/dist/types/tools/eval.d.ts +94 -0
- package/dist/types/tools/fetch.d.ts +42 -0
- package/dist/types/tools/gh-format.d.ts +8 -0
- package/dist/types/tools/github.d.ts +144 -0
- package/dist/types/tools/glob.d.ts +44 -0
- package/dist/types/tools/goal.d.ts +42 -0
- package/dist/types/tools/grep.d.ts +64 -0
- package/dist/types/tools/grouped-file-output.d.ts +71 -0
- package/dist/types/tools/hashline-format.d.ts +28 -0
- package/dist/types/tools/hub.d.ts +340 -0
- package/dist/types/tools/index.d.ts +4 -0
- package/dist/types/tools/json-tree.d.ts +59 -0
- package/dist/types/tools/line-ranges.d.ts +29 -0
- package/dist/types/tools/list-limit.d.ts +15 -0
- package/dist/types/tools/lsp.d.ts +72 -0
- package/dist/types/tools/match-line-format.d.ts +11 -0
- package/dist/types/tools/mcp.d.ts +81 -0
- package/dist/types/tools/memory.d.ts +67 -0
- package/dist/types/tools/output-meta.d.ts +151 -0
- package/dist/types/tools/read.d.ts +139 -0
- package/dist/types/tools/renderer.d.ts +98 -0
- package/dist/types/tools/report-tool-issue.d.ts +8 -0
- package/dist/types/tools/resolve.d.ts +47 -0
- package/dist/types/tools/streaming-output.d.ts +282 -0
- package/dist/types/tools/subprocess.d.ts +24 -0
- package/dist/types/tools/task-repair-args.d.ts +53 -0
- package/dist/types/tools/task-yield-assembly.d.ts +20 -0
- package/dist/types/tools/task.d.ts +425 -0
- package/dist/types/tools/terminal-output.d.ts +8 -0
- package/dist/types/tools/think.d.ts +13 -0
- package/dist/types/tools/todo.d.ts +118 -0
- package/dist/types/tools/tool-errors.d.ts +7 -0
- package/dist/types/tools/vibe.d.ts +120 -0
- package/dist/types/tools/web-search.d.ts +195 -0
- package/dist/types/tools/write.d.ts +76 -0
- package/dist/types/tools/xd-url.d.ts +13 -0
- package/dist/types/tools/xdev.d.ts +52 -0
- package/dist/types/tui.d.ts +18 -0
- package/dist/types/utils.d.ts +2 -0
- package/package.json +37 -3
- package/src/app-keybindings.ts +760 -0
- package/src/apps/autoresearch-dashboard.ts +500 -0
- package/src/apps/autoresearch-data.ts +64 -0
- package/src/apps/cleanse-board.ts +341 -0
- package/src/apps/cleanse-picker.ts +57 -0
- package/src/apps/debug/log-formatting.ts +53 -0
- package/src/apps/debug/log-viewer.ts +868 -0
- package/src/apps/debug/protocol-probe.ts +267 -0
- package/src/apps/debug/raw-sse-buffer.ts +449 -0
- package/src/apps/debug/raw-sse.ts +282 -0
- package/src/apps/debug/terminal-info.ts +115 -0
- package/src/apps/debug/viewer-frame.ts +174 -0
- package/src/apps/git/avatar.ts +52 -0
- package/src/apps/git/colors.ts +109 -0
- package/src/apps/git/diff-pane.ts +1512 -0
- package/src/apps/git/git-tui.ts +889 -0
- package/src/apps/git/sidebar.ts +1204 -0
- package/src/apps/git/state.ts +113 -0
- package/src/apps/if-bench-board.ts +324 -0
- package/src/apps/live-visualizer.ts +238 -0
- package/src/apps/ps-data.ts +116 -0
- package/src/apps/ps-top.ts +422 -0
- package/src/apps/session-picker.ts +95 -0
- package/src/apps/setup-model-picker.ts +21 -0
- package/src/apps/standalone-picker.ts +111 -0
- package/src/autocomplete.ts +9 -13
- package/src/chat/advisor-message.ts +175 -0
- package/src/chat/assistant-message.ts +1214 -0
- package/src/chat/background-tan-message.ts +35 -0
- package/src/chat/bash-execution.ts +394 -0
- package/src/chat/cache-invalidation-marker.ts +94 -0
- package/src/chat/chat-transcript-builder.ts +593 -0
- package/src/chat/collab-prompt-message.ts +34 -0
- package/src/chat/compaction-summary-message.ts +261 -0
- package/src/chat/custom-message.ts +23 -0
- package/src/chat/display-preferences.ts +24 -0
- package/src/chat/eval-execution.ts +172 -0
- package/src/chat/execution-shared.ts +113 -0
- package/src/chat/extension-types.ts +46 -0
- package/src/chat/hook-message.ts +20 -0
- package/src/chat/image-loading.ts +122 -0
- package/src/chat/late-diagnostics-message.ts +92 -0
- package/src/chat/messages.ts +305 -0
- package/src/chat/reaction.ts +65 -0
- package/src/chat/read-target.ts +7 -0
- package/src/chat/read-tool-group.ts +873 -0
- package/src/chat/served-model-marker.ts +91 -0
- package/src/chat/skill-message.ts +220 -0
- package/src/chat/skill-title-input.ts +41 -0
- package/src/chat/stripped-tool-calls-placeholder.ts +35 -0
- package/src/chat/thinking-display.ts +312 -0
- package/src/chat/todo-reminder.ts +33 -0
- package/src/chat/tool-execution.ts +1395 -0
- package/src/chat/transcript-browser.ts +268 -0
- package/src/chat/transcript-entry.ts +96 -0
- package/src/chat/transcript-outline.ts +260 -0
- package/src/chat/transcript-render-helpers.ts +315 -0
- package/src/chat/ttsr-notification.ts +123 -0
- package/src/chat/user-message.ts +287 -0
- package/src/chrome/chat-block.ts +110 -0
- package/src/chrome/collab-qrcode.ts +74 -0
- package/src/chrome/context-thresholds.ts +85 -0
- package/src/chrome/countdown-timer.ts +74 -0
- package/src/chrome/diff.ts +266 -0
- package/src/chrome/dynamic-border.ts +36 -0
- package/src/chrome/error-block.ts +63 -0
- package/src/chrome/form-theme.ts +10 -0
- package/src/chrome/format.ts +66 -0
- package/src/chrome/index.ts +21 -0
- package/src/chrome/keybinding-hints.ts +55 -0
- package/src/chrome/live-board.ts +123 -0
- package/src/chrome/local-date.ts +20 -0
- package/src/chrome/message-divider.ts +51 -0
- package/src/chrome/message-frame.ts +164 -0
- package/src/chrome/message-notice.ts +103 -0
- package/src/chrome/overlay-box.ts +301 -0
- package/src/chrome/qrcode.ts +539 -0
- package/src/chrome/segment-track.ts +86 -0
- package/src/chrome/select-list-mouse-routing.ts +11 -0
- package/src/chrome/selector-helpers.ts +119 -0
- package/src/chrome/shared.ts +27 -0
- package/src/chrome/streaming-panel.ts +72 -0
- package/src/chrome/tool-activity.ts +44 -0
- package/src/chrome/transcript-container.ts +902 -0
- package/src/chrome/transcript-status.ts +27 -0
- package/src/chrome/visual-truncate.ts +70 -0
- package/src/components/disclosure.ts +235 -0
- package/src/components/editor.ts +10 -12
- package/src/components/form.ts +566 -0
- package/src/components/image.ts +80 -53
- package/src/components/input.ts +6 -27
- package/src/components/key-value-list.ts +88 -0
- package/src/components/layout/geometry.ts +202 -0
- package/src/components/layout/row.ts +283 -0
- package/src/components/layout/split-pane.ts +349 -0
- package/src/components/layout/stack.ts +261 -0
- package/src/components/markdown.ts +16 -12
- package/src/components/menu-selection.ts +248 -0
- package/src/components/metric.ts +132 -0
- package/src/components/progress-bar.ts +140 -0
- package/src/components/scroll-view.ts +372 -70
- package/src/components/scroll-viewport.ts +154 -0
- package/src/components/section.ts +77 -0
- package/src/components/select-list.ts +238 -159
- package/src/components/settings-list.ts +103 -80
- package/src/components/table.ts +127 -0
- package/src/components/tree-view.ts +481 -0
- package/src/components/wizard-step.ts +229 -0
- package/src/deccara.ts +1 -3
- package/src/hotkeys-markdown.ts +100 -0
- package/src/index.ts +18 -0
- package/src/keybinding-matchers.ts +99 -0
- package/src/keys.ts +2 -2
- package/src/lang-from-path.ts +252 -0
- package/src/overlays/advisor-config.ts +761 -0
- package/src/overlays/agent-activity.ts +113 -0
- package/src/overlays/agent-hub-projection.ts +250 -0
- package/src/overlays/agent-hub-renderer.ts +281 -0
- package/src/overlays/agent-hub-types.ts +74 -0
- package/src/overlays/agent-hub.ts +1562 -0
- package/src/overlays/agent-transcript-viewer.ts +669 -0
- package/src/overlays/agents-hub.ts +1203 -0
- package/src/overlays/ask-dialog.ts +1202 -0
- package/src/overlays/bordered-loader.ts +41 -0
- package/src/overlays/btw-history-panel.ts +591 -0
- package/src/overlays/btw-history.ts +33 -0
- package/src/overlays/btw-panel.ts +167 -0
- package/src/overlays/cleanse-panel.ts +167 -0
- package/src/overlays/codex-reset-fireworks.ts +375 -0
- package/src/overlays/composer-shape-preview.ts +137 -0
- package/src/overlays/composer-shape-registry.ts +82 -0
- package/src/overlays/copy-selector.ts +618 -0
- package/src/overlays/copy-targets.ts +210 -0
- package/src/overlays/error-banner.ts +39 -0
- package/src/overlays/extensions/display-text.ts +39 -0
- package/src/overlays/extensions/extension-dashboard.ts +645 -0
- package/src/overlays/extensions/extension-list.ts +667 -0
- package/src/overlays/extensions/inspector-model.ts +484 -0
- package/src/overlays/extensions/inspector-panel.ts +669 -0
- package/src/overlays/extensions/live-tool-session.ts +67 -0
- package/src/overlays/extensions/mcp-runtime.ts +289 -0
- package/src/overlays/extensions/state-manager.ts +337 -0
- package/src/overlays/extensions/types.ts +208 -0
- package/src/overlays/history-search.ts +268 -0
- package/src/overlays/hook-editor.ts +272 -0
- package/src/overlays/hook-input.ts +84 -0
- package/src/overlays/hook-selector.ts +635 -0
- package/src/overlays/hub-frame.ts +262 -0
- package/src/overlays/login-dialog.ts +231 -0
- package/src/overlays/logout-account-selector.ts +115 -0
- package/src/overlays/mcp-add-wizard.ts +1436 -0
- package/src/overlays/model-browser.ts +1176 -0
- package/src/overlays/model-hub.ts +2279 -0
- package/src/overlays/model-picker.ts +285 -0
- package/src/overlays/model-selector.ts +107 -0
- package/src/overlays/move-overlay.ts +197 -0
- package/src/overlays/oauth-selector.ts +446 -0
- package/src/overlays/omfg-panel.ts +136 -0
- package/src/overlays/pause-screen.ts +198 -0
- package/src/overlays/plan-review-overlay.ts +1227 -0
- package/src/overlays/plan-save-overlay.ts +74 -0
- package/src/overlays/plan-toc.ts +139 -0
- package/src/overlays/plugin-selector.ts +97 -0
- package/src/overlays/plugin-settings.ts +839 -0
- package/src/overlays/queue-mode-selector.ts +55 -0
- package/src/overlays/reset-usage-selector.ts +170 -0
- package/src/overlays/rewind-selector.ts +499 -0
- package/src/overlays/running-subagent-badge.ts +19 -0
- package/src/overlays/session-account-selector.ts +68 -0
- package/src/overlays/session-info-overlay.ts +96 -0
- package/src/overlays/session-observer-registry.ts +289 -0
- package/src/overlays/session-selector.ts +1137 -0
- package/src/overlays/settings-defs.ts +315 -0
- package/src/overlays/settings-selector.ts +1415 -0
- package/src/overlays/show-images-selector.ts +44 -0
- package/src/overlays/snapcompact-shape-preview-doc.md +14 -0
- package/src/overlays/snapcompact-shape-preview.ts +192 -0
- package/src/overlays/theme-selector.ts +62 -0
- package/src/overlays/thinking-selector.ts +51 -0
- package/src/overlays/tiny-title-download-progress.ts +102 -0
- package/src/overlays/tree-selector.ts +1121 -0
- package/src/overlays/usage-dashboard.ts +629 -0
- package/src/overlays/usage-display.ts +45 -0
- package/src/overlays/usage-row.ts +118 -0
- package/src/prompt/attachment-chips.ts +201 -0
- package/src/prompt/composer-attachments.ts +280 -0
- package/src/prompt/composer-cache.ts +304 -0
- package/src/prompt/composer.ts +934 -0
- package/src/prompt/custom-editor.ts +1392 -0
- package/src/prompt/data/emojis.json +1 -0
- package/src/prompt/editor-top-gap.ts +28 -0
- package/src/prompt/emoji-autocomplete.ts +285 -0
- package/src/prompt/github-ref-autocomplete.ts +75 -0
- package/src/prompt/gradient-highlight.ts +101 -0
- package/src/prompt/image-format.ts +28 -0
- package/src/prompt/image-references.ts +102 -0
- package/src/prompt/interactive-context-helpers.ts +126 -0
- package/src/prompt/internal-url-autocomplete.ts +155 -0
- package/src/prompt/macos-spelling.ts +456 -0
- package/src/prompt/magic-keyword-boundary.ts +23 -0
- package/src/prompt/magic-keywords.ts +42 -0
- package/src/prompt/markdown-prose.ts +245 -0
- package/src/prompt/model-mention-autocomplete.ts +94 -0
- package/src/prompt/model-mention-syntax.ts +41 -0
- package/src/prompt/orchestrate.ts +26 -0
- package/src/prompt/prompt-action-autocomplete.ts +337 -0
- package/src/prompt/queue-input.ts +132 -0
- package/src/prompt/skill-tokens.ts +36 -0
- package/src/prompt/tips.txt +27 -0
- package/src/prompt/tools-markdown.ts +29 -0
- package/src/prompt/ultrathink.ts +26 -0
- package/src/prompt/usage-amounts.ts +99 -0
- package/src/prompt/video.ts +47 -0
- package/src/prompt/welcome.ts +605 -0
- package/src/prompt/workflow.ts +26 -0
- package/src/render/code-cell.ts +244 -0
- package/src/render/file-list.ts +58 -0
- package/src/render/hyperlink.ts +192 -0
- package/src/render/index.ts +17 -0
- package/src/render/output-block.ts +267 -0
- package/src/render/output-pane.ts +299 -0
- package/src/render/render-utils.ts +1182 -0
- package/src/render/sixel.ts +69 -0
- package/src/render/status-line.ts +55 -0
- package/src/render/tool-card.ts +272 -0
- package/src/render/tree-list.ts +188 -0
- package/src/render/types.ts +19 -0
- package/src/render/utils.ts +109 -0
- package/src/render/width-aware-text.ts +60 -0
- package/src/setup/lazy.ts +17 -0
- package/src/setup/scenes/composer.ts +127 -0
- package/src/setup/scenes/glyph.ts +120 -0
- package/src/setup/scenes/model.ts +138 -0
- package/src/setup/scenes/outro.ts +24 -0
- package/src/setup/scenes/providers.ts +107 -0
- package/src/setup/scenes/sign-in.ts +373 -0
- package/src/setup/scenes/splash.ts +192 -0
- package/src/setup/scenes/theme.ts +343 -0
- package/src/setup/scenes/types.ts +111 -0
- package/src/setup/scenes/web-search.ts +165 -0
- package/src/setup/setup-version.ts +11 -0
- package/src/setup/startup-splash.ts +107 -0
- package/src/setup/wizard-overlay.ts +319 -0
- package/src/setup/wizard.ts +101 -0
- package/src/status-line/component.ts +3003 -0
- package/src/status-line/context-usage.ts +688 -0
- package/src/status-line/footer.ts +323 -0
- package/src/status-line/git-utils.ts +42 -0
- package/src/status-line/host.ts +97 -0
- package/src/status-line/index.ts +6 -0
- package/src/status-line/loop.ts +28 -0
- package/src/status-line/metrics.ts +94 -0
- package/src/status-line/presets.ts +107 -0
- package/src/status-line/schema.ts +57 -0
- package/src/status-line/segments.ts +934 -0
- package/src/status-line/separators.ts +55 -0
- package/src/status-line/types.ts +227 -0
- package/src/stdin-buffer.ts +4 -2
- package/src/theme/color.ts +95 -0
- package/src/theme/dark.json +95 -0
- package/src/theme/defaults/alabaster.json +93 -0
- package/src/theme/defaults/amethyst.json +96 -0
- package/src/theme/defaults/anthracite.json +93 -0
- package/src/theme/defaults/basalt.json +91 -0
- package/src/theme/defaults/birch.json +95 -0
- package/src/theme/defaults/dark-abyss.json +91 -0
- package/src/theme/defaults/dark-arctic.json +104 -0
- package/src/theme/defaults/dark-aurora.json +95 -0
- package/src/theme/defaults/dark-catppuccin.json +107 -0
- package/src/theme/defaults/dark-cavern.json +91 -0
- package/src/theme/defaults/dark-celestial.json +106 -0
- package/src/theme/defaults/dark-copper.json +95 -0
- package/src/theme/defaults/dark-cosmos.json +90 -0
- package/src/theme/defaults/dark-cyberpunk.json +102 -0
- package/src/theme/defaults/dark-dracula.json +98 -0
- package/src/theme/defaults/dark-eclipse.json +91 -0
- package/src/theme/defaults/dark-ember.json +95 -0
- package/src/theme/defaults/dark-equinox.json +90 -0
- package/src/theme/defaults/dark-forest.json +96 -0
- package/src/theme/defaults/dark-github.json +105 -0
- package/src/theme/defaults/dark-gruvbox.json +112 -0
- package/src/theme/defaults/dark-lavender.json +95 -0
- package/src/theme/defaults/dark-lunar.json +89 -0
- package/src/theme/defaults/dark-midnight.json +95 -0
- package/src/theme/defaults/dark-monochrome.json +94 -0
- package/src/theme/defaults/dark-monokai.json +98 -0
- package/src/theme/defaults/dark-nebula.json +90 -0
- package/src/theme/defaults/dark-nord.json +98 -0
- package/src/theme/defaults/dark-ocean.json +101 -0
- package/src/theme/defaults/dark-one.json +100 -0
- package/src/theme/defaults/dark-poimandres.json +115 -0
- package/src/theme/defaults/dark-rainforest.json +91 -0
- package/src/theme/defaults/dark-reef.json +91 -0
- package/src/theme/defaults/dark-retro.json +92 -0
- package/src/theme/defaults/dark-rose-pine.json +96 -0
- package/src/theme/defaults/dark-sakura.json +95 -0
- package/src/theme/defaults/dark-slate.json +95 -0
- package/src/theme/defaults/dark-solarized.json +97 -0
- package/src/theme/defaults/dark-solstice.json +90 -0
- package/src/theme/defaults/dark-starfall.json +91 -0
- package/src/theme/defaults/dark-sunset.json +99 -0
- package/src/theme/defaults/dark-swamp.json +90 -0
- package/src/theme/defaults/dark-synthwave.json +103 -0
- package/src/theme/defaults/dark-taiga.json +91 -0
- package/src/theme/defaults/dark-terminal.json +95 -0
- package/src/theme/defaults/dark-tokyo-night.json +101 -0
- package/src/theme/defaults/dark-tundra.json +91 -0
- package/src/theme/defaults/dark-twilight.json +91 -0
- package/src/theme/defaults/dark-volcanic.json +91 -0
- package/src/theme/defaults/graphite.json +92 -0
- package/src/theme/defaults/index.ts +201 -0
- package/src/theme/defaults/light-arctic.json +107 -0
- package/src/theme/defaults/light-aurora-day.json +91 -0
- package/src/theme/defaults/light-canyon.json +91 -0
- package/src/theme/defaults/light-catppuccin.json +106 -0
- package/src/theme/defaults/light-cirrus.json +90 -0
- package/src/theme/defaults/light-coral.json +95 -0
- package/src/theme/defaults/light-cyberpunk.json +96 -0
- package/src/theme/defaults/light-dawn.json +90 -0
- package/src/theme/defaults/light-dunes.json +91 -0
- package/src/theme/defaults/light-eucalyptus.json +95 -0
- package/src/theme/defaults/light-forest.json +100 -0
- package/src/theme/defaults/light-frost.json +95 -0
- package/src/theme/defaults/light-github.json +115 -0
- package/src/theme/defaults/light-glacier.json +91 -0
- package/src/theme/defaults/light-gruvbox.json +108 -0
- package/src/theme/defaults/light-haze.json +90 -0
- package/src/theme/defaults/light-honeycomb.json +95 -0
- package/src/theme/defaults/light-lagoon.json +91 -0
- package/src/theme/defaults/light-lavender.json +95 -0
- package/src/theme/defaults/light-meadow.json +91 -0
- package/src/theme/defaults/light-mint.json +95 -0
- package/src/theme/defaults/light-monochrome.json +101 -0
- package/src/theme/defaults/light-ocean.json +99 -0
- package/src/theme/defaults/light-one.json +99 -0
- package/src/theme/defaults/light-opal.json +91 -0
- package/src/theme/defaults/light-orchard.json +91 -0
- package/src/theme/defaults/light-paper.json +95 -0
- package/src/theme/defaults/light-poimandres.json +115 -0
- package/src/theme/defaults/light-prism.json +90 -0
- package/src/theme/defaults/light-retro.json +98 -0
- package/src/theme/defaults/light-sand.json +95 -0
- package/src/theme/defaults/light-savanna.json +91 -0
- package/src/theme/defaults/light-solarized.json +102 -0
- package/src/theme/defaults/light-soleil.json +90 -0
- package/src/theme/defaults/light-sunset.json +99 -0
- package/src/theme/defaults/light-synthwave.json +98 -0
- package/src/theme/defaults/light-tokyo-night.json +111 -0
- package/src/theme/defaults/light-wetland.json +91 -0
- package/src/theme/defaults/light-zenith.json +89 -0
- package/src/theme/defaults/limestone.json +94 -0
- package/src/theme/defaults/mahogany.json +97 -0
- package/src/theme/defaults/marble.json +93 -0
- package/src/theme/defaults/obsidian.json +91 -0
- package/src/theme/defaults/onyx.json +91 -0
- package/src/theme/defaults/pearl.json +93 -0
- package/src/theme/defaults/porcelain.json +91 -0
- package/src/theme/defaults/quartz.json +96 -0
- package/src/theme/defaults/sandstone.json +95 -0
- package/src/theme/defaults/titanium.json +90 -0
- package/src/theme/index.ts +5 -0
- package/src/theme/light.json +93 -0
- package/src/theme/loader.ts +200 -0
- package/src/theme/mermaid-cache.ts +92 -0
- package/src/theme/schema-validation.ts +119 -0
- package/src/theme/schema.ts +168 -0
- package/src/theme/session-color.ts +253 -0
- package/src/theme/shimmer.ts +307 -0
- package/src/theme/symbols.ts +1433 -0
- package/src/theme/theme-class.ts +787 -0
- package/src/theme/theme-schema.json +463 -0
- package/src/theme/theme.ts +810 -0
- package/src/theme/tui-adapters.ts +339 -0
- package/src/thinking.ts +380 -0
- package/src/tools/agent-tree.ts +128 -0
- package/src/tools/ask.ts +482 -0
- package/src/tools/ast-edit.ts +210 -0
- package/src/tools/ast-grep.ts +171 -0
- package/src/tools/autoresearch.ts +287 -0
- package/src/tools/bash-interactive.ts +295 -0
- package/src/tools/bash.ts +468 -0
- package/src/tools/conflict-detect.ts +77 -0
- package/src/tools/debug.ts +167 -0
- package/src/tools/default-renderer.ts +172 -0
- package/src/tools/edit.ts +1258 -0
- package/src/tools/eval-format/code-mode-declarations.ts +61 -0
- package/src/tools/eval-format/index.ts +16 -0
- package/src/tools/eval-format/javascript.ts +952 -0
- package/src/tools/eval-format/python.ts +544 -0
- package/src/tools/eval.ts +835 -0
- package/src/tools/fetch.ts +226 -0
- package/src/tools/gh-format.ts +18 -0
- package/src/tools/github.ts +686 -0
- package/src/tools/glob.ts +213 -0
- package/src/tools/goal.ts +153 -0
- package/src/tools/grep.ts +385 -0
- package/src/tools/grouped-file-output.ts +211 -0
- package/src/tools/hashline-format.ts +59 -0
- package/src/tools/hub.ts +1488 -0
- package/src/tools/index.ts +71 -0
- package/src/tools/json-tree.ts +388 -0
- package/src/tools/line-ranges.ts +98 -0
- package/src/tools/list-limit.ts +43 -0
- package/src/tools/lsp.ts +702 -0
- package/src/tools/match-line-format.ts +20 -0
- package/src/tools/mcp.ts +309 -0
- package/src/tools/memory.ts +220 -0
- package/src/tools/output-meta.ts +367 -0
- package/src/tools/read.ts +628 -0
- package/src/tools/renderer.ts +107 -0
- package/src/tools/report-tool-issue.ts +13 -0
- package/src/tools/resolve.ts +139 -0
- package/src/tools/streaming-output.ts +1576 -0
- package/src/tools/subprocess.ts +39 -0
- package/src/tools/task-repair-args.ts +118 -0
- package/src/tools/task-yield-assembly.ts +147 -0
- package/src/tools/task.ts +2110 -0
- package/src/tools/terminal-output.ts +153 -0
- package/src/tools/think.ts +28 -0
- package/src/tools/todo.ts +580 -0
- package/src/tools/tool-errors.ts +15 -0
- package/src/tools/vibe.ts +420 -0
- package/src/tools/web-search.ts +409 -0
- package/src/tools/write.ts +511 -0
- package/src/tools/xd-url.ts +28 -0
- package/src/tools/xdev.ts +201 -0
- package/src/tui.ts +70 -8
- package/src/utils.ts +8 -0
|
@@ -0,0 +1,787 @@
|
|
|
1
|
+
import { colorLuma, relativeLuminance } from "@oh-my-pi/pi-utils/color";
|
|
2
|
+
import * as logger from "@oh-my-pi/pi-utils/logger";
|
|
3
|
+
import chalk from "@oh-my-pi/pi-utils/chalk";
|
|
4
|
+
import { bgAnsi, colorToAnsi, fgAnsi, resolveToHex } from "./color";
|
|
5
|
+
import { type ColorMode, isValidThemeColor, type ThemeBg, type ThemeColor } from "./schema";
|
|
6
|
+
import type { SessionAccentTheme } from "./session-color";
|
|
7
|
+
import {
|
|
8
|
+
type SlashCommandIconName,
|
|
9
|
+
SPINNER_FRAMES,
|
|
10
|
+
type SpinnerType,
|
|
11
|
+
SYMBOL_PRESETS,
|
|
12
|
+
type SymbolKey,
|
|
13
|
+
type SymbolMap,
|
|
14
|
+
type SymbolPreset,
|
|
15
|
+
} from "./symbols";
|
|
16
|
+
|
|
17
|
+
// ============================================================================
|
|
18
|
+
// Theme Class
|
|
19
|
+
// ============================================================================
|
|
20
|
+
|
|
21
|
+
const langMap: Record<string, SymbolKey> = {
|
|
22
|
+
typescript: "lang.typescript",
|
|
23
|
+
ts: "lang.typescript",
|
|
24
|
+
tsx: "lang.typescript",
|
|
25
|
+
javascript: "lang.javascript",
|
|
26
|
+
js: "lang.javascript",
|
|
27
|
+
jsx: "lang.javascript",
|
|
28
|
+
mjs: "lang.javascript",
|
|
29
|
+
cjs: "lang.javascript",
|
|
30
|
+
python: "lang.python",
|
|
31
|
+
py: "lang.python",
|
|
32
|
+
rust: "lang.rust",
|
|
33
|
+
rs: "lang.rust",
|
|
34
|
+
go: "lang.go",
|
|
35
|
+
java: "lang.java",
|
|
36
|
+
c: "lang.c",
|
|
37
|
+
cpp: "lang.cpp",
|
|
38
|
+
"c++": "lang.cpp",
|
|
39
|
+
cc: "lang.cpp",
|
|
40
|
+
cxx: "lang.cpp",
|
|
41
|
+
csharp: "lang.csharp",
|
|
42
|
+
cs: "lang.csharp",
|
|
43
|
+
ruby: "lang.ruby",
|
|
44
|
+
rb: "lang.ruby",
|
|
45
|
+
julia: "lang.julia",
|
|
46
|
+
jl: "lang.julia",
|
|
47
|
+
php: "lang.php",
|
|
48
|
+
swift: "lang.swift",
|
|
49
|
+
kotlin: "lang.kotlin",
|
|
50
|
+
kt: "lang.kotlin",
|
|
51
|
+
bash: "lang.shell",
|
|
52
|
+
sh: "lang.shell",
|
|
53
|
+
zsh: "lang.shell",
|
|
54
|
+
fish: "lang.shell",
|
|
55
|
+
powershell: "lang.shell",
|
|
56
|
+
just: "lang.shell",
|
|
57
|
+
shell: "lang.shell",
|
|
58
|
+
html: "lang.html",
|
|
59
|
+
htm: "lang.html",
|
|
60
|
+
astro: "lang.html",
|
|
61
|
+
vue: "lang.html",
|
|
62
|
+
svelte: "lang.html",
|
|
63
|
+
css: "lang.css",
|
|
64
|
+
scss: "lang.css",
|
|
65
|
+
sass: "lang.css",
|
|
66
|
+
less: "lang.css",
|
|
67
|
+
json: "lang.json",
|
|
68
|
+
yaml: "lang.yaml",
|
|
69
|
+
yml: "lang.yaml",
|
|
70
|
+
markdown: "lang.markdown",
|
|
71
|
+
md: "lang.markdown",
|
|
72
|
+
sql: "lang.sql",
|
|
73
|
+
dockerfile: "lang.docker",
|
|
74
|
+
docker: "lang.docker",
|
|
75
|
+
lua: "lang.lua",
|
|
76
|
+
text: "lang.text",
|
|
77
|
+
txt: "lang.text",
|
|
78
|
+
plain: "lang.text",
|
|
79
|
+
log: "lang.log",
|
|
80
|
+
env: "lang.env",
|
|
81
|
+
dotenv: "lang.env",
|
|
82
|
+
toml: "lang.toml",
|
|
83
|
+
xml: "lang.xml",
|
|
84
|
+
ini: "lang.ini",
|
|
85
|
+
conf: "lang.conf",
|
|
86
|
+
cfg: "lang.conf",
|
|
87
|
+
config: "lang.conf",
|
|
88
|
+
properties: "lang.conf",
|
|
89
|
+
csv: "lang.csv",
|
|
90
|
+
tsv: "lang.tsv",
|
|
91
|
+
image: "lang.image",
|
|
92
|
+
img: "lang.image",
|
|
93
|
+
png: "lang.image",
|
|
94
|
+
jpg: "lang.image",
|
|
95
|
+
jpeg: "lang.image",
|
|
96
|
+
gif: "lang.image",
|
|
97
|
+
webp: "lang.image",
|
|
98
|
+
svg: "lang.image",
|
|
99
|
+
ico: "lang.image",
|
|
100
|
+
bmp: "lang.image",
|
|
101
|
+
tiff: "lang.image",
|
|
102
|
+
pdf: "lang.pdf",
|
|
103
|
+
zip: "lang.archive",
|
|
104
|
+
tar: "lang.archive",
|
|
105
|
+
gz: "lang.archive",
|
|
106
|
+
tgz: "lang.archive",
|
|
107
|
+
bz2: "lang.archive",
|
|
108
|
+
xz: "lang.archive",
|
|
109
|
+
"7z": "lang.archive",
|
|
110
|
+
exe: "lang.binary",
|
|
111
|
+
dll: "lang.binary",
|
|
112
|
+
so: "lang.binary",
|
|
113
|
+
dylib: "lang.binary",
|
|
114
|
+
wasm: "lang.binary",
|
|
115
|
+
bin: "lang.binary",
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Brand colors for language icons, keyed by the resolved `lang.*` SymbolKey.
|
|
120
|
+
* Used by {@link Theme.getLangIconStyled} so eval-kernel cell headers tint each
|
|
121
|
+
* language with its recognizable hue (JS yellow, Ruby red, Julia purple, Python
|
|
122
|
+
* blue) instead of a flat muted gray. Applied as truecolor/256 per the active
|
|
123
|
+
* color mode; languages without an entry fall back to the muted theme color.
|
|
124
|
+
*/
|
|
125
|
+
const LANG_BRAND_COLORS: Partial<Record<SymbolKey, string>> = {
|
|
126
|
+
"lang.javascript": "#f7df1e",
|
|
127
|
+
"lang.python": "#3776ab",
|
|
128
|
+
"lang.ruby": "#cc342d",
|
|
129
|
+
"lang.julia": "#9558b2",
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
const BACKGROUND_RESET_PATTERN = /\x1b\[(?:0|49)m/g;
|
|
133
|
+
const FOREGROUND_RESET_PATTERN = /\x1b\[(?:0|39)m/g;
|
|
134
|
+
|
|
135
|
+
export class Theme {
|
|
136
|
+
#fgColors: Record<ThemeColor, string>;
|
|
137
|
+
#bgColors: Record<ThemeBg, string>;
|
|
138
|
+
/** Resolved hex strings for foreground colors — populated at construction. */
|
|
139
|
+
readonly #hexFgColors: Record<ThemeColor, string>;
|
|
140
|
+
/** Resolved hex strings for background colors — populated at construction. */
|
|
141
|
+
readonly #hexBgColors: Record<ThemeBg, string>;
|
|
142
|
+
#symbols: SymbolMap;
|
|
143
|
+
#spinnerFramesOverrides: Partial<Record<SpinnerType, string[]>>;
|
|
144
|
+
/**
|
|
145
|
+
* Perceptual luma (0..1) of the status-line background — used to classify the
|
|
146
|
+
* theme light/dark. Undefined when it can't be resolved. Classified against the
|
|
147
|
+
* status line (the surface session accents render on) rather than the chat bubble
|
|
148
|
+
* (`userMessageBg`), which some themes (e.g. `porcelain`) style dark on an
|
|
149
|
+
* otherwise-light theme.
|
|
150
|
+
*/
|
|
151
|
+
readonly statusLineLuminance: number | undefined;
|
|
152
|
+
/** WCAG relative luminance of the status-line background — basis for accent contrast. */
|
|
153
|
+
readonly #statusLineContrastLuminance: number | undefined;
|
|
154
|
+
constructor(
|
|
155
|
+
fgColors: Record<ThemeColor, string | number>,
|
|
156
|
+
bgColors: Record<ThemeBg, string | number>,
|
|
157
|
+
private readonly mode: ColorMode,
|
|
158
|
+
private readonly symbolPreset: SymbolPreset,
|
|
159
|
+
symbolOverrides: Partial<Record<SymbolKey, string>>,
|
|
160
|
+
spinnerFramesOverrides: Partial<Record<SpinnerType, string[]>> = {},
|
|
161
|
+
) {
|
|
162
|
+
this.statusLineLuminance = colorLuma(bgColors.statusLineBg);
|
|
163
|
+
this.#statusLineContrastLuminance = relativeLuminance(bgColors.statusLineBg);
|
|
164
|
+
const slIsLight = this.statusLineLuminance !== undefined && this.statusLineLuminance > 0.5;
|
|
165
|
+
|
|
166
|
+
this.#fgColors = {} as Record<ThemeColor, string>;
|
|
167
|
+
this.#hexFgColors = {} as Record<ThemeColor, string>;
|
|
168
|
+
for (const key in fgColors) {
|
|
169
|
+
if (!isValidThemeColor(key)) continue;
|
|
170
|
+
const value = fgColors[key];
|
|
171
|
+
const hex = resolveToHex(value, slIsLight);
|
|
172
|
+
this.#fgColors[key] = fgAnsi(value, mode);
|
|
173
|
+
this.#hexFgColors[key] = hex;
|
|
174
|
+
}
|
|
175
|
+
this.#bgColors = {} as Record<ThemeBg, string>;
|
|
176
|
+
this.#hexBgColors = {} as Record<ThemeBg, string>;
|
|
177
|
+
for (const [key, value] of Object.entries(bgColors) as [ThemeBg, string | number][]) {
|
|
178
|
+
this.#bgColors[key] = bgAnsi(value, mode);
|
|
179
|
+
this.#hexBgColors[key] = resolveToHex(value, slIsLight);
|
|
180
|
+
}
|
|
181
|
+
// Build symbol map from preset + overrides
|
|
182
|
+
const baseSymbols = SYMBOL_PRESETS[symbolPreset];
|
|
183
|
+
this.#symbols = { ...baseSymbols };
|
|
184
|
+
for (const [key, value] of Object.entries(symbolOverrides)) {
|
|
185
|
+
if (key in this.#symbols) {
|
|
186
|
+
this.#symbols[key as SymbolKey] = value;
|
|
187
|
+
} else {
|
|
188
|
+
logger.debug("Invalid symbol key in override", { key, availableKeys: Object.keys(this.#symbols) });
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
this.#spinnerFramesOverrides = spinnerFramesOverrides;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/** True when the active theme has a light status-line background. */
|
|
195
|
+
get isLight(): boolean {
|
|
196
|
+
return this.statusLineLuminance !== undefined && this.statusLineLuminance > 0.5;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Surface luminance to size session accents against on light themes; undefined on
|
|
201
|
+
* dark themes so accents stay vivid. Pass straight to `getSessionAccentHex`.
|
|
202
|
+
*/
|
|
203
|
+
get accentSurfaceLuminance(): number | undefined {
|
|
204
|
+
return this.isLight ? this.#statusLineContrastLuminance : undefined;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Get the resolved CSS hex string for a foreground theme color.
|
|
209
|
+
*/
|
|
210
|
+
getColorHex(color: ThemeColor): string {
|
|
211
|
+
const hex = this.#hexFgColors[color];
|
|
212
|
+
if (hex === undefined) throw new Error(`Unknown theme color: ${color}`);
|
|
213
|
+
return hex || (this.isLight ? "#000000" : "#e5e5e7");
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Get the resolved CSS hex string for a background theme color.
|
|
217
|
+
*/
|
|
218
|
+
getBgHex(color: ThemeBg): string {
|
|
219
|
+
const hex = this.#hexBgColors[color];
|
|
220
|
+
if (hex === undefined) throw new Error(`Unknown theme background color: ${color}`);
|
|
221
|
+
return hex || (this.isLight ? "#ffffff" : "#000000");
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Get all foreground and background theme colors as CSS hex strings.
|
|
226
|
+
* Skips colors resolved to the default terminal color (unstyled).
|
|
227
|
+
*/
|
|
228
|
+
getAllThemeColorHexes(): string[] {
|
|
229
|
+
const hexes: string[] = [];
|
|
230
|
+
for (const hex of Object.values(this.#hexFgColors)) {
|
|
231
|
+
if (hex) hexes.push(hex);
|
|
232
|
+
}
|
|
233
|
+
for (const hex of Object.values(this.#hexBgColors)) {
|
|
234
|
+
if (hex) hexes.push(hex);
|
|
235
|
+
}
|
|
236
|
+
return hexes;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Get the most visually dominant theme colors as CSS hex strings — accent,
|
|
241
|
+
* border, success, error, warning, heading, link, diff markers, etc.
|
|
242
|
+
* These are the colors the session accent could visually clash with.
|
|
243
|
+
* Skips colors resolved to the default terminal color (unstyled).
|
|
244
|
+
*/
|
|
245
|
+
getMajorThemeColorHexes(): string[] {
|
|
246
|
+
const majors: ThemeColor[] = [
|
|
247
|
+
"accent",
|
|
248
|
+
"border",
|
|
249
|
+
"borderAccent",
|
|
250
|
+
"borderMuted",
|
|
251
|
+
"success",
|
|
252
|
+
"error",
|
|
253
|
+
"warning",
|
|
254
|
+
"mdHeading",
|
|
255
|
+
"mdLink",
|
|
256
|
+
"mdCode",
|
|
257
|
+
"mdCodeBlock",
|
|
258
|
+
"mdQuoteBorder",
|
|
259
|
+
"mdListBullet",
|
|
260
|
+
"toolDiffAdded",
|
|
261
|
+
"toolDiffRemoved",
|
|
262
|
+
"customMessageLabel",
|
|
263
|
+
"thinkingText",
|
|
264
|
+
];
|
|
265
|
+
const hexes: string[] = [];
|
|
266
|
+
for (const key of majors) {
|
|
267
|
+
const hex = this.#hexFgColors[key];
|
|
268
|
+
if (hex) hexes.push(hex);
|
|
269
|
+
}
|
|
270
|
+
return hexes;
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Get the resolved CSS hex string for the theme's accent color.
|
|
274
|
+
*/
|
|
275
|
+
getAccentColorHex(): string {
|
|
276
|
+
return this.getColorHex("accent");
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Theme-derived inputs for `getSessionAccentHex`: the accent hex whose
|
|
280
|
+
* OKLCH weight session accents adopt, the major colors they must not
|
|
281
|
+
* hue-collide with, and the light-theme surface luminance to contrast
|
|
282
|
+
* against.
|
|
283
|
+
*/
|
|
284
|
+
get sessionAccentInputs(): SessionAccentTheme {
|
|
285
|
+
return {
|
|
286
|
+
accentHex: this.getAccentColorHex(),
|
|
287
|
+
colorHexes: this.getMajorThemeColorHexes(),
|
|
288
|
+
surfaceLuminance: this.accentSurfaceLuminance,
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
fg(color: ThemeColor, text: string): string {
|
|
293
|
+
const ansi = this.#fgColors[color];
|
|
294
|
+
if (!ansi) throw new Error(`Unknown theme color: ${color}`);
|
|
295
|
+
return `${ansi}${text}\x1b[39m`; // Reset only foreground color
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/** Apply a foreground, replacing terminal-default tokens with the theme's contrast-safe fallback. */
|
|
299
|
+
fgResolved(color: ThemeColor, text: string): string {
|
|
300
|
+
const ansi = this.#fgColors[color];
|
|
301
|
+
if (!ansi) throw new Error(`Unknown theme color: ${color}`);
|
|
302
|
+
const resolved = ansi === "\x1b[39m" ? colorToAnsi(this.getColorHex(color), this.mode) : ansi;
|
|
303
|
+
return `${resolved}${text.replace(FOREGROUND_RESET_PATTERN, `$&${resolved}`)}\x1b[39m`;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
bg(color: ThemeBg, text: string): string {
|
|
307
|
+
const ansi = this.#bgColors[color];
|
|
308
|
+
if (!ansi) throw new Error(`Unknown theme background color: ${color}`);
|
|
309
|
+
return `${ansi}${text}\x1b[49m`; // Reset only background color
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* Apply a background fill that resumes after nested full/background resets.
|
|
314
|
+
*
|
|
315
|
+
* Composer rows contain styled text and cursor escapes; a normal background
|
|
316
|
+
* wrapper would otherwise stop at the first nested reset.
|
|
317
|
+
*/
|
|
318
|
+
bgFill(color: ThemeBg, text: string): string {
|
|
319
|
+
const ansi = this.#bgColors[color];
|
|
320
|
+
if (!ansi) throw new Error(`Unknown theme background color: ${color}`);
|
|
321
|
+
return `${ansi}${text.replace(BACKGROUND_RESET_PATTERN, `$&${ansi}`)}\x1b[49m`;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* Apply a foreground over a controlled background, choosing a contrast-safe
|
|
326
|
+
* fallback only when the theme token requests the terminal default and
|
|
327
|
+
* reapplying it after nested full/foreground resets.
|
|
328
|
+
*/
|
|
329
|
+
fgOnBg(color: ThemeColor, background: ThemeBg, text: string): string {
|
|
330
|
+
const ansi = this.getFgOnBgAnsi(color, background);
|
|
331
|
+
return `${ansi}${text.replace(FOREGROUND_RESET_PATTERN, `$&${ansi}`)}\x1b[39m`;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
bold(text: string): string {
|
|
335
|
+
return chalk.bold(text);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
italic(text: string): string {
|
|
339
|
+
return chalk.italic(text);
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
underline(text: string): string {
|
|
343
|
+
return chalk.underline(text);
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
strikethrough(text: string): string {
|
|
347
|
+
return chalk.strikethrough(text);
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
inverse(text: string): string {
|
|
351
|
+
return chalk.inverse(text);
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
getFgAnsi(color: ThemeColor): string {
|
|
355
|
+
const ansi = this.#fgColors[color];
|
|
356
|
+
if (!ansi) throw new Error(`Unknown theme color: ${color}`);
|
|
357
|
+
return ansi;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
getBgAnsi(color: ThemeBg): string {
|
|
361
|
+
const ansi = this.#bgColors[color];
|
|
362
|
+
if (!ansi) throw new Error(`Unknown theme background color: ${color}`);
|
|
363
|
+
return ansi;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* Foreground ANSI for text rendered over a controlled theme background.
|
|
368
|
+
* Explicit theme colors win; terminal-default tokens become black or near-white.
|
|
369
|
+
*/
|
|
370
|
+
getFgOnBgAnsi(color: ThemeColor, background: ThemeBg): string {
|
|
371
|
+
const ansi = this.#fgColors[color];
|
|
372
|
+
if (!ansi) throw new Error(`Unknown theme color: ${color}`);
|
|
373
|
+
if (ansi !== "\x1b[39m") return ansi;
|
|
374
|
+
const backgroundAnsi = this.#bgColors[background];
|
|
375
|
+
if (!backgroundAnsi) throw new Error(`Unknown theme background color: ${background}`);
|
|
376
|
+
if (backgroundAnsi === "\x1b[49m") return ansi;
|
|
377
|
+
const backgroundLuma = colorLuma(this.getBgHex(background));
|
|
378
|
+
return colorToAnsi(backgroundLuma !== undefined && backgroundLuma > 0.5 ? "#000000" : "#e5e5e7", this.mode);
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* Foreground ANSI for text drawn **on top of** `fillColor` used as a solid
|
|
383
|
+
* background (e.g. a powerline chip). Picks near-black or near-white by the
|
|
384
|
+
* fill's perceived luminance (Rec. 601 luma) so the label stays legible on
|
|
385
|
+
* both bright and dark fills, across light and dark themes.
|
|
386
|
+
*
|
|
387
|
+
* Reads the RGB out of the already-resolved truecolor escape; when the fill
|
|
388
|
+
* is encoded as a 256-palette index (limited terminals) the RGB is
|
|
389
|
+
* unavailable, so it falls back to the theme `text` color.
|
|
390
|
+
*/
|
|
391
|
+
getContrastFgAnsi(fillColor: ThemeColor): string {
|
|
392
|
+
const ansi = this.#fgColors[fillColor];
|
|
393
|
+
const match = ansi ? /38;2;(\d+);(\d+);(\d+)/.exec(ansi) : null;
|
|
394
|
+
if (!match) return this.#fgColors.text;
|
|
395
|
+
const luma = 0.299 * Number(match[1]) + 0.587 * Number(match[2]) + 0.114 * Number(match[3]);
|
|
396
|
+
return luma > 140 ? "\x1b[38;2;0;0;0m" : "\x1b[38;2;255;255;255m";
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
getColorMode(): ColorMode {
|
|
400
|
+
return this.mode;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
/** Border color for a thinking/effort level name (`off`…`max`); unknown levels fall back to `thinkingOff`. */
|
|
404
|
+
getThinkingBorderColor(level: string): (str: string) => string {
|
|
405
|
+
switch (level) {
|
|
406
|
+
case "off":
|
|
407
|
+
return (str: string) => this.fg("thinkingOff", str);
|
|
408
|
+
case "minimal":
|
|
409
|
+
return (str: string) => this.fg("thinkingMinimal", str);
|
|
410
|
+
case "low":
|
|
411
|
+
return (str: string) => this.fg("thinkingLow", str);
|
|
412
|
+
case "medium":
|
|
413
|
+
return (str: string) => this.fg("thinkingMedium", str);
|
|
414
|
+
case "high":
|
|
415
|
+
return (str: string) => this.fg("thinkingHigh", str);
|
|
416
|
+
case "xhigh":
|
|
417
|
+
return (str: string) => this.fg("thinkingXhigh", str);
|
|
418
|
+
case "max":
|
|
419
|
+
// thinkingMax is optional; themes without it resolve to the xhigh color.
|
|
420
|
+
return (str: string) => this.fg(this.#fgColors.thinkingMax ? "thinkingMax" : "thinkingXhigh", str);
|
|
421
|
+
default:
|
|
422
|
+
return (str: string) => this.fg("thinkingOff", str);
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
getBashModeBorderColor(): (str: string) => string {
|
|
427
|
+
return (str: string) => this.fg("bashMode", str);
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
getPythonModeBorderColor(): (str: string) => string {
|
|
431
|
+
return (str: string) => this.fg("pythonMode", str);
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
// ============================================================================
|
|
435
|
+
// Symbol Methods
|
|
436
|
+
// ============================================================================
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* Get a symbol by key.
|
|
440
|
+
*/
|
|
441
|
+
symbol(key: SymbolKey): string {
|
|
442
|
+
return this.#symbols[key];
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
/**
|
|
446
|
+
* Get a symbol styled with a color.
|
|
447
|
+
*/
|
|
448
|
+
styledSymbol(key: SymbolKey, color: ThemeColor): string {
|
|
449
|
+
return this.fg(color, this.#symbols[key]);
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
/**
|
|
453
|
+
* Get the current symbol preset.
|
|
454
|
+
*/
|
|
455
|
+
getSymbolPreset(): SymbolPreset {
|
|
456
|
+
return this.symbolPreset;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
// ============================================================================
|
|
460
|
+
// Symbol Category Accessors
|
|
461
|
+
// ============================================================================
|
|
462
|
+
|
|
463
|
+
get status() {
|
|
464
|
+
return {
|
|
465
|
+
success: this.#symbols["status.success"],
|
|
466
|
+
error: this.#symbols["status.error"],
|
|
467
|
+
warning: this.#symbols["status.warning"],
|
|
468
|
+
info: this.#symbols["status.info"],
|
|
469
|
+
pending: this.#symbols["status.pending"],
|
|
470
|
+
disabled: this.#symbols["status.disabled"],
|
|
471
|
+
enabled: this.#symbols["status.enabled"],
|
|
472
|
+
running: this.#symbols["status.running"],
|
|
473
|
+
shadowed: this.#symbols["status.shadowed"],
|
|
474
|
+
aborted: this.#symbols["status.aborted"],
|
|
475
|
+
done: this.#symbols["status.done"],
|
|
476
|
+
};
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
get nav() {
|
|
480
|
+
return {
|
|
481
|
+
cursor: this.#symbols["nav.cursor"],
|
|
482
|
+
selected: this.#symbols["nav.selected"],
|
|
483
|
+
expand: this.#symbols["nav.expand"],
|
|
484
|
+
collapse: this.#symbols["nav.collapse"],
|
|
485
|
+
back: this.#symbols["nav.back"],
|
|
486
|
+
};
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
get tree() {
|
|
490
|
+
return {
|
|
491
|
+
branch: this.#symbols["tree.branch"],
|
|
492
|
+
last: this.#symbols["tree.last"],
|
|
493
|
+
vertical: this.#symbols["tree.vertical"],
|
|
494
|
+
horizontal: this.#symbols["tree.horizontal"],
|
|
495
|
+
hook: this.#symbols["tree.hook"],
|
|
496
|
+
};
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
get progress() {
|
|
500
|
+
return {
|
|
501
|
+
filled: this.#symbols["progress.filled"],
|
|
502
|
+
empty: this.#symbols["progress.empty"],
|
|
503
|
+
};
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
get boxRound() {
|
|
507
|
+
return {
|
|
508
|
+
topLeft: this.#symbols["boxRound.topLeft"],
|
|
509
|
+
topRight: this.#symbols["boxRound.topRight"],
|
|
510
|
+
bottomLeft: this.#symbols["boxRound.bottomLeft"],
|
|
511
|
+
bottomRight: this.#symbols["boxRound.bottomRight"],
|
|
512
|
+
horizontal: this.#symbols["boxRound.horizontal"],
|
|
513
|
+
vertical: this.#symbols["boxRound.vertical"],
|
|
514
|
+
// Junctions have no rounded Unicode variant, so a rounded box reuses the
|
|
515
|
+
// sharp tee/cross glyphs. Sourcing them from the boxSharp.* tokens keeps a
|
|
516
|
+
// theme's `boxSharp.tee*` overrides effective for rounded-box dividers.
|
|
517
|
+
cross: this.#symbols["boxSharp.cross"],
|
|
518
|
+
teeDown: this.#symbols["boxSharp.teeDown"],
|
|
519
|
+
teeUp: this.#symbols["boxSharp.teeUp"],
|
|
520
|
+
teeRight: this.#symbols["boxSharp.teeRight"],
|
|
521
|
+
teeLeft: this.#symbols["boxSharp.teeLeft"],
|
|
522
|
+
};
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
/**
|
|
526
|
+
* Dotted rules/verticals for transient selection outlines. Corners come from
|
|
527
|
+
* {@link boxRound} — Unicode has no rounded dotted corner glyphs.
|
|
528
|
+
*/
|
|
529
|
+
get boxDotted() {
|
|
530
|
+
return {
|
|
531
|
+
horizontal: this.#symbols["boxDotted.horizontal"],
|
|
532
|
+
vertical: this.#symbols["boxDotted.vertical"],
|
|
533
|
+
};
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
get boxSharp() {
|
|
537
|
+
return {
|
|
538
|
+
topLeft: this.#symbols["boxSharp.topLeft"],
|
|
539
|
+
topRight: this.#symbols["boxSharp.topRight"],
|
|
540
|
+
bottomLeft: this.#symbols["boxSharp.bottomLeft"],
|
|
541
|
+
bottomRight: this.#symbols["boxSharp.bottomRight"],
|
|
542
|
+
horizontal: this.#symbols["boxSharp.horizontal"],
|
|
543
|
+
vertical: this.#symbols["boxSharp.vertical"],
|
|
544
|
+
cross: this.#symbols["boxSharp.cross"],
|
|
545
|
+
teeDown: this.#symbols["boxSharp.teeDown"],
|
|
546
|
+
teeUp: this.#symbols["boxSharp.teeUp"],
|
|
547
|
+
teeRight: this.#symbols["boxSharp.teeRight"],
|
|
548
|
+
teeLeft: this.#symbols["boxSharp.teeLeft"],
|
|
549
|
+
};
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
get sep() {
|
|
553
|
+
return {
|
|
554
|
+
powerline: this.#symbols["sep.powerline"],
|
|
555
|
+
powerlineThin: this.#symbols["sep.powerlineThin"],
|
|
556
|
+
powerlineLeft: this.#symbols["sep.powerlineLeft"],
|
|
557
|
+
powerlineRight: this.#symbols["sep.powerlineRight"],
|
|
558
|
+
powerlineThinLeft: this.#symbols["sep.powerlineThinLeft"],
|
|
559
|
+
powerlineThinRight: this.#symbols["sep.powerlineThinRight"],
|
|
560
|
+
powerlineCapLeft: this.#symbols["sep.powerlineCapLeft"],
|
|
561
|
+
block: this.#symbols["sep.block"],
|
|
562
|
+
space: this.#symbols["sep.space"],
|
|
563
|
+
asciiLeft: this.#symbols["sep.asciiLeft"],
|
|
564
|
+
asciiRight: this.#symbols["sep.asciiRight"],
|
|
565
|
+
dot: this.#symbols["sep.dot"],
|
|
566
|
+
slash: this.#symbols["sep.slash"],
|
|
567
|
+
pipe: this.#symbols["sep.pipe"],
|
|
568
|
+
};
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
get icon() {
|
|
572
|
+
return {
|
|
573
|
+
model: this.#symbols["icon.model"],
|
|
574
|
+
plan: this.#symbols["icon.plan"],
|
|
575
|
+
prewalk: this.#symbols["icon.prewalk"],
|
|
576
|
+
goal: this.#symbols["icon.goal"],
|
|
577
|
+
pause: this.#symbols["icon.pause"],
|
|
578
|
+
loop: this.#symbols["icon.loop"],
|
|
579
|
+
folder: this.#symbols["icon.folder"],
|
|
580
|
+
worktree: this.#symbols["icon.worktree"],
|
|
581
|
+
scratchFolder: this.#symbols["icon.scratchFolder"],
|
|
582
|
+
file: this.#symbols["icon.file"],
|
|
583
|
+
git: this.#symbols["icon.git"],
|
|
584
|
+
branch: this.#symbols["icon.branch"],
|
|
585
|
+
pr: this.#symbols["icon.pr"],
|
|
586
|
+
pin: this.#symbols["icon.pin"],
|
|
587
|
+
tokens: this.#symbols["icon.tokens"],
|
|
588
|
+
context: this.#symbols["icon.context"],
|
|
589
|
+
cost: this.#symbols["icon.cost"],
|
|
590
|
+
subscription: this.#symbols["icon.subscription"],
|
|
591
|
+
advisor: this.#symbols["icon.advisor"],
|
|
592
|
+
advisorClosed: this.#symbols["icon.advisorClosed"],
|
|
593
|
+
time: this.#symbols["icon.time"],
|
|
594
|
+
omp: this.#symbols["icon.omp"],
|
|
595
|
+
esc: this.#symbols["icon.esc"],
|
|
596
|
+
ghost: this.#symbols["icon.ghost"],
|
|
597
|
+
agents: this.#symbols["icon.agents"],
|
|
598
|
+
job: this.#symbols["icon.job"],
|
|
599
|
+
cache: this.#symbols["icon.cache"],
|
|
600
|
+
cacheMiss: this.#symbols["icon.cacheMiss"],
|
|
601
|
+
input: this.#symbols["icon.input"],
|
|
602
|
+
output: this.#symbols["icon.output"],
|
|
603
|
+
throughput: this.#symbols["icon.throughput"],
|
|
604
|
+
host: this.#symbols["icon.host"],
|
|
605
|
+
session: this.#symbols["icon.session"],
|
|
606
|
+
package: this.#symbols["icon.package"],
|
|
607
|
+
warning: this.#symbols["icon.warning"],
|
|
608
|
+
rewind: this.#symbols["icon.rewind"],
|
|
609
|
+
auto: this.#symbols["icon.auto"],
|
|
610
|
+
fast: this.#symbols["icon.fast"],
|
|
611
|
+
extensionSkill: this.#symbols["icon.extensionSkill"],
|
|
612
|
+
extensionTool: this.#symbols["icon.extensionTool"],
|
|
613
|
+
extensionSlashCommand: this.#symbols["icon.extensionSlashCommand"],
|
|
614
|
+
extensionMcp: this.#symbols["icon.extensionMcp"],
|
|
615
|
+
extensionRule: this.#symbols["icon.extensionRule"],
|
|
616
|
+
extensionHook: this.#symbols["icon.extensionHook"],
|
|
617
|
+
extensionPrompt: this.#symbols["icon.extensionPrompt"],
|
|
618
|
+
extensionContextFile: this.#symbols["icon.extensionContextFile"],
|
|
619
|
+
extensionInstruction: this.#symbols["icon.extensionInstruction"],
|
|
620
|
+
vimNormal: this.#symbols["icon.vimNormal"],
|
|
621
|
+
vimInsert: this.#symbols["icon.vimInsert"],
|
|
622
|
+
vimVisual: this.#symbols["icon.vimVisual"],
|
|
623
|
+
vimVisualLine: this.#symbols["icon.vimVisualLine"],
|
|
624
|
+
mic: this.#symbols["icon.mic"],
|
|
625
|
+
camera: this.#symbols["icon.camera"],
|
|
626
|
+
};
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
/** Slash-command type-indicator glyphs for the autocomplete icon column. */
|
|
630
|
+
get cmd(): Record<SlashCommandIconName, string> {
|
|
631
|
+
return {
|
|
632
|
+
action: this.#symbols["cmd.action"],
|
|
633
|
+
prompt: this.#symbols["cmd.prompt"],
|
|
634
|
+
extension: this.#symbols["cmd.extension"],
|
|
635
|
+
settings: this.#symbols["cmd.settings"],
|
|
636
|
+
gear: this.#symbols["cmd.gear"],
|
|
637
|
+
shield: this.#symbols["cmd.shield"],
|
|
638
|
+
wave: this.#symbols["cmd.wave"],
|
|
639
|
+
compass: this.#symbols["cmd.compass"],
|
|
640
|
+
inbox: this.#symbols["cmd.inbox"],
|
|
641
|
+
swap: this.#symbols["cmd.swap"],
|
|
642
|
+
expand: this.#symbols["cmd.expand"],
|
|
643
|
+
computer: this.#symbols["cmd.computer"],
|
|
644
|
+
eye: this.#symbols["cmd.eye"],
|
|
645
|
+
todo: this.#symbols["cmd.todo"],
|
|
646
|
+
stats: this.#symbols["cmd.stats"],
|
|
647
|
+
news: this.#symbols["cmd.news"],
|
|
648
|
+
keyboard: this.#symbols["cmd.keyboard"],
|
|
649
|
+
export: this.#symbols["cmd.export"],
|
|
650
|
+
clipboard: this.#symbols["cmd.clipboard"],
|
|
651
|
+
share: this.#symbols["cmd.share"],
|
|
652
|
+
broadcast: this.#symbols["cmd.broadcast"],
|
|
653
|
+
globe: this.#symbols["cmd.globe"],
|
|
654
|
+
copy: this.#symbols["cmd.copy"],
|
|
655
|
+
plus: this.#symbols["cmd.plus"],
|
|
656
|
+
restart: this.#symbols["cmd.restart"],
|
|
657
|
+
eraser: this.#symbols["cmd.eraser"],
|
|
658
|
+
trash: this.#symbols["cmd.trash"],
|
|
659
|
+
compress: this.#symbols["cmd.compress"],
|
|
660
|
+
vibrate: this.#symbols["cmd.vibrate"],
|
|
661
|
+
handoff: this.#symbols["cmd.handoff"],
|
|
662
|
+
history: this.#symbols["cmd.history"],
|
|
663
|
+
question: this.#symbols["cmd.question"],
|
|
664
|
+
rocket: this.#symbols["cmd.rocket"],
|
|
665
|
+
stethoscope: this.#symbols["cmd.stethoscope"],
|
|
666
|
+
redo: this.#symbols["cmd.redo"],
|
|
667
|
+
bug: this.#symbols["cmd.bug"],
|
|
668
|
+
memory: this.#symbols["cmd.memory"],
|
|
669
|
+
pencil: this.#symbols["cmd.pencil"],
|
|
670
|
+
folderMove: this.#symbols["cmd.folderMove"],
|
|
671
|
+
folderPlus: this.#symbols["cmd.folderPlus"],
|
|
672
|
+
folderMinus: this.#symbols["cmd.folderMinus"],
|
|
673
|
+
hammer: this.#symbols["cmd.hammer"],
|
|
674
|
+
power: this.#symbols["cmd.power"],
|
|
675
|
+
cart: this.#symbols["cmd.cart"],
|
|
676
|
+
model: this.#symbols["icon.model"],
|
|
677
|
+
plan: this.#symbols["icon.plan"],
|
|
678
|
+
prewalk: this.#symbols["icon.prewalk"],
|
|
679
|
+
goal: this.#symbols["icon.goal"],
|
|
680
|
+
pause: this.#symbols["icon.pause"],
|
|
681
|
+
loop: this.#symbols["icon.loop"],
|
|
682
|
+
session: this.#symbols["icon.session"],
|
|
683
|
+
jobs: this.#symbols["icon.job"],
|
|
684
|
+
gauge: this.#symbols["icon.throughput"],
|
|
685
|
+
context: this.#symbols["icon.context"],
|
|
686
|
+
agents: this.#symbols["icon.agents"],
|
|
687
|
+
branch: this.#symbols["icon.branch"],
|
|
688
|
+
tree: this.#symbols["icon.worktree"],
|
|
689
|
+
signIn: this.#symbols["icon.input"],
|
|
690
|
+
signOut: this.#symbols["icon.output"],
|
|
691
|
+
advisor: this.#symbols["icon.advisor"],
|
|
692
|
+
host: this.#symbols["icon.host"],
|
|
693
|
+
package: this.#symbols["icon.package"],
|
|
694
|
+
fast: this.#symbols["icon.fast"],
|
|
695
|
+
voice: this.#symbols["icon.mic"],
|
|
696
|
+
tools: this.#symbols["icon.extensionTool"],
|
|
697
|
+
rule: this.#symbols["icon.extensionRule"],
|
|
698
|
+
skill: this.#symbols["icon.extensionSkill"],
|
|
699
|
+
mcp: this.#symbols["icon.extensionMcp"],
|
|
700
|
+
pin: this.#symbols["icon.pin"],
|
|
701
|
+
};
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
get thinking() {
|
|
705
|
+
return {
|
|
706
|
+
minimal: this.#symbols["thinking.minimal"],
|
|
707
|
+
low: this.#symbols["thinking.low"],
|
|
708
|
+
medium: this.#symbols["thinking.medium"],
|
|
709
|
+
high: this.#symbols["thinking.high"],
|
|
710
|
+
xhigh: this.#symbols["thinking.xhigh"],
|
|
711
|
+
max: this.#symbols["thinking.max"],
|
|
712
|
+
autoPending: this.#symbols["thinking.autoPending"],
|
|
713
|
+
};
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
get checkbox() {
|
|
717
|
+
return {
|
|
718
|
+
checked: this.#symbols["checkbox.checked"],
|
|
719
|
+
unchecked: this.#symbols["checkbox.unchecked"],
|
|
720
|
+
};
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
get radio() {
|
|
724
|
+
return {
|
|
725
|
+
selected: this.#symbols["radio.selected"],
|
|
726
|
+
unselected: this.#symbols["radio.unselected"],
|
|
727
|
+
};
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
get format() {
|
|
731
|
+
return {
|
|
732
|
+
bullet: this.#symbols["format.bullet"],
|
|
733
|
+
dash: this.#symbols["format.dash"],
|
|
734
|
+
bracketLeft: this.#symbols["format.bracketLeft"],
|
|
735
|
+
bracketRight: this.#symbols["format.bracketRight"],
|
|
736
|
+
};
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
get md() {
|
|
740
|
+
return {
|
|
741
|
+
quoteBorder: this.#symbols["md.quoteBorder"],
|
|
742
|
+
hrChar: this.#symbols["md.hrChar"],
|
|
743
|
+
bullet: this.#symbols["md.bullet"],
|
|
744
|
+
colorSwatch: this.#symbols["md.colorSwatch"],
|
|
745
|
+
};
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
/**
|
|
749
|
+
* Default spinner frames (status spinner).
|
|
750
|
+
*/
|
|
751
|
+
get spinnerFrames(): string[] {
|
|
752
|
+
return this.getSpinnerFrames();
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
/**
|
|
756
|
+
* Get spinner frames by type.
|
|
757
|
+
*/
|
|
758
|
+
getSpinnerFrames(type: SpinnerType = "status"): string[] {
|
|
759
|
+
return this.#spinnerFramesOverrides[type] ?? SPINNER_FRAMES[this.symbolPreset][type];
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
/**
|
|
763
|
+
* Get language icon for a language name.
|
|
764
|
+
* Maps common language names to their corresponding symbol keys.
|
|
765
|
+
*/
|
|
766
|
+
getLangIcon(lang: string | undefined): string {
|
|
767
|
+
if (!lang) return this.#symbols["lang.default"];
|
|
768
|
+
const normalized = lang.toLowerCase();
|
|
769
|
+
const key = langMap[normalized];
|
|
770
|
+
return key ? this.#symbols[key] : this.#symbols["lang.default"];
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
/**
|
|
774
|
+
* Language icon tinted with the language's brand color (see
|
|
775
|
+
* {@link LANG_BRAND_COLORS}). Falls back to the muted theme color for
|
|
776
|
+
* languages without a brand entry, and returns the bare (possibly empty)
|
|
777
|
+
* icon when the active symbol preset has none.
|
|
778
|
+
*/
|
|
779
|
+
getLangIconStyled(lang: string | undefined): string {
|
|
780
|
+
const icon = this.getLangIcon(lang);
|
|
781
|
+
if (!icon) return icon;
|
|
782
|
+
const key = lang ? langMap[lang.toLowerCase()] : undefined;
|
|
783
|
+
const hex = key ? LANG_BRAND_COLORS[key] : undefined;
|
|
784
|
+
if (!hex) return this.fg("muted", icon);
|
|
785
|
+
return `${colorToAnsi(hex, this.mode)}${icon}\x1b[39m`;
|
|
786
|
+
}
|
|
787
|
+
}
|