fix: prevent Shift+Tab from accepting prompt placeholder suggestion (#3051)

Add !key.shift guard to the Tab key handler for prompt suggestion
acceptance, so Shift+Tab only toggles approval mode without inserting
the placeholder text into the input.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
克竟 2026-04-09 20:18:09 +08:00
parent 4d2d4432d5
commit 5947512a79
2 changed files with 14 additions and 0 deletions

View file

@ -719,6 +719,7 @@ export const InputPrompt: React.FC<InputPromptProps> = ({
// because ACCEPT_SUGGESTION also matches Enter which must fall through to SUBMIT.
if (
key.name === 'tab' &&
!key.shift &&
buffer.text.length === 0 &&
!completion.showSuggestions &&
!reverseSearchActive &&