ai 5.0.0-beta.8 → 5.0.0-beta.9
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.d.mts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -5658,6 +5658,14 @@ function updateToolOutput({
|
|
5658
5658
|
// src/ui/convert-to-model-messages.ts
|
5659
5659
|
function convertToModelMessages(messages, options) {
|
5660
5660
|
const modelMessages = [];
|
5661
|
+
if (options == null ? void 0 : options.ignoreIncompleteToolCalls) {
|
5662
|
+
messages = messages.map((message) => ({
|
5663
|
+
...message,
|
5664
|
+
parts: message.parts.filter(
|
5665
|
+
(part) => !isToolUIPart(part) || part.state !== "input-streaming" && part.state !== "input-available"
|
5666
|
+
)
|
5667
|
+
}));
|
5668
|
+
}
|
5661
5669
|
for (const message of messages) {
|
5662
5670
|
switch (message.role) {
|
5663
5671
|
case "system": {
|