zed.proto

   1syntax = "proto3";
   2package zed.messages;
   3
   4// Looking for a number? Search "// Current max"
   5
   6message PeerId {
   7    uint32 owner_id = 1;
   8    uint32 id = 2;
   9}
  10
  11message Envelope {
  12    uint32 id = 1;
  13    optional uint32 responding_to = 2;
  14    optional PeerId original_sender_id = 3;
  15
  16    /*
  17        When you are adding a new message type, instead of adding it in semantic order
  18        and bumping the message ID's of everything that follows, add it at the end of the
  19        file and bump the max number. See this
  20        https://github.com/zed-industries/zed/pull/7890#discussion_r1496621823
  21
  22    */
  23    oneof payload {
  24        Hello hello = 4;
  25        Ack ack = 5;
  26        Error error = 6;
  27        Ping ping = 7;
  28        Test test = 8;
  29
  30        CreateRoom create_room = 9;
  31        CreateRoomResponse create_room_response = 10;
  32        JoinRoom join_room = 11;
  33        JoinRoomResponse join_room_response = 12;
  34        RejoinRoom rejoin_room = 13;
  35        RejoinRoomResponse rejoin_room_response = 14;
  36        LeaveRoom leave_room = 15;
  37        Call call = 16;
  38        IncomingCall incoming_call = 17;
  39        CallCanceled call_canceled = 18;
  40        CancelCall cancel_call = 19;
  41        DeclineCall decline_call = 20;
  42        UpdateParticipantLocation update_participant_location = 21;
  43        RoomUpdated room_updated = 22;
  44
  45        ShareProject share_project = 23;
  46        ShareProjectResponse share_project_response = 24;
  47        UnshareProject unshare_project = 25;
  48        JoinProject join_project = 26;
  49        JoinProjectResponse join_project_response = 27;
  50        LeaveProject leave_project = 28;
  51        AddProjectCollaborator add_project_collaborator = 29;
  52        UpdateProjectCollaborator update_project_collaborator = 30;
  53        RemoveProjectCollaborator remove_project_collaborator = 31;
  54
  55        GetDefinition get_definition = 32;
  56        GetDefinitionResponse get_definition_response = 33;
  57        GetTypeDefinition get_type_definition = 34;
  58        GetTypeDefinitionResponse get_type_definition_response = 35;
  59
  60        GetReferences get_references = 36;
  61        GetReferencesResponse get_references_response = 37;
  62        GetDocumentHighlights get_document_highlights = 38;
  63        GetDocumentHighlightsResponse get_document_highlights_response = 39;
  64        GetProjectSymbols get_project_symbols = 40;
  65        GetProjectSymbolsResponse get_project_symbols_response = 41;
  66        OpenBufferForSymbol open_buffer_for_symbol = 42;
  67        OpenBufferForSymbolResponse open_buffer_for_symbol_response = 43;
  68
  69        UpdateProject update_project = 44;
  70        UpdateWorktree update_worktree = 45;
  71
  72        CreateProjectEntry create_project_entry = 46;
  73        RenameProjectEntry rename_project_entry = 47;
  74        CopyProjectEntry copy_project_entry = 48;
  75        DeleteProjectEntry delete_project_entry = 49;
  76        ProjectEntryResponse project_entry_response = 50;
  77        ExpandProjectEntry expand_project_entry = 51;
  78        ExpandProjectEntryResponse expand_project_entry_response = 52;
  79
  80        UpdateDiagnosticSummary update_diagnostic_summary = 53;
  81        StartLanguageServer start_language_server = 54;
  82        UpdateLanguageServer update_language_server = 55;
  83
  84        OpenBufferById open_buffer_by_id = 56;
  85        OpenBufferByPath open_buffer_by_path = 57;
  86        OpenBufferResponse open_buffer_response = 58;
  87        CreateBufferForPeer create_buffer_for_peer = 59;
  88        UpdateBuffer update_buffer = 60;
  89        UpdateBufferFile update_buffer_file = 61;
  90        SaveBuffer save_buffer = 62;
  91        BufferSaved buffer_saved = 63;
  92        BufferReloaded buffer_reloaded = 64;
  93        ReloadBuffers reload_buffers = 65;
  94        ReloadBuffersResponse reload_buffers_response = 66;
  95        SynchronizeBuffers synchronize_buffers = 67;
  96        SynchronizeBuffersResponse synchronize_buffers_response = 68;
  97        FormatBuffers format_buffers = 69;
  98        FormatBuffersResponse format_buffers_response = 70;
  99        GetCompletions get_completions = 71;
 100        GetCompletionsResponse get_completions_response = 72;
 101        ResolveCompletionDocumentation resolve_completion_documentation = 73;
 102        ResolveCompletionDocumentationResponse resolve_completion_documentation_response = 74;
 103        ApplyCompletionAdditionalEdits apply_completion_additional_edits = 75;
 104        ApplyCompletionAdditionalEditsResponse apply_completion_additional_edits_response = 76;
 105        GetCodeActions get_code_actions = 77;
 106        GetCodeActionsResponse get_code_actions_response = 78;
 107        GetHover get_hover = 79;
 108        GetHoverResponse get_hover_response = 80;
 109        ApplyCodeAction apply_code_action = 81;
 110        ApplyCodeActionResponse apply_code_action_response = 82;
 111        PrepareRename prepare_rename = 83;
 112        PrepareRenameResponse prepare_rename_response = 84;
 113        PerformRename perform_rename = 85;
 114        PerformRenameResponse perform_rename_response = 86;
 115        SearchProject search_project = 87;
 116        SearchProjectResponse search_project_response = 88;
 117
 118        UpdateContacts update_contacts = 89;
 119        UpdateInviteInfo update_invite_info = 90;
 120        ShowContacts show_contacts = 91;
 121
 122        GetUsers get_users = 92;
 123        FuzzySearchUsers fuzzy_search_users = 93;
 124        UsersResponse users_response = 94;
 125        RequestContact request_contact = 95;
 126        RespondToContactRequest respond_to_contact_request = 96;
 127        RemoveContact remove_contact = 97;
 128
 129        Follow follow = 98;
 130        FollowResponse follow_response = 99;
 131        UpdateFollowers update_followers = 100;
 132        Unfollow unfollow = 101;
 133        GetPrivateUserInfo get_private_user_info = 102;
 134        GetPrivateUserInfoResponse get_private_user_info_response = 103;
 135        UpdateDiffBase update_diff_base = 104;
 136
 137        OnTypeFormatting on_type_formatting = 105;
 138        OnTypeFormattingResponse on_type_formatting_response = 106;
 139
 140        UpdateWorktreeSettings update_worktree_settings = 107;
 141
 142        InlayHints inlay_hints = 108;
 143        InlayHintsResponse inlay_hints_response = 109;
 144        ResolveInlayHint resolve_inlay_hint = 110;
 145        ResolveInlayHintResponse resolve_inlay_hint_response = 111;
 146        RefreshInlayHints refresh_inlay_hints = 112;
 147
 148        CreateChannel create_channel = 113;
 149        CreateChannelResponse create_channel_response = 114;
 150        InviteChannelMember invite_channel_member = 115;
 151        RemoveChannelMember remove_channel_member = 116;
 152        RespondToChannelInvite respond_to_channel_invite = 117;
 153        UpdateChannels update_channels = 118;
 154        JoinChannel join_channel = 119;
 155        DeleteChannel delete_channel = 120;
 156        GetChannelMembers get_channel_members = 121;
 157        GetChannelMembersResponse get_channel_members_response = 122;
 158        SetChannelMemberRole set_channel_member_role = 123;
 159        RenameChannel rename_channel = 124;
 160        RenameChannelResponse rename_channel_response = 125;
 161
 162        JoinChannelBuffer join_channel_buffer = 126;
 163        JoinChannelBufferResponse join_channel_buffer_response = 127;
 164        UpdateChannelBuffer update_channel_buffer = 128;
 165        LeaveChannelBuffer leave_channel_buffer = 129;
 166        UpdateChannelBufferCollaborators update_channel_buffer_collaborators = 130;
 167        RejoinChannelBuffers rejoin_channel_buffers = 131;
 168        RejoinChannelBuffersResponse rejoin_channel_buffers_response = 132;
 169        AckBufferOperation ack_buffer_operation = 133;
 170
 171        JoinChannelChat join_channel_chat = 134;
 172        JoinChannelChatResponse join_channel_chat_response = 135;
 173        LeaveChannelChat leave_channel_chat = 136;
 174        SendChannelMessage send_channel_message = 137;
 175        SendChannelMessageResponse send_channel_message_response = 138;
 176        ChannelMessageSent channel_message_sent = 139;
 177        GetChannelMessages get_channel_messages = 140;
 178        GetChannelMessagesResponse get_channel_messages_response = 141;
 179        RemoveChannelMessage remove_channel_message = 142;
 180        AckChannelMessage ack_channel_message = 143;
 181        GetChannelMessagesById get_channel_messages_by_id = 144;
 182
 183        MoveChannel move_channel = 147;
 184        SetChannelVisibility set_channel_visibility = 148;
 185
 186        AddNotification add_notification = 149;
 187        GetNotifications get_notifications = 150;
 188        GetNotificationsResponse get_notifications_response = 151;
 189        DeleteNotification delete_notification = 152;
 190        MarkNotificationRead mark_notification_read = 153;
 191        LspExtExpandMacro lsp_ext_expand_macro = 154;
 192        LspExtExpandMacroResponse lsp_ext_expand_macro_response = 155;
 193        SetRoomParticipantRole set_room_participant_role = 156;
 194
 195        UpdateUserChannels update_user_channels = 157;
 196
 197        GetImplementation get_implementation = 162;
 198        GetImplementationResponse get_implementation_response = 163;
 199
 200        JoinHostedProject join_hosted_project = 164;
 201    }
 202
 203    reserved 158 to 161;
 204}
 205
 206// Messages
 207
 208message Hello {
 209    PeerId peer_id = 1;
 210}
 211
 212message Ping {}
 213
 214message Ack {}
 215
 216message Error {
 217    string message = 1;
 218    ErrorCode code = 2;
 219    repeated string tags = 3;
 220}
 221
 222enum ErrorCode {
 223    Internal = 0;
 224    NoSuchChannel = 1;
 225    Disconnected = 2;
 226    SignedOut = 3;
 227    UpgradeRequired = 4;
 228    Forbidden = 5;
 229    NeedsCla = 7;
 230    NotARootChannel = 8;
 231    BadPublicNesting = 9;
 232    CircularNesting = 10;
 233    WrongMoveTarget = 11;
 234    UnsharedItem = 12;
 235    NoSuchProject = 13;
 236    reserved 6;
 237}
 238
 239message Test {
 240    uint64 id = 1;
 241}
 242
 243message CreateRoom {}
 244
 245message CreateRoomResponse {
 246    Room room = 1;
 247    optional LiveKitConnectionInfo live_kit_connection_info = 2;
 248}
 249
 250message JoinRoom {
 251    uint64 id = 1;
 252}
 253
 254message JoinRoomResponse {
 255    Room room = 1;
 256    optional uint64 channel_id = 2;
 257    optional LiveKitConnectionInfo live_kit_connection_info = 3;
 258}
 259
 260message RejoinRoom {
 261    uint64 id = 1;
 262    repeated UpdateProject reshared_projects = 2;
 263    repeated RejoinProject rejoined_projects = 3;
 264}
 265
 266message RejoinProject {
 267    uint64 id = 1;
 268    repeated RejoinWorktree worktrees = 2;
 269}
 270
 271message RejoinWorktree {
 272    uint64 id = 1;
 273    uint64 scan_id = 2;
 274}
 275
 276message RejoinRoomResponse {
 277    Room room = 1;
 278    repeated ResharedProject reshared_projects = 2;
 279    repeated RejoinedProject rejoined_projects = 3;
 280}
 281
 282message ResharedProject {
 283    uint64 id = 1;
 284    repeated Collaborator collaborators = 2;
 285}
 286
 287message RejoinedProject {
 288    uint64 id = 1;
 289    repeated WorktreeMetadata worktrees = 2;
 290    repeated Collaborator collaborators = 3;
 291    repeated LanguageServer language_servers = 4;
 292}
 293
 294message LeaveRoom {}
 295
 296message Room {
 297    uint64 id = 1;
 298    repeated Participant participants = 2;
 299    repeated PendingParticipant pending_participants = 3;
 300    repeated Follower followers = 4;
 301    string live_kit_room = 5;
 302}
 303
 304message Participant {
 305    uint64 user_id = 1;
 306    PeerId peer_id = 2;
 307    repeated ParticipantProject projects = 3;
 308    ParticipantLocation location = 4;
 309    uint32 participant_index = 5;
 310    ChannelRole role = 6;
 311    reserved 7;
 312}
 313
 314message PendingParticipant {
 315    uint64 user_id = 1;
 316    uint64 calling_user_id = 2;
 317    optional uint64 initial_project_id = 3;
 318}
 319
 320message ParticipantProject {
 321    uint64 id = 1;
 322    repeated string worktree_root_names = 2;
 323}
 324
 325message Follower {
 326    PeerId leader_id = 1;
 327    PeerId follower_id = 2;
 328    uint64 project_id = 3;
 329}
 330
 331message ParticipantLocation {
 332    oneof variant {
 333        SharedProject shared_project = 1;
 334        UnsharedProject unshared_project = 2;
 335        External external = 3;
 336    }
 337
 338    message SharedProject {
 339        uint64 id = 1;
 340    }
 341
 342    message UnsharedProject {}
 343
 344    message External {}
 345}
 346
 347message Call {
 348    uint64 room_id = 1;
 349    uint64 called_user_id = 2;
 350    optional uint64 initial_project_id = 3;
 351}
 352
 353message IncomingCall {
 354    uint64 room_id = 1;
 355    uint64 calling_user_id = 2;
 356    repeated uint64 participant_user_ids = 3;
 357    optional ParticipantProject initial_project = 4;
 358}
 359
 360message CallCanceled {
 361    uint64 room_id = 1;
 362}
 363
 364message CancelCall {
 365    uint64 room_id = 1;
 366    uint64 called_user_id = 2;
 367}
 368
 369message DeclineCall {
 370    uint64 room_id = 1;
 371}
 372
 373message UpdateParticipantLocation {
 374    uint64 room_id = 1;
 375    ParticipantLocation location = 2;
 376}
 377
 378message RoomUpdated {
 379    Room room = 1;
 380}
 381
 382message LiveKitConnectionInfo {
 383    string server_url = 1;
 384    string token = 2;
 385    bool can_publish = 3;
 386}
 387
 388message ShareProject {
 389    uint64 room_id = 1;
 390    repeated WorktreeMetadata worktrees = 2;
 391}
 392
 393message ShareProjectResponse {
 394    uint64 project_id = 1;
 395}
 396
 397message UnshareProject {
 398    uint64 project_id = 1;
 399}
 400
 401message UpdateProject {
 402    uint64 project_id = 1;
 403    repeated WorktreeMetadata worktrees = 2;
 404}
 405
 406message JoinProject {
 407    uint64 project_id = 1;
 408}
 409
 410message JoinHostedProject {
 411    uint64 project_id = 1;
 412}
 413
 414message JoinProjectResponse {
 415    uint64 project_id = 5;
 416    uint32 replica_id = 1;
 417    repeated WorktreeMetadata worktrees = 2;
 418    repeated Collaborator collaborators = 3;
 419    repeated LanguageServer language_servers = 4;
 420    ChannelRole role = 6;
 421}
 422
 423message LeaveProject {
 424    uint64 project_id = 1;
 425}
 426
 427message UpdateWorktree {
 428    uint64 project_id = 1;
 429    uint64 worktree_id = 2;
 430    string root_name = 3;
 431    repeated Entry updated_entries = 4;
 432    repeated uint64 removed_entries = 5;
 433    repeated RepositoryEntry updated_repositories = 6;
 434    repeated uint64 removed_repositories = 7;
 435    uint64 scan_id = 8;
 436    bool is_last_update = 9;
 437    string abs_path = 10;
 438}
 439
 440message UpdateWorktreeSettings {
 441    uint64 project_id = 1;
 442    uint64 worktree_id = 2;
 443    string path = 3;
 444    optional string content = 4;
 445}
 446
 447message CreateProjectEntry {
 448    uint64 project_id = 1;
 449    uint64 worktree_id = 2;
 450    string path = 3;
 451    bool is_directory = 4;
 452}
 453
 454message RenameProjectEntry {
 455    uint64 project_id = 1;
 456    uint64 entry_id = 2;
 457    string new_path = 3;
 458}
 459
 460message CopyProjectEntry {
 461    uint64 project_id = 1;
 462    uint64 entry_id = 2;
 463    string new_path = 3;
 464}
 465
 466message DeleteProjectEntry {
 467    uint64 project_id = 1;
 468    uint64 entry_id = 2;
 469}
 470
 471message ExpandProjectEntry {
 472    uint64 project_id = 1;
 473    uint64 entry_id = 2;
 474}
 475
 476message ExpandProjectEntryResponse {
 477    uint64 worktree_scan_id = 1;
 478}
 479
 480message ProjectEntryResponse {
 481    optional Entry entry = 1;
 482    uint64 worktree_scan_id = 2;
 483}
 484
 485message AddProjectCollaborator {
 486    uint64 project_id = 1;
 487    Collaborator collaborator = 2;
 488}
 489
 490message UpdateProjectCollaborator {
 491    uint64 project_id = 1;
 492    PeerId old_peer_id = 2;
 493    PeerId new_peer_id = 3;
 494}
 495
 496message RemoveProjectCollaborator {
 497    uint64 project_id = 1;
 498    PeerId peer_id = 2;
 499}
 500
 501message UpdateChannelBufferCollaborators {
 502    uint64 channel_id = 1;
 503    repeated Collaborator collaborators = 2;
 504}
 505
 506message GetDefinition {
 507     uint64 project_id = 1;
 508     uint64 buffer_id = 2;
 509     Anchor position = 3;
 510     repeated VectorClockEntry version = 4;
 511 }
 512
 513message GetDefinitionResponse {
 514    repeated LocationLink links = 1;
 515}
 516
 517message GetTypeDefinition {
 518     uint64 project_id = 1;
 519     uint64 buffer_id = 2;
 520     Anchor position = 3;
 521     repeated VectorClockEntry version = 4;
 522 }
 523
 524message GetTypeDefinitionResponse {
 525    repeated LocationLink links = 1;
 526}
 527message GetImplementation {
 528     uint64 project_id = 1;
 529     uint64 buffer_id = 2;
 530     Anchor position = 3;
 531     repeated VectorClockEntry version = 4;
 532 }
 533
 534message GetImplementationResponse {
 535    repeated LocationLink links = 1;
 536}
 537
 538message GetReferences {
 539     uint64 project_id = 1;
 540     uint64 buffer_id = 2;
 541     Anchor position = 3;
 542     repeated VectorClockEntry version = 4;
 543 }
 544
 545message GetReferencesResponse {
 546    repeated Location locations = 1;
 547}
 548
 549message GetDocumentHighlights {
 550     uint64 project_id = 1;
 551     uint64 buffer_id = 2;
 552     Anchor position = 3;
 553     repeated VectorClockEntry version = 4;
 554 }
 555
 556message GetDocumentHighlightsResponse {
 557    repeated DocumentHighlight highlights = 1;
 558}
 559
 560message Location {
 561    uint64 buffer_id = 1;
 562    Anchor start = 2;
 563    Anchor end = 3;
 564}
 565
 566message LocationLink {
 567    optional Location origin = 1;
 568    Location target = 2;
 569}
 570
 571message DocumentHighlight {
 572    Kind kind = 1;
 573    Anchor start = 2;
 574    Anchor end = 3;
 575
 576    enum Kind {
 577        Text = 0;
 578        Read = 1;
 579        Write = 2;
 580    }
 581}
 582
 583message GetProjectSymbols {
 584    uint64 project_id = 1;
 585    string query = 2;
 586}
 587
 588message GetProjectSymbolsResponse {
 589    repeated Symbol symbols = 4;
 590}
 591
 592message Symbol {
 593    uint64 source_worktree_id = 1;
 594    uint64 worktree_id = 2;
 595    string language_server_name = 3;
 596    string name = 4;
 597    int32 kind = 5;
 598    string path = 6;
 599    // Cannot use generate anchors for unopened files,
 600    // so we are forced to use point coords instead
 601    PointUtf16 start = 7;
 602    PointUtf16 end = 8;
 603    bytes signature = 9;
 604}
 605
 606message OpenBufferForSymbol {
 607    uint64 project_id = 1;
 608    Symbol symbol = 2;
 609}
 610
 611message OpenBufferForSymbolResponse {
 612    uint64 buffer_id = 1;
 613}
 614
 615message OpenBufferByPath {
 616    uint64 project_id = 1;
 617    uint64 worktree_id = 2;
 618    string path = 3;
 619}
 620
 621message OpenBufferById {
 622    uint64 project_id = 1;
 623    uint64 id = 2;
 624}
 625
 626message OpenBufferResponse {
 627    uint64 buffer_id = 1;
 628}
 629
 630message CreateBufferForPeer {
 631    uint64 project_id = 1;
 632    PeerId peer_id = 2;
 633    oneof variant {
 634        BufferState state = 3;
 635        BufferChunk chunk = 4;
 636    }
 637}
 638
 639message UpdateBuffer {
 640    uint64 project_id = 1;
 641    uint64 buffer_id = 2;
 642    repeated Operation operations = 3;
 643}
 644
 645message UpdateChannelBuffer {
 646    uint64 channel_id = 1;
 647    repeated Operation operations = 2;
 648}
 649
 650message UpdateBufferFile {
 651    uint64 project_id = 1;
 652    uint64 buffer_id = 2;
 653    File file = 3;
 654}
 655
 656message SaveBuffer {
 657    uint64 project_id = 1;
 658    uint64 buffer_id = 2;
 659    repeated VectorClockEntry version = 3;
 660}
 661
 662message BufferSaved {
 663    uint64 project_id = 1;
 664    uint64 buffer_id = 2;
 665    repeated VectorClockEntry version = 3;
 666    Timestamp mtime = 4;
 667    string fingerprint = 5;
 668}
 669
 670message BufferReloaded {
 671    uint64 project_id = 1;
 672    uint64 buffer_id = 2;
 673    repeated VectorClockEntry version = 3;
 674    Timestamp mtime = 4;
 675    string fingerprint = 5;
 676    LineEnding line_ending = 6;
 677}
 678
 679message ReloadBuffers {
 680    uint64 project_id = 1;
 681    repeated uint64 buffer_ids = 2;
 682}
 683
 684message ReloadBuffersResponse {
 685    ProjectTransaction transaction = 1;
 686}
 687
 688message SynchronizeBuffers {
 689    uint64 project_id = 1;
 690    repeated BufferVersion buffers = 2;
 691}
 692
 693message SynchronizeBuffersResponse {
 694    repeated BufferVersion buffers = 1;
 695}
 696
 697message BufferVersion {
 698    uint64 id = 1;
 699    repeated VectorClockEntry version = 2;
 700}
 701
 702message ChannelBufferVersion {
 703    uint64 channel_id = 1;
 704    repeated VectorClockEntry version = 2;
 705    uint64 epoch = 3;
 706}
 707
 708enum FormatTrigger {
 709    Save = 0;
 710    Manual = 1;
 711}
 712
 713message FormatBuffers {
 714    uint64 project_id = 1;
 715    FormatTrigger trigger = 2;
 716    repeated uint64 buffer_ids = 3;
 717}
 718
 719message FormatBuffersResponse {
 720    ProjectTransaction transaction = 1;
 721}
 722
 723message GetCompletions {
 724    uint64 project_id = 1;
 725    uint64 buffer_id = 2;
 726    Anchor position = 3;
 727    repeated VectorClockEntry version = 4;
 728}
 729
 730message GetCompletionsResponse {
 731    repeated Completion completions = 1;
 732    repeated VectorClockEntry version = 2;
 733}
 734
 735message ApplyCompletionAdditionalEdits {
 736    uint64 project_id = 1;
 737    uint64 buffer_id = 2;
 738    Completion completion = 3;
 739}
 740
 741message ApplyCompletionAdditionalEditsResponse {
 742    Transaction transaction = 1;
 743}
 744
 745message Completion {
 746    Anchor old_start = 1;
 747    Anchor old_end = 2;
 748    string new_text = 3;
 749    uint64 server_id = 4;
 750    bytes lsp_completion = 5;
 751}
 752
 753message GetCodeActions {
 754    uint64 project_id = 1;
 755    uint64 buffer_id = 2;
 756    Anchor start = 3;
 757    Anchor end = 4;
 758    repeated VectorClockEntry version = 5;
 759}
 760
 761message GetCodeActionsResponse {
 762    repeated CodeAction actions = 1;
 763    repeated VectorClockEntry version = 2;
 764}
 765
 766message GetHover {
 767    uint64 project_id = 1;
 768    uint64 buffer_id = 2;
 769    Anchor position = 3;
 770    repeated VectorClockEntry version = 5;
 771}
 772
 773message GetHoverResponse {
 774    optional Anchor start = 1;
 775    optional Anchor end = 2;
 776    repeated HoverBlock contents = 3;
 777}
 778
 779message HoverBlock {
 780    string text = 1;
 781    optional string language = 2;
 782    bool is_markdown = 3;
 783}
 784
 785message ApplyCodeAction {
 786    uint64 project_id = 1;
 787    uint64 buffer_id = 2;
 788    CodeAction action = 3;
 789}
 790
 791message ApplyCodeActionResponse {
 792    ProjectTransaction transaction = 1;
 793}
 794
 795message PrepareRename {
 796    uint64 project_id = 1;
 797    uint64 buffer_id = 2;
 798    Anchor position = 3;
 799    repeated VectorClockEntry version = 4;
 800}
 801
 802message PrepareRenameResponse {
 803    bool can_rename = 1;
 804    Anchor start = 2;
 805    Anchor end = 3;
 806    repeated VectorClockEntry version = 4;
 807}
 808
 809message PerformRename {
 810    uint64 project_id = 1;
 811    uint64 buffer_id = 2;
 812    Anchor position = 3;
 813    string new_name = 4;
 814    repeated VectorClockEntry version = 5;
 815}
 816
 817message OnTypeFormatting {
 818    uint64 project_id = 1;
 819    uint64 buffer_id = 2;
 820    Anchor position = 3;
 821    string trigger = 4;
 822    repeated VectorClockEntry version = 5;
 823}
 824
 825message OnTypeFormattingResponse {
 826    Transaction transaction = 1;
 827}
 828
 829message InlayHints {
 830    uint64 project_id = 1;
 831    uint64 buffer_id = 2;
 832    Anchor start = 3;
 833    Anchor end = 4;
 834    repeated VectorClockEntry version = 5;
 835}
 836
 837message InlayHintsResponse {
 838    repeated InlayHint hints = 1;
 839    repeated VectorClockEntry version = 2;
 840}
 841
 842message InlayHint {
 843    Anchor position = 1;
 844    InlayHintLabel label = 2;
 845    optional string kind = 3;
 846    bool padding_left = 4;
 847    bool padding_right = 5;
 848    InlayHintTooltip tooltip = 6;
 849    ResolveState resolve_state = 7;
 850}
 851
 852message InlayHintLabel {
 853    oneof label {
 854        string value = 1;
 855        InlayHintLabelParts label_parts = 2;
 856    }
 857}
 858
 859message InlayHintLabelParts {
 860    repeated InlayHintLabelPart parts = 1;
 861}
 862
 863message InlayHintLabelPart {
 864    string value = 1;
 865    InlayHintLabelPartTooltip tooltip = 2;
 866    optional string location_url = 3;
 867    PointUtf16 location_range_start = 4;
 868    PointUtf16 location_range_end = 5;
 869    optional uint64 language_server_id = 6;
 870}
 871
 872message InlayHintTooltip {
 873    oneof content {
 874        string value = 1;
 875        MarkupContent markup_content = 2;
 876    }
 877}
 878
 879message InlayHintLabelPartTooltip {
 880    oneof content {
 881        string value = 1;
 882        MarkupContent markup_content = 2;
 883    }
 884}
 885
 886message ResolveState {
 887    State state = 1;
 888    LspResolveState lsp_resolve_state = 2;
 889
 890    enum State {
 891        Resolved = 0;
 892        CanResolve = 1;
 893        Resolving = 2;
 894    }
 895
 896    message LspResolveState {
 897        string value = 1;
 898        uint64 server_id = 2;
 899    }
 900}
 901
 902message ResolveCompletionDocumentation {
 903    uint64 project_id = 1;
 904    uint64 language_server_id = 2;
 905    bytes lsp_completion = 3;
 906}
 907
 908message ResolveCompletionDocumentationResponse {
 909    string text = 1;
 910    bool is_markdown = 2;
 911}
 912
 913message ResolveInlayHint {
 914    uint64 project_id = 1;
 915    uint64 buffer_id = 2;
 916    uint64 language_server_id = 3;
 917    InlayHint hint = 4;
 918}
 919
 920message ResolveInlayHintResponse {
 921    InlayHint hint = 1;
 922}
 923
 924message RefreshInlayHints {
 925    uint64 project_id = 1;
 926}
 927
 928message MarkupContent {
 929    bool is_markdown = 1;
 930    string value = 2;
 931}
 932
 933message PerformRenameResponse {
 934    ProjectTransaction transaction = 2;
 935}
 936
 937message SearchProject {
 938    uint64 project_id = 1;
 939    string query = 2;
 940    bool regex = 3;
 941    bool whole_word = 4;
 942    bool case_sensitive = 5;
 943    string files_to_include = 6;
 944    string files_to_exclude = 7;
 945    bool include_ignored = 8;
 946}
 947
 948message SearchProjectResponse {
 949    repeated Location locations = 1;
 950    bool limit_reached = 2;
 951}
 952
 953message CodeAction {
 954    uint64 server_id = 1;
 955    Anchor start = 2;
 956    Anchor end = 3;
 957    bytes lsp_action = 4;
 958}
 959
 960message ProjectTransaction {
 961    repeated uint64 buffer_ids = 1;
 962    repeated Transaction transactions = 2;
 963}
 964
 965message Transaction {
 966    LamportTimestamp id = 1;
 967    repeated LamportTimestamp edit_ids = 2;
 968    repeated VectorClockEntry start = 3;
 969}
 970
 971message LamportTimestamp {
 972    uint32 replica_id = 1;
 973    uint32 value = 2;
 974}
 975
 976message LanguageServer {
 977    uint64 id = 1;
 978    string name = 2;
 979}
 980
 981message StartLanguageServer {
 982    uint64 project_id = 1;
 983    LanguageServer server = 2;
 984}
 985
 986message UpdateDiagnosticSummary {
 987    uint64 project_id = 1;
 988    uint64 worktree_id = 2;
 989    DiagnosticSummary summary = 3;
 990}
 991
 992message DiagnosticSummary {
 993    string path = 1;
 994    uint64 language_server_id = 2;
 995    uint32 error_count = 3;
 996    uint32 warning_count = 4;
 997}
 998
 999message UpdateLanguageServer {
1000    uint64 project_id = 1;
1001    uint64 language_server_id = 2;
1002    oneof variant {
1003        LspWorkStart work_start = 3;
1004        LspWorkProgress work_progress = 4;
1005        LspWorkEnd work_end = 5;
1006        LspDiskBasedDiagnosticsUpdating disk_based_diagnostics_updating = 6;
1007        LspDiskBasedDiagnosticsUpdated disk_based_diagnostics_updated = 7;
1008    }
1009}
1010
1011message LspWorkStart {
1012    string token = 1;
1013    optional string message = 2;
1014    optional uint32 percentage = 3;
1015}
1016
1017message LspWorkProgress {
1018    string token = 1;
1019    optional string message = 2;
1020    optional uint32 percentage = 3;
1021}
1022
1023message LspWorkEnd {
1024    string token = 1;
1025}
1026
1027message LspDiskBasedDiagnosticsUpdating {}
1028
1029message LspDiskBasedDiagnosticsUpdated {}
1030
1031message UpdateChannels {
1032    repeated Channel channels = 1;
1033    repeated uint64 delete_channels = 4;
1034    repeated Channel channel_invitations = 5;
1035    repeated uint64 remove_channel_invitations = 6;
1036    repeated ChannelParticipants channel_participants = 7;
1037    repeated ChannelMessageId latest_channel_message_ids = 8;
1038    repeated ChannelBufferVersion latest_channel_buffer_versions = 9;
1039
1040    repeated HostedProject hosted_projects = 10;
1041    repeated uint64 deleted_hosted_projects = 11;
1042}
1043
1044message UpdateUserChannels {
1045    repeated ChannelMessageId observed_channel_message_id = 1;
1046    repeated ChannelBufferVersion observed_channel_buffer_version = 2;
1047    repeated ChannelMembership channel_memberships = 3;
1048}
1049
1050message ChannelMembership {
1051    uint64 channel_id = 1;
1052    ChannelRole role = 2;
1053}
1054
1055message ChannelMessageId {
1056    uint64 channel_id = 1;
1057    uint64 message_id = 2;
1058}
1059
1060message ChannelPermission {
1061    uint64 channel_id = 1;
1062    ChannelRole role = 3;
1063}
1064
1065message ChannelParticipants {
1066    uint64 channel_id = 1;
1067    repeated uint64 participant_user_ids = 2;
1068}
1069
1070message HostedProject {
1071    uint64 project_id = 1;
1072    uint64 channel_id = 2;
1073    string name = 3;
1074    ChannelVisibility visibility = 4;
1075}
1076
1077message JoinChannel {
1078    uint64 channel_id = 1;
1079}
1080
1081message DeleteChannel {
1082    uint64 channel_id = 1;
1083}
1084
1085message GetChannelMembers {
1086    uint64 channel_id = 1;
1087}
1088
1089message GetChannelMembersResponse {
1090    repeated ChannelMember members = 1;
1091}
1092
1093message ChannelMember {
1094    uint64 user_id = 1;
1095    Kind kind = 3;
1096    ChannelRole role = 4;
1097
1098    enum Kind {
1099        Member = 0;
1100        Invitee = 1;
1101    }
1102}
1103
1104message CreateChannel {
1105    string name = 1;
1106    optional uint64 parent_id = 2;
1107}
1108
1109message CreateChannelResponse {
1110    Channel channel = 1;
1111    optional uint64 parent_id = 2;
1112}
1113
1114message InviteChannelMember {
1115    uint64 channel_id = 1;
1116    uint64 user_id = 2;
1117    ChannelRole role = 4;
1118}
1119
1120message RemoveChannelMember {
1121    uint64 channel_id = 1;
1122    uint64 user_id = 2;
1123}
1124
1125enum ChannelRole {
1126    Admin = 0;
1127    Member = 1;
1128    Guest = 2;
1129    Banned = 3;
1130    Talker = 4;
1131}
1132
1133message SetChannelMemberRole {
1134    uint64 channel_id = 1;
1135    uint64 user_id = 2;
1136    ChannelRole role = 3;
1137}
1138
1139message SetChannelVisibility {
1140    uint64 channel_id = 1;
1141    ChannelVisibility visibility = 2;
1142}
1143
1144message RenameChannel {
1145    uint64 channel_id = 1;
1146    string name = 2;
1147}
1148
1149message RenameChannelResponse {
1150    Channel channel = 1;
1151}
1152
1153message JoinChannelChat {
1154    uint64 channel_id = 1;
1155}
1156
1157message JoinChannelChatResponse {
1158    repeated ChannelMessage messages = 1;
1159    bool done = 2;
1160}
1161
1162message LeaveChannelChat {
1163    uint64 channel_id = 1;
1164}
1165
1166message SendChannelMessage {
1167    uint64 channel_id = 1;
1168    string body = 2;
1169    Nonce nonce = 3;
1170    repeated ChatMention mentions = 4;
1171    optional uint64 reply_to_message_id = 5;
1172}
1173
1174message RemoveChannelMessage {
1175    uint64 channel_id = 1;
1176    uint64 message_id = 2;
1177}
1178
1179message AckChannelMessage {
1180    uint64 channel_id = 1;
1181    uint64 message_id = 2;
1182}
1183
1184message SendChannelMessageResponse {
1185    ChannelMessage message = 1;
1186}
1187
1188message ChannelMessageSent {
1189    uint64 channel_id = 1;
1190    ChannelMessage message = 2;
1191}
1192
1193message GetChannelMessages {
1194    uint64 channel_id = 1;
1195    uint64 before_message_id = 2;
1196}
1197
1198message GetChannelMessagesResponse {
1199    repeated ChannelMessage messages = 1;
1200    bool done = 2;
1201}
1202
1203message GetChannelMessagesById {
1204    repeated uint64 message_ids = 1;
1205}
1206
1207message MoveChannel {
1208    uint64 channel_id = 1;
1209    uint64 to = 2;
1210}
1211
1212message JoinChannelBuffer {
1213    uint64 channel_id = 1;
1214}
1215
1216message ChannelMessage {
1217    uint64 id = 1;
1218    string body = 2;
1219    uint64 timestamp = 3;
1220    uint64 sender_id = 4;
1221    Nonce nonce = 5;
1222    repeated ChatMention mentions = 6;
1223    optional uint64 reply_to_message_id = 7;
1224}
1225
1226message ChatMention {
1227    Range range = 1;
1228    uint64 user_id = 2;
1229}
1230
1231message RejoinChannelBuffers {
1232    repeated ChannelBufferVersion buffers = 1;
1233}
1234
1235message RejoinChannelBuffersResponse {
1236    repeated RejoinedChannelBuffer buffers = 1;
1237}
1238
1239message AckBufferOperation {
1240    uint64 buffer_id = 1;
1241    uint64 epoch = 2;
1242    repeated VectorClockEntry version = 3;
1243}
1244
1245message JoinChannelBufferResponse {
1246    uint64 buffer_id = 1;
1247    uint32 replica_id = 2;
1248    string base_text = 3;
1249    repeated Operation operations = 4;
1250    repeated Collaborator collaborators = 5;
1251    uint64 epoch = 6;
1252}
1253
1254message RejoinedChannelBuffer {
1255    uint64 channel_id = 1;
1256    repeated VectorClockEntry version = 2;
1257    repeated Operation operations = 3;
1258    repeated Collaborator collaborators = 4;
1259}
1260
1261message LeaveChannelBuffer {
1262    uint64 channel_id = 1;
1263}
1264
1265message RespondToChannelInvite {
1266    uint64 channel_id = 1;
1267    bool accept = 2;
1268}
1269
1270message GetUsers {
1271    repeated uint64 user_ids = 1;
1272}
1273
1274message FuzzySearchUsers {
1275    string query = 1;
1276}
1277
1278message UsersResponse {
1279    repeated User users = 1;
1280}
1281
1282message RequestContact {
1283    uint64 responder_id = 1;
1284}
1285
1286message RemoveContact {
1287    uint64 user_id = 1;
1288}
1289
1290message RespondToContactRequest {
1291    uint64 requester_id = 1;
1292    ContactRequestResponse response = 2;
1293}
1294
1295enum ContactRequestResponse {
1296    Accept = 0;
1297    Decline = 1;
1298    Block = 2;
1299    Dismiss = 3;
1300}
1301
1302message UpdateContacts {
1303    repeated Contact contacts = 1;
1304    repeated uint64 remove_contacts = 2;
1305    repeated IncomingContactRequest incoming_requests = 3;
1306    repeated uint64 remove_incoming_requests = 4;
1307    repeated uint64 outgoing_requests = 5;
1308    repeated uint64 remove_outgoing_requests = 6;
1309}
1310
1311message UpdateInviteInfo {
1312    string url = 1;
1313    uint32 count = 2;
1314}
1315
1316message ShowContacts {}
1317
1318message IncomingContactRequest {
1319    uint64 requester_id = 1;
1320}
1321
1322message UpdateDiagnostics {
1323    uint32 replica_id = 1;
1324    uint32 lamport_timestamp = 2;
1325    uint64 server_id = 3;
1326    repeated Diagnostic diagnostics = 4;
1327}
1328
1329message Follow {
1330    uint64 room_id = 1;
1331    optional uint64 project_id = 2;
1332    PeerId leader_id = 3;
1333}
1334
1335message FollowResponse {
1336    View active_view = 3;
1337    // TODO: after 0.124.0 is retired, remove these.
1338    optional ViewId active_view_id = 1;
1339    repeated View views = 2;
1340}
1341
1342message UpdateFollowers {
1343    uint64 room_id = 1;
1344    optional uint64 project_id = 2;
1345    reserved 3;
1346    oneof variant {
1347        View create_view = 5;
1348        // TODO: after 0.124.0 is retired, remove these.
1349        UpdateActiveView update_active_view = 4;
1350        UpdateView update_view = 6;
1351    }
1352}
1353
1354message Unfollow {
1355    uint64 room_id = 1;
1356    optional uint64 project_id = 2;
1357    PeerId leader_id = 3;
1358}
1359
1360message GetPrivateUserInfo {}
1361
1362message GetPrivateUserInfoResponse {
1363    string metrics_id = 1;
1364    bool staff = 2;
1365    repeated string flags = 3;
1366}
1367
1368// Entities
1369
1370message ViewId {
1371    PeerId creator = 1;
1372    uint64 id = 2;
1373}
1374
1375message UpdateActiveView {
1376    optional ViewId id = 1;
1377    optional PeerId leader_id = 2;
1378    View view = 3;
1379}
1380
1381message UpdateView {
1382    ViewId id = 1;
1383    optional PeerId leader_id = 2;
1384
1385    oneof variant {
1386        Editor editor = 3;
1387    }
1388
1389    message Editor {
1390        repeated ExcerptInsertion inserted_excerpts = 1;
1391        repeated uint64 deleted_excerpts = 2;
1392        repeated Selection selections = 3;
1393        optional Selection pending_selection = 4;
1394        EditorAnchor scroll_top_anchor = 5;
1395        float scroll_x = 6;
1396        float scroll_y = 7;
1397    }
1398}
1399
1400message View {
1401    ViewId id = 1;
1402    optional PeerId leader_id = 2;
1403
1404    oneof variant {
1405        Editor editor = 3;
1406        ChannelView channel_view = 4;
1407    }
1408
1409    message Editor {
1410        bool singleton = 1;
1411        optional string title = 2;
1412        repeated Excerpt excerpts = 3;
1413        repeated Selection selections = 4;
1414        optional Selection pending_selection = 5;
1415        EditorAnchor scroll_top_anchor = 6;
1416        float scroll_x = 7;
1417        float scroll_y = 8;
1418    }
1419
1420    message ChannelView {
1421        uint64 channel_id = 1;
1422        Editor editor = 2;
1423    }
1424}
1425
1426message Collaborator {
1427    PeerId peer_id = 1;
1428    uint32 replica_id = 2;
1429    uint64 user_id = 3;
1430}
1431
1432message User {
1433    uint64 id = 1;
1434    string github_login = 2;
1435    string avatar_url = 3;
1436}
1437
1438message File {
1439    uint64 worktree_id = 1;
1440    optional uint64 entry_id = 2;
1441    string path = 3;
1442    Timestamp mtime = 4;
1443    bool is_deleted = 5;
1444}
1445
1446message Entry {
1447    uint64 id = 1;
1448    bool is_dir = 2;
1449    string path = 3;
1450    uint64 inode = 4;
1451    Timestamp mtime = 5;
1452    bool is_symlink = 6;
1453    bool is_ignored = 7;
1454    bool is_external = 8;
1455    optional GitStatus git_status = 9;
1456}
1457
1458message RepositoryEntry {
1459    uint64 work_directory_id = 1;
1460    optional string branch = 2;
1461}
1462
1463message StatusEntry {
1464    string repo_path = 1;
1465    GitStatus status = 2;
1466}
1467
1468enum GitStatus {
1469    Added = 0;
1470    Modified = 1;
1471    Conflict = 2;
1472}
1473
1474message BufferState {
1475    uint64 id = 1;
1476    optional File file = 2;
1477    string base_text = 3;
1478    optional string diff_base = 4;
1479    LineEnding line_ending = 5;
1480    repeated VectorClockEntry saved_version = 6;
1481    string saved_version_fingerprint = 7;
1482    Timestamp saved_mtime = 8;
1483}
1484
1485message BufferChunk {
1486    uint64 buffer_id = 1;
1487    repeated Operation operations = 2;
1488    bool is_last = 3;
1489}
1490
1491enum LineEnding {
1492    Unix = 0;
1493    Windows = 1;
1494}
1495
1496message Selection {
1497    uint64 id = 1;
1498    EditorAnchor start = 2;
1499    EditorAnchor end = 3;
1500    bool reversed = 4;
1501}
1502
1503message EditorAnchor {
1504    uint64 excerpt_id = 1;
1505    Anchor anchor = 2;
1506}
1507
1508enum CursorShape {
1509    CursorBar = 0;
1510    CursorBlock = 1;
1511    CursorUnderscore = 2;
1512    CursorHollow = 3;
1513}
1514
1515message ExcerptInsertion {
1516    Excerpt excerpt = 1;
1517    optional uint64 previous_excerpt_id = 2;
1518}
1519
1520message Excerpt {
1521    uint64 id = 1;
1522    uint64 buffer_id = 2;
1523    Anchor context_start = 3;
1524    Anchor context_end = 4;
1525    Anchor primary_start = 5;
1526    Anchor primary_end = 6;
1527}
1528
1529message Anchor {
1530    uint32 replica_id = 1;
1531    uint32 timestamp = 2;
1532    uint64 offset = 3;
1533    Bias bias = 4;
1534    optional uint64 buffer_id = 5;
1535}
1536
1537enum Bias {
1538    Left = 0;
1539    Right = 1;
1540}
1541
1542message Diagnostic {
1543    Anchor start = 1;
1544    Anchor end = 2;
1545    optional string source = 3;
1546    Severity severity = 4;
1547    string message = 5;
1548    optional string code = 6;
1549    uint64 group_id = 7;
1550    bool is_primary = 8;
1551
1552    // TODO: remove this field
1553    bool is_valid = 9;
1554
1555    bool is_disk_based = 10;
1556    bool is_unnecessary = 11;
1557
1558    enum Severity {
1559        None = 0;
1560        Error = 1;
1561        Warning = 2;
1562        Information = 3;
1563        Hint = 4;
1564    }
1565}
1566
1567message Operation {
1568    oneof variant {
1569        Edit edit = 1;
1570        Undo undo = 2;
1571        UpdateSelections update_selections = 3;
1572        UpdateDiagnostics update_diagnostics = 4;
1573        UpdateCompletionTriggers update_completion_triggers = 5;
1574    }
1575
1576    message Edit {
1577        uint32 replica_id = 1;
1578        uint32 lamport_timestamp = 2;
1579        repeated VectorClockEntry version = 3;
1580        repeated Range ranges = 4;
1581        repeated string new_text = 5;
1582    }
1583
1584    message Undo {
1585        uint32 replica_id = 1;
1586        uint32 lamport_timestamp = 2;
1587        repeated VectorClockEntry version = 3;
1588        repeated UndoCount counts = 4;
1589    }
1590
1591    message UpdateSelections {
1592        uint32 replica_id = 1;
1593        uint32 lamport_timestamp = 2;
1594        repeated Selection selections = 3;
1595        bool line_mode = 4;
1596        CursorShape cursor_shape = 5;
1597    }
1598
1599    message UpdateCompletionTriggers {
1600        uint32 replica_id = 1;
1601        uint32 lamport_timestamp = 2;
1602        repeated string triggers = 3;
1603    }
1604}
1605
1606message UndoMapEntry {
1607    uint32 replica_id = 1;
1608    uint32 local_timestamp = 2;
1609    repeated UndoCount counts = 3;
1610}
1611
1612message UndoCount {
1613    uint32 replica_id = 1;
1614    uint32 lamport_timestamp = 2;
1615    uint32 count = 3;
1616}
1617
1618message VectorClockEntry {
1619    uint32 replica_id = 1;
1620    uint32 timestamp = 2;
1621}
1622
1623message Timestamp {
1624    uint64 seconds = 1;
1625    uint32 nanos = 2;
1626}
1627
1628message Range {
1629    uint64 start = 1;
1630    uint64 end = 2;
1631}
1632
1633message PointUtf16 {
1634    uint32 row = 1;
1635    uint32 column = 2;
1636}
1637
1638message Nonce {
1639    uint64 upper_half = 1;
1640    uint64 lower_half = 2;
1641}
1642
1643enum ChannelVisibility {
1644    Public = 0;
1645    Members = 1;
1646}
1647
1648message Channel {
1649    uint64 id = 1;
1650    string name = 2;
1651    ChannelVisibility visibility = 3;
1652    repeated uint64 parent_path = 5;
1653}
1654
1655message Contact {
1656    uint64 user_id = 1;
1657    bool online = 2;
1658    bool busy = 3;
1659}
1660
1661message WorktreeMetadata {
1662    uint64 id = 1;
1663    string root_name = 2;
1664    bool visible = 3;
1665    string abs_path = 4;
1666}
1667
1668message UpdateDiffBase {
1669    uint64 project_id = 1;
1670    uint64 buffer_id = 2;
1671    optional string diff_base = 3;
1672}
1673
1674message GetNotifications {
1675    optional uint64 before_id = 1;
1676}
1677
1678message AddNotification {
1679    Notification notification = 1;
1680}
1681
1682message GetNotificationsResponse {
1683    repeated Notification notifications = 1;
1684    bool done = 2;
1685}
1686
1687message DeleteNotification {
1688    uint64 notification_id = 1;
1689}
1690
1691message MarkNotificationRead {
1692    uint64 notification_id = 1;
1693}
1694
1695message Notification {
1696    uint64 id = 1;
1697    uint64 timestamp = 2;
1698    string kind = 3;
1699    optional uint64 entity_id = 4;
1700    string content = 5;
1701    bool is_read = 6;
1702    optional bool response = 7;
1703}
1704
1705message LspExtExpandMacro {
1706    uint64 project_id = 1;
1707    uint64 buffer_id = 2;
1708    Anchor position = 3;
1709}
1710
1711message LspExtExpandMacroResponse {
1712    string name = 1;
1713    string expansion = 2;
1714}
1715
1716message SetRoomParticipantRole {
1717    uint64 room_id = 1;
1718    uint64 user_id = 2;
1719    ChannelRole role = 3;
1720}