fix(core): prevent isBinary false-positive on Windows PTY streams (#26565)

This commit is contained in:
Tirth Naik
2026-05-18 16:36:23 -07:00
committed by GitHub
parent 792654c88b
commit f09d45d133
3 changed files with 154 additions and 3 deletions
@@ -1133,7 +1133,7 @@ export class ShellExecutionService {
const sniffBuffer = Buffer.concat(sniffChunks);
sniffedBytes = sniffBuffer.length;
if (isBinary(sniffBuffer)) {
if (isBinary(sniffBuffer, 512, true)) {
isStreamingRawContent = false;
binaryBytesReceived = sniffBuffer.length;
const event: ShellOutputEvent = { type: 'binary_detected' };