Add initial support for WSL (#37035)

Closes #36188

## Todo

* [x] CLI
* [x] terminals
* [x] tasks

## For future PRs
* debugging
* UI for opening WSL projects
* fixing workspace state restoration

Release Notes:

- Windows alpha: Zed now supports editing folders in WSL.

---------

Co-authored-by: Junkui Zhang <364772080@qq.com>
This commit is contained in:
Max Brunsfeld
2025-08-29 17:18:52 -07:00
committed by GitHub
co-authored by Junkui Zhang
parent 1c2e2a00fe
commit f78f3e7729
27 changed files with 1701 additions and 786 deletions
+8 -5
View File
@@ -32,6 +32,7 @@ use gpui::{
use keymap_editor;
use onboarding_banner::OnboardingBanner;
use project::Project;
use remote::RemoteConnectionOptions;
use settings::Settings as _;
use std::sync::Arc;
use theme::ActiveTheme;
@@ -304,12 +305,14 @@ impl TitleBar {
fn render_remote_project_connection(&self, cx: &mut Context<Self>) -> Option<AnyElement> {
let options = self.project.read(cx).remote_connection_options(cx)?;
let host: SharedString = options.connection_string().into();
let host: SharedString = options.display_name().into();
let nickname = options
.nickname
.map(|nick| nick.into())
.unwrap_or_else(|| host.clone());
let nickname = if let RemoteConnectionOptions::Ssh(options) = options {
options.nickname.map(|nick| nick.into())
} else {
None
};
let nickname = nickname.unwrap_or_else(|| host.clone());
let (indicator_color, meta) = match self.project.read(cx).remote_connection_state(cx)? {
remote::ConnectionState::Connecting => (Color::Info, format!("Connecting to: {host}")),