From 681fee2c1f606257d5310512198490e0f67389d5 Mon Sep 17 00:00:00 2001 From: Danilo Leal <67129314+danilo-leal@users.noreply.github.com> Date: Tue, 27 Jan 2026 15:37:11 -0300 Subject: [PATCH] agent_ui: Improve image preview on mention hover (#47781) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR improves the hover tooltip container for displaying a preview of the mentioned image in the agent panel. Screenshot 2026-01-27 at 1  03 2@2x Release Notes: - N/A --- crates/agent_ui/src/mention_set.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/crates/agent_ui/src/mention_set.rs b/crates/agent_ui/src/mention_set.rs index 16df6fe93f46b53e0f5aa928bc5f457313a88670..cf3c412e250a49625c527304dbc9ccb209bb9a98 100644 --- a/crates/agent_ui/src/mention_set.rs +++ b/crates/agent_ui/src/mention_set.rs @@ -1036,9 +1036,13 @@ struct ImageHover { } impl Render for ImageHover { - fn render(&mut self, _window: &mut Window, _cx: &mut Context) -> impl IntoElement { + fn render(&mut self, _window: &mut Window, cx: &mut Context) -> impl IntoElement { if let Some(image) = self.image.clone() { - gpui::img(image).max_w_96().max_h_96().into_any_element() + div() + .p_1p5() + .elevation_2(cx) + .child(gpui::img(image).h_auto().max_w_96().rounded_sm()) + .into_any_element() } else { gpui::Empty.into_any_element() }