@assistant-ui/react 0.5.69 → 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.mjs
CHANGED
@@ -344,13 +344,14 @@ var TextContentPartProvider = ({ children, text, isRunning }) => {
|
|
344
344
|
useEffect3(() => {
|
345
345
|
const state = context.useContentPart.getState();
|
346
346
|
const textUpdated = state.text !== text;
|
347
|
-
const targetTextPart = textUpdated ? { type: "text", text } : state;
|
348
347
|
const targetStatus = isRunning ? RUNNING_STATUS : COMPLETE_STATUS;
|
349
348
|
const statusUpdated = state.status !== targetStatus;
|
350
349
|
if (!textUpdated && !statusUpdated) return;
|
351
350
|
writableStore(context.useContentPart).setState(
|
352
351
|
{
|
353
|
-
|
352
|
+
type: "text",
|
353
|
+
text,
|
354
|
+
part: { type: "text", text },
|
354
355
|
status: targetStatus
|
355
356
|
},
|
356
357
|
true
|