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

@ -292,7 +292,10 @@ message Envelope {
Toast toast = 261;
HideToast hide_toast = 262;
OpenServerSettings open_server_settings = 263; // current max
OpenServerSettings open_server_settings = 263;
GetPermalinkToLine get_permalink_to_line = 264;
GetPermalinkToLineResponse get_permalink_to_line_response = 265; // current max
}
reserved 87 to 88;
@ -2508,3 +2511,13 @@ message HideToast {
message OpenServerSettings {
uint64 project_id = 1;
}
message GetPermalinkToLine {
uint64 project_id = 1;
uint64 buffer_id = 2;
Range selection = 3;
}
message GetPermalinkToLineResponse {
string permalink = 1;
}

View file

@ -370,6 +370,8 @@ messages!(
(Toast, Background),
(HideToast, Background),
(OpenServerSettings, Foreground),
(GetPermalinkToLine, Foreground),
(GetPermalinkToLineResponse, Foreground),
);
request_messages!(
@ -494,7 +496,8 @@ request_messages!(
(CheckFileExists, CheckFileExistsResponse),
(ShutdownRemoteServer, Ack),
(RemoveWorktree, Ack),
(OpenServerSettings, OpenBufferResponse)
(OpenServerSettings, OpenBufferResponse),
(GetPermalinkToLine, GetPermalinkToLineResponse),
);
entity_messages!(
@ -571,7 +574,7 @@ entity_messages!(
Toast,
HideToast,
OpenServerSettings,
GetPermalinkToLine,
);
entity_messages!(