Skip to content

feat(tool): add unified rg tool replacing grep and glob#44

Merged
randomm merged 1 commit intodevfrom
feat/rg-tool
Jan 26, 2026
Merged

feat(tool): add unified rg tool replacing grep and glob#44
randomm merged 1 commit intodevfrom
feat/rg-tool

Conversation

@randomm
Copy link
Owner

@randomm randomm commented Jan 26, 2026

Replaces both GrepTool and GlobTool with a single unified rg tool.

Features

  • Content search: rg({ pattern: "foo", include: "*.ts" })
  • File listing: rg({ files_only: true, include: "*.ts" })

Changes

  • New packages/opencode/src/tool/rg.ts
  • Removed GrepTool and GlobTool from registry
  • Added ripgrep as required dependency in README

Addresses agent tooling issue where glob was removed but rg wasn't added.

- New RgTool with two modes: content search and file listing
- files_only=true lists files matching glob pattern
- Default mode searches file contents with regex
- Removes old GrepTool and GlobTool
- Adds ripgrep as required dependency in README
@github-actions
Copy link

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@randomm randomm merged commit 0cf059e into dev Jan 26, 2026
1 of 3 checks passed
@randomm randomm deleted the feat/rg-tool branch January 26, 2026 13:55
randomm added a commit that referenced this pull request Feb 3, 2026
- New RgTool with two modes: content search and file listing
- files_only=true lists files matching glob pattern
- Default mode searches file contents with regex
- Removes old GrepTool and GlobTool
- Adds ripgrep as required dependency in README
randomm added a commit that referenced this pull request Feb 3, 2026
- New RgTool with two modes: content search and file listing
- files_only=true lists files matching glob pattern
- Default mode searches file contents with regex
- Removes old GrepTool and GlobTool
- Adds ripgrep as required dependency in README
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant