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:
@@ -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,
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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>,
|
||||
|
||||
Reference in New Issue
Block a user