@versini/sassysaint 8.118.3 → 8.119.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.CzRPl_ZJ.js → AboutChangelog.B3zToB4T.js} +2 -2
- package/dist/chunks/{AboutEntry.T0dEx5ss.js → AboutEntry.Dc0GMtzL.js} +7 -7
- package/dist/chunks/{App.b-02jOnK.js → App.Bcw00dJK.js} +648 -647
- package/dist/chunks/{BubbleActions.DlzjlTV0.js → BubbleActions.BcwPpzhU.js} +3 -3
- package/dist/chunks/ButtonIconDelete.CASHORv6.js +523 -0
- package/dist/chunks/{Chart.DGg3yX93.js → Chart.B0oqrdYo.js} +2 -2
- package/dist/chunks/{ChatBubbleAssistant.DuOK1hTq.js → ChatBubbleAssistant.DAwx85Wd.js} +9 -6
- package/dist/chunks/{ChatBubbleUser.BbO4WHsG.js → ChatBubbleUser.BRTLYDmZ.js} +4 -4
- package/dist/chunks/HistoryDataGrid.Bg984Jd_.js +465 -0
- package/dist/chunks/HistoryEntry.4GpBDf9x.js +305 -0
- package/dist/chunks/InlineFilter.Cv_LUpTp.js +123 -0
- package/dist/chunks/{LoginEntry.BzDE1Poe.js → LoginEntry.5bQhuYQl.js} +4 -4
- package/dist/chunks/{LogoEntry.cAcKJnnq.js → LogoEntry.CN5P16eA.js} +175 -163
- package/dist/chunks/{MemoriesEntry.BOW5ccxB.js → MemoriesEntry.D0q1U5FD.js} +234 -206
- package/dist/chunks/{ProfileEntry.D0ZvtSLW.js → ProfileEntry.Ck-5SP70.js} +4 -4
- package/dist/chunks/{SettingsEntry.Cu6XoVBP.js → SettingsEntry.CfB9DKIp.js} +5 -5
- package/dist/chunks/{UsageEntry.Dg2VQMNQ.js → UsageEntry.BCFJMOjQ.js} +5 -5
- package/dist/chunks/{_baseUniq.CDFOdpsq.js → _baseUniq.DRTEXwBu.js} +1 -1
- package/dist/chunks/{arc.DIMWacuO.js → arc.x_GRGNuD.js} +1 -1
- package/dist/chunks/{architecture-U656AL7Q.EZuTwf79.js → architecture-U656AL7Q.DSfD0nUy.js} +1 -1
- package/dist/chunks/{architectureDiagram-VXUJARFQ.XWG69Opw.js → architectureDiagram-VXUJARFQ.CAS-oDjc.js} +4 -4
- package/dist/chunks/{blockDiagram-VD42YOAC.DTDyWto5.js → blockDiagram-VD42YOAC.P_XB2AgQ.js} +5 -5
- package/dist/chunks/{browser.BUwFK0it.js → browser.oW1ZW8ge.js} +1 -1
- package/dist/chunks/{c4Diagram-YG6GDRKO.CiOZ3jjz.js → c4Diagram-YG6GDRKO.Dc9Vyv3k.js} +2 -2
- package/dist/chunks/{channel.CNtCxYS9.js → channel.TjlRRr3U.js} +1 -1
- package/dist/chunks/{chunk-4BX2VUAB.BmiSnljb.js → chunk-4BX2VUAB.BwgmyLAX.js} +1 -1
- package/dist/chunks/{chunk-55IACEB6.CypQ3DlX.js → chunk-55IACEB6.Cgq1oeLK.js} +1 -1
- package/dist/chunks/{chunk-B4BG7PRW.CAsGHOXd.js → chunk-B4BG7PRW.Ds2wbzEG.js} +4 -4
- package/dist/chunks/{chunk-DI55MBZ5.BsvwBeSE.js → chunk-DI55MBZ5.Bft9jyaz.js} +3 -3
- package/dist/chunks/{chunk-FMBD7UC4.CMZG9a_j.js → chunk-FMBD7UC4.DF-Zr883.js} +1 -1
- package/dist/chunks/{chunk-QN33PNHL.B1G6yVKe.js → chunk-QN33PNHL.BVMRH_Hs.js} +1 -1
- package/dist/chunks/{chunk-QZHKN3VN.BVTUFZ9G.js → chunk-QZHKN3VN.DS306ds1.js} +1 -1
- package/dist/chunks/{chunk-TZMSLE5B.Cj68sFYC.js → chunk-TZMSLE5B.Cl4RUaGp.js} +1 -1
- package/dist/chunks/{classDiagram-2ON5EDUG.BdBLe1Pm.js → classDiagram-2ON5EDUG.DbFfjSp_.js} +2 -2
- package/dist/chunks/{classDiagram-v2-WZHVMYZB.BdBLe1Pm.js → classDiagram-v2-WZHVMYZB.DbFfjSp_.js} +2 -2
- package/dist/chunks/{clone.Bl1H1sdZ.js → clone.B8XxgJj0.js} +1 -1
- package/dist/chunks/{cose-bilkent-S5V4N54A.BngEZF8t.js → cose-bilkent-S5V4N54A.CL-tsB7O.js} +2 -2
- package/dist/chunks/{dagre-6UL2VRFP.BIOJIiYB.js → dagre-6UL2VRFP.7xKesqEK.js} +5 -5
- package/dist/chunks/{diagram-PSM6KHXK.BA3fj6Nq.js → diagram-PSM6KHXK.D6JNXJQr.js} +4 -4
- package/dist/chunks/{diagram-QEK2KX5R.BDz34UEM.js → diagram-QEK2KX5R.VaJKE9Ih.js} +3 -3
- package/dist/chunks/{diagram-S2PKOQOG.BtdDbeYp.js → diagram-S2PKOQOG.BjCuqhPd.js} +3 -3
- package/dist/chunks/{erDiagram-Q2GNP2WA.DYaFc4z-.js → erDiagram-Q2GNP2WA.BYnxwTG-.js} +4 -4
- package/dist/chunks/{flowDiagram-NV44I4VS.D-v3of4Q.js → flowDiagram-NV44I4VS.DefWDma3.js} +5 -5
- package/dist/chunks/{ganttDiagram-JELNMOA3.oDBdmAkc.js → ganttDiagram-JELNMOA3.BrEeaW2n.js} +2 -2
- package/dist/chunks/{gitGraph-F6HP7TQM.DN2di_Fe.js → gitGraph-F6HP7TQM.C4_YWAr0.js} +1 -1
- package/dist/chunks/{gitGraphDiagram-NY62KEGX.DajMwrkL.js → gitGraphDiagram-NY62KEGX.GGrXKGya.js} +4 -4
- package/dist/chunks/{graph.B6hUKMGa.js → graph.BxDrvENy.js} +2 -2
- package/dist/chunks/{index.BP0mr4EX.js → index.BMADibmh.js} +3 -3
- package/dist/chunks/{index.Ce-phw-r.js → index.CR0NHbVR.js} +1 -1
- package/dist/chunks/{index.5G9kbS3g.js → index.CZRaE0eA.js} +1 -1
- package/dist/chunks/{index.BK8xVBCf.js → index.CsAjUl3G.js} +3 -3
- package/dist/chunks/{index.DVhdxxbV.js → index.DOwjLeiM.js} +1 -1
- package/dist/chunks/{index.BdK0dyZF.js → index.DS9SCH32.js} +1 -1
- package/dist/chunks/{index.WKe5H80p.js → index.DvThh-C6.js} +1 -1
- package/dist/chunks/{index.CK-6GwI_.js → index.o4ZD5ALX.js} +5 -5
- package/dist/chunks/{index.BYnYkgl6.js → index.tqKeN7sl.js} +1 -1
- package/dist/chunks/{info-NVLQJR56.Ff-LQyU7.js → info-NVLQJR56.E0G9wIVE.js} +1 -1
- package/dist/chunks/{infoDiagram-WHAUD3N6.B1g8ka0M.js → infoDiagram-WHAUD3N6.CY9ADLsc.js} +2 -2
- package/dist/chunks/{journeyDiagram-XKPGCS4Q.B2pvmFIq.js → journeyDiagram-XKPGCS4Q.BZHhK7w4.js} +4 -4
- package/dist/chunks/{kanban-definition-3W4ZIXB7.86ACWbVN.js → kanban-definition-3W4ZIXB7.DQSZD0Em.js} +2 -2
- package/dist/chunks/{layout.BTjGFptt.js → layout.DUh_4gWb.js} +4 -4
- package/dist/chunks/{mermaid-parser.core.AD6ac88f.js → mermaid-parser.core.lAJFSSvC.js} +10 -10
- package/dist/chunks/{min.D3P2ZKZS.js → min.B3NH5ZNz.js} +2 -2
- package/dist/chunks/{mindmap-definition-VGOIOE7T.DODKOgNQ.js → mindmap-definition-VGOIOE7T.CVTcq_-S.js} +257 -232
- package/dist/chunks/{packet-BFZMPI3H.5TsgoQAg.js → packet-BFZMPI3H.CaaCaP6S.js} +1 -1
- package/dist/chunks/{pie-7BOR55EZ.Cjt_2-eq.js → pie-7BOR55EZ.Ctr5Wngs.js} +1 -1
- package/dist/chunks/{pieDiagram-ADFJNKIX.C5d0mn2P.js → pieDiagram-ADFJNKIX.v0K5SYBL.js} +4 -4
- package/dist/chunks/{quadrantDiagram-AYHSOK5B.Cpz6Q0uO.js → quadrantDiagram-AYHSOK5B.CSGhc5R-.js} +1 -1
- package/dist/chunks/{radar-NHE76QYJ.C4ikLYa9.js → radar-NHE76QYJ.BYJioslS.js} +1 -1
- package/dist/chunks/{rehype-mermaid.BAT9MpFC.js → rehype-mermaid.CYJb7tO-.js} +33 -33
- package/dist/chunks/{requirementDiagram-UZGBJVZJ.BxNfK087.js → requirementDiagram-UZGBJVZJ.07FdvPam.js} +3 -3
- package/dist/chunks/{sankeyDiagram-TZEHDZUN.DbQNnnUN.js → sankeyDiagram-TZEHDZUN.BJQl-LVq.js} +1 -1
- package/dist/chunks/{sequenceDiagram-WL72ISMW.BJlAOxoz.js → sequenceDiagram-WL72ISMW.D3HP-wCt.js} +3 -3
- package/dist/chunks/{stateDiagram-FKZM4ZOC.Dv1-v3Pv.js → stateDiagram-FKZM4ZOC.uXuYKEnS.js} +4 -4
- package/dist/chunks/{stateDiagram-v2-4FDKWEC3.C7A0KOQG.js → stateDiagram-v2-4FDKWEC3.i7NR_lBC.js} +2 -2
- package/dist/chunks/{timeline-definition-IT6M3QCI.BnnEO1qA.js → timeline-definition-IT6M3QCI.CfrxZtW7.js} +2 -2
- package/dist/chunks/{treemap-KMMF4GRG.ktiMR3IF.js → treemap-KMMF4GRG.D0E-EXib.js} +1 -1
- package/dist/chunks/{useMarkdown.gc4xGDfZ.js → useMarkdown.CVmi3L7b.js} +8 -8
- package/dist/chunks/{xychartDiagram-PRI3JC2R.RJg0uRPz.js → xychartDiagram-PRI3JC2R.BedGeb-X.js} +1 -1
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +3 -3
- package/dist/style.css +1 -1
- package/package.json +4 -4
- package/dist/chunks/ButtonIconDelete.c_Sj_7Q4.js +0 -326
- package/dist/chunks/ChatHistoryTable.6lV7mI6Q.js +0 -322
- package/dist/chunks/HistoryEntry.C8W5YNCP.js +0 -333
- package/dist/chunks/useAnimatedHeight.CkKrKI_C.js +0 -91
|
@@ -1,333 +0,0 @@
|
|
|
1
|
-
import { jsxs as l, jsx as t, Fragment as q } from "react/jsx-runtime";
|
|
2
|
-
import { n as ee, INFINITE_SCROLL_LIMIT as J, INFINITE_SCROLL_THRESHOLD as Z, LOCAL_STORAGE_PREFIX as m, LOCAL_STORAGE_SORT_TIMESTAMP as se, LOCAL_STORAGE_SORT_TOKEN_USAGE as oe, LOCAL_STORAGE_SORT as ne, y as V, LOCAL_STORAGE_CHAT_ID as ie, useDeleteChat as ce, useToggleFavoriteChat as le, graphQLRequest as de, SERVICE_TYPES as he, ACTION_SORT as ue, V as Ce, LOCAL_STORAGE_SEARCH as me, LOCAL_STORAGE_FAVORITES_ONLY as Se, LOCAL_STORAGE_KEYWORD_MATCH_ALL as fe, useChatsHistory as Te, useUserChatStats as ye, ACTION_SEARCH as ge } from "./index.CK-6GwI_.js";
|
|
3
|
-
import { useAiChat as Ae, useLocalStorage as S, LazyToastContainerWrapper as pe, v4 as Ee, CHAT_RESET as _e, CHAT_SET_ATTACHMENTS as De, CHAT_SET_STATUS as Le, showErrorToast as Oe, ConfirmationPanel as Re, Panel as ve, debounce as Ie, Toggle as $, ButtonCancel as ke } from "./App.b-02jOnK.js";
|
|
4
|
-
import { HistoryContext as te, ChatContext as be, TableCellSortDirections as C, APP_CLASSNAME as we, TOAST_CHAT_DELETED as He, HISTORY_TITLE as xe } from "./LogoEntry.cAcKJnnq.js";
|
|
5
|
-
import { useRef as G, useState as v, useContext as Q, useEffect as ae, useCallback as P, Suspense as Ne, lazy as Fe } from "react";
|
|
6
|
-
import { InlineFilter as Me, useAnimatedHeight as Ve } from "./useAnimatedHeight.CkKrKI_C.js";
|
|
7
|
-
const Ge = Fe(
|
|
8
|
-
() => import(
|
|
9
|
-
/* webpackChunkName: "history-table" */
|
|
10
|
-
"./ChatHistoryTable.6lV7mI6Q.js"
|
|
11
|
-
).then((n) => ({ default: n.ChatHistoryTable }))
|
|
12
|
-
), Pe = ({
|
|
13
|
-
filteredHistory: n,
|
|
14
|
-
onOpenChange: d,
|
|
15
|
-
mutate: h,
|
|
16
|
-
isLoading: f = !1,
|
|
17
|
-
totalHistoryCount: I,
|
|
18
|
-
isFiltered: U = !1,
|
|
19
|
-
isSearchActive: k = !1,
|
|
20
|
-
requestConfirmation: T
|
|
21
|
-
}) => {
|
|
22
|
-
const { user: s, getAccessToken: p } = ee(), E = G(null), y = G({
|
|
23
|
-
id: "",
|
|
24
|
-
timestamp: "",
|
|
25
|
-
message: ""
|
|
26
|
-
}), [_, D] = v(
|
|
27
|
-
J + Z
|
|
28
|
-
), { state: i, dispatch: z } = Q(te), b = {
|
|
29
|
-
searchString: i.searchString || "",
|
|
30
|
-
sortDirection: i.sortDirection || C.DESC,
|
|
31
|
-
sortedCell: i.sortedCell || V
|
|
32
|
-
}, {
|
|
33
|
-
setChatId: g,
|
|
34
|
-
setInitialMessages: L,
|
|
35
|
-
dispatch: O
|
|
36
|
-
} = Q(be), { setInput: R } = Ae(), [w, H] = S({
|
|
37
|
-
key: m + se,
|
|
38
|
-
initialValue: C.DESC
|
|
39
|
-
}), [A, K] = S({
|
|
40
|
-
key: m + oe,
|
|
41
|
-
initialValue: C.ASC
|
|
42
|
-
}), [, x] = S({
|
|
43
|
-
key: m + ne,
|
|
44
|
-
initialValue: V
|
|
45
|
-
}), [c] = S({
|
|
46
|
-
key: m + ie,
|
|
47
|
-
initialValue: ""
|
|
48
|
-
});
|
|
49
|
-
ae(() => {
|
|
50
|
-
if (!c || n.length === 0)
|
|
51
|
-
return;
|
|
52
|
-
const e = n.findIndex(
|
|
53
|
-
(o) => o.id === c
|
|
54
|
-
);
|
|
55
|
-
e >= 0 && e >= _ && D(e + Z);
|
|
56
|
-
}, [c, n, _]);
|
|
57
|
-
const { mutateAsync: u } = ce({ getAccessToken: p }), { mutateAsync: Y } = le({
|
|
58
|
-
getAccessToken: p
|
|
59
|
-
}), N = (e) => {
|
|
60
|
-
const o = i.sortedCell === e;
|
|
61
|
-
let r, M;
|
|
62
|
-
switch (e) {
|
|
63
|
-
case V:
|
|
64
|
-
M = H, r = o ? i.sortDirection : w;
|
|
65
|
-
break;
|
|
66
|
-
case Ce:
|
|
67
|
-
M = K, r = o ? i.sortDirection : A;
|
|
68
|
-
break;
|
|
69
|
-
default:
|
|
70
|
-
M = H, r = o ? i.sortDirection : w;
|
|
71
|
-
break;
|
|
72
|
-
}
|
|
73
|
-
const X = r === C.ASC ? C.DESC : C.ASC;
|
|
74
|
-
M(X), x(e), z({
|
|
75
|
-
type: ue,
|
|
76
|
-
payload: {
|
|
77
|
-
sortedCell: e,
|
|
78
|
-
sortDirection: X
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
}, j = async (e) => {
|
|
82
|
-
try {
|
|
83
|
-
await u({
|
|
84
|
-
userId: s?.username || "",
|
|
85
|
-
id: e
|
|
86
|
-
}), h(""), await Oe(He, {
|
|
87
|
-
autoClose: 2e3,
|
|
88
|
-
containerId: "history-table"
|
|
89
|
-
});
|
|
90
|
-
} catch {
|
|
91
|
-
}
|
|
92
|
-
}, B = async (e) => {
|
|
93
|
-
try {
|
|
94
|
-
const o = await p(), r = await de({
|
|
95
|
-
accessToken: o,
|
|
96
|
-
type: he.GET_CHAT,
|
|
97
|
-
params: {
|
|
98
|
-
id: e.id
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
O({
|
|
102
|
-
type: Le,
|
|
103
|
-
payload: {
|
|
104
|
-
streaming: !1,
|
|
105
|
-
loading: !1,
|
|
106
|
-
restoring: !0,
|
|
107
|
-
restoredModel: r.data?.model || "",
|
|
108
|
-
restoredTimestamp: r.data?.timestamp || "",
|
|
109
|
-
restoredUsage: r.data?.tokenUsage || 0
|
|
110
|
-
}
|
|
111
|
-
}), R(""), g(e.id), L(r.data.messages), d(!1);
|
|
112
|
-
} catch {
|
|
113
|
-
}
|
|
114
|
-
}, W = (e) => {
|
|
115
|
-
y.current = {
|
|
116
|
-
id: e.id,
|
|
117
|
-
timestamp: e.timestamp,
|
|
118
|
-
message: e.summary
|
|
119
|
-
}, T(
|
|
120
|
-
() => j(e.id),
|
|
121
|
-
/* @__PURE__ */ l(q, { children: [
|
|
122
|
-
/* @__PURE__ */ t("p", { className: "m-0", children: "Are you sure you want to delete the following chat:" }),
|
|
123
|
-
/* @__PURE__ */ l("ul", { className: "m-0", children: [
|
|
124
|
-
/* @__PURE__ */ l("li", { children: [
|
|
125
|
-
"Timestamp: ",
|
|
126
|
-
/* @__PURE__ */ t("span", { className: "text-lg", children: e.timestamp })
|
|
127
|
-
] }),
|
|
128
|
-
/* @__PURE__ */ l("li", { children: [
|
|
129
|
-
"First message: ",
|
|
130
|
-
/* @__PURE__ */ t("span", { className: "text-lg", children: e.summary })
|
|
131
|
-
] })
|
|
132
|
-
] })
|
|
133
|
-
] })
|
|
134
|
-
), c === e.id && (g(Ee()), L([]), R(""), O({
|
|
135
|
-
type: _e,
|
|
136
|
-
payload: {
|
|
137
|
-
privateChat: !1,
|
|
138
|
-
reasoningText: !1
|
|
139
|
-
}
|
|
140
|
-
}), O({
|
|
141
|
-
type: De,
|
|
142
|
-
payload: {
|
|
143
|
-
attachments: 0
|
|
144
|
-
}
|
|
145
|
-
}));
|
|
146
|
-
}, a = async (e) => {
|
|
147
|
-
try {
|
|
148
|
-
await Y({
|
|
149
|
-
userId: s?.username || "",
|
|
150
|
-
id: e.id
|
|
151
|
-
}), h("");
|
|
152
|
-
} catch {
|
|
153
|
-
}
|
|
154
|
-
}, F = P((e) => {
|
|
155
|
-
e[0].isIntersecting && D((r) => r + J);
|
|
156
|
-
}, []), re = P(
|
|
157
|
-
(e) => {
|
|
158
|
-
if (E.current && E.current.disconnect(), e) {
|
|
159
|
-
const o = {
|
|
160
|
-
rootMargin: "20px"
|
|
161
|
-
}, r = new IntersectionObserver(F, o);
|
|
162
|
-
r.observe(e), E.current = r;
|
|
163
|
-
}
|
|
164
|
-
},
|
|
165
|
-
[F]
|
|
166
|
-
);
|
|
167
|
-
return /* @__PURE__ */ l("div", { children: [
|
|
168
|
-
/* @__PURE__ */ t("div", { className: we, children: /* @__PURE__ */ t(pe, { containerId: "history-table" }) }),
|
|
169
|
-
/* @__PURE__ */ t(Ne, { fallback: /* @__PURE__ */ t("div", {}), children: /* @__PURE__ */ t(
|
|
170
|
-
Ge,
|
|
171
|
-
{
|
|
172
|
-
filteredHistory: n,
|
|
173
|
-
historyState: b,
|
|
174
|
-
lastEntryToLoad: _,
|
|
175
|
-
onClickSort: N,
|
|
176
|
-
onClickRestore: B,
|
|
177
|
-
onClickDelete: W,
|
|
178
|
-
onClickFavorite: a,
|
|
179
|
-
infinityScrollMarkerRef: re,
|
|
180
|
-
isLoading: f,
|
|
181
|
-
totalHistoryCount: I,
|
|
182
|
-
isFiltered: U,
|
|
183
|
-
isSearchActive: k,
|
|
184
|
-
activeChatId: c
|
|
185
|
-
}
|
|
186
|
-
) })
|
|
187
|
-
] });
|
|
188
|
-
};
|
|
189
|
-
function Ue(n) {
|
|
190
|
-
const d = n.filteredHistory?.length ?? 0, { ref: h, style: f } = Ve(d);
|
|
191
|
-
return /* @__PURE__ */ t("div", { ref: h, style: f, children: /* @__PURE__ */ t(Pe, { ...n }) });
|
|
192
|
-
}
|
|
193
|
-
const qe = ({
|
|
194
|
-
open: n,
|
|
195
|
-
onOpenChange: d
|
|
196
|
-
}) => {
|
|
197
|
-
const h = G(null), { getAccessToken: f, user: I } = ee(), [U, k] = v([]), T = G(null), { state: s, dispatch: p } = Q(te), [, E] = S({
|
|
198
|
-
key: m + me,
|
|
199
|
-
initialValue: s.searchString
|
|
200
|
-
}), [y, _] = S({
|
|
201
|
-
key: m + Se,
|
|
202
|
-
initialValue: !1
|
|
203
|
-
}), [D, i] = S({
|
|
204
|
-
key: m + fe,
|
|
205
|
-
initialValue: !0
|
|
206
|
-
}), [z, b] = v(!1), [g, L] = v(null), [O, R] = v(null), w = P(
|
|
207
|
-
(a, F) => {
|
|
208
|
-
L(() => a), R(F), b(!0);
|
|
209
|
-
},
|
|
210
|
-
[]
|
|
211
|
-
), H = P(() => {
|
|
212
|
-
g && g(), L(null), R(null);
|
|
213
|
-
}, [g]), {
|
|
214
|
-
data: A,
|
|
215
|
-
refetch: K,
|
|
216
|
-
isLoading: x,
|
|
217
|
-
isError: c
|
|
218
|
-
} = Te({
|
|
219
|
-
enabled: n,
|
|
220
|
-
user: I?.username || "",
|
|
221
|
-
searchString: s.searchString || "",
|
|
222
|
-
sortDirection: s.sortDirection || C.DESC,
|
|
223
|
-
sortedCell: s.sortedCell || V,
|
|
224
|
-
getAccessToken: f,
|
|
225
|
-
keywordMatchAll: D
|
|
226
|
-
}), { data: u } = ye({
|
|
227
|
-
user: I?.username,
|
|
228
|
-
getAccessToken: f
|
|
229
|
-
}), Y = u && u.totalChats ? u.totalChats - u.privateChats - u.deletedChats : 0;
|
|
230
|
-
ae(() => {
|
|
231
|
-
A && k(
|
|
232
|
-
y ? A.filter((a) => a.favoriteChat === !0) : A
|
|
233
|
-
);
|
|
234
|
-
}, [A, y]);
|
|
235
|
-
const N = async (a) => {
|
|
236
|
-
E(a), p({
|
|
237
|
-
type: ge,
|
|
238
|
-
payload: { searchString: a }
|
|
239
|
-
});
|
|
240
|
-
}, j = Ie((a) => {
|
|
241
|
-
N(a.target.value.trim());
|
|
242
|
-
}, 800), B = (a) => {
|
|
243
|
-
_(a);
|
|
244
|
-
}, W = (a) => {
|
|
245
|
-
i(a);
|
|
246
|
-
};
|
|
247
|
-
return /* @__PURE__ */ l(q, { children: [
|
|
248
|
-
/* @__PURE__ */ t(
|
|
249
|
-
Re,
|
|
250
|
-
{
|
|
251
|
-
showConfirmation: z,
|
|
252
|
-
setShowConfirmation: b,
|
|
253
|
-
action: H,
|
|
254
|
-
customStrings: {
|
|
255
|
-
confirmAction: "Delete",
|
|
256
|
-
cancelAction: "Cancel",
|
|
257
|
-
title: "Delete chat"
|
|
258
|
-
},
|
|
259
|
-
children: O
|
|
260
|
-
}
|
|
261
|
-
),
|
|
262
|
-
/* @__PURE__ */ t(
|
|
263
|
-
ve,
|
|
264
|
-
{
|
|
265
|
-
open: n,
|
|
266
|
-
onOpenChange: d,
|
|
267
|
-
title: xe,
|
|
268
|
-
animation: !0,
|
|
269
|
-
animationType: "fade",
|
|
270
|
-
blurEffect: "large",
|
|
271
|
-
initialFocus: h,
|
|
272
|
-
className: "h-full sm:h-max",
|
|
273
|
-
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(ke, { onOpenChange: d, ref: h }) }) }),
|
|
274
|
-
children: /* @__PURE__ */ l("div", { className: "flex h-full flex-col gap-4", children: [
|
|
275
|
-
/* @__PURE__ */ t(
|
|
276
|
-
Me,
|
|
277
|
-
{
|
|
278
|
-
header: x && s.searchString ? "Loading..." : s.searchString ? "Filters applied" : "Filters",
|
|
279
|
-
toggles: /* @__PURE__ */ l(q, { children: [
|
|
280
|
-
/* @__PURE__ */ t(
|
|
281
|
-
$,
|
|
282
|
-
{
|
|
283
|
-
name: "favorites-only",
|
|
284
|
-
checked: y,
|
|
285
|
-
onChange: B,
|
|
286
|
-
label: "Show favorites only",
|
|
287
|
-
narrow: !0,
|
|
288
|
-
noBorder: !0
|
|
289
|
-
}
|
|
290
|
-
),
|
|
291
|
-
/* @__PURE__ */ t(
|
|
292
|
-
$,
|
|
293
|
-
{
|
|
294
|
-
name: "keyword-match-all",
|
|
295
|
-
checked: D,
|
|
296
|
-
onChange: W,
|
|
297
|
-
label: "Match all keywords",
|
|
298
|
-
narrow: !0,
|
|
299
|
-
noBorder: !0
|
|
300
|
-
}
|
|
301
|
-
)
|
|
302
|
-
] }),
|
|
303
|
-
inputSearchRef: T,
|
|
304
|
-
onSearchChange: j,
|
|
305
|
-
defaultValue: s.searchString,
|
|
306
|
-
resetDisabled: s.searchString === "",
|
|
307
|
-
onResetSearch: () => {
|
|
308
|
-
N(""), T.current?.value && (T.current.value = "", T.current.focus());
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
),
|
|
312
|
-
c && /* @__PURE__ */ t("p", { className: "m-0 text-copy-error-light", children: "Failed to load history." }),
|
|
313
|
-
!c && /* @__PURE__ */ t(
|
|
314
|
-
Ue,
|
|
315
|
-
{
|
|
316
|
-
mutate: K,
|
|
317
|
-
filteredHistory: U,
|
|
318
|
-
onOpenChange: d,
|
|
319
|
-
isLoading: x,
|
|
320
|
-
totalHistoryCount: Y,
|
|
321
|
-
isFiltered: !!(s.searchString || y),
|
|
322
|
-
isSearchActive: !!s.searchString,
|
|
323
|
-
requestConfirmation: w
|
|
324
|
-
}
|
|
325
|
-
)
|
|
326
|
-
] })
|
|
327
|
-
}
|
|
328
|
-
)
|
|
329
|
-
] });
|
|
330
|
-
};
|
|
331
|
-
export {
|
|
332
|
-
qe as HistoryPanel
|
|
333
|
-
};
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { jsxs as h, jsx as u } from "react/jsx-runtime";
|
|
2
|
-
import { IconSearch as d, Button as p } from "./LogoEntry.cAcKJnnq.js";
|
|
3
|
-
import { Card as x } from "./index.BYnYkgl6.js";
|
|
4
|
-
import { TextInput as A } from "./index.5G9kbS3g.js";
|
|
5
|
-
import { useRef as m, useState as v, useLayoutEffect as S } from "react";
|
|
6
|
-
const k = ({
|
|
7
|
-
header: e,
|
|
8
|
-
toggles: o,
|
|
9
|
-
inputSearchRef: t,
|
|
10
|
-
onSearchChange: r,
|
|
11
|
-
onResetSearch: a,
|
|
12
|
-
defaultValue: i,
|
|
13
|
-
resetDisabled: s = !1
|
|
14
|
-
}) => /* @__PURE__ */ h(
|
|
15
|
-
x,
|
|
16
|
-
{
|
|
17
|
-
header: e,
|
|
18
|
-
className: "prose-dark dark:prose-lighter mb-4",
|
|
19
|
-
noBorder: !0,
|
|
20
|
-
compact: !0,
|
|
21
|
-
children: [
|
|
22
|
-
/* @__PURE__ */ u(
|
|
23
|
-
A,
|
|
24
|
-
{
|
|
25
|
-
placeholder: "Search",
|
|
26
|
-
labelHidden: !0,
|
|
27
|
-
noBorder: !0,
|
|
28
|
-
autoCapitalize: "off",
|
|
29
|
-
autoComplete: "off",
|
|
30
|
-
autoCorrect: "off",
|
|
31
|
-
ref: t,
|
|
32
|
-
defaultValue: i,
|
|
33
|
-
mode: "alt-system",
|
|
34
|
-
name: "Search",
|
|
35
|
-
label: "Search",
|
|
36
|
-
onChange: r,
|
|
37
|
-
className: "my-2",
|
|
38
|
-
rightElement: /* @__PURE__ */ u("div", { className: "dark:text-copy-dark text-copy-light", children: /* @__PURE__ */ u(d, { monotone: !0, size: "size-3" }) })
|
|
39
|
-
}
|
|
40
|
-
),
|
|
41
|
-
/* @__PURE__ */ h("div", { className: "flex flex-col justify-between sm:flex-row gap-2 sm:mb-0 mb-1", children: [
|
|
42
|
-
/* @__PURE__ */ u("div", { className: "flex flex-col sm:flex-row gap-2 order-1 sm:order-0", children: o }),
|
|
43
|
-
/* @__PURE__ */ u(
|
|
44
|
-
p,
|
|
45
|
-
{
|
|
46
|
-
mode: "light",
|
|
47
|
-
size: "small",
|
|
48
|
-
disabled: s,
|
|
49
|
-
onClick: a,
|
|
50
|
-
children: "Reset Search"
|
|
51
|
-
}
|
|
52
|
-
)
|
|
53
|
-
] })
|
|
54
|
-
]
|
|
55
|
-
}
|
|
56
|
-
);
|
|
57
|
-
function w(e, o = 300) {
|
|
58
|
-
const t = m(null), [r, a] = v({ height: "auto", isAnimating: !1 }), i = m(0), s = m(e), n = m(0), c = m(null);
|
|
59
|
-
S(() => {
|
|
60
|
-
if (!t.current)
|
|
61
|
-
return;
|
|
62
|
-
if (i.current === 0) {
|
|
63
|
-
i.current = t.current.offsetHeight, s.current = e;
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
if (s.current === e)
|
|
67
|
-
return;
|
|
68
|
-
s.current = e;
|
|
69
|
-
const l = i.current, f = t.current.scrollHeight;
|
|
70
|
-
if (i.current = f, !(l === f || l === 0))
|
|
71
|
-
return c.current && clearTimeout(c.current), n.current && cancelAnimationFrame(n.current), a({ height: l, isAnimating: !0 }), n.current = requestAnimationFrame(() => {
|
|
72
|
-
n.current = requestAnimationFrame(() => {
|
|
73
|
-
a({ height: f, isAnimating: !0 }), c.current = setTimeout(() => {
|
|
74
|
-
a({ height: "auto", isAnimating: !1 });
|
|
75
|
-
}, o);
|
|
76
|
-
});
|
|
77
|
-
}), () => {
|
|
78
|
-
c.current && clearTimeout(c.current), n.current && cancelAnimationFrame(n.current);
|
|
79
|
-
};
|
|
80
|
-
}, [e, o]);
|
|
81
|
-
const g = {
|
|
82
|
-
height: r.height === "auto" ? "auto" : `${r.height}px`,
|
|
83
|
-
overflow: r.isAnimating ? "hidden" : void 0,
|
|
84
|
-
transition: r.isAnimating ? `height ${o}ms ease-out` : void 0
|
|
85
|
-
};
|
|
86
|
-
return { ref: t, style: g };
|
|
87
|
-
}
|
|
88
|
-
export {
|
|
89
|
-
k as InlineFilter,
|
|
90
|
-
w as useAnimatedHeight
|
|
91
|
-
};
|