Elffuss BraidHub

kikocis/continue public

main · 417 BRawPermalink
1import { RuleWithSource, SlashCommandWithSource } from "../..";
2
3export function convertRuleBlockToSlashCommand(
4 rule: RuleWithSource,
5): SlashCommandWithSource {
6 return {
7 name:
8 rule.name ||
9 (rule.rule.length > 20 ? rule.rule.substring(0, 20) + "..." : rule.rule),
10 description: rule.description ?? "",
11 prompt: rule.rule,
12 source: "invokable-rule",
13 promptFile: rule.ruleFile,
14 };
15}