From 294feb9acec80e4892e48dd9d4ea7a669ff83342 Mon Sep 17 00:00:00 2001 From: Danilo Leal <67129314+danilo-leal@users.noreply.github.com> Date: Fri, 17 Apr 2026 11:21:22 -0300 Subject: [PATCH] agent_ui: Only surface the regenerate title item for the Zed agent (#54187) We currently, unfortunately, don't support title summarization and/or regeneration for external agents, so we should hide that menu for them so it's not misleading. Release Notes: - N/A --- crates/agent_ui/src/agent_panel.rs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/crates/agent_ui/src/agent_panel.rs b/crates/agent_ui/src/agent_panel.rs index 7c9da8e5958278c97bab4a9b18e9c9ef51198eca..5fc262f8b7206e0df1e31ae1aa0e68927fb72222 100644 --- a/crates/agent_ui/src/agent_panel.rs +++ b/crates/agent_ui/src/agent_panel.rs @@ -3931,12 +3931,14 @@ impl AgentPanel { BaseView::AgentThread { conversation_view } => Some(conversation_view.clone()), _ => None, }; - let thread_with_messages = match &self.base_view { - BaseView::AgentThread { conversation_view } => { - conversation_view.read(cx).has_user_submitted_prompt(cx) - } - _ => false, - }; + + let can_regenerate_thread_title = + conversation_view.as_ref().is_some_and(|conversation_view| { + let conversation_view = conversation_view.read(cx); + conversation_view.has_user_submitted_prompt(cx) + && conversation_view.as_native_thread(cx).is_some() + }); + let has_auth_methods = match &self.base_view { BaseView::AgentThread { conversation_view } => { conversation_view.read(cx).has_auth_methods() @@ -3967,7 +3969,7 @@ impl AgentPanel { Some(ContextMenu::build(window, cx, |mut menu, _window, _| { menu = menu.context(focus_handle.clone()); - if thread_with_messages { + if can_regenerate_thread_title { menu = menu.header("Current Thread"); if let Some(conversation_view) = conversation_view.as_ref() {