Set up logic for starting following

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
This commit is contained in:
Max Brunsfeld 2022-03-17 10:46:54 -07:00
parent 2b4738d82d
commit 9716ff7964
4 changed files with 142 additions and 28 deletions

View file

@ -83,7 +83,8 @@ message Envelope {
Follow follow = 72;
FollowResponse follow_response = 73;
UpdateFollower update_follower = 74;
UpdateFollowers update_followers = 74;
Unfollow unfollow = 75;
}
}
@ -537,16 +538,27 @@ message UpdateDiagnostics {
repeated Diagnostic diagnostics = 3;
}
message Follow {}
message Follow {
uint64 project_id = 1;
uint32 leader_id = 2;
}
message FollowResponse {
uint64 current_view_id = 1;
repeated View views = 2;
}
message UpdateFollower {
uint64 current_view_id = 1;
repeated ViewUpdate view_updates = 2;
message UpdateFollowers {
uint64 project_id = 1;
uint64 current_view_id = 2;
repeated View created_views = 3;
repeated ViewUpdate updated_views = 4;
repeated uint32 follower_ids = 5;
}
message Unfollow {
uint64 project_id = 1;
uint32 leader_id = 2;
}
// Entities

View file

@ -147,6 +147,8 @@ messages!(
(BufferSaved, Foreground),
(ChannelMessageSent, Foreground),
(Error, Foreground),
(Follow, Foreground),
(FollowResponse, Foreground),
(FormatBuffers, Foreground),
(FormatBuffersResponse, Foreground),
(GetChannelMessages, Foreground),
@ -196,6 +198,7 @@ messages!(
(SendChannelMessageResponse, Foreground),
(ShareProject, Foreground),
(Test, Foreground),
(Unfollow, Foreground),
(UnregisterProject, Foreground),
(UnregisterWorktree, Foreground),
(UnshareProject, Foreground),
@ -203,6 +206,7 @@ messages!(
(UpdateBufferFile, Foreground),
(UpdateContacts, Foreground),
(UpdateDiagnosticSummary, Foreground),
(UpdateFollowers, Foreground),
(UpdateWorktree, Foreground),
);
@ -212,6 +216,7 @@ request_messages!(
ApplyCompletionAdditionalEdits,
ApplyCompletionAdditionalEditsResponse
),
(Follow, FollowResponse),
(FormatBuffers, FormatBuffersResponse),
(GetChannelMessages, GetChannelMessagesResponse),
(GetChannels, GetChannelsResponse),
@ -248,6 +253,7 @@ entity_messages!(
ApplyCompletionAdditionalEdits,
BufferReloaded,
BufferSaved,
Follow,
FormatBuffers,
GetCodeActions,
GetCompletions,
@ -266,11 +272,13 @@ entity_messages!(
SaveBuffer,
SearchProject,
StartLanguageServer,
Unfollow,
UnregisterWorktree,
UnshareProject,
UpdateBuffer,
UpdateBufferFile,
UpdateDiagnosticSummary,
UpdateFollowers,
UpdateLanguageServer,
RegisterWorktree,
UpdateWorktree,