ssh remoting: Restore SSH projects when reopening Zed (#19188)

Release Notes:

- N/A

---------

Co-authored-by: Bennet <bennet@zed.dev>
This commit is contained in:
Thorsten Ball 2024-10-14 14:56:25 +02:00 committed by GitHub
parent 71a878aa39
commit 6ec00cdb06
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 248 additions and 70 deletions

View file

@ -11,7 +11,7 @@ use db::sqlez::{
};
use gpui::{AsyncWindowContext, Model, View, WeakView};
use project::Project;
use remote::ssh_session::SshProjectId;
use remote::{ssh_session::SshProjectId, SshConnectionOptions};
use serde::{Deserialize, Serialize};
use std::{
path::{Path, PathBuf},
@ -50,6 +50,15 @@ impl SerializedSshProject {
})
.collect()
}
pub fn connection_options(&self) -> SshConnectionOptions {
SshConnectionOptions {
host: self.host.clone(),
username: self.user.clone(),
port: self.port,
password: None,
}
}
}
impl StaticColumnCount for SerializedSshProject {