image.proto

 1syntax = "proto3";
 2package zed.messages;
 3
 4import "core.proto";
 5import "worktree.proto";
 6
 7message OpenImageByPath {
 8  uint64 project_id = 1;
 9  uint64 worktree_id = 2;
10  string path = 3;
11}
12
13message OpenImageResponse {
14  uint64 image_id = 1;
15}
16
17message CreateImageForPeer {
18  uint64 project_id = 1;
19  PeerId peer_id = 2;
20  oneof variant {
21    ImageState state = 3;
22    ImageChunk chunk = 4;
23  }
24}
25
26message ImageState {
27  uint64 id = 1;
28  optional File file = 2;
29  uint64 content_size = 3;
30  string format = 4; // e.g., "png", "jpeg", "webp", etc.
31}
32
33message ImageChunk {
34  uint64 image_id = 1;
35  bytes data = 2;
36}