Notify on opening WSL paths outside of wsl (#40195)

Closes #27340

Release Notes:

- N/A

---------

Co-authored-by: John Tur <john-tur@outlook.com>
This commit is contained in:
Julia Ryan
2025-10-25 01:44:32 +00:00
committed by GitHub
co-authored by John Tur
parent 1dffdea27c
commit 7433d85458
11 changed files with 250 additions and 72 deletions
+2
View File
@@ -4,6 +4,8 @@ pub mod proxy;
pub mod remote_client;
mod transport;
#[cfg(target_os = "windows")]
pub use remote_client::OpenWslPath;
pub use remote_client::{
ConnectionIdentifier, ConnectionState, RemoteClient, RemoteClientDelegate, RemoteClientEvent,
RemoteConnection, RemoteConnectionOptions, RemotePlatform, connect,
+9
View File
@@ -1090,6 +1090,15 @@ impl From<WslConnectionOptions> for RemoteConnectionOptions {
}
}
#[cfg(target_os = "windows")]
/// Open a wsl path (\\wsl.localhost\<distro>\path)
#[derive(Debug, Clone, PartialEq, Eq, gpui::Action)]
#[action(namespace = workspace, no_json, no_register)]
pub struct OpenWslPath {
pub distro: WslConnectionOptions,
pub paths: Vec<PathBuf>,
}
#[async_trait(?Send)]
pub trait RemoteConnection: Send + Sync {
fn start_proxy(
+1 -1
View File
@@ -24,7 +24,7 @@ use util::{
shell::ShellKind,
};
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
#[derive(Debug, Clone, PartialEq, Eq, Hash, serde::Deserialize, schemars::JsonSchema)]
pub struct WslConnectionOptions {
pub distro_name: String,
pub user: Option<String>,