Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
agent2: Show Zed AI onboarding (#36406)
Bennet Bo Fenner57198f33c46f
diff --git a/crates/agent_ui/src/acp/thread_view.rs b/crates/agent_ui/src/acp/thread_view.rsindex f011d72d3c5..271d9e5d4c7 100644--- a/crates/agent_ui/src/acp/thread_view.rs+++ b/crates/agent_ui/src/acp/thread_view.rs@@ -2444,12 +2444,15 @@ impl AcpThreadView {.into_any()}- fn as_native_connection(&self, cx: &App) -> Option<Rc<agent2::NativeAgentConnection>> {+ pub(crate) fn as_native_connection(+ &self,+ cx: &App,+ ) -> Option<Rc<agent2::NativeAgentConnection>> {let acp_thread = self.thread()?.read(cx);acp_thread.connection().clone().downcast()}- fn as_native_thread(&self, cx: &App) -> Option<Entity<agent2::Thread>> {+ pub(crate) fn as_native_thread(&self, cx: &App) -> Option<Entity<agent2::Thread>> {let acp_thread = self.thread()?.read(cx);self.as_native_connection(cx)?.thread(acp_thread.session_id(), cx)diff --git a/crates/agent_ui/src/agent_panel.rs b/crates/agent_ui/src/agent_panel.rsindex 391d6aa6e97..4cb231f357f 100644--- a/crates/agent_ui/src/agent_panel.rs+++ b/crates/agent_ui/src/agent_panel.rs@@ -2619,7 +2619,13 @@ impl AgentPanel {}match &self.active_view {- ActiveView::Thread { .. } | ActiveView::TextThread { .. } => {+ ActiveView::History | ActiveView::Configuration => false,+ ActiveView::ExternalAgentThread { thread_view, .. }+ if thread_view.read(cx).as_native_thread(cx).is_none() =>+ {+ false+ }+ _ => {let history_is_empty = self.history_store.update(cx, |store, cx| store.recent_entries(1, cx).is_empty());@@ -2634,9 +2640,6 @@ impl AgentPanel {history_is_empty || !has_configured_non_zed_providers}- ActiveView::ExternalAgentThread { .. }- | ActiveView::History- | ActiveView::Configuration => false,}}