@versini/sassysaint 8.90.2 → 8.91.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.Bzj36blr.js → AboutChangelog.DghwIbGm.js} +3 -3
- package/dist/chunks/AboutEntry.RlLAPOEe.js +89 -0
- package/dist/chunks/{App.BLhkVXVz.js → App.DkMgrvIO.js} +635 -613
- package/dist/chunks/{Chart.Ck03N8tk.js → Chart.v7akUZT3.js} +2 -2
- package/dist/chunks/ChatBubbleAssistant.Bu1x35ya.js +71 -0
- package/dist/chunks/{ChatBubbleUser.D0_zGRN6.js → ChatBubbleUser.DiGyPZ2b.js} +3 -3
- package/dist/chunks/{ChatHistoryTable.DffhDAId.js → ChatHistoryTable.BgPyiv-W.js} +8 -8
- package/dist/chunks/{HistoryEntry.CyZKhE-r.js → HistoryEntry.BhfYcwPP.js} +38 -37
- package/dist/chunks/{ProfileEntry.CKZk7T66.js → ProfileEntry.FFqtFIdd.js} +21 -20
- package/dist/chunks/{SettingsEntry.Bmq54xRJ.js → SettingsEntry.BI15jO5w.js} +25 -24
- package/dist/chunks/{UsageEntry.CUOJVTSh.js → UsageEntry.DB1Dgup7.js} +26 -25
- package/dist/chunks/{UserMemoriesPanel.CewUKKEO.js → UserMemoriesPanel.CGE_KomO.js} +13 -12
- package/dist/chunks/{index.Cdezl5BS.js → index.8SDxHLuq.js} +638 -642
- package/dist/chunks/{index.CGkK3Bq7.js → index.BE8w381j.js} +1 -1
- package/dist/chunks/{index.Ds35lAgW.js → index.BRlTWyjo.js} +2 -2
- package/dist/chunks/{index.BnVRcTCh.js → index.C7z08Bcn.js} +1 -1
- package/dist/chunks/{index.DA-sTqbx.js → index.CEi6RNum.js} +1 -1
- package/dist/chunks/{index.25VgFBJF.js → index.CRj1aLR-.js} +1 -1
- package/dist/chunks/{index.D6Jf67I7.js → index.DBoCLIQA.js} +1 -1
- package/dist/chunks/{index.B2fv-jn6.js → index.eCKoB2IJ.js} +3 -3
- package/dist/chunks/{index.XVjKijS9.js → index.mhC0_M_t.js} +1 -1
- package/dist/chunks/{useMarkdown.CAyTbBaF.js → useMarkdown.fdak3xWv.js} +6 -6
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/dist/style.css +2 -2
- package/package.json +3 -3
- package/dist/chunks/AboutEntry.SY2SIeDZ.js +0 -69
- package/dist/chunks/ChatBubbleAssistant.DtgiothS.js +0 -82
|
@@ -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.DkMgrvIO.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.8SDxHLuq.js";
|
|
5
5
|
var ls = { exports: {} }, Ip = ls.exports, on;
|
|
6
6
|
function Dp() {
|
|
7
7
|
return on || (on = 1, (function(we, he) {
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { jsx as k } from "react/jsx-runtime";
|
|
2
|
+
import { ChatContext as F, AppContext as O, n as P, useUserPreferences as R, convertCamelCaseToReadable as L, numberFormatter as _, pluralize as B } from "./index.8SDxHLuq.js";
|
|
3
|
+
import { BUBBLE_FOOTER_EMPTY as G } from "./index.C7z08Bcn.js";
|
|
4
|
+
import E from "clsx";
|
|
5
|
+
import v, { useState as h, useRef as M, useEffect as S, useContext as x } from "react";
|
|
6
|
+
import { AsyncBubble as y } from "./App.DkMgrvIO.js";
|
|
7
|
+
import { useMarkdown as D } from "./useMarkdown.fdak3xWv.js";
|
|
8
|
+
const N = 2, q = N * 1e3, A = "", I = (e) => e * (2 - e);
|
|
9
|
+
function j(e, o = !0) {
|
|
10
|
+
const [n, C] = h(0), [a, i] = h(0), [c, g] = h(e), t = M(0), s = M(0);
|
|
11
|
+
return c !== e && (g(e), i(e.startsWith(c) ? n : 0)), S(() => {
|
|
12
|
+
if (!o)
|
|
13
|
+
return;
|
|
14
|
+
const u = e.split(A).length, r = (l) => {
|
|
15
|
+
s.current || (s.current = l);
|
|
16
|
+
const m = l - s.current, f = Math.min(m / q, 1), T = I(f), b = a + (u - a) * T;
|
|
17
|
+
C(Math.floor(b)), f < 1 && (t.current = requestAnimationFrame(r));
|
|
18
|
+
};
|
|
19
|
+
return s.current = 0, t.current = requestAnimationFrame(r), () => {
|
|
20
|
+
t.current && cancelAnimationFrame(t.current);
|
|
21
|
+
};
|
|
22
|
+
}, [a, e, o]), o ? e.split(A).slice(0, n).join(A) : e;
|
|
23
|
+
}
|
|
24
|
+
const p = {
|
|
25
|
+
MODEL: "Model",
|
|
26
|
+
PLUGIN: "Plugin",
|
|
27
|
+
USAGE: "Session usage"
|
|
28
|
+
}, V = E("max-w-[99cqw]", "mt-3"), Q = v.memo(
|
|
29
|
+
({
|
|
30
|
+
content: e,
|
|
31
|
+
annotations: o,
|
|
32
|
+
toolName: n,
|
|
33
|
+
smooth: C = !1,
|
|
34
|
+
isLastAssistantMessage: a = !1
|
|
35
|
+
}) => {
|
|
36
|
+
const i = j(e, C), {
|
|
37
|
+
state: { streaming: c, restoredModel: g, tokenUsage: t }
|
|
38
|
+
} = x(F), {
|
|
39
|
+
state: { fullScreen: s }
|
|
40
|
+
} = x(O), u = o?.model || g, r = t, [l, m] = D(), { user: f, getAccessToken: T } = P(), { data: b } = R({
|
|
41
|
+
user: f?.username,
|
|
42
|
+
getAccessToken: T
|
|
43
|
+
}), w = b?.showDetails || !1, U = E("prose-li:ps-3", {
|
|
44
|
+
"max-w-xs sm:max-w-3xl": !s
|
|
45
|
+
});
|
|
46
|
+
let d;
|
|
47
|
+
return w && (d = {
|
|
48
|
+
[p.MODEL]: u || null,
|
|
49
|
+
[p.PLUGIN]: n ? L(n) : null
|
|
50
|
+
}, r && (a ? d[p.USAGE] = `${_.format(r)} ${B("token", r)}` : d[p.USAGE] = G)), S(() => {
|
|
51
|
+
i && m(i);
|
|
52
|
+
}, [i, m]), /* @__PURE__ */ k(
|
|
53
|
+
y,
|
|
54
|
+
{
|
|
55
|
+
gradient: "light",
|
|
56
|
+
tail: !0,
|
|
57
|
+
copyToClipboardMode: "dark",
|
|
58
|
+
copyToClipboardFocusMode: "light",
|
|
59
|
+
copyToClipboard: c ? "loading..." : e,
|
|
60
|
+
footer: d,
|
|
61
|
+
className: V,
|
|
62
|
+
contentClassName: U,
|
|
63
|
+
noMaxWidth: !0,
|
|
64
|
+
children: l
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
export {
|
|
70
|
+
Q as default
|
|
71
|
+
};
|
|
@@ -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.8SDxHLuq.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.DkMgrvIO.js";
|
|
5
|
+
import { useMarkdown as x } from "./useMarkdown.fdak3xWv.js";
|
|
6
6
|
/*!
|
|
7
7
|
@versini/ui-truncate v5.2.1
|
|
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 { y as x, v as u, INFINITE_SCROLL_THRESHOLD as v, CARDS as I, pluralize as M, ButtonIcon as i, IconRestore as y, IconStarInCircle as U, IconStarInCircleLight as D, IconDelete as z, numberFormatter as L, isProbablyMobile as _ } from "./index.8SDxHLuq.js";
|
|
3
|
+
import { W as P, j as $, G as m, H as B, M as a, F as f } from "./index.mhC0_M_t.js";
|
|
4
|
+
import { Tooltip as d } from "./App.DkMgrvIO.js";
|
|
5
5
|
import h from "clsx";
|
|
6
6
|
import { Fragment as W } from "react";
|
|
7
7
|
const s = {
|
|
@@ -145,7 +145,7 @@ const s = {
|
|
|
145
145
|
onClick: async () => {
|
|
146
146
|
await T(r);
|
|
147
147
|
},
|
|
148
|
-
children: /* @__PURE__ */ e(
|
|
148
|
+
children: /* @__PURE__ */ e(y, { size: "size-3", monotone: !0 })
|
|
149
149
|
}
|
|
150
150
|
)
|
|
151
151
|
}
|
|
@@ -164,7 +164,7 @@ const s = {
|
|
|
164
164
|
onClick: async () => {
|
|
165
165
|
await N(r);
|
|
166
166
|
},
|
|
167
|
-
children: r.favoriteChat ? /* @__PURE__ */ e(
|
|
167
|
+
children: r.favoriteChat ? /* @__PURE__ */ e(U, { size: "size-4", monotone: !0 }) : /* @__PURE__ */ e(D, { size: "size-4", monotone: !0 })
|
|
168
168
|
}
|
|
169
169
|
)
|
|
170
170
|
}
|
|
@@ -197,12 +197,12 @@ const s = {
|
|
|
197
197
|
return null;
|
|
198
198
|
}
|
|
199
199
|
};
|
|
200
|
-
return /* @__PURE__ */ c(
|
|
200
|
+
return /* @__PURE__ */ c(P, { stickyHeader: !0, compact: !0, mode: "alt-system", caption: (() => {
|
|
201
201
|
const t = n.length, r = b ?? t;
|
|
202
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($, { children: /* @__PURE__ */ e(m, { children: C.map((t) => w(t)) }) }),
|
|
205
|
+
/* @__PURE__ */ e(B, { 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
208
|
(l) => k(l, t, r)
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
import { jsxs as c, Fragment as te, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { n as P, INFINITE_SCROLL_LIMIT as M, INFINITE_SCROLL_THRESHOLD as ae, HistoryContext as U, ChatContext as re, useLocalStorage as C, LOCAL_STORAGE_PREFIX as S, LOCAL_STORAGE_SORT_TIMESTAMP as se, e$1 as h, LOCAL_STORAGE_SORT_TOKEN_USAGE as oe, LOCAL_STORAGE_SORT as ne,
|
|
3
|
-
import { useAiChat as ke, ConfirmationPanel as Re, LazyToastContainerWrapper as
|
|
2
|
+
import { n as P, INFINITE_SCROLL_LIMIT as M, INFINITE_SCROLL_THRESHOLD as ae, HistoryContext as U, ChatContext as re, useLocalStorage as C, LOCAL_STORAGE_PREFIX as S, LOCAL_STORAGE_SORT_TIMESTAMP as se, e$1 as h, LOCAL_STORAGE_SORT_TOKEN_USAGE as oe, LOCAL_STORAGE_SORT as ne, y as b, LOCAL_STORAGE_CHAT_ID as ie, useDeleteChat as ce, useToggleFavoriteChat as le, APP_CLASSNAME as de, TOAST_CHAT_DELETED as he, graphQLRequest as me, SERVICE_TYPES as ue, ACTION_SORT as Ce, v as Se, useChatsHistory as fe, useUserChatStats as ye, LOCAL_STORAGE_SEARCH as Te, LOCAL_STORAGE_FAVORITES_ONLY as pe, HISTORY_TITLE as ge, Card as Ae, TextInput as Ee, debounce as _e, IconSearch as De, Button as z, L as ve, j as Le, ACTION_SEARCH as Oe } from "./index.8SDxHLuq.js";
|
|
3
|
+
import { useAiChat as ke, ConfirmationPanel as Re, LazyToastContainerWrapper as be, showErrorToast as Ie, v4 as He, CHAT_RESET as xe, CHAT_SET_ATTACHMENTS as Ne, CHAT_SET_STATUS as we, Panel as Fe, Toggle as Ge } from "./App.DkMgrvIO.js";
|
|
4
4
|
import Me from "clsx";
|
|
5
5
|
import { useRef as x, useState as N, useContext as w, useCallback as V, Suspense as ze, lazy as Ve, useEffect as Pe } from "react";
|
|
6
6
|
const Ue = Ve(
|
|
7
7
|
() => import(
|
|
8
8
|
/* webpackChunkName: "history-table" */
|
|
9
|
-
"./ChatHistoryTable.
|
|
9
|
+
"./ChatHistoryTable.BgPyiv-W.js"
|
|
10
10
|
).then((m) => ({ default: m.ChatHistoryTable }))
|
|
11
11
|
), Be = ({
|
|
12
12
|
filteredHistory: m,
|
|
13
13
|
onOpenChange: f,
|
|
14
14
|
mutate: y,
|
|
15
15
|
isLoading: A = !1,
|
|
16
|
-
totalHistoryCount:
|
|
16
|
+
totalHistoryCount: I,
|
|
17
17
|
isFiltered: E = !1
|
|
18
18
|
}) => {
|
|
19
19
|
const { user: l, getAccessToken: s } = P(), T = x(null), n = x({
|
|
20
20
|
id: "",
|
|
21
21
|
timestamp: "",
|
|
22
22
|
message: ""
|
|
23
|
-
}), [_, D] = N(!1), [
|
|
23
|
+
}), [_, D] = N(!1), [v, d] = N(
|
|
24
24
|
M + ae
|
|
25
25
|
), { state: i, dispatch: H } = w(U), u = {
|
|
26
26
|
searchString: i.searchString || "",
|
|
27
27
|
sortDirection: i.sortDirection || h.DESC,
|
|
28
|
-
sortedCell: i.sortedCell ||
|
|
28
|
+
sortedCell: i.sortedCell || b
|
|
29
29
|
}, {
|
|
30
|
-
setChatId:
|
|
30
|
+
setChatId: L,
|
|
31
31
|
setInitialMessages: p,
|
|
32
32
|
dispatch: g
|
|
33
33
|
} = w(re), { setInput: O } = ke(), [k, a] = C({
|
|
@@ -38,17 +38,17 @@ const Ue = Ve(
|
|
|
38
38
|
initialValue: h.ASC
|
|
39
39
|
}), [, Y] = C({
|
|
40
40
|
key: S + ne,
|
|
41
|
-
initialValue:
|
|
42
|
-
}), [
|
|
41
|
+
initialValue: b
|
|
42
|
+
}), [q] = C({
|
|
43
43
|
key: S + ie,
|
|
44
44
|
initialValue: ""
|
|
45
|
-
}), { mutateAsync:
|
|
45
|
+
}), { mutateAsync: K } = ce({ getAccessToken: s }), { mutateAsync: Q } = le({
|
|
46
46
|
getAccessToken: s
|
|
47
|
-
}),
|
|
47
|
+
}), W = (e) => {
|
|
48
48
|
const o = i.sortedCell === e;
|
|
49
49
|
let r, R;
|
|
50
50
|
switch (e) {
|
|
51
|
-
case
|
|
51
|
+
case b:
|
|
52
52
|
R = a, r = o ? i.sortDirection : k;
|
|
53
53
|
break;
|
|
54
54
|
case Se:
|
|
@@ -66,19 +66,19 @@ const Ue = Ve(
|
|
|
66
66
|
sortDirection: G
|
|
67
67
|
}
|
|
68
68
|
});
|
|
69
|
-
},
|
|
69
|
+
}, X = async () => {
|
|
70
70
|
const e = n.current;
|
|
71
71
|
try {
|
|
72
|
-
await
|
|
72
|
+
await K({
|
|
73
73
|
userId: l?.username || "",
|
|
74
74
|
id: e.id
|
|
75
|
-
}), y(""), await
|
|
75
|
+
}), y(""), await Ie(he, {
|
|
76
76
|
autoClose: 2e3,
|
|
77
77
|
containerId: "history-table"
|
|
78
78
|
});
|
|
79
79
|
} catch {
|
|
80
80
|
}
|
|
81
|
-
},
|
|
81
|
+
}, $ = async (e) => {
|
|
82
82
|
try {
|
|
83
83
|
const o = await s(), r = await me({
|
|
84
84
|
accessToken: o,
|
|
@@ -96,7 +96,7 @@ const Ue = Ve(
|
|
|
96
96
|
restoredModel: r.data?.model || "",
|
|
97
97
|
restoredUsage: r.data?.tokenUsage || 0
|
|
98
98
|
}
|
|
99
|
-
}), O(""),
|
|
99
|
+
}), O(""), L(e.id), p(r.data.messages), f(!1);
|
|
100
100
|
} catch {
|
|
101
101
|
}
|
|
102
102
|
}, J = (e) => {
|
|
@@ -104,7 +104,7 @@ const Ue = Ve(
|
|
|
104
104
|
id: e.id,
|
|
105
105
|
timestamp: e.timestamp,
|
|
106
106
|
message: e.messages.length > 0 ? e.messages[0]?.content : ""
|
|
107
|
-
}, D(!_),
|
|
107
|
+
}, D(!_), q === e.id && (L(He()), p([]), O(""), g({
|
|
108
108
|
type: xe,
|
|
109
109
|
payload: {
|
|
110
110
|
privateChat: !1,
|
|
@@ -118,7 +118,7 @@ const Ue = Ve(
|
|
|
118
118
|
}));
|
|
119
119
|
}, Z = async (e) => {
|
|
120
120
|
try {
|
|
121
|
-
await
|
|
121
|
+
await Q({
|
|
122
122
|
userId: l?.username || "",
|
|
123
123
|
id: e.id
|
|
124
124
|
}), y("");
|
|
@@ -143,7 +143,7 @@ const Ue = Ve(
|
|
|
143
143
|
{
|
|
144
144
|
showConfirmation: _,
|
|
145
145
|
setShowConfirmation: D,
|
|
146
|
-
action:
|
|
146
|
+
action: X,
|
|
147
147
|
customStrings: {
|
|
148
148
|
confirmAction: "Delete",
|
|
149
149
|
cancelAction: "Cancel",
|
|
@@ -166,39 +166,39 @@ const Ue = Ve(
|
|
|
166
166
|
]
|
|
167
167
|
}
|
|
168
168
|
),
|
|
169
|
-
/* @__PURE__ */ t("div", { className: de, children: /* @__PURE__ */ t(
|
|
169
|
+
/* @__PURE__ */ t("div", { className: de, children: /* @__PURE__ */ t(be, { containerId: "history-table" }) }),
|
|
170
170
|
/* @__PURE__ */ t(ze, { fallback: /* @__PURE__ */ t("div", {}), children: /* @__PURE__ */ t(
|
|
171
171
|
Ue,
|
|
172
172
|
{
|
|
173
173
|
filteredHistory: m,
|
|
174
174
|
historyState: u,
|
|
175
|
-
lastEntryToLoad:
|
|
176
|
-
onClickSort:
|
|
177
|
-
onClickRestore:
|
|
175
|
+
lastEntryToLoad: v,
|
|
176
|
+
onClickSort: W,
|
|
177
|
+
onClickRestore: $,
|
|
178
178
|
onClickDelete: J,
|
|
179
179
|
onClickFavorite: Z,
|
|
180
180
|
infinityScrollMarkerRef: ee,
|
|
181
181
|
isLoading: A,
|
|
182
|
-
totalHistoryCount:
|
|
182
|
+
totalHistoryCount: I,
|
|
183
183
|
isFiltered: E
|
|
184
184
|
}
|
|
185
185
|
) })
|
|
186
186
|
] });
|
|
187
|
-
},
|
|
187
|
+
}, We = ({
|
|
188
188
|
open: m,
|
|
189
189
|
onOpenChange: f
|
|
190
190
|
}) => {
|
|
191
|
-
const { getAccessToken: y, user: A } = P(), [
|
|
191
|
+
const { getAccessToken: y, user: A } = P(), [I, E] = N([]), l = x(null), { state: s, dispatch: T } = w(U), {
|
|
192
192
|
data: n,
|
|
193
193
|
refetch: _,
|
|
194
194
|
isLoading: D,
|
|
195
|
-
isError:
|
|
195
|
+
isError: v
|
|
196
196
|
} = fe({
|
|
197
197
|
enabled: m,
|
|
198
198
|
user: A?.username || "",
|
|
199
199
|
searchString: s.searchString || "",
|
|
200
200
|
sortDirection: s.sortDirection || h.DESC,
|
|
201
|
-
sortedCell: s.sortedCell ||
|
|
201
|
+
sortedCell: s.sortedCell || b,
|
|
202
202
|
getAccessToken: y
|
|
203
203
|
}), { data: d } = ye({
|
|
204
204
|
user: A?.username,
|
|
@@ -206,7 +206,7 @@ const Ue = Ve(
|
|
|
206
206
|
}), i = d && d.totalChats ? d.totalChats - d.privateChats - d.deletedChats : 0, [, H] = C({
|
|
207
207
|
key: S + Te,
|
|
208
208
|
initialValue: s.searchString
|
|
209
|
-
}), [u,
|
|
209
|
+
}), [u, L] = C({
|
|
210
210
|
key: S + pe,
|
|
211
211
|
initialValue: !1
|
|
212
212
|
});
|
|
@@ -225,7 +225,7 @@ const Ue = Ve(
|
|
|
225
225
|
}, 500), O = async (a) => {
|
|
226
226
|
a.preventDefault();
|
|
227
227
|
}, k = (a) => {
|
|
228
|
-
|
|
228
|
+
L(a);
|
|
229
229
|
};
|
|
230
230
|
return /* @__PURE__ */ c(
|
|
231
231
|
Fe,
|
|
@@ -235,13 +235,14 @@ const Ue = Ve(
|
|
|
235
235
|
title: ge,
|
|
236
236
|
animation: !0,
|
|
237
237
|
animationType: "fade",
|
|
238
|
+
blurEffect: "large",
|
|
238
239
|
footer: /* @__PURE__ */ t(
|
|
239
|
-
|
|
240
|
+
ve,
|
|
240
241
|
{
|
|
241
242
|
columnGap: 2,
|
|
242
243
|
alignHorizontal: "flex-end",
|
|
243
244
|
className: "pb-8 sm:pb-0",
|
|
244
|
-
children: /* @__PURE__ */ t(
|
|
245
|
+
children: /* @__PURE__ */ t(Le, { children: /* @__PURE__ */ t(
|
|
245
246
|
z,
|
|
246
247
|
{
|
|
247
248
|
mode: "dark",
|
|
@@ -319,12 +320,12 @@ const Ue = Ve(
|
|
|
319
320
|
"min-h-[60vh]"
|
|
320
321
|
),
|
|
321
322
|
children: [
|
|
322
|
-
|
|
323
|
-
!
|
|
323
|
+
v && /* @__PURE__ */ t("p", { className: "m-0 text-red-500", children: "Failed to load history." }),
|
|
324
|
+
!v && /* @__PURE__ */ t(
|
|
324
325
|
Be,
|
|
325
326
|
{
|
|
326
327
|
mutate: _,
|
|
327
|
-
filteredHistory:
|
|
328
|
+
filteredHistory: I,
|
|
328
329
|
onOpenChange: f,
|
|
329
330
|
isLoading: D,
|
|
330
331
|
totalHistoryCount: i,
|
|
@@ -339,5 +340,5 @@ const Ue = Ve(
|
|
|
339
340
|
);
|
|
340
341
|
};
|
|
341
342
|
export {
|
|
342
|
-
|
|
343
|
+
We as HistoryPanel
|
|
343
344
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as l, Fragment as K, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { n as O, useUniqueId as W, useUserPreferences as Y, useServerCapabilities as $,
|
|
3
|
-
import { preloadToast as ae, showSuccessToast as se, showErrorToast as ne, ConfirmationPanel as re, LazyToastContainerWrapper as le, Panel as te } from "./App.
|
|
2
|
+
import { n as O, useUniqueId as W, useUserPreferences as Y, useServerCapabilities as $, p as V, setUserPlan as q, Card as d, renderDataAsList as J, CARDS as n, L as h, j as i, Button as L, it as Q, isTauri as X, ButtonIcon as Z, IconPasskey as k, PROFILE_TITLE as ee } from "./index.8SDxHLuq.js";
|
|
3
|
+
import { preloadToast as ae, showSuccessToast as se, showErrorToast as ne, ConfirmationPanel as re, LazyToastContainerWrapper as le, Panel as te } from "./App.DkMgrvIO.js";
|
|
4
4
|
import ie from "clsx";
|
|
5
5
|
import { useState as m, useMemo as oe, useCallback as P } from "react";
|
|
6
6
|
const ce = () => {
|
|
@@ -11,13 +11,13 @@ const ce = () => {
|
|
|
11
11
|
authenticationType: v,
|
|
12
12
|
getAccessToken: p
|
|
13
13
|
} = O(), [x, N] = m(null), [T, F] = m(!1), [U, C] = m(!1), [t, w] = m(null), z = W(), A = s?.username || "", {
|
|
14
|
-
data:
|
|
14
|
+
data: f,
|
|
15
15
|
isSuccess: B,
|
|
16
16
|
refetch: I
|
|
17
17
|
} = Y({
|
|
18
18
|
user: s?.username,
|
|
19
19
|
getAccessToken: p
|
|
20
|
-
}), { data:
|
|
20
|
+
}), { data: E, isSuccess: S } = $(), R = oe(() => !S || !E?.plans ? [] : E.plans.map((a) => ({
|
|
21
21
|
id: a.name,
|
|
22
22
|
label: a.label,
|
|
23
23
|
description: a.description,
|
|
@@ -25,7 +25,7 @@ const ce = () => {
|
|
|
25
25
|
models: a.allowedModels.map(
|
|
26
26
|
(r) => V[r] || r
|
|
27
27
|
)
|
|
28
|
-
})), [
|
|
28
|
+
})), [S, E?.plans]), b = P(() => {
|
|
29
29
|
T || (ae(), F(!0));
|
|
30
30
|
}, [T]), _ = P(async () => {
|
|
31
31
|
if (!(!t || !s?.username))
|
|
@@ -49,9 +49,9 @@ const ce = () => {
|
|
|
49
49
|
}
|
|
50
50
|
}, [p, t, I, s?.username]), M = P(
|
|
51
51
|
(a, r) => {
|
|
52
|
-
!s?.username || a ===
|
|
52
|
+
!s?.username || a === f?.plan || (w({ id: a, label: r }), C(!0));
|
|
53
53
|
},
|
|
54
|
-
[
|
|
54
|
+
[f?.plan, s?.username]
|
|
55
55
|
);
|
|
56
56
|
return u && A ? /* @__PURE__ */ l(K, { children: [
|
|
57
57
|
/* @__PURE__ */ e(
|
|
@@ -85,7 +85,7 @@ const ce = () => {
|
|
|
85
85
|
})
|
|
86
86
|
}
|
|
87
87
|
),
|
|
88
|
-
B &&
|
|
88
|
+
B && S && R.length > 0 && /* @__PURE__ */ l(
|
|
89
89
|
d,
|
|
90
90
|
{
|
|
91
91
|
header: n.PLANS.TITLE,
|
|
@@ -93,8 +93,8 @@ const ce = () => {
|
|
|
93
93
|
noBorder: !0,
|
|
94
94
|
children: [
|
|
95
95
|
/* @__PURE__ */ e("p", { className: "text-sm", children: n.PLANS.DESCRIPTION }),
|
|
96
|
-
/* @__PURE__ */ e(h, { columnGap: 3, rowGap: 3, className: "mt-4", children: R.map(({ id: a, label: r, description: G, features:
|
|
97
|
-
const c =
|
|
96
|
+
/* @__PURE__ */ e(h, { columnGap: 3, rowGap: 3, className: "mt-4", children: R.map(({ id: a, label: r, description: G, features: D, models: j }) => {
|
|
97
|
+
const c = f?.plan === a, H = c ? n.PLANS.ACTIVE_BADGE : `Get ${r}`, g = x === a;
|
|
98
98
|
return /* @__PURE__ */ e(i, { span: { fallback: 12, md: 4 }, children: /* @__PURE__ */ e(d, { mode: "darker", className: "prose-lighter h-full", children: /* @__PURE__ */ l(h, { direction: "column", children: [
|
|
99
99
|
/* @__PURE__ */ l(i, { children: [
|
|
100
100
|
/* @__PURE__ */ e("div", { className: "flex items-start justify-between gap-2", children: /* @__PURE__ */ l("div", { children: [
|
|
@@ -110,9 +110,9 @@ const ce = () => {
|
|
|
110
110
|
/* @__PURE__ */ e("p", { className: "mb-0 text-sm opacity-80", children: G })
|
|
111
111
|
] }) }),
|
|
112
112
|
/* @__PURE__ */ e("h4", { children: "Features" }),
|
|
113
|
-
/* @__PURE__ */ e("ul", { className: "prose-li:text-sm", children:
|
|
113
|
+
/* @__PURE__ */ e("ul", { className: "prose-li:text-sm", children: D.map((o) => /* @__PURE__ */ e("li", { children: o }, o)) }),
|
|
114
114
|
/* @__PURE__ */ e("h4", { children: "Models" }),
|
|
115
|
-
/* @__PURE__ */ e("ul", { className: "prose-li:text-sm", children:
|
|
115
|
+
/* @__PURE__ */ e("ul", { className: "prose-li:text-sm", children: j.map((o) => /* @__PURE__ */ e("li", { children: o }, o)) })
|
|
116
116
|
] }),
|
|
117
117
|
/* @__PURE__ */ e(i, { children: /* @__PURE__ */ e(
|
|
118
118
|
L,
|
|
@@ -122,13 +122,13 @@ const ce = () => {
|
|
|
122
122
|
variant: c ? "selected" : "secondary",
|
|
123
123
|
className: "mt-4",
|
|
124
124
|
fullWidth: !0,
|
|
125
|
-
disabled: c ||
|
|
125
|
+
disabled: c || g,
|
|
126
126
|
onClick: () => {
|
|
127
127
|
M(a, r);
|
|
128
128
|
},
|
|
129
|
-
onMouseEnter:
|
|
130
|
-
onFocus:
|
|
131
|
-
children:
|
|
129
|
+
onMouseEnter: b,
|
|
130
|
+
onFocus: b,
|
|
131
|
+
children: g ? "Updating..." : H
|
|
132
132
|
}
|
|
133
133
|
) })
|
|
134
134
|
] }) }) }, a);
|
|
@@ -142,7 +142,7 @@ const ce = () => {
|
|
|
142
142
|
className: "prose-dark dark:prose-lighter mt-4",
|
|
143
143
|
noBorder: !0,
|
|
144
144
|
header: /* @__PURE__ */ e("h2", { className: "m-0", children: /* @__PURE__ */ l(h, { columnGap: 3, alignVertical: "center", children: [
|
|
145
|
-
/* @__PURE__ */ e(i, { children: /* @__PURE__ */ e(
|
|
145
|
+
/* @__PURE__ */ e(i, { children: /* @__PURE__ */ e(k, { size: "size-8" }) }),
|
|
146
146
|
/* @__PURE__ */ e(i, { children: /* @__PURE__ */ e("div", { children: n.PREFERENCES.PASSKEY_TITLE }) })
|
|
147
147
|
] }) }),
|
|
148
148
|
children: [
|
|
@@ -155,14 +155,14 @@ const ce = () => {
|
|
|
155
155
|
className: "mt-2",
|
|
156
156
|
onClick: y,
|
|
157
157
|
labelLeft: n.PREFERENCES.PASSKEY_BUTTON,
|
|
158
|
-
children: /* @__PURE__ */ e(
|
|
158
|
+
children: /* @__PURE__ */ e(k, { size: "size-5", monotone: !0 })
|
|
159
159
|
}
|
|
160
160
|
)
|
|
161
161
|
]
|
|
162
162
|
}
|
|
163
163
|
)
|
|
164
164
|
] }) : null;
|
|
165
|
-
},
|
|
165
|
+
}, fe = ({
|
|
166
166
|
open: u,
|
|
167
167
|
onOpenChange: s
|
|
168
168
|
}) => /* @__PURE__ */ e(
|
|
@@ -173,6 +173,7 @@ const ce = () => {
|
|
|
173
173
|
title: ee,
|
|
174
174
|
animation: !0,
|
|
175
175
|
animationType: "fade",
|
|
176
|
+
blurEffect: "large",
|
|
176
177
|
footer: /* @__PURE__ */ e(
|
|
177
178
|
h,
|
|
178
179
|
{
|
|
@@ -196,5 +197,5 @@ const ce = () => {
|
|
|
196
197
|
}
|
|
197
198
|
);
|
|
198
199
|
export {
|
|
199
|
-
|
|
200
|
+
fe as Profile
|
|
200
201
|
};
|