ai 6.0.157 → 6.0.158

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # ai
2
2
 
3
+ ## 6.0.158
4
+
5
+ ### Patch Changes
6
+
7
+ - 295beba: fix(ai): fix `lastAssistantMessageIsCompleteWithApprovalResponses` to no longer ignore `providerExecuted` tool approvals
8
+
3
9
  ## 6.0.157
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -1252,7 +1252,7 @@ var import_provider_utils3 = require("@ai-sdk/provider-utils");
1252
1252
  var import_provider_utils4 = require("@ai-sdk/provider-utils");
1253
1253
 
1254
1254
  // src/version.ts
1255
- var VERSION = true ? "6.0.157" : "0.0.0-test";
1255
+ var VERSION = true ? "6.0.158" : "0.0.0-test";
1256
1256
 
1257
1257
  // src/util/download/download.ts
1258
1258
  var download = async ({
@@ -13356,7 +13356,7 @@ function lastAssistantMessageIsCompleteWithApprovalResponses({
13356
13356
  const lastStepStartIndex = message.parts.reduce((lastIndex, part, index) => {
13357
13357
  return part.type === "step-start" ? index : lastIndex;
13358
13358
  }, -1);
13359
- const lastStepToolInvocations = message.parts.slice(lastStepStartIndex + 1).filter(isToolUIPart).filter((part) => !part.providerExecuted);
13359
+ const lastStepToolInvocations = message.parts.slice(lastStepStartIndex + 1).filter(isToolUIPart);
13360
13360
  return (
13361
13361
  // has at least one tool approval response
13362
13362
  lastStepToolInvocations.filter((part) => part.state === "approval-responded").length > 0 && // all tool approvals must have a response