remote ssh: Make "get permalink to line" work (#19366)

This makes the `editor: copy permalink to line` and `editor: copy
permalink to line` actions work in SSH remote projects.

Previously it would only work in local projects.

Demo:


https://github.com/user-attachments/assets/a8012152-b631-4b34-9ff2-e4d033c97dee




Release Notes:

- N/A
This commit is contained in:
Thorsten Ball 2024-10-17 17:07:42 +02:00 committed by GitHub
parent c186e99a3d
commit 4be9da2641
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 219 additions and 79 deletions

View file

@ -30,6 +30,8 @@ client.workspace = true
env_logger.workspace = true
fs.workspace = true
futures.workspace = true
git.workspace = true
git_hosting_providers.workspace = true
gpui.workspace = true
http_client.workspace = true
language.workspace = true

View file

@ -5,6 +5,7 @@ use client::ProxySettings;
use fs::{Fs, RealFs};
use futures::channel::mpsc;
use futures::{select, select_biased, AsyncRead, AsyncWrite, AsyncWriteExt, FutureExt, SinkExt};
use git::GitHostingProviderRegistry;
use gpui::{AppContext, Context as _, ModelContext, UpdateGlobal as _};
use http_client::{read_proxy_from_env, Uri};
use language::LanguageRegistry;
@ -313,6 +314,8 @@ pub fn execute_run(
let listeners = ServerListeners::new(stdin_socket, stdout_socket, stderr_socket)?;
log::info!("starting headless gpui app");
let git_hosting_provider_registry = Arc::new(GitHostingProviderRegistry::new());
gpui::App::headless().run(move |cx| {
settings::init(cx);
HeadlessProject::init(cx);
@ -322,6 +325,9 @@ pub fn execute_run(
client::init_settings(cx);
GitHostingProviderRegistry::set_global(git_hosting_provider_registry, cx);
git_hosting_providers::init(cx);
let project = cx.new_model(|cx| {
let fs = Arc::new(RealFs::new(Default::default(), None));
let node_settings_rx = initialize_settings(session.clone(), fs.clone(), cx);