From 313f5968ebc26ff294f04d1714f0ac6fa2a0fb15 Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 16 Jul 2025 18:32:58 +0200 Subject: [PATCH] Improve the `read_file` tool prompt for long files (#34542) Closes [#ISSUE](https://github.com/zed-industries/zed/issues/31780) Release Notes: - Enhanced `read_file` tool call result message for long files. --- crates/assistant_tools/src/read_file_tool.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/assistant_tools/src/read_file_tool.rs b/crates/assistant_tools/src/read_file_tool.rs index 6bbc2fc089..dc504e2dc4 100644 --- a/crates/assistant_tools/src/read_file_tool.rs +++ b/crates/assistant_tools/src/read_file_tool.rs @@ -285,7 +285,10 @@ impl Tool for ReadFileTool { Using the line numbers in this outline, you can call this tool again while specifying the start_line and end_line fields to see the - implementations of symbols in the outline." + implementations of symbols in the outline. + + Alternatively, you can fall back to the `grep` tool (if available) + to search the file for specific content." } .into()) }