@versini/sassysaint 8.66.0 → 8.67.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.
Files changed (26) hide show
  1. package/dist/chunks/{AboutChangelog.DpM88TD4.js → AboutChangelog.DIe60pNx.js} +2 -2
  2. package/dist/chunks/{AboutEntry.myjEE_YS.js → AboutEntry.CwjHkmmo.js} +5 -5
  3. package/dist/chunks/{App.D11WXiGv.js → App.xDkVdz2r.js} +2851 -2633
  4. package/dist/chunks/{Chart.C09_D0Js.js → Chart.C_S3pHhL.js} +2 -2
  5. package/dist/chunks/{ChatBubbleAssistant.4n93HLwe.js → ChatBubbleAssistant.oPctqH7W.js} +4 -4
  6. package/dist/chunks/{ChatBubbleUser.BA5mfRX3.js → ChatBubbleUser.CF29aC6J.js} +6 -6
  7. package/dist/chunks/{ChatHistoryTable.GOTm0B_0.js → ChatHistoryTable.tEsu-nWO.js} +13 -13
  8. package/dist/chunks/{HistoryEntry.DbFidH9-.js → HistoryEntry.Cblrrv7i.js} +15 -15
  9. package/dist/chunks/{ProfileEntry.CQn1T1HP.js → ProfileEntry.DgKbyrf4.js} +2 -2
  10. package/dist/chunks/SettingsEntry.DjmoCTSc.js +794 -0
  11. package/dist/chunks/{Table.BVEnC3sJ.js → Table.DFCnTm3f.js} +6 -6
  12. package/dist/chunks/{UsageEntry.CBS_lg8M.js → UsageEntry.B8_8sYED.js} +3 -3
  13. package/dist/chunks/{UserMemoriesPanel.CJWaZZty.js → UserMemoriesPanel.Cw2Pip7F.js} +3 -3
  14. package/dist/chunks/{index.Dcg8QQwK.js → index.8WU2TpiJ.js} +1 -1
  15. package/dist/chunks/{index.6qKz8JoC.js → index.CHPBYw8T.js} +1 -1
  16. package/dist/chunks/{index.CLaxLST5.js → index.DDjSHXwm.js} +3 -3
  17. package/dist/chunks/{index.CVG2GNQJ.js → index.DUjikZVH.js} +1 -1
  18. package/dist/chunks/{index.CytEb1Ff.js → index.Dihwt-5J.js} +2 -2
  19. package/dist/chunks/{index.DresqUv9.js → index.Du8ojwqo.js} +8 -8
  20. package/dist/chunks/{index.CaVPHC4s.js → index.fOvFohJk.js} +647 -615
  21. package/dist/chunks/{useMarkdown.BhytnMpG.js → useMarkdown.gHMb0AOV.js} +10 -10
  22. package/dist/components/SassySaint/SassySaint.js +1 -1
  23. package/dist/index.js +4 -4
  24. package/dist/style.css +2 -2
  25. package/package.json +5 -5
  26. package/dist/chunks/SettingsEntry.DOIpVprT.js +0 -776
@@ -1,776 +0,0 @@
1
- import { jsxs as u, jsx as r, Fragment as ue } from "react/jsx-runtime";
2
- import { o as Ee, h as me, i as Ne, x$1 as Te, n as we, useUserPreferences as ve, tt as he, getCacheInfo as Se, isServiceWorkerEnabled as Ce, SETTINGS_TITLE as Ie, S as H, CARDS as C, J as _e, C as le, PROMPTS_DESCRIPTION as Le, L as Re, j as pe, getCurrentGeoLocation as Ae, mutateCall as fe, handleServiceWorkerToggle as De, SERVICE_TYPES as ge } from "./index.CaVPHC4s.js";
3
- import { useCapability as ye, oe as Oe, O as I } from "./App.D11WXiGv.js";
4
- import Me, { useState as d, useEffect as ie, useRef as V, useLayoutEffect as J, useCallback as Be } from "react";
5
- import p from "clsx";
6
- function Pe({
7
- value: a,
8
- defaultValue: n,
9
- finalValue: o,
10
- onChange: s = () => {
11
- },
12
- initialControlledDelay: t = 0
13
- }) {
14
- const [l, m] = d(!1), [f, k] = d(
15
- n !== void 0 ? n : o
16
- ), N = (x) => {
17
- k(x), s?.(x);
18
- };
19
- return ie(() => {
20
- (async () => a !== void 0 && !l && t > 0 && (await new Promise(
21
- (x) => setTimeout(x, t)
22
- ), m(!0)))();
23
- }, [a, t, l]), a !== void 0 ? !l && t > 0 ? ["", s, !0] : [a, s, !0] : [f, N, !1];
24
- }
25
- const xe = "av-text-area", $e = "av-text-area-wrapper", ce = "av-text-area-helper-text", Ge = "av-text-area__control--right", Ue = "av-text-area__control--left", He = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hidden px-4 py-7", Ve = ({ mode: a }) => p({
26
- "bg-surface-darker text-copy-lighter caret-copy-light": a === "dark",
27
- "bg-surface-lighter text-copy-dark caret-copy-dark": a === "light",
28
- "bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": a === "system",
29
- "bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": a === "alt-system"
30
- }), We = ({
31
- focusMode: a
32
- }) => p("focus:outline focus:outline-2 focus:outline-offset-2", {
33
- "focus:outline-focus-dark": a === "dark",
34
- "focus:outline-focus-light": a === "light",
35
- "focus:outline-focus-light dark:focus:outline-focus-dark": a === "alt-system",
36
- "focus:outline-focus-dark dark:focus:outline-focus-light": a === "system"
37
- }), ze = ({
38
- noBorder: a,
39
- error: n
40
- }) => p("border-2", {
41
- "border-border-dark": !a && !n,
42
- "focus:border-border-dark": !a && n,
43
- "border-border-error-dark": !a && n,
44
- "border-transparent": a
45
- }), Fe = ({
46
- disabled: a,
47
- raw: n,
48
- error: o,
49
- mode: s,
50
- leftElement: t,
51
- rightElement: l
52
- }) => {
53
- if (n)
54
- return "";
55
- if (a)
56
- return p(
57
- "transform translate-y-0 scale-100 absolute px-2 cursor-not-allowed opacity-50 font-medium",
58
- {
59
- "translate-x-[10px]": l === !0 && !t || !l && !t
60
- }
61
- );
62
- if (!o)
63
- return p(
64
- "absolute px-2 cursor-text font-medium transform translate-y-0 scale-100",
65
- {
66
- "translate-x-[10px]": l === !0 && !t || !l && !t,
67
- "text-copy-medium": s === "dark",
68
- "text-copy-dark": s === "light",
69
- "text-copy-dark dark:text-copy-medium": s === "system",
70
- "text-copy-medium dark:text-copy-dark": s === "alt-system"
71
- }
72
- );
73
- if (o)
74
- return p(
75
- "absolute px-2 cursor-text font-medium transform translate-y-0 scale-100",
76
- {
77
- "translate-x-[10px]": l === !0 && !t || !l && !t,
78
- "text-copy-medium": s === "dark",
79
- "text-copy-error-dark": s === "light",
80
- "text-copy-error-dark dark:text-copy-error-light": s === "system",
81
- "text-copy-medium dark:text-copy-error-dark": s === "alt-system"
82
- }
83
- );
84
- }, je = ({
85
- error: a,
86
- raw: n,
87
- mode: o,
88
- disabled: s
89
- }) => {
90
- if (n)
91
- return "";
92
- if (s)
93
- return p(
94
- ce,
95
- "absolute px-2 cursor-not-allowed opacity-50 font-medium"
96
- );
97
- if (!a)
98
- return p(ce, "absolute px-2 font-medium", {
99
- "text-copy-medium": o === "dark",
100
- "text-copy-dark": o === "light",
101
- "text-copy-dark dark:text-copy-medium": o === "system",
102
- "text-copy-medium dark:text-copy-dark": o === "alt-system"
103
- });
104
- if (a)
105
- return p(ce, "absolute px-2 font-medium", {
106
- "text-copy-error-light": o === "dark",
107
- "text-copy-error-dark": o === "light",
108
- "text-copy-error-dark dark:text-copy-error-light": o === "system",
109
- "dark:text-copy-error-dark text-copy-error-light": o === "alt-system"
110
- });
111
- }, Xe = ({
112
- className: a,
113
- textAreaClassName: n,
114
- raw: o,
115
- focusMode: s,
116
- disabled: t,
117
- noBorder: l,
118
- error: m,
119
- mode: f,
120
- leftElement: k,
121
- rightElement: N
122
- }) => {
123
- const x = o ? a : p(
124
- "relative flex w-full flex-col justify-center",
125
- $e,
126
- a
127
- ), _ = o ? p(n) : p(
128
- xe,
129
- n,
130
- He(),
131
- Ve({ mode: f }),
132
- We({ focusMode: s }),
133
- ze({
134
- noBorder: l,
135
- error: m
136
- }),
137
- {
138
- "disabled:cursor-not-allowed disabled:opacity-50": t
139
- }
140
- ), B = o ? void 0 : "sr-only", P = Fe({
141
- disabled: t,
142
- raw: o,
143
- error: m,
144
- mode: f,
145
- rightElement: N,
146
- leftElement: k
147
- }), h = je({
148
- error: m,
149
- raw: o,
150
- mode: f,
151
- disabled: t
152
- }), v = o ? void 0 : p(Ge, "absolute"), b = o ? void 0 : p(Ue, "absolute");
153
- return {
154
- wrapper: x,
155
- textArea: _,
156
- accessibleLabel: B,
157
- visibleLabel: P,
158
- helperText: h,
159
- rightElement: v,
160
- leftElement: b
161
- };
162
- }, Ye = ({
163
- scrollHeight: a,
164
- currentHeight: n,
165
- currentLabelOffset: o = 0,
166
- currentHelperTextOffset: s = 0
167
- }) => {
168
- let t, l;
169
- if (a > 0 && a !== n) {
170
- const m = a - n, f = Math.abs(m / 24);
171
- t = o + -1 * Math.sign(m) * (12 * f), l = s + Math.sign(m) * (12 * f);
172
- }
173
- return {
174
- labelOffset: t,
175
- helperTextOffset: l,
176
- scrollHeight: a
177
- };
178
- }, de = Me.forwardRef(
179
- ({
180
- id: a,
181
- name: n,
182
- label: o,
183
- error: s = !1,
184
- raw: t = !1,
185
- className: l,
186
- textAreaClassName: m,
187
- mode: f = "system",
188
- focusMode: k = "system",
189
- value: N,
190
- defaultValue: x,
191
- disabled: _ = !1,
192
- noBorder: B = !1,
193
- labelId: P,
194
- helperText: h = "",
195
- helperTextOnFocus: v = !1,
196
- rightElement: b,
197
- leftElement: T,
198
- onChange: W,
199
- onFocus: L,
200
- onBlur: z,
201
- ...$
202
- }, K) => {
203
- const y = V(null), Q = Ee([K, y]), [R, A] = me(), [Z, w] = me(), G = V(80), F = V(-25), D = V(null), j = V(30), ee = V(null), O = Ne({ id: a, prefix: `${xe}-` }), [te, ae] = d(0), [re, oe] = d(0), [se, X] = d(
204
- !!(!v && h)
205
- ), Y = `${n} error, ${h}`, E = Xe({
206
- className: l,
207
- textAreaClassName: m,
208
- error: s,
209
- raw: t,
210
- focusMode: k,
211
- disabled: _,
212
- noBorder: B,
213
- mode: f,
214
- rightElement: !!b,
215
- leftElement: !!T
216
- }), [e, i] = Pe({
217
- value: N,
218
- initialControlledDelay: 20,
219
- defaultValue: x,
220
- onChange: (c) => {
221
- W && W({
222
- target: {
223
- value: c
224
- }
225
- });
226
- }
227
- }), U = (c) => {
228
- i(c.target.value);
229
- }, q = (c) => {
230
- v && h && X(!0), L && L(c);
231
- }, S = (c) => {
232
- v && h && !e && X(!1), z && z(c);
233
- };
234
- return J(() => {
235
- A && A.width && ae(A.width + 18 + 10);
236
- }, [A]), J(() => {
237
- w && w.width && oe(w.width + 18 + 10);
238
- }, [w]), J(() => {
239
- t || y && y.current && e !== void 0 && (y.current.style.height = "inherit", y.current.style.height = y.current.scrollHeight + "px");
240
- }, [e, t]), J(() => {
241
- t || setTimeout(() => {
242
- D?.current?.style.setProperty(
243
- "--av-text-area-wrapper-transition",
244
- e ? "none" : "all 0.2s ease-out"
245
- );
246
- }, 0);
247
- }, [e, t]), J(() => {
248
- if (!t && y && y.current && e !== void 0) {
249
- const { labelOffset: c, helperTextOffset: g, scrollHeight: M } = Ye({
250
- scrollHeight: y.current.scrollHeight,
251
- currentHeight: G.current,
252
- currentLabelOffset: F.current,
253
- currentHelperTextOffset: j.current
254
- });
255
- c && (F.current = c, D?.current?.style.setProperty(
256
- "--av-text-area-label",
257
- `${c}px`
258
- )), g && (j.current = g, ee?.current?.style.setProperty(
259
- "--av-text-area-helper-text",
260
- `${g}px`
261
- )), G.current = M || G.current;
262
- }
263
- }, [e, t]), w.width > 0 && D?.current?.style.setProperty(
264
- "--tw-translate-x",
265
- `${12 + w.width + 5}px`
266
- ), /* @__PURE__ */ u("div", { className: E.wrapper, children: [
267
- /* @__PURE__ */ r(
268
- "label",
269
- {
270
- htmlFor: O,
271
- id: P,
272
- className: E.accessibleLabel,
273
- children: o
274
- }
275
- ),
276
- T && /* @__PURE__ */ r(
277
- "div",
278
- {
279
- ref: Z,
280
- className: E.leftElement,
281
- children: T
282
- }
283
- ),
284
- /* @__PURE__ */ r(
285
- "textarea",
286
- {
287
- ref: Q,
288
- id: O,
289
- name: n,
290
- disabled: _,
291
- placeholder: t ? void 0 : " ",
292
- className: E.textArea,
293
- rows: 1,
294
- ...h && { "aria-describedby": `${O}-helper` },
295
- ...s && { "aria-invalid": "true" },
296
- ...b && !T && !t && { style: { paddingRight: te } },
297
- ...T && !b && !t && { style: { paddingLeft: re } },
298
- ...b && T && !t && {
299
- style: {
300
- paddingRight: te,
301
- paddingLeft: re
302
- }
303
- },
304
- value: e,
305
- onChange: U,
306
- onFocus: q,
307
- onBlur: S,
308
- ...$
309
- }
310
- ),
311
- !t && /* @__PURE__ */ r(
312
- "label",
313
- {
314
- ref: D,
315
- "aria-hidden": !0,
316
- htmlFor: O,
317
- className: `${E.visibleLabel}`,
318
- children: o
319
- }
320
- ),
321
- se && /* @__PURE__ */ r(
322
- "div",
323
- {
324
- ref: ee,
325
- id: `${O}-helper`,
326
- className: E.helperText,
327
- children: h
328
- }
329
- ),
330
- b && /* @__PURE__ */ r(
331
- "div",
332
- {
333
- ref: R,
334
- className: E.rightElement,
335
- children: b
336
- }
337
- ),
338
- s && h && /* @__PURE__ */ r(Te, { politeness: "polite", clearAnnouncementDelay: 500, children: Y })
339
- ] });
340
- }
341
- );
342
- de.displayName = "TextArea";
343
- /*!
344
- @versini/ui-textarea v5.0.3
345
- © 2025 gizmette.com
346
- */
347
- try {
348
- window.__VERSINI_UI_TEXTAREA__ || (window.__VERSINI_UI_TEXTAREA__ = {
349
- version: "5.0.3",
350
- buildTime: "10/17/2025 12:52 PM EDT",
351
- homepage: "https://github.com/aversini/ui-components",
352
- license: "MIT"
353
- });
354
- } catch {
355
- }
356
- const et = ({
357
- open: a,
358
- onOpenChange: n
359
- }) => {
360
- const { getAccessToken: o, user: s } = we(), {
361
- data: t,
362
- isSuccess: l,
363
- refetch: m
364
- } = ve({
365
- user: s?.username,
366
- getAccessToken: o
367
- }), [f, k] = d({
368
- loadingLocation: !1
369
- }), [N, x] = d({
370
- prompts: []
371
- }), [_, B] = d(""), [P, h] = d(""), [v, b] = d(!1), [T, W] = d(!1), [L, z] = d(!1), [$, K] = d(!1), [y, Q] = d(!1), [R, A] = d(null), [Z, w] = d(!1), [G, F] = d(!1), D = ye(he.TOOL.MEMORIES), j = ye(he.ADDON.REASONING), ee = (e) => {
372
- F(e);
373
- }, O = (e) => {
374
- b(e);
375
- }, te = (e) => {
376
- D && W(e);
377
- }, ae = (e) => {
378
- K(e);
379
- }, re = (e) => {
380
- j && Q(e);
381
- }, oe = async (e) => {
382
- e.preventDefault();
383
- try {
384
- await fe({
385
- accessToken: await o(),
386
- type: ge.SET_USER_PREFERENCES,
387
- params: {
388
- user: s?.username,
389
- instructions: _,
390
- location: P,
391
- provider: t?.provider,
392
- tags: N.prompts,
393
- sendOnEnter: v,
394
- useMemory: T,
395
- showDetails: G,
396
- showReasoningButton: y
397
- }
398
- }), $ !== L && (await De($), z($)), m(), k({
399
- loadingLocation: !1
400
- });
401
- } catch {
402
- }
403
- }, se = async () => {
404
- k({
405
- loadingLocation: !0
406
- }), h("...");
407
- try {
408
- const e = Date.now(), i = await Ae(), U = await fe({
409
- accessToken: await o(),
410
- type: ge.GET_LOCATION,
411
- params: {
412
- latitude: i.latitude,
413
- longitude: i.longitude
414
- }
415
- }), S = Date.now() - e;
416
- S < 2e3 && await new Promise((ke) => setTimeout(ke, 2e3 - S));
417
- const { city: c, state: g, country: M, displayName: ne } = U.data, be = c && g && M ? `${c}, ${g}, ${M}` : ne;
418
- k({
419
- loadingLocation: !1
420
- }), h(be);
421
- } catch {
422
- k({
423
- loadingLocation: !1
424
- });
425
- }
426
- }, X = () => {
427
- m(), n(!1);
428
- }, Y = ({
429
- enabled: e = !1,
430
- privateChat: i = !1,
431
- clipboardAccess: U = !1,
432
- ...q
433
- }) => {
434
- x((S) => {
435
- const c = S.prompts, g = {
436
- ...q,
437
- enabled: e,
438
- privateChat: i,
439
- clipboardAccess: U
440
- };
441
- U ? g.content = g.content.replace(/{{clipboard}}/g, "") + " {{clipboard}}" : g.content = g.content.replace(/{{clipboard}}/g, "");
442
- const M = c.findIndex((ne) => ne.slot === q.slot);
443
- return M === -1 ? {
444
- ...S,
445
- prompts: [...c, { ...g }]
446
- } : (c[M] = g, {
447
- ...S,
448
- prompts: [...c]
449
- });
450
- });
451
- }, E = Be(async () => {
452
- try {
453
- w(!0);
454
- const e = await Se();
455
- A(e);
456
- } catch {
457
- } finally {
458
- w(!1);
459
- }
460
- }, []);
461
- return ie(() => {
462
- if (!t)
463
- return;
464
- t.instructions && B(t.instructions), t.location && h(t.location), t.tags && x({ prompts: t.tags }), t.sendOnEnter !== void 0 && b(t.sendOnEnter), t.useMemory !== void 0 && W(t.useMemory), t.showDetails !== void 0 && F(t.showDetails), t.showReasoningButton !== void 0 && Q(t.showReasoningButton);
465
- const e = Ce();
466
- z(e), K(e);
467
- }, [t]), ie(() => {
468
- L ? E() : A(null);
469
- }, [L, E]), l ? /* @__PURE__ */ u(
470
- Oe,
471
- {
472
- open: a,
473
- onOpenChange: X,
474
- title: Ie,
475
- animation: !0,
476
- animationType: "fade",
477
- footer: /* @__PURE__ */ u(
478
- Re,
479
- {
480
- columnGap: 2,
481
- alignHorizontal: "flex-end",
482
- className: "pb-8 sm:pb-0",
483
- children: [
484
- /* @__PURE__ */ r(pe, { children: /* @__PURE__ */ r(
485
- le,
486
- {
487
- mode: "dark",
488
- variant: "secondary",
489
- focusMode: "light",
490
- noBorder: !0,
491
- onClick: X,
492
- children: "Cancel"
493
- }
494
- ) }),
495
- /* @__PURE__ */ r(pe, { children: /* @__PURE__ */ r(
496
- le,
497
- {
498
- mode: "dark",
499
- focusMode: "light",
500
- onClick: async (e) => {
501
- n(!1), await oe(e);
502
- },
503
- children: "Save"
504
- }
505
- ) })
506
- ]
507
- }
508
- ),
509
- children: [
510
- /* @__PURE__ */ u(
511
- H,
512
- {
513
- header: C.SETTINGS_DETAILS.TITLE,
514
- className: "prose-dark dark:prose-lighter",
515
- noBorder: !0,
516
- children: [
517
- /* @__PURE__ */ r("p", { className: "text-sm", children: C.SETTINGS_DETAILS.DETAILS }),
518
- /* @__PURE__ */ r(
519
- I,
520
- {
521
- noBorder: !0,
522
- narrow: !0,
523
- className: "mt-2",
524
- label: "Show Message Statistics",
525
- name: "show-message-statistics",
526
- onChange: ee,
527
- checked: G
528
- }
529
- ),
530
- /* @__PURE__ */ r("p", { className: "text-sm mt-5", children: C.SETTINGS_DETAILS.SEND_ON_ENTER }),
531
- /* @__PURE__ */ r(
532
- I,
533
- {
534
- noBorder: !0,
535
- narrow: !0,
536
- className: "mt-2",
537
- label: "Send Message on Enter",
538
- name: "send-message-on-enter",
539
- onChange: O,
540
- checked: v
541
- }
542
- ),
543
- D && /* @__PURE__ */ u(ue, { children: [
544
- /* @__PURE__ */ r("p", { className: "text-sm mt-5", children: C.SETTINGS_DETAILS.USE_MEMORY }),
545
- /* @__PURE__ */ r(
546
- I,
547
- {
548
- noBorder: !0,
549
- narrow: !0,
550
- className: "mt-2",
551
- label: "Use Memory",
552
- name: "use-memory",
553
- onChange: te,
554
- checked: T
555
- }
556
- )
557
- ] })
558
- ]
559
- }
560
- ),
561
- /* @__PURE__ */ u(
562
- H,
563
- {
564
- header: "Custom Instructions",
565
- className: "prose-dark dark:prose-lighter mt-4",
566
- noBorder: !0,
567
- children: [
568
- /* @__PURE__ */ u("p", { className: "text-sm", children: [
569
- "What would you like ",
570
- /* @__PURE__ */ r("em", { children: _e }),
571
- " to know about you to provide better responses?"
572
- ] }),
573
- /* @__PURE__ */ r(
574
- de,
575
- {
576
- mode: "alt-system",
577
- autoCapitalize: "off",
578
- autoComplete: "off",
579
- autoCorrect: "off",
580
- name: "customInstructions",
581
- label: "Custom Instructions",
582
- value: _,
583
- onChange: (e) => {
584
- B(e.target.value);
585
- },
586
- helperText: "Press ENTER to add a new line."
587
- }
588
- )
589
- ]
590
- }
591
- ),
592
- /* @__PURE__ */ u(
593
- H,
594
- {
595
- header: "Location",
596
- className: "prose-dark dark:prose-lighter mt-4",
597
- noBorder: !0,
598
- children: [
599
- /* @__PURE__ */ r("p", { className: "text-sm", children: "You can share your location to receive customized responses based on your area." }),
600
- /* @__PURE__ */ r(
601
- de,
602
- {
603
- mode: "alt-system",
604
- name: "location",
605
- label: "Location",
606
- value: P,
607
- onChange: (e) => {
608
- h(e.target.value);
609
- },
610
- helperText: "Enter your location or press auto-detect."
611
- }
612
- ),
613
- /* @__PURE__ */ r(
614
- le,
615
- {
616
- className: "mt-2",
617
- size: "small",
618
- noBorder: !0,
619
- variant: "secondary",
620
- disabled: f.loadingLocation,
621
- onClick: se,
622
- children: f.loadingLocation ? "Detecting..." : "Auto-detect"
623
- }
624
- )
625
- ]
626
- }
627
- ),
628
- /* @__PURE__ */ u(
629
- H,
630
- {
631
- header: C.SETTINGS_PROMPTS.TITLE,
632
- className: "prose-dark dark:prose-lighter mt-4",
633
- noBorder: !0,
634
- children: [
635
- /* @__PURE__ */ r("p", { className: "text-sm", children: Le }),
636
- N.prompts && N.prompts.slice(0, 3).map((e) => /* @__PURE__ */ u(
637
- H,
638
- {
639
- mode: "dark",
640
- noBorder: !0,
641
- header: e.label.replace("...", ""),
642
- className: "prose-light mb-2",
643
- children: [
644
- /* @__PURE__ */ r("p", { className: "text-sm", children: e.description }),
645
- /* @__PURE__ */ r(
646
- I,
647
- {
648
- noBorder: !0,
649
- narrow: !0,
650
- mode: "dark",
651
- focusMode: "light",
652
- className: "mt-2",
653
- label: "Enabled",
654
- name: e.slot.toString(),
655
- onChange: (i) => {
656
- Y({
657
- ...e,
658
- enabled: i
659
- });
660
- },
661
- checked: e.enabled
662
- }
663
- ),
664
- /* @__PURE__ */ r(
665
- I,
666
- {
667
- noBorder: !0,
668
- narrow: !0,
669
- mode: "dark",
670
- focusMode: "light",
671
- className: "mt-2",
672
- label: "Private Chat",
673
- name: `private-${e.slot.toString()}`,
674
- onChange: (i) => {
675
- Y({
676
- ...e,
677
- privateChat: i
678
- });
679
- },
680
- checked: e.privateChat
681
- }
682
- ),
683
- /* @__PURE__ */ r(
684
- I,
685
- {
686
- noBorder: !0,
687
- narrow: !0,
688
- mode: "dark",
689
- focusMode: "light",
690
- className: "mt-2",
691
- label: "Use Clipboard",
692
- name: `clipboard-${e.slot.toString()}`,
693
- onChange: (i) => {
694
- Y({
695
- ...e,
696
- clipboardAccess: i
697
- });
698
- },
699
- checked: e.clipboardAccess
700
- }
701
- )
702
- ]
703
- },
704
- `prompt-slot-${e.slot}`
705
- ))
706
- ]
707
- }
708
- ),
709
- /* @__PURE__ */ u(
710
- H,
711
- {
712
- header: C.SETTINGS_ADVANCED.TITLE,
713
- className: "prose-dark dark:prose-lighter mt-4 ",
714
- noBorder: !0,
715
- children: [
716
- j && /* @__PURE__ */ u(ue, { children: [
717
- /* @__PURE__ */ r("p", { className: "text-sm", children: C.SETTINGS_ADVANCED.REASONING_BUTTON_DESCRIPTION }),
718
- /* @__PURE__ */ r(
719
- I,
720
- {
721
- noBorder: !0,
722
- narrow: !0,
723
- className: "mt-2",
724
- label: "Show Reasoning Button",
725
- name: "show-reasoning-button",
726
- onChange: re,
727
- checked: y
728
- }
729
- )
730
- ] }),
731
- /* @__PURE__ */ r("p", { className: "text-sm mt-5", children: C.SETTINGS_ADVANCED.CACHE_DESCRIPTION }),
732
- /* @__PURE__ */ r(
733
- I,
734
- {
735
- noBorder: !0,
736
- narrow: !0,
737
- className: "mt-2",
738
- label: "Enable Assets Caching",
739
- name: "enable-service-worker",
740
- onChange: ae,
741
- checked: $
742
- }
743
- ),
744
- L && /* @__PURE__ */ u("div", { className: "mt-4 p-3 border border-dashed border-neutral-700 dark:border-neutral-400 rounded @container/optimizations", children: [
745
- /* @__PURE__ */ r("h3", { className: "m-0 mb-2 text-xs uppercase opacity-70", children: "Cache Info" }),
746
- R ? /* @__PURE__ */ u("div", { className: "text-xs space-y-2", children: [
747
- /* @__PURE__ */ u("p", { className: "m-0", children: [
748
- "Version: ",
749
- /* @__PURE__ */ r("strong", { children: R.version })
750
- ] }),
751
- /* @__PURE__ */ u("p", { className: "m-0", children: [
752
- "Total Items: ",
753
- /* @__PURE__ */ r("strong", { children: R.totalItems })
754
- ] }),
755
- R.caches.map((e) => /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r("ul", { className: "not-prose font-mono mt-2 list-none w-[95cqw]", children: e.urls.map((i) => /* @__PURE__ */ r(
756
- "li",
757
- {
758
- className: "truncate text-xs text-copy-dark dark:text-copy-light overflow-hidden text-ellipsis",
759
- title: i,
760
- children: new URL(i).pathname
761
- },
762
- i
763
- )) }) }, e.name)),
764
- R.totalItems === 0 && !Z && /* @__PURE__ */ r("p", { className: "italic m-0 opacity-70", children: "No cached assets yet." })
765
- ] }) : /* @__PURE__ */ r("p", { className: "text-xs opacity-70 m-0", children: Z ? "Loading cache info..." : "No cache info available." })
766
- ] })
767
- ]
768
- }
769
- )
770
- ]
771
- }
772
- ) : null;
773
- };
774
- export {
775
- et as SettingsPanel
776
- };