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    uint64 new_worktree_id = 4;
102}
103
104message CopyProjectEntry {
105    uint64 project_id = 1;
106    uint64 entry_id = 2;
107    string new_path = 3;
108    uint64 new_worktree_id = 5;
109    reserved 4;
110}
111
112message DeleteProjectEntry {
113    uint64 project_id = 1;
114    uint64 entry_id = 2;
115    bool use_trash = 3;
116}
117
118message ExpandProjectEntry {
119    uint64 project_id = 1;
120    uint64 entry_id = 2;
121}
122
123message ExpandProjectEntryResponse {
124    uint64 worktree_scan_id = 1;
125}
126
127message ExpandAllForProjectEntry {
128    uint64 project_id = 1;
129    uint64 entry_id = 2;
130}
131
132message ExpandAllForProjectEntryResponse {
133    uint64 worktree_scan_id = 1;
134}
135
136message ProjectEntryResponse {
137    optional Entry entry = 1;
138    uint64 worktree_scan_id = 2;
139}
140
141message UpdateWorktreeSettings {
142    uint64 project_id = 1;
143    uint64 worktree_id = 2;
144    string path = 3;
145    optional string content = 4;
146    optional LocalSettingsKind kind = 5;
147}
148
149enum LocalSettingsKind {
150    Settings = 0;
151    Tasks = 1;
152    Editorconfig = 2;
153    Debug = 3;
154}
155
156message UpdateUserSettings {
157    uint64 project_id = 1;
158    string contents = 2;
159}