ai 6.0.261 → 6.0.263
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 +16 -0
- package/dist/index.js +17 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -5
- 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/src/generate-object/stream-object.ts +9 -2
- package/src/generate-text/stream-text.ts +8 -2
package/dist/index.mjs
CHANGED
|
@@ -1193,7 +1193,7 @@ import {
|
|
|
1193
1193
|
} from "@ai-sdk/provider-utils";
|
|
1194
1194
|
|
|
1195
1195
|
// src/version.ts
|
|
1196
|
-
var VERSION = true ? "6.0.
|
|
1196
|
+
var VERSION = true ? "6.0.263" : "0.0.0-test";
|
|
1197
1197
|
|
|
1198
1198
|
// src/util/download/download.ts
|
|
1199
1199
|
var download = async ({
|
|
@@ -7219,14 +7219,20 @@ var DefaultStreamTextResult = class {
|
|
|
7219
7219
|
controller.enqueue(chunk);
|
|
7220
7220
|
const { part } = chunk;
|
|
7221
7221
|
if (part.type === "text-delta" || part.type === "reasoning-delta" || part.type === "source" || part.type === "tool-call" || part.type === "tool-result" || part.type === "tool-input-start" || part.type === "tool-input-delta" || part.type === "raw") {
|
|
7222
|
-
await (
|
|
7222
|
+
await notify({
|
|
7223
|
+
event: { chunk: part },
|
|
7224
|
+
callbacks: onChunk
|
|
7225
|
+
});
|
|
7223
7226
|
}
|
|
7224
7227
|
if (part.type === "error") {
|
|
7225
7228
|
const error = wrapGatewayError(part.error);
|
|
7226
7229
|
if (NoOutputGeneratedError.isInstance(error)) {
|
|
7227
7230
|
recordedNoOutputError = error;
|
|
7228
7231
|
}
|
|
7229
|
-
await
|
|
7232
|
+
await notify({
|
|
7233
|
+
event: { error },
|
|
7234
|
+
callbacks: onError
|
|
7235
|
+
});
|
|
7230
7236
|
}
|
|
7231
7237
|
if (part.type === "text-start") {
|
|
7232
7238
|
activeTextContent[part.id] = {
|
|
@@ -11387,7 +11393,10 @@ var DefaultStreamObjectResult = class {
|
|
|
11387
11393
|
transform(chunk, controller) {
|
|
11388
11394
|
controller.enqueue(chunk);
|
|
11389
11395
|
if (chunk.type === "error") {
|
|
11390
|
-
|
|
11396
|
+
void notify({
|
|
11397
|
+
event: { error: wrapGatewayError(chunk.error) },
|
|
11398
|
+
callbacks: onError
|
|
11399
|
+
});
|
|
11391
11400
|
}
|
|
11392
11401
|
}
|
|
11393
11402
|
});
|
|
@@ -11712,7 +11721,10 @@ var DefaultStreamObjectResult = class {
|
|
|
11712
11721
|
onError(error2) {
|
|
11713
11722
|
const wrappedError = wrapGatewayError(error2);
|
|
11714
11723
|
self.rejectResultPromises(wrappedError);
|
|
11715
|
-
void
|
|
11724
|
+
void notify({
|
|
11725
|
+
event: { error: wrappedError },
|
|
11726
|
+
callbacks: onError
|
|
11727
|
+
});
|
|
11716
11728
|
}
|
|
11717
11729
|
});
|
|
11718
11730
|
}
|