Changesets · Branches · Tags · Compare
| Changeset | d13968478db81e638dc75be837ee293c6469fa97ba8dfe75516a64440b2c2b54 |
|---|---|
| Author | Dallin Romney <dallinromney@gmail.com> · 2025-08-25 15:08 -07:00 |
| Committer | GitHub <noreply@github.com> · 2025-08-25 15:08 -07:00 |
| Parents | a99b3672f9f8, 7b68d96b4929 |
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; |