Elffuss BraidHub

kikocis/continue public

22e692d80113 · 457 BRawPermalink
1import { CustomCommand, SlashCommandWithSource } from "../..";
2
3export function convertCustomCommandToSlashCommand(
4 customCommand: CustomCommand,
5): SlashCommandWithSource {
6 const commandName = customCommand.name.startsWith("/")
7 ? customCommand.name.substring(1)
8 : customCommand.name;
9 return {
10 name: commandName,
11 description: customCommand.description ?? "",
12 prompt: customCommand.prompt,
13 source: "json-custom-command",
14 };
15}