Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
fix spawn bug from calling
KCaverlyc0a132853217
diff --git a/crates/assistant/src/assistant_panel.rs b/crates/assistant/src/assistant_panel.rsindex 25c72416888..e25514a4e49 100644--- a/crates/assistant/src/assistant_panel.rs+++ b/crates/assistant/src/assistant_panel.rs@@ -3100,8 +3100,13 @@ impl InlineAssistant {project: ModelHandle<Project>,cx: &mut ViewContext<Self>,) -> anyhow::Result<()> {- if let Some(semantic_index) = self.semantic_index.clone() {- let _ = semantic_index.update(cx, |index, cx| index.index_project(project, cx));+ if let Some(semantic_index) = SemanticIndex::global(cx) {+ cx.spawn(|_, mut cx| async move {+ semantic_index+ .update(&mut cx, |index, cx| index.index_project(project, cx))+ .await+ })+ .detach_and_log_err(cx);}anyhow::Ok(())