diff options
| author | Sambhav Khanna <[email protected]> | 2025-07-07 15:43:27 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-07-07 19:43:27 +0000 |
| commit | 97a472f2fbccb50379bee43cade84f4f122c7fca (patch) | |
| tree | 77c1ddae766821541c892025a6180a0788b154f7 /packages/cli/src | |
| parent | 2b135d0e9ec075226f391e58f45a41bf84cd2a85 (diff) | |
fix(cli): Prevent Tab from auto-executing incomplete slash commands (#2919)
Co-authored-by: matt korwel <[email protected]>
Diffstat (limited to 'packages/cli/src')
| -rw-r--r-- | packages/cli/src/ui/components/InputPrompt.tsx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/packages/cli/src/ui/components/InputPrompt.tsx b/packages/cli/src/ui/components/InputPrompt.tsx index 469a4ec5..763d4e7e 100644 --- a/packages/cli/src/ui/components/InputPrompt.tsx +++ b/packages/cli/src/ui/components/InputPrompt.tsx @@ -132,8 +132,11 @@ export const InputPrompt: React.FC<InputPromptProps> = ({ } } else { const newValue = base + suggestion; - buffer.setText(newValue); - handleSubmitAndClear(newValue); + if (newValue === query) { + handleSubmitAndClear(newValue); + } else { + buffer.setText(newValue); + } } } else { const atIndex = query.lastIndexOf('@'); |
