Support terminals with ssh in remote projects (#11913)

Release Notes:

- Added a way to create terminal tabs in remote projects, if an ssh
connection string is specified
This commit is contained in:
Kirill Bulatov 2024-05-17 17:48:07 +03:00 committed by GitHub
parent 70888cf3d6
commit 8631280baa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 239 additions and 68 deletions

View file

@ -214,8 +214,24 @@ pub fn initialize_workspace(app_state: Arc<AppState>, cx: &mut AppContext) {
workspace_handle.update(&mut cx, |workspace, cx| {
workspace.add_panel(assistant_panel, cx);
workspace.add_panel(project_panel, cx);
if !workspace.project().read(cx).is_remote() {
workspace.add_panel(terminal_panel, cx);
{
let project = workspace.project().read(cx);
if project.is_local()
|| project
.dev_server_project_id()
.and_then(|dev_server_project_id| {
Some(
dev_server_projects::Store::global(cx)
.read(cx)
.dev_server_for_project(dev_server_project_id)?
.ssh_connection_string
.is_some(),
)
})
.unwrap_or(false)
{
workspace.add_panel(terminal_panel, cx);
}
}
workspace.add_panel(channels_panel, cx);
workspace.add_panel(chat_panel, cx);