From 5d55b93def55523c9394369ec1162defeeabb273 Mon Sep 17 00:00:00 2001 From: Kuroda Kayn Date: Wed, 6 May 2026 20:17:42 +0800 Subject: [PATCH] agent: Fix create-directory tool icon (#55549) Fixes #55436 The create-directory agent tool was classified as a read tool, which caused the agent UI to render it with the search icon. This PR marks `create_directory` as an edit tool and gives it a folder-add icon in the conversation tool card. Creating a directory mutates the project, so treating it as an edit tool better matches the behavior and avoids the misleading search icon. Validation: - `cargo build -p zed` - `cargo test -p agent test_create_directory_tool_kind_is_edit -- --nocapture` - `git diff --check` - Manually verified in a local dev build that asking the agent to create `tmp- zed-icon-test-dir` shows a folder icon instead of a search icon, and that the directory is created successfully. Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/ zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Release Notes: - Fixed create-directory agent tool cards showing a search icon. 07547c9f-2cf2-432b-8c0f-86f336dce3c5 2b3f2b62-4782-42f1-a20d-c26f9cfe8940 --------- Co-authored-by: Ben Brandt --- crates/agent/src/tools/create_directory_tool.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/agent/src/tools/create_directory_tool.rs b/crates/agent/src/tools/create_directory_tool.rs index da2b33fa5f9e398d69aa3658d6e6fbfbdf8adf92..4f0ae7b511c062529b590701635865c090649246 100644 --- a/crates/agent/src/tools/create_directory_tool.rs +++ b/crates/agent/src/tools/create_directory_tool.rs @@ -54,7 +54,7 @@ impl AgentTool for CreateDirectoryTool { const NAME: &'static str = "create_directory"; fn kind() -> acp::ToolKind { - acp::ToolKind::Read + acp::ToolKind::Edit } fn initial_title(