From f488b9c4d7a32fc95d3e6ca3795e96d48aa68311 Mon Sep 17 00:00:00 2001 From: Nate Date: Thu, 21 Aug 2025 16:14:44 -0700 Subject: [PATCH] fix: slash command behavior more --- extensions/cli/src/slashCommands.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/extensions/cli/src/slashCommands.ts b/extensions/cli/src/slashCommands.ts index daf8c4ff7..c88d8f13f 100644 --- a/extensions/cli/src/slashCommands.ts +++ b/extensions/cli/src/slashCommands.ts @@ -163,5 +163,16 @@ export async function handleSlashCommands( return { newInput }; } + // Check if this command would match any available commands (same logic as UI) + const allCommands = getAllSlashCommands(assistant); + const hasMatches = allCommands.some((cmd) => + cmd.name.toLowerCase().includes(command.toLowerCase()), + ); + + // If no commands match, treat this as regular text instead of an unknown command + if (!hasMatches) { + return null; + } + return { output: `Unknown command: ${command}` }; }