mirror of
https://github.com/instructkr/claw-code.git
synced 2026-12-02 00:00:34 +08:00
grep_search walked and read every file under its root, including .git, node_modules and target. glob_search already prunes these directories (#2986), and docs/g002-security-verification-map.md says both search tools do. In a Rust checkout with a 2.5 GB target/ directory, one grep_search call took about 2.3 s instead of about 0.13 s, with the same results. Use the same pruning for grep_search, and never prune the search root itself, so a search the caller points into node_modules or target still works for both tools.