@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,4 +1,5 @@
|
|
|
1
1
|
import { Container } from "../index.js";
|
|
2
|
+
import type { NativeNode, NativeUiEvent } from "../native/node.js";
|
|
2
3
|
/**
|
|
3
4
|
* A persistent error banner pinned above the editor. Unlike the transcript
|
|
4
5
|
* "Error: …" line (which scrolls away as the conversation grows), this stays in
|
|
@@ -9,5 +10,13 @@ import { Container } from "../index.js";
|
|
|
9
10
|
* overflow row reveals the full body inline in the transcript.
|
|
10
11
|
*/
|
|
11
12
|
export declare class ErrorBannerComponent extends Container {
|
|
13
|
+
#private;
|
|
12
14
|
constructor(message: string);
|
|
15
|
+
/**
|
|
16
|
+
* An error-tinted strip pinned above the composer: the message's first line
|
|
17
|
+
* (the transcript's error frame keeps the full message and its actions)
|
|
18
|
+
* and a Details button that unfolds the rest here.
|
|
19
|
+
*/
|
|
20
|
+
describe(): NativeNode;
|
|
21
|
+
handleNativeEvent(event: NativeUiEvent): void;
|
|
13
22
|
}
|
|
@@ -33,6 +33,7 @@ export declare class ExtensionList implements Component {
|
|
|
33
33
|
getSelectedExtension(): Extension | null;
|
|
34
34
|
/** Get the currently selected kind header (for preview purposes) */
|
|
35
35
|
getSelectedKind(): ExtensionKind | null;
|
|
36
|
+
/** Replace the search text (caret to end) and refilter. */
|
|
36
37
|
setSearchQuery(query: string): void;
|
|
37
38
|
clearSearch(): void;
|
|
38
39
|
invalidate(): void;
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
export interface HistorySearchEntry {
|
|
3
3
|
prompt: string;
|
|
4
4
|
created_at: number;
|
|
5
|
+
/** Project folder the prompt was typed in. */
|
|
6
|
+
cwd?: string;
|
|
5
7
|
}
|
|
6
8
|
/** Searchable prompt history supplied by the host. */
|
|
7
9
|
export interface HistorySource {
|
|
@@ -9,8 +11,24 @@ export interface HistorySource {
|
|
|
9
11
|
getRecent(limit: number): HistorySearchEntry[];
|
|
10
12
|
}
|
|
11
13
|
import { OverlayPanel } from "../chrome/overlay-box.js";
|
|
14
|
+
import type { DescribeContext, NativeNode, NativeUiEvent } from "../native/node.js";
|
|
12
15
|
export declare class HistorySearchComponent extends OverlayPanel {
|
|
13
16
|
#private;
|
|
14
17
|
constructor(historyStorage: HistorySource, onSelect: (prompt: string) => void, onCancel: () => void);
|
|
15
18
|
handleInput(keyData: string): void;
|
|
19
|
+
/**
|
|
20
|
+
* With the `picker` kind: a `size:"md"` sheet of past prompts (first line
|
|
21
|
+
* with hits, age, folder) as a keyed child the reconciler hoists into
|
|
22
|
+
* `layer`, since the selector replaces the editor in the dock. Otherwise
|
|
23
|
+
* the query field (the `Input`, which describes itself as `input`), the
|
|
24
|
+
* results as a `list` keyed by entry (filter = query, age as the item
|
|
25
|
+
* value), and the key hints.
|
|
26
|
+
*/
|
|
27
|
+
describe(cx: DescribeContext): NativeNode;
|
|
28
|
+
/**
|
|
29
|
+
* Picker: a row click highlights, a second click or `Insert` inserts it
|
|
30
|
+
* (Enter), `Close` cancels (Esc), `Clear search` empties the query.
|
|
31
|
+
* List: picking a result does what highlighting it and pressing Enter does.
|
|
32
|
+
*/
|
|
33
|
+
handleNativeEvent(event: NativeUiEvent): void;
|
|
16
34
|
}
|
|
@@ -7,13 +7,31 @@
|
|
|
7
7
|
* (Ctrl+Q / Ctrl+Enter) submits, bordered popup
|
|
8
8
|
* - Prompt-style (ask): Enter submits, Shift+Enter inserts newline, legacy ask chrome
|
|
9
9
|
*/
|
|
10
|
+
import type { ImageContent } from "@oh-my-pi/pi-ai";
|
|
10
11
|
import { type Focusable, type TUI } from "../index.js";
|
|
11
12
|
import { OverlayPanel } from "../chrome/overlay-box.js";
|
|
13
|
+
import type { DescribeContext, NativeNode } from "../native/node.js";
|
|
12
14
|
export interface HookEditorOptions {
|
|
13
15
|
/** Edit text with the host's configured external editor. */
|
|
14
16
|
externalEditor?: (text: string) => Promise<string | null>;
|
|
15
17
|
/** When true, use prompt-style keybindings with the legacy ask prompt chrome. */
|
|
16
18
|
promptStyle?: boolean;
|
|
19
|
+
/** Allow clipboard images to be attached to this prompt. */
|
|
20
|
+
acceptImages?: boolean;
|
|
21
|
+
/** Images already represented by markers in the prefilled text. */
|
|
22
|
+
images?: readonly ImageContent[];
|
|
23
|
+
/**
|
|
24
|
+
* With `acceptImages`, called for an empty bracketed paste, which is how terminals that own
|
|
25
|
+
* the paste key send an image-only clipboard (#3601). Same signature as
|
|
26
|
+
* `CustomEditor.onPasteImage`; the host calls `beginPaste` before its first await.
|
|
27
|
+
*/
|
|
28
|
+
onPasteImage?: () => Promise<boolean>;
|
|
29
|
+
/**
|
|
30
|
+
* With `acceptImages`, called for each path of a bracketed paste made only of image paths.
|
|
31
|
+
* Same signature as `CustomEditor.onPasteImagePath`; calls are not awaited in turn, so images
|
|
32
|
+
* attach as they finish loading and are renumbered in text order on submit.
|
|
33
|
+
*/
|
|
34
|
+
onPasteImagePath?: (path: string) => void | Promise<void>;
|
|
17
35
|
/**
|
|
18
36
|
* Max rows the inner Editor may occupy. When omitted, the editor is
|
|
19
37
|
* bounded to the current terminal height minus the component's chrome
|
|
@@ -27,12 +45,21 @@ export declare class HookEditorComponent extends OverlayPanel implements Focusab
|
|
|
27
45
|
#private;
|
|
28
46
|
/** Focus state mirrored to the nested editor during rendering. */
|
|
29
47
|
focused: boolean;
|
|
30
|
-
constructor(tui: TUI, title: string, prefill: string | undefined, onSubmit: (value: string) => void, onCancel: () => void, options?: HookEditorOptions);
|
|
48
|
+
constructor(tui: TUI, title: string, prefill: string | undefined, onSubmit: (value: string, images?: ImageContent[]) => void, onCancel: () => void, options?: HookEditorOptions);
|
|
49
|
+
/** The editor (which describes itself) under the title and detail lines, with the key hints below. */
|
|
50
|
+
describe(_cx: DescribeContext): NativeNode;
|
|
31
51
|
/** Keep the nested editor's software/hardware cursor mode aligned with the dialog focus target. */
|
|
32
52
|
setUseTerminalCursor(useTerminalCursor: boolean): void;
|
|
33
53
|
/** Render the dialog after forwarding its focus state to the nested editor. */
|
|
34
54
|
render(width: number): readonly string[];
|
|
35
55
|
handleInput(keyData: string): void;
|
|
56
|
+
/** Whether this prompt opted into clipboard image attachments. */
|
|
57
|
+
get acceptsImages(): boolean;
|
|
58
|
+
/** Attach an image; returns its `[Image #N, WxH]` marker for the caller to deliver. */
|
|
59
|
+
attachImage(image: ImageContent, dims?: {
|
|
60
|
+
width: number;
|
|
61
|
+
height: number;
|
|
62
|
+
}): string | undefined;
|
|
36
63
|
/** Reserve ordered clipboard delivery. Completion accepts nonempty text once, or releases on undefined. */
|
|
37
64
|
beginPaste(): (text: string | undefined) => boolean;
|
|
38
65
|
dispose(): void;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { type TUI } from "../index.js";
|
|
5
5
|
import { OverlayPanel } from "../chrome/overlay-box.js";
|
|
6
|
+
import type { DescribeContext, NativeNode } from "../native/node.js";
|
|
6
7
|
export interface HookInputOptions {
|
|
7
8
|
tui?: TUI;
|
|
8
9
|
timeout?: number;
|
|
@@ -17,4 +18,6 @@ export declare class HookInputComponent extends OverlayPanel {
|
|
|
17
18
|
* interaction, so the timeout countdown resets like any keystroke. */
|
|
18
19
|
pasteText(text: string): void;
|
|
19
20
|
dispose(): void;
|
|
21
|
+
/** A card over the form, headed by the title plus the countdown `elapsed` while a timeout runs. */
|
|
22
|
+
describe(_cx: DescribeContext): NativeNode;
|
|
20
23
|
}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { type TUI } from "../index.js";
|
|
6
6
|
import { OverlayPanel } from "../chrome/overlay-box.js";
|
|
7
|
+
import type { DescribeContext, NativeNode, NativeUiEvent } from "../native/node.js";
|
|
7
8
|
/** One segment of a {@link HookSelectorSlider} — a label and an optional
|
|
8
9
|
* detail line (e.g. the resolved model name) shown beneath the track while
|
|
9
10
|
* the segment is active. Segment colors come from the track's theme palette,
|
|
@@ -68,4 +69,13 @@ export declare class HookSelectorComponent extends OverlayPanel {
|
|
|
68
69
|
handleInput(keyData: string): void;
|
|
69
70
|
render(width: number): readonly string[];
|
|
70
71
|
dispose(): void;
|
|
72
|
+
/**
|
|
73
|
+
* A plain option list is a picker sheet. Otherwise a card headed by the
|
|
74
|
+
* title (plus the countdown `elapsed` when a timeout runs), the extra title
|
|
75
|
+
* lines, the slider as `tabs`, the options as a `list` keyed by original
|
|
76
|
+
* option index, the search query while typing, and the key hints.
|
|
77
|
+
*/
|
|
78
|
+
describe(cx: DescribeContext): NativeNode;
|
|
79
|
+
/** Pointer pick of an option does what highlighting it and pressing Enter does; a tab pick moves the slider. */
|
|
80
|
+
handleNativeEvent(event: NativeUiEvent): void;
|
|
71
81
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { TspText } from "@oh-my-pi/pi-wire";
|
|
2
|
+
import type { NativeChild, NativeNode } from "../native/node.js";
|
|
1
3
|
/** A scope row shared by fullscreen hubs, with hub-specific kinds and metadata. */
|
|
2
4
|
export interface SidebarEntry<TKind extends string> {
|
|
3
5
|
id: string;
|
|
@@ -32,6 +34,22 @@ export interface SidebarStyle {
|
|
|
32
34
|
}
|
|
33
35
|
/** Cycle a strip's selection for directional and tab input, returning whether it handled the key. */
|
|
34
36
|
export declare function moveStripSelection(strip: StripState<StripChip<unknown>>, data: string): boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Native sidebar: a `list` whose `item`s are keyed by entry id (the `item` of
|
|
39
|
+
* `select`/`activate` events), separators as `rule`s. Scrolling and clipping
|
|
40
|
+
* are the terminal's; `style` supplies icon, annotation and muting.
|
|
41
|
+
*/
|
|
42
|
+
export declare function describeHubSidebar<TEntry extends SidebarEntry<string>>(entries: readonly TEntry[], selectedId: string, style: (entry: TEntry, index: number) => Pick<SidebarStyle, "icon" | "annotation" | "muted">, key?: string): NativeNode;
|
|
43
|
+
/**
|
|
44
|
+
* Native footer chip strip: a `tabs` node whose tab ids are the chip indices
|
|
45
|
+
* (`select` events carry the index as `item`), with an optional prefix label.
|
|
46
|
+
*/
|
|
47
|
+
export declare function describeHubChips(strip: StripState<StripChip<unknown>>, prefix?: TspText, key?: string): NativeNode;
|
|
48
|
+
/**
|
|
49
|
+
* Native fullscreen hub: a root card titled `title` over a sidebar/body row and
|
|
50
|
+
* a footer. The split geometry, ring and dividers are the terminal's.
|
|
51
|
+
*/
|
|
52
|
+
export declare function describeHubFrame(role: string, title: TspText, sidebar: NativeChild, body: NativeChild, footer: NativeChild): NativeNode;
|
|
35
53
|
/** Persistent fullscreen split frame, sidebar viewport, and footer chip renderer. */
|
|
36
54
|
export declare class HubFrame {
|
|
37
55
|
#private;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type Component, Container } from "../tui.js";
|
|
2
|
+
import type { DescribeContext, NativeNode } from "../native/node.js";
|
|
3
|
+
/** One async job as the session snapshots it. */
|
|
4
|
+
export interface JobsPanelJob {
|
|
5
|
+
readonly id: string;
|
|
6
|
+
readonly type: string;
|
|
7
|
+
readonly status: "running" | "completed" | "failed" | "cancelled";
|
|
8
|
+
readonly label: string;
|
|
9
|
+
readonly startTime: number;
|
|
10
|
+
readonly endTime?: number;
|
|
11
|
+
/** Registry id of the subagent a task job runs. */
|
|
12
|
+
readonly agentId?: string;
|
|
13
|
+
}
|
|
14
|
+
/** Running and recently settled jobs. */
|
|
15
|
+
export interface JobsPanelSnapshot {
|
|
16
|
+
readonly running: readonly JobsPanelJob[];
|
|
17
|
+
readonly recent: readonly JobsPanelJob[];
|
|
18
|
+
}
|
|
19
|
+
/** The `/jobs` block: `ansi` renders in the terminal, the snapshot describes the native frame. */
|
|
20
|
+
export declare class JobsPanel extends Container {
|
|
21
|
+
#private;
|
|
22
|
+
constructor(snapshot: JobsPanelSnapshot, nowMs: number, ansi: readonly Component[]);
|
|
23
|
+
describe(cx: DescribeContext): NativeNode;
|
|
24
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { OAuthPrompt } from "@oh-my-pi/pi-ai/oauth/types";
|
|
2
2
|
import { type TUI } from "../index.js";
|
|
3
3
|
import { OverlayPanel } from "../chrome/overlay-box.js";
|
|
4
|
+
import type { NativeNode, NativeUiEvent } from "../native/node.js";
|
|
4
5
|
/**
|
|
5
6
|
* Login dialog component - replaces editor during OAuth login flow
|
|
6
7
|
*/
|
|
@@ -37,6 +38,15 @@ export declare class LoginDialogComponent extends OverlayPanel {
|
|
|
37
38
|
* Called by onProgress callback
|
|
38
39
|
*/
|
|
39
40
|
showProgress(message: string): void;
|
|
41
|
+
/**
|
|
42
|
+
* A glass sheet over the composer (the dialog replaces the editor in the
|
|
43
|
+
* dock; the `overlay` hoists into the terminal's layer): numbered steps —
|
|
44
|
+
* open or copy the sign-in link, the device code, the live wait, the paste
|
|
45
|
+
* field — and Cancel.
|
|
46
|
+
*/
|
|
47
|
+
describe(): NativeNode;
|
|
48
|
+
/** Cancel and Continue run what Esc and Enter run. */
|
|
49
|
+
handleNativeEvent(event: NativeUiEvent): void;
|
|
40
50
|
/** Route non-bracketed paste transports into the active login input. */
|
|
41
51
|
pasteText(text: string): void;
|
|
42
52
|
handleInput(data: string): void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { OverlayPanel } from "../chrome/overlay-box.js";
|
|
2
|
+
import type { DescribeContext, NativeNode, NativeUiEvent } from "../native/node.js";
|
|
2
3
|
export interface LogoutAccount {
|
|
3
4
|
credentialId: number;
|
|
4
5
|
provider: string;
|
|
@@ -12,4 +13,7 @@ export declare class LogoutAccountSelectorComponent extends OverlayPanel {
|
|
|
12
13
|
#private;
|
|
13
14
|
constructor(providerName: string, accounts: LogoutAccount[], onSelect: (account: LogoutAccount) => void, onCancel: () => void);
|
|
14
15
|
handleInput(keyData: string): void;
|
|
16
|
+
describe(cx: DescribeContext): NativeNode;
|
|
17
|
+
/** A click (or double-click) on an account highlights it and logs it out, like Enter. */
|
|
18
|
+
handleNativeEvent(event: NativeUiEvent): void;
|
|
15
19
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { OverlayPanel } from "../chrome/overlay-box.js";
|
|
2
|
+
import { type DescribeContext, type NativeNode, type NativeUiEvent } from "../native/node.js";
|
|
2
3
|
type Scope = "user" | "project";
|
|
3
4
|
/** Authentication fields produced by the wizard. */
|
|
4
5
|
interface MCPAddWizardAuth {
|
|
@@ -82,6 +83,9 @@ interface MCPAddWizardOAuthOptions {
|
|
|
82
83
|
export declare class MCPAddWizard extends OverlayPanel {
|
|
83
84
|
#private;
|
|
84
85
|
constructor(deps: MCPAddWizardDeps, onComplete: (name: string, config: MCPAddWizardConfig, scope: Scope) => void, onCancel: () => void, onOAuth?: (authUrl: string, tokenUrl: string, clientId: string, clientSecret: string, scopes: string, options?: MCPAddWizardOAuthOptions) => Promise<MCPAddWizardOAuthResult>, onTestConnection?: (config: MCPAddWizardConfig) => Promise<void>, onRender?: () => void, initialName?: string);
|
|
86
|
+
describe(_cx: DescribeContext): NativeNode;
|
|
87
|
+
/** A click on a choice is Enter on it, exactly as highlighting it with the arrows and pressing Enter. */
|
|
88
|
+
handleNativeEvent(event: NativeUiEvent): void;
|
|
85
89
|
handleInput(keyData: string): void;
|
|
86
90
|
}
|
|
87
91
|
export {};
|
|
@@ -4,6 +4,8 @@ import type { Component } from "../tui.js";
|
|
|
4
4
|
import type { SgrMouseEvent } from "../mouse.js";
|
|
5
5
|
import { type ConfiguredThinkingLevel } from "../thinking.js";
|
|
6
6
|
import { type ThemeColor } from "../theme/theme.js";
|
|
7
|
+
import type { TspPickerColumn, TspPickerGroup, TspPickerItem } from "@oh-my-pi/pi-wire";
|
|
8
|
+
import type { NativeChild, NativeNode, NativeUiEvent } from "../native/node.js";
|
|
7
9
|
/** Canonical display ordering of built-in model roles. */
|
|
8
10
|
export type ModelRole = "default" | "smol" | "slow" | "vision" | "plan" | "commit" | "tiny" | "memory" | "task" | "advisor" | "image" | "web" | "speech" | "dictation" | "judge";
|
|
9
11
|
export declare const MODEL_ROLE_IDS: ModelRole[];
|
|
@@ -151,6 +153,10 @@ export declare function rankModelItems(query: string, items: ReadonlyArray<Model
|
|
|
151
153
|
* Mirrors the spacing already used for `status.success` in model-hub.
|
|
152
154
|
*/
|
|
153
155
|
export declare function formatRoleChip(role: string, assignment: RoleAssignment, settings: ModelBrowserSource): string;
|
|
156
|
+
/** Fact columns of a model picker (Stencil `NATIVE_REDESIGN.md` §4.7); the lowest priority hides first. */
|
|
157
|
+
export declare const MODEL_PICKER_COLUMNS: readonly TspPickerColumn[];
|
|
158
|
+
/** The omp theme token of a thinking level's dot (`thinkingHigh`); none for inherit and auto. */
|
|
159
|
+
export declare function thinkingDotToken(level: ConfiguredThinkingLevel): string | undefined;
|
|
154
160
|
/**
|
|
155
161
|
* The fuzzy haystack for a model row: the displayed `provider/id`, plus `free`
|
|
156
162
|
* for zero-cost models so the cost column's own word is searchable even when
|
|
@@ -161,6 +167,30 @@ export declare function formatRoleChip(role: string, assignment: RoleAssignment,
|
|
|
161
167
|
* past its cap, so a query-dependent haystack would thrash that cache.
|
|
162
168
|
*/
|
|
163
169
|
export declare function modelSearchText({ provider, id, model }: ModelBrowserItem): string;
|
|
170
|
+
/** A model browser's visible rows as picker `order` plus the query's hit ranges. */
|
|
171
|
+
export interface ModelPickerOrder {
|
|
172
|
+
readonly order: readonly (string | TspPickerGroup)[];
|
|
173
|
+
readonly hits: Readonly<Record<string, readonly (readonly [number, number])[]>> | undefined;
|
|
174
|
+
/** Selectable rows in `order`. */
|
|
175
|
+
readonly count: number;
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* A model picker's catalogue props: `items` as last sent whole, plus the
|
|
179
|
+
* rows changed or added since (`itemsAdd`) and the ids gone (`itemsDel`), so
|
|
180
|
+
* a discovery refresh that touches a few rows does not resend a thousand.
|
|
181
|
+
*/
|
|
182
|
+
export interface ModelPickerCatalogue {
|
|
183
|
+
readonly items: readonly TspPickerItem[];
|
|
184
|
+
readonly itemsAdd?: readonly TspPickerItem[];
|
|
185
|
+
readonly itemsDel?: readonly string[];
|
|
186
|
+
}
|
|
187
|
+
/** How {@link ModelBrowser.pickerOrder} heads its rows. */
|
|
188
|
+
export interface ModelPickerGrouping {
|
|
189
|
+
/** One group per provider after the Recent block (the unfiltered All models view). */
|
|
190
|
+
readonly providers: boolean;
|
|
191
|
+
/** Label of the rows after the Recent block when they are not split by provider; null drops every head. */
|
|
192
|
+
readonly rest: string | null;
|
|
193
|
+
}
|
|
164
194
|
/** Behavior switches for {@link ModelBrowser}. */
|
|
165
195
|
export interface ModelBrowserOptions {
|
|
166
196
|
/** Render the dim `provider/` prefix before model ids. Default true. */
|
|
@@ -205,6 +235,8 @@ export declare class ModelBrowser implements Component {
|
|
|
205
235
|
/** Total rendered height for the current `maxVisible` (host layout budgeting). */
|
|
206
236
|
get renderedRows(): number;
|
|
207
237
|
get query(): string;
|
|
238
|
+
/** Caret into {@link query} (UTF-16 offset), for native picker `cursor`. */
|
|
239
|
+
get cursor(): number;
|
|
208
240
|
setQuery(query: string): void;
|
|
209
241
|
getSelected(): ModelBrowserItem | undefined;
|
|
210
242
|
get visibleCount(): number;
|
|
@@ -231,4 +263,41 @@ export declare class ModelBrowser implements Component {
|
|
|
231
263
|
clearHover(): void;
|
|
232
264
|
render(width: number): string[];
|
|
233
265
|
invalidate(): void;
|
|
266
|
+
/**
|
|
267
|
+
* `col[search row, list, detail]`: the query field (the embedded `Input`),
|
|
268
|
+
* every visible model as a keyed `item` (the terminal virtualizes and
|
|
269
|
+
* scrolls), and the selection's facts and role chips.
|
|
270
|
+
*/
|
|
271
|
+
describe(): NativeNode;
|
|
272
|
+
/** List `select`/`activate` on a model = highlight it, then Enter. */
|
|
273
|
+
handleNativeEvent(event: NativeUiEvent): void;
|
|
274
|
+
/** Base rows of the current scope, before the query (the head's "of N"). */
|
|
275
|
+
get baseCount(): number;
|
|
276
|
+
/** The selected row's selector, null when nothing selectable is selected. */
|
|
277
|
+
get pickerSelected(): string | null;
|
|
278
|
+
/**
|
|
279
|
+
* Picker rows for `catalogue`: the same object while the catalogue, roles
|
|
280
|
+
* and row inputs are unchanged, so typing and scope hops never resend it.
|
|
281
|
+
* A rebuilt catalogue that differs in a few rows (a provider refresh, a
|
|
282
|
+
* role moving) keeps the last whole `items` and patches it.
|
|
283
|
+
*/
|
|
284
|
+
pickerItems(catalogue: readonly ModelBrowserItem[]): ModelPickerCatalogue;
|
|
285
|
+
/**
|
|
286
|
+
* The visible rows as picker `order`: the Recent block (recent and
|
|
287
|
+
* role-assigned models, the ANSI separator's upper side) under "Recent",
|
|
288
|
+
* then the rest per provider or under `grouping.rest`. Memoized per
|
|
289
|
+
* result list and query, so selection moves reuse it.
|
|
290
|
+
*/
|
|
291
|
+
pickerOrder(grouping: ModelPickerGrouping): ModelPickerOrder;
|
|
292
|
+
/**
|
|
293
|
+
* Preview children for the selection. `full` (the model hub's side pane):
|
|
294
|
+
* title, copyable id, badges, a fact grid, every role the model can fill
|
|
295
|
+
* (held ones on) and the description. `compact` (the quick picker's strip
|
|
296
|
+
* below the list): one inline fact line and the held-role chips.
|
|
297
|
+
*/
|
|
298
|
+
pickerPreview(mode: "full" | "compact", current?: string): readonly NativeChild[];
|
|
299
|
+
/** Preview children for any model row (the hub's Roles view previews assigned models with it); unmemoized. */
|
|
300
|
+
modelPreview(item: ModelBrowserItem, mode: "full" | "compact", current: string | undefined): NativeChild[];
|
|
301
|
+
/** A picker row click: `select` highlights it, `activate` also runs Enter's path. False when not a visible row. */
|
|
302
|
+
routePickerItem(selector: string, activate: boolean): boolean;
|
|
234
303
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { KeysApi, Model } from "@oh-my-pi/pi-ai";
|
|
2
2
|
import type { Component, TUI } from "../tui.js";
|
|
3
|
+
import type { DescribeContext, NativeNode, NativeUiEvent } from "../native/node.js";
|
|
3
4
|
import type { ModelBrowserSource, ModelBrowserRegistry } from "./model-browser.js";
|
|
4
5
|
import { type ConfiguredThinkingLevel } from "../thinking.js";
|
|
5
6
|
/** Live preferences and selector operations supplied by the host. */
|
|
@@ -52,6 +53,8 @@ export interface ModelHubCallbacks {
|
|
|
52
53
|
export interface ModelHubOptions {
|
|
53
54
|
/** Preselect this provider's sidebar entry (e.g. when reopening after /login). */
|
|
54
55
|
initialProviderId?: string;
|
|
56
|
+
/** `provider/id` of the session's model, marked current in the native picker. */
|
|
57
|
+
currentSelector?: string;
|
|
55
58
|
}
|
|
56
59
|
/** Test hook: forget which providers were auto-refreshed this process. */
|
|
57
60
|
export declare function resetProviderAutoRefreshGuard(): void;
|
|
@@ -69,4 +72,8 @@ export declare class ModelHubComponent implements Component {
|
|
|
69
72
|
refreshAfterExternalMutation(): void;
|
|
70
73
|
handleInput(data: string): void;
|
|
71
74
|
render(width: number): readonly string[];
|
|
75
|
+
/** A `picker` is its own sheet: the backend mounts it in `layer` without an `overlay` wrapper. */
|
|
76
|
+
nativeSheet(cx: DescribeContext): boolean;
|
|
77
|
+
describe(cx: DescribeContext): NativeNode;
|
|
78
|
+
handleNativeEvent(event: NativeUiEvent): void;
|
|
72
79
|
}
|
|
@@ -10,6 +10,7 @@ import type { Component, TUI } from "../tui.js";
|
|
|
10
10
|
import type { ModelBrowserRegistry, ModelBrowserSource } from "./model-browser.js";
|
|
11
11
|
import type { ConfiguredThinkingLevel } from "../thinking.js";
|
|
12
12
|
import type { ScopedModelItem } from "./model-hub.js";
|
|
13
|
+
import type { DescribeContext, NativeNode, NativeUiEvent } from "../native/node.js";
|
|
13
14
|
/** Configured role resolved to a concrete model. */
|
|
14
15
|
export interface ResolvedRoleModel {
|
|
15
16
|
role: string;
|
|
@@ -19,7 +20,8 @@ export interface ResolvedRoleModel {
|
|
|
19
20
|
}
|
|
20
21
|
/** Catalog refresh capability used by the session picker. */
|
|
21
22
|
export interface ModelPickerRegistry extends ModelBrowserRegistry {
|
|
22
|
-
|
|
23
|
+
/** Bring the catalog up to date without rebuilding a current one; `true` when the picker must re-read it. */
|
|
24
|
+
refreshIfStale(): Promise<boolean>;
|
|
23
25
|
}
|
|
24
26
|
export interface ModelPickerCallbacks {
|
|
25
27
|
/**
|
|
@@ -69,4 +71,10 @@ export declare class ModelPickerComponent implements Component {
|
|
|
69
71
|
invalidate(): void;
|
|
70
72
|
handleInput(data: string): void;
|
|
71
73
|
render(width: number): string[];
|
|
74
|
+
/** A `picker` is its own sheet: the backend mounts it in `layer` without an `overlay` wrapper. */
|
|
75
|
+
nativeSheet(cx: DescribeContext): boolean;
|
|
76
|
+
/** Picker pointer events, each on the path of the key it stands for. */
|
|
77
|
+
handleNativeEvent(event: NativeUiEvent): void;
|
|
78
|
+
/** The `md` picker sheet, or the fallback card when the terminal lacks the kind. */
|
|
79
|
+
describe(cx?: DescribeContext): NativeNode;
|
|
72
80
|
}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* confirms — yielding the resolved directory string (or `undefined` on cancel).
|
|
7
7
|
*/
|
|
8
8
|
import { type Component, type Focusable } from "../index.js";
|
|
9
|
+
import type { NativeNode, NativeUiEvent } from "../native/node.js";
|
|
9
10
|
export interface MoveOverlayResult {
|
|
10
11
|
directory: string;
|
|
11
12
|
}
|
|
@@ -35,5 +36,7 @@ export declare class MoveOverlay implements Component, Focusable {
|
|
|
35
36
|
pasteText(text: string): void;
|
|
36
37
|
handleInput(data: string): void;
|
|
37
38
|
render(width: number): readonly string[];
|
|
39
|
+
describe(): NativeNode;
|
|
40
|
+
handleNativeEvent(event: NativeUiEvent): void;
|
|
38
41
|
invalidate(): void;
|
|
39
42
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { CredentialsApi, KeysApi } from "@oh-my-pi/pi-ai";
|
|
2
2
|
import { type SgrMouseEvent } from "../index.js";
|
|
3
3
|
import { OverlayPanel } from "../chrome/overlay-box.js";
|
|
4
|
+
import type { DescribeContext, NativeNode, NativeUiEvent } from "../native/node.js";
|
|
4
5
|
/** Credential presence and provenance needed by the provider picker. */
|
|
5
6
|
export interface OAuthSelectorAuthSource {
|
|
6
7
|
readonly credentials: Pick<CredentialsApi, "has">;
|
|
@@ -26,6 +27,9 @@ export declare class OAuthSelectorComponent extends OverlayPanel {
|
|
|
26
27
|
*/
|
|
27
28
|
setMaxHeight(lines: number): void;
|
|
28
29
|
handleInput(keyData: string): void;
|
|
30
|
+
describe(cx: DescribeContext): NativeNode;
|
|
31
|
+
/** A click (or double-click) on a provider selects and confirms it, like the SGR click in {@link routeMouse}. */
|
|
32
|
+
handleNativeEvent(event: NativeUiEvent): void;
|
|
29
33
|
/** Move the selection one step for a wheel notch (clamped, no wrap). */
|
|
30
34
|
handleWheel(delta: -1 | 1): void;
|
|
31
35
|
/**
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type TUI } from "../index.js";
|
|
2
2
|
import { OverlayPanel } from "../chrome/overlay-box.js";
|
|
3
|
+
import type { NativeNode } from "../native/node.js";
|
|
3
4
|
export type OmfgPanelState = "generating" | "validating" | "confirming" | "saving" | "saved" | "rejected" | "aborted" | "error";
|
|
4
5
|
interface OmfgPanelComponentOptions {
|
|
5
6
|
complaint: string;
|
|
@@ -16,5 +17,7 @@ export declare class OmfgPanelComponent extends OverlayPanel {
|
|
|
16
17
|
markAborted(): void;
|
|
17
18
|
markError(message: string): void;
|
|
18
19
|
close(): void;
|
|
20
|
+
invalidate(): void;
|
|
21
|
+
describe(): NativeNode;
|
|
19
22
|
}
|
|
20
23
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type Component, type OverlayFocusOwner, type OverlayHandle, type OverlayOptions } from "../index.js";
|
|
2
|
+
import type { NativeNode, NativeUiEvent } from "../native/node.js";
|
|
2
3
|
/**
|
|
3
4
|
* Slice of `InteractiveModeContext` the pause screen drives. Narrow so tests
|
|
4
5
|
* can exercise the full engage → hold → release lifecycle without a real TUI.
|
|
@@ -32,6 +33,17 @@ export declare class PauseScreenComponent implements Component, OverlayFocusOwne
|
|
|
32
33
|
dispose(): void;
|
|
33
34
|
ownsOverlayFocusTarget(component: Component): boolean;
|
|
34
35
|
handleInput(data: string): void;
|
|
36
|
+
invalidate(): void;
|
|
37
|
+
/** A glass sheet titled "Paused" (not the whole pane: the transcript stays visible, frozen). */
|
|
38
|
+
readonly nativeOverlay: {
|
|
39
|
+
readonly role: "omp.overlay.pause";
|
|
40
|
+
readonly size: "md";
|
|
41
|
+
readonly anchor: "center";
|
|
42
|
+
readonly head: "Paused";
|
|
43
|
+
};
|
|
44
|
+
describe(): NativeNode;
|
|
45
|
+
/** Resume runs what Esc/Enter/Space run. */
|
|
46
|
+
handleNativeEvent(event: NativeUiEvent): void;
|
|
35
47
|
render(width: number): readonly string[];
|
|
36
48
|
}
|
|
37
49
|
/**
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
*/
|
|
19
19
|
import { type Component } from "../index.js";
|
|
20
20
|
import type { HookSelectorSlider } from "./hook-selector.js";
|
|
21
|
+
import { type NativeNode, type NativeUiEvent } from "../native/node.js";
|
|
21
22
|
/** Serializable annotations retained by the plan-review owner between overlays. */
|
|
22
23
|
export interface PlanReviewAnnotationState {
|
|
23
24
|
annotations: Array<{
|
|
@@ -85,5 +86,9 @@ export declare class PlanReviewOverlay implements Component {
|
|
|
85
86
|
* `onPlanEdited` (the editor round-trip already persisted the file). */
|
|
86
87
|
setPlanContent(planContent: string): void;
|
|
87
88
|
handleInput(keyData: string): void;
|
|
89
|
+
/** The native sheet: large glass, titled by the plan's own title heading (the body never repeats it). */
|
|
90
|
+
get nativeOverlay(): NonNullable<Component["nativeOverlay"]>;
|
|
91
|
+
describe(): NativeNode;
|
|
92
|
+
handleNativeEvent(event: NativeUiEvent): void;
|
|
88
93
|
render(width: number): readonly string[];
|
|
89
94
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type Component, type Focusable } from "../index.js";
|
|
2
|
+
import type { NativeNode, NativeUiEvent } from "../native/node.js";
|
|
2
3
|
/** A confirmed destination chosen from {@link PlanSaveOverlay}. */
|
|
3
4
|
export interface PlanSaveOverlayResult {
|
|
4
5
|
path: string;
|
|
@@ -16,4 +17,13 @@ export declare class PlanSaveOverlay implements Component, Focusable {
|
|
|
16
17
|
pasteText(text: string): void;
|
|
17
18
|
invalidate(): void;
|
|
18
19
|
render(width: number): readonly string[];
|
|
20
|
+
/** A small glass sheet titled "Save and quit". */
|
|
21
|
+
readonly nativeOverlay: {
|
|
22
|
+
readonly role: "omp.overlay.planSave";
|
|
23
|
+
readonly size: "sm";
|
|
24
|
+
readonly head: "Save and quit";
|
|
25
|
+
};
|
|
26
|
+
describe(): NativeNode;
|
|
27
|
+
/** Save and Cancel run what the submit and cancel keys run. */
|
|
28
|
+
handleNativeEvent(event: NativeUiEvent): void;
|
|
19
29
|
}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { SelectList, type SgrMouseEvent } from "../index.js";
|
|
8
8
|
import { OverlayPanel } from "../chrome/overlay-box.js";
|
|
9
|
+
import type { DescribeContext, NativeNode, NativeUiEvent } from "../native/node.js";
|
|
9
10
|
export interface PluginSelectorCallbacks {
|
|
10
11
|
onSelect: (pluginName: string, marketplace: string, scope?: "user" | "project") => void;
|
|
11
12
|
onCancel: () => void;
|
|
@@ -23,6 +24,9 @@ export interface PluginItem {
|
|
|
23
24
|
export declare class PluginSelectorComponent extends OverlayPanel {
|
|
24
25
|
#private;
|
|
25
26
|
constructor(marketplaceCount: number, plugins: PluginItem[], installedIds: Set<string>, callbacks: PluginSelectorCallbacks);
|
|
27
|
+
describe(cx: DescribeContext): NativeNode | null;
|
|
28
|
+
/** Picker pointer events drive the list exactly as its keys do. */
|
|
29
|
+
handleNativeEvent(event: NativeUiEvent): void;
|
|
26
30
|
getSelectList(): SelectList;
|
|
27
31
|
routeMouse(event: SgrMouseEvent, line: number, col: number): void;
|
|
28
32
|
}
|
|
@@ -7,6 +7,18 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { Container } from "../index.js";
|
|
9
9
|
import { OverlayPanel } from "../chrome/overlay-box.js";
|
|
10
|
+
import { type PrefsEditing } from "../components/settings-list.js";
|
|
11
|
+
import type { DescribeContext, NativeChild, NativeNode, NativeUiEvent } from "../native/node.js";
|
|
12
|
+
import type { TspPrefsSection } from "@oh-my-pi/pi-wire";
|
|
13
|
+
/** The plugins tab as a native settings page draws it (the settings selector puts it in its `prefs` node). */
|
|
14
|
+
export interface PluginPrefsPage {
|
|
15
|
+
lead: string;
|
|
16
|
+
sections: TspPrefsSection[];
|
|
17
|
+
focus: string | null;
|
|
18
|
+
editing: PrefsEditing | null;
|
|
19
|
+
/** An open value editor without a native control, shown over the page. */
|
|
20
|
+
editor?: NativeChild;
|
|
21
|
+
}
|
|
10
22
|
/** Setting metadata consumed by the plugin settings UI. */
|
|
11
23
|
export type PluginSettingSchema = {
|
|
12
24
|
description?: string;
|
|
@@ -118,6 +130,12 @@ export declare class PluginListComponent extends OverlayPanel {
|
|
|
118
130
|
#private;
|
|
119
131
|
private readonly entries;
|
|
120
132
|
constructor(entries: ReadonlyArray<PluginListEntry>, callbacks: PluginListCallbacks);
|
|
133
|
+
/** The installed plugins as one native page section: a row per plugin with its status and a Configure button. */
|
|
134
|
+
prefsPage(): PluginPrefsPage;
|
|
135
|
+
/** A native page event: a row click moves the selection, Configure (or a double click) opens the plugin. */
|
|
136
|
+
handlePrefsEvent(event: NativeUiEvent): void;
|
|
137
|
+
/** The plugin list (the select list describes itself) and its hints, or install guidance when empty. */
|
|
138
|
+
describe(_cx: DescribeContext): NativeNode;
|
|
121
139
|
handleInput(data: string): void;
|
|
122
140
|
}
|
|
123
141
|
export interface PluginDetailCallbacks {
|
|
@@ -141,6 +159,10 @@ export declare class PluginDetailComponent extends OverlayPanel {
|
|
|
141
159
|
private readonly callbacks;
|
|
142
160
|
constructor(plugin: InstalledPlugin, manager: PluginSettingsManager, callbacks: PluginDetailCallbacks);
|
|
143
161
|
handleInput(data: string): void;
|
|
162
|
+
/** This plugin's settings as a native page section. */
|
|
163
|
+
prefsPage(): PluginPrefsPage;
|
|
164
|
+
/** A native page event on this plugin's settings. */
|
|
165
|
+
handlePrefsEvent(event: NativeUiEvent): void;
|
|
144
166
|
}
|
|
145
167
|
export interface MarketplacePluginDetailCallbacks {
|
|
146
168
|
parsePluginId: PluginSettingsHost["parsePluginId"];
|
|
@@ -161,6 +183,10 @@ export declare class MarketplacePluginDetailComponent extends OverlayPanel {
|
|
|
161
183
|
private readonly callbacks;
|
|
162
184
|
constructor(plugin: InstalledPluginSummary, manager: PluginSettingsManager, callbacks: MarketplacePluginDetailCallbacks);
|
|
163
185
|
handleInput(data: string): void;
|
|
186
|
+
/** This plugin's settings as a native page section, with its install facts as the lead. */
|
|
187
|
+
prefsPage(): PluginPrefsPage;
|
|
188
|
+
/** A native page event on this plugin's settings. */
|
|
189
|
+
handlePrefsEvent(event: NativeUiEvent): void;
|
|
164
190
|
}
|
|
165
191
|
export interface PluginSettingsCallbacks {
|
|
166
192
|
onClose: () => void;
|
|
@@ -176,5 +202,9 @@ export declare class PluginSettingsComponent extends Container {
|
|
|
176
202
|
#private;
|
|
177
203
|
private readonly callbacks;
|
|
178
204
|
constructor(host: PluginSettingsHost, callbacks: PluginSettingsCallbacks);
|
|
205
|
+
/** The current view (list or a plugin's settings) as a native settings page. */
|
|
206
|
+
prefsPage(): PluginPrefsPage;
|
|
207
|
+
/** Routes a native page event to the current view. */
|
|
208
|
+
handlePrefsEvent(event: NativeUiEvent): void;
|
|
179
209
|
handleInput(data: string): void;
|
|
180
210
|
}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { SelectList, type SgrMouseEvent } from "../index.js";
|
|
2
2
|
import { OverlayPanel } from "../chrome/overlay-box.js";
|
|
3
|
+
import type { DescribeContext, NativeNode, NativeUiEvent } from "../native/node.js";
|
|
3
4
|
/**
|
|
4
5
|
* Component that renders a queue mode selector with borders
|
|
5
6
|
*/
|
|
6
7
|
export declare class QueueModeSelectorComponent extends OverlayPanel {
|
|
7
8
|
#private;
|
|
8
9
|
constructor(currentMode: "all" | "one-at-a-time", onSelect: (mode: "all" | "one-at-a-time") => void, onCancel: () => void);
|
|
10
|
+
describe(cx: DescribeContext): NativeNode | null;
|
|
11
|
+
/** Picker pointer events drive the list exactly as its keys do. */
|
|
12
|
+
handleNativeEvent(event: NativeUiEvent): void;
|
|
9
13
|
getSelectList(): SelectList;
|
|
10
14
|
routeMouse(event: SgrMouseEvent, line: number, col: number): void;
|
|
11
15
|
}
|