@versini/sassysaint 8.73.0 → 8.73.2

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.
Files changed (27) hide show
  1. package/dist/chunks/{AboutChangelog.Cp9PopiO.js → AboutChangelog.BGbXeM1V.js} +2 -2
  2. package/dist/chunks/{AboutEntry.BOb5_aZI.js → AboutEntry.B6zksAh7.js} +7 -7
  3. package/dist/chunks/{App.Ck78giBC.js → App.tbzd8U0K.js} +125 -125
  4. package/dist/chunks/{Chart.C1dgaS-F.js → Chart.D2MV2w_Q.js} +2 -2
  5. package/dist/chunks/{ChatBubbleAssistant.CT2jmjen.js → ChatBubbleAssistant.RzH26aLB.js} +17 -17
  6. package/dist/chunks/{ChatBubbleUser.CM1FzHNQ.js → ChatBubbleUser.CBnoxqes.js} +3 -3
  7. package/dist/chunks/{ChatHistoryTable._Rzl_5Sk.js → ChatHistoryTable.C6I638cE.js} +62 -61
  8. package/dist/chunks/HistoryEntry.CwveusV0.js +333 -0
  9. package/dist/chunks/{ProfileEntry.Naot3F9p.js → ProfileEntry.BSOMcinm.js} +21 -21
  10. package/dist/chunks/{SettingsEntry.Du0GDXgA.js → SettingsEntry.SHZazp-B.js} +69 -63
  11. package/dist/chunks/{Table.JtsJZQLY.js → Table.DwbGRt2o.js} +2 -2
  12. package/dist/chunks/{UsageEntry.C18Kaf6V.js → UsageEntry.BOtq-YTl.js} +3 -3
  13. package/dist/chunks/{UserMemoriesPanel.C9gXdvcN.js → UserMemoriesPanel.BdWYKyp5.js} +4 -4
  14. package/dist/chunks/{index.ce_hM2eo.js → index.BO_yfOl7.js} +3 -3
  15. package/dist/chunks/{index.D0pvrKFC.js → index.CREsouo5.js} +1 -1
  16. package/dist/chunks/{index.DTBMKq5O.js → index.CqtcPR4A.js} +177 -174
  17. package/dist/chunks/{index.GppF30Qs.js → index.Cxd_WImT.js} +13 -13
  18. package/dist/chunks/{index.DBqrJ-of.js → index.DX8g0zp_.js} +2 -2
  19. package/dist/chunks/{index.Ce0bioPG.js → index.Dxke1YD_.js} +1 -1
  20. package/dist/chunks/{index.BYZBF4_0.js → index.Tr3TVoxP.js} +1 -1
  21. package/dist/chunks/{index.DdEAWm8o.js → index.zCqfAEjf.js} +1 -1
  22. package/dist/chunks/{useMarkdown.CfYCs10-.js → useMarkdown.DBF4PL2-.js} +6 -6
  23. package/dist/components/SassySaint/SassySaint.js +1 -1
  24. package/dist/index.js +4 -4
  25. package/dist/style.css +1 -1
  26. package/package.json +3 -3
  27. package/dist/chunks/HistoryEntry.DM6RInwR.js +0 -326
@@ -1,7 +1,7 @@
1
1
  import { jsx as Ap } from "react/jsx-runtime";
2
- import { getDefaultExportFromCjs as ln } from "./App.Ck78giBC.js";
2
+ import { getDefaultExportFromCjs as ln } from "./App.tbzd8U0K.js";
3
3
  import Cp, { useState as Pp, useEffect as Op } from "react";
4
- import { TRIMESTERS as rn, TRIMESTERS_SHORT as Lp, isProbablyMobile as Ep } from "./index.DTBMKq5O.js";
4
+ import { TRIMESTERS as rn, TRIMESTERS_SHORT as Lp, isProbablyMobile as Ep } from "./index.CqtcPR4A.js";
5
5
  var ls = { exports: {} }, Ip = ls.exports, on;
6
6
  function Dp() {
7
7
  return on || (on = 1, (function(we, he) {
@@ -1,25 +1,25 @@
1
- import { jsx as x } from "react/jsx-runtime";
2
- import { n as N, useUserPreferences as O, convertCamelCaseToReadable as P, numberFormatter as R, pluralize as y, Y as L } from "./index.DTBMKq5O.js";
3
- import { BUBBLE_FOOTER_EMPTY as _ } from "./index.BYZBF4_0.js";
1
+ import { jsx as g } from "react/jsx-runtime";
2
+ import { n as N, useUserPreferences as O, convertCamelCaseToReadable as P, numberFormatter as R, pluralize as y, b as L } from "./index.CqtcPR4A.js";
3
+ import { BUBBLE_FOOTER_EMPTY as _ } from "./index.Tr3TVoxP.js";
4
4
  import w from "clsx";
5
- import v, { useState as M, useRef as A, useEffect as U, useContext as B } from "react";
6
- import { ChatContext as G, AsyncBubble as E } from "./App.Ck78giBC.js";
7
- import { useMarkdown as D } from "./useMarkdown.CfYCs10-.js";
8
- const j = 2, q = j * 1e3, b = "", I = (e) => e * (2 - e);
5
+ import v, { useState as x, useRef as A, useEffect as U, useContext as B } from "react";
6
+ import { ChatContext as G, AsyncBubble as E } from "./App.tbzd8U0K.js";
7
+ import { useMarkdown as D } from "./useMarkdown.DBF4PL2-.js";
8
+ const j = 2, q = j * 1e3, M = "", I = (e) => e * (2 - e);
9
9
  function W(e, n = !0) {
10
- const [a, p] = M(0), [i, C] = M(0), [t, T] = M(e), r = A(0), s = A(0);
10
+ const [a, p] = x(0), [i, C] = x(0), [t, T] = x(e), r = A(0), s = A(0);
11
11
  return t !== e && (T(e), C(e.startsWith(t) ? a : 0)), U(() => {
12
12
  if (!n)
13
13
  return;
14
- const u = e.split(b).length, o = (c) => {
14
+ const u = e.split(M).length, o = (c) => {
15
15
  s.current || (s.current = c);
16
- const l = c - s.current, m = Math.min(l / q, 1), h = I(m), g = i + (u - i) * h;
17
- p(Math.floor(g)), m < 1 && (r.current = requestAnimationFrame(o));
16
+ const l = c - s.current, m = Math.min(l / q, 1), h = I(m), b = i + (u - i) * h;
17
+ p(Math.floor(b)), m < 1 && (r.current = requestAnimationFrame(o));
18
18
  };
19
19
  return s.current = 0, r.current = requestAnimationFrame(o), () => {
20
20
  r.current && cancelAnimationFrame(r.current);
21
21
  };
22
- }, [i, e, n]), n ? e.split(b).slice(0, a).join(b) : e;
22
+ }, [i, e, n]), n ? e.split(M).slice(0, a).join(M) : e;
23
23
  }
24
24
  const d = {
25
25
  MODEL: "Model",
@@ -36,26 +36,26 @@ const d = {
36
36
  }) => {
37
37
  const t = W(e, i), {
38
38
  state: { streaming: T, restoredModel: r, tokenUsage: s }
39
- } = B(G), u = n?.model || r, o = s, [c, l] = D(), { user: m, getAccessToken: h } = N(), { data: g } = O({
39
+ } = B(G), u = n?.model || r, o = s, [c, l] = D(), { user: m, getAccessToken: h } = N(), { data: b } = O({
40
40
  user: m?.username,
41
41
  getAccessToken: h
42
- }), F = g?.showDetails || !1;
42
+ }), F = b?.showDetails || !1;
43
43
  let f;
44
44
  return F && (f = {
45
45
  [d.MODEL]: u || null,
46
46
  [d.PLUGIN]: a ? P(a) : null
47
47
  }, o && (C ? f[d.USAGE] = `${R.format(o)} ${y("token", o)}` : f[d.USAGE] = _)), U(() => {
48
48
  t && l(t);
49
- }, [t, l]), p === L ? /* @__PURE__ */ x(
49
+ }, [t, l]), p === L ? /* @__PURE__ */ g(
50
50
  E,
51
51
  {
52
52
  tail: !0,
53
53
  className: k,
54
54
  contentClassName: S,
55
55
  noMaxWidth: !0,
56
- children: /* @__PURE__ */ x("div", { className: "flex items-center justify-center italic text-copy-error-dark dark:text-red-300", children: c })
56
+ children: /* @__PURE__ */ g("div", { className: "flex items-center justify-center italic text-copy-error-dark dark:text-red-300", children: c })
57
57
  }
58
- ) : /* @__PURE__ */ x(
58
+ ) : /* @__PURE__ */ g(
59
59
  E,
60
60
  {
61
61
  tail: !0,
@@ -1,8 +1,8 @@
1
1
  import { jsx as n, Fragment as b, jsxs as A } from "react/jsx-runtime";
2
2
  import { useState as C, useMemo as u, isValidElement as p, useEffect as I } from "react";
3
- import { AsyncBubble as w } from "./App.Ck78giBC.js";
4
- import { useMarkdown as _ } from "./useMarkdown.CfYCs10-.js";
5
- import { C as M } from "./index.DTBMKq5O.js";
3
+ import { AsyncBubble as w } from "./App.tbzd8U0K.js";
4
+ import { useMarkdown as _ } from "./useMarkdown.DBF4PL2-.js";
5
+ import { C as M } from "./index.CqtcPR4A.js";
6
6
  const R = 200, N = ({
7
7
  string: e,
8
8
  idealLength: r = R
@@ -1,24 +1,24 @@
1
1
  import { jsxs as m, jsx as e } from "react/jsx-runtime";
2
- import { I as g, Z as N, J as C, INFINITE_SCROLL_THRESHOLD as A, CARDS as E, pluralize as y, te as p, numberFormatter as k, ot as b, isProbablyMobile as D, c as U, r as B, O as I } from "./index.DTBMKq5O.js";
3
- import { st as u, p$1 as P, z as L, p$2 as V } from "./App.Ck78giBC.js";
2
+ import { I as C, J as N, Q as g, INFINITE_SCROLL_THRESHOLD as E, CARDS as k, pluralize as y, te as u, numberFormatter as b, st as D, isProbablyMobile as U, c as B, r as I, O as P } from "./index.CqtcPR4A.js";
3
+ import { st as M, p$1 as L, z as V, p$2 as $ } from "./App.tbzd8U0K.js";
4
4
  import h from "clsx";
5
5
  import { Fragment as _ } from "react";
6
- import { j as $, D as H, G as M, H as Y, U as F, M as a, F as f, l as G } from "./Table.JtsJZQLY.js";
7
- const K = ({
6
+ import { j as H, D as Y, G as x, H as F, M as a, U as G, F as S, l as K } from "./Table.DwbGRt2o.js";
7
+ const W = ({
8
8
  className: l,
9
9
  viewBox: c,
10
- title: o,
10
+ title: n,
11
11
  monotone: i,
12
- ...n
12
+ ...o
13
13
  }) => /* @__PURE__ */ m(
14
- g,
14
+ C,
15
15
  {
16
16
  defaultViewBox: "0 0 512 512",
17
17
  size: "size-5",
18
18
  viewBox: c,
19
19
  className: l,
20
- title: o || "Restore",
21
- ...n,
20
+ title: n || "Restore",
21
+ ...o,
22
22
  children: [
23
23
  /* @__PURE__ */ e(
24
24
  "path",
@@ -30,21 +30,21 @@ const K = ({
30
30
  /* @__PURE__ */ e("path", { d: "M64 128c-35.3 0-64 28.7-64 64v256c0 35.3 28.7 64 64 64h256c35.3 0 64-28.7 64-64V192c0-35.3-28.7-64-64-64zm32 64h192c17.7 0 32 14.3 32 32s-14.3 32-32 32H96c-17.7 0-32-14.3-32-32s14.3-32 32-32" })
31
31
  ]
32
32
  }
33
- ), W = ({
33
+ ), j = ({
34
34
  className: l,
35
35
  viewBox: c,
36
- title: o,
36
+ title: n,
37
37
  monotone: i,
38
- ...n
38
+ ...o
39
39
  }) => /* @__PURE__ */ m(
40
- g,
40
+ C,
41
41
  {
42
42
  defaultViewBox: "0 0 512 512",
43
43
  size: "size-5",
44
44
  viewBox: c,
45
45
  className: l,
46
- title: o || "Star in Circle",
47
- ...n,
46
+ title: n || "Star in Circle",
47
+ ...o,
48
48
  children: [
49
49
  /* @__PURE__ */ e(
50
50
  "path",
@@ -56,21 +56,21 @@ const K = ({
56
56
  /* @__PURE__ */ e("path", { d: "M270.3 112.9c-2.7-5.5-8.3-8.9-14.3-8.9s-11.7 3.5-14.3 8.9l-36.2 73.4-81.1 11.8c-6 .9-11 5.1-12.9 10.9s-.3 12.2 4 16.4l58.6 57.2-13.8 80.7c-1 6 1.4 12.1 6.4 15.6s11.5 4.1 16.9 1.2l72.4-38 72.5 38.1c5.4 2.8 11.9 2.4 16.9-1.2s7.4-9.6 6.4-15.6L338 282.7l58.6-57.2c4.4-4.3 5.9-10.6 4-16.4s-6.9-10-12.9-10.9l-81-11.8-36.2-73.4z" })
57
57
  ]
58
58
  }
59
- ), j = ({
59
+ ), J = ({
60
60
  className: l,
61
61
  viewBox: c,
62
- title: o,
62
+ title: n,
63
63
  monotone: i,
64
- ...n
64
+ ...o
65
65
  }) => /* @__PURE__ */ m(
66
- g,
66
+ C,
67
67
  {
68
68
  defaultViewBox: "0 0 512 512",
69
69
  size: "size-5",
70
70
  viewBox: c,
71
71
  className: l,
72
- title: o || "Star in Circle",
73
- ...n,
72
+ title: n || "Star in Circle",
73
+ ...o,
74
74
  children: [
75
75
  /* @__PURE__ */ e(
76
76
  "path",
@@ -82,23 +82,23 @@ const K = ({
82
82
  /* @__PURE__ */ e("path", { d: "M256 32a224 224 0 1 1 0 448 224 224 0 1 1 0-448m0 480a256 256 0 1 0 0-512 256 256 0 1 0 0 512m14.3-399.1c-2.7-5.5-8.3-8.9-14.3-8.9s-11.7 3.5-14.3 8.9l-36.2 73.4-81 11.8c-6 .9-11 5.1-12.9 10.9s-.3 12.2 4 16.4l58.6 57.2-13.8 80.7c-1 6 1.4 12.1 6.4 15.6s11.5 4.1 16.8 1.2l72.4-38 72.5 38.1c5.4 2.8 11.9 2.4 16.9-1.2s7.4-9.6 6.4-15.6L338 282.7l58.6-57.2c4.4-4.3 5.9-10.6 4-16.4s-6.9-10-12.9-10.9l-81.1-11.8-36.2-73.4zm-40 95.1 25.7-51.8 25.6 51.9c2.3 4.7 6.8 8 12 8.8l57.3 8.3-41.5 40.4c-3.8 3.7-5.5 9-4.6 14.2l9.8 57.1-51.2-26.9c-4.7-2.5-10.2-2.5-14.9 0l-51.2 26.9 9.8-57.1c.9-5.2-.8-10.5-4.6-14.2L161 225.1l57.3-8.3c5.2-.8 9.7-4 12-8.8" })
83
83
  ]
84
84
  }
85
- ), J = {
85
+ ), Q = {
86
+ [P]: $,
86
87
  [I]: V,
87
- [B]: L,
88
- [U]: P
88
+ [B]: L
89
89
  }, t = {
90
90
  ROW: "row",
91
91
  TIMESTAMP: N,
92
92
  SUMMARY: "summary",
93
93
  PROVIDER: "provider",
94
- TOKEN_USAGE: C,
94
+ TOKEN_USAGE: g,
95
95
  ACTIONS: "actions"
96
- }, Z = [
96
+ }, q = [
97
97
  t.ROW,
98
98
  t.TIMESTAMP,
99
99
  t.SUMMARY,
100
100
  t.ACTIONS
101
- ], q = [
101
+ ], X = [
102
102
  t.ROW,
103
103
  t.SUMMARY,
104
104
  t.TIMESTAMP,
@@ -108,20 +108,21 @@ const K = ({
108
108
  ], ce = ({
109
109
  filteredHistory: l,
110
110
  historyState: c,
111
- lastEntryToLoad: o,
111
+ lastEntryToLoad: n,
112
112
  onClickSort: i,
113
- onClickRestore: n,
114
- onClickDelete: w,
115
- onClickFavorite: O,
116
- infinityScrollMarkerRef: S
113
+ onClickRestore: o,
114
+ onClickDelete: f,
115
+ onClickFavorite: w,
116
+ infinityScrollMarkerRef: O,
117
+ isLoading: T = !1
117
118
  }) => {
118
- const v = D() ? Z : q, T = (s) => {
119
+ const v = U() ? q : X, z = (s) => {
119
120
  switch (s) {
120
121
  case t.ROW:
121
122
  return /* @__PURE__ */ e(a, { className: "sr-only", children: "Row" }, s);
122
123
  case t.TIMESTAMP:
123
124
  return /* @__PURE__ */ e(
124
- f,
125
+ S,
125
126
  {
126
127
  focusMode: "system",
127
128
  buttonClassName: "text-xs sm:text-sm",
@@ -142,16 +143,16 @@ const K = ({
142
143
  return /* @__PURE__ */ e(a, { className: "text-xs sm:text-sm", children: "Provider" }, s);
143
144
  case t.TOKEN_USAGE:
144
145
  return /* @__PURE__ */ e(
145
- f,
146
+ S,
146
147
  {
147
148
  focusMode: "system",
148
149
  buttonClassName: "text-xs sm:text-sm",
149
- cellId: C,
150
+ cellId: g,
150
151
  align: "right",
151
152
  sortDirection: c.sortDirection,
152
153
  sortedCell: c.sortedCell,
153
154
  onClick: () => {
154
- i(C);
155
+ i(g);
155
156
  },
156
157
  children: "Tokens"
157
158
  },
@@ -162,10 +163,10 @@ const K = ({
162
163
  default:
163
164
  return null;
164
165
  }
165
- }, z = (s, r, x) => {
166
+ }, A = (s, r, p) => {
166
167
  switch (s) {
167
168
  case t.ROW:
168
- return /* @__PURE__ */ e(a, { children: x + 1 }, s);
169
+ return /* @__PURE__ */ e(a, { children: p + 1 }, s);
169
170
  case t.TIMESTAMP:
170
171
  return /* @__PURE__ */ e(
171
172
  a,
@@ -198,7 +199,7 @@ const K = ({
198
199
  );
199
200
  }
200
201
  case t.PROVIDER: {
201
- const d = r.model ? b(r.model) : null, R = d ? J[d] : null;
202
+ const d = r.model ? D(r.model) : null, R = d ? Q[d] : null;
202
203
  return /* @__PURE__ */ e(
203
204
  a,
204
205
  {
@@ -224,67 +225,67 @@ const K = ({
224
225
  {
225
226
  className: h("dark:text-gray-400", "text-xs sm:text-sm"),
226
227
  align: "right",
227
- children: r.tokenUsage ? k.format(r.tokenUsage) : "0"
228
+ children: r.tokenUsage ? b.format(r.tokenUsage) : "0"
228
229
  },
229
230
  s
230
231
  );
231
232
  case t.ACTIONS:
232
233
  return /* @__PURE__ */ e(a, { children: /* @__PURE__ */ m("div", { className: "flex flex-col items-end sm:flex-row gap-2", children: [
233
234
  /* @__PURE__ */ e(
234
- u,
235
+ M,
235
236
  {
236
237
  label: "Restore chat",
237
238
  placement: "top",
238
239
  trigger: /* @__PURE__ */ e(
239
- p,
240
+ u,
240
241
  {
241
242
  noBorder: !0,
242
243
  label: "Restore chat",
243
244
  variant: "primary",
244
245
  iconClassName: "text-green-800 dark:text-green-500",
245
246
  onClick: async () => {
246
- await n(r);
247
+ await o(r);
247
248
  },
248
- children: /* @__PURE__ */ e(K, { size: "size-3", monotone: !0 })
249
+ children: /* @__PURE__ */ e(W, { size: "size-3", monotone: !0 })
249
250
  }
250
251
  )
251
252
  }
252
253
  ),
253
254
  /* @__PURE__ */ e(
254
- u,
255
+ M,
255
256
  {
256
257
  label: r.favoriteChat ? "Remove from favorites" : "Add to favorites",
257
258
  placement: "top",
258
259
  trigger: /* @__PURE__ */ e(
259
- p,
260
+ u,
260
261
  {
261
262
  noBorder: !0,
262
263
  label: r.favoriteChat ? "Remove from favorites" : "Add to favorites",
263
264
  variant: "primary",
264
265
  onClick: async () => {
265
- await O(r);
266
+ await w(r);
266
267
  },
267
- children: r.favoriteChat ? /* @__PURE__ */ e(W, { size: "size-4", monotone: !0 }) : /* @__PURE__ */ e(j, { size: "size-4", monotone: !0 })
268
+ children: r.favoriteChat ? /* @__PURE__ */ e(j, { size: "size-4", monotone: !0 }) : /* @__PURE__ */ e(J, { size: "size-4", monotone: !0 })
268
269
  }
269
270
  )
270
271
  }
271
272
  ),
272
273
  /* @__PURE__ */ e(
273
- u,
274
+ M,
274
275
  {
275
276
  label: "Delete chat",
276
277
  placement: "top",
277
278
  trigger: /* @__PURE__ */ e(
278
- p,
279
+ u,
279
280
  {
280
281
  noBorder: !0,
281
282
  label: "Delete chat",
282
283
  variant: "primary",
283
284
  iconClassName: "text-red-700 dark:text-red-500",
284
285
  onClick: () => {
285
- w(r);
286
+ f(r);
286
287
  },
287
- children: /* @__PURE__ */ e(G, { size: "size-3", monotone: !0 })
288
+ children: /* @__PURE__ */ e(K, { size: "size-3", monotone: !0 })
288
289
  }
289
290
  )
290
291
  }
@@ -294,15 +295,15 @@ const K = ({
294
295
  return null;
295
296
  }
296
297
  };
297
- return /* @__PURE__ */ m($, { stickyHeader: !0, stickyFooter: !0, compact: !0, mode: "alt-system", children: [
298
- /* @__PURE__ */ e(H, { children: /* @__PURE__ */ e(M, { children: v.map((s) => T(s)) }) }),
299
- /* @__PURE__ */ e(Y, { children: l.slice(0, o).map((s, r) => s?.messages?.length > 0 ? /* @__PURE__ */ m(_, { children: [
300
- r === o - A && /* @__PURE__ */ e("tr", { ref: S }),
301
- /* @__PURE__ */ e(M, { children: v.map(
302
- (x) => z(x, s, r)
298
+ return /* @__PURE__ */ m(H, { stickyHeader: !0, stickyFooter: !0, compact: !0, mode: "alt-system", children: [
299
+ /* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(x, { children: v.map((s) => z(s)) }) }),
300
+ /* @__PURE__ */ e(F, { children: T && l.length === 0 ? /* @__PURE__ */ e(x, { children: /* @__PURE__ */ e(a, { colSpan: 1e3, children: /* @__PURE__ */ e("div", { children: "Loading..." }) }) }) : l.slice(0, n).map((s, r) => s?.messages?.length > 0 ? /* @__PURE__ */ m(_, { children: [
301
+ r === n - E && /* @__PURE__ */ e("tr", { ref: O }),
302
+ /* @__PURE__ */ e(x, { children: v.map(
303
+ (p) => A(p, s, r)
303
304
  ) })
304
- ] }, `${E.HISTORY.TITLE}-${s.id}-${r}`) : null) }),
305
- /* @__PURE__ */ e(F, { children: /* @__PURE__ */ e(M, { children: /* @__PURE__ */ e(a, { colSpan: 1e3, children: /* @__PURE__ */ e("div", { children: y(
305
+ ] }, `${k.HISTORY.TITLE}-${s.id}-${r}`) : null) }),
306
+ /* @__PURE__ */ e(G, { children: /* @__PURE__ */ e(x, { children: /* @__PURE__ */ e(a, { colSpan: 1e3, children: /* @__PURE__ */ e("div", { children: y(
306
307
  `${l.length} chat`,
307
308
  l.length
308
309
  ) }) }) }) })