@linxiraos/pi-tui 1.4.1 → 1.4.3

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 (2) hide show
  1. package/CHANGELOG.md +182 -174
  2. package/package.json +9 -9
package/CHANGELOG.md CHANGED
@@ -1,180 +1,8 @@
1
1
  ## [Unreleased]
2
2
 
3
- ## [1.4.1] - 2026-10-23
4
-
5
- - 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
6
-
7
- ### Breaking Changes
8
-
9
- - Removed `KeyEventType` export from public API
10
- - `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
- - Removed `Key` helper object from public API; use string literals like `"ctrl+c"` instead of `Key.ctrl("c")`
12
-
13
- ### Added
14
-
15
- - Added `symbols` property to `EditorTheme`, `MarkdownTheme`, and `SelectListTheme` interfaces for component-level symbol customization
16
- - Overlay compositing via `TUI.showOverlay()` and `TUI.hideOverlay()` for `ctx.ui.custom()` with `{ overlay: true }`
17
- - Kitty keyboard protocol flag 2 support for key release events (`isKeyRelease()`, `isKeyRepeat()`, `KeyEventType`)
18
- - `setKittyProtocolActive()`, `isKittyProtocolActive()` for Kitty protocol state management
19
- - `kittyProtocolActive` property on Terminal interface to query Kitty protocol state
20
- - `Component.wantsKeyRelease` property to opt-in to key release events (default false)
21
- - Input component `onEscape` callback for handling escape key presses
22
- - Emergency terminal restore to prevent corrupted state on crashes
23
- - Overhauled UI with welcome screen and powerline footer
24
- - Theme-configurable HTML export colors
25
- - `ctx.ui.theme` getter for styling status text with theme colors
26
- - Added `PI_TUI_WRITE_LOG` environment variable to capture raw ANSI output for debugging
27
- - Added legacy Alt+letter handling and Alt+D delete word forward support in the editor keymap. ([#810](https://github.com/badlogic/pi-mono/pull/810) by [@Perlence](https://github.com/Perlence))
28
- - `showOverlay()` now returns `OverlayHandle` with `hide()`, `setHidden(boolean)`, `isHidden()` for programmatic visibility control ([#667](https://github.com/badlogic/pi-mono/pull/667) by [@nicobailon](https://github.com/nicobailon))
29
- - New exported types: `OverlayAnchor`, `OverlayHandle`, `OverlayMargin`, `OverlayOptions`, `SizeValue` ([#667](https://github.com/badlogic/pi-mono/pull/667) by [@nicobailon](https://github.com/nicobailon))
30
- - `truncateToWidth()` now accepts optional `pad` parameter to pad result with spaces to exactly `maxWidth` ([#667](https://github.com/badlogic/pi-mono/pull/667) by [@nicobailon](https://github.com/nicobailon))
31
- - **Experimental:** Overlay compositing for `ctx.ui.custom()` with `{ overlay: true }` option ([#558](https://github.com/badlogic/pi-mono/pull/558) by [@nicobailon](https://github.com/nicobailon))
32
- - `EditorComponent` interface for custom editor implementations
33
- - `StdinBuffer` class to split batched stdin into individual sequences (adapted from [OpenTUI](https://github.com/anomalyco/opentui), MIT license)
34
- - `Editor.getExpandedText()` method that returns text with paste markers expanded to their actual content ([#444](https://github.com/badlogic/pi-mono/pull/444) by [@aliou](https://github.com/aliou))
35
- - Added mermaid block extraction and deduplication utilities (extractMermaidBlocks)
36
- - Added `Alt+Delete` as a delete-word-forward shortcut
37
- - Added configurable code block indentation for Markdown rendering
38
- - Added undo support in the editor via `Ctrl+-`.
39
- - Added configurable code block indentation for Markdown rendering.
40
- - Added `Alt+Delete` as a delete-word-forward shortcut.
41
- - Added `isPageUp()` and `isPageDown()` helper functions
42
- - Added `SizeValue` type for CSS-like overlay sizing (absolute or percentage strings like `"50%"`)
43
- - Added `OverlayHandle` interface with `hide()`, `setHidden()`, `isHidden()` methods for overlay visibility control
44
- - Added `visible` callback to `OverlayOptions` for dynamic visibility based on terminal dimensions
45
- - Added `pad` parameter to `truncateToWidth()` for padding result with spaces to exact width
46
- - `StdinBuffer` class to split batched stdin into individual sequences
47
- - Added `isCtrlY` helper function for detecting Ctrl+Y keyboard input
48
- - Added configurable editor keybindings with typed key identifiers and action matching
49
- - Added word-wrapped editor rendering for long lines
50
- - Added `getText()` method to Text component for retrieving current text content
51
- - Added `fullRedraws` readonly property to TUI class for tracking full screen redraws
52
- - Added `showHardwareCursor` getter and setter to control cursor visibility while keeping IME positioning active. ([#800](https://github.com/badlogic/pi-mono/pull/800) by [@ghoulr](https://github.com/ghoulr))
53
- - Added Emacs-style kill ring editing with yank and yank-pop keybindings. ([#810](https://github.com/badlogic/pi-mono/pull/810) by [@Perlence](https://github.com/Perlence))
54
- - `EditorOptions` with optional `paddingX` for horizontal content padding, plus `getPaddingX()`/`setPaddingX()` methods ([#791](https://github.com/badlogic/pi-mono/pull/791) by [@ferologics](https://github.com/ferologics))
55
- - Expanded keymap coverage for terminal compatibility: added support for Home/End keys in tmux, additional modifier combinations, and improved key sequence parsing ([#752](https://github.com/badlogic/pi-mono/pull/752) by [@richardgill](https://github.com/richardgill))
56
- - `OverlayOptions.visible` callback for responsive overlays - receives terminal dimensions, return false to hide ([#667](https://github.com/badlogic/pi-mono/pull/667) by [@nicobailon](https://github.com/nicobailon))
57
- - `pageUp` and `pageDown` key support with `selectPageUp`/`selectPageDown` editor actions ([#662](https://github.com/badlogic/pi-mono/pull/662) by [@aliou](https://github.com/aliou))
58
- - `fuzzyFilter()` and `fuzzyMatch()` utilities for fuzzy text matching
59
- - Slash command autocomplete now uses fuzzy matching instead of prefix matching
60
- - Added setAutocompleteMaxVisible() configuration (3-20 items)
61
- - Added image detection to terminal capabilities (containsImage method)
62
- - Added stdin monitoring to detect stalled input events and log warnings
63
- - Added `pageUp` and `pageDown` key support with `selectPageUp`/`selectPageDown` editor actions
64
- - Add `getExpandedText()` to editor for expanding paste markers
65
- - Added `SymbolTheme` interface for customizing UI symbols including cursors, borders, spinners, and box-drawing characters
66
- - Added support for custom spinner frames in the Loader component
67
- - Added `setTopBorder()` method to Editor component for displaying custom status content in the top border
68
- - Added `getWidth()` method to TUI class for retrieving terminal width
69
- - Added rounded corner box-drawing characters to Editor component borders
70
- - 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))
71
- - 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.
72
- - `SettingsListOptions` with `enableSearch` for fuzzy filtering in `SettingsList` ([#643](https://github.com/badlogic/pi-mono/pull/643) by [@ninlds](https://github.com/ninlds))
73
- - `Editor.insertTextAtCursor(text)` method for programmatic text insertion ([#419](https://github.com/badlogic/pi-mono/issues/419))
74
- - `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))
75
-
76
- ### Changed
77
-
78
- - `UserMessageComponent`'s native hover toolbar (`zeta.user.tools`) leads with Copy and Rewind icon buttons (`copy`, `rewind`) instead of text labels, then a dot and the time, like the turn usage footer
79
- - `ContextUsageView`'s native body (on terminals with `meter`) leads with the tokens used and the room left before auto-compaction, then one stacked bar ticked at the threshold, the breakdown as rows (`zeta.context.cat`, `.cat.free`, `.cat.buffer`: swatch, name, tokens, share; the exact count in the row's `title`) and the snapcompact estimate as labelled rows (`zeta.context.snap`); the blocks meter and legend `kv` are gone, and `contextUsageHead` no longer repeats the window size
80
- - `AskDialogComponent`'s native root is `zeta.editor.ask` (collapsed: `zeta.editor.ask.hidden`, the countdown, the question as `zeta.ask.summary`, Skip and Show): a chosen answer is the `accent`-toned row (a check also carries the check icon) instead of the highlighted one; multi-select Other… is `zeta.ask.other.check`; the question tabs check answered questions and say their keys in the strip's `title`; the countdown moves from the head to the action bar beside Hide; the preview is `zeta.ask.preview`; the Review tab leads with `zeta.ask.notice` and lists answers (`zeta.ask.answers`) by question name with inline code mono and no `(Recommended)` suffix; option descriptions run inline code mono, notes ride the row's detail as `em`; Submit/Next's tooltip names only Enter (and Space on a multi-select)
81
- - `MCPAddWizard`'s native sheet asks one question per step: a phase strip (`zeta.mcpAdd.progress` of `zeta.mcpAdd.phase`, toned done/current/upcoming and `neutral` when no auth was needed), the question and its lead (`zeta.mcpAdd.title`, `zeta.mcpAdd.tag` for optional fields, `zeta.mcpAdd.lead`), then a mono field with a placeholder and its rule or refusal (`zeta.mcpAdd.field`, `tone: "error"`; `zeta.mcpAdd.note`), choice rows with icons and mono tags (`zeta.mcpAdd.choices`), status lines (`zeta.mcpAdd.status`, `zeta.mcpAdd.checks`, `zeta.mcpAdd.error`) or the review rows (`zeta.mcpAdd.summary`). Cancel, Back and Continue / Save server buttons run Ctrl+C, Esc and Enter instead of a key-hint strip. The connection test shows its own busy step, the OAuth client secret field is masked, and the review saves on Enter (no Yes/No choice)
82
- - `ReportPanel`'s native body carries the role `zeta.report.body`
83
- - `HookInputComponent` describes a dock sheet (`zeta.overlay.hook-input` col) like `HookEditorComponent`'s: the title's first line (`zeta.hook-input.title`, the countdown as `zeta.hook-input.timer`) over its further lines (`zeta.hook-input.detail`), the field (`zeta.hook-input.field`, `tone: "error"` while a submit was refused) with its placeholder, and Cancel / Submit buttons that run Esc / Enter; the key legend under the field is terminal-only
84
- - `JobsSheet`'s native body is a master–detail split (`zeta.jobs.split`: `zeta.jobs.master` | `zeta.jobs.detail`): the job list grouped Running / Recent (`zeta.jobs.group` labels), each row a type icon tinted by status with its duration, beside the selected job's status pill, live elapsed and Cancel job (`zeta.jobs.status`), its task title or command (`zeta.jobs.title` / `zeta.jobs.command`), facts (`zeta.jobs.facts`: agent, directory, pids, exit code, artifact) and output (`zeta.jobs.out`, `zeta.jobs.nooutput`); the footer counts running and recent jobs (`zeta.jobs.summary`), and no jobs shows an empty state (`zeta.jobs.empty`). Task jobs no longer draw an `agent` node here
85
- - `BtwHistoryPanel`'s native sheet is centered and reads like a mail reader: the questions as two-line rows (`zeta.btw.history`, list `zeta.btw.list` / `zeta.btw.list.idle` while the answer has the keys) beside the selected thread (`zeta.btw.reader` › `zeta.btw.thread` › `zeta.btw.turn`: `zeta.btw.question` / `zeta.btw.followup`, `zeta.btw.meta`, `zeta.btw.answer`, `zeta.btw.error`), the follow-up field under the last answer (`zeta.btw.composer`), and footer buttons Stop answer, Copy answer, Close and Follow up (Cancel and Send while composing) in place of the focus labels and key-hint strip; an empty history is an `md` sheet (`zeta.btw.empty`)
86
- - The `wait` tool's native job rows (`zeta.wait.job`) are a single `row`: badge, id and label, progress and clock, without the output preview or capture notice beneath
87
- - The native bash run foot reads In background with a live clock (`zeta.run.time` without `stopped`) while a parked job's frames stream (`details.async.state === "running"`, partial), instead of Running
88
- - Moved `wrapTextWithAnsi` export to `@linxiraos/pi-natives` package
89
- - Default editor `newLine` binding now uses `shift+enter` only
90
- - Hardware cursor is now disabled by default for better terminal compatibility. Set `PI_HARDWARE_CURSOR=1` to enable (replaces `PI_NO_HARDWARE_CURSOR=1` which disabled it).
91
- - Migrated key parsing and matching logic to native implementation for improved performance
92
- - Simplified `isKeyRelease()` and `isKeyRepeat()` to use regex pattern matching instead of string inclusion checks
93
- - Refactored `visibleWidth` function to use caching wrapper around new `visibleWidthRaw` implementation for improved performance
94
- - Improved performance of key ID parsing with optimized cache lookup strategy
95
- - Simplified `visibleWidth` calculation to use consistent Bun.stringWidth approach for all string lengths
96
- - Replaced external `fd` binary with native fuzzy path search for `@`-prefixed autocomplete
97
- - Restructured terminal capabilities from interface-based to class-based model
98
- - Improved table column width calculation with word-aware wrapping
99
- - Refactored text utilities to use native WASM implementations for strings >256 chars with JS fast path
100
- - Added Ctrl+Backspace as a delete-word-backward keybinding and improved modified backspace matching
101
- - Migrated file system operations from synchronous to asynchronous APIs in autocomplete provider for non-blocking I/O
102
- - Migrated node module imports from named to namespace imports across all packages for consistency with project guidelines
103
- - Normalized keybinding definitions to lowercase internally
104
- - Improved fuzzy matching to handle alphanumeric swaps.
105
- - Normalized keybinding definitions to lowercase internally.
106
- - Changed `showOverlay()` to return `OverlayHandle` for controlling overlay visibility
107
- - Removed `widthPercent`, `maxHeightPercent`, `rowPercent`, `colPercent` from `OverlayOptions` (use percentage strings instead)
108
- - Improved file autocomplete to show directory listing when typing `@` with no query, and fall back to prefix matching when fuzzy search returns no results
109
- - Terminal startup now queries Kitty protocol support before enabling event reporting
110
- - Changed cursor style from block to thin blinking bar (▏) at end of line
111
- - Editor component now uses word wrapping instead of character-level wrapping for better readability ([#382](https://github.com/badlogic/pi-mono/pull/382) by [@nickseelert](https://github.com/nickseelert))
112
- - Renamed `EllipsisKind` enum to `Ellipsis` for clearer API naming
113
- - Changed hardcoded ellipsis character from theme-configurable to literal "…" in editor truncation
114
- - Improved blockquote rendering with text wrapping in Markdown component
115
- - Expanded Kitty keyboard protocol coverage for non-Latin layouts and legacy Alt sequences
116
- - Improved cursor positioning with safer bounds checking
117
- - Updated editor layout to respect configurable padding
118
- - Refactored scrolling logic for better viewport management
119
- - Key detection refactored: consolidated `is*()` functions into generic `matchesKey(data, keyId)` function that accepts key identifiers like `"ctrl+c"`, `"shift+enter"`, `"alt+left"`, etc.
120
-
121
- ### Fixed
122
-
123
- - Fixed width overflow protection in overlay compositing to prevent TUI crashes
124
- - Key presses no longer dropped when batched with other events over SSH
125
- - Fixed `fd` tool detection to automatically find `fd` or `fdfind` in PATH when not explicitly configured
126
- - Fixed editor multi-line insertion handling and lastAction tracking ([#945](https://github.com/badlogic/pi-mono/pull/945) by [@Perlence](https://github.com/Perlence))
127
- - Fixed editor word wrapping to reserve a cursor column ([#934](https://github.com/badlogic/pi-mono/pull/934) by [@Perlence](https://github.com/Perlence))
128
- - Fixed editor word wrapping to use single-pass backtracking for whitespace handling ([#924](https://github.com/badlogic/pi-mono/pull/924) by [@Perlence](https://github.com/Perlence))
129
- - Fixed Kitty image ID allocation and cleanup to prevent image ID collisions between modules
130
- - Fixed viewport tracking and cursor positioning for overlays and content shrink scenarios
131
- - Autocomplete now allows searches with `/` characters (e.g., `folder1/folder2`) ([#882](https://github.com/badlogic/pi-mono/pull/882) by [@richardgill](https://github.com/richardgill))
132
- - Directory completions for `@` file attachments no longer add trailing space, allowing continued autocomplete into subdirectories
133
- - `visibleWidth()` and `extractAnsiCode()` now handle APC escape sequences (`ESC _ ... BEL`), fixing width calculation and string slicing for strings containing cursor markers
134
- - SelectList now handles multi-line descriptions by replacing newlines with spaces ([#728](https://github.com/badlogic/pi-mono/pull/728) by [@richardgill](https://github.com/richardgill))
135
- - Reset ANSI styles after each rendered line to prevent style leakage
136
- - Cursor position tracking when content shrinks with unchanged remaining lines
137
- - TUI renders with wrong dimensions after suspend/resume if terminal was resized while suspended ([#599](https://github.com/badlogic/pi-mono/issues/599))
138
- - Pasted content containing Kitty key release patterns (e.g., `:3F` in MAC addresses) was incorrectly filtered out ([#623](https://github.com/badlogic/pi-mono/pull/623) by [@ogulcancelik](https://github.com/ogulcancelik))
139
- - `visibleWidth()` now strips OSC 8 hyperlink sequences, fixing text wrapping for clickable links ([#396](https://github.com/badlogic/pi-mono/pull/396) by [@Cursivez](https://github.com/Cursivez))
140
-
141
- Older entries are archived in [packages/tui/CHANGELOG.md@9caccab691ce](https://github.com/can1357/oh-my-pi/blob/9caccab691ce575007f4b6bcbaf8f944723d5457/packages/tui/CHANGELOG.md).
142
- Older entries are archived in [packages/tui/CHANGELOG.md@58141d4e5fa8](https://github.com/can1357/oh-my-pi/blob/58141d4e5fa892166024e2168866c45e0baacde3/packages/tui/CHANGELOG.md).
143
- - Corrected editor end-of-line cursor rendering assertion to use includes() instead of endsWith()
144
- - Fixed potential errors during emergency terminal restore when terminal is already dead
145
- - Fixed autocomplete race condition by tracking request ID to prevent stale suggestion results
146
- - Added legacy terminal support for `Ctrl+` symbol key combinations
147
- - Added legacy terminal support for `Ctrl+` symbol key combinations.
148
- - Fixed backspace handling with additional codepoint support
149
- - Fixed Alt+letter key combinations for better recognition
150
- - TUI now filters out key release events by default, preventing double-processing of keys
151
- - `matchesKey()` now correctly matches Kitty protocol sequences for unmodified letter keys
152
- - Crash when pasting text with trailing whitespace exceeding terminal width through Markdown rendering
153
- - Slash command menu now only triggers when the editor input is otherwise empty ([#904](https://github.com/badlogic/pi-mono/issues/904))
154
- - Center-anchored overlays now stay vertically centered when resizing the terminal taller after a shrink ([#950](https://github.com/badlogic/pi-mono/pull/950) by [@nicobailon](https://github.com/nicobailon))
155
- - Shift+Space, Shift+Backspace, and Shift+Delete now work correctly in Kitty-protocol terminals (Kitty, WezTerm, etc.) instead of being silently ignored ([#411](https://github.com/badlogic/pi-mono/pull/411) by [@nathyong](https://github.com/nathyong))
156
- - Improved Kitty terminal key sequence parsing to correctly handle text field codepoints in CSI-u sequences
157
- - Fixed handling of private use Unicode codepoints (U+E000 to U+F8FF) in Kitty key decoding to prevent invalid character interpretation
158
- - Simplified terminal write error handling to mark terminal as dead on any write failure
159
- - Fixed multi-line strings in renderOutputBlock causing width overflow
160
- - Fixed slash command autocomplete applying stale completion when typing quickly
161
- - Reserved cursor space for zero padding and corrected end-of-line cursor rendering to prevent wrap glitches
162
- - Fixed viewport tracking after partial renders to prevent autocomplete list artifacts
163
- - Rendering optimizations: only re-render changed lines
164
- - Refactor input component to use keybindings manager
165
- - Fixed editor cursor blinking by allowing terminal cursor positioning when enabled.
166
- - Editor no longer corrupts terminal display when text exceeds screen height. Content now scrolls vertically with indicators showing lines above/below the viewport. Max height is 30% of terminal (minimum 5 lines). ([#732](https://github.com/badlogic/pi-mono/issues/732))
167
- - Cursor now moves to end of content on exit, preventing status line from being overwritten ([#629](https://github.com/badlogic/pi-mono/pull/629) by [@tallshort](https://github.com/tallshort))
168
- - Slash command autocomplete now triggers for commands starting with `.`, `-`, or `_` (e.g., `/.land`, `/-foo`) ([#422](https://github.com/badlogic/pi-mono/issues/422))
3
+ ## [1.4.3] - 2026-10-25
169
4
 
170
- ### Removed
171
-
172
- - 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.
173
- - Removed `ellipsis` property from `SymbolTheme` interface
174
- - Removed `extractAnsiCode` function from public API
175
- - Removed TUI layout engine exports from public API (BoxNode, ColumnNode, LayoutNode, etc.)
176
- - Removed `visibleWidth` benchmark file in favor of Kitty sequence benchmarking
177
- - Removed `truncateToWidth`, `sliceWithWidth`, and `extractSegments` functions from public API (now re-exported directly from @linxiraos/pi-natives)
5
+ - Released as part of Zeta 1.4.3; no package-specific user-visible changes.
178
6
 
179
7
  ## [9.5.0] - 2026-02-01
180
8
 
@@ -353,6 +181,186 @@ Older entries are archived in [packages/tui/CHANGELOG.md@58141d4e5fa8](https://g
353
181
 
354
182
  Initial release under @oh-my-pi scope. See previous releases at [badlogic/pi-mono](https://github.com/badlogic/pi-mono).
355
183
 
184
+ ## [1.4.2] - 2026-10-24
185
+
186
+ - Version alignment with the 1.4.2 release line (no behavioral changes).
187
+
188
+ ## [1.4.1] - 2026-10-23
189
+
190
+ - 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
191
+
192
+ ### Breaking Changes
193
+
194
+ - Removed `KeyEventType` export from public API
195
+ - `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))
196
+ - Removed `Key` helper object from public API; use string literals like `"ctrl+c"` instead of `Key.ctrl("c")`
197
+
198
+ ### Added
199
+
200
+ - Added `symbols` property to `EditorTheme`, `MarkdownTheme`, and `SelectListTheme` interfaces for component-level symbol customization
201
+ - Overlay compositing via `TUI.showOverlay()` and `TUI.hideOverlay()` for `ctx.ui.custom()` with `{ overlay: true }`
202
+ - Kitty keyboard protocol flag 2 support for key release events (`isKeyRelease()`, `isKeyRepeat()`, `KeyEventType`)
203
+ - `setKittyProtocolActive()`, `isKittyProtocolActive()` for Kitty protocol state management
204
+ - `kittyProtocolActive` property on Terminal interface to query Kitty protocol state
205
+ - `Component.wantsKeyRelease` property to opt-in to key release events (default false)
206
+ - Input component `onEscape` callback for handling escape key presses
207
+ - Emergency terminal restore to prevent corrupted state on crashes
208
+ - Overhauled UI with welcome screen and powerline footer
209
+ - Theme-configurable HTML export colors
210
+ - `ctx.ui.theme` getter for styling status text with theme colors
211
+ - Added `PI_TUI_WRITE_LOG` environment variable to capture raw ANSI output for debugging
212
+ - Added legacy Alt+letter handling and Alt+D delete word forward support in the editor keymap. ([#810](https://github.com/badlogic/pi-mono/pull/810) by [@Perlence](https://github.com/Perlence))
213
+ - `showOverlay()` now returns `OverlayHandle` with `hide()`, `setHidden(boolean)`, `isHidden()` for programmatic visibility control ([#667](https://github.com/badlogic/pi-mono/pull/667) by [@nicobailon](https://github.com/nicobailon))
214
+ - New exported types: `OverlayAnchor`, `OverlayHandle`, `OverlayMargin`, `OverlayOptions`, `SizeValue` ([#667](https://github.com/badlogic/pi-mono/pull/667) by [@nicobailon](https://github.com/nicobailon))
215
+ - `truncateToWidth()` now accepts optional `pad` parameter to pad result with spaces to exactly `maxWidth` ([#667](https://github.com/badlogic/pi-mono/pull/667) by [@nicobailon](https://github.com/nicobailon))
216
+ - **Experimental:** Overlay compositing for `ctx.ui.custom()` with `{ overlay: true }` option ([#558](https://github.com/badlogic/pi-mono/pull/558) by [@nicobailon](https://github.com/nicobailon))
217
+ - `EditorComponent` interface for custom editor implementations
218
+ - `StdinBuffer` class to split batched stdin into individual sequences (adapted from [OpenTUI](https://github.com/anomalyco/opentui), MIT license)
219
+ - `Editor.getExpandedText()` method that returns text with paste markers expanded to their actual content ([#444](https://github.com/badlogic/pi-mono/pull/444) by [@aliou](https://github.com/aliou))
220
+ - Added mermaid block extraction and deduplication utilities (extractMermaidBlocks)
221
+ - Added `Alt+Delete` as a delete-word-forward shortcut
222
+ - Added configurable code block indentation for Markdown rendering
223
+ - Added undo support in the editor via `Ctrl+-`.
224
+ - Added configurable code block indentation for Markdown rendering.
225
+ - Added `Alt+Delete` as a delete-word-forward shortcut.
226
+ - Added `isPageUp()` and `isPageDown()` helper functions
227
+ - Added `SizeValue` type for CSS-like overlay sizing (absolute or percentage strings like `"50%"`)
228
+ - Added `OverlayHandle` interface with `hide()`, `setHidden()`, `isHidden()` methods for overlay visibility control
229
+ - Added `visible` callback to `OverlayOptions` for dynamic visibility based on terminal dimensions
230
+ - Added `pad` parameter to `truncateToWidth()` for padding result with spaces to exact width
231
+ - `StdinBuffer` class to split batched stdin into individual sequences
232
+ - Added `isCtrlY` helper function for detecting Ctrl+Y keyboard input
233
+ - Added configurable editor keybindings with typed key identifiers and action matching
234
+ - Added word-wrapped editor rendering for long lines
235
+ - Added `getText()` method to Text component for retrieving current text content
236
+ - Added `fullRedraws` readonly property to TUI class for tracking full screen redraws
237
+ - Added `showHardwareCursor` getter and setter to control cursor visibility while keeping IME positioning active. ([#800](https://github.com/badlogic/pi-mono/pull/800) by [@ghoulr](https://github.com/ghoulr))
238
+ - Added Emacs-style kill ring editing with yank and yank-pop keybindings. ([#810](https://github.com/badlogic/pi-mono/pull/810) by [@Perlence](https://github.com/Perlence))
239
+ - `EditorOptions` with optional `paddingX` for horizontal content padding, plus `getPaddingX()`/`setPaddingX()` methods ([#791](https://github.com/badlogic/pi-mono/pull/791) by [@ferologics](https://github.com/ferologics))
240
+ - Expanded keymap coverage for terminal compatibility: added support for Home/End keys in tmux, additional modifier combinations, and improved key sequence parsing ([#752](https://github.com/badlogic/pi-mono/pull/752) by [@richardgill](https://github.com/richardgill))
241
+ - `OverlayOptions.visible` callback for responsive overlays - receives terminal dimensions, return false to hide ([#667](https://github.com/badlogic/pi-mono/pull/667) by [@nicobailon](https://github.com/nicobailon))
242
+ - `pageUp` and `pageDown` key support with `selectPageUp`/`selectPageDown` editor actions ([#662](https://github.com/badlogic/pi-mono/pull/662) by [@aliou](https://github.com/aliou))
243
+ - `fuzzyFilter()` and `fuzzyMatch()` utilities for fuzzy text matching
244
+ - Slash command autocomplete now uses fuzzy matching instead of prefix matching
245
+ - Added setAutocompleteMaxVisible() configuration (3-20 items)
246
+ - Added image detection to terminal capabilities (containsImage method)
247
+ - Added stdin monitoring to detect stalled input events and log warnings
248
+ - Added `pageUp` and `pageDown` key support with `selectPageUp`/`selectPageDown` editor actions
249
+ - Add `getExpandedText()` to editor for expanding paste markers
250
+ - Added `SymbolTheme` interface for customizing UI symbols including cursors, borders, spinners, and box-drawing characters
251
+ - Added support for custom spinner frames in the Loader component
252
+ - Added `setTopBorder()` method to Editor component for displaying custom status content in the top border
253
+ - Added `getWidth()` method to TUI class for retrieving terminal width
254
+ - Added rounded corner box-drawing characters to Editor component borders
255
+ - 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))
256
+ - 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.
257
+ - `SettingsListOptions` with `enableSearch` for fuzzy filtering in `SettingsList` ([#643](https://github.com/badlogic/pi-mono/pull/643) by [@ninlds](https://github.com/ninlds))
258
+ - `Editor.insertTextAtCursor(text)` method for programmatic text insertion ([#419](https://github.com/badlogic/pi-mono/issues/419))
259
+ - `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))
260
+
261
+ ### Changed
262
+
263
+ - `UserMessageComponent`'s native hover toolbar (`zeta.user.tools`) leads with Copy and Rewind icon buttons (`copy`, `rewind`) instead of text labels, then a dot and the time, like the turn usage footer
264
+ - `ContextUsageView`'s native body (on terminals with `meter`) leads with the tokens used and the room left before auto-compaction, then one stacked bar ticked at the threshold, the breakdown as rows (`zeta.context.cat`, `.cat.free`, `.cat.buffer`: swatch, name, tokens, share; the exact count in the row's `title`) and the snapcompact estimate as labelled rows (`zeta.context.snap`); the blocks meter and legend `kv` are gone, and `contextUsageHead` no longer repeats the window size
265
+ - `AskDialogComponent`'s native root is `zeta.editor.ask` (collapsed: `zeta.editor.ask.hidden`, the countdown, the question as `zeta.ask.summary`, Skip and Show): a chosen answer is the `accent`-toned row (a check also carries the check icon) instead of the highlighted one; multi-select Other… is `zeta.ask.other.check`; the question tabs check answered questions and say their keys in the strip's `title`; the countdown moves from the head to the action bar beside Hide; the preview is `zeta.ask.preview`; the Review tab leads with `zeta.ask.notice` and lists answers (`zeta.ask.answers`) by question name with inline code mono and no `(Recommended)` suffix; option descriptions run inline code mono, notes ride the row's detail as `em`; Submit/Next's tooltip names only Enter (and Space on a multi-select)
266
+ - `MCPAddWizard`'s native sheet asks one question per step: a phase strip (`zeta.mcpAdd.progress` of `zeta.mcpAdd.phase`, toned done/current/upcoming and `neutral` when no auth was needed), the question and its lead (`zeta.mcpAdd.title`, `zeta.mcpAdd.tag` for optional fields, `zeta.mcpAdd.lead`), then a mono field with a placeholder and its rule or refusal (`zeta.mcpAdd.field`, `tone: "error"`; `zeta.mcpAdd.note`), choice rows with icons and mono tags (`zeta.mcpAdd.choices`), status lines (`zeta.mcpAdd.status`, `zeta.mcpAdd.checks`, `zeta.mcpAdd.error`) or the review rows (`zeta.mcpAdd.summary`). Cancel, Back and Continue / Save server buttons run Ctrl+C, Esc and Enter instead of a key-hint strip. The connection test shows its own busy step, the OAuth client secret field is masked, and the review saves on Enter (no Yes/No choice)
267
+ - `ReportPanel`'s native body carries the role `zeta.report.body`
268
+ - `HookInputComponent` describes a dock sheet (`zeta.overlay.hook-input` col) like `HookEditorComponent`'s: the title's first line (`zeta.hook-input.title`, the countdown as `zeta.hook-input.timer`) over its further lines (`zeta.hook-input.detail`), the field (`zeta.hook-input.field`, `tone: "error"` while a submit was refused) with its placeholder, and Cancel / Submit buttons that run Esc / Enter; the key legend under the field is terminal-only
269
+ - `JobsSheet`'s native body is a master–detail split (`zeta.jobs.split`: `zeta.jobs.master` | `zeta.jobs.detail`): the job list grouped Running / Recent (`zeta.jobs.group` labels), each row a type icon tinted by status with its duration, beside the selected job's status pill, live elapsed and Cancel job (`zeta.jobs.status`), its task title or command (`zeta.jobs.title` / `zeta.jobs.command`), facts (`zeta.jobs.facts`: agent, directory, pids, exit code, artifact) and output (`zeta.jobs.out`, `zeta.jobs.nooutput`); the footer counts running and recent jobs (`zeta.jobs.summary`), and no jobs shows an empty state (`zeta.jobs.empty`). Task jobs no longer draw an `agent` node here
270
+ - `BtwHistoryPanel`'s native sheet is centered and reads like a mail reader: the questions as two-line rows (`zeta.btw.history`, list `zeta.btw.list` / `zeta.btw.list.idle` while the answer has the keys) beside the selected thread (`zeta.btw.reader` › `zeta.btw.thread` › `zeta.btw.turn`: `zeta.btw.question` / `zeta.btw.followup`, `zeta.btw.meta`, `zeta.btw.answer`, `zeta.btw.error`), the follow-up field under the last answer (`zeta.btw.composer`), and footer buttons Stop answer, Copy answer, Close and Follow up (Cancel and Send while composing) in place of the focus labels and key-hint strip; an empty history is an `md` sheet (`zeta.btw.empty`)
271
+ - The `wait` tool's native job rows (`zeta.wait.job`) are a single `row`: badge, id and label, progress and clock, without the output preview or capture notice beneath
272
+ - The native bash run foot reads In background with a live clock (`zeta.run.time` without `stopped`) while a parked job's frames stream (`details.async.state === "running"`, partial), instead of Running
273
+ - Moved `wrapTextWithAnsi` export to `@linxiraos/pi-natives` package
274
+ - Default editor `newLine` binding now uses `shift+enter` only
275
+ - Hardware cursor is now disabled by default for better terminal compatibility. Set `PI_HARDWARE_CURSOR=1` to enable (replaces `PI_NO_HARDWARE_CURSOR=1` which disabled it).
276
+ - Migrated key parsing and matching logic to native implementation for improved performance
277
+ - Simplified `isKeyRelease()` and `isKeyRepeat()` to use regex pattern matching instead of string inclusion checks
278
+ - Refactored `visibleWidth` function to use caching wrapper around new `visibleWidthRaw` implementation for improved performance
279
+ - Improved performance of key ID parsing with optimized cache lookup strategy
280
+ - Simplified `visibleWidth` calculation to use consistent Bun.stringWidth approach for all string lengths
281
+ - Replaced external `fd` binary with native fuzzy path search for `@`-prefixed autocomplete
282
+ - Restructured terminal capabilities from interface-based to class-based model
283
+ - Improved table column width calculation with word-aware wrapping
284
+ - Refactored text utilities to use native WASM implementations for strings >256 chars with JS fast path
285
+ - Added Ctrl+Backspace as a delete-word-backward keybinding and improved modified backspace matching
286
+ - Migrated file system operations from synchronous to asynchronous APIs in autocomplete provider for non-blocking I/O
287
+ - Migrated node module imports from named to namespace imports across all packages for consistency with project guidelines
288
+ - Normalized keybinding definitions to lowercase internally
289
+ - Improved fuzzy matching to handle alphanumeric swaps.
290
+ - Normalized keybinding definitions to lowercase internally.
291
+ - Changed `showOverlay()` to return `OverlayHandle` for controlling overlay visibility
292
+ - Removed `widthPercent`, `maxHeightPercent`, `rowPercent`, `colPercent` from `OverlayOptions` (use percentage strings instead)
293
+ - Improved file autocomplete to show directory listing when typing `@` with no query, and fall back to prefix matching when fuzzy search returns no results
294
+ - Terminal startup now queries Kitty protocol support before enabling event reporting
295
+ - Changed cursor style from block to thin blinking bar (▏) at end of line
296
+ - Editor component now uses word wrapping instead of character-level wrapping for better readability ([#382](https://github.com/badlogic/pi-mono/pull/382) by [@nickseelert](https://github.com/nickseelert))
297
+ - Renamed `EllipsisKind` enum to `Ellipsis` for clearer API naming
298
+ - Changed hardcoded ellipsis character from theme-configurable to literal "…" in editor truncation
299
+ - Improved blockquote rendering with text wrapping in Markdown component
300
+ - Expanded Kitty keyboard protocol coverage for non-Latin layouts and legacy Alt sequences
301
+ - Improved cursor positioning with safer bounds checking
302
+ - Updated editor layout to respect configurable padding
303
+ - Refactored scrolling logic for better viewport management
304
+ - Key detection refactored: consolidated `is*()` functions into generic `matchesKey(data, keyId)` function that accepts key identifiers like `"ctrl+c"`, `"shift+enter"`, `"alt+left"`, etc.
305
+
306
+ ### Fixed
307
+
308
+ - Fixed width overflow protection in overlay compositing to prevent TUI crashes
309
+ - Key presses no longer dropped when batched with other events over SSH
310
+ - Fixed `fd` tool detection to automatically find `fd` or `fdfind` in PATH when not explicitly configured
311
+ - Fixed editor multi-line insertion handling and lastAction tracking ([#945](https://github.com/badlogic/pi-mono/pull/945) by [@Perlence](https://github.com/Perlence))
312
+ - Fixed editor word wrapping to reserve a cursor column ([#934](https://github.com/badlogic/pi-mono/pull/934) by [@Perlence](https://github.com/Perlence))
313
+ - Fixed editor word wrapping to use single-pass backtracking for whitespace handling ([#924](https://github.com/badlogic/pi-mono/pull/924) by [@Perlence](https://github.com/Perlence))
314
+ - Fixed Kitty image ID allocation and cleanup to prevent image ID collisions between modules
315
+ - Fixed viewport tracking and cursor positioning for overlays and content shrink scenarios
316
+ - Autocomplete now allows searches with `/` characters (e.g., `folder1/folder2`) ([#882](https://github.com/badlogic/pi-mono/pull/882) by [@richardgill](https://github.com/richardgill))
317
+ - Directory completions for `@` file attachments no longer add trailing space, allowing continued autocomplete into subdirectories
318
+ - `visibleWidth()` and `extractAnsiCode()` now handle APC escape sequences (`ESC _ ... BEL`), fixing width calculation and string slicing for strings containing cursor markers
319
+ - SelectList now handles multi-line descriptions by replacing newlines with spaces ([#728](https://github.com/badlogic/pi-mono/pull/728) by [@richardgill](https://github.com/richardgill))
320
+ - Reset ANSI styles after each rendered line to prevent style leakage
321
+ - Cursor position tracking when content shrinks with unchanged remaining lines
322
+ - TUI renders with wrong dimensions after suspend/resume if terminal was resized while suspended ([#599](https://github.com/badlogic/pi-mono/issues/599))
323
+ - Pasted content containing Kitty key release patterns (e.g., `:3F` in MAC addresses) was incorrectly filtered out ([#623](https://github.com/badlogic/pi-mono/pull/623) by [@ogulcancelik](https://github.com/ogulcancelik))
324
+ - `visibleWidth()` now strips OSC 8 hyperlink sequences, fixing text wrapping for clickable links ([#396](https://github.com/badlogic/pi-mono/pull/396) by [@Cursivez](https://github.com/Cursivez))
325
+
326
+ Older entries are archived in [packages/tui/CHANGELOG.md@9caccab691ce](https://github.com/can1357/oh-my-pi/blob/9caccab691ce575007f4b6bcbaf8f944723d5457/packages/tui/CHANGELOG.md).
327
+ Older entries are archived in [packages/tui/CHANGELOG.md@58141d4e5fa8](https://github.com/can1357/oh-my-pi/blob/58141d4e5fa892166024e2168866c45e0baacde3/packages/tui/CHANGELOG.md).
328
+ - Corrected editor end-of-line cursor rendering assertion to use includes() instead of endsWith()
329
+ - Fixed potential errors during emergency terminal restore when terminal is already dead
330
+ - Fixed autocomplete race condition by tracking request ID to prevent stale suggestion results
331
+ - Added legacy terminal support for `Ctrl+` symbol key combinations
332
+ - Added legacy terminal support for `Ctrl+` symbol key combinations.
333
+ - Fixed backspace handling with additional codepoint support
334
+ - Fixed Alt+letter key combinations for better recognition
335
+ - TUI now filters out key release events by default, preventing double-processing of keys
336
+ - `matchesKey()` now correctly matches Kitty protocol sequences for unmodified letter keys
337
+ - Crash when pasting text with trailing whitespace exceeding terminal width through Markdown rendering
338
+ - Slash command menu now only triggers when the editor input is otherwise empty ([#904](https://github.com/badlogic/pi-mono/issues/904))
339
+ - Center-anchored overlays now stay vertically centered when resizing the terminal taller after a shrink ([#950](https://github.com/badlogic/pi-mono/pull/950) by [@nicobailon](https://github.com/nicobailon))
340
+ - Shift+Space, Shift+Backspace, and Shift+Delete now work correctly in Kitty-protocol terminals (Kitty, WezTerm, etc.) instead of being silently ignored ([#411](https://github.com/badlogic/pi-mono/pull/411) by [@nathyong](https://github.com/nathyong))
341
+ - Improved Kitty terminal key sequence parsing to correctly handle text field codepoints in CSI-u sequences
342
+ - Fixed handling of private use Unicode codepoints (U+E000 to U+F8FF) in Kitty key decoding to prevent invalid character interpretation
343
+ - Simplified terminal write error handling to mark terminal as dead on any write failure
344
+ - Fixed multi-line strings in renderOutputBlock causing width overflow
345
+ - Fixed slash command autocomplete applying stale completion when typing quickly
346
+ - Reserved cursor space for zero padding and corrected end-of-line cursor rendering to prevent wrap glitches
347
+ - Fixed viewport tracking after partial renders to prevent autocomplete list artifacts
348
+ - Rendering optimizations: only re-render changed lines
349
+ - Refactor input component to use keybindings manager
350
+ - Fixed editor cursor blinking by allowing terminal cursor positioning when enabled.
351
+ - Editor no longer corrupts terminal display when text exceeds screen height. Content now scrolls vertically with indicators showing lines above/below the viewport. Max height is 30% of terminal (minimum 5 lines). ([#732](https://github.com/badlogic/pi-mono/issues/732))
352
+ - Cursor now moves to end of content on exit, preventing status line from being overwritten ([#629](https://github.com/badlogic/pi-mono/pull/629) by [@tallshort](https://github.com/tallshort))
353
+ - Slash command autocomplete now triggers for commands starting with `.`, `-`, or `_` (e.g., `/.land`, `/-foo`) ([#422](https://github.com/badlogic/pi-mono/issues/422))
354
+
355
+ ### Removed
356
+
357
+ - 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.
358
+ - Removed `ellipsis` property from `SymbolTheme` interface
359
+ - Removed `extractAnsiCode` function from public API
360
+ - Removed TUI layout engine exports from public API (BoxNode, ColumnNode, LayoutNode, etc.)
361
+ - Removed `visibleWidth` benchmark file in favor of Kitty sequence benchmarking
362
+ - Removed `truncateToWidth`, `sliceWithWidth`, and `extractSegments` functions from public API (now re-exported directly from @linxiraos/pi-natives)
363
+
356
364
  ## [1.4.0] - 2026-10-21
357
365
 
358
366
  - 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
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@linxiraos/pi-tui",
4
- "version": "1.4.1",
4
+ "version": "1.4.3",
5
5
  "description": "Terminal User Interface library with differential rendering for efficient text-based applications",
6
6
  "homepage": "https://linxira-os.github.io/zeta/",
7
7
  "author": "Linxira-OS",
@@ -38,14 +38,14 @@
38
38
  "gen:glyphs": "bun scripts/gen-glyphs.ts"
39
39
  },
40
40
  "dependencies": {
41
- "@linxiraos/pi-omptype": "1.4.1",
42
- "@linxiraos/pi-agent-core": "1.4.1",
43
- "@linxiraos/pi-ai": "1.4.1",
44
- "@linxiraos/pi-catalog": "1.4.1",
45
- "@linxiraos/pi-natives": "1.4.1",
46
- "@linxiraos/pi-utils": "1.4.1",
47
- "@linxiraos/pi-wire": "1.4.1",
48
- "@linxiraos/pi-snapcompact": "1.4.1"
41
+ "@linxiraos/pi-omptype": "1.4.3",
42
+ "@linxiraos/pi-agent-core": "1.4.3",
43
+ "@linxiraos/pi-ai": "1.4.3",
44
+ "@linxiraos/pi-catalog": "1.4.3",
45
+ "@linxiraos/pi-natives": "1.4.3",
46
+ "@linxiraos/pi-utils": "1.4.3",
47
+ "@linxiraos/pi-wire": "1.4.3",
48
+ "@linxiraos/pi-snapcompact": "1.4.3"
49
49
  },
50
50
  "devDependencies": {
51
51
  "kitty-vt-wasm": "^0.2.0"