← Back to PRs

#10189: fix: resolve file_path param in tool display for read/write tools

by Yida-Dev open 2026-02-06 06:39 View on GitHub →
agents stale
## Summary - `resolveReadDetail` and `resolveWriteDetail` only checked `args.path` for the filename to display in verbose output - Tools that use `file_path` instead of `path` (e.g. MCP tools) showed no filename, making verbose output less useful - Added a fallback to check `args.file_path` when `args.path` is absent, while still preferring `path` when both exist ## Test plan - [x] Added 4 unit tests covering: `file_path` fallback for read, `file_path` with offset/limit range, `file_path` fallback for write, and `path` takes precedence over `file_path` - [x] All existing tests pass Closes #10059 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR fixes verbose tool display details for `read` and `write` tools by falling back to `args.file_path` when `args.path` is missing, while still preferring `path` when both are present. It updates `resolveReadDetail`/`resolveWriteDetail` in `src/agents/tool-display.ts` and adds unit tests in `src/agents/tool-display.test.ts` to cover the new behavior (including offset/limit range formatting). <h3>Confidence Score: 5/5</h3> - This PR is safe to merge with minimal risk. - Changes are narrowly scoped to display-string derivation for read/write tools and are covered by targeted unit tests; no behavioral changes to tool execution paths were introduced. - No files require special attention <!-- greptile_other_comments_section --> <!-- /greptile_comment -->

Most Similar PRs