continue-custom/core/commands/slash/ruleBlockSlashCommand.ts
Tomasz Stefaniak ae9f87418d fix: formatting
2025-09-11 12:37:48 -07:00

15 lines
417 B
TypeScript

import { RuleWithSource, SlashCommandWithSource } from "../..";
export function convertRuleBlockToSlashCommand(
rule: RuleWithSource,
): SlashCommandWithSource {
return {
name:
rule.name ||
(rule.rule.length > 20 ? rule.rule.substring(0, 20) + "..." : rule.rule),
description: rule.description ?? "",
prompt: rule.rule,
source: "invokable-rule",
promptFile: rule.ruleFile,
};
}