From 15bbf19f2d4f974191b5fec64dd2e5de60bb1c57 Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Wed, 2 Jul 2025 16:06:18 -0700 Subject: [PATCH] update tests and remove debugger --- core/tools/implementations/createRuleBlock.test.ts | 4 ++++ gui/src/components/GenerateRuleDialog/GenerationScreen.tsx | 1 - gui/src/components/GenerateRuleDialog/useRuleGeneration.ts | 1 - 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core/tools/implementations/createRuleBlock.test.ts b/core/tools/implementations/createRuleBlock.test.ts index 261f8eeb9..4808037b4 100644 --- a/core/tools/implementations/createRuleBlock.test.ts +++ b/core/tools/implementations/createRuleBlock.test.ts @@ -36,6 +36,7 @@ test("createRuleBlockImpl should create a rule with glob pattern", async () => { const { frontmatter, markdown } = parseMarkdownRule(fileContent); expect(frontmatter).toEqual({ + alwaysApply: true, description: "Always use interfaces", globs: "**/*.{ts,tsx}", }); @@ -72,6 +73,7 @@ test("createRuleBlockImpl should create a rule with description pattern", async const { frontmatter, markdown } = parseMarkdownRule(fileContent); expect(frontmatter).toEqual({ + alwaysApply: true, description: "This is a detailed explanation of the rule", }); @@ -94,6 +96,7 @@ test("createRuleBlockImpl should include both globs and description in frontmatt const { frontmatter, markdown } = parseMarkdownRule(fileContent); expect(frontmatter).toEqual({ + alwaysApply: false, description: "This rule enforces our team standards", globs: "**/*.js", }); @@ -116,6 +119,7 @@ test("createRuleBlockImpl should create a rule with alwaysApply set to false", a const { frontmatter } = parseMarkdownRule(fileContent); expect(frontmatter).toEqual({ + alwaysApply: false, description: "Optional rule", }); }); diff --git a/gui/src/components/GenerateRuleDialog/GenerationScreen.tsx b/gui/src/components/GenerateRuleDialog/GenerationScreen.tsx index b697313d7..a4954ead7 100644 --- a/gui/src/components/GenerateRuleDialog/GenerationScreen.tsx +++ b/gui/src/components/GenerateRuleDialog/GenerationScreen.tsx @@ -92,7 +92,6 @@ export function GenerationScreen({ } try { - debugger; const options: any = { alwaysApply: formData.alwaysApply, }; diff --git a/gui/src/components/GenerateRuleDialog/useRuleGeneration.ts b/gui/src/components/GenerateRuleDialog/useRuleGeneration.ts index fe9677a3f..f877d7a4b 100644 --- a/gui/src/components/GenerateRuleDialog/useRuleGeneration.ts +++ b/gui/src/components/GenerateRuleDialog/useRuleGeneration.ts @@ -82,7 +82,6 @@ export function useRuleGeneration( setCreateRuleBlockArgs(null); try { - debugger; // Convert current history to ChatMessage format const chatMessages: ChatMessage[] = currentHistory.map( (item) => item.message,