[Bug] search_file_contents never shows what it found, even fully expanded
Description
The tool activity display for search_file_contents shows the query, flags, and a match count never the actual file names, line numbers, or matched text, at any display setting. There is no way to see what was actually found without asking the model to repeat it back in chat.
Parent: #907
Steps to Reproduce
- Ask Nanocoder to search the codebase for something using
search_file_contents. - Look at the tool activity display, both compact and expanded (Ctrl+O).
Expected Behavior
The expanded view should show at least a capped list of the actual file:line hits.
Actual Behavior
Only Query, Include, Path, flags, a Matches: N count, and a token estimate are shown no hit content, in either display mode.
Recording
Root Cause
source/tools/search-file-contents.tsx SearchFileContentsFormatter parses only a match count off the first line of the result string (/Found (\d+)/) and never renders the individual match lines that follow it.
Note: #766 (closed, fixed by merged PR #774) changed the model-facing result string to a more token-efficient grep-style format that's unrelated to this display component, which doesn't surface any of that string's content to the user regardless of its format.
Suggested Fix
Show the top N file:line hits in the expanded formatter, capped the same way bash output already is.
Additional Context
- [x] I have searched existing issues to ensure this is not a duplicate
- [x] I can reproduce this issue consistently
- [x] This issue occurs on the latest
main
Hey @akramcodez ! I’d love to work on this one... Feel free to assign it to me