@versini/sassysaint 8.76.0 → 8.76.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 (34) hide show
  1. package/dist/chunks/{AboutChangelog.0kKcS_nT.js → AboutChangelog.Bi_-dpeZ.js} +10 -9
  2. package/dist/chunks/{AboutEntry.pKgicvGA.js → AboutEntry.CTwezLPC.js} +11 -11
  3. package/dist/chunks/App.CV0Bjlae.js +9011 -0
  4. package/dist/chunks/{Chart.DD1RkG8X.js → Chart.uzxgAiX2.js} +2 -2
  5. package/dist/chunks/{ChatBubbleAssistant.K55U7Bno.js → ChatBubbleAssistant.BVlp2GoO.js} +8 -8
  6. package/dist/chunks/ChatBubbleUser.BrWZttfQ.js +130 -0
  7. package/dist/chunks/ChatHistoryTable.uFTyBF2A.js +236 -0
  8. package/dist/chunks/HistoryEntry.ThaD-b5r.js +307 -0
  9. package/dist/chunks/{ProfileEntry.Bb-kLfDX.js → ProfileEntry.CyBWFkHS.js} +26 -26
  10. package/dist/chunks/{SettingsEntry.DrmBVh-w.js → SettingsEntry.QaYvHkdk.js} +39 -39
  11. package/dist/chunks/Table.Ckql2SnG.js +359 -0
  12. package/dist/chunks/{UsageEntry.O3YdUF30.js → UsageEntry.CDzDYeHf.js} +19 -19
  13. package/dist/chunks/{UserMemoriesPanel.Dl5GlyBr.js → UserMemoriesPanel.B6egCowo.js} +184 -210
  14. package/dist/chunks/{index.DUl-LwyU.js → index.A4p6x5_T.js} +1 -1
  15. package/dist/chunks/index.BXdpJpQs.js +266 -0
  16. package/dist/chunks/{index.B9mUNJfd.js → index.BdPmgM6G.js} +1 -1
  17. package/dist/chunks/index.C3aZ0rB_.js +142 -0
  18. package/dist/chunks/{index.DGkW9g6n.js → index.C4Rma01G.js} +3 -3
  19. package/dist/chunks/{index.BeIiCAAq.js → index.C6T0AZQ_.js} +2 -2
  20. package/dist/chunks/{index.DEKgWsou.js → index.CgUGA3LA.js} +1 -1
  21. package/dist/chunks/index.rzw7MU5J.js +7894 -0
  22. package/dist/chunks/{useMarkdown.Bf7wGKkC.js → useMarkdown.B4NWSGJz.js} +2004 -2130
  23. package/dist/components/SassySaint/SassySaint.js +1 -1
  24. package/dist/index.js +4 -4
  25. package/dist/style.css +2 -2
  26. package/package.json +5 -5
  27. package/dist/chunks/App.CtFpHv2O.js +0 -10007
  28. package/dist/chunks/ChatBubbleUser.DsX56Kxx.js +0 -128
  29. package/dist/chunks/ChatHistoryTable.BvEUTjiq.js +0 -288
  30. package/dist/chunks/HistoryEntry.BSOPWYO2.js +0 -333
  31. package/dist/chunks/Table.BbIvEnBz.js +0 -456
  32. package/dist/chunks/index.BNusLsEn.js +0 -357
  33. package/dist/chunks/index.Czv_1MTM.js +0 -7203
  34. package/dist/chunks/index.icjUE8II.js +0 -249
@@ -0,0 +1,307 @@
1
+ import { jsxs as i, Fragment as ee, jsx as r } from "react/jsx-runtime";
2
+ import { n as G, INFINITE_SCROLL_LIMIT as P, INFINITE_SCROLL_THRESHOLD as te, useLocalStorage as f, LOCAL_STORAGE_PREFIX as p, LOCAL_STORAGE_SORT_TIMESTAMP as re, LOCAL_STORAGE_SORT_TOKEN_USAGE as ae, LOCAL_STORAGE_SORT as se, f as v, useUserPreferences as oe, useDeleteChat as ne, useToggleFavoriteChat as ie, APP_CLASSNAME as ce, TOAST_CHAT_DELETED as le, graphQLRequest as de, SERVICE_TYPES as he, setNewProvider as me, ACTION_SORT as ue, h as Ce, TOAST_PROVIDER_CHANGED as Se, useChatsHistory as fe, LOCAL_STORAGE_SEARCH as pe, LOCAL_STORAGE_FAVORITES_ONLY as Te, HISTORY_TITLE as ye, Card as ge, TextInput as Ae, debounce as Ee, IconSearch as ve, Button as _e, ACTION_SEARCH as De } from "./index.rzw7MU5J.js";
3
+ import { HistoryContext as z, ChatContext as M, useAiChat as Oe, e as h, ConfirmationPanel as Re, LazyToastContainerWrapper as Ie, showErrorToast as Le, CHAT_SET_PROVIDER as ke, showSuccessToast as be, CHAT_SET_STATUS as Ne, Panel as we, Toggle as xe } from "./App.CV0Bjlae.js";
4
+ import { useRef as w, useState as x, useContext as _, useCallback as V, Suspense as He, lazy as Fe, useEffect as Pe } from "react";
5
+ const Ve = Fe(
6
+ () => import(
7
+ /* webpackChunkName: "history-table" */
8
+ "./ChatHistoryTable.uFTyBF2A.js"
9
+ ).then((m) => ({ default: m.ChatHistoryTable }))
10
+ ), Ge = ({
11
+ filteredHistory: m,
12
+ dispatch: C,
13
+ onOpenChange: D,
14
+ mutate: T,
15
+ isLoading: O = !1
16
+ }) => {
17
+ const { user: u, getAccessToken: l } = G(), c = w(null), s = w({
18
+ id: "",
19
+ timestamp: "",
20
+ message: ""
21
+ }), [y, d] = x(!1), [R, I] = x(
22
+ P + te
23
+ ), { state: n, dispatch: L } = _(z), S = {
24
+ searchString: n.searchString || "",
25
+ sortDirection: n.sortDirection || h.DESC,
26
+ sortedCell: n.sortedCell || v
27
+ }, {
28
+ state: { provider: k },
29
+ setChatId: g,
30
+ setInitialMessages: b
31
+ } = _(M), { setInput: N } = Oe(), [A, a] = f({
32
+ key: p + re,
33
+ initialValue: h.DESC
34
+ }), [U, B] = f({
35
+ key: p + ae,
36
+ initialValue: h.ASC
37
+ }), [, j] = f({
38
+ key: p + se,
39
+ initialValue: v
40
+ }), { refetch: Y } = oe({
41
+ user: u?.username,
42
+ getAccessToken: l
43
+ }), { mutateAsync: $ } = ne({ getAccessToken: l }), { mutateAsync: q } = ie({
44
+ getAccessToken: l
45
+ }), K = (e) => {
46
+ const o = n.sortedCell === e;
47
+ let t, E;
48
+ switch (e) {
49
+ case v:
50
+ E = a, t = o ? n.sortDirection : A;
51
+ break;
52
+ case Ce:
53
+ E = B, t = o ? n.sortDirection : U;
54
+ break;
55
+ default:
56
+ E = a, t = o ? n.sortDirection : A;
57
+ break;
58
+ }
59
+ const F = t === h.ASC ? h.DESC : h.ASC;
60
+ E(F), j(e), L({
61
+ type: ue,
62
+ payload: {
63
+ sortedCell: e,
64
+ sortDirection: F
65
+ }
66
+ });
67
+ }, Q = async () => {
68
+ const e = s.current;
69
+ try {
70
+ await $({
71
+ userId: u?.username || "",
72
+ id: e.id
73
+ }), T(""), await Le(le, {
74
+ autoClose: 2e3,
75
+ containerId: "history-table"
76
+ });
77
+ } catch {
78
+ }
79
+ }, W = async (e) => {
80
+ try {
81
+ const o = await l(), t = await de({
82
+ accessToken: o,
83
+ type: he.GET_CHAT,
84
+ params: {
85
+ id: e.id
86
+ }
87
+ });
88
+ t.data.provider !== k && (await me({
89
+ provider: t.data.provider,
90
+ model: t.data.model,
91
+ accessToken: o,
92
+ username: u?.username || ""
93
+ }), C({
94
+ type: ke,
95
+ payload: {
96
+ provider: t.data.provider
97
+ }
98
+ }), Y(), await be(
99
+ `${Se} ${t.data.provider}`,
100
+ {
101
+ containerId: "toggle-provider"
102
+ }
103
+ )), C({
104
+ type: Ne,
105
+ payload: {
106
+ restoring: !0,
107
+ restoredModel: t.data?.model || "",
108
+ restoredUsage: t.data?.tokenUsage || 0
109
+ }
110
+ }), N(""), g(e.id), b(t.data.messages), D(!1);
111
+ } catch {
112
+ }
113
+ }, X = (e) => {
114
+ s.current = {
115
+ id: e.id,
116
+ timestamp: e.timestamp,
117
+ message: e.messages.length > 0 ? e.messages[0]?.content : ""
118
+ }, d(!y);
119
+ }, J = async (e) => {
120
+ try {
121
+ await q({
122
+ userId: u?.username || "",
123
+ id: e.id
124
+ }), T("");
125
+ } catch {
126
+ }
127
+ }, H = V((e) => {
128
+ e[0].isIntersecting && I((t) => t + P);
129
+ }, []), Z = V(
130
+ (e) => {
131
+ if (c.current && c.current.disconnect(), e) {
132
+ const o = {
133
+ rootMargin: "20px"
134
+ }, t = new IntersectionObserver(H, o);
135
+ t.observe(e), c.current = t;
136
+ }
137
+ },
138
+ [H]
139
+ );
140
+ return /* @__PURE__ */ i(ee, { children: [
141
+ /* @__PURE__ */ i(
142
+ Re,
143
+ {
144
+ showConfirmation: y,
145
+ setShowConfirmation: d,
146
+ action: Q,
147
+ customStrings: {
148
+ confirmAction: "Delete",
149
+ cancelAction: "Cancel",
150
+ title: "Delete chat"
151
+ },
152
+ children: [
153
+ /* @__PURE__ */ r("p", { className: "m-0", children: "Are you sure you want to delete the following chat:" }),
154
+ /* @__PURE__ */ i("ul", { className: "m-0", children: [
155
+ /* @__PURE__ */ i("li", { children: [
156
+ "Timestamp:",
157
+ " ",
158
+ /* @__PURE__ */ r("span", { className: "text-lg", children: s.current && s.current.timestamp })
159
+ ] }),
160
+ /* @__PURE__ */ i("li", { children: [
161
+ "First message:",
162
+ " ",
163
+ /* @__PURE__ */ r("span", { className: "text-lg", children: s.current?.message })
164
+ ] })
165
+ ] })
166
+ ]
167
+ }
168
+ ),
169
+ /* @__PURE__ */ r("div", { className: ce, children: /* @__PURE__ */ r(Ie, { containerId: "history-table" }) }),
170
+ /* @__PURE__ */ r(He, { fallback: /* @__PURE__ */ r("div", {}), children: /* @__PURE__ */ r(
171
+ Ve,
172
+ {
173
+ filteredHistory: m,
174
+ historyState: S,
175
+ lastEntryToLoad: R,
176
+ onClickSort: K,
177
+ onClickRestore: W,
178
+ onClickDelete: X,
179
+ onClickFavorite: J,
180
+ infinityScrollMarkerRef: Z,
181
+ isLoading: O
182
+ }
183
+ ) })
184
+ ] });
185
+ }, je = ({
186
+ open: m,
187
+ onOpenChange: C
188
+ }) => {
189
+ const { getAccessToken: D, user: T } = G(), { dispatch: O } = _(M), [u, l] = x([]), c = w(null), { state: s, dispatch: y } = _(z), {
190
+ data: d,
191
+ refetch: R,
192
+ isLoading: I,
193
+ isError: n
194
+ } = fe({
195
+ enabled: m,
196
+ user: T?.username || "",
197
+ searchString: s.searchString || "",
198
+ sortDirection: s.sortDirection || h.DESC,
199
+ sortedCell: s.sortedCell || v,
200
+ getAccessToken: D
201
+ }), [, L] = f({
202
+ key: p + pe,
203
+ initialValue: s.searchString
204
+ }), [S, k] = f({
205
+ key: p + Te,
206
+ initialValue: !1
207
+ });
208
+ Pe(() => {
209
+ d && l(
210
+ S ? d.filter((a) => a.favoriteChat === !0) : d
211
+ );
212
+ }, [d, S]);
213
+ const g = async (a) => {
214
+ L(a), y({
215
+ type: De,
216
+ payload: { searchString: a }
217
+ });
218
+ }, b = Ee((a) => {
219
+ g(a.target.value.trim());
220
+ }, 500), N = async (a) => {
221
+ a.preventDefault();
222
+ }, A = (a) => {
223
+ k(a);
224
+ };
225
+ return /* @__PURE__ */ i(
226
+ we,
227
+ {
228
+ open: m,
229
+ onOpenChange: C,
230
+ title: ye,
231
+ animation: !0,
232
+ animationType: "fade",
233
+ children: [
234
+ /* @__PURE__ */ r(
235
+ ge,
236
+ {
237
+ header: "Filters",
238
+ className: "prose-dark dark:prose-lighter mb-4",
239
+ noBorder: !0,
240
+ compact: !0,
241
+ children: /* @__PURE__ */ i("form", { autoComplete: "off", onSubmit: N, children: [
242
+ /* @__PURE__ */ r(
243
+ Ae,
244
+ {
245
+ placeholder: "Search",
246
+ labelHidden: !0,
247
+ noBorder: !0,
248
+ autoCapitalize: "off",
249
+ autoComplete: "off",
250
+ autoCorrect: "off",
251
+ ref: c,
252
+ defaultValue: s.searchString,
253
+ mode: "alt-system",
254
+ name: "Search",
255
+ label: "Search",
256
+ onChange: b,
257
+ className: "my-2",
258
+ rightElement: /* @__PURE__ */ r("div", { className: "dark:text-copy-dark text-copy-light", children: /* @__PURE__ */ r(ve, { monotone: !0, size: "size-3" }) })
259
+ }
260
+ ),
261
+ /* @__PURE__ */ i("div", { className: "flex flex-col justify-between sm:flex-row gap-2 sm:mb-0 mb-1", children: [
262
+ /* @__PURE__ */ r("div", { className: "order-1 sm:order-0", children: /* @__PURE__ */ r(
263
+ xe,
264
+ {
265
+ name: "favorites-only",
266
+ checked: S,
267
+ onChange: A,
268
+ label: "Show favorites only",
269
+ narrow: !0,
270
+ noBorder: !0
271
+ }
272
+ ) }),
273
+ /* @__PURE__ */ r(
274
+ _e,
275
+ {
276
+ size: "small",
277
+ disabled: s.searchString === "",
278
+ onClick: () => {
279
+ g(""), c.current?.value && (c.current.value = "", c.current.focus());
280
+ },
281
+ children: "Reset Search"
282
+ }
283
+ )
284
+ ] })
285
+ ] })
286
+ }
287
+ ),
288
+ /* @__PURE__ */ i("div", { className: "flex flex-col sm:flex-row max-h-[65vh] sm:max-h-[75vh] min-h-[60vh]", children: [
289
+ n && /* @__PURE__ */ r("p", { className: "m-0 text-red-500", children: "Failed to load history." }),
290
+ !n && /* @__PURE__ */ r(
291
+ Ge,
292
+ {
293
+ mutate: R,
294
+ filteredHistory: u,
295
+ dispatch: O,
296
+ onOpenChange: C,
297
+ isLoading: I
298
+ }
299
+ )
300
+ ] })
301
+ ]
302
+ }
303
+ );
304
+ };
305
+ export {
306
+ je as HistoryPanel
307
+ };
@@ -1,23 +1,23 @@
1
1
  import { jsxs as t, Fragment as D, jsx as e } from "react/jsx-runtime";
2
- import { preloadToast as K, showSuccessToast as W, showErrorToast as Y, ConfirmationPanel as $, LazyToastContainerWrapper as H, oe as V } from "./App.CtFpHv2O.js";
3
- import { n as q, i as J, useUserPreferences as Q, useServerCapabilities as X, N as Z, setUserPlan as ee, S as d, renderDataAsList as ae, CARDS as s, L as f, j as c, C$1 as se, it as ne, isTauri as re, te, l as b, PROFILE_TITLE as le } from "./index.Czv_1MTM.js";
2
+ import { preloadToast as K, showSuccessToast as W, showErrorToast as Y, ConfirmationPanel as H, LazyToastContainerWrapper as $, Panel as V } from "./App.CV0Bjlae.js";
3
+ import { n as q, useUniqueId as J, useUserPreferences as Q, useServerCapabilities as X, N as Z, setUserPlan as ee, Card as d, renderDataAsList as ae, CARDS as s, L as P, j as c, Button as se, it as ne, isTauri as re, ButtonIcon as te, IconPasskey as L, PROFILE_TITLE as le } from "./index.rzw7MU5J.js";
4
4
  import ie from "clsx";
5
- import { useState as m, useMemo as ce, useCallback as P } from "react";
5
+ import { useState as m, useMemo as ce, useCallback as f } from "react";
6
6
  const oe = () => {
7
7
  const {
8
8
  isAuthenticated: h,
9
9
  user: n,
10
- registeringForPasskey: k,
10
+ registeringForPasskey: b,
11
11
  authenticationType: y,
12
12
  getAccessToken: u
13
13
  } = q(), [v, N] = m(null), [T, F] = m(!1), [x, C] = m(!1), [l, w] = m(null), U = J(), A = n?.username || "", {
14
14
  data: p,
15
15
  isSuccess: _,
16
- refetch: R
16
+ refetch: I
17
17
  } = Q({
18
18
  user: n?.username,
19
19
  getAccessToken: u
20
- }), { data: S, isSuccess: E } = X(), I = ce(() => !E || !S?.plans ? [] : S.plans.map((a) => ({
20
+ }), { data: E, isSuccess: S } = X(), R = ce(() => !S || !E?.plans ? [] : E.plans.map((a) => ({
21
21
  id: a.name,
22
22
  label: a.label,
23
23
  description: a.description,
@@ -25,16 +25,16 @@ const oe = () => {
25
25
  models: a.allowedModels.map(
26
26
  (r) => Z[r] || r
27
27
  )
28
- })), [E, S?.plans]), g = P(() => {
28
+ })), [S, E?.plans]), g = f(() => {
29
29
  T || (K(), F(!0));
30
- }, [T]), z = P(async () => {
30
+ }, [T]), z = f(async () => {
31
31
  if (!(!l || !n?.username))
32
32
  try {
33
33
  N(l.id), await ee({
34
34
  plan: l.id,
35
35
  accessToken: await u(),
36
36
  username: n.username
37
- }), await R(), await W(
37
+ }), await I(), await W(
38
38
  `${s.PLANS.SWITCH_SUCCESS} ${l.label}`,
39
39
  {
40
40
  containerId: "profile-plan-selection"
@@ -47,7 +47,7 @@ const oe = () => {
47
47
  } finally {
48
48
  N(null), w(null);
49
49
  }
50
- }, [u, l, R, n?.username]), M = P(
50
+ }, [u, l, I, n?.username]), B = f(
51
51
  (a, r) => {
52
52
  !n?.username || a === p?.plan || (w({ id: a, label: r }), C(!0));
53
53
  },
@@ -55,7 +55,7 @@ const oe = () => {
55
55
  );
56
56
  return h && A ? /* @__PURE__ */ t(D, { children: [
57
57
  /* @__PURE__ */ e(
58
- $,
58
+ H,
59
59
  {
60
60
  showConfirmation: x,
61
61
  setShowConfirmation: C,
@@ -72,7 +72,7 @@ const oe = () => {
72
72
  ] })
73
73
  }
74
74
  ),
75
- /* @__PURE__ */ e("div", { className: "av-sassy", children: /* @__PURE__ */ e(H, { containerId: "profile-plan-selection" }) }),
75
+ /* @__PURE__ */ e("div", { className: "av-sassy", children: /* @__PURE__ */ e($, { containerId: "profile-plan-selection" }) }),
76
76
  /* @__PURE__ */ e(
77
77
  d,
78
78
  {
@@ -85,7 +85,7 @@ const oe = () => {
85
85
  })
86
86
  }
87
87
  ),
88
- _ && E && I.length > 0 && /* @__PURE__ */ t(
88
+ _ && S && R.length > 0 && /* @__PURE__ */ t(
89
89
  d,
90
90
  {
91
91
  header: s.PLANS.TITLE,
@@ -93,9 +93,9 @@ const oe = () => {
93
93
  noBorder: !0,
94
94
  children: [
95
95
  /* @__PURE__ */ e("p", { className: "text-sm", children: s.PLANS.DESCRIPTION }),
96
- /* @__PURE__ */ e(f, { columnGap: 3, rowGap: 3, className: "mt-4", children: I.map(({ id: a, label: r, description: B, features: G, models: O }) => {
97
- const o = p?.plan === a, j = o ? s.PLANS.ACTIVE_BADGE : `Get ${r}`, L = v === a;
98
- return /* @__PURE__ */ e(c, { span: { fallback: 12, md: 4 }, children: /* @__PURE__ */ e(d, { mode: "darker", className: "prose-lighter h-full", children: /* @__PURE__ */ t(f, { direction: "column", children: [
96
+ /* @__PURE__ */ e(P, { columnGap: 3, rowGap: 3, className: "mt-4", children: R.map(({ id: a, label: r, description: M, features: G, models: O }) => {
97
+ const o = p?.plan === a, j = o ? s.PLANS.ACTIVE_BADGE : `Get ${r}`, k = v === a;
98
+ return /* @__PURE__ */ e(c, { span: { fallback: 12, md: 4 }, children: /* @__PURE__ */ e(d, { mode: "darker", className: "prose-lighter h-full", children: /* @__PURE__ */ t(P, { direction: "column", children: [
99
99
  /* @__PURE__ */ t(c, { children: [
100
100
  /* @__PURE__ */ e("div", { className: "flex items-start justify-between gap-2", children: /* @__PURE__ */ t("div", { children: [
101
101
  /* @__PURE__ */ e(
@@ -107,7 +107,7 @@ const oe = () => {
107
107
  children: r
108
108
  }
109
109
  ),
110
- /* @__PURE__ */ e("p", { className: "mb-0 text-sm opacity-80", children: B })
110
+ /* @__PURE__ */ e("p", { className: "mb-0 text-sm opacity-80", children: M })
111
111
  ] }) }),
112
112
  /* @__PURE__ */ e("h4", { children: "Features" }),
113
113
  /* @__PURE__ */ e("ul", { className: "prose-li:text-sm", children: G.map((i) => /* @__PURE__ */ e("li", { children: i }, i)) }),
@@ -122,13 +122,13 @@ const oe = () => {
122
122
  variant: o ? "selected" : "secondary",
123
123
  className: "mt-4",
124
124
  fullWidth: !0,
125
- disabled: o || L,
125
+ disabled: o || k,
126
126
  onClick: () => {
127
- M(a, r);
127
+ B(a, r);
128
128
  },
129
129
  onMouseEnter: g,
130
130
  onFocus: g,
131
- children: L ? "Updating..." : j
131
+ children: k ? "Updating..." : j
132
132
  }
133
133
  ) })
134
134
  ] }) }) }, a);
@@ -141,8 +141,8 @@ const oe = () => {
141
141
  {
142
142
  className: "prose-dark dark:prose-lighter mt-4",
143
143
  noBorder: !0,
144
- header: /* @__PURE__ */ e("h2", { className: "m-0", children: /* @__PURE__ */ t(f, { columnGap: 3, alignVertical: "center", children: [
145
- /* @__PURE__ */ e(c, { children: /* @__PURE__ */ e(b, { size: "size-8" }) }),
144
+ header: /* @__PURE__ */ e("h2", { className: "m-0", children: /* @__PURE__ */ t(P, { columnGap: 3, alignVertical: "center", children: [
145
+ /* @__PURE__ */ e(c, { children: /* @__PURE__ */ e(L, { size: "size-8" }) }),
146
146
  /* @__PURE__ */ e(c, { children: /* @__PURE__ */ e("div", { children: s.PREFERENCES.PASSKEY_TITLE }) })
147
147
  ] }) }),
148
148
  children: [
@@ -153,16 +153,16 @@ const oe = () => {
153
153
  variant: "selected",
154
154
  size: "small",
155
155
  className: "mt-2",
156
- onClick: k,
156
+ onClick: b,
157
157
  labelLeft: s.PREFERENCES.PASSKEY_BUTTON,
158
- children: /* @__PURE__ */ e(b, { size: "size-5", monotone: !0 })
158
+ children: /* @__PURE__ */ e(L, { size: "size-5", monotone: !0 })
159
159
  }
160
160
  )
161
161
  ]
162
162
  }
163
163
  )
164
164
  ] }) : null;
165
- }, Se = ({
165
+ }, Ee = ({
166
166
  open: h,
167
167
  onOpenChange: n
168
168
  }) => /* @__PURE__ */ e(
@@ -177,5 +177,5 @@ const oe = () => {
177
177
  }
178
178
  );
179
179
  export {
180
- Se as Profile
180
+ Ee as Profile
181
181
  };
@@ -1,51 +1,51 @@
1
1
  import { jsxs as s, jsx as t, Fragment as A } from "react/jsx-runtime";
2
- import { n as Pe, useEntitlements as Be, useUserPreferences as Ge, C as ce, LOCAL_STORAGE_OLED_MODE as Ue, LOCAL_STORAGE_FULL_SCREEN as Fe, canEvaluateModels as Ve, H as We, getCacheInfo as $e, isServiceWorkerEnabled as ze, SETTINGS_TITLE as He, S as p, CARDS as r, b as je, C$1 as R, PROMPTS_DESCRIPTION as Ye, L as qe, j as ie, applyOledMode as de, getCurrentGeoLocation as Ke, graphQLRequest as me, handleServiceWorkerToggle as Qe, SERVICE_TYPES as ue } from "./index.Czv_1MTM.js";
3
- import { AppContext as Je, useCapability as he, E as pe, oe as Xe, G as l, APP_SET_OLED_MODE as Ee, APP_SET_FULL_SCREEN as Se } from "./App.CtFpHv2O.js";
4
- import { Re as Ne } from "./index.BNusLsEn.js";
2
+ import { n as Pe, useEntitlements as Be, useUserPreferences as Ue, C as ce, useLocalStorage as ie, LOCAL_STORAGE_OLED_MODE as Ge, LOCAL_STORAGE_FULL_SCREEN as Fe, canEvaluateModels as Ve, H as We, getCacheInfo as $e, isServiceWorkerEnabled as ze, SETTINGS_TITLE as He, Card as p, CARDS as r, b as je, Button as x, PROMPTS_DESCRIPTION as Ye, L as qe, j as de, applyOledMode as me, getCurrentGeoLocation as Ke, graphQLRequest as ue, handleServiceWorkerToggle as Qe, SERVICE_TYPES as he } from "./index.rzw7MU5J.js";
3
+ import { AppContext as Je, useCapability as pe, Panel as Xe, Toggle as l, APP_SET_OLED_MODE as Ee, APP_SET_FULL_SCREEN as Se } from "./App.CV0Bjlae.js";
4
+ import { TextArea as Ne } from "./index.BXdpJpQs.js";
5
5
  import { useContext as Ze, useState as n, useMemo as et, useCallback as tt, useEffect as ge } from "react";
6
6
  const lt = ({
7
7
  open: fe,
8
- onOpenChange: x
8
+ onOpenChange: R
9
9
  }) => {
10
10
  const { getAccessToken: y, user: P } = Pe(), { allowedModels: k, status: B } = Be(), { dispatch: g } = Ze(Je), {
11
11
  data: o,
12
12
  isSuccess: Te,
13
- refetch: G
14
- } = Ge({
13
+ refetch: U
14
+ } = Ue({
15
15
  user: P?.username,
16
16
  getAccessToken: y
17
- }), [U, f] = n({
17
+ }), [G, f] = n({
18
18
  loadingLocation: !1
19
19
  }), [w, F] = n({
20
20
  prompts: []
21
- }), [V, W] = n(""), [$, T] = n(""), [z, H] = n(!1), [j, Y] = n(!1), [C, q] = n(!1), [I, K] = n(!1), [Q, J] = n(!1), [D, X] = n(!1), [E, Z] = n(null), [ee, te] = n(!1), [oe, se] = n(!1), ae = he(ce.TOOL.MEMORIES), ne = he(ce.ADDON.REASONING), [i, Ce] = pe({
22
- key: Ue,
21
+ }), [V, W] = n(""), [$, T] = n(""), [z, H] = n(!1), [j, Y] = n(!1), [C, q] = n(!1), [I, K] = n(!1), [Q, J] = n(!1), [L, X] = n(!1), [E, Z] = n(null), [ee, te] = n(!1), [oe, se] = n(!1), ae = pe(ce.TOOL.MEMORIES), ne = pe(ce.ADDON.REASONING), [i, Ce] = ie({
22
+ key: Ge,
23
23
  initialValue: !1
24
- }), [m, Ie] = pe({
24
+ }), [m, Ie] = ie({
25
25
  key: Fe,
26
26
  initialValue: !1
27
- }), [u, L] = n(!1), [S, _] = n(!1), be = et(() => Ve(k, B) ? We(k) : !1, [k, B]), ye = (e) => {
27
+ }), [u, D] = n(!1), [S, _] = n(!1), be = et(() => Ve(k, B) ? We(k) : !1, [k, B]), ye = (e) => {
28
28
  se(e);
29
29
  }, ke = (e) => {
30
30
  H(e);
31
31
  }, we = (e) => {
32
32
  ae && Y(e);
33
- }, De = (e) => {
34
- K(e);
35
33
  }, Le = (e) => {
34
+ K(e);
35
+ }, De = (e) => {
36
36
  ne && J(e);
37
37
  }, _e = (e) => {
38
38
  X(e);
39
39
  }, Me = (e) => {
40
- L(e);
40
+ D(e);
41
41
  }, Oe = (e) => {
42
42
  _(e);
43
43
  }, ve = async (e) => {
44
44
  e.preventDefault();
45
45
  try {
46
- await me({
46
+ await ue({
47
47
  accessToken: await y(),
48
- type: ue.SET_USER_PREFERENCES,
48
+ type: he.SET_USER_PREFERENCES,
49
49
  params: {
50
50
  user: P?.username,
51
51
  instructions: V,
@@ -56,21 +56,21 @@ const lt = ({
56
56
  * model preference so the user relies solely on provider defaults.
57
57
  * Empty string signals to backend to use provider's default model.
58
58
  */
59
- model: D && o?.model || "",
59
+ model: L && o?.model || "",
60
60
  tags: w.prompts,
61
61
  sendOnEnter: z,
62
62
  useMemory: j,
63
63
  showDetails: oe,
64
64
  showReasoningButton: Q,
65
- useNestedModelSelection: D
65
+ useNestedModelSelection: L
66
66
  }
67
- }), I !== C && (await Qe(I), q(I)), u !== i && (Ce(u), de(u), g({
67
+ }), I !== C && (await Qe(I), q(I)), u !== i && (Ce(u), me(u), g({
68
68
  type: Ee,
69
69
  payload: { oledMode: u }
70
70
  })), S !== m && (Ie(S), g({
71
71
  type: Se,
72
72
  payload: { fullScreen: S }
73
- })), G(), f({
73
+ })), U(), f({
74
74
  loadingLocation: !1
75
75
  });
76
76
  } catch {
@@ -80,32 +80,32 @@ const lt = ({
80
80
  loadingLocation: !0
81
81
  }), T("...");
82
82
  try {
83
- const e = Date.now(), a = await Ke(), b = await me({
83
+ const e = Date.now(), a = await Ke(), b = await ue({
84
84
  accessToken: await y(),
85
- type: ue.GET_LOCATION,
85
+ type: he.GET_LOCATION,
86
86
  params: {
87
87
  latitude: a.latitude,
88
88
  longitude: a.longitude
89
89
  }
90
90
  }), h = Date.now() - e;
91
- h < 2e3 && await new Promise((xe) => setTimeout(xe, 2e3 - h));
92
- const { city: d, state: c, country: N, displayName: v } = b.data, Re = d && c && N ? `${d}, ${c}, ${N}` : v;
91
+ h < 2e3 && await new Promise((Re) => setTimeout(Re, 2e3 - h));
92
+ const { city: d, state: c, country: N, displayName: v } = b.data, xe = d && c && N ? `${d}, ${c}, ${N}` : v;
93
93
  f({
94
94
  loadingLocation: !1
95
- }), T(Re);
95
+ }), T(xe);
96
96
  } catch {
97
97
  f({
98
98
  loadingLocation: !1
99
99
  });
100
100
  }
101
101
  }, re = () => {
102
- u !== i && (L(i), de(i), g({
102
+ u !== i && (D(i), me(i), g({
103
103
  type: Ee,
104
104
  payload: { oledMode: i }
105
105
  })), S !== m && (_(m), g({
106
106
  type: Se,
107
107
  payload: { fullScreen: m }
108
- })), G(), x(!1);
108
+ })), U(), R(!1);
109
109
  }, M = ({
110
110
  enabled: e = !1,
111
111
  privateChat: a = !1,
@@ -144,7 +144,7 @@ const lt = ({
144
144
  return;
145
145
  o.instructions && W(o.instructions), o.location && T(o.location), o.tags && F({ prompts: o.tags }), o.sendOnEnter !== void 0 && H(o.sendOnEnter), o.useMemory !== void 0 && Y(o.useMemory), o.showDetails !== void 0 && se(o.showDetails), o.showReasoningButton !== void 0 && J(o.showReasoningButton), o.useNestedModelSelection !== void 0 && X(o.useNestedModelSelection);
146
146
  const e = ze();
147
- q(e), K(e), L(i), _(m);
147
+ q(e), K(e), D(i), _(m);
148
148
  }, [o, i, m]), ge(() => {
149
149
  C ? le() : Z(null);
150
150
  }, [C, le]), Te ? /* @__PURE__ */ s(
@@ -162,8 +162,8 @@ const lt = ({
162
162
  alignHorizontal: "flex-end",
163
163
  className: "pb-8 sm:pb-0",
164
164
  children: [
165
- /* @__PURE__ */ t(ie, { children: /* @__PURE__ */ t(
166
- R,
165
+ /* @__PURE__ */ t(de, { children: /* @__PURE__ */ t(
166
+ x,
167
167
  {
168
168
  mode: "dark",
169
169
  variant: "secondary",
@@ -173,13 +173,13 @@ const lt = ({
173
173
  children: "Cancel"
174
174
  }
175
175
  ) }),
176
- /* @__PURE__ */ t(ie, { children: /* @__PURE__ */ t(
177
- R,
176
+ /* @__PURE__ */ t(de, { children: /* @__PURE__ */ t(
177
+ x,
178
178
  {
179
179
  mode: "dark",
180
180
  focusMode: "light",
181
181
  onClick: async (e) => {
182
- x(!1), await ve(e);
182
+ R(!1), await ve(e);
183
183
  },
184
184
  children: "Save"
185
185
  }
@@ -292,15 +292,15 @@ const lt = ({
292
292
  }
293
293
  ),
294
294
  /* @__PURE__ */ t(
295
- R,
295
+ x,
296
296
  {
297
297
  className: "mt-2",
298
298
  size: "small",
299
299
  noBorder: !0,
300
300
  variant: "secondary",
301
- disabled: U.loadingLocation,
301
+ disabled: G.loadingLocation,
302
302
  onClick: Ae,
303
- children: U.loadingLocation ? "Detecting..." : "Auto-detect"
303
+ children: G.loadingLocation ? "Detecting..." : "Auto-detect"
304
304
  }
305
305
  )
306
306
  ]
@@ -404,7 +404,7 @@ const lt = ({
404
404
  className: "mt-2",
405
405
  label: "Show Reasoning Button",
406
406
  name: "show-reasoning-button",
407
- onChange: Le,
407
+ onChange: De,
408
408
  checked: Q
409
409
  }
410
410
  )
@@ -420,7 +420,7 @@ const lt = ({
420
420
  label: "Enable Model Selection",
421
421
  name: "use-nested-model-selection",
422
422
  onChange: _e,
423
- checked: D
423
+ checked: L
424
424
  }
425
425
  )
426
426
  ] }),
@@ -459,7 +459,7 @@ const lt = ({
459
459
  className: "mt-2",
460
460
  label: "Enable Assets Caching",
461
461
  name: "enable-service-worker",
462
- onChange: De,
462
+ onChange: Le,
463
463
  checked: I
464
464
  }
465
465
  ),