@versini/sassysaint 8.117.1 → 8.118.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.C5D0TvzV.js → AboutChangelog.Dd-lJxFP.js} +2 -2
- package/dist/chunks/{AboutEntry.BH9puKiR.js → AboutEntry.B76hyRlF.js} +7 -7
- package/dist/chunks/{App.e-vnwYiT.js → App.CDmH0G0j.js} +24 -25
- package/dist/chunks/{BubbleActions.CZIq3NyO.js → BubbleActions.B4DdmpLt.js} +3 -3
- package/dist/chunks/{ButtonIconDelete.CXKvnkV9.js → ButtonIconDelete.BIQ0mdyX.js} +92 -112
- package/dist/chunks/{Chart.Crdej200.js → Chart.CjoR0Wd0.js} +2 -2
- package/dist/chunks/{ChatBubbleAssistant.BsPP4scU.js → ChatBubbleAssistant.DyYIdEm4.js} +5 -5
- package/dist/chunks/{ChatBubbleUser.CXbMpU0u.js → ChatBubbleUser.Ba27Y6M8.js} +4 -4
- package/dist/chunks/{ChatHistoryTable.WYPAqhPD.js → ChatHistoryTable.BQowENY6.js} +93 -89
- package/dist/chunks/HistoryEntry.Cn3jxdK8.js +328 -0
- package/dist/chunks/InlineFilter.C6W5hEeI.js +58 -0
- package/dist/chunks/{LoginEntry.DsfSv0HE.js → LoginEntry.CxIKfVlN.js} +4 -4
- package/dist/chunks/{LogoEntry.BaAKDAky.js → LogoEntry.CxkQlFwX.js} +1 -1
- package/dist/chunks/MemoriesEntry.D0KEXfwY.js +691 -0
- package/dist/chunks/{ProfileEntry.CbejkrAa.js → ProfileEntry.C1IhZsXL.js} +4 -4
- package/dist/chunks/{SettingsEntry.BMdkik84.js → SettingsEntry.B0fEZDDy.js} +5 -5
- package/dist/chunks/{UsageEntry.3T7jnx48.js → UsageEntry.Di2hXsKE.js} +5 -5
- package/dist/chunks/{_baseUniq.BfuOPl3s.js → _baseUniq.RtcyTVD3.js} +1 -1
- package/dist/chunks/{arc.Yt3LnN9o.js → arc.B2UgXHCR.js} +1 -1
- package/dist/chunks/{architecture-U656AL7Q.BXTYW3Rc.js → architecture-U656AL7Q.C7CI7QkV.js} +1 -1
- package/dist/chunks/{architectureDiagram-VXUJARFQ.FCDARRR_.js → architectureDiagram-VXUJARFQ.B9CZxGrg.js} +4 -4
- package/dist/chunks/{blockDiagram-VD42YOAC.C_rofYcs.js → blockDiagram-VD42YOAC.DPHK0nPj.js} +5 -5
- package/dist/chunks/{browser.D2KgtpfJ.js → browser.DNveIME9.js} +1 -1
- package/dist/chunks/{c4Diagram-YG6GDRKO.HzZGAApo.js → c4Diagram-YG6GDRKO.CzhFF3ka.js} +2 -2
- package/dist/chunks/{channel.DG7G3U7-.js → channel.DiQSGDER.js} +1 -1
- package/dist/chunks/{chunk-4BX2VUAB.B4e3aO1D.js → chunk-4BX2VUAB.DYJkaNUO.js} +1 -1
- package/dist/chunks/{chunk-55IACEB6.CESo1NrJ.js → chunk-55IACEB6.5Fa2WO_6.js} +1 -1
- package/dist/chunks/{chunk-B4BG7PRW.BBGa7Umf.js → chunk-B4BG7PRW.BwVppCji.js} +4 -4
- package/dist/chunks/{chunk-DI55MBZ5.Z9MLFT29.js → chunk-DI55MBZ5.DsOsqUyd.js} +3 -3
- package/dist/chunks/{chunk-FMBD7UC4.D4_NSJjG.js → chunk-FMBD7UC4.B2zbt4RX.js} +1 -1
- package/dist/chunks/{chunk-QN33PNHL.CWfoXUts.js → chunk-QN33PNHL.C4uUbvHm.js} +1 -1
- package/dist/chunks/{chunk-QZHKN3VN.CGQnP_Cf.js → chunk-QZHKN3VN.zom9Gu7S.js} +1 -1
- package/dist/chunks/{chunk-TZMSLE5B.BQIgZqgJ.js → chunk-TZMSLE5B.D37BJ9DQ.js} +1 -1
- package/dist/chunks/{classDiagram-2ON5EDUG.0mnXbc7I.js → classDiagram-2ON5EDUG.B38y8yzM.js} +2 -2
- package/dist/chunks/{classDiagram-v2-WZHVMYZB.0mnXbc7I.js → classDiagram-v2-WZHVMYZB.B38y8yzM.js} +2 -2
- package/dist/chunks/{clone.D47cjfdo.js → clone.C_dmGnmF.js} +1 -1
- package/dist/chunks/{cose-bilkent-S5V4N54A.mmkQB9Pa.js → cose-bilkent-S5V4N54A.B-IUzWpy.js} +2 -2
- package/dist/chunks/{dagre-6UL2VRFP.qd2wkZfB.js → dagre-6UL2VRFP.BVThCwwl.js} +5 -5
- package/dist/chunks/{diagram-PSM6KHXK.ck1CH-jB.js → diagram-PSM6KHXK.BXF6T9pt.js} +4 -4
- package/dist/chunks/{diagram-QEK2KX5R.CM3dUUt_.js → diagram-QEK2KX5R.CjKjCcWB.js} +3 -3
- package/dist/chunks/{diagram-S2PKOQOG.Bjpg3WXB.js → diagram-S2PKOQOG.BNknxY1p.js} +3 -3
- package/dist/chunks/{erDiagram-Q2GNP2WA.DQ7Zb7Yt.js → erDiagram-Q2GNP2WA.CFtxVaj1.js} +4 -4
- package/dist/chunks/{flowDiagram-NV44I4VS.Dd5E61BX.js → flowDiagram-NV44I4VS.QJyYNjO0.js} +5 -5
- package/dist/chunks/{ganttDiagram-JELNMOA3.D7NjdCpC.js → ganttDiagram-JELNMOA3.Bw3qGwGv.js} +2 -2
- package/dist/chunks/{gitGraph-F6HP7TQM.IaH3QLVX.js → gitGraph-F6HP7TQM.wJT1XvUI.js} +1 -1
- package/dist/chunks/{gitGraphDiagram-NY62KEGX.u0rUsMj1.js → gitGraphDiagram-NY62KEGX.Df8Hj879.js} +4 -4
- package/dist/chunks/{graph.wajwIKpE.js → graph.FrpT6ZL7.js} +2 -2
- package/dist/chunks/{index.CLoMSp2_.js → index.BCG13ez4.js} +1 -1
- package/dist/chunks/{index.ilaSLj1g.js → index.BbWF4ahv.js} +1 -1
- package/dist/chunks/{index.DtA4hmwf.js → index.BcxzV___.js} +1 -1
- package/dist/chunks/{index.DlOTeedC.js → index.BnhrWTfG.js} +1 -1
- package/dist/chunks/{index.BKWi9yvY.js → index.Ckw06Qre.js} +3 -3
- package/dist/chunks/{index.CDo0UzaU.js → index.D__OOf7L.js} +1 -1
- package/dist/chunks/{index.BZr0bEQg.js → index.DniyWjdG.js} +2 -2
- package/dist/chunks/{index.D4894ZsY.js → index.QUMWKPPg.js} +3 -3
- package/dist/chunks/{index.D5kSEkHn.js → index.cFkBRRtk.js} +1 -1
- package/dist/chunks/{info-NVLQJR56.B6lxthJ9.js → info-NVLQJR56.DY6KbgQZ.js} +1 -1
- package/dist/chunks/{infoDiagram-WHAUD3N6.BJncMSgg.js → infoDiagram-WHAUD3N6.CxU07Uaz.js} +2 -2
- package/dist/chunks/{journeyDiagram-XKPGCS4Q.Xc47puZv.js → journeyDiagram-XKPGCS4Q.BfIAVQwZ.js} +4 -4
- package/dist/chunks/{kanban-definition-3W4ZIXB7.DdnGsCVe.js → kanban-definition-3W4ZIXB7.CHNGSFPQ.js} +2 -2
- package/dist/chunks/{layout.BT5I7f25.js → layout.MEArWR4j.js} +4 -4
- package/dist/chunks/{mermaid-parser.core.Dy_1GmtD.js → mermaid-parser.core.Bm2PPbtx.js} +10 -10
- package/dist/chunks/{min.DvTOJyYm.js → min.D_Z3VpiR.js} +2 -2
- package/dist/chunks/{mindmap-definition-VGOIOE7T.Dd-3BZIu.js → mindmap-definition-VGOIOE7T.CFgPuXql.js} +4 -4
- package/dist/chunks/{packet-BFZMPI3H.Ch8ArXr6.js → packet-BFZMPI3H.5xnkqXMg.js} +1 -1
- package/dist/chunks/{pie-7BOR55EZ.EutZi19A.js → pie-7BOR55EZ.TJXn9PA3.js} +1 -1
- package/dist/chunks/{pieDiagram-ADFJNKIX.Bomp215d.js → pieDiagram-ADFJNKIX.Cl0OmnJC.js} +4 -4
- package/dist/chunks/{quadrantDiagram-AYHSOK5B.DpUG7iX4.js → quadrantDiagram-AYHSOK5B.BsCn9ZBZ.js} +1 -1
- package/dist/chunks/{radar-NHE76QYJ.WIkHtCoi.js → radar-NHE76QYJ.DPl1x_mG.js} +1 -1
- package/dist/chunks/{rehype-mermaid.D2XFy4HS.js → rehype-mermaid.CK2xcX8n.js} +33 -33
- package/dist/chunks/{requirementDiagram-UZGBJVZJ.C65oMSNO.js → requirementDiagram-UZGBJVZJ.D24MdwEw.js} +3 -3
- package/dist/chunks/{sankeyDiagram-TZEHDZUN.BPouA2z9.js → sankeyDiagram-TZEHDZUN.DN8E1Yma.js} +1 -1
- package/dist/chunks/{sequenceDiagram-WL72ISMW.DA-eSQtC.js → sequenceDiagram-WL72ISMW.CdAf_myJ.js} +3 -3
- package/dist/chunks/{stateDiagram-FKZM4ZOC.GNpavprD.js → stateDiagram-FKZM4ZOC.Dxcn59aw.js} +4 -4
- package/dist/chunks/{stateDiagram-v2-4FDKWEC3.DdUIinRt.js → stateDiagram-v2-4FDKWEC3.CYEBXfGv.js} +2 -2
- package/dist/chunks/{timeline-definition-IT6M3QCI.DlJeBBE7.js → timeline-definition-IT6M3QCI.Z4vaoiTd.js} +2 -2
- package/dist/chunks/{treemap-KMMF4GRG.BfQklqDu.js → treemap-KMMF4GRG.CnpNvY26.js} +1 -1
- package/dist/chunks/{useMarkdown.Sp_znZOD.js → useMarkdown.DPT1eeX6.js} +8 -8
- package/dist/chunks/{xychartDiagram-PRI3JC2R.e686B23N.js → xychartDiagram-PRI3JC2R.7mSrywd2.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 +3 -3
- package/dist/chunks/HistoryEntry.BhWdD0eP.js +0 -375
- package/dist/chunks/MemoriesEntry.B86jHTrW.js +0 -649
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
import { jsxs as l, jsx as t, Fragment as W } from "react/jsx-runtime";
|
|
2
|
+
import { n as ee, INFINITE_SCROLL_LIMIT as J, INFINITE_SCROLL_THRESHOLD as Z, LOCAL_STORAGE_PREFIX as u, LOCAL_STORAGE_SORT_TIMESTAMP as re, 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.DniyWjdG.js";
|
|
3
|
+
import { useAiChat as pe, useLocalStorage as C, LazyToastContainerWrapper as Ae, 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 Ie, debounce as ve, Toggle as $, ButtonCancel as ke } from "./App.CDmH0G0j.js";
|
|
4
|
+
import { HistoryContext as te, ChatContext as be, TableCellSortDirections as h, APP_CLASSNAME as we, TOAST_CHAT_DELETED as xe, HISTORY_TITLE as He } from "./LogoEntry.CxkQlFwX.js";
|
|
5
|
+
import { useRef as G, useState as R, useContext as Q, useEffect as ae, useCallback as P, Suspense as Ne, lazy as Fe } from "react";
|
|
6
|
+
import { InlineFilter as Me } from "./InlineFilter.C6W5hEeI.js";
|
|
7
|
+
const Ve = Fe(
|
|
8
|
+
() => import(
|
|
9
|
+
/* webpackChunkName: "history-table" */
|
|
10
|
+
"./ChatHistoryTable.BQowENY6.js"
|
|
11
|
+
).then((n) => ({ default: n.ChatHistoryTable }))
|
|
12
|
+
), Ge = ({
|
|
13
|
+
filteredHistory: n,
|
|
14
|
+
onOpenChange: y,
|
|
15
|
+
mutate: g,
|
|
16
|
+
isLoading: I = !1,
|
|
17
|
+
totalHistoryCount: v,
|
|
18
|
+
isFiltered: U = !1,
|
|
19
|
+
isSearchActive: k = !1,
|
|
20
|
+
requestConfirmation: m
|
|
21
|
+
}) => {
|
|
22
|
+
const { user: r, getAccessToken: p } = ee(), A = G(null), S = G({
|
|
23
|
+
id: "",
|
|
24
|
+
timestamp: "",
|
|
25
|
+
message: ""
|
|
26
|
+
}), [E, _] = R(
|
|
27
|
+
J + Z
|
|
28
|
+
), { state: i, dispatch: z } = Q(te), b = {
|
|
29
|
+
searchString: i.searchString || "",
|
|
30
|
+
sortDirection: i.sortDirection || h.DESC,
|
|
31
|
+
sortedCell: i.sortedCell || V
|
|
32
|
+
}, {
|
|
33
|
+
setChatId: f,
|
|
34
|
+
setInitialMessages: D,
|
|
35
|
+
dispatch: L
|
|
36
|
+
} = Q(be), { setInput: O } = pe(), [w, x] = C({
|
|
37
|
+
key: u + re,
|
|
38
|
+
initialValue: h.DESC
|
|
39
|
+
}), [T, K] = C({
|
|
40
|
+
key: u + oe,
|
|
41
|
+
initialValue: h.ASC
|
|
42
|
+
}), [, H] = C({
|
|
43
|
+
key: u + ne,
|
|
44
|
+
initialValue: V
|
|
45
|
+
}), [c] = C({
|
|
46
|
+
key: u + 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 >= E && _(e + Z);
|
|
56
|
+
}, [c, n, E]);
|
|
57
|
+
const { mutateAsync: d } = ce({ getAccessToken: p }), { mutateAsync: Y } = le({
|
|
58
|
+
getAccessToken: p
|
|
59
|
+
}), N = (e) => {
|
|
60
|
+
const o = i.sortedCell === e;
|
|
61
|
+
let s, M;
|
|
62
|
+
switch (e) {
|
|
63
|
+
case V:
|
|
64
|
+
M = x, s = o ? i.sortDirection : w;
|
|
65
|
+
break;
|
|
66
|
+
case Ce:
|
|
67
|
+
M = K, s = o ? i.sortDirection : T;
|
|
68
|
+
break;
|
|
69
|
+
default:
|
|
70
|
+
M = x, s = o ? i.sortDirection : w;
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
73
|
+
const X = s === h.ASC ? h.DESC : h.ASC;
|
|
74
|
+
M(X), H(e), z({
|
|
75
|
+
type: ue,
|
|
76
|
+
payload: {
|
|
77
|
+
sortedCell: e,
|
|
78
|
+
sortDirection: X
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
}, j = async (e) => {
|
|
82
|
+
try {
|
|
83
|
+
await d({
|
|
84
|
+
userId: r?.username || "",
|
|
85
|
+
id: e
|
|
86
|
+
}), g(""), await Oe(xe, {
|
|
87
|
+
autoClose: 2e3,
|
|
88
|
+
containerId: "history-table"
|
|
89
|
+
});
|
|
90
|
+
} catch {
|
|
91
|
+
}
|
|
92
|
+
}, B = async (e) => {
|
|
93
|
+
try {
|
|
94
|
+
const o = await p(), s = await de({
|
|
95
|
+
accessToken: o,
|
|
96
|
+
type: he.GET_CHAT,
|
|
97
|
+
params: {
|
|
98
|
+
id: e.id
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
L({
|
|
102
|
+
type: Le,
|
|
103
|
+
payload: {
|
|
104
|
+
streaming: !1,
|
|
105
|
+
loading: !1,
|
|
106
|
+
restoring: !0,
|
|
107
|
+
restoredModel: s.data?.model || "",
|
|
108
|
+
restoredTimestamp: s.data?.timestamp || "",
|
|
109
|
+
restoredUsage: s.data?.tokenUsage || 0
|
|
110
|
+
}
|
|
111
|
+
}), O(""), f(e.id), D(s.data.messages), y(!1);
|
|
112
|
+
} catch {
|
|
113
|
+
}
|
|
114
|
+
}, q = (e) => {
|
|
115
|
+
S.current = {
|
|
116
|
+
id: e.id,
|
|
117
|
+
timestamp: e.timestamp,
|
|
118
|
+
message: e.summary
|
|
119
|
+
}, m(
|
|
120
|
+
() => j(e.id),
|
|
121
|
+
/* @__PURE__ */ l(W, { 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 && (f(Ee()), D([]), O(""), L({
|
|
135
|
+
type: _e,
|
|
136
|
+
payload: {
|
|
137
|
+
privateChat: !1,
|
|
138
|
+
reasoningText: !1
|
|
139
|
+
}
|
|
140
|
+
}), L({
|
|
141
|
+
type: De,
|
|
142
|
+
payload: {
|
|
143
|
+
attachments: 0
|
|
144
|
+
}
|
|
145
|
+
}));
|
|
146
|
+
}, a = async (e) => {
|
|
147
|
+
try {
|
|
148
|
+
await Y({
|
|
149
|
+
userId: r?.username || "",
|
|
150
|
+
id: e.id
|
|
151
|
+
}), g("");
|
|
152
|
+
} catch {
|
|
153
|
+
}
|
|
154
|
+
}, F = P((e) => {
|
|
155
|
+
e[0].isIntersecting && _((s) => s + J);
|
|
156
|
+
}, []), se = P(
|
|
157
|
+
(e) => {
|
|
158
|
+
if (A.current && A.current.disconnect(), e) {
|
|
159
|
+
const o = {
|
|
160
|
+
rootMargin: "20px"
|
|
161
|
+
}, s = new IntersectionObserver(F, o);
|
|
162
|
+
s.observe(e), A.current = s;
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
[F]
|
|
166
|
+
);
|
|
167
|
+
return /* @__PURE__ */ l("div", { children: [
|
|
168
|
+
/* @__PURE__ */ t("div", { className: we, children: /* @__PURE__ */ t(Ae, { containerId: "history-table" }) }),
|
|
169
|
+
/* @__PURE__ */ t(Ne, { fallback: /* @__PURE__ */ t("div", {}), children: /* @__PURE__ */ t(
|
|
170
|
+
Ve,
|
|
171
|
+
{
|
|
172
|
+
filteredHistory: n,
|
|
173
|
+
historyState: b,
|
|
174
|
+
lastEntryToLoad: E,
|
|
175
|
+
onClickSort: N,
|
|
176
|
+
onClickRestore: B,
|
|
177
|
+
onClickDelete: q,
|
|
178
|
+
onClickFavorite: a,
|
|
179
|
+
infinityScrollMarkerRef: se,
|
|
180
|
+
isLoading: I,
|
|
181
|
+
totalHistoryCount: v,
|
|
182
|
+
isFiltered: U,
|
|
183
|
+
isSearchActive: k,
|
|
184
|
+
activeChatId: c
|
|
185
|
+
}
|
|
186
|
+
) })
|
|
187
|
+
] });
|
|
188
|
+
}, Be = ({
|
|
189
|
+
open: n,
|
|
190
|
+
onOpenChange: y
|
|
191
|
+
}) => {
|
|
192
|
+
const g = G(null), { getAccessToken: I, user: v } = ee(), [U, k] = R([]), m = G(null), { state: r, dispatch: p } = Q(te), [, A] = C({
|
|
193
|
+
key: u + me,
|
|
194
|
+
initialValue: r.searchString
|
|
195
|
+
}), [S, E] = C({
|
|
196
|
+
key: u + Se,
|
|
197
|
+
initialValue: !1
|
|
198
|
+
}), [_, i] = C({
|
|
199
|
+
key: u + fe,
|
|
200
|
+
initialValue: !0
|
|
201
|
+
}), [z, b] = R(!1), [f, D] = R(null), [L, O] = R(null), w = P(
|
|
202
|
+
(a, F) => {
|
|
203
|
+
D(() => a), O(F), b(!0);
|
|
204
|
+
},
|
|
205
|
+
[]
|
|
206
|
+
), x = P(() => {
|
|
207
|
+
f && f(), D(null), O(null);
|
|
208
|
+
}, [f]), {
|
|
209
|
+
data: T,
|
|
210
|
+
refetch: K,
|
|
211
|
+
isLoading: H,
|
|
212
|
+
isError: c
|
|
213
|
+
} = Te({
|
|
214
|
+
enabled: n,
|
|
215
|
+
user: v?.username || "",
|
|
216
|
+
searchString: r.searchString || "",
|
|
217
|
+
sortDirection: r.sortDirection || h.DESC,
|
|
218
|
+
sortedCell: r.sortedCell || V,
|
|
219
|
+
getAccessToken: I,
|
|
220
|
+
keywordMatchAll: _
|
|
221
|
+
}), { data: d } = ye({
|
|
222
|
+
user: v?.username,
|
|
223
|
+
getAccessToken: I
|
|
224
|
+
}), Y = d && d.totalChats ? d.totalChats - d.privateChats - d.deletedChats : 0;
|
|
225
|
+
ae(() => {
|
|
226
|
+
T && k(
|
|
227
|
+
S ? T.filter((a) => a.favoriteChat === !0) : T
|
|
228
|
+
);
|
|
229
|
+
}, [T, S]);
|
|
230
|
+
const N = async (a) => {
|
|
231
|
+
A(a), p({
|
|
232
|
+
type: ge,
|
|
233
|
+
payload: { searchString: a }
|
|
234
|
+
});
|
|
235
|
+
}, j = ve((a) => {
|
|
236
|
+
N(a.target.value.trim());
|
|
237
|
+
}, 800), B = (a) => {
|
|
238
|
+
E(a);
|
|
239
|
+
}, q = (a) => {
|
|
240
|
+
i(a);
|
|
241
|
+
};
|
|
242
|
+
return /* @__PURE__ */ l(W, { children: [
|
|
243
|
+
/* @__PURE__ */ t(
|
|
244
|
+
Re,
|
|
245
|
+
{
|
|
246
|
+
showConfirmation: z,
|
|
247
|
+
setShowConfirmation: b,
|
|
248
|
+
action: x,
|
|
249
|
+
customStrings: {
|
|
250
|
+
confirmAction: "Delete",
|
|
251
|
+
cancelAction: "Cancel",
|
|
252
|
+
title: "Delete chat"
|
|
253
|
+
},
|
|
254
|
+
children: L
|
|
255
|
+
}
|
|
256
|
+
),
|
|
257
|
+
/* @__PURE__ */ t(
|
|
258
|
+
Ie,
|
|
259
|
+
{
|
|
260
|
+
open: n,
|
|
261
|
+
onOpenChange: y,
|
|
262
|
+
title: He,
|
|
263
|
+
animation: !0,
|
|
264
|
+
animationType: "fade",
|
|
265
|
+
blurEffect: "large",
|
|
266
|
+
initialFocus: g,
|
|
267
|
+
className: "h-full sm:h-max",
|
|
268
|
+
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: y, ref: g }) }) }),
|
|
269
|
+
children: /* @__PURE__ */ l("div", { className: "flex h-full flex-col gap-4", children: [
|
|
270
|
+
/* @__PURE__ */ t(
|
|
271
|
+
Me,
|
|
272
|
+
{
|
|
273
|
+
header: H && r.searchString ? "Loading..." : r.searchString ? "Filters applied" : "Filters",
|
|
274
|
+
toggles: /* @__PURE__ */ l(W, { children: [
|
|
275
|
+
/* @__PURE__ */ t(
|
|
276
|
+
$,
|
|
277
|
+
{
|
|
278
|
+
name: "favorites-only",
|
|
279
|
+
checked: S,
|
|
280
|
+
onChange: B,
|
|
281
|
+
label: "Show favorites only",
|
|
282
|
+
narrow: !0,
|
|
283
|
+
noBorder: !0
|
|
284
|
+
}
|
|
285
|
+
),
|
|
286
|
+
/* @__PURE__ */ t(
|
|
287
|
+
$,
|
|
288
|
+
{
|
|
289
|
+
name: "keyword-match-all",
|
|
290
|
+
checked: _,
|
|
291
|
+
onChange: q,
|
|
292
|
+
label: "Match all keywords",
|
|
293
|
+
narrow: !0,
|
|
294
|
+
noBorder: !0
|
|
295
|
+
}
|
|
296
|
+
)
|
|
297
|
+
] }),
|
|
298
|
+
inputSearchRef: m,
|
|
299
|
+
onSearchChange: j,
|
|
300
|
+
defaultValue: r.searchString,
|
|
301
|
+
resetDisabled: r.searchString === "",
|
|
302
|
+
onResetSearch: () => {
|
|
303
|
+
N(""), m.current?.value && (m.current.value = "", m.current.focus());
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
),
|
|
307
|
+
c && /* @__PURE__ */ t("p", { className: "m-0 text-copy-error-light", children: "Failed to load history." }),
|
|
308
|
+
!c && /* @__PURE__ */ t(
|
|
309
|
+
Ge,
|
|
310
|
+
{
|
|
311
|
+
mutate: K,
|
|
312
|
+
filteredHistory: U,
|
|
313
|
+
onOpenChange: y,
|
|
314
|
+
isLoading: H,
|
|
315
|
+
totalHistoryCount: Y,
|
|
316
|
+
isFiltered: !!(r.searchString || S),
|
|
317
|
+
isSearchActive: !!r.searchString,
|
|
318
|
+
requestConfirmation: w
|
|
319
|
+
}
|
|
320
|
+
)
|
|
321
|
+
] })
|
|
322
|
+
}
|
|
323
|
+
)
|
|
324
|
+
] });
|
|
325
|
+
};
|
|
326
|
+
export {
|
|
327
|
+
Be as HistoryPanel
|
|
328
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { IconSearch as c, Button as d } from "./LogoEntry.CxkQlFwX.js";
|
|
3
|
+
import { Card as n } from "./index.BcxzV___.js";
|
|
4
|
+
import { TextInput as f } from "./index.BbWF4ahv.js";
|
|
5
|
+
const b = ({
|
|
6
|
+
header: o,
|
|
7
|
+
toggles: t,
|
|
8
|
+
inputSearchRef: l,
|
|
9
|
+
onSearchChange: a,
|
|
10
|
+
onResetSearch: m,
|
|
11
|
+
defaultValue: s,
|
|
12
|
+
resetDisabled: i = !1
|
|
13
|
+
}) => /* @__PURE__ */ r(
|
|
14
|
+
n,
|
|
15
|
+
{
|
|
16
|
+
header: o,
|
|
17
|
+
className: "prose-dark dark:prose-lighter mb-4",
|
|
18
|
+
noBorder: !0,
|
|
19
|
+
compact: !0,
|
|
20
|
+
children: [
|
|
21
|
+
/* @__PURE__ */ e(
|
|
22
|
+
f,
|
|
23
|
+
{
|
|
24
|
+
placeholder: "Search",
|
|
25
|
+
labelHidden: !0,
|
|
26
|
+
noBorder: !0,
|
|
27
|
+
autoCapitalize: "off",
|
|
28
|
+
autoComplete: "off",
|
|
29
|
+
autoCorrect: "off",
|
|
30
|
+
ref: l,
|
|
31
|
+
defaultValue: s,
|
|
32
|
+
mode: "alt-system",
|
|
33
|
+
name: "Search",
|
|
34
|
+
label: "Search",
|
|
35
|
+
onChange: a,
|
|
36
|
+
className: "my-2",
|
|
37
|
+
rightElement: /* @__PURE__ */ e("div", { className: "dark:text-copy-dark text-copy-light", children: /* @__PURE__ */ e(c, { monotone: !0, size: "size-3" }) })
|
|
38
|
+
}
|
|
39
|
+
),
|
|
40
|
+
/* @__PURE__ */ r("div", { className: "flex flex-col justify-between sm:flex-row gap-2 sm:mb-0 mb-1", children: [
|
|
41
|
+
/* @__PURE__ */ e("div", { className: "flex flex-col sm:flex-row gap-2 order-1 sm:order-0", children: t }),
|
|
42
|
+
/* @__PURE__ */ e(
|
|
43
|
+
d,
|
|
44
|
+
{
|
|
45
|
+
mode: "light",
|
|
46
|
+
size: "small",
|
|
47
|
+
disabled: i,
|
|
48
|
+
onClick: m,
|
|
49
|
+
children: "Reset Search"
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
] })
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
export {
|
|
57
|
+
b as InlineFilter
|
|
58
|
+
};
|
|
@@ -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.DniyWjdG.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.CxkQlFwX.js";
|
|
4
|
+
import { Card as B } from "./index.BcxzV___.js";
|
|
5
|
+
import { TextInput as O, TextInputMask as T } from "./index.BbWF4ahv.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({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import B, { useRef as M, useEffect as z, useCallback as Q, useState as i1, useMemo as G, useContext as n1, useId as l1, useLayoutEffect as J } from "react";
|
|
2
2
|
import { jsxs as n, jsx as r } from "react/jsx-runtime";
|
|
3
3
|
import l from "clsx";
|
|
4
|
-
import { b as h, e as h1, R as d1, E as u1 } from "./index.
|
|
4
|
+
import { b as h, e as h1, R as d1, E as u1 } from "./index.DniyWjdG.js";
|
|
5
5
|
function p1() {
|
|
6
6
|
const t = M(!1);
|
|
7
7
|
return z(() => (t.current = !0, () => {
|