Support remote sessions

This commit is contained in:
Kirill Bulatov
2023-05-25 09:45:50 +03:00
parent f6d7b3d2e8
commit 3327e8a6dd
4 changed files with 99 additions and 25 deletions
+22
View File
@@ -129,6 +129,9 @@ message Envelope {
GetPrivateUserInfo get_private_user_info = 105;
GetPrivateUserInfoResponse get_private_user_info_response = 106;
UpdateDiffBase update_diff_base = 107;
OnTypeFormatting on_type_formatting = 111;
OnTypeFormattingResponse on_type_formatting_response = 112;
}
}
@@ -670,6 +673,25 @@ message PerformRename {
repeated VectorClockEntry version = 5;
}
message OnTypeFormatting {
uint64 project_id = 1;
uint64 buffer_id = 2;
Anchor position = 3;
string trigger = 4;
repeated VectorClockEntry version = 5;
}
message OnTypeFormattingResponse {
repeated OnTypeFormattingResponseEntry entries = 1;
repeated VectorClockEntry version = 2;
}
message OnTypeFormattingResponseEntry {
Anchor start = 1;
Anchor end = 2;
string new_text = 3;
}
message PerformRenameResponse {
ProjectTransaction transaction = 2;
}
+4
View File
@@ -195,6 +195,8 @@ messages!(
(OpenBufferResponse, Background),
(PerformRename, Background),
(PerformRenameResponse, Background),
(OnTypeFormatting, Background),
(OnTypeFormattingResponse, Background),
(Ping, Foreground),
(PrepareRename, Background),
(PrepareRenameResponse, Background),
@@ -279,6 +281,7 @@ request_messages!(
(Ping, Ack),
(PerformRename, PerformRenameResponse),
(PrepareRename, PrepareRenameResponse),
(OnTypeFormatting, OnTypeFormattingResponse),
(ReloadBuffers, ReloadBuffersResponse),
(RequestContact, Ack),
(RemoveContact, Ack),
@@ -323,6 +326,7 @@ entity_messages!(
OpenBufferByPath,
OpenBufferForSymbol,
PerformRename,
OnTypeFormatting,
PrepareRename,
ReloadBuffers,
RemoveProjectCollaborator,