Commit Graph

288 Commits

Author SHA1 Message Date
Mario Zechner
49c0d860a4 fix(tui): stop swallowing escape during cell size detection closes #2661 2026-03-29 13:22:23 +02:00
Mario Zechner
0406b41a46 fix(tui): keep @ autocomplete responsive in large trees closes #1278 2026-03-26 15:43:51 +01:00
Mario Zechner
cb4e4d8c9a fix(tui): reset viewport state after shrink 2026-03-26 10:40:10 +01:00
Mario Zechner
21950c5ba4 fix(tui): stop chaining slash arg autocomplete after Tab closes #2577 2026-03-24 23:52:48 +01:00
Mario Zechner
7f04694c4d chore(tui): apply import ordering in terminal 2026-03-24 20:17:25 +01:00
Duncan Ogilvie
9a0be024a6 feat(tui): PI_TUI_WRITE_LOG now accepts a directory path (#2508)
Co-authored-by: Mario Zechner <badlogicgames@gmail.com>
2026-03-24 00:22:24 +01:00
Mario Zechner
4c7df25d03 fix(tui): restore blockquote styling after inline links
The quoteInlineStyleContext used an empty stylePrefix, so after inline
elements (links, bold, code) closed their ANSI codes inside a blockquote,
the quote color was not re-applied. Text following a link rendered in
default foreground instead of the quote theme color.
2026-03-23 22:53:24 +01:00
Mario Zechner
ab771a84b2 fix(tui): preserve heading styling after inline code spans
Headings applied styling (bold+cyan) as an outer wrapper around the
result of renderInlineTokens. When inline elements like codespan emitted
ANSI resets, the outer heading style was killed and only the default
text style was restored via stylePrefix.

Fix: pass a heading-specific InlineStyleContext into renderInlineTokens
so each text segment gets heading styling directly, and stylePrefix
restores heading style after inline elements.
2026-03-23 01:07:38 +01:00
Mario Zechner
77db2e4c18 fix(tui): stream truncateToWidth for large strings closes #2447 2026-03-21 10:06:29 +01:00
Mario Zechner
16937947be fix(tui): skip Termux height redraws closes #2467 2026-03-20 19:35:50 +01:00
Mario Zechner
6de8a2570b fix(tui): stop evicting unrelated default keybindings closes #2455 2026-03-20 12:54:20 +01:00
Mario Zechner
e3fee7a511 fix(keybindings): migrate to namespaced ids closes #2391 2026-03-20 01:55:30 +01:00
Mario Zechner
fa877de1fb fix(tui): resolve raw backspace ambiguity closes #2293 2026-03-18 00:48:03 +01:00
Sviatoslav Abakumov
fa26f15e68 fix(tui): clear stale scrollback on session switch (#2155)
fullRender wrote \x1b[3J\x1b[2J\x1b[H (clear scrollback, then clear
screen). But \x1b[2J pushes on-screen content into scrollback, undoing
the preceding \x1b[3J. Reorder to \x1b[2J\x1b[H\x1b[3J so the screen is
cleared first and scrollback is wiped last.
2026-03-14 16:00:34 +01:00
Markus Ylisiurunen
962c12444d fix(tui): remove trailing markdown block spacing (#2152) 2026-03-14 15:50:19 +01:00
Markus Ylisiurunen
c9a3d14aa5 feat(tui): make select list column sizing configurable (#2154)
* feat(tui): make select list layout configurable

* feat(tui): tune select list column sizing

* test(tui): fix select list alignment assertions
2026-03-14 15:50:00 +01:00
badlogic
4f81c3c28d fix(coding-agent,tui): stabilize windows shell/path handling
fixes #1775

fixes #1769
2026-03-14 05:36:21 +01:00
Mario Zechner
ad32089f0c fix(tui): preserve literal paste content closes #2064 2026-03-14 04:34:40 +01:00
Mario Zechner
acb0f4d807 fix(tui): preserve ./ prefix in tab completion, closes #2087 2026-03-14 04:12:38 +01:00
Mario Zechner
9c0ba357ad fix(tui): distinguish ctrl+backspace from backspace on Windows Terminal
0x08 (BS) was treated as plain backspace alongside 0x7f (DEL). On
Windows Terminal, Backspace sends 0x7f and Ctrl+Backspace sends 0x08,
making ctrl+backspace bindings unreachable.

Now 0x08 matches ctrl+backspace (and ctrl+h, same byte) but not plain
backspace. 0x7f remains plain backspace.

fixes #2139
2026-03-14 03:58:28 +01:00
xu0o0
bd2c3ab67e feat(tui): treat paste markers as atomic segments in editor (#2111)
* feat(tui): treat paste markers as atomic segments in editor

Paste markers like `[paste #1 +123 lines]` are now treated as single
atomic units for cursor movement, word navigation, deletion, and
wrapping. Only markers with valid paste IDs (present in the editor's
pastes Map) are treated atomically.

* fix(tui): word-wrap oversized atomic segments in editor
2026-03-13 17:42:59 +01:00
xu0o0
adce496f63 fix(tui): handle narrow terminal width in editor scroll indicator (#2103) 2026-03-13 17:41:14 +01:00
xu0o0
b6b7fafddb fix(tui): normalize tabs in editor setText and input paths (#2027) 2026-03-12 23:48:15 +00:00
xu0o0
48e4bd94ef fix(tui): wordWrapLine overflow with wide chars at wrap boundary (#2082) 2026-03-12 23:46:37 +00:00
Lucas Rangel Cezimbra
baeccade54 fix(tui): restore shift+tab in xterm modifyOtherKeys mode (#2081) 2026-03-12 23:36:45 +00:00
Fero
15e0957b04 fix(tui): stop wide input slice overflow closes #1982 (#2006) 2026-03-09 23:19:26 +01:00
Mario Zechner
aaeb2d8208 fix(tui): handle wide unicode input scrolling closes #1982 2026-03-09 17:51:38 +01:00
xu0o0
78bf0262e5 fix(tui): normalize tab characters in Input paste to spaces (#1975) 2026-03-09 13:30:53 +01:00
Mario Zechner
deb5fb3b88 feat(tui): support digit keybindings closes #1905 2026-03-08 00:36:04 +01:00
Mario Zechner
d48843ea55 Pr 1724 (#1939)
* feat(coding-agent): add fold/unfold to tree branch navigation

Remap left/right arrow keys in the session tree to jump between branch
segment starts (first child of each branching point). Left on a foldable
node (root or segment start) folds it, hiding its descendants. Right on
a folded node unfolds it. Nested fold state is preserved. Search and
filter changes reset all folds.

Folded branches show ⊞ in the connector (├⊞/└⊞) or as a prefix for
roots. Active path marker • appears after the fold indicator.

Add Page Up/Down support for paging through the tree list, consistent
with session selector and config selector.

* feat(coding-agent): improve tree branch folding closes #1724

---------

Co-authored-by: Sviatoslav Abakumov <dust.harvesting@gmail.com>
2026-03-08 00:15:47 +01:00
Benjamin Rapaport
6937d2129e fix(tui): chain slash arg autocomplete after Tab completion
fixes #1437
2026-03-07 23:19:26 +01:00
Mario Zechner
9a8bc61300 fix(tui,coding-agent): handle tmux xterm extended keys and warn on tmux setup fixes #1872 2026-03-07 23:01:48 +01:00
Aliou Diallo
e3decbcdd6 fix(tui): autocomplete highlight follows first prefix match as user types (#1931) 2026-03-07 19:03:42 +01:00
Nico Bailon
841c95ac9c feat(tui): add non-capturing overlays with focus control (#1916) 2026-03-07 14:19:16 +01:00
Mario Zechner
bdf482cefc fix(tui): add modifyOtherKeys fallback for modified enter keys in tmux
When Kitty keyboard protocol is not available (e.g. inside tmux), fall
back to xterm modifyOtherKeys mode 2 so that Shift+Enter, Ctrl+Enter,
and other modified keys are distinguishable from plain Enter.

tmux users need to add to ~/.tmux.conf:
  set -g extended-keys on
  set -g extended-keys-format csi-u

closes #1872
2026-03-06 16:02:17 +01:00
Mario Zechner
9bcf06c056 fix(tui): add Kitty CSI-u printable decoding to Input component, closes #1857 2026-03-06 00:33:58 +01:00
Mario Zechner
dabcda0db3 fix(tui): full redraw on terminal width/height resize\n\ncloses #1844 2026-03-05 20:27:37 +01:00
Mario Zechner
f430dce00a fix(tui): isolate blockquote rendering from default text style 2026-03-04 21:30:54 +01:00
Mario Zechner
9673f52919 fix(tui): render blockquote list content correctly
closes #1787
2026-03-04 20:25:55 +01:00
Mario Zechner
4cb1a56b53 fix(tui,coding-agent): add OSC 133 user message markers support closes #1805 2026-03-04 18:33:22 +01:00
Mario Zechner
689e7b4ac2 fix(tui): make single-line paste atomic to avoid @ autocomplete lag
closes #1812
2026-03-04 18:25:37 +01:00
Mario Zechner
49749407fa fix(tui): ignore unsupported Kitty CSI-u modifiers closes #1807 2026-03-04 18:14:29 +01:00
Zhou Rui
85d06052fb fix(tui): stabilize regional indicator width to prevent streaming render drift (#1783) 2026-03-03 21:59:56 +01:00
herr kaste
f129ac93c5 fix(tui): load koffi via createRequire in ESM (#1627)
The previous lazy-loading change switched to require("koffi") inside
enableWindowsVTInput(). In ESM, require is undefined, so the call
threw and VT input mode was silently not enabled on Windows.

Use createRequire(import.meta.url) at module scope and
cjsRequire("koffi") at the call site. This keeps koffi externalized
for Bun binaries while restoring Windows VT input behavior, including
multiline paste handling.
2026-02-25 12:05:27 +01:00
Mario Zechner
8386a807ff fix(tui): externalize koffi from bun binary builds
Changed koffi import from top-level to dynamic require in
enableWindowsVTInput() and added --external koffi to bun build.
This prevents embedding all 18 platform .node files (~74MB) into
every compiled binary. For Windows builds, only the win32_x64
koffi.node is shipped alongside the binary.

Binary size reduction: darwin-arm64 142MB -> 67MB, archive 43MB -> 28MB.
2026-02-22 14:29:21 +01:00
Duncan Ogilvie
9e22d3913a fix(tui): enable VT input mode on Windows (#1495)
This fixes Shift+Tab not being recognized correctly
2026-02-14 01:45:11 +01:00
Mario Zechner
31f765ff1b fix(tui): scope @ fuzzy search to path prefixes\n\ncloses #1423 2026-02-12 21:26:47 +01:00
Sam Fold
30fd99bd82 feat: add terminal input hook for extensions 2026-02-12 20:45:33 +01:00
Kao Félix
6a3d6fe944 feat(tui, coding-agent): add pasteToEditor to ExtensionUIContext (#1351)
Add pasteToEditor(text) method that pastes text into the editor via
bracketed paste sequences, triggering paste handling (including collapse
for large content). Unlike setEditorText which directly replaces content,
pasteToEditor routes through handleInput on the active editor component.

- Add pasteToEditor to ExtensionUIContext interface
- Add handleInput to EditorComponent interface (was missing, all
  concrete implementations already had it)
- Implement in interactive mode via bracketed paste sequence
- Add fallback in RPC mode (delegates to setEditorText)
- Document in extensions.md
2026-02-07 15:55:08 +01:00
Sviatoslav Abakumov
4c2d78f6cb Add the kill ring and undo features to the Input component (#1373)
* feat(tui): extract KillRing and UndoStack, add to Input

Extract kill ring and undo logic from Editor into reusable classes:

- KillRing: ring buffer with accumulation for consecutive kills
- UndoStack<S>: generic stack with clone-on-push semantics

Refactor Editor to use both classes. Add kill ring (kill/yank/
yank-pop), undo with coalescing, and deleteWordForward to Input.

* feat(tui): extract handleBackspace() and handleForwardDelete()
2026-02-07 15:47:27 +01:00