mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-08-28 05:25:25 +00:00
revert: restore 512KB file size limit, keep improved skip message
2MB limit caused FTS crash on large codebases. 512KB is safe and only skips generated/vendored files. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
36e64e892f
commit
a5096e8029
5 changed files with 8 additions and 8 deletions
4
gitnexus/package-lock.json
generated
4
gitnexus/package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "gitnexus",
|
||||
"version": "1.2.9",
|
||||
"version": "1.3.3",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "gitnexus",
|
||||
"version": "1.2.9",
|
||||
"version": "1.3.3",
|
||||
"license": "PolyForm-Noncommercial-1.0.0",
|
||||
"dependencies": {
|
||||
"@huggingface/transformers": "^3.0.0",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "gitnexus",
|
||||
"version": "1.3.2",
|
||||
"version": "1.3.3",
|
||||
"description": "Graph-powered code intelligence for AI agents. Index any codebase, query via MCP or CLI.",
|
||||
"author": "Abhigyan Patwari",
|
||||
"license": "PolyForm-Noncommercial-1.0.0",
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ export interface FilePath {
|
|||
|
||||
const READ_CONCURRENCY = 32;
|
||||
|
||||
/** Skip files larger than 2MB — covers all real source files, excludes minified bundles/generated code */
|
||||
const MAX_FILE_SIZE = 2 * 1024 * 1024;
|
||||
/** Skip files larger than 512KB — they're usually generated/vendored and crash tree-sitter */
|
||||
const MAX_FILE_SIZE = 512 * 1024;
|
||||
|
||||
/**
|
||||
* Phase 1: Scan repository — stat files to get paths + sizes, no content loaded.
|
||||
|
|
@ -69,7 +69,7 @@ export const walkRepositoryPaths = async (
|
|||
}
|
||||
|
||||
if (skippedLarge > 0) {
|
||||
console.warn(` Skipped ${skippedLarge} files larger than ${Math.round(MAX_FILE_SIZE / 1024 / 1024)}MB (likely generated/vendored)`);
|
||||
console.warn(` Skipped ${skippedLarge} large files (>${MAX_FILE_SIZE / 1024}KB, likely generated/vendored)`);
|
||||
}
|
||||
|
||||
return entries;
|
||||
|
|
|
|||
|
|
@ -207,7 +207,7 @@ const processParsingSequential = async (
|
|||
if (!language) continue;
|
||||
|
||||
// Skip very large files — they can crash tree-sitter or cause OOM
|
||||
if (file.content.length > 2 * 1024 * 1024) continue;
|
||||
if (file.content.length > 512 * 1024) continue;
|
||||
|
||||
await loadLanguage(language, file.path);
|
||||
|
||||
|
|
|
|||
|
|
@ -426,7 +426,7 @@ const processFileGroup = (
|
|||
|
||||
for (const file of files) {
|
||||
// Skip very large files — they can crash tree-sitter or cause OOM
|
||||
if (file.content.length > 2 * 1024 * 1024) continue;
|
||||
if (file.content.length > 512 * 1024) continue;
|
||||
|
||||
let tree;
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue