@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
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
import { jsxs as i, jsx as a, Fragment as z } from "react/jsx-runtime";
|
|
2
|
+
import { n as q, LOCAL_STORAGE_PREFIX as d, LOCAL_STORAGE_SORT_TIMESTAMP as X, LOCAL_STORAGE_SORT_TOKEN_USAGE as J, LOCAL_STORAGE_SORT as Z, y as x, LOCAL_STORAGE_CHAT_ID as $, useDeleteChat as ee, useToggleFavoriteChat as te, graphQLRequest as ae, SERVICE_TYPES as re, ACTION_SORT as se, V as oe, LOCAL_STORAGE_SEARCH as ie, LOCAL_STORAGE_FAVORITES_ONLY as ne, LOCAL_STORAGE_KEYWORD_MATCH_ALL as le, useChatsHistory as ce, useUserChatStats as de, ACTION_SEARCH as he } from "./index.o4ZD5ALX.js";
|
|
3
|
+
import { InlineFilter as Ce, AnimatedWrapper as ue } from "./InlineFilter.Cv_LUpTp.js";
|
|
4
|
+
import { HistoryContext as Q, ChatContext as me, SortDirections as c, APP_CLASSNAME as Se, TOAST_CHAT_DELETED as ye, HISTORY_TITLE as fe } from "./LogoEntry.CN5P16eA.js";
|
|
5
|
+
import { useAiChat as Te, useLocalStorage as h, LazyToastContainerWrapper as pe, v4 as Ae, CHAT_RESET as ge, CHAT_SET_ATTACHMENTS as De, CHAT_SET_STATUS as _e, showErrorToast as Ee, ConfirmationPanel as Oe, Panel as ke, debounce as Le, Toggle as B, ButtonCancel as Re } from "./App.Bcw00dJK.js";
|
|
6
|
+
import { useRef as K, useContext as Y, Suspense as ve, lazy as we, useState as I, useCallback as W, useEffect as He } from "react";
|
|
7
|
+
const be = we(
|
|
8
|
+
() => import(
|
|
9
|
+
/* webpackChunkName: "history-datagrid" */
|
|
10
|
+
"./HistoryDataGrid.Bg984Jd_.js"
|
|
11
|
+
).then(
|
|
12
|
+
(C) => ({ default: C.HistoryDataGrid })
|
|
13
|
+
)
|
|
14
|
+
), Ie = ({
|
|
15
|
+
filteredHistory: C,
|
|
16
|
+
onOpenChange: f,
|
|
17
|
+
mutate: T,
|
|
18
|
+
isLoading: D = !1,
|
|
19
|
+
totalHistoryCount: _,
|
|
20
|
+
isFiltered: E = !1,
|
|
21
|
+
isSearchActive: O = !1,
|
|
22
|
+
requestConfirmation: u
|
|
23
|
+
}) => {
|
|
24
|
+
const { user: r, getAccessToken: p } = q(), F = K({
|
|
25
|
+
id: "",
|
|
26
|
+
timestamp: "",
|
|
27
|
+
message: ""
|
|
28
|
+
}), { state: s, dispatch: N } = Y(Q), A = {
|
|
29
|
+
sortDirection: s.sortDirection || c.DESC,
|
|
30
|
+
sortedCell: s.sortedCell || x
|
|
31
|
+
}, {
|
|
32
|
+
setChatId: k,
|
|
33
|
+
setInitialMessages: L,
|
|
34
|
+
dispatch: m
|
|
35
|
+
} = Y(me), { setInput: S } = Te(), [g, R] = h({
|
|
36
|
+
key: d + X,
|
|
37
|
+
initialValue: c.DESC
|
|
38
|
+
}), [v, G] = h({
|
|
39
|
+
key: d + J,
|
|
40
|
+
initialValue: c.ASC
|
|
41
|
+
}), [, M] = h({
|
|
42
|
+
key: d + Z,
|
|
43
|
+
initialValue: x
|
|
44
|
+
}), [n] = h({
|
|
45
|
+
key: d + $,
|
|
46
|
+
initialValue: ""
|
|
47
|
+
}), { mutateAsync: V } = ee({ getAccessToken: p }), { mutateAsync: w } = te({
|
|
48
|
+
getAccessToken: p
|
|
49
|
+
}), H = (t) => {
|
|
50
|
+
const o = s.sortedCell === t;
|
|
51
|
+
let e, y;
|
|
52
|
+
switch (t) {
|
|
53
|
+
case x:
|
|
54
|
+
y = R, e = o ? s.sortDirection : g;
|
|
55
|
+
break;
|
|
56
|
+
case oe:
|
|
57
|
+
y = G, e = o ? s.sortDirection : v;
|
|
58
|
+
break;
|
|
59
|
+
default:
|
|
60
|
+
y = R, e = o ? s.sortDirection : g;
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
const j = e === c.ASC ? c.DESC : c.ASC;
|
|
64
|
+
y(j), M(t), N({
|
|
65
|
+
type: se,
|
|
66
|
+
payload: {
|
|
67
|
+
sortedCell: t,
|
|
68
|
+
sortDirection: j
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
}, l = async (t) => {
|
|
72
|
+
try {
|
|
73
|
+
await V({
|
|
74
|
+
userId: r?.username || "",
|
|
75
|
+
id: t
|
|
76
|
+
}), T(""), await Ee(ye, {
|
|
77
|
+
autoClose: 2e3,
|
|
78
|
+
containerId: "history-table"
|
|
79
|
+
});
|
|
80
|
+
} catch {
|
|
81
|
+
}
|
|
82
|
+
}, P = async (t) => {
|
|
83
|
+
try {
|
|
84
|
+
const o = await p(), e = await ae({
|
|
85
|
+
accessToken: o,
|
|
86
|
+
type: re.GET_CHAT,
|
|
87
|
+
params: {
|
|
88
|
+
id: t.id
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
m({
|
|
92
|
+
type: _e,
|
|
93
|
+
payload: {
|
|
94
|
+
streaming: !1,
|
|
95
|
+
loading: !1,
|
|
96
|
+
restoring: !0,
|
|
97
|
+
restoredModel: e.data?.model || "",
|
|
98
|
+
restoredTimestamp: e.data?.timestamp || "",
|
|
99
|
+
restoredUsage: e.data?.tokenUsage || 0
|
|
100
|
+
}
|
|
101
|
+
}), S(""), k(t.id), L(e.data.messages), f(!1);
|
|
102
|
+
} catch {
|
|
103
|
+
}
|
|
104
|
+
}, b = (t) => {
|
|
105
|
+
F.current = {
|
|
106
|
+
id: t.id,
|
|
107
|
+
timestamp: t.timestamp,
|
|
108
|
+
message: t.summary
|
|
109
|
+
}, u(
|
|
110
|
+
() => l(t.id),
|
|
111
|
+
/* @__PURE__ */ i(z, { children: [
|
|
112
|
+
/* @__PURE__ */ a("p", { className: "m-0", children: "Are you sure you want to delete the following chat:" }),
|
|
113
|
+
/* @__PURE__ */ i("ul", { className: "m-0", children: [
|
|
114
|
+
/* @__PURE__ */ i("li", { children: [
|
|
115
|
+
"Timestamp: ",
|
|
116
|
+
/* @__PURE__ */ a("span", { className: "text-lg", children: t.timestamp })
|
|
117
|
+
] }),
|
|
118
|
+
/* @__PURE__ */ i("li", { children: [
|
|
119
|
+
"First message: ",
|
|
120
|
+
/* @__PURE__ */ a("span", { className: "text-lg", children: t.summary })
|
|
121
|
+
] })
|
|
122
|
+
] })
|
|
123
|
+
] })
|
|
124
|
+
), n === t.id && (k(Ae()), L([]), S(""), m({
|
|
125
|
+
type: ge,
|
|
126
|
+
payload: {
|
|
127
|
+
privateChat: !1,
|
|
128
|
+
reasoningText: !1
|
|
129
|
+
}
|
|
130
|
+
}), m({
|
|
131
|
+
type: De,
|
|
132
|
+
payload: {
|
|
133
|
+
attachments: 0
|
|
134
|
+
}
|
|
135
|
+
}));
|
|
136
|
+
}, U = async (t) => {
|
|
137
|
+
try {
|
|
138
|
+
await w({
|
|
139
|
+
userId: r?.username || "",
|
|
140
|
+
id: t.id
|
|
141
|
+
}), T("");
|
|
142
|
+
} catch {
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
return /* @__PURE__ */ i("div", { children: [
|
|
146
|
+
/* @__PURE__ */ a("div", { className: Se, children: /* @__PURE__ */ a(pe, { containerId: "history-table" }) }),
|
|
147
|
+
/* @__PURE__ */ a(ve, { fallback: /* @__PURE__ */ a("div", {}), children: /* @__PURE__ */ a(
|
|
148
|
+
be,
|
|
149
|
+
{
|
|
150
|
+
filteredHistory: C,
|
|
151
|
+
sortDirection: A.sortDirection,
|
|
152
|
+
sortedCell: A.sortedCell,
|
|
153
|
+
onSortChange: H,
|
|
154
|
+
onClickRestore: P,
|
|
155
|
+
onClickDelete: b,
|
|
156
|
+
onClickFavorite: U,
|
|
157
|
+
isLoading: D,
|
|
158
|
+
totalHistoryCount: _,
|
|
159
|
+
isFiltered: E,
|
|
160
|
+
isSearchActive: O,
|
|
161
|
+
activeChatId: n
|
|
162
|
+
}
|
|
163
|
+
) })
|
|
164
|
+
] });
|
|
165
|
+
}, Pe = ({
|
|
166
|
+
open: C,
|
|
167
|
+
onOpenChange: f
|
|
168
|
+
}) => {
|
|
169
|
+
const T = K(null), { getAccessToken: D, user: _ } = q(), [E, O] = I([]), u = K(null), { state: r, dispatch: p } = Y(Q), [, F] = h({
|
|
170
|
+
key: d + ie,
|
|
171
|
+
initialValue: r.searchString
|
|
172
|
+
}), [s, N] = h({
|
|
173
|
+
key: d + ne,
|
|
174
|
+
initialValue: !1
|
|
175
|
+
}), [A, k] = h({
|
|
176
|
+
key: d + le,
|
|
177
|
+
initialValue: !0
|
|
178
|
+
}), [L, m] = I(!1), [S, g] = I(null), [R, v] = I(null), G = W(
|
|
179
|
+
(e, y) => {
|
|
180
|
+
g(() => e), v(y), m(!0);
|
|
181
|
+
},
|
|
182
|
+
[]
|
|
183
|
+
), M = W(() => {
|
|
184
|
+
S && S(), g(null), v(null);
|
|
185
|
+
}, [S]), {
|
|
186
|
+
data: n,
|
|
187
|
+
refetch: V,
|
|
188
|
+
isLoading: w,
|
|
189
|
+
isError: H
|
|
190
|
+
} = ce({
|
|
191
|
+
enabled: C,
|
|
192
|
+
user: _?.username || "",
|
|
193
|
+
searchString: r.searchString || "",
|
|
194
|
+
sortDirection: r.sortDirection || c.DESC,
|
|
195
|
+
sortedCell: r.sortedCell || x,
|
|
196
|
+
getAccessToken: D,
|
|
197
|
+
keywordMatchAll: A
|
|
198
|
+
}), { data: l } = de({
|
|
199
|
+
user: _?.username,
|
|
200
|
+
getAccessToken: D
|
|
201
|
+
}), P = l && l.totalChats ? l.totalChats - l.privateChats - l.deletedChats : 0;
|
|
202
|
+
He(() => {
|
|
203
|
+
n && O(
|
|
204
|
+
s ? n.filter((e) => e.favoriteChat === !0) : n
|
|
205
|
+
);
|
|
206
|
+
}, [n, s]);
|
|
207
|
+
const b = async (e) => {
|
|
208
|
+
F(e), p({
|
|
209
|
+
type: he,
|
|
210
|
+
payload: { searchString: e }
|
|
211
|
+
});
|
|
212
|
+
}, U = Le((e) => {
|
|
213
|
+
b(e.target.value.trim());
|
|
214
|
+
}, 800), t = (e) => {
|
|
215
|
+
N(e);
|
|
216
|
+
}, o = (e) => {
|
|
217
|
+
k(e);
|
|
218
|
+
};
|
|
219
|
+
return /* @__PURE__ */ i(z, { children: [
|
|
220
|
+
/* @__PURE__ */ a(
|
|
221
|
+
Oe,
|
|
222
|
+
{
|
|
223
|
+
showConfirmation: L,
|
|
224
|
+
setShowConfirmation: m,
|
|
225
|
+
action: M,
|
|
226
|
+
customStrings: {
|
|
227
|
+
confirmAction: "Delete",
|
|
228
|
+
cancelAction: "Cancel",
|
|
229
|
+
title: "Delete chat"
|
|
230
|
+
},
|
|
231
|
+
children: R
|
|
232
|
+
}
|
|
233
|
+
),
|
|
234
|
+
/* @__PURE__ */ a(
|
|
235
|
+
ke,
|
|
236
|
+
{
|
|
237
|
+
open: C,
|
|
238
|
+
onOpenChange: f,
|
|
239
|
+
title: fe,
|
|
240
|
+
animation: !0,
|
|
241
|
+
animationType: "fade",
|
|
242
|
+
blurEffect: "large",
|
|
243
|
+
initialFocus: T,
|
|
244
|
+
className: "h-full sm:h-max",
|
|
245
|
+
footer: /* @__PURE__ */ a("div", { className: "flex flex-wrap justify-end gap-x-2 pb-8 sm:pb-0", children: /* @__PURE__ */ a("div", { className: "box-border max-w-full basis-auto", children: /* @__PURE__ */ a(Re, { onOpenChange: f, ref: T }) }) }),
|
|
246
|
+
children: /* @__PURE__ */ i("div", { className: "flex h-full flex-col gap-4", children: [
|
|
247
|
+
/* @__PURE__ */ a(
|
|
248
|
+
Ce,
|
|
249
|
+
{
|
|
250
|
+
header: w && r.searchString ? "Loading..." : r.searchString ? "Filters applied" : "Filters",
|
|
251
|
+
toggles: /* @__PURE__ */ i(z, { children: [
|
|
252
|
+
/* @__PURE__ */ a(
|
|
253
|
+
B,
|
|
254
|
+
{
|
|
255
|
+
name: "favorites-only",
|
|
256
|
+
checked: s,
|
|
257
|
+
onChange: t,
|
|
258
|
+
label: "Show favorites only",
|
|
259
|
+
narrow: !0,
|
|
260
|
+
noBorder: !0
|
|
261
|
+
}
|
|
262
|
+
),
|
|
263
|
+
/* @__PURE__ */ a(
|
|
264
|
+
B,
|
|
265
|
+
{
|
|
266
|
+
name: "keyword-match-all",
|
|
267
|
+
checked: A,
|
|
268
|
+
onChange: o,
|
|
269
|
+
label: "Match all keywords",
|
|
270
|
+
narrow: !0,
|
|
271
|
+
noBorder: !0
|
|
272
|
+
}
|
|
273
|
+
)
|
|
274
|
+
] }),
|
|
275
|
+
inputSearchRef: u,
|
|
276
|
+
onSearchChange: U,
|
|
277
|
+
defaultValue: r.searchString,
|
|
278
|
+
resetDisabled: r.searchString === "",
|
|
279
|
+
onResetSearch: () => {
|
|
280
|
+
b(""), u.current?.value && (u.current.value = "", u.current.focus());
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
),
|
|
284
|
+
H && /* @__PURE__ */ a("p", { className: "m-0 text-copy-error-light", children: "Failed to load history." }),
|
|
285
|
+
!H && /* @__PURE__ */ a(ue, { dependency: E?.length ?? 0, children: /* @__PURE__ */ a(
|
|
286
|
+
Ie,
|
|
287
|
+
{
|
|
288
|
+
mutate: V,
|
|
289
|
+
filteredHistory: E,
|
|
290
|
+
onOpenChange: f,
|
|
291
|
+
isLoading: w,
|
|
292
|
+
totalHistoryCount: P,
|
|
293
|
+
isFiltered: !!(r.searchString || s),
|
|
294
|
+
isSearchActive: !!r.searchString,
|
|
295
|
+
requestConfirmation: G
|
|
296
|
+
}
|
|
297
|
+
) })
|
|
298
|
+
] })
|
|
299
|
+
}
|
|
300
|
+
)
|
|
301
|
+
] });
|
|
302
|
+
};
|
|
303
|
+
export {
|
|
304
|
+
Pe as HistoryPanel
|
|
305
|
+
};
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { jsx as s, jsxs as g } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as m, useState as A, useLayoutEffect as x } from "react";
|
|
3
|
+
import { IconSearch as N, Button as b } from "./LogoEntry.CN5P16eA.js";
|
|
4
|
+
import { Card as S } from "./index.tqKeN7sl.js";
|
|
5
|
+
import { TextInput as v } from "./index.CZRaE0eA.js";
|
|
6
|
+
const F = 300;
|
|
7
|
+
function H(e, c) {
|
|
8
|
+
const { duration: n = F, enabled: i = !0 } = c ?? {}, r = m(null), [t, a] = A({
|
|
9
|
+
height: "auto",
|
|
10
|
+
isAnimating: !1
|
|
11
|
+
}), l = m(0), f = m(e), o = m(0), u = m(null);
|
|
12
|
+
x(() => {
|
|
13
|
+
if (!r.current || !i)
|
|
14
|
+
return;
|
|
15
|
+
if (l.current === 0) {
|
|
16
|
+
l.current = r.current.offsetHeight, f.current = e;
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
if (f.current === e)
|
|
20
|
+
return;
|
|
21
|
+
f.current = e;
|
|
22
|
+
const h = l.current, d = r.current.scrollHeight;
|
|
23
|
+
if (l.current = d, !(h === d || h === 0))
|
|
24
|
+
return u.current && clearTimeout(u.current), o.current && cancelAnimationFrame(o.current), a({
|
|
25
|
+
height: h,
|
|
26
|
+
isAnimating: !0
|
|
27
|
+
}), o.current = requestAnimationFrame(() => {
|
|
28
|
+
o.current = requestAnimationFrame(() => {
|
|
29
|
+
a({
|
|
30
|
+
height: d,
|
|
31
|
+
isAnimating: !0
|
|
32
|
+
}), u.current = setTimeout(() => {
|
|
33
|
+
a({
|
|
34
|
+
height: "auto",
|
|
35
|
+
isAnimating: !1
|
|
36
|
+
});
|
|
37
|
+
}, n);
|
|
38
|
+
});
|
|
39
|
+
}), () => {
|
|
40
|
+
u.current && clearTimeout(u.current), o.current && cancelAnimationFrame(o.current);
|
|
41
|
+
};
|
|
42
|
+
}, [
|
|
43
|
+
e,
|
|
44
|
+
n,
|
|
45
|
+
i
|
|
46
|
+
]);
|
|
47
|
+
const p = i ? {
|
|
48
|
+
height: t.height === "auto" ? "auto" : `${t.height}px`,
|
|
49
|
+
overflow: t.isAnimating ? "hidden" : void 0,
|
|
50
|
+
transition: t.isAnimating ? `height ${n}ms ease-out` : void 0
|
|
51
|
+
} : {};
|
|
52
|
+
return {
|
|
53
|
+
ref: r,
|
|
54
|
+
style: p,
|
|
55
|
+
isAnimating: t.isAnimating
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
const k = ({ children: e, dependency: c, duration: n, enabled: i = !0, className: r }) => {
|
|
59
|
+
const { ref: t, style: a } = H(c, {
|
|
60
|
+
duration: n,
|
|
61
|
+
enabled: i
|
|
62
|
+
});
|
|
63
|
+
return /* @__PURE__ */ s("div", {
|
|
64
|
+
ref: t,
|
|
65
|
+
style: a,
|
|
66
|
+
className: r,
|
|
67
|
+
children: e
|
|
68
|
+
});
|
|
69
|
+
}, w = ({
|
|
70
|
+
header: e,
|
|
71
|
+
toggles: c,
|
|
72
|
+
inputSearchRef: n,
|
|
73
|
+
onSearchChange: i,
|
|
74
|
+
onResetSearch: r,
|
|
75
|
+
defaultValue: t,
|
|
76
|
+
resetDisabled: a = !1
|
|
77
|
+
}) => /* @__PURE__ */ g(
|
|
78
|
+
S,
|
|
79
|
+
{
|
|
80
|
+
header: e,
|
|
81
|
+
className: "prose-dark dark:prose-lighter mb-4",
|
|
82
|
+
noBorder: !0,
|
|
83
|
+
compact: !0,
|
|
84
|
+
children: [
|
|
85
|
+
/* @__PURE__ */ s(
|
|
86
|
+
v,
|
|
87
|
+
{
|
|
88
|
+
placeholder: "Search",
|
|
89
|
+
labelHidden: !0,
|
|
90
|
+
noBorder: !0,
|
|
91
|
+
autoCapitalize: "off",
|
|
92
|
+
autoComplete: "off",
|
|
93
|
+
autoCorrect: "off",
|
|
94
|
+
ref: n,
|
|
95
|
+
defaultValue: t,
|
|
96
|
+
mode: "alt-system",
|
|
97
|
+
name: "Search",
|
|
98
|
+
label: "Search",
|
|
99
|
+
onChange: i,
|
|
100
|
+
className: "my-2",
|
|
101
|
+
rightElement: /* @__PURE__ */ s("div", { className: "dark:text-copy-dark text-copy-light", children: /* @__PURE__ */ s(N, { monotone: !0, size: "size-3" }) })
|
|
102
|
+
}
|
|
103
|
+
),
|
|
104
|
+
/* @__PURE__ */ g("div", { className: "flex flex-col justify-between sm:flex-row gap-2 sm:mb-0 mb-1", children: [
|
|
105
|
+
/* @__PURE__ */ s("div", { className: "flex flex-col sm:flex-row gap-2 order-1 sm:order-0", children: c }),
|
|
106
|
+
/* @__PURE__ */ s(
|
|
107
|
+
b,
|
|
108
|
+
{
|
|
109
|
+
mode: "light",
|
|
110
|
+
size: "small",
|
|
111
|
+
disabled: a,
|
|
112
|
+
onClick: r,
|
|
113
|
+
children: "Reset Search"
|
|
114
|
+
}
|
|
115
|
+
)
|
|
116
|
+
] })
|
|
117
|
+
]
|
|
118
|
+
}
|
|
119
|
+
);
|
|
120
|
+
export {
|
|
121
|
+
k as AnimatedWrapper,
|
|
122
|
+
w as InlineFilter
|
|
123
|
+
};
|
|
@@ -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.o4ZD5ALX.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.CN5P16eA.js";
|
|
4
|
+
import { Card as B } from "./index.tqKeN7sl.js";
|
|
5
|
+
import { TextInput as O, TextInputMask as T } from "./index.CZRaE0eA.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({
|