Skip to content

snapshotFrom

snapshotFrom(entries, lastTs): ActivitySnapshot | null

Defined in: src/stall.ts:53

Pure: derive a snapshot from already-parsed tool-use entries (oldest→newest) plus the newest record ts.

lastTs tracks the newest record of any kind so a completing long-running tool or a resumed turn clears a stall; pending still keys off the newest tool_use so a genuinely running command keeps its longer hung-command window. A transcript with no tool_use can’t stall → null.

ActivityEntry[]

number

ActivitySnapshot | null