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);