@assistant-ui/react 0.5.14 → 0.5.15
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/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -3605,7 +3605,6 @@ var AUTO_STATUS_COMPLETE = Object.freeze({
|
|
3605
3605
|
type: "complete",
|
3606
3606
|
reason: "unknown"
|
3607
3607
|
});
|
3608
|
-
var isAutoStatus = (status) => status === AUTO_STATUS_RUNNING || status === AUTO_STATUS_COMPLETE;
|
3609
3608
|
var getAutoStatus = (isLast, isRunning) => isLast && isRunning ? AUTO_STATUS_RUNNING : AUTO_STATUS_COMPLETE;
|
3610
3609
|
|
3611
3610
|
// src/runtimes/external-store/ThreadMessageLike.tsx
|
@@ -3689,9 +3688,8 @@ var useExternalStoreSync = (adapter, updateData) => {
|
|
3689
3688
|
adapterRef.current.messages.at(-1) === m,
|
3690
3689
|
adapterRef.current.isRunning ?? false
|
3691
3690
|
);
|
3692
|
-
if (cache && (cache.role !== "assistant" ||
|
3691
|
+
if (cache && (cache.role !== "assistant" || cache.status === autoStatus))
|
3693
3692
|
return cache;
|
3694
|
-
if (cache) return cache;
|
3695
3693
|
const newMessage = fromThreadMessageLike(
|
3696
3694
|
converter2(m, idx),
|
3697
3695
|
idx.toString(),
|