From 95784d53cadc208576990761a08fe41f3f7036b7 Mon Sep 17 00:00:00 2001 From: Danilo Leal <67129314+danilo-leal@users.noreply.github.com> Date: Wed, 9 Jul 2025 20:25:56 -0300 Subject: [PATCH] agent: Fix edit bar's background color when zoomed in (#34163) When the panel was zoomed in, the edit bar's background color would have a different color than the rest of the panel. This PR fixes it by using the `panel_background` color token. Release Notes: - N/A --- assets/icons/tool_diagnostics.svg | 6 +++--- assets/icons/tool_read.svg | 7 +++++++ assets/icons/tool_web.svg | 16 ++-------------- crates/agent_ui/src/message_editor.rs | 1 + crates/assistant_tools/src/read_file_tool.rs | 2 +- crates/icons/src/icons.rs | 1 + 6 files changed, 15 insertions(+), 18 deletions(-) create mode 100644 assets/icons/tool_read.svg diff --git a/assets/icons/tool_diagnostics.svg b/assets/icons/tool_diagnostics.svg index 0ca18d63cc1366af88affc3a0b7f3d7d0195cf2b..c659d967812727450bc3efb825b6492e6d2eda50 100644 --- a/assets/icons/tool_diagnostics.svg +++ b/assets/icons/tool_diagnostics.svg @@ -1,5 +1,5 @@ - - - + + + diff --git a/assets/icons/tool_read.svg b/assets/icons/tool_read.svg new file mode 100644 index 0000000000000000000000000000000000000000..458cbb36607a308ae4ce5e6a98006f9ff87461e8 --- /dev/null +++ b/assets/icons/tool_read.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/assets/icons/tool_web.svg b/assets/icons/tool_web.svg index 49e9544b4a73dc6e529bf06b5ff09d3467acb87d..6250a9f05ab53d2bc364dc7520d10ee319f29f1f 100644 --- a/assets/icons/tool_web.svg +++ b/assets/icons/tool_web.svg @@ -1,17 +1,5 @@ - - - - - - + - - - - - - - - + diff --git a/crates/agent_ui/src/message_editor.rs b/crates/agent_ui/src/message_editor.rs index 8bc93f0f5845b11b1e23fbba367dc9ff973d6020..25c62c5fb32c805d72b4dfd46d7aa6f38579b07c 100644 --- a/crates/agent_ui/src/message_editor.rs +++ b/crates/agent_ui/src/message_editor.rs @@ -1622,6 +1622,7 @@ impl Render for MessageEditor { v_flex() .size_full() + .bg(cx.theme().colors().panel_background) .when(changed_buffers.len() > 0, |parent| { parent.child(self.render_edits_bar(&changed_buffers, window, cx)) }) diff --git a/crates/assistant_tools/src/read_file_tool.rs b/crates/assistant_tools/src/read_file_tool.rs index 65122a847a114f89ad57a98c5f8559f2b5994460..5b9546981734abdba865346896750348c9c9515c 100644 --- a/crates/assistant_tools/src/read_file_tool.rs +++ b/crates/assistant_tools/src/read_file_tool.rs @@ -68,7 +68,7 @@ impl Tool for ReadFileTool { } fn icon(&self) -> IconName { - IconName::ToolSearch + IconName::ToolRead } fn input_schema(&self, format: LanguageModelToolSchemaFormat) -> Result { diff --git a/crates/icons/src/icons.rs b/crates/icons/src/icons.rs index cbb7d69209a0f9b1488e3f9ee16fb22914b2697e..76a04e036dc92d9ebbf848fc34bb21195862b99a 100644 --- a/crates/icons/src/icons.rs +++ b/crates/icons/src/icons.rs @@ -258,6 +258,7 @@ pub enum IconName { ToolHammer, ToolNotification, ToolPencil, + ToolRead, ToolRegex, ToolSearch, ToolTerminal,