This release fixes chat races across tabs and during recovery, so stop, clear, regenerate and resume do what the user asked even while another tab or a recovery is streaming. A chat request cancelled while it waits in the queue no longer runs, and when onError returns instead of throwing, AIChatAgent passes the original error on. No changes are needed to upgrade.
Patch Changes
-
#2832
c31b57eThanks @ben-reitz! - WhenonErrorreturns instead of throwing,AgentandAIChatAgentnow pass the original error on, instead ofundefined(or an unawaited promise whenonErroris async). -
#2818
a2f1216Thanks @ben-reitz! - Cancelling a chat request while it waits in the queue now stops it from running, instead of the cancel being dropped. See #2701. -
#2861
f0f4ed9Thanks @mattzcarey! - Fix chat recovery and resume races: stop now ends a running recovery, recovery yields to a newer question, and a stale resume ACK keeps the tab waiting for the active stream's replay. -
#2860
7e2e11eThanks @mattzcarey! - Fix chat turn races across tabs: clear stops pending replies, regenerate replaces a reply still streaming, a throwingonChatMessagesends an error frame, and repeated tool results no longer re-run the model.