Conversation
44ae3d1 to
3fb63a6
Compare
3fb63a6 to
b4222e5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@cloudflare/ai-chat@0.1.0
Minor Changes
#899
04c6411Thanks @threepointone! - Refactor AIChatAgent: extract ResumableStream class, add WebSocket ChatTransport, simplify SSE parsing.Bug fixes:
setMessagesfunctional updater sending empty array to server_sendPlaintextReplycreating multiple text parts instead of oneCF_AGENT_MESSAGE_UPDATEDnot broadcast for streaming messages_streamCompletionPromisenot resolved on error (tool continuations could hang)bodylost during tool continuations (now preserved alongsideclientTools)clearAll()not clearing in-memory chunk buffer (orphaned chunks could flush after clear)reasoning-deltasilently dropping data whenreasoning-startwas missed (stream resumption)string.lengthinstead of UTF-8 byte count for SQLite limitscompletedguard on abort listener to prevent redundant cancel after stream completionNew features:
maxPersistedMessages— cap SQLite message storage with automatic oldest-message deletionbodyoption onuseAgentChat— send custom data with every request (static or dynamic)onFinishis now optional — framework handles abort controller cleanup and observabilityDocs:
docs/chat-agents.md— comprehensive AIChatAgent and useAgentChat referenceexamples/ai-chat/example with modern patterns and Workers AIDeprecations (with console.warn):
createToolsFromClientSchemas(),extractClientToolSchemas(),detectToolsRequiringConfirmation()tools,toolsRequiringConfirmation,experimental_automaticToolResolutionoptionsaddToolResult()(useaddToolOutput())Patch Changes
994a808Thanks @alexanderjacobsen! - Fix client tool schemas lost after DO restart by re-sending them with CF_AGENT_TOOL_RESULTagents@0.4.2
Patch Changes
#899
04c6411Thanks @threepointone! - Fix React hooks exhaustive-deps warning in useAgent by referencing cacheInvalidatedAt inside useMemo body.#904
d611b94Thanks @ask-bonk! - Fix TypeScript "excessively deep" error with deeply nested state typesAdd a depth counter to
CanSerializeandIsSerializableParamtypes that bails out totrueafter 10 levels of recursion. This prevents the "Type instantiation is excessively deep and possibly infinite" error when using deeply nested types like AI SDKCoreMessage[]as agent state.#898
cd2d34fThanks @jvg123! - Add keepalive ping to POST SSE response streams in WorkerTransportThe GET SSE handler already sends
event: pingevery 30 seconds to keep the connection alive, but the POST SSE handler did not. This caused POST response streams to be silently dropped by proxies and infrastructure during long-running tool calls (e.g., MCP tools/call), resulting in clients never receiving the response.