@oh-my-pi/pi-tui 18.2.4 → 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 +23 -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/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/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 +57 -4
- package/src/utils.ts +8 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { AgentMessage } from "@oh-my-pi/pi-agent-core";
|
|
2
|
+
import type { MessageAttribution } from "@oh-my-pi/pi-ai";
|
|
3
|
+
import { type CustomMessage, type CustomMessageContent } from "./messages.js";
|
|
4
|
+
/** Persisted message fields consumed by transcript rendering. */
|
|
5
|
+
export interface SessionMessageEntryLike {
|
|
6
|
+
type: "message";
|
|
7
|
+
id: string;
|
|
8
|
+
parentId: string | null;
|
|
9
|
+
timestamp: string;
|
|
10
|
+
message: AgentMessage;
|
|
11
|
+
}
|
|
12
|
+
/** Persisted custom-message fields consumed by transcript rendering. */
|
|
13
|
+
export interface CustomMessageEntryLike {
|
|
14
|
+
type: "custom_message";
|
|
15
|
+
id: string;
|
|
16
|
+
parentId: string | null;
|
|
17
|
+
timestamp: string;
|
|
18
|
+
customType: string;
|
|
19
|
+
content: CustomMessageContent;
|
|
20
|
+
details?: unknown;
|
|
21
|
+
display: boolean;
|
|
22
|
+
attribution?: MessageAttribution;
|
|
23
|
+
}
|
|
24
|
+
/** Entries that replay as visible or hidden transcript messages. */
|
|
25
|
+
export type TranscriptEntryLike = SessionMessageEntryLike | CustomMessageEntryLike;
|
|
26
|
+
/** Restore a persisted custom message, rejecting unsendable content. */
|
|
27
|
+
export declare function customMessageEntryMessage(entry: CustomMessageEntryLike): CustomMessage | undefined;
|
|
28
|
+
/** Restore the message represented by a transcript entry. */
|
|
29
|
+
export declare function transcriptEntryMessage(entry: TranscriptEntryLike): AgentMessage | undefined;
|
|
30
|
+
/** Identify user-authored requests among transcript and metadata entries. */
|
|
31
|
+
export declare function isUserRequestEntry(entry: TranscriptEntryLike | {
|
|
32
|
+
type: string;
|
|
33
|
+
}): boolean;
|
|
34
|
+
/** Editable user request text, preserving skill invocation syntax. */
|
|
35
|
+
export declare function userTurnDraft(entry: TranscriptEntryLike): string | undefined;
|
|
36
|
+
/** Extract text blocks verbatim, optionally separating block boundaries. */
|
|
37
|
+
export declare function textContent(content: string | ReadonlyArray<{
|
|
38
|
+
type: string;
|
|
39
|
+
text?: string;
|
|
40
|
+
}>, separator?: string): string;
|
|
41
|
+
/** Join text blocks with spaces and collapse whitespace into a single-line label. */
|
|
42
|
+
export declare function userMessageLabel(content: string | ReadonlyArray<{
|
|
43
|
+
type: string;
|
|
44
|
+
text?: string;
|
|
45
|
+
}>): string;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared engine for the ephemeral fullscreen transcript selectors (esc-esc
|
|
3
|
+
* rewind, `/copy`): replay session entries through {@link ChatTranscriptBuilder},
|
|
4
|
+
* map each rendered turn to a selectable target, and compose gutter-prefixed
|
|
5
|
+
* columns with a dotted outline around the selected target.
|
|
6
|
+
*/
|
|
7
|
+
import { type Component } from "../tui.js";
|
|
8
|
+
import { type TranscriptEntryLike as TranscriptEntry } from "./transcript-entry.js";
|
|
9
|
+
import type { SessionMessageEntryLike as SessionMessageEntry } from "./transcript-entry.js";
|
|
10
|
+
import { type ThemeColor } from "../theme/index.js";
|
|
11
|
+
import type { ChatTranscriptBuilder } from "./chat-transcript-builder.js";
|
|
12
|
+
/** One selectable transcript item: a message entry plus its rendered block range. */
|
|
13
|
+
export interface OutlineTarget {
|
|
14
|
+
/** Entry the selection resolves to; extended over trailing componentless tool results. */
|
|
15
|
+
entryId: string;
|
|
16
|
+
/** Entry that opened this turn (pre-fold) — anchor for tree lookups. */
|
|
17
|
+
turnId: string;
|
|
18
|
+
/** Real user prompt — drives user-turn jumps and role-specific actions. */
|
|
19
|
+
isUserTurn: boolean;
|
|
20
|
+
/** First transcript-container child rendered by this entry. */
|
|
21
|
+
start: number;
|
|
22
|
+
/** One past the last child rendered by this entry. */
|
|
23
|
+
end: number;
|
|
24
|
+
/** Entries this target spans: the turn plus any folded tool results. */
|
|
25
|
+
entries: TranscriptEntry[];
|
|
26
|
+
}
|
|
27
|
+
/** Composed rows of one column plus the outline's line range within them. */
|
|
28
|
+
export interface ComposedColumn {
|
|
29
|
+
lines: string[];
|
|
30
|
+
selStart: number;
|
|
31
|
+
selEnd: number;
|
|
32
|
+
}
|
|
33
|
+
/** Presentation of the dotted outline: stroke color and an optional caption inset into the top rule. */
|
|
34
|
+
export interface OutlineStyle {
|
|
35
|
+
color?: ThemeColor;
|
|
36
|
+
/** Short affordance label (e.g. "3 blocks →") drawn into the top rule's right end. */
|
|
37
|
+
caption?: string;
|
|
38
|
+
}
|
|
39
|
+
/** Copy-on-write removal of OSC 133 spans from a rendered row array. */
|
|
40
|
+
export declare function stripPromptZones(rows: readonly string[]): readonly string[];
|
|
41
|
+
/**
|
|
42
|
+
* Prompt-zone-stripped rows for one selector column.
|
|
43
|
+
*
|
|
44
|
+
* The selectors recompose their whole column on every keystroke, and stripping
|
|
45
|
+
* every child's rows again per frame is pure waste on a long session. Per the
|
|
46
|
+
* {@link Component} render contract a child returns the same array while its
|
|
47
|
+
* rows are unchanged, so the stripped copy is keyed on that array: a child that
|
|
48
|
+
* repaints itself asynchronously (Kitty image conversion, todo strike frames)
|
|
49
|
+
* hands back a new array and is stripped again.
|
|
50
|
+
*/
|
|
51
|
+
export declare class OutlineRowCache {
|
|
52
|
+
#private;
|
|
53
|
+
rows(children: readonly Component[], width: number): Array<readonly string[]>;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Append `entries` to `builder`, returning the selectable targets they
|
|
57
|
+
* produce. Tool results fold into the previous target (so a turn's rewind
|
|
58
|
+
* and `/copy` keep its output, including lazily created children such as
|
|
59
|
+
* the grouped-read card); notices and hidden messages that render nothing
|
|
60
|
+
* are skipped. Usage rows flushed at the head of an append are attributed
|
|
61
|
+
* to the turn above.
|
|
62
|
+
*/
|
|
63
|
+
export declare function appendOutlineEntries(builder: ChatTranscriptBuilder, entries: TranscriptEntry[]): OutlineTarget[];
|
|
64
|
+
/** Per-target "renders at least one non-blank row" flags at the given rows. */
|
|
65
|
+
export declare function outlineVisibility(childRows: readonly (readonly string[])[], targets: readonly OutlineTarget[]): boolean[];
|
|
66
|
+
/** Dotted horizontal rule with rounded corners, spanning the outline width. */
|
|
67
|
+
export declare function outlineRule(left: string, right: string, innerWidth: number, color?: ThemeColor, caption?: string): string;
|
|
68
|
+
/** Wrap pre-rendered rows in the dotted outline (rules above/below, `┆` sides). */
|
|
69
|
+
export declare function outlineRows(rows: readonly string[], innerWidth: number, style?: OutlineStyle): string[];
|
|
70
|
+
/**
|
|
71
|
+
* Compose one column: gutter-prefixed rows for `childRows[from, to)` with a
|
|
72
|
+
* dotted outline around `targets[selected]`. `header` rows, when given, lead
|
|
73
|
+
* the column.
|
|
74
|
+
*/
|
|
75
|
+
export declare function composeOutlineColumn(childRows: readonly (readonly string[])[], from: number, to: number, targets: readonly OutlineTarget[], selected: number, columnWidth: number, header: string[] | undefined, style?: OutlineStyle): ComposedColumn;
|
|
76
|
+
/** Centered position rail for horizontally windowed content: `… ○ ◉ ○ …`. */
|
|
77
|
+
export declare function positionRail(count: number, active: number, moreLeft: boolean, moreRight: boolean, width: number): string;
|
|
78
|
+
/**
|
|
79
|
+
* A turn the user can rewind past and re-edit: a user message with prompt
|
|
80
|
+
* text, or a user-initiated custom message (skill / collab prompt).
|
|
81
|
+
*/
|
|
82
|
+
export declare function isUserTurnEntry(entry: TranscriptEntry): boolean;
|
|
83
|
+
/** Single-line label for a user turn: its prompt text, or the custom message's draft. */
|
|
84
|
+
export declare function userTurnLabel(entry: TranscriptEntry): string | undefined;
|
|
85
|
+
/** Whether a user message carries prompt text (string or text blocks). */
|
|
86
|
+
export declare function userMessageHasText(message: SessionMessageEntry["message"]): boolean;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Render helpers shared between the live transcript ({@link UiHelpers}) and the
|
|
3
|
+
* file/remote-backed {@link ChatTranscriptBuilder}. Both surfaces build the same
|
|
4
|
+
* transcript rows from persisted message entries; holding the row construction
|
|
5
|
+
* here keeps the two byte-for-byte identical.
|
|
6
|
+
*/
|
|
7
|
+
import type { AgentMessage } from "@oh-my-pi/pi-agent-core";
|
|
8
|
+
import { type Component } from "../tui.js";
|
|
9
|
+
import { type FileMentionMessage } from "./messages.js";
|
|
10
|
+
import { ToolActivityContainer } from "../chrome/tool-activity.js";
|
|
11
|
+
import { type TranscriptBlock } from "../chrome/transcript-container.js";
|
|
12
|
+
type CustomOrHookMessage = Extract<AgentMessage, {
|
|
13
|
+
role: "custom" | "hookMessage";
|
|
14
|
+
}>;
|
|
15
|
+
type AssistantAgentMessage = Extract<AgentMessage, {
|
|
16
|
+
role: "assistant";
|
|
17
|
+
}>;
|
|
18
|
+
/**
|
|
19
|
+
* Render an `async-result` custom message (a completed background bash/task job,
|
|
20
|
+
* or a batch of them) as a transcript block of one "Background job completed"
|
|
21
|
+
* row per job.
|
|
22
|
+
*/
|
|
23
|
+
export declare function buildAsyncResultBlock(message: CustomOrHookMessage): ToolActivityContainer;
|
|
24
|
+
/**
|
|
25
|
+
* Render a `launch-completion` custom message (terminal supervised-process
|
|
26
|
+
* exits from the launch broker) as a transcript block of one compact
|
|
27
|
+
* "Supervised process ..." row per daemon, matching background-job rows.
|
|
28
|
+
*/
|
|
29
|
+
export declare function buildLaunchCompletionBlock(message: CustomOrHookMessage): ToolActivityContainer;
|
|
30
|
+
/**
|
|
31
|
+
* Render a live IRC traffic custom message (`irc:incoming` / `irc:autoreply` /
|
|
32
|
+
* `irc:relay`) as a transcript card. `getExpanded` supplies the live
|
|
33
|
+
* expanded-state getter for the cached card.
|
|
34
|
+
*/
|
|
35
|
+
export declare function buildIrcMessageCard(message: CustomOrHookMessage, getExpanded: () => boolean): Component;
|
|
36
|
+
/**
|
|
37
|
+
* Render a `fileMention` message's files as a transcript block of "Read <path>"
|
|
38
|
+
* rows. `indent` sets the left pad: the live chat renders within an outer gutter
|
|
39
|
+
* (0), the transcript viewer renders body rows without one so rows own their pad
|
|
40
|
+
* (1).
|
|
41
|
+
*/
|
|
42
|
+
export declare function buildFileMentionBlock(files: FileMentionMessage["files"], indent: number): TranscriptBlock;
|
|
43
|
+
/**
|
|
44
|
+
* Whether an assistant turn has visible text, thinking, or image content — i.e.
|
|
45
|
+
* content that closes the current read-tool run.
|
|
46
|
+
*/
|
|
47
|
+
export declare function assistantHasVisibleContent(message: AssistantAgentMessage): boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Split mixed assistant turns into visible text before tool execution and
|
|
50
|
+
* visible text segments that must render immediately after the preceding tool.
|
|
51
|
+
* Cursor can return intro text, tool calls, progress text, and the final answer
|
|
52
|
+
* in one assistant message; keeping every text block in the leading assistant
|
|
53
|
+
* block buries post-tool text above tool results in the transcript.
|
|
54
|
+
*/
|
|
55
|
+
export declare function splitAssistantMessageToolTimeline(message: AssistantAgentMessage): {
|
|
56
|
+
beforeTools: AssistantAgentMessage;
|
|
57
|
+
afterToolCalls: ReadonlyMap<string, AssistantAgentMessage>;
|
|
58
|
+
hasToolCalls: boolean;
|
|
59
|
+
lastToolCallId?: string;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Normalize raw tool-call arguments to a plain record, collapsing non-object or
|
|
63
|
+
* array values to an empty object.
|
|
64
|
+
*/
|
|
65
|
+
export declare function normalizeToolArgs(args: unknown): Record<string, unknown>;
|
|
66
|
+
export type AssistantErrorPresentation = {
|
|
67
|
+
kind: "none";
|
|
68
|
+
} | {
|
|
69
|
+
kind: "full";
|
|
70
|
+
text: string;
|
|
71
|
+
isError: true;
|
|
72
|
+
} | {
|
|
73
|
+
kind: "compact-recovered";
|
|
74
|
+
text: string;
|
|
75
|
+
isError: false;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Resolve the turn-ending assistant error presentation, if any.
|
|
79
|
+
* Silent and user-interrupt aborts yield no label. Recovered retry attempts
|
|
80
|
+
* render a compact note; attempts superseded by an exhausted budget are hidden
|
|
81
|
+
* while the final terminal error keeps its full presentation.
|
|
82
|
+
*/
|
|
83
|
+
export declare function resolveAssistantErrorPresentation(message: AssistantAgentMessage, retryAttempt?: number): AssistantErrorPresentation;
|
|
84
|
+
/**
|
|
85
|
+
* Whether an assistant turn's `usage` reflects work the operator was billed
|
|
86
|
+
* for. Empty automated turns from providers that emit `usage: 0` collapse to
|
|
87
|
+
* `false`, but any input, output, cache, or premium request keeps the row so
|
|
88
|
+
* cost transparency survives — the live path and the resume/rebuild path
|
|
89
|
+
* agree turn-by-turn.
|
|
90
|
+
*/
|
|
91
|
+
export declare function assistantUsageIsBilled(usage: AssistantAgentMessage["usage"]): boolean;
|
|
92
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Container } from "../tui.js";
|
|
2
|
+
/** Rule fields shown in rewind notifications. */
|
|
3
|
+
export interface NotificationRule {
|
|
4
|
+
name: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
content?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Component that renders a TTSR (Time Traveling Stream Rules) notification.
|
|
10
|
+
* Shows when a rule violation is detected and the stream is being rewound.
|
|
11
|
+
* One block can carry several rules: a single event may match multiple rules,
|
|
12
|
+
* and consecutive notifications merge into the previous block via
|
|
13
|
+
* {@link addRules} while it is still the live transcript tail.
|
|
14
|
+
*/
|
|
15
|
+
export declare class TtsrNotificationComponent extends Container {
|
|
16
|
+
#private;
|
|
17
|
+
constructor(rules: NotificationRule[]);
|
|
18
|
+
setToolActivityVisible(visible: boolean): void;
|
|
19
|
+
/** Merge additional rules into this block (deduped by rule name). */
|
|
20
|
+
addRules(rules: NotificationRule[]): void;
|
|
21
|
+
setExpanded(expanded: boolean): void;
|
|
22
|
+
isExpanded(): boolean;
|
|
23
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { type Component, Container } from "../tui.js";
|
|
2
|
+
import type { ReactionTarget } from "./reaction.js";
|
|
3
|
+
/** How a user bubble styles its prose and chips (see {@link userBubbleColor}). */
|
|
4
|
+
export interface UserBubbleOptions {
|
|
5
|
+
/** Materialized `file://` targets per attached image, indexed by chip number. */
|
|
6
|
+
imageLinks?: readonly (string | undefined)[];
|
|
7
|
+
/** Agent-attributed input: dim, flat prose. */
|
|
8
|
+
synthetic?: boolean;
|
|
9
|
+
/** SKILL.md path for a skill chip by name; `undefined` leaves the chip unlinked. */
|
|
10
|
+
skillPath?: (name: string) => string | undefined;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Foreground styling for prose inside a user bubble: the bubble text color with the
|
|
14
|
+
* magic-keyword glow, attachment chips in their composer identity color, and skill
|
|
15
|
+
* chips as soft pills (linked to their SKILL.md) — each token restoring the bubble's
|
|
16
|
+
* own foreground after it. Shared by {@link UserMessageComponent} and the skill
|
|
17
|
+
* callout so both read as one turn.
|
|
18
|
+
*/
|
|
19
|
+
export declare function userBubbleColor(options?: UserBubbleOptions, tokenRegex?: RegExp): (value: string) => string;
|
|
20
|
+
/**
|
|
21
|
+
* Component that renders a user message. Accepts an agent reaction badge
|
|
22
|
+
* (see {@link ReactionTarget}) drawn right-aligned in the bubble's top padding row.
|
|
23
|
+
*/
|
|
24
|
+
export declare class UserMessageComponent extends Container implements ReactionTarget {
|
|
25
|
+
#private;
|
|
26
|
+
constructor(text: string, options?: UserBubbleOptions);
|
|
27
|
+
setReaction(emoji: string): void;
|
|
28
|
+
render(width: number): readonly string[];
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Collapsed placeholder for a synthetic (agent-attributed) user input in the
|
|
32
|
+
* file/remote-backed transcript viewer — chiefly the advisor's `Session update`
|
|
33
|
+
* replay dumps, which can each be hundreds of KiB of Markdown and, on cold open,
|
|
34
|
+
* blocked the TUI for tens of seconds while every historical body was laid out
|
|
35
|
+
* before the viewport clip (issue #6308).
|
|
36
|
+
*
|
|
37
|
+
* Collapsed by default: renders one dim summary row (label · size · line count ·
|
|
38
|
+
* expand hint) and builds NO Markdown. The heavy {@link UserMessageComponent} is
|
|
39
|
+
* constructed lazily only when expanded via `ctrl+o`, so blocks above the
|
|
40
|
+
* viewport never pay layout cost until the reader asks to see them. The raw
|
|
41
|
+
* observability data stays intact in `__advisor.jsonl`.
|
|
42
|
+
*/
|
|
43
|
+
export declare class CollapsedSyntheticMessageComponent implements Component {
|
|
44
|
+
#private;
|
|
45
|
+
constructor(text: string, imageLinks?: readonly (string | undefined)[]);
|
|
46
|
+
/** ctrl+o toggle: reveal/hide the full Markdown body. */
|
|
47
|
+
setExpanded(expanded: boolean): void;
|
|
48
|
+
setIgnoreTight(ignore: boolean): this;
|
|
49
|
+
invalidate(): void;
|
|
50
|
+
dispose(): void;
|
|
51
|
+
render(width: number): readonly string[];
|
|
52
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { Container } from "../tui.js";
|
|
2
|
+
/**
|
|
3
|
+
* Capabilities a mounted {@link ChatBlock} may use against its host transcript.
|
|
4
|
+
* Kept minimal so blocks never reach into the full TUI/InteractiveMode surface.
|
|
5
|
+
*/
|
|
6
|
+
export interface ChatBlockHost {
|
|
7
|
+
/** Schedule a repaint of the transcript. */
|
|
8
|
+
requestRender(): void;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Lifecycle-aware transcript block — the "return a block, let the host mount it"
|
|
12
|
+
* primitive, modelled on React/Svelte component lifecycles.
|
|
13
|
+
*
|
|
14
|
+
* Producers build and return a `ChatBlock` instead of poking `chatContainer` and
|
|
15
|
+
* `ui.requestRender()` directly. The host (`ctx.present`) appends it and calls
|
|
16
|
+
* {@link mount}, which runs {@link onMount}; effects started there register
|
|
17
|
+
* teardown via {@link onCleanup}. The block repaints through {@link requestRender}
|
|
18
|
+
* — never touching the TUI — and tears down exactly once on {@link finish}
|
|
19
|
+
* (self-complete: stop the animation, keep the final frame in the transcript) or
|
|
20
|
+
* {@link dispose} (host discards it, e.g. a transcript reset).
|
|
21
|
+
*
|
|
22
|
+
* While mounted and unfinished a block reports `isTranscriptBlockFinalized() ===
|
|
23
|
+
* false` so {@link "../components/transcript-container".TranscriptContainer}
|
|
24
|
+
* keeps it in the live, repaintable region on ED3-risk terminals; after
|
|
25
|
+
* `finish()`/`dispose()` it reports `true` and freezes at its final content.
|
|
26
|
+
*/
|
|
27
|
+
export declare abstract class ChatBlock extends Container {
|
|
28
|
+
#private;
|
|
29
|
+
/**
|
|
30
|
+
* Run setup after the block is in the transcript: start timers/subscriptions
|
|
31
|
+
* and register their teardown with {@link onCleanup}. Default: no-op (a block
|
|
32
|
+
* whose content is fixed at construction needs no mount work).
|
|
33
|
+
*/
|
|
34
|
+
protected onMount(): void;
|
|
35
|
+
/**
|
|
36
|
+
* Register a teardown to run on {@link finish}/{@link dispose}, à la a
|
|
37
|
+
* `useEffect` cleanup. If the block is already disposed the cleanup runs
|
|
38
|
+
* immediately so callers never leak.
|
|
39
|
+
*/
|
|
40
|
+
protected onCleanup(cleanup: () => void): void;
|
|
41
|
+
/** Ask the host to repaint. No-op before mount or after dispose. */
|
|
42
|
+
protected requestRender(): void;
|
|
43
|
+
/** True between {@link mount} and {@link finish}/{@link dispose}. */
|
|
44
|
+
protected get active(): boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Host-only: attach the host and run {@link onMount}. Idempotent — a second
|
|
47
|
+
* call (e.g. a transcript rebuild that re-presents the same instance) is a
|
|
48
|
+
* no-op.
|
|
49
|
+
*/
|
|
50
|
+
mount(host: ChatBlockHost): void;
|
|
51
|
+
/**
|
|
52
|
+
* Self-complete: stop ongoing effects and freeze the block at its current
|
|
53
|
+
* content, leaving it rendered in the transcript. Use when the operation the
|
|
54
|
+
* block represents finishes (connection resolved, download done).
|
|
55
|
+
*/
|
|
56
|
+
finish(): void;
|
|
57
|
+
/**
|
|
58
|
+
* Host-only teardown: release everything and propagate to children. Called
|
|
59
|
+
* when the host permanently discards the block (transcript reset). Idempotent.
|
|
60
|
+
*/
|
|
61
|
+
dispose(): void;
|
|
62
|
+
/** Live blocks stay repaintable; finished/disposed ones may freeze. */
|
|
63
|
+
isTranscriptBlockFinalized(): boolean;
|
|
64
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Component } from "../tui.js";
|
|
2
|
+
import type { AnimationFrame, TranscriptPresentationTarget } from "./transcript-container.js";
|
|
3
|
+
/** Scheme-less display form of a collab browser deep link, OSC-8 linked. */
|
|
4
|
+
export declare function collabBrowserLink(webLink: string, label?: string): string;
|
|
5
|
+
/**
|
|
6
|
+
* One-shot transcript block that prints a collab browser-join URL as a
|
|
7
|
+
* scannable QR code. The symbol is encoded once at construction (byte mode,
|
|
8
|
+
* EC level M) and rendered as ANSI half-blocks; on terminals too narrow for
|
|
9
|
+
* the symbol it degrades to a one-line hint that includes the URL.
|
|
10
|
+
*
|
|
11
|
+
* The transcript viewport can also clip a live block to a single row under
|
|
12
|
+
* pressure (many short settled blocks — typical when thinking is a one-line
|
|
13
|
+
* summary rather than a tall trace). The QR's first/last rows are a white
|
|
14
|
+
* quiet zone, so a 1-row clip looks like an empty white line. When the
|
|
15
|
+
* allocated height cannot fit the full symbol, degrade to the same hint.
|
|
16
|
+
* The sibling `/collab` status heading can also collapse to its first row
|
|
17
|
+
* under that pressure, so the hint must carry the URL itself — "use the
|
|
18
|
+
* URL above" is not reachable.
|
|
19
|
+
*/
|
|
20
|
+
export declare class CollabQrCodeComponent implements Component, TranscriptPresentationTarget {
|
|
21
|
+
#private;
|
|
22
|
+
readonly url: string;
|
|
23
|
+
constructor(url: string);
|
|
24
|
+
setTranscriptAllocation(rows: number, _frame?: AnimationFrame): void;
|
|
25
|
+
render(width: number): readonly string[];
|
|
26
|
+
/** Survives emergency 1-row transcript pressure when this block is otherwise hidden. */
|
|
27
|
+
renderTranscriptBlockEmergencyRow(width: number): string;
|
|
28
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ThemeColor } from "../theme/index.js";
|
|
2
|
+
export type ContextUsageLevel = "normal" | "warning" | "purple" | "error";
|
|
3
|
+
export declare function getContextUsageLevel(contextPercent: number, contextWindow: number): ContextUsageLevel;
|
|
4
|
+
/**
|
|
5
|
+
* Format context usage as `<percent>%/<window>` when the model window is known.
|
|
6
|
+
* Unknown windows render as `<tokens>/?`, because `0.0%/0` suggests a real
|
|
7
|
+
* empty context instead of missing provider metadata.
|
|
8
|
+
*/
|
|
9
|
+
export declare function formatContextUsage(contextPercent: number | null | undefined, contextWindow: number, usedTokens?: number): string;
|
|
10
|
+
export declare function getContextUsageThemeColor(level: ContextUsageLevel): ThemeColor;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reusable countdown timer for dialog components.
|
|
3
|
+
*/
|
|
4
|
+
import type { TUI } from "../tui.js";
|
|
5
|
+
export declare class CountdownTimer {
|
|
6
|
+
#private;
|
|
7
|
+
private tui;
|
|
8
|
+
private onTick;
|
|
9
|
+
private onExpire;
|
|
10
|
+
constructor(timeoutMs: number, tui: TUI | undefined, onTick: (seconds: number) => void, onExpire: () => void);
|
|
11
|
+
/** Reset the countdown to its initial value */
|
|
12
|
+
reset(): void;
|
|
13
|
+
dispose(): void;
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type Theme } from "../theme/index.js";
|
|
2
|
+
export interface RenderDiffOptions {
|
|
3
|
+
/** File path used to resolve indentation (.editorconfig + defaults) */
|
|
4
|
+
filePath?: string;
|
|
5
|
+
/** Theme used for diff colors and syntax highlighting; defaults to the active TUI theme. */
|
|
6
|
+
theme?: Theme;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Render a diff string with colored lines and intra-line change highlighting.
|
|
10
|
+
* - Context lines: dim/gray
|
|
11
|
+
* - Removed lines: red, with inverse on changed tokens
|
|
12
|
+
* - Added lines: green, with inverse on changed tokens
|
|
13
|
+
*/
|
|
14
|
+
export declare function renderDiff(diffText: string, options?: RenderDiffOptions): string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Component } from "../tui.js";
|
|
2
|
+
/**
|
|
3
|
+
* Dynamic border component that adjusts to viewport width.
|
|
4
|
+
*
|
|
5
|
+
* Note: the module-level `theme` may be `undefined` — when loaded through jiti
|
|
6
|
+
* (separate module cache) or from a second `src` module graph in npm-package
|
|
7
|
+
* installs, where the host bundle assigns `theme` but this copy never sees it
|
|
8
|
+
* (issue #5366). Both the default color and `render()` degrade to plain,
|
|
9
|
+
* unstyled output instead of crashing the TUI.
|
|
10
|
+
*/
|
|
11
|
+
export declare class DynamicBorder implements Component {
|
|
12
|
+
#private;
|
|
13
|
+
constructor(color?: (str: string) => string);
|
|
14
|
+
invalidate(): void;
|
|
15
|
+
render(width: number): readonly string[];
|
|
16
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plain, bounded error text to sanitize before applying terminal styles.
|
|
3
|
+
* Match embedded home paths (including quoted names with spaces), not URL
|
|
4
|
+
* paths or home-prefix siblings. Callers retain the original error for logs.
|
|
5
|
+
*/
|
|
6
|
+
export declare function sanitizeErrorLine(error: unknown, maxWidth?: number, homeDir?: string): string;
|
|
7
|
+
/**
|
|
8
|
+
* Format a provider error into at most `maxRows` wrapped rows for a
|
|
9
|
+
* `WidthAwareText` of `contentWidth` cells. Lines wrap to the render width
|
|
10
|
+
* instead of being cut at a fixed column, so a long single-line body — a raw
|
|
11
|
+
* 400 JSON envelope, a `raw-http-request=` dump path — stays readable. Blank
|
|
12
|
+
* lines are dropped. When rows are cut, a dim `… +N more lines (<key> to
|
|
13
|
+
* expand)` row follows; pass `Infinity` to keep every row. `styleLine` colors
|
|
14
|
+
* logical line `index` and supplies line 0's prefix (`Error: `, the banner
|
|
15
|
+
* glyph). Shared by the inline transcript error and the pinned banner.
|
|
16
|
+
*/
|
|
17
|
+
export declare function formatErrorBlock(message: string, contentWidth: number, maxRows: number, styleLine: (line: string, index: number) => string): string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type Theme } from "../theme/theme.js";
|
|
2
|
+
/** Title-case a provider id for display (`openai-codex` → `Openai Codex`). */
|
|
3
|
+
export declare function formatProviderName(provider: string): string;
|
|
4
|
+
/** Format a millisecond duration as a coarse-grained human label. */
|
|
5
|
+
export declare function formatCoarseDuration(ms: number): string;
|
|
6
|
+
type ProgressBarTheme = Pick<Theme, "bold" | "fg" | "getFgAnsi">;
|
|
7
|
+
/**
|
|
8
|
+
* Render an ASCII progress bar with a trailing percent label.
|
|
9
|
+
* `fraction` is clamped to `[0, 1]`. `undefined` renders a dotted placeholder.
|
|
10
|
+
*/
|
|
11
|
+
export declare function renderAsciiBar(fraction: number | undefined, width?: number, uiTheme?: ProgressBarTheme): string;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export * from "./chat-block.js";
|
|
2
|
+
export * from "./context-thresholds.js";
|
|
3
|
+
export * from "./countdown-timer.js";
|
|
4
|
+
export * from "./diff.js";
|
|
5
|
+
export * from "./dynamic-border.js";
|
|
6
|
+
export * from "./error-block.js";
|
|
7
|
+
export * from "./keybinding-hints.js";
|
|
8
|
+
export * from "./message-divider.js";
|
|
9
|
+
export * from "./message-frame.js";
|
|
10
|
+
export * from "./message-notice.js";
|
|
11
|
+
export * from "./overlay-box.js";
|
|
12
|
+
export * from "./segment-track.js";
|
|
13
|
+
export * from "./select-list-mouse-routing.js";
|
|
14
|
+
export * from "./selector-helpers.js";
|
|
15
|
+
export * from "./shared.js";
|
|
16
|
+
export * from "./streaming-panel.js";
|
|
17
|
+
export * from "./tool-activity.js";
|
|
18
|
+
export * from "./transcript-container.js";
|
|
19
|
+
export * from "./transcript-status.js";
|
|
20
|
+
export * from "./visual-truncate.js";
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utilities for formatting keybinding hints in the UI.
|
|
3
|
+
*/
|
|
4
|
+
import { type Keybinding } from "../keybindings.js";
|
|
5
|
+
import { type AppKeybinding, type KeybindingsManager } from "../app-keybindings.js";
|
|
6
|
+
/**
|
|
7
|
+
* Get display string for an editor action.
|
|
8
|
+
*/
|
|
9
|
+
export declare function editorKey(action: Keybinding): string;
|
|
10
|
+
/**
|
|
11
|
+
* Get display string for an app action.
|
|
12
|
+
*/
|
|
13
|
+
export declare function appKey(keybindings: KeybindingsManager, action: AppKeybinding): string;
|
|
14
|
+
/**
|
|
15
|
+
* Format a keybinding hint with consistent styling: dim key, muted description.
|
|
16
|
+
* Looks up the key from editor keybindings automatically.
|
|
17
|
+
*
|
|
18
|
+
* @param action - Keybinding action name (e.g., "tui.select.confirm", "app.tools.expand")
|
|
19
|
+
* @param description - Description text (e.g., "to expand", "cancel")
|
|
20
|
+
* @returns Formatted string with dim key and muted description
|
|
21
|
+
*/
|
|
22
|
+
export declare function keyHint(action: Keybinding, description: string): string;
|
|
23
|
+
/**
|
|
24
|
+
* Format a keybinding hint for app-level actions.
|
|
25
|
+
* Requires the KeybindingsManager instance.
|
|
26
|
+
*
|
|
27
|
+
* @param keybindings - KeybindingsManager instance
|
|
28
|
+
* @param action - App keybinding name (e.g., "app.interrupt", "app.editor.external")
|
|
29
|
+
* @param description - Description text
|
|
30
|
+
* @returns Formatted string with dim key and muted description
|
|
31
|
+
*/
|
|
32
|
+
export declare function appKeyHint(keybindings: KeybindingsManager, action: AppKeybinding, description: string): string;
|
|
33
|
+
/**
|
|
34
|
+
* Format a raw key string with description (for non-configurable keys like ↑↓).
|
|
35
|
+
*
|
|
36
|
+
* @param key - Raw key string
|
|
37
|
+
* @param description - Description text
|
|
38
|
+
* @returns Formatted string with dim key and muted description
|
|
39
|
+
*/
|
|
40
|
+
export declare function rawKeyHint(key: string, description: string): string;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** Output contract for the live board (satisfied by `process.stdout`). */
|
|
2
|
+
export interface LiveBoardOutput {
|
|
3
|
+
isTTY?: boolean;
|
|
4
|
+
columns?: number;
|
|
5
|
+
rows?: number;
|
|
6
|
+
write(text: string): boolean;
|
|
7
|
+
}
|
|
8
|
+
/** Live repaint handle returned by {@link createLiveBoard}. */
|
|
9
|
+
export interface LiveBoard {
|
|
10
|
+
readonly interactive: boolean;
|
|
11
|
+
/** Print a permanent line above the board; plain write when non-interactive. */
|
|
12
|
+
log(text: string): void;
|
|
13
|
+
/** Repaint immediately after a state change instead of waiting for the next tick. */
|
|
14
|
+
repaint(): void;
|
|
15
|
+
/** Clear the board, stop the timer, and restore the cursor. */
|
|
16
|
+
close(): void;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Create a live board whose content comes from `render(spinner, width)` on
|
|
20
|
+
* every tick. An empty render result paints nothing and releases the cursor,
|
|
21
|
+
* so an idle board never interferes with other terminal UI (e.g. pickers).
|
|
22
|
+
*/
|
|
23
|
+
export declare function createLiveBoard(render: (spinner: string, width: number) => string[], output?: LiveBoardOutput): LiveBoard;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** formatLocalCalendarDate formats a Date as YYYY-MM-DD in the host local timezone. */
|
|
2
|
+
export declare function formatLocalCalendarDate(date?: Date): string;
|
|
3
|
+
/** Format a local date and minute with a compact numeric UTC offset. */
|
|
4
|
+
export declare function formatLocalDateTimeWithOffset(date: Date): string;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Component } from "../tui.js";
|
|
2
|
+
import { type ThemeColor } from "../theme/index.js";
|
|
3
|
+
/** Presentation policy for a compact message divider. */
|
|
4
|
+
export interface MessageDividerOptions {
|
|
5
|
+
/** Theme-aware label, recomputed after invalidation. */
|
|
6
|
+
readonly label: () => string;
|
|
7
|
+
readonly labelColor: ThemeColor;
|
|
8
|
+
readonly ruleColor?: ThemeColor;
|
|
9
|
+
readonly ruleWidth?: number;
|
|
10
|
+
/** Preserve an intentionally untruncated legacy label at very narrow widths. */
|
|
11
|
+
readonly truncateWhenNarrow?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* A short left-aligned rule and label surrounded by blank transcript rows.
|
|
15
|
+
* Rendered rows are cached by width and stay reference-stable until invalidated.
|
|
16
|
+
*/
|
|
17
|
+
export declare class MessageDividerComponent implements Component {
|
|
18
|
+
#private;
|
|
19
|
+
constructor(options: MessageDividerOptions);
|
|
20
|
+
invalidate(): void;
|
|
21
|
+
render(width: number): readonly string[];
|
|
22
|
+
}
|