agent_ui: Clear model selector query on dismiss (#37569)
Closes #36756 | Before | After | |--------|--------| | <video src ="https://github.com/user-attachments/assets/1d022ac6-0aea-4e98-a717-9988420c9683"/> | <video src="https://github.com/user-attachments/assets/78d19012-1224-4c92-a6c8-47ae4c13ca31"/> | Release Notes: - agent: Clear model selector query on dismiss in agent panel --------- Signed-off-by: Umesh Yadav <git@umesh.dev>
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user