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_servers: Pass env variables from settings (#17356)

David Soria Parra74907cb3e636
diff --git a/crates/context_servers/src/manager.rs b/crates/context_servers/src/manager.rs
index 30164cd5c4f..bee8b1c18f7 100644
--- a/crates/context_servers/src/manager.rs
+++ b/crates/context_servers/src/manager.rs
@@ -39,6 +39,7 @@ pub struct ServerConfig {
pub id: String,
pub executable: String,
pub args: Vec<String>,
+ pub env: Option<HashMap<String, String>>,
}
impl Settings for ContextServerSettings {
@@ -70,13 +71,13 @@ impl ContextServer {
}
async fn start(&self, cx: &AsyncAppContext) -> anyhow::Result<()> {
- log::info!("starting context server {}", self.config.id);
+ log::info!("starting context server {}", self.config.id,);
let client = Client::new(
client::ContextServerId(self.config.id.clone()),
client::ModelContextServerBinary {
executable: Path::new(&self.config.executable).to_path_buf(),
args: self.config.args.clone(),
- env: None,
+ env: self.config.env.clone(),
},
cx.clone(),
)?;