| 144 | } |
| 145 | |
| 146 | QVector<RuleFileInfo> RulesLoader::collectMarkdownFiles( |
| 147 | const QString &dirPath, const QString &category) |
| 148 | { |
| 149 | QVector<RuleFileInfo> result; |
| 150 | QDir dir(dirPath); |
| 151 | |
| 152 | if (!dir.exists()) { |
| 153 | return result; |
| 154 | } |
| 155 | |
| 156 | QStringList mdFiles = dir.entryList({"*.md"}, QDir::Files, QDir::Name); |
| 157 | |
| 158 | for (const QString &fileName : mdFiles) { |
| 159 | QString fullPath = dir.filePath(fileName); |
| 160 | result.append({fullPath, fileName, category}); |
| 161 | } |
| 162 | |
| 163 | return result; |
| 164 | } |
| 165 | |
| 166 | } // namespace QodeAssist::PluginLLMCore |