@linxiraos/pi-tui 1.4.0 → 1.4.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 +43 -43
- package/dist/types/autocomplete.d.ts +6 -0
- package/dist/types/components/sparkline.d.ts +34 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/native/describe.d.ts +7 -1
- package/dist/types/native/overlay.d.ts +2 -0
- package/dist/types/native/tone.d.ts +2 -0
- package/dist/types/overlays/agent-hub.d.ts +3 -3
- package/dist/types/overlays/approval-dialog.d.ts +15 -1
- package/dist/types/overlays/jobs-panel.d.ts +3 -0
- package/dist/types/overlays/model-browser.d.ts +1 -1
- package/dist/types/render/output-block.d.ts +2 -0
- package/dist/types/render/tool-card.d.ts +2 -0
- package/dist/types/sixel.d.ts +28 -0
- package/dist/types/status-line/host.d.ts +3 -0
- package/dist/types/terminal-capabilities.d.ts +5 -0
- package/dist/types/tools/bash.d.ts +2 -0
- package/dist/types/tools/default-renderer.d.ts +3 -0
- package/dist/types/tools/eval.d.ts +9 -8
- package/dist/types/tools/irc.d.ts +6 -0
- package/dist/types/tools/job-widget.d.ts +226 -0
- package/dist/types/tools/json-tree.d.ts +2 -0
- package/dist/types/tools/line-ranges.d.ts +8 -1
- package/dist/types/tools/mcp.d.ts +23 -0
- package/dist/types/tools/output-meta.d.ts +1 -1
- package/dist/types/tools/read.d.ts +8 -2
- package/dist/types/tools/renderer.d.ts +8 -2
- package/dist/types/tools/result-card.d.ts +1 -1
- package/dist/types/tools/streaming-output.d.ts +1 -0
- package/dist/types/tools/task.d.ts +12 -0
- package/dist/types/tools/wait.d.ts +5 -0
- package/package.json +9 -9
- package/src/autocomplete.d.ts +6 -0
- package/src/autocomplete.ts +21 -6
- package/src/chat/skill-message.ts +16 -17
- package/src/chat/tool-execution.ts +35 -0
- package/src/chrome/transcript-container.ts +85 -13
- package/src/components/editor.ts +17 -7
- package/src/components/image.ts +5 -4
- package/src/components/markdown.ts +11 -3
- package/src/components/sparkline.d.ts +34 -0
- package/src/components/sparkline.ts +89 -0
- package/src/index.d.ts +1 -0
- package/src/index.ts +1 -0
- package/src/native/backend.ts +32 -6
- package/src/native/describe.d.ts +7 -1
- package/src/native/describe.ts +18 -1
- package/src/native/overlay.d.ts +2 -0
- package/src/native/overlay.ts +3 -0
- package/src/native/tone.d.ts +2 -0
- package/src/native/tone.ts +22 -0
- package/src/overlays/agent-hub.ts +14 -10
- package/src/overlays/agent-transcript-viewer.ts +2 -2
- package/src/overlays/agents-hub.ts +2 -1
- package/src/overlays/approval-dialog.ts +59 -13
- package/src/overlays/hub-frame.ts +2 -1
- package/src/overlays/jobs-panel.ts +24 -2
- package/src/overlays/model-browser.ts +3 -0
- package/src/overlays/model-hub.ts +2 -1
- package/src/prompt/attachment-chips.ts +1 -1
- package/src/render/output-block.d.ts +2 -0
- package/src/render/output-block.ts +25 -12
- package/src/render/tool-card.d.ts +2 -0
- package/src/render/tool-card.ts +6 -0
- package/src/sixel.d.ts +28 -0
- package/src/sixel.ts +185 -0
- package/src/status-line/component.ts +19 -2
- package/src/status-line/host.ts +3 -0
- package/src/terminal-capabilities.d.ts +5 -0
- package/src/terminal-capabilities.ts +43 -3
- package/src/theme/symbols.ts +5 -3
- package/src/tools/bash.d.ts +2 -0
- package/src/tools/bash.ts +25 -9
- package/src/tools/default-renderer.d.ts +3 -0
- package/src/tools/default-renderer.ts +54 -17
- package/src/tools/eval.d.ts +9 -8
- package/src/tools/eval.ts +32 -14
- package/src/tools/find.ts +4 -5
- package/src/tools/glob.ts +4 -6
- package/src/tools/grep.ts +2 -4
- package/src/tools/irc.d.ts +6 -0
- package/src/tools/irc.ts +6 -0
- package/src/tools/job-widget.d.ts +226 -0
- package/src/tools/job-widget.ts +1036 -0
- package/src/tools/json-tree.d.ts +2 -0
- package/src/tools/json-tree.ts +8 -0
- package/src/tools/line-ranges.d.ts +8 -1
- package/src/tools/line-ranges.ts +23 -13
- package/src/tools/mcp.d.ts +23 -0
- package/src/tools/mcp.ts +44 -1
- package/src/tools/output-meta.d.ts +1 -1
- package/src/tools/output-meta.ts +1 -1
- package/src/tools/read.d.ts +8 -2
- package/src/tools/read.ts +64 -21
- package/src/tools/renderer.d.ts +8 -2
- package/src/tools/renderer.ts +8 -2
- package/src/tools/result-card.d.ts +1 -1
- package/src/tools/result-card.ts +1 -2
- package/src/tools/streaming-output.d.ts +1 -0
- package/src/tools/streaming-output.ts +11 -9
- package/src/tools/task.d.ts +12 -0
- package/src/tools/task.ts +25 -1
- package/src/tools/wait.d.ts +5 -0
- package/src/tools/wait.ts +290 -147
- package/src/tui.ts +45 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
-
## [1.4.
|
|
3
|
+
## [1.4.2] - 2026-10-24
|
|
4
4
|
|
|
5
|
-
-
|
|
5
|
+
- Version alignment with the 1.4.2 release line (no behavioral changes).
|
|
6
6
|
|
|
7
7
|
## [9.5.0] - 2026-02-01
|
|
8
8
|
|
|
@@ -93,7 +93,6 @@
|
|
|
93
93
|
### Fixed
|
|
94
94
|
|
|
95
95
|
- Fixed numbered list items showing "1." for all items when code blocks break list continuity
|
|
96
|
-
- Fixed width overflow protection in overlay compositing to prevent TUI crashes
|
|
97
96
|
|
|
98
97
|
## [4.6.0] - 2026-01-12
|
|
99
98
|
|
|
@@ -124,10 +123,6 @@
|
|
|
124
123
|
|
|
125
124
|
- `EditorComponent` interface for custom editor implementations
|
|
126
125
|
|
|
127
|
-
### Fixed
|
|
128
|
-
|
|
129
|
-
- Key presses no longer dropped when batched with other events over SSH
|
|
130
|
-
|
|
131
126
|
## [3.32.0] - 2026-01-08
|
|
132
127
|
|
|
133
128
|
### Fixed
|
|
@@ -153,7 +148,6 @@
|
|
|
153
148
|
### Added
|
|
154
149
|
|
|
155
150
|
- Added `inputCursor` symbol for customizing the text input cursor character
|
|
156
|
-
- Added `symbols` property to `EditorTheme`, `MarkdownTheme`, and `SelectListTheme` interfaces for component-level symbol customization
|
|
157
151
|
|
|
158
152
|
## [3.9.1337] - 2026-01-04
|
|
159
153
|
|
|
@@ -187,11 +181,9 @@
|
|
|
187
181
|
|
|
188
182
|
Initial release under @oh-my-pi scope. See previous releases at [badlogic/pi-mono](https://github.com/badlogic/pi-mono).
|
|
189
183
|
|
|
190
|
-
## [1.
|
|
184
|
+
## [1.4.1] - 2026-10-23
|
|
191
185
|
|
|
192
|
-
-
|
|
193
|
-
|
|
194
|
-
## [1.3.1] - 2026-10-19
|
|
186
|
+
- An attached TUI renders the backend's builtin-command output (`command_output`) in its status line and keeps client-only commands, pickers and mirrored switches local
|
|
195
187
|
|
|
196
188
|
### Breaking Changes
|
|
197
189
|
|
|
@@ -201,9 +193,7 @@ Initial release under @oh-my-pi scope. See previous releases at [badlogic/pi-mon
|
|
|
201
193
|
|
|
202
194
|
### Added
|
|
203
195
|
|
|
204
|
-
- Added `
|
|
205
|
-
- `AssistantMessageComponent`'s native turn footer leads with a Copy icon (`zeta.turn.copy`) and a dot instead of the clock icon; it copies the answer's text and shows when the host handles transcript actions
|
|
206
|
-
- Add backslash+enter newline fallback for terminals without Kitty protocol
|
|
196
|
+
- Added `symbols` property to `EditorTheme`, `MarkdownTheme`, and `SelectListTheme` interfaces for component-level symbol customization
|
|
207
197
|
- Overlay compositing via `TUI.showOverlay()` and `TUI.hideOverlay()` for `ctx.ui.custom()` with `{ overlay: true }`
|
|
208
198
|
- Kitty keyboard protocol flag 2 support for key release events (`isKeyRelease()`, `isKeyRepeat()`, `KeyEventType`)
|
|
209
199
|
- `setKittyProtocolActive()`, `isKittyProtocolActive()` for Kitty protocol state management
|
|
@@ -260,6 +250,9 @@ Initial release under @oh-my-pi scope. See previous releases at [badlogic/pi-mon
|
|
|
260
250
|
- Added rounded corner box-drawing characters to Editor component borders
|
|
261
251
|
- Added legacy terminal support for Ctrl+symbol keys (Ctrl+\, Ctrl+], Ctrl+-) and their Ctrl+Alt variants. ([#831](https://github.com/badlogic/pi-mono/pull/831) by [@Perlence](https://github.com/Perlence))
|
|
262
252
|
- Kitty keyboard protocol flag 2 support for key release events. New exports: `isKeyRelease(data)`, `isKeyRepeat(data)`, `KeyEventType` type. Terminals supporting Kitty protocol (Kitty, Ghostty, WezTerm) now send proper key-up events.
|
|
253
|
+
- `SettingsListOptions` with `enableSearch` for fuzzy filtering in `SettingsList` ([#643](https://github.com/badlogic/pi-mono/pull/643) by [@ninlds](https://github.com/ninlds))
|
|
254
|
+
- `Editor.insertTextAtCursor(text)` method for programmatic text insertion ([#419](https://github.com/badlogic/pi-mono/issues/419))
|
|
255
|
+
- `EditorKeybindingsManager` for configurable editor keybindings. Components now use `matchesKey()` and keybindings manager instead of individual `isXxx()` functions. ([#405](https://github.com/badlogic/pi-mono/pull/405) by [@hjanuschka](https://github.com/hjanuschka))
|
|
263
256
|
|
|
264
257
|
### Changed
|
|
265
258
|
|
|
@@ -304,17 +297,12 @@ Initial release under @oh-my-pi scope. See previous releases at [badlogic/pi-mon
|
|
|
304
297
|
- Improved cursor positioning with safer bounds checking
|
|
305
298
|
- Updated editor layout to respect configurable padding
|
|
306
299
|
- Refactored scrolling logic for better viewport management
|
|
300
|
+
- Key detection refactored: consolidated `is*()` functions into generic `matchesKey(data, keyId)` function that accepts key identifiers like `"ctrl+c"`, `"shift+enter"`, `"alt+left"`, etc.
|
|
307
301
|
|
|
308
302
|
### Fixed
|
|
309
303
|
|
|
310
|
-
- Fixed
|
|
311
|
-
-
|
|
312
|
-
- Fixed the status-bar activity spinner and turn timer freezing until the next keypress when the working-row loader is stopped mid-turn; an open turn window now repaints the status line on its own timer ([#16109](https://github.com/can1357/oh-my-pi/pull/16109) by [@tommymorgan](https://github.com/tommymorgan)).
|
|
313
|
-
- Fixed pasting sometimes inserting a block of base64 text instead of the pasted text in terminals that deliver pastes through the Kitty clipboard protocol (OSC 5522), most often with dictation apps that paste for you; a slow paste now arrives whole, and keys typed while a paste never finishes are given back instead of lost ([#16170](https://github.com/can1357/oh-my-pi/pull/16170) by [@H4vC](https://github.com/H4vC))
|
|
314
|
-
- Fixed a streaming table bouncing everything below it up and down while its last cell was still being written ([#16116](https://github.com/can1357/oh-my-pi/pull/16116) by [@galtamam-cmyk](https://github.com/galtamam-cmyk))
|
|
315
|
-
- Fixed inline images in iTerm2 being sized for the wrong cell shape, which left charts smeared or offset ([#16118](https://github.com/can1357/oh-my-pi/pull/16118) by [@galtamam-cmyk](https://github.com/galtamam-cmyk))
|
|
316
|
-
- Remove trailing space padding from Text, Markdown, and TruncatedText components when no background color is set (fixes copied text including unwanted whitespace)
|
|
317
|
-
- Fixed Ctrl+Enter sequences to insert new lines in the editor
|
|
304
|
+
- Fixed width overflow protection in overlay compositing to prevent TUI crashes
|
|
305
|
+
- Key presses no longer dropped when batched with other events over SSH
|
|
318
306
|
- Fixed `fd` tool detection to automatically find `fd` or `fdfind` in PATH when not explicitly configured
|
|
319
307
|
- Fixed editor multi-line insertion handling and lastAction tracking ([#945](https://github.com/badlogic/pi-mono/pull/945) by [@Perlence](https://github.com/Perlence))
|
|
320
308
|
- Fixed editor word wrapping to reserve a cursor column ([#934](https://github.com/badlogic/pi-mono/pull/934) by [@Perlence](https://github.com/Perlence))
|
|
@@ -362,12 +350,43 @@ Older entries are archived in [packages/tui/CHANGELOG.md@58141d4e5fa8](https://g
|
|
|
362
350
|
|
|
363
351
|
### Removed
|
|
364
352
|
|
|
365
|
-
- `SingleResult` (and the task tool's settled payload) carries the failure diagnostics an agent-driven model switch needs: optional `failureClass` (`usage-limit` / `auth` / `account-policy` / `context-overflow` / `transient` / `aborted` / `unknown`), optional `fallbackCandidates` (other selectors this session could run), and optional `modelChange` (`{ source: "spawn-param" | "wake-param", from?, to }`) recording that a caller-supplied model replaced the default one. All three stay absent unless a run actually reports them.
|
|
366
353
|
- The welcome/splash brand art is now generated with the standard FIGlet tool instead of being drawn by hand: `ZETA_LOGO` renders the mark `Z` (the ASCII form of `Ζ`), `ZETA_WORDMARK` renders `Zeta` (both in the standard `ANSI Shadow` font) and `ZETA_SUBLINE` renders the `Linxira-Zeta` identity line in `mini`, with the version under the wordmark. `bun scripts/brand/generate-logo-art.ts` regenerates the three constants from the vendored fonts, and the brand guard fails on any hand-edited glyph.
|
|
367
354
|
- Removed `ellipsis` property from `SymbolTheme` interface
|
|
368
355
|
- Removed `extractAnsiCode` function from public API
|
|
369
356
|
- Removed TUI layout engine exports from public API (BoxNode, ColumnNode, LayoutNode, etc.)
|
|
370
357
|
- Removed `visibleWidth` benchmark file in favor of Kitty sequence benchmarking
|
|
358
|
+
- Removed `truncateToWidth`, `sliceWithWidth`, and `extractSegments` functions from public API (now re-exported directly from @linxiraos/pi-natives)
|
|
359
|
+
|
|
360
|
+
## [1.4.0] - 2026-10-21
|
|
361
|
+
|
|
362
|
+
- Added a `zetawork` terminal id that resolves to the Kitty image protocol from the environment alone, so images render in the desktop app's own terminal
|
|
363
|
+
|
|
364
|
+
## [1.3.2] - 2026-10-19
|
|
365
|
+
|
|
366
|
+
- Version line moves to 1.3.2 with the rest of the suite; no user-visible change in this package.
|
|
367
|
+
|
|
368
|
+
## [1.3.1] - 2026-10-19
|
|
369
|
+
|
|
370
|
+
### Added
|
|
371
|
+
|
|
372
|
+
- Added `ComposerPreferences.completeScrollback` (default `false`): rows a growing HUD or dialog pushes off screen go straight to scrollback instead of being held back until it shrinks ([#15692](https://github.com/can1357/oh-my-pi/pull/15692) by [@Ilm-Alan](https://github.com/Ilm-Alan))
|
|
373
|
+
- `AssistantMessageComponent`'s native turn footer leads with a Copy icon (`zeta.turn.copy`) and a dot instead of the clock icon; it copies the answer's text and shows when the host handles transcript actions
|
|
374
|
+
- Add backslash+enter newline fallback for terminals without Kitty protocol
|
|
375
|
+
|
|
376
|
+
### Fixed
|
|
377
|
+
|
|
378
|
+
- Fixed table charts picking the wrong label and measure columns when numbers group thousands with spaces (`1 988`, `17 083`); they now read like `1,988` ([#16175](https://github.com/can1357/oh-my-pi/issues/16175))
|
|
379
|
+
- Fixed terminal capability replies relayed through win32-input-mode appearing as typed input in WSL terminals ([#16137](https://github.com/can1357/oh-my-pi/issues/16137))
|
|
380
|
+
- Fixed the status-bar activity spinner and turn timer freezing until the next keypress when the working-row loader is stopped mid-turn; an open turn window now repaints the status line on its own timer ([#16109](https://github.com/can1357/oh-my-pi/pull/16109) by [@tommymorgan](https://github.com/tommymorgan)).
|
|
381
|
+
- Fixed pasting sometimes inserting a block of base64 text instead of the pasted text in terminals that deliver pastes through the Kitty clipboard protocol (OSC 5522), most often with dictation apps that paste for you; a slow paste now arrives whole, and keys typed while a paste never finishes are given back instead of lost ([#16170](https://github.com/can1357/oh-my-pi/pull/16170) by [@H4vC](https://github.com/H4vC))
|
|
382
|
+
- Fixed a streaming table bouncing everything below it up and down while its last cell was still being written ([#16116](https://github.com/can1357/oh-my-pi/pull/16116) by [@galtamam-cmyk](https://github.com/galtamam-cmyk))
|
|
383
|
+
- Fixed inline images in iTerm2 being sized for the wrong cell shape, which left charts smeared or offset ([#16118](https://github.com/can1357/oh-my-pi/pull/16118) by [@galtamam-cmyk](https://github.com/galtamam-cmyk))
|
|
384
|
+
- Remove trailing space padding from Text, Markdown, and TruncatedText components when no background color is set (fixes copied text including unwanted whitespace)
|
|
385
|
+
- Fixed Ctrl+Enter sequences to insert new lines in the editor
|
|
386
|
+
|
|
387
|
+
### Removed
|
|
388
|
+
|
|
389
|
+
- `SingleResult` (and the task tool's settled payload) carries the failure diagnostics an agent-driven model switch needs: optional `failureClass` (`usage-limit` / `auth` / `account-policy` / `context-overflow` / `transient` / `aborted` / `unknown`), optional `fallbackCandidates` (other selectors this session could run), and optional `modelChange` (`{ source: "spawn-param" | "wake-param", from?, to }`) recording that a caller-supplied model replaced the default one. All three stay absent unless a run actually reports them.
|
|
371
390
|
|
|
372
391
|
## [1.3.0] - 2026-10-18
|
|
373
392
|
|
|
@@ -493,10 +512,6 @@ Older entries are archived in [packages/tui/CHANGELOG.md@58141d4e5fa8](https://g
|
|
|
493
512
|
|
|
494
513
|
- **Key detection functions removed**: All `isXxx()` key detection functions (`isEnter()`, `isEscape()`, `isCtrlC()`, etc.) have been removed. Use `matchesKey(data, keyId)` instead (e.g., `matchesKey(data, "enter")`, `matchesKey(data, "ctrl+c")`). This affects hooks and custom tools that use `ctx.ui.custom()` with keyboard input handling. ([#405](https://github.com/badlogic/pi-mono/pull/405))
|
|
495
514
|
|
|
496
|
-
### Removed
|
|
497
|
-
|
|
498
|
-
- Removed `truncateToWidth`, `sliceWithWidth`, and `extractSegments` functions from public API (now re-exported directly from @linxiraos/pi-natives)
|
|
499
|
-
|
|
500
515
|
## [1.1.26] - 2026-10-03
|
|
501
516
|
|
|
502
517
|
- 版本线推进至 1.1.26;本版无独立用户可见变化。
|
|
@@ -582,10 +597,6 @@ Older entries are archived in [packages/tui/CHANGELOG.md@58141d4e5fa8](https://g
|
|
|
582
597
|
|
|
583
598
|
## [0.44.0] - 2026-01-12
|
|
584
599
|
|
|
585
|
-
### Added
|
|
586
|
-
|
|
587
|
-
- `SettingsListOptions` with `enableSearch` for fuzzy filtering in `SettingsList` ([#643](https://github.com/badlogic/pi-mono/pull/643) by [@ninlds](https://github.com/ninlds))
|
|
588
|
-
|
|
589
600
|
### Fixed
|
|
590
601
|
|
|
591
602
|
- Numbered list items showing "1." for all items when code blocks break list continuity ([#660](https://github.com/badlogic/pi-mono/pull/660) by [@ogulcancelik](https://github.com/ogulcancelik))
|
|
@@ -630,17 +641,6 @@ Older entries are archived in [packages/tui/CHANGELOG.md@58141d4e5fa8](https://g
|
|
|
630
641
|
|
|
631
642
|
- Symbol key support in keybinding system: `SymbolKey` type with 32 symbol keys, `Key` constants (e.g., `Key.backtick`, `Key.comma`), updated `matchesKey()` and `parseKey()` to handle symbol input ([#450](https://github.com/badlogic/pi-mono/pull/450) by [@kaofelix](https://github.com/kaofelix))
|
|
632
643
|
|
|
633
|
-
## [0.33.0] - 2026-01-04
|
|
634
|
-
|
|
635
|
-
### Added
|
|
636
|
-
|
|
637
|
-
- `Editor.insertTextAtCursor(text)` method for programmatic text insertion ([#419](https://github.com/badlogic/pi-mono/issues/419))
|
|
638
|
-
- `EditorKeybindingsManager` for configurable editor keybindings. Components now use `matchesKey()` and keybindings manager instead of individual `isXxx()` functions. ([#405](https://github.com/badlogic/pi-mono/pull/405) by [@hjanuschka](https://github.com/hjanuschka))
|
|
639
|
-
|
|
640
|
-
### Changed
|
|
641
|
-
|
|
642
|
-
- Key detection refactored: consolidated `is*()` functions into generic `matchesKey(data, keyId)` function that accepts key identifiers like `"ctrl+c"`, `"shift+enter"`, `"alt+left"`, etc.
|
|
643
|
-
|
|
644
644
|
## [0.31.1] - 2026-01-02
|
|
645
645
|
|
|
646
646
|
Older entries are archived in [packages/tui/CHANGELOG.md@fa14205f838f](https://github.com/can1357/oh-my-pi/blob/fa14205f838f282fcea048c64fca74026789a492/packages/tui/CHANGELOG.md).
|
|
@@ -39,6 +39,12 @@ export interface AutocompleteItem {
|
|
|
39
39
|
state?: string;
|
|
40
40
|
/** Dim hint text shown inline after cursor when this item is selected */
|
|
41
41
|
hint?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Slash command matched only through its description, not its name or an alias:
|
|
44
|
+
* a browse hit, so Enter submits the typed text instead of running it unless the
|
|
45
|
+
* user moved the selection onto it.
|
|
46
|
+
*/
|
|
47
|
+
descriptionMatch?: boolean;
|
|
42
48
|
}
|
|
43
49
|
type Awaitable<T> = T | Promise<T>;
|
|
44
50
|
export interface SlashCommand {
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One-row block sparklines (`▁▂▃▅▇█`) for ANSI renderers: the usage history
|
|
3
|
+
* in `zetacode usage`, a job widget's series in the `wait` card and status line.
|
|
4
|
+
*/
|
|
5
|
+
/** Block glyphs from lowest to highest. */
|
|
6
|
+
export declare const SPARK_LEVELS: readonly ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█"];
|
|
7
|
+
/** How {@link renderSparkline} maps values to glyphs and styles them. */
|
|
8
|
+
export interface SparklineOptions {
|
|
9
|
+
/** Domain low end; values at or below it draw the lowest block. Default 0. */
|
|
10
|
+
readonly min?: number;
|
|
11
|
+
/** Domain high end; values at or above it draw the full block. Default the largest value. */
|
|
12
|
+
readonly max?: number;
|
|
13
|
+
/** Styles one glyph; `fraction` is the value's 0–1 position in the domain. */
|
|
14
|
+
readonly style?: (glyph: string, value: number, fraction: number) => string;
|
|
15
|
+
/** What a missing value draws, already styled. Default a space. */
|
|
16
|
+
readonly gap?: string;
|
|
17
|
+
}
|
|
18
|
+
/** The block glyph for a 0–1 fraction of the domain. */
|
|
19
|
+
export declare function sparkGlyph(fraction: number): string;
|
|
20
|
+
/** One cell per value, oldest first; `undefined` (and non-finite) values draw the gap. */
|
|
21
|
+
export declare function renderSparkline(values: readonly (number | undefined)[], options?: SparklineOptions): string;
|
|
22
|
+
/**
|
|
23
|
+
* `values` squeezed into at most `cells` points by equal-count bucket means,
|
|
24
|
+
* newest bucket last; shorter series come back unchanged.
|
|
25
|
+
*/
|
|
26
|
+
export declare function fitSparkValues(values: readonly number[], cells: number): readonly number[];
|
|
27
|
+
/**
|
|
28
|
+
* The largest value per time bucket over `[sinceMs, nowMs]`, `cells` buckets
|
|
29
|
+
* wide; buckets without a point are `undefined` (a gap in the sparkline).
|
|
30
|
+
*/
|
|
31
|
+
export declare function peakBuckets(points: Iterable<{
|
|
32
|
+
readonly at: number;
|
|
33
|
+
readonly value: number;
|
|
34
|
+
}>, sinceMs: number, nowMs: number, cells: number): (number | undefined)[];
|
package/dist/types/index.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export * from "./components/section.js";
|
|
|
25
25
|
export * from "./components/select-list.js";
|
|
26
26
|
export * from "./components/settings-list.js";
|
|
27
27
|
export * from "./components/spacer.js";
|
|
28
|
+
export * from "./components/sparkline.js";
|
|
28
29
|
export * from "./components/tab-bar.js";
|
|
29
30
|
export * from "./components/table.js";
|
|
30
31
|
export * from "./components/text.js";
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* ]);
|
|
10
10
|
* }
|
|
11
11
|
*/
|
|
12
|
-
import type { TspKind, TspProps, TspSpan, TspText } from "@linxiraos/pi-wire";
|
|
12
|
+
import type { TspKind, TspPropNode, TspProps, TspSpan, TspText } from "@linxiraos/pi-wire";
|
|
13
13
|
import type { NativeChild, NativeNode } from "./node.js";
|
|
14
14
|
/** A node of any kind. */
|
|
15
15
|
export declare function node<K extends TspKind>(k: K, p?: TspProps<K>, c?: readonly NativeChild[], key?: string): NativeNode;
|
|
@@ -37,6 +37,12 @@ export declare const EMPTY_NODE: NativeNode;
|
|
|
37
37
|
export declare function keyed(described: NativeNode, key: string): NativeNode;
|
|
38
38
|
/** `described` mounted but not laid out when `hidden` (cheap visibility toggles keep ids and view state). */
|
|
39
39
|
export declare function withHidden(described: NativeNode, hidden: boolean): NativeNode;
|
|
40
|
+
/**
|
|
41
|
+
* A described tree as the node tree a prop carries (a `hovercard`): plain
|
|
42
|
+
* nodes only, since nothing reconciles inside a prop; component children
|
|
43
|
+
* (which describe themselves per frame) are left out.
|
|
44
|
+
*/
|
|
45
|
+
export declare function propNode(described: NativeNode): TspPropNode;
|
|
40
46
|
/** Stable node key for an arbitrary identity string; keys join into `/` keypaths, so identities are hashed. */
|
|
41
47
|
export declare function stableKey(identity: string): string;
|
|
42
48
|
/** Drop absent entries (`undefined`, `null`, `false`) from a child list. */
|
|
@@ -10,6 +10,8 @@ import type { TspProps, TspSpan, TspText } from "@linxiraos/pi-wire";
|
|
|
10
10
|
import { type KeyName } from "../key-hint-format.js";
|
|
11
11
|
import { type Keybinding } from "../keybindings.js";
|
|
12
12
|
import type { NativeChild, NativeNode } from "./node.js";
|
|
13
|
+
/** Below this many columns a centered sheet fills the pane instead of floating with margins. */
|
|
14
|
+
export declare const NARROW_SHEET_COLS = 100;
|
|
13
15
|
/** One footer hint: the keys that trigger it and what it does. */
|
|
14
16
|
export interface NativeHint {
|
|
15
17
|
/** Key ids (`"ctrl+o"`, `"escape"`); alternatives render side by side. */
|
|
@@ -17,6 +17,8 @@ export interface BackgroundChrome {
|
|
|
17
17
|
}
|
|
18
18
|
/** Map an omp background token to card tone/role. */
|
|
19
19
|
export declare function backgroundChrome(bg: ThemeBg | undefined): BackgroundChrome;
|
|
20
|
+
/** The omp theme colour an ANSI renderer draws a TSP tone with (the inverse of {@link colorTone}). */
|
|
21
|
+
export declare function toneColor(tone: TspTone): ThemeColor;
|
|
20
22
|
/**
|
|
21
23
|
* Tone of an omp colour used as a severity or border colour; undefined for
|
|
22
24
|
* colours that carry no tone (callers pick their own fallback).
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
* - Table view: every registered agent except Main (Main IS the ambient
|
|
6
6
|
* chat), live from the global AgentHubRegistry — status, unread irc count,
|
|
7
7
|
* current/last task, last activity. Navigate with keys, wheel, hover, and
|
|
8
|
-
* click; `r` revives a parked agent, `x` aborts + releases one.
|
|
8
|
+
* click; `r` revives a parked or killed agent, `x` aborts + releases one.
|
|
9
9
|
* - Chat view: per-agent transcript (incremental session-file tail, absorbed
|
|
10
10
|
* from the old session observer overlay) plus an input line. Submitting
|
|
11
|
-
* revives a parked agent, then prompts/steers it; the message
|
|
12
|
-
* agent's persisted history via the normal prompt path.
|
|
11
|
+
* revives a parked or killed agent, then prompts/steers it; the message
|
|
12
|
+
* lands in the agent's persisted history via the normal prompt path.
|
|
13
13
|
*
|
|
14
14
|
* Replaces the old SessionObserverOverlayComponent (ctrl+s observer).
|
|
15
15
|
*/
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Tool-approval prompt in the composer's place, presented like the ask
|
|
3
3
|
* dialog: the approval title and its details over a list of choices —
|
|
4
|
-
*
|
|
4
|
+
* optional grants (led by a toggle that keeps them across sessions), Approve,
|
|
5
|
+
* an optional "approve for this session", and Deny — and an action
|
|
5
6
|
* bar. The arrows move between the choices and Enter takes the highlighted
|
|
6
7
|
* one; `app.approval.approve` (Ctrl+Enter by default) approves this call
|
|
7
8
|
* outright and Esc denies. Enter and the approve chord only arm
|
|
@@ -23,6 +24,13 @@ interface ApprovalDialogCallbacks {
|
|
|
23
24
|
onApprove(): void;
|
|
24
25
|
onDeny(): void;
|
|
25
26
|
}
|
|
27
|
+
/** A choice that approves the call and remembers more than it: a folder, or the exact target. */
|
|
28
|
+
export interface ApprovalDialogGrant {
|
|
29
|
+
/** Label while the grant is remembered for this session. */
|
|
30
|
+
readonly label: string;
|
|
31
|
+
/** Label once the remember toggle keeps it across sessions. */
|
|
32
|
+
readonly alwaysLabel: string;
|
|
33
|
+
}
|
|
26
34
|
/** The composer mounted beneath the dialog: it receives every key the dialog does not own. */
|
|
27
35
|
export interface ApprovalDialogDraft {
|
|
28
36
|
/** True while the composer holds a draft — text, attachments, or a paste still landing: keys then edit and send it. */
|
|
@@ -48,6 +56,12 @@ interface ApprovalDialogOptions {
|
|
|
48
56
|
label: string;
|
|
49
57
|
onApprove(): void;
|
|
50
58
|
};
|
|
59
|
+
/**
|
|
60
|
+
* Grants to offer above Approve, led by a toggle that keeps them across sessions; Approve then
|
|
61
|
+
* reads "Approve Once". `onGrant` gets the chosen grant and whether the toggle was on.
|
|
62
|
+
*/
|
|
63
|
+
grants?: readonly ApprovalDialogGrant[];
|
|
64
|
+
onGrant?(grant: ApprovalDialogGrant, always: boolean): void;
|
|
51
65
|
}
|
|
52
66
|
export declare class ApprovalDialogComponent implements Component {
|
|
53
67
|
#private;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Component } from "../tui.js";
|
|
2
2
|
import type { DescribeContext, NativeNode, NativeUiEvent } from "../native/node.js";
|
|
3
3
|
import { type JobTreeAgent } from "./job-tree.js";
|
|
4
|
+
import { type JobWidgetView } from "../tools/job-widget.js";
|
|
4
5
|
/** One async job as the session snapshots it. */
|
|
5
6
|
export interface JobsPanelJob {
|
|
6
7
|
readonly id: string;
|
|
@@ -35,6 +36,8 @@ export interface JobsPanelDetail {
|
|
|
35
36
|
readonly output?: string;
|
|
36
37
|
/** Artifact holding the full output when `output` is cut. */
|
|
37
38
|
readonly artifactId?: string;
|
|
39
|
+
/** The job's live widget (frozen once it settles), drawn above the output. */
|
|
40
|
+
readonly widget?: JobWidgetView;
|
|
38
41
|
}
|
|
39
42
|
/** The session behind a {@link JobsSheet}. */
|
|
40
43
|
export interface JobsSheetSource {
|
|
@@ -7,7 +7,7 @@ import { type ThemeColor } from "../theme/theme.js";
|
|
|
7
7
|
import type { TspPickerColumn, TspPickerGroup, TspPickerItem, TspPickerMark } from "@linxiraos/pi-wire";
|
|
8
8
|
import type { NativeChild, NativeNode, NativeUiEvent } from "../native/node.js";
|
|
9
9
|
/** Canonical display ordering of built-in model roles. */
|
|
10
|
-
export type ModelRole = "default" | "smol" | "slow" | "vision" | "plan" | "commit" | "tiny" | "memory" | "task" | "advisor" | "image" | "web" | "speech" | "dictation" | "judge";
|
|
10
|
+
export type ModelRole = "default" | "smol" | "slow" | "vision" | "plan" | "commit" | "tiny" | "memory" | "task" | "advisor" | "widget" | "image" | "web" | "speech" | "dictation" | "judge";
|
|
11
11
|
export declare const MODEL_ROLE_IDS: ModelRole[];
|
|
12
12
|
export declare const CHAT_MODEL_ROLE_IDS: ModelRole[];
|
|
13
13
|
export declare const KIND_ROLE_IDS: ModelRole[];
|
|
@@ -10,6 +10,8 @@ import type { State } from "./types.js";
|
|
|
10
10
|
export interface OutputBlockOptions {
|
|
11
11
|
header?: string;
|
|
12
12
|
headerMeta?: string;
|
|
13
|
+
/** Facts drawn inside the bottom border (`╰── Wall 0.16s · Timeout 300s ──╯`). */
|
|
14
|
+
footerMeta?: string;
|
|
13
15
|
state?: State;
|
|
14
16
|
sections?: Array<{
|
|
15
17
|
label?: string;
|
|
@@ -22,6 +22,8 @@ export interface ToolCardSnapshot {
|
|
|
22
22
|
/** Structured status header, rendered by the shared status-line primitive. */
|
|
23
23
|
status?: StatusLineOptions;
|
|
24
24
|
headerMeta?: string;
|
|
25
|
+
/** Short facts drawn inside the frame's bottom border (framed); a trailing row otherwise. */
|
|
26
|
+
footerMeta?: string;
|
|
25
27
|
phase?: ToolCardPhase;
|
|
26
28
|
body?: ToolCardContent;
|
|
27
29
|
sections?: readonly ToolCardSection[];
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Give an empty first band an explicit transparent width. Zellij derives the
|
|
3
|
+
* decoded image width from its first pixel row, ignoring the raster minimum
|
|
4
|
+
* for transparent images; an omitted band otherwise makes the image invisible.
|
|
5
|
+
* Palette definitions stay before drawing so cropping can still parse them.
|
|
6
|
+
*/
|
|
7
|
+
export declare function ensureSixelRasterWidth(sequence: string): string;
|
|
8
|
+
/**
|
|
9
|
+
* Crop integer pixel rows from a raw (not tmux-wrapped) SIXEL DCS image.
|
|
10
|
+
* Runs are shifted between adjacent six-pixel bands, never decoded to pixels.
|
|
11
|
+
* Palette selections, overdraw order, transparent gaps and DCS background mode
|
|
12
|
+
* are retained. A nonpositive crop returns the original sequence unchanged.
|
|
13
|
+
*
|
|
14
|
+
* The supported grammar is the native icy_sixel encoder's: one leading raster
|
|
15
|
+
* declaration with positive dimensions and square pixels, prefix RGB/HLS palette
|
|
16
|
+
* definitions, register selections, sixel characters, repeats, `$` and `-`.
|
|
17
|
+
* ESC DCS/ST framing only, as the TUI emits it. Palette definitions after
|
|
18
|
+
* drawing, additional raster declarations, other controls and malformed input
|
|
19
|
+
* throw; forwarding an unsupported image uncropped would reintroduce raster
|
|
20
|
+
* overflow.
|
|
21
|
+
*
|
|
22
|
+
* Without maxHeightPixels the crop is exact, including a partial final band with
|
|
23
|
+
* zero padding bits and the exact declared raster height. Some terminals still
|
|
24
|
+
* allocate all six rows of that final band. The TUI supplies its available pixel
|
|
25
|
+
* height to cap the result at a whole-band boundary, matching the native encoder's
|
|
26
|
+
* policy of dropping bottom pixels rather than overwriting the following row.
|
|
27
|
+
*/
|
|
28
|
+
export declare function cropSixelTop(sequence: string, pixels: number, maxHeightPixels?: number): string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { AgentMessage, ThinkingLevel } from "@linxiraos/pi-agent-core";
|
|
2
2
|
import type { Tool, UsageLimit, UsageReport } from "@linxiraos/pi-ai";
|
|
3
3
|
import type { Model } from "@linxiraos/pi-catalog/types";
|
|
4
|
+
import type { JobWidgetEntry } from "../tools/job-widget.js";
|
|
4
5
|
import type { CompactionBoundaries } from "./context-usage.js";
|
|
5
6
|
import type { StatusLineSettings, StatusResetExpiry } from "./types.js";
|
|
6
7
|
export interface StatusAccountIdentity {
|
|
@@ -74,6 +75,8 @@ export interface StatusLineSession {
|
|
|
74
75
|
agentId?: string;
|
|
75
76
|
}[];
|
|
76
77
|
} | null | undefined;
|
|
78
|
+
/** Widgets of the running background jobs, in job order; the jobs segment appends the freshest one's glance. */
|
|
79
|
+
getRunningJobWidgets?(): readonly JobWidgetEntry[];
|
|
77
80
|
getGoalModeState(): {
|
|
78
81
|
goal?: {
|
|
79
82
|
status: string;
|
|
@@ -401,6 +401,11 @@ export declare function encodeITerm2(base64Data: string, options?: {
|
|
|
401
401
|
preserveAspectRatio?: boolean;
|
|
402
402
|
inline?: boolean;
|
|
403
403
|
}): string;
|
|
404
|
+
/**
|
|
405
|
+
* The encoded image `encodeITerm2` wrote into `line`, without the size
|
|
406
|
+
* parameters a rewrap changes; undefined for a line without one.
|
|
407
|
+
*/
|
|
408
|
+
export declare function iterm2ImagePayload(line: string): string | undefined;
|
|
404
409
|
export declare function calculateImageRows(imageDimensions: ImageDimensions, targetWidthCells: number, cellDimensions?: CellDimensions): number;
|
|
405
410
|
export declare function getPngDimensions(base64Data: string): ImageDimensions | null;
|
|
406
411
|
export declare function getJpegDimensions(base64Data: string): ImageDimensions | null;
|
|
@@ -117,6 +117,7 @@ export declare function createShellRenderer<TArgs>(config: ShellRendererConfig<T
|
|
|
117
117
|
}, args?: TArgs): NativeToolView;
|
|
118
118
|
mergeCallAndResult: true;
|
|
119
119
|
inline: true;
|
|
120
|
+
tickElapsed: true;
|
|
120
121
|
};
|
|
121
122
|
/** Renders bash command previews and output. */
|
|
122
123
|
export declare const bashToolRenderer: {
|
|
@@ -146,4 +147,5 @@ export declare const bashToolRenderer: {
|
|
|
146
147
|
}, args?: BashRenderArgs | undefined): NativeToolView;
|
|
147
148
|
mergeCallAndResult: true;
|
|
148
149
|
inline: true;
|
|
150
|
+
tickElapsed: true;
|
|
149
151
|
};
|
|
@@ -23,6 +23,9 @@ export declare function formatDefaultToolExecution(input: DefaultToolRenderInput
|
|
|
23
23
|
/**
|
|
24
24
|
* TSP view of the generic fallback card: the tool label with a one-line args
|
|
25
25
|
* summary as the head target; the result as a JSON tree or raw `ansi` output.
|
|
26
|
+
* The complete output goes over the wire — the card-level disclosure clamp the
|
|
27
|
+
* terminal applies is the only bound, so an expanded card keeps every row. JSON
|
|
28
|
+
* the tree's depth, node or scalar caps would cut keeps the raw path instead.
|
|
26
29
|
*/
|
|
27
30
|
export declare function describeDefaultToolExecution(input: DefaultToolRenderInput): NativeToolView;
|
|
28
31
|
/** Render the generic fallback as the state-tinted card used by direct custom tools. */
|
|
@@ -61,7 +61,7 @@ export interface EvalCellResult {
|
|
|
61
61
|
durationMs?: number;
|
|
62
62
|
exitCode?: number;
|
|
63
63
|
statusEvents?: EvalStatusEvent[];
|
|
64
|
-
/**
|
|
64
|
+
/** Evictable events dropped from the front of `statusEvents` (see {@link recordStatusEvent}). */
|
|
65
65
|
statusEventsElided?: number;
|
|
66
66
|
}
|
|
67
67
|
/** Tool result detail object surfaced to the UI/transcript. */
|
|
@@ -69,7 +69,7 @@ export interface EvalToolDetails {
|
|
|
69
69
|
cells?: EvalCellResult[];
|
|
70
70
|
images?: ImageContent[];
|
|
71
71
|
statusEvents?: EvalStatusEvent[];
|
|
72
|
-
/**
|
|
72
|
+
/** Evictable events dropped from the front of `statusEvents` (see {@link recordStatusEvent}). */
|
|
73
73
|
statusEventsElided?: number;
|
|
74
74
|
isError?: boolean;
|
|
75
75
|
meta?: OutputMeta;
|
|
@@ -104,7 +104,7 @@ interface EvalRenderContext {
|
|
|
104
104
|
timeout?: number;
|
|
105
105
|
}
|
|
106
106
|
/**
|
|
107
|
-
* Coalescing key of a progress-snapshot event: `agent` and `
|
|
107
|
+
* Coalescing key of a progress-snapshot event: `agent`, `judge_batch`, and `mcp_progress`
|
|
108
108
|
* events keyed by `id`, where only the newest snapshot matters. Discrete
|
|
109
109
|
* actions (everything else) have no key. Shared by {@link upsertStatusEvent}
|
|
110
110
|
* and the executors' display collectors so both coalesce identically.
|
|
@@ -114,12 +114,12 @@ export declare function statusEventKey(event: {
|
|
|
114
114
|
[key: string]: unknown;
|
|
115
115
|
}): string | undefined;
|
|
116
116
|
/**
|
|
117
|
-
*
|
|
117
|
+
* Evictable status events a log keeps. A cell polling a helper in a loop emits
|
|
118
118
|
* one event per call (hundreds of thousands), and every live update and the
|
|
119
119
|
* persisted tool result would otherwise carry them all.
|
|
120
120
|
*/
|
|
121
121
|
export declare const MAX_STATUS_EVENTS = 200;
|
|
122
|
-
/** A status event list plus the count of
|
|
122
|
+
/** A status event list plus the count of evictable events dropped from its front. */
|
|
123
123
|
export type StatusEventLog = Pick<EvalCellResult, "statusEvents" | "statusEventsElided">;
|
|
124
124
|
/**
|
|
125
125
|
* Append or replace a status event. Progress snapshots (see
|
|
@@ -129,9 +129,10 @@ export type StatusEventLog = Pick<EvalCellResult, "statusEvents" | "statusEvents
|
|
|
129
129
|
export declare function upsertStatusEvent(events: EvalStatusEvent[], event: EvalStatusEvent): void;
|
|
130
130
|
/**
|
|
131
131
|
* {@link upsertStatusEvent} into a bounded log. Past {@link MAX_STATUS_EVENTS},
|
|
132
|
-
* the oldest discrete event is dropped and counted.
|
|
133
|
-
* cards read them, and so does
|
|
134
|
-
*
|
|
132
|
+
* the oldest discrete event or MCP progress snapshot is dropped and counted.
|
|
133
|
+
* Agent/judgment-batch snapshots stay, since agent cards read them, and so does
|
|
134
|
+
* the newest committed `todo` result, which the session todo panel refreshes
|
|
135
|
+
* from. Renderers already show only the newest
|
|
135
136
|
* events behind an "… N earlier" row.
|
|
136
137
|
*/
|
|
137
138
|
export declare function recordStatusEvent(log: StatusEventLog, event: EvalStatusEvent): void;
|
|
@@ -19,6 +19,12 @@ export interface IrcMessage {
|
|
|
19
19
|
* ping-pong forever.
|
|
20
20
|
*/
|
|
21
21
|
wakeRelay?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* One leg of an `all` broadcast. Like relays, broadcasts never draw an
|
|
24
|
+
* automatic wake-turn reply: every woken idle peer would otherwise answer
|
|
25
|
+
* the broadcaster, mostly to say the message was not for it.
|
|
26
|
+
*/
|
|
27
|
+
broadcast?: boolean;
|
|
22
28
|
}
|
|
23
29
|
/** Delivery outcome for one peer recipient. */
|
|
24
30
|
export interface IrcDeliveryReceipt {
|