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.

context_server: Interpret context server command paths relative to the extension's work dir (#27201)

Marshall Bowersc60a7034c894
diff --git a/crates/context_server/src/extension_context_server.rs b/crates/context_server/src/extension_context_server.rs
index 96d1ccaf53c..90ddc1609a5 100644
--- a/crates/context_server/src/extension_context_server.rs
+++ b/crates/context_server/src/extension_context_server.rs
@@ -51,9 +51,13 @@ impl ExtensionContextServerProxy for ContextServerFactoryRegistryProxy {
})
})?;
- let command = extension
+ let mut command = extension
.context_server_command(id.clone(), extension_project)
.await?;
+ command.command = extension
+ .path_from_extension(command.command.as_ref())
+ .to_string_lossy()
+ .to_string();
log::info!("loaded command for context server {id}: {command:?}");
diff --git a/crates/extension_host/src/extension_host.rs b/crates/extension_host/src/extension_host.rs
index a0fa34b38be..36f1f2960cf 100644
--- a/crates/extension_host/src/extension_host.rs
+++ b/crates/extension_host/src/extension_host.rs
@@ -906,7 +906,10 @@ impl ExtensionStore {
.await
}
})
- .await?;
+ .await
+ .inspect_err(|error| {
+ util::log_err(error);
+ })?;
let output_path = &extensions_dir.join(extension_id.as_ref());
if let Some(metadata) = fs.metadata(output_path).await? {