Elffuss BraidHub

kikocis/continue public

fix: CSS files not being indexed (#7072)

CSS files were not being indexed because codeChunker expects code
structures (classes/functions) that don't exist in CSS. The chunker
would return zero chunks, preventing CSS files from being indexed.

This fix routes CSS, HTML, JSON and similar non-code files to
basicChunker instead of codeChunker, ensuring they are properly
indexed while maintaining intelligent chunking for actual code files.
Changeset7b68d96b49295ddf5bc93c61b6c9128945e01abf1fee7c79f6e653a1bc551a2a
AuthorSuhas S <suhas.cse20@gmail.com> · 2025-08-24 23:41 +08:00
CommitterSuhas S <suhas.cse20@gmail.com> · 2025-08-25 00:08 +08:00
Parentsa5fcde5311cf

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;