@assistant-ui/react 0.5.69 → 0.5.70
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.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
|