@2uinc/frontend-component-xpert-chatbot 1.35.8-beta.3 → 1.35.8-beta.4
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/lib/index.min.js +10 -10
- package/package.json +1 -1
package/dist/lib/index.min.js
CHANGED
@@ -20228,21 +20228,21 @@ nu.propTypes = {
|
|
20228
20228
|
};
|
20229
20229
|
nu.displayName = "PromptList";
|
20230
20230
|
const rd = ({ chatContentRef: e, messages: t }) => {
|
20231
|
-
const { loading: n } = se(Ze), [
|
20231
|
+
const { loading: n, streaming: r } = se(Ze), [a, i] = de(!1), u = pt(() => {
|
20232
20232
|
if (!e.current) return;
|
20233
|
-
const { scrollTop:
|
20234
|
-
|
20235
|
-
}, [e]),
|
20233
|
+
const { scrollTop: l, scrollHeight: c, clientHeight: d } = e.current, h = l + d >= c - 10;
|
20234
|
+
i(!h);
|
20235
|
+
}, [e]), s = () => {
|
20236
20236
|
e.current && e.current.scrollTo({
|
20237
20237
|
top: e.current.scrollHeight,
|
20238
20238
|
behavior: "smooth"
|
20239
20239
|
});
|
20240
20240
|
};
|
20241
20241
|
return ke(() => {
|
20242
|
-
const
|
20243
|
-
if (
|
20244
|
-
return
|
20245
|
-
}, [e,
|
20242
|
+
const l = e.current;
|
20243
|
+
if (l)
|
20244
|
+
return l.addEventListener("scroll", u), () => l.removeEventListener("scroll", u);
|
20245
|
+
}, [e, u]), ke(() => {
|
20246
20246
|
e.current && e.current.scrollTo({
|
20247
20247
|
top: e.current.scrollHeight,
|
20248
20248
|
behavior: "smooth"
|
@@ -20252,10 +20252,10 @@ const rd = ({ chatContentRef: e, messages: t }) => {
|
|
20252
20252
|
top: e.current.scrollHeight,
|
20253
20253
|
behavior: "smooth"
|
20254
20254
|
});
|
20255
|
-
}, [n, e]), n ? null : /* @__PURE__ */ v.jsx(v.Fragment, { children: r && t.filter((
|
20255
|
+
}, [n, e]), n ? null : /* @__PURE__ */ v.jsx(v.Fragment, { children: (a || r) && t.filter((l) => l.role === "assistant").length > 0 && /* @__PURE__ */ v.jsx(
|
20256
20256
|
"button",
|
20257
20257
|
{
|
20258
|
-
onClick:
|
20258
|
+
onClick: s,
|
20259
20259
|
className: "xpert_chatbot__scroll-to-last-message-button",
|
20260
20260
|
"aria-label": "Scroll to bottom",
|
20261
20261
|
children: "↓"
|