@oh-my-pi/pi-tui 18.4.2 → 18.4.4
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 +56 -0
- package/dist/types/apps/cleanse-board.d.ts +17 -0
- package/dist/types/apps/git/help.d.ts +16 -0
- package/dist/types/apps/git/sidebar.d.ts +18 -0
- package/dist/types/apps/live-visualizer.d.ts +10 -0
- package/dist/types/apps/ps-top.d.ts +15 -0
- package/dist/types/apps/standalone-picker.d.ts +3 -0
- package/dist/types/autocomplete.d.ts +8 -0
- package/dist/types/chat/advisor-message.d.ts +12 -2
- package/dist/types/chat/assistant-message.d.ts +20 -0
- package/dist/types/chat/bash-execution.d.ts +9 -0
- package/dist/types/chat/chat-transcript-builder.d.ts +6 -1
- package/dist/types/chat/collab-prompt-message.d.ts +4 -0
- package/dist/types/chat/compaction-summary-message.d.ts +15 -0
- package/dist/types/chat/eval-execution.d.ts +8 -0
- package/dist/types/chat/execution-shared.d.ts +58 -0
- package/dist/types/chat/late-diagnostics-message.d.ts +15 -1
- package/dist/types/chat/read-tool-group.d.ts +15 -0
- package/dist/types/chat/skill-message.d.ts +9 -0
- package/dist/types/chat/stripped-tool-calls-placeholder.d.ts +3 -0
- package/dist/types/chat/thinking-display.d.ts +2 -0
- package/dist/types/chat/todo-reminder.d.ts +4 -1
- package/dist/types/chat/tool-execution.d.ts +25 -1
- package/dist/types/chat/transcript-actions.d.ts +37 -0
- package/dist/types/chat/transcript-entry.d.ts +3 -1
- package/dist/types/chat/user-message.d.ts +25 -0
- package/dist/types/chrome/collab-qrcode.d.ts +7 -0
- package/dist/types/chrome/context-thresholds.d.ts +11 -0
- package/dist/types/chrome/countdown-timer.d.ts +9 -3
- package/dist/types/chrome/diff.d.ts +12 -0
- package/dist/types/chrome/dynamic-border.d.ts +3 -0
- package/dist/types/chrome/format.d.ts +6 -0
- package/dist/types/chrome/message-divider.d.ts +13 -0
- package/dist/types/chrome/message-frame.d.ts +10 -0
- package/dist/types/chrome/message-notice.d.ts +23 -0
- package/dist/types/chrome/overlay-box.d.ts +11 -2
- package/dist/types/chrome/qrcode.d.ts +7 -0
- package/dist/types/chrome/segment-track.d.ts +7 -0
- package/dist/types/chrome/selector-helpers.d.ts +0 -6
- package/dist/types/chrome/status-notice.d.ts +14 -0
- package/dist/types/chrome/streaming-panel.d.ts +3 -0
- package/dist/types/chrome/tool-activity.d.ts +3 -0
- package/dist/types/chrome/transcript-container.d.ts +13 -0
- package/dist/types/chrome/transcript-status.d.ts +15 -3
- package/dist/types/components/box.d.ts +7 -0
- package/dist/types/components/disclosure.d.ts +9 -0
- package/dist/types/components/editor.d.ts +42 -0
- package/dist/types/components/form.d.ts +14 -0
- package/dist/types/components/image.d.ts +7 -0
- package/dist/types/components/input.d.ts +20 -1
- package/dist/types/components/key-value-list.d.ts +3 -0
- package/dist/types/components/layout/geometry.d.ts +16 -0
- package/dist/types/components/layout/row.d.ts +7 -0
- package/dist/types/components/layout/split-pane.d.ts +8 -0
- package/dist/types/components/layout/stack.d.ts +6 -0
- package/dist/types/components/loader.d.ts +48 -0
- package/dist/types/components/markdown.d.ts +8 -0
- package/dist/types/components/metric.d.ts +7 -0
- package/dist/types/components/progress-bar.d.ts +3 -0
- package/dist/types/components/scroll-view.d.ts +6 -0
- package/dist/types/components/section.d.ts +3 -0
- package/dist/types/components/select-list.d.ts +33 -0
- package/dist/types/components/settings-list.d.ts +68 -0
- package/dist/types/components/spacer.d.ts +4 -0
- package/dist/types/components/tab-bar.d.ts +9 -0
- package/dist/types/components/table.d.ts +7 -0
- package/dist/types/components/text.d.ts +6 -0
- package/dist/types/components/tree-view.d.ts +9 -0
- package/dist/types/components/truncated-text.d.ts +3 -0
- package/dist/types/components/wizard-step.d.ts +6 -0
- package/dist/types/hotkeys-markdown.d.ts +24 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/latex-block.d.ts +7 -0
- package/dist/types/loop-watchdog.d.ts +9 -0
- package/dist/types/native/apply.d.ts +39 -0
- package/dist/types/native/backend.d.ts +94 -0
- package/dist/types/native/blobs.d.ts +29 -0
- package/dist/types/native/describe.d.ts +56 -0
- package/dist/types/native/encode.d.ts +50 -0
- package/dist/types/native/icons.d.ts +18 -0
- package/dist/types/native/memo.d.ts +27 -0
- package/dist/types/native/node.d.ts +107 -0
- package/dist/types/native/overlay.d.ts +64 -0
- package/dist/types/native/picker.d.ts +124 -0
- package/dist/types/native/reconcile.d.ts +41 -0
- package/dist/types/native/settle.d.ts +11 -0
- package/dist/types/native/spans.d.ts +21 -0
- package/dist/types/native/state.d.ts +6 -0
- package/dist/types/native/tone.d.ts +24 -0
- package/dist/types/overlays/advisor-config.d.ts +20 -0
- package/dist/types/overlays/agent-hub-renderer.d.ts +27 -11
- package/dist/types/overlays/agent-hub.d.ts +10 -0
- package/dist/types/overlays/agent-transcript-viewer.d.ts +7 -0
- package/dist/types/overlays/agents-hub.d.ts +8 -0
- package/dist/types/overlays/annotation-overlay.d.ts +3 -0
- package/dist/types/overlays/ask-dialog.d.ts +23 -0
- package/dist/types/overlays/bordered-loader.d.ts +3 -0
- package/dist/types/overlays/btw-history-panel.d.ts +9 -0
- package/dist/types/overlays/btw-panel.d.ts +3 -0
- package/dist/types/overlays/cleanse-panel.d.ts +5 -2
- package/dist/types/overlays/composer-shape-preview.d.ts +7 -1
- package/dist/types/overlays/copy-selector.d.ts +38 -0
- package/dist/types/overlays/error-banner.d.ts +9 -0
- package/dist/types/overlays/extensions/extension-list.d.ts +1 -0
- package/dist/types/overlays/history-search.d.ts +18 -0
- package/dist/types/overlays/hook-editor.d.ts +28 -1
- package/dist/types/overlays/hook-input.d.ts +3 -0
- package/dist/types/overlays/hook-selector.d.ts +10 -0
- package/dist/types/overlays/hub-frame.d.ts +18 -0
- package/dist/types/overlays/jobs-panel.d.ts +24 -0
- package/dist/types/overlays/login-dialog.d.ts +10 -0
- package/dist/types/overlays/logout-account-selector.d.ts +4 -0
- package/dist/types/overlays/mcp-add-wizard.d.ts +4 -0
- package/dist/types/overlays/model-browser.d.ts +69 -0
- package/dist/types/overlays/model-hub.d.ts +7 -0
- package/dist/types/overlays/model-picker.d.ts +9 -1
- package/dist/types/overlays/move-overlay.d.ts +3 -0
- package/dist/types/overlays/oauth-selector.d.ts +4 -0
- package/dist/types/overlays/omfg-panel.d.ts +3 -0
- package/dist/types/overlays/pause-screen.d.ts +12 -0
- package/dist/types/overlays/plan-review-overlay.d.ts +5 -0
- package/dist/types/overlays/plan-save-overlay.d.ts +10 -0
- package/dist/types/overlays/plugin-selector.d.ts +4 -0
- package/dist/types/overlays/plugin-settings.d.ts +30 -0
- package/dist/types/overlays/queue-mode-selector.d.ts +4 -0
- package/dist/types/overlays/reset-usage-selector.d.ts +8 -0
- package/dist/types/overlays/rewind-selector.d.ts +5 -0
- package/dist/types/overlays/session-info-overlay.d.ts +19 -1
- package/dist/types/overlays/session-selector.d.ts +64 -1
- package/dist/types/overlays/settings-defs.d.ts +14 -0
- package/dist/types/overlays/settings-selector.d.ts +21 -0
- package/dist/types/overlays/show-images-selector.d.ts +4 -0
- package/dist/types/overlays/snapcompact-shape-preview.d.ts +2 -0
- package/dist/types/overlays/stats-notice.d.ts +8 -0
- package/dist/types/overlays/theme-selector.d.ts +11 -0
- package/dist/types/overlays/thinking-selector.d.ts +4 -0
- package/dist/types/overlays/tree-selector.d.ts +60 -2
- package/dist/types/overlays/usage-dashboard.d.ts +26 -3
- package/dist/types/overlays/usage-row.d.ts +36 -2
- package/dist/types/prompt/attachment-chips.d.ts +8 -0
- package/dist/types/prompt/composer-attachments.d.ts +15 -3
- package/dist/types/prompt/composer.d.ts +18 -1
- package/dist/types/prompt/custom-editor.d.ts +48 -2
- package/dist/types/prompt/editor-top-gap.d.ts +2 -0
- package/dist/types/prompt/macos-spelling.d.ts +6 -0
- package/dist/types/prompt/magic-keywords.d.ts +9 -0
- package/dist/types/prompt/queued-messages.d.ts +23 -0
- package/dist/types/prompt/skill-tokens.d.ts +4 -2
- package/dist/types/prompt/welcome.d.ts +16 -0
- package/dist/types/render/code-cell.d.ts +10 -0
- package/dist/types/render/file-list.d.ts +8 -0
- package/dist/types/render/hyperlink.d.ts +14 -0
- package/dist/types/render/output-block.d.ts +43 -0
- package/dist/types/render/output-pane.d.ts +17 -0
- package/dist/types/render/tool-card.d.ts +8 -0
- package/dist/types/render/tree-list.d.ts +8 -0
- package/dist/types/render/width-aware-text.d.ts +7 -0
- package/dist/types/setup/scenes/outro.d.ts +7 -0
- package/dist/types/setup/scenes/sign-in.d.ts +16 -9
- package/dist/types/setup/scenes/splash.d.ts +8 -0
- package/dist/types/setup/scenes/types.d.ts +6 -27
- package/dist/types/setup/wizard-overlay.d.ts +9 -0
- package/dist/types/status-line/component.d.ts +49 -5
- package/dist/types/status-line/context-usage.d.ts +20 -0
- package/dist/types/status-line/footer.d.ts +8 -0
- package/dist/types/status-line/metrics.d.ts +1 -2
- package/dist/types/status-line/segments.d.ts +10 -1
- package/dist/types/status-line/types.d.ts +40 -1
- package/dist/types/stdin-buffer.d.ts +10 -7
- package/dist/types/terminal-capabilities.d.ts +1 -1
- package/dist/types/terminal.d.ts +36 -0
- package/dist/types/theme/defaults/index.d.ts +100 -0
- package/dist/types/theme/schema.d.ts +2 -0
- package/dist/types/theme/shimmer.d.ts +8 -0
- package/dist/types/theme/theme-class.d.ts +2 -0
- package/dist/types/theme/theme.d.ts +33 -1
- package/dist/types/tools/ask.d.ts +3 -0
- package/dist/types/tools/ast-edit.d.ts +10 -1
- package/dist/types/tools/ast-grep.d.ts +10 -1
- package/dist/types/tools/autoresearch.d.ts +21 -4
- package/dist/types/tools/bash.d.ts +30 -1
- package/dist/types/tools/cfg-render.d.ts +5 -1
- package/dist/types/tools/debug.d.ts +3 -1
- package/dist/types/tools/default-renderer.d.ts +6 -1
- package/dist/types/tools/edit.d.ts +14 -1
- package/dist/types/tools/eval.d.ts +12 -1
- package/dist/types/tools/fetch.d.ts +16 -1
- package/dist/types/tools/find.d.ts +15 -1
- package/dist/types/tools/github.d.ts +3 -0
- package/dist/types/tools/glob.d.ts +14 -1
- package/dist/types/tools/goal.d.ts +3 -1
- package/dist/types/tools/grep.d.ts +14 -1
- package/dist/types/tools/grouped-file-output.d.ts +58 -0
- package/dist/types/tools/json-tree.d.ts +20 -0
- package/dist/types/tools/lsp.d.ts +3 -10
- package/dist/types/tools/mcp.d.ts +16 -1
- package/dist/types/tools/memory.d.ts +26 -0
- package/dist/types/tools/native-view.d.ts +90 -0
- package/dist/types/tools/proc-render.d.ts +7 -1
- package/dist/types/tools/read.d.ts +23 -1
- package/dist/types/tools/renderer.d.ts +57 -0
- package/dist/types/tools/report-tool-issue.d.ts +3 -0
- package/dist/types/tools/resolve.d.ts +14 -1
- package/dist/types/tools/task.d.ts +3 -0
- package/dist/types/tools/think.d.ts +3 -0
- package/dist/types/tools/todo.d.ts +12 -0
- package/dist/types/tools/vibe.d.ts +3 -1
- package/dist/types/tools/wait.d.ts +3 -0
- package/dist/types/tools/web-search-types.d.ts +90 -0
- package/dist/types/tools/web-search.d.ts +9 -168
- package/dist/types/tools/write.d.ts +14 -1
- package/dist/types/tools/xdev.d.ts +13 -0
- package/dist/types/tui.d.ts +49 -0
- package/package.json +9 -9
- package/src/apps/autoresearch-dashboard.ts +362 -4
- package/src/apps/cleanse-board.ts +219 -1
- package/src/apps/cleanse-picker.ts +9 -1
- package/src/apps/debug/log-viewer.ts +15 -15
- package/src/apps/debug/protocol-probe.ts +2 -20
- package/src/apps/git/avatar.ts +2 -22
- package/src/apps/git/git-tui.ts +406 -59
- package/src/apps/git/help.ts +130 -0
- package/src/apps/git/sidebar.ts +491 -0
- package/src/apps/live-visualizer.ts +65 -0
- package/src/apps/ps-top.ts +448 -17
- package/src/apps/session-picker.ts +1 -0
- package/src/apps/setup-model-picker.ts +5 -1
- package/src/apps/standalone-picker.ts +55 -1
- package/src/autocomplete.ts +44 -1
- package/src/chat/advisor-message.ts +72 -3
- package/src/chat/assistant-message.ts +538 -51
- package/src/chat/background-tan-message.ts +4 -4
- package/src/chat/bash-execution.ts +81 -0
- package/src/chat/cache-invalidation-marker.ts +8 -0
- package/src/chat/chat-transcript-builder.ts +37 -6
- package/src/chat/collab-prompt-message.ts +15 -3
- package/src/chat/compaction-summary-message.ts +74 -1
- package/src/chat/custom-message.ts +3 -1
- package/src/chat/eval-execution.ts +57 -0
- package/src/chat/execution-shared.ts +153 -1
- package/src/chat/hook-message.ts +1 -0
- package/src/chat/late-diagnostics-message.ts +85 -2
- package/src/chat/read-tool-group.ts +341 -1
- package/src/chat/served-model-marker.ts +8 -0
- package/src/chat/skill-message.ts +63 -0
- package/src/chat/stripped-tool-calls-placeholder.ts +18 -10
- package/src/chat/thinking-display.ts +73 -11
- package/src/chat/todo-reminder.ts +34 -4
- package/src/chat/tool-execution.ts +385 -10
- package/src/chat/transcript-actions.ts +38 -0
- package/src/chat/transcript-browser.ts +2 -9
- package/src/chat/transcript-entry.ts +10 -1
- package/src/chat/transcript-render-helpers.ts +16 -15
- package/src/chat/ttsr-notification.ts +38 -1
- package/src/chat/user-message.ts +167 -4
- package/src/chrome/collab-qrcode.ts +27 -2
- package/src/chrome/context-thresholds.ts +34 -0
- package/src/chrome/countdown-timer.ts +24 -1
- package/src/chrome/diff.ts +60 -1
- package/src/chrome/dynamic-border.ts +7 -0
- package/src/chrome/format.ts +12 -0
- package/src/chrome/message-divider.ts +33 -1
- package/src/chrome/message-frame.ts +53 -10
- package/src/chrome/message-notice.ts +71 -0
- package/src/chrome/overlay-box.ts +45 -2
- package/src/chrome/qrcode.ts +28 -0
- package/src/chrome/segment-track.ts +26 -0
- package/src/chrome/selector-helpers.ts +1 -17
- package/src/chrome/status-notice.ts +46 -0
- package/src/chrome/streaming-panel.ts +25 -1
- package/src/chrome/tool-activity.ts +20 -0
- package/src/chrome/transcript-container.ts +139 -17
- package/src/chrome/transcript-status.ts +40 -11
- package/src/components/box.ts +51 -0
- package/src/components/disclosure.ts +33 -0
- package/src/components/editor.ts +239 -36
- package/src/components/form.ts +93 -9
- package/src/components/image.ts +30 -0
- package/src/components/input.ts +77 -26
- package/src/components/key-value-list.ts +18 -0
- package/src/components/layout/geometry.ts +44 -0
- package/src/components/layout/row.ts +30 -0
- package/src/components/layout/split-pane.ts +65 -0
- package/src/components/layout/stack.ts +27 -0
- package/src/components/loader.ts +183 -1
- package/src/components/markdown.ts +131 -56
- package/src/components/metric.ts +39 -0
- package/src/components/progress-bar.ts +28 -0
- package/src/components/scroll-view.ts +23 -0
- package/src/components/section.ts +16 -0
- package/src/components/select-list.ts +174 -25
- package/src/components/settings-list.ts +264 -7
- package/src/components/spacer.ts +17 -0
- package/src/components/tab-bar.ts +42 -0
- package/src/components/table.ts +34 -0
- package/src/components/text.ts +23 -0
- package/src/components/tree-view.ts +65 -0
- package/src/components/truncated-text.ts +14 -0
- package/src/components/wizard-step.ts +18 -9
- package/src/debug-server.ts +14 -7
- package/src/hotkeys-markdown.ts +251 -69
- package/src/index.ts +6 -0
- package/src/latex-block.ts +11 -0
- package/src/loop-watchdog.ts +38 -10
- package/src/native/apply.ts +275 -0
- package/src/native/backend.ts +682 -0
- package/src/native/blobs.ts +70 -0
- package/src/native/describe.ts +124 -0
- package/src/native/encode.ts +233 -0
- package/src/native/icons.ts +184 -0
- package/src/native/memo.ts +64 -0
- package/src/native/node.ts +112 -0
- package/src/native/overlay.ts +131 -0
- package/src/native/picker.ts +333 -0
- package/src/native/reconcile.ts +1063 -0
- package/src/native/settle.ts +23 -0
- package/src/native/spans.ts +308 -0
- package/src/native/state.ts +28 -0
- package/src/native/tone.ts +79 -0
- package/src/overlays/advisor-config.ts +420 -0
- package/src/overlays/agent-hub-renderer.ts +155 -18
- package/src/overlays/agent-hub.ts +1037 -44
- package/src/overlays/agent-transcript-viewer.ts +129 -0
- package/src/overlays/agents-hub.ts +688 -53
- package/src/overlays/annotation-overlay.ts +391 -52
- package/src/overlays/ask-dialog.ts +435 -24
- package/src/overlays/bordered-loader.ts +17 -0
- package/src/overlays/btw-history-panel.ts +182 -0
- package/src/overlays/btw-panel.ts +68 -2
- package/src/overlays/cleanse-panel.ts +105 -15
- package/src/overlays/codex-reset-fireworks.ts +65 -5
- package/src/overlays/composer-shape-preview.ts +26 -1
- package/src/overlays/copy-selector.ts +545 -23
- package/src/overlays/error-banner.ts +44 -0
- package/src/overlays/extensions/extension-list.ts +23 -17
- package/src/overlays/history-search.ts +175 -33
- package/src/overlays/hook-editor.ts +113 -6
- package/src/overlays/hook-input.ts +22 -1
- package/src/overlays/hook-selector.ts +311 -22
- package/src/overlays/hub-frame.ts +80 -0
- package/src/overlays/jobs-panel.ts +112 -0
- package/src/overlays/login-dialog.ts +183 -1
- package/src/overlays/logout-account-selector.ts +102 -4
- package/src/overlays/mcp-add-wizard.ts +232 -53
- package/src/overlays/model-browser.ts +681 -22
- package/src/overlays/model-hub.ts +1402 -78
- package/src/overlays/model-picker.ts +184 -7
- package/src/overlays/move-overlay.ts +45 -0
- package/src/overlays/oauth-selector.ts +227 -23
- package/src/overlays/omfg-panel.ts +86 -2
- package/src/overlays/pause-screen.ts +55 -4
- package/src/overlays/plan-review-overlay.ts +352 -0
- package/src/overlays/plan-save-overlay.ts +45 -0
- package/src/overlays/plugin-selector.ts +21 -1
- package/src/overlays/plugin-settings.ts +195 -5
- package/src/overlays/queue-mode-selector.ts +19 -1
- package/src/overlays/reset-usage-selector.ts +110 -40
- package/src/overlays/rewind-selector.ts +458 -44
- package/src/overlays/session-account-selector.ts +1 -1
- package/src/overlays/session-info-overlay.ts +137 -1
- package/src/overlays/session-selector.ts +807 -46
- package/src/overlays/settings-defs.ts +41 -0
- package/src/overlays/settings-selector.ts +585 -33
- package/src/overlays/show-images-selector.ts +18 -1
- package/src/overlays/snapcompact-shape-preview.ts +48 -3
- package/src/overlays/stats-notice.ts +31 -0
- package/src/overlays/theme-selector.ts +31 -1
- package/src/overlays/thinking-selector.ts +22 -1
- package/src/overlays/tree-selector.ts +570 -110
- package/src/overlays/usage-dashboard.ts +587 -12
- package/src/overlays/usage-row.ts +161 -25
- package/src/prompt/attachment-chips.ts +60 -0
- package/src/prompt/composer-attachments.ts +31 -9
- package/src/prompt/composer.ts +55 -2
- package/src/prompt/custom-editor.ts +302 -4
- package/src/prompt/editor-top-gap.ts +8 -0
- package/src/prompt/macos-spelling.ts +24 -9
- package/src/prompt/magic-keywords.ts +22 -1
- package/src/prompt/model-mention-autocomplete.ts +1 -0
- package/src/prompt/queued-messages.ts +101 -0
- package/src/prompt/skill-tokens.ts +5 -3
- package/src/prompt/welcome.ts +213 -6
- package/src/render/code-cell.ts +103 -2
- package/src/render/file-list.ts +29 -0
- package/src/render/hyperlink.ts +32 -0
- package/src/render/output-block.ts +110 -0
- package/src/render/output-pane.ts +37 -0
- package/src/render/tool-card.ts +137 -0
- package/src/render/tree-list.ts +39 -0
- package/src/render/width-aware-text.ts +20 -0
- package/src/setup/scenes/composer.ts +29 -0
- package/src/setup/scenes/glyph.ts +15 -0
- package/src/setup/scenes/model.ts +36 -8
- package/src/setup/scenes/outro.ts +28 -1
- package/src/setup/scenes/sign-in.ts +138 -24
- package/src/setup/scenes/splash.ts +28 -1
- package/src/setup/scenes/theme.ts +88 -3
- package/src/setup/scenes/types.ts +7 -28
- package/src/setup/startup-splash.ts +46 -9
- package/src/setup/wizard-overlay.ts +140 -23
- package/src/setup/wizard.ts +1 -1
- package/src/status-line/component.ts +414 -18
- package/src/status-line/context-usage.ts +279 -50
- package/src/status-line/footer.ts +94 -1
- package/src/status-line/metrics.ts +3 -6
- package/src/status-line/segments.ts +463 -97
- package/src/status-line/separators.ts +3 -16
- package/src/status-line/types.ts +43 -1
- package/src/stdin-buffer.ts +27 -21
- package/src/terminal-capabilities.ts +7 -0
- package/src/terminal.ts +153 -11
- package/src/theme/defaults/dark-neon-noir.json +100 -0
- package/src/theme/defaults/index.ts +2 -0
- package/src/theme/defaults/light-prism.json +5 -5
- package/src/theme/defaults/onyx.json +62 -62
- package/src/theme/mermaid-cache.ts +10 -1
- package/src/theme/schema.ts +15 -0
- package/src/theme/shimmer.ts +33 -0
- package/src/theme/theme-class.ts +24 -19
- package/src/theme/theme.ts +111 -9
- package/src/theme/tui-adapters.ts +14 -1
- package/src/tools/ask.ts +157 -1
- package/src/tools/ast-edit.ts +174 -1
- package/src/tools/ast-grep.ts +82 -2
- package/src/tools/autoresearch.ts +149 -1
- package/src/tools/bash.ts +233 -62
- package/src/tools/cfg-render.ts +66 -1
- package/src/tools/debug.ts +78 -1
- package/src/tools/default-renderer.ts +35 -1
- package/src/tools/edit.ts +357 -31
- package/src/tools/eval.ts +257 -1
- package/src/tools/fetch.ts +102 -3
- package/src/tools/find.ts +127 -1
- package/src/tools/github.ts +119 -10
- package/src/tools/glob.ts +116 -1
- package/src/tools/goal.ts +56 -1
- package/src/tools/grep.ts +83 -2
- package/src/tools/grouped-file-output.ts +205 -0
- package/src/tools/json-tree.ts +116 -1
- package/src/tools/lsp.ts +318 -1
- package/src/tools/mcp.ts +80 -1
- package/src/tools/memory.ts +93 -11
- package/src/tools/native-view.ts +292 -0
- package/src/tools/proc-render.ts +221 -1
- package/src/tools/read.ts +199 -4
- package/src/tools/renderer.ts +61 -0
- package/src/tools/report-tool-issue.ts +7 -1
- package/src/tools/resolve.ts +63 -1
- package/src/tools/streaming-output.ts +79 -16
- package/src/tools/task.ts +406 -4
- package/src/tools/think.ts +19 -1
- package/src/tools/todo.ts +89 -0
- package/src/tools/vibe.ts +230 -2
- package/src/tools/wait.ts +181 -1
- package/src/tools/web-search-types.ts +99 -0
- package/src/tools/web-search.ts +111 -170
- package/src/tools/write.ts +144 -5
- package/src/tools/xdev.ts +64 -1
- package/src/tui.ts +295 -4
- package/dist/types/setup/scenes/providers.d.ts +0 -3
- package/dist/types/setup/scenes/web-search.d.ts +0 -22
- package/src/setup/scenes/providers.ts +0 -110
- package/src/setup/scenes/web-search.ts +0 -165
|
@@ -1,11 +1,26 @@
|
|
|
1
1
|
import type { ImageContent } from "@oh-my-pi/pi-ai";
|
|
2
|
-
import { Editor, type EditorTextDecorationContext } from "../components/editor.js";
|
|
2
|
+
import { Editor, type EditorTextDecorationContext, type NativeEditorLayout } from "../components/editor.js";
|
|
3
3
|
import { type KeyId } from "../keys.js";
|
|
4
4
|
import { SpaceHoldGesture } from "../space-hold.js";
|
|
5
|
-
import { TUI } from "../tui.js";
|
|
5
|
+
import { type Component, TUI } from "../tui.js";
|
|
6
6
|
import type { AppKeybinding } from "../app-keybindings.js";
|
|
7
|
+
import type { DescribeContext, NativeNode, NativeUiEvent } from "../native/node.js";
|
|
8
|
+
import type { ComposerFactsSource } from "../status-line/types.js";
|
|
7
9
|
import { type MacOSSpellingFeatures } from "./macos-spelling.js";
|
|
10
|
+
import type { TspEditorDecoration } from "@oh-my-pi/pi-wire";
|
|
8
11
|
import { type WordCompletionMethod } from "./word-completion.js";
|
|
12
|
+
/** Live composer state the TSP layout shows; the interactive host wires {@link CustomEditor.composerState}. */
|
|
13
|
+
export interface ComposerNativeState {
|
|
14
|
+
/** The draft runs as a shell command (`!`, `!!`) or Python (`$`, `$$`); `excluded` keeps it from the model. */
|
|
15
|
+
readonly shell?: {
|
|
16
|
+
readonly kind: "bash" | "python";
|
|
17
|
+
readonly excluded: boolean;
|
|
18
|
+
};
|
|
19
|
+
/** Thinking effort word (`high`, `off`, `auto`); undefined when the model has no thinking. */
|
|
20
|
+
readonly thinking?: string;
|
|
21
|
+
/** A turn is running: the send keycap becomes a Stop button. */
|
|
22
|
+
readonly running: boolean;
|
|
23
|
+
}
|
|
9
24
|
/** Independently switchable prose-assistance features of the composer. */
|
|
10
25
|
export interface SpellingFeatures extends MacOSSpellingFeatures {
|
|
11
26
|
/** Word-completion engine; `off` disables ghost text. */
|
|
@@ -172,6 +187,14 @@ export declare class CustomEditor extends Editor {
|
|
|
172
187
|
* Queue shorthand reserves its first logical line as a dim `Queueing` label; sequential
|
|
173
188
|
* item markers use the accent color so separate follow-ups remain visible while composing. */
|
|
174
189
|
decorateText: (text: string, context: EditorTextDecorationContext) => string;
|
|
190
|
+
/**
|
|
191
|
+
* TSP decorations: magic keywords shimmer (terminal-clocked) in the accent
|
|
192
|
+
* color, chips and markers take their token colors, misspellings are marked,
|
|
193
|
+
* and queue-composer markers are dimmed/accented, all as ranges over the raw
|
|
194
|
+
* buffer instead of painted text. A shell-mode draft is code: only its sigil
|
|
195
|
+
* is decorated, hidden behind the mode chip.
|
|
196
|
+
*/
|
|
197
|
+
describeDecorations: (lines: readonly string[]) => readonly TspEditorDecoration[];
|
|
175
198
|
/** Optional test override for the magic-keyword shimmer gate. */
|
|
176
199
|
magicKeywordsEnabledOverride: boolean | undefined;
|
|
177
200
|
/**
|
|
@@ -188,6 +211,29 @@ export declare class CustomEditor extends Editor {
|
|
|
188
211
|
* once after construction (and again after `setEditorComponent` swaps the
|
|
189
212
|
* editor). Passing `undefined` clears any pending frame. */
|
|
190
213
|
setShimmerRepaintHandler(handler: (() => void) | undefined): void;
|
|
214
|
+
nativePlaceholder: string | undefined;
|
|
215
|
+
/** A shell-mode draft highlights as its language. */
|
|
216
|
+
describeLanguage: () => string | undefined;
|
|
217
|
+
/** Host-owned live state for the TSP composer (shell mode, effort chip, send/stop). */
|
|
218
|
+
composerState: () => ComposerNativeState;
|
|
219
|
+
/** The attachment band, described inside the composer on a TSP terminal (ANSI renders it above). */
|
|
220
|
+
attachmentChips: Component | undefined;
|
|
221
|
+
/** The status line's facts the TSP composer carries (context, model, usage, the other segments). */
|
|
222
|
+
composerFacts: ComposerFactsSource | undefined;
|
|
223
|
+
/**
|
|
224
|
+
* The TSP composer: role `omp.editor[.bash|.python]` (tone `pending` while
|
|
225
|
+
* a turn runs) over the context hairline, the attachment chips, a `line`
|
|
226
|
+
* row of the shell-mode chip and the input, and the `bar`: model chip,
|
|
227
|
+
* effort chip, the other status facts, usage, then send (Stop while a turn
|
|
228
|
+
* runs). Clicks come back as `status.model`, `thinking.cycle`, `submit`
|
|
229
|
+
* and `interrupt` actions.
|
|
230
|
+
*/
|
|
231
|
+
describeLayout: (input: NativeNode, _cx: DescribeContext) => NativeEditorLayout;
|
|
232
|
+
/**
|
|
233
|
+
* Clicks on the composer's controls take the same paths as their keys: ⇧⇥,
|
|
234
|
+
* ⏎ and Esc; the status facts' clicks (`status.*`) go to their source.
|
|
235
|
+
*/
|
|
236
|
+
handleNativeEvent(event: NativeUiEvent): void;
|
|
191
237
|
onEscape?: () => void;
|
|
192
238
|
onClear?: () => void;
|
|
193
239
|
onExit?: () => void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Component } from "../index.js";
|
|
2
|
+
import type { NativeNode } from "../native/node.js";
|
|
2
3
|
/** Set the process-wide editor gap layout. */
|
|
3
4
|
export declare function setEditorGapComposerShape(shape: string): void;
|
|
4
5
|
/**
|
|
@@ -15,4 +16,5 @@ export declare class EditorTopGap implements Component {
|
|
|
15
16
|
/** @param statusRowOccupied Whether the status/working row directly above rendered lines this frame. */
|
|
16
17
|
constructor(statusRowOccupied: () => boolean);
|
|
17
18
|
render(_width: number): readonly string[];
|
|
19
|
+
describe(): NativeNode;
|
|
18
20
|
}
|
|
@@ -28,6 +28,12 @@ export declare class MacOSSpellingProvider implements EditorTextAssistProvider {
|
|
|
28
28
|
setFeatures(features: MacOSSpellingFeatures): void;
|
|
29
29
|
/** Add red undercurls to misspellings while preserving visible text width. */
|
|
30
30
|
decorateTypos(text: string, context: SpellingDecorationContext, decorate?: (span: string) => string): string;
|
|
31
|
+
/**
|
|
32
|
+
* Misspelled prose ranges in `text` (offsets into it), in order and
|
|
33
|
+
* non-overlapping. Schedules the verification check for uncached text; its
|
|
34
|
+
* result arrives through {@link onUpdate}.
|
|
35
|
+
*/
|
|
36
|
+
typoRanges(text: string, context: SpellingDecorationContext): readonly native.SpellingRange[];
|
|
31
37
|
/** Return the confident macOS correction after a completed prose word. */
|
|
32
38
|
tryAutocorrect(lines: string[], cursorLine: number, cursorCol: number): Promise<EditorInlineReplacement | null>;
|
|
33
39
|
/** Return macOS replacement guesses for the misspelled word at the cursor. */
|
|
@@ -44,6 +44,15 @@ export declare function containsMagicKeyword(text: string, word: string): boolea
|
|
|
44
44
|
* to keep the static gradient.
|
|
45
45
|
*/
|
|
46
46
|
export declare function highlightMagicKeywords(text: string, resetTo?: string, phase?: number): string;
|
|
47
|
+
/**
|
|
48
|
+
* UTF-16 ranges of every registered keyword standing as prose in `text`
|
|
49
|
+
* (never inside code or XML/HTML sections), for decorating the keywords
|
|
50
|
+
* without painting them: a TSP terminal draws the gradient sweep itself.
|
|
51
|
+
*/
|
|
52
|
+
export declare function magicKeywordRanges(text: string): {
|
|
53
|
+
from: number;
|
|
54
|
+
to: number;
|
|
55
|
+
}[];
|
|
47
56
|
/**
|
|
48
57
|
* Cheap test for "does this text contain any registered keyword as standalone
|
|
49
58
|
* prose?". Short-circuits on a substring probe before paying for the
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Container } from "../tui.js";
|
|
2
|
+
import type { KeyId } from "../keys.js";
|
|
3
|
+
import type { NativeNode, NativeUiEvent } from "../native/node.js";
|
|
4
|
+
/** Queued messages under one heading ("Steering", "After yield"). */
|
|
5
|
+
export interface QueuedMessageGroup {
|
|
6
|
+
readonly label: string;
|
|
7
|
+
readonly messages: readonly string[];
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Messages queued while the agent works, above the editor. ANSI: a heading
|
|
11
|
+
* per group, numbered dim rows and the dequeue hint. Natively (§8.1): a
|
|
12
|
+
* stack of pills, each `corner-down-right` · the text · `⌥↑ Edit`, the total
|
|
13
|
+
* count in the first pill when more than one waits; the edit control sends
|
|
14
|
+
* `queue.edit`, answered like the dequeue key.
|
|
15
|
+
*/
|
|
16
|
+
export declare class QueuedMessagesBand extends Container {
|
|
17
|
+
#private;
|
|
18
|
+
private readonly onEdit;
|
|
19
|
+
constructor(groups: readonly QueuedMessageGroup[], dequeueKey: KeyId, onEdit: () => void);
|
|
20
|
+
describe(): NativeNode;
|
|
21
|
+
/** The pills' Edit control: the dequeue key's path (queued messages back into the editor). */
|
|
22
|
+
handleNativeEvent(event: NativeUiEvent): void;
|
|
23
|
+
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* One `/skill:<name>` token delimited by whitespace or line edges. Group 1 is
|
|
3
|
-
* the leading delimiter (empty at line start), group 2 the
|
|
4
|
-
*
|
|
3
|
+
* the leading delimiter (empty at line start), group 2 the skill name: a bare
|
|
4
|
+
* name or a collision-namespaced `<namespace>/<name>` (exactly one `/`; deeper
|
|
5
|
+
* paths never match). Global so callers can walk every token; reset
|
|
6
|
+
* `lastIndex` before reuse.
|
|
5
7
|
*/
|
|
6
8
|
export declare const SKILL_TOKEN_RE: RegExp;
|
|
7
9
|
/**
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DescribeContext, NativeNode, NativeUiEvent } from "../native/node.js";
|
|
1
2
|
import type { Component } from "../tui.js";
|
|
2
3
|
/**
|
|
3
4
|
* Fixed number of session rows in the welcome box so its height stays stable
|
|
@@ -17,6 +18,8 @@ export declare function renderWelcomeTip(tip: string, boxWidth: number, phase?:
|
|
|
17
18
|
export interface RecentSession {
|
|
18
19
|
name: string;
|
|
19
20
|
timeAgo: string;
|
|
21
|
+
/** Session file; a native click on the row resumes it. */
|
|
22
|
+
path?: string;
|
|
20
23
|
}
|
|
21
24
|
export interface LspServerInfo {
|
|
22
25
|
name: string;
|
|
@@ -39,6 +42,17 @@ export declare class WelcomeComponent implements Component {
|
|
|
39
42
|
lspServers?: LspServerInfo[] | null);
|
|
40
43
|
get tip(): string | undefined;
|
|
41
44
|
invalidate(): void;
|
|
45
|
+
/**
|
|
46
|
+
* A `card` (`omp.welcome`) titled with the app version. The brand column
|
|
47
|
+
* (`omp.welcome.brand`: greeting, the animated SVG mark, model, provider) sits
|
|
48
|
+
* beside the info column (`omp.welcome.info`: prompt-sigil keycaps, LSP
|
|
49
|
+
* servers, recent sessions); the tip of the session closes the card. Roles
|
|
50
|
+
* carry the look (gradient logo, type scale, column hairline); a "[NEW]" tip
|
|
51
|
+
* carries a terminal-clocked shimmering tag.
|
|
52
|
+
*/
|
|
53
|
+
describe(_cx: DescribeContext): NativeNode;
|
|
54
|
+
/** A click on a recent session resumes it. */
|
|
55
|
+
handleNativeEvent(event: NativeUiEvent): void;
|
|
42
56
|
/** The intro keeps the welcome block mutable; settling lets it retire to history. */
|
|
43
57
|
isTranscriptBlockFinalized(): boolean;
|
|
44
58
|
/**
|
|
@@ -64,6 +78,8 @@ export declare class WelcomeComponent implements Component {
|
|
|
64
78
|
}
|
|
65
79
|
/** Block-grid brand mark shared by the welcome and setup surfaces. */
|
|
66
80
|
export declare const PI_LOGO: string[];
|
|
81
|
+
/** The block-grid brand mark as accent lines; `shimmer` declares the terminal-clocked shine sweep. */
|
|
82
|
+
export declare function logoNode(lines: readonly string[], shimmer: boolean): NativeNode;
|
|
67
83
|
export interface ShineConfig {
|
|
68
84
|
/** Overall opacity of the shine overlay, in [0, 1]. */
|
|
69
85
|
strength: number;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { NativeNode } from "../native/node.js";
|
|
1
2
|
import { type Theme } from "../theme/theme.js";
|
|
2
3
|
/** Content and display limits for a code preview with optional output. */
|
|
3
4
|
export interface CodeCellOptions {
|
|
@@ -32,6 +33,15 @@ export interface CodeCellOptions {
|
|
|
32
33
|
}
|
|
33
34
|
/** Render a syntax-highlighted code preview and its optional output block. */
|
|
34
35
|
export declare function renderCodeCell(options: CodeCellOptions, theme: Theme): string[];
|
|
36
|
+
/**
|
|
37
|
+
* The native form of {@link renderCodeCell}: a collapsible `card` holding a
|
|
38
|
+
* `code` node (numbered from `codeStartLine`, or the first explicit line
|
|
39
|
+
* number) and an `ansi` output section. The collapsed code clamp is the
|
|
40
|
+
* card preview; highlighting and gutters are the terminal's.
|
|
41
|
+
*/
|
|
42
|
+
export declare function describeCodeCell(options: Omit<CodeCellOptions, "width">, theme: Theme): NativeNode;
|
|
43
|
+
/** The native form of {@link renderMarkdownCell}: a collapsible `card` holding `md` source and optional output. */
|
|
44
|
+
export declare function describeMarkdownCell(options: Omit<MarkdownCellOptions, "width">, theme: Theme): NativeNode;
|
|
35
45
|
/** Content and display limits for a Markdown preview with optional output. */
|
|
36
46
|
export interface MarkdownCellOptions {
|
|
37
47
|
content: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { NativeNode } from "../native/node.js";
|
|
1
2
|
import type { Theme } from "../theme/theme.js";
|
|
2
3
|
/** A file-list item with optional display metadata. */
|
|
3
4
|
export interface FileEntry {
|
|
@@ -18,5 +19,12 @@ export interface FileListOptions {
|
|
|
18
19
|
* optionally wrap the path in an OSC 8 hyperlink. Only invoked when {@link FileEntry.absPath} is set. */
|
|
19
20
|
hyperlinkFn?: (absPath: string, displayText: string) => string;
|
|
20
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* The native form of {@link renderFileList}: a `list` of path `item`s keyed
|
|
24
|
+
* by path, linked to their absolute path, with language/folder icons and the
|
|
25
|
+
* meta as detail. Collapsed, the list is clamped to `maxCollapsed` lines and
|
|
26
|
+
* the terminal scrolls the rest.
|
|
27
|
+
*/
|
|
28
|
+
export declare function describeFileList(options: Omit<FileListOptions, "hyperlinkFn">): NativeNode;
|
|
21
29
|
/** Render file entries as a themed tree listing. */
|
|
22
30
|
export declare function renderFileList(options: FileListOptions, theme: Theme): string[];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { TspSpan } from "@oh-my-pi/pi-wire";
|
|
1
2
|
import { type TerminalId } from "../terminal-capabilities.js";
|
|
2
3
|
/**
|
|
3
4
|
* Build the OSC 8 target for a file path on `terminalId`.
|
|
@@ -62,6 +63,19 @@ export declare function urlHyperlink(url: string, displayText: string): string;
|
|
|
62
63
|
* out by pushing the `"off"` policy.
|
|
63
64
|
*/
|
|
64
65
|
export declare function urlHyperlinkAlways(url: string, displayText: string): string;
|
|
66
|
+
/**
|
|
67
|
+
* A native link span to an HTTP(S) URL (`www.` inputs become `https://`).
|
|
68
|
+
* Unlike the OSC 8 wrappers this ignores terminal capability detection — a
|
|
69
|
+
* TSP terminal always handles `href` — but honours an explicit `off` policy.
|
|
70
|
+
* Non-HTTP(S) or unparsable URLs yield a plain span.
|
|
71
|
+
*/
|
|
72
|
+
export declare function urlLinkSpan(target: string, displayText: string, s?: string): TspSpan;
|
|
73
|
+
/**
|
|
74
|
+
* A native link span to a filesystem path as a plain `file://` URI (the
|
|
75
|
+
* terminal opens it through the system; the location stays in the visible
|
|
76
|
+
* text). Honours an explicit `off` policy.
|
|
77
|
+
*/
|
|
78
|
+
export declare function fileLinkSpan(filePath: string, displayText: string, s?: string): TspSpan;
|
|
65
79
|
/**
|
|
66
80
|
* Wrap `displayText` in an OSC 8 hyperlink pointing at a filesystem path.
|
|
67
81
|
*
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bordered output container with optional header and sections.
|
|
3
|
+
*/
|
|
4
|
+
import type { TspCardStatus, TspPreview, TspText, TspTone } from "@oh-my-pi/pi-wire";
|
|
5
|
+
import type { NativeChild, NativeNode } from "../native/node.js";
|
|
1
6
|
import type { Theme, ThemeColor } from "../theme/theme.js";
|
|
2
7
|
import type { Component } from "../tui.js";
|
|
3
8
|
import type { State } from "./types.js";
|
|
@@ -37,6 +42,44 @@ export declare function isFramedBlockComponent(component: Component): boolean;
|
|
|
37
42
|
export declare function outputBlockContentWidth(width: number, contentPaddingLeft?: number, contentPaddingRight?: number): number;
|
|
38
43
|
/** Render a bordered output block with optional header and sections. */
|
|
39
44
|
export declare function renderOutputBlock(options: OutputBlockOptions, theme: Theme): string[];
|
|
45
|
+
/** Card tone for an output state. */
|
|
46
|
+
export declare function outputStateTone(state: State | undefined): TspTone;
|
|
47
|
+
/** Card status chip for an output state. */
|
|
48
|
+
export declare function outputStateStatus(state: State | undefined): TspCardStatus | undefined;
|
|
49
|
+
/** One body section of a native output block. */
|
|
50
|
+
export interface NativeOutputBlockSection {
|
|
51
|
+
/** Titled sub-section (the ANSI path's labelled separator bar). */
|
|
52
|
+
label?: TspText;
|
|
53
|
+
body: readonly NativeChild[];
|
|
54
|
+
/** Divide from the previous section with a rule. */
|
|
55
|
+
separator?: boolean;
|
|
56
|
+
/** Stable identity when sections come and go. */
|
|
57
|
+
key?: string;
|
|
58
|
+
}
|
|
59
|
+
/** Semantic inputs for {@link describeOutputBlock}. */
|
|
60
|
+
export interface NativeOutputBlockOptions {
|
|
61
|
+
head?: TspText;
|
|
62
|
+
meta?: TspText;
|
|
63
|
+
state?: State;
|
|
64
|
+
/** Card role (`omp.tool.bash`, `omp.eval.cell`, …). Defaults to `omp.output`. */
|
|
65
|
+
role?: string;
|
|
66
|
+
/** Override the state-derived tone (the ANSI path's `borderColor`). */
|
|
67
|
+
tone?: TspTone;
|
|
68
|
+
sections?: readonly NativeOutputBlockSection[];
|
|
69
|
+
collapsible?: boolean;
|
|
70
|
+
collapsed?: boolean;
|
|
71
|
+
preview?: TspPreview;
|
|
72
|
+
/** Flat card without a ring (inline/plain variants). */
|
|
73
|
+
inset?: boolean;
|
|
74
|
+
key?: string;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* The native form of {@link renderOutputBlock}: a `card` whose tone and
|
|
78
|
+
* status chip come from the state, head from the header plus meta, and body
|
|
79
|
+
* from the sections (labelled ones as `section`s, separators as `rule`s).
|
|
80
|
+
* Borders, background fills and wrapping are the terminal's.
|
|
81
|
+
*/
|
|
82
|
+
export declare function describeOutputBlock(options: NativeOutputBlockOptions): NativeNode;
|
|
40
83
|
/**
|
|
41
84
|
* Cached wrapper around `renderOutputBlock`.
|
|
42
85
|
*
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DescribeContext, NativeNode } from "../native/node.js";
|
|
1
2
|
import type { Theme } from "../theme/theme.js";
|
|
2
3
|
import type { Component } from "../tui.js";
|
|
3
4
|
/** Which side of an output stream remains visible when the pane is capped. */
|
|
@@ -39,6 +40,20 @@ export declare function splitTerminalOutputLines(text: string): string[];
|
|
|
39
40
|
* payload is retained so terminal image protocols remain valid.
|
|
40
41
|
*/
|
|
41
42
|
export declare function formatOutputPaneLines(options: OutputPaneFormatOptions, theme: Theme): OutputPaneFormatResult;
|
|
43
|
+
/** Display policy for {@link describeOutputLines}. */
|
|
44
|
+
export interface NativeOutputOptions {
|
|
45
|
+
expanded: boolean;
|
|
46
|
+
collapsedMaxLines: number;
|
|
47
|
+
expandedMaxLines?: number;
|
|
48
|
+
edge?: OutputPaneEdge;
|
|
49
|
+
key?: string;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Raw output rows as a native `ansi` mini-terminal: the terminal wraps and
|
|
53
|
+
* styles them. The row cap becomes a `preview` clamp (with its own "N more"
|
|
54
|
+
* affordance); a tail edge follows the stream.
|
|
55
|
+
*/
|
|
56
|
+
export declare function describeOutputLines(lines: readonly string[], options: NativeOutputOptions): NativeNode;
|
|
42
57
|
/** Mutable options for a live {@link OutputPane}. */
|
|
43
58
|
export interface OutputPaneOptions extends Omit<OutputPaneFormatOptions, "lines"> {
|
|
44
59
|
paddingX?: number;
|
|
@@ -73,6 +88,8 @@ export declare class OutputPane implements Component {
|
|
|
73
88
|
get lineCount(): number;
|
|
74
89
|
get hasSixel(): boolean;
|
|
75
90
|
getText(): string;
|
|
91
|
+
/** The retained rows as an `ansi` node; streamed appends grow its text, so the reconciler sends `text append`. */
|
|
92
|
+
describe(_cx: DescribeContext): NativeNode;
|
|
76
93
|
render(width: number): readonly string[];
|
|
77
94
|
invalidate(): void;
|
|
78
95
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DescribeContext, NativeNode } from "../native/node.js";
|
|
1
2
|
import type { Theme, ThemeColor } from "../theme/theme.js";
|
|
2
3
|
import type { Component } from "../tui.js";
|
|
3
4
|
import { type StatusLineOptions } from "./status-line.js";
|
|
@@ -58,6 +59,13 @@ export declare class ToolCard implements Component {
|
|
|
58
59
|
#private;
|
|
59
60
|
constructor(theme: Theme, options: ToolCardOptions, build: (context: ToolCardBuildContext) => ToolCardSnapshot);
|
|
60
61
|
render(width: number): readonly string[];
|
|
62
|
+
/**
|
|
63
|
+
* A `card` (flat `inset` for plain cards) with the state's tone and status
|
|
64
|
+
* chip, head from the header/status line, and body slots: components as
|
|
65
|
+
* children, pre-rendered rows as unwrapped text, labelled sections as
|
|
66
|
+
* `section`s. The builder gets the surface width as its only width.
|
|
67
|
+
*/
|
|
68
|
+
describe(cx: DescribeContext): NativeNode;
|
|
61
69
|
get debugChildren(): readonly Component[];
|
|
62
70
|
get wantsKeyRelease(): boolean;
|
|
63
71
|
handleInput(data: string): void;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hierarchical tree list rendering helper.
|
|
3
3
|
*/
|
|
4
|
+
import type { NativeNode } from "../native/node.js";
|
|
4
5
|
import type { Theme } from "../theme/theme.js";
|
|
5
6
|
import type { TreeContext } from "./types.js";
|
|
6
7
|
/** Tree items and callbacks controlling their presentation. */
|
|
@@ -27,3 +28,10 @@ export interface TreeListOptions<T> {
|
|
|
27
28
|
}
|
|
28
29
|
/** Render tree items with themed branches and optional expansion. */
|
|
29
30
|
export declare function renderTreeList<T>(options: TreeListOptions<T>, theme: Theme): string[];
|
|
31
|
+
/**
|
|
32
|
+
* The native form of {@link renderTreeList}: a flat `tree` whose branch
|
|
33
|
+
* gutters are the terminal's. The collapsed item cap (and the caller's
|
|
34
|
+
* trailing summary) are kept as a muted "… N more" node; the visual line
|
|
35
|
+
* budget (`maxCollapsedLines`) is layout and is left to the terminal.
|
|
36
|
+
*/
|
|
37
|
+
export declare function describeTreeList<T>(options: TreeListOptions<T>, theme: Theme): NativeNode;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DescribeContext, NativeNode } from "../native/node.js";
|
|
1
2
|
import type { Component } from "../tui.js";
|
|
2
3
|
/**
|
|
3
4
|
* Text whose content is (re)formatted against the actual render width.
|
|
@@ -25,5 +26,11 @@ export declare class WidthAwareText implements Component {
|
|
|
25
26
|
* reformat that yields the same string skips re-wrapping and re-tinting.
|
|
26
27
|
*/
|
|
27
28
|
reformat(): void;
|
|
29
|
+
/**
|
|
30
|
+
* The inner `Text` as the only child, fed the formatter's output. The
|
|
31
|
+
* formatter is width-bound by contract, so it runs once per surface width
|
|
32
|
+
* (the only width a describer knows) and again on `reformat()`.
|
|
33
|
+
*/
|
|
34
|
+
describe(cx: DescribeContext): NativeNode;
|
|
28
35
|
render(width: number): readonly string[];
|
|
29
36
|
}
|
|
@@ -1,2 +1,9 @@
|
|
|
1
|
+
import type { NativeNode } from "../../native/node.js";
|
|
1
2
|
export declare const SETUP_OUTRO_MS = 1200;
|
|
3
|
+
/**
|
|
4
|
+
* Native outro: the shimmering mark, the saved confirmation, and an
|
|
5
|
+
* indeterminate progress bar standing in for the timed sweep. A click sends
|
|
6
|
+
* the `continue` action.
|
|
7
|
+
*/
|
|
8
|
+
export declare function describeSetupOutro(): NativeNode;
|
|
2
9
|
export declare function renderSetupOutro(width: number, height: number, elapsedMs: number): string[];
|
|
@@ -1,21 +1,28 @@
|
|
|
1
1
|
import { type SgrMouseEvent } from "../../mouse.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { NativeNode } from "../../native/node.js";
|
|
3
|
+
import type { SetupScene, SetupSceneController, SetupSceneHost } from "./types.js";
|
|
3
4
|
/**
|
|
4
|
-
* "Sign in"
|
|
5
|
-
* OAuth.
|
|
6
|
-
*
|
|
5
|
+
* "Sign in" scene: lets the user authenticate one or more model providers via
|
|
6
|
+
* OAuth. It never auto-advances the wizard — the user may sign in to several
|
|
7
|
+
* providers and then continue with Esc.
|
|
7
8
|
*/
|
|
8
|
-
export declare class
|
|
9
|
+
export declare class SignInScene implements SetupSceneController {
|
|
9
10
|
#private;
|
|
10
|
-
readonly
|
|
11
|
-
|
|
11
|
+
readonly title = "Sign in to your providers";
|
|
12
|
+
get subtitle(): string;
|
|
12
13
|
constructor(host: SetupSceneHost);
|
|
13
|
-
/** Modal while an OAuth flow is running so the scene won't switch tabs or finish. */
|
|
14
|
-
get modal(): boolean;
|
|
15
14
|
dispose(): void;
|
|
16
15
|
invalidate(): void;
|
|
17
16
|
handleInput(data: string): void;
|
|
18
17
|
/** Forward mouse to the provider selector; pointer is inert during an active login or code prompt. */
|
|
19
18
|
routeMouse(event: SgrMouseEvent, line: number, col: number): void;
|
|
20
19
|
render(width: number, maxLines?: number): readonly string[];
|
|
20
|
+
/**
|
|
21
|
+
* Picking: intro, the provider selector (describes itself) and the last
|
|
22
|
+
* outcome. Signing in: a spinner heading, the login link (with the full
|
|
23
|
+
* URL once, char-wrapped), any code prompt and the flow's progress lines.
|
|
24
|
+
*/
|
|
25
|
+
describe(): NativeNode;
|
|
21
26
|
}
|
|
27
|
+
/** Onboarding scene for provider sign-in. */
|
|
28
|
+
export declare const providersSetupScene: SetupScene;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { NativeNode } from "../../native/node.js";
|
|
1
2
|
export declare const SETUP_SPLASH_MS = 2600;
|
|
2
3
|
export declare const SETUP_TICK_MS = 33;
|
|
3
4
|
export declare function renderStarfield(width: number, height: number, frame: number): string[];
|
|
@@ -9,3 +10,10 @@ export declare function renderStarfield(width: number, height: number, frame: nu
|
|
|
9
10
|
* whole scene; the water surface drifts each frame.
|
|
10
11
|
*/
|
|
11
12
|
export declare function renderSetupSplash(width: number, height: number, elapsedMs: number): string[];
|
|
13
|
+
/**
|
|
14
|
+
* Native splash: the 2x brand mark with a terminal-clocked shimmer, the
|
|
15
|
+
* wordmark, and the skip hint pinned to the bottom. The water and starfield
|
|
16
|
+
* are cell paintings with no semantic counterpart. A click on the splash
|
|
17
|
+
* sends the `skip` action.
|
|
18
|
+
*/
|
|
19
|
+
export declare function describeSetupSplash(): NativeNode;
|
|
@@ -4,9 +4,13 @@ import type { SgrMouseEvent } from "../../mouse.js";
|
|
|
4
4
|
import type { ComposerPreviewStatusSource } from "../../overlays/composer-shape-preview.js";
|
|
5
5
|
import type { ComposerShape } from "../../overlays/composer-shape-registry.js";
|
|
6
6
|
import type { ModelBrowserSource } from "../../overlays/model-browser.js";
|
|
7
|
-
import type { SymbolPreset } from "../../theme/theme.js";
|
|
8
|
-
import type { SearchProviderId } from "../../tools/web-search.js";
|
|
7
|
+
import type { SymbolPreset, ThemeColor } from "../../theme/theme.js";
|
|
9
8
|
import type { Component, TUI } from "../../tui.js";
|
|
9
|
+
/** One line of status copy kept as raw text plus its theme colour, never as pre-styled ANSI. */
|
|
10
|
+
export interface StyledLine {
|
|
11
|
+
readonly text: string;
|
|
12
|
+
readonly color: ThemeColor;
|
|
13
|
+
}
|
|
10
14
|
/** Terminal capabilities used by setup overlays and the startup splash. */
|
|
11
15
|
export interface SetupUiHost {
|
|
12
16
|
readonly ui: Pick<TUI, "showOverlay" | "setFocus" | "requestRender" | "invalidate"> & {
|
|
@@ -21,7 +25,6 @@ export interface SetupHost extends SetupUiHost {
|
|
|
21
25
|
readonly composerShape: ComposerShape;
|
|
22
26
|
readonly symbolPreset: SymbolPreset;
|
|
23
27
|
readonly colorBlindMode: boolean;
|
|
24
|
-
readonly webSearchOrder: readonly string[];
|
|
25
28
|
readonly disabledProviders: readonly string[];
|
|
26
29
|
readonly authStorage: AuthStorage;
|
|
27
30
|
readonly modelSource: ModelBrowserSource;
|
|
@@ -37,8 +40,6 @@ export interface SetupHost extends SetupUiHost {
|
|
|
37
40
|
saveSymbolPreset(preset: SymbolPreset): void;
|
|
38
41
|
saveColorBlindMode(enabled: boolean): void;
|
|
39
42
|
saveTheme(mode: "dark" | "light", name: string): void;
|
|
40
|
-
isSearchProviderAvailable(id: SearchProviderId): Promise<boolean>;
|
|
41
|
-
saveSearchProvider(id: SearchProviderId | "auto"): void;
|
|
42
43
|
captureBrowserSession(request: OAuthBrowserSessionRequest, signal?: AbortSignal): Promise<string>;
|
|
43
44
|
copyToClipboard(text: string): Promise<void>;
|
|
44
45
|
openInBrowser(url: string): void;
|
|
@@ -78,28 +79,6 @@ export interface SetupSceneController extends Component {
|
|
|
78
79
|
*/
|
|
79
80
|
routeMouse?(event: SgrMouseEvent, line: number, col: number): void;
|
|
80
81
|
}
|
|
81
|
-
/**
|
|
82
|
-
* A single panel inside a tabbed setup scene. The host scene owns the tab bar
|
|
83
|
-
* and forwards rendering/input to the active tab.
|
|
84
|
-
*/
|
|
85
|
-
export interface SetupTab {
|
|
86
|
-
readonly id: string;
|
|
87
|
-
readonly label: string;
|
|
88
|
-
/**
|
|
89
|
-
* While `true` the tab owns all keyboard input (e.g. an in-progress OAuth
|
|
90
|
-
* login). The parent scene MUST NOT switch tabs or finish while modal.
|
|
91
|
-
*/
|
|
92
|
-
readonly modal: boolean;
|
|
93
|
-
/** See {@link SetupSceneController.render}: `maxLines` is the tab-local row budget. */
|
|
94
|
-
render(width: number, maxLines?: number): readonly string[];
|
|
95
|
-
handleInput(data: string): void;
|
|
96
|
-
invalidate(): void;
|
|
97
|
-
/** Called when the tab becomes active (including initial mount). */
|
|
98
|
-
onActivate?(): void;
|
|
99
|
-
/** Mouse routing at tab-local coordinates; see {@link SetupSceneController.routeMouse}. */
|
|
100
|
-
routeMouse?(event: SgrMouseEvent, line: number, col: number): void;
|
|
101
|
-
dispose(): void;
|
|
102
|
-
}
|
|
103
82
|
/** Versioned onboarding scene definition. */
|
|
104
83
|
export interface SetupScene {
|
|
105
84
|
id: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type Component, type OverlayFocusOwner } from "../tui.js";
|
|
2
|
+
import type { NativeNode, NativeUiEvent } from "../native/node.js";
|
|
2
3
|
import type { SetupHost } from "./scenes/types.js";
|
|
3
4
|
import type { SetupScene } from "./scenes/types.js";
|
|
4
5
|
/** Fullscreen onboarding presentation with scene focus and mouse routing. */
|
|
@@ -13,4 +14,12 @@ export declare class SetupWizardComponent implements Component, OverlayFocusOwne
|
|
|
13
14
|
ownsOverlayFocusTarget(component: Component): boolean;
|
|
14
15
|
handleInput(data: string): void;
|
|
15
16
|
render(width: number): readonly string[];
|
|
17
|
+
/**
|
|
18
|
+
* Fullscreen description: splash, the active scene inside the wizard
|
|
19
|
+
* frame (brand header, step counter, title, footer hints), or the outro.
|
|
20
|
+
* The splash→scene dissolve is a row effect with no native counterpart, so
|
|
21
|
+
* a transition describes as the scene.
|
|
22
|
+
*/
|
|
23
|
+
describe(): NativeNode;
|
|
24
|
+
handleNativeEvent(event: NativeUiEvent): void;
|
|
16
25
|
}
|
|
@@ -3,8 +3,21 @@ import type { StatusLineHost, StatusLineSession } from "./host.js";
|
|
|
3
3
|
import type { Editor } from "../components/editor.js";
|
|
4
4
|
import { type CodexResetFireworksEvent } from "../overlays/codex-reset-fireworks.js";
|
|
5
5
|
import { type SegmentContext } from "./segments.js";
|
|
6
|
-
import type {
|
|
7
|
-
|
|
6
|
+
import type { NativeNode, NativeUiEvent } from "../native/node.js";
|
|
7
|
+
import type { CollabStatus, ComposerFacts, ComposerFactsSource, EffectiveStatusLineSettings, StatusLineSettings } from "./types.js";
|
|
8
|
+
/** What a click on a native status segment asks omp to open. */
|
|
9
|
+
export type StatusLineNativeAction = "status.model" | "status.context" | "status.git" | "status.cost" | "status.path";
|
|
10
|
+
/** Pull request the native tab title carries. */
|
|
11
|
+
export interface StatusLinePullRequest {
|
|
12
|
+
readonly number: number;
|
|
13
|
+
readonly url: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Drop priority of a configured segment: the outer edges matter most, so the
|
|
17
|
+
* leftmost left segment and the rightmost right segment stay longest.
|
|
18
|
+
*/
|
|
19
|
+
export declare function statusSegmentPriority(side: "left" | "right", index: number, count: number): number;
|
|
20
|
+
export declare class StatusLineComponent<TSession extends StatusLineSession = StatusLineSession> implements Component, ComposerFactsSource {
|
|
8
21
|
#private;
|
|
9
22
|
private session;
|
|
10
23
|
private readonly host;
|
|
@@ -25,6 +38,12 @@ export declare class StatusLineComponent<TSession extends StatusLineSession = St
|
|
|
25
38
|
setSubagentHubHint(_hint: string | undefined): void;
|
|
26
39
|
/** Active subagent count as currently displayed (collab state mirroring). */
|
|
27
40
|
get subagentCount(): number;
|
|
41
|
+
/**
|
|
42
|
+
* Running background jobs outside the subagent badge. Task jobs count only
|
|
43
|
+
* until their AgentRegistry ref appears; once it is running, the subagent
|
|
44
|
+
* badge represents that same agent. Bash and eval jobs always count.
|
|
45
|
+
*/
|
|
46
|
+
runningBackgroundJobCount(): number;
|
|
28
47
|
/**
|
|
29
48
|
* Reset the currently-attached session's active-time accumulators so
|
|
30
49
|
* the `time_spent` segment starts from zero. Called from `/clear`,
|
|
@@ -141,10 +160,13 @@ export declare class StatusLineComponent<TSession extends StatusLineSession = St
|
|
|
141
160
|
};
|
|
142
161
|
/**
|
|
143
162
|
* Wire this bar into `editor` for a composer layout: the matching top-border
|
|
144
|
-
* provider, the autocomplete probe,
|
|
145
|
-
* Callers re-run it whenever the composer shape
|
|
163
|
+
* provider, the autocomplete probe, the standalone bottom-bar placement, and
|
|
164
|
+
* the native composer's facts. Callers re-run it whenever the composer shape
|
|
165
|
+
* changes.
|
|
146
166
|
*/
|
|
147
|
-
attachToEditor(editor: Pick<Editor, "isAutocompleteActive" | "setTopBorderProvider" | "setTopBorder"
|
|
167
|
+
attachToEditor(editor: Pick<Editor, "isAutocompleteActive" | "setTopBorderProvider" | "setTopBorder"> & {
|
|
168
|
+
composerFacts: ComposerFactsSource | undefined;
|
|
169
|
+
}, style: Pick<ComposerStyle, "statusAttachment" | "bottomBar" | "bottomBarGap">): void;
|
|
148
170
|
getTopBorder(width: number, previewTitle?: string): {
|
|
149
171
|
content: string;
|
|
150
172
|
width: number;
|
|
@@ -189,5 +211,27 @@ export declare class StatusLineComponent<TSession extends StatusLineSession = St
|
|
|
189
211
|
* render.
|
|
190
212
|
*/
|
|
191
213
|
getPreviewLines(width: number, style?: Pick<ComposerStyle, "statusAttachment" | "bottomBar">): string[];
|
|
214
|
+
/**
|
|
215
|
+
* The composer's facts on a TSP terminal, which draws no status strip: the
|
|
216
|
+
* context hairline, the model chip label, the usage text, and every other
|
|
217
|
+
* configured segment as a `seg` in configured order with its drop priority.
|
|
218
|
+
* Returns the same object while nothing changed.
|
|
219
|
+
*/
|
|
220
|
+
describeComposerFacts(): ComposerFacts;
|
|
221
|
+
/**
|
|
222
|
+
* Native status bar for the /settings appearance preview: a `status` of
|
|
223
|
+
* `seg`s in configured order, each with its side and a drop priority from
|
|
224
|
+
* that order, plus hook-status rows.
|
|
225
|
+
*/
|
|
226
|
+
describePreview(): NativeNode;
|
|
227
|
+
/**
|
|
228
|
+
* Called with the branch's pull request (undefined when there is none) each
|
|
229
|
+
* time it changes while the composer facts are described; the native tab
|
|
230
|
+
* title carries it. Looked up only when the `pr` segment is configured.
|
|
231
|
+
*/
|
|
232
|
+
onNativePullRequest: ((pr: StatusLinePullRequest | undefined) => void) | undefined;
|
|
233
|
+
/** The host's handler for clicks on native segments ({@link NATIVE_SEGMENT_ACTIONS}). */
|
|
234
|
+
onNativeAction: ((action: StatusLineNativeAction) => void) | undefined;
|
|
235
|
+
handleNativeEvent(event: NativeUiEvent): void;
|
|
192
236
|
render(width: number): readonly string[];
|
|
193
237
|
}
|