From 831595098279225abf1087604399376418e79bf5 Mon Sep 17 00:00:00 2001 From: Danilo Leal <67129314+danilo-leal@users.noreply.github.com> Date: Wed, 25 Mar 2026 19:19:41 -0300 Subject: [PATCH] sidebar: Use last used agent when creating a new thread from it (#52446) The "new thread" buttons as well as the `cmd-n` keybinding were resetting the agent to the Zed one instead of following the agent panel's behavior to use whatever agent was recently selected, as per the key-value store. Release Notes: - N/A --- crates/agent_ui/src/agent_panel.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/agent_ui/src/agent_panel.rs b/crates/agent_ui/src/agent_panel.rs index aa88773680faee1dd7b8ceb0d60f93ecc13016c7..fcc141c85db6a8698b17f2b97336c11b6e67bf34 100644 --- a/crates/agent_ui/src/agent_panel.rs +++ b/crates/agent_ui/src/agent_panel.rs @@ -1179,7 +1179,8 @@ impl AgentPanel { } pub fn new_thread(&mut self, _action: &NewThread, window: &mut Window, cx: &mut Context) { - self.new_agent_thread(AgentType::NativeAgent, window, cx); + self.reset_start_thread_in_to_default(cx); + self.external_thread(None, None, None, None, None, true, window, cx); } fn new_native_agent_thread_from_summary(