From ae9f87418da80c297de3f757b8755bb5e539d69a Mon Sep 17 00:00:00 2001 From: Tomasz Stefaniak Date: Thu, 11 Sep 2025 12:37:48 -0700 Subject: [PATCH] fix: formatting --- core/commands/slash/ruleBlockSlashCommand.ts | 4 +++- core/commands/slash/ruleBlockSlashCommand.vitest.ts | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/core/commands/slash/ruleBlockSlashCommand.ts b/core/commands/slash/ruleBlockSlashCommand.ts index 852d131a8..d907768cb 100644 --- a/core/commands/slash/ruleBlockSlashCommand.ts +++ b/core/commands/slash/ruleBlockSlashCommand.ts @@ -4,7 +4,9 @@ export function convertRuleBlockToSlashCommand( rule: RuleWithSource, ): SlashCommandWithSource { return { - name: rule.name || (rule.rule.length > 20 ? rule.rule.substring(0, 20) + "..." : rule.rule), + name: + rule.name || + (rule.rule.length > 20 ? rule.rule.substring(0, 20) + "..." : rule.rule), description: rule.description ?? "", prompt: rule.rule, source: "invokable-rule", diff --git a/core/commands/slash/ruleBlockSlashCommand.vitest.ts b/core/commands/slash/ruleBlockSlashCommand.vitest.ts index 45e9ae316..ccbc2df4f 100644 --- a/core/commands/slash/ruleBlockSlashCommand.vitest.ts +++ b/core/commands/slash/ruleBlockSlashCommand.vitest.ts @@ -47,7 +47,9 @@ describe("convertRuleBlockToSlashCommand", () => { const result = convertRuleBlockToSlashCommand(rule); expect(result.name).toBe("This is a very long ..."); - expect(result.prompt).toBe("This is a very long rule text that should be truncated"); + expect(result.prompt).toBe( + "This is a very long rule text that should be truncated", + ); }); it("should handle a rule without description", () => {