Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
agent_ui: Clear model selector query on dismiss (#37569)
Umesh Yadav36364b16a037
diff --git a/crates/agent_ui/src/acp/model_selector.rs b/crates/agent_ui/src/acp/model_selector.rsindex cbb513696d8..95c0478aa3c 100644--- a/crates/agent_ui/src/acp/model_selector.rs+++ b/crates/agent_ui/src/acp/model_selector.rs@@ -192,8 +192,10 @@ impl PickerDelegate for AcpModelPickerDelegate {}}- fn dismissed(&mut self, _: &mut Window, cx: &mut Context<Picker<Self>>) {- cx.emit(DismissEvent);+ fn dismissed(&mut self, window: &mut Window, cx: &mut Context<Picker<Self>>) {+ cx.defer_in(window, |picker, window, cx| {+ picker.set_query("", window, cx);+ });}fn render_match(