@versini/sassysaint 8.83.1 → 8.85.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.mWn6DHnN.js → AboutChangelog.Cmviu4q-.js} +3 -3
- package/dist/chunks/{AboutEntry.CF0h629q.js → AboutEntry.Hi0jo6Cb.js} +5 -5
- package/dist/chunks/{App.ByR7hh4G.js → App.B6stoZHi.js} +823 -820
- package/dist/chunks/{Chart.BOrnLtUH.js → Chart.-Zf5n2lJ.js} +2 -2
- package/dist/chunks/{ChatBubbleAssistant.BbKm4kCr.js → ChatBubbleAssistant.CJ9ZlMsQ.js} +10 -10
- package/dist/chunks/{ChatBubbleUser.CSd4FUFb.js → ChatBubbleUser.DrAvgLQQ.js} +3 -3
- package/dist/chunks/{ChatHistoryTable.OhJzHZwR.js → ChatHistoryTable.lIRb_XTS.js} +12 -12
- package/dist/chunks/{HistoryEntry.DuHoMXgy.js → HistoryEntry.BkHfgtzh.js} +137 -106
- package/dist/chunks/ProfileEntry.BuGuaJZ7.js +200 -0
- package/dist/chunks/{SettingsEntry.W5dfrzDj.js → SettingsEntry.C5p3uHQS.js} +21 -21
- package/dist/chunks/{UsageEntry.BlC_GEWV.js → UsageEntry.BR0TAHBi.js} +7 -7
- package/dist/chunks/{UserMemoriesPanel.pk5CBYkd.js → UserMemoriesPanel.I6TEjRS_.js} +12 -10
- package/dist/chunks/{index.xYO9MQ7q.js → index.-hZzCrDt.js} +1 -1
- package/dist/chunks/{index.X83cFhfe.js → index.CMqrKzc1.js} +1 -1
- package/dist/chunks/{index.Dm0B1x9v.js → index.DrgEENCo.js} +1 -1
- package/dist/chunks/{index.DosDfPyo.js → index.DuJhOApx.js} +1 -1
- package/dist/chunks/{index.DvwicTLq.js → index.Hwof3Goa.js} +1217 -1271
- package/dist/chunks/{index.eSkzK0sZ.js → index.ZEvOt3IK.js} +2 -2
- package/dist/chunks/{index.LWfh_Nx0.js → index.f-Tyvnqq.js} +1 -1
- package/dist/chunks/{index.C4Kp9caJ.js → index.mKL_Oq89.js} +1 -1
- package/dist/chunks/{index.Dq1H4UoP.js → index.oca08k9S.js} +3 -3
- package/dist/chunks/{useMarkdown.Bxe6gfSy.js → useMarkdown.DSduoaoO.js} +6 -6
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/dist/style.css +1 -1
- package/package.json +3 -3
- package/dist/chunks/ProfileEntry.CTvtlf06.js +0 -181
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as Ap } from "react/jsx-runtime";
|
|
2
|
-
import { getDefaultExportFromCjs as ln } from "./App.
|
|
2
|
+
import { getDefaultExportFromCjs as ln } from "./App.B6stoZHi.js";
|
|
3
3
|
import Cp, { useState as Pp, useEffect as Op } from "react";
|
|
4
|
-
import { TRIMESTERS as rn, TRIMESTERS_SHORT as Lp, isProbablyMobile as Ep } from "./index.
|
|
4
|
+
import { TRIMESTERS as rn, TRIMESTERS_SHORT as Lp, isProbablyMobile as Ep } from "./index.Hwof3Goa.js";
|
|
5
5
|
var ls = { exports: {} }, Ip = ls.exports, on;
|
|
6
6
|
function Dp() {
|
|
7
7
|
return on || (on = 1, (function(we, he) {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx as x } from "react/jsx-runtime";
|
|
2
|
-
import { ChatContext as P, AppContext as R, n as y, useUserPreferences as L, convertCamelCaseToReadable as _, numberFormatter as v, pluralize as B,
|
|
3
|
-
import { BUBBLE_FOOTER_EMPTY as D } from "./index.
|
|
2
|
+
import { ChatContext as P, AppContext as R, n as y, useUserPreferences as L, convertCamelCaseToReadable as _, numberFormatter as v, pluralize as B, O as G } from "./index.Hwof3Goa.js";
|
|
3
|
+
import { BUBBLE_FOOTER_EMPTY as D } from "./index.mKL_Oq89.js";
|
|
4
4
|
import U from "clsx";
|
|
5
|
-
import j, { useState as M, useRef as E, useEffect as
|
|
6
|
-
import { AsyncBubble as k } from "./App.
|
|
7
|
-
import { useMarkdown as q } from "./useMarkdown.
|
|
5
|
+
import j, { useState as M, useRef as E, useEffect as O, useContext as S } from "react";
|
|
6
|
+
import { AsyncBubble as k } from "./App.B6stoZHi.js";
|
|
7
|
+
import { useMarkdown as q } from "./useMarkdown.DSduoaoO.js";
|
|
8
8
|
const I = 2, W = I * 1e3, b = "", V = (e) => e * (2 - e);
|
|
9
9
|
function Y(e, n = !0) {
|
|
10
10
|
const [a, d] = M(0), [i, p] = M(0), [t, C] = M(e), r = E(0), s = E(0);
|
|
11
|
-
return t !== e && (C(e), p(e.startsWith(t) ? a : 0)),
|
|
11
|
+
return t !== e && (C(e), p(e.startsWith(t) ? a : 0)), O(() => {
|
|
12
12
|
if (!n)
|
|
13
13
|
return;
|
|
14
14
|
const g = e.split(b).length, c = (o) => {
|
|
@@ -38,17 +38,17 @@ const f = {
|
|
|
38
38
|
state: { streaming: C, restoredModel: r, tokenUsage: s }
|
|
39
39
|
} = S(P), {
|
|
40
40
|
state: { fullScreen: g }
|
|
41
|
-
} = S(R), c = n?.model || r, o = s, [u, l] = q(), { user: h, getAccessToken: T } = y(), { data:
|
|
41
|
+
} = S(R), c = n?.model || r, o = s, [u, l] = q(), { user: h, getAccessToken: T } = y(), { data: F } = L({
|
|
42
42
|
user: h?.username,
|
|
43
43
|
getAccessToken: T
|
|
44
|
-
}),
|
|
44
|
+
}), N = F?.showDetails || !1, A = U("prose-li:ps-3", {
|
|
45
45
|
"max-w-xs sm:max-w-3xl": !g
|
|
46
46
|
});
|
|
47
47
|
let m;
|
|
48
|
-
return
|
|
48
|
+
return N && (m = {
|
|
49
49
|
[f.MODEL]: c || null,
|
|
50
50
|
[f.PLUGIN]: a ? _(a) : null
|
|
51
|
-
}, o && (p ? m[f.USAGE] = `${v.format(o)} ${B("token", o)}` : m[f.USAGE] = D)),
|
|
51
|
+
}, o && (p ? m[f.USAGE] = `${v.format(o)} ${B("token", o)}` : m[f.USAGE] = D)), O(() => {
|
|
52
52
|
t && l(t);
|
|
53
53
|
}, [t, l]), d === G ? /* @__PURE__ */ x(
|
|
54
54
|
k,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as a, Fragment as h, jsxs as S } from "react/jsx-runtime";
|
|
2
|
-
import { Button as C } from "./index.
|
|
2
|
+
import { Button as C } from "./index.Hwof3Goa.js";
|
|
3
3
|
import { useState as _, useMemo as m, isValidElement as T, useEffect as b } from "react";
|
|
4
|
-
import { AsyncBubble as w } from "./App.
|
|
5
|
-
import { useMarkdown as x } from "./useMarkdown.
|
|
4
|
+
import { AsyncBubble as w } from "./App.B6stoZHi.js";
|
|
5
|
+
import { useMarkdown as x } from "./useMarkdown.DSduoaoO.js";
|
|
6
6
|
/*!
|
|
7
7
|
@versini/ui-truncate v5.2.0
|
|
8
8
|
© 2025 gizmette.com
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as c, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { W as
|
|
4
|
-
import { Tooltip as d } from "./App.
|
|
2
|
+
import { B as x, k as u, INFINITE_SCROLL_THRESHOLD as v, CARDS as I, pluralize as M, ButtonIcon as i, IconRestore as U, IconStarInCircle as y, IconStarInCircleLight as D, IconDelete as z, numberFormatter as L, isProbablyMobile as _ } from "./index.Hwof3Goa.js";
|
|
3
|
+
import { W as B, j as P, G as m, H as $, M as a, F as f } from "./index.-hZzCrDt.js";
|
|
4
|
+
import { Tooltip as d } from "./App.B6stoZHi.js";
|
|
5
5
|
import h from "clsx";
|
|
6
6
|
import { Fragment as W } from "react";
|
|
7
7
|
const s = {
|
|
@@ -34,13 +34,13 @@ const s = {
|
|
|
34
34
|
totalHistoryCount: b,
|
|
35
35
|
isFiltered: R = !1
|
|
36
36
|
}) => {
|
|
37
|
-
const C = _() ? Y : G,
|
|
37
|
+
const C = _() ? Y : G, k = (t) => {
|
|
38
38
|
switch (t) {
|
|
39
39
|
case s.ROW:
|
|
40
40
|
return /* @__PURE__ */ e(a, { className: "sr-only", children: "Row" }, t);
|
|
41
41
|
case s.TIMESTAMP:
|
|
42
42
|
return /* @__PURE__ */ e(
|
|
43
|
-
|
|
43
|
+
f,
|
|
44
44
|
{
|
|
45
45
|
focusMode: "system",
|
|
46
46
|
buttonClassName: "text-xs sm:text-sm",
|
|
@@ -59,7 +59,7 @@ const s = {
|
|
|
59
59
|
return /* @__PURE__ */ e(a, { className: "text-xs sm:text-sm", children: "Summary" }, t);
|
|
60
60
|
case s.TOKEN_USAGE:
|
|
61
61
|
return /* @__PURE__ */ e(
|
|
62
|
-
|
|
62
|
+
f,
|
|
63
63
|
{
|
|
64
64
|
focusMode: "system",
|
|
65
65
|
buttonClassName: "text-xs sm:text-sm",
|
|
@@ -79,7 +79,7 @@ const s = {
|
|
|
79
79
|
default:
|
|
80
80
|
return null;
|
|
81
81
|
}
|
|
82
|
-
},
|
|
82
|
+
}, w = (t, r, l) => {
|
|
83
83
|
switch (t) {
|
|
84
84
|
case s.ROW:
|
|
85
85
|
return /* @__PURE__ */ e(a, { children: l + 1 }, t);
|
|
@@ -197,15 +197,15 @@ const s = {
|
|
|
197
197
|
return null;
|
|
198
198
|
}
|
|
199
199
|
};
|
|
200
|
-
return /* @__PURE__ */ c(
|
|
200
|
+
return /* @__PURE__ */ c(B, { stickyHeader: !0, compact: !0, mode: "alt-system", caption: (() => {
|
|
201
201
|
const t = n.length, r = b ?? t;
|
|
202
|
-
return R && r > t ? `Showing ${
|
|
202
|
+
return R && r > t ? `Showing ${M(`${t} chat`, t)} out of ${r}` : M(`${t} chat`, t);
|
|
203
203
|
})(), children: [
|
|
204
|
-
/* @__PURE__ */ e(
|
|
205
|
-
/* @__PURE__ */ e(
|
|
204
|
+
/* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(m, { children: C.map((t) => k(t)) }) }),
|
|
205
|
+
/* @__PURE__ */ e($, { children: O && n.length === 0 ? /* @__PURE__ */ e(m, { children: /* @__PURE__ */ e(a, { colSpan: 1e3, children: /* @__PURE__ */ e("div", { children: "Loading..." }) }) }) : n.slice(0, p).map((t, r) => t?.messages?.length > 0 ? /* @__PURE__ */ c(W, { children: [
|
|
206
206
|
r === p - v && /* @__PURE__ */ e("tr", { ref: A }),
|
|
207
207
|
/* @__PURE__ */ e(m, { children: C.map(
|
|
208
|
-
(l) =>
|
|
208
|
+
(l) => w(l, t, r)
|
|
209
209
|
) })
|
|
210
210
|
] }, `${I.HISTORY.TITLE}-${t.id}-${r}`) : null) })
|
|
211
211
|
] });
|
|
@@ -1,62 +1,63 @@
|
|
|
1
|
-
import { jsxs as c, Fragment as
|
|
2
|
-
import { n as
|
|
3
|
-
import { useAiChat as
|
|
4
|
-
import
|
|
5
|
-
|
|
1
|
+
import { jsxs as c, Fragment as ee, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { n as V, INFINITE_SCROLL_LIMIT as G, INFINITE_SCROLL_THRESHOLD as te, HistoryContext as U, ChatContext as re, useLocalStorage as y, LOCAL_STORAGE_PREFIX as p, LOCAL_STORAGE_SORT_TIMESTAMP as ae, e$1 as h, LOCAL_STORAGE_SORT_TOKEN_USAGE as se, LOCAL_STORAGE_SORT as oe, B as v, useDeleteChat as ne, useToggleFavoriteChat as ie, APP_CLASSNAME as ce, TOAST_CHAT_DELETED as le, graphQLRequest as de, SERVICE_TYPES as he, ACTION_SORT as me, k as ue, useChatsHistory as Ce, useUserChatStats as Se, LOCAL_STORAGE_SEARCH as fe, LOCAL_STORAGE_FAVORITES_ONLY as ye, HISTORY_TITLE as pe, Card as ge, TextInput as Te, debounce as Ae, IconSearch as Ee, Button as M, L as De, j$1 as _e, ACTION_SEARCH as ke } from "./index.Hwof3Goa.js";
|
|
3
|
+
import { useAiChat as Le, ConfirmationPanel as ve, LazyToastContainerWrapper as Oe, showErrorToast as be, CHAT_SET_STATUS as Re, Panel as Ie, Toggle as xe } from "./App.B6stoZHi.js";
|
|
4
|
+
import Ne from "clsx";
|
|
5
|
+
import { useRef as N, useState as H, useContext as w, useCallback as P, Suspense as He, lazy as we, useEffect as Fe } from "react";
|
|
6
|
+
const ze = we(
|
|
6
7
|
() => import(
|
|
7
8
|
/* webpackChunkName: "history-table" */
|
|
8
|
-
"./ChatHistoryTable.
|
|
9
|
+
"./ChatHistoryTable.lIRb_XTS.js"
|
|
9
10
|
).then((m) => ({ default: m.ChatHistoryTable }))
|
|
10
|
-
),
|
|
11
|
+
), Ge = ({
|
|
11
12
|
filteredHistory: m,
|
|
12
|
-
onOpenChange:
|
|
13
|
-
mutate:
|
|
14
|
-
isLoading:
|
|
15
|
-
totalHistoryCount:
|
|
16
|
-
isFiltered:
|
|
13
|
+
onOpenChange: C,
|
|
14
|
+
mutate: S,
|
|
15
|
+
isLoading: g = !1,
|
|
16
|
+
totalHistoryCount: O,
|
|
17
|
+
isFiltered: T = !1
|
|
17
18
|
}) => {
|
|
18
|
-
const { user: l, getAccessToken: s } =
|
|
19
|
+
const { user: l, getAccessToken: s } = V(), f = N(null), n = N({
|
|
19
20
|
id: "",
|
|
20
21
|
timestamp: "",
|
|
21
22
|
message: ""
|
|
22
23
|
}), [A, E] = H(!1), [D, d] = H(
|
|
23
|
-
G +
|
|
24
|
-
), { state: i, dispatch:
|
|
24
|
+
G + te
|
|
25
|
+
), { state: i, dispatch: b } = w(U), u = {
|
|
25
26
|
searchString: i.searchString || "",
|
|
26
27
|
sortDirection: i.sortDirection || h.DESC,
|
|
27
28
|
sortedCell: i.sortedCell || v
|
|
28
29
|
}, {
|
|
29
|
-
setChatId:
|
|
30
|
+
setChatId: R,
|
|
30
31
|
setInitialMessages: _,
|
|
31
|
-
dispatch:
|
|
32
|
-
} = w(
|
|
33
|
-
key:
|
|
32
|
+
dispatch: I
|
|
33
|
+
} = w(re), { setInput: x } = Le(), [k, r] = y({
|
|
34
|
+
key: p + ae,
|
|
34
35
|
initialValue: h.DESC
|
|
35
|
-
}), [
|
|
36
|
-
key:
|
|
36
|
+
}), [B, j] = y({
|
|
37
|
+
key: p + se,
|
|
37
38
|
initialValue: h.ASC
|
|
38
|
-
}), [,
|
|
39
|
-
key:
|
|
39
|
+
}), [, Y] = y({
|
|
40
|
+
key: p + oe,
|
|
40
41
|
initialValue: v
|
|
41
|
-
}), { mutateAsync:
|
|
42
|
+
}), { mutateAsync: $ } = ne({ getAccessToken: s }), { mutateAsync: q } = ie({
|
|
42
43
|
getAccessToken: s
|
|
43
44
|
}), K = (e) => {
|
|
44
45
|
const o = i.sortedCell === e;
|
|
45
|
-
let
|
|
46
|
+
let a, L;
|
|
46
47
|
switch (e) {
|
|
47
48
|
case v:
|
|
48
|
-
L =
|
|
49
|
+
L = r, a = o ? i.sortDirection : k;
|
|
49
50
|
break;
|
|
50
|
-
case
|
|
51
|
-
L =
|
|
51
|
+
case ue:
|
|
52
|
+
L = j, a = o ? i.sortDirection : B;
|
|
52
53
|
break;
|
|
53
54
|
default:
|
|
54
|
-
L =
|
|
55
|
+
L = r, a = o ? i.sortDirection : k;
|
|
55
56
|
break;
|
|
56
57
|
}
|
|
57
|
-
const z =
|
|
58
|
-
L(z),
|
|
59
|
-
type:
|
|
58
|
+
const z = a === h.ASC ? h.DESC : h.ASC;
|
|
59
|
+
L(z), Y(e), b({
|
|
60
|
+
type: me,
|
|
60
61
|
payload: {
|
|
61
62
|
sortedCell: e,
|
|
62
63
|
sortDirection: z
|
|
@@ -65,10 +66,10 @@ const He = xe(
|
|
|
65
66
|
}, Q = async () => {
|
|
66
67
|
const e = n.current;
|
|
67
68
|
try {
|
|
68
|
-
await
|
|
69
|
+
await $({
|
|
69
70
|
userId: l?.username || "",
|
|
70
71
|
id: e.id
|
|
71
|
-
}),
|
|
72
|
+
}), S(""), await be(le, {
|
|
72
73
|
autoClose: 2e3,
|
|
73
74
|
containerId: "history-table"
|
|
74
75
|
});
|
|
@@ -76,23 +77,23 @@ const He = xe(
|
|
|
76
77
|
}
|
|
77
78
|
}, W = async (e) => {
|
|
78
79
|
try {
|
|
79
|
-
const o = await s(),
|
|
80
|
+
const o = await s(), a = await de({
|
|
80
81
|
accessToken: o,
|
|
81
|
-
type:
|
|
82
|
+
type: he.GET_CHAT,
|
|
82
83
|
params: {
|
|
83
84
|
id: e.id
|
|
84
85
|
}
|
|
85
86
|
});
|
|
86
|
-
|
|
87
|
-
type:
|
|
87
|
+
I({
|
|
88
|
+
type: Re,
|
|
88
89
|
payload: {
|
|
89
90
|
streaming: !1,
|
|
90
91
|
loading: !1,
|
|
91
92
|
restoring: !0,
|
|
92
|
-
restoredModel:
|
|
93
|
-
restoredUsage:
|
|
93
|
+
restoredModel: a.data?.model || "",
|
|
94
|
+
restoredUsage: a.data?.tokenUsage || 0
|
|
94
95
|
}
|
|
95
|
-
}), x(""),
|
|
96
|
+
}), x(""), R(e.id), _(a.data.messages), C(!1);
|
|
96
97
|
} catch {
|
|
97
98
|
}
|
|
98
99
|
}, X = (e) => {
|
|
@@ -106,25 +107,25 @@ const He = xe(
|
|
|
106
107
|
await q({
|
|
107
108
|
userId: l?.username || "",
|
|
108
109
|
id: e.id
|
|
109
|
-
}),
|
|
110
|
+
}), S("");
|
|
110
111
|
} catch {
|
|
111
112
|
}
|
|
112
|
-
}, F =
|
|
113
|
-
e[0].isIntersecting && d((
|
|
114
|
-
}, []), Z =
|
|
113
|
+
}, F = P((e) => {
|
|
114
|
+
e[0].isIntersecting && d((a) => a + G);
|
|
115
|
+
}, []), Z = P(
|
|
115
116
|
(e) => {
|
|
116
|
-
if (
|
|
117
|
+
if (f.current && f.current.disconnect(), e) {
|
|
117
118
|
const o = {
|
|
118
119
|
rootMargin: "20px"
|
|
119
|
-
},
|
|
120
|
-
|
|
120
|
+
}, a = new IntersectionObserver(F, o);
|
|
121
|
+
a.observe(e), f.current = a;
|
|
121
122
|
}
|
|
122
123
|
},
|
|
123
124
|
[F]
|
|
124
125
|
);
|
|
125
|
-
return /* @__PURE__ */ c(
|
|
126
|
+
return /* @__PURE__ */ c(ee, { children: [
|
|
126
127
|
/* @__PURE__ */ c(
|
|
127
|
-
|
|
128
|
+
ve,
|
|
128
129
|
{
|
|
129
130
|
showConfirmation: A,
|
|
130
131
|
setShowConfirmation: E,
|
|
@@ -151,9 +152,9 @@ const He = xe(
|
|
|
151
152
|
]
|
|
152
153
|
}
|
|
153
154
|
),
|
|
154
|
-
/* @__PURE__ */ t("div", { className:
|
|
155
|
-
/* @__PURE__ */ t(
|
|
156
|
-
|
|
155
|
+
/* @__PURE__ */ t("div", { className: ce, children: /* @__PURE__ */ t(Oe, { containerId: "history-table" }) }),
|
|
156
|
+
/* @__PURE__ */ t(He, { fallback: /* @__PURE__ */ t("div", {}), children: /* @__PURE__ */ t(
|
|
157
|
+
ze,
|
|
157
158
|
{
|
|
158
159
|
filteredHistory: m,
|
|
159
160
|
historyState: u,
|
|
@@ -163,66 +164,85 @@ const He = xe(
|
|
|
163
164
|
onClickDelete: X,
|
|
164
165
|
onClickFavorite: J,
|
|
165
166
|
infinityScrollMarkerRef: Z,
|
|
166
|
-
isLoading:
|
|
167
|
-
totalHistoryCount:
|
|
168
|
-
isFiltered:
|
|
167
|
+
isLoading: g,
|
|
168
|
+
totalHistoryCount: O,
|
|
169
|
+
isFiltered: T
|
|
169
170
|
}
|
|
170
171
|
) })
|
|
171
172
|
] });
|
|
172
|
-
},
|
|
173
|
+
}, je = ({
|
|
173
174
|
open: m,
|
|
174
|
-
onOpenChange:
|
|
175
|
+
onOpenChange: C
|
|
175
176
|
}) => {
|
|
176
|
-
const { getAccessToken:
|
|
177
|
+
const { getAccessToken: S, user: g } = V(), [O, T] = H([]), l = N(null), { state: s, dispatch: f } = w(U), {
|
|
177
178
|
data: n,
|
|
178
179
|
refetch: A,
|
|
179
180
|
isLoading: E,
|
|
180
181
|
isError: D
|
|
181
|
-
} =
|
|
182
|
+
} = Ce({
|
|
182
183
|
enabled: m,
|
|
183
|
-
user:
|
|
184
|
+
user: g?.username || "",
|
|
184
185
|
searchString: s.searchString || "",
|
|
185
186
|
sortDirection: s.sortDirection || h.DESC,
|
|
186
187
|
sortedCell: s.sortedCell || v,
|
|
187
|
-
getAccessToken:
|
|
188
|
-
}), { data: d } =
|
|
189
|
-
user:
|
|
190
|
-
getAccessToken:
|
|
191
|
-
}), i = d && d.totalChats ? d.totalChats - d.privateChats - d.deletedChats : 0, [,
|
|
192
|
-
key:
|
|
188
|
+
getAccessToken: S
|
|
189
|
+
}), { data: d } = Se({
|
|
190
|
+
user: g?.username,
|
|
191
|
+
getAccessToken: S
|
|
192
|
+
}), i = d && d.totalChats ? d.totalChats - d.privateChats - d.deletedChats : 0, [, b] = y({
|
|
193
|
+
key: p + fe,
|
|
193
194
|
initialValue: s.searchString
|
|
194
|
-
}), [u,
|
|
195
|
-
key:
|
|
195
|
+
}), [u, R] = y({
|
|
196
|
+
key: p + ye,
|
|
196
197
|
initialValue: !1
|
|
197
198
|
});
|
|
198
|
-
|
|
199
|
-
n &&
|
|
200
|
-
u ? n.filter((
|
|
199
|
+
Fe(() => {
|
|
200
|
+
n && T(
|
|
201
|
+
u ? n.filter((r) => r.favoriteChat === !0) : n
|
|
201
202
|
);
|
|
202
203
|
}, [n, u]);
|
|
203
|
-
const _ = async (
|
|
204
|
-
|
|
205
|
-
type:
|
|
206
|
-
payload: { searchString:
|
|
204
|
+
const _ = async (r) => {
|
|
205
|
+
b(r), f({
|
|
206
|
+
type: ke,
|
|
207
|
+
payload: { searchString: r }
|
|
207
208
|
});
|
|
208
|
-
},
|
|
209
|
-
_(
|
|
210
|
-
}, 500), x = async (
|
|
211
|
-
|
|
212
|
-
},
|
|
213
|
-
|
|
209
|
+
}, I = Ae((r) => {
|
|
210
|
+
_(r.target.value.trim());
|
|
211
|
+
}, 500), x = async (r) => {
|
|
212
|
+
r.preventDefault();
|
|
213
|
+
}, k = (r) => {
|
|
214
|
+
R(r);
|
|
214
215
|
};
|
|
215
216
|
return /* @__PURE__ */ c(
|
|
216
|
-
|
|
217
|
+
Ie,
|
|
217
218
|
{
|
|
218
219
|
open: m,
|
|
219
|
-
onOpenChange:
|
|
220
|
-
title:
|
|
220
|
+
onOpenChange: C,
|
|
221
|
+
title: pe,
|
|
221
222
|
animation: !0,
|
|
222
223
|
animationType: "fade",
|
|
224
|
+
footer: /* @__PURE__ */ t(
|
|
225
|
+
De,
|
|
226
|
+
{
|
|
227
|
+
columnGap: 2,
|
|
228
|
+
alignHorizontal: "flex-end",
|
|
229
|
+
className: "pb-8 sm:pb-0",
|
|
230
|
+
children: /* @__PURE__ */ t(_e, { children: /* @__PURE__ */ t(
|
|
231
|
+
M,
|
|
232
|
+
{
|
|
233
|
+
mode: "dark",
|
|
234
|
+
variant: "secondary",
|
|
235
|
+
focusMode: "light",
|
|
236
|
+
noBorder: !0,
|
|
237
|
+
onClick: () => C(!1),
|
|
238
|
+
children: "Dismiss"
|
|
239
|
+
}
|
|
240
|
+
) })
|
|
241
|
+
}
|
|
242
|
+
),
|
|
223
243
|
children: [
|
|
224
244
|
/* @__PURE__ */ t(
|
|
225
|
-
|
|
245
|
+
ge,
|
|
226
246
|
{
|
|
227
247
|
header: s.searchString ? "Filters applied" : "Filters",
|
|
228
248
|
className: "prose-dark dark:prose-lighter mb-4",
|
|
@@ -243,25 +263,25 @@ const He = xe(
|
|
|
243
263
|
mode: "alt-system",
|
|
244
264
|
name: "Search",
|
|
245
265
|
label: "Search",
|
|
246
|
-
onChange:
|
|
266
|
+
onChange: I,
|
|
247
267
|
className: "my-2",
|
|
248
|
-
rightElement: /* @__PURE__ */ t("div", { className: "dark:text-copy-dark text-copy-light", children: /* @__PURE__ */ t(
|
|
268
|
+
rightElement: /* @__PURE__ */ t("div", { className: "dark:text-copy-dark text-copy-light", children: /* @__PURE__ */ t(Ee, { monotone: !0, size: "size-3" }) })
|
|
249
269
|
}
|
|
250
270
|
),
|
|
251
271
|
/* @__PURE__ */ c("div", { className: "flex flex-col justify-between sm:flex-row gap-2 sm:mb-0 mb-1", children: [
|
|
252
272
|
/* @__PURE__ */ t("div", { className: "order-1 sm:order-0", children: /* @__PURE__ */ t(
|
|
253
|
-
|
|
273
|
+
xe,
|
|
254
274
|
{
|
|
255
275
|
name: "favorites-only",
|
|
256
276
|
checked: u,
|
|
257
|
-
onChange:
|
|
277
|
+
onChange: k,
|
|
258
278
|
label: "Show favorites only",
|
|
259
279
|
narrow: !0,
|
|
260
280
|
noBorder: !0
|
|
261
281
|
}
|
|
262
282
|
) }),
|
|
263
283
|
/* @__PURE__ */ t(
|
|
264
|
-
|
|
284
|
+
M,
|
|
265
285
|
{
|
|
266
286
|
size: "small",
|
|
267
287
|
disabled: s.searchString === "",
|
|
@@ -275,24 +295,35 @@ const He = xe(
|
|
|
275
295
|
] })
|
|
276
296
|
}
|
|
277
297
|
),
|
|
278
|
-
/* @__PURE__ */ c(
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
298
|
+
/* @__PURE__ */ c(
|
|
299
|
+
"div",
|
|
300
|
+
{
|
|
301
|
+
className: Ne(
|
|
302
|
+
"flex flex-col sm:flex-row",
|
|
303
|
+
"max-h-[65vh]",
|
|
304
|
+
"sm:max-h-[75vh]",
|
|
305
|
+
"min-h-[60vh]"
|
|
306
|
+
),
|
|
307
|
+
children: [
|
|
308
|
+
D && /* @__PURE__ */ t("p", { className: "m-0 text-red-500", children: "Failed to load history." }),
|
|
309
|
+
!D && /* @__PURE__ */ t(
|
|
310
|
+
Ge,
|
|
311
|
+
{
|
|
312
|
+
mutate: A,
|
|
313
|
+
filteredHistory: O,
|
|
314
|
+
onOpenChange: C,
|
|
315
|
+
isLoading: E,
|
|
316
|
+
totalHistoryCount: i,
|
|
317
|
+
isFiltered: !!(s.searchString || u)
|
|
318
|
+
}
|
|
319
|
+
)
|
|
320
|
+
]
|
|
321
|
+
}
|
|
322
|
+
)
|
|
292
323
|
]
|
|
293
324
|
}
|
|
294
325
|
);
|
|
295
326
|
};
|
|
296
327
|
export {
|
|
297
|
-
|
|
328
|
+
je as HistoryPanel
|
|
298
329
|
};
|