MCPcopy Create free account
hub / github.com/Palm1r/QodeAssist / loadRules

Method loadRules

pluginllmcore/RulesLoader.cpp:16–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14namespace QodeAssist::PluginLLMCore {
15
16QString RulesLoader::loadRules(const QString &projectPath, RulesContext context)
17{
18 if (projectPath.isEmpty()) {
19 return QString();
20 }
21
22 QString combined;
23 QString basePath = projectPath + "/.qodeassist/rules";
24
25 switch (context) {
26 case RulesContext::Completions:
27 combined += loadAllMarkdownFiles(basePath + "/completions");
28 break;
29 case RulesContext::Chat:
30 combined += loadAllMarkdownFiles(basePath + "/common");
31 combined += loadAllMarkdownFiles(basePath + "/chat");
32 break;
33 case RulesContext::QuickRefactor:
34 combined += loadAllMarkdownFiles(basePath + "/common");
35 combined += loadAllMarkdownFiles(basePath + "/quickrefactor");
36 break;
37 }
38
39 return combined;
40}
41
42QString RulesLoader::loadRulesForProject(ProjectExplorer::Project *project, RulesContext context)
43{

Callers

nothing calls this directly

Calls 1

isEmptyMethod · 0.45

Tested by

no test coverage detected