[PR #10907] fix(glob): return both files and directories using fd #13603

Open
opened 2026-02-16 18:18:26 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/10907

State: open
Merged: No


Summary

  • Replace Ripgrep.files() with Fd.glob() for the glob tool
  • Add new fd.ts module with auto-download support (same pattern as ripgrep)
  • Glob tool now returns both files AND directories

Fixes #10906

Problem

The glob tool was using rg --files which only returns files by design. Patterns like projects/active/* would miss directory matches.

Solution

Use fd (sharkdp/fd) which returns both files and directories while maintaining the same benefits:

  • Respects .gitignore
  • Fast parallel traversal
  • Auto-downloads if not installed (~1.5MB)
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/10907 **State:** open **Merged:** No --- ## Summary - Replace `Ripgrep.files()` with `Fd.glob()` for the glob tool - Add new `fd.ts` module with auto-download support (same pattern as ripgrep) - Glob tool now returns both files AND directories Fixes #10906 ## Problem The glob tool was using `rg --files` which only returns files by design. Patterns like `projects/active/*` would miss directory matches. ## Solution Use `fd` (sharkdp/fd) which returns both files and directories while maintaining the same benefits: - Respects `.gitignore` - Fast parallel traversal - Auto-downloads if not installed (~1.5MB) ```
yindo added the pull-request label 2026-02-16 18:18:26 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#13603