Restructure remote client crate, consolidate SSH logic (#36967)
This is a pure refactor that consolidates all SSH remoting logic such that it should be straightforward to add another transport to the remoting system. Release Notes: - N/A --------- Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
This commit is contained in:
co-authored by
Mikayla Maki
parent
d713390366
commit
1eae76e856
@@ -220,10 +220,10 @@ pub fn init(
|
||||
let installation_id = installation_id.clone();
|
||||
let system_id = system_id.clone();
|
||||
|
||||
let Some(ssh_client) = project.ssh_client() else {
|
||||
let Some(remote_client) = project.remote_client() else {
|
||||
return;
|
||||
};
|
||||
ssh_client.update(cx, |client, cx| {
|
||||
remote_client.update(cx, |client, cx| {
|
||||
if !TelemetrySettings::get_global(cx).diagnostics {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -918,7 +918,7 @@ fn register_actions(
|
||||
capture_audio(workspace, window, cx);
|
||||
});
|
||||
|
||||
if workspace.project().read(cx).is_via_ssh() {
|
||||
if workspace.project().read(cx).is_via_remote_server() {
|
||||
workspace.register_action({
|
||||
move |workspace, _: &OpenServerSettings, window, cx| {
|
||||
let open_server_settings = workspace
|
||||
@@ -1543,7 +1543,7 @@ pub fn open_new_ssh_project_from_project(
|
||||
cx: &mut Context<Workspace>,
|
||||
) -> Task<anyhow::Result<()>> {
|
||||
let app_state = workspace.app_state().clone();
|
||||
let Some(ssh_client) = workspace.project().read(cx).ssh_client() else {
|
||||
let Some(ssh_client) = workspace.project().read(cx).remote_client() else {
|
||||
return Task::ready(Err(anyhow::anyhow!("Not an ssh project")));
|
||||
};
|
||||
let connection_options = ssh_client.read(cx).connection_options();
|
||||
|
||||
Reference in New Issue
Block a user