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

Method refreshRules

ChatView/ChatRootView.cpp:1142–1166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1140}
1141
1142void ChatRootView::refreshRules()
1143{
1144 m_activeRules.clear();
1145
1146 auto project = PluginLLMCore::RulesLoader::getActiveProject();
1147 if (!project) {
1148 emit activeRulesChanged();
1149 emit activeRulesCountChanged();
1150 return;
1151 }
1152
1153 auto ruleFiles
1154 = PluginLLMCore::RulesLoader::getRuleFilesForProject(project, PluginLLMCore::RulesContext::Chat);
1155
1156 for (const auto &ruleFile : ruleFiles) {
1157 QVariantMap ruleMap;
1158 ruleMap["filePath"] = ruleFile.filePath;
1159 ruleMap["fileName"] = ruleFile.fileName;
1160 ruleMap["category"] = ruleFile.category;
1161 m_activeRules.append(ruleMap);
1162 }
1163
1164 emit activeRulesChanged();
1165 emit activeRulesCountChanged();
1166}
1167
1168bool ChatRootView::useTools() const
1169{

Callers

nothing calls this directly

Calls 2

appendMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected