Commit Graph

2494 Commits

Author SHA1 Message Date
jacob314 e2981da430 refactor(cli): simplify command completion orchestration and fix shell cache race
- Simplified `useCommandCompletion.tsx` by moving shell-specific tokenization into `useShellCompletion.ts`.
- Reverted most changes to the `useCommandCompletion` `useMemo` block to keep it clean and consistent with other modes.
- Fixed a potential race condition in `useShellCompletion.ts` where `scanPathExecutables` could be called multiple times if it was slow. It now caches the Promise itself.
- Updated tests to match the refined hook interfaces.
2026-02-25 10:35:14 -08:00
jacob314 1dbb9af41c fix(cli): prioritize shorter command names in shell autocomplete results 2026-02-25 10:00:14 -08:00
jacob314 b4724a1eed test(cli): update snapshots for shell autocompletion refinements 2026-02-25 09:37:28 -08:00
jacob314 4eea909f28 fix(cli): add Windows shell built-in commands to autocomplete list
On Windows, many common commands like `dir`, `copy`, `del`, etc., are internal to `cmd.exe` and do not exist as separate executables on the disk. This updates `scanPathExecutables` to explicitly include these built-ins when running on Windows, ensuring a consistent autocomplete experience for Windows users.
2026-02-25 09:26:38 -08:00
jacob314 af8462f76d fix(cli): disable shell autocompletion on completely empty prompts
To reduce visual noise and distraction, autocompletion is now suppressed when the shell prompt is entirely empty (or only contains whitespace). It remains active as soon as the user starts typing or moves the cursor to a position that would suggest paths/commands.
2026-02-25 09:09:33 -08:00
jacob314 2f4242fb60 fix(cli): prevent autocomplete UI flicker by decoupling disabled state reset from completion refresh
When typing outside of shell mode (e.g., using `@` completion), the `useShellCompletion` hook was continuously re-rendering and executing its `useEffect` because `performCompletion` was recreated on every keystroke (since its `query` dependency changed).

Because `enabled` was false, the effect unconditionally called `setSuggestions([])`, rapidly overriding the suggestions populated by `useAtCompletion` and causing severe UI flickering.

This splits the effect to ensure `setSuggestions([])` is only called once when `enabled` becomes false, stabilizing the suggestions list.
2026-02-25 08:58:31 -08:00
jacob314 aeecf5a9e7 fix(cli): prevent auto-submit on Enter when navigating to first shell autocomplete suggestion
When using shell autocomplete, pressing Down then Up returns the activeSuggestionIndex to 0. If the first suggestion happened to be an exact match, the InputPrompt would bypass the normal autocomplete logic and eagerly submit the prompt on Enter because it ignored whether the user had actively navigated.

This fix updates the isPerfectMatch check to require that the user has not navigated the suggestions list, ensuring that explicitly selected items always autocomplete instead of submitting.
2026-02-25 08:23:53 -08:00
MD. MOHIBUR RAHMAN dfa5c79a47 refactor(cli): centralize token parsing in useCommandCompletion to optimize re-renders 2026-02-24 05:22:51 +06:00
MD. MOHIBUR RAHMAN d6770d2ae9 fix(cli): escape executables in shell autocompletion to prevent command injection 2026-02-24 05:06:10 +06:00
MD. MOHIBUR RAHMAN c1d7bc4c8c fix(cli): escape npm script names in shell autocompletion to prevent command injection 2026-02-24 05:04:27 +06:00
MD. MOHIBUR RAHMAN 39b393abfb fix(cli): prevent command injection by escaping git branch suggestions 2026-02-24 04:25:16 +06:00
MD. MOHIBUR RAHMAN 5b3819073f fix(cli): add missing shell metacharacters (\n, \r, \t, \\) to escape regex 2026-02-24 04:14:54 +06:00
MD. MOHIBUR RAHMAN 926afab788 fix(cli): improve shell completion for dotfiles, spaces, and quotes 2026-02-24 03:41:33 +06:00
MD. MOHIBUR RAHMAN 555b95eb09 feat(cli): add context-sensitive shell completions for git and npm (#2492) 2026-02-24 02:52:20 +06:00
MD. MOHIBUR RAHMAN 0c6ebbd1f5 feat(cli): implement interactive shell autocompletion (#2492) 2026-02-24 01:49:30 +06:00
Tommaso Sciortino 813e0c18ac Allow ask headers longer than 16 chars (#20041) 2026-02-23 18:26:59 +00:00
Sri Pasumarthi 3966f3c053 feat: Map tool kinds to explicit ACP.ToolKind values and update test … (#19547) 2026-02-23 18:22:05 +00:00
Adib234 8b1dc15182 fix(plan): allow plan mode writes on Windows and fix prompt paths (#19658) 2026-02-23 17:48:50 +00:00
owenofbrien fa9aee2bf0 Fix for silent failures in non-interactive mode (#19905) 2026-02-23 17:35:13 +00:00
Abhi 621ddbe744 refactor(core): move session conversion logic to core (#19972) 2026-02-23 01:18:07 +00:00
Sehoon Shon c537fd5aec refactor(config): remove enablePromptCompletion from settings (#19974) 2026-02-22 19:10:20 -05:00
Abhi d2d345f41a fix(cli): filter subagent sessions from resume history (#19698) 2026-02-21 17:41:27 +00:00
Christian Gunderman dfd7721e69 Disallow unsafe returns. (#19767) 2026-02-21 01:12:56 +00:00
Jarrod Whelan 727f9b67b1 feat(cli): improve CTRL+O experience for both standard and alternate screen buffer (ASB) modes (#19010)
Co-authored-by: jacob314 <jacob314@gmail.com>
2026-02-21 00:26:11 +00:00
Christian Gunderman 58d637f919 Disallow and suppress unsafe assignment (#19736) 2026-02-20 22:28:55 +00:00
Sehoon Shon b746524a1b fix(cli): re-enable CLI banner (#19741) 2026-02-20 22:21:26 +00:00
Abhijit Balaji c5baf39dbd feat(policy): repurpose "Always Allow" persistence to workspace level (#19707) 2026-02-20 22:07:20 +00:00
Sehoon Shon b48970da15 fix(cli): use getDisplayString for manual model selection in dialog (#19726) 2026-02-20 22:03:32 +00:00
Jacob Richman 9a8e5d3940 fix(cli): extensions dialog UX polish (#19685) 2026-02-20 21:08:24 +00:00
Jacob Richman 089aec8b8d feat(cli): make JetBrains warning more specific (#19687) 2026-02-20 21:06:35 +00:00
Emily Hedlund a01d7e9a05 security: implement deceptive URL detection and disclosure in tool confirmations (#19288) 2026-02-20 20:21:31 +00:00
Emily Hedlund 49b2e76ee1 Revert "feat(ui): add source indicators to slash commands" (#19695) 2026-02-20 20:08:49 +00:00
Emily Hedlund aed348a99c security: strip deceptive Unicode characters from terminal output (#19026)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-02-20 20:04:32 +00:00
Spencer 239aa0909c fix(cli): allow perfect match @-path completions to submit on Enter (#19562) 2026-02-20 19:46:48 +00:00
Sehoon Shon f97b04cc9a feat(models): support Gemini 3.1 Pro Preview and fixes (#19676) 2026-02-20 19:19:21 +00:00
Spencer fe428936d5 feat(ui): improve startup warnings UX with dismissal and show-count limits (#19584) 2026-02-20 18:22:45 +00:00
Gal Zahavi d24f10b087 feat(cli): enhance folder trust with configuration discovery and security warnings (#19492)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-02-20 18:21:03 +00:00
Tommaso Sciortino d54702185b feat(cli): add support for numpad SS3 sequences (#19659) 2026-02-20 18:09:10 +00:00
christine betts 2bb7aaecd0 Add initial implementation of /extensions explore command (#19029) 2026-02-20 17:30:49 +00:00
Emily Hedlund d08b1efc72 feat(ui): add source indicators to slash commands (#18839) 2026-02-20 15:54:59 +00:00
matt korwel c3b52b8206 chore: resolve build warnings and update dependencies (#18880) 2026-02-20 03:25:56 +00:00
Abhijit Balaji d8b24e6983 feat(policy): implement project-level policy support (#18682) 2026-02-20 00:16:03 +00:00
Jerop Kipruto 537e56ffae feat(plan): support configuring custom plans storage directory (#19577) 2026-02-19 22:47:08 +00:00
Jack Wotherspoon 2cba2ab37a fix: remove extra padding in Composer (#19529) 2026-02-19 21:31:09 +00:00
christine betts ddc5458451 Revert "Add generic searchable list to back settings and extensions (… (#19434)
Co-authored-by: jacob314 <jacob314@gmail.com>
2026-02-19 21:06:37 +00:00
Dmitry Lyalin 372f41eab8 feat(cli): replace loading phrases boolean with enum setting (#19347) 2026-02-19 18:43:12 +00:00
Tommaso Sciortino 09b623fbd7 feat(cli): add experimental.useOSC52Copy setting (#19488) 2026-02-19 18:22:11 +00:00
Jacob Richman 082f41f54d Deflake windows tests. (#19511) 2026-02-19 16:17:34 +00:00
Valery Teplyakov 966eef14ee feat(acp): support set_mode interface (#18890) (#18891)
Co-authored-by: Mervap <megavaprold@gmail.com>
2026-02-19 11:07:46 -05:00
Valery Teplyakov 1a8d77329e fix(acp): Initialize config (#18897) (#18898)
Co-authored-by: Mervap <megavaprold@gmail.com>
Co-authored-by: Bryan Morgan <bryanmorgan@google.com>
2026-02-19 15:08:09 +00:00