agent_ui: Make stopping a running terminal cancel thread generation (#46663)

This makes stopping a terminal tool call in the agent panel also cancel
the thread generation:


https://github.com/user-attachments/assets/702ba078-53a8-4816-80f3-b6215e764365

Release Notes:

- Agent: Made the act of stopping a terminal tool call in the agent
panel also cancel the thread generation.
This commit is contained in:
Danilo Leal authored and GitHub committed 2026-01-13 11:43:45 +00:00
1 parent e024c4de03
commit f1cfd4fff3
1 file changed
+2 -1
+2 -1
View File
@@ -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);
})
}),
)