Tags: hit9/minacode
Tags
fix: count request tokens in UTF-8 bytes, with a 99% usage guard - Estimate requests by UTF-8 bytes/4 so CJK-heavy sessions are no longer undercounted ~3x while the status bar already showed 100%; ASCII payloads estimate exactly as before, and the tool-output trimmer keeps its chars/4 measure. - Force compaction when the previous request filled >=99% of its budget even if the estimate still fits, as a last line of defense when the estimate is off. - Clear the recorded last-* usage on compaction so the compaction request's own fill is never mistaken for a full ordinary context and double-compacts the just-shrunk history; the status bar falls back to the local estimate.
PreviousNext