Repository navigation
@tanstack/ai-client@0.39.0
Minor Changes
-
#1658
f687c54- Breaking:chat({ stream: false })andstreamToText()now return aChatResultwithtextandchunks, not a string. The chunks keep the tool calls and interrupt outcomes that the string lost. To migrate, changeconst text = await chat({ stream: false })toconst { text } = await chat({ stream: false }).Add a JSON transport for hosts that cannot stream a response. On the server,
toJsonResponse()sends a run as one JSON body, andresumeJsonResponse()sends the rest of a durable run. On the client, thefetchJson()connection adapter reads that body and asks again until the run is done. Each framework package re-exportsfetchJson.
Patch Changes
-
#1650
2fc2315- Skip the devtools bridge in production builds.createChatDevtoolsBridge,createGenerationDevtoolsBridgeandcreateVideoDevtoolsBridgenow return the no-op bridge whenNODE_ENVisproduction. Before, every framework hook deep-copied the whole conversation on each streamed chunk for a devtools snapshot, even with no devtools panel open. -
Updated dependencies [
f687c54,fb55bcb,630ec86]:- @tanstack/ai@0.66.0