Switch to a new flow for advertising, sharing and joining worktrees

Now, when you open a local worktree, we immediately send an `OpenWorktree` message
to the server, telling it the name of the folder that you've opened, and the names of all the
collaborators (based on a `.zed.toml` file). The server responds with a unique id for the
worktree.

When starting share this local worktree, you now include this previously-assigned id
in the `ShareWorktree` message.

When joining a worktree, there is no longer a need to provide an access token. The access
is controlled by the set of "collaborator logins" that were provided when the worktree
was initially opened by the host.
This commit is contained in:
Max Brunsfeld
2021-09-16 18:39:29 -07:00
parent 176ca9086e
commit e3c0d6980c
5 changed files with 547 additions and 283 deletions
+8 -2
View File
@@ -135,11 +135,13 @@ messages!(
GetUsersResponse,
JoinChannel,
JoinChannelResponse,
JoinWorktree,
JoinWorktreeResponse,
LeaveChannel,
OpenBuffer,
OpenBufferResponse,
JoinWorktree,
JoinWorktreeResponse,
OpenWorktree,
OpenWorktreeResponse,
Ping,
RemovePeer,
SaveBuffer,
@@ -147,6 +149,7 @@ messages!(
SendChannelMessageResponse,
ShareWorktree,
ShareWorktreeResponse,
UnshareWorktree,
UpdateBuffer,
UpdateWorktree,
);
@@ -157,10 +160,12 @@ request_messages!(
(JoinChannel, JoinChannelResponse),
(OpenBuffer, OpenBufferResponse),
(JoinWorktree, JoinWorktreeResponse),
(OpenWorktree, OpenWorktreeResponse),
(Ping, Ack),
(SaveBuffer, BufferSaved),
(UpdateBuffer, Ack),
(ShareWorktree, ShareWorktreeResponse),
(UnshareWorktree, Ack),
(SendChannelMessage, SendChannelMessageResponse),
(GetChannelMessages, GetChannelMessagesResponse),
);
@@ -175,6 +180,7 @@ entity_messages!(
JoinWorktree,
RemovePeer,
SaveBuffer,
UnshareWorktree,
UpdateBuffer,
UpdateWorktree,
);