@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.
- package/dist/chunks/{AboutChangelog.h8uZDiRa.js → AboutChangelog.Bn_KfUZc.js} +2 -2
- package/dist/chunks/{AboutEntry.Dm-VAlos.js → AboutEntry.GETrm77g.js} +7 -7
- package/dist/chunks/{App.kZ7zFOCZ.js → App.BzCbkgv8.js} +2478 -2344
- package/dist/chunks/BubbleActions.CbQ9BHWl.js +174 -0
- package/dist/chunks/{ButtonIconDelete.CMTWH4G_.js → ButtonIconDelete.B5IpSZrD.js} +112 -100
- package/dist/chunks/{Chart.DjDJmuv4.js → Chart.Czhhtzdx.js} +2 -2
- package/dist/chunks/{ChatBubbleAssistant.Ct1kuBfY.js → ChatBubbleAssistant.DESMaXGq.js} +682 -663
- package/dist/chunks/{ChatBubbleUser.DWjAo_57.js → ChatBubbleUser.B_Sniupu.js} +39 -33
- package/dist/chunks/{ChatHistoryTable.CPGJDP3u.js → ChatHistoryTable.LPF05gFQ.js} +136 -110
- package/dist/chunks/{HistoryEntry.vorKgBkE.js → HistoryEntry.CbyRX9rD.js} +148 -138
- package/dist/chunks/{LoginEntry.DMTx7dAX.js → LoginEntry.Bf8vuUIL.js} +4 -4
- package/dist/chunks/{LogoEntry.QCG_Oqpu.js → LogoEntry.yn5_B-fa.js} +193 -176
- package/dist/chunks/{MemoriesEntry.NKPDzd6E.js → MemoriesEntry.Bljvi6W9.js} +5 -5
- package/dist/chunks/{ProfileEntry.D4nsWyk-.js → ProfileEntry.DitROf-m.js} +4 -4
- package/dist/chunks/SettingsEntry.DUMuo462.js +446 -0
- package/dist/chunks/{UsageEntry.3E-1gpeB.js → UsageEntry.CFMWYodz.js} +5 -5
- package/dist/chunks/{_baseUniq.C9w-5slz.js → _baseUniq.D6y3dh-S.js} +1 -1
- package/dist/chunks/{arc.Bhkeu8Ne.js → arc.CitIvzp8.js} +1 -1
- package/dist/chunks/{architecture-U656AL7Q.BQ0dLOXF.js → architecture-U656AL7Q.IEP3vDFZ.js} +1 -1
- package/dist/chunks/{architectureDiagram-VXUJARFQ.PMB1snGu.js → architectureDiagram-VXUJARFQ.BhDBUrYi.js} +4 -4
- package/dist/chunks/{blockDiagram-VD42YOAC.cc6SS-Ut.js → blockDiagram-VD42YOAC.BFTM8GAn.js} +5 -5
- package/dist/chunks/{browser.-b7MIoe3.js → browser.DK_o_vwl.js} +1 -1
- package/dist/chunks/{c4Diagram-YG6GDRKO.CkH4zhHB.js → c4Diagram-YG6GDRKO.B1vLaqvZ.js} +2 -2
- package/dist/chunks/{channel.BZF7A0lk.js → channel.PCRnhDz7.js} +1 -1
- package/dist/chunks/{chunk-4BX2VUAB.Cp0rcpX_.js → chunk-4BX2VUAB.C6rU7w6S.js} +1 -1
- package/dist/chunks/{chunk-55IACEB6.vT382srr.js → chunk-55IACEB6.BpJZHN1o.js} +1 -1
- package/dist/chunks/{chunk-B4BG7PRW.D1UQqJBC.js → chunk-B4BG7PRW.F4PL3cMr.js} +4 -4
- package/dist/chunks/{chunk-DI55MBZ5.BGj41J2L.js → chunk-DI55MBZ5.BF8GKejt.js} +3 -3
- package/dist/chunks/{chunk-FMBD7UC4.DbK41wsg.js → chunk-FMBD7UC4.B1OYwU0R.js} +1 -1
- package/dist/chunks/{chunk-QN33PNHL.CKXkOIKW.js → chunk-QN33PNHL.BD5brt5t.js} +1 -1
- package/dist/chunks/{chunk-QZHKN3VN.BqCNNrna.js → chunk-QZHKN3VN.D5WYYv36.js} +1 -1
- package/dist/chunks/{chunk-TZMSLE5B.GMeazl5c.js → chunk-TZMSLE5B.C-MZAsEe.js} +1 -1
- package/dist/chunks/{classDiagram-2ON5EDUG.D9HdU8dF.js → classDiagram-2ON5EDUG.C5vYqJ4o.js} +2 -2
- package/dist/chunks/{classDiagram-v2-WZHVMYZB.D9HdU8dF.js → classDiagram-v2-WZHVMYZB.C5vYqJ4o.js} +2 -2
- package/dist/chunks/{clone.BvA919-S.js → clone.REJ_Pnlj.js} +1 -1
- package/dist/chunks/{cose-bilkent-S5V4N54A.Cgu7-tFO.js → cose-bilkent-S5V4N54A.DXqAwGZ0.js} +2 -2
- package/dist/chunks/{dagre-6UL2VRFP.BknfeRUw.js → dagre-6UL2VRFP.CoGy5JIV.js} +5 -5
- package/dist/chunks/{diagram-PSM6KHXK.C_6k_6p5.js → diagram-PSM6KHXK.D9vCcidT.js} +4 -4
- package/dist/chunks/{diagram-QEK2KX5R.DJy76ACj.js → diagram-QEK2KX5R.6csREdR0.js} +3 -3
- package/dist/chunks/{diagram-S2PKOQOG.CfC-dKeX.js → diagram-S2PKOQOG.YPf4qVIj.js} +3 -3
- package/dist/chunks/{erDiagram-Q2GNP2WA.Dq-M4wvK.js → erDiagram-Q2GNP2WA.CGV8xXOX.js} +4 -4
- package/dist/chunks/{flowDiagram-NV44I4VS.CWEOg9vI.js → flowDiagram-NV44I4VS.eQKIimm7.js} +5 -5
- package/dist/chunks/{ganttDiagram-JELNMOA3.B7lZEF5Y.js → ganttDiagram-JELNMOA3.BazHhqv4.js} +2 -2
- package/dist/chunks/{gitGraph-F6HP7TQM.BpsZ10rD.js → gitGraph-F6HP7TQM.Cb-fQXsF.js} +1 -1
- package/dist/chunks/{gitGraphDiagram-NY62KEGX.BEr46lqB.js → gitGraphDiagram-NY62KEGX.Dvqk5LX3.js} +4 -4
- package/dist/chunks/{graph.duUTsfAo.js → graph.CgbRK_Pv.js} +2 -2
- package/dist/chunks/{index.C7L6Qy0p.js → index.BEg4_Utt.js} +1 -1
- package/dist/chunks/{index.CQB6p5rc.js → index.BMJ9q_CF.js} +3 -3
- package/dist/chunks/{index.BEImwMfM.js → index.BkL02aS1.js} +3 -3
- package/dist/chunks/{index.BocHTBAX.js → index.BkPtehbe.js} +1 -1
- package/dist/chunks/{index.CZzUkzEP.js → index.Bzms2RRF.js} +1 -1
- package/dist/chunks/{index.1lyseSZD.js → index.CX_kqcF4.js} +1 -1
- package/dist/chunks/{index.Duppkty5.js → index.DzZEadJV.js} +1 -1
- package/dist/chunks/{index.D5GVHxAW.js → index.OAZ5W9VH.js} +5 -2
- package/dist/chunks/{index.C8LhNQL3.js → index.hL-ju5aR.js} +1 -1
- package/dist/chunks/{info-NVLQJR56.rpoj5hAd.js → info-NVLQJR56.53x0eQWW.js} +1 -1
- package/dist/chunks/{infoDiagram-WHAUD3N6.1qgGbBxV.js → infoDiagram-WHAUD3N6.BlrSZ-3e.js} +2 -2
- package/dist/chunks/{journeyDiagram-XKPGCS4Q.BrzX8o5P.js → journeyDiagram-XKPGCS4Q.CJqy8tkA.js} +4 -4
- package/dist/chunks/{kanban-definition-3W4ZIXB7.CuQZY6Sy.js → kanban-definition-3W4ZIXB7.CRKN0s6T.js} +2 -2
- package/dist/chunks/{layout.Ch_nETSB.js → layout.B3vPW_pZ.js} +4 -4
- package/dist/chunks/{mermaid-parser.core.Bqz_hY8U.js → mermaid-parser.core.ChRIRaJW.js} +10 -10
- package/dist/chunks/{min.B-XpJzFe.js → min.CnRvIY0R.js} +2 -2
- package/dist/chunks/{mindmap-definition-VGOIOE7T.DM10BWV6.js → mindmap-definition-VGOIOE7T.D_ABLFPV.js} +4 -4
- package/dist/chunks/{packet-BFZMPI3H.DxbiL8bi.js → packet-BFZMPI3H.CxGfStzw.js} +1 -1
- package/dist/chunks/{pie-7BOR55EZ.DlLaqQ8p.js → pie-7BOR55EZ.DNt3EJ4F.js} +1 -1
- package/dist/chunks/{pieDiagram-ADFJNKIX.PKqZ_L7B.js → pieDiagram-ADFJNKIX.DIQfkreO.js} +4 -4
- package/dist/chunks/{quadrantDiagram-AYHSOK5B.4Y46BKFd.js → quadrantDiagram-AYHSOK5B.CiwquW9n.js} +1 -1
- package/dist/chunks/{radar-NHE76QYJ.Bu4ymprr.js → radar-NHE76QYJ.BjalOWfU.js} +1 -1
- package/dist/chunks/{rehype-mermaid.BhbxArqE.js → rehype-mermaid.DiVW4LDn.js} +33 -33
- package/dist/chunks/{requirementDiagram-UZGBJVZJ.DdL8pOOk.js → requirementDiagram-UZGBJVZJ.zxucHbPP.js} +3 -3
- package/dist/chunks/{sankeyDiagram-TZEHDZUN.DHQdQ9qa.js → sankeyDiagram-TZEHDZUN.DD-PyOn-.js} +1 -1
- package/dist/chunks/{sequenceDiagram-WL72ISMW.CUg9rPpB.js → sequenceDiagram-WL72ISMW.DR9lsGWA.js} +3 -3
- package/dist/chunks/{stateDiagram-FKZM4ZOC.CRkwSlLY.js → stateDiagram-FKZM4ZOC.CsNkAXRg.js} +4 -4
- package/dist/chunks/{stateDiagram-v2-4FDKWEC3.BLmOYFdB.js → stateDiagram-v2-4FDKWEC3.8NFC4sNp.js} +2 -2
- package/dist/chunks/{timeline-definition-IT6M3QCI.DouwaOHK.js → timeline-definition-IT6M3QCI.KVweqk-o.js} +2 -2
- package/dist/chunks/{treemap-KMMF4GRG.DSo16U9j.js → treemap-KMMF4GRG.VQYaLH7h.js} +1 -1
- package/dist/chunks/{useMarkdown.dHVgqkuN.js → useMarkdown.BwBe50mc.js} +8 -8
- package/dist/chunks/{xychartDiagram-PRI3JC2R.CQx23hyH.js → xychartDiagram-PRI3JC2R.DLJNhHkJ.js} +1 -1
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +3 -3
- package/package.json +4 -4
- package/dist/chunks/Bubble.CaOJA6px.js +0 -144
- 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
|
|
3
|
-
import { HistoryContext as
|
|
4
|
-
import { Card as
|
|
5
|
-
import { useAiChat as Oe, useLocalStorage as
|
|
6
|
-
import { TextInput as
|
|
7
|
-
import
|
|
8
|
-
import { useRef as
|
|
9
|
-
const Ue =
|
|
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.
|
|
13
|
-
).then((
|
|
12
|
+
"./ChatHistoryTable.LPF05gFQ.js"
|
|
13
|
+
).then((i) => ({ default: i.ChatHistoryTable }))
|
|
14
14
|
), Be = ({
|
|
15
|
-
filteredHistory:
|
|
15
|
+
filteredHistory: i,
|
|
16
16
|
onOpenChange: y,
|
|
17
|
-
mutate:
|
|
18
|
-
isLoading:
|
|
19
|
-
totalHistoryCount:
|
|
20
|
-
isFiltered:
|
|
21
|
-
isSearchActive:
|
|
22
|
-
requestConfirmation:
|
|
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:
|
|
24
|
+
const { user: o, getAccessToken: g } = te(), A = V(null), f = V({
|
|
25
25
|
id: "",
|
|
26
26
|
timestamp: "",
|
|
27
27
|
message: ""
|
|
28
|
-
}), [
|
|
29
|
-
Z +
|
|
30
|
-
), { state:
|
|
31
|
-
searchString:
|
|
32
|
-
sortDirection:
|
|
33
|
-
sortedCell:
|
|
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:
|
|
36
|
-
setInitialMessages:
|
|
37
|
-
dispatch:
|
|
38
|
-
} = X(
|
|
39
|
-
key:
|
|
40
|
-
initialValue:
|
|
41
|
-
}), [
|
|
42
|
-
key:
|
|
43
|
-
initialValue:
|
|
44
|
-
}), [,
|
|
45
|
-
key:
|
|
46
|
-
initialValue:
|
|
47
|
-
}), [
|
|
48
|
-
key:
|
|
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
|
-
})
|
|
51
|
-
|
|
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 =
|
|
54
|
-
let r,
|
|
62
|
+
const s = c.sortedCell === e;
|
|
63
|
+
let r, F;
|
|
55
64
|
switch (e) {
|
|
56
|
-
case
|
|
57
|
-
|
|
65
|
+
case M:
|
|
66
|
+
F = w, r = s ? c.sortDirection : I;
|
|
58
67
|
break;
|
|
59
|
-
case
|
|
60
|
-
|
|
68
|
+
case ue:
|
|
69
|
+
F = U, r = s ? c.sortDirection : p;
|
|
61
70
|
break;
|
|
62
71
|
default:
|
|
63
|
-
|
|
72
|
+
F = w, r = s ? c.sortDirection : I;
|
|
64
73
|
break;
|
|
65
74
|
}
|
|
66
|
-
const J = r ===
|
|
67
|
-
|
|
68
|
-
type:
|
|
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
|
|
85
|
+
await d({
|
|
77
86
|
userId: o?.username || "",
|
|
78
87
|
id: e
|
|
79
|
-
}),
|
|
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
|
|
96
|
+
const s = await g(), r = await de({
|
|
88
97
|
accessToken: s,
|
|
89
|
-
type:
|
|
98
|
+
type: he.GET_CHAT,
|
|
90
99
|
params: {
|
|
91
100
|
id: e.id
|
|
92
101
|
}
|
|
93
102
|
});
|
|
94
|
-
|
|
95
|
-
type:
|
|
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
|
-
}),
|
|
113
|
+
}), v(""), S(e.id), D(r.data.messages), y(!1);
|
|
105
114
|
} catch {
|
|
106
115
|
}
|
|
107
116
|
}, Y = (e) => {
|
|
108
|
-
|
|
117
|
+
f.current = {
|
|
109
118
|
id: e.id,
|
|
110
119
|
timestamp: e.timestamp,
|
|
111
120
|
message: e.summary
|
|
112
|
-
},
|
|
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
|
-
),
|
|
128
|
-
type:
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
153
|
+
}), T("");
|
|
145
154
|
} catch {
|
|
146
155
|
}
|
|
147
|
-
}, a =
|
|
148
|
-
e[0].isIntersecting &&
|
|
149
|
-
}, []), W =
|
|
156
|
+
}, a = G((e) => {
|
|
157
|
+
e[0].isIntersecting && _((r) => r + Z);
|
|
158
|
+
}, []), W = G(
|
|
150
159
|
(e) => {
|
|
151
|
-
if (
|
|
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),
|
|
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:
|
|
162
|
-
/* @__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:
|
|
166
|
-
historyState:
|
|
167
|
-
lastEntryToLoad:
|
|
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:
|
|
174
|
-
totalHistoryCount:
|
|
175
|
-
isFiltered:
|
|
176
|
-
isSearchActive:
|
|
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:
|
|
191
|
+
open: i,
|
|
182
192
|
onOpenChange: y
|
|
183
193
|
}) => {
|
|
184
|
-
const
|
|
185
|
-
key:
|
|
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
|
-
}), [
|
|
188
|
-
key:
|
|
197
|
+
}), [f, E] = u({
|
|
198
|
+
key: m + fe,
|
|
189
199
|
initialValue: !1
|
|
190
|
-
}), [
|
|
191
|
-
key:
|
|
200
|
+
}), [_, c] = u({
|
|
201
|
+
key: m + Se,
|
|
192
202
|
initialValue: !0
|
|
193
|
-
}), [P,
|
|
203
|
+
}), [P, R] = O(!1), [S, D] = O(null), [L, v] = O(null), I = G(
|
|
194
204
|
(a, W) => {
|
|
195
|
-
|
|
205
|
+
D(() => a), v(W), R(!0);
|
|
196
206
|
},
|
|
197
207
|
[]
|
|
198
|
-
),
|
|
199
|
-
|
|
200
|
-
}, [
|
|
201
|
-
data:
|
|
208
|
+
), w = G(() => {
|
|
209
|
+
S && S(), D(null), v(null);
|
|
210
|
+
}, [S]), {
|
|
211
|
+
data: p,
|
|
202
212
|
refetch: U,
|
|
203
|
-
isLoading:
|
|
204
|
-
isError:
|
|
205
|
-
} =
|
|
206
|
-
enabled:
|
|
207
|
-
user:
|
|
213
|
+
isLoading: N,
|
|
214
|
+
isError: l
|
|
215
|
+
} = pe({
|
|
216
|
+
enabled: i,
|
|
217
|
+
user: k?.username || "",
|
|
208
218
|
searchString: o.searchString || "",
|
|
209
|
-
sortDirection: o.sortDirection ||
|
|
210
|
-
sortedCell: o.sortedCell ||
|
|
211
|
-
getAccessToken:
|
|
212
|
-
keywordMatchAll:
|
|
213
|
-
}), { data:
|
|
214
|
-
user:
|
|
215
|
-
getAccessToken:
|
|
216
|
-
}), B =
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
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
|
-
}, [
|
|
231
|
+
}, [p, f]);
|
|
222
232
|
const H = async (a) => {
|
|
223
|
-
|
|
224
|
-
type:
|
|
233
|
+
A(a), g({
|
|
234
|
+
type: Te,
|
|
225
235
|
payload: { searchString: a }
|
|
226
236
|
});
|
|
227
|
-
}, j =
|
|
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
|
-
|
|
242
|
+
E(a);
|
|
233
243
|
}, q = (a) => {
|
|
234
|
-
|
|
244
|
+
c(a);
|
|
235
245
|
};
|
|
236
246
|
return /* @__PURE__ */ n(Q, { children: [
|
|
237
247
|
/* @__PURE__ */ t(
|
|
238
|
-
|
|
248
|
+
Ne,
|
|
239
249
|
{
|
|
240
250
|
showConfirmation: P,
|
|
241
|
-
setShowConfirmation:
|
|
242
|
-
action:
|
|
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:
|
|
258
|
+
children: L
|
|
249
259
|
}
|
|
250
260
|
),
|
|
251
261
|
/* @__PURE__ */ n(
|
|
252
262
|
He,
|
|
253
263
|
{
|
|
254
|
-
open:
|
|
264
|
+
open: i,
|
|
255
265
|
onOpenChange: y,
|
|
256
|
-
title:
|
|
266
|
+
title: _e,
|
|
257
267
|
animation: !0,
|
|
258
268
|
animationType: "fade",
|
|
259
269
|
blurEffect: "large",
|
|
260
|
-
initialFocus:
|
|
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(
|
|
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
|
-
|
|
274
|
+
ve,
|
|
265
275
|
{
|
|
266
|
-
header:
|
|
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
|
-
|
|
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:
|
|
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(
|
|
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:
|
|
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:
|
|
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
|
-
|
|
326
|
+
Le,
|
|
317
327
|
{
|
|
318
328
|
mode: "light",
|
|
319
329
|
size: "small",
|
|
320
330
|
disabled: o.searchString === "",
|
|
321
331
|
onClick: () => {
|
|
322
|
-
H(""),
|
|
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:
|
|
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
|
-
|
|
342
|
-
!
|
|
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:
|
|
356
|
+
filteredHistory: z,
|
|
347
357
|
onOpenChange: y,
|
|
348
|
-
isLoading:
|
|
358
|
+
isLoading: N,
|
|
349
359
|
totalHistoryCount: B,
|
|
350
|
-
isFiltered: !!(o.searchString ||
|
|
360
|
+
isFiltered: !!(o.searchString || f),
|
|
351
361
|
isSearchActive: !!o.searchString,
|
|
352
|
-
requestConfirmation:
|
|
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.
|
|
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.
|
|
4
|
-
import { Card as B } from "./index.
|
|
5
|
-
import { TextInput as O, TextInputMask as T } from "./index.
|
|
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({
|