Commit Graph

355 Commits

Author SHA1 Message Date
Mario Zechner 21917fed37 Merge pull request #5499 from Roman-Galeev/fix/editor-cursor-move-refresh-autocomplete
fix(tui): re-query autocomplete picker on cursor movement
2026-06-08 13:13:05 +02:00
Mario Zechner 718215bd95 feat(coding-agent): add extension project trust decisions 2026-06-08 12:59:08 +02:00
Roman Galeev 9d007fe642 fix(tui): re-query autocomplete picker on cursor movement
moveCursor() repositioned the cursor but never called updateAutocomplete()
or cancelAutocomplete(), unlike insertCharacter()/handleBackspace(). So an
open autocomplete picker went stale when the cursor moved: e.g. typing
`/cmd ` (argument menu open) then arrowing Left back into the command name
left the argument list showing against a `/cmd` prefix, and a Tab there
concatenated the stale suggestion onto the partial command name
(e.g. `/swarepo`).

Sync the picker at the end of moveCursor(): when a picker is open, re-query
via updateAutocomplete(), which refreshes the list for the new cursor
position or closes it when nothing matches.

Adds a regression test in test/editor.test.ts (verified to fail without the
fix). Fixes earendil-works/pi#5496.
2026-06-08 10:57:50 +02:00
Mario Zechner 130ae577ac fix(tui,coding-agent): make keyboard protocol fallback response-driven
closes #5188
2026-06-07 17:04:19 +02:00
Mario Zechner 59d7025668 fix(tui): position cursor for prompt history navigation
closes #5454
2026-06-07 10:56:09 +02:00
Mario Zechner 13898f048f Fix TUI tab width accounting
closes #5218
2026-06-02 13:54:47 +02:00
Nico Bailon 91a2f86600 fix(tui): harden overlay focus restoration 2026-05-31 21:20:33 -07:00
Nico Bailon 735ccbd00f fix(tui): release overlay focus to explicit targets
Add an explicit overlay unfocus target so callers can move input to the editor or another component while overlays remain visible. Align fallback overlay focus with visual focus order and cover blocked replacement release, null targets, and multi-overlay cycling.
2026-05-30 13:29:36 -07:00
Nico Bailon 5d9b28ee43 fix(tui): keep focused overlays interactive after UI
Preserve a focused visible overlay as the input owner across extension custom UI replacement, while letting the replacement receive and close its own input before focus is restored. Fixes #5129.
2026-05-30 13:29:36 -07:00
Mario Zechner 9c4a3f3518 Fix ANSI wrapping stack overflow
closes #5185
2026-05-30 01:02:48 +02:00
Marek Pazik 9d2bceba5d fix(tui): forward OSC 8 hyperlinks under tmux when the client supports them
detectCapabilities previously disabled hyperlinks under tmux unconditionally. tmux re-emits OSC 8 to the outer terminal only when the attached client advertises the 'hyperlinks' feature in client_termfeatures, and strips them otherwise.

Probe the running server with 'tmux display-message -p #{client_termfeatures}' and enable hyperlinks only when the feature is listed. The probe fails closed: any error (no tmux/server, timeout, old tmux) yields false. images stays null; only the hyperlink decision changed. The probe is injected into detectCapabilities so it stays testable without spawning a process.
2026-05-29 22:02:25 +10:00
Armin Ronacher 6ab62a06d7 fix(tui): harden keyboard protocol negotiation 2026-05-27 22:23:39 +02:00
xu0o0 701801dec2 fix(tui): align input word segmentation with editor (#5068) 2026-05-27 20:50:04 +02:00
Sviatoslav Abakumov 4bbe2959bd fix(tui): provide the JetBrains terminal capabilities (#5037) 2026-05-27 12:20:44 +02:00
xu0o0 b62776e4a2 fix(tui): preserve ASCII punctuation word boundaries with Intl.Segmenter (#5067) 2026-05-27 12:12:10 +02:00
Armin Ronacher 2531fc130d fix(ui): preserve user ordered-list markers (closes #5013) 2026-05-27 01:03:33 +02:00
xu0o0 4402100830 fix(tui): leverage Intl.Segmenter for proper Unicode word boundaries (#5022) 2026-05-27 00:28:47 +02:00
Armin Ronacher 3eb002766f fix(tui): enable OSC 8 for Windows Terminal (closes #4923) 2026-05-25 00:55:39 +02:00
Armin Ronacher 30b3ab3532 fix(tui): remove native modifier escape hatch 2026-05-23 15:32:38 +02:00
Armin Ronacher c5181a266e fix(tui): detect Apple Terminal Shift+Enter 2026-05-23 15:09:01 +02:00
Mario Zechner 4868222e34 chore(tui): replace koffi with Windows VT input helper
closes #4480
2026-05-21 00:21:21 +02:00
Armin Ronacher 23b361cfd0 fix(tui): initialize loader before starting indicator 2026-05-20 01:16:49 +02:00
Armin Ronacher ae9450dc51 chore(ts): use source import extensions 2026-05-20 00:04:03 +02:00
Armin Ronacher dafcf61a34 fix: align theme truecolor detection 2026-05-18 21:56:48 +02:00
Mikhail f. Shiryaev 7f30fb6136 Address edge-case with kitty protocol in wezterm
packages/tui/src/stdin-buffer.ts — in extractCompleteSequences, after finding \x1b\x1b as "complete" (legacy meta-key), check if the next character in the buffer would start a new escape sequence ([, ], O, P, _). If so, emit only the first \x1b and let the second ESC begin a new parse iteration.

packages/tui/test/stdin-buffer.test.ts — three new cases in the Kitty section:
- \x1b\x1b[27;129:3u (num_lock) splits into ["\x1b", "\x1b[27;129:3u"]
- \x1b\x1b[27;1:3u (no num_lock) splits into ["\x1b", "\x1b[27;1:3u"]
- \x1b\x1b alone (no following CSI) still emits as ["\x1b\x1b"] — preserves ctrl+alt+[
2026-05-13 18:43:42 +02:00
Mario Zechner e3faf41801 fix(tui): cap portrait image render height 2026-05-13 16:12:48 +02:00
xu0o0 c08c462461 fix(tui): place image correctly when viewport height < image height (#4461)
fixes #4415
2026-05-13 14:37:48 +02:00
Nelson Herrera 8da1f3d131 fix(tui): Make markdown.ts more robust to large markdown files (#4463) 2026-05-13 10:31:09 +02:00
Sviatoslav Abakumov 863341fbf5 fix(tui): render the checkboxes in the to-do list items 2026-05-10 22:20:40 +04:00
Sviatoslav Abakumov 116bffeb88 feat(tui): wrap list items with indent 2026-05-08 23:03:22 +04:00
Mario Zechner 801db80b65 fix(tui): bound kitty image id parsing 2026-05-07 12:21:29 +02:00
Armin Ronacher 83a917073c fix(tui): remove explicit image ids 2026-05-07 10:43:07 +02:00
Armin Ronacher b8712457d2 fix(tui): keep kitty image redraws inside TUI
Fixes #4208.
2026-05-07 10:34:37 +02:00
Armin Ronacher c9e87d2aa6 fix(tui): disable inline images in cmux
Treat CMUX_WORKSPACE_ID like tmux/screen for terminal capabilities and document the issue link.

fixes #4208
2026-05-06 11:09:55 +02:00
Mario Zechner c806dea15e fix(tui): preserve OSC 8 hyperlink terminators 2026-05-05 13:48:15 +02:00
Armin Ronacher 1bc640e53a fix(tui): prioritize exact fuzzy matches 2026-05-04 20:24:13 +02:00
Mario Zechner 32f7fc6aa5 fix(tui): respect environment terminal dimensions
closes #4004
2026-04-30 10:29:42 +02:00
Mario Zechner 20ca45d574 fix(tui): skip Thai AM normalization when absent
closes #3904
2026-04-29 23:04:46 +02:00
Mario Zechner 338ce3a365 fix(tui): normalize Thai AM terminal output
closes #3904
2026-04-29 23:01:04 +02:00
Mario Zechner bc668826ed fix(tui): handle Thai Sara Am width
closes #3904
2026-04-29 22:58:19 +02:00
Mario Zechner bdb416cbc0 fix(tui): deduplicate kitty printable input
closes #3780
2026-04-27 21:02:40 +02:00
Georgi d06db09a53 fix(tui): decode CSI-u Ctrl+letter inside bracketed paste, fixes #3599 (#3623)
Co-authored-by: Georgi Chochev <georgi.chochev@siteground.com>
2026-04-24 13:30:49 +02:00
Mario Zechner 76bc605ad1 fix(tui): keep terminal progress alive
closes #3610
2026-04-23 23:39:06 +02:00
Mario Zechner 3dacaa8ed9 fix(coding-agent,tui): drop typebox compiler shim and fix progress 2026-04-22 21:12:20 +02:00
Mario Zechner 8234ebf9ee feat(coding-agent,tui): add stacked autocomplete providers closes #2983 2026-04-22 15:44:08 +02:00
Mario Zechner a900d25119 feat(tui,coding-agent): add OSC 9;4 terminal progress indicators
Emit OSC 9;4 progress start/end sequences during agent streaming and
compaction so terminals (iTerm2, WezTerm, Windows Terminal, Kitty, etc.)
show activity in their tab bar.

Made with love for @lucasmeijer
2026-04-22 11:55:52 +02:00
Mario Zechner 780d536727 fix(tui): follow symlinks in fuzzy autocomplete closes #3507 2026-04-22 00:35:19 +02:00
Mario Zechner 968430f63e fix(tui): avoid cwd-path matches in @ autocomplete
Only use fd --full-path for path queries so plain fuzzy @ autocomplete results no longer depend on whether the cwd path contains the query text.

closes #2778
2026-04-20 22:44:34 +02:00
Mario Zechner 5a4e22ea44 fix(coding-agent): remove process-cwd tool singletons and use tool-name allowlists
- switch SDK/CLI tool selection to name-based allowlists
- apply allowlists across built-in, extension, and SDK tools
- remove ambient process.cwd defaults from core tooling and resource helpers
- update tests, examples, and TUI callers for explicit cwd plumbing
- add regression coverage for extension tool filtering

closes #3452
closes #2835
2026-04-20 22:05:28 +02:00
Mario Zechner 74139c3f66 feat(coding-agent): add configurable working indicator closes #3413 2026-04-20 16:28:39 +02:00