eca icon indicating copy to clipboard operation
eca copied to clipboard

Improve GREP tool

Open zikajk opened this issue 9 months ago • 4 comments

To upvote this issue, give it a thumbs up. See this list for the most upvoted issues.

Our GREP tool doesn't return content of matching rows (or logical block). Would be nice to improve and make it more similar to GREP tool here: https://github.com/x1xhlol/system-prompts-and-models-of-ai-tools/blob/main/Anthropic/Claude%20Code/Tools.json

zikajk avatar Feb 05 '26 13:02 zikajk

Interesting, I can do that, @zikajk do you think we should have the same args of the grep tool from that link? like -B, output_mode etc?

ericdallo avatar Feb 05 '26 13:02 ericdallo

I think it wouldn't hurt. But tbh. I don't know why GREP tool exist and why BASH tool is not used instead. Is it because this tool can do more thinks then simple GREP? I know that CC uses ripgrep by default if it exist on the system so maybe the tool just finds out if the system has GREP or RIPGREP installed and then adapts args based on that?

zikajk avatar Feb 05 '26 14:02 zikajk

At least for eca, we check ripgrep, then grep, and then grep via java, I think the output control is a plus and important piece of having it

ericdallo avatar Feb 05 '26 15:02 ericdallo

Added output_mode

ericdallo avatar Feb 05 '26 17:02 ericdallo