Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
agent_ui: Improve image preview on mention hover (#47781)
Danilo Leal681fee2c1f60
diff --git a/crates/agent_ui/src/mention_set.rs b/crates/agent_ui/src/mention_set.rsindex 16df6fe93f4..cf3c412e250 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<Self>) -> impl IntoElement {+ fn render(&mut self, _window: &mut Window, cx: &mut Context<Self>) -> 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()}