fix: count file-level tracked yaml and twig as indexed (#357)

This commit is contained in:
luo jiyin
2026-05-28 22:43:49 -05:00
committed by GitHub
parent 54caceae31
commit 839cf63dcb
2 changed files with 47 additions and 2 deletions
+15 -2
View File
@@ -942,7 +942,15 @@ export class ExtractionOrchestrator {
} else if (result.errors.some((e) => e.severity === 'error')) {
filesErrored++;
} else {
filesSkipped++;
// Files with no symbols but no errors (e.g. yaml, twig) are tracked
// at the file level — count them as indexed so the CLI doesn't
// misleadingly report "No files found to index".
const lang = detectLanguage(filePath, content);
if (lang === 'yaml' || lang === 'twig') {
filesIndexed++;
} else {
filesSkipped++;
}
}
}
}
@@ -1108,7 +1116,12 @@ export class ExtractionOrchestrator {
} else if (result.errors.some((e) => e.severity === 'error')) {
filesErrored++;
} else {
filesSkipped++;
const tracked = this.queries.getFileByPath(filePath);
if (tracked && (tracked.language === 'yaml' || tracked.language === 'twig')) {
filesIndexed++;
} else {
filesSkipped++;
}
}
}