mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-20 01:00:24 +00:00
reduce child process stdout and stderr buffer limits in tui renderer
This commit is contained in:
parent
f9fd620b8b
commit
69ff9c364c
1 changed files with 6 additions and 6 deletions
|
|
@ -1895,9 +1895,9 @@ export class TuiRenderer {
|
||||||
if (child.stdout) {
|
if (child.stdout) {
|
||||||
child.stdout.on("data", (data: Buffer) => {
|
child.stdout.on("data", (data: Buffer) => {
|
||||||
stdout += data.toString();
|
stdout += data.toString();
|
||||||
// Limit buffer size to 10MB
|
// Limit buffer size to 2MB
|
||||||
if (stdout.length > 10 * 1024 * 1024) {
|
if (stdout.length > 2 * 1024 * 1024) {
|
||||||
stdout = stdout.slice(0, 10 * 1024 * 1024);
|
stdout = stdout.slice(0, 2 * 1024 * 1024);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -1905,9 +1905,9 @@ export class TuiRenderer {
|
||||||
if (child.stderr) {
|
if (child.stderr) {
|
||||||
child.stderr.on("data", (data: Buffer) => {
|
child.stderr.on("data", (data: Buffer) => {
|
||||||
stderr += data.toString();
|
stderr += data.toString();
|
||||||
// Limit buffer size to 10MB
|
// Limit buffer size to 1MB
|
||||||
if (stderr.length > 10 * 1024 * 1024) {
|
if (stderr.length > 1 * 1024 * 1024) {
|
||||||
stderr = stderr.slice(0, 10 * 1024 * 1024);
|
stderr = stderr.slice(0, 1 * 1024 * 1024);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue