mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-12 09:41:11 +00:00
refactor: simplify exec stream chunks
This commit is contained in:
@@ -629,7 +629,7 @@ export async function runExecProcess(opts: {
|
||||
};
|
||||
|
||||
const handleStdout = (data: string) => {
|
||||
const raw = data.toString();
|
||||
const raw = data;
|
||||
// Detect smkx/rmkx BEFORE sanitizeBinaryOutput strips ESC sequences.
|
||||
// Note: PTY chunking is arbitrary, but smkx/rmkx sequences are typically short (4-5 bytes)
|
||||
// and sent atomically by terminals. Split across chunks is rare in practice.
|
||||
@@ -645,7 +645,7 @@ export async function runExecProcess(opts: {
|
||||
};
|
||||
|
||||
const handleStderr = (data: string) => {
|
||||
const str = sanitizeBinaryOutput(data.toString());
|
||||
const str = sanitizeBinaryOutput(data);
|
||||
for (const chunk of chunkString(str)) {
|
||||
appendOutput(session, "stderr", chunk);
|
||||
emitUpdate();
|
||||
|
||||
Reference in New Issue
Block a user