Skip to content

armgit / zed

Public Imported from GitHub
0

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 agent UI stealing focus on start up (#46088)

Lukas Wirthe70d2524b32c
diff --git a/crates/agent_ui/src/acp/thread_view.rs b/crates/agent_ui/src/acp/thread_view.rs
index 082ff9bca9f..14d857d1af7 100644
--- a/crates/agent_ui/src/acp/thread_view.rs
+++ b/crates/agent_ui/src/acp/thread_view.rs
@@ -731,7 +731,9 @@ impl AcpThreadView {
})
});
- this.message_editor.focus_handle(cx).focus(window, cx);
+ if this.focus_handle(cx).is_focused(window) {
+ this.message_editor.focus_handle(cx).focus(window, cx);
+ }
cx.notify();
}