opencode
opencode copied to clipboard
refactor(ripgrep): split into modular directory structure
Summary
- Split monolithic
ripgrep.ts(400+ lines) into modular directory structure - Add
Global.Platformhelpers for cross-platform binary handling - Add integration tests for ripgrep functionality
Changes
-
src/file/ripgrep.ts→src/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- AddedPlatform.isWindowsandPlatform.binExt -
test/file/ripgrep.test.ts- 14 integration tests