@oh-my-pi/pi-tui 18.11.0 → 18.11.2
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 +52 -146
- package/dist/types/apps/git/git-tui.d.ts +16 -2
- package/dist/types/autocomplete.d.ts +2 -0
- package/dist/types/charts/chart-svg.d.ts +7 -13
- package/dist/types/chat/table-chart.d.ts +11 -15
- package/dist/types/chrome/transcript-container.d.ts +2 -0
- package/dist/types/components/image.d.ts +2 -0
- package/dist/types/components/markdown.d.ts +37 -0
- package/dist/types/native/blobs.d.ts +11 -11
- package/dist/types/overlays/agent-hub-projection.d.ts +10 -5
- package/dist/types/overlays/job-tree.d.ts +50 -0
- package/dist/types/overlays/jobs-panel.d.ts +24 -11
- package/dist/types/prompt/composer.d.ts +20 -0
- package/dist/types/prompt/custom-editor.d.ts +2 -0
- package/dist/types/prompt/image-references.d.ts +22 -0
- package/dist/types/prompt/macos-spelling.d.ts +2 -1
- package/dist/types/prompt/prose-gate.d.ts +3 -0
- package/dist/types/prompt/queued-messages.d.ts +1 -1
- package/dist/types/prompt/typing-word.d.ts +25 -0
- package/dist/types/render/hyperlink.d.ts +2 -0
- package/dist/types/render/utils.d.ts +1 -1
- package/dist/types/status-line/context-usage.d.ts +3 -0
- package/dist/types/status-line/host.d.ts +6 -4
- package/dist/types/status-line/startup.d.ts +6 -6
- package/dist/types/stdin-buffer.d.ts +7 -0
- package/dist/types/terminal.d.ts +8 -4
- package/dist/types/tools/eval.d.ts +5 -0
- package/dist/types/tools/grouped-file-output.d.ts +2 -0
- package/dist/types/tools/read.d.ts +5 -4
- package/dist/types/tui.d.ts +10 -0
- package/package.json +9 -9
- package/src/apps/git/git-tui.ts +27 -10
- package/src/apps/git/sidebar.ts +5 -1
- package/src/autocomplete.ts +21 -19
- package/src/bracketed-paste.ts +9 -2
- package/src/charts/chart-svg.ts +19 -22
- package/src/chat/assistant-message.ts +37 -12
- package/src/chat/bash-execution.ts +7 -2
- package/src/chat/image-loading.ts +4 -6
- package/src/chat/read-tool-group.ts +1 -0
- package/src/chat/table-chart.ts +24 -57
- package/src/chat/tool-execution.ts +11 -4
- package/src/chat/user-message.ts +22 -15
- package/src/chrome/transcript-container.ts +10 -0
- package/src/components/editor.ts +12 -12
- package/src/components/image.ts +23 -6
- package/src/components/markdown.ts +375 -6
- package/src/components/settings-list.ts +2 -4
- package/src/native/blobs.ts +22 -6
- package/src/native/reconcile.ts +19 -15
- package/src/overlays/agent-hub-projection.ts +63 -12
- package/src/overlays/btw-history-panel.ts +30 -23
- package/src/overlays/extensions/extension-list.ts +4 -6
- package/src/overlays/job-tree.ts +177 -0
- package/src/overlays/jobs-panel.ts +107 -49
- package/src/overlays/settings-selector.ts +3 -0
- package/src/prompt/composer.ts +180 -23
- package/src/prompt/custom-editor.ts +19 -1
- package/src/prompt/image-references.ts +79 -2
- package/src/prompt/macos-spelling.ts +28 -5
- package/src/prompt/prose-gate.ts +3 -0
- package/src/prompt/queued-messages.ts +9 -2
- package/src/prompt/typing-word.ts +59 -0
- package/src/render/code-cell.ts +8 -1
- package/src/render/hyperlink.ts +5 -0
- package/src/render/utils.ts +1 -1
- package/src/render/width-aware-text.ts +6 -5
- package/src/status-line/component.ts +22 -10
- package/src/status-line/context-usage.ts +22 -16
- package/src/status-line/footer.ts +18 -35
- package/src/status-line/host.ts +6 -1
- package/src/status-line/startup.ts +6 -6
- package/src/stdin-buffer.ts +11 -1
- package/src/terminal.ts +136 -42
- package/src/tools/ast-grep.ts +2 -2
- package/src/tools/edit.ts +16 -1
- package/src/tools/eval.ts +51 -11
- package/src/tools/grouped-file-output.ts +6 -1
- package/src/tools/read.ts +6 -5
- package/src/tools/write.ts +1 -1
- package/src/tui.ts +61 -30
- package/src/utils.ts +5 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,57 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [18.11.2] - 2026-10-16
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Improved nested tool status line rendering: moved preview content into a dedicated collapsible code block when expanded and limited field widths on the one-line summary
|
|
10
|
+
- Suppressed typo highlighting for the word currently being typed to avoid distracting inline markers while composing
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- Fixed double-clicking an extension switched off in `/extensions` in Tern not switching it back on
|
|
15
|
+
- Fixed the queued-messages badge in Tern showing a bare count that read as the first message's number; it now reads `N queued`
|
|
16
|
+
- Fixed table charts on TSP terminals to use SVG fences and respect terminal palette
|
|
17
|
+
- Fixed table charts in Tern's native view drawing in the other appearance's colors (light labels on a light page) when omp's light/dark detection disagreed with Tern; Tern now colors them in the theme it shows, like the prose around them
|
|
18
|
+
- Fixed the /btw history answer being stuck at the bottom while a follow-up is being written: Up/Down and Page Up/Down now scroll the answer without leaving the draft ([#15902](https://github.com/can1357/oh-my-pi/pull/15902) by [@H4vC](https://github.com/H4vC))
|
|
19
|
+
- Fixed macOS editor spelling assistance hanging silently when the spelling service stops responding; it now reports and disables itself instead ([#12084](https://github.com/can1357/oh-my-pi/issues/12084), [#14341](https://github.com/can1357/oh-my-pi/pull/14341) by [@F0Rextasy](https://github.com/F0Rextasy))
|
|
20
|
+
- Fixed a chip toggled in a multi-select setting's open submenu leaving its row and its tab's changed badge showing the old selection until the submenu was closed ([#14444](https://github.com/can1357/oh-my-pi/pull/14444) by [@F0Rextasy](https://github.com/F0Rextasy))
|
|
21
|
+
- Fixed `@` file autocomplete freezing when the project contains a symlink into a very large directory tree; the fuzzy walk now stops after 1.5 s and the popup falls back to the immediate-directory listing ([#12317](https://github.com/can1357/oh-my-pi/issues/12317), [#14330](https://github.com/can1357/oh-my-pi/pull/14330) by [@F0Rextasy](https://github.com/F0Rextasy))
|
|
22
|
+
- Fixed omp in a Tern pane showing the classic CLI when a shell rc, dev shell or `.env` set `TERM` to a `screen*`/`tmux*` value with no multiplexer running; only a real tmux/screen/zellij/herdr/cmux/wmux session now keeps Tern's native view off
|
|
23
|
+
- omp inside devenv 2.x's reloading `devenv shell` now starts on the classic renderer instead of opening Tern's native view and abandoning it: devenv's terminal layer drops Tern's protocol, so the native view needs `devenv shell --no-reload`. The debug log now records why a Tern pane stays on the classic renderer
|
|
24
|
+
- Fixed large terminal paints on Windows being split mid-row, which let other output land inside a row; writes are now cut at row boundaries ([#14187](https://github.com/can1357/oh-my-pi/pull/14187) by [@mateusant13](https://github.com/mateusant13))
|
|
25
|
+
- Fixed `TUI.addStartListener()` hooks added after `start()` never running until the next stop/start cycle; a hook added to a running TUI now runs at once ([#15369](https://github.com/can1357/oh-my-pi/pull/15369) by [@LoneExile](https://github.com/LoneExile))
|
|
26
|
+
- Fixed the git viewer advertising stage, discard, select and commit keys while showing a clean tree's HEAD commit, where none of them do anything; the footer and sidebar now describe the commit view ([#14347](https://github.com/can1357/oh-my-pi/issues/14347), [#14480](https://github.com/can1357/oh-my-pi/pull/14480) by [@F0Rextasy](https://github.com/F0Rextasy))
|
|
27
|
+
- Fixed the status line `pr` segment keeping the previous branch's PR after switching to the default branch, a detached HEAD, or a branch without a PR ([#15455](https://github.com/can1357/oh-my-pi/pull/15455) by [@ravshansbox](https://github.com/ravshansbox))
|
|
28
|
+
- Fixed the status-line footer total leaving out task subagent spend; it now reads the session's cumulative usage, the same source the interactive status line uses ([#14393](https://github.com/can1357/oh-my-pi/pull/14393) by [@F0Rextasy](https://github.com/F0Rextasy))
|
|
29
|
+
- Fixed transcript rows disappearing from scrollback or reappearing out of order when bottom chrome stays taller after a turn, self-clearing HUDs close, or the composer shape changes ([#15820](https://github.com/can1357/oh-my-pi/pull/15820) by [@emmahyde](https://github.com/emmahyde))
|
|
30
|
+
|
|
31
|
+
## [18.11.1] - 2026-10-15
|
|
32
|
+
|
|
33
|
+
### Added
|
|
34
|
+
|
|
35
|
+
- Added a tree layout to the background jobs sheet: subagents' jobs nest under the task job that runs them, busiest branches first, and Cancel appears only on the viewing agent's own jobs ([#15854](https://github.com/can1357/oh-my-pi/pull/15854) by [@H4vC](https://github.com/H4vC))
|
|
36
|
+
|
|
37
|
+
### Fixed
|
|
38
|
+
|
|
39
|
+
- Fixed transcript images not opening their file: image placeholders and native image nodes now link to the source file or a stored copy ([#15872](https://github.com/can1357/oh-my-pi/pull/15872) by [@H4vC](https://github.com/H4vC))
|
|
40
|
+
- A collapsing live block no longer leaves its slack as a band of blank rows between the retired history and the live rows: the slack falls below the transcript, so a streamed reply stays contiguous and the input keeps the bottom row ([#15499](https://github.com/can1357/oh-my-pi/pull/15499) by [@iacore](https://github.com/iacore))
|
|
41
|
+
- Fixed width-aware text on native (TSP) terminals truncating content two columns early ([#15806](https://github.com/can1357/oh-my-pi/pull/15806) by [@yuzu-octopus](https://github.com/yuzu-octopus))
|
|
42
|
+
- Fixed Tab/right-arrow completion silently dismissing a selected `@"quoted path"` file suggestion when the path contains spaces ([#15698](https://github.com/can1357/oh-my-pi/pull/15698) by [@drawde-nadroj](https://github.com/drawde-nadroj))
|
|
43
|
+
- Bracketed pastes are now capped by their UTF-8 size, so a large multibyte paste no longer buffers past the byte limit ([#15803](https://github.com/can1357/oh-my-pi/pull/15803) by [@yuzu-octopus](https://github.com/yuzu-octopus))
|
|
44
|
+
- Fixed OSC 66 text-sized spans bypassing truncation when their UTF-16 length was short enough to fit the fast-path guard ([#15802](https://github.com/can1357/oh-my-pi/pull/15802) by [@yuzu-octopus](https://github.com/yuzu-octopus))
|
|
45
|
+
- Updated the `ast_grep` result view's truncated-match note to suggest `skip` pagination instead of the schema's nonexistent `increase limit` flag ([#15532](https://github.com/can1357/oh-my-pi/issues/15532), [#15543](https://github.com/can1357/oh-my-pi/pull/15543) by [@peda-cos](https://github.com/peda-cos)).
|
|
46
|
+
- Fixed a streaming Edit preview with long wrapped lines growing past its row cap, because its tail was budgeted without the diff gutter its continuation rows hang under ([#15679](https://github.com/can1357/oh-my-pi/pull/15679))
|
|
47
|
+
- Fixed malformed base64 padding being accepted for chat image attachments before native image decoding ([#15765](https://github.com/can1357/oh-my-pi/pull/15765) by [@anatoli-tsinovoy](https://github.com/anatoli-tsinovoy)).
|
|
48
|
+
- Fixed Shift+Enter submitting and Ctrl+Enter inserting a newline in Windows Terminal 1.25–1.27 after closing any fullscreen view such as `/settings`; the terminal dropped omp's keyboard mode on leaving the alternate screen ([microsoft/terminal#20763](https://github.com/microsoft/terminal/issues/20763)), so omp now re-applies it ([#15868](https://github.com/can1357/oh-my-pi/pull/15868) by [@H4vC](https://github.com/H4vC)).
|
|
49
|
+
- Long lines in native (Tern) `read`, `write`, and code-cell source now wrap instead of scrolling each block sideways ([#15823](https://github.com/can1357/oh-my-pi/issues/15823)).
|
|
50
|
+
- Fixed long text pastes taking seconds to land in terminals that deliver a paste one key at a time, such as JetBrains' terminal on Windows; omp no longer writes to the terminal for every pasted key ([#15757](https://github.com/can1357/oh-my-pi/issues/15757))
|
|
51
|
+
- Fixed Shift+Enter submitting the prompt and Ctrl+Enter inserting a newline in WSL under Windows Terminal 1.24 and earlier, conhost, and other ConPTY hosts without kitty keyboard support; Shift+Enter now inserts a newline and Ctrl+Enter sends a follow-up, as on native Windows.
|
|
52
|
+
- Fixed streamed Markdown tables jumping around as each row arrives: the terminal UI fills the row being written in under the existing column widths, and native (TSP) terminals receive each row once its line is complete ([#15856](https://github.com/can1357/oh-my-pi/pull/15856) by [@H4vC](https://github.com/H4vC)).
|
|
53
|
+
- Fixed streamed links and inline math showing raw `[text](url` or LaTeX and then rewrapping the paragraph when they close, in the terminal UI and native (TSP) terminals: they now render in their closed form while they stream ([#15864](https://github.com/can1357/oh-my-pi/pull/15864) by [@H4vC](https://github.com/H4vC)).
|
|
54
|
+
- Paint-only overlays no longer swallow typing intended for the focused input beneath them ([#15793](https://github.com/can1357/oh-my-pi/issues/15793)).
|
|
55
|
+
|
|
5
56
|
## [18.11.0] - 2026-10-14
|
|
6
57
|
|
|
7
58
|
### Added
|
|
@@ -2534,149 +2585,4 @@
|
|
|
2534
2585
|
|
|
2535
2586
|
- Fixed viewport shift handling to prevent stale content when mixed updates remap screen rows
|
|
2536
2587
|
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
### Breaking Changes
|
|
2540
|
-
|
|
2541
|
-
- Removed `PI_TUI_RESIZE_CLEAR_STRATEGY`; resize behavior is no longer configurable between viewport/scrollback modes. The renderer now uses fixed semantics: width changes perform a hard reset (`3J` + full content rewrite), while height changes and diff fallbacks use viewport-scoped repainting.
|
|
2542
|
-
|
|
2543
|
-
### Added
|
|
2544
|
-
|
|
2545
|
-
- Added a new terminal regression suite in `packages/tui/test/render-regressions.test.ts` covering no-op render stability, targeted middle-line diffs, shrink cleanup, width-resize truncation without ghost rows, shrink/grow viewport tail anchoring, scrollback deduplication across forced redraws, overlay restore behavior, and rapid mutation convergence.
|
|
2546
|
-
- Expanded `packages/tui/test/overlay-scroll.test.ts` with stress coverage for overflow shrink/regrow cycles, resize oscillation, overlay toggle churn, no-op render loops, and hardware-cursor-only updates while bounding scrollback growth and blank-run artifacts.
|
|
2547
|
-
|
|
2548
|
-
### Changed
|
|
2549
|
-
|
|
2550
|
-
- Refactored render orchestration to explicit `hardReset` and `viewportRepaint` paths, with targeted fallbacks for offscreen diff ranges and unsafe row deltas.
|
|
2551
|
-
- Switched startup to `requestRender(true)` so the first frame always initializes renderer state with a forced full path.
|
|
2552
|
-
- Replaced legacy viewport bookkeeping (`previousViewportTop`) with `viewportTopRow` tracking and consistent screen-relative cursor calculations.
|
|
2553
|
-
- Updated stop-sequence cursor placement to target the visible working area and clamp to terminal bounds before final newline emission.
|
|
2554
|
-
- Documented the intentional performance policy of not forcing full repaint on every viewport-top shift, relying on narrower safety guards instead.
|
|
2555
|
-
|
|
2556
|
-
### Fixed
|
|
2557
|
-
|
|
2558
|
-
- Fixed stale/duplicated terminal cursor dedup state by synchronizing `#lastCursorSequence` in all render write paths (hard reset, viewport repaint, deleted-lines clear path, append fast path, and differential path).
|
|
2559
|
-
- Fixed scroll overshoot on `stop()` when content fills the viewport by clamping target row movement to valid screen rows.
|
|
2560
|
-
|
|
2561
|
-
## [13.4.0] - 2026-03-01
|
|
2562
|
-
|
|
2563
|
-
### Added
|
|
2564
|
-
|
|
2565
|
-
- Added `PI_TUI_RESIZE_CLEAR_STRATEGY` environment variable to control terminal behavior on resize: `viewport` (default) clears/redraws the viewport while preserving scrollback, or `scrollback` clears all history
|
|
2566
|
-
|
|
2567
|
-
### Changed
|
|
2568
|
-
|
|
2569
|
-
- Changed resize redraw behavior to use configurable clear semantics (`viewport` vs `scrollback`) while keeping full content rendering for scrollback navigation
|
|
2570
|
-
|
|
2571
|
-
### Fixed
|
|
2572
|
-
|
|
2573
|
-
- Fixed loader component rendering lines wider than terminal width, preventing text overflow and display artifacts
|
|
2574
|
-
|
|
2575
|
-
## [13.3.11] - 2026-02-28
|
|
2576
|
-
|
|
2577
|
-
### Fixed
|
|
2578
|
-
|
|
2579
|
-
- Restored terminal image protocol override and fallback detection for image rendering, including `PI_FORCE_IMAGE_PROTOCOL` support and Kitty fallback for screen/tmux/ghostty-style TERM environments.
|
|
2580
|
-
|
|
2581
|
-
## [13.3.8] - 2026-02-28
|
|
2582
|
-
|
|
2583
|
-
### Breaking Changes
|
|
2584
|
-
|
|
2585
|
-
- Changed mermaid hash type from string to bigint in `getMermaidImage` callback and `extractMermaidBlocks` return type
|
|
2586
|
-
- Removed `mime-types` and `@types/mime-types` from dependencies
|
|
2587
|
-
- Removed `@xterm/xterm` from dependencies
|
|
2588
|
-
|
|
2589
|
-
### Changed
|
|
2590
|
-
|
|
2591
|
-
- Updated mermaid hash computation to use `Bun.hash.xxHash64()` instead of `Bun.hash().toString(16)`
|
|
2592
|
-
|
|
2593
|
-
## [12.19.0] - 2026-02-22
|
|
2594
|
-
|
|
2595
|
-
### Added
|
|
2596
|
-
|
|
2597
|
-
- Added `getTopBorderAvailableWidth()` method to calculate available width for top border content accounting for border characters and padding
|
|
2598
|
-
|
|
2599
|
-
### Fixed
|
|
2600
|
-
|
|
2601
|
-
- Fixed stale viewport rows appearing when terminal height increases by triggering full re-render on height changes
|
|
2602
|
-
|
|
2603
|
-
## [12.18.0] - 2026-02-21
|
|
2604
|
-
|
|
2605
|
-
### Fixed
|
|
2606
|
-
|
|
2607
|
-
- Fixed viewport synchronization issue by clearing scrollback when terminal state becomes desynced during full re-renders
|
|
2608
|
-
|
|
2609
|
-
## [12.12.2] - 2026-02-19
|
|
2610
|
-
|
|
2611
|
-
### Fixed
|
|
2612
|
-
|
|
2613
|
-
- Fixed non-forced full re-renders clearing terminal scrollback history during streaming updates by limiting scrollback clears to explicit forced re-renders.
|
|
2614
|
-
|
|
2615
|
-
## [12.12.0] - 2026-02-19
|
|
2616
|
-
|
|
2617
|
-
### Added
|
|
2618
|
-
|
|
2619
|
-
- Added PageUp/PageDown navigation for editor content and autocomplete selection to jump across long wrapped inputs faster.
|
|
2620
|
-
|
|
2621
|
-
### Fixed
|
|
2622
|
-
|
|
2623
|
-
- Fixed history-entry navigation anchoring (Up opens at top, Down opens at bottom) and preserved editor scroll context when max-height changes to keep cursor movement visible in long prompts ([#99](https://github.com/can1357/oh-my-pi/issues/99)).
|
|
2624
|
-
|
|
2625
|
-
## [12.11.3] - 2026-02-19
|
|
2626
|
-
|
|
2627
|
-
### Fixed
|
|
2628
|
-
|
|
2629
|
-
- Fixed differential deleted-line rendering when content shrinks to empty so stale first-row content is cleared reliably.
|
|
2630
|
-
- Fixed incremental stale-row clearing to use erase-below semantics in synchronized output, reducing leftover-line artifacts after shrink operations.
|
|
2631
|
-
|
|
2632
|
-
## [12.9.0] - 2026-02-17
|
|
2633
|
-
|
|
2634
|
-
### Added
|
|
2635
|
-
|
|
2636
|
-
- Exported `getTerminalId()` function to get a stable identifier for the current terminal, with support for TTY device paths and terminal multiplexers
|
|
2637
|
-
- Exported `getTtyPath()` function to resolve the TTY device path for stdin via POSIX `ttyname(3)`
|
|
2638
|
-
|
|
2639
|
-
## [12.5.0] - 2026-02-15
|
|
2640
|
-
|
|
2641
|
-
### Added
|
|
2642
|
-
|
|
2643
|
-
- Added `cursorOverride` and `cursorOverrideWidth` properties to customize the end-of-text cursor glyph with ANSI-styled strings
|
|
2644
|
-
- Added `getUseTerminalCursor()` method to query the terminal cursor mode setting
|
|
2645
|
-
|
|
2646
|
-
## [11.10.0] - 2026-02-10
|
|
2647
|
-
|
|
2648
|
-
### Added
|
|
2649
|
-
|
|
2650
|
-
- Added `hint` property to autocomplete items to display dim ghost text after cursor when item is selected
|
|
2651
|
-
- Added `getInlineHint()` method to `SlashCommand` interface for providing inline hint text based on argument state
|
|
2652
|
-
- Added `getInlineHint()` method to `AutocompleteProvider` interface for displaying dim ghost text after cursor
|
|
2653
|
-
- Added `hintStyle` theme option to customize styling of inline hint/ghost text in editor
|
|
2654
|
-
|
|
2655
|
-
### Changed
|
|
2656
|
-
|
|
2657
|
-
- Updated editor to render inline hint text as dim ghost text after cursor when autocomplete suggestions are active or provider supplies hints
|
|
2658
|
-
|
|
2659
|
-
## [11.8.0] - 2026-02-10
|
|
2660
|
-
|
|
2661
|
-
### Added
|
|
2662
|
-
|
|
2663
|
-
- Added Alt+Y keybinding to cycle through kill ring entries (yank-pop)
|
|
2664
|
-
- Added undo support to Input component with Ctrl+Z keybinding
|
|
2665
|
-
- Added kill ring support to Input component for Emacs-style kill/yank operations
|
|
2666
|
-
- Added yank (Ctrl+Y) and yank-pop (Alt+Y) support to Input component
|
|
2667
|
-
|
|
2668
|
-
### Changed
|
|
2669
|
-
|
|
2670
|
-
- Changed Editor kill ring implementation to use dedicated KillRing class for better state management
|
|
2671
|
-
- Changed Editor undo stack to use generic UndoStack class with automatic state cloning
|
|
2672
|
-
- Changed kill/yank behavior to properly accumulate consecutive kill operations
|
|
2673
|
-
- Changed Input component deletion methods to record killed text in kill ring
|
|
2674
|
-
- Changed undo coalescing in Input component to group consecutive word typing into single undo units
|
|
2675
|
-
|
|
2676
|
-
## [11.4.1] - 2026-02-06
|
|
2677
|
-
|
|
2678
|
-
### Fixed
|
|
2679
|
-
|
|
2680
|
-
- Fixed terminal scrolling when displaying overlays after rendering large content, preventing hundreds of blank lines from being output
|
|
2681
|
-
|
|
2682
|
-
Older entries are archived in [packages/tui/CHANGELOG.md@a66558815743](https://github.com/can1357/oh-my-pi/blob/a66558815743a61164ceebceb2bb528989fb09b3/packages/tui/CHANGELOG.md).
|
|
2588
|
+
Older entries are archived in [packages/tui/CHANGELOG.md@9748d65121ba](https://github.com/can1357/oh-my-pi/blob/9748d65121bac9589d3b136a6d839d76ec52dc2e/packages/tui/CHANGELOG.md).
|
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
* scrollbar, right sidebar (file management + commit form while dirty, HEAD
|
|
8
8
|
* commit details with author avatar when clean). Submitting an empty commit
|
|
9
9
|
* form generates an llm-git-compatible message; submitting populated fields
|
|
10
|
-
* commits them. A footer shows key hints
|
|
10
|
+
* commits them. A footer shows key hints; the staging and discarding ones are
|
|
11
|
+
* omitted while the tree is clean, where they cannot fire.
|
|
11
12
|
*
|
|
12
13
|
* `tab` moves focus between the diff and the sidebar; both panes take
|
|
13
14
|
* arrows/PgUp/PgDn, vim motions (`j`/`k`/`h`/`l`/`g`/`G`), and mouse
|
|
@@ -22,7 +23,8 @@
|
|
|
22
23
|
* refreshes. In the sidebar tree `←`/`→` collapse/expand directories,
|
|
23
24
|
* `enter` opens the selected file in the diff pane, `space` stages or
|
|
24
25
|
* unstages the selected row, and `delete` discards it — on a directory,
|
|
25
|
-
* every file underneath it.
|
|
26
|
+
* every file underneath it. All of the staging and discarding keys are inert
|
|
27
|
+
* on a clean tree, which shows the HEAD commit instead of a change list.
|
|
26
28
|
*/
|
|
27
29
|
import { TUI } from "../../tui.js";
|
|
28
30
|
import type { AvatarSource } from "./avatar.js";
|
|
@@ -58,6 +60,17 @@ export interface GitTuiHost {
|
|
|
58
60
|
stagedAll: boolean;
|
|
59
61
|
}>;
|
|
60
62
|
}
|
|
63
|
+
type Focus = "diff" | "sidebar";
|
|
64
|
+
/**
|
|
65
|
+
* Footer key hints. A clean tree renders the HEAD commit view, where stage
|
|
66
|
+
* and discard cannot fire: `#patchTargetFor` returns null and
|
|
67
|
+
* `#discardCurrentFile` returns early for `area: "commit"` rows, and the
|
|
68
|
+
* sidebar only builds stage/discard actions for the unstaged/staged
|
|
69
|
+
* sections. `commit` needs the commit form (absent on a clean tree) and
|
|
70
|
+
* `select` feeds the line-level stage/discard actions (no-ops on commit
|
|
71
|
+
* rows), so the commit view drops those too and says what it is showing.
|
|
72
|
+
*/
|
|
73
|
+
export declare function gitFooterHints(clean: boolean, focus: Focus): string;
|
|
61
74
|
/**
|
|
62
75
|
* Mount the git TUI as a fullscreen overlay on an existing TUI (the `/git`
|
|
63
76
|
* slash command). Resolves when the user closes it; the caller restores focus.
|
|
@@ -65,3 +78,4 @@ export interface GitTuiHost {
|
|
|
65
78
|
export declare function showGitOverlay(ui: TUI, host: GitTuiHost): Promise<void>;
|
|
66
79
|
/** Run the fullscreen git TUI standalone (`omp git`) until the user quits. */
|
|
67
80
|
export declare function runGitTui(host: GitTuiHost): Promise<void>;
|
|
81
|
+
export {};
|
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export declare function findLeadingSlashCommandStart(text: string): number | null;
|
|
8
8
|
export declare function findTrailingSlashCommandStart(text: string): number | null;
|
|
9
|
+
/** Extract the live whitespace-delimited or double-quoted `@` file token ending at the cursor. */
|
|
10
|
+
export declare function extractAtFilePrefix(text: string): string | null;
|
|
9
11
|
/**
|
|
10
12
|
* Whether an autocomplete value represents a directory: trailing slash or
|
|
11
13
|
* backslash, optionally followed by a closing quote for quoted paths.
|
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
* Draws a {@link ChartSpec} as a standalone SVG document colored only with
|
|
3
3
|
* figure tokens — `var(--fg)`, `var(--muted)`, `var(--border)`,
|
|
4
4
|
* `var(--accent)`, `var(--surface)`, `var(--c1)`…`var(--c6)` — on a
|
|
5
|
-
* transparent background — the token vocabulary of assistant ```svg figures
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* transparent background — the token vocabulary of assistant ```svg figures:
|
|
6
|
+
* the host resolves them against the live theme (`prepareSvg`) for the
|
|
7
|
+
* rasterized terminal image, and a TSP terminal draws the chart as an ```svg
|
|
8
|
+
* figure in the palette it shows. The root carries {@link chartAlt} as its
|
|
9
|
+
* `aria-label`.
|
|
8
10
|
*
|
|
9
11
|
* Styled after Apple's charts and Tern's UI: a UI sans (Geist where Tern
|
|
10
12
|
* provides it), muted labels, hairline gridlines that recede behind the
|
|
@@ -39,16 +41,8 @@
|
|
|
39
41
|
*/
|
|
40
42
|
import { type ChartSpec } from "./chart-plan.js";
|
|
41
43
|
import { type Dimension } from "./table-data.js";
|
|
42
|
-
/**
|
|
43
|
-
export
|
|
44
|
-
readonly svg: string;
|
|
45
|
-
readonly width: number;
|
|
46
|
-
readonly height: number;
|
|
47
|
-
}
|
|
48
|
-
/** The SVG document for `spec`. */
|
|
49
|
-
export declare function renderChartSvg(spec: ChartSpec): ChartSvg;
|
|
50
|
-
/** One-line description of the chart, for screen readers and terminals that show the alt text. */
|
|
51
|
-
export declare function chartAlt(spec: ChartSpec): string;
|
|
44
|
+
/** The SVG document for `spec`, labeled for screen readers with {@link chartAlt}. */
|
|
45
|
+
export declare function renderChartSvg(spec: ChartSpec): string;
|
|
52
46
|
/**
|
|
53
47
|
* A value in base units as an axis label: durations and sizes in the unit,
|
|
54
48
|
* counts compacted under the suffix (`12k`, `3.4M`), that `magnitude` reads
|
|
@@ -2,7 +2,6 @@ import type { Tokens } from "@oh-my-pi/pi-utils/marked";
|
|
|
2
2
|
import { type ChartPlan } from "../charts/chart-plan.js";
|
|
3
3
|
import { type TableAnalysis } from "../charts/table-data.js";
|
|
4
4
|
import type { ImageBudget } from "../components/image.js";
|
|
5
|
-
import type { NativeNode } from "../native/node.js";
|
|
6
5
|
import type { Component } from "../tui.js";
|
|
7
6
|
/**
|
|
8
7
|
* `smart`: a model refines the local guess where meaning decides (kind,
|
|
@@ -24,17 +23,11 @@ export interface TableChartRequest {
|
|
|
24
23
|
* for no chart. A rejection falls back to the local guess.
|
|
25
24
|
*/
|
|
26
25
|
export type TableChartPlanner = (request: TableChartRequest) => Promise<ChartPlan | null>;
|
|
27
|
-
/**
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
/** Size in SVG user units. */
|
|
33
|
-
readonly width: number;
|
|
34
|
-
readonly height: number;
|
|
35
|
-
}
|
|
36
|
-
/** The chart under a table: drawn, none, or a smart pick on its way (the promise settles once the cache holds it). */
|
|
37
|
-
export type ChartLookup = TableChart | null | Promise<void>;
|
|
26
|
+
/**
|
|
27
|
+
* The chart under a table: its SVG, colored with figure tokens (`var(--accent)`, …)
|
|
28
|
+
* still to resolve; none; or a smart pick on its way (the promise settles once the cache holds it).
|
|
29
|
+
*/
|
|
30
|
+
export type ChartLookup = string | null | Promise<void>;
|
|
38
31
|
/** One run of a Markdown block: prose (ending at a charted table), or the chart drawn after that table. */
|
|
39
32
|
export type ChartSegment = {
|
|
40
33
|
readonly kind: "markdown";
|
|
@@ -60,10 +53,13 @@ export declare function splitTableCharts(markdown: string, streaming: boolean):
|
|
|
60
53
|
*/
|
|
61
54
|
export declare function lookupTableChart(table: Tokens.Table): ChartLookup;
|
|
62
55
|
/**
|
|
63
|
-
*
|
|
64
|
-
*
|
|
56
|
+
* Chart `svg` as a Markdown ```svg fence, for a TSP terminal's `md` node. Its
|
|
57
|
+
* figure tokens stay unresolved: the terminal draws the fence as a figure in
|
|
58
|
+
* the palette it shows the prose in, so the chart cannot fall out of step with
|
|
59
|
+
* the page when omp's own idea of the appearance does, and a theme switch
|
|
60
|
+
* recolors it without a resend.
|
|
65
61
|
*/
|
|
66
|
-
export declare function
|
|
62
|
+
export declare function chartFence(svg: string): string;
|
|
67
63
|
export interface TableChartFigureOptions {
|
|
68
64
|
/** Shared inline-image budget. */
|
|
69
65
|
budget?: ImageBudget;
|
|
@@ -100,6 +100,8 @@ export declare class TranscriptContainer extends Container {
|
|
|
100
100
|
blockModes(): readonly TranscriptBlockMode[];
|
|
101
101
|
/** Emitted stable semantic-row counts in transcript order. */
|
|
102
102
|
emittedStableRows(): readonly number[];
|
|
103
|
+
/** Whether any block is still streaming or otherwise unfinalized. */
|
|
104
|
+
hasActiveBlock(): boolean;
|
|
103
105
|
/** Whether visible active capacity and live-block memory permit another admission. */
|
|
104
106
|
canAdmit(rows: number): boolean;
|
|
105
107
|
/** Prepares one atomic replay of the committed ledger and an emitted active-head prefix. */
|
|
@@ -8,6 +8,8 @@ export interface ImageOptions {
|
|
|
8
8
|
maxWidthCells?: number;
|
|
9
9
|
maxHeightCells?: number;
|
|
10
10
|
filename?: string;
|
|
11
|
+
/** File the image was read from; its link target. Images without one link to a blob copy of their bytes. */
|
|
12
|
+
sourcePath?: string;
|
|
11
13
|
/** Shared budget that caps how many inline images render as live graphics. */
|
|
12
14
|
budget?: ImageBudget;
|
|
13
15
|
/**
|
|
@@ -10,6 +10,43 @@ import type { Component } from "../tui.js";
|
|
|
10
10
|
* byte-identical to rendering `text`.
|
|
11
11
|
*/
|
|
12
12
|
export declare function streamingMarkdownSource(text: string): string;
|
|
13
|
+
/**
|
|
14
|
+
* Streaming `md` source for a native terminal, minus a still-growing table row:
|
|
15
|
+
* the unterminated last line when a GFM table (a run of pipe lines holding a
|
|
16
|
+
* header and its delimiter row, outer pipes optional) sits right above it,
|
|
17
|
+
* outside any open code fence. GFM continues a table on any non-blank line, so
|
|
18
|
+
* that line is a row whatever it holds so far. The terminal sizes columns by
|
|
19
|
+
* every row it gets, so a half-streamed row (an unclosed link shows its whole
|
|
20
|
+
* URL) would rewrap the table each frame, and TSP cannot ask it to skip one.
|
|
21
|
+
* The result keeps the newline before the held line, so it is a prefix of
|
|
22
|
+
* `text` and of the result for every append to it: streaming stays
|
|
23
|
+
* append-only. Pass untrimmed source: trimming first drops the newline that
|
|
24
|
+
* marks the last row finished, so that row would be held too.
|
|
25
|
+
*/
|
|
26
|
+
export declare function holdPartialTableRow(text: string): string;
|
|
27
|
+
/**
|
|
28
|
+
* `text`, one inline run whose end is still streaming, with a trailing open
|
|
29
|
+
* link or math span closed the way the finished text most likely closes it,
|
|
30
|
+
* or `undefined` when nothing at its end is open. A link gains its missing
|
|
31
|
+
* `)` (one per open parenthesis in its destination), so it renders as the
|
|
32
|
+
* link it becomes instead of literal brackets and URL. A math body is cut back
|
|
33
|
+
* to its last valid form (a half-typed command, dangling `^`/`_`, or the first
|
|
34
|
+
* `$` of a `$$` closer dropped, open braces closed) and closed, so the
|
|
35
|
+
* rendered math grows in place instead of raw LaTeX turning into symbols at
|
|
36
|
+
* the closer. A `$` body needs a LaTeX character, so a price (`$5 per`) is
|
|
37
|
+
* never speculated. Only prose is: escaped openers and anything inside a code
|
|
38
|
+
* span, closed or still being written, stay literal.
|
|
39
|
+
*/
|
|
40
|
+
export declare function speculativeInlineClose(text: string): string | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Streaming `md` source for a native terminal with the open link or math span
|
|
43
|
+
* at its end speculatively closed ({@link speculativeInlineClose}), as the TUI
|
|
44
|
+
* renders it. Only the last block is read (a span cannot cross a blank line),
|
|
45
|
+
* and source inside an open code fence is left as it is. Each frame rewrites
|
|
46
|
+
* only the guessed closers at the end, which the reconciler sends as a small
|
|
47
|
+
* `splice`.
|
|
48
|
+
*/
|
|
49
|
+
export declare function speculativeStreamingSource(text: string): string;
|
|
13
50
|
/** @internal exported for tests — the grown-line block-kind gate. */
|
|
14
51
|
export declare function fastLineStartHazard(grownLine: string): boolean;
|
|
15
52
|
/**
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Content-addressed binary blobs (images) for `image` nodes.
|
|
3
|
-
*
|
|
4
|
-
* `describe()` registers the bytes and puts the returned id in `image.p.blob`;
|
|
5
|
-
* the native backend delivers each referenced blob once per terminal
|
|
6
|
-
* connection (asking the terminal first which it holds, or through its blob
|
|
7
|
-
* cache), else uploads it with verb `b` before the frame that first
|
|
8
|
-
* references it.
|
|
9
|
-
*/
|
|
10
1
|
import type { TspProps } from "@oh-my-pi/pi-wire";
|
|
11
2
|
import type { NativeChild, NativeNode } from "./node.js";
|
|
12
3
|
export interface NativeBlob {
|
|
@@ -26,10 +17,19 @@ export declare function nativeImageNode(bytes: Uint8Array, mime: string, p?: Omi
|
|
|
26
17
|
* so callers cache the node per payload ({@link NativeImageCache}).
|
|
27
18
|
*/
|
|
28
19
|
export declare function base64ImageNode(data: string, mimeType: string, p?: Omit<TspProps<"image">, "blob" | "builtin" | "w" | "h">, key?: string): NativeNode;
|
|
29
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* Props that make an `image` node open the file at `filePath` (as a `file://` URL, the TSP
|
|
22
|
+
* open-target form): a click zooms the image in the terminal, and the file opens from its
|
|
23
|
+
* context menu. Empty without a file.
|
|
24
|
+
*/
|
|
25
|
+
export declare function openableImageProps(filePath: string | undefined): Pick<TspProps<"image">, "href" | "actions">;
|
|
26
|
+
/**
|
|
27
|
+
* `image` nodes for base64 payloads, one per slot key, rebuilt only when the slot's payload
|
|
28
|
+
* or the link policy changes. Each opens its file (`sourcePath`, else a blob copy).
|
|
29
|
+
*/
|
|
30
30
|
export declare class NativeImageCache {
|
|
31
31
|
#private;
|
|
32
|
-
get(key: string, data: string, mimeType: string): NativeNode;
|
|
32
|
+
get(key: string, data: string, mimeType: string, sourcePath?: string): NativeNode;
|
|
33
33
|
}
|
|
34
34
|
/** The disk file a tool result's image was read from (`read` details `mediaPath`), when it has one. */
|
|
35
35
|
export declare function readMediaPath(details: unknown): string | undefined;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import type { AgentMetricsSummary, AgentRecordLike, AgentStatus } from "./agent-hub-types.js";
|
|
2
2
|
import type { ObservableSession } from "./session-observer-registry.js";
|
|
3
3
|
export type AgentMetrics = AgentMetricsSummary;
|
|
4
|
+
export interface AgentCostSnapshot {
|
|
5
|
+
cost: number | undefined;
|
|
6
|
+
}
|
|
4
7
|
export interface AggregateMetrics extends AgentMetrics {
|
|
5
8
|
reportedAgents: number;
|
|
6
9
|
/** Rows whose duration is an observer-measured active runtime. */
|
|
@@ -17,14 +20,16 @@ export declare const STATUS_ORDER: Record<AgentStatus, number>;
|
|
|
17
20
|
export declare function progressMetrics(observed: ObservableSession | undefined): AgentMetrics | undefined;
|
|
18
21
|
/** Live session used to cache a row's direct assistant usage, including with observer progress. */
|
|
19
22
|
export declare function hubFallbackStatsSession<TRecord extends AgentRecordLike>(ref: TRecord, observed: ObservableSession | undefined): NonNullable<TRecord["session"]> | undefined;
|
|
20
|
-
/**
|
|
21
|
-
* Preserve progress/history for non-cost metrics, overlaying cumulative direct-session cost.
|
|
22
|
-
* Persisted `history.metrics.cost` is a leaf-scoped snapshot, so it never overrides live
|
|
23
|
-
* progress; only the cumulative direct-cost sources do.
|
|
24
|
-
*/
|
|
23
|
+
/** Full Agent Hub row metrics; see {@link projectRowMetrics} for source precedence. */
|
|
25
24
|
export declare function hubRowMetrics<TRecord extends AgentRecordLike>(ref: TRecord, observed: ObservableSession | undefined, sessionMetrics: WeakMap<object, {
|
|
26
25
|
metrics: AgentMetrics | undefined;
|
|
27
26
|
}>): AgentMetrics | undefined;
|
|
27
|
+
/** Cost-only projection for frequent status updates; full roster metrics keep their own cache. */
|
|
28
|
+
export declare function aggregateCost<TRecord extends AgentRecordLike>(args: {
|
|
29
|
+
rows: readonly TRecord[];
|
|
30
|
+
observedById: ReadonlyMap<string, ObservableSession>;
|
|
31
|
+
sessionCosts: WeakMap<object, AgentCostSnapshot>;
|
|
32
|
+
}): number;
|
|
28
33
|
export declare function aggregateMetrics<TRecord extends AgentRecordLike>(args: {
|
|
29
34
|
rows: readonly TRecord[];
|
|
30
35
|
observedById: ReadonlyMap<string, ObservableSession>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { Theme } from "../theme/theme.js";
|
|
2
|
+
/** What the tree reads off a job. */
|
|
3
|
+
export interface JobTreeJob {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly status: "running" | "completed" | "failed" | "cancelled";
|
|
6
|
+
readonly startTime: number;
|
|
7
|
+
/** Registry id of the agent that owns the job; absent or the root id: a top-level job. */
|
|
8
|
+
readonly ownerId?: string;
|
|
9
|
+
/** Registry id of the subagent a task job runs: the job heads that agent's subtree. */
|
|
10
|
+
readonly agentId?: string;
|
|
11
|
+
}
|
|
12
|
+
/** A subagent in the tree, by registry id: an owner of listed jobs, or an ancestor linking one to the root. */
|
|
13
|
+
export interface JobTreeAgent {
|
|
14
|
+
readonly id: string;
|
|
15
|
+
readonly parentId?: string;
|
|
16
|
+
}
|
|
17
|
+
/** Where a row sits: its depth and the rails drawn left of it. */
|
|
18
|
+
export interface JobTreePlace {
|
|
19
|
+
/** 0 for the top level. */
|
|
20
|
+
readonly depth: number;
|
|
21
|
+
/** Per enclosing level below the top, whether that level's rail continues past this row. */
|
|
22
|
+
readonly rails: readonly boolean[];
|
|
23
|
+
/** Whether this row is the last of its siblings. */
|
|
24
|
+
readonly last: boolean;
|
|
25
|
+
/** Whether rows nest under this one. */
|
|
26
|
+
readonly parent: boolean;
|
|
27
|
+
}
|
|
28
|
+
/** One tree row: a job (a task job also heads its subagent), or a header for a subagent with no listed task job. */
|
|
29
|
+
export type JobTreeRow<J extends JobTreeJob> = (JobTreePlace & {
|
|
30
|
+
readonly kind: "job";
|
|
31
|
+
readonly job: J;
|
|
32
|
+
readonly agent?: JobTreeAgent;
|
|
33
|
+
}) | (JobTreePlace & {
|
|
34
|
+
readonly kind: "agent";
|
|
35
|
+
readonly agent: JobTreeAgent;
|
|
36
|
+
});
|
|
37
|
+
/**
|
|
38
|
+
* `jobs` as tree rows in display order. `rootId` is the viewing agent: its
|
|
39
|
+
* jobs, ownerless jobs and jobs of owners outside `agents` sit at the top
|
|
40
|
+
* level, as do agents whose parent is the root or unknown.
|
|
41
|
+
*/
|
|
42
|
+
export declare function buildJobTree<J extends JobTreeJob>(jobs: readonly J[], agents: readonly JobTreeAgent[], rootId: string | undefined): JobTreeRow<J>[];
|
|
43
|
+
/** The connector drawn before a row's head: nothing at the top level, else rails then a branch. */
|
|
44
|
+
export declare function jobTreeGuide(row: JobTreePlace, theme: Theme): string;
|
|
45
|
+
/**
|
|
46
|
+
* The prefix of lines under a row's head (its label, a wrapped command): the
|
|
47
|
+
* rails that continue past it, then the rail down to its children or blank,
|
|
48
|
+
* two columns wide so a top-level leaf's lines indent by two.
|
|
49
|
+
*/
|
|
50
|
+
export declare function jobTreeIndent(row: JobTreePlace, theme: Theme): string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Component } from "../tui.js";
|
|
2
2
|
import type { DescribeContext, NativeNode, NativeUiEvent } from "../native/node.js";
|
|
3
|
+
import { type JobTreeAgent } from "./job-tree.js";
|
|
3
4
|
/** One async job as the session snapshots it. */
|
|
4
5
|
export interface JobsPanelJob {
|
|
5
6
|
readonly id: string;
|
|
@@ -8,13 +9,19 @@ export interface JobsPanelJob {
|
|
|
8
9
|
readonly label: string;
|
|
9
10
|
readonly startTime: number;
|
|
10
11
|
readonly endTime?: number;
|
|
12
|
+
/** Registry id of the agent that owns the job. */
|
|
13
|
+
readonly ownerId?: string;
|
|
11
14
|
/** Registry id of the subagent a task job runs. */
|
|
12
15
|
readonly agentId?: string;
|
|
13
16
|
}
|
|
14
|
-
/** Running and recently settled jobs. */
|
|
17
|
+
/** Running and recently settled jobs of an agent and its subagents. */
|
|
15
18
|
export interface JobsPanelSnapshot {
|
|
16
19
|
readonly running: readonly JobsPanelJob[];
|
|
17
20
|
readonly recent: readonly JobsPanelJob[];
|
|
21
|
+
/** The agent the sheet is for: its jobs sit at the top level, and only they can be cancelled. */
|
|
22
|
+
readonly rootId?: string;
|
|
23
|
+
/** Subagents owning listed jobs, with the ancestors linking them to the root. */
|
|
24
|
+
readonly agents?: readonly JobTreeAgent[];
|
|
18
25
|
}
|
|
19
26
|
/** What the sheet shows about the selected job beyond its row. */
|
|
20
27
|
export interface JobsPanelDetail {
|
|
@@ -35,20 +42,26 @@ export interface JobsSheetSource {
|
|
|
35
42
|
load(): JobsPanelSnapshot;
|
|
36
43
|
/** The selected job's detail; runs once per frame, undefined once the job is gone. */
|
|
37
44
|
inspect(id: string): JobsPanelDetail | undefined;
|
|
38
|
-
/**
|
|
39
|
-
|
|
45
|
+
/**
|
|
46
|
+
* Cancel a running job. Omitted by a read-only sheet (a focused subagent
|
|
47
|
+
* view, which only watches that agent): it lists the jobs and offers no way
|
|
48
|
+
* to stop them.
|
|
49
|
+
*/
|
|
50
|
+
cancel?(id: string): void;
|
|
40
51
|
/** Dismiss the sheet. */
|
|
41
52
|
close(): void;
|
|
42
53
|
}
|
|
43
54
|
/**
|
|
44
55
|
* The jobs pill's sheet: a centred `lg` glass sheet titled Background jobs.
|
|
45
|
-
* A master–detail split (it stacks in a narrow pane): the selectable job
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
56
|
+
* A master–detail split (it stacks in a narrow pane): the selectable job tree
|
|
57
|
+
* beside the selected job's detail — a status pill with live elapsed and
|
|
58
|
+
* Cancel job, its command or task, facts (agent, cwd, live pids, exit code,
|
|
59
|
+
* artifact) and a tail-following output pane. With no jobs it shows an empty
|
|
60
|
+
* state. It re-reads the session every frame, so the caller re-renders it on
|
|
61
|
+
* a timer while it is open. ↑/↓ select, X cancels the selected running job,
|
|
62
|
+
* Esc or Close dismisses; nothing enters the transcript. A source without
|
|
63
|
+
* `cancel` renders read-only, and a subagent's job never offers Cancel: only
|
|
64
|
+
* the root's own jobs can be stopped here.
|
|
52
65
|
*/
|
|
53
66
|
export declare class JobsSheet implements Component {
|
|
54
67
|
#private;
|
|
@@ -60,7 +73,7 @@ export declare class JobsSheet implements Component {
|
|
|
60
73
|
};
|
|
61
74
|
constructor(source: JobsSheetSource);
|
|
62
75
|
describe(_cx: DescribeContext): NativeNode;
|
|
63
|
-
/** Rows for a terminal without the native surface:
|
|
76
|
+
/** Rows for a terminal without the native surface: the job tree, then the selected job's facts and output tail. */
|
|
64
77
|
render(width: number): readonly string[];
|
|
65
78
|
invalidate(): void;
|
|
66
79
|
handleInput(data: string): void;
|
|
@@ -59,6 +59,20 @@ export interface RuntimeChildrenOptions {
|
|
|
59
59
|
* to the roots below the transcript in render order.
|
|
60
60
|
*/
|
|
61
61
|
readonly nativeDock?: readonly Component[];
|
|
62
|
+
/**
|
|
63
|
+
* Below-transcript roots the user opens and closes (the editor surface that
|
|
64
|
+
* drafts and dialogs swap into, docked reports). Their rows never become
|
|
65
|
+
* part of the post-run chrome floor, so collapsing them refills the screen.
|
|
66
|
+
*/
|
|
67
|
+
readonly transientChrome?: readonly Component[];
|
|
68
|
+
/**
|
|
69
|
+
* Transient roots that clear themselves (todo and subagent HUDs, progress).
|
|
70
|
+
* Their first paint can be their tallest, e.g. a restored todo list on a
|
|
71
|
+
* resumed session, so unlike {@link transientChrome} it is never treated as
|
|
72
|
+
* their resting height: all of their rows stay out of the floor. Roots listed
|
|
73
|
+
* here are transient and need not also appear in `transientChrome`.
|
|
74
|
+
*/
|
|
75
|
+
readonly selfClearingChrome?: readonly Component[];
|
|
62
76
|
}
|
|
63
77
|
/** Controls the first terminal paint for a composer that does not already own the terminal. */
|
|
64
78
|
export interface ComposerStartOptions {
|
|
@@ -157,6 +171,12 @@ export declare class Composer implements TerminalFrameProvider, NativeSurfacePro
|
|
|
157
171
|
setPreferences(update: Partial<ComposerPreferences>): void;
|
|
158
172
|
/** Patch welcome data in place as version, session, and project discovery complete. */
|
|
159
173
|
updateWelcome(update: ComposerWelcomeUpdate): void;
|
|
174
|
+
/**
|
|
175
|
+
* Mark whether a host agent run is in flight. Mid-run gaps with no streaming
|
|
176
|
+
* block (tool arguments not yet parseable, between tool calls) then do not
|
|
177
|
+
* count as the run ending when the post-run chrome floor is decided.
|
|
178
|
+
*/
|
|
179
|
+
setRunActive(active: boolean): void;
|
|
160
180
|
/** Replace optional header content around the stable welcome scene. */
|
|
161
181
|
setHeaderExtras(before: readonly Component[], after: readonly Component[]): void;
|
|
162
182
|
/** Update the canonical editor reference after InteractiveMode remounts a custom editor. */
|