From 06b76d752fb4f83b14053fffe2f85cb819e39ae6 Mon Sep 17 00:00:00 2001 From: tomasz-io Date: Thu, 3 Apr 2025 12:32:25 -0700 Subject: [PATCH] feat: if-rules --- core/llm/rules/isRuleActive.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/core/llm/rules/isRuleActive.ts b/core/llm/rules/isRuleActive.ts index 01cf1d98d..197a816bf 100644 --- a/core/llm/rules/isRuleActive.ts +++ b/core/llm/rules/isRuleActive.ts @@ -19,12 +19,14 @@ const evaluateIf = (condition: string, activePaths: string[]) => { try { debugger; - const evaluate = compileExpression(expression, { - extraFunctions: { - glob: createGlobFunction(activePaths), - }, + const evaluate = compileExpression(`current.model == "gpt-4"`, { + // extraFunctions: { + // glob: createGlobFunction(activePaths), + // }, constants: { - current: { model: "gpt-4" }, // Hardcoded for now + current: { + model: "gpt-4", + }, }, });