@pagelines/sdk 1.0.794 → 1.0.795
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/AgentWrap.js +12 -8
- package/dist/AgentWrap.js.map +1 -1
- package/package.json +1 -1
package/dist/AgentWrap.js
CHANGED
|
@@ -4578,7 +4578,7 @@ var kr = [
|
|
|
4578
4578
|
}), oi = 80, si = 600, ci = /* @__PURE__ */ S({
|
|
4579
4579
|
__name: "ChatScroller",
|
|
4580
4580
|
setup(e, { expose: t }) {
|
|
4581
|
-
let n = M(), r = M(), i = M(!0), a, o = 0;
|
|
4581
|
+
let n = M(), r = M(), i = M(!0), a, o, s = 0;
|
|
4582
4582
|
function scrollToBottom() {
|
|
4583
4583
|
let e = n.value;
|
|
4584
4584
|
e && (e.scrollTop = e.scrollHeight);
|
|
@@ -4588,21 +4588,25 @@ var kr = [
|
|
|
4588
4588
|
e && (i.value = e.scrollHeight - e.scrollTop - e.clientHeight <= oi);
|
|
4589
4589
|
}
|
|
4590
4590
|
function markUserGesture() {
|
|
4591
|
-
|
|
4591
|
+
s = Date.now() + si;
|
|
4592
|
+
}
|
|
4593
|
+
function followPinned() {
|
|
4594
|
+
i.value && Date.now() > s && scrollToBottom();
|
|
4592
4595
|
}
|
|
4593
4596
|
function pin() {
|
|
4594
|
-
i.value = !0,
|
|
4597
|
+
i.value = !0, s = 0, scrollToBottom(), requestAnimationFrame(() => {
|
|
4595
4598
|
scrollToBottom(), requestAnimationFrame(scrollToBottom);
|
|
4596
4599
|
});
|
|
4597
4600
|
}
|
|
4598
4601
|
return t({ pin }), te(() => {
|
|
4599
4602
|
requestAnimationFrame(() => {
|
|
4600
4603
|
scrollToBottom(), requestAnimationFrame(scrollToBottom);
|
|
4601
|
-
}), r.value && (a = new ResizeObserver(()
|
|
4602
|
-
|
|
4603
|
-
|
|
4604
|
+
}), r.value && (a = new ResizeObserver(followPinned), a.observe(r.value), n.value && a.observe(n.value), o = new MutationObserver(followPinned), o.observe(r.value, {
|
|
4605
|
+
childList: !0,
|
|
4606
|
+
subtree: !0
|
|
4607
|
+
}));
|
|
4604
4608
|
}), A(() => {
|
|
4605
|
-
a?.disconnect();
|
|
4609
|
+
a?.disconnect(), o?.disconnect();
|
|
4606
4610
|
}), (e, t) => (j(), _("div", {
|
|
4607
4611
|
ref_key: "viewport",
|
|
4608
4612
|
ref: n,
|
|
@@ -5015,7 +5019,7 @@ var di = ["data-voice-state", "data-voice-activity"], fi = { class: "flex flex-1
|
|
|
5015
5019
|
if (!e.chatController || Me.value !== "send") return;
|
|
5016
5020
|
i.value && (i.value.style.height = "auto", i.value.focus()), r.value?.pin();
|
|
5017
5021
|
let t = e.chatController.sendComposerMessage();
|
|
5018
|
-
window.matchMedia("(
|
|
5022
|
+
window.matchMedia("(pointer: coarse)").matches && i.value?.blur(), await t;
|
|
5019
5023
|
}
|
|
5020
5024
|
async function handleCardAction(t) {
|
|
5021
5025
|
!e.chatController || Se.value || (r.value?.pin(), await e.chatController.sendChatMessage(t));
|