From 7281a2f0789db04acd8b58f929ec2b80c006f9f2 Mon Sep 17 00:00:00 2001 From: Nate Date: Thu, 21 Aug 2025 16:14:32 -0700 Subject: [PATCH] fix: slash command behavior --- extensions/cli/src/ui/UserInput.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/extensions/cli/src/ui/UserInput.tsx b/extensions/cli/src/ui/UserInput.tsx index bda7cb551..0ebfc2858 100644 --- a/extensions/cli/src/ui/UserInput.tsx +++ b/extensions/cli/src/ui/UserInput.tsx @@ -152,6 +152,17 @@ const UserInput: React.FC = ({ } } + // Check if there are any matching commands + const filteredCommands = allCommands.filter((cmd) => + cmd.name.toLowerCase().includes(afterSlash.toLowerCase()), + ); + + // If no commands match, hide the dropdown to allow normal Enter behavior + if (filteredCommands.length === 0) { + setShowSlashCommands(false); + return; + } + // Show selector for partial matches setShowSlashCommands(true); setSlashCommandFilter(afterSlash);