@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 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
- part: targetTextPart,
351
+ type: "text",
352
+ text,
353
+ part: { type: "text", text },
353
354
  status: targetStatus
354
355
  },
355
356
  true