Skip to content

Commit 2202392

Browse files
committed
refactor: simplify exec stream chunks
1 parent 0f9de01 commit 2202392

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/agents/bash-tools.exec-runtime.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ export async function runExecProcess(opts: {
629629
};
630630

631631
const handleStdout = (data: string) => {
632-
const raw = data.toString();
632+
const raw = data;
633633
// Detect smkx/rmkx BEFORE sanitizeBinaryOutput strips ESC sequences.
634634
// Note: PTY chunking is arbitrary, but smkx/rmkx sequences are typically short (4-5 bytes)
635635
// and sent atomically by terminals. Split across chunks is rare in practice.
@@ -645,7 +645,7 @@ export async function runExecProcess(opts: {
645645
};
646646

647647
const handleStderr = (data: string) => {
648-
const str = sanitizeBinaryOutput(data.toString());
648+
const str = sanitizeBinaryOutput(data);
649649
for (const chunk of chunkString(str)) {
650650
appendOutput(session, "stderr", chunk);
651651
emitUpdate();

0 commit comments

Comments
 (0)