fix: prevent TUI freeze on massive bash output and fix spinner rendering (#500)
- Sync OutputSink.push(): eliminate promise chain per chunk, buffer management and onChunk run inline, file writes deferred via queue - 64KB native read buffer (was 4KB): reduces chunk count ~16x - chunkThrottleMs in OutputSink: gate onChunk to every 50ms - BashExecutionComponent streaming throttle: gate + 100-line cap - Remove requestRender from chunk callbacks: spinner drives renders - Remove double sanitization in appendOutput (already done by OutputSink) - Inline SEGMENT_RESET in TUI doRender buffer writes: eliminates O(N) string allocations per frame from #applyLineResets - Cache header Text in BashExecutionComponent (created once, reused) - Gate sixel mask computation behind protocol + passthrough check - Fix spinner: #spinnerFrame made optional, interval calls #updateDisplay - Remove pendingChunks promise chains from bash-executor and bash-interactive
This commit is contained in:
@@ -289,8 +289,8 @@ export class PythonTool implements AgentTool<typeof pythonSchema> {
|
||||
const executorOptions: PythonExecutorOptions = {
|
||||
...baseExecutorOptions,
|
||||
reset: isFirstCell ? reset : false,
|
||||
onChunk: async chunk => {
|
||||
await outputSink!.push(chunk);
|
||||
onChunk: chunk => {
|
||||
outputSink!.push(chunk);
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user