@mastra/react 0.2.36-alpha.5 → 0.2.36-alpha.6
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 +10 -0
- package/dist/index.cjs +9 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -11
- package/dist/index.js.map +1 -1
- package/dist/lib/ai-sdk/utils/toUIMessage.d.ts.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @mastra/react
|
|
2
2
|
|
|
3
|
+
## 0.2.36-alpha.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fixed Studio streaming render behavior for interleaved reasoning and improved chat autoscroll during rapid output. ([#16331](https://github.com/mastra-ai/mastra/pull/16331))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`b560d6f`](https://github.com/mastra-ai/mastra/commit/b560d6f88b9b904b15c10f75c949eb145bc27684), [`d416efd`](https://github.com/mastra-ai/mastra/commit/d416efdee26c1755328e21cc62584f8566e21432), [`36b3bbf`](https://github.com/mastra-ai/mastra/commit/36b3bbf5a8d59f7e23d47e29340e76c681b4929c), [`b275631`](https://github.com/mastra-ai/mastra/commit/b275631dc10541a482b2e2d4a3e3cfa843bd5fa1)]:
|
|
10
|
+
- @mastra/core@1.33.0-alpha.6
|
|
11
|
+
- @mastra/client-js@1.18.0-alpha.6
|
|
12
|
+
|
|
3
13
|
## 0.2.36-alpha.5
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -385,23 +385,21 @@ var toUIMessage = ({ chunk, conversation, metadata }) => {
|
|
|
385
385
|
return [...result, newMessage];
|
|
386
386
|
}
|
|
387
387
|
const parts = [...lastMessage.parts];
|
|
388
|
-
|
|
389
|
-
|
|
388
|
+
const lastPartIndex = parts.length - 1;
|
|
389
|
+
const lastPart = parts[lastPartIndex];
|
|
390
|
+
if (lastPart?.type === "reasoning") {
|
|
391
|
+
parts[lastPartIndex] = {
|
|
392
|
+
...lastPart,
|
|
393
|
+
text: lastPart.text + chunk.payload.text,
|
|
394
|
+
state: "streaming"
|
|
395
|
+
};
|
|
396
|
+
} else {
|
|
390
397
|
parts.push({
|
|
391
398
|
type: "reasoning",
|
|
392
399
|
text: chunk.payload.text,
|
|
393
400
|
state: "streaming",
|
|
394
401
|
providerMetadata: chunk.payload.providerMetadata
|
|
395
402
|
});
|
|
396
|
-
} else {
|
|
397
|
-
const reasoningPart = parts[reasoningPartIndex];
|
|
398
|
-
if (reasoningPart.type === "reasoning") {
|
|
399
|
-
parts[reasoningPartIndex] = {
|
|
400
|
-
...reasoningPart,
|
|
401
|
-
text: reasoningPart.text + chunk.payload.text,
|
|
402
|
-
state: "streaming"
|
|
403
|
-
};
|
|
404
|
-
}
|
|
405
403
|
}
|
|
406
404
|
return [
|
|
407
405
|
...result.slice(0, -1),
|