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.
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.
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.
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
* 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
* 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>
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
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.
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.
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
* 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()