ai 6.0.0-beta.64 → 6.0.0-beta.65

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/dist/index.mjs CHANGED
@@ -775,7 +775,7 @@ import {
775
775
  } from "@ai-sdk/provider-utils";
776
776
 
777
777
  // src/version.ts
778
- var VERSION = true ? "6.0.0-beta.64" : "0.0.0-test";
778
+ var VERSION = true ? "6.0.0-beta.65" : "0.0.0-test";
779
779
 
780
780
  // src/util/download/download.ts
781
781
  var download = async ({ url }) => {
@@ -6267,10 +6267,11 @@ var ToolLoopAgent = class {
6267
6267
  * Generates an output from the agent (non-streaming).
6268
6268
  */
6269
6269
  async generate(options) {
6270
- var _a17;
6270
+ const { instructions, stopWhen, ...settings } = this.settings;
6271
6271
  return generateText({
6272
- ...this.settings,
6273
- stopWhen: (_a17 = this.settings.stopWhen) != null ? _a17 : stepCountIs(20),
6272
+ ...settings,
6273
+ system: instructions,
6274
+ stopWhen: stopWhen != null ? stopWhen : stepCountIs(20),
6274
6275
  ...options
6275
6276
  });
6276
6277
  }
@@ -6278,10 +6279,11 @@ var ToolLoopAgent = class {
6278
6279
  * Streams an output from the agent (streaming).
6279
6280
  */
6280
6281
  stream(options) {
6281
- var _a17;
6282
+ const { instructions, stopWhen, ...settings } = this.settings;
6282
6283
  return streamText({
6283
- ...this.settings,
6284
- stopWhen: (_a17 = this.settings.stopWhen) != null ? _a17 : stepCountIs(20),
6284
+ ...settings,
6285
+ system: instructions,
6286
+ stopWhen: stopWhen != null ? stopWhen : stepCountIs(20),
6285
6287
  ...options
6286
6288
  });
6287
6289
  }