assistant_context_editor: Close menus on send (#25440)

Closes #ISSUE

Before:


https://github.com/user-attachments/assets/e63b6207-0c80-4fd6-99c0-febe3d639ba1

After:


https://github.com/user-attachments/assets/870f2c6d-9b7f-456d-a1e3-26e1c31b129d

Release Notes:

- N/A
This commit is contained in:
brian tan 2025-03-03 07:22:23 -05:00 committed by GitHub
parent 593f3dc1d5
commit f24c226af8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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);
}