Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Fix panic in context server configuration (#34118)

Bennet Bo Fenner7114a5ca99aa
diff --git a/crates/agent_ui/src/agent_configuration/configure_context_server_modal.rs b/crates/agent_ui/src/agent_configuration/configure_context_server_modal.rs
index ba0021c33ca..9e5f6e09c82 100644
--- a/crates/agent_ui/src/agent_configuration/configure_context_server_modal.rs
+++ b/crates/agent_ui/src/agent_configuration/configure_context_server_modal.rs
@@ -740,7 +740,9 @@ fn wait_for_context_server(
});
cx.spawn(async move |_cx| {
- let result = rx.await.unwrap();
+ let result = rx
+ .await
+ .map_err(|_| Arc::from("Context server store was dropped"))?;
drop(subscription);
result
})