refactor: Remove common project rules from code completion

This commit is contained in:
Petr Mironychev
2025-11-13 00:55:20 +01:00
parent 8492ef29b2
commit 191de10926

View File

@ -37,16 +37,16 @@ QString RulesLoader::loadRules(const QString &projectPath, RulesContext context)
QString combined; QString combined;
QString basePath = projectPath + "/.qodeassist/rules"; QString basePath = projectPath + "/.qodeassist/rules";
combined += loadAllMarkdownFiles(basePath + "/common");
switch (context) { switch (context) {
case RulesContext::Completions: case RulesContext::Completions:
combined += loadAllMarkdownFiles(basePath + "/completions"); combined += loadAllMarkdownFiles(basePath + "/completions");
break; break;
case RulesContext::Chat: case RulesContext::Chat:
combined += loadAllMarkdownFiles(basePath + "/common");
combined += loadAllMarkdownFiles(basePath + "/chat"); combined += loadAllMarkdownFiles(basePath + "/chat");
break; break;
case RulesContext::QuickRefactor: case RulesContext::QuickRefactor:
combined += loadAllMarkdownFiles(basePath + "/common");
combined += loadAllMarkdownFiles(basePath + "/quickrefactor"); combined += loadAllMarkdownFiles(basePath + "/quickrefactor");
break; break;
} }