@versini/sassysaint 4.3.0 → 4.3.1

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.
@@ -1,6 +1,6 @@
1
1
  import { jsxs as f, jsx as n, Fragment as j } from "react/jsx-runtime";
2
- import { O as re, s as ne, S as te, isLastMessageFromRole as G, x as q, CANCEL as oe, CLEAR as ae, ACTION_RESET as Y, ROLE_ASSISTANT as h, ROLE_INTERNAL as w, ROLE_USER as I, qr as L, ROLE_SYSTEM as le, ROLE_HIDDEN as ce, MODEL_GPT4 as J, STATS_SEPARATOR as V, ACTION_MODEL as Q, ACTION_MESSAGE as x, TYPE_QUESTION as de, SEND as ie, ACTION_STREAMING as W, ERROR_MESSAGE as me, getMessageContaintWrapperClass as pe, MessagesContainerHeader as ue, ACTION_SEARCH as ge, ACTION_SORT as ye, ACTION_RESTORE as fe, c as he, AppFooter as Ce, LOCAL_STORAGE_PREFIX as H, LOCAL_STORAGE_SEARCH as Te, LOCAL_STORAGE_SORT as Se } from "./index.B6eo37ct.js";
3
- import { g as X, AppContext as N, restCall as xe, kt as Ee, E as z, serviceCall as ve, SERVICE_TYPES as be, HistoryContext as Ae, k as Re } from "./useLocalStorage.CPkzjnpM.js";
2
+ import { O as re, s as ne, S as te, isLastMessageFromRole as G, x as q, CANCEL as oe, CLEAR as ae, ACTION_RESET as Y, ROLE_ASSISTANT as h, ROLE_INTERNAL as w, ROLE_USER as I, qr as L, ROLE_SYSTEM as le, ROLE_HIDDEN as ce, MODEL_GPT4 as J, STATS_SEPARATOR as V, ACTION_MODEL as Q, ACTION_MESSAGE as x, TYPE_QUESTION as de, SEND as ie, ACTION_STREAMING as W, ERROR_MESSAGE as me, getMessageContaintWrapperClass as pe, MessagesContainerHeader as ue, ACTION_SEARCH as ge, ACTION_SORT as ye, ACTION_RESTORE as fe, c as he, AppFooter as Ce, LOCAL_STORAGE_PREFIX as H, LOCAL_STORAGE_SEARCH as Te, LOCAL_STORAGE_SORT as Se } from "./index.BlSrPZWf.js";
3
+ import { g as X, AppContext as N, restCall as xe, At as Ee, E as z, serviceCall as ve, SERVICE_TYPES as be, HistoryContext as Ae, k as Re } from "./useLocalStorage.C4iGBmg7.js";
4
4
  import { useState as M, useEffect as S, useContext as _, useRef as C, lazy as Ne, Suspense as B, useReducer as U } from "react";
5
5
  import T from "clsx";
6
6
  const ke = ({
@@ -179,7 +179,7 @@ const Ue = () => {
179
179
  children: s != null && s.streaming ? oe : ae
180
180
  }
181
181
  ) }) : null;
182
- }, F = Ne(() => import("./LazyMessageAssistant.DDwCH_GK.js").then((e) => e.LazyMessageAssistant)), $e = () => {
182
+ }, F = Ne(() => import("./LazyMessageAssistant.9TRoCl8r.js").then((e) => e.LazyMessageAssistant)), $e = () => {
183
183
  const { state: e } = _(N);
184
184
  return /* @__PURE__ */ f(j, { children: [
185
185
  e && e.messages.length > 0 && e.messages.map((s, o) => {
@@ -1,8 +1,8 @@
1
1
  import { jsxs as d, jsx as t, Fragment as w } from "react/jsx-runtime";
2
- import { O as z, i$1 as le, N as de, p as De, o as Oe, g as v, N$1 as B, CARDS as f, renderDataAsList as Y, pluralize as Q, ABOUT_TITLE as ze, MODEL_GPT4 as Be, numberFormatter as Pe, durationFormatter as Ce, NA as Ve, ROLE_ASSISTANT as Fe, extractAverage as $e, GPT4_MAX_TOKENS as Ue, qr as V, STATS as Te, b as re, j as P, x as O, LOCAL_STORAGE_PREFIX as ce, LOCAL_STORAGE_SORT as Ge, ACTION_RESET as Ye, ACTION_RESTORE as je, truncate as Ke, ACTION_SORT as oe, LOCAL_STORAGE_SEARCH as We, Y as Xe, ACTION_SEARCH as qe, HISTORY_TITLE as Je, getCurrentGeoLocation as Qe, LOCAL_STORAGE_CHAT_DETAILS as Ze, W as et, v as ue, PROFILE_TITLE as tt, LOG_OUT as me } from "./index.B6eo37ct.js";
2
+ import { O as z, i$1 as le, N as de, p as De, o as Oe, g as v, N$1 as B, CARDS as f, renderDataAsList as j, pluralize as Q, ABOUT_TITLE as ze, MODEL_GPT4 as Be, numberFormatter as Pe, durationFormatter as Ce, NA as Ve, ROLE_ASSISTANT as Fe, extractAverage as $e, GPT4_MAX_TOKENS as Ge, qr as V, STATS as Te, b as re, j$1 as P, x as O, LOCAL_STORAGE_PREFIX as ce, LOCAL_STORAGE_SORT as Ue, ACTION_RESET as je, ACTION_RESTORE as Ye, truncate as Ke, ACTION_SORT as oe, LOCAL_STORAGE_SEARCH as We, G as Xe, ACTION_SEARCH as qe, HISTORY_TITLE as Je, getCurrentGeoLocation as Qe, LOCAL_STORAGE_CHAT_DETAILS as Ze, W as et, v as ue, PROFILE_TITLE as tt, LOG_OUT as me } from "./index.BlSrPZWf.js";
3
3
  import * as ne from "react";
4
- import ot, { forwardRef as Ne, useState as T, useRef as j, useContext as L, useEffect as _, Suspense as at, lazy as nt, useId as st, useMemo as rt } from "react";
5
- import { g as ct, AppContext as Z, serviceCall as R, SERVICE_TYPES as H, HistoryContext as Se, E as ie, k as I, et as it, at as lt, lt as ae, J as M, ct as dt, st as ut, rt as mt, kt as he } from "./useLocalStorage.CPkzjnpM.js";
4
+ import ot, { forwardRef as Ne, useState as T, useRef as Y, useContext as L, useEffect as _, Suspense as at, lazy as nt, useId as st, useMemo as rt } from "react";
5
+ import { g as ct, AppContext as Z, serviceCall as R, SERVICE_TYPES as H, HistoryContext as Se, E as ie, k as I, et as it, at as lt, lt as ae, J as M, ct as dt, st as ut, rt as mt, At as he } from "./useLocalStorage.C4iGBmg7.js";
6
6
  import b from "clsx";
7
7
  import { useFloatingTree as Ee, useFloatingNodeId as ht, useListItem as ye, useFloating as pt, offset as ft, flip as gt, shift as Ct, autoUpdate as Tt, useClick as Nt, useRole as St, useDismiss as Et, useListNavigation as yt, useTypeahead as wt, useInteractions as bt, useMergeRefs as we, FloatingNode as kt, FloatingList as It, FloatingPortal as vt, FloatingFocusManager as xt, FloatingTree as At } from "@floating-ui/react";
8
8
  const se = ne.createContext({
@@ -37,11 +37,11 @@ const se = ne.createContext({
37
37
  focusMode: m = "system",
38
38
  ...c
39
39
  }, i) => {
40
- const [u, g] = T(!1), [N, C] = T(!1), [p, y] = T(null), k = j([]), h = j([]), S = L(se), E = Ee(), x = ht(), ee = ye(), { floatingStyles: te, refs: X, context: A } = pt({
40
+ const [u, g] = T(!1), [N, C] = T(!1), [p, y] = T(null), k = Y([]), h = Y([]), S = L(se), E = Ee(), x = ht(), ee = ye(), { floatingStyles: te, refs: X, context: A } = pt({
41
41
  nodeId: x,
42
42
  open: u,
43
- onOpenChange: (U) => {
44
- g(U), s == null || s(U);
43
+ onOpenChange: (G) => {
44
+ g(G), s == null || s(G);
45
45
  },
46
46
  placement: n,
47
47
  strategy: "fixed",
@@ -79,11 +79,11 @@ const se = ne.createContext({
79
79
  return _(() => {
80
80
  if (!E)
81
81
  return;
82
- function U() {
82
+ function G() {
83
83
  g(!1), s == null || s(!1);
84
84
  }
85
- return E.events.on("click", U), () => {
86
- E.events.off("click", U);
85
+ return E.events.on("click", G), () => {
86
+ E.events.off("click", G);
87
87
  };
88
88
  }, [E, s]), _(() => {
89
89
  u && E && E.events.emit("menuopen", { nodeId: x });
@@ -176,19 +176,19 @@ const Mt = ({ className: e, ...o }) => {
176
176
  ...r,
177
177
  children: /* @__PURE__ */ t("path", { d: "M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3l105.4 105.3c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256l105.3-105.4z" })
178
178
  }
179
- ), G = "panel", J = "messagebox", Ht = ({
179
+ ), U = "panel", J = "messagebox", Ht = ({
180
180
  className: e,
181
181
  kind: o,
182
182
  borderMode: a
183
183
  }) => ({
184
184
  main: b("prose prose-lighter flex flex-col bg-surface-medium", {
185
- [`${le} h-full min-h-[95%] sm:h-auto sm:min-h-[10rem] sm:rounded-lg sm:border-2`]: o === G,
186
- [`${le} w-full sm:w-[95%] md:max-w-2xl`]: o === G && !e,
185
+ [`${le} h-full min-h-[95%] sm:h-auto sm:min-h-[10rem] sm:rounded-lg sm:border-2`]: o === U,
186
+ [`${le} w-full sm:w-[95%] md:max-w-2xl`]: o === U && !e,
187
187
  [`${de} rounded-lg border-2`]: o === J,
188
188
  [`${de} w-[95%] sm:w-[50%] md:max-w-2xl`]: o === J && !e,
189
189
  [`${e}`]: !!e,
190
- "sm:border-border-dark": a === "dark" && o === G,
191
- "sm:border-border-accent": a === "light" && o === G,
190
+ "sm:border-border-dark": a === "dark" && o === U,
191
+ "sm:border-border-accent": a === "light" && o === U,
192
192
  "border-border-dark": a === "dark" && o === J,
193
193
  "border-border-accent": a === "light" && o === J
194
194
  }),
@@ -197,7 +197,7 @@ const Mt = ({ className: e, ...o }) => {
197
197
  header: "p-4 mb-0",
198
198
  close: "p-4"
199
199
  }), W = (e) => nt(
200
- () => import("./index.7JJYsiGN.D3Y9pcQ1.js").then((o) => ({
200
+ () => import("./index.Bzt9pToY.DmOBHHnp.js").then((o) => ({
201
201
  default: o[e]
202
202
  }))
203
203
  ), Lt = W("Modal"), _t = W("ModalClose"), Dt = W("ModalContent"), Ot = W("ModalDescription"), zt = W("ModalHeading"), F = ({
@@ -207,10 +207,10 @@ const Mt = ({ className: e, ...o }) => {
207
207
  children: n,
208
208
  footer: s,
209
209
  borderMode: r = "light",
210
- kind: l = G,
210
+ kind: l = U,
211
211
  className: m
212
212
  }) => {
213
- const c = j(""), i = Ht({ className: m, kind: l, borderMode: r });
213
+ const c = Y(""), i = Ht({ className: m, kind: l, borderMode: r });
214
214
  return _(() => (e && (c.current = document.title, document.title = `${a} | ${c.current}`), () => {
215
215
  e && (document.title = c.current);
216
216
  }), [a, e]), /* @__PURE__ */ t(at, { fallback: /* @__PURE__ */ t("div", {}), children: e && /* @__PURE__ */ t(Lt, { open: e, onOpenChange: o, children: /* @__PURE__ */ d(Dt, { className: i.main, children: [
@@ -276,7 +276,7 @@ const Mt = ({ className: e, ...o }) => {
276
276
  "border-border-light bg-surface-darker": e === "dark",
277
277
  "border-border-light bg-surface-darker dark:border-border-dark dark:bg-surface-medium": e === "alt-system",
278
278
  "border-border-dark bg-surface-medium dark:border-border-light dark:bg-surface-darker": e === "system"
279
- }), Ut = ({
279
+ }), Gt = ({
280
280
  mode: e,
281
281
  labelHidden: o
282
282
  }) => o ? "sr-only" : b("ml-2 text-sm", {
@@ -284,11 +284,11 @@ const Mt = ({ className: e, ...o }) => {
284
284
  "text-copy-lighter": e === "dark",
285
285
  "text-copy-lighter dark:text-copy-dark": e === "alt-system",
286
286
  "text-copy-dark dark:text-copy-lighter": e === "system"
287
- }), Gt = ({ spacing: e }) => b(
287
+ }), Ut = ({ spacing: e }) => b(
288
288
  De,
289
289
  "relative flex cursor-pointer items-center",
290
290
  Oe(e)
291
- ), Yt = ({
291
+ ), jt = ({
292
292
  mode: e,
293
293
  focusMode: o,
294
294
  labelHidden: a,
@@ -302,10 +302,10 @@ const Mt = ({ className: e, ...o }) => {
302
302
  Ft(),
303
303
  Vt()
304
304
  ),
305
- label: Ut({ mode: e, labelHidden: a }),
305
+ label: Gt({ mode: e, labelHidden: a }),
306
306
  input: "peer sr-only",
307
- wrapper: Gt({ spacing: n })
308
- }), jt = ({
307
+ wrapper: Ut({ spacing: n })
308
+ }), Yt = ({
309
309
  checked: e = !1,
310
310
  onChange: o,
311
311
  label: a,
@@ -316,7 +316,7 @@ const Mt = ({ className: e, ...o }) => {
316
316
  spacing: m,
317
317
  noBorder: c = !1
318
318
  }) => {
319
- const i = Yt({
319
+ const i = jt({
320
320
  mode: r,
321
321
  focusMode: l,
322
322
  labelHidden: n,
@@ -594,9 +594,9 @@ const oo = ({ stats: e }) => {
594
594
  {
595
595
  header: f.ABOUT.TITLE_CLIENT,
596
596
  className: "prose-dark dark:prose-lighter",
597
- children: Y(s, {
598
- [f.ABOUT.VERSION]: "4.3.0",
599
- [f.ABOUT.BUILD_TIMESTAMP]: "09/06/2024 10:29 AM EDT"
597
+ children: j(s, {
598
+ [f.ABOUT.VERSION]: "4.3.1",
599
+ [f.ABOUT.BUILD_TIMESTAMP]: "09/06/2024 06:47 PM EDT"
600
600
  })
601
601
  }
602
602
  ) }),
@@ -605,7 +605,7 @@ const oo = ({ stats: e }) => {
605
605
  {
606
606
  header: f.ABOUT.TITLE_SERVER,
607
607
  className: "prose-dark dark:prose-lighter",
608
- children: Y(r, {
608
+ children: j(r, {
609
609
  [f.ABOUT.VERSION]: a,
610
610
  [Q(f.ABOUT.ENGINE, n.length)]: /* @__PURE__ */ t(w, { children: n.map((l) => /* @__PURE__ */ t("div", { className: "text-right", children: l }, l)) }),
611
611
  [Q(f.ABOUT.PLUGIN, o.length)]: /* @__PURE__ */ t(w, { children: o.map((l) => /* @__PURE__ */ t("div", { className: "text-right", children: l }, l)) })
@@ -636,14 +636,14 @@ const oo = ({ stats: e }) => {
636
636
  isAuthenticated: e,
637
637
  stats: o
638
638
  }) => {
639
- const { state: a } = L(Z), n = Ue - Number(a == null ? void 0 : a.usage), s = K(), r = K();
639
+ const { state: a } = L(Z), n = Ge - Number(a == null ? void 0 : a.usage), s = K(), r = K();
640
640
  return e ? /* @__PURE__ */ d(w, { children: [
641
641
  a && a.messages.length > 0 && /* @__PURE__ */ t("div", { className: "mb-4", children: /* @__PURE__ */ t(
642
642
  B,
643
643
  {
644
644
  header: f.CURRENT_STATISTICS.TITLE,
645
645
  className: "prose-dark dark:prose-lighter",
646
- children: Y(s, {
646
+ children: j(s, {
647
647
  [f.CURRENT_STATISTICS.MODEL_NAME]: (a == null ? void 0 : a.model) || Be,
648
648
  [f.CURRENT_STATISTICS.TOKENS_USED]: a == null ? void 0 : a.usage,
649
649
  [f.CURRENT_STATISTICS.REMAINING_TOKENS]: Pe.format(n),
@@ -656,7 +656,7 @@ const oo = ({ stats: e }) => {
656
656
  {
657
657
  header: f.MAIN_STATISTICS.TITLE,
658
658
  className: "prose-dark dark:prose-lighter",
659
- children: Y(r, {
659
+ children: j(r, {
660
660
  [Q(f.MAIN_STATISTICS.TOTAL, o.totalChats)]: o.totalChats,
661
661
  [f.MAIN_STATISTICS.PROCESSING_TIME]: Ce(
662
662
  o.averageProcessingTimes
@@ -753,9 +753,9 @@ const mo = async (e, o, a, n) => {
753
753
  }
754
754
  });
755
755
  s.status === 200 && (o({
756
- type: Ye
756
+ type: je
757
757
  }), o({
758
- type: je,
758
+ type: Ye,
759
759
  payload: {
760
760
  id: e.id,
761
761
  model: s.data.model,
@@ -775,12 +775,12 @@ const mo = async (e, o, a, n) => {
775
775
  onOpenChange: n
776
776
  }) => {
777
777
  var k;
778
- const { user: s, getAccessToken: r } = V(), l = j({
778
+ const { user: s, getAccessToken: r } = V(), l = Y({
779
779
  id: 0,
780
780
  timestamp: "",
781
781
  message: ""
782
782
  }), [m, c] = T(!1), i = uo("(min-width: 480px)"), { state: u, dispatch: g } = L(Se), [, N] = ie({
783
- key: ce + Ge,
783
+ key: ce + Ue,
784
784
  initialValue: u.sortDirection
785
785
  }), C = e.data.sort(
786
786
  (h, S) => {
@@ -959,7 +959,7 @@ const po = ({
959
959
  onOpenChange: e,
960
960
  historyData: o
961
961
  }) => {
962
- const { isAuthenticated: a } = V(), n = j(null), { dispatch: s } = L(Z), { state: r, dispatch: l } = L(Se), [, m] = ie({
962
+ const { isAuthenticated: a } = V(), n = Y(null), { dispatch: s } = L(Z), { state: r, dispatch: l } = L(Se), [, m] = ie({
963
963
  key: ce + We,
964
964
  initialValue: r.searchString
965
965
  }), c = rt(() => o, [o]), [i, u] = T({
@@ -1226,11 +1226,11 @@ const po = ({
1226
1226
  header: f.PREFERENCES.TITLE,
1227
1227
  className: "prose-dark dark:prose-lighter",
1228
1228
  children: [
1229
- Y(c, {
1229
+ j(c, {
1230
1230
  [f.PREFERENCES.NAME]: i,
1231
1231
  [f.PREFERENCES.EMAIL]: (o == null ? void 0 : o.email) || "",
1232
1232
  [f.PREFERENCES.ENGINE_DETAILS]: /* @__PURE__ */ t(
1233
- jt,
1233
+ Yt,
1234
1234
  {
1235
1235
  noBorder: !0,
1236
1236
  labelHidden: !0,
@@ -1,5 +1,5 @@
1
1
  import { jsx as _i } from "react/jsx-runtime";
2
- import { convert as Si, getDefaultExportFromCjs as Ni, visit as ki, find as Ti, parse as z0, parse$1 as P0, normalize as F0, svg as Mi, html as Ai, visitParents as Oi, SKIP as Ri, longestStreak as Ci, factorySpace as Xt, markdownLineEnding as xt, Markdown as Ii, remarkGfm as Di } from "./LazyMessageAssistant.DDwCH_GK.js";
2
+ import { convert as Si, getDefaultExportFromCjs as Ni, visit as ki, find as Ti, parse as z0, parse$1 as P0, normalize as F0, svg as Mi, html as Ai, visitParents as Oi, SKIP as Ri, longestStreak as Ci, factorySpace as Xt, markdownLineEnding as xt, Markdown as Ii, remarkGfm as Di } from "./LazyMessageAssistant.9TRoCl8r.js";
3
3
  const U0 = (
4
4
  // Note: overloads like this are needed to support optional generics.
5
5
  /**
@@ -1,8 +1,8 @@
1
1
  import { jsxs as He, jsx as re, Fragment as or } from "react/jsx-runtime";
2
- import { c$1 as ot, S as at, LOCAL_STORAGE_PREFIX as wi, LOCAL_STORAGE_CHAT_DETAILS as Si, durationFormatter as Ci } from "./index.B6eo37ct.js";
3
- import { AppContext as Ei, E as Ai } from "./useLocalStorage.CPkzjnpM.js";
2
+ import { c$1 as ot, S as at, LOCAL_STORAGE_PREFIX as wi, LOCAL_STORAGE_CHAT_DETAILS as Si, durationFormatter as Ci } from "./index.BlSrPZWf.js";
3
+ import { AppContext as Ei, E as Ai } from "./useLocalStorage.C4iGBmg7.js";
4
4
  import { lazy as Ii, useContext as Ti, Suspense as Pi } from "react";
5
- import { T as ut } from "./App.BjgAzPtR.js";
5
+ import { T as ut } from "./App.C232zHGs.js";
6
6
  import cn from "clsx";
7
7
  const Li = ({
8
8
  spinnerRef: e,
@@ -8618,7 +8618,7 @@ function sf(e) {
8618
8618
  i.push(af(n)), o.push(Tc()), l.push(Pc(n));
8619
8619
  }
8620
8620
  const cf = Ii(
8621
- () => import("./LazyMarkdownWithExtra.a9L-Pfdc.js")
8621
+ () => import("./LazyMarkdownWithExtra.CacXy27y.js")
8622
8622
  ), In = {
8623
8623
  MODEL: "Model",
8624
8624
  PLUGIN: "Plugin",