From 0eb0a3c7dc886a58407ec4c872c7f0daf46814ee Mon Sep 17 00:00:00 2001 From: Danilo Leal <67129314+danilo-leal@users.noreply.github.com> Date: Mon, 14 Apr 2025 11:02:55 -0300 Subject: [PATCH] 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 --- crates/agent/src/assistant_panel.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/agent/src/assistant_panel.rs b/crates/agent/src/assistant_panel.rs index 3e53ece36c..b5dcee9dc2 100644 --- a/crates/agent/src/assistant_panel.rs +++ b/crates/agent/src/assistant_panel.rs @@ -569,6 +569,7 @@ impl AssistantPanel { ActiveView::Configuration | ActiveView::History => { self.active_view = ActiveView::thread(self.thread.read(cx).thread().clone(), window, cx); + self.message_editor.focus_handle(cx).focus(window); cx.notify(); } _ => {}