Merge pull request #7375 from su0as/fix/css-indexing-7072

fix: CSS files not being indexed (#7072)
This commit is contained in:
Dallin Romney 2025-08-25 15:08:15 -07:00 • committed by GitHub
commit 752b3d8efa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -22,7 +22,22 @@ export async function* chunkDocumentWithoutId(
return;
}
const extension = getUriFileExtension(fileUri);
if (extension in supportedLanguages) {
// Files that should use basicChunker despite having tree-sitter support
// These files don't have code structure (classes/functions) that codeChunker expects
const NON_CODE_EXTENSIONS = [
"css",
"html",
"htm",
"json",
"toml",
"yaml",
"yml",
];
if (
extension in supportedLanguages &&
!NON_CODE_EXTENSIONS.includes(extension)
) {
try {
for await (const chunk of codeChunker(fileUri, contents, maxChunkSize)) {
yield chunk;