@versini/sassysaint 8.110.0 → 8.110.2
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.BfOWMaYg.js → AboutChangelog.DEj7-6K6.js} +2 -2
- package/dist/chunks/AboutEntry.BSWdup9R.js +77 -0
- package/dist/chunks/{App.BD0e8HgV.js → App.Hqmg5y2Y.js} +2435 -2452
- package/dist/chunks/{Bubble.fxUgvZMG.js → Bubble.DJc-QO-3.js} +1 -1
- package/dist/chunks/ButtonIconDelete.D4aZDe7F.js +335 -0
- package/dist/chunks/{Chart.C-EqsPgy.js → Chart.CPv5Bfk9.js} +2 -2
- package/dist/chunks/{ChatBubbleAssistant.hM8owVIk.js → ChatBubbleAssistant.DqUdvWwl.js} +4 -4
- package/dist/chunks/{ChatBubbleUser.CnsuEhxO.js → ChatBubbleUser.Cs4LFprm.js} +3 -3
- package/dist/chunks/{ChatHistoryTable.WRplbgo4.js → ChatHistoryTable.CkVMdj9x.js} +73 -73
- package/dist/chunks/{HistoryEntry.BgO_PD7Q.js → HistoryEntry.DM331KtZ.js} +72 -80
- package/dist/chunks/LoginEntry.Cvod0kbl.js +118 -0
- package/dist/chunks/{LogoEntry.CucXks5G.js → LogoEntry.DohsYXa0.js} +642 -746
- package/dist/chunks/MemoriesEntry.DJEsuqmV.js +649 -0
- package/dist/chunks/ProfileEntry.DHOE716m.js +205 -0
- package/dist/chunks/{SettingsEntry.ByPtC4lj.js → SettingsEntry.6_BWb1qD.js} +114 -122
- package/dist/chunks/UsageEntry.CtQKtTac.js +230 -0
- package/dist/chunks/{_baseUniq.DJhemj5B.js → _baseUniq.DdHdSR90.js} +1 -1
- package/dist/chunks/{arc.ClK0mYh2.js → arc.D4_xOXXj.js} +1 -1
- package/dist/chunks/{architecture-U656AL7Q.DGORleeb.js → architecture-U656AL7Q.s3rGBRgV.js} +1 -1
- package/dist/chunks/{architectureDiagram-VXUJARFQ.HR_eet_T.js → architectureDiagram-VXUJARFQ.CdCO91E5.js} +4 -4
- package/dist/chunks/{blockDiagram-VD42YOAC.CWrnXf_B.js → blockDiagram-VD42YOAC.CCDa9IbF.js} +5 -5
- package/dist/chunks/{browser.5ieI9QUP.js → browser.G7msF8GI.js} +1 -1
- package/dist/chunks/{c4Diagram-YG6GDRKO.CaA0SaMc.js → c4Diagram-YG6GDRKO.BYwrdrnm.js} +2 -2
- package/dist/chunks/{channel.BI8KZVUl.js → channel.Bhd_WAGN.js} +1 -1
- package/dist/chunks/{chunk-4BX2VUAB.CTzK9jPw.js → chunk-4BX2VUAB.CAsx7lRR.js} +1 -1
- package/dist/chunks/{chunk-55IACEB6.DMb8Reca.js → chunk-55IACEB6.ChwKLiO_.js} +1 -1
- package/dist/chunks/{chunk-B4BG7PRW.BHBa3N2V.js → chunk-B4BG7PRW.0XXdIUvB.js} +4 -4
- package/dist/chunks/{chunk-DI55MBZ5.Bqwg_jpX.js → chunk-DI55MBZ5.PoYuLfqT.js} +3 -3
- package/dist/chunks/{chunk-FMBD7UC4.p8OpoFJE.js → chunk-FMBD7UC4.ClQPaEEe.js} +1 -1
- package/dist/chunks/{chunk-QN33PNHL._xYLGQNv.js → chunk-QN33PNHL.BNHDFW8q.js} +1 -1
- package/dist/chunks/{chunk-QZHKN3VN.Bt1FHb64.js → chunk-QZHKN3VN.YjxD8GE7.js} +1 -1
- package/dist/chunks/{chunk-TZMSLE5B.hFsU0iJf.js → chunk-TZMSLE5B.CTNar1je.js} +1 -1
- package/dist/chunks/{classDiagram-2ON5EDUG.DiSJfiEu.js → classDiagram-2ON5EDUG.Ccr_Z8SZ.js} +2 -2
- package/dist/chunks/{classDiagram-v2-WZHVMYZB.DiSJfiEu.js → classDiagram-v2-WZHVMYZB.Ccr_Z8SZ.js} +2 -2
- package/dist/chunks/{clone.NcwizCyH.js → clone.BX8gciZV.js} +1 -1
- package/dist/chunks/{cose-bilkent-S5V4N54A.DogEbzcD.js → cose-bilkent-S5V4N54A.CJs1QiYn.js} +2 -2
- package/dist/chunks/{dagre-6UL2VRFP.Cy_GltZx.js → dagre-6UL2VRFP.DL9dVBGy.js} +5 -5
- package/dist/chunks/{diagram-PSM6KHXK.CazeYJ2F.js → diagram-PSM6KHXK.BlxCy0Sy.js} +4 -4
- package/dist/chunks/{diagram-QEK2KX5R.ByhZHDpm.js → diagram-QEK2KX5R.BWDu5W6C.js} +3 -3
- package/dist/chunks/{diagram-S2PKOQOG.D49-fpQd.js → diagram-S2PKOQOG.Ri3EElHD.js} +3 -3
- package/dist/chunks/{erDiagram-Q2GNP2WA.nce3gDBb.js → erDiagram-Q2GNP2WA.DEiFjTBB.js} +4 -4
- package/dist/chunks/{flowDiagram-NV44I4VS.DDUGMSKf.js → flowDiagram-NV44I4VS.BW00PHx7.js} +5 -5
- package/dist/chunks/{ganttDiagram-JELNMOA3.NGXzLkaH.js → ganttDiagram-JELNMOA3.ema0-IHx.js} +2 -2
- package/dist/chunks/{gitGraph-F6HP7TQM.BzKXexyv.js → gitGraph-F6HP7TQM.D7K-i_h_.js} +1 -1
- package/dist/chunks/{gitGraphDiagram-NY62KEGX.C3cn9f8o.js → gitGraphDiagram-NY62KEGX.D4HvM8U6.js} +4 -4
- package/dist/chunks/{graph.CURTRirk.js → graph.WmSD_kIW.js} +2 -2
- package/dist/chunks/{index.DAuo-OH1.js → index.5YcMrbtG.js} +1 -1
- package/dist/chunks/{index.BYDZbdMZ.js → index.BDdSIqNw.js} +1 -1
- package/dist/chunks/{index.CBEv2y_C.js → index.BRIbdI1P.js} +2 -2
- package/dist/chunks/{index.BinkIORG.js → index.CUKXvrUy.js} +1 -1
- package/dist/chunks/{index.gy41K1EE.js → index.CspNN5N2.js} +3 -3
- package/dist/chunks/{index.uUNtrS04.js → index.Damzobcg.js} +3 -3
- package/dist/chunks/{index.BqIARWUR.js → index.HEruAaRk.js} +1 -1
- package/dist/chunks/{index.CkajM1v0.js → index.OMR8Uuyn.js} +1 -1
- package/dist/chunks/{index.CURM9PiU.js → index.fRQVHuxk.js} +1 -1
- package/dist/chunks/{info-NVLQJR56.CHnZmbT7.js → info-NVLQJR56.jYI0Duob.js} +1 -1
- package/dist/chunks/{infoDiagram-WHAUD3N6.DCZfKYU8.js → infoDiagram-WHAUD3N6.BqOPFyGl.js} +2 -2
- package/dist/chunks/{journeyDiagram-XKPGCS4Q.B-0JNmK_.js → journeyDiagram-XKPGCS4Q.B1bd5wZT.js} +4 -4
- package/dist/chunks/{kanban-definition-3W4ZIXB7.C7aI8iBJ.js → kanban-definition-3W4ZIXB7.CXydmjo0.js} +2 -2
- package/dist/chunks/{layout.Bmgsrc8X.js → layout.D0fWXkiy.js} +4 -4
- package/dist/chunks/{mermaid-parser.core.BZIZyjyF.js → mermaid-parser.core.7OYqXvcF.js} +10 -10
- package/dist/chunks/{min.CtR4qhyM.js → min.DULzPnFA.js} +2 -2
- package/dist/chunks/{mindmap-definition-VGOIOE7T.DCsxzuhI.js → mindmap-definition-VGOIOE7T.BUC8Tuhp.js} +3 -3
- package/dist/chunks/{packet-BFZMPI3H.CQ2Sbdms.js → packet-BFZMPI3H.D_-dNPlf.js} +1 -1
- package/dist/chunks/{pie-7BOR55EZ.BYs1omMd.js → pie-7BOR55EZ.C5wUCEk_.js} +1 -1
- package/dist/chunks/{pieDiagram-ADFJNKIX.DqkDHdMo.js → pieDiagram-ADFJNKIX.DOCTIr8o.js} +4 -4
- package/dist/chunks/{quadrantDiagram-AYHSOK5B.Cx-eq1uu.js → quadrantDiagram-AYHSOK5B.DbasmgIr.js} +1 -1
- package/dist/chunks/{radar-NHE76QYJ.CIqwL1Hw.js → radar-NHE76QYJ.D-zD079S.js} +1 -1
- package/dist/chunks/{rehype-mermaid.LJaY9ylI.js → rehype-mermaid.C6-wTJWi.js} +33 -33
- package/dist/chunks/{requirementDiagram-UZGBJVZJ.C-YKp79x.js → requirementDiagram-UZGBJVZJ.CnuUJN5O.js} +3 -3
- package/dist/chunks/{sankeyDiagram-TZEHDZUN.BbfUzvVS.js → sankeyDiagram-TZEHDZUN.R_1cgZZg.js} +1 -1
- package/dist/chunks/{sequenceDiagram-WL72ISMW.D5wDvZwT.js → sequenceDiagram-WL72ISMW.sCa2kzuv.js} +3 -3
- package/dist/chunks/{stateDiagram-FKZM4ZOC.-65PQCxm.js → stateDiagram-FKZM4ZOC.DczjcrsN.js} +4 -4
- package/dist/chunks/{stateDiagram-v2-4FDKWEC3.BXy_3BUS.js → stateDiagram-v2-4FDKWEC3.DwOAdSSj.js} +2 -2
- package/dist/chunks/{timeline-definition-IT6M3QCI.B2tmtGDZ.js → timeline-definition-IT6M3QCI.Qx0o1egT.js} +2 -2
- package/dist/chunks/{treemap-KMMF4GRG.Dm_alnmO.js → treemap-KMMF4GRG.CwfQGJx8.js} +1 -1
- package/dist/chunks/{useMarkdown.BWJCktGN.js → useMarkdown.CZvYSQuE.js} +8 -8
- package/dist/chunks/{xychartDiagram-PRI3JC2R.XQCHu3eO.js → xychartDiagram-PRI3JC2R.CFOiW2rk.js} +1 -1
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +3 -3
- package/dist/style.css +1 -1
- package/package.json +4 -4
- package/dist/chunks/AboutEntry.B7fBRGac.js +0 -85
- package/dist/chunks/ButtonIconDelete.Bw7zU6Rb.js +0 -456
- package/dist/chunks/LoginEntry.DvDNWT7T.js +0 -118
- package/dist/chunks/MemoriesEntry.OQ1K4KNa.js +0 -743
- package/dist/chunks/ProfileEntry.CbZLIK8x.js +0 -213
- package/dist/chunks/UsageEntry.CSkPteMr.js +0 -238
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { jsxs as t, jsx as e, Fragment as L } from "react/jsx-runtime";
|
|
2
|
+
import { preloadToast as M, showSuccessToast as j, showErrorToast as D, LazyToastContainerWrapper as K, ConfirmationPanel as O, Panel as W, ButtonCancel as Y } from "./App.Hqmg5y2Y.js";
|
|
3
|
+
import { useState as d, useMemo as H, useCallback as b, useRef as $ } from "react";
|
|
4
|
+
import { useUniqueId as q, CARDS as n, Button as G, ButtonIcon as V, IconPasskey as y, PROFILE_TITLE as J } from "./LogoEntry.DohsYXa0.js";
|
|
5
|
+
import { n as Q, useUserPreferences as X, useServerCapabilities as Z, p as ee, setUserPlan as se, renderDataAsList as ae, st as re, isTauri as ne } from "./index.BRIbdI1P.js";
|
|
6
|
+
import { Card as S } from "./index.BDdSIqNw.js";
|
|
7
|
+
import te from "clsx";
|
|
8
|
+
const ie = ({
|
|
9
|
+
requestConfirmation: m
|
|
10
|
+
}) => {
|
|
11
|
+
const {
|
|
12
|
+
isAuthenticated: u,
|
|
13
|
+
user: a,
|
|
14
|
+
registeringForPasskey: P,
|
|
15
|
+
authenticationType: h,
|
|
16
|
+
getAccessToken: i
|
|
17
|
+
} = Q(), [f, p] = d(null), [l, T] = d(!1), w = q(), E = a?.username || "", {
|
|
18
|
+
data: o,
|
|
19
|
+
isSuccess: F,
|
|
20
|
+
refetch: A
|
|
21
|
+
} = X({
|
|
22
|
+
user: a?.username,
|
|
23
|
+
getAccessToken: i
|
|
24
|
+
}), { data: C, isSuccess: x } = Z(), R = H(() => !x || !C?.plans ? [] : C.plans.map((s) => ({
|
|
25
|
+
id: s.name,
|
|
26
|
+
label: s.label,
|
|
27
|
+
description: s.description,
|
|
28
|
+
features: s.features,
|
|
29
|
+
models: s.allowedModels.map(
|
|
30
|
+
(r) => ee[r] || r
|
|
31
|
+
)
|
|
32
|
+
})), [x, C?.plans]), g = b(() => {
|
|
33
|
+
l || (M(), T(!0));
|
|
34
|
+
}, [l]), v = b(
|
|
35
|
+
async (s, r) => {
|
|
36
|
+
if (a?.username)
|
|
37
|
+
try {
|
|
38
|
+
p(s), await se({
|
|
39
|
+
plan: s,
|
|
40
|
+
accessToken: await i(),
|
|
41
|
+
username: a.username
|
|
42
|
+
}), await A(), await j(`${n.PLANS.SWITCH_SUCCESS} ${r}`, {
|
|
43
|
+
containerId: "profile-plan-selection"
|
|
44
|
+
});
|
|
45
|
+
} catch {
|
|
46
|
+
await D(n.PLANS.SWITCH_ERROR, {
|
|
47
|
+
containerId: "profile-plan-selection"
|
|
48
|
+
});
|
|
49
|
+
} finally {
|
|
50
|
+
p(null);
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
[i, A, a?.username]
|
|
54
|
+
), U = b(
|
|
55
|
+
(s, r) => {
|
|
56
|
+
!a?.username || s === o?.plan || m(
|
|
57
|
+
() => v(s, r),
|
|
58
|
+
/* @__PURE__ */ t("p", { className: "m-0", children: [
|
|
59
|
+
"Are you sure you want to switch to the following plan:",
|
|
60
|
+
" ",
|
|
61
|
+
/* @__PURE__ */ e("span", { className: "font-semibold", children: r })
|
|
62
|
+
] })
|
|
63
|
+
);
|
|
64
|
+
},
|
|
65
|
+
[
|
|
66
|
+
v,
|
|
67
|
+
o?.plan,
|
|
68
|
+
m,
|
|
69
|
+
a?.username
|
|
70
|
+
]
|
|
71
|
+
);
|
|
72
|
+
return u && E ? /* @__PURE__ */ t(L, { children: [
|
|
73
|
+
/* @__PURE__ */ e("div", { className: "av-sassy", children: /* @__PURE__ */ e(K, { containerId: "profile-plan-selection" }) }),
|
|
74
|
+
/* @__PURE__ */ e(
|
|
75
|
+
S,
|
|
76
|
+
{
|
|
77
|
+
header: n.PREFERENCES.TITLE,
|
|
78
|
+
className: "prose-dark dark:prose-lighter",
|
|
79
|
+
noBorder: !0,
|
|
80
|
+
children: ae(w, {
|
|
81
|
+
[n.PREFERENCES.USERNAME]: E,
|
|
82
|
+
[n.PREFERENCES.EMAIL]: a?.email || ""
|
|
83
|
+
})
|
|
84
|
+
}
|
|
85
|
+
),
|
|
86
|
+
F && x && R.length > 0 && /* @__PURE__ */ t(
|
|
87
|
+
S,
|
|
88
|
+
{
|
|
89
|
+
header: n.PLANS.TITLE,
|
|
90
|
+
className: "prose-dark dark:prose-lighter mt-4",
|
|
91
|
+
noBorder: !0,
|
|
92
|
+
children: [
|
|
93
|
+
/* @__PURE__ */ e("p", { className: "text-sm", children: n.PLANS.DESCRIPTION }),
|
|
94
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-3", children: R.map(({ id: s, label: r, description: I, features: B, models: _ }) => {
|
|
95
|
+
const N = o?.plan === s, z = N ? n.PLANS.ACTIVE_BADGE : `Get ${r}`, k = f === s;
|
|
96
|
+
return /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(S, { mode: "darker", className: "prose-lighter h-full", children: /* @__PURE__ */ t("div", { className: "flex flex-wrap flex-col", children: [
|
|
97
|
+
/* @__PURE__ */ t("div", { className: "box-border max-w-full basis-auto", children: [
|
|
98
|
+
/* @__PURE__ */ e("div", { className: "flex items-start justify-between gap-2", children: /* @__PURE__ */ t("div", { children: [
|
|
99
|
+
/* @__PURE__ */ e(
|
|
100
|
+
"h3",
|
|
101
|
+
{
|
|
102
|
+
className: te("m-0", {
|
|
103
|
+
"text-emerald-400": N
|
|
104
|
+
}),
|
|
105
|
+
children: r
|
|
106
|
+
}
|
|
107
|
+
),
|
|
108
|
+
/* @__PURE__ */ e("p", { className: "mb-0 text-sm opacity-80", children: I })
|
|
109
|
+
] }) }),
|
|
110
|
+
/* @__PURE__ */ e("h4", { children: "Features" }),
|
|
111
|
+
/* @__PURE__ */ e("ul", { className: "prose-li:text-sm", children: B.map((c) => /* @__PURE__ */ e("li", { children: c }, c)) }),
|
|
112
|
+
/* @__PURE__ */ e("h4", { children: "Models" }),
|
|
113
|
+
/* @__PURE__ */ e("ul", { className: "prose-li:text-sm", children: _.map((c) => /* @__PURE__ */ e("li", { children: c }, c)) })
|
|
114
|
+
] }),
|
|
115
|
+
/* @__PURE__ */ e("div", { className: "box-border max-w-full basis-auto", children: /* @__PURE__ */ e(
|
|
116
|
+
G,
|
|
117
|
+
{
|
|
118
|
+
mode: "dark",
|
|
119
|
+
size: "small",
|
|
120
|
+
variant: N ? "selected" : "secondary",
|
|
121
|
+
className: "mt-4",
|
|
122
|
+
fullWidth: !0,
|
|
123
|
+
disabled: N || k,
|
|
124
|
+
onClick: () => {
|
|
125
|
+
U(s, r);
|
|
126
|
+
},
|
|
127
|
+
onMouseEnter: g,
|
|
128
|
+
onFocus: g,
|
|
129
|
+
children: k ? "Updating..." : z
|
|
130
|
+
}
|
|
131
|
+
) })
|
|
132
|
+
] }) }) }, s);
|
|
133
|
+
}) })
|
|
134
|
+
]
|
|
135
|
+
}
|
|
136
|
+
),
|
|
137
|
+
h !== re.PASSKEY && !ne() && /* @__PURE__ */ t(
|
|
138
|
+
S,
|
|
139
|
+
{
|
|
140
|
+
className: "prose-dark dark:prose-lighter mt-4",
|
|
141
|
+
noBorder: !0,
|
|
142
|
+
header: /* @__PURE__ */ e("h2", { className: "m-0", children: /* @__PURE__ */ t("div", { className: "flex flex-wrap items-center gap-x-3", children: [
|
|
143
|
+
/* @__PURE__ */ e("div", { className: "box-border max-w-full basis-auto", children: /* @__PURE__ */ e(y, { size: "size-8" }) }),
|
|
144
|
+
/* @__PURE__ */ e("div", { className: "box-border max-w-full basis-auto", children: /* @__PURE__ */ e("div", { children: n.PREFERENCES.PASSKEY_TITLE }) })
|
|
145
|
+
] }) }),
|
|
146
|
+
children: [
|
|
147
|
+
/* @__PURE__ */ e("p", { children: n.PREFERENCES.PASSKEY_INSTRUCTIONS }),
|
|
148
|
+
/* @__PURE__ */ e(
|
|
149
|
+
V,
|
|
150
|
+
{
|
|
151
|
+
variant: "selected",
|
|
152
|
+
size: "small",
|
|
153
|
+
className: "mt-2",
|
|
154
|
+
onClick: P,
|
|
155
|
+
labelLeft: n.PREFERENCES.PASSKEY_BUTTON,
|
|
156
|
+
children: /* @__PURE__ */ e(y, { size: "size-5", monotone: !0 })
|
|
157
|
+
}
|
|
158
|
+
)
|
|
159
|
+
]
|
|
160
|
+
}
|
|
161
|
+
)
|
|
162
|
+
] }) : null;
|
|
163
|
+
}, fe = ({
|
|
164
|
+
open: m,
|
|
165
|
+
onOpenChange: u
|
|
166
|
+
}) => {
|
|
167
|
+
const a = $(null), [P, h] = d(!1), [i, f] = d(null), [p, l] = d(null);
|
|
168
|
+
return /* @__PURE__ */ t(L, { children: [
|
|
169
|
+
/* @__PURE__ */ e(
|
|
170
|
+
O,
|
|
171
|
+
{
|
|
172
|
+
showConfirmation: P,
|
|
173
|
+
setShowConfirmation: h,
|
|
174
|
+
action: () => {
|
|
175
|
+
i && i(), f(null), l(null);
|
|
176
|
+
},
|
|
177
|
+
customStrings: {
|
|
178
|
+
confirmAction: "Switch Plan",
|
|
179
|
+
cancelAction: "Cancel",
|
|
180
|
+
title: "Switch Plan"
|
|
181
|
+
},
|
|
182
|
+
children: p
|
|
183
|
+
}
|
|
184
|
+
),
|
|
185
|
+
/* @__PURE__ */ e(
|
|
186
|
+
W,
|
|
187
|
+
{
|
|
188
|
+
open: m,
|
|
189
|
+
onOpenChange: u,
|
|
190
|
+
title: J,
|
|
191
|
+
animation: !0,
|
|
192
|
+
animationType: "fade",
|
|
193
|
+
blurEffect: "large",
|
|
194
|
+
initialFocus: a,
|
|
195
|
+
footer: /* @__PURE__ */ e("div", { className: "flex flex-wrap justify-end gap-x-2 pb-8 sm:pb-0", children: /* @__PURE__ */ e("div", { className: "box-border max-w-full basis-auto", children: /* @__PURE__ */ e(Y, { onOpenChange: u, ref: a }) }) }),
|
|
196
|
+
children: /* @__PURE__ */ e(ie, { requestConfirmation: (E, o) => {
|
|
197
|
+
f(() => E), l(o), h(!0);
|
|
198
|
+
} })
|
|
199
|
+
}
|
|
200
|
+
)
|
|
201
|
+
] });
|
|
202
|
+
};
|
|
203
|
+
export {
|
|
204
|
+
fe as Profile
|
|
205
|
+
};
|
|
@@ -1,54 +1,54 @@
|
|
|
1
1
|
import { jsxs as n, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { n as
|
|
3
|
-
import { AppContext as
|
|
4
|
-
import { Card as f } from "./index.
|
|
5
|
-
import { useCapability as be, useLocalStorage as
|
|
6
|
-
import { TextArea as Ne } from "./index.
|
|
7
|
-
import { useRef as
|
|
8
|
-
const
|
|
9
|
-
open:
|
|
10
|
-
onOpenChange:
|
|
2
|
+
import { n as je, useEntitlements as Ve, useUserPreferences as Fe, w as ie, LOCAL_STORAGE_OLED_MODE as We, LOCAL_STORAGE_FULL_SCREEN as $e, e as de, canEvaluateModels as ze, W as He, getCacheInfo as Ye, isServiceWorkerEnabled as qe, V as Ke, K as ue, applyOledMode as me, getCurrentGeoLocation as Qe, graphQLRequest as he, handleServiceWorkerToggle as Je, SERVICE_TYPES as fe } from "./index.BRIbdI1P.js";
|
|
3
|
+
import { AppContext as Xe, SETTINGS_TITLE as Ze, CARDS as r, Button as pe, PROMPTS_DESCRIPTION as et, APP_SET_OLED_MODE as Ee, APP_SET_FULL_SCREEN as Se } from "./LogoEntry.DohsYXa0.js";
|
|
4
|
+
import { Card as f } from "./index.BDdSIqNw.js";
|
|
5
|
+
import { useCapability as be, useLocalStorage as ge, Panel as tt, Toggle as l, ButtonCancel as ot } from "./App.Hqmg5y2Y.js";
|
|
6
|
+
import { TextArea as Ne } from "./index.5YcMrbtG.js";
|
|
7
|
+
import { useRef as st, useContext as at, useState as s, useMemo as nt, useCallback as rt, useEffect as Te } from "react";
|
|
8
|
+
const ft = ({
|
|
9
|
+
open: Ce,
|
|
10
|
+
onOpenChange: P
|
|
11
11
|
}) => {
|
|
12
|
-
const
|
|
12
|
+
const A = st(null), { getAccessToken: y, user: R } = je(), { allowedModels: I, status: x } = Ve(), { dispatch: b } = at(Xe), {
|
|
13
13
|
data: o,
|
|
14
|
-
isSuccess:
|
|
15
|
-
refetch:
|
|
16
|
-
} =
|
|
14
|
+
isSuccess: we,
|
|
15
|
+
refetch: B
|
|
16
|
+
} = Fe({
|
|
17
17
|
user: R?.username,
|
|
18
|
-
getAccessToken:
|
|
19
|
-
}), [
|
|
18
|
+
getAccessToken: y
|
|
19
|
+
}), [U, g] = s({
|
|
20
20
|
loadingLocation: !1
|
|
21
|
-
}), [L,
|
|
21
|
+
}), [L, G] = s({
|
|
22
22
|
prompts: []
|
|
23
|
-
}), [j, V] = s(""), [F,
|
|
24
|
-
key:
|
|
23
|
+
}), [j, V] = s(""), [F, N] = s(""), [W, $] = s(!1), [z, H] = s(!1), [T, Y] = s(!1), [C, q] = s(!1), [K, Q] = s(!1), [D, J] = s(!1), [p, X] = s(null), [Z, ee] = s(!1), [te, oe] = s(!1), se = be(ie.TOOL.MEMORIES), ae = be(ie.ADDON.REASONING), [i, ye] = ge({
|
|
24
|
+
key: We,
|
|
25
25
|
initialValue: !1
|
|
26
|
-
}), [u,
|
|
27
|
-
key:
|
|
26
|
+
}), [u, Ie] = ge({
|
|
27
|
+
key: $e,
|
|
28
28
|
initialValue: !1
|
|
29
|
-
}), [m, M] = s(!1), [
|
|
29
|
+
}), [m, M] = s(!1), [E, _] = s(!1), [ne, re] = s(de), Le = nt(() => ze(I, x) ? He(I) : !1, [I, x]), De = (e) => {
|
|
30
30
|
oe(e);
|
|
31
|
-
},
|
|
31
|
+
}, Me = (e) => {
|
|
32
32
|
$(e);
|
|
33
|
-
},
|
|
33
|
+
}, _e = (e) => {
|
|
34
34
|
se && H(e);
|
|
35
|
-
},
|
|
35
|
+
}, ke = (e) => {
|
|
36
36
|
q(e);
|
|
37
|
-
},
|
|
37
|
+
}, Oe = (e) => {
|
|
38
38
|
ae && Q(e);
|
|
39
|
-
}, Ae = (e) => {
|
|
40
|
-
J(e);
|
|
41
39
|
}, ve = (e) => {
|
|
40
|
+
J(e);
|
|
41
|
+
}, Pe = (e) => {
|
|
42
42
|
M(e);
|
|
43
|
-
},
|
|
43
|
+
}, Ae = (e) => {
|
|
44
44
|
_(e);
|
|
45
|
-
},
|
|
45
|
+
}, Re = (e) => {
|
|
46
46
|
re(e ? ue : de);
|
|
47
47
|
}, xe = async (e) => {
|
|
48
48
|
e.preventDefault();
|
|
49
49
|
try {
|
|
50
50
|
await he({
|
|
51
|
-
accessToken: await
|
|
51
|
+
accessToken: await y(),
|
|
52
52
|
type: fe.SET_USER_PREFERENCES,
|
|
53
53
|
params: {
|
|
54
54
|
user: R?.username,
|
|
@@ -69,63 +69,63 @@ const pt = ({
|
|
|
69
69
|
useNestedModelSelection: D,
|
|
70
70
|
themeMode: ne
|
|
71
71
|
}
|
|
72
|
-
}), C !==
|
|
73
|
-
type:
|
|
72
|
+
}), C !== T && (await Je(C), Y(C)), m !== i && (ye(m), me(m), b({
|
|
73
|
+
type: Ee,
|
|
74
74
|
payload: { oledMode: m }
|
|
75
|
-
})),
|
|
76
|
-
type:
|
|
77
|
-
payload: { fullScreen:
|
|
78
|
-
})),
|
|
75
|
+
})), E !== u && (Ie(E), b({
|
|
76
|
+
type: Se,
|
|
77
|
+
payload: { fullScreen: E }
|
|
78
|
+
})), B(), g({
|
|
79
79
|
loadingLocation: !1
|
|
80
80
|
});
|
|
81
81
|
} catch {
|
|
82
82
|
}
|
|
83
|
-
},
|
|
84
|
-
|
|
83
|
+
}, Be = async () => {
|
|
84
|
+
g({
|
|
85
85
|
loadingLocation: !0
|
|
86
|
-
}),
|
|
86
|
+
}), N("...");
|
|
87
87
|
try {
|
|
88
|
-
const e = Date.now(), a = await
|
|
89
|
-
accessToken: await
|
|
88
|
+
const e = Date.now(), a = await Qe(), w = await he({
|
|
89
|
+
accessToken: await y(),
|
|
90
90
|
type: fe.GET_LOCATION,
|
|
91
91
|
params: {
|
|
92
92
|
latitude: a.latitude,
|
|
93
93
|
longitude: a.longitude
|
|
94
94
|
}
|
|
95
95
|
}), h = Date.now() - e;
|
|
96
|
-
h < 2e3 && await new Promise((
|
|
97
|
-
const { city: d, state: c, country: S, displayName:
|
|
98
|
-
|
|
96
|
+
h < 2e3 && await new Promise((Ge) => setTimeout(Ge, 2e3 - h));
|
|
97
|
+
const { city: d, state: c, country: S, displayName: v } = w.data, Ue = d && c && S ? `${d}, ${c}, ${S}` : v;
|
|
98
|
+
g({
|
|
99
99
|
loadingLocation: !1
|
|
100
|
-
}),
|
|
100
|
+
}), N(Ue);
|
|
101
101
|
} catch {
|
|
102
|
-
|
|
102
|
+
g({
|
|
103
103
|
loadingLocation: !1
|
|
104
104
|
});
|
|
105
105
|
}
|
|
106
106
|
}, le = () => {
|
|
107
|
-
m !== i && (M(i), me(i),
|
|
108
|
-
type:
|
|
107
|
+
m !== i && (M(i), me(i), b({
|
|
108
|
+
type: Ee,
|
|
109
109
|
payload: { oledMode: i }
|
|
110
|
-
})),
|
|
111
|
-
type:
|
|
110
|
+
})), E !== u && (_(u), b({
|
|
111
|
+
type: Se,
|
|
112
112
|
payload: { fullScreen: u }
|
|
113
|
-
})),
|
|
113
|
+
})), B(), P(!1);
|
|
114
114
|
}, k = ({
|
|
115
115
|
enabled: e = !1,
|
|
116
116
|
privateChat: a = !1,
|
|
117
|
-
clipboardAccess:
|
|
117
|
+
clipboardAccess: w = !1,
|
|
118
118
|
...O
|
|
119
119
|
}) => {
|
|
120
|
-
|
|
120
|
+
G((h) => {
|
|
121
121
|
const d = h.prompts, c = {
|
|
122
122
|
...O,
|
|
123
123
|
enabled: e,
|
|
124
124
|
privateChat: a,
|
|
125
|
-
clipboardAccess:
|
|
125
|
+
clipboardAccess: w
|
|
126
126
|
};
|
|
127
|
-
|
|
128
|
-
const S = d.findIndex((
|
|
127
|
+
w ? c.content = c.content.replace(/{{clipboard}}/g, "") + " {{clipboard}}" : c.content = c.content.replace(/{{clipboard}}/g, "");
|
|
128
|
+
const S = d.findIndex((v) => v.slot === O.slot);
|
|
129
129
|
return S === -1 ? {
|
|
130
130
|
...h,
|
|
131
131
|
prompts: [...d, { ...c }]
|
|
@@ -134,63 +134,55 @@ const pt = ({
|
|
|
134
134
|
prompts: [...d]
|
|
135
135
|
});
|
|
136
136
|
});
|
|
137
|
-
}, ce =
|
|
137
|
+
}, ce = rt(async () => {
|
|
138
138
|
try {
|
|
139
139
|
ee(!0);
|
|
140
|
-
const e = await
|
|
140
|
+
const e = await Ye();
|
|
141
141
|
X(e);
|
|
142
142
|
} catch {
|
|
143
143
|
} finally {
|
|
144
144
|
ee(!1);
|
|
145
145
|
}
|
|
146
146
|
}, []);
|
|
147
|
-
return
|
|
147
|
+
return Te(() => {
|
|
148
148
|
if (!o)
|
|
149
149
|
return;
|
|
150
|
-
o.instructions && V(o.instructions), o.location &&
|
|
151
|
-
const e =
|
|
150
|
+
o.instructions && V(o.instructions), o.location && N(o.location), o.tags && G({ 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);
|
|
151
|
+
const e = qe();
|
|
152
152
|
Y(e), q(e), M(i), _(u);
|
|
153
|
-
}, [o, i, u]),
|
|
154
|
-
|
|
155
|
-
}, [
|
|
156
|
-
|
|
153
|
+
}, [o, i, u]), Te(() => {
|
|
154
|
+
T ? ce() : X(null);
|
|
155
|
+
}, [T, ce]), we ? /* @__PURE__ */ n(
|
|
156
|
+
tt,
|
|
157
157
|
{
|
|
158
|
-
open:
|
|
158
|
+
open: Ce,
|
|
159
159
|
onOpenChange: le,
|
|
160
|
-
title:
|
|
160
|
+
title: Ze,
|
|
161
161
|
animation: !0,
|
|
162
162
|
animationType: "fade",
|
|
163
163
|
blurEffect: "large",
|
|
164
|
-
initialFocus:
|
|
165
|
-
footer: /* @__PURE__ */ n(
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
)
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
A(!1), await xe(e);
|
|
187
|
-
},
|
|
188
|
-
children: "Save"
|
|
189
|
-
}
|
|
190
|
-
) })
|
|
191
|
-
]
|
|
192
|
-
}
|
|
193
|
-
),
|
|
164
|
+
initialFocus: A,
|
|
165
|
+
footer: /* @__PURE__ */ n("div", { className: "flex flex-wrap justify-end gap-x-2 pb-8 sm:pb-0", children: [
|
|
166
|
+
/* @__PURE__ */ t("div", { className: "box-border max-w-full basis-auto", children: /* @__PURE__ */ t(
|
|
167
|
+
ot,
|
|
168
|
+
{
|
|
169
|
+
onOpenChange: le,
|
|
170
|
+
label: "Cancel",
|
|
171
|
+
ref: A
|
|
172
|
+
}
|
|
173
|
+
) }),
|
|
174
|
+
/* @__PURE__ */ t("div", { className: "box-border max-w-full basis-auto", children: /* @__PURE__ */ t(
|
|
175
|
+
pe,
|
|
176
|
+
{
|
|
177
|
+
mode: "light",
|
|
178
|
+
focusMode: "light",
|
|
179
|
+
onClick: async (e) => {
|
|
180
|
+
P(!1), await xe(e);
|
|
181
|
+
},
|
|
182
|
+
children: "Save"
|
|
183
|
+
}
|
|
184
|
+
) })
|
|
185
|
+
] }),
|
|
194
186
|
children: [
|
|
195
187
|
/* @__PURE__ */ n(
|
|
196
188
|
f,
|
|
@@ -209,7 +201,7 @@ const pt = ({
|
|
|
209
201
|
label: "Message Statistics",
|
|
210
202
|
subLabel: r.SETTINGS_DETAILS.DETAILS,
|
|
211
203
|
name: "show-message-statistics",
|
|
212
|
-
onChange:
|
|
204
|
+
onChange: De,
|
|
213
205
|
checked: te
|
|
214
206
|
}
|
|
215
207
|
),
|
|
@@ -223,7 +215,7 @@ const pt = ({
|
|
|
223
215
|
label: "Send Message on Enter",
|
|
224
216
|
subLabel: r.SETTINGS_DETAILS.SEND_ON_ENTER,
|
|
225
217
|
name: "send-message-on-enter",
|
|
226
|
-
onChange:
|
|
218
|
+
onChange: Me,
|
|
227
219
|
checked: W
|
|
228
220
|
}
|
|
229
221
|
),
|
|
@@ -237,7 +229,7 @@ const pt = ({
|
|
|
237
229
|
label: "Use Memory",
|
|
238
230
|
subLabel: r.SETTINGS_DETAILS.USE_MEMORY,
|
|
239
231
|
name: "use-memory",
|
|
240
|
-
onChange:
|
|
232
|
+
onChange: _e,
|
|
241
233
|
checked: z
|
|
242
234
|
}
|
|
243
235
|
)
|
|
@@ -253,7 +245,7 @@ const pt = ({
|
|
|
253
245
|
children: [
|
|
254
246
|
/* @__PURE__ */ n("p", { className: "text-sm", children: [
|
|
255
247
|
"What would you like ",
|
|
256
|
-
/* @__PURE__ */ t("em", { children:
|
|
248
|
+
/* @__PURE__ */ t("em", { children: Ke }),
|
|
257
249
|
" to know about you to provide better responses?"
|
|
258
250
|
] }),
|
|
259
251
|
/* @__PURE__ */ t(
|
|
@@ -291,21 +283,21 @@ const pt = ({
|
|
|
291
283
|
label: "Location",
|
|
292
284
|
value: F,
|
|
293
285
|
onChange: (e) => {
|
|
294
|
-
|
|
286
|
+
N(e.target.value);
|
|
295
287
|
},
|
|
296
288
|
helperText: "Enter your location or press auto-detect."
|
|
297
289
|
}
|
|
298
290
|
),
|
|
299
291
|
/* @__PURE__ */ t(
|
|
300
|
-
|
|
292
|
+
pe,
|
|
301
293
|
{
|
|
302
294
|
className: "mt-2",
|
|
303
295
|
size: "small",
|
|
304
296
|
noBorder: !0,
|
|
305
297
|
variant: "secondary",
|
|
306
|
-
disabled:
|
|
307
|
-
onClick:
|
|
308
|
-
children:
|
|
298
|
+
disabled: U.loadingLocation,
|
|
299
|
+
onClick: Be,
|
|
300
|
+
children: U.loadingLocation ? "Detecting..." : "Auto-detect"
|
|
309
301
|
}
|
|
310
302
|
)
|
|
311
303
|
]
|
|
@@ -318,7 +310,7 @@ const pt = ({
|
|
|
318
310
|
className: "prose-dark dark:prose-lighter mt-4",
|
|
319
311
|
noBorder: !0,
|
|
320
312
|
children: [
|
|
321
|
-
/* @__PURE__ */ t("p", { className: "text-sm", children:
|
|
313
|
+
/* @__PURE__ */ t("p", { className: "text-sm", children: et }),
|
|
322
314
|
L.prompts && L.prompts.slice(0, 3).map((e) => /* @__PURE__ */ n(
|
|
323
315
|
f,
|
|
324
316
|
{
|
|
@@ -409,11 +401,11 @@ const pt = ({
|
|
|
409
401
|
label: "Reasoning Button",
|
|
410
402
|
subLabel: r.SETTINGS_ADVANCED.REASONING_BUTTON_DESCRIPTION,
|
|
411
403
|
name: "show-reasoning-button",
|
|
412
|
-
onChange:
|
|
404
|
+
onChange: Oe,
|
|
413
405
|
checked: K
|
|
414
406
|
}
|
|
415
407
|
),
|
|
416
|
-
|
|
408
|
+
Le && /* @__PURE__ */ t(
|
|
417
409
|
l,
|
|
418
410
|
{
|
|
419
411
|
noBorder: !0,
|
|
@@ -423,7 +415,7 @@ const pt = ({
|
|
|
423
415
|
label: "Model Selection",
|
|
424
416
|
subLabel: r.SETTINGS_ADVANCED.NESTED_MODEL_SELECTION_DESCRIPTION,
|
|
425
417
|
name: "use-nested-model-selection",
|
|
426
|
-
onChange:
|
|
418
|
+
onChange: ve,
|
|
427
419
|
checked: D
|
|
428
420
|
}
|
|
429
421
|
),
|
|
@@ -437,7 +429,7 @@ const pt = ({
|
|
|
437
429
|
label: "OLED Mode",
|
|
438
430
|
subLabel: r.SETTINGS_ADVANCED.BACKGROUND_THEME_DESCRIPTION,
|
|
439
431
|
name: "enable-oled-mode",
|
|
440
|
-
onChange:
|
|
432
|
+
onChange: Pe,
|
|
441
433
|
checked: m
|
|
442
434
|
}
|
|
443
435
|
),
|
|
@@ -451,7 +443,7 @@ const pt = ({
|
|
|
451
443
|
label: "Alternative Theme",
|
|
452
444
|
subLabel: r.SETTINGS_ADVANCED.THEME_MODE_DESCRIPTION,
|
|
453
445
|
name: "enable-alternative-theme",
|
|
454
|
-
onChange:
|
|
446
|
+
onChange: Re,
|
|
455
447
|
checked: ne === ue
|
|
456
448
|
}
|
|
457
449
|
),
|
|
@@ -465,8 +457,8 @@ const pt = ({
|
|
|
465
457
|
label: "Full Screen",
|
|
466
458
|
subLabel: r.SETTINGS_ADVANCED.FULL_SCREEN_DESCRIPTION,
|
|
467
459
|
name: "enable-full-screen",
|
|
468
|
-
onChange:
|
|
469
|
-
checked:
|
|
460
|
+
onChange: Ae,
|
|
461
|
+
checked: E
|
|
470
462
|
}
|
|
471
463
|
),
|
|
472
464
|
/* @__PURE__ */ t(
|
|
@@ -479,22 +471,22 @@ const pt = ({
|
|
|
479
471
|
label: "Assets Caching",
|
|
480
472
|
subLabel: r.SETTINGS_ADVANCED.CACHE_DESCRIPTION,
|
|
481
473
|
name: "enable-service-worker",
|
|
482
|
-
onChange:
|
|
474
|
+
onChange: ke,
|
|
483
475
|
checked: C
|
|
484
476
|
}
|
|
485
477
|
),
|
|
486
|
-
|
|
478
|
+
T && /* @__PURE__ */ n("div", { className: "mt-4 p-3 border border-dashed border-border-medium dark:border-border-medium rounded @container/optimizations", children: [
|
|
487
479
|
/* @__PURE__ */ t("h3", { className: "m-0 mb-2 text-xs uppercase", children: "Cache Info" }),
|
|
488
|
-
|
|
480
|
+
p ? /* @__PURE__ */ n("div", { className: "text-xs space-y-2", children: [
|
|
489
481
|
/* @__PURE__ */ n("p", { className: "m-0", children: [
|
|
490
482
|
"Version: ",
|
|
491
|
-
/* @__PURE__ */ t("strong", { children:
|
|
483
|
+
/* @__PURE__ */ t("strong", { children: p.version })
|
|
492
484
|
] }),
|
|
493
485
|
/* @__PURE__ */ n("p", { className: "m-0", children: [
|
|
494
486
|
"Total Items: ",
|
|
495
|
-
/* @__PURE__ */ t("strong", { children:
|
|
487
|
+
/* @__PURE__ */ t("strong", { children: p.totalItems })
|
|
496
488
|
] }),
|
|
497
|
-
|
|
489
|
+
p.caches.map((e) => /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t("ul", { className: "not-prose font-mono mt-2 list-none w-[95cqw]", children: e.urls.map((a) => /* @__PURE__ */ t(
|
|
498
490
|
"li",
|
|
499
491
|
{
|
|
500
492
|
className: "truncate text-xs text-copy-dark dark:text-copy-light overflow-hidden text-ellipsis",
|
|
@@ -503,7 +495,7 @@ const pt = ({
|
|
|
503
495
|
},
|
|
504
496
|
a
|
|
505
497
|
)) }) }, e.name)),
|
|
506
|
-
|
|
498
|
+
p.totalItems === 0 && !Z && /* @__PURE__ */ t("p", { className: "italic m-0 opacity-70", children: "No cached assets yet." })
|
|
507
499
|
] }) : /* @__PURE__ */ t("p", { className: "text-xs opacity-70 m-0", children: Z ? "Loading cache info..." : "No cache info available." })
|
|
508
500
|
] })
|
|
509
501
|
]
|
|
@@ -514,5 +506,5 @@ const pt = ({
|
|
|
514
506
|
) : null;
|
|
515
507
|
};
|
|
516
508
|
export {
|
|
517
|
-
|
|
509
|
+
ft as SettingsPanel
|
|
518
510
|
};
|