Files
oak-gpui/crates/proto/proto/image.proto
T
Cave Bats Of WareandJulia Ryan a112153a2e Enable image support in remote projects (#39158)
Adds support for opening and displaying images in remote projects. The
server streams image data to the client in chunks, where the client then
reconstructs the image and displays it. This change includes:

- Adding `image` crate as a dependency for remote_server
- Implementing `ImageStore` for remote access
- Creating proto definitions for image-related messages
- Adding handlers for creating images for peers
- Computing image metadata from bytes instead of reading from disk for
remote images

Closes #20430
Closes #39104
Closes #40445

Release Notes:

- Added support for image preview in remote sessions.
- Fixed #39104

<img width="982" height="551" alt="image"
src="https://github.com/user-attachments/assets/575428a3-9144-4c1f-b76f-952019ea14cc"
/>
<img width="978" height="547" alt="image"
src="https://github.com/user-attachments/assets/fb58243a-4856-4e73-bb30-8d5e188b3ac9"
/>

---------

Co-authored-by: Julia Ryan <juliaryan3.14@gmail.com>
2025-11-06 11:31:32 -08:00

37 lines
647 B
Protocol Buffer

syntax = "proto3";
package zed.messages;
import "core.proto";
import "worktree.proto";
message OpenImageByPath {
uint64 project_id = 1;
uint64 worktree_id = 2;
string path = 3;
}
message OpenImageResponse {
uint64 image_id = 1;
}
message CreateImageForPeer {
uint64 project_id = 1;
PeerId peer_id = 2;
oneof variant {
ImageState state = 3;
ImageChunk chunk = 4;
}
}
message ImageState {
uint64 id = 1;
optional File file = 2;
uint64 content_size = 3;
string format = 4; // e.g., "png", "jpeg", "webp", etc.
}
message ImageChunk {
uint64 image_id = 1;
bytes data = 2;
}