ai 5.0.101 → 5.0.103
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 +13 -0
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +1 -1
- package/dist/internal/index.mjs +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -684,7 +684,7 @@ import {
|
|
|
684
684
|
} from "@ai-sdk/provider-utils";
|
|
685
685
|
|
|
686
686
|
// src/version.ts
|
|
687
|
-
var VERSION = true ? "5.0.
|
|
687
|
+
var VERSION = true ? "5.0.103" : "0.0.0-test";
|
|
688
688
|
|
|
689
689
|
// src/util/download/download.ts
|
|
690
690
|
var download = async ({ url }) => {
|
|
@@ -8095,7 +8095,7 @@ function pruneMessages({
|
|
|
8095
8095
|
const keptToolCallIds = /* @__PURE__ */ new Set();
|
|
8096
8096
|
const keptApprovalIds = /* @__PURE__ */ new Set();
|
|
8097
8097
|
if (keepLastMessagesCount != null) {
|
|
8098
|
-
for (const message of messages.slice(
|
|
8098
|
+
for (const message of messages.slice(-keepLastMessagesCount)) {
|
|
8099
8099
|
if ((message.role === "assistant" || message.role === "tool") && typeof message.content !== "string") {
|
|
8100
8100
|
for (const part of message.content) {
|
|
8101
8101
|
if (part.type === "tool-call" || part.type === "tool-result") {
|