@versini/sassysaint 8.76.1 → 8.77.0

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.Bi_-dpeZ.js → AboutChangelog.tVLL6MtY.js} +3 -3
  2. package/dist/chunks/{AboutEntry.CTwezLPC.js → AboutEntry.D9MonPwL.js} +5 -5
  3. package/dist/chunks/{App.CV0Bjlae.js → App.CusyBC2e.js} +145 -145
  4. package/dist/chunks/{Chart.uzxgAiX2.js → Chart.bKur3H71.js} +2 -2
  5. package/dist/chunks/{ChatBubbleAssistant.BVlp2GoO.js → ChatBubbleAssistant.CEZZn7AD.js} +23 -21
  6. package/dist/chunks/{ChatBubbleUser.BrWZttfQ.js → ChatBubbleUser.BYLIgaHX.js} +29 -28
  7. package/dist/chunks/{ChatHistoryTable.uFTyBF2A.js → ChatHistoryTable.D9mUtUwJ.js} +91 -90
  8. package/dist/chunks/HistoryEntry.DarYFRIp.js +316 -0
  9. package/dist/chunks/{ProfileEntry.CyBWFkHS.js → ProfileEntry.C_Y--pVY.js} +2 -2
  10. package/dist/chunks/{SettingsEntry.QaYvHkdk.js → SettingsEntry.DffchAfB.js} +3 -3
  11. package/dist/chunks/{Table.Ckql2SnG.js → Table.DBfFG7qO.js} +2 -2
  12. package/dist/chunks/{UsageEntry.CDzDYeHf.js → UsageEntry.C73mIvmD.js} +3 -3
  13. package/dist/chunks/{UserMemoriesPanel.B6egCowo.js → UserMemoriesPanel.DXx_9ifJ.js} +4 -4
  14. package/dist/chunks/{index.BXdpJpQs.js → index.AVBqcs3f.js} +1 -1
  15. package/dist/chunks/{index.A4p6x5_T.js → index.B4-jvDi6.js} +1 -1
  16. package/dist/chunks/{index.CgUGA3LA.js → index.BVMzTtBw.js} +1 -1
  17. package/dist/chunks/{index.rzw7MU5J.js → index.BcYESdDV.js} +1 -1
  18. package/dist/chunks/{index.C4Rma01G.js → index.ClJfV5zs.js} +3 -3
  19. package/dist/chunks/{index.C6T0AZQ_.js → index.Hv_qeE7S.js} +2 -2
  20. package/dist/chunks/{index.BdPmgM6G.js → index.Ly8CrT48.js} +1 -1
  21. package/dist/chunks/index.bx7cnejn.js +153 -0
  22. package/dist/chunks/{useMarkdown.B4NWSGJz.js → useMarkdown.KipSXqDZ.js} +6 -6
  23. package/dist/components/SassySaint/SassySaint.js +1 -1
  24. package/dist/index.js +4 -4
  25. package/package.json +4 -4
  26. package/dist/chunks/HistoryEntry.ThaD-b5r.js +0 -307
  27. package/dist/chunks/index.C3aZ0rB_.js +0 -142
@@ -1,7 +1,7 @@
1
1
  import { jsx as Ap } from "react/jsx-runtime";
2
- import { getDefaultExportFromCjs as ln } from "./App.CV0Bjlae.js";
2
+ import { getDefaultExportFromCjs as ln } from "./App.CusyBC2e.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.rzw7MU5J.js";
4
+ import { TRIMESTERS as rn, TRIMESTERS_SHORT as Lp, isProbablyMobile as Ep } from "./index.BcYESdDV.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 g } from "react/jsx-runtime";
2
- import { n as P, useUserPreferences as R, convertCamelCaseToReadable as y, numberFormatter as L, pluralize as _, J as v } from "./index.rzw7MU5J.js";
3
- import { BUBBLE_FOOTER_EMPTY as B } from "./index.C3aZ0rB_.js";
1
+ import { jsx as x } from "react/jsx-runtime";
2
+ import { n as P, useUserPreferences as R, convertCamelCaseToReadable as y, numberFormatter as L, pluralize as _, J as v } from "./index.BcYESdDV.js";
3
+ import { BUBBLE_FOOTER_EMPTY as B } from "./index.bx7cnejn.js";
4
4
  import U from "clsx";
5
5
  import G, { useState as M, useRef as E, useEffect as F, useContext as S } from "react";
6
- import { ChatContext as D, AppContext as j, AsyncBubble as k } from "./App.CV0Bjlae.js";
7
- import { useMarkdown as q } from "./useMarkdown.B4NWSGJz.js";
6
+ import { ChatContext as D, AppContext as j, AsyncBubble as k } from "./App.CusyBC2e.js";
7
+ import { useMarkdown as q } from "./useMarkdown.KipSXqDZ.js";
8
8
  const I = 2, W = I * 1e3, b = "", V = (e) => e * (2 - e);
9
9
  function Y(e, n = !0) {
10
- const [a, d] = M(0), [c, p] = M(0), [t, C] = M(e), r = E(0), s = E(0);
10
+ const [a, d] = M(0), [i, p] = M(0), [t, C] = M(e), r = E(0), s = E(0);
11
11
  return t !== e && (C(e), p(e.startsWith(t) ? a : 0)), F(() => {
12
12
  if (!n)
13
13
  return;
14
- const T = e.split(b).length, i = (o) => {
14
+ const g = e.split(b).length, c = (o) => {
15
15
  s.current || (s.current = o);
16
- const u = o - s.current, l = Math.min(u / W, 1), h = V(l), x = c + (T - c) * h;
17
- d(Math.floor(x)), l < 1 && (r.current = requestAnimationFrame(i));
16
+ const u = o - s.current, l = Math.min(u / W, 1), h = V(l), T = i + (g - i) * h;
17
+ d(Math.floor(T)), l < 1 && (r.current = requestAnimationFrame(c));
18
18
  };
19
- return s.current = 0, r.current = requestAnimationFrame(i), () => {
19
+ return s.current = 0, r.current = requestAnimationFrame(c), () => {
20
20
  r.current && cancelAnimationFrame(r.current);
21
21
  };
22
- }, [c, e, n]), n ? e.split(b).slice(0, a).join(b) : e;
22
+ }, [i, e, n]), n ? e.split(b).slice(0, a).join(b) : e;
23
23
  }
24
24
  const f = {
25
25
  MODEL: "Model",
@@ -31,37 +31,39 @@ const f = {
31
31
  annotations: n,
32
32
  toolName: a,
33
33
  role: d,
34
- smooth: c = !1,
34
+ smooth: i = !1,
35
35
  isLastAssistantMessage: p = !1
36
36
  }) => {
37
- const t = Y(e, c), {
37
+ const t = Y(e, i), {
38
38
  state: { streaming: C, restoredModel: r, tokenUsage: s }
39
39
  } = S(D), {
40
- state: { fullScreen: T }
41
- } = S(j), i = n?.model || r, o = s, [u, l] = q(), { user: h, getAccessToken: x } = P(), { data: N } = R({
40
+ state: { fullScreen: g }
41
+ } = S(j), c = n?.model || r, o = s, [u, l] = q(), { user: h, getAccessToken: T } = P(), { data: N } = R({
42
42
  user: h?.username,
43
- getAccessToken: x
43
+ getAccessToken: T
44
44
  }), O = N?.showDetails || !1, A = U("prose-li:ps-3", {
45
- "max-w-xs sm:max-w-3xl": !T
45
+ "max-w-xs sm:max-w-3xl": !g
46
46
  });
47
47
  let m;
48
48
  return O && (m = {
49
- [f.MODEL]: i || null,
49
+ [f.MODEL]: c || null,
50
50
  [f.PLUGIN]: a ? y(a) : null
51
51
  }, o && (p ? m[f.USAGE] = `${L.format(o)} ${_("token", o)}` : m[f.USAGE] = B)), F(() => {
52
52
  t && l(t);
53
- }, [t, l]), d === v ? /* @__PURE__ */ g(
53
+ }, [t, l]), d === v ? /* @__PURE__ */ x(
54
54
  k,
55
55
  {
56
+ gradient: "medium",
56
57
  tail: !0,
57
58
  className: w,
58
59
  contentClassName: A,
59
60
  noMaxWidth: !0,
60
- children: /* @__PURE__ */ g("div", { className: "flex items-center justify-center italic text-copy-error-dark dark:text-red-300", children: u })
61
+ children: /* @__PURE__ */ x("div", { className: "flex items-center justify-center italic text-copy-error-dark dark:text-red-300", children: u })
61
62
  }
62
- ) : /* @__PURE__ */ g(
63
+ ) : /* @__PURE__ */ x(
63
64
  k,
64
65
  {
66
+ gradient: "light",
65
67
  tail: !0,
66
68
  copyToClipboardMode: "dark",
67
69
  copyToClipboardFocusMode: "light",
@@ -1,8 +1,8 @@
1
- import { jsx as a, Fragment as S, jsxs as h } from "react/jsx-runtime";
2
- import { Button as C } from "./index.rzw7MU5J.js";
1
+ import { jsx as a, Fragment as h, jsxs as S } from "react/jsx-runtime";
2
+ import { Button as C } from "./index.BcYESdDV.js";
3
3
  import { useState as _, useMemo as m, isValidElement as T, useEffect as b } from "react";
4
- import { AsyncBubble as w } from "./App.CV0Bjlae.js";
5
- import { useMarkdown as x } from "./useMarkdown.B4NWSGJz.js";
4
+ import { AsyncBubble as w } from "./App.CusyBC2e.js";
5
+ import { useMarkdown as x } from "./useMarkdown.KipSXqDZ.js";
6
6
  /*!
7
7
  @versini/ui-truncate v5.2.0
8
8
  © 2025 gizmette.com
@@ -16,20 +16,20 @@ try {
16
16
  });
17
17
  } catch {
18
18
  }
19
- const M = 200, k = ({ string: e, idealLength: r = M }) => {
20
- if (e.length <= r)
19
+ const M = 200, k = ({ string: e, idealLength: t = M }) => {
20
+ if (e.length <= t)
21
21
  return {
22
22
  string: e,
23
23
  isTruncated: !1
24
24
  };
25
- if (e.charAt(r) === " ")
25
+ if (e.charAt(t) === " ")
26
26
  return {
27
- string: e.slice(0, r),
27
+ string: e.slice(0, t),
28
28
  isTruncated: !0
29
29
  };
30
- const s = e.slice(r).search(" ");
30
+ const s = e.slice(t).search(" ");
31
31
  return {
32
- string: e.slice(0, r + s),
32
+ string: e.slice(0, t + s),
33
33
  isTruncated: !0
34
34
  };
35
35
  }, l = (e) => e == null || typeof e == "boolean" ? "" : typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map(l).join("") : /* @__PURE__ */ T(e) ? l(e.props.children) : "", B = /* @__PURE__ */ new Set([
@@ -65,55 +65,56 @@ const M = 200, k = ({ string: e, idealLength: r = M }) => {
65
65
  if (Array.isArray(e))
66
66
  return e.some(u);
67
67
  if (/* @__PURE__ */ T(e)) {
68
- const r = e;
69
- return typeof r.type == "string" && B.has(r.type.toUpperCase()) ? !0 : u(r.props.children);
68
+ const t = e;
69
+ return typeof t.type == "string" && B.has(t.type.toUpperCase()) ? !0 : u(t.props.children);
70
70
  }
71
71
  return !1;
72
- }, H = ({ children: e, length: r = 200, mode: n = "system", focusMode: c = "system", enableRichTruncation: s = !1 }) => {
73
- const [t, y] = _(!1), d = typeof e != "string" && !s, p = m(() => typeof e == "string" ? e : l(e), [
72
+ }, H = ({ children: e, length: t = 200, mode: n = "system", focusMode: c = "system", enableRichTruncation: s = !1 }) => {
73
+ const [r, d] = _(!1), y = typeof e != "string" && !s, p = m(() => typeof e == "string" ? e : l(e), [
74
74
  e
75
75
  ]), { string: f, isTruncated: i } = m(() => k({
76
76
  string: p,
77
- idealLength: r
77
+ idealLength: t
78
78
  }), [
79
79
  p,
80
- r
81
- ]), g = s && i && !t, E = (I) => {
82
- I.preventDefault(), y(!t);
80
+ t
81
+ ]), g = s && i && !r, E = (I) => {
82
+ I.preventDefault(), d(!r);
83
83
  };
84
- if (d)
85
- return /* @__PURE__ */ a(S, {
84
+ if (y)
85
+ return /* @__PURE__ */ a(h, {
86
86
  children: e
87
87
  });
88
88
  let o;
89
- i ? t ? o = e : o = f : o = e;
89
+ i ? r ? o = e : o = f : o = e;
90
90
  const A = s ? u(e) : !1;
91
- return /* @__PURE__ */ h("span", {
91
+ return /* @__PURE__ */ S("span", {
92
92
  style: {
93
93
  wordBreak: "break-word"
94
94
  },
95
95
  "data-testid": "truncate-root",
96
- "aria-expanded": i ? t : void 0,
96
+ "aria-expanded": i ? r : void 0,
97
97
  children: [
98
98
  o,
99
99
  i && /* @__PURE__ */ a(C, {
100
100
  mode: n,
101
101
  focusMode: c,
102
- className: !(s && t && A) ? "ml-2" : void 0,
102
+ className: !(s && r && A) ? "ml-2" : void 0,
103
103
  size: "small",
104
104
  onClick: E,
105
- "aria-label": t ? "Show less" : "Show more",
106
- children: t ? "less..." : "more..."
105
+ "aria-label": r ? "Show less" : "Show more",
106
+ children: r ? "less..." : "more..."
107
107
  })
108
108
  ]
109
109
  });
110
110
  }, F = ({ content: e }) => {
111
- const [r, n] = x();
111
+ const [t, n] = x();
112
112
  return b(() => {
113
113
  e && n(e);
114
114
  }, [e, n]), /* @__PURE__ */ a(
115
115
  w,
116
116
  {
117
+ gradient: "light",
117
118
  tail: !0,
118
119
  copyToClipboardMode: "dark",
119
120
  copyToClipboardFocusMode: "light",
@@ -121,7 +122,7 @@ const M = 200, k = ({ string: e, idealLength: r = M }) => {
121
122
  kind: "right",
122
123
  className: "mt-3",
123
124
  contentClassName: "prose prose-lighter prose-p:only:my-0",
124
- children: /* @__PURE__ */ a(H, { mode: "light", focusMode: "light", enableRichTruncation: !0, children: r })
125
+ children: /* @__PURE__ */ a(H, { mode: "light", focusMode: "light", enableRichTruncation: !0, children: t })
125
126
  }
126
127
  );
127
128
  };
@@ -1,57 +1,59 @@
1
- import { jsxs as d, jsx as e } from "react/jsx-runtime";
2
- import { f as p, h as u, INFINITE_SCROLL_THRESHOLD as v, CARDS as k, pluralize as w, ButtonIcon as h, IconRestore as b, IconStarInCircle as D, IconStarInCircleLight as y, IconDelete as U, numberFormatter as z, k as P, IconGoogleGemini as L, IconOpenAI as _, IconAnthropic as G, isProbablyMobile as B, z as W, Z as Y, E as F } from "./index.rzw7MU5J.js";
3
- import { Tooltip as x } from "./App.CV0Bjlae.js";
4
- import c from "clsx";
5
- import { Fragment as K } from "react";
6
- import { W as H, j as V, G as i, H as $, M as n, D as j, F as R } from "./Table.Ckql2SnG.js";
7
- const Z = {
8
- [F]: G,
9
- [Y]: _,
10
- [W]: L
11
- }, r = {
1
+ import { jsxs as m, jsx as e } from "react/jsx-runtime";
2
+ import { f as p, h as u, INFINITE_SCROLL_THRESHOLD as b, CARDS as D, pluralize as T, ButtonIcon as d, IconRestore as y, IconStarInCircle as U, IconStarInCircleLight as z, IconDelete as P, numberFormatter as L, k as _, IconGoogleGemini as G, IconOpenAI as $, IconAnthropic as B, isProbablyMobile as W, z as Y, Z as H, E as K } from "./index.BcYESdDV.js";
3
+ import { Tooltip as h } from "./App.CusyBC2e.js";
4
+ import l from "clsx";
5
+ import { Fragment as F } from "react";
6
+ import { W as V, j, G as x, H as Z, M as n, F as N } from "./Table.DBfFG7qO.js";
7
+ const q = {
8
+ [K]: B,
9
+ [H]: $,
10
+ [Y]: G
11
+ }, s = {
12
12
  ROW: "row",
13
13
  TIMESTAMP: p,
14
14
  SUMMARY: "summary",
15
15
  PROVIDER: "provider",
16
16
  TOKEN_USAGE: u,
17
17
  ACTIONS: "actions"
18
- }, q = [
19
- r.ROW,
20
- r.TIMESTAMP,
21
- r.SUMMARY,
22
- r.ACTIONS
23
- ], J = [
24
- r.ROW,
25
- r.SUMMARY,
26
- r.TIMESTAMP,
27
- r.TOKEN_USAGE,
28
- r.PROVIDER,
29
- r.ACTIONS
30
- ], ae = ({
31
- filteredHistory: o,
32
- historyState: l,
18
+ }, J = [
19
+ s.ROW,
20
+ s.TIMESTAMP,
21
+ s.SUMMARY,
22
+ s.ACTIONS
23
+ ], Q = [
24
+ s.ROW,
25
+ s.SUMMARY,
26
+ s.TIMESTAMP,
27
+ s.TOKEN_USAGE,
28
+ s.PROVIDER,
29
+ s.ACTIONS
30
+ ], le = ({
31
+ filteredHistory: c,
32
+ historyState: o,
33
33
  lastEntryToLoad: g,
34
34
  onClickSort: C,
35
- onClickRestore: S,
36
- onClickDelete: O,
37
- onClickFavorite: T,
38
- infinityScrollMarkerRef: f,
39
- isLoading: A = !1
35
+ onClickRestore: R,
36
+ onClickDelete: S,
37
+ onClickFavorite: O,
38
+ infinityScrollMarkerRef: A,
39
+ isLoading: I = !1,
40
+ totalHistoryCount: E,
41
+ isFiltered: v = !1
40
42
  }) => {
41
- const M = B() ? q : J, I = (t) => {
43
+ const M = W() ? J : Q, w = (t) => {
42
44
  switch (t) {
43
- case r.ROW:
45
+ case s.ROW:
44
46
  return /* @__PURE__ */ e(n, { className: "sr-only", children: "Row" }, t);
45
- case r.TIMESTAMP:
47
+ case s.TIMESTAMP:
46
48
  return /* @__PURE__ */ e(
47
- R,
49
+ N,
48
50
  {
49
51
  focusMode: "system",
50
52
  buttonClassName: "text-xs sm:text-sm",
51
53
  cellId: p,
52
54
  align: "left",
53
- sortDirection: l.sortDirection,
54
- sortedCell: l.sortedCell,
55
+ sortDirection: o.sortDirection,
56
+ sortedCell: o.sortedCell,
55
57
  onClick: () => {
56
58
  C(p);
57
59
  },
@@ -59,20 +61,20 @@ const Z = {
59
61
  },
60
62
  t
61
63
  );
62
- case r.SUMMARY:
64
+ case s.SUMMARY:
63
65
  return /* @__PURE__ */ e(n, { className: "text-xs sm:text-sm", children: "Summary" }, t);
64
- case r.PROVIDER:
66
+ case s.PROVIDER:
65
67
  return /* @__PURE__ */ e(n, { className: "text-xs sm:text-sm", children: "Provider" }, t);
66
- case r.TOKEN_USAGE:
68
+ case s.TOKEN_USAGE:
67
69
  return /* @__PURE__ */ e(
68
- R,
70
+ N,
69
71
  {
70
72
  focusMode: "system",
71
73
  buttonClassName: "text-xs sm:text-sm",
72
74
  cellId: u,
73
75
  align: "right",
74
- sortDirection: l.sortDirection,
75
- sortedCell: l.sortedCell,
76
+ sortDirection: o.sortDirection,
77
+ sortedCell: o.sortedCell,
76
78
  onClick: () => {
77
79
  C(u);
78
80
  },
@@ -80,35 +82,35 @@ const Z = {
80
82
  },
81
83
  t
82
84
  );
83
- case r.ACTIONS:
85
+ case s.ACTIONS:
84
86
  return /* @__PURE__ */ e(n, { className: "text-xs sm:text-sm text-right", children: "Actions" }, t);
85
87
  default:
86
88
  return null;
87
89
  }
88
- }, E = (t, s, m) => {
90
+ }, k = (t, r, i) => {
89
91
  switch (t) {
90
- case r.ROW:
91
- return /* @__PURE__ */ e(n, { children: m + 1 }, t);
92
- case r.TIMESTAMP:
92
+ case s.ROW:
93
+ return /* @__PURE__ */ e(n, { children: i + 1 }, t);
94
+ case s.TIMESTAMP:
93
95
  return /* @__PURE__ */ e(
94
96
  n,
95
97
  {
96
98
  component: "th",
97
99
  scope: "row",
98
- className: c(
100
+ className: l(
99
101
  "dark:text-gray-400",
100
102
  "sm:whitespace-nowrap text-xs sm:text-sm max-w-20 sm:max-w-none"
101
103
  ),
102
- children: s.timestamp.split(",")[0]
104
+ children: r.timestamp.split(",")[0]
103
105
  },
104
106
  t
105
107
  );
106
- case r.SUMMARY: {
107
- const a = s.summary || (s.messages.length > 0 ? s.messages[0]?.content : "");
108
+ case s.SUMMARY: {
109
+ const a = r.summary || (r.messages.length > 0 ? r.messages[0]?.content : "");
108
110
  return /* @__PURE__ */ e(
109
111
  n,
110
112
  {
111
- className: c(
113
+ className: l(
112
114
  "dark:text-white",
113
115
  "max-w-[100px] sm:max-w-full text-xs sm:text-sm"
114
116
  ),
@@ -120,94 +122,94 @@ const Z = {
120
122
  t
121
123
  );
122
124
  }
123
- case r.PROVIDER: {
124
- const a = s.model ? P(s.model) : null, N = a ? Z[a] : null;
125
+ case s.PROVIDER: {
126
+ const a = r.model ? _(r.model) : null, f = a ? q[a] : null;
125
127
  return /* @__PURE__ */ e(
126
128
  n,
127
129
  {
128
130
  component: "th",
129
131
  scope: "row",
130
- className: c("dark:text-gray-400"),
132
+ className: l("dark:text-gray-400"),
131
133
  align: "center",
132
- children: N ? /* @__PURE__ */ e(
133
- N,
134
+ children: f ? /* @__PURE__ */ e(
135
+ f,
134
136
  {
135
137
  size: "size-4 sm:size-5",
136
138
  semantic: !0,
137
- title: s.model || a
139
+ title: r.model || a
138
140
  }
139
141
  ) : null
140
142
  },
141
143
  t
142
144
  );
143
145
  }
144
- case r.TOKEN_USAGE:
146
+ case s.TOKEN_USAGE:
145
147
  return /* @__PURE__ */ e(
146
148
  n,
147
149
  {
148
- className: c("dark:text-gray-400", "text-xs sm:text-sm"),
150
+ className: l("dark:text-gray-400", "text-xs sm:text-sm"),
149
151
  align: "right",
150
- children: s.tokenUsage ? z.format(s.tokenUsage) : "0"
152
+ children: r.tokenUsage ? L.format(r.tokenUsage) : "0"
151
153
  },
152
154
  t
153
155
  );
154
- case r.ACTIONS:
155
- return /* @__PURE__ */ e(n, { children: /* @__PURE__ */ d("div", { className: "flex flex-col items-end sm:flex-row gap-2", children: [
156
+ case s.ACTIONS:
157
+ return /* @__PURE__ */ e(n, { children: /* @__PURE__ */ m("div", { className: "flex flex-col items-end sm:flex-row gap-2", children: [
156
158
  /* @__PURE__ */ e(
157
- x,
159
+ h,
158
160
  {
159
161
  label: "Restore chat",
160
162
  placement: "top",
161
163
  trigger: /* @__PURE__ */ e(
162
- h,
164
+ d,
163
165
  {
164
166
  noBorder: !0,
165
167
  label: "Restore chat",
166
168
  variant: "primary",
167
169
  iconClassName: "text-green-800 dark:text-green-500",
168
170
  onClick: async () => {
169
- await S(s);
171
+ await R(r);
170
172
  },
171
- children: /* @__PURE__ */ e(b, { size: "size-3", monotone: !0 })
173
+ children: /* @__PURE__ */ e(y, { size: "size-3", monotone: !0 })
172
174
  }
173
175
  )
174
176
  }
175
177
  ),
176
178
  /* @__PURE__ */ e(
177
- x,
179
+ h,
178
180
  {
179
- label: s.favoriteChat ? "Remove from favorites" : "Add to favorites",
181
+ label: r.favoriteChat ? "Remove from favorites" : "Add to favorites",
180
182
  placement: "top",
181
183
  trigger: /* @__PURE__ */ e(
182
- h,
184
+ d,
183
185
  {
184
186
  noBorder: !0,
185
- label: s.favoriteChat ? "Remove from favorites" : "Add to favorites",
187
+ label: r.favoriteChat ? "Remove from favorites" : "Add to favorites",
186
188
  variant: "primary",
187
189
  onClick: async () => {
188
- await T(s);
190
+ await O(r);
189
191
  },
190
- children: s.favoriteChat ? /* @__PURE__ */ e(D, { size: "size-4", monotone: !0 }) : /* @__PURE__ */ e(y, { size: "size-4", monotone: !0 })
192
+ children: r.favoriteChat ? /* @__PURE__ */ e(U, { size: "size-4", monotone: !0 }) : /* @__PURE__ */ e(z, { size: "size-4", monotone: !0 })
191
193
  }
192
194
  )
193
195
  }
194
196
  ),
195
197
  /* @__PURE__ */ e(
196
- x,
198
+ h,
197
199
  {
198
200
  label: "Delete chat",
199
201
  placement: "top",
200
202
  trigger: /* @__PURE__ */ e(
201
- h,
203
+ d,
202
204
  {
203
205
  noBorder: !0,
204
206
  label: "Delete chat",
205
207
  variant: "primary",
206
208
  iconClassName: "text-red-700 dark:text-red-500",
207
209
  onClick: () => {
208
- O(s);
210
+ S(r);
209
211
  },
210
- children: /* @__PURE__ */ e(U, { size: "size-3", monotone: !0 })
212
+ children: /* @__PURE__ */ e(P, { size: "size-3", monotone: !0 })
211
213
  }
212
214
  )
213
215
  }
@@ -217,20 +219,19 @@ const Z = {
217
219
  return null;
218
220
  }
219
221
  };
220
- return /* @__PURE__ */ d(H, { stickyHeader: !0, stickyFooter: !0, compact: !0, mode: "alt-system", children: [
221
- /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(i, { children: M.map((t) => I(t)) }) }),
222
- /* @__PURE__ */ e($, { children: A && o.length === 0 ? /* @__PURE__ */ e(i, { children: /* @__PURE__ */ e(n, { colSpan: 1e3, children: /* @__PURE__ */ e("div", { children: "Loading..." }) }) }) : o.slice(0, g).map((t, s) => t?.messages?.length > 0 ? /* @__PURE__ */ d(K, { children: [
223
- s === g - v && /* @__PURE__ */ e("tr", { ref: f }),
224
- /* @__PURE__ */ e(i, { children: M.map(
225
- (m) => E(m, t, s)
222
+ return /* @__PURE__ */ m(V, { stickyHeader: !0, compact: !0, mode: "alt-system", caption: (() => {
223
+ const t = c.length, r = E ?? t;
224
+ return v && r > t ? `Showing ${T(`${t} chat`, t)} out of ${r}` : T(`${t} chat`, t);
225
+ })(), children: [
226
+ /* @__PURE__ */ e(j, { children: /* @__PURE__ */ e(x, { children: M.map((t) => w(t)) }) }),
227
+ /* @__PURE__ */ e(Z, { children: I && c.length === 0 ? /* @__PURE__ */ e(x, { children: /* @__PURE__ */ e(n, { colSpan: 1e3, children: /* @__PURE__ */ e("div", { children: "Loading..." }) }) }) : c.slice(0, g).map((t, r) => t?.messages?.length > 0 ? /* @__PURE__ */ m(F, { children: [
228
+ r === g - b && /* @__PURE__ */ e("tr", { ref: A }),
229
+ /* @__PURE__ */ e(x, { children: M.map(
230
+ (i) => k(i, t, r)
226
231
  ) })
227
- ] }, `${k.HISTORY.TITLE}-${t.id}-${s}`) : null) }),
228
- /* @__PURE__ */ e(j, { children: /* @__PURE__ */ e(i, { children: /* @__PURE__ */ e(n, { colSpan: 1e3, children: /* @__PURE__ */ e("div", { children: w(
229
- `${o.length} chat`,
230
- o.length
231
- ) }) }) }) })
232
+ ] }, `${D.HISTORY.TITLE}-${t.id}-${r}`) : null) })
232
233
  ] });
233
234
  };
234
235
  export {
235
- ae as ChatHistoryTable
236
+ le as ChatHistoryTable
236
237
  };