@oh-my-pi/pi-tui 18.4.3 → 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 +36 -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/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 +37 -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/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 +7 -0
- 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 +7 -0
- package/dist/types/setup/scenes/splash.d.ts +8 -0
- package/dist/types/setup/scenes/types.d.ts +6 -1
- 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/terminal-capabilities.d.ts +1 -1
- package/dist/types/terminal.d.ts +27 -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.d.ts +8 -0
- 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 +346 -11
- 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/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 +37 -0
- 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 +216 -27
- 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 +21 -0
- 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/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 +175 -1
- 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 +583 -23
- 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 +122 -13
- package/src/setup/scenes/splash.ts +28 -1
- package/src/setup/scenes/theme.ts +88 -3
- package/src/setup/scenes/types.ts +7 -1
- package/src/setup/startup-splash.ts +46 -9
- package/src/setup/wizard-overlay.ts +140 -23
- package/src/status-line/component.ts +398 -16
- 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/terminal-capabilities.ts +7 -0
- package/src/terminal.ts +130 -2
- 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/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/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 +180 -49
- 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 +247 -2
- 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/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.ts +113 -1
- package/src/tools/write.ts +144 -5
- package/src/tools/xdev.ts +64 -1
- package/src/tui.ts +294 -3
|
@@ -29,6 +29,7 @@ import type { AgentTool } from "@oh-my-pi/pi-agent-core";
|
|
|
29
29
|
import { type Component, type TUI } from "../index.js";
|
|
30
30
|
import type { MessageRenderer } from "../chat/extension-types.js";
|
|
31
31
|
import { type TranscriptEntryLike as TranscriptEntry } from "../chat/transcript-entry.js";
|
|
32
|
+
import type { DescribeContext, NativeNode, NativeUiEvent } from "../native/node.js";
|
|
32
33
|
/** One alternate branch at a divergence: its root and message path root → most-recent leaf. */
|
|
33
34
|
export interface BranchVariantPath {
|
|
34
35
|
rootId: string;
|
|
@@ -60,5 +61,9 @@ export declare class RewindSelectorComponent implements Component {
|
|
|
60
61
|
invalidate(): void;
|
|
61
62
|
dispose(): void;
|
|
62
63
|
handleInput(data: string): void;
|
|
64
|
+
/** A `picker` is its own sheet: the backend mounts it in `layer`, over the transcript. */
|
|
65
|
+
nativeSheet(cx: DescribeContext): boolean;
|
|
66
|
+
handleNativeEvent(event: NativeUiEvent): void;
|
|
67
|
+
describe(cx: DescribeContext): NativeNode;
|
|
63
68
|
render(width: number): readonly string[];
|
|
64
69
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { type Component } from "../index.js";
|
|
2
|
+
import type { DescribeContext, NativeNode, NativeUiEvent } from "../native/node.js";
|
|
3
|
+
import type { ContextUsage } from "../status-line/types.js";
|
|
2
4
|
/** Terminal surface needed to size the session info viewport. */
|
|
3
5
|
export interface SessionInfoOverlayHost {
|
|
4
6
|
readonly terminal: {
|
|
@@ -8,10 +10,26 @@ export interface SessionInfoOverlayHost {
|
|
|
8
10
|
/** Focused, dismissible `/session` information panel. */
|
|
9
11
|
export declare class SessionInfoOverlay implements Component {
|
|
10
12
|
#private;
|
|
11
|
-
|
|
13
|
+
/** The terminal draws the sheet: a centred `md` glass sheet titled Session info. */
|
|
14
|
+
readonly nativeOverlay: {
|
|
15
|
+
readonly role: "omp.overlay.sessionInfo";
|
|
16
|
+
readonly size: "md";
|
|
17
|
+
readonly anchor: "center";
|
|
18
|
+
readonly head: "Session info";
|
|
19
|
+
};
|
|
20
|
+
/** `context` adds a context-window meter to the native sheet. */
|
|
21
|
+
constructor(host: SessionInfoOverlayHost, info: string, onClose: () => void, context?: ContextUsage);
|
|
12
22
|
handleInput(data: string): void;
|
|
13
23
|
invalidate(): void;
|
|
14
24
|
setIgnoreTight(ignore: boolean): this;
|
|
15
25
|
dispose(): void;
|
|
26
|
+
/**
|
|
27
|
+
* The sheet body (the overlay is the frame): the session id in mono
|
|
28
|
+
* (click copies), each report heading as a section of key/value rows, a
|
|
29
|
+
* context meter after the leading block, and a Close button (Esc).
|
|
30
|
+
*/
|
|
31
|
+
describe(cx: DescribeContext): NativeNode;
|
|
32
|
+
/** The Close button runs Esc's path. */
|
|
33
|
+
handleNativeEvent(event: NativeUiEvent): void;
|
|
16
34
|
render(width: number): readonly string[];
|
|
17
35
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { type Component } from "../index.js";
|
|
1
|
+
import { type Component, Input } from "../index.js";
|
|
2
|
+
import type { TspPickerGroup, TspPickerItem } from "@oh-my-pi/pi-wire";
|
|
3
|
+
import type { DescribeContext, NativeNode, NativeUiEvent } from "../native/node.js";
|
|
2
4
|
/** Session lifecycle status presented by the picker. */
|
|
3
5
|
export type SessionSelectorStatus = "complete" | "interrupted" | "aborted" | "error" | "pending" | "unknown";
|
|
4
6
|
/** Session listing fields consumed by the picker. */
|
|
@@ -8,6 +10,7 @@ export interface SessionSelectorEntry {
|
|
|
8
10
|
cwd: string;
|
|
9
11
|
title?: string;
|
|
10
12
|
modified: Date;
|
|
13
|
+
created?: Date;
|
|
11
14
|
size: number;
|
|
12
15
|
firstMessage: string;
|
|
13
16
|
allMessagesText: string;
|
|
@@ -16,6 +19,20 @@ export interface SessionSelectorEntry {
|
|
|
16
19
|
parentSessionPath?: string;
|
|
17
20
|
}
|
|
18
21
|
import { OverlayPanel } from "../chrome/overlay-box.js";
|
|
22
|
+
/** The session list's part of the picker props, plus the memo keys it was built from. */
|
|
23
|
+
interface SessionPickerView {
|
|
24
|
+
items: readonly TspPickerItem[];
|
|
25
|
+
itemsAdd?: readonly TspPickerItem[];
|
|
26
|
+
version: number;
|
|
27
|
+
query: string;
|
|
28
|
+
/** Search caret (UTF-16 offset into `query`). */
|
|
29
|
+
cursor: number;
|
|
30
|
+
order: readonly (string | TspPickerGroup)[];
|
|
31
|
+
hits?: Readonly<Record<string, readonly (readonly [number, number])[]>>;
|
|
32
|
+
selected: string | null;
|
|
33
|
+
current: readonly string[];
|
|
34
|
+
total: number;
|
|
35
|
+
}
|
|
19
36
|
/** Returns the IDs of sessions whose recorded prompts match a query, best first. */
|
|
20
37
|
export type SessionHistoryMatcher = (query: string) => string[];
|
|
21
38
|
/**
|
|
@@ -68,6 +85,35 @@ declare class SessionList<T extends SessionSelectorEntry> implements Component {
|
|
|
68
85
|
handleWheel(delta: -1 | 1): void;
|
|
69
86
|
/** Mouse click: select the session under the pointer and resume it. */
|
|
70
87
|
selectAndConfirm(index: number): void;
|
|
88
|
+
/** Native click on a session item: the same outcome as a mouse click (select + resume). */
|
|
89
|
+
confirmSession(path: string): void;
|
|
90
|
+
/** Native row click: move the selection there, as the arrow keys would. */
|
|
91
|
+
selectSession(path: string): void;
|
|
92
|
+
/** Enter: resume the selected session. */
|
|
93
|
+
resumeSelected(): void;
|
|
94
|
+
/** Delete / Backspace on an empty query: ask the parent to confirm deleting the selected session. */
|
|
95
|
+
requestDelete(): void;
|
|
96
|
+
/** Empty the search query (the empty state's "Clear search"). */
|
|
97
|
+
clearSearch(): void;
|
|
98
|
+
get selectedSession(): T | undefined;
|
|
99
|
+
/** Label of the session at `sessionPath` in this listing, else its file name. */
|
|
100
|
+
parentLabel(sessionPath: string): string;
|
|
101
|
+
/**
|
|
102
|
+
* The session list's picker data. `items` is the whole scope and keeps its
|
|
103
|
+
* identity while typing (rebuilt when the set, pins, the live session or
|
|
104
|
+
* the minute change); a query changes only `order`, `hits` and
|
|
105
|
+
* `selected`, plus `itemsAdd` upserts for prompt-history badges. Without
|
|
106
|
+
* a query `order` groups pinned sessions, then by day (Today, Yesterday,
|
|
107
|
+
* This week, Earlier); with one it is the flat ranking.
|
|
108
|
+
*/
|
|
109
|
+
pickerView(): SessionPickerView;
|
|
110
|
+
get searchInput(): Input;
|
|
111
|
+
/**
|
|
112
|
+
* The session list as a native `list` keyed `"list"`, items keyed by
|
|
113
|
+
* session path. The terminal owns scrolling and virtualization; item nodes
|
|
114
|
+
* are cached per session and the list node while nothing visible changed.
|
|
115
|
+
*/
|
|
116
|
+
describeList(): NativeNode;
|
|
71
117
|
invalidate(): void;
|
|
72
118
|
render(width: number): readonly string[];
|
|
73
119
|
handleInput(keyData: string): void;
|
|
@@ -101,6 +147,12 @@ export interface SessionSelectorOptions<T extends SessionSelectorEntry = Session
|
|
|
101
147
|
pinnedIds?: ReadonlySet<string>;
|
|
102
148
|
/** Path of the live session, or a getter so detach/newSession stays accurate. */
|
|
103
149
|
currentSessionPath?: string | (() => string | undefined);
|
|
150
|
+
/**
|
|
151
|
+
* The picker is the whole program (`omp --resume`): the native picker
|
|
152
|
+
* fills the screen surface (`size:"screen"`) instead of floating as a
|
|
153
|
+
* sheet over the transcript.
|
|
154
|
+
*/
|
|
155
|
+
standalone?: boolean;
|
|
104
156
|
}
|
|
105
157
|
/**
|
|
106
158
|
* Component that renders a session selector with optional confirmation dialog
|
|
@@ -125,6 +177,17 @@ export declare class SessionSelectorComponent<T extends SessionSelectorEntry = S
|
|
|
125
177
|
* the panel's inner width before their rows are wrapped.
|
|
126
178
|
*/
|
|
127
179
|
render(width: number): readonly string[];
|
|
180
|
+
/** Over the transcript the picker is its own sheet (`layer`); the standalone app fills the screen surface. */
|
|
181
|
+
nativeSheet(cx: DescribeContext): boolean;
|
|
182
|
+
/**
|
|
183
|
+
* With the `picker` kind: the data-first session picker (§4.7). Otherwise
|
|
184
|
+
* scope `tabs`, loading/error message, then the search `input` and session
|
|
185
|
+
* `list` — or the delete-confirmation dialog in their place, as on the ANSI
|
|
186
|
+
* path — and the key-hint footer.
|
|
187
|
+
*/
|
|
188
|
+
describe(cx: DescribeContext): NativeNode;
|
|
189
|
+
/** Picker events (root keypath); fallback: scope tab → toggle scope, click on a session → resume it, exactly like a mouse click. */
|
|
190
|
+
handleNativeEvent(event: NativeUiEvent): void;
|
|
128
191
|
handleInput(keyData: string): void;
|
|
129
192
|
getSessionList(): SessionList<T>;
|
|
130
193
|
}
|
|
@@ -10,6 +10,8 @@ export type TabMetadata = {
|
|
|
10
10
|
export declare const SETTING_TABS: SettingTab[];
|
|
11
11
|
/** Tab display metadata - icon is a symbol key from theme.ts (tab.*) */
|
|
12
12
|
export declare const TAB_METADATA: Record<SettingTab, TabMetadata>;
|
|
13
|
+
/** One-sentence lead per tab, under the page title of the native settings page. */
|
|
14
|
+
export declare const TAB_LEADS: Record<SettingTab, string>;
|
|
13
15
|
/**
|
|
14
16
|
* Ordered section groups per tab. Settings declare their section via `ui.group`;
|
|
15
17
|
* the settings UI renders groups in this order with a heading row between them.
|
|
@@ -119,6 +121,18 @@ export declare function getAllSettingDefs(entries: readonly SettingsDisplayEntry
|
|
|
119
121
|
export declare function getSettingsForTab(entries: readonly SettingsDisplayEntry[], tab: SettingTab): SettingDef[];
|
|
120
122
|
/** Find the display definition for a host setting path. */
|
|
121
123
|
export declare function getSettingDef(entries: readonly SettingsDisplayEntry[], path: string): SettingDef | undefined;
|
|
124
|
+
/**
|
|
125
|
+
* The numeric value a number-like choice option stands for: its number, or
|
|
126
|
+
* -1 for `default` (the stored sentinel, see the selector's value mapping);
|
|
127
|
+
* `undefined` when the option is not numeric.
|
|
128
|
+
*/
|
|
129
|
+
export declare function numericOption(value: string): number | undefined;
|
|
130
|
+
/**
|
|
131
|
+
* Number hint: a numeric setting whose choices are all numbers (or the
|
|
132
|
+
* `default` sentinel) edits as a stepper through those values on a native
|
|
133
|
+
* settings page. Returns the steps (number → label), else `undefined`.
|
|
134
|
+
*/
|
|
135
|
+
export declare function numberSteps(def: SettingDef): Record<string, string> | undefined;
|
|
122
136
|
/** Format a setting's declared default for display. */
|
|
123
137
|
export declare function getDisplayDefault(entries: readonly SettingsDisplayEntry[], path: string): string;
|
|
124
138
|
export {};
|
|
@@ -6,6 +6,7 @@ import type { ContextLineMode, StatusLinePreset, StatusLineSegmentId, StatusLine
|
|
|
6
6
|
import { type SettingsHost } from "./settings-defs.js";
|
|
7
7
|
import { type ComposerPreviewStatusSource } from "./composer-shape-preview.js";
|
|
8
8
|
import { type PluginSettingsHost } from "./plugin-settings.js";
|
|
9
|
+
import type { DescribeContext, NativeNode, NativeUiEvent } from "../native/node.js";
|
|
9
10
|
/**
|
|
10
11
|
* Dynamic context for settings that need runtime data.
|
|
11
12
|
* Some settings (like thinking level) are managed by the session, not Settings.
|
|
@@ -50,6 +51,8 @@ export interface SettingsCallbacks {
|
|
|
50
51
|
onStatusLinePreview?: (settings: StatusLinePreviewSettings) => void;
|
|
51
52
|
/** Get current rendered status line for inline preview */
|
|
52
53
|
getStatusLinePreview?: () => string;
|
|
54
|
+
/** Native status bar for the inline preview (TSP terminals dock the bar; its ANSI border geometry doesn't apply) */
|
|
55
|
+
describeStatusLinePreview?: () => NativeNode;
|
|
53
56
|
/** Called when plugins change */
|
|
54
57
|
onPluginsChanged?: () => void | Promise<void>;
|
|
55
58
|
/** Called when settings panel is closed */
|
|
@@ -69,5 +72,23 @@ export declare class SettingsSelectorComponent implements Component {
|
|
|
69
72
|
* then a footer hint pinned above the bottom border.
|
|
70
73
|
*/
|
|
71
74
|
render(width: number): readonly string[];
|
|
75
|
+
/**
|
|
76
|
+
* Over a live session the native page is its own sheet: the backend puts
|
|
77
|
+
* it in `layer`, where a terminal with the `aside` feature docks it at the
|
|
78
|
+
* pane's right edge with the transcript beside it. Without `aside` it
|
|
79
|
+
* fills a screen surface instead.
|
|
80
|
+
*/
|
|
81
|
+
nativeSheet(cx: DescribeContext): boolean;
|
|
82
|
+
/**
|
|
83
|
+
* The native settings page (`prefs`) when the terminal draws it, else the
|
|
84
|
+
* root card of today's generic composition.
|
|
85
|
+
*/
|
|
86
|
+
describe(cx: DescribeContext): NativeNode;
|
|
87
|
+
/**
|
|
88
|
+
* Native page events (the root node, see {@link #handlePrefsEvent}); in the
|
|
89
|
+
* generic composition a tab pick does what a tab click does: switch tabs (or
|
|
90
|
+
* jump, while searching), unless an open submenu owns the pointer.
|
|
91
|
+
*/
|
|
92
|
+
handleNativeEvent(event: NativeUiEvent): void;
|
|
72
93
|
handleInput(data: string): void;
|
|
73
94
|
}
|
|
@@ -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 show images selector with borders
|
|
5
6
|
*/
|
|
6
7
|
export declare class ShowImagesSelectorComponent extends OverlayPanel {
|
|
7
8
|
#private;
|
|
8
9
|
constructor(currentValue: boolean, onSelect: (show: boolean) => 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
|
}
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
*/
|
|
15
15
|
import { type Component, type ImageBudget } from "../index.js";
|
|
16
16
|
import { type ShapeTarget } from "@oh-my-pi/snapcompact";
|
|
17
|
+
import type { DescribeContext, NativeNode } from "../native/node.js";
|
|
17
18
|
export interface SnapcompactShapePreviewOptions {
|
|
18
19
|
/** Active model (api + id); resolves what `auto` maps to for this reader. */
|
|
19
20
|
model?: ShapeTarget;
|
|
@@ -27,5 +28,6 @@ export declare class SnapcompactShapePreview implements Component {
|
|
|
27
28
|
constructor(currentValue: string, options?: SnapcompactShapePreviewOptions);
|
|
28
29
|
/** Track the highlighted option; the next render reflects it. */
|
|
29
30
|
setValue(value: string): void;
|
|
31
|
+
describe(cx: DescribeContext): NativeNode;
|
|
30
32
|
render(width: number): readonly string[];
|
|
31
33
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Container } from "../tui.js";
|
|
2
|
+
import type { NativeNode } from "../native/node.js";
|
|
3
|
+
export declare class StatsNotice extends Container {
|
|
4
|
+
#private;
|
|
5
|
+
/** `message` is the launch status line; `url` the dashboard address. */
|
|
6
|
+
constructor(message: string, url: string);
|
|
7
|
+
describe(): NativeNode;
|
|
8
|
+
}
|
|
@@ -1,5 +1,13 @@
|
|
|
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";
|
|
4
|
+
import { type SelectPickerOptions } from "../native/picker.js";
|
|
5
|
+
/**
|
|
6
|
+
* Picker options for a theme list (this selector and the settings theme
|
|
7
|
+
* submenu): a swatch `mark` seeded by the theme id, the current theme dotted,
|
|
8
|
+
* `Apply ⏎`. Moving the selection previews through the list's `onSelectionChange`.
|
|
9
|
+
*/
|
|
10
|
+
export declare function themePickerOptions(title: string, current: string): SelectPickerOptions;
|
|
3
11
|
/**
|
|
4
12
|
* Component that renders a theme selector.
|
|
5
13
|
* Themes must be pre-loaded and passed to the constructor.
|
|
@@ -7,6 +15,9 @@ import { OverlayPanel } from "../chrome/overlay-box.js";
|
|
|
7
15
|
export declare class ThemeSelectorComponent extends OverlayPanel {
|
|
8
16
|
#private;
|
|
9
17
|
constructor(currentTheme: string, themes: string[], onSelect: (themeName: string) => void, onCancel: () => void, onPreview: (themeName: string) => void);
|
|
18
|
+
describe(cx: DescribeContext): NativeNode | null;
|
|
19
|
+
/** Picker pointer events drive the list exactly as its keys do. */
|
|
20
|
+
handleNativeEvent(event: NativeUiEvent): void;
|
|
10
21
|
getSelectList(): SelectList;
|
|
11
22
|
routeMouse(event: SgrMouseEvent, line: number, col: number): void;
|
|
12
23
|
}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import type { Effort } from "@oh-my-pi/pi-ai";
|
|
2
2
|
import { SelectList, 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
|
/**
|
|
5
6
|
* Component that renders a thinking level selector with borders
|
|
6
7
|
*/
|
|
7
8
|
export declare class ThinkingSelectorComponent extends OverlayPanel {
|
|
8
9
|
#private;
|
|
9
10
|
constructor(currentLevel: Effort, availableLevels: Effort[], onSelect: (level: Effort) => void, onCancel: () => void);
|
|
11
|
+
describe(cx: DescribeContext): NativeNode | null;
|
|
12
|
+
/** Picker pointer events drive the list exactly as its keys do. */
|
|
13
|
+
handleNativeEvent(event: NativeUiEvent): void;
|
|
10
14
|
getSelectList(): SelectList;
|
|
11
15
|
routeMouse(event: SgrMouseEvent, line: number, col: number): void;
|
|
12
16
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Component } from "../index.js";
|
|
1
|
+
import { type Component, Input } from "../index.js";
|
|
2
2
|
/** Available session-tree display filters. */
|
|
3
3
|
export declare const TREE_FILTER_MODES: readonly ["default", "no-tools", "user-only", "labeled-only", "all"];
|
|
4
4
|
/** Session-tree display filter. */
|
|
@@ -57,12 +57,29 @@ export interface TreeSelectorNode {
|
|
|
57
57
|
label?: string;
|
|
58
58
|
}
|
|
59
59
|
import { OverlayPanel } from "../chrome/overlay-box.js";
|
|
60
|
+
import type { TspPickerItem, TspText } from "@oh-my-pi/pi-wire";
|
|
61
|
+
import type { DescribeContext, NativeChild, NativeNode, NativeUiEvent } from "../native/node.js";
|
|
60
62
|
/** Filter mode for tree display */
|
|
61
63
|
type FilterMode = TreeFilterMode;
|
|
64
|
+
/** The session tree's `picker` data (see {@link TreeList.pickerView}). */
|
|
65
|
+
interface TreePickerView {
|
|
66
|
+
items: readonly TspPickerItem[];
|
|
67
|
+
order: readonly string[];
|
|
68
|
+
selected: string | null;
|
|
69
|
+
current: readonly string[];
|
|
70
|
+
query: string;
|
|
71
|
+
/** UTF-16 caret into `query`. */
|
|
72
|
+
cursor: number;
|
|
73
|
+
filterMode: FilterMode;
|
|
74
|
+
total: number;
|
|
75
|
+
empty: TspText;
|
|
76
|
+
}
|
|
62
77
|
declare class TreeList implements Component {
|
|
63
78
|
#private;
|
|
64
79
|
private readonly currentLeafId;
|
|
65
80
|
private readonly maxVisibleLines;
|
|
81
|
+
/** The search field; its value is the fuzzy query. */
|
|
82
|
+
readonly searchInput: Input;
|
|
66
83
|
onSelect?: (entryId: string, options: {
|
|
67
84
|
summarize: boolean;
|
|
68
85
|
}) => void;
|
|
@@ -72,9 +89,43 @@ declare class TreeList implements Component {
|
|
|
72
89
|
invalidate(): void;
|
|
73
90
|
dispose(): void;
|
|
74
91
|
getSearchQuery(): string;
|
|
92
|
+
getFilterMode(): FilterMode;
|
|
93
|
+
/** Native filter tab: switch to that mode, like its alt+key shortcut. */
|
|
94
|
+
setFilterMode(mode: string): void;
|
|
95
|
+
/** Native click on an entry: highlight it, then the same outcome as Enter. */
|
|
96
|
+
activateEntry(entryId: string): void;
|
|
97
|
+
/** Native row click: highlight the entry without switching. */
|
|
98
|
+
selectEntry(entryId: string): void;
|
|
99
|
+
/**
|
|
100
|
+
* The `tree` picker's data. `items` is every structural entry, rebuilt
|
|
101
|
+
* only when the tree or a label changes; filter modes and typing change
|
|
102
|
+
* only `order` (the visible entries) and the selection.
|
|
103
|
+
*/
|
|
104
|
+
pickerView(): TreePickerView;
|
|
105
|
+
/**
|
|
106
|
+
* Preview of the selected entry: a title, its label, and its content as
|
|
107
|
+
* the transcript shows it (markdown prose, commands and output as code).
|
|
108
|
+
*/
|
|
109
|
+
pickerPreview(): readonly NativeChild[];
|
|
110
|
+
/**
|
|
111
|
+
* The visible entries as a native `list` keyed `"list"`, items keyed by
|
|
112
|
+
* entry id. Selection stays omp's; the terminal scrolls and virtualizes.
|
|
113
|
+
* Branch heads carry a `branch` icon and the active path an accent bullet
|
|
114
|
+
* instead of drawn tree connectors.
|
|
115
|
+
*/
|
|
116
|
+
describeList(): NativeNode;
|
|
75
117
|
getSelectedNode(): TreeSelectorNode | undefined;
|
|
76
118
|
updateNodeLabel(entryId: string, label: string | undefined): void;
|
|
77
119
|
render(width: number): readonly string[];
|
|
120
|
+
/** Enter (`summarize` false) / Shift+Enter: switch to the selected entry. */
|
|
121
|
+
confirm(summarize: boolean): void;
|
|
122
|
+
/** Esc: clear the search first, then close. */
|
|
123
|
+
escape(): void;
|
|
124
|
+
clearSearch(): void;
|
|
125
|
+
/** Ctrl+O / Shift+Ctrl+O: default → no-tools → user-only → labeled-only → all → default. */
|
|
126
|
+
cycleFilter(delta: 1 | -1): void;
|
|
127
|
+
/** Shift+L: edit the selected entry's label. */
|
|
128
|
+
editLabel(): void;
|
|
78
129
|
handleInput(keyData: string): void;
|
|
79
130
|
}
|
|
80
131
|
/**
|
|
@@ -83,9 +134,16 @@ declare class TreeList implements Component {
|
|
|
83
134
|
export declare class TreeSelectorComponent extends OverlayPanel {
|
|
84
135
|
#private;
|
|
85
136
|
private readonly onLabelChangeCallback?;
|
|
137
|
+
/** The picker's subtitle. */
|
|
138
|
+
private readonly sessionName?;
|
|
86
139
|
constructor(tree: TreeSelectorNode[], currentLeafId: string | null, terminalHeight: number, onSelect: (entryId: string, options: {
|
|
87
140
|
summarize: boolean;
|
|
88
|
-
}) => void, onCancel: () => void, onLabelChangeCallback?: ((entryId: string, label: string | undefined) => void) | undefined, initialFilterMode?: FilterMode
|
|
141
|
+
}) => void, onCancel: () => void, onLabelChangeCallback?: ((entryId: string, label: string | undefined) => void) | undefined, initialFilterMode?: FilterMode,
|
|
142
|
+
/** The picker's subtitle. */
|
|
143
|
+
sessionName?: string | undefined);
|
|
144
|
+
describe(cx: DescribeContext): NativeNode;
|
|
145
|
+
/** Filter tab → switch mode; entry click → highlight it and switch, exactly like Enter. */
|
|
146
|
+
handleNativeEvent(event: NativeUiEvent): void;
|
|
89
147
|
handleInput(keyData: string): void;
|
|
90
148
|
getTreeList(): TreeList;
|
|
91
149
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type UsageLimit, type UsageReport } from "@oh-my-pi/pi-ai";
|
|
2
2
|
import { type Component } from "../index.js";
|
|
3
|
+
import { type DescribeContext, type NativeNode, type NativeUiEvent } from "../native/node.js";
|
|
3
4
|
/** Local calendar-day activity consumed by the usage heatmap. */
|
|
4
5
|
export interface DailyActivityPoint {
|
|
5
6
|
day: string;
|
|
@@ -63,6 +64,8 @@ export interface HeatmapLayout {
|
|
|
63
64
|
cells: (number | null)[][];
|
|
64
65
|
totalCost: number;
|
|
65
66
|
totalRequests: number;
|
|
67
|
+
/** Local midnight of the first cell (column 0, Monday). */
|
|
68
|
+
start: Date;
|
|
66
69
|
}
|
|
67
70
|
export declare const HEATMAP_DAY_LABELS: string[];
|
|
68
71
|
/**
|
|
@@ -79,10 +82,10 @@ export interface UsageDashboardOptions {
|
|
|
79
82
|
reports: UsageReport[];
|
|
80
83
|
unavailableAccounts?: readonly UnavailableUsageAccount[];
|
|
81
84
|
/**
|
|
82
|
-
* Full classic `/usage` report
|
|
83
|
-
* terminal width.
|
|
85
|
+
* Full classic `/usage` report of `reports` (the latest refresh) for the
|
|
86
|
+
* expanded detail view; re-invoked per terminal width.
|
|
84
87
|
*/
|
|
85
|
-
renderDetail: (width: number) => string;
|
|
88
|
+
renderDetail: (width: number, reports: UsageReport[]) => string;
|
|
86
89
|
/**
|
|
87
90
|
* Stream daily activity into the heatmap: push cached DB rows immediately,
|
|
88
91
|
* then push again after an incremental session sync. Resolves when the sync
|
|
@@ -90,6 +93,8 @@ export interface UsageDashboardOptions {
|
|
|
90
93
|
* the dashboard closes so an in-flight sync can stop early.
|
|
91
94
|
*/
|
|
92
95
|
loadActivity: (push: (points: DailyActivityPoint[]) => void, signal: AbortSignal) => Promise<void>;
|
|
96
|
+
/** Re-fetch the usage reports (`r`); omitted when the host can't. Resolves null when nothing came back. */
|
|
97
|
+
refresh?: () => Promise<UsageReport[] | null>;
|
|
93
98
|
requestRender: () => void;
|
|
94
99
|
onClose: () => void;
|
|
95
100
|
}
|
|
@@ -101,9 +106,27 @@ export interface UsageDashboardOptions {
|
|
|
101
106
|
export declare function formatActivityErrorDetail(error: string, homeDir?: string): string;
|
|
102
107
|
export declare class UsageDashboardComponent implements Component {
|
|
103
108
|
#private;
|
|
109
|
+
/** The terminal draws the sheet: a large glass overlay titled Usage. */
|
|
110
|
+
readonly nativeOverlay: {
|
|
111
|
+
readonly role: "omp.overlay.usage";
|
|
112
|
+
readonly size: "lg";
|
|
113
|
+
readonly anchor: "center";
|
|
114
|
+
readonly head: "Usage";
|
|
115
|
+
};
|
|
104
116
|
constructor(options: UsageDashboardOptions);
|
|
105
117
|
invalidate(): void;
|
|
106
118
|
dispose(): void;
|
|
107
119
|
render(width: number): readonly string[];
|
|
120
|
+
/**
|
|
121
|
+
* The sheet body (the terminal's `lg` overlay is the frame): a head row
|
|
122
|
+
* (checked ago, Overview/Details tabs, Refresh), then either the provider
|
|
123
|
+
* grid of frames with window meters and the activity heatmap, or the
|
|
124
|
+
* per-provider detail tables. `meter`/`chart` fall back to
|
|
125
|
+
* `progress`/`table` on terminals without them. Rebuilt only when its
|
|
126
|
+
* inputs change.
|
|
127
|
+
*/
|
|
128
|
+
describe(cx: DescribeContext): NativeNode;
|
|
129
|
+
/** Tab clicks switch views like Enter/Esc; the Refresh button runs `r`. */
|
|
130
|
+
handleNativeEvent(event: NativeUiEvent): void;
|
|
108
131
|
handleInput(data: string): void;
|
|
109
132
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Usage } from "@oh-my-pi/pi-ai";
|
|
2
|
-
import { Container } from "../
|
|
1
|
+
import type { AssistantMessage, Usage } from "@oh-my-pi/pi-ai";
|
|
2
|
+
import { Container } from "../tui.js";
|
|
3
3
|
/**
|
|
4
4
|
* Prompt→yield wall time for a turn, from pure local timestamps: the user
|
|
5
5
|
* prompt's timestamp to the response's completion time (`completedAt`, stamped
|
|
@@ -10,6 +10,40 @@ import { Container } from "../index.js";
|
|
|
10
10
|
export declare function turnElapsedMs(turnStartedAt: number | undefined, message: {
|
|
11
11
|
completedAt?: number;
|
|
12
12
|
}): number | undefined;
|
|
13
|
+
/** A finished turn's totals, the native `omp.turn.usage` line under its last answer. */
|
|
14
|
+
export interface TurnUsageSummary {
|
|
15
|
+
/** Prompt→yield wall time; undefined when either end is unknown. */
|
|
16
|
+
readonly elapsedMs: number | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Prompt tokens: input, cache writes and orchestration input. Cache reads
|
|
19
|
+
* re-read the context each request, so they stay out (as in the status
|
|
20
|
+
* line's total).
|
|
21
|
+
*/
|
|
22
|
+
readonly input: number;
|
|
23
|
+
/** Output tokens, orchestration output included. */
|
|
24
|
+
readonly output: number;
|
|
25
|
+
/** Billed cost in dollars. */
|
|
26
|
+
readonly cost: number;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Sums the requests of a turn. {@link add} returns the turn's summary on the
|
|
30
|
+
* message that ends the run (any stop but `toolUse`) and starts over.
|
|
31
|
+
*/
|
|
32
|
+
export declare class TurnUsageTally {
|
|
33
|
+
#private;
|
|
34
|
+
/** Drop a partial turn (a new prompt, a fresh run). */
|
|
35
|
+
reset(): void;
|
|
36
|
+
add(message: AssistantMessage, turnStartedAt: number | undefined): TurnUsageSummary | undefined;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The native turn line: `12.4s · 19K tok · $0.02 this turn` (the time drops
|
|
40
|
+
* out when unknown, the cost when nothing was billed), and its tooltip with
|
|
41
|
+
* exact counts.
|
|
42
|
+
*/
|
|
43
|
+
export declare function formatTurnUsage(summary: TurnUsageSummary): {
|
|
44
|
+
text: string;
|
|
45
|
+
title: string;
|
|
46
|
+
};
|
|
13
47
|
/** Format the metrics shared by standalone usage blocks and compact tool groups. */
|
|
14
48
|
export declare function formatUsageRow(usage: Usage, durationMs?: number, ttftMs?: number, timestamp?: number, turnElapsedMs?: number): string;
|
|
15
49
|
/** Whether `component` is a per-turn usage/metrics row from {@link createUsageRowBlock}. */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type Component, type ImageBudget } from "../index.js";
|
|
2
|
+
import type { DescribeContext, NativeNode } from "../native/node.js";
|
|
2
3
|
import type { CustomEditor } from "./custom-editor.js";
|
|
3
4
|
/**
|
|
4
5
|
* The composer attachment band: one rounded card per staged attachment, rendered directly above
|
|
@@ -15,5 +16,12 @@ export declare class AttachmentChipsBand implements Component {
|
|
|
15
16
|
private readonly budget;
|
|
16
17
|
private readonly requestRender;
|
|
17
18
|
constructor(editor: CustomEditor, budget: ImageBudget, requestRender: () => void);
|
|
19
|
+
/**
|
|
20
|
+
* A wrapping `row` of chip `card`s (`omp.composer.chip`) titled with the
|
|
21
|
+
* buffer token (`<icon> #N`): images and videos show the image itself,
|
|
22
|
+
* pastes their leading lines; the caption carries pixel size or line/char
|
|
23
|
+
* count. Hidden while nothing is staged.
|
|
24
|
+
*/
|
|
25
|
+
describe(_cx: DescribeContext): NativeNode;
|
|
18
26
|
render(width: number): readonly string[];
|
|
19
27
|
}
|
|
@@ -46,8 +46,16 @@ export declare const COMPOSER_TOKEN_REGEX: RegExp;
|
|
|
46
46
|
export declare function referencedAttachments(text: string, recorded: ReadonlyMap<string, ChipKind>): Record<ChipKind, Set<number>>;
|
|
47
47
|
/** Add the registered model-chip labels to the composer placeholder matcher. */
|
|
48
48
|
export declare function composerTokenRegex(mentionLabels: Iterable<string>): RegExp;
|
|
49
|
-
/**
|
|
50
|
-
export declare function
|
|
49
|
+
/** Marker for the Nth attached image or video preview: `[Image #N, WxH]`, or `[Image #N]` without dims. */
|
|
50
|
+
export declare function formatVisionMarker(kind: "image" | "video", n: number, dims?: {
|
|
51
|
+
width: number;
|
|
52
|
+
height: number;
|
|
53
|
+
}): string;
|
|
54
|
+
/**
|
|
55
|
+
* Offsets image marker indices, including matching `attachment://` references. With `imageCount`,
|
|
56
|
+
* markers above it are left alone: like `compactImageMarkers`, they are not this text's attachments.
|
|
57
|
+
*/
|
|
58
|
+
export declare function shiftImageMarkers(text: string, offset: number, imageCount?: number): string;
|
|
51
59
|
/**
|
|
52
60
|
* Replaces valid expanded image markers with compact tokens and registers each
|
|
53
61
|
* token's original marker as its atomic editor expansion.
|
|
@@ -56,8 +64,12 @@ export declare function collapseImageMarkers(text: string, imageCount: number, r
|
|
|
56
64
|
/**
|
|
57
65
|
* Drops unreferenced vision attachments from a submission and densely remaps
|
|
58
66
|
* retained image/video markers. Returns `null` when no compaction is needed.
|
|
67
|
+
* With `byAppearance`, retained markers are also renumbered in the order they first
|
|
68
|
+
* appear, for editors whose images attach out of order (concurrent path loads).
|
|
59
69
|
*/
|
|
60
|
-
export declare function compactImageMarkers(text: string, imageCount: number
|
|
70
|
+
export declare function compactImageMarkers(text: string, imageCount: number, options?: {
|
|
71
|
+
byAppearance?: boolean;
|
|
72
|
+
}): {
|
|
61
73
|
text: string;
|
|
62
74
|
keep: number[];
|
|
63
75
|
} | null;
|
|
@@ -3,6 +3,7 @@ import type { StatusLineSession } from "../status-line/host.js";
|
|
|
3
3
|
import { type StatusLineStartupData } from "../status-line/startup.js";
|
|
4
4
|
import { type Terminal } from "../terminal.js";
|
|
5
5
|
import { type Component, type ResizeScrollbackMode, type TerminalFramePlan, type TerminalFrameProvider, TUI, type TUIOptions, type ViewportSize } from "../tui.js";
|
|
6
|
+
import type { NativeSurface, NativeSurfaceProvider } from "../native/node.js";
|
|
6
7
|
import { CustomEditor } from "./custom-editor.js";
|
|
7
8
|
import type { WordCompletionMethod } from "./word-completion.js";
|
|
8
9
|
import { type LspServerInfo, type RecentSession, WelcomeComponent } from "./welcome.js";
|
|
@@ -64,6 +65,13 @@ export interface RuntimeChildrenOptions {
|
|
|
64
65
|
* settled rows it displaces retire to native scrollback.
|
|
65
66
|
*/
|
|
66
67
|
readonly transient?: readonly Component[];
|
|
68
|
+
/**
|
|
69
|
+
* Dock order on a TSP terminal (no status strip; the composer carries its
|
|
70
|
+
* facts): the native dock stacks HUD pills, the working row and queued messages over
|
|
71
|
+
* the composer in its own order, and may add describe-only roots. Defaults
|
|
72
|
+
* to the roots below the transcript in render order.
|
|
73
|
+
*/
|
|
74
|
+
readonly nativeDock?: readonly Component[];
|
|
67
75
|
}
|
|
68
76
|
/** Controls the first terminal paint for a composer that does not already own the terminal. */
|
|
69
77
|
export interface ComposerStartOptions {
|
|
@@ -108,12 +116,21 @@ export declare const PINNED_HUD_TOGGLE_ID = "@omp:toggle-pinned-hud";
|
|
|
108
116
|
* It owns the terminal, welcome header, and editor; InteractiveMode later supplies authoritative
|
|
109
117
|
* data and mounts the session-aware runtime children without replacing the visible header.
|
|
110
118
|
*/
|
|
111
|
-
export declare class Composer implements TerminalFrameProvider {
|
|
119
|
+
export declare class Composer implements TerminalFrameProvider, NativeSurfaceProvider {
|
|
112
120
|
#private;
|
|
113
121
|
readonly ui: TUI;
|
|
114
122
|
constructor(options?: ComposerOptions);
|
|
115
123
|
/** Compose the bounded mutable viewport and the next ordered history append. */
|
|
116
124
|
renderFrame(viewport: ViewportSize): TerminalFramePlan;
|
|
125
|
+
/**
|
|
126
|
+
* Describe the whole surface for a TSP terminal. `main` is the flowing
|
|
127
|
+
* document: the header (welcome, extras) and every transcript block as its
|
|
128
|
+
* own component child. `dock` is the live chrome below the transcript in
|
|
129
|
+
* render order: pending messages, HUDs, the working row, the editor and the
|
|
130
|
+
* status line. There is no history/viewport split: retirement, resize
|
|
131
|
+
* replay and hover bands are ANSI concerns.
|
|
132
|
+
*/
|
|
133
|
+
describeSurface(): NativeSurface;
|
|
117
134
|
/**
|
|
118
135
|
* Candidate subagent ids under a mutable-viewport line, for click-to-focus.
|
|
119
136
|
* Empty when the line has no click target (chrome, separators, retired rows
|