worktree.proto

  1syntax = "proto3";
  2package zed.messages;
  3
  4message Timestamp {
  5    uint64 seconds = 1;
  6    uint32 nanos = 2;
  7}
  8
  9message File {
 10    uint64 worktree_id = 1;
 11    optional uint64 entry_id = 2;
 12    string path = 3;
 13    Timestamp mtime = 4;
 14    bool is_deleted = 5;
 15}
 16
 17message Entry {
 18    uint64 id = 1;
 19    bool is_dir = 2;
 20    string path = 3;
 21    uint64 inode = 4;
 22    Timestamp mtime = 5;
 23    bool is_ignored = 7;
 24    bool is_external = 8;
 25    reserved 6;
 26    reserved 9;
 27    bool is_fifo = 10;
 28    optional uint64 size = 11;
 29    optional string canonical_path = 12;
 30}
 31
 32message AddWorktree {
 33    string path = 1;
 34    uint64 project_id = 2;
 35    bool visible = 3;
 36}
 37
 38message AddWorktreeResponse {
 39    uint64 worktree_id = 1;
 40    string canonicalized_path = 2;
 41}
 42
 43message RemoveWorktree {
 44    uint64 worktree_id = 1;
 45}
 46
 47message GetPathMetadata {
 48    uint64 project_id = 1;
 49    string path = 2;
 50}
 51
 52message GetPathMetadataResponse {
 53    bool exists = 1;
 54    string path = 2;
 55    bool is_dir = 3;
 56}
 57
 58message WorktreeMetadata {
 59    uint64 id = 1;
 60    string root_name = 2;
 61    bool visible = 3;
 62    string abs_path = 4;
 63}
 64
 65message ProjectPath {
 66    uint64 worktree_id = 1;
 67    string path = 2;
 68}
 69
 70message ListRemoteDirectoryConfig {
 71    bool is_dir = 1;
 72}
 73
 74message ListRemoteDirectory {
 75    uint64 dev_server_id = 1;
 76    string path = 2;
 77    ListRemoteDirectoryConfig config = 3;
 78}
 79
 80message EntryInfo {
 81    bool is_dir = 1;
 82}
 83
 84message ListRemoteDirectoryResponse {
 85    repeated string entries = 1;
 86    repeated EntryInfo entry_info = 2;
 87}
 88
 89message CreateProjectEntry {
 90    uint64 project_id = 1;
 91    uint64 worktree_id = 2;
 92    string path = 3;
 93    bool is_directory = 4;
 94    optional bytes content = 5;
 95}
 96
 97message RenameProjectEntry {
 98    uint64 project_id = 1;
 99    uint64 entry_id = 2;
100    string new_path = 3;
101}
102
103message CopyProjectEntry {
104    uint64 project_id = 1;
105    uint64 entry_id = 2;
106    string new_path = 3;
107    optional string relative_worktree_source_path = 4;
108}
109
110message DeleteProjectEntry {
111    uint64 project_id = 1;
112    uint64 entry_id = 2;
113    bool use_trash = 3;
114}
115
116message ExpandProjectEntry {
117    uint64 project_id = 1;
118    uint64 entry_id = 2;
119}
120
121message ExpandProjectEntryResponse {
122    uint64 worktree_scan_id = 1;
123}
124
125message ExpandAllForProjectEntry {
126    uint64 project_id = 1;
127    uint64 entry_id = 2;
128}
129
130message ExpandAllForProjectEntryResponse {
131    uint64 worktree_scan_id = 1;
132}
133
134message ProjectEntryResponse {
135    optional Entry entry = 1;
136    uint64 worktree_scan_id = 2;
137}
138
139message UpdateWorktreeSettings {
140    uint64 project_id = 1;
141    uint64 worktree_id = 2;
142    string path = 3;
143    optional string content = 4;
144    optional LocalSettingsKind kind = 5;
145}
146
147enum LocalSettingsKind {
148    Settings = 0;
149    Tasks = 1;
150    Editorconfig = 2;
151    Debug = 3;
152}
153
154message UpdateUserSettings {
155    uint64 project_id = 1;
156    string contents = 2;
157}