@oh-my-pi/pi-tui 18.14.1 → 18.15.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 +53 -33
- package/README.md +1 -1
- package/dist/types/charts/table-data.d.ts +4 -2
- package/dist/types/chat/transcript-render-helpers.d.ts +11 -3
- package/dist/types/chrome/transcript-status.d.ts +2 -2
- package/dist/types/native/describe.d.ts +4 -2
- package/dist/types/native/overlay.d.ts +42 -2
- package/dist/types/native/state.d.ts +4 -0
- package/dist/types/overlays/hook-editor.d.ts +2 -0
- package/dist/types/overlays/jobs-panel.d.ts +4 -0
- package/dist/types/prompt/composer.d.ts +13 -5
- package/dist/types/render/render-utils.d.ts +19 -0
- package/dist/types/terminal-capabilities.d.ts +1 -1
- package/dist/types/theme/theme.d.ts +1 -1
- package/dist/types/theme/tui-adapters.d.ts +2 -0
- package/dist/types/thinking.d.ts +8 -6
- package/dist/types/tools/ast-grep.d.ts +2 -0
- package/dist/types/tools/eval.d.ts +2 -0
- package/dist/types/tools/find.d.ts +1 -1
- package/dist/types/tools/grouped-file-output.d.ts +100 -19
- package/dist/types/tools/hashline-format.d.ts +5 -0
- package/dist/types/tools/native-view.d.ts +2 -0
- package/dist/types/tools/read.d.ts +14 -4
- package/dist/types/tools/task.d.ts +2 -2
- package/dist/types/tools/wait.d.ts +2 -0
- package/package.json +9 -9
- package/src/apps/git/git-tui.ts +10 -17
- package/src/apps/git/sidebar.ts +21 -35
- package/src/apps/ps-top.ts +4 -12
- package/src/charts/chart-plan.ts +0 -29
- package/src/charts/table-data.ts +55 -6
- package/src/chat/chat-transcript-builder.ts +4 -2
- package/src/chat/read-tool-group.ts +48 -21
- package/src/chat/transcript-render-helpers.ts +54 -18
- package/src/chrome/transcript-status.ts +5 -3
- package/src/native/backend.ts +7 -3
- package/src/native/describe.ts +9 -4
- package/src/native/overlay.ts +124 -16
- package/src/native/state.ts +25 -5
- package/src/overlays/extensions/extension-dashboard.ts +7 -8
- package/src/overlays/hook-editor.ts +6 -0
- package/src/overlays/jobs-panel.ts +45 -19
- package/src/overlays/login-dialog.ts +8 -26
- package/src/overlays/tree-selector.ts +64 -18
- package/src/overlays/usage-dashboard.ts +2 -4
- package/src/prompt/composer.ts +17 -5
- package/src/render/file-list.ts +4 -7
- package/src/render/render-utils.ts +33 -3
- package/src/terminal-capabilities.ts +5 -0
- package/src/theme/theme-class.ts +12 -3
- package/src/theme/theme.ts +1 -0
- package/src/theme/tui-adapters.ts +8 -3
- package/src/thinking.ts +17 -11
- package/src/tmux.ts +1 -0
- package/src/tools/ast-edit.ts +48 -93
- package/src/tools/ast-grep.ts +31 -67
- package/src/tools/edit.ts +11 -2
- package/src/tools/eval.ts +2 -0
- package/src/tools/find.ts +13 -5
- package/src/tools/glob.ts +2 -1
- package/src/tools/grep.ts +49 -287
- package/src/tools/grouped-file-output.ts +414 -103
- package/src/tools/hashline-format.ts +5 -0
- package/src/tools/lsp.ts +172 -22
- package/src/tools/native-view.ts +11 -5
- package/src/tools/proc-render.ts +2 -2
- package/src/tools/read.ts +20 -5
- package/src/tools/task.ts +2 -2
- package/src/tools/wait.ts +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,58 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [18.15.0] - 2026-11-01
|
|
6
|
+
|
|
7
|
+
### Breaking Changes
|
|
8
|
+
|
|
9
|
+
- `GroupedLineContext.isUrl` is replaced by `url`, the internal URL a header names or a body row belongs to ([#17608](https://github.com/can1357/oh-my-pi/pull/17608) by [@JustasMasiulis](https://github.com/JustasMasiulis))
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- Added `FILE_NAME_COLOR`, `formatStyledPath` and `pathNameStart` to `render/render-utils` for paths in tool bodies and Tern file rows; `createGroupedRowStyler`, `groupedLinkTargets`, `fitGroupsToBudget`, `groupsByFile` and `isMatchRow` to `tools/grouped-file-output`; `splitReadQuery` to `tools/read`; and `HASHLINE_TAG_SUFFIX_RE` to `tools/hashline-format`. `classifyGroupedLines` reports each file header's full `displayPath` and `suffix`, and a `TranscriptStatusPart` without `color` keeps its already-styled text ([#17608](https://github.com/can1357/oh-my-pi/pull/17608) by [@JustasMasiulis](https://github.com/JustasMasiulis))
|
|
14
|
+
- `JobsPanelJob.caption`: the jobs sheet's detail pane shows it, muted, between the job's purpose and its command (`omp.jobs.caption`) ([#17649](https://github.com/can1357/oh-my-pi/pull/17649) by [@wolfiesch](https://github.com/wolfiesch))
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- The Background jobs sheet names each job by what it is for when the model said so, shows that above the full command in the detail pane, and no longer repeats the command in an empty widget box for jobs that print nothing ([#17649](https://github.com/can1357/oh-my-pi/pull/17649) by [@wolfiesch](https://github.com/wolfiesch))
|
|
19
|
+
- File paths in tool output share one style: a dim directory and the file name in the custom-message label color (bronze in titanium), with line locations and selectors (`:1-175`, `:42:14`, `?q=`) muted. This covers Grep, AST Grep, AST Edit, Glob, Find, LSP, diagnostics, grouped Reads and file mentions; Glob's folder icon is muted like the file-type icons, and paths in tool headers keep their color ([#17608](https://github.com/can1357/oh-my-pi/pull/17608) by [@JustasMasiulis](https://github.com/JustasMasiulis))
|
|
20
|
+
- Grep, AST Grep and AST Edit results label each file with its full path instead of the model-facing `# dir/` and `## file#tag` headers, and each file gets its own tree branch. Their collapsed previews fit the same row budget the same way, cutting the last file short rather than overflowing, and end with `… N more matches` (`… N more files` for AST Edit) ([#17608](https://github.com/can1357/oh-my-pi/pull/17608) by [@JustasMasiulis](https://github.com/JustasMasiulis))
|
|
21
|
+
- AST Grep match rows link to their line, as Grep's do ([#17608](https://github.com/can1357/oh-my-pi/pull/17608) by [@JustasMasiulis](https://github.com/JustasMasiulis))
|
|
22
|
+
- LSP diagnostics carry their severity color on the `[error]`/`[warning]` tag instead of the location, and collapsed diagnostic rows now show that tag ([#17608](https://github.com/can1357/oh-my-pi/pull/17608) by [@JustasMasiulis](https://github.com/JustasMasiulis))
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
|
|
26
|
+
- Rex sessions now render Kitty graphics without forcing the protocol, including when only `TERM=xterm-rex` identifies the client ([#17651](https://github.com/can1357/oh-my-pi/issues/17651)).
|
|
27
|
+
- Fixed collapsed AST Grep showing no matches when its first file or folder was taller than the preview, and its `… N more` row counting hidden folders instead of hidden matches ([#17608](https://github.com/can1357/oh-my-pi/pull/17608) by [@JustasMasiulis](https://github.com/JustasMasiulis))
|
|
28
|
+
- Fixed collapsed AST Edit overflowing its preview when the first file's diff was long ([#17608](https://github.com/can1357/oh-my-pi/pull/17608) by [@JustasMasiulis](https://github.com/JustasMasiulis))
|
|
29
|
+
- Fixed search and diagnostic file paths in Tern dropping the leading `/` of absolute paths and a folder's own `(…)` ending, and AST Edit diffs in Tern losing highlighting to the file's `#tag`; a file name ending in lowercase or other-length `#…` text keeps it ([#17608](https://github.com/can1357/oh-my-pi/pull/17608) by [@JustasMasiulis](https://github.com/JustasMasiulis))
|
|
30
|
+
- Fixed a read of a URL drawing as dead text in the folded read row: its target is not a file path, so no link was built for it, and clicking the URL did nothing. The row (and each row of a grouped read) now links to the URL itself, gaining an `https://` scheme for a bare `www.` host ([#17598](https://github.com/can1357/oh-my-pi/pull/17598) by [@iacore](https://github.com/iacore))
|
|
31
|
+
- Fixed replayed transcripts ignoring a registered `async-result` message renderer, so a replayed conversation rendered differently from the live one ([#17372](https://github.com/can1357/oh-my-pi/pull/17372) by [@AlexBrd999](https://github.com/AlexBrd999), from [#14484](https://github.com/can1357/oh-my-pi/pull/14484) by [@F0Rextasy](https://github.com/F0Rextasy); [#14131](https://github.com/can1357/oh-my-pi/issues/14131))
|
|
32
|
+
|
|
33
|
+
## [18.14.2] - 2026-10-31
|
|
34
|
+
|
|
35
|
+
### Added
|
|
36
|
+
|
|
37
|
+
- Added `assertModelSupportsEffortCeiling()`, which throws when a model has no supported thinking effort at or below a `task.maxEffort` ceiling ([#12229](https://github.com/can1357/oh-my-pi/pull/12229) by [@Xytronix](https://github.com/Xytronix))
|
|
38
|
+
- Added `iconButton()`, `quietButton()` and `segmentedTabs()` to `native/overlay`, and `disabled`, `busy` and `icon` options to `actionButton()`
|
|
39
|
+
- Added `nativeTail` to `Composer.setRuntimeChildren` options: containers whose children continue the native surface's `main` after the transcript instead of riding in the dock
|
|
40
|
+
- Added `isHighlightLanguage` and `createCodeFrameStyler` for renderers that highlight source lines in their file's language ([#17550](https://github.com/can1357/oh-my-pi/pull/17550) by [@JustasMasiulis](https://github.com/JustasMasiulis))
|
|
41
|
+
|
|
42
|
+
### Changed
|
|
43
|
+
|
|
44
|
+
- Grep and read results with gaps between line runs now render in Tern as one code block that scrolls sideways as a whole, with `…` gap rows aligned in the line-number gutter
|
|
45
|
+
- Tern builds that draw the `button` kind get omp's buttons as real buttons (pointer cursor, accessible pressed/disabled state, a disabled button's tooltip says why) and segmented controls as `tabs` `variant: "segmented"`; older Tern builds keep the role-styled rows
|
|
46
|
+
- Source lines in Grep, AST Grep and Find results and LSP symbol names are syntax-highlighted in their file's language instead of drawn in one color; consecutive lines highlight together, so multi-line strings and comments keep their colors ([#17550](https://github.com/can1357/oh-my-pi/pull/17550) by [@JustasMasiulis](https://github.com/JustasMasiulis))
|
|
47
|
+
|
|
48
|
+
### Fixed
|
|
49
|
+
|
|
50
|
+
- Fixed table charts plotting a ratio column against the timings it divides (`ratio` 0.997 beside `C++ (ms)` drew as "719× less"): `analyzeTable` reads a column equal to the quotient of two others as restating them, written bare or as `×`
|
|
51
|
+
- Fixed IRC coordination cards remaining visible when Hide Tool Activity is enabled, including incoming messages, automatic replies, relays, and workpool messages in live and replayed transcripts ([#17498](https://github.com/can1357/oh-my-pi/pull/17498) by [@dannyboy-ai](https://github.com/dannyboy-ai)).
|
|
52
|
+
- Fixed text after a nested color losing the outer color, such as the rest of the `/mcp` and `/ssh` hints after the highlighted command (`Run /mcp list to see all configured servers.`) falling back to the default text color instead of staying muted ([#17521](https://github.com/can1357/oh-my-pi/pull/17521) by [@JustasMasiulis](https://github.com/JustasMasiulis))
|
|
53
|
+
- Fixed LSP definition, type definition and implementation results showing the raw `Found 1 definition(s):` text; the response now counts them (`1 definition`) and shows each location over its source lines, its own line marked like a grep match ([#17549](https://github.com/can1357/oh-my-pi/pull/17549) by [@JustasMasiulis](https://github.com/JustasMasiulis))
|
|
54
|
+
- Fixed an LSP definition, type definition or implementation location whose path starts with whitespace being dropped, with its source lines shown under the previous location
|
|
55
|
+
- Fixed session tree user and assistant turns looking identical in themes whose `accent` and `success` colors match or nearly match (`dark-terminal`, `dark-poimandres`, `light-poimandres`): user rows are now bold, the `assistant:` label switches to the path color, and custom and advisor messages are muted ([#17520](https://github.com/can1357/oh-my-pi/pull/17520) by [@wolfiesch](https://github.com/wolfiesch))
|
|
56
|
+
|
|
5
57
|
## [18.14.1] - 2026-10-31
|
|
6
58
|
|
|
7
59
|
### Added
|
|
@@ -2454,36 +2506,4 @@
|
|
|
2454
2506
|
|
|
2455
2507
|
- Fixed the OSC 11 appearance poll re-querying every 2s forever on terminals that support Mode 2031 but never change theme, whose repeated OSC 11/DA1 writes cleared the user's active text selection (breaking copy every 2 seconds). The poll now stops as soon as DECRQM confirms Mode 2031 support, since push notifications make polling redundant.
|
|
2456
2508
|
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
### Added
|
|
2460
|
-
|
|
2461
|
-
- Added Kitty `CSI 22 J` screen-to-scrollback clears for non-destructive full paints, while keeping ED3 for destructive history/session rebuilds.
|
|
2462
|
-
- Added Kitty OSC 99 rich notification formatting and startup capability probing.
|
|
2463
|
-
- Added Kitty OSC 66 text-sized Markdown H1 headings (2x scale) plus native text-width support for OSC 66 spans. Off by default and gated to Kitty (the only terminal implementing OSC 66) via the `TERMINAL.textSizing` capability; hosts enable it through `setTextSizing`.
|
|
2464
|
-
- Added Kitty Unicode placeholder image rendering (`U=1` + U+10EEEE with explicit row/column diacritics): inline images are drawn as real text cells that carry the image id in their foreground color, so they survive horizontal slicing, reflow, and overlapping draws instead of relying on cursor-positioned `a=p` placements. Enabled by default on Kitty-family terminals; opt out with `PI_NO_KITTY_PLACEHOLDERS=1`, and falls back to direct placement when a grid exceeds the diacritic table's addressable range.
|
|
2465
|
-
- Added Kitty temp-file image transmission (`t=t`): on local sessions, decoded PNG bytes are written to a `tty-graphics-protocol` temp file and the path is sent instead of in-band base64, gated behind a startup `a=q,t=t` support probe. Controlled by `PI_KITTY_IMAGE_TRANSMISSION=direct|temp-file|auto`; disabled over SSH unless explicitly forced.
|
|
2466
|
-
- Added DECRQM capability detection for DEC private modes 2026 (synchronized output) and 2048 (in-band resize). Synchronized-output paint wrappers are dropped when the terminal reports 2026 unsupported (preserving the `PI_NO_SYNC_OUTPUT` override), and DEC 2048 in-band resize is enabled when supported — reported geometry and cell pixel size are updated from `CSI 48 ; rows ; cols ; yPx ; xPx t` reports, with SIGWINCH and `CSI 16 t` kept as fallbacks.
|
|
2467
|
-
- Added an injectable render scheduler for TUI tests, allowing deterministic render drains without patching global clocks or event-loop timing.
|
|
2468
|
-
- Added `ImageBudget`, an inline-image cap that keeps only the most recent N images as live terminal graphics and demotes older ones to their text fallback. Once a new image pushes the count past the cap, the renderer hides the oldest via a full redraw plus an explicit Kitty graphics purge (`a=d,d=I`) — text-clear escapes (`CSI 2 J`/`CSI 3 J`) do not remove Kitty images. Configure the cap via `TUI#setMaxInlineImages` (`0` disables it).
|
|
2469
|
-
- Changed Kitty inline images to a transmit-once + placement scheme: the base64 data is sent a single time (`a=t`) keyed by a stable image id, then every repaint emits only the tiny placement (`a=p,i=…,p=…`). Repaints — including full redraws — no longer re-send image data or stack duplicate placements, and the diff/line buffers and render caches hold short placement strings instead of multi-KB base64. The `ImageBudget` doubles as the transmit store (it tracks which ids are loaded and re-transmits after a purge frees the data). iTerm2/Sixel, which have no addressable image store, keep sending inline data as before.
|
|
2470
|
-
- Added a renderer-level DECCARA rectangular-SGR optimizer that paints solid background panels/rows (Box/Text/Markdown fills, status bars, any full-width `theme.bg` row) as a single coalesced rectangle escape (`CSI 2*x` / `CSI Pt;Pl;Pb;Pr;<sgr>$r` / `CSI *x`) instead of emitting a full-width run of background-styled spaces on every visible row. It operates at emit time on the final ANSI strings — components are unchanged — and strips only trailing padding it can prove sits under a single non-default background span, coalescing vertically adjacent identical fills into one rectangle and falling back to the original bytes whenever the rectangle would not save bytes. Enabled only on Kitty, which implements the SGR-background extension (`docs/deccara.rst`); **Ghostty is intentionally excluded** because its `CSI $r` is unimplemented (ghostty-org/ghostty#632) and would drop the background entirely. Scrollback-bound rows and the append/scroll paths always keep the padded representation so native history preserves colored cells, and the `PI_NO_DECCARA` kill switch (plus tmux/screen/zellij detection) forces the fallback.
|
|
2471
|
-
- Added `CMUX_SURFACE_ID` environment variable support to `getTerminalId()`, so cmux terminal surfaces get a stable identifier alongside kitty, tmux, macOS Terminal.app, and Windows Terminal — enabling per-surface session breadcrumbs for `omp -c` in cmux.
|
|
2472
|
-
|
|
2473
|
-
### Changed
|
|
2474
|
-
|
|
2475
|
-
- Changed TUI tests to use Ghostty's VT engine (`ghostty-web`) instead of `@xterm/headless`.
|
|
2476
|
-
- Changed the default inline-image live graphics budget from 3 to 8 images.
|
|
2477
|
-
|
|
2478
|
-
### Fixed
|
|
2479
|
-
|
|
2480
|
-
- Fixed the DECCARA background-fill optimizer rejecting or repainting the wrong cells when a trailing fill crossed from default-background spaces into colored spaces.
|
|
2481
|
-
- Fixed DEC private-mode reports with DECRPM status 3/4 being treated as unsupported, so permanent 2026/2048 reports stay recognized.
|
|
2482
|
-
- Fixed OSC 66 text-sizing width and slicing edge cases, including ZWJ emoji payloads and partial slices through scaled spans.
|
|
2483
|
-
- Fixed focused `Input` components following `TUI#setShowHardwareCursor`, so single-line prompts render either the terminal cursor or software cursor consistently with the editor.
|
|
2484
|
-
- Fixed the DECCARA background-fill optimizer painting fills on the wrong rows ("split into unaligned halves") in the differential repaint path. When a diff grew the transcript past the viewport, writing the rewritten rows scrolled the terminal, but the absolute DECCARA rectangle coordinates were derived from the pre-scroll viewport top, so every fill landed `scrollAmount` rows too low while the relatively-positioned text settled correctly; rows scrolled into history were also shortened, dropping their background padding from native scrollback. Rectangles now target the post-scroll rows and only rows remaining in the final viewport are optimized.
|
|
2485
|
-
- Fixed native scrollback desynchronization after terminal width or height changes reflowed overflowing content while the viewport was not at the bottom
|
|
2486
|
-
- Fixed a notification chip (or any injected block) rendering on top of an actively streaming tool render on ED3-risk terminals (Ghostty/kitty/Alacritty/iTerm2). While a foreground tool streams, its header's elapsed-time counter ticks every frame; once output scrolls the header above the viewport top, each tick is an offscreen edit that — because the eager scrollback-rebuild opt-in is gated off on these terminals — repaints the viewport in place and advances the rendered line count without committing the new overflow to native history. `#scrollbackHighWater` then lagged the logical viewport top, so a later content shrink whose changes landed in the visible region slipped past the shrink-across-boundary guard and reached the differential emitter, which is anchored to `#maxLinesRendered - height`: it rewrote only the suffix, dropped the newly exposed top row, and left a blank at the bottom, drifting every row below the edit one line up so it painted over the rows above. Such shrinks now re-anchor the bottom of the viewport with a non-destructive repaint, and the foreground-streaming shrink-across-boundary case repaints the live tail instead of padding and pinning the pre-shrink viewport.
|
|
2487
|
-
- Fixed a terminal resize during foreground-tool streaming on an unknown-viewport / ED3-risk host (Ghostty/kitty/Alacritty/iTerm2/WSL) leaving native scrollback permanently out of sync, so scrolling back after the turn showed missing rows. A pure geometry resize (no content change) takes the in-place viewport-repaint path, which — unlike a content-bearing resize that rebuilds via the geometry branch — never flagged native history. Because the prompt-submit checkpoint (`refreshNativeScrollbackIfDirty`) only rebuilds when scrollback is marked dirty on these hosts, the discrepancy was never reconciled. Overflowing geometry repaints whose viewport is not known to be at the bottom now mark scrollback dirty so the next checkpoint rebuilds an exact copy of the transcript.
|
|
2488
|
-
|
|
2489
|
-
Older entries are archived in [packages/tui/CHANGELOG.md@6693ddbfd58c](https://github.com/can1357/oh-my-pi/blob/6693ddbfd58ce9edcdc0dc3fe98a8882c9bae834/packages/tui/CHANGELOG.md).
|
|
2509
|
+
Older entries are archived in [packages/tui/CHANGELOG.md@6b354a56a890](https://github.com/can1357/oh-my-pi/blob/6b354a56a890b69b6bc9503c16c510be33675b5a/packages/tui/CHANGELOG.md).
|
package/README.md
CHANGED
|
@@ -493,7 +493,7 @@ const spacer = new Spacer(2); // 2 empty lines (default: 1)
|
|
|
493
493
|
|
|
494
494
|
### Image
|
|
495
495
|
|
|
496
|
-
Renders images inline for terminals that support the Kitty graphics protocol (Kitty, Ghostty, WezTerm, and Warp on macOS/Linux), iTerm2 inline images or SIXEL. Falls back to a text placeholder on unsupported terminals.
|
|
496
|
+
Renders images inline for terminals that support the Kitty graphics protocol (including Kitty, Ghostty, WezTerm, Rex, and Warp on macOS/Linux), iTerm2 inline images or SIXEL. Falls back to a text placeholder on unsupported terminals.
|
|
497
497
|
|
|
498
498
|
```typescript
|
|
499
499
|
interface ImageTheme {
|
|
@@ -101,8 +101,10 @@ export interface TableColumn {
|
|
|
101
101
|
/**
|
|
102
102
|
* Index of the measure column this one restates, read from the values: a
|
|
103
103
|
* proportional copy (`pass` 33/38 beside `pass%` 87%, `Samples` beside `% of
|
|
104
|
-
* Total`, `Leverage vs $200` beside the cost)
|
|
105
|
-
* (`Offset` summing `Verts`)
|
|
104
|
+
* Total`, `Leverage vs $200` beside the cost), a running total of it
|
|
105
|
+
* (`Offset` summing `Verts`), or its ratio to another column of its unit
|
|
106
|
+
* (`ratio` 0.997 for `Python (ms)` ÷ `C++ (ms)`, `Speedup` 4.1×: the
|
|
107
|
+
* numerator's index). Such a column is never a measure of its own.
|
|
106
108
|
*/
|
|
107
109
|
readonly restates?: number;
|
|
108
110
|
}
|
|
@@ -8,6 +8,7 @@ import type { AgentMessage } from "@oh-my-pi/pi-agent-core";
|
|
|
8
8
|
import { type Component } from "../tui.js";
|
|
9
9
|
import { type FileMentionMessage } from "./messages.js";
|
|
10
10
|
import { ToolActivityContainer } from "../chrome/tool-activity.js";
|
|
11
|
+
import type { MessageRenderer } from "./extension-types.js";
|
|
11
12
|
import { type TranscriptBlock } from "../chrome/transcript-container.js";
|
|
12
13
|
type CustomOrHookMessage = Extract<AgentMessage, {
|
|
13
14
|
role: "custom" | "hookMessage";
|
|
@@ -21,6 +22,13 @@ type AssistantAgentMessage = Extract<AgentMessage, {
|
|
|
21
22
|
* row per job.
|
|
22
23
|
*/
|
|
23
24
|
export declare function buildAsyncResultBlock(message: CustomOrHookMessage): ToolActivityContainer;
|
|
25
|
+
/**
|
|
26
|
+
* The `async-result` card for both transcript surfaces: a registered renderer owns it (#14131);
|
|
27
|
+
* the built-in block covers no renderer, a declining renderer, and a throwing one.
|
|
28
|
+
*/
|
|
29
|
+
export declare function buildAsyncResultComponent(message: CustomOrHookMessage, renderer: MessageRenderer | undefined): Component & {
|
|
30
|
+
setExpanded(expanded: boolean): void;
|
|
31
|
+
};
|
|
24
32
|
/**
|
|
25
33
|
* Render a `launch-completion` custom message (terminal supervised-process
|
|
26
34
|
* exits from the launch broker) as a transcript block of one compact
|
|
@@ -28,9 +36,9 @@ export declare function buildAsyncResultBlock(message: CustomOrHookMessage): Too
|
|
|
28
36
|
*/
|
|
29
37
|
export declare function buildLaunchCompletionBlock(message: CustomOrHookMessage): ToolActivityContainer;
|
|
30
38
|
/**
|
|
31
|
-
* Render
|
|
32
|
-
* `irc:relay`) as a
|
|
33
|
-
* expanded-state getter for the cached card.
|
|
39
|
+
* Render an IRC coordination custom message (`irc:incoming` / `irc:autoreply` /
|
|
40
|
+
* `irc:relay` / `irc:workpool`) as a tool-activity card. `getExpanded` supplies
|
|
41
|
+
* the live expanded-state getter for the cached card.
|
|
34
42
|
*/
|
|
35
43
|
export declare function buildIrcMessageCard(message: CustomOrHookMessage, getExpanded: () => boolean): Component;
|
|
36
44
|
/**
|
|
@@ -3,10 +3,10 @@ import type { NativeNode } from "../native/node.js";
|
|
|
3
3
|
import { type ThemeColor } from "../theme/index.js";
|
|
4
4
|
import { TranscriptBlock } from "./transcript-container.js";
|
|
5
5
|
import { type NoticeTone } from "./transcript-notice.js";
|
|
6
|
-
/** One
|
|
6
|
+
/** One run of a status row's terminal line, in `color` unless the text is already styled. */
|
|
7
7
|
export interface TranscriptStatusPart {
|
|
8
8
|
readonly text: string;
|
|
9
|
-
readonly color
|
|
9
|
+
readonly color?: ThemeColor;
|
|
10
10
|
}
|
|
11
11
|
/** A status row in a native terminal: its {@link noticeRow}'s tone, icon and message. */
|
|
12
12
|
export interface TranscriptStatusNative {
|
|
@@ -56,7 +56,9 @@ export declare function list(items: readonly NativeChild[], p?: TspProps<"list">
|
|
|
56
56
|
/** Terminal-clocked elapsed counter: `age` ms already elapsed; `stopped` freezes it there. */
|
|
57
57
|
export declare function elapsed(age: number, stopped?: boolean): NativeNode;
|
|
58
58
|
/**
|
|
59
|
-
*
|
|
60
|
-
*
|
|
59
|
+
* The key names of one key id (`"ctrl+o"` → `["ctrl", "o"]`), as `kbd` and
|
|
60
|
+
* `button` `keys` take them. A literal `+` key survives (`"+"`, `"ctrl++"`).
|
|
61
61
|
*/
|
|
62
|
+
export declare function keyNames(key: string): string[];
|
|
63
|
+
/** Keycap for one key id ({@link keyNames}); the terminal draws platform glyphs. */
|
|
62
64
|
export declare function kbd(key: string, nodeKey?: string): NativeNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Overlay chrome for `describe()`: root cards, key-hint footers,
|
|
3
|
-
* lists and annotation callouts.
|
|
2
|
+
* Overlay chrome for `describe()`: root cards, key-hint footers, buttons and
|
|
3
|
+
* segmented controls, selectable lists and annotation callouts.
|
|
4
4
|
*
|
|
5
5
|
* The overlay frame itself (glass, ring, placement) is the terminal's: the
|
|
6
6
|
* engine wraps every overlay-stack component in an `overlay` node. An overlay
|
|
@@ -53,11 +53,23 @@ export interface ActionButtonOptions {
|
|
|
53
53
|
readonly title?: string;
|
|
54
54
|
/** Target of an `open` action (URL or `file://` path). */
|
|
55
55
|
readonly href?: string;
|
|
56
|
+
/** Why the action can't run now: the button dims and a click sends nothing. */
|
|
57
|
+
readonly disabled?: string;
|
|
58
|
+
/** The button's work is running: a spinner leads the label. */
|
|
59
|
+
readonly busy?: boolean;
|
|
60
|
+
/** Icon beside the label (before it on a `button` node, after it on a row). */
|
|
61
|
+
readonly icon?: string;
|
|
56
62
|
}
|
|
57
63
|
/**
|
|
58
64
|
* A native button (role `omp.btn`): a label plus an optional keycap. A click
|
|
59
65
|
* sends `act` back as an `action` event (or runs a terminal-local `open`/`copy`),
|
|
60
66
|
* which the component routes to the same code path as the key.
|
|
67
|
+
*
|
|
68
|
+
* A terminal that draws the `button` kind ({@link nativeButtons}) gets one
|
|
69
|
+
* (tone `accent` → variant `primary`, `error` → `danger`, `disabled` with its
|
|
70
|
+
* reason as the tooltip); older ones get the row their stylesheets draw by
|
|
71
|
+
* role. Both keep the role and tone the omp sheets' context rules key on; a
|
|
72
|
+
* disabled button's tone is `muted`.
|
|
61
73
|
*/
|
|
62
74
|
export declare function actionButton(label: string, act: string, options?: ActionButtonOptions): NativeNode;
|
|
63
75
|
/**
|
|
@@ -65,6 +77,34 @@ export declare function actionButton(label: string, act: string, options?: Actio
|
|
|
65
77
|
* `act` (default `close`), which the component routes to its Esc path.
|
|
66
78
|
*/
|
|
67
79
|
export declare function escCloseButton(act?: string, key?: string): NativeNode;
|
|
80
|
+
/** Options of an {@link iconButton}. */
|
|
81
|
+
export interface IconButtonOptions {
|
|
82
|
+
/** Sibling identity key; unkeyed buttons take their position. */
|
|
83
|
+
readonly key?: string;
|
|
84
|
+
/** Accessible name; defaults to the title. */
|
|
85
|
+
readonly aria?: string;
|
|
86
|
+
/** A toggle that is on (role `omp.app.ibtn.set`). */
|
|
87
|
+
readonly on?: boolean;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* A quiet icon-only button (role `omp.app.ibtn`, the kit's icon button) for an
|
|
91
|
+
* app head or toolbar: a `button` node where the terminal draws one
|
|
92
|
+
* ({@link nativeButtons}), else an `icon` with a click action.
|
|
93
|
+
*/
|
|
94
|
+
export declare function iconButton(name: string, act: string, title: string, options?: IconButtonOptions): NativeNode;
|
|
95
|
+
/**
|
|
96
|
+
* A quiet text button (role `omp.app.qbtn`, the kit's quiet button) for a
|
|
97
|
+
* section head or toolbar, keyed by its action: a small quiet `button` where
|
|
98
|
+
* the terminal draws one ({@link nativeButtons}), else a row.
|
|
99
|
+
*/
|
|
100
|
+
export declare function quietButton(label: string, act: string, title: string): NativeNode;
|
|
101
|
+
/**
|
|
102
|
+
* A segmented control: `tabs` drawn as a well with a raised thumb on the
|
|
103
|
+
* active tab. A terminal that draws the `button` kind ({@link nativeButtons})
|
|
104
|
+
* draws `variant: "segmented"` too; older ones restyle the tabs by role
|
|
105
|
+
* (`omp.app.seg`) or parent.
|
|
106
|
+
*/
|
|
107
|
+
export declare function segmentedTabs(p: TspProps<"tabs">, key: string): NativeNode;
|
|
68
108
|
/** A row of {@link actionButton}s (role `omp.actions`); `null` entries become the spacer that end-aligns what follows. */
|
|
69
109
|
export declare function actionBar(buttons: readonly (NativeNode | null)[], key?: string): NativeNode;
|
|
70
110
|
/** Spans of an annotation callout: a dim `label:` then the note. */
|
|
@@ -2,5 +2,9 @@
|
|
|
2
2
|
export declare function isNativeRendering(): boolean;
|
|
3
3
|
/** Called by the native backend on surface open and close. */
|
|
4
4
|
export declare function setNativeRendering(on: boolean): void;
|
|
5
|
+
/** Whether omp's buttons go out as `button` nodes (see {@link setNativeButtons}). */
|
|
6
|
+
export declare function nativeButtons(): boolean;
|
|
7
|
+
/** Called by the native backend when it adopts a `hello` reply and when it stops. */
|
|
8
|
+
export declare function setNativeButtons(on: boolean): void;
|
|
5
9
|
/** Call `listener` whenever native rendering starts or stops; returns the unsubscribe. */
|
|
6
10
|
export declare function onNativeRenderingChange(listener: (on: boolean) => void): () => void;
|
|
@@ -85,4 +85,6 @@ export declare class HookEditorComponent extends OverlayPanel implements Focusab
|
|
|
85
85
|
* enhanced-paste routing falls back to the main prompt editor hidden behind the
|
|
86
86
|
* dialog (#2127 routing contract). */
|
|
87
87
|
pasteText(text: string): void;
|
|
88
|
+
/** Replace the draft, as Ctrl+R history search does for the main composer. */
|
|
89
|
+
setText(text: string): void;
|
|
88
90
|
}
|
|
@@ -8,6 +8,10 @@ export interface JobsPanelJob {
|
|
|
8
8
|
readonly type: string;
|
|
9
9
|
readonly status: "running" | "completed" | "failed" | "cancelled";
|
|
10
10
|
readonly label: string;
|
|
11
|
+
/** What the job is for, in the model's words; rows and the detail lead with it over a command `label`. */
|
|
12
|
+
readonly intent?: string;
|
|
13
|
+
/** One line on what a command does and when it ends, from the cheap model; the detail shows it under the intent. */
|
|
14
|
+
readonly caption?: string;
|
|
11
15
|
readonly startTime: number;
|
|
12
16
|
readonly endTime?: number;
|
|
13
17
|
/** Registry id of the agent that owns the job. */
|
|
@@ -2,7 +2,7 @@ import type { StatusLineComponent } from "../status-line/component.js";
|
|
|
2
2
|
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
|
-
import { type Component, type ResizeScrollbackMode, type TerminalFramePlan, type TerminalFrameProvider, TUI, type TUIOptions, type ViewportSize } from "../tui.js";
|
|
5
|
+
import { type Component, Container, type ResizeScrollbackMode, type TerminalFramePlan, type TerminalFrameProvider, TUI, type TUIOptions, type ViewportSize } from "../tui.js";
|
|
6
6
|
import type { NativeSurface, NativeSurfaceProvider } from "../native/node.js";
|
|
7
7
|
import { CustomEditor } from "./custom-editor.js";
|
|
8
8
|
import type { WordCompletionMethod } from "./word-completion.js";
|
|
@@ -61,6 +61,13 @@ export interface RuntimeChildrenOptions {
|
|
|
61
61
|
* to the roots below the transcript in render order.
|
|
62
62
|
*/
|
|
63
63
|
readonly nativeDock?: readonly Component[];
|
|
64
|
+
/**
|
|
65
|
+
* Below-transcript containers whose children continue `main` on a TSP
|
|
66
|
+
* terminal, one block each after the transcript's, instead of riding in the
|
|
67
|
+
* dock: output on its way into the transcript (shell runs deferred until the
|
|
68
|
+
* next prompt) reads as its tail, and keeps its block when it moves in.
|
|
69
|
+
*/
|
|
70
|
+
readonly nativeTail?: readonly Container[];
|
|
64
71
|
/**
|
|
65
72
|
* Below-transcript roots the user opens and closes (the editor surface that
|
|
66
73
|
* drafts and dialogs swap into, docked reports). Their rows never become
|
|
@@ -141,10 +148,11 @@ export declare class Composer implements TerminalFrameProvider, NativeSurfacePro
|
|
|
141
148
|
/**
|
|
142
149
|
* Describe the whole surface for a TSP terminal. `main` is the flowing
|
|
143
150
|
* document: the header (welcome, extras) and every transcript block as its
|
|
144
|
-
* own component child
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
*
|
|
151
|
+
* own component child, then the children of the
|
|
152
|
+
* {@link RuntimeChildrenOptions.nativeTail} roots. `dock` is the live chrome
|
|
153
|
+
* below the transcript in render order: pending messages, HUDs, the working
|
|
154
|
+
* row, the editor and the status line. There is no history/viewport split:
|
|
155
|
+
* retirement, resize replay and hover bands are ANSI concerns.
|
|
148
156
|
*/
|
|
149
157
|
describeSurface(): NativeSurface;
|
|
150
158
|
/**
|
|
@@ -49,6 +49,8 @@ export declare const PREVIEW_LIMITS: {
|
|
|
49
49
|
readonly EXPANDED_LINES: 12;
|
|
50
50
|
/** Items (files, results) shown in collapsed view */
|
|
51
51
|
readonly COLLAPSED_ITEMS: 8;
|
|
52
|
+
/** Definition, type-definition and implementation locations shown in collapsed view */
|
|
53
|
+
readonly LOCATIONS_COLLAPSED: 2;
|
|
52
54
|
/** Output preview lines in collapsed view */
|
|
53
55
|
readonly OUTPUT_COLLAPSED: 3;
|
|
54
56
|
/** Output preview lines in expanded view */
|
|
@@ -188,6 +190,23 @@ export declare function formatErrorMessage(message: string | undefined, theme: T
|
|
|
188
190
|
export declare function formatErrorDetail(message: string | undefined, theme: Theme): string;
|
|
189
191
|
/** Render a muted empty-state message with a warning icon. */
|
|
190
192
|
export declare function formatEmptyMessage(message: string, theme: Theme): string;
|
|
193
|
+
/**
|
|
194
|
+
* Color of a file's name, or a whole URL, in tool bodies: it keeps paths apart
|
|
195
|
+
* from the tool titles above them (bronze in titanium).
|
|
196
|
+
*/
|
|
197
|
+
export declare const FILE_NAME_COLOR = "customMessageLabel";
|
|
198
|
+
/**
|
|
199
|
+
* Where a display path's final segment (file or folder name) starts, past its
|
|
200
|
+
* last `/` or `\` separator; a trailing-slash directory keeps its slash on the
|
|
201
|
+
* name. Shared by the terminal ({@link formatStyledPath}) and Tern file rows.
|
|
202
|
+
*/
|
|
203
|
+
export declare function pathNameStart(filePath: string): number;
|
|
204
|
+
/**
|
|
205
|
+
* A file path in a tool body: the directory (with its trailing separator) dim,
|
|
206
|
+
* the final segment in {@link FILE_NAME_COLOR}. Tool headers keep paths in
|
|
207
|
+
* their plain subject color instead.
|
|
208
|
+
*/
|
|
209
|
+
export declare function formatStyledPath(filePath: string, theme: Theme): string;
|
|
191
210
|
/** Marker displayed in the gutter of a code frame. */
|
|
192
211
|
export type CodeFrameMarker = "" | " " | "*" | "+" | "-" | ">";
|
|
193
212
|
/** Format a code-frame row with a padded line-number gutter. */
|
|
@@ -18,7 +18,7 @@ export declare enum NotifyProtocol {
|
|
|
18
18
|
Osc99 = "\u001B]99;;",
|
|
19
19
|
Osc9 = "\u001B]9;"
|
|
20
20
|
}
|
|
21
|
-
export type TerminalId = "kitty" | "ghostty" | "wezterm" | "iterm2" | "vscode" | "alacritty" | "warp" | "orca" | "otty" | "rio" | "tern" | "monstar" | "base" | "trueColor";
|
|
21
|
+
export type TerminalId = "kitty" | "ghostty" | "wezterm" | "iterm2" | "vscode" | "alacritty" | "warp" | "orca" | "otty" | "rio" | "tern" | "monstar" | "rex" | "base" | "trueColor";
|
|
22
22
|
/** Terminal capability details used for rendering and protocol selection. */
|
|
23
23
|
export declare class TerminalInfo {
|
|
24
24
|
readonly id: TerminalId;
|
|
@@ -6,7 +6,7 @@ export { getAvailableThemes, getAvailableThemesWithPaths, getThemeByName, type T
|
|
|
6
6
|
export { isValidThemeColor, type ThemeBg, type ThemeColor } from "./schema.js";
|
|
7
7
|
export { getAvailableSymbolPresets, isValidSymbolPreset, type SpinnerType, type SymbolKey, type SymbolPreset, } from "./symbols.js";
|
|
8
8
|
export { Theme } from "./theme-class.js";
|
|
9
|
-
export { createHighlightStream, getEditorTheme, getMarkdownTheme, getMarkdownThemeWithLinkTargets, getSelectListTheme, getSettingsListTheme, getSymbolTheme, highlightCode, setMarkdownMermaidRendering, warmHighlighter, } from "./tui-adapters.js";
|
|
9
|
+
export { createHighlightStream, getEditorTheme, getMarkdownTheme, getMarkdownThemeWithLinkTargets, getSelectListTheme, getSettingsListTheme, getSymbolTheme, highlightCode, isHighlightLanguage, setMarkdownMermaidRendering, warmHighlighter, } from "./tui-adapters.js";
|
|
10
10
|
/**
|
|
11
11
|
* Subscribe to native fallback appearance changes independently of theme changes.
|
|
12
12
|
* Consumers must re-check the effective background: COLORFGBG can override it.
|
|
@@ -6,6 +6,8 @@ import type { SettingsListTheme } from "../components/settings-list.js";
|
|
|
6
6
|
import type { SymbolTheme } from "../symbols.js";
|
|
7
7
|
import type { SlashCommandIconName } from "./symbols.js";
|
|
8
8
|
import type { Theme } from "./theme-class.js";
|
|
9
|
+
/** Whether {@link highlightCode} colors `lang`; text in any other language comes back unstyled. */
|
|
10
|
+
export declare function isHighlightLanguage(lang: string | undefined): lang is string;
|
|
9
11
|
/**
|
|
10
12
|
* Highlight code with syntax coloring based on file extension or language.
|
|
11
13
|
* Returns array of highlighted lines.
|
package/dist/types/thinking.d.ts
CHANGED
|
@@ -137,12 +137,12 @@ export type TaskEffort = (typeof TASK_EFFORTS)[number];
|
|
|
137
137
|
export declare function resolveTaskEffortLevel(model: Model | undefined, effort: TaskEffort, maxEffort?: Effort): Effort | undefined;
|
|
138
138
|
/**
|
|
139
139
|
* Clamps a concrete thinking selector to a per-session effort ceiling (e.g. a
|
|
140
|
-
* task spawn's `task.maxEffort
|
|
141
|
-
*
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
*
|
|
140
|
+
* task spawn's `task.maxEffort`). Unset/`inherit`/`off` retain their existing
|
|
141
|
+
* meaning, as do levels already at or below the ceiling. Levels above it snap
|
|
142
|
+
* to the highest model-supported effort at or below the ceiling. A model whose
|
|
143
|
+
* floor exceeds the ceiling has nothing valid to snap to; the requested level
|
|
144
|
+
* is returned unchanged and the caller must reject or skip such models (see
|
|
145
|
+
* {@link modelSupportsEffortCeiling}).
|
|
146
146
|
*/
|
|
147
147
|
export declare function clampThinkingLevelToCeiling(model: Model | undefined, level: Effort | undefined, ceiling: Effort | undefined): Effort | undefined;
|
|
148
148
|
export declare function clampThinkingLevelToCeiling(model: Model | undefined, level: ThinkingLevel | undefined, ceiling: Effort | undefined): ThinkingLevel | undefined;
|
|
@@ -153,6 +153,8 @@ export declare function clampThinkingLevelToCeiling(model: Model | undefined, le
|
|
|
153
153
|
* skip models whose floor would force the session above the ceiling.
|
|
154
154
|
*/
|
|
155
155
|
export declare function modelSupportsEffortCeiling(model: Model, ceiling: Effort): boolean;
|
|
156
|
+
/** Throws when `model` has no supported effort at or below `task.maxEffort`, so a capped spawn fails instead of running at its floor. */
|
|
157
|
+
export declare function assertModelSupportsEffortCeiling(model: Model, maxEffort: Effort): void;
|
|
156
158
|
/**
|
|
157
159
|
* The provisional concrete level shown while `auto` is configured but before a
|
|
158
160
|
* turn has been classified, and the fallback when classification fails. Prefers
|
|
@@ -34,6 +34,8 @@ interface AstGrepRenderArgs {
|
|
|
34
34
|
/** Legacy pre-`path` argument name; kept so historical transcripts still render a scope. */
|
|
35
35
|
paths?: string[];
|
|
36
36
|
skip?: number;
|
|
37
|
+
/** Language the search parsed the files as; highlighting follows it over the file extension. */
|
|
38
|
+
lang?: string;
|
|
37
39
|
}
|
|
38
40
|
/** Render AST grep calls and results. */
|
|
39
41
|
export declare const astGrepToolRenderer: {
|
|
@@ -71,6 +71,8 @@ export interface EvalToolDetails {
|
|
|
71
71
|
statusEvents?: EvalStatusEvent[];
|
|
72
72
|
/** Evictable events dropped from the front of `statusEvents` (see {@link recordStatusEvent}). */
|
|
73
73
|
statusEventsElided?: number;
|
|
74
|
+
/** Text the cell's tool calls sent to `out://`, oldest first; transcripts draw each as a reply after the call. */
|
|
75
|
+
replies?: string[];
|
|
74
76
|
isError?: boolean;
|
|
75
77
|
meta?: OutputMeta;
|
|
76
78
|
/** First backend that produced cells. Kept for transcript compatibility. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Theme } from "../theme/theme.js";
|
|
2
2
|
import type { Component } from "../tui.js";
|
|
3
3
|
import type { OutputMeta } from "./output-meta.js";
|
|
4
4
|
import type { NativeToolView, RenderResultContextOptions, RenderResultOptions } from "./renderer.js";
|