ai 7.0.0-beta.82 → 7.0.0-beta.84

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,21 @@
1
1
  # ai
2
2
 
3
+ ## 7.0.0-beta.84
4
+
5
+ ### Patch Changes
6
+
7
+ - 90e2d8a: chore: fix unused vars not being flagged by our lint tooling
8
+ - Updated dependencies [90e2d8a]
9
+ - @ai-sdk/provider-utils@5.0.0-beta.18
10
+ - @ai-sdk/gateway@4.0.0-beta.47
11
+
12
+ ## 7.0.0-beta.83
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies [6b0a40d]
17
+ - @ai-sdk/gateway@4.0.0-beta.46
18
+
3
19
  ## 7.0.0-beta.82
4
20
 
5
21
  ### Patch Changes
package/dist/index.js CHANGED
@@ -1401,7 +1401,7 @@ var import_provider_utils3 = require("@ai-sdk/provider-utils");
1401
1401
  var import_provider_utils4 = require("@ai-sdk/provider-utils");
1402
1402
 
1403
1403
  // src/version.ts
1404
- var VERSION = true ? "7.0.0-beta.82" : "0.0.0-test";
1404
+ var VERSION = true ? "7.0.0-beta.84" : "0.0.0-test";
1405
1405
 
1406
1406
  // src/util/download/download.ts
1407
1407
  var download = async ({
@@ -1468,7 +1468,7 @@ function splitDataUrl(dataUrl) {
1468
1468
  mediaType: header.split(";")[0].split(":")[1],
1469
1469
  base64Content
1470
1470
  };
1471
- } catch (error) {
1471
+ } catch (e) {
1472
1472
  return {
1473
1473
  mediaType: void 0,
1474
1474
  base64Content: void 0
@@ -1500,7 +1500,7 @@ function convertToLanguageModelV4DataContent(content) {
1500
1500
  if (typeof content === "string") {
1501
1501
  try {
1502
1502
  content = new URL(content);
1503
- } catch (error) {
1503
+ } catch (e) {
1504
1504
  }
1505
1505
  }
1506
1506
  if (content instanceof URL && content.protocol === "data:") {
@@ -1840,7 +1840,7 @@ async function downloadAssets(messages, download2, supportedUrls) {
1840
1840
  if (typeof data === "string") {
1841
1841
  try {
1842
1842
  data = new URL(data);
1843
- } catch (ignored) {
1843
+ } catch (e) {
1844
1844
  }
1845
1845
  }
1846
1846
  return { mediaType, data };
@@ -2739,7 +2739,7 @@ async function notify(options) {
2739
2739
  continue;
2740
2740
  try {
2741
2741
  await callback(options.event);
2742
- } catch (_ignored) {
2742
+ } catch (e) {
2743
2743
  }
2744
2744
  }
2745
2745
  }
@@ -3576,7 +3576,7 @@ var array = ({
3576
3576
  name: "array",
3577
3577
  // JSON schema that describes an array of elements:
3578
3578
  responseFormat: (0, import_provider_utils13.resolve)(elementSchema.jsonSchema).then((jsonSchema2) => {
3579
- const { $schema, ...itemSchema } = jsonSchema2;
3579
+ const { $schema: _$schema, ...itemSchema } = jsonSchema2;
3580
3580
  return {
3581
3581
  type: "json",
3582
3582
  schema: {
@@ -8369,7 +8369,7 @@ function createUIMessageStream({
8369
8369
  function safeEnqueue(data) {
8370
8370
  try {
8371
8371
  controller.enqueue(data);
8372
- } catch (error) {
8372
+ } catch (e) {
8373
8373
  }
8374
8374
  }
8375
8375
  try {
@@ -8424,7 +8424,7 @@ function createUIMessageStream({
8424
8424
  waitForStreams.finally(() => {
8425
8425
  try {
8426
8426
  controller.close();
8427
- } catch (error) {
8427
+ } catch (e) {
8428
8428
  }
8429
8429
  });
8430
8430
  return handleUIMessageStreamFinish({
@@ -9917,7 +9917,7 @@ var arrayOutputStrategy = (schema) => {
9917
9917
  // be able to generate an array directly:
9918
9918
  // possible future optimization: use arrays directly when model supports grammar-guided generation
9919
9919
  jsonSchema: async () => {
9920
- const { $schema, ...itemSchema } = await schema.jsonSchema;
9920
+ const { $schema: _$schema, ...itemSchema } = await schema.jsonSchema;
9921
9921
  return {
9922
9922
  $schema: "http://json-schema.org/draft-07/schema#",
9923
9923
  type: "object",
@@ -10587,7 +10587,7 @@ function getTextFromDataUrl(dataUrl) {
10587
10587
  }
10588
10588
  try {
10589
10589
  return window.atob(base64Content);
10590
- } catch (error) {
10590
+ } catch (e) {
10591
10591
  throw new Error(`Error decoding data URL`);
10592
10592
  }
10593
10593
  }