Changesets · Branches · Tags · Compare
| Changeset | 7b68d96b49295ddf5bc93c61b6c9128945e01abf1fee7c79f6e653a1bc551a2a |
|---|---|
| Author | Suhas S <suhas.cse20@gmail.com> · 2025-08-24 23:41 +08:00 |
| Committer | Suhas S <suhas.cse20@gmail.com> · 2025-08-25 00:08 +08:00 |
| Parents | a5fcde5311cf |
1 file changed
modified core/indexing/chunk/chunk.ts +16 −1
| @@ -22,7 +22,22 @@ | ||
| 22 | 22 | return; |
| 23 | 23 | } |
| 24 | 24 | 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 | + ) { | |
| 26 | 41 | try { |
| 27 | 42 | for await (const chunk of codeChunker(fileUri, contents, maxChunkSize)) { |
| 28 | 43 | yield chunk; |