github cloudflare/agents @cloudflare/ai-chat@0.4.1

one day ago

Patch Changes

  • #1277 0cd0487 Thanks @zebp! - Fix race condition in messageConcurrency where rapid overlapping submits could bypass the latest/merge/debounce strategy. The concurrency decision checked queuedCount() before the turn was enqueued, but an intervening await persistMessages() allowed a second message handler to see a stale count of zero and skip supersede checks. A pending-enqueue counter now bridges this gap so overlapping submits are always detected.

  • #1272 22da9b1 Thanks @threepointone! - Widen useAgentChat agent prop type to accept both typed and untyped useAgent connections. Previously, useAgent<MyAgent>() results could not be passed to useAgentChat due to incompatible call types. The agent prop now uses a structural type matching only the fields useAgentChat actually uses.

Don't miss a new agents release

NewReleases is sending notifications on new releases.