better error message for slash command run thingy

This commit is contained in:
Dallin Romney 2025-06-27 21:38:33 -07:00
parent f19ac5950f
commit 8113cde7f6

View file

@ -60,7 +60,10 @@ export async function* llmStreamChat(
true,
);
if (!slashCommand.run) {
throw new Error(`Slash command ${command.name} is not a legacy command`);
console.error(
`Slash command ${command.name} (${command.source}) has no run function`,
);
throw new Error(`Slash command not found`);
}
const gen = slashCommand.run({