fix(cli): Prevent Tab from auto-executing incomplete slash commands (#2919)

Co-authored-by: matt korwel <matt.korwel@gmail.com>
This commit is contained in:
Sambhav Khanna 2025-07-07 15:43:27 -04:00 committed by GitHub
parent 2b135d0e9e
commit 97a472f2fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 2 deletions

View File

@ -132,8 +132,11 @@ export const InputPrompt: React.FC<InputPromptProps> = ({
}
} else {
const newValue = base + suggestion;
buffer.setText(newValue);
if (newValue === query) {
handleSubmitAndClear(newValue);
} else {
buffer.setText(newValue);
}
}
} else {
const atIndex = query.lastIndexOf('@');