Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
agent_ui: Fix regression that made edited files unclickable (#48362)
Danilo Leale54480bd2d59
diff --git a/crates/agent_ui/src/acp/thread_view.rs b/crates/agent_ui/src/acp/thread_view.rsindex 47afb7ddd99..a3f66d4fc73 100644--- a/crates/agent_ui/src/acp/thread_view.rs+++ b/crates/agent_ui/src/acp/thread_view.rs@@ -5764,7 +5764,6 @@ impl AcpServerView {})}),)- .child(Divider::vertical().color(DividerColor::BorderVariant)).child(Button::new(("reject-file", index), "Reject").label_size(LabelSize::Small)@@ -5919,34 +5918,23 @@ impl AcpServerView {).label_size(LabelSize::XSmall),)- .when(- match self.as_active_thread() {- Some(thread) => {- thread.hovered_edited_file_buttons == Some(index)- }- None => false,- },- |this| {- let full_path = full_path.clone();- this.hover(|s| s.bg(cx.theme().colors().element_hover))- .tooltip(move |_, cx| {- Tooltip::with_meta(- "Go to File",- None,- full_path.clone(),- cx,- )- })- .on_click({- let buffer = buffer.clone();- cx.listener(move |this, _, window, cx| {- this.open_edited_buffer(- &buffer, window, cx,- );- })- })- },- ),+ .hover(|s| s.bg(cx.theme().colors().element_hover))+ .tooltip({+ move |_, cx| {+ Tooltip::with_meta(+ "Go to File",+ None,+ full_path.clone(),+ cx,+ )+ }+ })+ .on_click({+ let buffer = buffer.clone();+ cx.listener(move |this, _, window, cx| {+ this.open_edited_buffer(&buffer, window, cx);+ })+ }),).child(buttons);