Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
agent_ui: Make stopping a running terminal cancel thread generation (#46663)
Danilo Leal70da1763536c
diff --git a/crates/agent_ui/src/acp/thread_view.rs b/crates/agent_ui/src/acp/thread_view.rsindex f168f56d70c..74a59cf43a8 100644--- a/crates/agent_ui/src/acp/thread_view.rs+++ b/crates/agent_ui/src/acp/thread_view.rs@@ -3778,10 +3778,11 @@ impl AcpThreadView {}).on_click({let terminal = terminal.clone();- cx.listener(move |_this, _event, _window, cx| {+ cx.listener(move |this, _event, _window, cx| {terminal.update(cx, |terminal, cx| {terminal.stop_by_user(cx);});+ this.cancel_generation(cx);})}),)