mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-24 20:14:44 -07:00
fix(core): remove buffer slice to prevent OOM on large output streams (#25094)
This commit is contained in:
@@ -630,7 +630,7 @@ export class ShellExecutionService {
|
||||
}
|
||||
|
||||
if (isStreamingRawContent && sniffedBytes < MAX_SNIFF_SIZE) {
|
||||
const sniffBuffer = Buffer.concat(state.sniffChunks.slice(0, 20));
|
||||
const sniffBuffer = Buffer.concat(state.sniffChunks);
|
||||
sniffedBytes = sniffBuffer.length;
|
||||
|
||||
if (isBinary(sniffBuffer)) {
|
||||
@@ -1094,7 +1094,7 @@ export class ShellExecutionService {
|
||||
}
|
||||
|
||||
if (isStreamingRawContent && sniffedBytes < MAX_SNIFF_SIZE) {
|
||||
const sniffBuffer = Buffer.concat(sniffChunks.slice(0, 20));
|
||||
const sniffBuffer = Buffer.concat(sniffChunks);
|
||||
sniffedBytes = sniffBuffer.length;
|
||||
|
||||
if (isBinary(sniffBuffer)) {
|
||||
|
||||
Reference in New Issue
Block a user