@versini/sassysaint 8.118.4 → 8.119.1
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.Dspi4cmi.js → AboutChangelog.DUUKJ4nJ.js} +2 -2
- package/dist/chunks/{AboutEntry.DxWZPlbg.js → AboutEntry.HowTPv8P.js} +7 -7
- package/dist/chunks/{App.yIuQGm0t.js → App.YH7VhNjK.js} +647 -646
- package/dist/chunks/{BubbleActions.BMYwxyEv.js → BubbleActions.CVas6oiy.js} +3 -3
- package/dist/chunks/ButtonIconDelete.DLIImGjj.js +538 -0
- package/dist/chunks/{Chart.C1IWoXDe.js → Chart.CgyzOc3_.js} +2 -2
- package/dist/chunks/{ChatBubbleAssistant.BKlO1McH.js → ChatBubbleAssistant.PmI4ABQt.js} +9 -6
- package/dist/chunks/{ChatBubbleUser.CSjDB1B9.js → ChatBubbleUser.YIoXqbVF.js} +4 -4
- package/dist/chunks/HistoryDataGrid.Dxc-zHra.js +487 -0
- package/dist/chunks/HistoryEntry.fta5Qy7u.js +305 -0
- package/dist/chunks/InlineFilter.BV1LITjW.js +123 -0
- package/dist/chunks/{LoginEntry.BEPZiizw.js → LoginEntry.s9rmuYKn.js} +4 -4
- package/dist/chunks/{LogoEntry.BZFz5IRw.js → LogoEntry.BAI8lPSQ.js} +175 -163
- package/dist/chunks/{MemoriesEntry.C40K6l5F.js → MemoriesEntry.z0U8T17Y.js} +234 -206
- package/dist/chunks/{ProfileEntry.C0WTyHem.js → ProfileEntry.CbUS7vRG.js} +4 -4
- package/dist/chunks/{SettingsEntry.B1WFVdjg.js → SettingsEntry.LEugTL8A.js} +5 -5
- package/dist/chunks/{UsageEntry.CPOickJC.js → UsageEntry.DMIbfTUl.js} +5 -5
- package/dist/chunks/{_baseUniq.YXUy3_Q9.js → _baseUniq.3SecgKQH.js} +1 -1
- package/dist/chunks/{arc.CgPKPJv0.js → arc.BDfa_lp3.js} +1 -1
- package/dist/chunks/{architecture-U656AL7Q.D2ZUn_s6.js → architecture-U656AL7Q.HFVQwsOS.js} +1 -1
- package/dist/chunks/{architectureDiagram-VXUJARFQ.DbVJLkeI.js → architectureDiagram-VXUJARFQ.BvrTiPQ0.js} +4 -4
- package/dist/chunks/{blockDiagram-VD42YOAC.DFlSEVyA.js → blockDiagram-VD42YOAC.DOklLUrl.js} +5 -5
- package/dist/chunks/{browser.DtDEL-3A.js → browser.DQk9GqZL.js} +1 -1
- package/dist/chunks/{c4Diagram-YG6GDRKO.CiBMNtX8.js → c4Diagram-YG6GDRKO.BFUTTk1Y.js} +2 -2
- package/dist/chunks/{channel.DS55bkfq.js → channel.BOFo9Gr-.js} +1 -1
- package/dist/chunks/{chunk-4BX2VUAB.t3AfQtrb.js → chunk-4BX2VUAB.CvDkLN8F.js} +1 -1
- package/dist/chunks/{chunk-55IACEB6.tlGBBIP8.js → chunk-55IACEB6.B2kRln8j.js} +1 -1
- package/dist/chunks/{chunk-B4BG7PRW.DB-Y3GhQ.js → chunk-B4BG7PRW.Corbwbnt.js} +4 -4
- package/dist/chunks/{chunk-DI55MBZ5.CkwKVFLI.js → chunk-DI55MBZ5.BT3HHSn0.js} +3 -3
- package/dist/chunks/{chunk-FMBD7UC4.CRLAfQmx.js → chunk-FMBD7UC4.5EY27HC-.js} +1 -1
- package/dist/chunks/{chunk-QN33PNHL.DF4bWkbp.js → chunk-QN33PNHL.BbRol0tK.js} +1 -1
- package/dist/chunks/{chunk-QZHKN3VN.BijmX3ar.js → chunk-QZHKN3VN.BDDo68fx.js} +1 -1
- package/dist/chunks/{chunk-TZMSLE5B.BIvqaR0r.js → chunk-TZMSLE5B.DUziio9C.js} +1 -1
- package/dist/chunks/{classDiagram-2ON5EDUG.SU5U-1P1.js → classDiagram-2ON5EDUG.CQzgRWsN.js} +2 -2
- package/dist/chunks/{classDiagram-v2-WZHVMYZB.SU5U-1P1.js → classDiagram-v2-WZHVMYZB.CQzgRWsN.js} +2 -2
- package/dist/chunks/{clone.8clUx6ET.js → clone.BbTV7Hf1.js} +1 -1
- package/dist/chunks/{cose-bilkent-S5V4N54A.DnWtIsYd.js → cose-bilkent-S5V4N54A.H-phdC7M.js} +2 -2
- package/dist/chunks/{dagre-6UL2VRFP.C8KeFvOQ.js → dagre-6UL2VRFP.x6Rep04B.js} +5 -5
- package/dist/chunks/{diagram-PSM6KHXK.DnzHPurw.js → diagram-PSM6KHXK.CSCzs70K.js} +4 -4
- package/dist/chunks/{diagram-QEK2KX5R.DCKZbQSh.js → diagram-QEK2KX5R.Dtem9HUK.js} +3 -3
- package/dist/chunks/{diagram-S2PKOQOG.lY2nb2ry.js → diagram-S2PKOQOG.zbHWbMaf.js} +3 -3
- package/dist/chunks/{erDiagram-Q2GNP2WA.BYtHx1uZ.js → erDiagram-Q2GNP2WA.BtpqAsGU.js} +4 -4
- package/dist/chunks/{flowDiagram-NV44I4VS.G-nRLM7M.js → flowDiagram-NV44I4VS.DWAr7BjD.js} +5 -5
- package/dist/chunks/{ganttDiagram-JELNMOA3.B7RwC1m-.js → ganttDiagram-JELNMOA3.CMrQ-dz3.js} +2 -2
- package/dist/chunks/{gitGraph-F6HP7TQM.Chwk8Igs.js → gitGraph-F6HP7TQM.BpVVMz0e.js} +1 -1
- package/dist/chunks/{gitGraphDiagram-NY62KEGX.BQpsCwST.js → gitGraphDiagram-NY62KEGX.Dnudwhw8.js} +4 -4
- package/dist/chunks/{graph.toxuN_lw.js → graph.Dchkn011.js} +2 -2
- package/dist/chunks/{index.KxPrp_tf.js → index.B-JCLT_X.js} +3 -3
- package/dist/chunks/{index.Bt339Jho.js → index.B8WGlS1_.js} +1 -1
- package/dist/chunks/{index.petd1VFV.js → index.C1iOYl0L.js} +1 -1
- package/dist/chunks/{index.BlDUpXR0.js → index.CFiwZc0d.js} +1 -1
- package/dist/chunks/{index.ChIqgESd.js → index.CJdOzh65.js} +1 -1
- package/dist/chunks/{index.mDr9FsVI.js → index.CKTPHcKB.js} +1 -1
- package/dist/chunks/{index.D_muERB9.js → index.CtIbZ6tf.js} +1 -1
- package/dist/chunks/{index.7D5oQmQR.js → index.CxH0cB2j.js} +3 -3
- package/dist/chunks/{index.hGvmkGha.js → index.jtqzynwK.js} +2 -2
- package/dist/chunks/{info-NVLQJR56.DqwhVDNM.js → info-NVLQJR56.D6y19kSs.js} +1 -1
- package/dist/chunks/{infoDiagram-WHAUD3N6.Bz9PwgrD.js → infoDiagram-WHAUD3N6.Df1Bl645.js} +2 -2
- package/dist/chunks/{journeyDiagram-XKPGCS4Q.b8ugCUee.js → journeyDiagram-XKPGCS4Q.Ci2alRy7.js} +4 -4
- package/dist/chunks/{kanban-definition-3W4ZIXB7.ruPmZWrk.js → kanban-definition-3W4ZIXB7.DfuyRvt8.js} +2 -2
- package/dist/chunks/{layout.Bw1IU1i2.js → layout.D90hHM4d.js} +4 -4
- package/dist/chunks/{mermaid-parser.core.BgEYW9Yt.js → mermaid-parser.core.DLE_P-x2.js} +10 -10
- package/dist/chunks/{min.C98rd9wr.js → min.B0AjWADq.js} +2 -2
- package/dist/chunks/{mindmap-definition-VGOIOE7T.VWXpOB6F.js → mindmap-definition-VGOIOE7T.Bu83LzTN.js} +257 -232
- package/dist/chunks/{packet-BFZMPI3H.BYL6GQTI.js → packet-BFZMPI3H.DxZoEqgw.js} +1 -1
- package/dist/chunks/{pie-7BOR55EZ.BbY5iD1e.js → pie-7BOR55EZ.DWdiSl6K.js} +1 -1
- package/dist/chunks/{pieDiagram-ADFJNKIX.CsOtW7r-.js → pieDiagram-ADFJNKIX.BDwKttQ7.js} +4 -4
- package/dist/chunks/{quadrantDiagram-AYHSOK5B.7UFNI_vX.js → quadrantDiagram-AYHSOK5B.CRt3S_H1.js} +1 -1
- package/dist/chunks/{radar-NHE76QYJ.DvagCir3.js → radar-NHE76QYJ.CoZXKuQy.js} +1 -1
- package/dist/chunks/{rehype-mermaid.hM-_EEUn.js → rehype-mermaid.Om4IoSir.js} +33 -33
- package/dist/chunks/{requirementDiagram-UZGBJVZJ.CBvrcwfU.js → requirementDiagram-UZGBJVZJ.DlBPAOx9.js} +3 -3
- package/dist/chunks/{sankeyDiagram-TZEHDZUN.DwPokg-1.js → sankeyDiagram-TZEHDZUN.BZytE4s9.js} +1 -1
- package/dist/chunks/{sequenceDiagram-WL72ISMW.DTlYi-bq.js → sequenceDiagram-WL72ISMW.Bbuw9Hz-.js} +3 -3
- package/dist/chunks/{stateDiagram-FKZM4ZOC.B3zjLqs6.js → stateDiagram-FKZM4ZOC.BsnKKwn5.js} +4 -4
- package/dist/chunks/{stateDiagram-v2-4FDKWEC3.M0ePKl-7.js → stateDiagram-v2-4FDKWEC3.BsNASJkO.js} +2 -2
- package/dist/chunks/{timeline-definition-IT6M3QCI.QqZxgHc2.js → timeline-definition-IT6M3QCI.R8tQley7.js} +2 -2
- package/dist/chunks/{treemap-KMMF4GRG.BmCv7l6d.js → treemap-KMMF4GRG.Cs8W98VP.js} +1 -1
- package/dist/chunks/{useMarkdown.ZHvHgCd8.js → useMarkdown.Bzgv93hs.js} +8 -8
- package/dist/chunks/{xychartDiagram-PRI3JC2R.CPjv7vTS.js → xychartDiagram-PRI3JC2R.SMqCrVMM.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.BMqZFgu1.js +0 -326
- package/dist/chunks/ChatHistoryTable.B8dA3To0.js +0 -322
- package/dist/chunks/HistoryEntry.Bhv62llk.js +0 -333
- package/dist/chunks/useAnimatedHeight.3F4Xj7iE.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.hGvmkGha.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.yIuQGm0t.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.BZFz5IRw.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.3F4Xj7iE.js";
|
|
7
|
-
const Ge = Fe(
|
|
8
|
-
() => import(
|
|
9
|
-
/* webpackChunkName: "history-table" */
|
|
10
|
-
"./ChatHistoryTable.B8dA3To0.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.BZFz5IRw.js";
|
|
3
|
-
import { Card as x } from "./index.BlDUpXR0.js";
|
|
4
|
-
import { TextInput as A } from "./index.mDr9FsVI.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
|
-
};
|