1126 lines · 38.0 KB · Rust
RawDownload
#![allow(non_snake_case)] pub mod error;mod macros;mod typed_envelope; pub use error::*;pub use prost::{DecodeError, Message};use std::{    cmp,    fmt::Debug,    iter, mem,    time::{Duration, SystemTime, UNIX_EPOCH},};pub use typed_envelope::*; include!(concat!(env!("OUT_DIR"), "/zed.messages.rs")); pub const REMOTE_SERVER_PEER_ID: PeerId = PeerId { owner_id: 0, id: 0 };pub const REMOTE_SERVER_PROJECT_ID: u64 = 0; messages!(    (Ack, Foreground),    (AckBufferOperation, Background),    (AckChannelMessage, Background),    (ActivateToolchain, Foreground),    (ActiveToolchain, Foreground),    (ActiveToolchainResponse, Foreground),    (ResolveToolchain, Background),    (ResolveToolchainResponse, Background),    (AddNotification, Foreground),    (AddProjectCollaborator, Foreground),    (AddWorktree, Foreground),    (AddWorktreeResponse, Foreground),    (AllocateWorktreeId, Foreground),    (AllocateWorktreeIdResponse, Foreground),    (ApplyCodeAction, Background),    (ApplyCodeActionResponse, Background),    (ApplyCompletionAdditionalEdits, Background),    (ApplyCompletionAdditionalEditsResponse, Background),    (BlameBuffer, Foreground),    (BlameBufferResponse, Foreground),    (BufferReloaded, Foreground),    (BufferSaved, Foreground),    (Call, Foreground),    (CallCanceled, Foreground),    (CancelCall, Foreground),    (CancelLanguageServerWork, Foreground),    (ChannelMessageSent, Foreground),    (ChannelMessageUpdate, Foreground),    (CloseBuffer, Foreground),    (Commit, Background),    (RunGitHook, Background),    (CopyProjectEntry, Foreground),    (CreateBufferForPeer, Foreground),    (CreateImageForPeer, Foreground),    (CreateFileForPeer, Foreground),    (CreateChannel, Foreground),    (CreateChannelResponse, Foreground),    (CreateProjectEntry, Foreground),    (CreateRoom, Foreground),    (CreateRoomResponse, Foreground),    (DeclineCall, Foreground),    (DeleteChannel, Foreground),    (DeleteNotification, Foreground),    (DeleteProjectEntry, Foreground),    (TrashProjectEntry, Foreground),    (TrashProjectEntryResponse, Foreground),    (RestoreProjectEntry, Foreground),    (RestoreProjectEntryResponse, Foreground),    (DownloadFileByPath, Background),    (DownloadFileResponse, Background),    (EndStream, Foreground),    (Error, Foreground),    (ExpandProjectEntry, Foreground),    (ExpandProjectEntryResponse, Foreground),    (FindSearchCandidates, Background),    (FlushBufferedMessages, Foreground),    (ExpandAllForProjectEntry, Foreground),    (ExpandAllForProjectEntryResponse, Foreground),    (Follow, Foreground),    (FollowResponse, Foreground),    (ApplyCodeActionKind, Foreground),    (ApplyCodeActionKindResponse, Foreground),    (FormatBuffers, Foreground),    (FormatBuffersResponse, Foreground),    (FuzzySearchUsers, Foreground),    (GetChannelMembers, Foreground),    (GetChannelMembersResponse, Foreground),    (GetChannelMessages, Background),    (GetChannelMessagesById, Background),    (GetChannelMessagesResponse, Background),    (GetCodeActions, Background),    (GetCodeActionsResponse, Background),    (GetCompletions, Background),    (GetCompletionsResponse, Background),    (GetDeclaration, Background),    (GetDeclarationResponse, Background),    (GetDefinition, Background),    (GetDefinitionResponse, Background),    (GetEditPredictionDefinition, Background),    (GetEditPredictionDefinitionResponse, Background),    (GetEditPredictionTypeDefinition, Background),    (GetEditPredictionTypeDefinitionResponse, Background),    (GetDocumentHighlights, Background),    (GetDocumentHighlightsResponse, Background),    (GetDocumentSymbols, Background),    (GetDocumentSymbolsResponse, Background),    (GetHover, Background),    (GetHoverResponse, Background),    (GetNotifications, Foreground),    (GetNotificationsResponse, Foreground),    (GetCrashFiles, Background),    (GetCrashFilesResponse, Background),    (GetPathMetadata, Background),    (GetPathMetadataResponse, Background),    (GetPermalinkToLine, Foreground),    (GetProcesses, Background),    (GetProcessesResponse, Background),    (GetPermalinkToLineResponse, Foreground),    (GetProjectSymbols, Background),    (GetProjectSymbolsResponse, Background),    (GetReferences, Background),    (GetReferencesResponse, Background),    (GetSignatureHelp, Background),    (GetSignatureHelpResponse, Background),    (GetTypeDefinition, Background),    (GetTypeDefinitionResponse, Background),    (GetImplementation, Background),    (GetImplementationResponse, Background),    (OpenUnstagedDiff, Foreground),    (OpenUnstagedDiffResponse, Foreground),    (OpenUncommittedDiff, Foreground),    (OpenUncommittedDiffResponse, Foreground),    (GetUsers, Foreground),    (GitGetBranches, Background),    (GitBranchesResponse, Background),    (Hello, Foreground),    (HideToast, Background),    (IncomingCall, Foreground),    (InlayHints, Background),    (InlayHintsResponse, Background),    (SemanticTokens, Background),    (SemanticTokensResponse, Background),    (InstallExtension, Background),    (InviteChannelMember, Foreground),    (JoinChannel, Foreground),    (JoinChannelBuffer, Foreground),    (JoinChannelBufferResponse, Foreground),    (JoinChannelChat, Foreground),    (JoinChannelChatResponse, Foreground),    (JoinProject, Foreground),    (JoinProjectResponse, Foreground),    (JoinRoom, Foreground),    (JoinRoomResponse, Foreground),    (LanguageServerLog, Foreground),    (LanguageServerPromptRequest, Foreground),    (LanguageServerPromptResponse, Foreground),    (LeaveChannelBuffer, Background),    (LeaveChannelChat, Foreground),    (LeaveProject, Foreground),    (LeaveRoom, Foreground),    (LinkedEditingRange, Background),    (LinkedEditingRangeResponse, Background),    (ListRemoteDirectory, Background),    (ListRemoteDirectoryResponse, Background),    (ListToolchains, Foreground),    (ListToolchainsResponse, Foreground),    (LoadCommitDiff, Foreground),    (LoadCommitDiffResponse, Foreground),    (LspExtExpandMacro, Background),    (LspExtExpandMacroResponse, Background),    (LspExtOpenDocs, Background),    (LspExtOpenDocsResponse, Background),    (LspExtRunnables, Background),    (LspExtRunnablesResponse, Background),    (LspExtSwitchSourceHeader, Background),    (LspExtSwitchSourceHeaderResponse, Background),    (LspExtGoToParentModule, Background),    (LspExtGoToParentModuleResponse, Background),    (LspExtCancelFlycheck, Background),    (LspExtRunFlycheck, Background),    (LspExtClearFlycheck, Background),    (MarkNotificationRead, Foreground),    (MoveChannel, Foreground),    (ReorderChannel, Foreground),    (LspQuery, Background),    (LspQueryResponse, Background),    (OnTypeFormatting, Background),    (OnTypeFormattingResponse, Background),    (OpenBufferById, Background),    (OpenBufferByPath, Background),    (OpenImageByPath, Background),    (OpenBufferForSymbol, Background),    (OpenBufferForSymbolResponse, Background),    (OpenBufferResponse, Background),    (OpenImageResponse, Background),    (OpenCommitMessageBuffer, Background),    (OpenNewBuffer, Foreground),    (OpenServerSettings, Foreground),    (PerformRename, Background),    (PerformRenameResponse, Background),    (Ping, Foreground),    (PrepareRename, Background),    (PrepareRenameResponse, Background),    (ProjectEntryResponse, Foreground),    (RefreshInlayHints, Background),    (RefreshSemanticTokens, Background),    (RefreshDocumentColors, Background),    (RefreshDocumentLinks, Background),    (RefreshFoldingRanges, Background),    (RefreshDocumentSymbols, Background),    (RegisterBufferWithLanguageServers, Background),    (RejoinChannelBuffers, Foreground),    (RejoinChannelBuffersResponse, Foreground),    (RejoinRemoteProjects, Foreground),    (RejoinRemoteProjectsResponse, Foreground),    (RejoinRoom, Foreground),    (RejoinRoomResponse, Foreground),    (ReloadBuffers, Foreground),    (ReloadBuffersResponse, Foreground),    (RemoveChannelMember, Foreground),    (RemoveChannelMessage, Foreground),    (RemoveContact, Foreground),    (RemoveProjectCollaborator, Foreground),    (RemoveWorktree, Foreground),    (RenameChannel, Foreground),    (RenameChannelResponse, Foreground),    (RenameProjectEntry, Foreground),    (RequestContact, Foreground),    (ResolveCompletionDocumentation, Background),    (ResolveCompletionDocumentationResponse, Background),    (ResolveInlayHint, Background),    (ResolveInlayHintResponse, Background),    (GetDocumentColor, Background),    (GetDocumentColorResponse, Background),    (GetColorPresentation, Background),    (GetColorPresentationResponse, Background),    (GetDocumentLinks, Background),    (GetDocumentLinksResponse, Background),    (ResolveDocumentLink, Background),    (ResolveDocumentLinkResponse, Background),    (GetFoldingRanges, Background),    (GetFoldingRangesResponse, Background),    (RefreshCodeLens, Background),    (GetCodeLens, Background),    (GetCodeLensResponse, Background),    (ResolveCodeAction, Background),    (ResolveCodeActionResponse, Background),    (RespondToChannelInvite, Foreground),    (RespondToContactRequest, Foreground),    (RestartLanguageServers, Foreground),    (StopLanguageServers, Background),    (RoomUpdated, Foreground),    (SaveBuffer, Foreground),    (SendChannelMessage, Background),    (SendChannelMessageResponse, Background),    (SetChannelMemberRole, Foreground),    (SetChannelVisibility, Foreground),    (SetRoomParticipantRole, Foreground),    (ShareProject, Foreground),    (ShareProjectResponse, Foreground),    (ShowContacts, Foreground),    (ShutdownRemoteServer, Foreground),    (Stage, Background),    (StartLanguageServer, Foreground),    (SubscribeToChannels, Foreground),    (SyncExtensions, Background),    (SyncExtensionsResponse, Background),    (BreakpointsForFile, Background),    (ToggleBreakpoint, Foreground),    (SynchronizeBuffers, Foreground),    (SynchronizeBuffersResponse, Foreground),    (TaskContext, Background),    (TaskContextForLocation, Background),    (TelemetryEvent, Background),    (Test, Foreground),    (Toast, Background),    (Unfollow, Foreground),    (UnshareProject, Foreground),    (Unstage, Background),    (Stash, Background),    (StashPop, Background),    (StashApply, Background),    (StashDrop, Background),    (UpdateBuffer, Foreground),    (UpdateBufferFile, Foreground),    (UpdateChannelBuffer, Foreground),    (UpdateChannelBufferCollaborators, Foreground),    (UpdateChannelMessage, Foreground),    (UpdateChannels, Foreground),    (UpdateContacts, Foreground),    (UpdateDiagnosticSummary, Foreground),    (UpdateDiffBases, Foreground),    (UpdateFollowers, Foreground),    (UpdateGitBranch, Background),    (UpdateLanguageServer, Foreground),    (UpdateNotification, Foreground),    (UpdateParticipantLocation, Foreground),    (UpdateProject, Foreground),    (UpdateProjectCollaborator, Foreground),    (UpdateUserChannels, Foreground),    (UpdateWorktree, Foreground),    (UpdateWorktreeSettings, Foreground),    (UpdateUserSettings, Background),    (UpdateRepository, Foreground),    (RemoveRepository, Foreground),    (UsersResponse, Foreground),    (GitReset, Background),    (GitDeleteBranch, Background),    (GitCheckoutFiles, Background),    (GitAddPathToGitignore, Background),    (GitAddPathToGitInfoExclude, Background),    (GitShow, Background),    (GitCommitDetails, Background),    (GitCreateCheckpoint, Background),    (GitCreateCheckpointResponse, Background),    (GitCreateArchiveCheckpoint, Background),    (GitCreateArchiveCheckpointResponse, Background),    (GitRestoreCheckpoint, Background),    (GitRestoreArchiveCheckpoint, Background),    (GitCompareCheckpoints, Background),    (GitCompareCheckpointsResponse, Background),    (GitDiffCheckpoints, Background),    (GitDiffCheckpointsResponse, Background),    (SetIndexText, Background),    (Push, Background),    (Fetch, Background),    (GetRemotes, Background),    (GetRemotesResponse, Background),    (Pull, Background),    (RemoteMessageResponse, Background),    (AskPassRequest, Background),    (AskPassResponse, Background),    (GitCreateRemote, Background),    (GitRemoveRemote, Background),    (GitCreateBranch, Background),    (GitChangeBranch, Background),    (GitRenameBranch, Background),    (TrustWorktrees, Background),    (RestrictWorktrees, Background),    (CheckForPushedCommits, Background),    (CheckForPushedCommitsResponse, Background),    (GitDiff, Background),    (GitDiffResponse, Background),    (GitInit, Background),    (GetDebugAdapterBinary, Background),    (DebugAdapterBinary, Background),    (RunDebugLocators, Background),    (DebugRequest, Background),    (LogToDebugConsole, Background),    (GetDocumentDiagnostics, Background),    (GetDocumentDiagnosticsResponse, Background),    (PullWorkspaceDiagnostics, Background),    (GetDefaultBranch, Background),    (GetDefaultBranchResponse, Background),    (GetTreeDiff, Background),    (GetTreeDiffResponse, Background),    (GetBlobContent, Background),    (GetBlobContentResponse, Background),    (LoadCommitTemplate, Background),    (LoadCommitTemplateResponse, Background),    (GitClone, Background),    (GitCloneResponse, Background),    (ToggleLspLogs, Background),    (GetDirectoryEnvironment, Background),    (DirectoryEnvironment, Background),    (GetAgentServerCommand, Background),    (AgentServerCommand, Background),    (GetContextServerCommand, Background),    (ContextServerCommand, Background),    (ExternalAgentsUpdated, Background),    (ExternalExtensionAgentsUpdated, Background),    (ExternalAgentLoadingStatusUpdated, Background),    (NewExternalAgentVersionAvailable, Background),    (RemoteStarted, Background),    (GitGetWorktrees, Background),    (GitGetHeadSha, Background),    (GitGetHeadShaResponse, Background),    (GitEditRef, Background),    (GitRepairWorktrees, Background),    (GetCommitData, Background),    (GetCommitDataResponse, Background),    (GetInitialGraphData, Background),    (GetInitialGraphDataResponse, Background),    (SearchCommits, Background),    (SearchCommitsResponse, Background),    (GitWorktreesResponse, Background),    (GitCreateWorktree, Background),    (GitRemoveWorktree, Background),    (GitRenameWorktree, Background),    (GitWorktreeCreatedAt, Background),    (GitWorktreeCreatedAtResponse, Background),    (FindSearchCandidatesChunk, Background),    (FindSearchCandidatesCancelled, Background),    (SpawnKernel, Background),    (SpawnKernelResponse, Background),    (KillKernel, Background),    (GetRemoteProfilingData, Background),    (GetRemoteProfilingDataResponse, Background),); request_messages!(    (AllocateWorktreeId, AllocateWorktreeIdResponse),    (ApplyCodeAction, ApplyCodeActionResponse),    (        ApplyCompletionAdditionalEdits,        ApplyCompletionAdditionalEditsResponse    ),    (Call, Ack),    (CancelCall, Ack),    (Commit, Ack),    (RunGitHook, Ack),    (CopyProjectEntry, ProjectEntryResponse),    (CreateChannel, CreateChannelResponse),    (CreateProjectEntry, ProjectEntryResponse),    (CreateRoom, CreateRoomResponse),    (DeclineCall, Ack),    (DeleteChannel, Ack),    (DeleteProjectEntry, ProjectEntryResponse),    (TrashProjectEntry, TrashProjectEntryResponse),    (RestoreProjectEntry, RestoreProjectEntryResponse),    (DownloadFileByPath, DownloadFileResponse),    (ExpandProjectEntry, ExpandProjectEntryResponse),    (ExpandAllForProjectEntry, ExpandAllForProjectEntryResponse),    (Follow, FollowResponse),    (ApplyCodeActionKind, ApplyCodeActionKindResponse),    (FormatBuffers, FormatBuffersResponse),    (FuzzySearchUsers, UsersResponse),    (GetChannelMembers, GetChannelMembersResponse),    (GetChannelMessages, GetChannelMessagesResponse),    (GetChannelMessagesById, GetChannelMessagesResponse),    (GetCodeActions, GetCodeActionsResponse),    (GetCompletions, GetCompletionsResponse),    (GetDefinition, GetDefinitionResponse),    (        GetEditPredictionDefinition,        GetEditPredictionDefinitionResponse    ),    (        GetEditPredictionTypeDefinition,        GetEditPredictionTypeDefinitionResponse    ),    (GetDeclaration, GetDeclarationResponse),    (GetImplementation, GetImplementationResponse),    (GetDocumentHighlights, GetDocumentHighlightsResponse),    (GetDocumentSymbols, GetDocumentSymbolsResponse),    (GetHover, GetHoverResponse),    (GetNotifications, GetNotificationsResponse),    (GetProjectSymbols, GetProjectSymbolsResponse),    (GetReferences, GetReferencesResponse),    (GetSignatureHelp, GetSignatureHelpResponse),    (OpenUnstagedDiff, OpenUnstagedDiffResponse),    (OpenUncommittedDiff, OpenUncommittedDiffResponse),    (GetTypeDefinition, GetTypeDefinitionResponse),    (LinkedEditingRange, LinkedEditingRangeResponse),    (ListRemoteDirectory, ListRemoteDirectoryResponse),    (GetUsers, UsersResponse),    (IncomingCall, Ack),    (InlayHints, InlayHintsResponse),    (SemanticTokens, SemanticTokensResponse),    (GetCodeLens, GetCodeLensResponse),    (InviteChannelMember, Ack),    (JoinChannel, JoinRoomResponse),    (JoinChannelBuffer, JoinChannelBufferResponse),    (JoinChannelChat, JoinChannelChatResponse),    (JoinProject, JoinProjectResponse),    (JoinRoom, JoinRoomResponse),    (LeaveChannelBuffer, Ack),    (LeaveRoom, Ack),    (LoadCommitDiff, LoadCommitDiffResponse),    (MarkNotificationRead, Ack),    (MoveChannel, Ack),    (OnTypeFormatting, OnTypeFormattingResponse),    (OpenBufferById, OpenBufferResponse),    (OpenBufferByPath, OpenBufferResponse),    (OpenImageByPath, OpenImageResponse),    (OpenBufferForSymbol, OpenBufferForSymbolResponse),    (OpenCommitMessageBuffer, OpenBufferResponse),    (OpenNewBuffer, OpenBufferResponse),    (PerformRename, PerformRenameResponse),    (Ping, Ack),    (PrepareRename, PrepareRenameResponse),    (RefreshInlayHints, Ack),    (RefreshSemanticTokens, Ack),    (RefreshCodeLens, Ack),    (RefreshDocumentColors, Ack),    (RefreshDocumentLinks, Ack),    (RefreshFoldingRanges, Ack),    (RefreshDocumentSymbols, Ack),    (RejoinChannelBuffers, RejoinChannelBuffersResponse),    (RejoinRoom, RejoinRoomResponse),    (ReloadBuffers, ReloadBuffersResponse),    (RemoveChannelMember, Ack),    (RemoveChannelMessage, Ack),    (UpdateChannelMessage, Ack),    (RemoveContact, Ack),    (RenameChannel, RenameChannelResponse),    (RenameProjectEntry, ProjectEntryResponse),    (ReorderChannel, Ack),

Lines 1–500 of 1126.