Skip to main content

transcript_is_settled

Function transcript_is_settled 

Source
pub fn transcript_is_settled(text: &str, now: i64) -> Result<(), String>
Expand description

Is this transcript quiet enough to interrupt?

Two refusals: an unanswered tool_use as the very last record (a tool call is still in flight), and any activity in the last 45 seconds. The second is insurance for the first, because the screen reading is the most fragile thing in this tool and a recently-touched transcript is worth leaving alone whatever the screen said.

The tool_use test is a text match on the final line rather than a parse of .message.content[], which is the one approximation: an assistant turn whose own prose quotes that key reads as busy. It fails toward “leave it alone”, and the recency guard covers the same ground, so the cost is a pane skipped rather than a turn lost.