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.

assistant_context_editor: Close menus on send (#25440)

brian tanf24c226af839
diff --git a/crates/assistant_context_editor/src/context_editor.rs b/crates/assistant_context_editor/src/context_editor.rs
index d47b8005363..02f2bc98376 100644
--- a/crates/assistant_context_editor/src/context_editor.rs
+++ b/crates/assistant_context_editor/src/context_editor.rs
@@ -336,10 +336,14 @@ impl ContextEditor {
}
fn assist(&mut self, _: &Assist, window: &mut Window, cx: &mut Context<Self>) {
+ self.slash_menu_handle.hide(cx);
+ self.language_model_selector_menu_handle.hide(cx);
self.send_to_model(RequestType::Chat, window, cx);
}
fn edit(&mut self, _: &Edit, window: &mut Window, cx: &mut Context<Self>) {
+ self.slash_menu_handle.hide(cx);
+ self.language_model_selector_menu_handle.hide(cx);
self.send_to_model(RequestType::SuggestEdits, window, cx);
}