mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-07 07:59:42 +02:00
perf: fix memory leaks — strip task outputs from SSE broadcasts, use light state everywhere
- TaskTracker.getTaskTreeLight(): strips large `output` strings from tasks in SSE broadcasts (was serializing 5-10MB every 500ms with many subagents) - session:created broadcasts now use toLightDetailedState() (consistent with session:updated which already did) - GET /api/sessions/:id returns light state (no 2-3MB terminal+text buffers) - Ralph wizard polls /terminal?tail=2048 instead of full session endpoint Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+2
-2
@@ -789,9 +789,9 @@ export class Session extends EventEmitter {
|
||||
maxTextOutput: MAX_TEXT_OUTPUT_SIZE,
|
||||
maxMessages: MAX_MESSAGES,
|
||||
},
|
||||
// Background task tracking
|
||||
// Background task tracking (light tree strips large output strings)
|
||||
taskStats: this._taskTracker.getStats(),
|
||||
taskTree: this._taskTracker.getTaskTree(),
|
||||
taskTree: this._taskTracker.getTaskTreeLight(),
|
||||
// Token tracking
|
||||
tokens: {
|
||||
input: this._totalInputTokens,
|
||||
|
||||
Reference in New Issue
Block a user