ai-stream-utils 0.0.1 → 0.0.2
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/README.md +0 -1
- package/dist/index.d.mts +0 -2
- package/dist/index.mjs +1 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -309,7 +309,6 @@ type FlatMapUIMessageStreamFn<UI_MESSAGE extends UIMessage, PART = InferUIMessag
|
|
|
309
309
|
|
|
310
310
|
type PartFlatMapInput<UI_MESSAGE extends UIMessage, PART = InferUIMessagePart<UI_MESSAGE>> = {
|
|
311
311
|
part: PART;
|
|
312
|
-
chunks: InferUIMessageChunk<UI_MESSAGE>[];
|
|
313
312
|
};
|
|
314
313
|
|
|
315
314
|
type PartFlatMapContext<UI_MESSAGE extends UIMessage> = {
|
package/dist/index.d.mts
CHANGED
|
@@ -160,8 +160,6 @@ declare function filterUIMessageStream<UI_MESSAGE extends UIMessage>(stream: Rea
|
|
|
160
160
|
type PartFlatMapInput<UI_MESSAGE extends UIMessage, PART extends InferUIMessagePart<UI_MESSAGE> = InferUIMessagePart<UI_MESSAGE>> = {
|
|
161
161
|
/** The reconstructed part */
|
|
162
162
|
part: PART;
|
|
163
|
-
/** The original chunks that make up this part */
|
|
164
|
-
chunks: InferUIMessageChunk<UI_MESSAGE>[];
|
|
165
163
|
};
|
|
166
164
|
/**
|
|
167
165
|
* Context provided to the part flatMap function.
|
package/dist/index.mjs
CHANGED
|
@@ -551,10 +551,7 @@ function flatMapUIMessageStream(...args) {
|
|
|
551
551
|
currentPartChunks = [];
|
|
552
552
|
isBufferingCurrentPart = false;
|
|
553
553
|
const part = reconstructPartFromChunks(chunks);
|
|
554
|
-
const input = {
|
|
555
|
-
part,
|
|
556
|
-
chunks
|
|
557
|
-
};
|
|
554
|
+
const input = { part };
|
|
558
555
|
allParts.push(input);
|
|
559
556
|
const result = flatMapFn(input, {
|
|
560
557
|
index: currentIndex++,
|