summaryrefslogtreecommitdiff
path: root/packages/cli/src
diff options
context:
space:
mode:
authorSambhav Khanna <[email protected]>2025-07-07 15:43:27 -0400
committerGitHub <[email protected]>2025-07-07 19:43:27 +0000
commit97a472f2fbccb50379bee43cade84f4f122c7fca (patch)
tree77c1ddae766821541c892025a6180a0788b154f7 /packages/cli/src
parent2b135d0e9ec075226f391e58f45a41bf84cd2a85 (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.tsx7
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('@');