@assistant-ui/react 0.5.68 → 0.5.70
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -343,13 +343,14 @@ var TextContentPartProvider = ({ children, text, isRunning }) => {
|
|
343
343
|
_react.useEffect.call(void 0, () => {
|
344
344
|
const state = context.useContentPart.getState();
|
345
345
|
const textUpdated = state.text !== text;
|
346
|
-
const targetTextPart = textUpdated ? { type: "text", text } : state;
|
347
346
|
const targetStatus = isRunning ? RUNNING_STATUS : COMPLETE_STATUS;
|
348
347
|
const statusUpdated = state.status !== targetStatus;
|
349
348
|
if (!textUpdated && !statusUpdated) return;
|
350
349
|
writableStore(context.useContentPart).setState(
|
351
350
|
{
|
352
|
-
|
351
|
+
type: "text",
|
352
|
+
text,
|
353
|
+
part: { type: "text", text },
|
353
354
|
status: targetStatus
|
354
355
|
},
|
355
356
|
true
|