@smartspace/chat-ui 1.14.4-pr.613.df03c6e → 1.14.4-pr.617.f049ff7

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.d.ts CHANGED
@@ -319,6 +319,8 @@ type Message = {
319
319
  message?: string | null;
320
320
  data?: string | null;
321
321
  blockId?: string | null;
322
+ /** Trace id of the request that recorded the error, for a support reference. */
323
+ traceId?: string | null;
322
324
  }[] | null;
323
325
  values?: MessageValue[] | null;
324
326
  optimistic?: boolean;
package/dist/index.js CHANGED
@@ -19726,7 +19726,8 @@ var MessageErrorMessageSchema = z.object({
19726
19726
  error_code: z.string().nullish(),
19727
19727
  message: z.string().nullish(),
19728
19728
  data: z.string().nullish(),
19729
- blockId: z.string().nullish()
19729
+ blockId: z.string().nullish(),
19730
+ traceId: z.string().nullish()
19730
19731
  });
19731
19732
  var MessageSchema = z.object({
19732
19733
  id: z.string().nullish(),
@@ -20574,7 +20575,10 @@ var MessageBubble = (props) => {
20574
20575
  /* @__PURE__ */ jsx("div", { className: "mt-1.5", children: metaRow })
20575
20576
  ] });
20576
20577
  };
20577
- function MessageErrorDetails({ detail }) {
20578
+ function MessageErrorDetails({
20579
+ detail,
20580
+ traceId
20581
+ }) {
20578
20582
  const [expanded, setExpanded] = useState(false);
20579
20583
  return /* @__PURE__ */ jsxs("div", { className: "mt-1", children: [
20580
20584
  /* @__PURE__ */ jsxs(
@@ -20590,7 +20594,13 @@ function MessageErrorDetails({ detail }) {
20590
20594
  ]
20591
20595
  }
20592
20596
  ),
20593
- expanded && /* @__PURE__ */ jsx("div", { className: "mt-1.5 whitespace-pre-wrap break-words rounded-md bg-secondary/60 p-2 font-mono text-[11px] leading-relaxed text-muted-foreground", children: detail })
20597
+ expanded && /* @__PURE__ */ jsxs("div", { className: "mt-1.5 whitespace-pre-wrap break-words rounded-md bg-secondary/60 p-2 font-mono text-[11px] leading-relaxed text-muted-foreground", children: [
20598
+ detail,
20599
+ traceId && /* @__PURE__ */ jsxs("div", { className: detail ? "mt-1.5" : void 0, children: [
20600
+ "Reference: ",
20601
+ traceId
20602
+ ] })
20603
+ ] })
20594
20604
  ] });
20595
20605
  }
20596
20606
  var ThinkingSection = ({ status }) => /* @__PURE__ */ jsxs(
@@ -20898,7 +20908,7 @@ var MessageItem = ({
20898
20908
  userInput: null
20899
20909
  }
20900
20910
  ),
20901
- detail && /* @__PURE__ */ jsx(MessageErrorDetails, { detail })
20911
+ (detail || error.traceId) && /* @__PURE__ */ jsx(MessageErrorDetails, { detail, traceId: error.traceId })
20902
20912
  ] }, key)
20903
20913
  );
20904
20914
  });