windows: Add support for SSH (#29145)

Closes #19892

This PR builds on top of #20587 and improves upon it.

Release Notes:

- N/A

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
This commit is contained in:
张小白
2025-07-08 14:34:57 +00:00
committed by GitHub
co-authored by Kirill Bulatov
parent 8bd739d869
commit 0ca0914cca
26 changed files with 1435 additions and 354 deletions
+7 -3
View File
@@ -54,7 +54,7 @@ use std::{
time::{Duration, Instant},
};
use url::Url;
use util::ResultExt;
use util::{ResultExt, paths::RemotePathBuf};
use wasm_host::{
WasmExtension, WasmHost,
wit::{is_supported_wasm_api_version, wasm_api_version_range},
@@ -1689,6 +1689,7 @@ impl ExtensionStore {
.request(proto::SyncExtensions { extensions })
})?
.await?;
let path_style = client.read_with(cx, |client, _| client.path_style())?;
for missing_extension in response.missing_extensions.into_iter() {
let tmp_dir = tempfile::tempdir()?;
@@ -1701,7 +1702,10 @@ impl ExtensionStore {
)
})?
.await?;
let dest_dir = PathBuf::from(&response.tmp_dir).join(missing_extension.clone().id);
let dest_dir = RemotePathBuf::new(
PathBuf::from(&response.tmp_dir).join(missing_extension.clone().id),
path_style,
);
log::info!("Uploading extension {}", missing_extension.clone().id);
client
@@ -1718,7 +1722,7 @@ impl ExtensionStore {
client
.update(cx, |client, _cx| {
client.proto_client().request(proto::InstallExtension {
tmp_dir: dest_dir.to_string_lossy().to_string(),
tmp_dir: dest_dir.to_proto(),
extension: Some(missing_extension),
})
})?
+5 -2
View File
@@ -1,7 +1,10 @@
use std::{path::PathBuf, sync::Arc};
use anyhow::{Context as _, Result};
use client::{TypedEnvelope, proto};
use client::{
TypedEnvelope,
proto::{self, FromProto},
};
use collections::{HashMap, HashSet};
use extension::{
Extension, ExtensionDebugAdapterProviderProxy, ExtensionHostProxy, ExtensionLanguageProxy,
@@ -328,7 +331,7 @@ impl HeadlessExtensionStore {
version: extension.version,
dev: extension.dev,
},
PathBuf::from(envelope.payload.tmp_dir),
PathBuf::from_proto(envelope.payload.tmp_dir),
cx,
)
})?