@akropolys/kiku 1.7.12 → 1.7.14

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
@@ -601,7 +601,10 @@ function ChatWidget({
601
601
  next[historyIdx] = {
602
602
  ...next[historyIdx],
603
603
  content: messages[hookIdx].content,
604
- actionType: messages[hookIdx].actionType
604
+ actionType: messages[hookIdx].actionType,
605
+ thinking: messages[hookIdx].thinking,
606
+ thoughtForSeconds: messages[hookIdx].thoughtForSeconds,
607
+ statusMessage: messages[hookIdx].statusMessage
605
608
  };
606
609
  break;
607
610
  }
@@ -706,7 +709,20 @@ I couldn't find any matching products in the store.`;
706
709
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: cn("hsk-msg-avatar", msg.role === "assistant" ? "ai" : "user"), children: msg.role === "assistant" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SparkleIcon, {}) : "U" }),
707
710
  /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: cn("hsk-msg-bubble", msg.role, classNames.messageBubble), children: [
708
711
  msg.imagePreview && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "kiku-vs-preview-bubble", style: { marginBottom: "8px" }, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("img", { src: msg.imagePreview, alt: "Uploaded Preview", className: "kiku-vs-preview-bubble-img", style: { maxWidth: "200px", borderRadius: "8px" } }) }),
712
+ msg.thinking && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("details", { className: "hsk-thinking-details", open: streaming && idx === chatHistory.length - 1 && !msg.content, children: [
713
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("summary", { className: "hsk-thinking-summary", children: [
714
+ "Thought for ",
715
+ msg.thoughtForSeconds ?? 1,
716
+ "s"
717
+ ] }),
718
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "hsk-thinking-text", children: msg.thinking })
719
+ ] }),
720
+ msg.statusMessage && idx === chatHistory.length - 1 && !msg.content && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "hsk-status-live", children: [
721
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "hsk-status-dot" }),
722
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { children: msg.statusMessage })
723
+ ] }),
709
724
  renderMarkdown(msg.content),
725
+ streaming && idx === chatHistory.length - 1 && msg.role === "assistant" && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "hsk-streaming-cursor" }),
710
726
  msg.styleDNA && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "kiku-vs-preview-banner", style: { marginTop: "10px" }, children: [
711
727
  chatHistory[idx - 1]?.imagePreview && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("img", { src: chatHistory[idx - 1].imagePreview, alt: "Visual Search Input", className: "kiku-vs-preview-img" }),
712
728
  /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "kiku-vs-preview-info", children: [