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 0ca18d63cc..c659d96781 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 0000000000..458cbb3660 --- /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 49e9544b4a..6250a9f05a 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 8bc93f0f58..25c62c5fb3 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 65122a847a..5b95469817 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 cbb7d69209..76a04e036d 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,