@ai-sdk/ui-utils
Advanced tools
Comparing version 1.0.1 to 1.0.2
# @ai-sdk/ui-utils | ||
## 1.0.2 | ||
### Patch Changes | ||
- 88b364b: fix (ui-utils): deep clone messages | ||
- Updated dependencies [b446ae5] | ||
- @ai-sdk/provider@1.0.1 | ||
- @ai-sdk/provider-utils@2.0.2 | ||
## 1.0.1 | ||
@@ -4,0 +13,0 @@ |
@@ -851,3 +851,10 @@ "use strict"; | ||
const copiedMessage = { | ||
...currentMessage, | ||
// deep copy the message to ensure that deep changes (msg attachments) are updated | ||
// with SolidJS. SolidJS uses referential integration of sub-objects to detect changes. | ||
...JSON.parse(JSON.stringify(currentMessage)), | ||
// add a revision id to ensure that the message is updated with SWR. SWR uses a | ||
// hashing approach by default to detect changes, but it only works for shallow | ||
// changes. This is why we need to add a revision id to ensure that the message | ||
// is updated with SWR (without it, the changes get stuck in SWR and are not | ||
// forwarded to rendering): | ||
revisionId: generateId2() | ||
@@ -854,0 +861,0 @@ }; |
{ | ||
"name": "@ai-sdk/ui-utils", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"license": "Apache-2.0", | ||
@@ -29,4 +29,4 @@ "sideEffects": false, | ||
"dependencies": { | ||
"@ai-sdk/provider": "1.0.0", | ||
"@ai-sdk/provider-utils": "2.0.1", | ||
"@ai-sdk/provider": "1.0.1", | ||
"@ai-sdk/provider-utils": "2.0.2", | ||
"zod-to-json-schema": "^3.23.5" | ||
@@ -33,0 +33,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
325214
3589
+ Added@ai-sdk/provider@1.0.1(transitive)
+ Added@ai-sdk/provider-utils@2.0.2(transitive)
- Removed@ai-sdk/provider@1.0.0(transitive)
- Removed@ai-sdk/provider-utils@2.0.1(transitive)
Updated@ai-sdk/provider@1.0.1
Updated@ai-sdk/provider-utils@2.0.2