@versini/sassysaint 8.117.0 → 8.118.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.
- package/dist/chunks/{AboutChangelog.Bn_KfUZc.js → AboutChangelog.NMMfTbp4.js} +2 -2
- package/dist/chunks/{AboutEntry.GETrm77g.js → AboutEntry.8kXGiBKr.js} +7 -7
- package/dist/chunks/{App.BzCbkgv8.js → App.MBikKP52.js} +618 -615
- package/dist/chunks/{BubbleActions.CbQ9BHWl.js → BubbleActions.u9muFBXv.js} +3 -3
- package/dist/chunks/{ButtonIconDelete.B5IpSZrD.js → ButtonIconDelete.UIDZwKOu.js} +2 -2
- package/dist/chunks/{Chart.Czhhtzdx.js → Chart.IEDLbK1M.js} +2 -2
- package/dist/chunks/{ChatBubbleAssistant.DESMaXGq.js → ChatBubbleAssistant.Cn1keoow.js} +5 -5
- package/dist/chunks/{ChatBubbleUser.B_Sniupu.js → ChatBubbleUser.DUizsIIv.js} +4 -4
- package/dist/chunks/{ChatHistoryTable.LPF05gFQ.js → ChatHistoryTable.DIT1MlOO.js} +4 -4
- package/dist/chunks/HistoryEntry.sZ_AMeUu.js +341 -0
- package/dist/chunks/InlineFilter.1dVMRTxM.js +58 -0
- package/dist/chunks/{LoginEntry.Bf8vuUIL.js → LoginEntry.BnHprT7f.js} +4 -4
- package/dist/chunks/{LogoEntry.yn5_B-fa.js → LogoEntry.uN5foS5i.js} +1 -1
- package/dist/chunks/MemoriesEntry.CpxdE30v.js +698 -0
- package/dist/chunks/{ProfileEntry.DitROf-m.js → ProfileEntry.BMpJic5U.js} +4 -4
- package/dist/chunks/{SettingsEntry.DUMuo462.js → SettingsEntry.B8xGufV0.js} +5 -5
- package/dist/chunks/{UsageEntry.CFMWYodz.js → UsageEntry.B1zVYUBb.js} +5 -5
- package/dist/chunks/{_baseUniq.D6y3dh-S.js → _baseUniq.BeocMcb-.js} +1 -1
- package/dist/chunks/{arc.CitIvzp8.js → arc.C-CDR6Sz.js} +1 -1
- package/dist/chunks/{architecture-U656AL7Q.IEP3vDFZ.js → architecture-U656AL7Q.DQ7Jtm55.js} +1 -1
- package/dist/chunks/{architectureDiagram-VXUJARFQ.BhDBUrYi.js → architectureDiagram-VXUJARFQ.Ceo3pgxm.js} +4 -4
- package/dist/chunks/{blockDiagram-VD42YOAC.BFTM8GAn.js → blockDiagram-VD42YOAC.BvjaUl_a.js} +5 -5
- package/dist/chunks/{browser.DK_o_vwl.js → browser.DvUqvHKQ.js} +1 -1
- package/dist/chunks/{c4Diagram-YG6GDRKO.B1vLaqvZ.js → c4Diagram-YG6GDRKO.D8dful9J.js} +2 -2
- package/dist/chunks/{channel.PCRnhDz7.js → channel.B6Qvl469.js} +1 -1
- package/dist/chunks/{chunk-4BX2VUAB.C6rU7w6S.js → chunk-4BX2VUAB.CtVNPH4N.js} +1 -1
- package/dist/chunks/{chunk-55IACEB6.BpJZHN1o.js → chunk-55IACEB6.C0X4Jue2.js} +1 -1
- package/dist/chunks/{chunk-B4BG7PRW.F4PL3cMr.js → chunk-B4BG7PRW.Conu6DQr.js} +4 -4
- package/dist/chunks/{chunk-DI55MBZ5.BF8GKejt.js → chunk-DI55MBZ5.Dg38hF9_.js} +3 -3
- package/dist/chunks/{chunk-FMBD7UC4.B1OYwU0R.js → chunk-FMBD7UC4.BsUH0rhB.js} +1 -1
- package/dist/chunks/{chunk-QN33PNHL.BD5brt5t.js → chunk-QN33PNHL.0RjA_wXX.js} +1 -1
- package/dist/chunks/{chunk-QZHKN3VN.D5WYYv36.js → chunk-QZHKN3VN.Dz6HmVZY.js} +1 -1
- package/dist/chunks/{chunk-TZMSLE5B.C-MZAsEe.js → chunk-TZMSLE5B.Dxuv9zIm.js} +1 -1
- package/dist/chunks/{classDiagram-2ON5EDUG.C5vYqJ4o.js → classDiagram-2ON5EDUG.CRdX6xMs.js} +2 -2
- package/dist/chunks/{classDiagram-v2-WZHVMYZB.C5vYqJ4o.js → classDiagram-v2-WZHVMYZB.CRdX6xMs.js} +2 -2
- package/dist/chunks/{clone.REJ_Pnlj.js → clone.ByaUA-r2.js} +1 -1
- package/dist/chunks/{cose-bilkent-S5V4N54A.DXqAwGZ0.js → cose-bilkent-S5V4N54A.B5YgIJoQ.js} +2 -2
- package/dist/chunks/{dagre-6UL2VRFP.CoGy5JIV.js → dagre-6UL2VRFP.uIiQ6FUj.js} +5 -5
- package/dist/chunks/{diagram-PSM6KHXK.D9vCcidT.js → diagram-PSM6KHXK.Bv8fX1RC.js} +4 -4
- package/dist/chunks/{diagram-QEK2KX5R.6csREdR0.js → diagram-QEK2KX5R.CY_Rq5A7.js} +3 -3
- package/dist/chunks/{diagram-S2PKOQOG.YPf4qVIj.js → diagram-S2PKOQOG.BfXCT4NH.js} +3 -3
- package/dist/chunks/{erDiagram-Q2GNP2WA.CGV8xXOX.js → erDiagram-Q2GNP2WA.BQrPmQkr.js} +4 -4
- package/dist/chunks/{flowDiagram-NV44I4VS.eQKIimm7.js → flowDiagram-NV44I4VS.DZwCRz8X.js} +5 -5
- package/dist/chunks/{ganttDiagram-JELNMOA3.BazHhqv4.js → ganttDiagram-JELNMOA3.CpqB-Lco.js} +2 -2
- package/dist/chunks/{gitGraph-F6HP7TQM.Cb-fQXsF.js → gitGraph-F6HP7TQM.HmdqWT9j.js} +1 -1
- package/dist/chunks/{gitGraphDiagram-NY62KEGX.Dvqk5LX3.js → gitGraphDiagram-NY62KEGX.i87uZR96.js} +4 -4
- package/dist/chunks/{graph.CgbRK_Pv.js → graph.C_jA5HK0.js} +2 -2
- package/dist/chunks/{index.CX_kqcF4.js → index.BHwQBUwd.js} +1 -1
- package/dist/chunks/{index.Bzms2RRF.js → index.BaE2Lbfd.js} +1 -1
- package/dist/chunks/{index.DzZEadJV.js → index.BggKJCTP.js} +1 -1
- package/dist/chunks/{index.BMJ9q_CF.js → index.Bm1g0K7E.js} +3 -3
- package/dist/chunks/{index.OAZ5W9VH.js → index.BrfxZy3k.js} +2 -2
- package/dist/chunks/{index.BkPtehbe.js → index.C5piY5Ss.js} +1 -1
- package/dist/chunks/{index.BEg4_Utt.js → index.Y9mwgfBs.js} +1 -1
- package/dist/chunks/{index.BkL02aS1.js → index.cXGGRddQ.js} +3 -3
- package/dist/chunks/{index.hL-ju5aR.js → index.g3S1xCER.js} +1 -1
- package/dist/chunks/{info-NVLQJR56.53x0eQWW.js → info-NVLQJR56.ITJfPEdI.js} +1 -1
- package/dist/chunks/{infoDiagram-WHAUD3N6.BlrSZ-3e.js → infoDiagram-WHAUD3N6.fkRhLS2k.js} +2 -2
- package/dist/chunks/{journeyDiagram-XKPGCS4Q.CJqy8tkA.js → journeyDiagram-XKPGCS4Q.BtGrOEeN.js} +4 -4
- package/dist/chunks/{kanban-definition-3W4ZIXB7.CRKN0s6T.js → kanban-definition-3W4ZIXB7.B5uNw32c.js} +2 -2
- package/dist/chunks/{layout.B3vPW_pZ.js → layout.CqkuHUdu.js} +4 -4
- package/dist/chunks/{mermaid-parser.core.ChRIRaJW.js → mermaid-parser.core.Ci-ITaRl.js} +10 -10
- package/dist/chunks/{min.CnRvIY0R.js → min.ZkscJwva.js} +2 -2
- package/dist/chunks/{mindmap-definition-VGOIOE7T.D_ABLFPV.js → mindmap-definition-VGOIOE7T.B6kzhC94.js} +4 -4
- package/dist/chunks/{packet-BFZMPI3H.CxGfStzw.js → packet-BFZMPI3H.BMbAoa6x.js} +1 -1
- package/dist/chunks/{pie-7BOR55EZ.DNt3EJ4F.js → pie-7BOR55EZ.BMdBvM8R.js} +1 -1
- package/dist/chunks/{pieDiagram-ADFJNKIX.DIQfkreO.js → pieDiagram-ADFJNKIX.-lbBXtjO.js} +4 -4
- package/dist/chunks/{quadrantDiagram-AYHSOK5B.CiwquW9n.js → quadrantDiagram-AYHSOK5B.Davn6069.js} +1 -1
- package/dist/chunks/{radar-NHE76QYJ.BjalOWfU.js → radar-NHE76QYJ.DYto8RZU.js} +1 -1
- package/dist/chunks/{rehype-mermaid.DiVW4LDn.js → rehype-mermaid.CSGNYSn9.js} +33 -33
- package/dist/chunks/{requirementDiagram-UZGBJVZJ.zxucHbPP.js → requirementDiagram-UZGBJVZJ.FMUxUq0R.js} +3 -3
- package/dist/chunks/{sankeyDiagram-TZEHDZUN.DD-PyOn-.js → sankeyDiagram-TZEHDZUN.DTIl9DDr.js} +1 -1
- package/dist/chunks/{sequenceDiagram-WL72ISMW.DR9lsGWA.js → sequenceDiagram-WL72ISMW.Bc9ucdVx.js} +3 -3
- package/dist/chunks/{stateDiagram-FKZM4ZOC.CsNkAXRg.js → stateDiagram-FKZM4ZOC.DiBSTbjk.js} +4 -4
- package/dist/chunks/{stateDiagram-v2-4FDKWEC3.8NFC4sNp.js → stateDiagram-v2-4FDKWEC3.C3xcoMwn.js} +2 -2
- package/dist/chunks/{timeline-definition-IT6M3QCI.KVweqk-o.js → timeline-definition-IT6M3QCI.BC01Xx8r.js} +2 -2
- package/dist/chunks/{treemap-KMMF4GRG.VQYaLH7h.js → treemap-KMMF4GRG.oysg6M_i.js} +1 -1
- package/dist/chunks/{useMarkdown.BwBe50mc.js → useMarkdown.D8WEecQ3.js} +8 -8
- package/dist/chunks/{xychartDiagram-PRI3JC2R.DLJNhHkJ.js → xychartDiagram-PRI3JC2R.C3TO2yCs.js} +1 -1
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +3 -3
- package/package.json +3 -3
- package/dist/chunks/HistoryEntry.CbyRX9rD.js +0 -375
- package/dist/chunks/MemoriesEntry.Bljvi6W9.js +0 -649
|
@@ -1,375 +0,0 @@
|
|
|
1
|
-
import { jsxs as n, Fragment as Q, jsx as t } from "react/jsx-runtime";
|
|
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
|
-
() => import(
|
|
11
|
-
/* webpackChunkName: "history-table" */
|
|
12
|
-
"./ChatHistoryTable.LPF05gFQ.js"
|
|
13
|
-
).then((i) => ({ default: i.ChatHistoryTable }))
|
|
14
|
-
), Be = ({
|
|
15
|
-
filteredHistory: i,
|
|
16
|
-
onOpenChange: y,
|
|
17
|
-
mutate: T,
|
|
18
|
-
isLoading: b = !1,
|
|
19
|
-
totalHistoryCount: k,
|
|
20
|
-
isFiltered: z = !1,
|
|
21
|
-
isSearchActive: x = !1,
|
|
22
|
-
requestConfirmation: C
|
|
23
|
-
}) => {
|
|
24
|
-
const { user: o, getAccessToken: g } = te(), A = V(null), f = V({
|
|
25
|
-
id: "",
|
|
26
|
-
timestamp: "",
|
|
27
|
-
message: ""
|
|
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
|
-
}, {
|
|
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
|
-
initialValue: ""
|
|
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
|
|
61
|
-
}), H = (e) => {
|
|
62
|
-
const s = c.sortedCell === e;
|
|
63
|
-
let r, F;
|
|
64
|
-
switch (e) {
|
|
65
|
-
case M:
|
|
66
|
-
F = w, r = s ? c.sortDirection : I;
|
|
67
|
-
break;
|
|
68
|
-
case ue:
|
|
69
|
-
F = U, r = s ? c.sortDirection : p;
|
|
70
|
-
break;
|
|
71
|
-
default:
|
|
72
|
-
F = w, r = s ? c.sortDirection : I;
|
|
73
|
-
break;
|
|
74
|
-
}
|
|
75
|
-
const J = r === h.ASC ? h.DESC : h.ASC;
|
|
76
|
-
F(J), N(e), P({
|
|
77
|
-
type: me,
|
|
78
|
-
payload: {
|
|
79
|
-
sortedCell: e,
|
|
80
|
-
sortDirection: J
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
}, j = async (e) => {
|
|
84
|
-
try {
|
|
85
|
-
await d({
|
|
86
|
-
userId: o?.username || "",
|
|
87
|
-
id: e
|
|
88
|
-
}), T(""), await we(Ee, {
|
|
89
|
-
autoClose: 2e3,
|
|
90
|
-
containerId: "history-table"
|
|
91
|
-
});
|
|
92
|
-
} catch {
|
|
93
|
-
}
|
|
94
|
-
}, K = async (e) => {
|
|
95
|
-
try {
|
|
96
|
-
const s = await g(), r = await de({
|
|
97
|
-
accessToken: s,
|
|
98
|
-
type: he.GET_CHAT,
|
|
99
|
-
params: {
|
|
100
|
-
id: e.id
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
L({
|
|
104
|
-
type: Ie,
|
|
105
|
-
payload: {
|
|
106
|
-
streaming: !1,
|
|
107
|
-
loading: !1,
|
|
108
|
-
restoring: !0,
|
|
109
|
-
restoredModel: r.data?.model || "",
|
|
110
|
-
restoredTimestamp: r.data?.timestamp || "",
|
|
111
|
-
restoredUsage: r.data?.tokenUsage || 0
|
|
112
|
-
}
|
|
113
|
-
}), v(""), S(e.id), D(r.data.messages), y(!1);
|
|
114
|
-
} catch {
|
|
115
|
-
}
|
|
116
|
-
}, Y = (e) => {
|
|
117
|
-
f.current = {
|
|
118
|
-
id: e.id,
|
|
119
|
-
timestamp: e.timestamp,
|
|
120
|
-
message: e.summary
|
|
121
|
-
}, C(
|
|
122
|
-
() => j(e.id),
|
|
123
|
-
/* @__PURE__ */ n(Q, { children: [
|
|
124
|
-
/* @__PURE__ */ t("p", { className: "m-0", children: "Are you sure you want to delete the following chat:" }),
|
|
125
|
-
/* @__PURE__ */ n("ul", { className: "m-0", children: [
|
|
126
|
-
/* @__PURE__ */ n("li", { children: [
|
|
127
|
-
"Timestamp: ",
|
|
128
|
-
/* @__PURE__ */ t("span", { className: "text-lg", children: e.timestamp })
|
|
129
|
-
] }),
|
|
130
|
-
/* @__PURE__ */ n("li", { children: [
|
|
131
|
-
"First message: ",
|
|
132
|
-
/* @__PURE__ */ t("span", { className: "text-lg", children: e.summary })
|
|
133
|
-
] })
|
|
134
|
-
] })
|
|
135
|
-
] })
|
|
136
|
-
), l === e.id && (S(ke()), D([]), v(""), L({
|
|
137
|
-
type: xe,
|
|
138
|
-
payload: {
|
|
139
|
-
privateChat: !1,
|
|
140
|
-
reasoningText: !1
|
|
141
|
-
}
|
|
142
|
-
}), L({
|
|
143
|
-
type: Re,
|
|
144
|
-
payload: {
|
|
145
|
-
attachments: 0
|
|
146
|
-
}
|
|
147
|
-
}));
|
|
148
|
-
}, q = async (e) => {
|
|
149
|
-
try {
|
|
150
|
-
await B({
|
|
151
|
-
userId: o?.username || "",
|
|
152
|
-
id: e.id
|
|
153
|
-
}), T("");
|
|
154
|
-
} catch {
|
|
155
|
-
}
|
|
156
|
-
}, a = G((e) => {
|
|
157
|
-
e[0].isIntersecting && _((r) => r + Z);
|
|
158
|
-
}, []), W = G(
|
|
159
|
-
(e) => {
|
|
160
|
-
if (A.current && A.current.disconnect(), e) {
|
|
161
|
-
const s = {
|
|
162
|
-
rootMargin: "20px"
|
|
163
|
-
}, r = new IntersectionObserver(a, s);
|
|
164
|
-
r.observe(e), A.current = r;
|
|
165
|
-
}
|
|
166
|
-
},
|
|
167
|
-
[a]
|
|
168
|
-
);
|
|
169
|
-
return /* @__PURE__ */ n(Q, { children: [
|
|
170
|
-
/* @__PURE__ */ t("div", { className: Ae, children: /* @__PURE__ */ t(be, { containerId: "history-table" }) }),
|
|
171
|
-
/* @__PURE__ */ t(ze, { fallback: /* @__PURE__ */ t("div", {}), children: /* @__PURE__ */ t(
|
|
172
|
-
Ue,
|
|
173
|
-
{
|
|
174
|
-
filteredHistory: i,
|
|
175
|
-
historyState: R,
|
|
176
|
-
lastEntryToLoad: E,
|
|
177
|
-
onClickSort: H,
|
|
178
|
-
onClickRestore: K,
|
|
179
|
-
onClickDelete: Y,
|
|
180
|
-
onClickFavorite: q,
|
|
181
|
-
infinityScrollMarkerRef: W,
|
|
182
|
-
isLoading: b,
|
|
183
|
-
totalHistoryCount: k,
|
|
184
|
-
isFiltered: z,
|
|
185
|
-
isSearchActive: x,
|
|
186
|
-
activeChatId: l
|
|
187
|
-
}
|
|
188
|
-
) })
|
|
189
|
-
] });
|
|
190
|
-
}, Ze = ({
|
|
191
|
-
open: i,
|
|
192
|
-
onOpenChange: y
|
|
193
|
-
}) => {
|
|
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,
|
|
196
|
-
initialValue: o.searchString
|
|
197
|
-
}), [f, E] = u({
|
|
198
|
-
key: m + fe,
|
|
199
|
-
initialValue: !1
|
|
200
|
-
}), [_, c] = u({
|
|
201
|
-
key: m + Se,
|
|
202
|
-
initialValue: !0
|
|
203
|
-
}), [P, R] = O(!1), [S, D] = O(null), [L, v] = O(null), I = G(
|
|
204
|
-
(a, W) => {
|
|
205
|
-
D(() => a), v(W), R(!0);
|
|
206
|
-
},
|
|
207
|
-
[]
|
|
208
|
-
), w = G(() => {
|
|
209
|
-
S && S(), D(null), v(null);
|
|
210
|
-
}, [S]), {
|
|
211
|
-
data: p,
|
|
212
|
-
refetch: U,
|
|
213
|
-
isLoading: N,
|
|
214
|
-
isError: l
|
|
215
|
-
} = pe({
|
|
216
|
-
enabled: i,
|
|
217
|
-
user: k?.username || "",
|
|
218
|
-
searchString: o.searchString || "",
|
|
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
|
|
230
|
-
);
|
|
231
|
-
}, [p, f]);
|
|
232
|
-
const H = async (a) => {
|
|
233
|
-
A(a), g({
|
|
234
|
-
type: Te,
|
|
235
|
-
payload: { searchString: a }
|
|
236
|
-
});
|
|
237
|
-
}, j = Fe((a) => {
|
|
238
|
-
H(a.target.value.trim());
|
|
239
|
-
}, 800), K = async (a) => {
|
|
240
|
-
a.preventDefault();
|
|
241
|
-
}, Y = (a) => {
|
|
242
|
-
E(a);
|
|
243
|
-
}, q = (a) => {
|
|
244
|
-
c(a);
|
|
245
|
-
};
|
|
246
|
-
return /* @__PURE__ */ n(Q, { children: [
|
|
247
|
-
/* @__PURE__ */ t(
|
|
248
|
-
Ne,
|
|
249
|
-
{
|
|
250
|
-
showConfirmation: P,
|
|
251
|
-
setShowConfirmation: R,
|
|
252
|
-
action: w,
|
|
253
|
-
customStrings: {
|
|
254
|
-
confirmAction: "Delete",
|
|
255
|
-
cancelAction: "Cancel",
|
|
256
|
-
title: "Delete chat"
|
|
257
|
-
},
|
|
258
|
-
children: L
|
|
259
|
-
}
|
|
260
|
-
),
|
|
261
|
-
/* @__PURE__ */ n(
|
|
262
|
-
He,
|
|
263
|
-
{
|
|
264
|
-
open: i,
|
|
265
|
-
onOpenChange: y,
|
|
266
|
-
title: _e,
|
|
267
|
-
animation: !0,
|
|
268
|
-
animationType: "fade",
|
|
269
|
-
blurEffect: "large",
|
|
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 }) }) }),
|
|
272
|
-
children: [
|
|
273
|
-
/* @__PURE__ */ t(
|
|
274
|
-
ve,
|
|
275
|
-
{
|
|
276
|
-
header: N && o.searchString ? "Loading..." : o.searchString ? "Filters applied" : "Filters",
|
|
277
|
-
className: "prose-dark dark:prose-lighter mb-4",
|
|
278
|
-
noBorder: !0,
|
|
279
|
-
compact: !0,
|
|
280
|
-
children: /* @__PURE__ */ n("form", { autoComplete: "off", onSubmit: K, children: [
|
|
281
|
-
/* @__PURE__ */ t(
|
|
282
|
-
Ve,
|
|
283
|
-
{
|
|
284
|
-
placeholder: "Search",
|
|
285
|
-
labelHidden: !0,
|
|
286
|
-
noBorder: !0,
|
|
287
|
-
autoCapitalize: "off",
|
|
288
|
-
autoComplete: "off",
|
|
289
|
-
autoCorrect: "off",
|
|
290
|
-
ref: C,
|
|
291
|
-
defaultValue: o.searchString,
|
|
292
|
-
mode: "alt-system",
|
|
293
|
-
name: "Search",
|
|
294
|
-
label: "Search",
|
|
295
|
-
onChange: j,
|
|
296
|
-
className: "my-2",
|
|
297
|
-
rightElement: /* @__PURE__ */ t("div", { className: "dark:text-copy-dark text-copy-light", children: /* @__PURE__ */ t(De, { monotone: !0, size: "size-3" }) })
|
|
298
|
-
}
|
|
299
|
-
),
|
|
300
|
-
/* @__PURE__ */ n("div", { className: "flex flex-col justify-between sm:flex-row gap-2 sm:mb-0 mb-1", children: [
|
|
301
|
-
/* @__PURE__ */ n("div", { className: "flex flex-col sm:flex-row gap-2 order-1 sm:order-0", children: [
|
|
302
|
-
/* @__PURE__ */ t(
|
|
303
|
-
ee,
|
|
304
|
-
{
|
|
305
|
-
name: "favorites-only",
|
|
306
|
-
checked: f,
|
|
307
|
-
onChange: Y,
|
|
308
|
-
label: "Show favorites only",
|
|
309
|
-
narrow: !0,
|
|
310
|
-
noBorder: !0
|
|
311
|
-
}
|
|
312
|
-
),
|
|
313
|
-
/* @__PURE__ */ t(
|
|
314
|
-
ee,
|
|
315
|
-
{
|
|
316
|
-
name: "keyword-match-all",
|
|
317
|
-
checked: _,
|
|
318
|
-
onChange: q,
|
|
319
|
-
label: "Match all keywords",
|
|
320
|
-
narrow: !0,
|
|
321
|
-
noBorder: !0
|
|
322
|
-
}
|
|
323
|
-
)
|
|
324
|
-
] }),
|
|
325
|
-
/* @__PURE__ */ t(
|
|
326
|
-
Le,
|
|
327
|
-
{
|
|
328
|
-
mode: "light",
|
|
329
|
-
size: "small",
|
|
330
|
-
disabled: o.searchString === "",
|
|
331
|
-
onClick: () => {
|
|
332
|
-
H(""), C.current?.value && (C.current.value = "", C.current.focus());
|
|
333
|
-
},
|
|
334
|
-
children: "Reset Search"
|
|
335
|
-
}
|
|
336
|
-
)
|
|
337
|
-
] })
|
|
338
|
-
] })
|
|
339
|
-
}
|
|
340
|
-
),
|
|
341
|
-
/* @__PURE__ */ n(
|
|
342
|
-
"div",
|
|
343
|
-
{
|
|
344
|
-
className: Ge(
|
|
345
|
-
"flex flex-col sm:flex-row",
|
|
346
|
-
"max-h-[65vh]",
|
|
347
|
-
"sm:max-h-[75vh]",
|
|
348
|
-
"min-h-[60vh]"
|
|
349
|
-
),
|
|
350
|
-
children: [
|
|
351
|
-
l && /* @__PURE__ */ t("p", { className: "m-0 text-copy-error-light", children: "Failed to load history." }),
|
|
352
|
-
!l && /* @__PURE__ */ t(
|
|
353
|
-
Be,
|
|
354
|
-
{
|
|
355
|
-
mutate: U,
|
|
356
|
-
filteredHistory: z,
|
|
357
|
-
onOpenChange: y,
|
|
358
|
-
isLoading: N,
|
|
359
|
-
totalHistoryCount: B,
|
|
360
|
-
isFiltered: !!(o.searchString || f),
|
|
361
|
-
isSearchActive: !!o.searchString,
|
|
362
|
-
requestConfirmation: I
|
|
363
|
-
}
|
|
364
|
-
)
|
|
365
|
-
]
|
|
366
|
-
}
|
|
367
|
-
)
|
|
368
|
-
]
|
|
369
|
-
}
|
|
370
|
-
)
|
|
371
|
-
] });
|
|
372
|
-
};
|
|
373
|
-
export {
|
|
374
|
-
Ze as HistoryPanel
|
|
375
|
-
};
|