Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Add message and operation ACK messages to protos
Mikayla32b4b4d24d29
diff --git a/crates/rpc/proto/zed.proto b/crates/rpc/proto/zed.protoindex d0c9d73fc44..0f289edcf8b 100644--- a/crates/rpc/proto/zed.proto+++ b/crates/rpc/proto/zed.proto@@ -155,6 +155,7 @@ message Envelope {UpdateChannelBufferCollaborators update_channel_buffer_collaborators = 128;RejoinChannelBuffers rejoin_channel_buffers = 129;RejoinChannelBuffersResponse rejoin_channel_buffers_response = 130;+ AckBufferOperation ack_buffer_operation = 143;JoinChannelChat join_channel_chat = 131;JoinChannelChatResponse join_channel_chat_response = 132;@@ -165,10 +166,11 @@ message Envelope {GetChannelMessages get_channel_messages = 137;GetChannelMessagesResponse get_channel_messages_response = 138;RemoveChannelMessage remove_channel_message = 139;+ AckChannelMessage ack_channel_message = 144;LinkChannel link_channel = 140;UnlinkChannel unlink_channel = 141;- MoveChannel move_channel = 142;+ MoveChannel move_channel = 142; // current max: 144}}@@ -1062,6 +1064,11 @@ message RemoveChannelMessage {uint64 message_id = 2;}+message AckChannelMessage {+ uint64 channel_id = 1;+ uint64 message_id = 2;+}+message SendChannelMessageResponse {ChannelMessage message = 1;}@@ -1117,6 +1124,13 @@ message RejoinChannelBuffersResponse {repeated RejoinedChannelBuffer buffers = 1;}+message AckBufferOperation {+ uint64 buffer_id = 1;+ uint64 epoch = 2;+ uint64 lamport_timestamp = 3;+ uint64 replica_id = 4;+}+message JoinChannelBufferResponse {uint64 buffer_id = 1;uint32 replica_id = 2;diff --git a/crates/rpc/src/proto.rs b/crates/rpc/src/proto.rsindex 6d0a0f85d12..f0d7937f6f9 100644--- a/crates/rpc/src/proto.rs+++ b/crates/rpc/src/proto.rs@@ -271,6 +271,8 @@ messages!((LeaveChannelBuffer, Background),(UpdateChannelBuffer, Foreground),(UpdateChannelBufferCollaborators, Foreground),+ (AckBufferOperation, Background),+ (AckChannelMessage, Background),);request_messages!(@@ -406,7 +408,7 @@ entity_messages!(ChannelMessageSent,UpdateChannelBuffer,RemoveChannelMessage,- UpdateChannelBufferCollaborators+ UpdateChannelBufferCollaborators,);const KIB: usize = 1024;