agent: Move focus to the message editor after going back (#28686)

When you hit the back button in the agent panel toolbar, we were
returning the focus to the buffer instead to the panel's message editor,
which is likely where you want to be after quickly checking history or
settings.

Release Notes:

- N/A
This commit is contained in:
Danilo Leal 2025-04-14 11:02:55 -03:00 committed by GitHub
parent 6278761460
commit 0eb0a3c7dc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -569,6 +569,7 @@ impl AssistantPanel {
ActiveView::Configuration | ActiveView::History => { ActiveView::Configuration | ActiveView::History => {
self.active_view = self.active_view =
ActiveView::thread(self.thread.read(cx).thread().clone(), window, cx); ActiveView::thread(self.thread.read(cx).thread().clone(), window, cx);
self.message_editor.focus_handle(cx).focus(window);
cx.notify(); cx.notify();
} }
_ => {} _ => {}