@versini/sassysaint 8.115.1 → 8.117.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 (83) hide show
  1. package/dist/chunks/{AboutChangelog.h8uZDiRa.js → AboutChangelog.Bn_KfUZc.js} +2 -2
  2. package/dist/chunks/{AboutEntry.Dm-VAlos.js → AboutEntry.GETrm77g.js} +7 -7
  3. package/dist/chunks/{App.kZ7zFOCZ.js → App.BzCbkgv8.js} +2478 -2344
  4. package/dist/chunks/BubbleActions.CbQ9BHWl.js +174 -0
  5. package/dist/chunks/{ButtonIconDelete.CMTWH4G_.js → ButtonIconDelete.B5IpSZrD.js} +112 -100
  6. package/dist/chunks/{Chart.DjDJmuv4.js → Chart.Czhhtzdx.js} +2 -2
  7. package/dist/chunks/{ChatBubbleAssistant.Ct1kuBfY.js → ChatBubbleAssistant.DESMaXGq.js} +682 -663
  8. package/dist/chunks/{ChatBubbleUser.DWjAo_57.js → ChatBubbleUser.B_Sniupu.js} +39 -33
  9. package/dist/chunks/{ChatHistoryTable.CPGJDP3u.js → ChatHistoryTable.LPF05gFQ.js} +136 -110
  10. package/dist/chunks/{HistoryEntry.vorKgBkE.js → HistoryEntry.CbyRX9rD.js} +148 -138
  11. package/dist/chunks/{LoginEntry.DMTx7dAX.js → LoginEntry.Bf8vuUIL.js} +4 -4
  12. package/dist/chunks/{LogoEntry.QCG_Oqpu.js → LogoEntry.yn5_B-fa.js} +193 -176
  13. package/dist/chunks/{MemoriesEntry.NKPDzd6E.js → MemoriesEntry.Bljvi6W9.js} +5 -5
  14. package/dist/chunks/{ProfileEntry.D4nsWyk-.js → ProfileEntry.DitROf-m.js} +4 -4
  15. package/dist/chunks/SettingsEntry.DUMuo462.js +446 -0
  16. package/dist/chunks/{UsageEntry.3E-1gpeB.js → UsageEntry.CFMWYodz.js} +5 -5
  17. package/dist/chunks/{_baseUniq.C9w-5slz.js → _baseUniq.D6y3dh-S.js} +1 -1
  18. package/dist/chunks/{arc.Bhkeu8Ne.js → arc.CitIvzp8.js} +1 -1
  19. package/dist/chunks/{architecture-U656AL7Q.BQ0dLOXF.js → architecture-U656AL7Q.IEP3vDFZ.js} +1 -1
  20. package/dist/chunks/{architectureDiagram-VXUJARFQ.PMB1snGu.js → architectureDiagram-VXUJARFQ.BhDBUrYi.js} +4 -4
  21. package/dist/chunks/{blockDiagram-VD42YOAC.cc6SS-Ut.js → blockDiagram-VD42YOAC.BFTM8GAn.js} +5 -5
  22. package/dist/chunks/{browser.-b7MIoe3.js → browser.DK_o_vwl.js} +1 -1
  23. package/dist/chunks/{c4Diagram-YG6GDRKO.CkH4zhHB.js → c4Diagram-YG6GDRKO.B1vLaqvZ.js} +2 -2
  24. package/dist/chunks/{channel.BZF7A0lk.js → channel.PCRnhDz7.js} +1 -1
  25. package/dist/chunks/{chunk-4BX2VUAB.Cp0rcpX_.js → chunk-4BX2VUAB.C6rU7w6S.js} +1 -1
  26. package/dist/chunks/{chunk-55IACEB6.vT382srr.js → chunk-55IACEB6.BpJZHN1o.js} +1 -1
  27. package/dist/chunks/{chunk-B4BG7PRW.D1UQqJBC.js → chunk-B4BG7PRW.F4PL3cMr.js} +4 -4
  28. package/dist/chunks/{chunk-DI55MBZ5.BGj41J2L.js → chunk-DI55MBZ5.BF8GKejt.js} +3 -3
  29. package/dist/chunks/{chunk-FMBD7UC4.DbK41wsg.js → chunk-FMBD7UC4.B1OYwU0R.js} +1 -1
  30. package/dist/chunks/{chunk-QN33PNHL.CKXkOIKW.js → chunk-QN33PNHL.BD5brt5t.js} +1 -1
  31. package/dist/chunks/{chunk-QZHKN3VN.BqCNNrna.js → chunk-QZHKN3VN.D5WYYv36.js} +1 -1
  32. package/dist/chunks/{chunk-TZMSLE5B.GMeazl5c.js → chunk-TZMSLE5B.C-MZAsEe.js} +1 -1
  33. package/dist/chunks/{classDiagram-2ON5EDUG.D9HdU8dF.js → classDiagram-2ON5EDUG.C5vYqJ4o.js} +2 -2
  34. package/dist/chunks/{classDiagram-v2-WZHVMYZB.D9HdU8dF.js → classDiagram-v2-WZHVMYZB.C5vYqJ4o.js} +2 -2
  35. package/dist/chunks/{clone.BvA919-S.js → clone.REJ_Pnlj.js} +1 -1
  36. package/dist/chunks/{cose-bilkent-S5V4N54A.Cgu7-tFO.js → cose-bilkent-S5V4N54A.DXqAwGZ0.js} +2 -2
  37. package/dist/chunks/{dagre-6UL2VRFP.BknfeRUw.js → dagre-6UL2VRFP.CoGy5JIV.js} +5 -5
  38. package/dist/chunks/{diagram-PSM6KHXK.C_6k_6p5.js → diagram-PSM6KHXK.D9vCcidT.js} +4 -4
  39. package/dist/chunks/{diagram-QEK2KX5R.DJy76ACj.js → diagram-QEK2KX5R.6csREdR0.js} +3 -3
  40. package/dist/chunks/{diagram-S2PKOQOG.CfC-dKeX.js → diagram-S2PKOQOG.YPf4qVIj.js} +3 -3
  41. package/dist/chunks/{erDiagram-Q2GNP2WA.Dq-M4wvK.js → erDiagram-Q2GNP2WA.CGV8xXOX.js} +4 -4
  42. package/dist/chunks/{flowDiagram-NV44I4VS.CWEOg9vI.js → flowDiagram-NV44I4VS.eQKIimm7.js} +5 -5
  43. package/dist/chunks/{ganttDiagram-JELNMOA3.B7lZEF5Y.js → ganttDiagram-JELNMOA3.BazHhqv4.js} +2 -2
  44. package/dist/chunks/{gitGraph-F6HP7TQM.BpsZ10rD.js → gitGraph-F6HP7TQM.Cb-fQXsF.js} +1 -1
  45. package/dist/chunks/{gitGraphDiagram-NY62KEGX.BEr46lqB.js → gitGraphDiagram-NY62KEGX.Dvqk5LX3.js} +4 -4
  46. package/dist/chunks/{graph.duUTsfAo.js → graph.CgbRK_Pv.js} +2 -2
  47. package/dist/chunks/{index.C7L6Qy0p.js → index.BEg4_Utt.js} +1 -1
  48. package/dist/chunks/{index.CQB6p5rc.js → index.BMJ9q_CF.js} +3 -3
  49. package/dist/chunks/{index.BEImwMfM.js → index.BkL02aS1.js} +3 -3
  50. package/dist/chunks/{index.BocHTBAX.js → index.BkPtehbe.js} +1 -1
  51. package/dist/chunks/{index.CZzUkzEP.js → index.Bzms2RRF.js} +1 -1
  52. package/dist/chunks/{index.1lyseSZD.js → index.CX_kqcF4.js} +1 -1
  53. package/dist/chunks/{index.Duppkty5.js → index.DzZEadJV.js} +1 -1
  54. package/dist/chunks/{index.D5GVHxAW.js → index.OAZ5W9VH.js} +5 -2
  55. package/dist/chunks/{index.C8LhNQL3.js → index.hL-ju5aR.js} +1 -1
  56. package/dist/chunks/{info-NVLQJR56.rpoj5hAd.js → info-NVLQJR56.53x0eQWW.js} +1 -1
  57. package/dist/chunks/{infoDiagram-WHAUD3N6.1qgGbBxV.js → infoDiagram-WHAUD3N6.BlrSZ-3e.js} +2 -2
  58. package/dist/chunks/{journeyDiagram-XKPGCS4Q.BrzX8o5P.js → journeyDiagram-XKPGCS4Q.CJqy8tkA.js} +4 -4
  59. package/dist/chunks/{kanban-definition-3W4ZIXB7.CuQZY6Sy.js → kanban-definition-3W4ZIXB7.CRKN0s6T.js} +2 -2
  60. package/dist/chunks/{layout.Ch_nETSB.js → layout.B3vPW_pZ.js} +4 -4
  61. package/dist/chunks/{mermaid-parser.core.Bqz_hY8U.js → mermaid-parser.core.ChRIRaJW.js} +10 -10
  62. package/dist/chunks/{min.B-XpJzFe.js → min.CnRvIY0R.js} +2 -2
  63. package/dist/chunks/{mindmap-definition-VGOIOE7T.DM10BWV6.js → mindmap-definition-VGOIOE7T.D_ABLFPV.js} +4 -4
  64. package/dist/chunks/{packet-BFZMPI3H.DxbiL8bi.js → packet-BFZMPI3H.CxGfStzw.js} +1 -1
  65. package/dist/chunks/{pie-7BOR55EZ.DlLaqQ8p.js → pie-7BOR55EZ.DNt3EJ4F.js} +1 -1
  66. package/dist/chunks/{pieDiagram-ADFJNKIX.PKqZ_L7B.js → pieDiagram-ADFJNKIX.DIQfkreO.js} +4 -4
  67. package/dist/chunks/{quadrantDiagram-AYHSOK5B.4Y46BKFd.js → quadrantDiagram-AYHSOK5B.CiwquW9n.js} +1 -1
  68. package/dist/chunks/{radar-NHE76QYJ.Bu4ymprr.js → radar-NHE76QYJ.BjalOWfU.js} +1 -1
  69. package/dist/chunks/{rehype-mermaid.BhbxArqE.js → rehype-mermaid.DiVW4LDn.js} +33 -33
  70. package/dist/chunks/{requirementDiagram-UZGBJVZJ.DdL8pOOk.js → requirementDiagram-UZGBJVZJ.zxucHbPP.js} +3 -3
  71. package/dist/chunks/{sankeyDiagram-TZEHDZUN.DHQdQ9qa.js → sankeyDiagram-TZEHDZUN.DD-PyOn-.js} +1 -1
  72. package/dist/chunks/{sequenceDiagram-WL72ISMW.CUg9rPpB.js → sequenceDiagram-WL72ISMW.DR9lsGWA.js} +3 -3
  73. package/dist/chunks/{stateDiagram-FKZM4ZOC.CRkwSlLY.js → stateDiagram-FKZM4ZOC.CsNkAXRg.js} +4 -4
  74. package/dist/chunks/{stateDiagram-v2-4FDKWEC3.BLmOYFdB.js → stateDiagram-v2-4FDKWEC3.8NFC4sNp.js} +2 -2
  75. package/dist/chunks/{timeline-definition-IT6M3QCI.DouwaOHK.js → timeline-definition-IT6M3QCI.KVweqk-o.js} +2 -2
  76. package/dist/chunks/{treemap-KMMF4GRG.DSo16U9j.js → treemap-KMMF4GRG.VQYaLH7h.js} +1 -1
  77. package/dist/chunks/{useMarkdown.dHVgqkuN.js → useMarkdown.BwBe50mc.js} +8 -8
  78. package/dist/chunks/{xychartDiagram-PRI3JC2R.CQx23hyH.js → xychartDiagram-PRI3JC2R.DLJNhHkJ.js} +1 -1
  79. package/dist/components/SassySaint/SassySaint.js +1 -1
  80. package/dist/index.js +3 -3
  81. package/package.json +4 -4
  82. package/dist/chunks/Bubble.CaOJA6px.js +0 -144
  83. package/dist/chunks/SettingsEntry.ktYNthLp.js +0 -456
@@ -1,71 +1,80 @@
1
1
  import { jsxs as n, Fragment as Q, jsx as t } from "react/jsx-runtime";
2
- import { n as ee, INFINITE_SCROLL_LIMIT as Z, INFINITE_SCROLL_THRESHOLD as ae, LOCAL_STORAGE_PREFIX as d, LOCAL_STORAGE_SORT_TIMESTAMP as re, LOCAL_STORAGE_SORT_TOKEN_USAGE as oe, LOCAL_STORAGE_SORT as se, y as F, LOCAL_STORAGE_CHAT_ID as ne, useDeleteChat as ie, useToggleFavoriteChat as le, graphQLRequest as ce, SERVICE_TYPES as de, ACTION_SORT as he, V as me, LOCAL_STORAGE_SEARCH as ue, LOCAL_STORAGE_FAVORITES_ONLY as Ce, LOCAL_STORAGE_KEYWORD_MATCH_ALL as fe, useChatsHistory as Se, useUserChatStats as ye, ACTION_SEARCH as pe } from "./index.D5GVHxAW.js";
3
- import { HistoryContext as te, ChatContext as Te, TableCellSortDirections as c, APP_CLASSNAME as ge, TOAST_CHAT_DELETED as Ae, HISTORY_TITLE as Ee, IconSearch as _e, Button as De } from "./LogoEntry.QCG_Oqpu.js";
4
- import { Card as Le } from "./index.C7L6Qy0p.js";
5
- import { useAiChat as Oe, useLocalStorage as h, LazyToastContainerWrapper as be, v4 as ke, CHAT_RESET as ve, CHAT_SET_ATTACHMENTS as Re, CHAT_SET_STATUS as xe, showErrorToast as Ie, ConfirmationPanel as we, Panel as He, debounce as Ne, Toggle as $, ButtonCancel as Fe } from "./App.kZ7zFOCZ.js";
6
- import { TextInput as Me } from "./index.C8LhNQL3.js";
7
- import Ve from "clsx";
8
- import { useRef as M, useState as D, useContext as X, useCallback as V, Suspense as Ge, lazy as ze, useEffect as Pe } from "react";
9
- const Ue = ze(
2
+ import { n as te, INFINITE_SCROLL_LIMIT as Z, INFINITE_SCROLL_THRESHOLD as $, LOCAL_STORAGE_PREFIX as m, LOCAL_STORAGE_SORT_TIMESTAMP as oe, LOCAL_STORAGE_SORT_TOKEN_USAGE as se, LOCAL_STORAGE_SORT as ne, y as M, LOCAL_STORAGE_CHAT_ID as ie, useDeleteChat as ce, useToggleFavoriteChat as le, graphQLRequest as de, SERVICE_TYPES as he, ACTION_SORT as me, V as ue, LOCAL_STORAGE_SEARCH as Ce, LOCAL_STORAGE_FAVORITES_ONLY as fe, LOCAL_STORAGE_KEYWORD_MATCH_ALL as Se, useChatsHistory as pe, useUserChatStats as ye, ACTION_SEARCH as Te } from "./index.OAZ5W9VH.js";
3
+ import { HistoryContext as ae, ChatContext as ge, TableCellSortDirections as h, APP_CLASSNAME as Ae, TOAST_CHAT_DELETED as Ee, HISTORY_TITLE as _e, IconSearch as De, Button as Le } from "./LogoEntry.yn5_B-fa.js";
4
+ import { Card as ve } from "./index.BEg4_Utt.js";
5
+ import { useAiChat as Oe, useLocalStorage as u, LazyToastContainerWrapper as be, v4 as ke, CHAT_RESET as xe, CHAT_SET_ATTACHMENTS as Re, CHAT_SET_STATUS as Ie, showErrorToast as we, ConfirmationPanel as Ne, Panel as He, debounce as Fe, Toggle as ee, ButtonCancel as Me } from "./App.BzCbkgv8.js";
6
+ import { TextInput as Ve } from "./index.hL-ju5aR.js";
7
+ import Ge from "clsx";
8
+ import { useRef as V, useState as O, useContext as X, useEffect as re, useCallback as G, Suspense as ze, lazy as Pe } from "react";
9
+ const Ue = Pe(
10
10
  () => import(
11
11
  /* webpackChunkName: "history-table" */
12
- "./ChatHistoryTable.CPGJDP3u.js"
13
- ).then((m) => ({ default: m.ChatHistoryTable }))
12
+ "./ChatHistoryTable.LPF05gFQ.js"
13
+ ).then((i) => ({ default: i.ChatHistoryTable }))
14
14
  ), Be = ({
15
- filteredHistory: m,
15
+ filteredHistory: i,
16
16
  onOpenChange: y,
17
- mutate: p,
18
- isLoading: L = !1,
19
- totalHistoryCount: O,
20
- isFiltered: G = !1,
21
- isSearchActive: b = !1,
22
- requestConfirmation: u
17
+ mutate: T,
18
+ isLoading: b = !1,
19
+ totalHistoryCount: k,
20
+ isFiltered: z = !1,
21
+ isSearchActive: x = !1,
22
+ requestConfirmation: C
23
23
  }) => {
24
- const { user: o, getAccessToken: T } = ee(), g = M(null), C = M({
24
+ const { user: o, getAccessToken: g } = te(), A = V(null), f = V({
25
25
  id: "",
26
26
  timestamp: "",
27
27
  message: ""
28
- }), [z, k] = D(
29
- Z + ae
30
- ), { state: i, dispatch: P } = X(te), v = {
31
- searchString: i.searchString || "",
32
- sortDirection: i.sortDirection || c.DESC,
33
- sortedCell: i.sortedCell || F
28
+ }), [E, _] = O(
29
+ Z + $
30
+ ), { state: c, dispatch: P } = X(ae), R = {
31
+ searchString: c.searchString || "",
32
+ sortDirection: c.sortDirection || h.DESC,
33
+ sortedCell: c.sortedCell || M
34
34
  }, {
35
- setChatId: f,
36
- setInitialMessages: A,
37
- dispatch: E
38
- } = X(Te), { setInput: _ } = Oe(), [R, x] = h({
39
- key: d + re,
40
- initialValue: c.DESC
41
- }), [S, U] = h({
42
- key: d + oe,
43
- initialValue: c.ASC
44
- }), [, I] = h({
45
- key: d + se,
46
- initialValue: F
47
- }), [w] = h({
48
- key: d + ne,
35
+ setChatId: S,
36
+ setInitialMessages: D,
37
+ dispatch: L
38
+ } = X(ge), { setInput: v } = Oe(), [I, w] = u({
39
+ key: m + oe,
40
+ initialValue: h.DESC
41
+ }), [p, U] = u({
42
+ key: m + se,
43
+ initialValue: h.ASC
44
+ }), [, N] = u({
45
+ key: m + ne,
46
+ initialValue: M
47
+ }), [l] = u({
48
+ key: m + ie,
49
49
  initialValue: ""
50
- }), { mutateAsync: l } = ie({ getAccessToken: T }), { mutateAsync: B } = le({
51
- getAccessToken: T
50
+ });
51
+ re(() => {
52
+ if (!l || i.length === 0)
53
+ return;
54
+ const e = i.findIndex(
55
+ (s) => s.id === l
56
+ );
57
+ e >= 0 && e >= E && _(e + $);
58
+ }, [l, i, E]);
59
+ const { mutateAsync: d } = ce({ getAccessToken: g }), { mutateAsync: B } = le({
60
+ getAccessToken: g
52
61
  }), H = (e) => {
53
- const s = i.sortedCell === e;
54
- let r, N;
62
+ const s = c.sortedCell === e;
63
+ let r, F;
55
64
  switch (e) {
56
- case F:
57
- N = x, r = s ? i.sortDirection : R;
65
+ case M:
66
+ F = w, r = s ? c.sortDirection : I;
58
67
  break;
59
- case me:
60
- N = U, r = s ? i.sortDirection : S;
68
+ case ue:
69
+ F = U, r = s ? c.sortDirection : p;
61
70
  break;
62
71
  default:
63
- N = x, r = s ? i.sortDirection : R;
72
+ F = w, r = s ? c.sortDirection : I;
64
73
  break;
65
74
  }
66
- const J = r === c.ASC ? c.DESC : c.ASC;
67
- N(J), I(e), P({
68
- type: he,
75
+ const J = r === h.ASC ? h.DESC : h.ASC;
76
+ F(J), N(e), P({
77
+ type: me,
69
78
  payload: {
70
79
  sortedCell: e,
71
80
  sortDirection: J
@@ -73,10 +82,10 @@ const Ue = ze(
73
82
  });
74
83
  }, j = async (e) => {
75
84
  try {
76
- await l({
85
+ await d({
77
86
  userId: o?.username || "",
78
87
  id: e
79
- }), p(""), await Ie(Ae, {
88
+ }), T(""), await we(Ee, {
80
89
  autoClose: 2e3,
81
90
  containerId: "history-table"
82
91
  });
@@ -84,15 +93,15 @@ const Ue = ze(
84
93
  }
85
94
  }, K = async (e) => {
86
95
  try {
87
- const s = await T(), r = await ce({
96
+ const s = await g(), r = await de({
88
97
  accessToken: s,
89
- type: de.GET_CHAT,
98
+ type: he.GET_CHAT,
90
99
  params: {
91
100
  id: e.id
92
101
  }
93
102
  });
94
- E({
95
- type: xe,
103
+ L({
104
+ type: Ie,
96
105
  payload: {
97
106
  streaming: !1,
98
107
  loading: !1,
@@ -101,15 +110,15 @@ const Ue = ze(
101
110
  restoredTimestamp: r.data?.timestamp || "",
102
111
  restoredUsage: r.data?.tokenUsage || 0
103
112
  }
104
- }), _(""), f(e.id), A(r.data.messages), y(!1);
113
+ }), v(""), S(e.id), D(r.data.messages), y(!1);
105
114
  } catch {
106
115
  }
107
116
  }, Y = (e) => {
108
- C.current = {
117
+ f.current = {
109
118
  id: e.id,
110
119
  timestamp: e.timestamp,
111
120
  message: e.summary
112
- }, u(
121
+ }, C(
113
122
  () => j(e.id),
114
123
  /* @__PURE__ */ n(Q, { children: [
115
124
  /* @__PURE__ */ t("p", { className: "m-0", children: "Are you sure you want to delete the following chat:" }),
@@ -124,13 +133,13 @@ const Ue = ze(
124
133
  ] })
125
134
  ] })
126
135
  ] })
127
- ), w === e.id && (f(ke()), A([]), _(""), E({
128
- type: ve,
136
+ ), l === e.id && (S(ke()), D([]), v(""), L({
137
+ type: xe,
129
138
  payload: {
130
139
  privateChat: !1,
131
140
  reasoningText: !1
132
141
  }
133
- }), E({
142
+ }), L({
134
143
  type: Re,
135
144
  payload: {
136
145
  attachments: 0
@@ -141,135 +150,136 @@ const Ue = ze(
141
150
  await B({
142
151
  userId: o?.username || "",
143
152
  id: e.id
144
- }), p("");
153
+ }), T("");
145
154
  } catch {
146
155
  }
147
- }, a = V((e) => {
148
- e[0].isIntersecting && k((r) => r + Z);
149
- }, []), W = V(
156
+ }, a = G((e) => {
157
+ e[0].isIntersecting && _((r) => r + Z);
158
+ }, []), W = G(
150
159
  (e) => {
151
- if (g.current && g.current.disconnect(), e) {
160
+ if (A.current && A.current.disconnect(), e) {
152
161
  const s = {
153
162
  rootMargin: "20px"
154
163
  }, r = new IntersectionObserver(a, s);
155
- r.observe(e), g.current = r;
164
+ r.observe(e), A.current = r;
156
165
  }
157
166
  },
158
167
  [a]
159
168
  );
160
169
  return /* @__PURE__ */ n(Q, { children: [
161
- /* @__PURE__ */ t("div", { className: ge, children: /* @__PURE__ */ t(be, { containerId: "history-table" }) }),
162
- /* @__PURE__ */ t(Ge, { fallback: /* @__PURE__ */ t("div", {}), children: /* @__PURE__ */ t(
170
+ /* @__PURE__ */ t("div", { className: Ae, children: /* @__PURE__ */ t(be, { containerId: "history-table" }) }),
171
+ /* @__PURE__ */ t(ze, { fallback: /* @__PURE__ */ t("div", {}), children: /* @__PURE__ */ t(
163
172
  Ue,
164
173
  {
165
- filteredHistory: m,
166
- historyState: v,
167
- lastEntryToLoad: z,
174
+ filteredHistory: i,
175
+ historyState: R,
176
+ lastEntryToLoad: E,
168
177
  onClickSort: H,
169
178
  onClickRestore: K,
170
179
  onClickDelete: Y,
171
180
  onClickFavorite: q,
172
181
  infinityScrollMarkerRef: W,
173
- isLoading: L,
174
- totalHistoryCount: O,
175
- isFiltered: G,
176
- isSearchActive: b
182
+ isLoading: b,
183
+ totalHistoryCount: k,
184
+ isFiltered: z,
185
+ isSearchActive: x,
186
+ activeChatId: l
177
187
  }
178
188
  ) })
179
189
  ] });
180
190
  }, Ze = ({
181
- open: m,
191
+ open: i,
182
192
  onOpenChange: y
183
193
  }) => {
184
- const p = M(null), { getAccessToken: L, user: O } = ee(), [G, b] = D([]), u = M(null), { state: o, dispatch: T } = X(te), [, g] = h({
185
- key: d + ue,
194
+ const T = V(null), { getAccessToken: b, user: k } = te(), [z, x] = O([]), C = V(null), { state: o, dispatch: g } = X(ae), [, A] = u({
195
+ key: m + Ce,
186
196
  initialValue: o.searchString
187
- }), [C, z] = h({
188
- key: d + Ce,
197
+ }), [f, E] = u({
198
+ key: m + fe,
189
199
  initialValue: !1
190
- }), [k, i] = h({
191
- key: d + fe,
200
+ }), [_, c] = u({
201
+ key: m + Se,
192
202
  initialValue: !0
193
- }), [P, v] = D(!1), [f, A] = D(null), [E, _] = D(null), R = V(
203
+ }), [P, R] = O(!1), [S, D] = O(null), [L, v] = O(null), I = G(
194
204
  (a, W) => {
195
- A(() => a), _(W), v(!0);
205
+ D(() => a), v(W), R(!0);
196
206
  },
197
207
  []
198
- ), x = V(() => {
199
- f && f(), A(null), _(null);
200
- }, [f]), {
201
- data: S,
208
+ ), w = G(() => {
209
+ S && S(), D(null), v(null);
210
+ }, [S]), {
211
+ data: p,
202
212
  refetch: U,
203
- isLoading: I,
204
- isError: w
205
- } = Se({
206
- enabled: m,
207
- user: O?.username || "",
213
+ isLoading: N,
214
+ isError: l
215
+ } = pe({
216
+ enabled: i,
217
+ user: k?.username || "",
208
218
  searchString: o.searchString || "",
209
- sortDirection: o.sortDirection || c.DESC,
210
- sortedCell: o.sortedCell || F,
211
- getAccessToken: L,
212
- keywordMatchAll: k
213
- }), { data: l } = ye({
214
- user: O?.username,
215
- getAccessToken: L
216
- }), B = l && l.totalChats ? l.totalChats - l.privateChats - l.deletedChats : 0;
217
- Pe(() => {
218
- S && b(
219
- C ? S.filter((a) => a.favoriteChat === !0) : S
219
+ sortDirection: o.sortDirection || h.DESC,
220
+ sortedCell: o.sortedCell || M,
221
+ getAccessToken: b,
222
+ keywordMatchAll: _
223
+ }), { data: d } = ye({
224
+ user: k?.username,
225
+ getAccessToken: b
226
+ }), B = d && d.totalChats ? d.totalChats - d.privateChats - d.deletedChats : 0;
227
+ re(() => {
228
+ p && x(
229
+ f ? p.filter((a) => a.favoriteChat === !0) : p
220
230
  );
221
- }, [S, C]);
231
+ }, [p, f]);
222
232
  const H = async (a) => {
223
- g(a), T({
224
- type: pe,
233
+ A(a), g({
234
+ type: Te,
225
235
  payload: { searchString: a }
226
236
  });
227
- }, j = Ne((a) => {
237
+ }, j = Fe((a) => {
228
238
  H(a.target.value.trim());
229
239
  }, 800), K = async (a) => {
230
240
  a.preventDefault();
231
241
  }, Y = (a) => {
232
- z(a);
242
+ E(a);
233
243
  }, q = (a) => {
234
- i(a);
244
+ c(a);
235
245
  };
236
246
  return /* @__PURE__ */ n(Q, { children: [
237
247
  /* @__PURE__ */ t(
238
- we,
248
+ Ne,
239
249
  {
240
250
  showConfirmation: P,
241
- setShowConfirmation: v,
242
- action: x,
251
+ setShowConfirmation: R,
252
+ action: w,
243
253
  customStrings: {
244
254
  confirmAction: "Delete",
245
255
  cancelAction: "Cancel",
246
256
  title: "Delete chat"
247
257
  },
248
- children: E
258
+ children: L
249
259
  }
250
260
  ),
251
261
  /* @__PURE__ */ n(
252
262
  He,
253
263
  {
254
- open: m,
264
+ open: i,
255
265
  onOpenChange: y,
256
- title: Ee,
266
+ title: _e,
257
267
  animation: !0,
258
268
  animationType: "fade",
259
269
  blurEffect: "large",
260
- initialFocus: p,
261
- footer: /* @__PURE__ */ t("div", { className: "flex flex-wrap justify-end gap-x-2 pb-8 sm:pb-0", children: /* @__PURE__ */ t("div", { className: "box-border max-w-full basis-auto", children: /* @__PURE__ */ t(Fe, { onOpenChange: y, ref: p }) }) }),
270
+ initialFocus: T,
271
+ footer: /* @__PURE__ */ t("div", { className: "flex flex-wrap justify-end gap-x-2 pb-8 sm:pb-0", children: /* @__PURE__ */ t("div", { className: "box-border max-w-full basis-auto", children: /* @__PURE__ */ t(Me, { onOpenChange: y, ref: T }) }) }),
262
272
  children: [
263
273
  /* @__PURE__ */ t(
264
- Le,
274
+ ve,
265
275
  {
266
- header: I && o.searchString ? "Loading..." : o.searchString ? "Filters applied" : "Filters",
276
+ header: N && o.searchString ? "Loading..." : o.searchString ? "Filters applied" : "Filters",
267
277
  className: "prose-dark dark:prose-lighter mb-4",
268
278
  noBorder: !0,
269
279
  compact: !0,
270
280
  children: /* @__PURE__ */ n("form", { autoComplete: "off", onSubmit: K, children: [
271
281
  /* @__PURE__ */ t(
272
- Me,
282
+ Ve,
273
283
  {
274
284
  placeholder: "Search",
275
285
  labelHidden: !0,
@@ -277,23 +287,23 @@ const Ue = ze(
277
287
  autoCapitalize: "off",
278
288
  autoComplete: "off",
279
289
  autoCorrect: "off",
280
- ref: u,
290
+ ref: C,
281
291
  defaultValue: o.searchString,
282
292
  mode: "alt-system",
283
293
  name: "Search",
284
294
  label: "Search",
285
295
  onChange: j,
286
296
  className: "my-2",
287
- rightElement: /* @__PURE__ */ t("div", { className: "dark:text-copy-dark text-copy-light", children: /* @__PURE__ */ t(_e, { monotone: !0, size: "size-3" }) })
297
+ rightElement: /* @__PURE__ */ t("div", { className: "dark:text-copy-dark text-copy-light", children: /* @__PURE__ */ t(De, { monotone: !0, size: "size-3" }) })
288
298
  }
289
299
  ),
290
300
  /* @__PURE__ */ n("div", { className: "flex flex-col justify-between sm:flex-row gap-2 sm:mb-0 mb-1", children: [
291
301
  /* @__PURE__ */ n("div", { className: "flex flex-col sm:flex-row gap-2 order-1 sm:order-0", children: [
292
302
  /* @__PURE__ */ t(
293
- $,
303
+ ee,
294
304
  {
295
305
  name: "favorites-only",
296
- checked: C,
306
+ checked: f,
297
307
  onChange: Y,
298
308
  label: "Show favorites only",
299
309
  narrow: !0,
@@ -301,10 +311,10 @@ const Ue = ze(
301
311
  }
302
312
  ),
303
313
  /* @__PURE__ */ t(
304
- $,
314
+ ee,
305
315
  {
306
316
  name: "keyword-match-all",
307
- checked: k,
317
+ checked: _,
308
318
  onChange: q,
309
319
  label: "Match all keywords",
310
320
  narrow: !0,
@@ -313,13 +323,13 @@ const Ue = ze(
313
323
  )
314
324
  ] }),
315
325
  /* @__PURE__ */ t(
316
- De,
326
+ Le,
317
327
  {
318
328
  mode: "light",
319
329
  size: "small",
320
330
  disabled: o.searchString === "",
321
331
  onClick: () => {
322
- H(""), u.current?.value && (u.current.value = "", u.current.focus());
332
+ H(""), C.current?.value && (C.current.value = "", C.current.focus());
323
333
  },
324
334
  children: "Reset Search"
325
335
  }
@@ -331,25 +341,25 @@ const Ue = ze(
331
341
  /* @__PURE__ */ n(
332
342
  "div",
333
343
  {
334
- className: Ve(
344
+ className: Ge(
335
345
  "flex flex-col sm:flex-row",
336
346
  "max-h-[65vh]",
337
347
  "sm:max-h-[75vh]",
338
348
  "min-h-[60vh]"
339
349
  ),
340
350
  children: [
341
- w && /* @__PURE__ */ t("p", { className: "m-0 text-copy-error-light", children: "Failed to load history." }),
342
- !w && /* @__PURE__ */ t(
351
+ l && /* @__PURE__ */ t("p", { className: "m-0 text-copy-error-light", children: "Failed to load history." }),
352
+ !l && /* @__PURE__ */ t(
343
353
  Be,
344
354
  {
345
355
  mutate: U,
346
- filteredHistory: G,
356
+ filteredHistory: z,
347
357
  onOpenChange: y,
348
- isLoading: I,
358
+ isLoading: N,
349
359
  totalHistoryCount: B,
350
- isFiltered: !!(o.searchString || C),
360
+ isFiltered: !!(o.searchString || f),
351
361
  isSearchActive: !!o.searchString,
352
- requestConfirmation: R
362
+ requestConfirmation: I
353
363
  }
354
364
  )
355
365
  ]
@@ -1,8 +1,8 @@
1
1
  import { jsxs as i, jsx as e, Fragment as x } from "react/jsx-runtime";
2
- import { n as N, getLayoutPaddingClass as C, getMessageContaintWrapperClass as v, isTauri as w } from "./index.D5GVHxAW.js";
3
- import { Logo as k, PASSWORD_PLACEHOLDER as M, ButtonIcon as u, IconShow as I, IconHide as L, Button as y, LOG_IN as E, LOG_IN_PASSKEY as S, IconPasskey as P } from "./LogoEntry.QCG_Oqpu.js";
4
- import { Card as B } from "./index.C7L6Qy0p.js";
5
- import { TextInput as O, TextInputMask as T } from "./index.C8LhNQL3.js";
2
+ import { n as N, getLayoutPaddingClass as C, getMessageContaintWrapperClass as v, isTauri as w } from "./index.OAZ5W9VH.js";
3
+ import { Logo as k, PASSWORD_PLACEHOLDER as M, ButtonIcon as u, IconShow as I, IconHide as L, Button as y, LOG_IN as E, LOG_IN_PASSKEY as S, IconPasskey as P } from "./LogoEntry.yn5_B-fa.js";
4
+ import { Card as B } from "./index.BEg4_Utt.js";
5
+ import { TextInput as O, TextInputMask as T } from "./index.hL-ju5aR.js";
6
6
  import { useState as r, useEffect as f } from "react";
7
7
  const G = () => {
8
8
  const { login: h, logoutReason: o, loginWithPasskey: g } = N(), [t, l] = r(""), [d, n] = r(""), [m, p] = r(!0), [s, c] = r({