@gajae-code/tui 0.1.1
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 +818 -0
- package/README.md +704 -0
- package/dist/types/autocomplete.d.ts +76 -0
- package/dist/types/bracketed-paste.d.ts +26 -0
- package/dist/types/components/box.d.ts +15 -0
- package/dist/types/components/cancellable-loader.d.ts +21 -0
- package/dist/types/components/editor.d.ts +101 -0
- package/dist/types/components/image.d.ts +16 -0
- package/dist/types/components/input.d.ts +16 -0
- package/dist/types/components/loader.d.ts +13 -0
- package/dist/types/components/markdown.d.ts +61 -0
- package/dist/types/components/select-list.d.ts +46 -0
- package/dist/types/components/settings-list.d.ts +39 -0
- package/dist/types/components/spacer.d.ts +11 -0
- package/dist/types/components/tab-bar.d.ts +56 -0
- package/dist/types/components/text.d.ts +13 -0
- package/dist/types/components/truncated-text.d.ts +10 -0
- package/dist/types/editor-component.d.ts +36 -0
- package/dist/types/fuzzy.d.ts +15 -0
- package/dist/types/index.d.ts +25 -0
- package/dist/types/keybindings.d.ts +189 -0
- package/dist/types/keys.d.ts +208 -0
- package/dist/types/kill-ring.d.ts +27 -0
- package/dist/types/stdin-buffer.d.ts +43 -0
- package/dist/types/symbols.d.ts +23 -0
- package/dist/types/terminal-capabilities.d.ts +75 -0
- package/dist/types/terminal.d.ts +61 -0
- package/dist/types/ttyid.d.ts +9 -0
- package/dist/types/tui.d.ts +161 -0
- package/dist/types/utils.d.ts +74 -0
- package/package.json +73 -0
- package/src/autocomplete.ts +836 -0
- package/src/bracketed-paste.ts +47 -0
- package/src/components/box.ts +144 -0
- package/src/components/cancellable-loader.ts +40 -0
- package/src/components/editor.ts +2664 -0
- package/src/components/image.ts +90 -0
- package/src/components/input.ts +465 -0
- package/src/components/loader.ts +86 -0
- package/src/components/markdown.ts +1009 -0
- package/src/components/select-list.ts +249 -0
- package/src/components/settings-list.ts +211 -0
- package/src/components/spacer.ts +28 -0
- package/src/components/tab-bar.ts +175 -0
- package/src/components/text.ts +110 -0
- package/src/components/truncated-text.ts +61 -0
- package/src/editor-component.ts +71 -0
- package/src/fuzzy.ts +143 -0
- package/src/index.ts +39 -0
- package/src/keybindings.ts +279 -0
- package/src/keys.ts +537 -0
- package/src/kill-ring.ts +46 -0
- package/src/stdin-buffer.ts +410 -0
- package/src/symbols.ts +24 -0
- package/src/terminal-capabilities.ts +537 -0
- package/src/terminal.ts +716 -0
- package/src/ttyid.ts +66 -0
- package/src/tui.ts +1481 -0
- package/src/utils.ts +359 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,818 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [Unreleased]
|
|
4
|
+
|
|
5
|
+
## [15.3.2] - 2026-05-25
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Fixed `matchesKey(data, "ctrl+m")` (and the other named-key collisions: `ctrl+h`/`ctrl+i`/`ctrl+j`/`ctrl+[`) returning true for the bare `\r`/`\x08`/`\t`/`\n`/`\x1b` byte terminals send for Enter/Backspace/Tab/Escape in legacy mode. Binding a command to `Ctrl+M` no longer fires when the user presses Enter — the named key wins, and `ctrl+<colliding-letter>` matches only when the terminal disambiguates via the Kitty keyboard protocol or `modifyOtherKeys`. ([#1354](https://github.com/can1357/gajae-code/issues/1354))
|
|
10
|
+
|
|
11
|
+
## [15.2.3] - 2026-05-22
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Added `SettingsList#setItems` to replace the entire settings list with a new items array while automatically clamping selection to a valid index
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- Updated `Loader` to drive renders at ~60fps (16ms tick) while keeping spinner-frame advancement at 80ms so shimmer/animated message colorizers update smoothly without altering spinner cadence
|
|
19
|
+
|
|
20
|
+
## [15.1.9] - 2026-05-21
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
|
|
24
|
+
- Fixed terminal probe responses (DA1, kitty keyboard, Mode 2031) leaking into the prompt as keystrokes when the response is split across stdin reads. `ProcessTerminal` now reassembles `\x1b[?<digits>...` private CSI fragments and dispatches the complete response through the existing pattern handlers. ([#1238](https://github.com/can1357/gajae-code/issues/1238))
|
|
25
|
+
|
|
26
|
+
## [15.1.4] - 2026-05-19
|
|
27
|
+
|
|
28
|
+
### Fixed
|
|
29
|
+
|
|
30
|
+
- Fixed `renderInlineMarkdown` crashing with `TypeError: undefined is not an object (evaluating 'e.replace')` when called with a non-string value during streaming — partial JSON parsing leaves option label fields temporarily unpopulated, causing the ask tool renderer to fail. ([#1176](https://github.com/can1357/gajae-code/issues/1176))
|
|
31
|
+
|
|
32
|
+
## [15.0.2] - 2026-05-15
|
|
33
|
+
|
|
34
|
+
### Added
|
|
35
|
+
|
|
36
|
+
- Restored the `Key` runtime helper on `@gajae-code/tui` to mirror upstream `@mariozechner/pi-tui`'s surface. `Key.enter`, `Key.escape`, `Key.tab`, … return the canonical key-name strings; modifier methods (`Key.ctrl(k)`, `Key.shift(k)`, `Key.ctrlShift(k)`, etc.) build precisely-typed `KeyId` literals like `"ctrl+c"`. Pure runtime convenience for typed key-id construction — plugins built against the upstream package surface that import `Key` (e.g. `@plannotator/pi-extension`, `@juicesharp/rpiv-ask-user-question`) load again now that the specifier shim remaps them onto this package.
|
|
37
|
+
|
|
38
|
+
## [15.0.1] - 2026-05-14
|
|
39
|
+
### Breaking Changes
|
|
40
|
+
|
|
41
|
+
- Increased the minimum required Bun version for the TUI package from >=1.3.7 to >=1.3.14
|
|
42
|
+
- Fixed `TerminalInfo.sendNotification` not delivering desktop notifications on macOS. macOS requires per-app notification permission, which terminal emulators (kitty, ghostty, alacritty, …) almost never have, so OSC 9/99 sequences were silently dropped at the OS layer. `sendNotification` now shells out to `alerter` or `terminal-notifier` when either is on `$PATH` (both register their own LSApplication and ship a "Terminal" / `>_` icon). When neither is installed the dispatch is a deliberate no-op + a single `logger.warn` line on the first miss (subsequent dispatches stay silent) so the user can spot the missing binary in `~/.gjc/logs/gjc.YYYY-MM-DD.log` and `brew install alerter`. Linux/Windows still go through the OSC/Bell path.
|
|
43
|
+
- Fixed `TerminalInfo.formatNotification` losing OSC 9/99 desktop notifications when running inside tmux. The OSC sequence is now wrapped in tmux's DCS passthrough envelope (`\ePtmux;…\e\\` with embedded ESC bytes doubled) when `TMUX` is set, so notifications reach the parent terminal. `set -g allow-passthrough on` is still required on the tmux side for the wrapped sequence to be forwarded. Bell-only terminals are unchanged.
|
|
44
|
+
- Fixed alerter desktop notifications staying on screen indefinitely. `scripts/mac-alerter.sh` previously passed `--timeout 30` (which makes alerter call `removeDeliveredNotification` after 30 s, also purging the Notification Center entry) and forced Alert-style via `--actions "Open"` (persistent until user click). It now ships Banner-style argv (no `--actions`, no `--timeout`): macOS auto-dismisses the toast after ~10 s and archives the entry to Notification Center for later review. Click-to-focus is preserved through `@CONTENTCLICKED` body clicks. NC archival also requires "Show in Notification Center" enabled for Terminal under macOS System Settings → Notifications.
|
|
45
|
+
- Fixed `composeNotificationSubtitle` showing a stale tmux `pane_title` (typically `π: kitty & tmux` or the cwd prefix written before auto-naming runs) instead of the live GJC session name. The GJC-supplied `fallback` is now consulted first for the pane component; the cached tmux pane title is only used when no session name is available. Window name handling is unchanged.
|
|
46
|
+
- Fixed `sendDesktopNotification` always routing through `alerter` / `terminal-notifier` on darwin, even for terminals (ghostty / iTerm2 / wezterm) that surface OSC 9 / OSC 99 as native notifications through their own bundle. The dispatch now prefers the OSC path on darwin when the terminal advertises native macOS notification capability; the fallback only kicks in for kitty / alacritty / vscode / unknown shells whose host app isn't a notification-capable bundle. This unblocks the user-controlled per-app notification settings flow for ghostty / iTerm2 / wezterm — toast style, NC archival, and click-to-focus all attach to the terminal app's own System Settings entry rather than to `com.apple.Terminal` (which `alerter` would post under).
|
|
47
|
+
- Fixed Korean IME composition leaving a growing horizontal gap between typed jamo and the cursor inside the GJC prompt under tmux + ghostty (and other macOS terminals). `Bun.stringWidth` and the underlying UAX#11 East Asian Width tables classify Hangul Compatibility Jamo (U+3131..U+318E — ㄱ ㄴ ㄷ ㄹ ㅁ ㅂ ㅅ ㅇ ㅈ ㅊ ㅋ ㅌ ㅍ ㅎ + filler) as Wide (2 cells), but every macOS terminal we ship to (Ghostty / Terminal.app / iTerm2) actually renders them as a single cell in monospace fonts. `#extractCursorPosition` was computing `col = visibleWidth(beforeMarker)` and feeding the doubled value to `\x1b[(col+1)G`, placing the hardware cursor (and therefore the IME candidate window) `N_jamo` cells past the visible glyph — exactly the gap the user saw growing as they typed. `visibleWidthRaw` now subtracts 1 cell for each Compatibility Jamo character, returning the column count macOS terminals actually use. Hangul Syllables (U+AC00..U+D7A3, e.g. `안`) stay at 2 cells in both Bun and the terminal — unaffected. Other CJK widths (Chinese / Japanese / Halfwidth Hangul) are unchanged. NOTE: the Rust `pi-natives` width tables (used by `sliceWithWidth` / `truncateToWidth` / `wrapTextWithAnsi`) also count Compatibility Jamo as 2 cells; truncation and word-wrap on jamo-heavy lines will still be slightly aggressive. The defect is invisible in normal use because the AI composes Korean as syllables, not jamo, and users type syllables once IME composition completes. A follow-up will reconcile the Rust side.
|
|
48
|
+
- Fixed a brief black-flash flicker in the TUI when streaming long markdown responses inside tmux (especially noticeable in ghostty with multiple panes open). Root cause: when a markdown fence line above the viewport changed between two streaming tokens (e.g. `` ``` `` → `` ```python ``), `#doRender()` would take the `firstChanged < prevViewportTop` branch and emit `\x1b[2J\x1b[H` (full screen clear + cursor home) wrapped in BSU. The BSU envelope can split across PTY reads, leaving tmux briefly displaying a blank pane before the rest of the buffer arrives — multiplied across panes during repaint. The viewport-above branch now calls a new `viewportRefresh()` helper that does cursor-home + per-line `\x1b[2K` + line content (no `\x1b[2J`), so the visible viewport content is repainted without ever clearing the screen. Scrollback above the viewport may briefly show stale rendering, but only of the SAME lines that just changed — invisible during streaming when the user isn't scrolled up. Other full-redraw paths (resize, first render, etc.) keep the hard `fullRender(true)` behavior unchanged.
|
|
49
|
+
|
|
50
|
+
### Tests
|
|
51
|
+
|
|
52
|
+
- Added `test/no-2k-anywhere.test.ts` — lint guard that scans `packages/tui/src/` for `\x1b[2K` string literals outside comments. The earlier streaming-flicker fix re-introduced the BSU-split flash bug by moving `\x1b[2K`-before-content from `fullRender` to `viewportRefresh` (same anti-pattern in a new location). This test catches that class of regression at CI time so future changes can't silently revive it.
|
|
53
|
+
- Added `test/render-emit-snapshot.test.ts` — four scenario-based byte-snapshot guards (single-line mutation, streaming append, above-viewport mutation triggering `viewportRefresh`, trailing-line clear on shrink). Asserts structural invariants on the EMITTED BYTES from `terminal.write(…)`: no `\x1b[2K`, no `\x1b[2J`, the new content appears, the BSU close `\x1b[?2026l` is present. Catches render-path changes that achieve the right final viewport state via a transient blank frame (which is exactly how the typing-flicker bug slipped past `render-regressions.test.ts`).
|
|
54
|
+
- Added `test/ime-jamo-cursor.test.ts` — six cases asserting the Input component's hardware cursor marker column does not grow at 2× per typed Korean compatibility jamo. Before commit `79e3170c6` typing 14 jamo produced a 14-cell gap between the visible text and the IME candidate window; the test caps the cursor column at `PRGJCT_WIDTH + N_jamo` and asserts the per-keystroke delta is at most 1. NOTE: the Rust `pi-natives` `sliceWithWidth` still treats jamo as 2 cells (binary package, follow-up); the test guard accepts a small residual offset but flags the doubling regression.
|
|
55
|
+
|
|
56
|
+
## [14.9.8] - 2026-05-12
|
|
57
|
+
|
|
58
|
+
### Added
|
|
59
|
+
|
|
60
|
+
- Added `Terminal.setProgress(active)` to emit OSC 9;4 progress sequences with a ~1s keepalive interval so Ghostty does not clear the indicator during long-running work (ports pi-mono `a900d251` + `76bc605a`)
|
|
61
|
+
- Added optional `argumentHint?: string` to `SlashCommand`; rendered before the description in the autocomplete dropdown (ports pi-mono `aa25726e`)
|
|
62
|
+
- Added `VirtualTerminal.waitForRender()` test helper for the throttled render pipeline (ports pi-mono `41377ee8`)
|
|
63
|
+
|
|
64
|
+
### Changed
|
|
65
|
+
|
|
66
|
+
- `ProcessTerminal` `columns`/`rows` getters consult `Bun.env.COLUMNS` / `Bun.env.LINES` before falling back to 80×24, so piped/non-TTY runs honour environment-provided dimensions (ports pi-mono `32f7fc6a`)
|
|
67
|
+
- `requestRender()` non-force calls are coalesced to a ~16ms frame budget; `requestRender(true)` still flushes immediately via `process.nextTick` (ports pi-mono `6f5f37f8`)
|
|
68
|
+
- `KNOWN_TERMINALS.base` / `KNOWN_TERMINALS.trueColor` default `hyperlinks: false`; tmux and screen (`TMUX` env or `TERM` starts with `tmux`/`screen`) force `hyperlinks: false` even when the outer terminal would advertise OSC 8 (adapts pi-mono `30a8a41f`)
|
|
69
|
+
- `SlashCommand.getArgumentCompletions()` may return a `Promise`; results are now awaited and non-array returns are ignored (ports pi-mono `a1e10789`)
|
|
70
|
+
- Fuzzy `@` autocomplete now follows symlinked directories via `ScanOptions.follow_links` plumbed through the native walker (ports pi-mono `780d5367`)
|
|
71
|
+
- Plain `@<query>` (no slash) fuzzy matches by basename only, so `@plan` no longer surfaces every file whose ancestor directories contain `plan` (ports pi-mono `968430f6`)
|
|
72
|
+
|
|
73
|
+
### Fixed
|
|
74
|
+
|
|
75
|
+
- Fixed editor corruption on Thai Sara Am (U+0E33) and Lao AM (U+0EB3) vowels by normalizing to their compatibility decompositions on the terminal-write path while keeping editor content logically unchanged (ports pi-mono `bc668826` + `338ce3a3` + `20ca45d5`)
|
|
76
|
+
- Fixed cell-size detection (`CSI 6;h;w t` response) to consume only exact replies, so a bare `Escape` keystroke is no longer swallowed while waiting for terminal image metadata (ports pi-mono `49c0d860`)
|
|
77
|
+
- Fixed Kitty CSI-u printable input duplicating on layouts (e.g. Italian) where the terminal also emits the raw character: the immediately-following matching codepoint is now suppressed (ports pi-mono `bdb416cb`)
|
|
78
|
+
- Fixed bracketed-paste CSI-u `Ctrl+<letter>` re-encoding (tmux popup with `extended-keys-format=csi-u`) leaking literal `[<code>;5u` into the editor; control bytes are decoded back to their literal byte before per-char filtering (ports pi-mono `d06db09a`)
|
|
79
|
+
- Fixed xterm `modifyOtherKeys` shifted printable input so uppercase letters inserted via `CSI 27;mod;codepoint~` reach the editor correctly (ports pi-mono `6b55d685`)
|
|
80
|
+
- Fixed `super`-modified Kitty shortcuts (`super+k`, `ctrl+super+enter`, …) to parse and match via the new `KITTY_MOD_SUPER` mask (ports pi-mono `ddb8454c` + `5ed46003`)
|
|
81
|
+
- Fixed `ctrl+alt+<letter>` in tmux falling through to CSI-u / `modifyOtherKeys` when the legacy `ESC<ctrl-char>` form does not match (ports pi-mono `6cf5098f`)
|
|
82
|
+
- Fixed Markdown strikethrough requiring strict `~~text~~` delimiters with non-whitespace boundaries; single tildes no longer render strikethrough (ports pi-mono `db5274b4`)
|
|
83
|
+
|
|
84
|
+
- Allowed `SlashCommand.getArgumentCompletions` to return asynchronous results by accepting Promise-based completions
|
|
85
|
+
- Added `argumentHint` support to slash command definitions and displayed it in command suggestion descriptions
|
|
86
|
+
- Added support for xterm `modifyOtherKeys` printable key sequences by decoding `CSI 27;mod;key~` into text input
|
|
87
|
+
|
|
88
|
+
### Changed
|
|
89
|
+
|
|
90
|
+
- Changed slash-command autocomplete list rendering to combine command hint and description in a single displayed suggestion text
|
|
91
|
+
- Changed render scheduling to throttle `requestRender` calls to roughly 60fps by batching updates
|
|
92
|
+
- Changed terminal input handling to process complete cell-size responses without buffering partial input
|
|
93
|
+
- Changed `KeyId` to accept super-modifier combinations and improve typed key-id validation
|
|
94
|
+
|
|
95
|
+
### Fixed
|
|
96
|
+
|
|
97
|
+
- Normalized line output during rendering to correct Thai/Lao AM glyph composition for displayed text
|
|
98
|
+
- Fixed duplicated Kitty key input emissions by dropping the matching unmodified follow-up sequence after a Kitty CSI-u printable-key event
|
|
99
|
+
|
|
100
|
+
## [14.9.5] - 2026-05-12
|
|
101
|
+
### Fixed
|
|
102
|
+
|
|
103
|
+
- Fixed rapidly blinking cursor artifact during task execution by consolidating cursor control sequences into the synchronized output buffer ([#992](https://github.com/can1357/gajae-code/issues/992))
|
|
104
|
+
|
|
105
|
+
## [14.5.7] - 2026-04-29
|
|
106
|
+
|
|
107
|
+
### Fixed
|
|
108
|
+
|
|
109
|
+
- Fixed editor Ctrl+Enter handling to recognize NumLock and keypad Enter variants.
|
|
110
|
+
|
|
111
|
+
## [14.3.0] - 2026-04-25
|
|
112
|
+
|
|
113
|
+
### Fixed
|
|
114
|
+
|
|
115
|
+
- Fixed shared Markdown Mermaid fenced-block rendering to resolve diagrams from fenced source text instead of external prerender state
|
|
116
|
+
|
|
117
|
+
## [14.1.1] - 2026-04-14
|
|
118
|
+
|
|
119
|
+
### Breaking Changes
|
|
120
|
+
|
|
121
|
+
- Removed the `searchDb` constructor argument from `CombinedAutocompleteProvider`, requiring callers to use the built-in search behavior
|
|
122
|
+
|
|
123
|
+
### Changed
|
|
124
|
+
|
|
125
|
+
- Changed truncation debug logging to run only when `debugRedraw` is enabled
|
|
126
|
+
|
|
127
|
+
### Fixed
|
|
128
|
+
|
|
129
|
+
- Fixed viewport jumping during streaming and session swap by tracking actual content height instead of high-water mark
|
|
130
|
+
|
|
131
|
+
## [14.0.5] - 2026-04-11
|
|
132
|
+
|
|
133
|
+
### Changed
|
|
134
|
+
|
|
135
|
+
- Updated hash computation to use `Bun.hash()` instead of `Bun.hash.xxHash64()`, which may return `number` in addition to `bigint`
|
|
136
|
+
- Simplified cache key computation in Box component by removing intermediate hash updates and consolidating hash operations
|
|
137
|
+
- Wrapped native text utility functions (`sliceWithWidth`, `truncateToWidth`, `wrapTextWithAnsi`, `extractSegments`) to automatically pass the current default tab width, simplifying the API for consumers
|
|
138
|
+
- Added `getIndentationNoescape` wrapper that uses `process.cwd()` as the project root for relative file paths
|
|
139
|
+
- Re-export `getDefaultTabWidth`, `getIndentation`, and `setDefaultTabWidth` from `@gajae-code/utils`; native text helpers still receive tab width via wrappers that read the JS default
|
|
140
|
+
|
|
141
|
+
## [13.16.1] - 2026-03-27
|
|
142
|
+
|
|
143
|
+
### Added
|
|
144
|
+
|
|
145
|
+
- Support for optional SearchDb parameter in CombinedAutocompleteProvider constructor for improved fuzzy search performance
|
|
146
|
+
- Fuzzy matching filter for autocomplete suggestions to improve relevance of results
|
|
147
|
+
|
|
148
|
+
### Changed
|
|
149
|
+
|
|
150
|
+
- Fuzzy discovery now applies fuzzy matching filter to results for improved relevance of autocomplete suggestions
|
|
151
|
+
- Autocomplete fuzzy discovery now accepts optional SearchDb instance for faster searches
|
|
152
|
+
|
|
153
|
+
## [13.16.0] - 2026-03-27
|
|
154
|
+
### Changed
|
|
155
|
+
|
|
156
|
+
- Updated tab replacement in editor text sanitization to respect configured tab width setting
|
|
157
|
+
|
|
158
|
+
## [13.15.0] - 2026-03-23
|
|
159
|
+
|
|
160
|
+
### Added
|
|
161
|
+
|
|
162
|
+
- Added `renderInlineMarkdown()` function to render inline markdown (bold, italic, code, links, strikethrough) to styled strings
|
|
163
|
+
|
|
164
|
+
### Fixed
|
|
165
|
+
|
|
166
|
+
- Fixed editor consuming user-rebound copy keys, preventing custom keybindings from working in the editor
|
|
167
|
+
|
|
168
|
+
## [13.14.1] - 2026-03-21
|
|
169
|
+
### Added
|
|
170
|
+
|
|
171
|
+
- Added Ctrl+_ as an additional default shortcut for undo
|
|
172
|
+
|
|
173
|
+
### Fixed
|
|
174
|
+
|
|
175
|
+
- Ensured undo functionality respects user-configured keybindings
|
|
176
|
+
|
|
177
|
+
## [13.12.0] - 2026-03-14
|
|
178
|
+
|
|
179
|
+
### Added
|
|
180
|
+
|
|
181
|
+
- Added `moveToMessageStart()` and `moveToMessageEnd()` methods to move cursor to the beginning and end of the entire message
|
|
182
|
+
|
|
183
|
+
### Fixed
|
|
184
|
+
|
|
185
|
+
- Fixed autocomplete to preserve `./` prefix when completing relative file and directory paths
|
|
186
|
+
- Fixed paste marker expansion to handle special regex replacement tokens ($1, $2, $&, $$, $`, $') literally in pasted content
|
|
187
|
+
|
|
188
|
+
## [13.11.0] - 2026-03-12
|
|
189
|
+
### Fixed
|
|
190
|
+
|
|
191
|
+
- Fixed OSC 11 background color detection to correctly handle partial escape sequences that arrive mid-buffer, preventing user input from being swallowed
|
|
192
|
+
- Fixed race condition where overlapping OSC 11 queries would be incorrectly cancelled by DA1 sentinels from previous queries
|
|
193
|
+
|
|
194
|
+
## [13.7.5] - 2026-03-04
|
|
195
|
+
### Changed
|
|
196
|
+
|
|
197
|
+
- Extracted word navigation logic into reusable `moveWordLeft` and `moveWordRight` utility functions for consistent cursor movement across components
|
|
198
|
+
|
|
199
|
+
## [13.6.2] - 2026-03-03
|
|
200
|
+
### Fixed
|
|
201
|
+
|
|
202
|
+
- Fixed cursor positioning when content shrinks to empty without clearOnShrink enabled
|
|
203
|
+
|
|
204
|
+
## [13.5.4] - 2026-03-01
|
|
205
|
+
|
|
206
|
+
### Fixed
|
|
207
|
+
|
|
208
|
+
- Fixed viewport repaint scrollback accounting during resize oscillation to avoid double-scrolling on height shrink and added exact-row scrollback assertions in overlay regression coverage ([#228](https://github.com/can1357/gajae-code/issues/228), [#234](https://github.com/can1357/gajae-code/issues/234))
|
|
209
|
+
## [13.5.3] - 2026-03-01
|
|
210
|
+
|
|
211
|
+
### Fixed
|
|
212
|
+
|
|
213
|
+
- Fixed append rendering logic to correctly handle offscreen header changes during content overflow growth, preserving scroll history integrity
|
|
214
|
+
- Fixed visible tail line updates when appending new content during viewport overflow conditions
|
|
215
|
+
- Fixed cursor positioning instability when appending content under external cursor relocation by using absolute screen addressing instead of relative cursor movement
|
|
216
|
+
|
|
217
|
+
## [13.5.2] - 2026-03-01
|
|
218
|
+
### Breaking Changes
|
|
219
|
+
|
|
220
|
+
- Removed `getMermaidImage` callback from MarkdownTheme; replaced with `getMermaidAscii` that accepts ASCII string instead of image data
|
|
221
|
+
- Removed mermaid module exports (`renderMermaidToPng`, `extractMermaidBlocks`, `prerenderMermaidBlocks`, `MermaidImage` interface)
|
|
222
|
+
|
|
223
|
+
### Changed
|
|
224
|
+
|
|
225
|
+
- Mermaid diagrams now render as ASCII text instead of terminal graphics protocol images
|
|
226
|
+
|
|
227
|
+
## [13.5.1] - 2026-03-01
|
|
228
|
+
### Fixed
|
|
229
|
+
|
|
230
|
+
- Fixed viewport shift handling to prevent stale content when mixed updates remap screen rows
|
|
231
|
+
|
|
232
|
+
## [13.5.0] - 2026-03-01
|
|
233
|
+
|
|
234
|
+
### Breaking Changes
|
|
235
|
+
|
|
236
|
+
- Removed `PI_TUI_RESIZE_CLEAR_STRATEGY`; resize behavior is no longer configurable between viewport/scrollback modes. The renderer now uses fixed semantics: width changes perform a hard reset (`3J` + full content rewrite), while height changes and diff fallbacks use viewport-scoped repainting.
|
|
237
|
+
|
|
238
|
+
### Added
|
|
239
|
+
|
|
240
|
+
- Added a new terminal regression suite in `packages/tui/test/render-regressions.test.ts` covering no-op render stability, targeted middle-line diffs, shrink cleanup, width-resize truncation without ghost rows, shrink/grow viewport tail anchoring, scrollback deduplication across forced redraws, overlay restore behavior, and rapid mutation convergence.
|
|
241
|
+
- Expanded `packages/tui/test/overlay-scroll.test.ts` with stress coverage for overflow shrink/regrow cycles, resize oscillation, overlay toggle churn, no-op render loops, and hardware-cursor-only updates while bounding scrollback growth and blank-run artifacts.
|
|
242
|
+
|
|
243
|
+
### Changed
|
|
244
|
+
|
|
245
|
+
- Refactored render orchestration to explicit `hardReset` and `viewportRepaint` paths, with targeted fallbacks for offscreen diff ranges and unsafe row deltas.
|
|
246
|
+
- Switched startup to `requestRender(true)` so the first frame always initializes renderer state with a forced full path.
|
|
247
|
+
- Replaced legacy viewport bookkeeping (`previousViewportTop`) with `viewportTopRow` tracking and consistent screen-relative cursor calculations.
|
|
248
|
+
- Updated stop-sequence cursor placement to target the visible working area and clamp to terminal bounds before final newline emission.
|
|
249
|
+
- Documented the intentional performance policy of not forcing full repaint on every viewport-top shift, relying on narrower safety guards instead.
|
|
250
|
+
|
|
251
|
+
### Fixed
|
|
252
|
+
|
|
253
|
+
- Fixed stale/duplicated terminal cursor dedup state by synchronizing `#lastCursorSequence` in all render write paths (hard reset, viewport repaint, deleted-lines clear path, append fast path, and differential path).
|
|
254
|
+
- Fixed scroll overshoot on `stop()` when content fills the viewport by clamping target row movement to valid screen rows.
|
|
255
|
+
## [13.4.0] - 2026-03-01
|
|
256
|
+
|
|
257
|
+
### Added
|
|
258
|
+
|
|
259
|
+
- Added `PI_TUI_RESIZE_CLEAR_STRATEGY` environment variable to control terminal behavior on resize: `viewport` (default) clears/redraws the viewport while preserving scrollback, or `scrollback` clears all history
|
|
260
|
+
|
|
261
|
+
### Changed
|
|
262
|
+
|
|
263
|
+
- Changed resize redraw behavior to use configurable clear semantics (`viewport` vs `scrollback`) while keeping full content rendering for scrollback navigation
|
|
264
|
+
|
|
265
|
+
### Fixed
|
|
266
|
+
|
|
267
|
+
- Fixed loader component rendering lines wider than terminal width, preventing text overflow and display artifacts
|
|
268
|
+
|
|
269
|
+
## [13.3.11] - 2026-02-28
|
|
270
|
+
|
|
271
|
+
### Fixed
|
|
272
|
+
|
|
273
|
+
- Restored terminal image protocol override and fallback detection for image rendering, including `PI_FORCE_IMAGE_PROTOCOL` support and Kitty fallback for screen/tmux/ghostty-style TERM environments.
|
|
274
|
+
|
|
275
|
+
## [13.3.8] - 2026-02-28
|
|
276
|
+
### Breaking Changes
|
|
277
|
+
|
|
278
|
+
- Changed mermaid hash type from string to bigint in `getMermaidImage` callback and `extractMermaidBlocks` return type
|
|
279
|
+
- Removed `mime-types` and `@types/mime-types` from dependencies
|
|
280
|
+
- Removed `@xterm/xterm` from dependencies
|
|
281
|
+
|
|
282
|
+
### Changed
|
|
283
|
+
|
|
284
|
+
- Updated mermaid hash computation to use `Bun.hash.xxHash64()` instead of `Bun.hash().toString(16)`
|
|
285
|
+
|
|
286
|
+
## [12.19.0] - 2026-02-22
|
|
287
|
+
|
|
288
|
+
### Added
|
|
289
|
+
|
|
290
|
+
- Added `getTopBorderAvailableWidth()` method to calculate available width for top border content accounting for border characters and padding
|
|
291
|
+
|
|
292
|
+
### Fixed
|
|
293
|
+
|
|
294
|
+
- Fixed stale viewport rows appearing when terminal height increases by triggering full re-render on height changes
|
|
295
|
+
|
|
296
|
+
## [12.18.0] - 2026-02-21
|
|
297
|
+
### Fixed
|
|
298
|
+
|
|
299
|
+
- Fixed viewport synchronization issue by clearing scrollback when terminal state becomes desynced during full re-renders
|
|
300
|
+
|
|
301
|
+
## [12.12.2] - 2026-02-19
|
|
302
|
+
|
|
303
|
+
### Fixed
|
|
304
|
+
|
|
305
|
+
- Fixed non-forced full re-renders clearing terminal scrollback history during streaming updates by limiting scrollback clears to explicit forced re-renders.
|
|
306
|
+
|
|
307
|
+
## [12.12.0] - 2026-02-19
|
|
308
|
+
|
|
309
|
+
### Added
|
|
310
|
+
|
|
311
|
+
- Added PageUp/PageDown navigation for editor content and autocomplete selection to jump across long wrapped inputs faster.
|
|
312
|
+
|
|
313
|
+
### Fixed
|
|
314
|
+
|
|
315
|
+
- Fixed history-entry navigation anchoring (Up opens at top, Down opens at bottom) and preserved editor scroll context when max-height changes to keep cursor movement visible in long prompts ([#99](https://github.com/can1357/gajae-code/issues/99)).
|
|
316
|
+
|
|
317
|
+
## [12.11.3] - 2026-02-19
|
|
318
|
+
|
|
319
|
+
### Fixed
|
|
320
|
+
|
|
321
|
+
- Fixed differential deleted-line rendering when content shrinks to empty so stale first-row content is cleared reliably.
|
|
322
|
+
- Fixed incremental stale-row clearing to use erase-below semantics in synchronized output, reducing leftover-line artifacts after shrink operations.
|
|
323
|
+
|
|
324
|
+
## [12.9.0] - 2026-02-17
|
|
325
|
+
### Added
|
|
326
|
+
|
|
327
|
+
- Exported `getTerminalId()` function to get a stable identifier for the current terminal, with support for TTY device paths and terminal multiplexers
|
|
328
|
+
- Exported `getTtyPath()` function to resolve the TTY device path for stdin via POSIX `ttyname(3)`
|
|
329
|
+
|
|
330
|
+
## [12.5.0] - 2026-02-15
|
|
331
|
+
### Added
|
|
332
|
+
|
|
333
|
+
- Added `cursorOverride` and `cursorOverrideWidth` properties to customize the end-of-text cursor glyph with ANSI-styled strings
|
|
334
|
+
- Added `getUseTerminalCursor()` method to query the terminal cursor mode setting
|
|
335
|
+
|
|
336
|
+
## [11.10.0] - 2026-02-10
|
|
337
|
+
### Added
|
|
338
|
+
|
|
339
|
+
- Added `hint` property to autocomplete items to display dim ghost text after cursor when item is selected
|
|
340
|
+
- Added `getInlineHint()` method to `SlashCommand` interface for providing inline hint text based on argument state
|
|
341
|
+
- Added `getInlineHint()` method to `AutocompleteProvider` interface for displaying dim ghost text after cursor
|
|
342
|
+
- Added `hintStyle` theme option to customize styling of inline hint/ghost text in editor
|
|
343
|
+
|
|
344
|
+
### Changed
|
|
345
|
+
|
|
346
|
+
- Updated editor to render inline hint text as dim ghost text after cursor when autocomplete suggestions are active or provider supplies hints
|
|
347
|
+
|
|
348
|
+
## [11.8.0] - 2026-02-10
|
|
349
|
+
### Added
|
|
350
|
+
|
|
351
|
+
- Added Alt+Y keybinding to cycle through kill ring entries (yank-pop)
|
|
352
|
+
- Added undo support to Input component with Ctrl+Z keybinding
|
|
353
|
+
- Added kill ring support to Input component for Emacs-style kill/yank operations
|
|
354
|
+
- Added yank (Ctrl+Y) and yank-pop (Alt+Y) support to Input component
|
|
355
|
+
|
|
356
|
+
### Changed
|
|
357
|
+
|
|
358
|
+
- Changed Editor kill ring implementation to use dedicated KillRing class for better state management
|
|
359
|
+
- Changed Editor undo stack to use generic UndoStack class with automatic state cloning
|
|
360
|
+
- Changed kill/yank behavior to properly accumulate consecutive kill operations
|
|
361
|
+
- Changed Input component deletion methods to record killed text in kill ring
|
|
362
|
+
- Changed undo coalescing in Input component to group consecutive word typing into single undo units
|
|
363
|
+
|
|
364
|
+
## [11.4.1] - 2026-02-06
|
|
365
|
+
### Fixed
|
|
366
|
+
|
|
367
|
+
- Fixed terminal scrolling when displaying overlays after rendering large content, preventing hundreds of blank lines from being output
|
|
368
|
+
|
|
369
|
+
## [11.3.0] - 2026-02-06
|
|
370
|
+
|
|
371
|
+
### Breaking Changes
|
|
372
|
+
|
|
373
|
+
- Removed `getCursorPosition()` method from Component interface and implementations, eliminating hardware cursor positioning support
|
|
374
|
+
|
|
375
|
+
### Added
|
|
376
|
+
|
|
377
|
+
- Added sticky column behavior for vertical cursor movement, preserving target column when navigating through lines of varying lengths
|
|
378
|
+
- Added `drainInput()` method to Terminal interface to prevent Kitty key release events from leaking to parent shell over slow SSH connections
|
|
379
|
+
- Added `setClearOnShrink()` method to control whether full re-render occurs when content shrinks below working area
|
|
380
|
+
- Added support for hidden paths (e.g., `.pi`, `.github`) in autocomplete while excluding `.git` directories
|
|
381
|
+
|
|
382
|
+
### Changed
|
|
383
|
+
|
|
384
|
+
- Changed default value of `PI_HARDWARE_CURSOR` environment variable from implicit true to explicit `"1"` for clarity
|
|
385
|
+
- Changed default value of `PI_CLEAR_ON_SHRINK` environment variable from implicit false to explicit `"0"` for clarity
|
|
386
|
+
- Changed TUI to clear screen on startup to prevent shell prompts and status messages from bleeding into the first rendered frame
|
|
387
|
+
- Refactored full-render logic into reusable helper function to reduce code duplication across multiple render paths
|
|
388
|
+
- Changed autocomplete to include hidden paths but filter out `.git` and its contents
|
|
389
|
+
- Changed Input component to properly handle surrogate pairs in Unicode text, preventing cursor display corruption with emoji and multi-byte characters
|
|
390
|
+
- Changed Editor to use `setCursorCol()` for all cursor column updates, enabling sticky column tracking
|
|
391
|
+
- Changed Editor's vertical navigation to implement sticky column logic via `moveToVisualLine()` and `computeVerticalMoveColumn()`
|
|
392
|
+
- Changed Editor's Enter key handling to extract submit logic into `submitValue()` method for better code organization
|
|
393
|
+
- Changed SettingsList to truncate long lines to viewport width, preventing text overflow
|
|
394
|
+
- Changed Terminal's `stop()` method to drain stdin before restoring raw mode, fixing race condition where Ctrl+D could close parent shell over SSH
|
|
395
|
+
- Changed TUI rendering to add `clearOnShrink` option (controlled by `PI_CLEAR_ON_SHRINK` env var) for reducing redraws on slower terminals
|
|
396
|
+
- Changed TUI rendering to detect when extra lines exceed viewport height and trigger full re-render instead of incremental updates
|
|
397
|
+
|
|
398
|
+
### Fixed
|
|
399
|
+
|
|
400
|
+
- Fixed rendering of extra blank lines when content shrinks by improving cursor positioning logic during line deletion
|
|
401
|
+
- Fixed cursor display position in Input component when scrolling horizontally through long text
|
|
402
|
+
- Fixed Kitty keyboard protocol disable sequence to use safe write method, preventing potential output buffering issues
|
|
403
|
+
- Fixed unnecessary full-screen redraws when changes occur in out-of-view components (e.g., spinners), reducing terminal scroll events and improving performance on slower connections
|
|
404
|
+
- Fixed scrollback clearing behavior to only clear screen instead of scrollback when resizing or shrinking content, preventing loss of terminal history
|
|
405
|
+
- Fixed `.git` directory appearing in autocomplete suggestions when filtering by prefix
|
|
406
|
+
- Fixed cursor position corruption in Input component when displaying text with emoji and combining characters
|
|
407
|
+
- Fixed `.git` directory appearing in autocomplete suggestions
|
|
408
|
+
- Fixed race condition where Kitty key release events could leak to parent shell after TUI exit over slow SSH connections
|
|
409
|
+
- Fixed Editor's word movement (Ctrl+Left/Right) to properly reset sticky column for subsequent vertical navigation
|
|
410
|
+
- Fixed Editor's undo operation to reset sticky column state when restoring cursor position
|
|
411
|
+
- Fixed Editor's right arrow key at end of last line to set sticky column for subsequent up/down navigation
|
|
412
|
+
- Fixed TUI rendering to correctly detect viewport changes and avoid false full-redraws after content shrinks
|
|
413
|
+
- Fixed Kitty protocol key parsing to prefer codepoint over base layout for Latin letters and symbols, fixing keyboard layout issues (e.g., Dvorak)
|
|
414
|
+
|
|
415
|
+
## [11.0.0] - 2026-02-05
|
|
416
|
+
|
|
417
|
+
### Added
|
|
418
|
+
|
|
419
|
+
- Introduced `terminal-capabilities.ts` module consolidating terminal detection and image protocol support
|
|
420
|
+
- Added `TerminalInfo` class with methods for detecting image lines and formatting notifications
|
|
421
|
+
- Added `NotifyProtocol` enum supporting Bell, OSC 99, and OSC 9 notification protocols
|
|
422
|
+
- Added `isNotificationSuppressed()` function to check `GJC_NOTIFICATIONS` environment variable
|
|
423
|
+
- Added `TERMINAL` constant providing detected terminal capabilities at runtime
|
|
424
|
+
|
|
425
|
+
### Changed
|
|
426
|
+
|
|
427
|
+
- Changed notification suppression environment variable from `GJC_NOTIFICATIONS` to `PI_NOTIFICATIONS`
|
|
428
|
+
- Changed TUI write log environment variable from `GJC_TUI_WRITE_LOG` to `PI_TUI_WRITE_LOG`
|
|
429
|
+
- Changed hardware cursor environment variable from `GJC_HARDWARE_CURSOR` to `PI_HARDWARE_CURSOR`
|
|
430
|
+
- Updated environment variable access to use `getEnv()` utility function from `@gajae-code/utils` for consistent handling
|
|
431
|
+
- Renamed `TERMINAL_INFO` export to `TERMINAL` for clearer API semantics
|
|
432
|
+
- Reorganized terminal image exports from `terminal-image` to `terminal-capabilities` module
|
|
433
|
+
- Updated all internal references to use `TERMINAL` instead of `TERMINAL_INFO`
|
|
434
|
+
|
|
435
|
+
### Removed
|
|
436
|
+
|
|
437
|
+
- Removed `terminal-image` module exports from public API (functionality migrated to `terminal-capabilities`)
|
|
438
|
+
|
|
439
|
+
## [10.5.0] - 2026-02-04
|
|
440
|
+
|
|
441
|
+
### Fixed
|
|
442
|
+
|
|
443
|
+
- Treated inline image lines with cursor-move prefixes as image sequences to prevent width overflow crashes
|
|
444
|
+
|
|
445
|
+
## [9.8.0] - 2026-02-01
|
|
446
|
+
|
|
447
|
+
### Changed
|
|
448
|
+
|
|
449
|
+
- Moved `wrapTextWithAnsi` export to `@gajae-code/natives` package
|
|
450
|
+
|
|
451
|
+
### Fixed
|
|
452
|
+
|
|
453
|
+
- Improved Kitty terminal key sequence parsing to correctly handle text field codepoints in CSI-u sequences
|
|
454
|
+
- Fixed handling of private use Unicode codepoints (U+E000 to U+F8FF) in Kitty key decoding to prevent invalid character interpretation
|
|
455
|
+
|
|
456
|
+
## [9.7.0] - 2026-02-01
|
|
457
|
+
### Breaking Changes
|
|
458
|
+
|
|
459
|
+
- Removed `Key` helper object from public API; use string literals like `"ctrl+c"` instead of `Key.ctrl("c")`
|
|
460
|
+
- Removed `KeyEventType` export from public API
|
|
461
|
+
|
|
462
|
+
### Changed
|
|
463
|
+
|
|
464
|
+
- Migrated key parsing and matching logic to native implementation for improved performance
|
|
465
|
+
- Simplified `isKeyRelease()` and `isKeyRepeat()` to use regex pattern matching instead of string inclusion checks
|
|
466
|
+
|
|
467
|
+
## [9.6.2] - 2026-02-01
|
|
468
|
+
### Changed
|
|
469
|
+
|
|
470
|
+
- Renamed `EllipsisKind` enum to `Ellipsis` for clearer API naming
|
|
471
|
+
- Changed hardcoded ellipsis character from theme-configurable to literal "…" in editor truncation
|
|
472
|
+
- Refactored `visibleWidth` function to use caching wrapper around new `visibleWidthRaw` implementation for improved performance
|
|
473
|
+
|
|
474
|
+
### Removed
|
|
475
|
+
|
|
476
|
+
- Removed `truncateToWidth`, `sliceWithWidth`, and `extractSegments` functions from public API (now re-exported directly from @gajae-code/natives)
|
|
477
|
+
- Removed `ellipsis` property from `SymbolTheme` interface
|
|
478
|
+
- Removed `extractAnsiCode` function from public API
|
|
479
|
+
|
|
480
|
+
## [9.6.1] - 2026-02-01
|
|
481
|
+
### Changed
|
|
482
|
+
|
|
483
|
+
- Improved performance of key ID parsing with optimized cache lookup strategy
|
|
484
|
+
- Simplified `visibleWidth` calculation to use consistent Bun.stringWidth approach for all string lengths
|
|
485
|
+
|
|
486
|
+
### Removed
|
|
487
|
+
|
|
488
|
+
- Removed `visibleWidth` benchmark file in favor of Kitty sequence benchmarking
|
|
489
|
+
|
|
490
|
+
## [9.5.0] - 2026-02-01
|
|
491
|
+
### Changed
|
|
492
|
+
|
|
493
|
+
- Improved fuzzy file search performance by using native implementation instead of spawning external process
|
|
494
|
+
- Replaced external `fd` binary with native fuzzy path search for `@`-prefixed autocomplete
|
|
495
|
+
|
|
496
|
+
## [9.4.0] - 2026-01-31
|
|
497
|
+
### Added
|
|
498
|
+
|
|
499
|
+
- Exported `padding` utility function for creating space-padded strings efficiently
|
|
500
|
+
|
|
501
|
+
### Changed
|
|
502
|
+
|
|
503
|
+
- Optimized padding operations across all components to use pre-allocated space buffer for better performance
|
|
504
|
+
|
|
505
|
+
## [9.2.2] - 2026-01-31
|
|
506
|
+
|
|
507
|
+
### Added
|
|
508
|
+
- Added setAutocompleteMaxVisible() configuration (3-20 items)
|
|
509
|
+
- Added image detection to terminal capabilities (containsImage method)
|
|
510
|
+
- Added stdin monitoring to detect stalled input events and log warnings
|
|
511
|
+
|
|
512
|
+
### Changed
|
|
513
|
+
- Improved blockquote rendering with text wrapping in Markdown component
|
|
514
|
+
- Restructured terminal capabilities from interface-based to class-based model
|
|
515
|
+
- Improved table column width calculation with word-aware wrapping
|
|
516
|
+
- Refactored text utilities to use native WASM implementations for strings >256 chars with JS fast path
|
|
517
|
+
|
|
518
|
+
### Fixed
|
|
519
|
+
- Simplified terminal write error handling to mark terminal as dead on any write failure
|
|
520
|
+
- Fixed multi-line strings in renderOutputBlock causing width overflow
|
|
521
|
+
- Fixed slash command autocomplete applying stale completion when typing quickly
|
|
522
|
+
|
|
523
|
+
### Removed
|
|
524
|
+
- Removed TUI layout engine exports from public API (BoxNode, ColumnNode, LayoutNode, etc.)
|
|
525
|
+
|
|
526
|
+
## [8.12.7] - 2026-01-29
|
|
527
|
+
|
|
528
|
+
### Fixed
|
|
529
|
+
- Fixed slash command autocomplete applying stale completion when typing quickly
|
|
530
|
+
|
|
531
|
+
## [8.4.1] - 2026-01-25
|
|
532
|
+
|
|
533
|
+
### Added
|
|
534
|
+
- Added fuzzy match function for autocomplete suggestions
|
|
535
|
+
## [8.4.0] - 2026-01-25
|
|
536
|
+
|
|
537
|
+
### Changed
|
|
538
|
+
- Added Ctrl+Backspace as a delete-word-backward keybinding and improved modified backspace matching
|
|
539
|
+
|
|
540
|
+
### Fixed
|
|
541
|
+
- Terminal gracefully handles write failures by marking dead instead of exiting the process
|
|
542
|
+
- Reserved cursor space for zero padding and corrected end-of-line cursor rendering to prevent wrap glitches
|
|
543
|
+
- Corrected editor end-of-line cursor rendering assertion to use includes() instead of endsWith()
|
|
544
|
+
## [8.2.0] - 2026-01-24
|
|
545
|
+
|
|
546
|
+
### Added
|
|
547
|
+
- Added mermaid diagram rendering engine (renderMermaidToPng) with mmdc CLI integration
|
|
548
|
+
- Added terminal graphics encoding (iTerm2/Kitty) for mermaid diagrams with automatic width scaling
|
|
549
|
+
- Added mermaid block extraction and deduplication utilities (extractMermaidBlocks)
|
|
550
|
+
|
|
551
|
+
### Changed
|
|
552
|
+
- Updated TypeScript configuration for better publish-time configuration handling with tsconfig.publish.json
|
|
553
|
+
- Migrated file system operations from synchronous to asynchronous APIs in autocomplete provider for non-blocking I/O
|
|
554
|
+
- Migrated node module imports from named to namespace imports across all packages for consistency with project guidelines
|
|
555
|
+
|
|
556
|
+
### Fixed
|
|
557
|
+
- Fixed crash when terminal becomes unavailable (EIO errors) by exiting gracefully instead of throwing
|
|
558
|
+
- Fixed potential errors during emergency terminal restore when terminal is already dead
|
|
559
|
+
- Fixed autocomplete race condition by tracking request ID to prevent stale suggestion results
|
|
560
|
+
## [6.8.3] - 2026-01-21
|
|
561
|
+
### Added
|
|
562
|
+
|
|
563
|
+
- Added undo support in the editor via `Ctrl+-`
|
|
564
|
+
- Added `Alt+Delete` as a delete-word-forward shortcut
|
|
565
|
+
- Added configurable code block indentation for Markdown rendering
|
|
566
|
+
- Added undo support in the editor via `Ctrl+-`.
|
|
567
|
+
- Added configurable code block indentation for Markdown rendering.
|
|
568
|
+
- Added `Alt+Delete` as a delete-word-forward shortcut.
|
|
569
|
+
|
|
570
|
+
### Changed
|
|
571
|
+
|
|
572
|
+
- Improved fuzzy matching to handle alphanumeric swaps
|
|
573
|
+
- Normalized keybinding definitions to lowercase internally
|
|
574
|
+
- Improved fuzzy matching to handle alphanumeric swaps.
|
|
575
|
+
- Normalized keybinding definitions to lowercase internally.
|
|
576
|
+
|
|
577
|
+
### Fixed
|
|
578
|
+
|
|
579
|
+
- Added legacy terminal support for `Ctrl+` symbol key combinations
|
|
580
|
+
- Added legacy terminal support for `Ctrl+` symbol key combinations.
|
|
581
|
+
|
|
582
|
+
## [6.8.1] - 2026-01-20
|
|
583
|
+
|
|
584
|
+
### Fixed
|
|
585
|
+
|
|
586
|
+
- Fixed viewport tracking after partial renders to prevent autocomplete list artifacts
|
|
587
|
+
|
|
588
|
+
## [5.6.7] - 2026-01-18
|
|
589
|
+
|
|
590
|
+
### Added
|
|
591
|
+
|
|
592
|
+
- Added configurable editor padding via `editorPaddingX` theme option
|
|
593
|
+
- Added `setMaxHeight()` method to limit editor height with scrolling
|
|
594
|
+
- Added Emacs-style kill ring for text deletion operations
|
|
595
|
+
- Added `Alt+D` keybinding to delete words forward
|
|
596
|
+
- Added `Ctrl+Y` keybinding to yank from kill ring
|
|
597
|
+
- Added `waitForRender()` method to await pending renders
|
|
598
|
+
- Added Focusable interface and hardware cursor marker support for IME positioning
|
|
599
|
+
- Added support for shifted symbol keys in keybindings
|
|
600
|
+
|
|
601
|
+
### Changed
|
|
602
|
+
|
|
603
|
+
- Updated tab bar rendering to wrap text across multiple lines when content exceeds available width
|
|
604
|
+
- Expanded Kitty keyboard protocol coverage for non-Latin layouts and legacy Alt sequences
|
|
605
|
+
- Improved cursor positioning with safer bounds checking
|
|
606
|
+
- Updated editor layout to respect configurable padding
|
|
607
|
+
- Refactored scrolling logic for better viewport management
|
|
608
|
+
|
|
609
|
+
### Fixed
|
|
610
|
+
|
|
611
|
+
- Fixed key detection for shifted symbol characters
|
|
612
|
+
- Fixed backspace handling with additional codepoint support
|
|
613
|
+
- Fixed Alt+letter key combinations for better recognition
|
|
614
|
+
|
|
615
|
+
## [5.3.1] - 2026-01-15
|
|
616
|
+
### Fixed
|
|
617
|
+
|
|
618
|
+
- Fixed rendering issues on Windows by preventing re-entrant renders
|
|
619
|
+
|
|
620
|
+
## [5.1.0] - 2026-01-14
|
|
621
|
+
|
|
622
|
+
### Added
|
|
623
|
+
|
|
624
|
+
- Added `pageUp` and `pageDown` key support with `selectPageUp`/`selectPageDown` editor actions
|
|
625
|
+
- Added `isPageUp()` and `isPageDown()` helper functions
|
|
626
|
+
- Added `SizeValue` type for CSS-like overlay sizing (absolute or percentage strings like `"50%"`)
|
|
627
|
+
- Added `OverlayHandle` interface with `hide()`, `setHidden()`, `isHidden()` methods for overlay visibility control
|
|
628
|
+
- Added `visible` callback to `OverlayOptions` for dynamic visibility based on terminal dimensions
|
|
629
|
+
- Added `pad` parameter to `truncateToWidth()` for padding result with spaces to exact width
|
|
630
|
+
|
|
631
|
+
### Changed
|
|
632
|
+
|
|
633
|
+
- Changed `OverlayOptions` to use `SizeValue` type for `width`, `maxHeight`, `row`, and `col` properties
|
|
634
|
+
- Changed `showOverlay()` to return `OverlayHandle` for controlling overlay visibility
|
|
635
|
+
- Removed `widthPercent`, `maxHeightPercent`, `rowPercent`, `colPercent` from `OverlayOptions` (use percentage strings instead)
|
|
636
|
+
|
|
637
|
+
### Fixed
|
|
638
|
+
|
|
639
|
+
- Fixed numbered list items showing "1." for all items when code blocks break list continuity
|
|
640
|
+
- Fixed width overflow protection in overlay compositing to prevent TUI crashes
|
|
641
|
+
|
|
642
|
+
## [4.7.0] - 2026-01-12
|
|
643
|
+
|
|
644
|
+
### Fixed
|
|
645
|
+
- Remove trailing space padding from Text, Markdown, and TruncatedText components when no background color is set (fixes copied text including unwanted whitespace)
|
|
646
|
+
|
|
647
|
+
## [4.6.0] - 2026-01-12
|
|
648
|
+
|
|
649
|
+
### Added
|
|
650
|
+
- Add fuzzy matching module (`fuzzyMatch`, `fuzzyFilter`) for command autocomplete
|
|
651
|
+
- Add `getExpandedText()` to editor for expanding paste markers
|
|
652
|
+
- Add backslash+enter newline fallback for terminals without Kitty protocol
|
|
653
|
+
|
|
654
|
+
### Fixed
|
|
655
|
+
- Remove Kitty protocol query timeout that caused shift+enter delays
|
|
656
|
+
- Add bracketed paste check to prevent false key release/repeat detection
|
|
657
|
+
- Rendering optimizations: only re-render changed lines
|
|
658
|
+
- Refactor input component to use keybindings manager
|
|
659
|
+
|
|
660
|
+
## [4.4.4] - 2026-01-11
|
|
661
|
+
### Fixed
|
|
662
|
+
|
|
663
|
+
- Fixed Ctrl+Enter sequences to insert new lines in the editor
|
|
664
|
+
|
|
665
|
+
## [4.2.1] - 2026-01-11
|
|
666
|
+
### Changed
|
|
667
|
+
|
|
668
|
+
- Improved file autocomplete to show directory listing when typing `@` with no query, and fall back to prefix matching when fuzzy search returns no results
|
|
669
|
+
|
|
670
|
+
### Fixed
|
|
671
|
+
|
|
672
|
+
- Fixed editor redraw glitch when canceling autocomplete suggestions
|
|
673
|
+
- Fixed `fd` tool detection to automatically find `fd` or `fdfind` in PATH when not explicitly configured
|
|
674
|
+
|
|
675
|
+
## [4.1.0] - 2026-01-10
|
|
676
|
+
### Added
|
|
677
|
+
|
|
678
|
+
- Added persistent prompt history storage support via `setHistoryStorage()` method, allowing history to be saved and restored across sessions
|
|
679
|
+
|
|
680
|
+
## [4.0.0] - 2026-01-10
|
|
681
|
+
### Added
|
|
682
|
+
|
|
683
|
+
- `EditorComponent` interface for custom editor implementations
|
|
684
|
+
- `StdinBuffer` class to split batched stdin into individual sequences
|
|
685
|
+
- Overlay compositing via `TUI.showOverlay()` and `TUI.hideOverlay()` for `ctx.ui.custom()` with `{ overlay: true }`
|
|
686
|
+
- Kitty keyboard protocol flag 2 support for key release events (`isKeyRelease()`, `isKeyRepeat()`, `KeyEventType`)
|
|
687
|
+
- `setKittyProtocolActive()`, `isKittyProtocolActive()` for Kitty protocol state management
|
|
688
|
+
- `kittyProtocolActive` property on Terminal interface to query Kitty protocol state
|
|
689
|
+
- `Component.wantsKeyRelease` property to opt-in to key release events (default false)
|
|
690
|
+
- Input component `onEscape` callback for handling escape key presses
|
|
691
|
+
|
|
692
|
+
### Changed
|
|
693
|
+
|
|
694
|
+
- Terminal startup now queries Kitty protocol support before enabling event reporting
|
|
695
|
+
- Default editor `newLine` binding now uses `shift+enter` only
|
|
696
|
+
|
|
697
|
+
### Fixed
|
|
698
|
+
|
|
699
|
+
- Key presses no longer dropped when batched with other events over SSH
|
|
700
|
+
- TUI now filters out key release events by default, preventing double-processing of keys
|
|
701
|
+
- `matchesKey()` now correctly matches Kitty protocol sequences for unmodified letter keys
|
|
702
|
+
- Crash when pasting text with trailing whitespace exceeding terminal width through Markdown rendering
|
|
703
|
+
|
|
704
|
+
## [3.32.0] - 2026-01-08
|
|
705
|
+
|
|
706
|
+
### Fixed
|
|
707
|
+
|
|
708
|
+
- Fixed text wrapping allowing long whitespace tokens to exceed line width
|
|
709
|
+
|
|
710
|
+
## [3.20.0] - 2026-01-06
|
|
711
|
+
### Added
|
|
712
|
+
|
|
713
|
+
- Added `isCapsLock` helper function for detecting Caps Lock key press via Kitty protocol
|
|
714
|
+
- Added `isCtrlY` helper function for detecting Ctrl+Y keyboard input
|
|
715
|
+
- Added configurable editor keybindings with typed key identifiers and action matching
|
|
716
|
+
- Added word-wrapped editor rendering for long lines
|
|
717
|
+
|
|
718
|
+
### Changed
|
|
719
|
+
|
|
720
|
+
- Settings list descriptions now wrap to the available width instead of truncating
|
|
721
|
+
|
|
722
|
+
### Fixed
|
|
723
|
+
|
|
724
|
+
- Fixed Shift+Enter detection in legacy terminals that send ESC+CR sequence
|
|
725
|
+
|
|
726
|
+
## [3.15.1] - 2026-01-05
|
|
727
|
+
|
|
728
|
+
### Fixed
|
|
729
|
+
|
|
730
|
+
- Fixed editor cursor blinking by allowing terminal cursor positioning when enabled.
|
|
731
|
+
|
|
732
|
+
## [3.15.0] - 2026-01-05
|
|
733
|
+
|
|
734
|
+
### Added
|
|
735
|
+
|
|
736
|
+
- Added `inputCursor` symbol for customizing the text input cursor character
|
|
737
|
+
- Added `symbols` property to `EditorTheme`, `MarkdownTheme`, and `SelectListTheme` interfaces for component-level symbol customization
|
|
738
|
+
- Added `SymbolTheme` interface for customizing UI symbols including cursors, borders, spinners, and box-drawing characters
|
|
739
|
+
- Added support for custom spinner frames in the Loader component
|
|
740
|
+
|
|
741
|
+
## [3.9.1337] - 2026-01-04
|
|
742
|
+
### Added
|
|
743
|
+
|
|
744
|
+
- Added `setTopBorder()` method to Editor component for displaying custom status content in the top border
|
|
745
|
+
- Added `getWidth()` method to TUI class for retrieving terminal width
|
|
746
|
+
- Added rounded corner box-drawing characters to Editor component borders
|
|
747
|
+
|
|
748
|
+
### Changed
|
|
749
|
+
|
|
750
|
+
- Changed Editor component to use proper box borders with vertical side borders instead of horizontal-only borders
|
|
751
|
+
- Changed cursor style from block to thin blinking bar (▏) at end of line
|
|
752
|
+
|
|
753
|
+
## [1.500.0] - 2026-01-03
|
|
754
|
+
### Added
|
|
755
|
+
|
|
756
|
+
- Added `getText()` method to Text component for retrieving current text content
|
|
757
|
+
|
|
758
|
+
## [1.337.1] - 2026-01-02
|
|
759
|
+
|
|
760
|
+
### Added
|
|
761
|
+
|
|
762
|
+
- TabBar component for horizontal tab navigation
|
|
763
|
+
- Emergency terminal restore to prevent corrupted state on crashes
|
|
764
|
+
- Overhauled UI with welcome screen and powerline footer
|
|
765
|
+
- Theme-configurable HTML export colors
|
|
766
|
+
- `ctx.ui.theme` getter for styling status text with theme colors
|
|
767
|
+
|
|
768
|
+
### Changed
|
|
769
|
+
|
|
770
|
+
- Forked to @gajae-code scope with unified versioning across all packages
|
|
771
|
+
|
|
772
|
+
### Fixed
|
|
773
|
+
|
|
774
|
+
- Strip OSC 8 hyperlink sequences in `visibleWidth()`
|
|
775
|
+
- Crash on Unicode format characters in `visibleWidth()`
|
|
776
|
+
- Markdown code block syntax highlighting
|
|
777
|
+
|
|
778
|
+
## [1.337.0] - 2026-01-02
|
|
779
|
+
|
|
780
|
+
Initial release under @gajae-code scope. See previous releases at [badlogic/pi-mono](https://github.com/badlogic/pi-mono).
|
|
781
|
+
|
|
782
|
+
## [0.31.1] - 2026-01-02
|
|
783
|
+
|
|
784
|
+
### Fixed
|
|
785
|
+
|
|
786
|
+
- `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))
|
|
787
|
+
|
|
788
|
+
## [0.31.0] - 2026-01-02
|
|
789
|
+
|
|
790
|
+
### Added
|
|
791
|
+
|
|
792
|
+
- `isShiftCtrlO()` key detection function for Shift+Ctrl+O (Kitty protocol)
|
|
793
|
+
- `isShiftCtrlD()` key detection function for Shift+Ctrl+D (Kitty protocol)
|
|
794
|
+
- `TUI.onDebug` callback for global debug key handling (Shift+Ctrl+D)
|
|
795
|
+
- `wrapTextWithAnsi()` utility now exported (wraps text to width, preserving ANSI codes)
|
|
796
|
+
|
|
797
|
+
### Changed
|
|
798
|
+
|
|
799
|
+
- README.md completely rewritten with accurate component documentation, theme interfaces, and examples
|
|
800
|
+
- `visibleWidth()` reimplemented with grapheme-based width calculation, 10x faster on Bun and ~15% faster on Node ([#369](https://github.com/badlogic/pi-mono/pull/369) by [@nathyong](https://github.com/nathyong))
|
|
801
|
+
|
|
802
|
+
### Fixed
|
|
803
|
+
|
|
804
|
+
- Markdown component now renders HTML tags as plain text instead of silently dropping them ([#359](https://github.com/badlogic/pi-mono/issues/359))
|
|
805
|
+
- Crash in `visibleWidth()` and grapheme iteration when encountering undefined code points ([#372](https://github.com/badlogic/pi-mono/pull/372) by [@HACKE-RC](https://github.com/HACKE-RC))
|
|
806
|
+
- ZWJ emoji sequences (rainbow flag, family, etc.) now render with correct width instead of being split into multiple characters ([#369](https://github.com/badlogic/pi-mono/pull/369) by [@nathyong](https://github.com/nathyong))
|
|
807
|
+
|
|
808
|
+
## [0.29.0] - 2025-12-25
|
|
809
|
+
|
|
810
|
+
### Added
|
|
811
|
+
|
|
812
|
+
- **Auto-space before pasted file paths**: When pasting a file path (starting with `/`, `~`, or `.`) and the cursor is after a word character, a space is automatically prepended for better readability. Useful when dragging screenshots from macOS. ([#307](https://github.com/badlogic/pi-mono/pull/307) by [@mitsuhiko](https://github.com/mitsuhiko))
|
|
813
|
+
- **Word navigation for Input component**: Added Ctrl+Left/Right and Alt+Left/Right support for word-by-word cursor movement. ([#306](https://github.com/badlogic/pi-mono/pull/306) by [@kim0](https://github.com/kim0))
|
|
814
|
+
- **Full Unicode input**: Input component now accepts Unicode characters beyond ASCII. ([#306](https://github.com/badlogic/pi-mono/pull/306) by [@kim0](https://github.com/kim0))
|
|
815
|
+
|
|
816
|
+
### Fixed
|
|
817
|
+
|
|
818
|
+
- **Readline-style Ctrl+W**: Now skips trailing whitespace before deleting the preceding word, matching standard readline behavior. ([#306](https://github.com/badlogic/pi-mono/pull/306) by [@kim0](https://github.com/kim0))
|