ai 5.0.231 → 5.0.232
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 +9 -0
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -3
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +1 -1
- package/dist/internal/index.mjs +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -727,7 +727,7 @@ import {
|
|
|
727
727
|
} from "@ai-sdk/provider-utils";
|
|
728
728
|
|
|
729
729
|
// src/version.ts
|
|
730
|
-
var VERSION = true ? "5.0.
|
|
730
|
+
var VERSION = true ? "5.0.232" : "0.0.0-test";
|
|
731
731
|
|
|
732
732
|
// src/util/download/download.ts
|
|
733
733
|
var download = async ({
|
|
@@ -1631,7 +1631,8 @@ function recordSpan({
|
|
|
1631
1631
|
tracer,
|
|
1632
1632
|
attributes,
|
|
1633
1633
|
fn,
|
|
1634
|
-
endWhenDone = true
|
|
1634
|
+
endWhenDone = true,
|
|
1635
|
+
endOnError = endWhenDone
|
|
1635
1636
|
}) {
|
|
1636
1637
|
return tracer.startActiveSpan(name16, { attributes }, async (span) => {
|
|
1637
1638
|
try {
|
|
@@ -1644,7 +1645,9 @@ function recordSpan({
|
|
|
1644
1645
|
try {
|
|
1645
1646
|
recordErrorOnSpan(span, error);
|
|
1646
1647
|
} finally {
|
|
1647
|
-
|
|
1648
|
+
if (endOnError) {
|
|
1649
|
+
span.end();
|
|
1650
|
+
}
|
|
1648
1651
|
}
|
|
1649
1652
|
throw error;
|
|
1650
1653
|
}
|
|
@@ -5199,6 +5202,7 @@ var DefaultStreamTextResult = class {
|
|
|
5199
5202
|
}),
|
|
5200
5203
|
tracer,
|
|
5201
5204
|
endWhenDone: false,
|
|
5205
|
+
endOnError: true,
|
|
5202
5206
|
fn: async (doStreamSpan2) => {
|
|
5203
5207
|
return {
|
|
5204
5208
|
startTimestampMs: now2(),
|
|
@@ -7714,6 +7718,7 @@ var DefaultStreamObjectResult = class {
|
|
|
7714
7718
|
}),
|
|
7715
7719
|
tracer,
|
|
7716
7720
|
endWhenDone: false,
|
|
7721
|
+
endOnError: true,
|
|
7717
7722
|
fn: async (rootSpan) => {
|
|
7718
7723
|
const standardizedPrompt = await standardizePrompt({
|
|
7719
7724
|
system,
|
|
@@ -7785,6 +7790,7 @@ var DefaultStreamObjectResult = class {
|
|
|
7785
7790
|
}),
|
|
7786
7791
|
tracer,
|
|
7787
7792
|
endWhenDone: false,
|
|
7793
|
+
endOnError: true,
|
|
7788
7794
|
fn: async (doStreamSpan2) => ({
|
|
7789
7795
|
startTimestampMs: now2(),
|
|
7790
7796
|
doStreamSpan: doStreamSpan2,
|