Smith::Events::HistoryCompacted
Inherits Smith::Events::Event < Reference < Object
Emitted when the transcript was shrunk to stay inside the context window, so a user never silently wonders where their context went.
Carries raw numbers only; the renderers do the arithmetic and the wording. Which stages ran is reported here rather than as new Strategy members, so persisted sessions and anything reading the strategy string are unaffected.
Constructors
new(before_tokens : Int32, after_tokens : Int32, strategy : String, target_tokens : Int32 = 0, budget_tokens : Int32 = 0, stages : Array(String) = [] of String)
SourceInstance methods
after_tokens
Sourcebefore_tokens
Sourcebudget_tokens
Sourcereached_target?
Sourcereclaimed_percent
How much of the window came back. The number that says at a glance whether a compaction did useful work — two bare token counts do not.
stages
Sourcestrategy
Sourcetarget_tokens
Source