AutoCompactorHooks class abstract

Hooks for a host UI to observe progress. Implementations should not throw — the compactor swallows and logs around them.

Constructors

AutoCompactorHooks()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onAttemptStart(String label, int attempt, Duration budget) → void
Called when a summarization attempt starts, with the summarizer label (smol=provider/model / main=provider/model), the 1-based attempt number and the per-attempt budget. Hosts surface this in the busy row so a slow/dead summarizer endpoint reads as a bounded wait ("attempt 1, 300 s cap") instead of a silent hang. Default no-op.
onBothRolesFailed(Object lastError) → void
Called when both smol and main failed in the same pass. The CLI prints a "switch models" hint here; the Flutter sheet shows a snackbar.
onDelta(String delta) → void
Streaming deltas (text + thinking) of the active summarization pass, so a host UI can show the summary being written instead of a silent spinner. Default no-op; high-frequency — hosts should throttle.
onDone(int passes, int tokens) → void
Called once after the loop terminates, on success or exhaustion.
onPass(AutoCompactorPass pass) → void
Called once per pass with its outcome. Used by the CLI TUI to print "auto-compacted N tokens summarized" and by the Flutter chat sheet to update the chat list.
onRetry(int attempt, int maxAttempts, Duration backoff, Object error) → void
Called when a pass retries on a transient error.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited