fix: use a more efficient wire format for ExecCommandOutputDeltaEvent.chunk (#3163)

When serializing to JSON, the existing solution created an enormous
array of ints, which is far more bytes on the wire than a base64-encoded
string would be.
This commit is contained in:
Michael Bolin
2025-09-04 08:21:58 -07:00
committed by GitHub
parent bd4fa85507
commit 0a83db5512
4 changed files with 7 additions and 5 deletions

View File

@@ -26,7 +26,6 @@ use crate::protocol::SandboxPolicy;
use crate::seatbelt::spawn_command_under_seatbelt;
use crate::spawn::StdioPolicy;
use crate::spawn::spawn_child_async;
use serde_bytes::ByteBuf;
const DEFAULT_TIMEOUT_MS: u64 = 10_000;
@@ -369,7 +368,7 @@ async fn read_capped<R: AsyncRead + Unpin + Send + 'static>(
} else {
ExecOutputStream::Stdout
},
chunk: ByteBuf::from(chunk),
chunk,
});
let event = Event {
id: stream.sub_id.clone(),