@oh-my-pi/pi-tui 18.16.0 → 18.17.0
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 +54 -125
- package/README.md +4 -1
- package/dist/types/apps/shell-visualizer.d.ts +24 -0
- package/dist/types/autocomplete.d.ts +20 -0
- package/dist/types/chat/cache-invalidation-marker.d.ts +15 -7
- package/dist/types/chat/chat-transcript-builder.d.ts +3 -1
- package/dist/types/chat/display-preferences.d.ts +2 -0
- package/dist/types/chat/extension-types.d.ts +72 -1
- package/dist/types/chat/read-tool-group.d.ts +15 -2
- package/dist/types/chat/skill-message.d.ts +1 -0
- package/dist/types/chat/spotlight.d.ts +203 -0
- package/dist/types/chat/tool-execution.d.ts +26 -5
- package/dist/types/chat/transcript-actions.d.ts +11 -0
- package/dist/types/chat/transcript-browser.d.ts +9 -0
- package/dist/types/chat/transcript-presentation.d.ts +164 -0
- package/dist/types/chat/ttsr-notification.d.ts +2 -0
- package/dist/types/chrome/message-frame.d.ts +2 -0
- package/dist/types/chrome/transcript-container.d.ts +27 -6
- package/dist/types/components/loader.d.ts +0 -2
- package/dist/types/components/markdown.d.ts +11 -1
- package/dist/types/components/settings-list.d.ts +12 -2
- package/dist/types/frame-rate.d.ts +18 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/keybinding-matchers.d.ts +4 -1
- package/dist/types/kitty-graphics.d.ts +1 -1
- package/dist/types/motion-effects.d.ts +10 -0
- package/dist/types/native/encode.d.ts +2 -0
- package/dist/types/native/measure.d.ts +10 -0
- package/dist/types/native/overlay.d.ts +1 -1
- package/dist/types/native/quiet.d.ts +5 -0
- package/dist/types/native/reconcile.d.ts +6 -1
- package/dist/types/native/spans.d.ts +6 -0
- package/dist/types/native/state.d.ts +4 -0
- package/dist/types/overlays/agent-hub.d.ts +6 -0
- package/dist/types/overlays/link-browser.d.ts +55 -0
- package/dist/types/overlays/spotlight-sheet.d.ts +36 -0
- package/dist/types/prompt/composer-attachments.d.ts +5 -2
- package/dist/types/prompt/composer-cache.d.ts +7 -2
- package/dist/types/prompt/composer.d.ts +6 -11
- package/dist/types/prompt/custom-editor.d.ts +8 -2
- package/dist/types/prompt/gradient-highlight.d.ts +2 -2
- package/dist/types/prompt/magic-keywords.d.ts +2 -0
- package/dist/types/prompt/model-mention-autocomplete.d.ts +9 -7
- package/dist/types/prompt/model-mention-syntax.d.ts +6 -0
- package/dist/types/prompt/prompt-action-autocomplete.d.ts +2 -1
- package/dist/types/prompt/welcome.d.ts +23 -4
- package/dist/types/render/extension-links.d.ts +0 -6
- package/dist/types/render/index.d.ts +1 -0
- package/dist/types/render/link-hints.d.ts +78 -0
- package/dist/types/render/render-utils.d.ts +0 -2
- package/dist/types/setup/scenes/types.d.ts +8 -0
- package/dist/types/setup/scenes/updates.d.ts +6 -0
- package/dist/types/setup/setup-version.d.ts +1 -1
- package/dist/types/setup/wizard.d.ts +7 -2
- package/dist/types/spinner-clock.d.ts +34 -0
- package/dist/types/status-line/component.d.ts +6 -1
- package/dist/types/status-line/host.d.ts +62 -0
- package/dist/types/status-line/index.d.ts +1 -0
- package/dist/types/status-line/prompt-cache.d.ts +14 -0
- package/dist/types/status-line/schema.d.ts +1 -1
- package/dist/types/status-line/startup.d.ts +6 -0
- package/dist/types/status-line/types.d.ts +7 -1
- package/dist/types/theme/schema.d.ts +28 -1
- package/dist/types/theme/symbols.d.ts +1 -1
- package/dist/types/theme/theme-class.d.ts +12 -2
- package/dist/types/theme/theme.d.ts +1 -1
- package/dist/types/theme/tui-adapters.d.ts +7 -0
- package/dist/types/thinking.d.ts +12 -0
- package/dist/types/tools/ask.d.ts +1 -1
- package/dist/types/tools/bash.d.ts +11 -0
- package/dist/types/tools/find.d.ts +9 -1
- package/dist/types/tools/grep.d.ts +2 -1
- package/dist/types/tools/grouped-file-output.d.ts +17 -0
- package/dist/types/tools/job-widget.d.ts +2 -2
- package/dist/types/tools/lsp.d.ts +4 -2
- package/dist/types/tools/native-view.d.ts +4 -0
- package/dist/types/tools/renderer.d.ts +9 -1
- package/dist/types/tools/shell-trace.d.ts +10 -0
- package/dist/types/tools/shell-viz-render.d.ts +6 -0
- package/dist/types/tools/shell-viz.d.ts +16 -0
- package/dist/types/tools/wait.d.ts +2 -2
- package/dist/types/tools/web-search-types.d.ts +1 -0
- package/dist/types/tui.d.ts +15 -1
- package/package.json +46 -42
- package/src/apps/shell-visualizer.ts +167 -0
- package/src/autocomplete.ts +14 -0
- package/src/chat/assistant-message.ts +11 -6
- package/src/chat/cache-invalidation-marker.ts +18 -9
- package/src/chat/chat-transcript-builder.ts +14 -4
- package/src/chat/display-preferences.ts +3 -0
- package/src/chat/extension-types.ts +74 -1
- package/src/chat/read-tool-group.ts +201 -41
- package/src/chat/skill-message.ts +4 -0
- package/src/chat/spotlight.ts +460 -0
- package/src/chat/tool-execution.ts +360 -38
- package/src/chat/transcript-actions.ts +13 -1
- package/src/chat/transcript-browser.ts +18 -0
- package/src/chat/transcript-presentation.ts +642 -0
- package/src/chat/ttsr-notification.ts +5 -0
- package/src/chrome/message-frame.ts +7 -0
- package/src/chrome/transcript-container.ts +317 -66
- package/src/components/editor.ts +25 -1
- package/src/components/loader.ts +30 -18
- package/src/components/markdown.ts +41 -16
- package/src/components/settings-list.ts +29 -13
- package/src/frame-rate.ts +36 -0
- package/src/hotkeys-markdown.ts +4 -1
- package/src/index.ts +3 -0
- package/src/keybinding-matchers.ts +13 -12
- package/src/kitty-graphics.ts +3 -2
- package/src/motion-effects.ts +27 -0
- package/src/native/backend.ts +66 -7
- package/src/native/encode.ts +2 -0
- package/src/native/measure.ts +185 -0
- package/src/native/overlay.ts +1 -1
- package/src/native/quiet.ts +105 -0
- package/src/native/reconcile.ts +16 -10
- package/src/native/spans.ts +40 -0
- package/src/native/state.ts +18 -0
- package/src/overlays/agent-hub.ts +15 -2
- package/src/overlays/ask-dialog.ts +1 -0
- package/src/overlays/link-browser.ts +295 -0
- package/src/overlays/settings-selector.ts +17 -3
- package/src/overlays/spotlight-sheet.ts +478 -0
- package/src/overlays/usage-dashboard.ts +6 -5
- package/src/prompt/composer-attachments.ts +6 -6
- package/src/prompt/composer-cache.ts +17 -16
- package/src/prompt/composer.ts +30 -123
- package/src/prompt/custom-editor.ts +17 -13
- package/src/prompt/gradient-highlight.ts +5 -4
- package/src/prompt/magic-keywords.ts +4 -1
- package/src/prompt/model-mention-autocomplete.ts +73 -20
- package/src/prompt/model-mention-syntax.ts +9 -0
- package/src/prompt/prompt-action-autocomplete.ts +49 -33
- package/src/prompt/tips.txt +1 -0
- package/src/prompt/welcome.ts +106 -7
- package/src/render/extension-links.ts +0 -20
- package/src/render/index.ts +1 -0
- package/src/render/link-hints.ts +299 -0
- package/src/render/render-utils.ts +0 -5
- package/src/setup/scenes/glyph.ts +1 -1
- package/src/setup/scenes/types.ts +8 -0
- package/src/setup/scenes/updates.ts +116 -0
- package/src/setup/setup-version.ts +1 -1
- package/src/setup/wizard.ts +19 -8
- package/src/spinner-clock.ts +79 -0
- package/src/status-line/component.ts +143 -26
- package/src/status-line/host.ts +51 -0
- package/src/status-line/index.ts +1 -0
- package/src/status-line/presets.ts +2 -0
- package/src/status-line/prompt-cache.ts +154 -0
- package/src/status-line/schema.ts +1 -0
- package/src/status-line/segments.ts +33 -5
- package/src/status-line/startup.ts +22 -4
- package/src/status-line/types.ts +7 -1
- package/src/stdin-buffer.ts +89 -46
- package/src/terminal-capabilities.ts +3 -3
- package/src/terminal.ts +1 -8
- package/src/theme/loader.ts +3 -2
- package/src/theme/schema.ts +30 -1
- package/src/theme/symbols.ts +15 -3
- package/src/theme/theme-class.ts +23 -0
- package/src/theme/theme-schema.json +1 -1
- package/src/theme/theme.ts +3 -7
- package/src/theme/tui-adapters.ts +33 -1
- package/src/thinking.ts +31 -0
- package/src/tools/ask.ts +99 -38
- package/src/tools/ast-edit.ts +51 -32
- package/src/tools/ast-grep.ts +31 -19
- package/src/tools/bash.ts +130 -24
- package/src/tools/find.ts +23 -2
- package/src/tools/grep.ts +52 -36
- package/src/tools/grouped-file-output.ts +20 -2
- package/src/tools/job-widget.ts +2 -2
- package/src/tools/lsp.ts +537 -642
- package/src/tools/native-view.ts +8 -2
- package/src/tools/renderer.ts +9 -1
- package/src/tools/shell-trace.ts +80 -0
- package/src/tools/shell-viz-render.ts +156 -0
- package/src/tools/shell-viz.ts +181 -0
- package/src/tools/streaming-output.ts +18 -8
- package/src/tools/wait.ts +39 -34
- package/src/tools/web-search-types.ts +1 -0
- package/src/tui.ts +63 -6
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,59 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [18.17.0] - 2026-11-06
|
|
6
|
+
|
|
7
|
+
### Breaking Changes
|
|
8
|
+
|
|
9
|
+
- `MarkdownTheme.heading` receives the heading depth (1–6) as a second argument; callers must pass it.
|
|
10
|
+
- Shell visualization uses the native presentation engine: shell node IDs are opaque strings, and native shell nodes receive presentation data, not raw execution traces.
|
|
11
|
+
- Replaced `CustomEditor.modelMentionLabel` with `resolveModelMention` (returns `{ label, selector }`); `collapseModelMentions` takes the same callback; `getModelMentionSuggestions` returns `ModelMentionCompletion`.
|
|
12
|
+
- `SetupHost` must implement `autoUpdate`, `canAutoUpdate()` and `saveAutoUpdate()` for setup version 3's auto-update scene.
|
|
13
|
+
- Removed `SPINNER_ADVANCE_MS` in favor of the shared spinner clock; `sharedSpinnerFrame` is exported from `spinner-clock`.
|
|
14
|
+
- Removed `formatMeta` from `render/render-utils`.
|
|
15
|
+
- `TranscriptContainer.nativeBlocks()` and `Composer.describeSurface()` now require the frame's `DescribeContext`.
|
|
16
|
+
- `GradientHighlightSpec.lightness` now maps gradient position to lightness like `hue` instead of taking a fixed percentage.
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- Colorful Markdown, on by default (`setMarkdownColorful`): headings by level, bold/italic, inline code and table headers take distinct hues from the theme's `terminal.ansi` palette. `MarkdownTheme` gains optional `strong`, `emphasis` and `tableHeader` roles; `Theme.ansiFg()` paints a palette slot, falling back to the terminal's own palette.
|
|
21
|
+
- Bash cards show incremental Python-like pseudocode with a Raw toggle, failure marks and variable values; the inspector adds layers, split source and timestamp replay. Native hosts draw an inline segmented run box (`shell` = command, `omp.tool.bash.output` = output).
|
|
22
|
+
- `VersionUpdate`, `WelcomeComponent.setVersionUpdate()` and `ComposerWelcomeUpdate.versionUpdate`: the welcome banner shows background self-update progress, readiness or failure.
|
|
23
|
+
- `newSessionThinkingLevel` / `resolveConfiguredThinkingLevel` resolve a new session's starting thinking level; `ComposerCache.writeStatus` accepts `{ shared: false }` to keep a project's status out of the any-project fallback.
|
|
24
|
+
- `SettingItem.menu` exposes a cycling row's choices as a menu opened by `SettingsList.openSubmenuFor`; Enter/Space still cycle.
|
|
25
|
+
- `StatusLineComponent.setSessionPinned()` / `setPinnedSessionIds()` / `isSessionPinned()` track pinned sessions; `session_name` shows the theme's pin icon for them ([#17848](https://github.com/can1357/oh-my-pi/pull/17848) by [@SuperUserA](https://github.com/SuperUserA))
|
|
26
|
+
- Extension transcript presenters (`setTranscriptPresenters`, `readTranscriptPresentation`, `TranscriptPresentationState` in `chat/transcript-presentation`) draw tool cards and read entries full, compact or hidden ([#17960](https://github.com/can1357/oh-my-pi/pull/17960) by [@materemias](https://github.com/materemias))
|
|
27
|
+
- `PresentedBlock` applies transcript presenters to advisor, skill, execution, background-job, TTSR and other non-tool blocks; `TtsrNotificationComponent.rules` exposes its merged rules ([#17997](https://github.com/can1357/oh-my-pi/pull/17997) by [@materemias](https://github.com/materemias))
|
|
28
|
+
- `LinkBrowserComponent` (`overlays/link-browser`) browses a transcript fullscreen with stable link hint tags; `LinkHints` / `viewportLinkTargets()` share tagging with `Composer`; `ChatTranscriptBuilder` accepts `textRenderers` ([#16476](https://github.com/can1357/oh-my-pi/pull/16476) by [@materemias](https://github.com/materemias))
|
|
29
|
+
- `cache` status-line segment with warm/cold indicators, plus `StatusLineSession.getPromptCacheStatus`, `icon.cacheWarm` / `icon.cacheCold`, the `omp.composer.cache` fact and `promptCacheBrief` / `promptCacheDetails` helpers ([#12677](https://github.com/can1357/oh-my-pi/issues/12677)) ([#17496](https://github.com/can1357/oh-my-pi/pull/17496) by [@will-bogusz](https://github.com/will-bogusz))
|
|
30
|
+
- `^` model mentions suggest supported effort levels after `:` and refresh as you type via optional `AutocompleteProvider.trySyncModelMentionCompletion`, so Tab accepts the current row ([#17574](https://github.com/can1357/oh-my-pi/pull/17574) by [@a-glapinski](https://github.com/a-glapinski))
|
|
31
|
+
- Shared spinner clock (`spinner-clock`: `setSpinnerInterval`, `sharedSpinnerFrame`, `spinnerTickDelay`) ticks all spinners together; `0` makes them static ([#14240](https://github.com/can1357/oh-my-pi/pull/14240) by [@mccraigmccraig](https://github.com/mccraigmccraig))
|
|
32
|
+
- Frame-rate ceiling (`frame-rate`: `setMaxFps`, `minFrameIntervalMs`) for rendering and animations; frames awaited by a keystroke keep 30 fps ([#14240](https://github.com/can1357/oh-my-pi/pull/14240) by [@mccraigmccraig](https://github.com/mccraigmccraig))
|
|
33
|
+
- `setMotionEffects` (`motion-effects`) turns off decorative motion: status-line blink, brand fade, magic-keyword sweep and native `fx` spans ([#14240](https://github.com/can1357/oh-my-pi/pull/14240) by [@mccraigmccraig](https://github.com/mccraigmccraig))
|
|
34
|
+
- `CompactTranscriptBlock` (`chrome/transcript-container`): consecutive blocks whose `isTranscriptBlockCompact()` is true render without blank rows between them, in terminal and native (TSP) surfaces ([#17997](https://github.com/can1357/oh-my-pi/pull/17997) by [@materemias](https://github.com/materemias))
|
|
35
|
+
|
|
36
|
+
### Changed
|
|
37
|
+
|
|
38
|
+
- Ask cards drop per-question section headers; each question shows its id and flags inline (`(db · 3 options)`) ([#18104](https://github.com/can1357/oh-my-pi/pull/18104) by [@JustasMasiulis](https://github.com/JustasMasiulis))
|
|
39
|
+
- Tab in the `/usage` Details view switches back to Overview ([#17962](https://github.com/can1357/oh-my-pi/pull/17962) by [@SuperUserA](https://github.com/SuperUserA))
|
|
40
|
+
- LSP results use one header with request and counts, preview each reference's source line, and syntax-highlight previews and definition snippets ([#18106](https://github.com/can1357/oh-my-pi/pull/18106) by [@JustasMasiulis](https://github.com/JustasMasiulis))
|
|
41
|
+
- Grep and AST Grep headers show the search scope after the pattern, errors show the tool title and pattern, and collapsed AST Grep drops `meta:` rows ([#18105](https://github.com/can1357/oh-my-pi/pull/18105) by [@JustasMasiulis](https://github.com/JustasMasiulis))
|
|
42
|
+
- AST Edit's header shows the search scope; the `proposed` state and replacement counts move to the card's bottom border ([#18105](https://github.com/can1357/oh-my-pi/pull/18105) by [@JustasMasiulis](https://github.com/JustasMasiulis))
|
|
43
|
+
- Centered sheets and dialogs on narrow native terminals fill the pane only once their content reaches half the screen height.
|
|
44
|
+
|
|
45
|
+
### Fixed
|
|
46
|
+
|
|
47
|
+
- Tern acknowledgements and visibility reports no longer appear as text in the editor when they arrive during a paste, including through Windows ConPTY.
|
|
48
|
+
- The `find` card marks searches cut short by its 20 s budget as `timed out` ([#18161](https://github.com/can1357/oh-my-pi/pull/18161) by [@will-bogusz](https://github.com/will-bogusz))
|
|
49
|
+
- Tern's classic renderer no longer leaves stale inline images over text while an answer streams or the pane resizes.
|
|
50
|
+
- The native composer's first frame shows the cached thinking/effort level instead of the plain model icon.
|
|
51
|
+
- Clicking a many-valued enum setting's popup on native settings pages now opens its menu.
|
|
52
|
+
- Ask notes no longer carry over between successive single-select questions ([#17979](https://github.com/can1357/oh-my-pi/issues/17979))
|
|
53
|
+
- LSP references no longer render as diagnostics or hover cards when a line looks like a diagnostics summary or code fence ([#18106](https://github.com/can1357/oh-my-pi/pull/18106) by [@JustasMasiulis](https://github.com/JustasMasiulis))
|
|
54
|
+
- The LSP diagnostics card lists diagnostics per file, counts every file, and reports server failures instead of `No issues` ([#18106](https://github.com/can1357/oh-my-pi/pull/18106) by [@JustasMasiulis](https://github.com/JustasMasiulis))
|
|
55
|
+
- Closing an overlay that others opened over no longer makes them return focus to it ([#16476](https://github.com/can1357/oh-my-pi/pull/16476))
|
|
56
|
+
- ASCII tree branches are two columns wide (`|-`, `'-`), so child rows align like Unicode trees ([#18103](https://github.com/can1357/oh-my-pi/pull/18103) by [@JustasMasiulis](https://github.com/JustasMasiulis))
|
|
57
|
+
|
|
5
58
|
## [18.16.0] - 2026-11-02
|
|
6
59
|
|
|
7
60
|
### Breaking Changes
|
|
@@ -2400,128 +2453,4 @@
|
|
|
2400
2453
|
- Fixed tmux offscreen-shrink frames to skip repainting when the visible tail is unchanged, avoiding intermittent blank/refresh flashes in pane terminals ([#2046](https://github.com/can1357/oh-my-pi/issues/2046)).
|
|
2401
2454
|
- Fixed Windows ConPTY hosts (Windows Terminal, Tabby, Hyper, VS Code) parking the viewport at the top of a full paint after a `/resume` or any long-session repaint. `ProcessTerminal#safeWrite` now splits oversized writes into ≤ 8 KiB pieces at line boundaries on `win32` and inside WSL (where stdout still crosses ConPTY at the `wslhost` boundary) so each underlying `WriteFile` stays below the ~32 KiB threshold where ConPTY stops tracking the cursor; the data was always delivered, but the host UI's scroll position would not follow until any focus event forced a re-query. ([#2034](https://github.com/can1357/oh-my-pi/issues/2034))
|
|
2402
2455
|
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
### Breaking Changes
|
|
2406
|
-
|
|
2407
|
-
- Removed Kitty temp-file image transmission, its startup support probe, the `PI_KITTY_IMAGE_TRANSMISSION` override, and the temp-file helper exports. Kitty/Ghostty image payloads now stay on in-band base64 before placeholder/direct placement, avoiding blank first renders from temp-file load races.
|
|
2408
|
-
- Renamed `RenderRequestOptions.allowUnknownViewportMutation` → `allowUnknownViewportTransientRepaint`. The option only permits a transient live-viewport repaint (autocomplete/IME/focused-editor chrome) on hosts that cannot report viewport position; it never authorizes a settled transcript commit. The old name implied any offscreen mutation was safe to push into native scrollback, which led callers to emit duplicate transcript copies.
|
|
2409
|
-
|
|
2410
|
-
### Added
|
|
2411
|
-
|
|
2412
|
-
- Added `TUI.addStartListener()` so feature hooks can re-enable terminal modes after temporary stop/start cycles such as external-editor handoffs.
|
|
2413
|
-
- Added `Editor.pasteText()` to apply terminal-style paste handling for text inserted from non-bracketed paste transports
|
|
2414
|
-
- Added an optional `dispose()` lifecycle method to `Component` so components can release timers and subscriptions during permanent teardown
|
|
2415
|
-
- Added `Container.dispose()` to propagate teardown to child components when a component tree is permanently discarded
|
|
2416
|
-
- Added `Loader.dispose()` to stop the loader animation timer when the component is disposed
|
|
2417
|
-
- Added a `ScrollView` `ellipsis` option (defaults to `Ellipsis.Unicode`) so callers that pre-wrap content to width can pass `Ellipsis.Omit` and suppress the stray per-line `…` that lands on trailing padding.
|
|
2418
|
-
- Added `ScrollView.handleScrollKey()` plus a `fastScrollLines` option so every scroll view gets shared navigation keys, including Shift+Arrow to scroll faster.
|
|
2419
|
-
- Added `OverlayOptions.fullscreen`: while the topmost visible overlay sets it, the engine borrows the terminal's alternate screen buffer for the overlay's lifetime and paints only the modal there — no ED3, no transcript re-commit — so the transcript stays untouched on the normal screen and is not scrollable behind the modal. Mouse tracking (`?1000h`/`?1006h`) is enabled for the modal's lifetime and disabled on exit, so the rest of the app keeps the terminal's native text selection.
|
|
2420
|
-
- Added the `submitPinsViewportToTail` terminal capability and `detectSubmitPinsViewportToTail()`: genuine local terminals where a submit keystroke scrolls the host to its tail reconcile deferred native scrollback at the prompt-submit checkpoint even when the viewport position is unprobeable (Ghostty/kitty/iTerm/WezTerm/Alacritty). Restores the pre-regression submit reconciliation without re-enabling it for Windows Terminal/ConPTY, SSH, or multiplexers, where a submit is not proof the host is at the tail.
|
|
2421
|
-
|
|
2422
|
-
### Changed
|
|
2423
|
-
|
|
2424
|
-
- Changed static `Loader` messages to repaint only at the spinner's 80 ms cadence; time-dependent message colorizers can opt into 16 ms redraws with `animated: true`.
|
|
2425
|
-
- Changed keybinding matching to precompute canonical key sets so each input sequence is parsed once per binding check instead of once per candidate key.
|
|
2426
|
-
- Made `Component.invalidate()` optional so leaf components without render caches no longer need no-op invalidation hooks.
|
|
2427
|
-
- `TERMINAL` is now a `RuntimeTerminal` whose post-construction capabilities (image protocol and the probe-driven flags) are writable, replacing the `as unknown as MutableTerminalInfo` cast pattern and the positional `withTerminalOverrides` rebuild with a prototype-preserving `clone()`.
|
|
2428
|
-
|
|
2429
|
-
### Fixed
|
|
2430
|
-
|
|
2431
|
-
- Fixed `Loader` text updates to skip identical messages and preserve the rendered `Text` cache instead of invalidating it every timer tick.
|
|
2432
|
-
- Fixed fullscreen overlay alt-frame rendering to reuse the current line-preparation path instead of calling removed fitting helpers.
|
|
2433
|
-
- Reduced TUI render-path line fitting by deferring overlay base-frame fitting until an overlay rebuild and by reusing already-fitted lines in emitters.
|
|
2434
|
-
- Reduced live-region pinned repaint output by diffing unchanged viewport rows when no sealed rows are being committed to native scrollback.
|
|
2435
|
-
- Fixed no-append live-region pinned repaints to re-anchor the hardware cursor when the logical viewport shifts.
|
|
2436
|
-
- Fixed keybinding matching so printable uppercase input preserves `Shift` for bindings such as `shift+a`.
|
|
2437
|
-
- Optimized terminal image-line detection and Thai/Lao AM normalization checks to avoid hot-path regex scans and substring allocations.
|
|
2438
|
-
- Fixed `Markdown.render()` cache hits returning the cache's mutable backing array, which let callers that append extra rows corrupt cached Markdown and duplicate those rows on every redraw.
|
|
2439
|
-
- Fixed first-paint full replays for callers that intentionally replace terminal history by allowing `TUI.start({ clearScrollback: true })`, so they do not briefly append an entire initial frame before the first clean replay.
|
|
2440
|
-
- Fixed ED3-risk streaming cap accounting to preserve the native scrollback high-water mark for rows that were already physically committed before transient frames were viewport-capped.
|
|
2441
|
-
- Fixed terminal stop and restore cleanup to disable enhanced paste mode so it does not remain enabled after shutdown
|
|
2442
|
-
- Removed the per-frame line-fit `Map` cache from the render timer path to avoid forcing JSC rope-string hashing during scheduled viewport repaints.
|
|
2443
|
-
- Fixed `visibleWidth()` so terminal column measurements for ANSI and OSC text now match the native truncation/wrapping helpers, including OSC 66 text-sizing spans being counted at their scaled payload width
|
|
2444
|
-
- Fixed cursor, padding, and line-fit behavior when strings contain tabs or OSC escapes by aligning `visibleWidth()` with the native text-width model
|
|
2445
|
-
- Fixed the transcript — or a re-appearing prior view such as the welcome screen — duplicating itself on terminals without a scroll-position oracle (Ghostty/kitty/iTerm/WezTerm) when a foreground tool completes by rewriting a partly-committed block, or when the transcript is reset. A non-destructive viewport repaint no longer re-paints rows that are byte-identical to what is already committed to native scrollback into the active grid; the repaint anchor is clamped to the committed-and-unchanged prefix (`min(firstChanged, scrollbackHighWater)`).
|
|
2446
|
-
|
|
2447
|
-
## [15.10.0] - 2026-06-06
|
|
2448
|
-
|
|
2449
|
-
### Changed
|
|
2450
|
-
|
|
2451
|
-
- Reworked the DEC 2026 synchronized-output default policy: a positive DECRQM mode-2026 report now **enables** sync (previously a report could only disable it), so conservatively defaulted-off hosts that actually support it — current Zellij, tmux master, foot, contour, mintty — are upgraded at runtime. The static allowlist also covers Alacritty and the VS Code terminal, honors a `TERM_FEATURES` `Sy` advertisement and `WT_SESSION` (Windows Terminal / WSL), and no longer blanket-disables SSH (DEC 2026 passes through to the outer terminal). Risky multiplexers still start off and rely on the probe. Added `synchronizedOutputUserOverride()` as the shared opt-out/force resolver.
|
|
2452
|
-
|
|
2453
|
-
### Fixed
|
|
2454
|
-
|
|
2455
|
-
- Fixed WSL/Windows Terminal row flicker while typing by repainting changed text rows before clearing only their stale suffix ([#2011](https://github.com/can1357/oh-my-pi/issues/2011)).
|
|
2456
|
-
- Fixed terminals that support DEC 2026 still tearing/flickering because the renderer ignored a positive DECRQM capability report and kept synchronized output off — most visibly WSL + Windows Terminal, Alacritty (≥0.13), and the VS Code terminal (≥1.108), which were detected yet refused sync.
|
|
2457
|
-
|
|
2458
|
-
## [15.9.69] - 2026-06-06
|
|
2459
|
-
|
|
2460
|
-
### Added
|
|
2461
|
-
|
|
2462
|
-
- Added `TUI.resetDisplay()` to force an immediate full-frame replay, including native scrollback when the host can safely clear it.
|
|
2463
|
-
- Added `setPaddingY` to `Box` so vertical padding can be updated programmatically after creation.
|
|
2464
|
-
|
|
2465
|
-
### Fixed
|
|
2466
|
-
|
|
2467
|
-
- Fixed DECCARA background-fill optimization running when synchronized output is disabled, which could expose default-background gaps during rapidly updating tool-use panels ([#2000](https://github.com/can1357/oh-my-pi/issues/2000)).
|
|
2468
|
-
|
|
2469
|
-
## [15.9.67] - 2026-06-06
|
|
2470
|
-
|
|
2471
|
-
### Added
|
|
2472
|
-
|
|
2473
|
-
- Added `setPaddingX` to `Box` so horizontal padding can be updated programmatically after creation
|
|
2474
|
-
- Added `ScrollView`, a fixed-height viewport component for pre-rendered lines with optional right-edge scrollbars and imperative scroll/page controls.
|
|
2475
|
-
- Added optional `Terminal.hasEagerEraseScrollbackRisk()` so custom/test terminal implementations can override the global ED3-risk profile without mutating the shared `TERMINAL` object.
|
|
2476
|
-
|
|
2477
|
-
### Changed
|
|
2478
|
-
|
|
2479
|
-
- Changed `SelectList` to render its visible window through `ScrollView`, replacing the `(N/M)` text scroll indicator with a uniform right-edge scrollbar (the type-to-search hint line is preserved).
|
|
2480
|
-
|
|
2481
|
-
### Fixed
|
|
2482
|
-
|
|
2483
|
-
- Fixed unknown-viewport deferred renders freezing bottom-anchored live chrome; deferred history mutations can now repaint only the active-grid bottom row with relative cursor movement, so spinner/status tails keep advancing without rewriting rows a scrolled reader can still see.
|
|
2484
|
-
- Fixed autocomplete popups freezing live repaint on ED3-risk macOS/POSIX terminals with unknown native viewport position; direct autocomplete shrink frames now repaint the live viewport without zero-byte deferral and preserve the old bottom anchor when padding can clear stale popup rows without duplicating committed scrollback.
|
|
2485
|
-
- Fixed focused Up/Down navigation on ED3-risk macOS/POSIX terminals replaying the whole transcript after dirty foreground-stream renders; selector/editor frames now repaint non-destructively instead of emitting `CSI 3 J` on every arrow-key move ([#1962](https://github.com/can1357/oh-my-pi/issues/1962)).
|
|
2486
|
-
- Fixed tmux (and screen/zellij) pane scrollback losing the head of a long streamed assistant reply once it grew past the visible pane, and stranding the chrome/footer in pane history after a later collapse — producing the "repeating chunks and missing sections" reporters saw when scrolling back through tmux pane history ([#1974](https://github.com/can1357/oh-my-pi/issues/1974)). The renderer's foreground-streaming cap-to-viewport branch (introduced in 15.9.2 for ED3-risk hosts that can checkpoint-rebuild later) also activated inside multiplexers, where checkpoint reconcile is a no-op (`refreshNativeScrollbackIfDirty` short-circuits because `\x1b[3J` cannot erase pane history). Every streaming frame clipped `lines` to the visible tail and reset `#scrollbackHighWater` to 0, so any row that scrolled above the viewport top was committed nowhere — pane history stayed empty until streaming ended. Meanwhile `#planLiveRegionPinnedRender` was explicitly disabled for multiplexers, but its `#emitLiveRegionPinnedRepaint` is built from the exact primitives tmux accepts (relative cursor moves, per-line `\x1b[2K`, `\r\n` to scroll the sealed prefix past the viewport bottom) and never emits `\x1b[2J`/`\x1b[3J`. The pinned planner now runs in multiplexers too, the cap branch skips them, and the diff/append path commits incrementally into pane history; the actively-mutating live tail stays in the visible viewport only.
|
|
2487
|
-
|
|
2488
|
-
## [15.9.5] - 2026-06-05
|
|
2489
|
-
|
|
2490
|
-
### Changed
|
|
2491
|
-
|
|
2492
|
-
- Changed terminal resize handling so any width or height change always performs a clean reset + redraw: the renderer now unconditionally clears the viewport and native scrollback (`CSI 2 J` / `CSI 3 J`) and replays the full transcript at the new geometry, replacing the previous matrix of conditional viewport-repaint / history-rebuild / deferred-mutation branches. Multiplexer panes still repaint the visible window in place (pane scrollback cannot be erased), but a resize during active ED3-risk foreground streaming now performs the same clean rebuild rather than downgrading to a non-destructive viewport repaint: the terminal already re-wrapped its saved lines at the old width, so the rebuild must erase them (ED 3) instead of leaving the mis-wrapped history on screen. As a deliberate tradeoff this drops the prior no-overflow and confirmed-scrolled guards on resize: a reader scrolled into history snaps back to the bottom and preexisting shell scrollback above the UI is cleared.
|
|
2493
|
-
|
|
2494
|
-
### Fixed
|
|
2495
|
-
|
|
2496
|
-
- Fixed ED3-risk foreground streaming dropping the scrolled-off head of an append-only live block that alone overflows the viewport (a long streamed assistant reply). The live-region pin again committed native scrollback only up to the live-region start, so once the live block grew past the viewport its earlier rows scrolled above the viewport top but were committed nowhere and repainted nowhere — they vanished, leaving the reply looking like a ~viewport-tall circular buffer. The `NativeScrollbackLiveRegion` seam now also reports an optional append-only `getNativeScrollbackCommitSafeEnd`, and the pinned commit boundary is the deeper of the sealed start and that append-only end: rows in `[liveRegionStart, commitSafeEnd)` above the viewport top commit to scrollback, while volatile live blocks (tool previews that collapse) omit the boundary and keep their mutable rows deferred — preserving the pending-box-above-running-box fix.
|
|
2497
|
-
|
|
2498
|
-
## [15.9.4] - 2026-06-05
|
|
2499
|
-
|
|
2500
|
-
### Added
|
|
2501
|
-
|
|
2502
|
-
- Added `PI_TUI_SYNC_OUTPUT=0` and `PI_TUI_SYNC_OUTPUT=1` to explicitly disable or force-enable DEC 2026 synchronized-output mode, alongside `PI_FORCE_SYNC_OUTPUT=1` as a force-on alias
|
|
2503
|
-
- Added `PI_TUI_ED3_SAFE=1` environment override to treat a terminal as non-ED3-risk for eager native scrollback rebuilds on unknown POSIX hosts
|
|
2504
|
-
|
|
2505
|
-
### Changed
|
|
2506
|
-
|
|
2507
|
-
- Changed native-scrollback safety defaults to treat unknown POSIX, SSH, and multiplexer-shaped terminals as ED3-risk for passive rendering; checkpoint replay now requires a positive at-tail viewport proof instead of assuming prompt submit makes host scrollback safe.
|
|
2508
|
-
- Changed synchronized-output defaults to a conservative opt-in profile: DEC 2026 paint wrappers stay disabled for remote/multiplexer/VTE/unknown terminals unless explicitly forced, while the autowrap guards remain active.
|
|
2509
|
-
|
|
2510
|
-
### Fixed
|
|
2511
|
-
|
|
2512
|
-
- Fixed ED3-risk unknown-viewport renders repainting offscreen structural edits over stale native scrollback, which could duplicate or shift rows when async blocks collapsed or middle rows were deleted.
|
|
2513
|
-
- Fixed ED3-risk foreground streams committing mutable live-region rows into native scrollback, which could leave a stale `pending` tool box above the `running` box after the preview re-rendered.
|
|
2514
|
-
- Fixed TUI shutdown leaving paint-time terminal state and Kitty image data behind by restoring synchronized-output/autowrap modes and purging all transmitted Kitty image ids on stop.
|
|
2515
|
-
- Fixed stdin buffering splitting surrogate-pair text into UTF-16 halves and reduced timing sensitivity for incomplete escape sequences.
|
|
2516
|
-
- Fixed terminal content not reflowing after a resize on terminals using DEC 2048 in-band resize (kitty/Ghostty/iTerm2/WezTerm). `ProcessTerminal.columns`/`rows` returned the last cached in-band report even after the OS already knew the new size, so a SIGWINCH whose in-band report was dropped or malformed (split past the stdin flush window, `:`-subparameter fields) re-rendered the whole transcript at the stale width. OS resize events now reconcile cached in-band geometry against the live `process.stdout` dimensions, dropping a stale cached value so the next render uses the true size; a valid in-band report still re-seeds pixel sizing.
|
|
2517
|
-
|
|
2518
|
-
## [15.9.3] - 2026-06-05
|
|
2519
|
-
|
|
2520
|
-
### Fixed
|
|
2521
|
-
|
|
2522
|
-
- Fixed ED3-risk foreground streaming erasing the head of any block that alone overflows the viewport (a tall tool result drawn in one frame, or a multi-line assistant reply growing past the viewport as it streams). The live-region pin committed native scrollback only up to the sealed-prefix boundary (`liveRegionStart`), so rows of the live block that had physically scrolled above the viewport top were neither pushed into scrollback nor kept in the repainted viewport — they vanished. The commit boundary is now the viewport top: every row above the viewport enters scrollback (only the tail still visible in the viewport stays transient and deferred to the checkpoint).
|
|
2523
|
-
- Fixed the same ED3-risk live-region pin duplicating already-committed scrollback rows when a foreground stream's live region collapsed mid-turn (a tool preview shrinking to its compact result, an assistant block re-wrapping shorter, a late tool completion). Because growth commits every row above the viewport top to native scrollback, a subsequent shrink moved the bottom-anchored viewport back across those committed rows and the repaint re-drew them into the viewport — so they appeared twice on scroll-up, and with no prompt-submit checkpoint to reconcile (autonomous multi-turn runs, or the session ending into the welcome screen) the duplicate was baked permanently into terminal history. The pinned repaint now separates commit geometry from repaint geometry: a collapse clamps the repaint to the committed sealed boundary (`min(#scrollbackHighWater, liveRegionStart)`) instead of re-exposing those rows, leaving native scrollback un-duplicated without emitting ED3 under a possibly-scrolled reader; stale mutable live-region saved lines still reconcile at the next checkpoint.
|
|
2524
|
-
- Fixed hiding overlays during ED3-risk foreground streaming on unknown-viewport terminals leaving the overlay's transient rows in native scrollback. Overlay visibility reductions now bypass the streaming deferral path and rebuild once, so hidden dialog/notification sentinels are scrubbed immediately.
|
|
2525
|
-
- Fixed ED3-risk / unknown-viewport terminals (including WSL fronted by Windows Terminal) keeping the foreground-stream eager-rebuild mode active after the stream had already settled. A later scrolled content shrink or resize-with-append could then bypass the anti-yank deferral and repaint from stale geometry, jumping the viewport or replaying the wrong rows. The eager opt-in now drops immediately when no teardown render is pending, and the one-frame post-checkpoint suffix-suppression path no longer overrides geometry reflow handling.
|
|
2526
|
-
|
|
2527
|
-
Older entries are archived in [packages/tui/CHANGELOG.md@9f40fb535f35](https://github.com/can1357/oh-my-pi/blob/9f40fb535f35f2b38336a4e694ff4c0dc91d4868/packages/tui/CHANGELOG.md).
|
|
2456
|
+
Older entries are archived in [packages/tui/CHANGELOG.md@bdbb5c920f69](https://github.com/can1357/oh-my-pi/blob/bdbb5c920f693caff287c50996c116e42e37992b/packages/tui/CHANGELOG.md).
|
package/README.md
CHANGED
|
@@ -318,7 +318,7 @@ Renders markdown with syntax highlighting and theming support.
|
|
|
318
318
|
|
|
319
319
|
```typescript
|
|
320
320
|
interface MarkdownTheme {
|
|
321
|
-
heading: (text: string) => string;
|
|
321
|
+
heading: (text: string, depth: number) => string; // depth 1–6
|
|
322
322
|
link: (text: string) => string;
|
|
323
323
|
linkUrl: (text: string) => string;
|
|
324
324
|
code: (text: string) => string;
|
|
@@ -332,6 +332,9 @@ interface MarkdownTheme {
|
|
|
332
332
|
italic: (text: string) => string;
|
|
333
333
|
strikethrough: (text: string) => string;
|
|
334
334
|
underline: (text: string) => string;
|
|
335
|
+
strong?: (text: string) => string; // **strong**; defaults to bold
|
|
336
|
+
emphasis?: (text: string) => string; // *emphasis*; defaults to italic
|
|
337
|
+
tableHeader?: (text: string) => string; // defaults to bold
|
|
335
338
|
highlightCode?: (code: string, lang?: string) => string[];
|
|
336
339
|
symbols: SymbolTheme;
|
|
337
340
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ShellVizPresentation } from "@oh-my-pi/pi-wire";
|
|
2
|
+
import type { DescribeContext, NativeNode, NativeUiEvent } from "../native/node.js";
|
|
3
|
+
import type { Component } from "../tui.js";
|
|
4
|
+
/** Focused inspector host; state and replay timers remain owned by the transcript tool call. */
|
|
5
|
+
export interface ShellVisualizerHost {
|
|
6
|
+
presentation(): ShellVizPresentation | undefined;
|
|
7
|
+
replayEpoch(): number;
|
|
8
|
+
liveOrigin(): boolean;
|
|
9
|
+
action(value: string): void;
|
|
10
|
+
close(): void;
|
|
11
|
+
requestRender(): void;
|
|
12
|
+
height(): number;
|
|
13
|
+
}
|
|
14
|
+
/** Keyboard and native inspector for the exact presentation shown in the transcript. */
|
|
15
|
+
export declare class ShellVisualizer implements Component {
|
|
16
|
+
#private;
|
|
17
|
+
readonly host: ShellVisualizerHost;
|
|
18
|
+
constructor(host: ShellVisualizerHost);
|
|
19
|
+
invalidate(): void;
|
|
20
|
+
handleInput(data: string): void;
|
|
21
|
+
handleNativeEvent(event: NativeUiEvent): void;
|
|
22
|
+
describe(cx: DescribeContext): NativeNode;
|
|
23
|
+
render(width: number): string[];
|
|
24
|
+
}
|
|
@@ -47,6 +47,21 @@ export interface AutocompleteItem {
|
|
|
47
47
|
descriptionMatch?: boolean;
|
|
48
48
|
}
|
|
49
49
|
type Awaitable<T> = T | Promise<T>;
|
|
50
|
+
/**
|
|
51
|
+
* `^` model mention completion at the cursor. `unhandled` means no mention token there, or
|
|
52
|
+
* another completion outranks it, so the async {@link AutocompleteProvider.getSuggestions} decides.
|
|
53
|
+
*/
|
|
54
|
+
export type ModelMentionCompletion = {
|
|
55
|
+
kind: "unhandled";
|
|
56
|
+
} | {
|
|
57
|
+
kind: "no-match";
|
|
58
|
+
} | {
|
|
59
|
+
kind: "matched";
|
|
60
|
+
suggestions: {
|
|
61
|
+
items: AutocompleteItem[];
|
|
62
|
+
prefix: string;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
50
65
|
export interface SlashCommand {
|
|
51
66
|
name: string;
|
|
52
67
|
aliases?: string[];
|
|
@@ -94,6 +109,11 @@ export interface AutocompleteProvider {
|
|
|
94
109
|
items: AutocompleteItem[];
|
|
95
110
|
prefix: string;
|
|
96
111
|
} | null;
|
|
112
|
+
/**
|
|
113
|
+
* Synchronously list `^` model mention completions for the token at the cursor, so a
|
|
114
|
+
* shown mention popup never lags the typed text.
|
|
115
|
+
*/
|
|
116
|
+
trySyncModelMentionCompletion?(lines: string[], cursorLine: number, cursorCol: number): ModelMentionCompletion;
|
|
97
117
|
/**
|
|
98
118
|
* Synchronously try to expand text immediately before the cursor (no async I/O).
|
|
99
119
|
* Called after every single-character insert. Implementations MUST cheaply
|
|
@@ -10,11 +10,16 @@ export interface CacheInvalidation {
|
|
|
10
10
|
* reusing.
|
|
11
11
|
*
|
|
12
12
|
* The provider reports a warm prefix as `cacheRead`; a model/thinking/tool/
|
|
13
|
-
* system-prompt change
|
|
14
|
-
*
|
|
13
|
+
* system-prompt change, a history rewrite or an expired entry breaks the
|
|
14
|
+
* prefix, so the next request re-pays for the prompt past the break. We flag
|
|
15
15
|
* only the transition where a demonstrably warm cache goes cold: the previous
|
|
16
|
-
* turn must have actually READ a meaningful prefix back, and this turn
|
|
17
|
-
*
|
|
16
|
+
* turn must have actually READ a meaningful prefix back, and this turn read
|
|
17
|
+
* back less than half of it while it still reprocessed a non-trivial prompt.
|
|
18
|
+
*
|
|
19
|
+
* A collapse need not reach zero: the leading system/tool block is shared with
|
|
20
|
+
* every concurrent session on the same prompt, which keeps it warm while this
|
|
21
|
+
* session's history expires, so a cold turn still reads that block (~15k
|
|
22
|
+
* tokens) back while re-writing hundreds of thousands behind it.
|
|
18
23
|
*
|
|
19
24
|
* Requiring a prior warm read is deliberate. A turn that merely WROTE the prefix
|
|
20
25
|
* (`cacheRead` 0) has not proven the cache is live — that is the session's first
|
|
@@ -23,11 +28,14 @@ export interface CacheInvalidation {
|
|
|
23
28
|
* call outliving the provider's 5-minute cache TTL surfaced a spurious "cache
|
|
24
29
|
* miss" right under the opening message). It also collapses a run of consecutive
|
|
25
30
|
* cold turns to the single marker at the moment the cache actually broke, instead
|
|
26
|
-
* of repeating the banner on every turn while it re-warms.
|
|
31
|
+
* of repeating the banner on every turn while it re-warms. Measuring the loss
|
|
32
|
+
* against what the predecessor READ (not what it wrote) keeps both guarantees
|
|
33
|
+
* when only the shared block was warm: nothing proven live was lost.
|
|
27
34
|
*
|
|
28
35
|
* Returns `undefined` (no marker) for the first turn, turns whose predecessor
|
|
29
|
-
* never read a warm prefix, tiny contexts, turns that
|
|
30
|
-
* crucially — turns on providers with
|
|
36
|
+
* never read a warm prefix, tiny contexts, turns that read back at least half
|
|
37
|
+
* of the predecessor's warm prefix, and — crucially — turns on providers with
|
|
38
|
+
* *implicit* best-effort caching. Only an
|
|
31
39
|
* explicit, prefix-controlled cache (Anthropic / Bedrock `cache_control`)
|
|
32
40
|
* re-creates the prefix on a cold turn (`cacheWrite > 0`); implicit caches
|
|
33
41
|
* (Google / OpenAI / Fireworks) report `cacheWrite: 0` and drop `cacheRead` to
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
import type { AgentTool } from "@oh-my-pi/pi-agent-core";
|
|
15
15
|
import { type TUI } from "../tui.js";
|
|
16
|
-
import type { MessageRenderer } from "./extension-types.js";
|
|
16
|
+
import type { AssistantTextRenderer, MessageRenderer } from "./extension-types.js";
|
|
17
17
|
import { type TranscriptEntryLike as TranscriptEntry } from "./transcript-entry.js";
|
|
18
18
|
import { TranscriptContainer } from "../chrome/transcript-container.js";
|
|
19
19
|
export interface ChatTranscriptBuilderDeps {
|
|
@@ -30,6 +30,8 @@ export interface ChatTranscriptBuilderDeps {
|
|
|
30
30
|
linkTargets?: ReadonlyMap<string, string>;
|
|
31
31
|
/** Draw charts under numeric tables; false for transcripts that are not the main session's. Default: true. */
|
|
32
32
|
tableCharts?: boolean;
|
|
33
|
+
/** Extension assistant text renderers the replayed replies draw with, as the live transcript does. */
|
|
34
|
+
textRenderers?: readonly AssistantTextRenderer[];
|
|
33
35
|
requestRender: () => void;
|
|
34
36
|
}
|
|
35
37
|
export declare class ChatTranscriptBuilder {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/** Process-wide display preferences applied by the host settings hooks. */
|
|
2
2
|
export interface ChatTranscriptDisplayPreferences {
|
|
3
3
|
hideToolActivity: boolean;
|
|
4
|
+
/** Show the interactive shell execution visualization instead of the plain command. */
|
|
5
|
+
shellVisualization: boolean;
|
|
4
6
|
readToolResultPreview: boolean;
|
|
5
7
|
showImages: boolean;
|
|
6
8
|
cacheMissMarker: boolean;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type { AssistantMessage } from "@oh-my-pi/pi-ai";
|
|
2
|
+
import type { TspText } from "@oh-my-pi/pi-wire";
|
|
2
3
|
import type { Component, TUI } from "../tui.js";
|
|
3
4
|
import type { Theme } from "../theme/theme.js";
|
|
4
|
-
import type {
|
|
5
|
+
import type { TodoItem } from "../tools/todo.js";
|
|
6
|
+
import type { BashExecutionMessage, CustomMessage, HookMessage, PythonExecutionMessage } from "./messages.js";
|
|
7
|
+
import type { NotificationRule } from "./ttsr-notification.js";
|
|
5
8
|
export type ExtensionUiComponent = Component & {
|
|
6
9
|
dispose?(): void;
|
|
7
10
|
};
|
|
@@ -48,6 +51,74 @@ export interface AssistantTextRendering {
|
|
|
48
51
|
/** Index in the full reply's `content` of this component's first block; a segment after a tool call starts past it. */
|
|
49
52
|
contentOffset: number;
|
|
50
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* One transcript block a {@link TranscriptPresenter} decides the display of. Later omp versions
|
|
56
|
+
* add block types; answer `undefined` for a `type` you do not know.
|
|
57
|
+
*
|
|
58
|
+
* - `toolCall`: a model tool call, `id` its `toolCallId`. `result` arrives with the call's first
|
|
59
|
+
* result frame; `isPartial` stays true while the call still streams progress.
|
|
60
|
+
* - `message`: a session message drawn as its own block, `id` the decimal `message.timestamp`
|
|
61
|
+
* (shared by messages recorded in the same millisecond).
|
|
62
|
+
* `custom` messages with `customType` `"advisor"`, `"skill-prompt"`, `"lsp-late-diagnostic"`,
|
|
63
|
+
* `"async-result"` or `"launch-completion"`, and `!`/`$` runs (`bashExecution`,
|
|
64
|
+
* `pythonExecution`). A `!`/`$` run still going has a provisional message and id; it is asked
|
|
65
|
+
* again with the recorded message once the session records the run. In Tern, late diagnostics
|
|
66
|
+
* an edit/write card takes are drawn with that card instead, so an `"lsp-late-diagnostic"`
|
|
67
|
+
* block appears only for the files no card took.
|
|
68
|
+
* - `event`: a TTSR rule hit or an incomplete-todo reminder, shaped like the extension event of
|
|
69
|
+
* the same `type`. These exist only in the session that raised them; `id` is unique per process.
|
|
70
|
+
*
|
|
71
|
+
* Read-only, and not a copy: `args`, `result`'s `content` and `details`, `message` and `event`
|
|
72
|
+
* are the live objects omp draws the block from, often the session's own message data. Never
|
|
73
|
+
* mutate them: the change would reach the block and possibly the session.
|
|
74
|
+
*/
|
|
75
|
+
export type TranscriptBlock = {
|
|
76
|
+
readonly type: "toolCall";
|
|
77
|
+
readonly id: string;
|
|
78
|
+
readonly toolName: string;
|
|
79
|
+
readonly args: unknown;
|
|
80
|
+
readonly result?: {
|
|
81
|
+
readonly content: readonly unknown[];
|
|
82
|
+
readonly details?: unknown;
|
|
83
|
+
};
|
|
84
|
+
readonly isError: boolean;
|
|
85
|
+
readonly isPartial: boolean;
|
|
86
|
+
} | {
|
|
87
|
+
readonly type: "message";
|
|
88
|
+
readonly id: string;
|
|
89
|
+
readonly message: CustomMessage | BashExecutionMessage | PythonExecutionMessage;
|
|
90
|
+
} | {
|
|
91
|
+
readonly type: "event";
|
|
92
|
+
readonly id: string;
|
|
93
|
+
readonly event: {
|
|
94
|
+
readonly type: "ttsr_triggered";
|
|
95
|
+
readonly rules: readonly NotificationRule[];
|
|
96
|
+
} | {
|
|
97
|
+
readonly type: "todo_reminder";
|
|
98
|
+
readonly todos: readonly TodoItem[];
|
|
99
|
+
readonly attempt: number;
|
|
100
|
+
readonly maxAttempts: number;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* How a transcript block is drawn: `undefined` defers to the next presenter (and, after the
|
|
105
|
+
* last, to `"full"`); `"full"` is omp's own card; `"hidden"` draws nothing, as hidden tool
|
|
106
|
+
* activity does; `"compact"` is one row from omp's own summary. `{ compact: { label, rows } }`
|
|
107
|
+
* replaces that row's text with `label` and adds one row per `rows` entry below it. Spans use the
|
|
108
|
+
* semantic tokens and theme colour names of {@link TspText}.
|
|
109
|
+
*/
|
|
110
|
+
export type TranscriptPresentation = undefined | "full" | "hidden" | "compact" | {
|
|
111
|
+
readonly compact: {
|
|
112
|
+
readonly label?: TspText;
|
|
113
|
+
readonly rows?: readonly TspText[];
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
/**
|
|
117
|
+
* Display-only choice of how one transcript block is drawn. Presenters are asked in extension
|
|
118
|
+
* load order; the first answer other than `undefined` wins. A block the user expanded is always
|
|
119
|
+
* drawn in full.
|
|
120
|
+
*/
|
|
121
|
+
export type TranscriptPresenter = (block: TranscriptBlock) => TranscriptPresentation;
|
|
51
122
|
export interface HookMessageRenderOptions {
|
|
52
123
|
/** Whether the view is expanded */
|
|
53
124
|
expanded: boolean;
|
|
@@ -21,12 +21,21 @@ export declare function readArgsCollapseIntoGroup(args: unknown): boolean;
|
|
|
21
21
|
export declare function groupedReadUsageCallIds(message: AssistantMessage): string[] | undefined;
|
|
22
22
|
type ReadToolGroupOptions = {
|
|
23
23
|
showContentPreview?: boolean;
|
|
24
|
+
/** Ask the extension transcript presenters; false for a replayed transcript (overlays). Default: true. */
|
|
25
|
+
transcriptPresenters?: boolean;
|
|
24
26
|
};
|
|
25
27
|
export declare class ReadToolGroupComponent extends Container implements ToolExecutionHandle {
|
|
26
28
|
#private;
|
|
27
29
|
constructor(options?: ReadToolGroupOptions);
|
|
30
|
+
/**
|
|
31
|
+
* Reads a presenter leaves full draw as the group, at the first full read's place; a compact
|
|
32
|
+
* read is a row of its own; hidden draws nothing.
|
|
33
|
+
*/
|
|
28
34
|
render(width: number): readonly string[];
|
|
35
|
+
refreshTranscriptPresentation(ids?: ReadonlySet<string>): boolean;
|
|
29
36
|
isTranscriptBlockFinalized(): boolean;
|
|
37
|
+
/** Compact only while every read it draws is a compact row. */
|
|
38
|
+
isTranscriptBlockCompact(): boolean;
|
|
30
39
|
finalize(): void;
|
|
31
40
|
/**
|
|
32
41
|
* Force the group terminal even if an entry never received its result (the
|
|
@@ -63,11 +72,14 @@ export declare class ReadToolGroupComponent extends Container implements ToolExe
|
|
|
63
72
|
setExecutionStarted(_toolCallId?: string): void;
|
|
64
73
|
setExpanded(expanded: boolean): void;
|
|
65
74
|
setToolActivityVisible(visible: boolean): void;
|
|
75
|
+
/** The reads' Spotlight notices, in order: blocks of their own right after the group's card. */
|
|
76
|
+
nativeTrailers(): readonly Component[];
|
|
66
77
|
getComponent(): Component;
|
|
67
78
|
/**
|
|
68
79
|
* Mirrors the terminal's toggles: the `tool` head (the group's root) is
|
|
69
80
|
* `Ctrl+O`'s expansion; a fallback preview card collapses on its own
|
|
70
|
-
* (`setExpanded` resets those).
|
|
81
|
+
* (`setExpanded` resets those). A compact read's row (`c<id>`) opens that
|
|
82
|
+
* read; the full rows beside compact ones (`full`) open and close their reads.
|
|
71
83
|
*/
|
|
72
84
|
handleNativeEvent(event: NativeUiEvent): void;
|
|
73
85
|
/**
|
|
@@ -75,7 +87,8 @@ export declare class ReadToolGroupComponent extends Container implements ToolExe
|
|
|
75
87
|
* the fallback: a bare `card` (role `omp.tool.read`) with `Read <path>` or
|
|
76
88
|
* `Read (N)` in the head, a `list` of path items (status tone, link,
|
|
77
89
|
* correction and conflict detail, nested usage) and a clamped preview per
|
|
78
|
-
* read when content previews are on.
|
|
90
|
+
* read when content previews are on. Compact reads become rows of their
|
|
91
|
+
* own (keyed `c<toolCallId>`) beside that group.
|
|
79
92
|
*/
|
|
80
93
|
describe(cx?: DescribeContext): NativeNode;
|
|
81
94
|
}
|
|
@@ -18,6 +18,7 @@ export declare class SkillMessageComponent extends Container {
|
|
|
18
18
|
#private;
|
|
19
19
|
constructor(message: CustomMessage<SkillPromptDetails>, imageLinks?: readonly (string | undefined)[]);
|
|
20
20
|
setExpanded(expanded: boolean): void;
|
|
21
|
+
isExpanded(): boolean;
|
|
21
22
|
handleNativeEvent(event: NativeUiEvent): void;
|
|
22
23
|
/**
|
|
23
24
|
* A user-toned card (role `omp.skill`): the skill chip and prompt size in
|