agent2: Add now, grep, and web search tools (#35974)

Release Notes:

- N/A

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Co-authored-by: Antonio Scandurra <me@as-cii.com>
This commit is contained in:
Ben Brandt 2025-08-11 15:34:34 +02:00 committed by GitHub
parent ebcce8730d
commit 8dbded46d8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 1390 additions and 4 deletions

View file

@ -1,7 +1,8 @@
use crate::{AgentResponseEvent, Thread, templates::Templates};
use crate::{
CopyPathTool, CreateDirectoryTool, EditFileTool, FindPathTool, ListDirectoryTool, MovePathTool,
OpenTool, ReadFileTool, TerminalTool, ThinkingTool, ToolCallAuthorization,
CopyPathTool, CreateDirectoryTool, EditFileTool, FindPathTool, GrepTool, ListDirectoryTool,
MovePathTool, NowTool, OpenTool, ReadFileTool, TerminalTool, ThinkingTool,
ToolCallAuthorization, WebSearchTool,
};
use acp_thread::ModelSelector;
use agent_client_protocol as acp;
@ -424,9 +425,13 @@ impl acp_thread::AgentConnection for NativeAgentConnection {
thread.add_tool(OpenTool::new(project.clone()));
thread.add_tool(ThinkingTool);
thread.add_tool(FindPathTool::new(project.clone()));
thread.add_tool(GrepTool::new(project.clone()));
thread.add_tool(ReadFileTool::new(project.clone(), action_log));
thread.add_tool(EditFileTool::new(cx.entity()));
thread.add_tool(NowTool);
thread.add_tool(TerminalTool::new(project.clone(), cx));
// TODO: Needs to be conditional based on zed model or not
thread.add_tool(WebSearchTool);
thread
});