@versini/sassysaint 8.83.1 → 8.85.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.mWn6DHnN.js → AboutChangelog.Cmviu4q-.js} +3 -3
  2. package/dist/chunks/{AboutEntry.CF0h629q.js → AboutEntry.Hi0jo6Cb.js} +5 -5
  3. package/dist/chunks/{App.ByR7hh4G.js → App.B6stoZHi.js} +823 -820
  4. package/dist/chunks/{Chart.BOrnLtUH.js → Chart.-Zf5n2lJ.js} +2 -2
  5. package/dist/chunks/{ChatBubbleAssistant.BbKm4kCr.js → ChatBubbleAssistant.CJ9ZlMsQ.js} +10 -10
  6. package/dist/chunks/{ChatBubbleUser.CSd4FUFb.js → ChatBubbleUser.DrAvgLQQ.js} +3 -3
  7. package/dist/chunks/{ChatHistoryTable.OhJzHZwR.js → ChatHistoryTable.lIRb_XTS.js} +12 -12
  8. package/dist/chunks/{HistoryEntry.DuHoMXgy.js → HistoryEntry.BkHfgtzh.js} +137 -106
  9. package/dist/chunks/ProfileEntry.BuGuaJZ7.js +200 -0
  10. package/dist/chunks/{SettingsEntry.W5dfrzDj.js → SettingsEntry.C5p3uHQS.js} +21 -21
  11. package/dist/chunks/{UsageEntry.BlC_GEWV.js → UsageEntry.BR0TAHBi.js} +7 -7
  12. package/dist/chunks/{UserMemoriesPanel.pk5CBYkd.js → UserMemoriesPanel.I6TEjRS_.js} +12 -10
  13. package/dist/chunks/{index.xYO9MQ7q.js → index.-hZzCrDt.js} +1 -1
  14. package/dist/chunks/{index.X83cFhfe.js → index.CMqrKzc1.js} +1 -1
  15. package/dist/chunks/{index.Dm0B1x9v.js → index.DrgEENCo.js} +1 -1
  16. package/dist/chunks/{index.DosDfPyo.js → index.DuJhOApx.js} +1 -1
  17. package/dist/chunks/{index.DvwicTLq.js → index.Hwof3Goa.js} +1217 -1271
  18. package/dist/chunks/{index.eSkzK0sZ.js → index.ZEvOt3IK.js} +2 -2
  19. package/dist/chunks/{index.LWfh_Nx0.js → index.f-Tyvnqq.js} +1 -1
  20. package/dist/chunks/{index.C4Kp9caJ.js → index.mKL_Oq89.js} +1 -1
  21. package/dist/chunks/{index.Dq1H4UoP.js → index.oca08k9S.js} +3 -3
  22. package/dist/chunks/{useMarkdown.Bxe6gfSy.js → useMarkdown.DSduoaoO.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/ProfileEntry.CTvtlf06.js +0 -181
@@ -1,7 +1,7 @@
1
1
  import { jsx as Ap } from "react/jsx-runtime";
2
- import { getDefaultExportFromCjs as ln } from "./App.ByR7hh4G.js";
2
+ import { getDefaultExportFromCjs as ln } from "./App.B6stoZHi.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.DvwicTLq.js";
4
+ import { TRIMESTERS as rn, TRIMESTERS_SHORT as Lp, isProbablyMobile as Ep } from "./index.Hwof3Goa.js";
5
5
  var ls = { exports: {} }, Ip = ls.exports, on;
6
6
  function Dp() {
7
7
  return on || (on = 1, (function(we, he) {
@@ -1,14 +1,14 @@
1
1
  import { jsx as x } from "react/jsx-runtime";
2
- import { ChatContext as P, AppContext as R, n as y, useUserPreferences as L, convertCamelCaseToReadable as _, numberFormatter as v, pluralize as B, Q as G } from "./index.DvwicTLq.js";
3
- import { BUBBLE_FOOTER_EMPTY as D } from "./index.C4Kp9caJ.js";
2
+ import { ChatContext as P, AppContext as R, n as y, useUserPreferences as L, convertCamelCaseToReadable as _, numberFormatter as v, pluralize as B, O as G } from "./index.Hwof3Goa.js";
3
+ import { BUBBLE_FOOTER_EMPTY as D } from "./index.mKL_Oq89.js";
4
4
  import U from "clsx";
5
- import j, { useState as M, useRef as E, useEffect as F, useContext as S } from "react";
6
- import { AsyncBubble as k } from "./App.ByR7hh4G.js";
7
- import { useMarkdown as q } from "./useMarkdown.Bxe6gfSy.js";
5
+ import j, { useState as M, useRef as E, useEffect as O, useContext as S } from "react";
6
+ import { AsyncBubble as k } from "./App.B6stoZHi.js";
7
+ import { useMarkdown as q } from "./useMarkdown.DSduoaoO.js";
8
8
  const I = 2, W = I * 1e3, b = "", V = (e) => e * (2 - e);
9
9
  function Y(e, n = !0) {
10
10
  const [a, d] = M(0), [i, p] = M(0), [t, C] = M(e), r = E(0), s = E(0);
11
- return t !== e && (C(e), p(e.startsWith(t) ? a : 0)), F(() => {
11
+ return t !== e && (C(e), p(e.startsWith(t) ? a : 0)), O(() => {
12
12
  if (!n)
13
13
  return;
14
14
  const g = e.split(b).length, c = (o) => {
@@ -38,17 +38,17 @@ const f = {
38
38
  state: { streaming: C, restoredModel: r, tokenUsage: s }
39
39
  } = S(P), {
40
40
  state: { fullScreen: g }
41
- } = S(R), c = n?.model || r, o = s, [u, l] = q(), { user: h, getAccessToken: T } = y(), { data: N } = L({
41
+ } = S(R), c = n?.model || r, o = s, [u, l] = q(), { user: h, getAccessToken: T } = y(), { data: F } = L({
42
42
  user: h?.username,
43
43
  getAccessToken: T
44
- }), O = N?.showDetails || !1, A = U("prose-li:ps-3", {
44
+ }), N = F?.showDetails || !1, A = U("prose-li:ps-3", {
45
45
  "max-w-xs sm:max-w-3xl": !g
46
46
  });
47
47
  let m;
48
- return O && (m = {
48
+ return N && (m = {
49
49
  [f.MODEL]: c || null,
50
50
  [f.PLUGIN]: a ? _(a) : null
51
- }, o && (p ? m[f.USAGE] = `${v.format(o)} ${B("token", o)}` : m[f.USAGE] = D)), F(() => {
51
+ }, o && (p ? m[f.USAGE] = `${v.format(o)} ${B("token", o)}` : m[f.USAGE] = D)), O(() => {
52
52
  t && l(t);
53
53
  }, [t, l]), d === G ? /* @__PURE__ */ x(
54
54
  k,
@@ -1,8 +1,8 @@
1
1
  import { jsx as a, Fragment as h, jsxs as S } from "react/jsx-runtime";
2
- import { Button as C } from "./index.DvwicTLq.js";
2
+ import { Button as C } from "./index.Hwof3Goa.js";
3
3
  import { useState as _, useMemo as m, isValidElement as T, useEffect as b } from "react";
4
- import { AsyncBubble as w } from "./App.ByR7hh4G.js";
5
- import { useMarkdown as x } from "./useMarkdown.Bxe6gfSy.js";
4
+ import { AsyncBubble as w } from "./App.B6stoZHi.js";
5
+ import { useMarkdown as x } from "./useMarkdown.DSduoaoO.js";
6
6
  /*!
7
7
  @versini/ui-truncate v5.2.0
8
8
  © 2025 gizmette.com
@@ -1,7 +1,7 @@
1
1
  import { jsxs as c, jsx as e } from "react/jsx-runtime";
2
- import { f as x, h as u, INFINITE_SCROLL_THRESHOLD as v, CARDS as I, pluralize as f, ButtonIcon as i, IconRestore as U, IconStarInCircle as y, IconStarInCircleLight as D, IconDelete as z, numberFormatter as L, isProbablyMobile as _ } from "./index.DvwicTLq.js";
3
- import { W as P, j as $, G as m, H as B, M as a, F as M } from "./index.xYO9MQ7q.js";
4
- import { Tooltip as d } from "./App.ByR7hh4G.js";
2
+ import { B as x, k as u, INFINITE_SCROLL_THRESHOLD as v, CARDS as I, pluralize as M, ButtonIcon as i, IconRestore as U, IconStarInCircle as y, IconStarInCircleLight as D, IconDelete as z, numberFormatter as L, isProbablyMobile as _ } from "./index.Hwof3Goa.js";
3
+ import { W as B, j as P, G as m, H as $, M as a, F as f } from "./index.-hZzCrDt.js";
4
+ import { Tooltip as d } from "./App.B6stoZHi.js";
5
5
  import h from "clsx";
6
6
  import { Fragment as W } from "react";
7
7
  const s = {
@@ -34,13 +34,13 @@ const s = {
34
34
  totalHistoryCount: b,
35
35
  isFiltered: R = !1
36
36
  }) => {
37
- const C = _() ? Y : G, w = (t) => {
37
+ const C = _() ? Y : G, k = (t) => {
38
38
  switch (t) {
39
39
  case s.ROW:
40
40
  return /* @__PURE__ */ e(a, { className: "sr-only", children: "Row" }, t);
41
41
  case s.TIMESTAMP:
42
42
  return /* @__PURE__ */ e(
43
- M,
43
+ f,
44
44
  {
45
45
  focusMode: "system",
46
46
  buttonClassName: "text-xs sm:text-sm",
@@ -59,7 +59,7 @@ const s = {
59
59
  return /* @__PURE__ */ e(a, { className: "text-xs sm:text-sm", children: "Summary" }, t);
60
60
  case s.TOKEN_USAGE:
61
61
  return /* @__PURE__ */ e(
62
- M,
62
+ f,
63
63
  {
64
64
  focusMode: "system",
65
65
  buttonClassName: "text-xs sm:text-sm",
@@ -79,7 +79,7 @@ const s = {
79
79
  default:
80
80
  return null;
81
81
  }
82
- }, k = (t, r, l) => {
82
+ }, w = (t, r, l) => {
83
83
  switch (t) {
84
84
  case s.ROW:
85
85
  return /* @__PURE__ */ e(a, { children: l + 1 }, t);
@@ -197,15 +197,15 @@ const s = {
197
197
  return null;
198
198
  }
199
199
  };
200
- return /* @__PURE__ */ c(P, { stickyHeader: !0, compact: !0, mode: "alt-system", caption: (() => {
200
+ return /* @__PURE__ */ c(B, { stickyHeader: !0, compact: !0, mode: "alt-system", caption: (() => {
201
201
  const t = n.length, r = b ?? t;
202
- return R && r > t ? `Showing ${f(`${t} chat`, t)} out of ${r}` : f(`${t} chat`, t);
202
+ return R && r > t ? `Showing ${M(`${t} chat`, t)} out of ${r}` : M(`${t} chat`, t);
203
203
  })(), children: [
204
- /* @__PURE__ */ e($, { children: /* @__PURE__ */ e(m, { children: C.map((t) => w(t)) }) }),
205
- /* @__PURE__ */ e(B, { children: O && n.length === 0 ? /* @__PURE__ */ e(m, { children: /* @__PURE__ */ e(a, { colSpan: 1e3, children: /* @__PURE__ */ e("div", { children: "Loading..." }) }) }) : n.slice(0, p).map((t, r) => t?.messages?.length > 0 ? /* @__PURE__ */ c(W, { children: [
204
+ /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(m, { children: C.map((t) => k(t)) }) }),
205
+ /* @__PURE__ */ e($, { children: O && n.length === 0 ? /* @__PURE__ */ e(m, { children: /* @__PURE__ */ e(a, { colSpan: 1e3, children: /* @__PURE__ */ e("div", { children: "Loading..." }) }) }) : n.slice(0, p).map((t, r) => t?.messages?.length > 0 ? /* @__PURE__ */ c(W, { children: [
206
206
  r === p - v && /* @__PURE__ */ e("tr", { ref: A }),
207
207
  /* @__PURE__ */ e(m, { children: C.map(
208
- (l) => k(l, t, r)
208
+ (l) => w(l, t, r)
209
209
  ) })
210
210
  ] }, `${I.HISTORY.TITLE}-${t.id}-${r}`) : null) })
211
211
  ] });
@@ -1,62 +1,63 @@
1
- import { jsxs as c, Fragment as $, jsx as t } from "react/jsx-runtime";
2
- import { n as P, INFINITE_SCROLL_LIMIT as G, INFINITE_SCROLL_THRESHOLD as ee, HistoryContext as V, ChatContext as te, useLocalStorage as f, LOCAL_STORAGE_PREFIX as y, LOCAL_STORAGE_SORT_TIMESTAMP as ae, e as h, LOCAL_STORAGE_SORT_TOKEN_USAGE as re, LOCAL_STORAGE_SORT as se, f as v, useDeleteChat as oe, useToggleFavoriteChat as ne, APP_CLASSNAME as ie, TOAST_CHAT_DELETED as ce, graphQLRequest as le, SERVICE_TYPES as de, ACTION_SORT as he, h as me, useChatsHistory as ue, useUserChatStats as Ce, LOCAL_STORAGE_SEARCH as Se, LOCAL_STORAGE_FAVORITES_ONLY as fe, HISTORY_TITLE as ye, Card as pe, TextInput as Te, debounce as ge, IconSearch as Ae, Button as Ee, ACTION_SEARCH as De } from "./index.DvwicTLq.js";
3
- import { useAiChat as _e, ConfirmationPanel as Oe, LazyToastContainerWrapper as Le, showErrorToast as ve, CHAT_SET_STATUS as ke, Panel as Re, Toggle as Ie } from "./App.ByR7hh4G.js";
4
- import { useRef as N, useState as H, useContext as w, useCallback as M, Suspense as be, lazy as xe, useEffect as Ne } from "react";
5
- const He = xe(
1
+ import { jsxs as c, Fragment as ee, jsx as t } from "react/jsx-runtime";
2
+ import { n as V, INFINITE_SCROLL_LIMIT as G, INFINITE_SCROLL_THRESHOLD as te, HistoryContext as U, ChatContext as re, useLocalStorage as y, LOCAL_STORAGE_PREFIX as p, LOCAL_STORAGE_SORT_TIMESTAMP as ae, e$1 as h, LOCAL_STORAGE_SORT_TOKEN_USAGE as se, LOCAL_STORAGE_SORT as oe, B as v, useDeleteChat as ne, useToggleFavoriteChat as ie, APP_CLASSNAME as ce, TOAST_CHAT_DELETED as le, graphQLRequest as de, SERVICE_TYPES as he, ACTION_SORT as me, k as ue, useChatsHistory as Ce, useUserChatStats as Se, LOCAL_STORAGE_SEARCH as fe, LOCAL_STORAGE_FAVORITES_ONLY as ye, HISTORY_TITLE as pe, Card as ge, TextInput as Te, debounce as Ae, IconSearch as Ee, Button as M, L as De, j$1 as _e, ACTION_SEARCH as ke } from "./index.Hwof3Goa.js";
3
+ import { useAiChat as Le, ConfirmationPanel as ve, LazyToastContainerWrapper as Oe, showErrorToast as be, CHAT_SET_STATUS as Re, Panel as Ie, Toggle as xe } from "./App.B6stoZHi.js";
4
+ import Ne from "clsx";
5
+ import { useRef as N, useState as H, useContext as w, useCallback as P, Suspense as He, lazy as we, useEffect as Fe } from "react";
6
+ const ze = we(
6
7
  () => import(
7
8
  /* webpackChunkName: "history-table" */
8
- "./ChatHistoryTable.OhJzHZwR.js"
9
+ "./ChatHistoryTable.lIRb_XTS.js"
9
10
  ).then((m) => ({ default: m.ChatHistoryTable }))
10
- ), we = ({
11
+ ), Ge = ({
11
12
  filteredHistory: m,
12
- onOpenChange: p,
13
- mutate: C,
14
- isLoading: T = !1,
15
- totalHistoryCount: k,
16
- isFiltered: g = !1
13
+ onOpenChange: C,
14
+ mutate: S,
15
+ isLoading: g = !1,
16
+ totalHistoryCount: O,
17
+ isFiltered: T = !1
17
18
  }) => {
18
- const { user: l, getAccessToken: s } = P(), S = N(null), n = N({
19
+ const { user: l, getAccessToken: s } = V(), f = N(null), n = N({
19
20
  id: "",
20
21
  timestamp: "",
21
22
  message: ""
22
23
  }), [A, E] = H(!1), [D, d] = H(
23
- G + ee
24
- ), { state: i, dispatch: R } = w(V), u = {
24
+ G + te
25
+ ), { state: i, dispatch: b } = w(U), u = {
25
26
  searchString: i.searchString || "",
26
27
  sortDirection: i.sortDirection || h.DESC,
27
28
  sortedCell: i.sortedCell || v
28
29
  }, {
29
- setChatId: I,
30
+ setChatId: R,
30
31
  setInitialMessages: _,
31
- dispatch: b
32
- } = w(te), { setInput: x } = _e(), [O, a] = f({
33
- key: y + ae,
32
+ dispatch: I
33
+ } = w(re), { setInput: x } = Le(), [k, r] = y({
34
+ key: p + ae,
34
35
  initialValue: h.DESC
35
- }), [U, B] = f({
36
- key: y + re,
36
+ }), [B, j] = y({
37
+ key: p + se,
37
38
  initialValue: h.ASC
38
- }), [, j] = f({
39
- key: y + se,
39
+ }), [, Y] = y({
40
+ key: p + oe,
40
41
  initialValue: v
41
- }), { mutateAsync: Y } = oe({ getAccessToken: s }), { mutateAsync: q } = ne({
42
+ }), { mutateAsync: $ } = ne({ getAccessToken: s }), { mutateAsync: q } = ie({
42
43
  getAccessToken: s
43
44
  }), K = (e) => {
44
45
  const o = i.sortedCell === e;
45
- let r, L;
46
+ let a, L;
46
47
  switch (e) {
47
48
  case v:
48
- L = a, r = o ? i.sortDirection : O;
49
+ L = r, a = o ? i.sortDirection : k;
49
50
  break;
50
- case me:
51
- L = B, r = o ? i.sortDirection : U;
51
+ case ue:
52
+ L = j, a = o ? i.sortDirection : B;
52
53
  break;
53
54
  default:
54
- L = a, r = o ? i.sortDirection : O;
55
+ L = r, a = o ? i.sortDirection : k;
55
56
  break;
56
57
  }
57
- const z = r === h.ASC ? h.DESC : h.ASC;
58
- L(z), j(e), R({
59
- type: he,
58
+ const z = a === h.ASC ? h.DESC : h.ASC;
59
+ L(z), Y(e), b({
60
+ type: me,
60
61
  payload: {
61
62
  sortedCell: e,
62
63
  sortDirection: z
@@ -65,10 +66,10 @@ const He = xe(
65
66
  }, Q = async () => {
66
67
  const e = n.current;
67
68
  try {
68
- await Y({
69
+ await $({
69
70
  userId: l?.username || "",
70
71
  id: e.id
71
- }), C(""), await ve(ce, {
72
+ }), S(""), await be(le, {
72
73
  autoClose: 2e3,
73
74
  containerId: "history-table"
74
75
  });
@@ -76,23 +77,23 @@ const He = xe(
76
77
  }
77
78
  }, W = async (e) => {
78
79
  try {
79
- const o = await s(), r = await le({
80
+ const o = await s(), a = await de({
80
81
  accessToken: o,
81
- type: de.GET_CHAT,
82
+ type: he.GET_CHAT,
82
83
  params: {
83
84
  id: e.id
84
85
  }
85
86
  });
86
- b({
87
- type: ke,
87
+ I({
88
+ type: Re,
88
89
  payload: {
89
90
  streaming: !1,
90
91
  loading: !1,
91
92
  restoring: !0,
92
- restoredModel: r.data?.model || "",
93
- restoredUsage: r.data?.tokenUsage || 0
93
+ restoredModel: a.data?.model || "",
94
+ restoredUsage: a.data?.tokenUsage || 0
94
95
  }
95
- }), x(""), I(e.id), _(r.data.messages), p(!1);
96
+ }), x(""), R(e.id), _(a.data.messages), C(!1);
96
97
  } catch {
97
98
  }
98
99
  }, X = (e) => {
@@ -106,25 +107,25 @@ const He = xe(
106
107
  await q({
107
108
  userId: l?.username || "",
108
109
  id: e.id
109
- }), C("");
110
+ }), S("");
110
111
  } catch {
111
112
  }
112
- }, F = M((e) => {
113
- e[0].isIntersecting && d((r) => r + G);
114
- }, []), Z = M(
113
+ }, F = P((e) => {
114
+ e[0].isIntersecting && d((a) => a + G);
115
+ }, []), Z = P(
115
116
  (e) => {
116
- if (S.current && S.current.disconnect(), e) {
117
+ if (f.current && f.current.disconnect(), e) {
117
118
  const o = {
118
119
  rootMargin: "20px"
119
- }, r = new IntersectionObserver(F, o);
120
- r.observe(e), S.current = r;
120
+ }, a = new IntersectionObserver(F, o);
121
+ a.observe(e), f.current = a;
121
122
  }
122
123
  },
123
124
  [F]
124
125
  );
125
- return /* @__PURE__ */ c($, { children: [
126
+ return /* @__PURE__ */ c(ee, { children: [
126
127
  /* @__PURE__ */ c(
127
- Oe,
128
+ ve,
128
129
  {
129
130
  showConfirmation: A,
130
131
  setShowConfirmation: E,
@@ -151,9 +152,9 @@ const He = xe(
151
152
  ]
152
153
  }
153
154
  ),
154
- /* @__PURE__ */ t("div", { className: ie, children: /* @__PURE__ */ t(Le, { containerId: "history-table" }) }),
155
- /* @__PURE__ */ t(be, { fallback: /* @__PURE__ */ t("div", {}), children: /* @__PURE__ */ t(
156
- He,
155
+ /* @__PURE__ */ t("div", { className: ce, children: /* @__PURE__ */ t(Oe, { containerId: "history-table" }) }),
156
+ /* @__PURE__ */ t(He, { fallback: /* @__PURE__ */ t("div", {}), children: /* @__PURE__ */ t(
157
+ ze,
157
158
  {
158
159
  filteredHistory: m,
159
160
  historyState: u,
@@ -163,66 +164,85 @@ const He = xe(
163
164
  onClickDelete: X,
164
165
  onClickFavorite: J,
165
166
  infinityScrollMarkerRef: Z,
166
- isLoading: T,
167
- totalHistoryCount: k,
168
- isFiltered: g
167
+ isLoading: g,
168
+ totalHistoryCount: O,
169
+ isFiltered: T
169
170
  }
170
171
  ) })
171
172
  ] });
172
- }, Pe = ({
173
+ }, je = ({
173
174
  open: m,
174
- onOpenChange: p
175
+ onOpenChange: C
175
176
  }) => {
176
- const { getAccessToken: C, user: T } = P(), [k, g] = H([]), l = N(null), { state: s, dispatch: S } = w(V), {
177
+ const { getAccessToken: S, user: g } = V(), [O, T] = H([]), l = N(null), { state: s, dispatch: f } = w(U), {
177
178
  data: n,
178
179
  refetch: A,
179
180
  isLoading: E,
180
181
  isError: D
181
- } = ue({
182
+ } = Ce({
182
183
  enabled: m,
183
- user: T?.username || "",
184
+ user: g?.username || "",
184
185
  searchString: s.searchString || "",
185
186
  sortDirection: s.sortDirection || h.DESC,
186
187
  sortedCell: s.sortedCell || v,
187
- getAccessToken: C
188
- }), { data: d } = Ce({
189
- user: T?.username,
190
- getAccessToken: C
191
- }), i = d && d.totalChats ? d.totalChats - d.privateChats - d.deletedChats : 0, [, R] = f({
192
- key: y + Se,
188
+ getAccessToken: S
189
+ }), { data: d } = Se({
190
+ user: g?.username,
191
+ getAccessToken: S
192
+ }), i = d && d.totalChats ? d.totalChats - d.privateChats - d.deletedChats : 0, [, b] = y({
193
+ key: p + fe,
193
194
  initialValue: s.searchString
194
- }), [u, I] = f({
195
- key: y + fe,
195
+ }), [u, R] = y({
196
+ key: p + ye,
196
197
  initialValue: !1
197
198
  });
198
- Ne(() => {
199
- n && g(
200
- u ? n.filter((a) => a.favoriteChat === !0) : n
199
+ Fe(() => {
200
+ n && T(
201
+ u ? n.filter((r) => r.favoriteChat === !0) : n
201
202
  );
202
203
  }, [n, u]);
203
- const _ = async (a) => {
204
- R(a), S({
205
- type: De,
206
- payload: { searchString: a }
204
+ const _ = async (r) => {
205
+ b(r), f({
206
+ type: ke,
207
+ payload: { searchString: r }
207
208
  });
208
- }, b = ge((a) => {
209
- _(a.target.value.trim());
210
- }, 500), x = async (a) => {
211
- a.preventDefault();
212
- }, O = (a) => {
213
- I(a);
209
+ }, I = Ae((r) => {
210
+ _(r.target.value.trim());
211
+ }, 500), x = async (r) => {
212
+ r.preventDefault();
213
+ }, k = (r) => {
214
+ R(r);
214
215
  };
215
216
  return /* @__PURE__ */ c(
216
- Re,
217
+ Ie,
217
218
  {
218
219
  open: m,
219
- onOpenChange: p,
220
- title: ye,
220
+ onOpenChange: C,
221
+ title: pe,
221
222
  animation: !0,
222
223
  animationType: "fade",
224
+ footer: /* @__PURE__ */ t(
225
+ De,
226
+ {
227
+ columnGap: 2,
228
+ alignHorizontal: "flex-end",
229
+ className: "pb-8 sm:pb-0",
230
+ children: /* @__PURE__ */ t(_e, { children: /* @__PURE__ */ t(
231
+ M,
232
+ {
233
+ mode: "dark",
234
+ variant: "secondary",
235
+ focusMode: "light",
236
+ noBorder: !0,
237
+ onClick: () => C(!1),
238
+ children: "Dismiss"
239
+ }
240
+ ) })
241
+ }
242
+ ),
223
243
  children: [
224
244
  /* @__PURE__ */ t(
225
- pe,
245
+ ge,
226
246
  {
227
247
  header: s.searchString ? "Filters applied" : "Filters",
228
248
  className: "prose-dark dark:prose-lighter mb-4",
@@ -243,25 +263,25 @@ const He = xe(
243
263
  mode: "alt-system",
244
264
  name: "Search",
245
265
  label: "Search",
246
- onChange: b,
266
+ onChange: I,
247
267
  className: "my-2",
248
- rightElement: /* @__PURE__ */ t("div", { className: "dark:text-copy-dark text-copy-light", children: /* @__PURE__ */ t(Ae, { monotone: !0, size: "size-3" }) })
268
+ rightElement: /* @__PURE__ */ t("div", { className: "dark:text-copy-dark text-copy-light", children: /* @__PURE__ */ t(Ee, { monotone: !0, size: "size-3" }) })
249
269
  }
250
270
  ),
251
271
  /* @__PURE__ */ c("div", { className: "flex flex-col justify-between sm:flex-row gap-2 sm:mb-0 mb-1", children: [
252
272
  /* @__PURE__ */ t("div", { className: "order-1 sm:order-0", children: /* @__PURE__ */ t(
253
- Ie,
273
+ xe,
254
274
  {
255
275
  name: "favorites-only",
256
276
  checked: u,
257
- onChange: O,
277
+ onChange: k,
258
278
  label: "Show favorites only",
259
279
  narrow: !0,
260
280
  noBorder: !0
261
281
  }
262
282
  ) }),
263
283
  /* @__PURE__ */ t(
264
- Ee,
284
+ M,
265
285
  {
266
286
  size: "small",
267
287
  disabled: s.searchString === "",
@@ -275,24 +295,35 @@ const He = xe(
275
295
  ] })
276
296
  }
277
297
  ),
278
- /* @__PURE__ */ c("div", { className: "flex flex-col sm:flex-row max-h-[65vh] sm:max-h-[75vh] min-h-[60vh]", children: [
279
- D && /* @__PURE__ */ t("p", { className: "m-0 text-red-500", children: "Failed to load history." }),
280
- !D && /* @__PURE__ */ t(
281
- we,
282
- {
283
- mutate: A,
284
- filteredHistory: k,
285
- onOpenChange: p,
286
- isLoading: E,
287
- totalHistoryCount: i,
288
- isFiltered: !!(s.searchString || u)
289
- }
290
- )
291
- ] })
298
+ /* @__PURE__ */ c(
299
+ "div",
300
+ {
301
+ className: Ne(
302
+ "flex flex-col sm:flex-row",
303
+ "max-h-[65vh]",
304
+ "sm:max-h-[75vh]",
305
+ "min-h-[60vh]"
306
+ ),
307
+ children: [
308
+ D && /* @__PURE__ */ t("p", { className: "m-0 text-red-500", children: "Failed to load history." }),
309
+ !D && /* @__PURE__ */ t(
310
+ Ge,
311
+ {
312
+ mutate: A,
313
+ filteredHistory: O,
314
+ onOpenChange: C,
315
+ isLoading: E,
316
+ totalHistoryCount: i,
317
+ isFiltered: !!(s.searchString || u)
318
+ }
319
+ )
320
+ ]
321
+ }
322
+ )
292
323
  ]
293
324
  }
294
325
  );
295
326
  };
296
327
  export {
297
- Pe as HistoryPanel
328
+ je as HistoryPanel
298
329
  };