@linxiraos/pi-tui 1.4.7 → 1.4.10

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.
Files changed (181) hide show
  1. package/CHANGELOG.md +154 -231
  2. package/README.md +7 -1
  3. package/dist/types/app-keybindings.d.ts +5 -0
  4. package/dist/types/charts/table-data.d.ts +4 -2
  5. package/dist/types/chat/bash-execution.d.ts +4 -1
  6. package/dist/types/chat/eval-execution.d.ts +2 -0
  7. package/dist/types/chat/execution-shared.d.ts +14 -8
  8. package/dist/types/chat/figure-markdown.d.ts +2 -0
  9. package/dist/types/chat/svg-figure.d.ts +5 -0
  10. package/dist/types/chat/table-chart.d.ts +2 -0
  11. package/dist/types/chat/transcript-render-helpers.d.ts +11 -3
  12. package/dist/types/chrome/dynamic-border.d.ts +6 -0
  13. package/dist/types/chrome/transcript-status.d.ts +2 -2
  14. package/dist/types/components/editor.d.ts +15 -6
  15. package/dist/types/components/image.d.ts +6 -0
  16. package/dist/types/components/loader.d.ts +2 -0
  17. package/dist/types/keybinding-matchers.d.ts +7 -0
  18. package/dist/types/native/describe.d.ts +4 -2
  19. package/dist/types/native/node.d.ts +2 -3
  20. package/dist/types/native/overlay.d.ts +42 -2
  21. package/dist/types/native/state.d.ts +4 -0
  22. package/dist/types/overlays/btw-history-panel.d.ts +15 -0
  23. package/dist/types/overlays/btw-history.d.ts +24 -0
  24. package/dist/types/overlays/btw-inject.d.ts +22 -0
  25. package/dist/types/overlays/btw-panel.d.ts +7 -0
  26. package/dist/types/overlays/hook-editor.d.ts +2 -0
  27. package/dist/types/overlays/jobs-panel.d.ts +4 -0
  28. package/dist/types/overlays/model-browser.d.ts +1 -1
  29. package/dist/types/overlays/session-selector.d.ts +11 -2
  30. package/dist/types/prompt/composer.d.ts +13 -5
  31. package/dist/types/render/render-utils.d.ts +23 -1
  32. package/dist/types/setup/scenes/language.d.ts +3 -0
  33. package/dist/types/setup/scenes/types.d.ts +5 -0
  34. package/dist/types/setup/setup-version.d.ts +1 -1
  35. package/dist/types/setup/wizard.d.ts +1 -1
  36. package/dist/types/status-line/startup.d.ts +0 -15
  37. package/dist/types/terminal-capabilities.d.ts +1 -1
  38. package/dist/types/theme/symbols.d.ts +3 -1
  39. package/dist/types/theme/theme-class.d.ts +1 -0
  40. package/dist/types/theme/theme.d.ts +1 -1
  41. package/dist/types/theme/tui-adapters.d.ts +2 -0
  42. package/dist/types/thinking.d.ts +8 -6
  43. package/dist/types/tools/ast-grep.d.ts +2 -0
  44. package/dist/types/tools/eval.d.ts +2 -0
  45. package/dist/types/tools/find.d.ts +1 -1
  46. package/dist/types/tools/grouped-file-output.d.ts +100 -19
  47. package/dist/types/tools/hashline-format.d.ts +5 -0
  48. package/dist/types/tools/native-view.d.ts +2 -0
  49. package/dist/types/tools/output-meta.d.ts +27 -0
  50. package/dist/types/tools/read.d.ts +14 -4
  51. package/dist/types/tools/task.d.ts +4 -3
  52. package/dist/types/tools/wait.d.ts +2 -0
  53. package/dist/types/tui.d.ts +12 -0
  54. package/dist/types/utils.d.ts +4 -0
  55. package/package.json +9 -9
  56. package/src/app-keybindings.d.ts +5 -0
  57. package/src/app-keybindings.ts +5 -0
  58. package/src/apps/git/git-tui.ts +10 -17
  59. package/src/apps/git/sidebar.ts +21 -35
  60. package/src/apps/ps-top.ts +4 -12
  61. package/src/charts/chart-plan.ts +0 -29
  62. package/src/charts/table-data.d.ts +4 -2
  63. package/src/charts/table-data.ts +55 -6
  64. package/src/chat/bash-execution.d.ts +4 -1
  65. package/src/chat/bash-execution.ts +20 -9
  66. package/src/chat/chat-transcript-builder.ts +5 -2
  67. package/src/chat/eval-execution.d.ts +2 -0
  68. package/src/chat/eval-execution.ts +14 -7
  69. package/src/chat/execution-shared.d.ts +14 -8
  70. package/src/chat/execution-shared.ts +39 -18
  71. package/src/chat/figure-markdown.d.ts +2 -0
  72. package/src/chat/figure-markdown.ts +6 -4
  73. package/src/chat/read-tool-group.ts +56 -36
  74. package/src/chat/svg-figure.d.ts +5 -0
  75. package/src/chat/svg-figure.ts +55 -16
  76. package/src/chat/table-chart.d.ts +2 -0
  77. package/src/chat/table-chart.ts +19 -2
  78. package/src/chat/transcript-render-helpers.d.ts +11 -3
  79. package/src/chat/transcript-render-helpers.ts +70 -22
  80. package/src/chrome/dynamic-border.d.ts +6 -0
  81. package/src/chrome/dynamic-border.ts +28 -2
  82. package/src/chrome/transcript-status.d.ts +2 -2
  83. package/src/chrome/transcript-status.ts +5 -3
  84. package/src/components/editor.d.ts +15 -6
  85. package/src/components/editor.ts +123 -24
  86. package/src/components/image.d.ts +6 -0
  87. package/src/components/image.ts +13 -0
  88. package/src/components/key-value-list.ts +9 -9
  89. package/src/components/loader.d.ts +2 -0
  90. package/src/components/loader.ts +7 -0
  91. package/src/components/section.ts +1 -9
  92. package/src/components/table.ts +1 -9
  93. package/src/keybinding-matchers.d.ts +7 -0
  94. package/src/keybinding-matchers.ts +13 -0
  95. package/src/native/backend.ts +7 -3
  96. package/src/native/describe.d.ts +4 -2
  97. package/src/native/describe.ts +9 -4
  98. package/src/native/node.d.ts +2 -3
  99. package/src/native/node.ts +2 -3
  100. package/src/native/overlay.d.ts +42 -2
  101. package/src/native/overlay.ts +124 -16
  102. package/src/native/state.d.ts +4 -0
  103. package/src/native/state.ts +25 -5
  104. package/src/overlays/btw-history-panel.ts +106 -14
  105. package/src/overlays/btw-history.ts +65 -0
  106. package/src/overlays/btw-inject.ts +91 -0
  107. package/src/overlays/btw-panel.ts +53 -12
  108. package/src/overlays/extensions/extension-dashboard.ts +7 -8
  109. package/src/overlays/hook-editor.ts +6 -0
  110. package/src/overlays/jobs-panel.ts +82 -22
  111. package/src/overlays/login-dialog.ts +8 -26
  112. package/src/overlays/model-browser.ts +69 -10
  113. package/src/overlays/session-selector.ts +25 -5
  114. package/src/overlays/settings-defs.ts +2 -2
  115. package/src/overlays/settings-selector.ts +113 -11
  116. package/src/overlays/tree-selector.ts +83 -27
  117. package/src/overlays/usage-dashboard.ts +4 -6
  118. package/src/prompt/composer.ts +17 -5
  119. package/src/render/code-cell.ts +1 -1
  120. package/src/render/file-list.ts +4 -7
  121. package/src/render/render-utils.d.ts +23 -1
  122. package/src/render/render-utils.ts +38 -6
  123. package/src/setup/scenes/glyph.ts +1 -1
  124. package/src/setup/scenes/language.ts +122 -0
  125. package/src/setup/scenes/types.ts +6 -0
  126. package/src/setup/setup-version.ts +1 -1
  127. package/src/setup/wizard.ts +2 -0
  128. package/src/status-line/startup.ts +36 -70
  129. package/src/terminal-capabilities.d.ts +1 -1
  130. package/src/terminal-capabilities.ts +5 -0
  131. package/src/theme/symbols.d.ts +3 -1
  132. package/src/theme/symbols.ts +16 -9
  133. package/src/theme/theme-class.d.ts +1 -0
  134. package/src/theme/theme-class.ts +15 -3
  135. package/src/theme/theme.d.ts +1 -1
  136. package/src/theme/theme.ts +1 -0
  137. package/src/theme/tui-adapters.d.ts +2 -0
  138. package/src/theme/tui-adapters.ts +8 -3
  139. package/src/thinking.d.ts +8 -6
  140. package/src/thinking.ts +17 -11
  141. package/src/tmux.ts +1 -0
  142. package/src/tools/agent-tree.ts +13 -11
  143. package/src/tools/ask.ts +24 -37
  144. package/src/tools/ast-edit.ts +48 -93
  145. package/src/tools/ast-grep.d.ts +2 -0
  146. package/src/tools/ast-grep.ts +31 -67
  147. package/src/tools/bash.ts +7 -0
  148. package/src/tools/default-renderer.ts +1 -1
  149. package/src/tools/edit.ts +50 -43
  150. package/src/tools/eval.d.ts +2 -0
  151. package/src/tools/eval.ts +2 -0
  152. package/src/tools/fetch.ts +2 -1
  153. package/src/tools/find.d.ts +1 -1
  154. package/src/tools/find.ts +13 -5
  155. package/src/tools/github.ts +14 -46
  156. package/src/tools/glob.ts +2 -1
  157. package/src/tools/grep.ts +47 -277
  158. package/src/tools/grouped-file-output.d.ts +100 -19
  159. package/src/tools/grouped-file-output.ts +414 -103
  160. package/src/tools/hashline-format.d.ts +5 -0
  161. package/src/tools/hashline-format.ts +5 -0
  162. package/src/tools/json-tree.ts +1 -5
  163. package/src/tools/lsp.ts +210 -32
  164. package/src/tools/native-view.d.ts +2 -0
  165. package/src/tools/native-view.ts +11 -5
  166. package/src/tools/output-meta.d.ts +27 -0
  167. package/src/tools/output-meta.ts +68 -4
  168. package/src/tools/proc-render.ts +3 -3
  169. package/src/tools/read.d.ts +14 -4
  170. package/src/tools/read.ts +20 -5
  171. package/src/tools/task.d.ts +4 -3
  172. package/src/tools/task.ts +41 -81
  173. package/src/tools/vibe.ts +4 -4
  174. package/src/tools/wait.d.ts +2 -0
  175. package/src/tools/wait.ts +8 -5
  176. package/src/tools/write.ts +17 -27
  177. package/src/tools/yield.ts +1 -1
  178. package/src/tui.d.ts +12 -0
  179. package/src/tui.ts +91 -9
  180. package/src/utils.d.ts +4 -0
  181. package/src/utils.ts +10 -0
package/CHANGELOG.md CHANGED
@@ -1,14 +1,141 @@
1
1
  ## [Unreleased]
2
2
 
3
- ## [1.4.7] - 2026-10-30
3
+ ## [1.4.10] - 2026-11-05
4
4
 
5
- - Synced with upstream OMP v18.14.0; no package-specific user-visible changes.
5
+ - Released as part of Zeta 1.4.10; no package-specific user-visible changes.
6
+
7
+ ## [9.4.0] - 2026-01-31
8
+
9
+ ### Added
10
+
11
+ - Exported `padding` utility function for creating space-padded strings efficiently
12
+
13
+ ### Changed
14
+
15
+ - Optimized padding operations across all components to use pre-allocated space buffer for better performance
16
+
17
+ ## [8.4.1] - 2026-01-25
18
+
19
+ ### Added
20
+
21
+ - Added fuzzy match function for autocomplete suggestions
22
+
23
+ ## [8.4.0] - 2026-01-25
24
+
25
+ ### Fixed
26
+
27
+ - Terminal gracefully handles write failures by marking dead instead of exiting the process
28
+
29
+ ## [8.2.0] - 2026-01-24
30
+
31
+ ### Added
32
+
33
+ - Added mermaid diagram rendering engine (renderMermaidToPng) with mmdc CLI integration
34
+
35
+ ### Fixed
36
+
37
+ - Fixed crash when terminal becomes unavailable (EIO errors) by exiting gracefully instead of throwing
38
+
39
+ ## [6.8.3] - 2026-01-21
40
+
41
+ ### Added
42
+
43
+ - Added undo support in the editor via `Ctrl+-`
44
+
45
+ ### Changed
46
+
47
+ - Improved fuzzy matching to handle alphanumeric swaps
48
+
49
+ ## [5.6.7] - 2026-01-18
50
+
51
+ ### Added
52
+
53
+ - Added configurable editor padding via `editorPaddingX` theme option
54
+
55
+ ### Changed
56
+
57
+ - Updated tab bar rendering to wrap text across multiple lines when content exceeds available width
58
+
59
+ ### Fixed
60
+
61
+ - Fixed key detection for shifted symbol characters
62
+
63
+ ## [5.1.0] - 2026-01-14
64
+
65
+ ### Changed
66
+
67
+ - Changed `OverlayOptions` to use `SizeValue` type for `width`, `maxHeight`, `row`, and `col` properties
68
+
69
+ ### Fixed
70
+
71
+ - Fixed numbered list items showing "1." for all items when code blocks break list continuity
72
+
73
+ ## [4.6.0] - 2026-01-12
74
+
75
+ ### Added
76
+
77
+ - Add fuzzy matching module (`fuzzyMatch`, `fuzzyFilter`) for command autocomplete
78
+
79
+ ## [4.2.1] - 2026-01-11
80
+
81
+ ### Fixed
82
+
83
+ - Fixed editor redraw glitch when canceling autocomplete suggestions
84
+
85
+ ## [4.1.0] - 2026-01-10
86
+
87
+ ### Added
88
+
89
+ - Added persistent prompt history storage support via `setHistoryStorage()` method, allowing history to be saved and restored across sessions
90
+
91
+ ## [3.32.0] - 2026-01-08
92
+
93
+ ### Fixed
94
+
95
+ - Fixed text wrapping allowing long whitespace tokens to exceed line width
96
+
97
+ ## [3.20.0] - 2026-01-06
98
+
99
+ ### Changed
100
+
101
+ - Settings list descriptions now wrap to the available width instead of truncating
102
+
103
+ ### Fixed
104
+
105
+ - Fixed Shift+Enter detection in legacy terminals that send ESC+CR sequence
106
+
107
+ ## [3.15.0] - 2026-01-05
108
+
109
+ ### Added
110
+
111
+ - Added `inputCursor` symbol for customizing the text input cursor character
112
+
113
+ ## [3.9.1337] - 2026-01-04
114
+
115
+ ### Changed
116
+
117
+ - Changed Editor component to use proper box borders with vertical side borders instead of horizontal-only borders
118
+
119
+ ## [1.500.0] - 2026-01-03
120
+
121
+ ### Added
122
+
123
+ - Added `getText()` method to Text component for retrieving current text content
124
+
125
+ ## [1.337.0] - 2026-01-02
126
+
127
+ Initial release under @oh-my-pi scope. See previous releases at [badlogic/pi-mono](https://github.com/badlogic/pi-mono).
128
+
129
+ ## [1.4.9] - 2026-11-03
130
+
131
+ - Synced with upstream OMP v18.16.0: composer predictions, status glyph changes, and TUI link handling.
6
132
 
7
133
  ### Breaking Changes
8
134
 
9
135
  - Removed `KeyEventType` export from public API
10
136
  - `Editor` constructor now requires `TUI` as first parameter: `new Editor(tui, theme)`. This enables automatic vertical scrolling when content exceeds terminal height. ([#732](https://github.com/badlogic/pi-mono/issues/732))
11
137
  - Removed `Key` helper object from public API; use string literals like `"ctrl+c"` instead of `Key.ctrl("c")`
138
+ - **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))
12
139
 
13
140
  ### Added
14
141
 
@@ -79,6 +206,15 @@
79
206
  - `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))
80
207
  - 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))
81
208
  - Editor now supports Page Up/Down keys (Fn+Up/Down on MacBook) for scrolling through large content ([#732](https://github.com/badlogic/pi-mono/issues/732))
209
+ - Added terminal graphics encoding (iTerm2/Kitty) for mermaid diagrams with automatic width scaling
210
+ - Added `setMaxHeight()` method to limit editor height with scrolling
211
+ - Added Emacs-style kill ring for text deletion operations
212
+ - Added `isCapsLock` helper function for detecting Caps Lock key press via Kitty protocol
213
+ - TabBar component for horizontal tab navigation
214
+ - `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
215
+ - Add backslash+enter newline fallback for terminals without Kitty protocol
216
+ - `codeBlockIndent` property on `MarkdownTheme` to customize code block content indentation (default: 2 spaces) ([#855](https://github.com/badlogic/pi-mono/pull/855) by [@terrorobe](https://github.com/terrorobe))
217
+ - Added Alt+Delete as hotkey for delete word forwards ([#878](https://github.com/badlogic/pi-mono/pull/878) by [@Perlence](https://github.com/Perlence))
82
218
 
83
219
  ### Changed
84
220
 
@@ -125,6 +261,9 @@
125
261
  - Updated editor layout to respect configurable padding
126
262
  - Refactored scrolling logic for better viewport management
127
263
  - Key detection refactored: consolidated `is*()` functions into generic `matchesKey(data, keyId)` function that accepts key identifiers like `"ctrl+c"`, `"shift+enter"`, `"alt+left"`, etc.
264
+ - Forked to @oh-my-pi scope with unified versioning across all packages
265
+ - Fuzzy matching now scores consecutive matches higher and penalizes gaps more heavily for better relevance ([#860](https://github.com/badlogic/pi-mono/pull/860) by [@mitsuhiko](https://github.com/mitsuhiko))
266
+ - Improved fuzzy file search performance by using native implementation instead of spawning external process
128
267
 
129
268
  ### Fixed
130
269
 
@@ -179,6 +318,16 @@ Older entries are archived in [packages/tui/CHANGELOG.md@58141d4e5fa8](https://g
179
318
  - 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))
180
319
  - Reduced flicker by only re-rendering changed lines ([#617](https://github.com/badlogic/pi-mono/pull/617) by [@ogulcancelik](https://github.com/ogulcancelik))
181
320
  - Crash when pasting text with trailing whitespace exceeding terminal width through Markdown rendering ([#457](https://github.com/badlogic/pi-mono/pull/457) by [@robinwander](https://github.com/robinwander))
321
+ - Fixed rendering issues on Windows by preventing re-entrant renders
322
+ - Remove Kitty protocol query timeout that caused shift+enter delays
323
+ - Add bracketed paste check to prevent false key release/repeat detection
324
+ - Strip OSC 8 hyperlink sequences in `visibleWidth()`
325
+ - Remove trailing space padding from Text, Markdown, and TruncatedText components when no background color is set (fixes copied text including unwanted whitespace)
326
+ - Fixed Ctrl+Enter sequences to insert new lines in the editor
327
+ - Fixed appended lines not being committed to scrollback, causing earlier content to be overwritten when viewport fills ([#954](https://github.com/badlogic/pi-mono/issues/954))
328
+ - Autolinked emails no longer display redundant `(mailto:...)` suffix in markdown output ([#888](https://github.com/badlogic/pi-mono/pull/888) by [@terrorobe](https://github.com/terrorobe))
329
+ - `matchesKey()` now correctly matches Kitty protocol sequences for unmodified letter keys (needed for key release events)
330
+ - Key presses no longer dropped when batched with other events over SSH ([#538](https://github.com/badlogic/pi-mono/pull/538))
182
331
 
183
332
  ### Removed
184
333
 
@@ -188,188 +337,11 @@ Older entries are archived in [packages/tui/CHANGELOG.md@58141d4e5fa8](https://g
188
337
  - Removed TUI layout engine exports from public API (BoxNode, ColumnNode, LayoutNode, etc.)
189
338
  - Removed `visibleWidth` benchmark file in favor of Kitty sequence benchmarking
190
339
  - Removed `truncateToWidth`, `sliceWithWidth`, and `extractSegments` functions from public API (now re-exported directly from @linxiraos/pi-natives)
340
+ - `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.
191
341
 
192
- ## [9.5.0] - 2026-02-01
193
-
194
- ### Changed
195
-
196
- - Improved fuzzy file search performance by using native implementation instead of spawning external process
197
-
198
- ## [9.4.0] - 2026-01-31
199
-
200
- ### Added
201
-
202
- - Exported `padding` utility function for creating space-padded strings efficiently
203
-
204
- ### Changed
205
-
206
- - Optimized padding operations across all components to use pre-allocated space buffer for better performance
207
-
208
- ## [8.4.1] - 2026-01-25
209
-
210
- ### Added
211
-
212
- - Added fuzzy match function for autocomplete suggestions
213
-
214
- ## [8.4.0] - 2026-01-25
215
-
216
- ### Fixed
217
-
218
- - Terminal gracefully handles write failures by marking dead instead of exiting the process
219
-
220
- ## [8.2.0] - 2026-01-24
221
-
222
- ### Added
223
-
224
- - Added mermaid diagram rendering engine (renderMermaidToPng) with mmdc CLI integration
225
- - Added terminal graphics encoding (iTerm2/Kitty) for mermaid diagrams with automatic width scaling
226
-
227
- ### Fixed
228
-
229
- - Fixed crash when terminal becomes unavailable (EIO errors) by exiting gracefully instead of throwing
230
-
231
- ## [6.8.3] - 2026-01-21
232
-
233
- ### Added
234
-
235
- - Added undo support in the editor via `Ctrl+-`
236
-
237
- ### Changed
238
-
239
- - Improved fuzzy matching to handle alphanumeric swaps
240
-
241
- ## [5.6.7] - 2026-01-18
242
-
243
- ### Added
244
-
245
- - Added configurable editor padding via `editorPaddingX` theme option
246
- - Added `setMaxHeight()` method to limit editor height with scrolling
247
- - Added Emacs-style kill ring for text deletion operations
248
-
249
- ### Changed
250
-
251
- - Updated tab bar rendering to wrap text across multiple lines when content exceeds available width
252
-
253
- ### Fixed
254
-
255
- - Fixed key detection for shifted symbol characters
256
-
257
- ## [5.3.1] - 2026-01-15
258
-
259
- ### Fixed
260
-
261
- - Fixed rendering issues on Windows by preventing re-entrant renders
262
-
263
- ## [5.1.0] - 2026-01-14
264
-
265
- ### Changed
266
-
267
- - Changed `OverlayOptions` to use `SizeValue` type for `width`, `maxHeight`, `row`, and `col` properties
268
-
269
- ### Fixed
270
-
271
- - Fixed numbered list items showing "1." for all items when code blocks break list continuity
272
-
273
- ## [4.6.0] - 2026-01-12
274
-
275
- ### Added
276
-
277
- - Add fuzzy matching module (`fuzzyMatch`, `fuzzyFilter`) for command autocomplete
278
-
279
- ### Fixed
280
-
281
- - Remove Kitty protocol query timeout that caused shift+enter delays
282
- - Add bracketed paste check to prevent false key release/repeat detection
283
-
284
- ## [4.2.1] - 2026-01-11
285
-
286
- ### Fixed
287
-
288
- - Fixed editor redraw glitch when canceling autocomplete suggestions
289
-
290
- ## [4.1.0] - 2026-01-10
291
-
292
- ### Added
293
-
294
- - Added persistent prompt history storage support via `setHistoryStorage()` method, allowing history to be saved and restored across sessions
295
-
296
- ## [4.0.0] - 2026-01-10
297
-
298
- ### Added
299
-
300
- - `EditorComponent` interface for custom editor implementations
301
-
302
- ## [3.32.0] - 2026-01-08
303
-
304
- ### Fixed
305
-
306
- - Fixed text wrapping allowing long whitespace tokens to exceed line width
307
-
308
- ## [3.20.0] - 2026-01-06
309
-
310
- ### Added
311
-
312
- - Added `isCapsLock` helper function for detecting Caps Lock key press via Kitty protocol
313
-
314
- ### Changed
315
-
316
- - Settings list descriptions now wrap to the available width instead of truncating
317
-
318
- ### Fixed
319
-
320
- - Fixed Shift+Enter detection in legacy terminals that send ESC+CR sequence
321
-
322
- ## [3.15.0] - 2026-01-05
323
-
324
- ### Added
325
-
326
- - Added `inputCursor` symbol for customizing the text input cursor character
327
-
328
- ## [3.9.1337] - 2026-01-04
329
-
330
- ### Changed
331
-
332
- - Changed Editor component to use proper box borders with vertical side borders instead of horizontal-only borders
333
-
334
- ## [1.500.0] - 2026-01-03
335
-
336
- ### Added
337
-
338
- - Added `getText()` method to Text component for retrieving current text content
339
-
340
- ## [1.337.1] - 2026-01-02
341
-
342
- ### Added
343
-
344
- - TabBar component for horizontal tab navigation
345
-
346
- ### Changed
347
-
348
- - Forked to @oh-my-pi scope with unified versioning across all packages
349
-
350
- ### Fixed
351
-
352
- - Strip OSC 8 hyperlink sequences in `visibleWidth()`
353
-
354
- ## [1.337.0] - 2026-01-02
355
-
356
- Initial release under @oh-my-pi scope. See previous releases at [badlogic/pi-mono](https://github.com/badlogic/pi-mono).
357
-
358
- ## [1.4.6] - 2026-10-28
359
-
360
- ### Breaking Changes
361
-
362
- - Moved `PINNED_HUD_TOGGLE_ID` to the coding agent's task output manager so reserving subagent IDs no longer loads the interactive editor.
363
- - Updated `StatusLineHost.resetExpiryNotice` to receive the session and manage warning deduplication; custom status-line components must use the new signature.
364
- - Removed `ToolExecutionHandle.setToolActivityVisible`; tool-activity visibility is now controlled by transcript components, while reply blocks remain visible by default.
365
- - Removed the `@oh-my-pi/pi-tui/theme/defaults` export. Bundled palettes are now available through `getBuiltinThemes()` from `theme/defaults.json`.
366
-
367
- ### Fixed
342
+ ## [1.4.7] - 2026-10-30
368
343
 
369
- - Fixed table-chart direction detection so measures are not incorrectly marked as better based on header words; single-measure tables are now sent for judging when local charting is appropriate.
370
- - Fixed LSP diagnostics that incorrectly showed “No issues” before a language server had reported; such files are now shown as unverified. ([#17293](https://github.com/can1357/oh-my-pi/pull/17293) by [@JustasMasiulis](https://github.com/JustasMasiulis))
371
- - Fixed Esc-Esc rewind in Tern selecting interrupted turns with no visible output instead of the last displayed turn.
372
- - Fixed streamed code blocks losing lines that scrolled off screen before the closing fence arrived; completed lines now remain available in scrollback. ([#17333](https://github.com/can1357/oh-my-pi/pull/17333) by [@gzkGit777](https://github.com/gzkGit777))
344
+ - Synced with upstream OMP v18.14.0; no package-specific user-visible changes.
373
345
 
374
346
  ## [1.4.5] - 2026-10-28
375
347
 
@@ -404,8 +376,6 @@ Initial release under @oh-my-pi scope. See previous releases at [badlogic/pi-mon
404
376
  ### Added
405
377
 
406
378
  - 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))
407
- - `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
408
- - Add backslash+enter newline fallback for terminals without Kitty protocol
409
379
 
410
380
  ### Fixed
411
381
 
@@ -415,12 +385,6 @@ Initial release under @oh-my-pi scope. See previous releases at [badlogic/pi-mon
415
385
  - 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))
416
386
  - 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))
417
387
  - 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))
418
- - Remove trailing space padding from Text, Markdown, and TruncatedText components when no background color is set (fixes copied text including unwanted whitespace)
419
- - Fixed Ctrl+Enter sequences to insert new lines in the editor
420
-
421
- ### Removed
422
-
423
- - `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.
424
388
 
425
389
  ## [1.3.0] - 2026-10-18
426
390
 
@@ -542,10 +506,6 @@ Initial release under @oh-my-pi scope. See previous releases at [badlogic/pi-mon
542
506
 
543
507
  - Added cache-release hooks for TUI components and tool cards, allowing extensions to discard derived render data without rebuilding content ([#13632](https://github.com/can1357/oh-my-pi/pull/13632) by [@iliaal](https://github.com/iliaal)).
544
508
 
545
- ### Breaking Changes
546
-
547
- - **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))
548
-
549
509
  ## [1.1.26] - 2026-10-03
550
510
 
551
511
  - 版本线推进至 1.1.26;本版无独立用户可见变化。
@@ -571,27 +531,6 @@ Initial release under @oh-my-pi scope. See previous releases at [badlogic/pi-mon
571
531
  - 上游 v18.2.5 同步:每击键/每帧渲染浪费削减、billing 摘要重构、stream 状态分段、paint-listener 通知管线。
572
532
  - 主题、覆盖层、chat、工具渲染器与 apps 组件自 coding-agent 迁入本包(模块迁移)。
573
533
 
574
- ## [0.50.0] - 2026-01-26
575
-
576
- ### Fixed
577
-
578
- - Fixed appended lines not being committed to scrollback, causing earlier content to be overwritten when viewport fills ([#954](https://github.com/badlogic/pi-mono/issues/954))
579
-
580
- ## [0.49.3] - 2026-01-22
581
-
582
- ### Added
583
-
584
- - `codeBlockIndent` property on `MarkdownTheme` to customize code block content indentation (default: 2 spaces) ([#855](https://github.com/badlogic/pi-mono/pull/855) by [@terrorobe](https://github.com/terrorobe))
585
- - Added Alt+Delete as hotkey for delete word forwards ([#878](https://github.com/badlogic/pi-mono/pull/878) by [@Perlence](https://github.com/Perlence))
586
-
587
- ### Changed
588
-
589
- - Fuzzy matching now scores consecutive matches higher and penalizes gaps more heavily for better relevance ([#860](https://github.com/badlogic/pi-mono/pull/860) by [@mitsuhiko](https://github.com/mitsuhiko))
590
-
591
- ### Fixed
592
-
593
- - Autolinked emails no longer display redundant `(mailto:...)` suffix in markdown output ([#888](https://github.com/badlogic/pi-mono/pull/888) by [@terrorobe](https://github.com/terrorobe))
594
-
595
534
  ## [0.49.1] - 2026-01-18
596
535
 
597
536
  ### Added
@@ -628,28 +567,12 @@ Initial release under @oh-my-pi scope. See previous releases at [badlogic/pi-mon
628
567
 
629
568
  - Overlay compositing crash when rendered lines exceed terminal width due to complex ANSI/OSC sequences (e.g., hyperlinks in subagent output) ([#667](https://github.com/badlogic/pi-mono/pull/667) by [@nicobailon](https://github.com/nicobailon))
630
569
 
631
- ## [0.38.0] - 2026-01-08
632
-
633
- ### Fixed
634
-
635
- - Key presses no longer dropped when batched with other events over SSH ([#538](https://github.com/badlogic/pi-mono/pull/538))
636
-
637
570
  ## [0.37.8] - 2026-01-07
638
571
 
639
- ### Added
640
-
641
- - `Component.wantsKeyRelease` property to opt-in to key release events (default false)
642
-
643
572
  ### Fixed
644
573
 
645
574
  - TUI now filters out key release events by default, preventing double-processing of keys in editors and other components
646
575
 
647
- ## [0.37.7] - 2026-01-07
648
-
649
- ### Fixed
650
-
651
- - `matchesKey()` now correctly matches Kitty protocol sequences for unmodified letter keys (needed for key release events)
652
-
653
576
  ## [0.31.1] - 2026-01-02
654
577
 
655
578
  Older entries are archived in [packages/tui/CHANGELOG.md@fa14205f838f](https://github.com/can1357/oh-my-pi/blob/fa14205f838f282fcea048c64fca74026789a492/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 {
@@ -521,6 +521,12 @@ SIXEL images encode off the JavaScript thread: the first render reserves the ima
521
521
 
522
522
  Supported formats: PNG, JPEG, GIF, WebP. Dimensions are parsed from the image headers automatically.
523
523
 
524
+ ### Figures
525
+
526
+ `FigureMarkdown`, `SvgFigure`, and `TableChartFigure` size their images to a share of the terminal viewport. A surface shorter than the screen (an overlay, a pane) passes `maxRows: () => rows`, read on every render: the rows each figure may fill, a table chart's separator included. Zero hides a figure and keeps it from holding up transcript completion. Callers reserve room for prose and chrome themselves.
527
+
528
+ Lowering the ceiling refits the drawn image at once and redraws it at the new size; a SIXEL reserves its rows while each re-encode runs off the JavaScript thread, as for a width change. Changing the ceiling of rows already committed to native scrollback forces a resync, so leave committed figures alone.
529
+
524
530
  ## Autocomplete
525
531
 
526
532
  ### CombinedAutocompleteProvider
@@ -24,6 +24,7 @@ interface AppKeybindings {
24
24
  "app.message.followUp": true;
25
25
  "app.retry": true;
26
26
  "app.message.dequeue": true;
27
+ "app.btw.inject": true;
27
28
  "app.clipboard.pasteImage": true;
28
29
  "app.clipboard.pasteTextRaw": true;
29
30
  "app.clipboard.copyLine": true;
@@ -272,6 +273,10 @@ export declare const KEYBINDINGS: {
272
273
  readonly defaultKeys: ["alt+up", "shift+up"];
273
274
  readonly description: "Dequeue message";
274
275
  };
276
+ readonly "app.btw.inject": {
277
+ readonly defaultKeys: "alt+i";
278
+ readonly description: "Send a /btw answer's steering prompt to the main session";
279
+ };
275
280
  readonly "app.clipboard.pasteImage": {
276
281
  readonly defaultKeys: KeyId[];
277
282
  readonly description: "Paste image or text from clipboard";
@@ -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) or a running total of it
105
- * (`Offset` summing `Verts`). Such a column is never a measure of its own.
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
  }
@@ -4,7 +4,7 @@
4
4
  import type { ImageContent } from "@linxiraos/pi-ai";
5
5
  import { Container, type TUI } from "../tui.js";
6
6
  import type { OutputArtifactError } from "../tools/streaming-output.js";
7
- import type { TruncationMeta } from "../tools/output-meta.js";
7
+ import type { MinimizedMeta, TruncationMeta } from "../tools/output-meta.js";
8
8
  import { type DescribeContext, type NativeNode, type NativeUiEvent } from "../native/node.js";
9
9
  /** PTY size for `!` commands: the execution frame's inner content area. */
10
10
  export declare function bashPtyViewport(ui: TUI): {
@@ -43,9 +43,12 @@ export declare class BashExecutionComponent extends Container {
43
43
  output?: string;
44
44
  truncation?: TruncationMeta;
45
45
  artifactError?: OutputArtifactError;
46
+ minimized?: MinimizedMeta;
46
47
  images?: readonly ImageContent[];
47
48
  showImages?: boolean;
48
49
  }): void;
50
+ /** The loader animates the bottom border from outside the child tree, so teardown stops it here. */
51
+ dispose(): void;
49
52
  render(width: number): readonly string[];
50
53
  /**
51
54
  * Get the raw output for creating BashExecutionMessage.
@@ -32,6 +32,8 @@ export declare class EvalExecutionComponent extends Container {
32
32
  truncation?: TruncationMeta;
33
33
  artifactError?: OutputArtifactError;
34
34
  }): void;
35
+ /** The loader animates the bottom border from outside the child tree, so teardown stops it here. */
36
+ dispose(): void;
35
37
  getOutput(): string;
36
38
  getCode(): string;
37
39
  }
@@ -10,7 +10,8 @@ import { Loader } from "../components/loader.js";
10
10
  import { Text } from "../components/text.js";
11
11
  import { Container, type TUI } from "../tui.js";
12
12
  import type { OutputArtifactError } from "../tools/streaming-output.js";
13
- import { type TruncationMeta } from "../tools/output-meta.js";
13
+ import { type MinimizedMeta, type TruncationMeta } from "../tools/output-meta.js";
14
+ import { DynamicBorder } from "../chrome/dynamic-border.js";
14
15
  import type { TspText } from "@linxiraos/pi-wire";
15
16
  import type { NativeChild, NativeNode } from "../native/node.js";
16
17
  /** Output rows shown while an execution is collapsed. */
@@ -25,23 +26,26 @@ export type ExecutionColorKey = "dim" | "bashMode" | "pythonMode";
25
26
  /**
26
27
  * Build the spacer + top border + content container + bottom border scaffold
27
28
  * that bash and eval execution components share. The caller appends the
28
- * header (command vs `>>>` prompt) and the returned loader to
29
- * `contentContainer` so per-mode order is preserved.
29
+ * header (command vs `>>>` prompt) to `contentContainer` and keeps the run's
30
+ * state in `bottomBorder` ({@link executionStatusLabel}); the returned loader
31
+ * animates that label rather than taking a row of its own.
30
32
  */
31
33
  export declare function buildExecutionFrame(parent: Container, ui: TUI, colorKey: ExecutionColorKey): {
32
34
  contentContainer: Container;
33
35
  loader: Loader;
36
+ bottomBorder: DynamicBorder;
34
37
  };
38
+ /** The bottom-border marker of a settled run: `exit N` for a failure, `cancelled` for a cancel. */
39
+ export declare function executionStatusLabel(status: Exclude<ExecutionStatus, "running">, exitCode: number | undefined): string | undefined;
35
40
  /**
36
- * Build the post-run status block (hidden-line hint, exit/cancel marker,
37
- * truncation notice). Returns undefined when there is nothing to display so
38
- * callers can skip appending a stray Text child.
41
+ * Build the post-run status block (hidden-line hint, truncation notice).
42
+ * Returns undefined when there is nothing to display so callers can skip
43
+ * appending a stray Text child.
39
44
  */
40
45
  export declare function buildStatusFooter(opts: {
41
- status: ExecutionStatus;
42
- exitCode: number | undefined;
43
46
  truncation: TruncationMeta | undefined;
44
47
  artifactError?: OutputArtifactError;
48
+ minimized?: MinimizedMeta;
45
49
  hiddenLineCount: number;
46
50
  /** Suppress the "… N more lines" hint (used when sixel passthrough renders the full output). */
47
51
  suppressHiddenCount?: boolean;
@@ -64,6 +68,7 @@ export interface ExecutionCardInput {
64
68
  readonly exitCode: number | undefined;
65
69
  readonly truncation: TruncationMeta | undefined;
66
70
  readonly artifactError?: OutputArtifactError;
71
+ readonly minimized?: MinimizedMeta;
67
72
  }
68
73
  /**
69
74
  * Native card shared by user bash/eval runs: the head with a live `elapsed`
@@ -94,6 +99,7 @@ export interface ExecutionToolInput {
94
99
  readonly exitCode: number | undefined;
95
100
  readonly truncation: TruncationMeta | undefined;
96
101
  readonly artifactError?: OutputArtifactError;
102
+ readonly minimized?: MinimizedMeta;
97
103
  }
98
104
  /**
99
105
  * A user `!`/`$` run as the agent's `tool` frame (§6.6): a head with a `you`
@@ -8,6 +8,8 @@ export interface FigureMarkdownOptions {
8
8
  charts: boolean;
9
9
  /** Shared inline-image budget for the figures. */
10
10
  budget?: ImageBudget;
11
+ /** Rows each figure may fill, read on every render; callers reserve prose, chrome and separators themselves. Unset or `undefined` takes a share of the terminal viewport. */
12
+ maxRows?: () => number | undefined;
11
13
  /** A figure's rows changed outside a text update (raster landed, fell back to code). */
12
14
  onChange: () => void;
13
15
  }
@@ -16,6 +16,11 @@ export interface SvgFigureOptions {
16
16
  markdown?: (text: string) => Markdown;
17
17
  /** Shared inline-image budget; superseded rasters are released from it. */
18
18
  budget?: ImageBudget;
19
+ /**
20
+ * Rows the figure may fill, fallback code included, read on every render;
21
+ * zero hides it. Unset or `undefined` takes a share of the terminal viewport.
22
+ */
23
+ maxRows?: () => number | undefined;
19
24
  /** The figure's rows changed outside a text update: a raster landed or rendering fell back to code. */
20
25
  onChange: () => void;
21
26
  }
@@ -64,6 +64,8 @@ export declare function chartFence(svg: string): string;
64
64
  export interface TableChartFigureOptions {
65
65
  /** Shared inline-image budget. */
66
66
  budget?: ImageBudget;
67
+ /** Rows the chart may fill, its separator included, read on every render; under two hides it. Unset or `undefined` takes a share of the terminal viewport. */
68
+ maxRows?: () => number | undefined;
67
69
  /** The chart's rows changed outside a text update: its pick or raster landed. */
68
70
  onChange: () => void;
69
71
  }