@versini/sassysaint 8.47.0 → 8.47.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{AboutChangelog.BEFkfDbw.js → AboutChangelog.CrPmttGh.js} +2 -2
- package/dist/chunks/{AboutEntry.COf0szTU.js → AboutEntry.CW6LSgBo.js} +5 -5
- package/dist/chunks/{App.D5cZDwje.js → App.P8VuaklL.js} +1614 -1624
- package/dist/chunks/{Chart.B1R22nbJ.js → Chart.v46ZrHpO.js} +2 -2
- package/dist/chunks/{ChatBubbleAssistant.B9tlf_JH.js → ChatBubbleAssistant.Dm3w8aPQ.js} +4 -4
- package/dist/chunks/{ChatHistoryTable.CJfAtX8B.js → ChatHistoryTable.DiXFgbUY.js} +2 -2
- package/dist/chunks/{HistoryEntry.BbDPEPVY.js → HistoryEntry.8-r_XaOl.js} +14 -14
- package/dist/chunks/{LNWAZHJI.C8sP3-rc.js → LNWAZHJI.ucCV8_lF.js} +1 -1
- package/dist/chunks/{ProfileEntry.BUTgNPlp.js → ProfileEntry.Db0i4H1-.js} +2 -2
- package/dist/chunks/{SettingsEntry.DGB3xOzh.js → SettingsEntry.DiEffW-W.js} +113 -116
- package/dist/chunks/{UsageEntry.Bu5CcqG2.js → UsageEntry.DTwtBL3G.js} +3 -3
- package/dist/chunks/{index.DzixovoY.js → index.B6LTE4XZ.js} +2 -2
- package/dist/chunks/{index.Cfb0MIIn.js → index.BdOUWeMA.js} +1 -1
- package/dist/chunks/{index.BIMh7ysv.js → index.D6DtPtKF.js} +1 -1
- package/dist/chunks/{index.D9C8rL2L.js → index.DAma765y.js} +1 -1
- package/dist/chunks/{index.yZ_0qNLI.js → index.DxRpe0Fx.js} +778 -794
- package/dist/chunks/{index.BqV1_7Z2.js → index.WoNpwqiR.js} +3 -3
- package/dist/chunks/{index.DHJP8zY7.js → index.ihYh1tax.js} +1 -1
- package/dist/chunks/{useMarkdown.BNxkjyeo.js → useMarkdown.CrlE9bFj.js} +6 -6
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +3 -3
@@ -1,6 +1,6 @@
|
|
1
1
|
import { jsxs as m, jsx as a, Fragment as pe } from "react/jsx-runtime";
|
2
|
-
import { o as ge, h as ie, i as ye, x as be,
|
3
|
-
import { se as Me } from "./App.
|
2
|
+
import { o as ge, h as ie, i as ye, x as be, n as xe, useUserPreferences as ke, pe as we, getCacheInfo as Ne, isServiceWorkerEnabled as Ee, SETTINGS_TITLE as Te, S as V, CARDS as R, de as ve, C as se, PROMPTS_DESCRIPTION as Se, L as Ce, j as de, getCurrentGeoLocation as Ie, mutateCall as ue, handleServiceWorkerToggle as _e, SERVICE_TYPES as me } from "./index.DxRpe0Fx.js";
|
3
|
+
import { useCapability as Le, se as Me } from "./App.P8VuaklL.js";
|
4
4
|
import Oe, { useState as f, useEffect as ne, useRef as W, useLayoutEffect as Y, useCallback as Pe } from "react";
|
5
5
|
import c from "clsx";
|
6
6
|
function Ae({
|
@@ -9,7 +9,7 @@ function Ae({
|
|
9
9
|
finalValue: o,
|
10
10
|
onChange: l = () => {
|
11
11
|
},
|
12
|
-
initialControlledDelay:
|
12
|
+
initialControlledDelay: r = 0
|
13
13
|
}) {
|
14
14
|
const [n, d] = f(!1), [h, x] = f(
|
15
15
|
s !== void 0 ? s : o
|
@@ -17,10 +17,10 @@ function Ae({
|
|
17
17
|
x(u), l?.(u);
|
18
18
|
};
|
19
19
|
return ne(() => {
|
20
|
-
(async () => e !== void 0 && !n &&
|
21
|
-
(u) => setTimeout(u,
|
20
|
+
(async () => e !== void 0 && !n && r > 0 && (await new Promise(
|
21
|
+
(u) => setTimeout(u, r)
|
22
22
|
), d(!0)))();
|
23
|
-
}, [e,
|
23
|
+
}, [e, r, n]), e !== void 0 ? !n && r > 0 ? ["", l, !0] : [e, l, !0] : [h, k, !1];
|
24
24
|
}
|
25
25
|
const fe = "av-text-area", Re = "av-text-area-wrapper", le = "av-text-area-helper-text", Be = "av-text-area__control--right", De = "av-text-area__control--left", Ge = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hidden px-4 py-7", He = ({ mode: e }) => c({
|
26
26
|
"bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
|
@@ -47,7 +47,7 @@ const fe = "av-text-area", Re = "av-text-area-wrapper", le = "av-text-area-helpe
|
|
47
47
|
raw: s,
|
48
48
|
error: o,
|
49
49
|
mode: l,
|
50
|
-
leftElement:
|
50
|
+
leftElement: r,
|
51
51
|
rightElement: n
|
52
52
|
}) => {
|
53
53
|
if (s)
|
@@ -56,14 +56,14 @@ const fe = "av-text-area", Re = "av-text-area-wrapper", le = "av-text-area-helpe
|
|
56
56
|
return c(
|
57
57
|
"transform translate-y-0 scale-100 absolute px-2 cursor-not-allowed opacity-50 font-medium",
|
58
58
|
{
|
59
|
-
"translate-x-[12px]": n === !0 && !
|
59
|
+
"translate-x-[12px]": n === !0 && !r || !n && !r
|
60
60
|
}
|
61
61
|
);
|
62
62
|
if (!o)
|
63
63
|
return c(
|
64
64
|
"absolute px-2 cursor-text font-medium transform translate-y-0 scale-100",
|
65
65
|
{
|
66
|
-
"translate-x-[12px]": n === !0 && !
|
66
|
+
"translate-x-[12px]": n === !0 && !r || !n && !r,
|
67
67
|
"text-copy-medium": l === "dark",
|
68
68
|
"text-copy-dark": l === "light",
|
69
69
|
"text-copy-dark dark:text-copy-medium": l === "system",
|
@@ -74,7 +74,7 @@ const fe = "av-text-area", Re = "av-text-area-wrapper", le = "av-text-area-helpe
|
|
74
74
|
return c(
|
75
75
|
"absolute px-2 cursor-text font-medium transform translate-y-0 scale-100",
|
76
76
|
{
|
77
|
-
"translate-x-[12px]": n === !0 && !
|
77
|
+
"translate-x-[12px]": n === !0 && !r || !n && !r,
|
78
78
|
"text-copy-medium": l === "dark",
|
79
79
|
"text-copy-error-dark": l === "light",
|
80
80
|
"text-copy-error-dark dark:text-copy-error-light": l === "system",
|
@@ -113,7 +113,7 @@ const fe = "av-text-area", Re = "av-text-area-wrapper", le = "av-text-area-helpe
|
|
113
113
|
textAreaClassName: s,
|
114
114
|
raw: o,
|
115
115
|
focusMode: l,
|
116
|
-
disabled:
|
116
|
+
disabled: r,
|
117
117
|
noBorder: n,
|
118
118
|
error: d,
|
119
119
|
mode: h,
|
@@ -135,10 +135,10 @@ const fe = "av-text-area", Re = "av-text-area-wrapper", le = "av-text-area-helpe
|
|
135
135
|
error: d
|
136
136
|
}),
|
137
137
|
{
|
138
|
-
"disabled:cursor-not-allowed disabled:opacity-50":
|
138
|
+
"disabled:cursor-not-allowed disabled:opacity-50": r
|
139
139
|
}
|
140
140
|
), I = o ? void 0 : "sr-only", D = Ve({
|
141
|
-
disabled:
|
141
|
+
disabled: r,
|
142
142
|
raw: o,
|
143
143
|
error: d,
|
144
144
|
mode: h,
|
@@ -148,7 +148,7 @@ const fe = "av-text-area", Re = "av-text-area-wrapper", le = "av-text-area-helpe
|
|
148
148
|
error: d,
|
149
149
|
raw: o,
|
150
150
|
mode: h,
|
151
|
-
disabled:
|
151
|
+
disabled: r
|
152
152
|
}), _ = o ? void 0 : c(Be, "absolute"), w = o ? void 0 : c(De, "absolute");
|
153
153
|
return {
|
154
154
|
wrapper: u,
|
@@ -165,13 +165,13 @@ const fe = "av-text-area", Re = "av-text-area-wrapper", le = "av-text-area-helpe
|
|
165
165
|
currentLabelOffset: o = 0,
|
166
166
|
currentHelperTextOffset: l = 0
|
167
167
|
}) => {
|
168
|
-
let
|
168
|
+
let r, n;
|
169
169
|
if (e > 0 && e !== s) {
|
170
170
|
const d = e - s, h = Math.abs(d / 24);
|
171
|
-
|
171
|
+
r = o + -1 * Math.sign(d) * (12 * h), n = l + Math.sign(d) * (12 * h);
|
172
172
|
}
|
173
173
|
return {
|
174
|
-
labelOffset:
|
174
|
+
labelOffset: r,
|
175
175
|
helperTextOffset: n,
|
176
176
|
scrollHeight: e
|
177
177
|
};
|
@@ -181,7 +181,7 @@ const fe = "av-text-area", Re = "av-text-area-wrapper", le = "av-text-area-helpe
|
|
181
181
|
name: s,
|
182
182
|
label: o,
|
183
183
|
error: l = !1,
|
184
|
-
raw:
|
184
|
+
raw: r = !1,
|
185
185
|
className: n,
|
186
186
|
textAreaClassName: d,
|
187
187
|
mode: h = "system",
|
@@ -200,20 +200,20 @@ const fe = "av-text-area", Re = "av-text-area-wrapper", le = "av-text-area-helpe
|
|
200
200
|
onBlur: F,
|
201
201
|
...G
|
202
202
|
}, X) => {
|
203
|
-
const p = W(null), q = ge([X, p]), [J, M] = ie(), [K, C] = ie(), H = W(80), Q = W(-25), U = W(null), Z = W(30), ee = W(null), O = ye({ id: e, prefix: `${fe}-` }), [
|
203
|
+
const p = W(null), q = ge([X, p]), [J, M] = ie(), [K, C] = ie(), H = W(80), Q = W(-25), U = W(null), Z = W(30), ee = W(null), O = ye({ id: e, prefix: `${fe}-` }), [re, te] = f(0), [$, ae] = f(0), [t, i] = f(
|
204
204
|
!!(!_ && y)
|
205
|
-
), P = `${s} error, ${y}`,
|
205
|
+
), P = `${s} error, ${y}`, N = ze({
|
206
206
|
className: n,
|
207
207
|
textAreaClassName: d,
|
208
208
|
error: l,
|
209
|
-
raw:
|
209
|
+
raw: r,
|
210
210
|
focusMode: x,
|
211
211
|
disabled: v,
|
212
212
|
noBorder: I,
|
213
213
|
mode: h,
|
214
214
|
rightElement: !!w,
|
215
215
|
leftElement: !!S
|
216
|
-
}), [g,
|
216
|
+
}), [g, E] = Ae({
|
217
217
|
value: k,
|
218
218
|
initialControlledDelay: 20,
|
219
219
|
defaultValue: u,
|
@@ -225,27 +225,27 @@ const fe = "av-text-area", Re = "av-text-area-wrapper", le = "av-text-area-helpe
|
|
225
225
|
});
|
226
226
|
}
|
227
227
|
}), T = (b) => {
|
228
|
-
|
228
|
+
E(b.target.value);
|
229
229
|
}, A = (b) => {
|
230
230
|
_ && y && i(!0), L && L(b);
|
231
231
|
}, j = (b) => {
|
232
232
|
_ && y && !g && i(!1), F && F(b);
|
233
233
|
};
|
234
234
|
return Y(() => {
|
235
|
-
M && M.width &&
|
235
|
+
M && M.width && te(M.width + 18 + 10);
|
236
236
|
}, [M]), Y(() => {
|
237
237
|
C && C.width && ae(C.width + 18 + 10);
|
238
238
|
}, [C]), Y(() => {
|
239
|
-
|
240
|
-
}, [g,
|
241
|
-
|
239
|
+
r || p && p.current && g !== void 0 && (p.current.style.height = "inherit", p.current.style.height = p.current.scrollHeight + "px");
|
240
|
+
}, [g, r]), Y(() => {
|
241
|
+
r || setTimeout(() => {
|
242
242
|
U?.current?.style.setProperty(
|
243
243
|
"--av-text-area-wrapper-transition",
|
244
244
|
g ? "none" : "all 0.2s ease-out"
|
245
245
|
);
|
246
246
|
}, 0);
|
247
|
-
}, [g,
|
248
|
-
if (!
|
247
|
+
}, [g, r]), Y(() => {
|
248
|
+
if (!r && p && p.current && g !== void 0) {
|
249
249
|
const { labelOffset: b, helperTextOffset: oe, scrollHeight: he } = Fe({
|
250
250
|
scrollHeight: p.current.scrollHeight,
|
251
251
|
currentHeight: H.current,
|
@@ -260,16 +260,16 @@ const fe = "av-text-area", Re = "av-text-area-wrapper", le = "av-text-area-helpe
|
|
260
260
|
`${oe}px`
|
261
261
|
)), H.current = he || H.current;
|
262
262
|
}
|
263
|
-
}, [g,
|
263
|
+
}, [g, r]), C.width > 0 && U?.current?.style.setProperty(
|
264
264
|
"--tw-translate-x",
|
265
265
|
`${12 + C.width + 5}px`
|
266
|
-
), /* @__PURE__ */ m("div", { className:
|
266
|
+
), /* @__PURE__ */ m("div", { className: N.wrapper, children: [
|
267
267
|
/* @__PURE__ */ a(
|
268
268
|
"label",
|
269
269
|
{
|
270
270
|
htmlFor: O,
|
271
271
|
id: D,
|
272
|
-
className:
|
272
|
+
className: N.accessibleLabel,
|
273
273
|
children: o
|
274
274
|
}
|
275
275
|
),
|
@@ -277,7 +277,7 @@ const fe = "av-text-area", Re = "av-text-area-wrapper", le = "av-text-area-helpe
|
|
277
277
|
"div",
|
278
278
|
{
|
279
279
|
ref: K,
|
280
|
-
className:
|
280
|
+
className: N.leftElement,
|
281
281
|
children: S
|
282
282
|
}
|
283
283
|
),
|
@@ -288,16 +288,16 @@ const fe = "av-text-area", Re = "av-text-area-wrapper", le = "av-text-area-helpe
|
|
288
288
|
id: O,
|
289
289
|
name: s,
|
290
290
|
disabled: v,
|
291
|
-
placeholder:
|
292
|
-
className:
|
291
|
+
placeholder: r ? void 0 : " ",
|
292
|
+
className: N.textArea,
|
293
293
|
rows: 1,
|
294
294
|
...y && { "aria-describedby": `${O}-helper` },
|
295
295
|
...l && { "aria-invalid": "true" },
|
296
|
-
...w && !S && !
|
297
|
-
...S && !w && !
|
298
|
-
...w && S && !
|
296
|
+
...w && !S && !r && { style: { paddingRight: re } },
|
297
|
+
...S && !w && !r && { style: { paddingLeft: $ } },
|
298
|
+
...w && S && !r && {
|
299
299
|
style: {
|
300
|
-
paddingRight:
|
300
|
+
paddingRight: re,
|
301
301
|
paddingLeft: $
|
302
302
|
}
|
303
303
|
},
|
@@ -308,22 +308,22 @@ const fe = "av-text-area", Re = "av-text-area-wrapper", le = "av-text-area-helpe
|
|
308
308
|
...G
|
309
309
|
}
|
310
310
|
),
|
311
|
-
!
|
311
|
+
!r && /* @__PURE__ */ a(
|
312
312
|
"label",
|
313
313
|
{
|
314
314
|
ref: U,
|
315
315
|
"aria-hidden": !0,
|
316
316
|
htmlFor: O,
|
317
|
-
className: `${
|
317
|
+
className: `${N.visibleLabel}`,
|
318
318
|
children: o
|
319
319
|
}
|
320
320
|
),
|
321
|
-
|
321
|
+
t && /* @__PURE__ */ a(
|
322
322
|
"div",
|
323
323
|
{
|
324
324
|
ref: ee,
|
325
325
|
id: `${O}-helper`,
|
326
|
-
className:
|
326
|
+
className: N.helperText,
|
327
327
|
children: y
|
328
328
|
}
|
329
329
|
),
|
@@ -331,7 +331,7 @@ const fe = "av-text-area", Re = "av-text-area-wrapper", le = "av-text-area-helpe
|
|
331
331
|
"div",
|
332
332
|
{
|
333
333
|
ref: J,
|
334
|
-
className:
|
334
|
+
className: N.rightElement,
|
335
335
|
children: w
|
336
336
|
}
|
337
337
|
),
|
@@ -421,17 +421,17 @@ const je = "av-toggle", Ye = ({ narrow: e }) => c(
|
|
421
421
|
je,
|
422
422
|
"relative flex cursor-pointer items-center",
|
423
423
|
e
|
424
|
-
),
|
424
|
+
), er = ({
|
425
425
|
mode: e,
|
426
426
|
focusMode: s,
|
427
427
|
labelHidden: o,
|
428
428
|
className: l,
|
429
|
-
noBorder:
|
429
|
+
noBorder: r,
|
430
430
|
narrow: n
|
431
431
|
}) => ({
|
432
432
|
toggle: c(
|
433
433
|
Ye({ narrow: n }),
|
434
|
-
Ke({ mode: e, noBorder:
|
434
|
+
Ke({ mode: e, noBorder: r }),
|
435
435
|
Xe({ focusMode: s }),
|
436
436
|
Je({ narrow: n }),
|
437
437
|
qe({ narrow: n })
|
@@ -444,14 +444,14 @@ const je = "av-toggle", Ye = ({ narrow: e }) => c(
|
|
444
444
|
onChange: s,
|
445
445
|
label: o,
|
446
446
|
labelHidden: l = !1,
|
447
|
-
name:
|
447
|
+
name: r,
|
448
448
|
mode: n = "system",
|
449
449
|
focusMode: d = "system",
|
450
450
|
className: h,
|
451
451
|
noBorder: x = !1,
|
452
452
|
narrow: k = !1
|
453
453
|
}) => {
|
454
|
-
const u =
|
454
|
+
const u = er({
|
455
455
|
mode: n,
|
456
456
|
focusMode: d,
|
457
457
|
labelHidden: l,
|
@@ -465,7 +465,7 @@ const je = "av-toggle", Ye = ({ narrow: e }) => c(
|
|
465
465
|
/* @__PURE__ */ a(
|
466
466
|
"input",
|
467
467
|
{
|
468
|
-
name:
|
468
|
+
name: r,
|
469
469
|
checked: e,
|
470
470
|
type: "checkbox",
|
471
471
|
className: u.input,
|
@@ -489,34 +489,31 @@ try {
|
|
489
489
|
});
|
490
490
|
} catch {
|
491
491
|
}
|
492
|
-
const
|
493
|
-
const { check: s } = xe();
|
494
|
-
return s(e);
|
495
|
-
}, nt = ({
|
492
|
+
const lr = ({
|
496
493
|
open: e,
|
497
494
|
onOpenChange: s
|
498
495
|
}) => {
|
499
|
-
const { getAccessToken: o, user: l } =
|
500
|
-
data:
|
496
|
+
const { getAccessToken: o, user: l } = xe(), {
|
497
|
+
data: r,
|
501
498
|
isSuccess: n,
|
502
499
|
refetch: d
|
503
|
-
} =
|
500
|
+
} = ke({
|
504
501
|
user: l?.username,
|
505
502
|
getAccessToken: o
|
506
503
|
}), [h, x] = f({
|
507
504
|
loadingLocation: !1
|
508
505
|
}), [k, u] = f({
|
509
506
|
prompts: []
|
510
|
-
}), [v, I] = f(""), [D, y] = f(""), [_, w] = f(!1), [S, z] = f(!1), [L, F] = f(!1), [G, X] = f(!1), [p, q] = f(null), [J, M] = f(!1), [K, C] = f(!1), H =
|
511
|
-
C(
|
512
|
-
}, U = (
|
513
|
-
w(
|
514
|
-
}, Z = (
|
515
|
-
H && z(
|
516
|
-
}, ee = (
|
517
|
-
X(
|
518
|
-
}, O = async (
|
519
|
-
|
507
|
+
}), [v, I] = f(""), [D, y] = f(""), [_, w] = f(!1), [S, z] = f(!1), [L, F] = f(!1), [G, X] = f(!1), [p, q] = f(null), [J, M] = f(!1), [K, C] = f(!1), H = Le(we.TOOL.MEMORIES), Q = (t) => {
|
508
|
+
C(t);
|
509
|
+
}, U = (t) => {
|
510
|
+
w(t);
|
511
|
+
}, Z = (t) => {
|
512
|
+
H && z(t);
|
513
|
+
}, ee = (t) => {
|
514
|
+
X(t);
|
515
|
+
}, O = async (t) => {
|
516
|
+
t.preventDefault();
|
520
517
|
try {
|
521
518
|
await ue({
|
522
519
|
accessToken: await o(),
|
@@ -525,32 +522,32 @@ const tt = (e) => {
|
|
525
522
|
user: l?.username,
|
526
523
|
instructions: v,
|
527
524
|
location: D,
|
528
|
-
provider:
|
525
|
+
provider: r?.provider,
|
529
526
|
tags: k.prompts,
|
530
527
|
sendOnEnter: _,
|
531
528
|
useMemory: S,
|
532
529
|
showDetails: K
|
533
530
|
}
|
534
|
-
}), G !== L && (await
|
531
|
+
}), G !== L && (await _e(G), F(G)), d(), x({
|
535
532
|
loadingLocation: !1
|
536
533
|
});
|
537
534
|
} catch {
|
538
535
|
}
|
539
|
-
},
|
536
|
+
}, re = async () => {
|
540
537
|
x({
|
541
538
|
loadingLocation: !0
|
542
539
|
}), y("...");
|
543
540
|
try {
|
544
|
-
const
|
541
|
+
const t = Date.now(), i = await Ie(), P = await ue({
|
545
542
|
accessToken: await o(),
|
546
543
|
type: me.GET_LOCATION,
|
547
544
|
params: {
|
548
545
|
latitude: i.latitude,
|
549
546
|
longitude: i.longitude
|
550
547
|
}
|
551
|
-
}), g = Date.now() -
|
552
|
-
if (g < 2e3 && await new Promise((
|
553
|
-
const { city:
|
548
|
+
}), g = Date.now() - t;
|
549
|
+
if (g < 2e3 && await new Promise((E) => setTimeout(E, 2e3 - g)), P.status === 200) {
|
550
|
+
const { city: E, state: T, country: A, displayName: j } = P.data, b = E && T && A ? `${E}, ${T}, ${A}` : j;
|
554
551
|
x({
|
555
552
|
loadingLocation: !1
|
556
553
|
}), y(b);
|
@@ -560,54 +557,54 @@ const tt = (e) => {
|
|
560
557
|
});
|
561
558
|
} catch {
|
562
559
|
}
|
563
|
-
},
|
560
|
+
}, te = () => {
|
564
561
|
d(), s(!1);
|
565
562
|
}, $ = ({
|
566
|
-
enabled:
|
563
|
+
enabled: t = !1,
|
567
564
|
privateChat: i = !1,
|
568
565
|
clipboardAccess: P = !1,
|
569
|
-
...
|
566
|
+
...N
|
570
567
|
}) => {
|
571
568
|
u((g) => {
|
572
|
-
const
|
573
|
-
...
|
574
|
-
enabled:
|
569
|
+
const E = g.prompts, T = {
|
570
|
+
...N,
|
571
|
+
enabled: t,
|
575
572
|
privateChat: i,
|
576
573
|
clipboardAccess: P
|
577
574
|
};
|
578
575
|
P ? T.content = T.content.replace(/{{clipboard}}/g, "") + " {{clipboard}}" : T.content = T.content.replace(/{{clipboard}}/g, "");
|
579
|
-
const A =
|
576
|
+
const A = E.findIndex((j) => j.slot === N.slot);
|
580
577
|
return A === -1 ? {
|
581
578
|
...g,
|
582
|
-
prompts: [...
|
583
|
-
} : (
|
579
|
+
prompts: [...E, { ...T }]
|
580
|
+
} : (E[A] = T, {
|
584
581
|
...g,
|
585
|
-
prompts: [...
|
582
|
+
prompts: [...E]
|
586
583
|
});
|
587
584
|
});
|
588
585
|
}, ae = Pe(async () => {
|
589
586
|
try {
|
590
587
|
M(!0);
|
591
|
-
const
|
592
|
-
q(
|
588
|
+
const t = await Ne();
|
589
|
+
q(t);
|
593
590
|
} catch {
|
594
591
|
} finally {
|
595
592
|
M(!1);
|
596
593
|
}
|
597
594
|
}, []);
|
598
595
|
return ne(() => {
|
599
|
-
if (!
|
596
|
+
if (!r)
|
600
597
|
return;
|
601
|
-
|
602
|
-
const
|
603
|
-
F(
|
604
|
-
}, [
|
598
|
+
r.instructions && I(r.instructions), r.location && y(r.location), r.tags && u({ prompts: r.tags }), r.sendOnEnter !== void 0 && w(r.sendOnEnter), r.useMemory !== void 0 && z(r.useMemory), r.showDetails !== void 0 && C(r.showDetails);
|
599
|
+
const t = Ee();
|
600
|
+
F(t), X(t);
|
601
|
+
}, [r]), ne(() => {
|
605
602
|
L ? ae() : q(null);
|
606
603
|
}, [L, ae]), n ? /* @__PURE__ */ m(
|
607
604
|
Me,
|
608
605
|
{
|
609
606
|
open: e,
|
610
|
-
onOpenChange:
|
607
|
+
onOpenChange: te,
|
611
608
|
title: Te,
|
612
609
|
animation: !0,
|
613
610
|
animationType: "fade",
|
@@ -625,7 +622,7 @@ const tt = (e) => {
|
|
625
622
|
variant: "secondary",
|
626
623
|
focusMode: "light",
|
627
624
|
noBorder: !0,
|
628
|
-
onClick:
|
625
|
+
onClick: te,
|
629
626
|
children: "Cancel"
|
630
627
|
}
|
631
628
|
) }),
|
@@ -634,8 +631,8 @@ const tt = (e) => {
|
|
634
631
|
{
|
635
632
|
mode: "dark",
|
636
633
|
focusMode: "light",
|
637
|
-
onClick: async (
|
638
|
-
s(!1), await O(
|
634
|
+
onClick: async (t) => {
|
635
|
+
s(!1), await O(t);
|
639
636
|
},
|
640
637
|
children: "Save"
|
641
638
|
}
|
@@ -714,8 +711,8 @@ const tt = (e) => {
|
|
714
711
|
name: "customInstructions",
|
715
712
|
label: "Custom Instructions",
|
716
713
|
value: v,
|
717
|
-
onChange: (
|
718
|
-
I(
|
714
|
+
onChange: (t) => {
|
715
|
+
I(t.target.value);
|
719
716
|
},
|
720
717
|
helperText: "Press ENTER to add a new line."
|
721
718
|
}
|
@@ -738,8 +735,8 @@ const tt = (e) => {
|
|
738
735
|
name: "location",
|
739
736
|
label: "Location",
|
740
737
|
value: D,
|
741
|
-
onChange: (
|
742
|
-
y(
|
738
|
+
onChange: (t) => {
|
739
|
+
y(t.target.value);
|
743
740
|
},
|
744
741
|
helperText: "Enter your location or press auto-detect."
|
745
742
|
}
|
@@ -752,7 +749,7 @@ const tt = (e) => {
|
|
752
749
|
noBorder: !0,
|
753
750
|
variant: "secondary",
|
754
751
|
disabled: h.loadingLocation,
|
755
|
-
onClick:
|
752
|
+
onClick: re,
|
756
753
|
children: h.loadingLocation ? "Detecting..." : "Auto-detect"
|
757
754
|
}
|
758
755
|
)
|
@@ -767,15 +764,15 @@ const tt = (e) => {
|
|
767
764
|
noBorder: !0,
|
768
765
|
children: [
|
769
766
|
/* @__PURE__ */ a("p", { className: "text-sm", children: Se }),
|
770
|
-
k.prompts && k.prompts.slice(0, 3).map((
|
767
|
+
k.prompts && k.prompts.slice(0, 3).map((t) => /* @__PURE__ */ m(
|
771
768
|
V,
|
772
769
|
{
|
773
770
|
mode: "dark",
|
774
771
|
noBorder: !0,
|
775
|
-
header:
|
772
|
+
header: t.label.replace("...", ""),
|
776
773
|
className: "prose-light mb-2",
|
777
774
|
children: [
|
778
|
-
/* @__PURE__ */ a("p", { className: "text-sm", children:
|
775
|
+
/* @__PURE__ */ a("p", { className: "text-sm", children: t.description }),
|
779
776
|
/* @__PURE__ */ a(
|
780
777
|
B,
|
781
778
|
{
|
@@ -785,14 +782,14 @@ const tt = (e) => {
|
|
785
782
|
className: "mt-2",
|
786
783
|
noBorder: !0,
|
787
784
|
label: "Enabled",
|
788
|
-
name:
|
785
|
+
name: t.slot.toString(),
|
789
786
|
onChange: (i) => {
|
790
787
|
$({
|
791
|
-
...
|
788
|
+
...t,
|
792
789
|
enabled: i
|
793
790
|
});
|
794
791
|
},
|
795
|
-
checked:
|
792
|
+
checked: t.enabled
|
796
793
|
}
|
797
794
|
),
|
798
795
|
/* @__PURE__ */ a(
|
@@ -804,14 +801,14 @@ const tt = (e) => {
|
|
804
801
|
className: "mt-2",
|
805
802
|
noBorder: !0,
|
806
803
|
label: "Private Chat",
|
807
|
-
name: `private-${
|
804
|
+
name: `private-${t.slot.toString()}`,
|
808
805
|
onChange: (i) => {
|
809
806
|
$({
|
810
|
-
...
|
807
|
+
...t,
|
811
808
|
privateChat: i
|
812
809
|
});
|
813
810
|
},
|
814
|
-
checked:
|
811
|
+
checked: t.privateChat
|
815
812
|
}
|
816
813
|
),
|
817
814
|
/* @__PURE__ */ a(
|
@@ -823,19 +820,19 @@ const tt = (e) => {
|
|
823
820
|
className: "mt-2",
|
824
821
|
noBorder: !0,
|
825
822
|
label: "Use Clipboard",
|
826
|
-
name: `clipboard-${
|
823
|
+
name: `clipboard-${t.slot.toString()}`,
|
827
824
|
onChange: (i) => {
|
828
825
|
$({
|
829
|
-
...
|
826
|
+
...t,
|
830
827
|
clipboardAccess: i
|
831
828
|
});
|
832
829
|
},
|
833
|
-
checked:
|
830
|
+
checked: t.clipboardAccess
|
834
831
|
}
|
835
832
|
)
|
836
833
|
]
|
837
834
|
},
|
838
|
-
`prompt-slot-${
|
835
|
+
`prompt-slot-${t.slot}`
|
839
836
|
))
|
840
837
|
]
|
841
838
|
}
|
@@ -870,7 +867,7 @@ const tt = (e) => {
|
|
870
867
|
"Total Items: ",
|
871
868
|
/* @__PURE__ */ a("strong", { children: p.totalItems })
|
872
869
|
] }),
|
873
|
-
p.caches.map((
|
870
|
+
p.caches.map((t) => /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a("ul", { className: "not-prose font-mono mt-2 list-none w-[95cqw]", children: t.urls.map((i) => /* @__PURE__ */ a(
|
874
871
|
"li",
|
875
872
|
{
|
876
873
|
className: "truncate text-xs text-copy-dark dark:text-copy-light overflow-hidden text-ellipsis",
|
@@ -878,7 +875,7 @@ const tt = (e) => {
|
|
878
875
|
children: new URL(i).pathname
|
879
876
|
},
|
880
877
|
i
|
881
|
-
)) }) },
|
878
|
+
)) }) }, t.name)),
|
882
879
|
p.totalItems === 0 && !J && /* @__PURE__ */ a("p", { className: "italic m-0 opacity-70", children: "No cached assets yet." })
|
883
880
|
] }) : /* @__PURE__ */ a("p", { className: "text-xs opacity-70 m-0", children: J ? "Loading cache info..." : "No cache info available." })
|
884
881
|
] })
|
@@ -890,5 +887,5 @@ const tt = (e) => {
|
|
890
887
|
) : null;
|
891
888
|
};
|
892
889
|
export {
|
893
|
-
|
890
|
+
lr as SettingsPanel
|
894
891
|
};
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
2
|
-
import { n as f, i as U, useUserChatStats as v, useChatsUsage as E, USAGE_TITLE as L, S as h, renderDataAsList as M, CARDS as n, L as _, j as D, C as m, pluralize as i } from "./index.
|
3
|
-
import { se as z } from "./App.
|
2
|
+
import { n as f, i as U, useUserChatStats as v, useChatsUsage as E, USAGE_TITLE as L, S as h, renderDataAsList as M, CARDS as n, L as _, j as D, C as m, pluralize as i } from "./index.DxRpe0Fx.js";
|
3
|
+
import { se as z } from "./App.P8VuaklL.js";
|
4
4
|
import { useState as O, Suspense as P, lazy as B } from "react";
|
5
5
|
const t = [0, 3, 6, 9], j = B(() => import(
|
6
6
|
/* webpackChunkName: "LazyChart" */
|
7
|
-
"./Chart.
|
7
|
+
"./Chart.v46ZrHpO.js"
|
8
8
|
)), b = ({
|
9
9
|
open: S,
|
10
10
|
onOpenChange: I
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { find as Aa, parse as Ft, parse$1 as Ht, normalize as Pt, html as Ta, svg as Ba, visitParents as Na, SKIP as Da } from "./useMarkdown.
|
2
|
-
import { toText as Ca } from "./index.
|
1
|
+
import { find as Aa, parse as Ft, parse$1 as Ht, normalize as Pt, html as Ta, svg as Ba, visitParents as Na, SKIP as Da } from "./useMarkdown.CrlE9bFj.js";
|
2
|
+
import { toText as Ca } from "./index.D6DtPtKF.js";
|
3
3
|
const Gt = /[#.]/g;
|
4
4
|
function qa(r, e) {
|
5
5
|
const t = r || "", a = {};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { convert as se, visitParents as Me, unicodeWhitespace as I, unicodePunctuation as N, normalizeIdentifier as _, classifyCharacter as W, visit as _e, toString as ce, EXIT as Oe, asciiAlphanumeric as Z, asciiAlpha as P, markdownLineEndingOrSpace as A, asciiControl as je, blankLine as Be, factorySpace as S, splice as q, resolveAll as We, markdownLineEnding as R, markdownSpace as T, combineExtensions as $e } from "./useMarkdown.
|
1
|
+
import { convert as se, visitParents as Me, unicodeWhitespace as I, unicodePunctuation as N, normalizeIdentifier as _, classifyCharacter as W, visit as _e, toString as ce, EXIT as Oe, asciiAlphanumeric as Z, asciiAlpha as P, markdownLineEndingOrSpace as A, asciiControl as je, blankLine as Be, factorySpace as S, splice as q, resolveAll as We, markdownLineEnding as R, markdownSpace as T, combineExtensions as $e } from "./useMarkdown.CrlE9bFj.js";
|
2
2
|
import { longestStreak as qe } from "./index.Cyw5OC0t.js";
|
3
3
|
function ne(e, n) {
|
4
4
|
const t = String(e);
|