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