Changesets · Branches · Tags · Compare
| Changeset | b7ca0fa4fd0c031734694d4e5fc1575e139eca1633c05a2333002260d5a8a002 |
|---|---|
| Author | Dallin Romney <dallinromney@gmail.com> · 2025-07-17 20:34 +02:00 |
| Committer | GitHub <noreply@github.com> · 2025-07-17 11:34 -07:00 |
| Parents | a0535c60dff9 |
9 files changed
modified core/config/markdown/loadCodebaseRules.ts +42 −1
| @@ -7,6 +7,43 @@ | ||
| 7 | 7 | import { RULES_MARKDOWN_FILENAME } from "../../llm/rules/constants"; |
| 8 | 8 | import { getUriPathBasename } from "../../util/uri"; |
| 9 | 9 | |
| 10 | +export class CodebaseRulesCache { | |
| 11 | + private static instance: CodebaseRulesCache | null = null; | |
| 12 | + private constructor() {} | |
| 13 | + | |
| 14 | + public static getInstance(): CodebaseRulesCache { | |
| 15 | + if (CodebaseRulesCache.instance === null) { | |
| 16 | + CodebaseRulesCache.instance = new CodebaseRulesCache(); | |
| 17 | + } | |
| 18 | + return CodebaseRulesCache.instance; | |
| 19 | + } | |
| 20 | + rules: RuleWithSource[] = []; | |
| 21 | + errors: ConfigValidationError[] = []; | |
| 22 | + async refresh(ide: IDE) { | |
| 23 | + const { rules, errors } = await loadCodebaseRules(ide); | |
| 24 | + this.rules = rules; | |
| 25 | + this.errors = errors; | |
| 26 | + } | |
| 27 | + async update(ide: IDE, uri: string) { | |
| 28 | + const content = await ide.readFile(uri); | |
| 29 | + const rule = markdownToRule(content, { uriType: "file", filePath: uri }); | |
| 30 | + const ruleWithSource: RuleWithSource = { | |
| 31 | + ...rule, | |
| 32 | + source: "colocated-markdown", | |
| 33 | + ruleFile: uri, | |
| 34 | + }; | |
| 35 | + const matchIdx = this.rules.findIndex((r) => r.ruleFile === uri); | |
| 36 | + if (matchIdx === -1) { | |
| 37 | + this.rules.push(ruleWithSource); | |
| 38 | + } else { | |
| 39 | + this.rules[matchIdx] = ruleWithSource; | |
| 40 | + } | |
| 41 | + } | |
| 42 | + remove(uri: string) { | |
| 43 | + this.rules = this.rules.filter((r) => r.ruleFile !== uri); | |
| 44 | + } | |
| 45 | +} | |
| 46 | + | |
| 10 | 47 | /** |
| 11 | 48 | * Loads rules from rules.md files colocated in the codebase |
| 12 | 49 | */ |
| @@ -33,7 +70,11 @@ | ||
| 33 | 70 | const content = await ide.readFile(filePath); |
| 34 | 71 | const rule = markdownToRule(content, { uriType: "file", filePath }); |
| 35 | 72 | |
| 36 | - rules.push({ ...rule, source: "rules-block", ruleFile: filePath }); | |
| 73 | + rules.push({ | |
| 74 | + ...rule, | |
| 75 | + source: "colocated-markdown", | |
| 76 | + ruleFile: filePath, | |
| 77 | + }); | |
| 37 | 78 | } catch (e) { |
| 38 | 79 | errors.push({ |
| 39 | 80 | fatal: false, |
modified core/config/markdown/loadCodebaseRules.vitest.ts +4 −4
| @@ -45,27 +45,27 @@ | ||
| 45 | 45 | "src/rules.md": { |
| 46 | 46 | name: "General Rules", |
| 47 | 47 | rule: "Follow coding standards", |
| 48 | - source: "rules-block", | |
| 48 | + source: "colocated-markdown", | |
| 49 | 49 | ruleFile: "src/rules.md", |
| 50 | 50 | }, |
| 51 | 51 | "src/redux/rules.md": { |
| 52 | 52 | name: "Redux Rules", |
| 53 | 53 | rule: "Use Redux Toolkit", |
| 54 | 54 | globs: "**/*.{ts,tsx}", |
| 55 | - source: "rules-block", | |
| 55 | + source: "colocated-markdown", | |
| 56 | 56 | ruleFile: "src/redux/rules.md", |
| 57 | 57 | }, |
| 58 | 58 | "src/components/rules.md": { |
| 59 | 59 | name: "Component Rules", |
| 60 | 60 | rule: "Use functional components", |
| 61 | 61 | globs: ["**/*.tsx", "**/*.jsx"], |
| 62 | - source: "rules-block", | |
| 62 | + source: "colocated-markdown", | |
| 63 | 63 | ruleFile: "src/components/rules.md", |
| 64 | 64 | }, |
| 65 | 65 | ".continue/rules.md": { |
| 66 | 66 | name: "Global Rules", |
| 67 | 67 | rule: "Follow project guidelines", |
| 68 | - source: "rules-block", | |
| 68 | + source: "colocated-markdown", | |
| 69 | 69 | ruleFile: ".continue/rules.md", |
| 70 | 70 | }, |
| 71 | 71 | }; |
modified core/config/markdown/ruleCollocationApplication.vitest.ts +9 −9
| @@ -16,7 +16,7 @@ | ||
| 16 | 16 | { |
| 17 | 17 | name: "Root Rule", |
| 18 | 18 | rule: "Follow project standards", |
| 19 | - source: "rules-block", | |
| 19 | + source: "colocated-markdown", | |
| 20 | 20 | ruleFile: ".continue/rules.md", |
| 21 | 21 | }, |
| 22 | 22 | |
| @@ -24,7 +24,7 @@ | ||
| 24 | 24 | { |
| 25 | 25 | name: "React Components Rule", |
| 26 | 26 | rule: "Use functional components with hooks", |
| 27 | - source: "rules-block", | |
| 27 | + source: "colocated-markdown", | |
| 28 | 28 | ruleFile: "src/components/rules.md", |
| 29 | 29 | // No explicit globs - should implicitly only apply to files in that directory |
| 30 | 30 | }, |
| @@ -34,7 +34,7 @@ | ||
| 34 | 34 | name: "Redux Rule", |
| 35 | 35 | rule: "Use Redux Toolkit for state management", |
| 36 | 36 | globs: "src/redux/**/*.{ts,tsx}", |
| 37 | - source: "rules-block", | |
| 37 | + source: "colocated-markdown", | |
| 38 | 38 | ruleFile: "src/redux/rules.md", |
| 39 | 39 | }, |
| 40 | 40 | |
| @@ -43,7 +43,7 @@ | ||
| 43 | 43 | name: "TypeScript Components Rule", |
| 44 | 44 | rule: "Use TypeScript with React components", |
| 45 | 45 | globs: "**/*.tsx", // Only apply to .tsx files |
| 46 | - source: "rules-block", | |
| 46 | + source: "colocated-markdown", | |
| 47 | 47 | ruleFile: "src/components/rules.md", |
| 48 | 48 | }, |
| 49 | 49 | |
| @@ -52,7 +52,7 @@ | ||
| 52 | 52 | name: "API Utils Rule", |
| 53 | 53 | rule: "Follow API utility conventions", |
| 54 | 54 | globs: "**/*.ts", // Only TypeScript files in this directory |
| 55 | - source: "rules-block", | |
| 55 | + source: "colocated-markdown", | |
| 56 | 56 | ruleFile: "src/utils/api/rules.md", |
| 57 | 57 | }, |
| 58 | 58 | ]; |
| @@ -183,7 +183,7 @@ | ||
| 183 | 183 | const impliedComponentRule: RuleWithSource = { |
| 184 | 184 | name: "Implied Components Rule", |
| 185 | 185 | rule: "Use React component best practices", |
| 186 | - source: "rules-block", | |
| 186 | + source: "colocated-markdown", | |
| 187 | 187 | ruleFile: "src/components/rules.md", |
| 188 | 188 | // No explicit globs - should infer from directory |
| 189 | 189 | }; |
| @@ -233,7 +233,7 @@ | ||
| 233 | 233 | name: "TypeScript Component Rule", |
| 234 | 234 | rule: "Use TypeScript with React components", |
| 235 | 235 | globs: "**/*.tsx", // Only apply to .tsx files |
| 236 | - source: "rules-block", | |
| 236 | + source: "colocated-markdown", | |
| 237 | 237 | ruleFile: "src/components/rules.md", |
| 238 | 238 | }; |
| 239 | 239 | |
| @@ -280,7 +280,7 @@ | ||
| 280 | 280 | name: "API Utils Rule", |
| 281 | 281 | rule: "Follow API utility conventions", |
| 282 | 282 | globs: "**/*.ts", // Only TypeScript files in this directory |
| 283 | - source: "rules-block", | |
| 283 | + source: "colocated-markdown", | |
| 284 | 284 | ruleFile: "src/utils/api/rules.md", |
| 285 | 285 | }; |
| 286 | 286 | |
| @@ -323,7 +323,7 @@ | ||
| 323 | 323 | return { |
| 324 | 324 | name: `Inferred Rule for ${directory}`, |
| 325 | 325 | rule: `Follow standards for ${directory}`, |
| 326 | - source: "rules-block", | |
| 326 | + source: "colocated-markdown", | |
| 327 | 327 | ruleFile: ruleFilePath, |
| 328 | 328 | // In a fixed implementation, these globs would be automatically inferred |
| 329 | 329 | // globs: expectedGlob, |
modified core/config/profile/doLoadConfig.ts +4 −5
| @@ -37,7 +37,7 @@ | ||
| 37 | 37 | import { TTS } from "../../util/tts"; |
| 38 | 38 | import { getWorkspaceContinueRuleDotFiles } from "../getWorkspaceContinueRuleDotFiles"; |
| 39 | 39 | import { loadContinueConfigFromJson } from "../load"; |
| 40 | -import { loadCodebaseRules } from "../markdown/loadCodebaseRules"; | |
| 40 | +import { CodebaseRulesCache } from "../markdown/loadCodebaseRules"; | |
| 41 | 41 | import { loadMarkdownRules } from "../markdown/loadMarkdownRules"; |
| 42 | 42 | import { migrateJsonSharedConfig } from "../migrateSharedConfig"; |
| 43 | 43 | import { rectifySelectedModelsFromGlobalContext } from "../selectedModels"; |
| @@ -165,10 +165,9 @@ | ||
| 165 | 165 | } |
| 166 | 166 | |
| 167 | 167 | // Add rules from colocated rules.md files in the codebase |
| 168 | - const { rules: codebaseRules, errors: codebaseRulesErrors } = | |
| 169 | - await loadCodebaseRules(ide); | |
| 170 | - newConfig.rules.unshift(...codebaseRules); | |
| 171 | - errors.push(...codebaseRulesErrors); | |
| 168 | + const codebaseRulesCache = CodebaseRulesCache.getInstance(); | |
| 169 | + newConfig.rules.unshift(...codebaseRulesCache.rules); | |
| 170 | + errors.push(...codebaseRulesCache.errors); | |
| 172 | 171 | |
| 173 | 172 | // Rectify model selections for each role |
| 174 | 173 | newConfig = rectifySelectedModelsFromGlobalContext(newConfig, profileId); |
modified core/core.ts +34 −10
| @@ -52,6 +52,7 @@ | ||
| 52 | 52 | import { getDiffFn, GitDiffCache } from "./autocomplete/snippets/gitDiffCache"; |
| 53 | 53 | import { stringifyMcpPrompt } from "./commands/slash/mcpSlashCommand"; |
| 54 | 54 | import { isLocalDefinitionFile } from "./config/loadLocalAssistants"; |
| 55 | +import { CodebaseRulesCache } from "./config/markdown/loadCodebaseRules"; | |
| 55 | 56 | import { |
| 56 | 57 | setupLocalConfig, |
| 57 | 58 | setupProviderConfig, |
| @@ -69,11 +70,11 @@ | ||
| 69 | 70 | import { llmStreamChat } from "./llm/streamChat"; |
| 70 | 71 | import { BeforeAfterDiff } from "./nextEdit/context/diffFormatting"; |
| 71 | 72 | import { processSmallEdit } from "./nextEdit/context/processSmallEdit"; |
| 73 | +import { NextEditProvider } from "./nextEdit/NextEditProvider"; | |
| 72 | 74 | import type { FromCoreProtocol, ToCoreProtocol } from "./protocol"; |
| 73 | 75 | import { OnboardingModes } from "./protocol/core"; |
| 74 | 76 | import type { IMessenger, Message } from "./protocol/messenger"; |
| 75 | 77 | import { getUriPathBasename } from "./util/uri"; |
| 76 | -import { NextEditProvider } from "./nextEdit/NextEditProvider"; | |
| 77 | 78 | |
| 78 | 79 | const hasRulesFiles = (uris: string[]): boolean => { |
| 79 | 80 | for (const uri of uris) { |
| @@ -235,6 +236,15 @@ | ||
| 235 | 236 | (..._) => Promise.resolve([]), |
| 236 | 237 | ); |
| 237 | 238 | |
| 239 | + const codebaseRulesCache = CodebaseRulesCache.getInstance(); | |
| 240 | + void codebaseRulesCache | |
| 241 | + .refresh(ide) | |
| 242 | + .catch((e) => console.error("Failed to initialize colocated rules cache")) | |
| 243 | + .then(() => { | |
| 244 | + void this.configHandler.reloadConfig( | |
| 245 | + "Initial codebase rules post-walkdir/load reload", | |
| 246 | + ); | |
| 247 | + }); | |
| 238 | 248 | this.nextEditProvider = NextEditProvider.initialize( |
| 239 | 249 | this.configHandler, |
| 240 | 250 | ide, |
| @@ -342,10 +352,12 @@ | ||
| 342 | 352 | }); |
| 343 | 353 | |
| 344 | 354 | on("config/reload", async (msg) => { |
| 355 | + // User force reloading will retrigger colocated rules | |
| 356 | + const codebaseRulesCache = CodebaseRulesCache.getInstance(); | |
| 357 | + await codebaseRulesCache.refresh(this.ide); | |
| 345 | 358 | void this.configHandler.reloadConfig( |
| 346 | 359 | "Force reloaded (config/reload message)", |
| 347 | 360 | ); |
| 348 | - return await this.configHandler.getSerializedConfig(); | |
| 349 | 361 | }); |
| 350 | 362 | |
| 351 | 363 | on("config/ideSettingsUpdate", async (msg) => { |
| @@ -682,9 +694,12 @@ | ||
| 682 | 694 | void refreshIfNotIgnored(data.uris); |
| 683 | 695 | |
| 684 | 696 | if (hasRulesFiles(data.uris)) { |
| 697 | + const rulesCache = CodebaseRulesCache.getInstance(); | |
| 698 | + await Promise.all( | |
| 699 | + data.uris.map((uri) => rulesCache.update(this.ide, uri)), | |
| 700 | + ); | |
| 685 | 701 | await this.configHandler.reloadConfig("Rules file created"); |
| 686 | 702 | } |
| 687 | - | |
| 688 | 703 | // If it's a local assistant being created, we want to reload all assistants so it shows up in the list |
| 689 | 704 | let localAssistantCreated = false; |
| 690 | 705 | for (const uri of data.uris) { |
| @@ -704,7 +719,9 @@ | ||
| 704 | 719 | void refreshIfNotIgnored(data.uris); |
| 705 | 720 | |
| 706 | 721 | if (hasRulesFiles(data.uris)) { |
| 707 | - await this.configHandler.reloadConfig("Rules file deleted"); | |
| 722 | + const rulesCache = CodebaseRulesCache.getInstance(); | |
| 723 | + data.uris.forEach((uri) => rulesCache.remove(uri)); | |
| 724 | + await this.configHandler.reloadConfig("Codebase rule file deleted"); | |
| 708 | 725 | } |
| 709 | 726 | } |
| 710 | 727 | }); |
| @@ -1020,17 +1037,24 @@ | ||
| 1020 | 1037 | uri.endsWith(".continuerc.json") || |
| 1021 | 1038 | uri.endsWith(".prompt") || |
| 1022 | 1039 | uri.endsWith(SYSTEM_PROMPT_DOT_FILE) || |
| 1023 | - (uri.includes(".continue") && uri.endsWith(".yaml")) || | |
| 1024 | - uri.endsWith(RULES_MARKDOWN_FILENAME) || | |
| 1025 | - BLOCK_TYPES.some( | |
| 1026 | - (blockType) => | |
| 1027 | - uri.includes(`.continue/${blockType}`) || | |
| 1028 | - uri.includes(`.continue\\${blockType}`), | |
| 1040 | + (uri.includes(".continue") && | |
| 1041 | + (uri.endsWith(".yaml") || uri.endsWith("yml"))) || | |
| 1042 | + BLOCK_TYPES.some((blockType) => | |
| 1043 | + uri.includes(`.continue/${blockType}`), | |
| 1029 | 1044 | ) |
| 1030 | 1045 | ) { |
| 1031 | 1046 | await this.configHandler.reloadConfig( |
| 1032 | 1047 | "Config-related file updated: continuerc, prompt, local block, etc", |
| 1033 | 1048 | ); |
| 1049 | + } else if (uri.endsWith(RULES_MARKDOWN_FILENAME)) { | |
| 1050 | + try { | |
| 1051 | + const codebaseRulesCache = CodebaseRulesCache.getInstance(); | |
| 1052 | + void codebaseRulesCache.update(this.ide, uri).then(() => { | |
| 1053 | + void this.configHandler.reloadConfig("Codebase rule update"); | |
| 1054 | + }); | |
| 1055 | + } catch (e) { | |
| 1056 | + console.error("Failed to update codebase rule", e); | |
| 1057 | + } | |
| 1034 | 1058 | } else if ( |
| 1035 | 1059 | uri.endsWith(".continueignore") || |
| 1036 | 1060 | uri.endsWith(".gitignore") |
modified core/index.d.ts +1 −0
| @@ -1664,6 +1664,7 @@ | ||
| 1664 | 1664 | | "model-options-plan" |
| 1665 | 1665 | | "model-options-agent" |
| 1666 | 1666 | | "rules-block" |
| 1667 | + | "colocated-markdown" | |
| 1667 | 1668 | | "json-systemMessage" |
| 1668 | 1669 | | ".continuerules"; |
| 1669 | 1670 |
modified core/llm/rules/ruleColocation.vitest.ts +9 −9
| @@ -9,7 +9,7 @@ | ||
| 9 | 9 | generalRule: { |
| 10 | 10 | name: "General Rule", |
| 11 | 11 | rule: "Follow coding standards", |
| 12 | - source: "rules-block", | |
| 12 | + source: "colocated-markdown", | |
| 13 | 13 | ruleFile: "src/rules.md", |
| 14 | 14 | }, |
| 15 | 15 | |
| @@ -18,7 +18,7 @@ | ||
| 18 | 18 | name: "Redux Rule", |
| 19 | 19 | rule: "Use Redux Toolkit", |
| 20 | 20 | globs: "src/redux/**/*.{ts,tsx}", |
| 21 | - source: "rules-block", | |
| 21 | + source: "colocated-markdown", | |
| 22 | 22 | ruleFile: "src/redux/rules.md", |
| 23 | 23 | }, |
| 24 | 24 | |
| @@ -27,7 +27,7 @@ | ||
| 27 | 27 | name: "Component Rule", |
| 28 | 28 | rule: "Use functional components", |
| 29 | 29 | globs: ["src/components/**/*.tsx", "src/components/**/*.jsx"], |
| 30 | - source: "rules-block", | |
| 30 | + source: "colocated-markdown", | |
| 31 | 31 | ruleFile: "src/components/rules.md", |
| 32 | 32 | }, |
| 33 | 33 | |
| @@ -37,7 +37,7 @@ | ||
| 37 | 37 | rule: "Follow these guidelines always", |
| 38 | 38 | alwaysApply: true, |
| 39 | 39 | globs: "src/specific/**/*.ts", // Should be ignored since alwaysApply is true |
| 40 | - source: "rules-block", | |
| 40 | + source: "colocated-markdown", | |
| 41 | 41 | ruleFile: ".continue/rules.md", |
| 42 | 42 | }, |
| 43 | 43 | |
| @@ -47,7 +47,7 @@ | ||
| 47 | 47 | rule: "This rule should only apply to matching files", |
| 48 | 48 | alwaysApply: false, |
| 49 | 49 | // No globs, so should never apply |
| 50 | - source: "rules-block", | |
| 50 | + source: "colocated-markdown", | |
| 51 | 51 | ruleFile: ".continue/rules.md", |
| 52 | 52 | }, |
| 53 | 53 | |
| @@ -57,7 +57,7 @@ | ||
| 57 | 57 | rule: "Apply only to matching files", |
| 58 | 58 | alwaysApply: false, |
| 59 | 59 | globs: "src/utils/**/*.ts", |
| 60 | - source: "rules-block", | |
| 60 | + source: "colocated-markdown", | |
| 61 | 61 | ruleFile: "src/utils/rules.md", |
| 62 | 62 | }, |
| 63 | 63 | }; |
| @@ -127,7 +127,7 @@ | ||
| 127 | 127 | rule: "Follow nested module standards", |
| 128 | 128 | // Fix: Specify the exact path prefix to restrict to this directory structure |
| 129 | 129 | globs: "src/features/auth/utils/**/*.ts", |
| 130 | - source: "rules-block", | |
| 130 | + source: "colocated-markdown", | |
| 131 | 131 | ruleFile: "src/features/auth/utils/rules.md", |
| 132 | 132 | }; |
| 133 | 133 | |
| @@ -157,7 +157,7 @@ | ||
| 157 | 157 | // Note: Negative globs may not be supported by the current implementation |
| 158 | 158 | // Testing with standard pattern instead |
| 159 | 159 | globs: "src/**/[!.]*.ts", |
| 160 | - source: "rules-block", | |
| 160 | + source: "colocated-markdown", | |
| 161 | 161 | ruleFile: "src/rules.md", |
| 162 | 162 | }; |
| 163 | 163 | |
| @@ -174,7 +174,7 @@ | ||
| 174 | 174 | // Use a pattern that doesn't match test files |
| 175 | 175 | globs: ["src/**/*.ts", "!src/**/*.test.ts", "!src/**/*.spec.ts"], |
| 176 | 176 | alwaysApply: false, |
| 177 | - source: "rules-block", | |
| 177 | + source: "colocated-markdown", | |
| 178 | 178 | ruleFile: "src/rules.md", |
| 179 | 179 | }; |
| 180 | 180 |
modified core/protocol/core.ts +1 −1
| @@ -91,7 +91,7 @@ | ||
| 91 | 91 | }, |
| 92 | 92 | ]; |
| 93 | 93 | "config/deleteModel": [{ title: string }, void]; |
| 94 | - "config/reload": [undefined, ConfigResult<BrowserSerializedContinueConfig>]; | |
| 94 | + "config/reload": [undefined, void]; | |
| 95 | 95 | "config/refreshProfiles": [ |
| 96 | 96 | ( |
| 97 | 97 | | undefined |
modified gui/src/components/mainInput/belowMainInput/RulesPeek.tsx +12 −5
| @@ -1,5 +1,6 @@ | ||
| 1 | 1 | import { DocumentTextIcon, GlobeAltIcon } from "@heroicons/react/24/outline"; |
| 2 | -import { RuleSource, RuleWithSource } from "core"; | |
| 2 | +import { RuleWithSource } from "core"; | |
| 3 | +import { getLastNPathParts } from "core/util/uri"; | |
| 3 | 4 | import { ComponentType, useMemo, useState } from "react"; |
| 4 | 5 | import ToggleDiv from "../../ToggleDiv"; |
| 5 | 6 | |
| @@ -13,8 +14,8 @@ | ||
| 13 | 14 | } |
| 14 | 15 | |
| 15 | 16 | // Convert technical source to user-friendly text |
| 16 | -const getSourceLabel = (source: RuleSource): string => { | |
| 17 | - switch (source) { | |
| 17 | +const getSourceLabel = (rule: RuleWithSource): string => { | |
| 18 | + switch (rule.source) { | |
| 18 | 19 | case "default-chat": |
| 19 | 20 | return "Default Chat"; |
| 20 | 21 | case "default-agent": |
| @@ -27,12 +28,18 @@ | ||
| 27 | 28 | return "Model Agent Options"; |
| 28 | 29 | case "rules-block": |
| 29 | 30 | return "Rules Block"; |
| 31 | + case "colocated-markdown": | |
| 32 | + if (rule.ruleFile) { | |
| 33 | + return getLastNPathParts(rule.ruleFile, 2); | |
| 34 | + } else { | |
| 35 | + return "rules.md"; | |
| 36 | + } | |
| 30 | 37 | case "json-systemMessage": |
| 31 | 38 | return "System Message"; |
| 32 | 39 | case ".continuerules": |
| 33 | 40 | return "Project Rules"; |
| 34 | 41 | default: |
| 35 | - return source; | |
| 42 | + return rule.source; | |
| 36 | 43 | } |
| 37 | 44 | }; |
| 38 | 45 | |
| @@ -95,7 +102,7 @@ | ||
| 95 | 102 | )} |
| 96 | 103 | </div> |
| 97 | 104 | <div className="mt-1 pl-6 pr-2 text-xs text-gray-500"> |
| 98 | - Source: {getSourceLabel(rule.source)} | |
| 105 | + Source: {getSourceLabel(rule)} | |
| 99 | 106 | </div> |
| 100 | 107 | </div> |
| 101 | 108 | ); |