@ensembleapp/client-sdk 0.0.12 → 0.0.13

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 CHANGED
@@ -18751,7 +18751,7 @@ function useChat({
18751
18751
  } else if (part.type === "data-ui") {
18752
18752
  part.data.forEach((widget) => addContent(widget));
18753
18753
  } else if (part.type === "data-thoughts") {
18754
- const thoughtOutputs = part.data.map((t) => t.output);
18754
+ const thoughtOutputs = part.data.map((t) => t.output).filter((output) => output != null);
18755
18755
  thoughts.push(...thoughtOutputs);
18756
18756
  } else if (part.type === "data-transfer") {
18757
18757
  } else if (part.type === "step-start") {
@@ -24251,6 +24251,9 @@ function MessageItemComponent({
24251
24251
  onFeedbackSubmit
24252
24252
  }) {
24253
24253
  const renderContentItem = (item, key) => {
24254
+ if (item == null) {
24255
+ return null;
24256
+ }
24254
24257
  if (typeof item === "string") {
24255
24258
  return /* @__PURE__ */ jsx5("div", { className: "chat-widget__markdown", children: /* @__PURE__ */ jsx5(FormattedMarkdown, { children: item }) }, key);
24256
24259
  }