npm / @earendil-works/pi-tui
@earendil-works/pi-tui
What changed in @earendil-works/pi-tui 0.74 to 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-11.
19 breaking4 security52 new APIs and options7 performance12 behavior and defaults120 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@earendil-works/pi-tui 153 changes
Breaking changes 9
Display math wider than the content width now falls back to raw LaTeX instead of wrapping row by row and splitting fractions and sums.
Editor.render() wraps the drawn cursor in zero-width APC markers instead of emitting \x1b[7m directly; code rendering it outside a TUI must strip the markers.
Unhandled wheel events now scroll the transcript instead of reaching a focused overlay's handleInput as raw input; overlays that scroll with the wheel must implement handleMouse.
Input.render() wraps the drawn cursor in zero-width APC markers instead of emitting \x1b[7m directly; code rendering it outside a TUI must strip the markers.
parseKey() now returns the produced symbol for shifted keys, so bindings such as + or ctrl++ match Kitty keyboard protocol and modifyOtherKeys reports; physical shift+= spelling still matches.
When enabled, showHardwareCursor shows only the terminal cursor; focused Editor and Input components no longer draw a reverse-video cursor.
Terminal implementations must provide setProgramStatus(status); terminals without OSC 7501 support can implement it as a no-op.
Ctrl+Home and Ctrl+End now move the fullscreen transcript to the top or bottom and no longer move the editor cursor.
Home and End now always move the editor cursor to the line start or end.
New APIs and options 11
A focused component that sets this property receives viewport keys instead of letting TuiAltScreen scroll the transcript.
Adds a function to compute the selection after a tui.select.pageUp or tui.select.pageDown key.
Adds a function that replaces runs of C0 and C1 control characters with a space.
Components can wrap a drawn cursor with renderFakeCursor(); the TUI renders it in reverse video or omits it after CURSOR_MARKER when showHardwareCursor is enabled.
Added Box.setPaddingX(...).
Added formatProgramStatus() for the Program Status Protocol (OSC 7501).
Set PI_PROGRAM_STATUS=1|0 to override terminal support detection for Program Status Protocol reports.
Added Text.setPaddingX(...).
Drops the text selection and multi-click state, for example before a host replaces the transcript.
Registers an image transcoder so Image can convert JPEG, GIF, and WebP images to PNG for the Kitty graphics protocol.
TuiAltScreen.getScreenLines() returns the lines of the last rendered frame.
Performance 2
Markdown reuses top-level blocks from its last render, allowing streaming updates to render only the changed last block and resizes to reuse highlighted code; theme changes must call invalidate().
Reduced memory retained per rendered message; a long assistant message keeps about a fifth of the heap it kept before.
Behavior and default changes 1
Detects the Rex terminal and enables OSC 8 hyperlinks, truecolor, and Kitty images.
Fixes and other changes 30
Alacritty hyperlink detection also uses
TERMandALACRITTY_WINDOW_ID, enabling hyperlinks whenTERM_PROGRAMis unset.Markdown rendering no longer displays HTML comments as visible text.
Internal cursor markers no longer leak into terminal output, including with multiple markers or horizontally clipped content.
Deleting a paste marker with Backspace no longer corrupts later short markers or causes marker text to be submitted instead of pasted content.
Kitty images are drawn after clearing and writing their covered rows on every terminal, fixing fullscreen images in Orca that showed only their first row.
Bare Markdown URLs no longer swallow following CJK punctuation and text; explicit Markdown links and angle autolinks are unchanged.
Word characters now match iTerm2 defaults, preventing paths and tokens from splitting at ~, ., \, and +.
Ranking now scores contiguous query occurrences and keeps the best alignment, fixing scattered earlier matches ranking above later contiguous matches.
Images inside padded or colored boxes are cropped correctly when partially visible after scrolling above the fullscreen viewport, including beside other text.
F1–F12 shortcuts, including modified function keys, are recognized, and F13+ and other functional keys no longer insert invisible private-use characters into the editor.
Deeply nested blockquotes no longer produce exponentially many lines or hang or crash rendering when borders exhaust the available width.
Orca is recognized as supporting true color and hyperlinks, and Kitty images when it advertises ORCA_IMAGE_PROTOCOL=kitty.
Control characters in a title no longer end the title sequence and send the remaining text to the terminal as escape sequences.
On Apple Terminal and native Windows, ESC + Return with Shift held is treated as Shift+Enter; without Shift it remains Alt+Enter.
Setting unchanged text no longer drops wrapped lines and causes renderers to wrap the same text again.
Regular mode no longer writes OSC 133 prompt markers from rendered lines to the terminal, preventing the working indicator from disappearing during runs.
PageUp and PageDown selection keys are now handled by SelectList, SettingsList, and editor autocomplete.
Wrapping no longer starts the next line with a space when a styled word ends at the wrap width, and strikethrough no longer continues into right padding.
File autocomplete now returns results for queries containing regex metacharacters such as
[or(.An unclosed display-math block no longer swallows or corrupts following Markdown tables, including during streaming.
Bold and italic formatting now renders next to CJK punctuation.
Terminal modes are restored synchronously on process exit, even if the process exits without calling stop().
Overlay compositing no longer drops CURSOR_MARKER when an overlay ends directly left of the cursor, preserving the hardware cursor position.
Herdr now uses the Kitty graphics protocol, fixing inline images that had not rendered since 1.1.0.
Fragmented terminal color replies no longer leak hex values into the prompt or trigger the external editor via their BEL terminator.
TERM_PROGRAM=herdr is now detected as supporting OSC 8 hyperlinks, making Markdown links clickable in Herdr.
Fixed fullscreen Kitty images collapsing to a one-row strip after scrolling in WezTerm.
Non-PNG images now show their text fallback on Kitty-protocol terminals when no transcoder is registered or conversion fails.
Fixed color bleeding past mouse selections and search highlights in fullscreen mode when a styled token ends at the highlight boundary.
Fixed autocompletion not triggering when the input starts with whitespace.
@earendil-works/pi-tui 0.9926 changes
Breaking changes 3
Removed.
Replaces the separate terminal color queries with one round trip for the default foreground, background, and 16 ANSI colors, returning TerminalColors.
Removed in favor of TUI.queryTerminalColors().
New APIs and options 16
Adds a color type supporting indexed ANSI, sRGB, or OKLCH values.
Added as a helper for color values and styling.
Added as a helper for color values and styling.
Added as a helper for color values and styling.
Added as a helper for color values and styling.
Added as a helper for color values and styling.
Added as a helper for color values and styling.
Added as a helper for color values and styling.
Reads file URLs from the macOS clipboard.
Added as a helper for color values and styling.
Added as a helper for color values and styling.
Parses #rgb, #rrggbb, oklch(), and okhsl() color values.
Added as a helper for color values and styling.
Added as a helper for color values and styling.
Allows wheel scroll lines to be updated at runtime.
The wheelScrollLines option now accepts "auto", which accelerates fast wheel spins on terminals that send one event per notch.
Performance 1
Improved rendering performance: visibleWidth() avoids grapheme segmentation for ANSI-styled ASCII, Box avoids re-padding cached lines, and Markdown reuses parsed tokens across theme and width changes.
Behavior and default changes 1
Terminals with TERM values matching *-direct are now detected as truecolor.
Fixes and other changes 5
Keyboard input is no longer lost when a component that forwarded a mouse event to a child removes that child.
Reduced image stretching in terminals that use the Kitty graphics protocol.
Autocomplete now works after opening wrappers such as (, [, {, <, or a backtick.
The shell cursor no longer stays hidden after exit when an extension closes an overlay during shutdown.
Autocomplete no longer appears empty when loaded skill names do not contain the letters in skill.
@earendil-works/pi-tui 0.869 changes
New APIs and options 1
Adds bundled asynchronous native clipboard readers for macOS, Windows, and X11, replacing the external native clipboard dependency in consumers.
Performance 1
Reduces latency for long texts by using native substring search instead of scanning each character in JavaScript.
Fixes and other changes 7
Vertically lays out unsupported and nested display scripts.
Fixes autocomplete boundaries and path quoting around CJK punctuation.
Shows actionable backend error messages instead of a generic notice and extends failure notices to five seconds.
Prevents later row clears in WezTerm from erasing fullscreen Kitty images.
Centers cases layouts around surrounding equations.
Fixes legacy font switches falling back to raw source.
Ranks the bare skill name instead of the skill: prefix.
@earendil-works/pi-tui 0.8514 changes
Breaking changes 5
Applications must configure the hardware cursor through the renderer constructor instead of relying on coding-agent environment-variable defaults.
Without a supplied log directory, redraw logging is disabled and crash dumps are written to the OS temp directory.
Debug and crash log filenames now use the
pi-tui-prefix.The redraw debug environment variable is now
PI_TUI_DEBUG_REDRAWinstead ofPI_DEBUG_REDRAW.Applications must configure clear-on-shrink behavior through
setClearOnShrink()instead of relying on coding-agent environment-variable defaults.
New APIs and options 2
LaTeX rendering now supports relational algebra join symbols.
Adds a
TuiAltScreenoption that renders a clickable jump-to-end label on a follow-end primary scroll view while it is scrolled away from the end.
Performance 1
Search latency on large transcripts was reduced by caching unchanged results, indexing ASCII runs, and limiting highlight work to visible matches.
Behavior and default changes 2
Mouse wheel scrolling while holding Alt in fullscreen mode is five times faster.
The animation and editor integration changed to support embedded working indicators.
Fixes and other changes 4
Mouse hover no longer changes selection or recenters autocomplete and settings lists, preventing clicks from targeting a different item.
Fixed drag selection continuing over an editor.
Fixed terminal startup under restricted seccomp policies that reject the
SIGWINCHself-signal.Fixed terminal image capability detection for Zed.
@earendil-works/pi-tui 0.8456 changes
New APIs and options 17
Adds helpers to detect and copy the active fullscreen text selection programmatically.
Environment and programmatic overrides are available for OSC 8 hyperlinks, inline image protocols, and truecolor terminal capabilities.
Adds a copyOnSelect option for fullscreen text selection.
Added fullscreen TUI search with configurable match styles and next/previous navigation using the specified keybindings.
Added a timeout setting for high-latency terminals, limited to lone Escape input; also fixed split Alt+Enter input over SSH being misread as Escape.
Added an unbound single-line transcript scrolling action for fullscreen TUI keybindings.
Added an optional right-click paste handler to the alternate-screen TUI, currently enabled on Windows.
Added an unbound half-page transcript scrolling action for fullscreen TUI keybindings.
Alternate-screen layouts now include VStack, HStack, and nested ScrollView with constrained sizing, sticky regions, and pointer-targeted scrolling.
Alternate-screen scrollbars support proportional display, mouse dragging, Home/End navigation, transient auto mode, and always mode that reserves a column; modes can change at runtime.
Interface-compatible main-screen and alternate-screen TUI renderers now support application-owned scrolling.
Markdown now renders terminal-friendly Unicode for inline and display LaTeX, including fractions, scripts, symbols, aligned equations, cases, and matrices.
The Markdown component now supports width-aware source transforms.
The bundled Markdown parser and its token types are now exported for use by applications.
Previous and next prompt history actions can be configured independently of vertical cursor movement.
Lifecycle and render-state handoff APIs let developers replace renderers without replaying main-screen content.
A shared TUI mode type and mode discriminants are available for the main-screen and alternate-screen renderers.
Performance 1
Reduced alternate-screen per-frame allocation churn roughly 9–18x by painting full-width layout rows as direct line references.
Behavior and default changes 7
Scrollbars use muted thin tracks and proportional thumbs, preserve underlying backgrounds, reserve an unstyled column in always mode, reveal auto tracks on pointer entry, expand thumbs on hover, and support track-click jumping.
Search uses a bordered placeholder-based input, muted result count, right-aligned clickable key-and-arrow buttons with configurable hover styling, and open-shortcut toggling.
Added double-click word and whitespace selection, granularity-aware drag selection, and triple-click paragraph selection.
Drag selection now auto-scrolls at the edges when extending across off-screen scroll-view content.
The default wheel step is reduced from three lines to one for finer scrolling.
The alternate-screen renderer now supports stacked transient notifications.
The alternate-screen viewport now supports page scrolling and OSC 133 semantic prompt navigation.
Fixes and other changes 31
Fixes ordering for nested autocomplete results.
Fixes word selection splitting paths and kebab-case tokens on
/and-.Fixes crashes when image-heavy output exceeds V8's string length limit.
Fixed duplicate fullscreen right-click paste in VS Code-based terminals on Windows.
Fixed padded text exceeding narrow terminal widths.
Fixed wrapped Markdown table links leaking color into borders and neighboring cells, including tables inside blockquotes.
Fixed focused overlays not receiving mouse wheel or viewport scroll keys such as PageUp and PageDown.
Fixed mouse drag selection and OSC 8 link activation in terminals reporting generic SGR mouse release button codes.
Fixed idle fullscreen sessions repainting and clearing text selection when the terminal loses focus.
Fixed false success reporting when OSC 52 is unsupported by allowing host clipboard integration and reporting verified failures.
Fixed manual scrolling snapping search back to the current match and fragmented SGR mouse input leaking into the query.
Fixed control spaces split across line endings causing complete expressions to fall back to raw source.
Fixed required LaTeX arguments starting on a new line being parsed as empty.
Reduced fullscreen mouse event volume under tmux, Zellij, and GNU Screen by using button-motion tracking instead of all-motion tracking.
Fixed spacing for LaTeX relations, multiplication, and named operators, and composition of matrices with stacked fractions, operator limits, and adjacent matrices.
Kitty images no longer cross vertical layout clip boundaries or overlap sticky regions while scrolling.
Redraw fixes prevent redundant Kitty image data, dropped adjacent rows, duplicate fixed-basis scroll content, and scans of clipped transcript rows.
Unmatched mouse events when terminal pane focus changes no longer create phantom text selections.
The npm package now includes the source and build script needed to rebuild the Darwin native addon.
Ctrl-modified editor bindings provide Home, End, PageUp, and PageDown variants when fullscreen transcript navigation would otherwise leave them inaccessible.
Terminal width accounting now handles Indic conjunct grapheme clusters correctly.
Image payloads now include size metadata required by the xterm.js image addon.
Keyboard input can preempt the throttled render timer, reducing rendering latency on Windows.
Nested stack layouts now respect child minimum sizes.
Width truncation now terminates OSC 8 hyperlinks correctly.
Spaces in queries now filter multi-word labels instead of changing the selected value.
Batched terminal color-scheme reports are no longer parsed as one malformed response.
Clearing terminal progress now emits the complete OSC 9;4 sequence.
Truecolor detection now works when Windows Terminal does not provide WT_SESSION to child shells.
The npm package now includes the source and build script needed to rebuild the Windows native addon.
Shift+Enter detection on Windows now reports modifier key state correctly.
@earendil-works/pi-tui 0.832 changes
Fixes and other changes 2
Absolute paths are clickable when terminal hyperlinks are available.
Long image fallback paths no longer overflow narrow terminals, and home-directory paths are shortened.
@earendil-works/pi-tui 0.822 changes
Fixes and other changes 2
Narrow terminals no longer crash when the editor's bottom scroll indicator exceeds the terminal width.
Debug and crash logs now use the configured TUI log directory, including PI_CODING_AGENT_DIR, instead of always writing under ~/.pi/agent.
@earendil-works/pi-tui 0.813 changes
Fixes and other changes 3
Text wrapping now recognizes CRLF and CR line endings while preserving styles across lines.
Undo restores the paste registry together with the text, and marker renumbering shifts registry entries in ascending id order, preventing submitted prompts from containing literal markers or the wrong paste's content.
Shutdown now clears the editor's inverted software cursor before restoring the hardware cursor, avoiding a duplicate cursor artifact.
@earendil-works/pi-tui 0.803 changes
New APIs and options 1
An opt-in Markdown renderer option preserves source backslash escapes for transcript rendering.
Fixes and other changes 2
Terminal output now normalizes tab characters consistently.
Fixed decoding of Alt+symbol key combinations such as Alt+, and Alt+.
@earendil-works/pi-tui 0.7921 changes
Security 1
Pi Agent: Pi loads project-local extensions without approval
New APIs and options 3
Exported
sliceByColumnfor ANSI-aware horizontal column slicing.Added support for terminal background color queries using OSC 11 replies.
Added provider-defined trigger characters so editor autocomplete can naturally trigger on token prefixes.
Behavior and default changes 1
Warp terminal detection was added for Kitty graphics inline image support.
Fixes and other changes 16
Partial closing fences no longer make code blocks shrink or flicker while content streams.
Non-empty drafts now jump to the start of the line before Cursor Up browses input history.
Fixed inline image rendering during full redraw fallbacks by reserving image padding rows before placement, without regressing tall-image placement.
Fixed border alignment when an overlay starts inside a full-width cell.
CJK text now wraps at character boundaries instead of leaving large trailing gaps.
Blank-line separation between loose Markdown list items is now preserved.
Markdown source list markers now preserve unordered markers, so standalone + user messages no longer render as -.
Provider/model completions remain matchable after slash-separated fuzzy queries are inserted.
Reserved row clears no longer erase all but the top strip of tool image previews.
Fixed hardware cursor positioning while slash-command autocomplete is visible.
Unspaced CJK runs can break at grapheme boundaries without leaving large trailing gaps.
Returning from history browsing now restores the current draft.
Autocomplete suggestions now re-query after editor cursor movement.
The fallback response is now response-driven instead of timeout-driven, fixing intermittent Shift+Enter handling.
Browsing upward now places the cursor at the start of a prompt and browsing downward at the end, so repeated Up/Down traverses multiline prompts immediately.
Rendering now clears stale lines when content shrinks to zero.
@earendil-works/pi-tui 0.787 changes
Security 3
Pi Agent: Potential XSS in HTML session exports via Markdown URL sanitization bypass
Pi Agent: Predictable temporary extension install paths allow local privilege escalation on shared Linux hosts
Pi Agent: Race condition in Pi auth.json writes could expose stored credentials
Fixes and other changes 4
Non-capturing overlays remain interactive after UI rerenders and explicit focus release.
Tab width accounting in column slicing and overlay compositing prevents tab-containing output from exceeding terminal width.
Fixed wrapping of very long ANSI text lines to avoid stack overflows.
OSC 8 hyperlinks now pass through tmux when the client supports them.
@earendil-works/pi-tui 0.771 changes
Fixes and other changes 1
Ignores mismatched or delayed terminal responses to avoid false Kitty keyboard protocol detection.
@earendil-works/pi-tui 0.766 changes
New APIs and options 1
An opt-in Markdown renderer option preserves source ordered-list markers during transcript rendering.
Fixes and other changes 5
Windows Terminal capability detection enables OSC 8 hyperlinks, preserving clickable long URLs across wrapped lines.
JetBrains terminal capability detection disables unsupported OSC 8 hyperlinks.
Shift+Enter works in Apple Terminal by detecting local macOS modifier state when Terminal.app sends plain Return.
JetBrains terminal capability detection enables truecolor.
Editor and input word navigation and deletion use Unicode word boundaries while preserving ASCII punctuation boundaries.
@earendil-works/pi-tui 0.755 changes
Breaking changes 2
The package-level development watch script was removed because the root TypeScript check validates strip-only-compatible sources.
The minimum supported Node.js version is now 22.19.0.
Performance 1
The optional koffi dependency for Windows VT input was replaced with a tiny vendored native helper, reducing install size while preserving Shift+Tab handling.
Fixes and other changes 2
Loader initialization now ensures indicator startup cannot run before frames are initialized.
Truecolor capability detection now aligns terminal image rendering with the interactive theme detector.
@earendil-works/pi-tui 0.746 changes
Fixes and other changes 6
Portrait images are now capped by height instead of always scaling to the configured maximum width.
Fixed image placement when the viewport is shorter than the rendered image.
Fixed WezTerm Kitty keyboard protocol edge cases to keep escape handling correct.
Improved markdown rendering robustness for very large files.
Wrapped markdown list items now preserve indentation on continuation lines.
Fixed rendering of markdown task-list checkboxes.