@versini/sassysaint 8.90.3 → 8.92.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.CPjLntlq.js → AboutChangelog.BOP3BSrk.js} +3 -3
- package/dist/chunks/AboutEntry.Bj8HUsU4.js +89 -0
- package/dist/chunks/{App.zkb8gvM3.js → App.DAQta2pJ.js} +638 -613
- package/dist/chunks/{Chart.DLxNkoZh.js → Chart.4eKSXUC7.js} +1133 -1143
- package/dist/chunks/ChatBubbleAssistant.CSgJfGV8.js +71 -0
- package/dist/chunks/{ChatBubbleUser.BVHUcko2.js → ChatBubbleUser.K3_2TN_h.js} +3 -3
- package/dist/chunks/{ChatHistoryTable.BupKfYV_.js → ChatHistoryTable.BngsfWch.js} +8 -8
- package/dist/chunks/{HistoryEntry.B0rPR2OE.js → HistoryEntry.BXEni06v.js} +38 -37
- package/dist/chunks/{ProfileEntry.NsztPEkp.js → ProfileEntry.B5H9_Q-0.js} +21 -20
- package/dist/chunks/{SettingsEntry.CDOPc6iD.js → SettingsEntry.D5cipDqa.js} +25 -24
- package/dist/chunks/UsageEntry.DPue9312.js +211 -0
- package/dist/chunks/{UserMemoriesPanel.4Bgcvr6X.js → UserMemoriesPanel.CwAnAj0p.js} +13 -12
- package/dist/chunks/{index.ChYRuj2g.js → index.BECvwaM5.js} +764 -736
- package/dist/chunks/{index.BAQ69A14.js → index.C5Rg3-rY.js} +1 -1
- package/dist/chunks/{index.BqwARS2K.js → index.C9N2vELq.js} +1 -1
- package/dist/chunks/{index.D12uAEYv.js → index.CGdw9MqW.js} +2 -2
- package/dist/chunks/{index.DIt56Ck2.js → index.CzSTlOsu.js} +3 -3
- package/dist/chunks/{index.Bg0DWoXf.js → index.Drx_3ie_.js} +1 -1
- package/dist/chunks/{index.DUcwF6lX.js → index.N6iGJtWi.js} +1 -1
- package/dist/chunks/{index.wC_fDv6h.js → index.NHQBZNrH.js} +1 -1
- package/dist/chunks/{index.BMVDRH6N.js → index.hL9trLAw.js} +1 -1
- package/dist/chunks/{useMarkdown.D-AXpwz2.js → useMarkdown.keqTeXmn.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/AboutEntry.D4NbCMmI.js +0 -69
- package/dist/chunks/ChatBubbleAssistant.CT-lt9VL.js +0 -82
- package/dist/chunks/UsageEntry.Bq3qWoi3.js +0 -152
|
@@ -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.BECvwaM5.js";
|
|
3
|
+
import { BUBBLE_FOOTER_EMPTY as G } from "./index.hL9trLAw.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.DAQta2pJ.js";
|
|
7
|
+
import { useMarkdown as D } from "./useMarkdown.keqTeXmn.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.BECvwaM5.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.DAQta2pJ.js";
|
|
5
|
+
import { useMarkdown as x } from "./useMarkdown.keqTeXmn.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.BECvwaM5.js";
|
|
3
|
+
import { W as P, j as $, G as m, H as B, M as a, F as f } from "./index.NHQBZNrH.js";
|
|
4
|
+
import { Tooltip as d } from "./App.DAQta2pJ.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.BECvwaM5.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.DAQta2pJ.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.BngsfWch.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.BECvwaM5.js";
|
|
3
|
+
import { preloadToast as ae, showSuccessToast as se, showErrorToast as ne, ConfirmationPanel as re, LazyToastContainerWrapper as le, Panel as te } from "./App.DAQta2pJ.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
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsxs as n, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { n as je, useEntitlements as
|
|
3
|
-
import { useCapability as Te, Panel as ot, Toggle as l } from "./App.
|
|
4
|
-
import { TextArea as Ne } from "./index.
|
|
2
|
+
import { n as je, useEntitlements as Ve, AppContext as Fe, useUserPreferences as We, w as ie, useLocalStorage as de, LOCAL_STORAGE_OLED_MODE as $e, LOCAL_STORAGE_FULL_SCREEN as ze, e as ue, canEvaluateModels as He, W as Ye, getCacheInfo as qe, isServiceWorkerEnabled as Ke, SETTINGS_TITLE as Qe, Card as f, CARDS as r, V as Je, Button as v, PROMPTS_DESCRIPTION as Xe, K as me, L as Ze, j as he, applyOledMode as fe, APP_SET_OLED_MODE as Ee, APP_SET_FULL_SCREEN as Se, getCurrentGeoLocation as et, graphQLRequest as pe, handleServiceWorkerToggle as tt, SERVICE_TYPES as ge } from "./index.BECvwaM5.js";
|
|
3
|
+
import { useCapability as Te, Panel as ot, Toggle as l } from "./App.DAQta2pJ.js";
|
|
4
|
+
import { TextArea as Ne } from "./index.C9N2vELq.js";
|
|
5
5
|
import { useContext as st, useState as s, useMemo as at, useCallback as nt, useEffect as be } from "react";
|
|
6
6
|
const ut = ({
|
|
7
7
|
open: Ce,
|
|
8
8
|
onOpenChange: A
|
|
9
9
|
}) => {
|
|
10
|
-
const { getAccessToken: I, user: R } = je(), { allowedModels:
|
|
10
|
+
const { getAccessToken: I, user: R } = je(), { allowedModels: w, status: B } = Ve(), { dispatch: g } = st(Fe), {
|
|
11
11
|
data: o,
|
|
12
12
|
isSuccess: ye,
|
|
13
13
|
refetch: x
|
|
@@ -16,15 +16,15 @@ const ut = ({
|
|
|
16
16
|
getAccessToken: I
|
|
17
17
|
}), [G, T] = s({
|
|
18
18
|
loadingLocation: !1
|
|
19
|
-
}), [
|
|
19
|
+
}), [L, U] = s({
|
|
20
20
|
prompts: []
|
|
21
|
-
}), [j,
|
|
21
|
+
}), [j, V] = s(""), [F, N] = s(""), [W, $] = s(!1), [z, H] = s(!1), [b, Y] = s(!1), [C, q] = s(!1), [K, Q] = s(!1), [k, J] = s(!1), [E, X] = s(null), [Z, ee] = s(!1), [te, oe] = s(!1), se = Te(ie.TOOL.MEMORIES), ae = Te(ie.ADDON.REASONING), [i, Ie] = de({
|
|
22
22
|
key: $e,
|
|
23
23
|
initialValue: !1
|
|
24
|
-
}), [u,
|
|
24
|
+
}), [u, we] = de({
|
|
25
25
|
key: ze,
|
|
26
26
|
initialValue: !1
|
|
27
|
-
}), [m, M] = s(!1), [S, D] = s(!1), [ne, re] = s(ue),
|
|
27
|
+
}), [m, M] = s(!1), [S, D] = s(!1), [ne, re] = s(ue), Le = at(() => He(w, B) ? Ye(w) : !1, [w, B]), ke = (e) => {
|
|
28
28
|
oe(e);
|
|
29
29
|
}, Me = (e) => {
|
|
30
30
|
$(e);
|
|
@@ -35,7 +35,7 @@ const ut = ({
|
|
|
35
35
|
}, Oe = (e) => {
|
|
36
36
|
ae && Q(e);
|
|
37
37
|
}, Pe = (e) => {
|
|
38
|
-
|
|
38
|
+
J(e);
|
|
39
39
|
}, ve = (e) => {
|
|
40
40
|
M(e);
|
|
41
41
|
}, Ae = (e) => {
|
|
@@ -51,7 +51,7 @@ const ut = ({
|
|
|
51
51
|
params: {
|
|
52
52
|
user: R?.username,
|
|
53
53
|
instructions: j,
|
|
54
|
-
location:
|
|
54
|
+
location: F,
|
|
55
55
|
provider: o?.provider,
|
|
56
56
|
/**
|
|
57
57
|
* When nested model selection is disabled, explicitly clear any stored
|
|
@@ -59,7 +59,7 @@ const ut = ({
|
|
|
59
59
|
* string signals to backend to use provider's default model.
|
|
60
60
|
*/
|
|
61
61
|
model: k && o?.model || "",
|
|
62
|
-
tags:
|
|
62
|
+
tags: L.prompts,
|
|
63
63
|
sendOnEnter: W,
|
|
64
64
|
useMemory: z,
|
|
65
65
|
showDetails: te,
|
|
@@ -70,7 +70,7 @@ const ut = ({
|
|
|
70
70
|
}), C !== b && (await tt(C), Y(C)), m !== i && (Ie(m), fe(m), g({
|
|
71
71
|
type: Ee,
|
|
72
72
|
payload: { oledMode: m }
|
|
73
|
-
})), S !== u && (
|
|
73
|
+
})), S !== u && (we(S), g({
|
|
74
74
|
type: Se,
|
|
75
75
|
payload: { fullScreen: S }
|
|
76
76
|
})), x(), T({
|
|
@@ -136,7 +136,7 @@ const ut = ({
|
|
|
136
136
|
try {
|
|
137
137
|
ee(!0);
|
|
138
138
|
const e = await qe();
|
|
139
|
-
|
|
139
|
+
X(e);
|
|
140
140
|
} catch {
|
|
141
141
|
} finally {
|
|
142
142
|
ee(!1);
|
|
@@ -145,11 +145,11 @@ const ut = ({
|
|
|
145
145
|
return be(() => {
|
|
146
146
|
if (!o)
|
|
147
147
|
return;
|
|
148
|
-
o.instructions &&
|
|
148
|
+
o.instructions && V(o.instructions), o.location && N(o.location), o.tags && U({ prompts: o.tags }), o.sendOnEnter !== void 0 && $(o.sendOnEnter), o.useMemory !== void 0 && H(o.useMemory), o.showDetails !== void 0 && oe(o.showDetails), o.showReasoningButton !== void 0 && Q(o.showReasoningButton), o.useNestedModelSelection !== void 0 && J(o.useNestedModelSelection), o.themeMode !== void 0 && re(o.themeMode);
|
|
149
149
|
const e = Ke();
|
|
150
150
|
Y(e), q(e), M(i), D(u);
|
|
151
151
|
}, [o, i, u]), be(() => {
|
|
152
|
-
b ? ce() :
|
|
152
|
+
b ? ce() : X(null);
|
|
153
153
|
}, [b, ce]), ye ? /* @__PURE__ */ n(
|
|
154
154
|
ot,
|
|
155
155
|
{
|
|
@@ -158,8 +158,9 @@ const ut = ({
|
|
|
158
158
|
title: Qe,
|
|
159
159
|
animation: !0,
|
|
160
160
|
animationType: "fade",
|
|
161
|
+
blurEffect: "large",
|
|
161
162
|
footer: /* @__PURE__ */ n(
|
|
162
|
-
|
|
163
|
+
Ze,
|
|
163
164
|
{
|
|
164
165
|
columnGap: 2,
|
|
165
166
|
alignHorizontal: "flex-end",
|
|
@@ -252,7 +253,7 @@ const ut = ({
|
|
|
252
253
|
children: [
|
|
253
254
|
/* @__PURE__ */ n("p", { className: "text-sm", children: [
|
|
254
255
|
"What would you like ",
|
|
255
|
-
/* @__PURE__ */ t("em", { children:
|
|
256
|
+
/* @__PURE__ */ t("em", { children: Je }),
|
|
256
257
|
" to know about you to provide better responses?"
|
|
257
258
|
] }),
|
|
258
259
|
/* @__PURE__ */ t(
|
|
@@ -266,7 +267,7 @@ const ut = ({
|
|
|
266
267
|
label: "Custom Instructions",
|
|
267
268
|
value: j,
|
|
268
269
|
onChange: (e) => {
|
|
269
|
-
|
|
270
|
+
V(e.target.value);
|
|
270
271
|
},
|
|
271
272
|
helperText: "Press ENTER to add a new line."
|
|
272
273
|
}
|
|
@@ -288,7 +289,7 @@ const ut = ({
|
|
|
288
289
|
mode: "alt-system",
|
|
289
290
|
name: "location",
|
|
290
291
|
label: "Location",
|
|
291
|
-
value:
|
|
292
|
+
value: F,
|
|
292
293
|
onChange: (e) => {
|
|
293
294
|
N(e.target.value);
|
|
294
295
|
},
|
|
@@ -317,8 +318,8 @@ const ut = ({
|
|
|
317
318
|
className: "prose-dark dark:prose-lighter mt-4",
|
|
318
319
|
noBorder: !0,
|
|
319
320
|
children: [
|
|
320
|
-
/* @__PURE__ */ t("p", { className: "text-sm", children:
|
|
321
|
-
|
|
321
|
+
/* @__PURE__ */ t("p", { className: "text-sm", children: Xe }),
|
|
322
|
+
L.prompts && L.prompts.slice(0, 3).map((e) => /* @__PURE__ */ n(
|
|
322
323
|
f,
|
|
323
324
|
{
|
|
324
325
|
mode: "dark",
|
|
@@ -412,7 +413,7 @@ const ut = ({
|
|
|
412
413
|
checked: K
|
|
413
414
|
}
|
|
414
415
|
),
|
|
415
|
-
|
|
416
|
+
Le && /* @__PURE__ */ t(
|
|
416
417
|
l,
|
|
417
418
|
{
|
|
418
419
|
noBorder: !0,
|
|
@@ -502,8 +503,8 @@ const ut = ({
|
|
|
502
503
|
},
|
|
503
504
|
a
|
|
504
505
|
)) }) }, e.name)),
|
|
505
|
-
E.totalItems === 0 && !
|
|
506
|
-
] }) : /* @__PURE__ */ t("p", { className: "text-xs opacity-70 m-0", children:
|
|
506
|
+
E.totalItems === 0 && !Z && /* @__PURE__ */ t("p", { className: "italic m-0 opacity-70", children: "No cached assets yet." })
|
|
507
|
+
] }) : /* @__PURE__ */ t("p", { className: "text-xs opacity-70 m-0", children: Z ? "Loading cache info..." : "No cache info available." })
|
|
507
508
|
] })
|
|
508
509
|
]
|
|
509
510
|
}
|