fix: slash command behavior more
This commit is contained in:
parent
7281a2f078
commit
f488b9c4d7
1 changed files with 11 additions and 0 deletions
|
|
@ -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}` };
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue