Port some more tools to agent2 (#35973)

Release Notes:

- N/A
This commit is contained in:
Antonio Scandurra 2025-08-11 15:10:46 +02:00 committed by GitHub
parent d5ed569fad
commit ebcce8730d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 1324 additions and 1 deletions

View file

@ -1,6 +1,7 @@
use crate::{AgentResponseEvent, Thread, templates::Templates};
use crate::{
EditFileTool, FindPathTool, ReadFileTool, TerminalTool, ThinkingTool, ToolCallAuthorization,
CopyPathTool, CreateDirectoryTool, EditFileTool, FindPathTool, ListDirectoryTool, MovePathTool,
OpenTool, ReadFileTool, TerminalTool, ThinkingTool, ToolCallAuthorization,
};
use acp_thread::ModelSelector;
use agent_client_protocol as acp;
@ -416,6 +417,11 @@ impl acp_thread::AgentConnection for NativeAgentConnection {
let thread = cx.new(|cx| {
let mut thread = Thread::new(project.clone(), agent.project_context.clone(), action_log.clone(), agent.templates.clone(), default_model);
thread.add_tool(CreateDirectoryTool::new(project.clone()));
thread.add_tool(CopyPathTool::new(project.clone()));
thread.add_tool(MovePathTool::new(project.clone()));
thread.add_tool(ListDirectoryTool::new(project.clone()));
thread.add_tool(OpenTool::new(project.clone()));
thread.add_tool(ThinkingTool);
thread.add_tool(FindPathTool::new(project.clone()));
thread.add_tool(ReadFileTool::new(project.clone(), action_log));