ai 7.0.6 → 7.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/dist/internal/index.js +1 -1
- package/docs/03-ai-sdk-core/40-middleware.mdx +15 -7
- package/docs/04-ai-sdk-ui/03-chatbot-message-persistence.mdx +11 -2
- package/docs/07-reference/01-ai-sdk-core/65-language-model-v2-middleware.mdx +2 -2
- package/package.json +3 -3
- package/src/ui/convert-to-model-messages.ts +6 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# ai
|
|
2
2
|
|
|
3
|
+
## 7.0.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- d598481: Fix: `convertToModelMessages` no longer emits an empty assistant message when a block contains only unknown data parts (e.g. a data part before `step-start` with no `convertDataPart` provided)
|
|
8
|
+
|
|
3
9
|
## 7.0.6
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -1089,7 +1089,7 @@ import {
|
|
|
1089
1089
|
} from "@ai-sdk/provider-utils";
|
|
1090
1090
|
|
|
1091
1091
|
// src/version.ts
|
|
1092
|
-
var VERSION = true ? "7.0.
|
|
1092
|
+
var VERSION = true ? "7.0.7" : "0.0.0-test";
|
|
1093
1093
|
|
|
1094
1094
|
// src/util/download/download.ts
|
|
1095
1095
|
var download = async ({
|
|
@@ -10458,10 +10458,12 @@ async function convertToModelMessages(messages, options) {
|
|
|
10458
10458
|
throw new Error(`Unsupported part: ${_exhaustiveCheck}`);
|
|
10459
10459
|
}
|
|
10460
10460
|
}
|
|
10461
|
-
|
|
10462
|
-
|
|
10463
|
-
|
|
10464
|
-
|
|
10461
|
+
if (content.length > 0) {
|
|
10462
|
+
modelMessages.push({
|
|
10463
|
+
role: "assistant",
|
|
10464
|
+
content
|
|
10465
|
+
});
|
|
10466
|
+
}
|
|
10465
10467
|
const toolParts = block.filter(
|
|
10466
10468
|
(part) => {
|
|
10467
10469
|
var _a23;
|