From 97a472f2fbccb50379bee43cade84f4f122c7fca Mon Sep 17 00:00:00 2001 From: Sambhav Khanna <125531539+sambhavKhanna@users.noreply.github.com> Date: Mon, 7 Jul 2025 15:43:27 -0400 Subject: [PATCH] fix(cli): Prevent Tab from auto-executing incomplete slash commands (#2919) Co-authored-by: matt korwel --- packages/cli/src/ui/components/InputPrompt.tsx | 7 +++++-- 1 file 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 = ({ } } else { const newValue = base + suggestion; - buffer.setText(newValue); - handleSubmitAndClear(newValue); + if (newValue === query) { + handleSubmitAndClear(newValue); + } else { + buffer.setText(newValue); + } } } else { const atIndex = query.lastIndexOf('@');