ai 4.2.10 → 4.2.11
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 +6 -0
- package/dist/index.js +3 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/rsc/dist/rsc-server.mjs +2 -5
- package/rsc/dist/rsc-server.mjs.map +1 -1
package/dist/index.mjs
CHANGED
@@ -1078,14 +1078,11 @@ var DownloadError = class extends AISDKError5 {
|
|
1078
1078
|
_a5 = symbol5;
|
1079
1079
|
|
1080
1080
|
// util/download.ts
|
1081
|
-
async function download({
|
1082
|
-
url,
|
1083
|
-
fetchImplementation = fetch
|
1084
|
-
}) {
|
1081
|
+
async function download({ url }) {
|
1085
1082
|
var _a17;
|
1086
1083
|
const urlText = url.toString();
|
1087
1084
|
try {
|
1088
|
-
const response = await
|
1085
|
+
const response = await fetch(urlText);
|
1089
1086
|
if (!response.ok) {
|
1090
1087
|
throw new DownloadError({
|
1091
1088
|
url: urlText,
|
@@ -4635,7 +4632,7 @@ function smoothStream({
|
|
4635
4632
|
let buffer = "";
|
4636
4633
|
return new TransformStream({
|
4637
4634
|
async transform(chunk, controller) {
|
4638
|
-
if (chunk.type
|
4635
|
+
if (chunk.type !== "text-delta") {
|
4639
4636
|
if (buffer.length > 0) {
|
4640
4637
|
controller.enqueue({ type: "text-delta", textDelta: buffer });
|
4641
4638
|
buffer = "";
|
@@ -4643,10 +4640,6 @@ function smoothStream({
|
|
4643
4640
|
controller.enqueue(chunk);
|
4644
4641
|
return;
|
4645
4642
|
}
|
4646
|
-
if (chunk.type !== "text-delta") {
|
4647
|
-
controller.enqueue(chunk);
|
4648
|
-
return;
|
4649
|
-
}
|
4650
4643
|
buffer += chunk.textDelta;
|
4651
4644
|
let match;
|
4652
4645
|
while ((match = chunkingRegexp.exec(buffer)) != null) {
|