Elffuss BraidHub

kikocis/continue public

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

fix: CSS files not being indexed (#7072)
Changesetd13968478db81e638dc75be837ee293c6469fa97ba8dfe75516a64440b2c2b54
AuthorDallin Romney <dallinromney@gmail.com> · 2025-08-25 15:08 -07:00
CommitterGitHub <noreply@github.com> · 2025-08-25 15:08 -07:00
Parentsa99b3672f9f8, 7b68d96b4929

Browse the files at this changeset

1 file changed

modified core/indexing/chunk/chunk.ts +16 −1
@@ -22,7 +22,22 @@
2222 return;
2323 }
2424 const extension = getUriFileExtension(fileUri);
25- if (extension in supportedLanguages) {
25+ // Files that should use basicChunker despite having tree-sitter support
26+ // These files don't have code structure (classes/functions) that codeChunker expects
27+ const NON_CODE_EXTENSIONS = [
28+ "css",
29+ "html",
30+ "htm",
31+ "json",
32+ "toml",
33+ "yaml",
34+ "yml",
35+ ];
36+
37+ if (
38+ extension in supportedLanguages &&
39+ !NON_CODE_EXTENSIONS.includes(extension)
40+ ) {
2641 try {
2742 for await (const chunk of codeChunker(fileUri, contents, maxChunkSize)) {
2843 yield chunk;