opencode icon indicating copy to clipboard operation
opencode copied to clipboard

refactor(ripgrep): split into modular directory structure

Open vtemian opened this issue 6 days ago • 2 comments

Summary

  • Split monolithic ripgrep.ts (400+ lines) into modular directory structure
  • Add Global.Platform helpers for cross-platform binary handling
  • Add integration tests for ripgrep functionality

Changes

  • src/file/ripgrep.tssrc/file/ripgrep/
    • index.ts - Public API (files, tree, search, rg)
    • binary.ts - Binary download/extraction logic
    • tree.ts - Tree building and BFS truncation
    • io.ts - Stream line parsing utility
  • src/global/index.ts - Added Platform.isWindows and Platform.binExt
  • test/file/ripgrep.test.ts - 14 integration tests

vtemian avatar Jan 09 '26 09:01 vtemian