Skip to content

Ingest blocks on large directories — add SKIP_DIRS, file-count guard, lower max size to 2MB #128

Description

@four-bytes-robby

Problem

Brain ingest blocks (appears hung) on large directories like ~/session-sw6 (2.6GB, 55K files). Walk finds ~5K files to process (mostly .js/.php), processing them all causes apparent hang.

Changes

  1. loader.ts — SKIP_DIRS: Added .opencode, docker, var, bundles, db-dumps to skip list
  2. loader.ts — EXTENSION_LANG_MAP: Added .twig"twig" mapping
  3. index.ts — MAX_FILE_SIZE: Lowered from 10MB to 2MB (no useful source file exceeds this)
  4. index.ts — File-count guard: Hard abort at >5000 files, warning at >500
  5. package.json: Version bump 1.7.4 → 1.7.5

How to test

bun run build succeeds, dist/four-opencode-brain.js updated.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions