mirror of
https://github.com/stablyai/orca.git
synced 2026-09-22 16:02:32 +00:00
Extracts rg and git-grep search logic into src/shared/text-search.ts so the local main and SSH relay paths stop reinventing arg construction, JSON parsing, submatch regex, and accumulator/truncation semantics. Fixes silent truncation in the relay: searchWithRg used execFile with a 50MB maxBuffer cap that rg --json easily exceeds on large repos, dropping matches with no error surfaced to the user. The relay now streams via spawn, matching the local path. See docs/design/share-text-search.md for full rationale. Co-authored-by: Orca <help@stably.ai>