Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
agent_ui: Render error context when failing to spawn agent thread (#41908)
Lukas Wirth75cef88ea2db
diff --git a/crates/agent_ui/src/acp/thread_view.rs b/crates/agent_ui/src/acp/thread_view.rsindex b19e0434be0..ed2984abd38 100644--- a/crates/agent_ui/src/acp/thread_view.rs+++ b/crates/agent_ui/src/acp/thread_view.rs@@ -104,7 +104,7 @@ impl ThreadError {{Self::AuthenticationRequired(acp_error.message.clone().into())} else {- let string = error.to_string();+ let string = format!("{:#}", error);// TODO: we should have Gemini return better errors here.if agent.clone().downcast::<agent_servers::Gemini>().is_some()&& string.contains("Could not load the default credentials")@@ -113,7 +113,7 @@ impl ThreadError {{Self::AuthenticationRequired(string.into())} else {- Self::Other(error.to_string().into())+ Self::Other(string.into())}}}@@ -795,7 +795,8 @@ impl AcpThreadView {if let Some(load_err) = err.downcast_ref::<LoadError>() {self.thread_state = ThreadState::LoadError(load_err.clone());} else {- self.thread_state = ThreadState::LoadError(LoadError::Other(err.to_string().into()))+ self.thread_state =+ ThreadState::LoadError(LoadError::Other(format!("{:#}", err).into()))}if self.message_editor.focus_handle(cx).is_focused(window) {self.focus_handle.focus(window)