Fired BEFORE an in-progress agent run is stopped, when the person clicks Stop on the reply
the run is writing. Listeners can cancel (Cancel = true): nothing is written, the control
stays available, and AfterStopClicked does not fire. AgentRunId is null when the run
row has not been seen by the chat yet (the first moment after the reply placeholder appears);
the stop is then resolved by the reply's detail id.
Listeners run synchronously: the message item reads Cancel as soon as emit() returns.
Fired BEFORE an in-progress agent run is stopped, when the person clicks Stop on the reply the run is writing. Listeners can cancel (
Cancel = true): nothing is written, the control stays available, andAfterStopClickeddoes not fire.AgentRunIdis null when the run row has not been seen by the chat yet (the first moment after the reply placeholder appears); the stop is then resolved by the reply's detail id.Listeners run synchronously: the message item reads
Cancelas soon asemit()returns.