Limit auto-mode classifier transcript growth (#277)

* Limit auto-mode classifier transcript growth

* Release persisted tool results from transcript state

---------

Co-authored-by: pr0ln <pr0ln@pr0lnui-Macmini.local>
This commit is contained in:
pr0ln
2026-04-04 10:24:14 +09:00
committed by GitHub
parent e5c9a6f629
commit fb221baa21
5 changed files with 332 additions and 89 deletions

View File

@@ -726,6 +726,11 @@ function replaceToolResultContents(
: { ...block, content: replacement }
}),
},
// Drop the original tool payload once the model-facing content has been
// replaced with a persisted preview. Keeping both defeats the memory
// savings for long sessions because the live transcript still retains
// the oversized structured result.
toolUseResult: undefined,
}
})
return changed ? nextMessages : messages