Commit graph

549 commits

Author SHA1 Message Date
Mario Zechner
c50a0b8b6d Release v0.50.7 2026-01-31 01:08:29 +01:00
Mario Zechner
022b20f364 Add [Unreleased] section for next cycle 2026-01-30 22:03:55 +01:00
Mario Zechner
f8d43ce02c Release v0.50.6 2026-01-30 22:03:14 +01:00
Mario Zechner
d91cdc5f0c docs: add missing changelog entries for v0.50.5..HEAD
- tui: add #1095 content shrink fix (by @marckrenn)
- tui: add isImageLine perf optimization
- coding-agent: cross-package duplication for #1095, #1099
2026-01-30 22:02:17 +01:00
Marc Krenn
39c898d7c9
fix(tui): auto-clear empty rows when content shrinks (#1095)
- Add height change detection (analogous to existing width detection)
- Auto-detect when content shrinks below maxLinesRendered and trigger
  full re-render to clear leftover empty rows
- Only triggers when no overlays are active (overlays need padding)

Fixes empty rows appearing below footer when:
- Closing /tree or other selectors
- Clearing multi-line editor content
- Any component shrinking

Also adds regression tests for resize handling and content shrinkage.
2026-01-30 20:45:34 +01:00
Mario Zechner
836e852af1 Fixes #1099 2026-01-30 18:19:16 +01:00
Mario Zechner
abd0c47b03 perf(tui): use startsWith short-circuit in isImageLine 2026-01-30 17:07:43 +01:00
Mario Zechner
0091857f8b Add [Unreleased] section for next cycle 2026-01-30 11:48:16 +01:00
Mario Zechner
01d521c625 Release v0.50.5 2026-01-30 11:47:35 +01:00
Mario Zechner
012d5b488c style: format test file 2026-01-30 11:46:53 +01:00
Dave dV
9337d1c39d test(tui): add bug regression test for isImageLine crash fix
Added comprehensive bug regression test that demonstrates:
1. The bug scenario (old implementation using startsWith() fails)
2. The fix works (new implementation using includes() passes)

Test covers:
- Terminal without image support scenario (bug trigger)
- Both Kitty and iTerm2 image protocols
- Very long lines (300KB+) matching crash scenario
- Integration with tool execution scenarios
- Negative cases (no false positives)

All 347 tests pass including 12 new bug regression tests.
2026-01-30 11:46:13 +01:00
Dave dV
2339d7b5ac fix(tui): isImageLine should detect image escape sequences anywhere in line
Changed isImageLine() from using startsWith() to includes() to detect
Kitty and iTerm2 image escape sequences anywhere in a line, not just
at the start. This prevents TUI width checks from failing on lines
containing image data, which could cause crashes when rendering tool
results with images (e.g., when reading image files).

Also added comprehensive test coverage for isImageLine() including:
- Both iTerm2 and Kitty protocols
- Regression tests for long lines and terminals without image support
- Negative cases to ensure no false positives

Fixes crash: 'Rendered line exceeds terminal width' when image
escape sequences appear in output.
2026-01-30 10:07:22 +00:00
Mario Zechner
2cee7e17de Add [Unreleased] section for next cycle 2026-01-30 03:27:09 +01:00
Mario Zechner
3f5fe42d37 Release v0.50.4 2026-01-30 03:26:23 +01:00
Mario Zechner
355bc5adc3 docs: add missing changelog entries for commits since v0.50.3
- ai: Vercel AI Gateway routing support (#1051)
- tui: Ctrl+B/Ctrl+F keybindings (#1053), character jump navigation (#1074),
  line boundary navigation (#1050), performance optimizations (#1084)
- coding-agent: set_session_name RPC (#1075), config selector folder names (#1064)
- Cross-package duplication of tui/ai changes to coding-agent
- Add New Features section to coding-agent changelog
2026-01-30 03:25:00 +01:00
Fero
20ca6836b0
fix(tui): blockquote multiline rendering and wrapping (#1073)
* fix(tui): blockquote multiline rendering and wrapping

Fix two bugs in blockquote rendering:

1. ANSI codes split incorrectly on newlines - when text tokens contain
   newlines, applyDefaultStyle() wrapped the entire string including the
   newline in ANSI codes. Any caller splitting by \n would break the codes.
   Fixed by splitting text by newlines before styling in renderInlineTokens().

2. Wrapped blockquote lines lost the │ border - long blockquote lines
   that wrapped to multiple lines only had the border on the first line.
   Fixed by wrapping within the blockquote case and adding border to each line.

* test(tui): add test for inline formatting inside blockquotes
2026-01-30 03:02:38 +01:00
4h9fbZ
ab37d661af
feat(tui): jump to line start/end when pressing up/down at boundaries (#1050)
When cursor is on the first visual line and up is pressed, jump to
start of line instead of doing nothing. When cursor is on the last
visual line and down is pressed, jump to end of line instead of doing
nothing. This matches standard behavior in most native text inputs.
2026-01-30 02:42:24 +01:00
Can Bölük
4058346a64
perf(tui): optimize image line detection and box cache (#1084)
- Add isImageLine() to terminal-image.ts with single startsWith check based on detected terminal protocol
- Replace dual includes() checks in tui.ts with imported isImageLine()
- Add image line handling to markdown.ts to skip wrapping and margins for image escapes
- Consolidate Box cache into RenderCache type with childLines/width/bgSample/lines fields
- Use in-place mutation in applyLineResets() to avoid array allocation
2026-01-30 02:25:19 +01:00
Nathan Igo
902473797d
feat(tui,coding-agent): add ctrl+b/ctrl+f cursor navigation keybindings (#1053) 2026-01-30 01:43:54 +01:00
Sviatoslav Abakumov
c5d16fe456
feat(tui): add character jump navigation (Ctrl+], Ctrl+Alt+]) (#1074)
Add Bash/Readline-style character search:

- Ctrl+] enters forward jump mode, awaits next character, jumps to it
- Ctrl+Alt+] does the same but searches backward
- Multi-line search
- Case-sensitive matching
- Pressing the hotkey again cancels; control chars cancel and fall
  through
2026-01-30 01:42:14 +01:00
Mario Zechner
c6557b93be docs(tui): note quoted autocomplete fix 2026-01-30 00:29:33 +01:00
Mario Zechner
f181385859 fix(tui): avoid duplicating quotes during autocomplete 2026-01-30 00:26:24 +01:00
Mario Zechner
1665636fbe fix(tui): close quoted directory paths during autocomplete 2026-01-30 00:20:14 +01:00
Mario Zechner
dc8539a001 fix(tui): support quoted paths with spaces in autocomplete
Fixes #1077
2026-01-30 00:11:12 +01:00
Mario Zechner
df667b510a Release v0.50.3 2026-01-29 04:19:02 +01:00
Mario Zechner
ded2d6399e Add [Unreleased] section for next cycle 2026-01-29 03:24:32 +01:00
Mario Zechner
9bb627a524 Release v0.50.2 2026-01-29 03:23:41 +01:00
Mario Zechner
58aa7096dd docs: add missing changelog entries for v0.50.1..HEAD commits 2026-01-29 03:22:00 +01:00
Colin Mason
b212314f45 feat: add autocompleteMaxVisible setting for configurable dropdown height 2026-01-29 03:16:52 +01:00
Sviatoslav Abakumov
b54d689ec1
A couple of autocomplete improvements (#1024)
* fix(tui): keep file suggestions open when typing in Tab-triggered mode

Previously, pressing Tab on an empty prompt or after a space would show
file suggestions, but typing a letter would dismiss them because the
text didn't look like a path pattern. Now the editor tracks whether
autocomplete was triggered via Tab (force mode) or naturally (regular
mode), and uses the appropriate suggestion method when updating.

* fix(tui): hide autocomplete when backspacing slash command to empty

Previously, typing / showed slash command suggestions, but pressing
Backspace to delete it showed file suggestions instead of hiding all
suggestions.
2026-01-29 02:48:09 +01:00
Sviatoslav Abakumov
d57a26c88b
fix(tui): remove backslash input buffering (#1037)
Instead of buffering `\` and waiting for the next key, let it be
inserted immediately. On Enter, check if preceded by `\` and treat as
newline.

Removed backslash handling from the Input component entirely.
2026-01-29 02:47:15 +01:00
Mario Zechner
81be81328c feat(tui,coding-agent): add shell-style keybindings alt+b, alt+f, ctrl+d
- Add alt+b/alt+f as alternative bindings for cursorWordLeft/cursorWordRight
- Add ctrl+d as alternative binding for deleteCharForward
- Fix ctrl+d in custom editor to perform delete when text is present
  (previously it was always consumed, even with non-empty input)

Closes #1043

Co-authored-by: Jason Ish <ish@unx.ca>
2026-01-29 00:21:39 +01:00
Thomas Mustier
e7b9209daf
fix(tui): improve table rendering with row dividers and min width (#997)
* fix(tui): improve table rendering

* fix(tui): handle narrow table widths
2026-01-28 02:42:08 +01:00
mom
fb693fbc90 perf(tui): scan only bottom terminal height lines in extractCursorPosition 2026-01-28 01:40:57 +00:00
mom
9d47747ff6 perf(tui): early-out extractCursorPosition when cursor is above visible viewport 2026-01-28 01:37:43 +00:00
Can Bölük
a8f33fd630
perf(tui): optimized extractCursorPosition to scan lines in reverse order (#1004)
- Optimized extractCursorPosition to scan lines in reverse order for improved performance.
2026-01-28 02:34:50 +01:00
Sviatoslav Abakumov
1224b31135
feat(tui): auto-apply single suggestion in force file autocomplete (#993)
When Tab triggers file autocomplete and there's exactly one matching
suggestion, apply it immediately without showing the menu. This makes
path completion faster by eliminating the extra Tab press to confirm.
2026-01-28 02:12:18 +01:00
Mario Zechner
2cc2544809 Add [Unreleased] section for next cycle 2026-01-27 00:15:42 +01:00
Mario Zechner
29c59d79ba Release v0.50.1 2026-01-27 00:14:58 +01:00
Mario Zechner
2bbc1a7659 Add [Unreleased] section for next cycle 2026-01-26 16:55:24 +01:00
Mario Zechner
453e104d3a Release v0.50.0 2026-01-26 16:54:37 +01:00
Mario Zechner
a6f9c3cf0d fix(tui): fix scrollback overwrite when appending lines past viewport
Appended lines were not committed to terminal scrollback because the
renderer used cursor movement (CSI B) and carriage return without
linefeed. This caused earlier content to be overwritten when the
viewport filled up.

Changes:
- For appended lines, emit \r\n to create real scrollback lines
- When target row is below viewport, scroll with \r\n before positioning
- Add PI_TUI_WRITE_LOG env var for debugging raw ANSI output
- Add fullRedraws readonly property to TUI class
- Add viewport-overwrite-repro.ts test script

fixes #954
2026-01-26 16:51:28 +01:00
Mario Zechner
fa8b26a184 docs: update changelog guidance and links 2026-01-26 15:45:51 +01:00
Nico Bailon
c565fa9af8
fix(tui): keep overlays centered across resizes (#950) 2026-01-26 09:43:16 +01:00
aos
225fcb3830
feat: make session selector keybindings configurable (#948)
I lost my ability to select up and down in the session selector because
of some hardcoded keybindings again... So, I am adding these
configurable keybindings so I can `ctrl+p` to select up :-)

### Changes

Adds 4 new keybinding actions for the session picker (/resume):
- `toggleSessionPath` (ctrl+p) - toggle path display
- `toggleSessionSort` (ctrl+r) - toggle sort mode
- `deleteSession` (ctrl+d) - delete selected session
- `deleteSessionNoninvasive` (ctrl+backspace) - delete when query empty

Refactors session-selector to use `kb.matches()` instead of hardcoded key checks.
2026-01-25 20:08:11 +01:00
Sviatoslav Abakumov
beb1455cab
fix(tui): move lastAction handling out of setTextInternal()
The caller is responsible for doing that.
2026-01-25 17:50:55 +04:00
Sviatoslav Abakumov
609095b0b6
fix(tui): refactor the multi-line insertion handling 2026-01-25 17:50:50 +04:00
Sviatoslav Abakumov
7d2d170c1b
fix(tui): handle multi-line text in insertTextAtCursor()
Add insertTextAtCursorInternal() to properly handle newlines by splitting
lines at the cursor position.

- Normalize line endings (CRLF/CR to LF)
- Handle single-line and multi-line insertion
- Position cursor at end of inserted text
- Call onChange only once at the end

Refactor handlePaste() to use insertTextAtCursorInternal() for
multi-line pastes, while retaining character-by-character insertion for
single-line pastes to preserve autocomplete triggering.
2026-01-25 17:28:54 +04:00
Mario Zechner
79ded84d46
Merge pull request #936 from Perlence/fix/extension-editor-padding-x
fix(coding-agent): propagate paddingX to custom editors
2026-01-24 20:48:41 +01:00
Sviatoslav Abakumov
2bbc255237
fix(coding-agent): propagate paddingX to custom editors
setCustomEditorComponent() was not copying the paddingX setting from
the default editor to extension-provided editors. Also propagate live
changes from the settings callback.
2026-01-24 21:00:14 +04:00