@pluno/product-agent-web 0.1.98 → 0.1.100

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
@@ -1,4 +1,4 @@
1
- export type ProductAgentModel = "gpt-5.4-nano" | "gpt-5.4-mini" | "gpt-5.4" | "gpt-5.6-terra" | "gpt-5.6-sol";
1
+ export type ProductAgentModel = "gpt-5.4-nano" | "gpt-5.4-mini" | "gpt-5.4" | "gpt-5.6-luna" | "gpt-5.6-terra" | "gpt-5.6-sol";
2
2
  export type ProductAgentUser = {
3
3
  id: string;
4
4
  email?: string | null;
@@ -411,7 +411,7 @@ async function La(e = {}) {
411
411
  taskNotifications: e.taskNotifications,
412
412
  tabGroups: e.tabGroups
413
413
  };
414
- Z(
414
+ X(
415
415
  "web-sdk.widget",
416
416
  "Mounting widget with merged options",
417
417
  {
@@ -504,7 +504,7 @@ async function La(e = {}) {
504
504
  ".pluno-pa-widget__history-status"
505
505
  ), le = o.querySelector(
506
506
  ".pluno-pa-widget__timeline-jump"
507
- ), x = o.querySelector(
507
+ ), _ = o.querySelector(
508
508
  ".pluno-pa-widget__active-users-counter"
509
509
  ), y = o.querySelector(
510
510
  ".pluno-pa-widget__timeline"
@@ -512,7 +512,7 @@ async function La(e = {}) {
512
512
  ".pluno-pa-widget__timeline-bottom-sentinel"
513
513
  ), K = o.querySelector(
514
514
  ".pluno-pa-widget__notify-suggestion"
515
- ), te = o.querySelector(
515
+ ), ee = o.querySelector(
516
516
  ".pluno-pa-widget__notify-suggestion-enable"
517
517
  ), v = o.querySelector(
518
518
  ".pluno-pa-widget__notify-suggestion-later"
@@ -525,7 +525,7 @@ async function La(e = {}) {
525
525
  ), Qo = o.querySelector(
526
526
  ".pluno-pa-widget__tab-groups-suggestion-dismiss"
527
527
  );
528
- if (!T || !u || !m || !R || !U || !ue || !Se || !je || !D || !Re || !f || !O || !Ee || !re || !Ve || !H || !lt || !De || !le || !x || !y || !j)
528
+ if (!T || !u || !m || !R || !U || !ue || !Se || !je || !D || !Re || !f || !O || !Ee || !re || !Ve || !H || !lt || !De || !le || !_ || !y || !j)
529
529
  throw new Error("Failed to mount Pluno widget");
530
530
  if (t.movableLauncher && !M)
531
531
  throw new Error("Failed to mount Pluno widget drag handle");
@@ -540,7 +540,7 @@ async function La(e = {}) {
540
540
  G,
541
541
  (a) => {
542
542
  G = G.filter(
543
- (d, _) => _ !== a
543
+ (d, x) => x !== a
544
544
  ), Me(), W(b.getState()), $(), _e();
545
545
  }
546
546
  );
@@ -574,7 +574,7 @@ async function La(e = {}) {
574
574
  } catch (a) {
575
575
  throw Pt.release(), n.remove(), a;
576
576
  }
577
- E.appendChild(n), Z(
577
+ E.appendChild(n), X(
578
578
  "web-sdk.widget",
579
579
  "Applied initial widget appearance",
580
580
  {
@@ -587,17 +587,17 @@ async function La(e = {}) {
587
587
  const Tt = new Set(l.openToolGroupKeys), Oe = new Set(
588
588
  l.seenShareCandidateIds
589
589
  ), st = new Set(Oe);
590
- let At = l.sharePromptsDisabled || await Yr(t), ne = null, Y = !1, pt = !(t.loginRequired || t.signupRequired), xe = !1, ke = {
590
+ let At = l.sharePromptsDisabled || await Yr(t), te = null, Y = !1, pt = !(t.loginRequired || t.signupRequired), xe = !1, ke = {
591
591
  enabled: !0
592
592
  }, Le = 0, Sn = "", V = !1, he = !1, ye = [], It = null, Ke = null;
593
- const oe = (a, d) => {
593
+ const ne = (a, d) => {
594
594
  ke = { enabled: a, reason: d };
595
- }, ie = () => {
595
+ }, oe = () => {
596
596
  le.hidden = !0;
597
597
  }, ti = () => {
598
598
  le.hidden = !1;
599
599
  }, ni = (a = "jump") => {
600
- oe(!0, a), ie(), at(y, () => ke.enabled), Le = y.scrollTop;
600
+ ne(!0, a), oe(), at(y, () => ke.enabled), Le = y.scrollTop;
601
601
  }, me = () => {
602
602
  if (re.hidden = t.layout === "page" || t.loginRequired, Ve.hidden = !V, re.setAttribute("aria-expanded", String(V)), H.classList.toggle(
603
603
  "pluno-pa-widget__history-list--center",
@@ -609,16 +609,16 @@ async function La(e = {}) {
609
609
  for (const a of ye) {
610
610
  const d = document.createElement("button");
611
611
  d.type = "button", d.className = "pluno-pa-widget__history-item", d.disabled = he;
612
- const _ = document.createElement("span");
613
- _.className = "pluno-pa-widget__history-item-title", _.textContent = Va(a);
612
+ const x = document.createElement("span");
613
+ x.className = "pluno-pa-widget__history-item-title", x.textContent = Va(a);
614
614
  const S = document.createElement("time");
615
615
  S.className = "pluno-pa-widget__history-time", S.dateTime = a.lastActiveAt, S.textContent = Ya(
616
616
  a.lastActiveAt,
617
617
  Date.now()
618
618
  );
619
619
  const z = document.createElement("small");
620
- z.className = "pluno-pa-widget__history-path", z.textContent = Ka(a), d.append(_, S, z), d.addEventListener("click", () => {
621
- V = !1, Ke = null, me(), oe(!0, "newSession"), ie(), b.loadSession(a.id), W(b.getState()), _e();
620
+ z.className = "pluno-pa-widget__history-path", z.textContent = Ka(a), d.append(x, S, z), d.addEventListener("click", () => {
621
+ V = !1, Ke = null, me(), ne(!0, "newSession"), oe(), b.loadSession(a.id), W(b.getState()), _e();
622
622
  }), H.appendChild(d);
623
623
  }
624
624
  if (he && ye.length > 0) {
@@ -633,7 +633,7 @@ async function La(e = {}) {
633
633
  const d = await b.listSessions({ cursor: a, limit: 20 });
634
634
  ye = a ? [...ye, ...d.sessions] : d.sessions, It = d.nextCursor;
635
635
  } catch (d) {
636
- Z(
636
+ X(
637
637
  "web-sdk.widget",
638
638
  "Failed to load session history",
639
639
  {
@@ -686,7 +686,7 @@ async function La(e = {}) {
686
686
  o.classList.remove("pluno-pa-widget--minimized"), T.removeAttribute("tabindex"), !o.classList.contains("pluno-pa-widget--open") && !o.classList.contains("pluno-pa-widget--closing") && Ze(!1), d && dt("shown");
687
687
  return;
688
688
  }
689
- ne !== null && (window.clearTimeout(ne), ne = null), o.classList.remove("pluno-pa-widget--open"), o.classList.remove("pluno-pa-widget--closing"), o.classList.add("pluno-pa-widget--minimized"), T.hidden = !1, m.hidden = !0, R.hidden = !0, T.tabIndex = 0, f.value = "", Ie(
689
+ te !== null && (window.clearTimeout(te), te = null), o.classList.remove("pluno-pa-widget--open"), o.classList.remove("pluno-pa-widget--closing"), o.classList.add("pluno-pa-widget--minimized"), T.hidden = !1, m.hidden = !0, R.hidden = !0, T.tabIndex = 0, f.value = "", Ie(
690
690
  o,
691
691
  Zt(
692
692
  o,
@@ -708,7 +708,7 @@ async function La(e = {}) {
708
708
  rootRect: Qt(o),
709
709
  launcherRect: Qt(T),
710
710
  panelRect: Qt(m),
711
- viewport: ee(),
711
+ viewport: Q(),
712
712
  panelHidden: m.hidden,
713
713
  closeHidden: R.hidden,
714
714
  ...d
@@ -752,7 +752,7 @@ async function La(e = {}) {
752
752
  N,
753
753
  Rt()
754
754
  );
755
- const _ = yt(
755
+ const x = yt(
756
756
  h ?? Jt(
757
757
  o,
758
758
  a,
@@ -761,9 +761,9 @@ async function La(e = {}) {
761
761
  ),
762
762
  d
763
763
  );
764
- h && (h = _), Nt(_, a), Pe(
764
+ h && (h = x), Nt(x, a), Pe(
765
765
  "Applied open panel position after viewport resize",
766
- { openPanelPosition: _ }
766
+ { openPanelPosition: x }
767
767
  );
768
768
  } else p && Pe(
769
769
  "Applied visible launcher position after viewport resize",
@@ -778,14 +778,14 @@ async function La(e = {}) {
778
778
  launcherDragHandle: M,
779
779
  getPosition: () => Ye(),
780
780
  setPosition: (a) => {
781
- const d = a, _ = St(o), S = gn(
781
+ const d = a, x = St(o), S = gn(
782
782
  o,
783
783
  a,
784
- _
784
+ x
785
785
  );
786
786
  p = Oa(
787
787
  S,
788
- _
788
+ x
789
789
  ), Ie(o, S), Pe("Dragging closed launcher", {
790
790
  requestedPosition: d
791
791
  });
@@ -844,7 +844,7 @@ async function La(e = {}) {
844
844
  b.getState().lastErrorCode
845
845
  ), $());
846
846
  } catch (a) {
847
- Z(
847
+ X(
848
848
  "web-sdk.widget",
849
849
  "Failed to refresh billing status",
850
850
  { message: a instanceof Error ? a.message : String(a) }
@@ -854,30 +854,30 @@ async function La(e = {}) {
854
854
  }
855
855
  }
856
856
  }, fe = (a = "", d = !0) => {
857
- An(), Qe && (Qe = !1, Ot()), o.classList.contains("pluno-pa-widget--open") || (h = null), ne !== null && (window.clearTimeout(ne), ne = null), Xe("shown", !1), m.hidden = !1, R.hidden = !1, tn(
857
+ An(), Qe && (Qe = !1, Ot()), o.classList.contains("pluno-pa-widget--open") || (h = null), te !== null && (window.clearTimeout(te), te = null), Xe("shown", !1), m.hidden = !1, R.hidden = !1, tn(
858
858
  N,
859
859
  Rt()
860
860
  ), o.classList.remove("pluno-pa-widget--closing");
861
- const _ = Ze(), S = Jt(
861
+ const x = Ze(), S = Jt(
862
862
  o,
863
- _,
863
+ x,
864
864
  t.position,
865
865
  c
866
866
  );
867
- if (Nt(S, _), Pe("Opening launcher at clamped open panel position", {
867
+ if (Nt(S, x), Pe("Opening launcher at clamped open panel position", {
868
868
  openPanelPosition: S,
869
- visibleLauncherPosition: _
870
- }), oe(!0, "open"), ie(), !d) {
869
+ visibleLauncherPosition: x
870
+ }), ne(!0, "open"), oe(), !d) {
871
871
  o.classList.add("pluno-pa-widget--open"), T.hidden = !0, a && (f.value = a, ot(f)), at(y, () => ke.enabled), Le = y.scrollTop, f.focus(), f.setSelectionRange(f.value.length, f.value.length), F(), dt("shown"), t.onPanelOpenChange?.(!0);
872
872
  return;
873
873
  }
874
874
  window.requestAnimationFrame(() => {
875
- o.classList.add("pluno-pa-widget--open"), a && (f.value = a, ot(f)), at(y, () => ke.enabled), Le = y.scrollTop, f.focus(), f.setSelectionRange(f.value.length, f.value.length), F(), dt("shown"), t.onPanelOpenChange?.(!0), ne = window.setTimeout(() => {
875
+ o.classList.add("pluno-pa-widget--open"), a && (f.value = a, ot(f)), at(y, () => ke.enabled), Le = y.scrollTop, f.focus(), f.setSelectionRange(f.value.length, f.value.length), F(), dt("shown"), t.onPanelOpenChange?.(!0), te = window.setTimeout(() => {
876
876
  T.hidden = !0, at(y, () => ke.enabled), Le = y.scrollTop;
877
877
  }, 220);
878
878
  });
879
879
  }, zt = () => {
880
- ne !== null && (window.clearTimeout(ne), ne = null), T.hidden = !1, p && (Ze(!1), Pe("Closing launcher at stored position")), o.classList.remove("pluno-pa-widget--open"), o.classList.add("pluno-pa-widget--closing"), F(), t.onPanelOpenChange?.(!1), ne = window.setTimeout(() => {
880
+ te !== null && (window.clearTimeout(te), te = null), T.hidden = !1, p && (Ze(!1), Pe("Closing launcher at stored position")), o.classList.remove("pluno-pa-widget--open"), o.classList.add("pluno-pa-widget--closing"), F(), t.onPanelOpenChange?.(!1), te = window.setTimeout(() => {
881
881
  m.hidden = !0, R.hidden = !0, h = null, o.classList.remove("pluno-pa-widget--closing");
882
882
  }, 220);
883
883
  };
@@ -901,9 +901,9 @@ async function La(e = {}) {
901
901
  return null;
902
902
  let d = a;
903
903
  for (; d; ) {
904
- const _ = d.closest(Vn);
905
- if (_)
906
- return _;
904
+ const x = d.closest(Vn);
905
+ if (x)
906
+ return x;
907
907
  const S = d.getRootNode();
908
908
  d = S instanceof ShadowRoot ? S.host : null;
909
909
  }
@@ -935,12 +935,12 @@ async function La(e = {}) {
935
935
  const d = Mt;
936
936
  if (Mt = null, d === null || Date.now() - d > da)
937
937
  return;
938
- const _ = li(a.relatedTarget);
939
- if (!_)
938
+ const x = li(a.relatedTarget);
939
+ if (!x)
940
940
  return;
941
941
  const S = Date.now();
942
942
  if (ct !== null && S - ct <= ca) {
943
- Nn(_);
943
+ Nn(x);
944
944
  return;
945
945
  }
946
946
  ct = S;
@@ -951,24 +951,24 @@ async function La(e = {}) {
951
951
  }), C?.addEventListener("click", (a) => {
952
952
  a.preventDefault(), a.stopPropagation(), Xe("minimized");
953
953
  }), R.addEventListener("click", zt), y.addEventListener("scroll", () => {
954
- y.scrollTop < Le - 1 && oe(!1, "userScroll"), Le = y.scrollTop;
954
+ y.scrollTop < Le - 1 && ne(!1, "userScroll"), Le = y.scrollTop;
955
955
  }), le.addEventListener("click", () => {
956
956
  ni();
957
957
  });
958
958
  const Rn = typeof IntersectionObserver > "u" ? null : new IntersectionObserver(
959
959
  ([a]) => {
960
- a?.isIntersecting && (oe(!0, "bottom"), ie());
960
+ a?.isIntersecting && (ne(!0, "bottom"), oe());
961
961
  },
962
962
  { root: y, threshold: 0 }
963
963
  );
964
964
  Rn?.observe(j);
965
965
  const Je = () => t.loginRequired || t.signupRequired;
966
966
  let Ue = null, Qe = !1;
967
- const X = () => pt || b.getState().status !== "connected", Ae = () => {
968
- const a = Je(), d = Ue !== null, _ = !a && X();
969
- u.readOnly = a || d || _, f.readOnly = d || _, u.placeholder = d ? Kn : a ? t.signupRequired ? t.signupButtonLabel : t.loginButtonLabel : Qe ? "New update" : t.launcherLabel, f.placeholder = d ? Kn : a ? t.signupRequired ? t.signupButtonLabel : t.loginButtonLabel : pe.launcherLabel, U.hidden = a;
967
+ const ie = () => pt || b.getState().status !== "connected", Ae = () => {
968
+ const a = Je(), d = Ue !== null;
969
+ u.readOnly = !1, f.readOnly = !1, u.placeholder = d ? Kn : a ? t.signupRequired ? t.signupButtonLabel : t.loginButtonLabel : Qe ? "New update" : t.launcherLabel, f.placeholder = d ? Kn : a ? t.signupRequired ? t.signupButtonLabel : t.loginButtonLabel : pe.launcherLabel, U.hidden = a;
970
970
  }, $ = () => {
971
- O.disabled = X() || ae(t.billingStatus) || !b.getState().isThinking && f.value.trim().length === 0 && G.length === 0, Re.disabled = Je() || X() || ae(t.billingStatus);
971
+ O.disabled = ie() || ae(t.billingStatus) || !b.getState().isThinking && f.value.trim().length === 0 && G.length === 0, Re.disabled = Je() || ie() || ae(t.billingStatus);
972
972
  };
973
973
  Ae();
974
974
  const Ot = () => {
@@ -985,7 +985,7 @@ async function La(e = {}) {
985
985
  Y || (pt = !1, Ae(), $());
986
986
  },
987
987
  (a) => {
988
- Y || (pt = !1, Ae(), $(), Z(
988
+ Y || (pt = !1, Ae(), $(), X(
989
989
  "web-sdk.widget",
990
990
  "Failed to connect Product Agent widget",
991
991
  {
@@ -1004,7 +1004,7 @@ async function La(e = {}) {
1004
1004
  t.onSignupClick?.();
1005
1005
  return;
1006
1006
  }
1007
- X() || ae(t.billingStatus) || (xe = !0, oe(!0, "send"), ie(), G = en(
1007
+ ie() || ae(t.billingStatus) || (xe = !0, ne(!0, "send"), oe(), G = en(
1008
1008
  b,
1009
1009
  f,
1010
1010
  G,
@@ -1033,39 +1033,39 @@ async function La(e = {}) {
1033
1033
  await Ft(a), !(a.length === 0 || Ue !== null) && f.focus();
1034
1034
  };
1035
1035
  Re.addEventListener("click", () => {
1036
- t.loginRequired || X() || ae(t.billingStatus) || D.click();
1036
+ t.loginRequired || ie() || ae(t.billingStatus) || D.click();
1037
1037
  }), D.addEventListener("change", () => {
1038
1038
  const a = Array.from(D.files ?? []);
1039
1039
  D.value = "", ui(a).catch((d) => {
1040
1040
  Bt(
1041
1041
  d instanceof Error ? d.message : "Failed to attach file"
1042
- ), Z("web-sdk.widget", "Attachment failed", {
1042
+ ), X("web-sdk.widget", "Attachment failed", {
1043
1043
  message: d instanceof Error ? d.message : String(d)
1044
1044
  });
1045
1045
  });
1046
1046
  }), o.addEventListener("dragenter", (a) => {
1047
- !t.attachmentsEnabled || !bt(a.dataTransfer) || t.loginRequired || X() || (a.preventDefault(), a.stopPropagation(), et += 1, o.classList.add("pluno-pa-widget--drag-over"));
1047
+ !t.attachmentsEnabled || !bt(a.dataTransfer) || t.loginRequired || ie() || (a.preventDefault(), a.stopPropagation(), et += 1, o.classList.add("pluno-pa-widget--drag-over"));
1048
1048
  }), o.addEventListener("dragover", (a) => {
1049
1049
  const d = a.dataTransfer;
1050
- !t.attachmentsEnabled || !bt(d) || t.loginRequired || X() || (a.preventDefault(), a.stopPropagation(), d.dropEffect = "copy");
1050
+ !t.attachmentsEnabled || !bt(d) || t.loginRequired || ie() || (a.preventDefault(), a.stopPropagation(), d.dropEffect = "copy");
1051
1051
  }), o.addEventListener("dragleave", (a) => {
1052
1052
  bt(a.dataTransfer) && (a.stopPropagation(), et = Math.max(0, et - 1), et === 0 && o.classList.remove("pluno-pa-widget--drag-over"));
1053
1053
  }), o.addEventListener("drop", (a) => {
1054
1054
  const d = a.dataTransfer;
1055
- !t.attachmentsEnabled || !bt(d) || t.loginRequired || X() || (a.preventDefault(), a.stopPropagation(), di(), Ft(d.files).catch((_) => {
1055
+ !t.attachmentsEnabled || !bt(d) || t.loginRequired || ie() || (a.preventDefault(), a.stopPropagation(), di(), Ft(d.files).catch((x) => {
1056
1056
  Bt(
1057
- _ instanceof Error ? _.message : "Failed to attach file"
1058
- ), Z("web-sdk.widget", "Attachment failed", {
1059
- message: _ instanceof Error ? _.message : String(_)
1057
+ x instanceof Error ? x.message : "Failed to attach file"
1058
+ ), X("web-sdk.widget", "Attachment failed", {
1059
+ message: x instanceof Error ? x.message : String(x)
1060
1060
  });
1061
1061
  }));
1062
1062
  }), o.addEventListener("paste", (a) => {
1063
1063
  a.stopPropagation();
1064
- const d = a.clipboardData, _ = Array.from(d?.files ?? []);
1065
- !t.attachmentsEnabled || _.length === 0 || t.loginRequired || X() || (a.preventDefault(), Ft(_).catch((S) => {
1064
+ const d = a.clipboardData, x = Array.from(d?.files ?? []);
1065
+ !t.attachmentsEnabled || x.length === 0 || t.loginRequired || ie() || (a.preventDefault(), Ft(x).catch((S) => {
1066
1066
  Bt(
1067
1067
  S instanceof Error ? S.message : "Failed to attach file"
1068
- ), Z("web-sdk.widget", "Attachment failed", {
1068
+ ), X("web-sdk.widget", "Attachment failed", {
1069
1069
  message: S instanceof Error ? S.message : String(S)
1070
1070
  });
1071
1071
  }));
@@ -1078,10 +1078,10 @@ async function La(e = {}) {
1078
1078
  b.stop();
1079
1079
  return;
1080
1080
  }
1081
- if (X())
1081
+ if (ie())
1082
1082
  return;
1083
1083
  const a = f.value.trim().length > 0 || G.length > 0;
1084
- xe = !0, oe(!0, "send"), ie(), G = en(
1084
+ xe = !0, ne(!0, "send"), oe(), G = en(
1085
1085
  b,
1086
1086
  f,
1087
1087
  G,
@@ -1099,7 +1099,7 @@ async function La(e = {}) {
1099
1099
  t.onLoginClick?.();
1100
1100
  return;
1101
1101
  }
1102
- X() || (xe = !0, oe(!0, "send"), ie(), G = en(
1102
+ ie() || (xe = !0, ne(!0, "send"), oe(), G = en(
1103
1103
  b,
1104
1104
  f,
1105
1105
  G,
@@ -1137,7 +1137,7 @@ async function La(e = {}) {
1137
1137
  }
1138
1138
  a.enabled || a.neverSuggest || !b.getState().isThinking || Mn() || He || Y || (K.hidden = !1);
1139
1139
  };
1140
- te?.addEventListener("click", () => {
1140
+ ee?.addEventListener("click", () => {
1141
1141
  He = !0, ht(), nt?.enable().catch(() => {
1142
1142
  });
1143
1143
  }), v?.addEventListener("click", () => {
@@ -1169,11 +1169,11 @@ async function La(e = {}) {
1169
1169
  };
1170
1170
  const hi = !!t.socialPostDraftHandler, Ht = /* @__PURE__ */ new Map(), Gt = () => f.value.trim().length > 0 || G.length > 0, mi = () => {
1171
1171
  const a = $e !== null && an(b.getState(), Gt());
1172
- x.hidden = !a, a && $e !== null && Oo(x, $e);
1172
+ _.hidden = !a, a && $e !== null && Oo(_, $e);
1173
1173
  };
1174
1174
  let qe = null;
1175
1175
  const $t = (a = {}) => {
1176
- xe = !0, oe(!0, "newSession"), ie(), V = !1, me(), b.startNewSession(a), Tt.clear(), f.value = "", G = [], Me(), ot(f), F(), $(), f.focus(), W(b.getState());
1176
+ xe = !0, ne(!0, "newSession"), oe(), V = !1, me(), b.startNewSession(a), Tt.clear(), f.value = "", G = [], Me(), ot(f), F(), $(), f.focus(), W(b.getState());
1177
1177
  }, wt = () => {
1178
1178
  t.morningReport !== null && (t.morningReport = null, t.onMorningReportTaskStart?.(), $t());
1179
1179
  }, qt = (a) => {
@@ -1218,7 +1218,7 @@ async function La(e = {}) {
1218
1218
  );
1219
1219
  return;
1220
1220
  }
1221
- const d = qa(a), _ = d !== Sn;
1221
+ const d = qa(a), x = d !== Sn;
1222
1222
  Sn = d;
1223
1223
  const S = xe || ke.enabled;
1224
1224
  xe = !1, kr(
@@ -1226,7 +1226,7 @@ async function La(e = {}) {
1226
1226
  j,
1227
1227
  O,
1228
1228
  qt,
1229
- x,
1229
+ _,
1230
1230
  a,
1231
1231
  $e,
1232
1232
  $e !== null && an(a, Gt()),
@@ -1237,10 +1237,10 @@ async function La(e = {}) {
1237
1237
  F,
1238
1238
  ut,
1239
1239
  (z) => {
1240
- X() || (wt(), xe = !0, oe(!0, "send"), ie(), b.sendMessage(z));
1240
+ ie() || (wt(), xe = !0, ne(!0, "send"), oe(), b.sendMessage(z));
1241
1241
  },
1242
1242
  () => {
1243
- xe = !0, oe(!0, "send"), ie(), b.retryLastMessage();
1243
+ xe = !0, ne(!0, "send"), oe(), b.retryLastMessage();
1244
1244
  },
1245
1245
  t.morningReport,
1246
1246
  () => {
@@ -1266,7 +1266,7 @@ async function La(e = {}) {
1266
1266
  At = !0, Oe.add(z.id), st.add(z.id), F(), Xr(t, !0), tt = null, W(b.getState());
1267
1267
  }
1268
1268
  } : void 0
1269
- ), S ? (Le = y.scrollTop, ie()) : _ && ja(a) && ti();
1269
+ ), S ? (Le = y.scrollTop, oe()) : x && ja(a) && ti();
1270
1270
  };
1271
1271
  return On = zi(
1272
1272
  (a) => {
@@ -1282,13 +1282,13 @@ async function La(e = {}) {
1282
1282
  const d = Dn && !a.isThinking;
1283
1283
  Dn = a.isThinking, a.isThinking && !a.assistantDraft.trim() && nt && !He && We === null && K?.hidden !== !1 && (We = window.setTimeout(() => {
1284
1284
  We = null, gi();
1285
- }, Yi)), (!a.isThinking || a.assistantDraft.trim()) && (zn(), ht()), d && !o.classList.contains("pluno-pa-widget--open") && (Qe = !0), Ot(), a.appearance ? (Wt = !0, Z(
1285
+ }, Yi)), (!a.isThinking || a.assistantDraft.trim()) && (zn(), ht()), d && !o.classList.contains("pluno-pa-widget--open") && (Qe = !0), Ot(), a.appearance ? (Wt = !0, X(
1286
1286
  "web-sdk.widget",
1287
1287
  "Agent state supplied appearance",
1288
1288
  {
1289
1289
  appearance: a.appearance
1290
1290
  }
1291
- ), jt(a.appearance, "agent.state.appearance")) : Wt && (Wt = !1, Z(
1291
+ ), jt(a.appearance, "agent.state.appearance")) : Wt && (Wt = !1, X(
1292
1292
  "web-sdk.widget",
1293
1293
  "Agent state cleared appearance; reverting to configured widget options",
1294
1294
  {
@@ -1361,19 +1361,19 @@ async function La(e = {}) {
1361
1361
  }
1362
1362
  }
1363
1363
  function jt(a, d) {
1364
- const _ = a.accentColor ?? t.accentColor, S = a.colorScheme ?? t.colorScheme, z = a.fontFamily ?? t.fontFamily, Vt = a.scribbleStyle ?? t.scribbleStyle;
1364
+ const x = a.accentColor ?? t.accentColor, S = a.colorScheme ?? t.colorScheme, z = a.fontFamily ?? t.fontFamily, Vt = a.scribbleStyle ?? t.scribbleStyle;
1365
1365
  r = Qn(
1366
- _,
1366
+ x,
1367
1367
  Vt
1368
1368
  ), eo(o, r, {
1369
- accentColor: _,
1369
+ accentColor: x,
1370
1370
  colorScheme: S,
1371
1371
  fontFamily: z,
1372
1372
  scribbleStyle: Vt
1373
- }), Z("web-sdk.widget", "Updated widget appearance", {
1373
+ }), X("web-sdk.widget", "Updated widget appearance", {
1374
1374
  source: d,
1375
1375
  inputAppearance: a,
1376
- appliedAccentColor: _,
1376
+ appliedAccentColor: x,
1377
1377
  appliedColorScheme: S,
1378
1378
  appliedFontFamily: z,
1379
1379
  appliedScribbleStyle: Vt,
@@ -1526,7 +1526,7 @@ function to(e) {
1526
1526
  return e === "left" || e === "right" || e === "top" || e === "bottom" || e === "top-left" || e === "top-right" || e === "bottom-left" || e === "bottom-right";
1527
1527
  }
1528
1528
  function no(e, t, n, i) {
1529
- const o = ee(), r = oo({
1529
+ const o = Q(), r = oo({
1530
1530
  leading: e.position.x,
1531
1531
  length: e.size.width,
1532
1532
  delta: n,
@@ -1570,10 +1570,10 @@ function oo({
1570
1570
  if (i) {
1571
1571
  const g = e + n;
1572
1572
  if (g >= r) {
1573
- const h = Q(g, r, p - s);
1573
+ const h = J(g, r, p - s);
1574
1574
  return { leading: h, length: p - h };
1575
1575
  }
1576
- const c = Q(
1576
+ const c = J(
1577
1577
  p + r - g,
1578
1578
  p,
1579
1579
  l
@@ -1583,14 +1583,14 @@ function oo({
1583
1583
  if (o) {
1584
1584
  const g = p + n;
1585
1585
  if (g <= l) {
1586
- const h = Q(
1586
+ const h = J(
1587
1587
  g,
1588
1588
  e + s,
1589
1589
  l
1590
1590
  );
1591
1591
  return { leading: e, length: h - e };
1592
1592
  }
1593
- const c = Q(
1593
+ const c = J(
1594
1594
  e - (g - l),
1595
1595
  r,
1596
1596
  e
@@ -1600,7 +1600,7 @@ function oo({
1600
1600
  return { leading: e, length: t };
1601
1601
  }
1602
1602
  function St(e, t = !0) {
1603
- const n = ee();
1603
+ const n = Q();
1604
1604
  if (e.classList.contains("pluno-pa-widget--minimized"))
1605
1605
  return { width: Xn, height: Xn };
1606
1606
  const i = e.getBoundingClientRect(), o = !e.classList.contains("pluno-pa-widget--open") && !e.classList.contains("pluno-pa-widget--closing");
@@ -1610,10 +1610,10 @@ function St(e, t = !0) {
1610
1610
  };
1611
1611
  }
1612
1612
  function Da() {
1613
- const e = ee();
1613
+ const e = Q();
1614
1614
  return {
1615
1615
  width: Math.min(
1616
- Q(
1616
+ J(
1617
1617
  e.width * ba,
1618
1618
  bn,
1619
1619
  wa
@@ -1621,7 +1621,7 @@ function Da() {
1621
1621
  e.width - I * 2
1622
1622
  ),
1623
1623
  height: Math.min(
1624
- Q(
1624
+ J(
1625
1625
  e.height * xa,
1626
1626
  _n,
1627
1627
  _a
@@ -1634,9 +1634,9 @@ function it(e = null) {
1634
1634
  return e ? kt(e) : Da();
1635
1635
  }
1636
1636
  function kt(e) {
1637
- const t = ee();
1637
+ const t = Q();
1638
1638
  return {
1639
- width: Q(
1639
+ width: J(
1640
1640
  e.width,
1641
1641
  Math.min(
1642
1642
  bn,
@@ -1647,7 +1647,7 @@ function kt(e) {
1647
1647
  t.width - I * 2
1648
1648
  )
1649
1649
  ),
1650
- height: Q(
1650
+ height: J(
1651
1651
  e.height,
1652
1652
  Math.min(
1653
1653
  _n,
@@ -1675,7 +1675,7 @@ function za(e, t, n) {
1675
1675
  const r = e.getBoundingClientRect();
1676
1676
  if (r.width > 0 || r.height > 0)
1677
1677
  return { x: r.left, y: r.top };
1678
- const l = ee();
1678
+ const l = Q();
1679
1679
  return {
1680
1680
  x: t === "bottom-left" ? 26 : l.width - 26 - n.width,
1681
1681
  y: l.height - 24 - n.height
@@ -1690,16 +1690,16 @@ function Zt(e, t, n) {
1690
1690
  ) : Ma(n === "bottom-left" ? "bottom-left" : "bottom-right", i, ma);
1691
1691
  }
1692
1692
  function Ma(e, t, n) {
1693
- const i = ee();
1693
+ const i = Q();
1694
1694
  return {
1695
1695
  x: e.endsWith("right") ? Math.max(0, i.width - t.width - n) : n,
1696
1696
  y: e.startsWith("bottom") ? Math.max(0, i.height - t.height - n) : n
1697
1697
  };
1698
1698
  }
1699
1699
  function gn(e, t, n) {
1700
- const i = ee(), o = I + Ba(e);
1700
+ const i = Q(), o = I + Ba(e);
1701
1701
  return {
1702
- x: Q(
1702
+ x: J(
1703
1703
  t.x,
1704
1704
  I,
1705
1705
  Math.max(
@@ -1707,7 +1707,7 @@ function gn(e, t, n) {
1707
1707
  i.width - n.width - I
1708
1708
  )
1709
1709
  ),
1710
- y: Q(
1710
+ y: J(
1711
1711
  t.y,
1712
1712
  o,
1713
1713
  Math.max(
@@ -1718,14 +1718,14 @@ function gn(e, t, n) {
1718
1718
  };
1719
1719
  }
1720
1720
  function zo(e, t) {
1721
- const n = ee();
1721
+ const n = Q();
1722
1722
  return {
1723
1723
  x: e.anchor.endsWith("right") ? n.width - t.width - e.x : e.x,
1724
1724
  y: e.anchor.startsWith("bottom") ? n.height - t.height - e.y : e.y
1725
1725
  };
1726
1726
  }
1727
1727
  function Oa(e, t) {
1728
- const n = Ua(e, t), i = ee();
1728
+ const n = Ua(e, t), i = Q();
1729
1729
  return {
1730
1730
  anchor: n,
1731
1731
  x: n.endsWith("right") ? i.width - e.x - t.width : e.x,
@@ -1733,7 +1733,7 @@ function Oa(e, t) {
1733
1733
  };
1734
1734
  }
1735
1735
  function Ua(e, t) {
1736
- const n = ee(), i = e.x + t.width / 2, r = e.y + t.height / 2 <= n.height / 2 ? "top" : "bottom", l = i <= n.width / 2 ? "left" : "right";
1736
+ const n = Q(), i = e.x + t.width / 2, r = e.y + t.height / 2 <= n.height / 2 ? "top" : "bottom", l = i <= n.width / 2 ? "left" : "right";
1737
1737
  return `${r}-${l}`;
1738
1738
  }
1739
1739
  function Ba(e) {
@@ -1747,9 +1747,9 @@ function Jt(e, t, n, i = null) {
1747
1747
  return yt(l, r);
1748
1748
  }
1749
1749
  function yt(e, t) {
1750
- const n = ee();
1750
+ const n = Q();
1751
1751
  return {
1752
- x: Q(
1752
+ x: J(
1753
1753
  e.x,
1754
1754
  I,
1755
1755
  Math.max(
@@ -1757,7 +1757,7 @@ function yt(e, t) {
1757
1757
  n.width - t.width - I
1758
1758
  )
1759
1759
  ),
1760
- y: Q(
1760
+ y: J(
1761
1761
  e.y,
1762
1762
  Ne,
1763
1763
  Math.max(
@@ -1780,7 +1780,7 @@ function Fa(e, t) {
1780
1780
  function io(e) {
1781
1781
  e.style.removeProperty("--pluno-pa-panel-offset-x"), e.style.removeProperty("--pluno-pa-panel-offset-y");
1782
1782
  }
1783
- function ee() {
1783
+ function Q() {
1784
1784
  return {
1785
1785
  width: window.innerWidth || document.documentElement.clientWidth || Po + I * 2,
1786
1786
  height: window.innerHeight || document.documentElement.clientHeight || To + I * 2
@@ -1795,10 +1795,10 @@ function Qt(e) {
1795
1795
  height: Math.round(t.height)
1796
1796
  };
1797
1797
  }
1798
- function Q(e, t, n) {
1798
+ function J(e, t, n) {
1799
1799
  return Math.min(Math.max(e, t), n);
1800
1800
  }
1801
- function Z(e, t, n) {
1801
+ function X(e, t, n) {
1802
1802
  if (typeof window > "u")
1803
1803
  return;
1804
1804
  const i = window, o = {
@@ -1812,7 +1812,7 @@ function Z(e, t, n) {
1812
1812
  );
1813
1813
  }
1814
1814
  function Wa(e, t) {
1815
- Z("web-sdk.widget.position", e, t);
1815
+ X("web-sdk.widget.position", e, t);
1816
1816
  }
1817
1817
  function en(e, t, n, i) {
1818
1818
  const o = t.value.trim();
@@ -2218,24 +2218,24 @@ function ir(e, t) {
2218
2218
  const M = w(r, "clipPath", { id: i.boltClip });
2219
2219
  w(M, "path", { d: vt });
2220
2220
  const u = w(o, "g", {
2221
- filter: J(i.softDropShadow)
2221
+ filter: Z(i.softDropShadow)
2222
2222
  });
2223
2223
  w(u, "path", {
2224
2224
  d: vt,
2225
- fill: J(i.boltEdge)
2225
+ fill: Z(i.boltEdge)
2226
2226
  });
2227
2227
  const C = "M546 166 C522 166 505 180 499 204 L397 606 C390 630 406 646 432 646 L526 646 C568 646 590 672 581 712 L512 1001 C510 1010 518 1014 524 1006 L875 475 C886 458 878 449 855 449 L814 449 C764 449 745 415 769 374 L884 200 C894 181 883 161 858 161 Z";
2228
2228
  w(u, "path", {
2229
2229
  d: C,
2230
- fill: J(i.boltFill),
2231
- filter: J(i.innerDepth)
2230
+ fill: Z(i.boltFill),
2231
+ filter: Z(i.innerDepth)
2232
2232
  }), w(u, "path", {
2233
2233
  d: C,
2234
- fill: J(i.boltGlow),
2234
+ fill: Z(i.boltGlow),
2235
2235
  opacity: "0.74"
2236
2236
  });
2237
2237
  const m = w(u, "g", {
2238
- "clip-path": J(i.boltClip),
2238
+ "clip-path": Z(i.boltClip),
2239
2239
  opacity: "0.42"
2240
2240
  });
2241
2241
  w(m, "path", {
@@ -2260,7 +2260,7 @@ function ir(e, t) {
2260
2260
  "stroke-linecap": "round",
2261
2261
  opacity: "0.48"
2262
2262
  });
2263
- const N = w(o, "g", { filter: J(i.eyeShadow) });
2263
+ const N = w(o, "g", { filter: Z(i.eyeShadow) });
2264
2264
  return ao(
2265
2265
  N,
2266
2266
  "rotate(-2 528 463)",
@@ -2310,8 +2310,8 @@ function ar(e, t) {
2310
2310
  xChannelSelector: "R",
2311
2311
  yChannelSelector: "G"
2312
2312
  });
2313
- const p = w(o, "g", { filter: J(i.wobble) }), g = w(p, "g", {
2314
- "clip-path": J(i.clip)
2313
+ const p = w(o, "g", { filter: Z(i.wobble) }), g = w(p, "g", {
2314
+ "clip-path": Z(i.clip)
2315
2315
  });
2316
2316
  return w(g, "path", {
2317
2317
  d: xi(),
@@ -2361,14 +2361,14 @@ function ao(e, t, n, i, o, r, l, s, p) {
2361
2361
  cy: i,
2362
2362
  rx: "73",
2363
2363
  ry: "80",
2364
- fill: J(p.eyeWhite)
2364
+ fill: Z(p.eyeWhite)
2365
2365
  }), w(g, "ellipse", {
2366
2366
  cx: o,
2367
2367
  cy: r,
2368
2368
  rx: "49",
2369
2369
  ry: "57",
2370
- fill: J(p.pupil),
2371
- filter: J(p.pupilGloss)
2370
+ fill: Z(p.pupil),
2371
+ filter: Z(p.pupilGloss)
2372
2372
  }), w(g, "circle", {
2373
2373
  cx: l,
2374
2374
  cy: s,
@@ -2407,7 +2407,7 @@ function B(e, t, n, i) {
2407
2407
  const o = { offset: t, "stop-color": n };
2408
2408
  i !== void 0 && (o["stop-opacity"] = i), w(e, "stop", o);
2409
2409
  }
2410
- function J(e) {
2410
+ function Z(e) {
2411
2411
  return `url(#${e})`;
2412
2412
  }
2413
2413
  function Lt(e, t, n, i) {
@@ -2870,69 +2870,69 @@ function an(e, t) {
2870
2870
  }
2871
2871
  function kr(e, t, n, i, o, r, l, s, p, g, c, h, E, P, T, M, u, C, m, N, L) {
2872
2872
  const R = Ar(r), U = R.filter(
2873
- (x) => !qo(x)
2874
- ), ue = e.scrollTop, Se = [], je = /* @__PURE__ */ new Set(), D = (x) => {
2875
- Se.push(x);
2873
+ (_) => !qo(_)
2874
+ ), ue = e.scrollTop, Se = [], je = /* @__PURE__ */ new Set(), D = (_) => {
2875
+ Se.push(_);
2876
2876
  };
2877
2877
  Vo(n, r.isThinking), o.hidden = !s, s && l !== null && Oo(o, l);
2878
2878
  const Re = U.length > 0 || !!r.assistantDraft || r.isThinking;
2879
2879
  if (i(Re), u || U.length === 0 && !r.assistantDraft && !r.lastError && !r.isThinking) {
2880
- const x = document.createElement("div");
2881
- x.className = "pluno-pa-widget__empty-state pluno-pa-widget__empty-state--starter" + (u ? " pluno-pa-widget__empty-state--morning-report" : "");
2880
+ const _ = document.createElement("div");
2881
+ _.className = "pluno-pa-widget__empty-state pluno-pa-widget__empty-state--starter" + (u ? " pluno-pa-widget__empty-state--morning-report" : "");
2882
2882
  const y = document.createElement("div");
2883
2883
  y.className = "pluno-pa-widget__empty-hero";
2884
2884
  const j = Ce(
2885
2885
  "pluno-pa-widget__character--empty",
2886
2886
  P()
2887
2887
  );
2888
- if (y.appendChild(j), x.appendChild(y), u) {
2888
+ if (y.appendChild(j), _.appendChild(y), u) {
2889
2889
  const v = document.createElement("h2");
2890
- v.className = "pluno-pa-widget__empty pluno-pa-widget__morning-report-title", v.textContent = u.opening, x.appendChild(v);
2890
+ v.className = "pluno-pa-widget__empty pluno-pa-widget__morning-report-title", v.textContent = u.opening, _.appendChild(v);
2891
2891
  } else
2892
- x.appendChild(Mo());
2893
- const K = u?.prompts ?? r.starterPrompts, te = document.createElement("div");
2894
- if (te.className = K.length > 0 ? "pluno-pa-widget__starter-prompts" : "pluno-pa-widget__starter-prompts pluno-pa-widget__starter-prompts--empty", K.length === 0 && !r.starterPromptsLoading && te.setAttribute("aria-hidden", "true"), K.length > 0)
2892
+ _.appendChild(Mo());
2893
+ const K = u?.prompts ?? r.starterPrompts, ee = document.createElement("div");
2894
+ if (ee.className = K.length > 0 ? "pluno-pa-widget__starter-prompts" : "pluno-pa-widget__starter-prompts pluno-pa-widget__starter-prompts--empty", K.length === 0 && !r.starterPromptsLoading && ee.setAttribute("aria-hidden", "true"), K.length > 0)
2895
2895
  for (const v of K) {
2896
2896
  const A = document.createElement("button");
2897
2897
  A.type = "button", A.className = "pluno-pa-widget__starter-prompt", A.textContent = `"${v}"`, A.addEventListener("click", () => {
2898
2898
  T(v);
2899
- }), te.appendChild(A);
2899
+ }), ee.appendChild(A);
2900
2900
  }
2901
2901
  else if (r.starterPromptsLoading) {
2902
2902
  const v = document.createElement("button");
2903
- v.type = "button", v.className = "pluno-pa-widget__starter-prompt pluno-pa-widget__starter-prompt--placeholder pluno-pa-widget__starter-prompt--loading", v.disabled = !0, v.tabIndex = -1, v.textContent = "Generating example tasks...", te.appendChild(v);
2903
+ v.type = "button", v.className = "pluno-pa-widget__starter-prompt pluno-pa-widget__starter-prompt--placeholder pluno-pa-widget__starter-prompt--loading", v.disabled = !0, v.tabIndex = -1, v.textContent = "Generating example tasks...", ee.appendChild(v);
2904
2904
  } else
2905
2905
  for (let v = 0; v < pa; v += 1) {
2906
2906
  const A = document.createElement("button");
2907
- A.type = "button", A.className = "pluno-pa-widget__starter-prompt pluno-pa-widget__starter-prompt--placeholder", A.disabled = !0, A.tabIndex = -1, A.textContent = "", te.appendChild(A);
2907
+ A.type = "button", A.className = "pluno-pa-widget__starter-prompt pluno-pa-widget__starter-prompt--placeholder", A.disabled = !0, A.tabIndex = -1, A.textContent = "", ee.appendChild(A);
2908
2908
  }
2909
- if (x.appendChild(te), u) {
2909
+ if (_.appendChild(ee), u) {
2910
2910
  const v = document.createElement("button");
2911
- v.type = "button", v.className = "pluno-pa-widget__morning-report-snooze", v.textContent = "Snooze morning report", v.addEventListener("click", C), x.appendChild(v);
2911
+ v.type = "button", v.className = "pluno-pa-widget__morning-report-snooze", v.textContent = "Snooze morning report", v.addEventListener("click", C), _.appendChild(v);
2912
2912
  }
2913
- h.clear(), D(x), D(t), uo(e, Se);
2913
+ h.clear(), D(_), D(t), uo(e, Se);
2914
2914
  return;
2915
2915
  }
2916
2916
  let f = null, O = null, Ee = [];
2917
2917
  const re = U.length - 1, Ve = re >= 0 && fn(U[re]), H = () => {
2918
2918
  if (Ee.length === 0)
2919
2919
  return !1;
2920
- const x = Br(
2920
+ const _ = Br(
2921
2921
  Ee,
2922
2922
  c,
2923
2923
  E,
2924
2924
  P()
2925
2925
  );
2926
- return D(x), f = null, O = x, Ee = [], !0;
2926
+ return D(_), f = null, O = _, Ee = [], !0;
2927
2927
  };
2928
- for (let x = 0; x < U.length; x += 1) {
2929
- const y = U[x];
2928
+ for (let _ = 0; _ < U.length; _ += 1) {
2929
+ const y = U[_];
2930
2930
  if (y.role === "tool") {
2931
2931
  Ee.push(y);
2932
2932
  continue;
2933
2933
  }
2934
2934
  if (fn(y)) {
2935
- if (x !== re)
2935
+ if (_ !== re)
2936
2936
  continue;
2937
2937
  if (H()) {
2938
2938
  const A = Et();
@@ -2956,40 +2956,40 @@ function kr(e, t, n, i, o, r, l, s, p, g, c, h, E, P, T, M, u, C, m, N, L) {
2956
2956
  const v = jo(P());
2957
2957
  D(v), f = null, O = v;
2958
2958
  }
2959
- const te = Lr(
2959
+ const ee = Lr(
2960
2960
  y,
2961
2961
  K,
2962
2962
  h,
2963
2963
  je,
2964
2964
  N
2965
2965
  );
2966
- D(te), f = te, O = null;
2966
+ D(ee), f = ee, O = null;
2967
2967
  }
2968
2968
  const lt = H(), De = U[U.length - 1]?.id === "assistant-draft";
2969
2969
  if (r.isThinking && !De && !Ve)
2970
2970
  if (lt) {
2971
- const x = Et();
2972
- D(x), f = null, O = x;
2971
+ const _ = Et();
2972
+ D(_), f = null, O = _;
2973
2973
  } else {
2974
- const x = fo(P());
2975
- D(x), f = null, O = x;
2974
+ const _ = fo(P());
2975
+ D(_), f = null, O = _;
2976
2976
  }
2977
2977
  if (r.lastError) {
2978
- const x = document.createElement("div");
2979
- x.className = "pluno-pa-widget__error";
2978
+ const _ = document.createElement("div");
2979
+ _.className = "pluno-pa-widget__error";
2980
2980
  const y = document.createElement("span");
2981
- if (y.textContent = r.lastError, x.appendChild(y), r.lastErrorCode === "run_recovery_exhausted" || r.lastErrorCode === "transient_model_error" || r.lastErrorCode === "run_still_active" || r.lastErrorCode === "connection_failed") {
2981
+ if (y.textContent = r.lastError, _.appendChild(y), r.lastErrorCode === "run_recovery_exhausted" || r.lastErrorCode === "transient_model_error" || r.lastErrorCode === "run_still_active" || r.lastErrorCode === "connection_failed") {
2982
2982
  const j = document.createElement("button");
2983
2983
  j.type = "button", j.className = "pluno-pa-widget__error-retry", j.textContent = "Try again", j.addEventListener(
2984
2984
  "click",
2985
2985
  r.lastErrorCode === "connection_failed" ? m : M
2986
- ), x.appendChild(j);
2986
+ ), _.appendChild(j);
2987
2987
  }
2988
- D(x), f = x, O = null;
2988
+ D(_), f = _, O = null;
2989
2989
  }
2990
2990
  const le = L ? L.draftingCandidate ?? (r.isThinking ? null : Ei(R)) : null;
2991
2991
  if (L && le && !L.dismissedCandidateIds.has(le.id)) {
2992
- const x = Rr(le, {
2992
+ const _ = Rr(le, {
2993
2993
  isDrafting: L.draftingCandidate?.id === le.id,
2994
2994
  error: L.error,
2995
2995
  characterIconOptions: L.characterIconOptions,
@@ -2997,7 +2997,7 @@ function kr(e, t, n, i, o, r, l, s, p, g, c, h, E, P, T, M, u, C, m, N, L) {
2997
2997
  onDismiss: L.onDismiss,
2998
2998
  onDisable: L.onDisable
2999
2999
  });
3000
- D(x), L.onSeen(le), f = null, O = x;
3000
+ D(_), L.onSeen(le), f = null, O = _;
3001
3001
  }
3002
3002
  f?.classList.add("pluno-pa-widget__message--bottom-reserve"), O?.classList.add("pluno-pa-widget__bottom-reserve-compact"), D(t), Tr(h, je), uo(e, Se), p ? at(e, g) : e.scrollTop = ue;
3003
3003
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pluno/product-agent-web",
3
- "version": "0.1.98",
3
+ "version": "0.1.100",
4
4
  "description": "Browser SDK and default widget for embedding Pluno Product Agent into customer web apps.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",