fix inbox lifecycle downstream contracts

This commit is contained in:
_Kerman
2026-07-31 22:00:39 +08:00
parent 8e88b17c9f
commit afedf18ccf
219 changed files with 5660 additions and 4556 deletions
+1 -4
View File
@@ -112,10 +112,7 @@ export class ReactLoopAgent implements Agent {
}
cancel(cause: AgentCancelCause, options: CancelOptions = {}): void {
if (!options.keepInbox) {
this.inbox.splice('next-step', 0, this.inbox.nextStep.length, [])
this.inbox.splice('next-turn', 0, this.inbox.nextTurn.length, [])
}
if (!options.keepInbox) this.inbox.clear()
if (this.phase.kind !== 'idle') this.phase.abort.abort(cause)
}