@versini/sassysaint 8.35.2 → 8.36.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.
@@ -1,7 +1,7 @@
1
1
  import { jsxs as s, jsx as r } from "react/jsx-runtime";
2
- import { b as m, ButtonScroll as n } from "./App.jScnP0cm.js";
2
+ import { b as m, ButtonScroll as n } from "./App.CIrOEX2C.js";
3
3
  import { useRef as f, useCallback as u, useLayoutEffect as p } from "react";
4
- import { useMarkdown as d } from "./useMarkdown.DB-20DxL.js";
4
+ import { useMarkdown as d } from "./useMarkdown.DUM2I61X.js";
5
5
  const v = ({ content: o }) => {
6
6
  const [l, t] = d(), { ref: a, inViewport: c } = m(), e = f(null), i = u(() => {
7
7
  e.current && e.current.scrollIntoView({
@@ -1,12 +1,12 @@
1
1
  import { jsxs as u, Fragment as l, jsx as e } from "react/jsx-runtime";
2
- import { i as d, useServerCapabilities as g, useChangelogs as A, tt as B } from "./App.jScnP0cm.js";
3
- import { S as o, renderDataAsList as c, CARDS as r, pluralize as E, isProbablyMobile as I, ABOUT_TITLE as S } from "./index.Bx_do3Wo.js";
2
+ import { i as d, useServerCapabilities as g, useChangelogs as A, tt as B } from "./App.CIrOEX2C.js";
3
+ import { S as o, renderDataAsList as c, CARDS as r, pluralize as E, isProbablyMobile as I, ABOUT_TITLE as S } from "./index.D_ttuklg.js";
4
4
  import O from "clsx";
5
5
  import { Suspense as C, lazy as U } from "react";
6
6
  const L = U(
7
7
  () => import(
8
8
  /* webpackChunkName: "LazyAboutChangelog" */
9
- "./AboutChangelog.CNFqwQlB.js"
9
+ "./AboutChangelog.a3vZMahD.js"
10
10
  )
11
11
  ), N = () => {
12
12
  const s = d(), t = d(), { data: i, isSuccess: m } = g(), { data: h, isSuccess: T } = A(), b = i?.version || "", a = i?.models || [], p = i?.buildTime || "";
@@ -18,8 +18,8 @@ const L = U(
18
18
  className: "prose-dark dark:prose-lighter mb-4",
19
19
  noBorder: !0,
20
20
  children: c(s, {
21
- [r.ABOUT.VERSION]: "8.35.2",
22
- [r.ABOUT.BUILD_TIMESTAMP]: "08/08/2025 04:23 PM EDT"
21
+ [r.ABOUT.VERSION]: "8.36.1",
22
+ [r.ABOUT.BUILD_TIMESTAMP]: "08/09/2025 03:24 PM EDT"
23
23
  })
24
24
  }
25
25
  ),
@@ -1,5 +1,5 @@
1
1
  import { jsx as i, jsxs as T, Fragment as ue } from "react/jsx-runtime";
2
- import { Subscribable as ho, pendingThenable as ka, resolveEnabled as Ee, shallowEqualObjects as Er, resolveStaleTime as gt, noop as _r, isServer as Sr, isValidTimeout as Ea, focusManager as mo, fetchState as fo, replaceData as _a, notifyManager as _s, timeUntilStale as po, shouldThrowError as go, useQueryClient as yo, I as re, ACTION_SORT as bo, ACTION_SEARCH as vo, ACTION_RESET_PROMPT as Ss, ACTION_TOGGLE_PROMPT as Ts, ue as xe, DEFAULT_ICON_ACTION_SIZE as Te, isTauri as Wt, n as Ve, isProbablyiPhone as Ae, L as xs, j as yt, C as Sa, LOCAL_STORAGE_PREFIX as jt, LOCAL_STORAGE_PRIVATE_DISCLOSURE as wo, LOCAL_STORAGE_REASONING_DISCLOSURE as ko, TOAST_CHAT_SAVED as Eo, PROMPT_CLASSNAME as _o, PROMPT_EDITABLE_AREA_CLASSNAME as So, ERROR_MESSAGE as To, ROLE_INTERNAL as Tr, CLIPBOARD_PROMPT as Ta, isProbablyMobile as Je, INPUT_PLACEHOLDER_TEXT_MOBILE as xa, INPUT_PLACEHOLDER_TEXT_ENTER as Ca, INPUT_PLACEHOLDER_TEXT_CMD_ENTER as Ia, FOOTER_DISCLAIMERS as Ra, INPUT_BOTTOM_OFFSET_EXTRA as xo, INPUT_BOTTOM_OFFSET_IPHONE as Co, INPUT_BOTTOM_OFFSET as Cs, TOAST_PROVIDER_CHANGED as Io, LOG_OUT as Aa, getMessageContaintWrapperClass as Ro, UI_FOOTER_BUFFER as Is, UI_BUTTON_SCROLL_BUFFER as Ao, Logo as No, UI_DEFAULT_MAIN_HEIGHT as Na, APP_CLASSNAME as Oo, getMainPaddingClass as Oa, r as $o, LOCAL_STORAGE_SORT as Po, LOCAL_STORAGE_SEARCH as Mo } from "./index.Bx_do3Wo.js";
2
+ import { Subscribable as ho, pendingThenable as ka, resolveEnabled as Ee, shallowEqualObjects as Er, resolveStaleTime as gt, noop as _r, isServer as Sr, isValidTimeout as Ea, focusManager as mo, fetchState as fo, replaceData as _a, notifyManager as _s, timeUntilStale as po, shouldThrowError as go, useQueryClient as yo, I as re, ACTION_SORT as bo, ACTION_SEARCH as vo, ACTION_RESET_PROMPT as Ss, ACTION_TOGGLE_PROMPT as Ts, ue as xe, DEFAULT_ICON_ACTION_SIZE as Te, isTauri as Wt, n as Ve, isProbablyiPhone as Ae, L as xs, j as yt, C as Sa, LOCAL_STORAGE_PREFIX as jt, LOCAL_STORAGE_PRIVATE_DISCLOSURE as wo, LOCAL_STORAGE_REASONING_DISCLOSURE as ko, TOAST_CHAT_SAVED as Eo, PROMPT_CLASSNAME as _o, PROMPT_EDITABLE_AREA_CLASSNAME as So, ERROR_MESSAGE as To, ROLE_INTERNAL as Tr, CLIPBOARD_PROMPT as Ta, isProbablyMobile as Je, INPUT_PLACEHOLDER_TEXT_MOBILE as xa, INPUT_PLACEHOLDER_TEXT_ENTER as Ca, INPUT_PLACEHOLDER_TEXT_CMD_ENTER as Ia, FOOTER_DISCLAIMERS as Ra, INPUT_BOTTOM_OFFSET_EXTRA as xo, INPUT_BOTTOM_OFFSET_IPHONE as Co, INPUT_BOTTOM_OFFSET as Cs, TOAST_PROVIDER_CHANGED as Io, LOG_OUT as Aa, getMessageContaintWrapperClass as Ro, UI_FOOTER_BUFFER as Is, UI_BUTTON_SCROLL_BUFFER as Ao, Logo as No, UI_DEFAULT_MAIN_HEIGHT as Na, APP_CLASSNAME as Oo, getMainPaddingClass as Oa, r as $o, LOCAL_STORAGE_SORT as Po, LOCAL_STORAGE_SEARCH as Mo } from "./index.D_ttuklg.js";
3
3
  import * as Y from "react";
4
4
  import Z, { useEffect as $, useRef as R, useState as z, useCallback as V, useSyncExternalStore as Lo, useMemo as he, useId as Kr, useContext as X, useLayoutEffect as Oe, createContext as Rs, useDebugValue as Bo, forwardRef as As, Suspense as Ns, lazy as it, useReducer as St } from "react";
5
5
  import p from "clsx";
@@ -7535,7 +7535,7 @@ const nh = (e) => {
7535
7535
  ] });
7536
7536
  };
7537
7537
  let yr = null, br = null;
7538
- const qn = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), Yn = async () => (br || (br = import("./index.Bx_do3Wo.js").then((e) => e.utilities)), br), ih = async () => {
7538
+ const qn = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), Yn = async () => (br || (br = import("./index.D_ttuklg.js").then((e) => e.utilities)), br), ih = async () => {
7539
7539
  try {
7540
7540
  await Promise.all([qn(), Yn()]);
7541
7541
  } catch {
@@ -8230,21 +8230,21 @@ const qn = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), Yn = as
8230
8230
  }
8231
8231
  ) : /* @__PURE__ */ i("div", { className: e, children: b });
8232
8232
  }, Rh = it(
8233
- () => import("./ProfileEntry.BbGrkpwi.js").then((e) => ({
8233
+ () => import("./ProfileEntry.CGXyAgeg.js").then((e) => ({
8234
8234
  default: e.Profile
8235
8235
  }))
8236
8236
  ), Ah = it(
8237
- () => import("./SettingsEntry.DVwYerEI.js").then((e) => ({
8237
+ () => import("./SettingsEntry.C2kHzP99.js").then((e) => ({
8238
8238
  default: e.SettingsPanel
8239
8239
  }))
8240
8240
  ), Nh = it(
8241
- () => import("./HistoryEntry.BjH7O284.js").then((e) => ({
8241
+ () => import("./HistoryEntry.BND-8zNm.js").then((e) => ({
8242
8242
  default: e.HistoryPanel
8243
8243
  }))
8244
8244
  ), Oh = it(
8245
- () => import("./AboutEntry.B7_RtVXN.js").then((e) => ({ default: e.About }))
8245
+ () => import("./AboutEntry.D-pB8mma.js").then((e) => ({ default: e.About }))
8246
8246
  ), $h = it(
8247
- () => import("./UsageEntry.Cmt6ZxGc.js").then((e) => ({ default: e.Usage }))
8247
+ () => import("./UsageEntry.ncjZPSAw.js").then((e) => ({ default: e.Usage }))
8248
8248
  ), Ph = ({ type: e, open: t, onOpenChange: r }) => t ? /* @__PURE__ */ i(Ns, { fallback: /* @__PURE__ */ i("div", {}), children: (() => {
8249
8249
  switch (e) {
8250
8250
  case "profile":
@@ -8264,7 +8264,7 @@ const qn = async () => (yr || (yr = import("./index.B8EJY2WR.js")), yr), Yn = as
8264
8264
  isComponent: e = !1
8265
8265
  }) => {
8266
8266
  const { logout: t, getAccessToken: r } = Ve(), [a, s] = z(null), [n, o] = z(!1), [c, l] = z(!1), [d, m] = z(!1), u = V(() => {
8267
- d || (import("./ProfileEntry.BbGrkpwi.js"), import("./SettingsEntry.DVwYerEI.js"), import("./HistoryEntry.BjH7O284.js"), import("./AboutEntry.B7_RtVXN.js"), import("./UsageEntry.Cmt6ZxGc.js"), m(!0));
8267
+ d || (import("./ProfileEntry.CGXyAgeg.js"), import("./SettingsEntry.C2kHzP99.js"), import("./HistoryEntry.BND-8zNm.js"), import("./AboutEntry.D-pB8mma.js"), import("./UsageEntry.ncjZPSAw.js"), m(!0));
8268
8268
  }, [d]), h = V((k) => {
8269
8269
  s(k);
8270
8270
  }, []), f = V(() => {
@@ -9971,7 +9971,7 @@ const Pm = ({ content: e }) => /* @__PURE__ */ i(
9971
9971
  ), Es = 2, Mm = it(
9972
9972
  () => import(
9973
9973
  /* webpackChunkName: "LazyMessageAssistant" */
9974
- "./ChatBubbleAssistant.Ck5z9TEG.js"
9974
+ "./ChatBubbleAssistant.ByB_V80e.js"
9975
9975
  )
9976
9976
  ), Lm = Z.memo(
9977
9977
  ({
@@ -1,7 +1,7 @@
1
1
  import { jsx as Tp } from "react/jsx-runtime";
2
- import { getDefaultExportFromCjs as ln } from "./App.jScnP0cm.js";
2
+ import { getDefaultExportFromCjs as ln } from "./App.CIrOEX2C.js";
3
3
  import Ap, { useState as Cp, useEffect as Pp } from "react";
4
- import { TRIMESTERS as rn, TRIMESTERS_SHORT as Op, isProbablyMobile as Lp } from "./index.Bx_do3Wo.js";
4
+ import { TRIMESTERS as rn, TRIMESTERS_SHORT as Op, isProbablyMobile as Lp } from "./index.D_ttuklg.js";
5
5
  var ls = { exports: {} }, Ep = ls.exports, on;
6
6
  function Ip() {
7
7
  return on || (on = 1, function(ve, ne) {
@@ -1,9 +1,9 @@
1
1
  import { jsx as T } from "react/jsx-runtime";
2
- import { ChatContext as b, E as _, Me as N, Oe as S } from "./App.jScnP0cm.js";
2
+ import { ChatContext as b, E as _, Me as N, Oe as S } from "./App.CIrOEX2C.js";
3
3
  import L from "clsx";
4
4
  import k, { useState as E, useRef as g, useEffect as O, useContext as w } from "react";
5
- import { LOCAL_STORAGE_PREFIX as F, LOCAL_STORAGE_CHAT_DETAILS as G, convertCamelCaseToReadable as U, numberFormatter as I, pluralize as P, ROLE_INTERNAL as v } from "./index.Bx_do3Wo.js";
6
- import { useMarkdown as y } from "./useMarkdown.DB-20DxL.js";
5
+ import { LOCAL_STORAGE_PREFIX as F, LOCAL_STORAGE_CHAT_DETAILS as G, convertCamelCaseToReadable as U, numberFormatter as I, pluralize as P, ROLE_INTERNAL as v } from "./index.D_ttuklg.js";
6
+ import { useMarkdown as y } from "./useMarkdown.DUM2I61X.js";
7
7
  const D = 2, j = D * 1e3, h = "", q = (e) => e * (2 - e);
8
8
  function V(e, a = !0) {
9
9
  const [i, C] = E(0), [c, p] = E(0), [t, A] = E(e), r = g(0), s = g(0);
@@ -0,0 +1,509 @@
1
+ import { jsxs as h, jsx as e, Fragment as Z } from "react/jsx-runtime";
2
+ import { I, INFINITE_SCROLL_THRESHOLD as B, CARDS as ee, pluralize as te, ue as O, numberFormatter as se, isProbablyMobile as re, n as $, INFINITE_SCROLL_LIMIT as b, LOCAL_STORAGE_PREFIX as F, LOCAL_STORAGE_SORT as ae, APP_CLASSNAME as ne, ACTION_SORT as z, TOAST_CHAT_DELETED as oe, TOAST_PROVIDER_CHANGED as ce, LOCAL_STORAGE_SEARCH as ie, HISTORY_TITLE as le, pe as de, debounce as me, ACTION_SEARCH as he } from "./index.D_ttuklg.js";
3
+ import { De as ue, He as pe, qe as w, Ge as Ce, Fe as Se, Pe as p, Ye as H, st as L, k as ge, a as Te, p as xe, p$1 as fe, O as ye, n as Ee, t as Ae, HistoryContext as G, ChatContext as Y, useAiChat as Ne, E as W, useUserPreferences as Re, ConfirmationPanel as De, LazyToastContainerWrapper as ve, mutateCall as P, SERVICE_TYPES as U, showErrorToast as we, setNewProvider as Oe, CHAT_SET_PROVIDER as ke, showSuccessToast as Me, CHAT_SET_STATUS as Ie, E$1 as A, useChatsHistory as _e, tt as be, a$1 as ze } from "./App.CIrOEX2C.js";
4
+ import { Fragment as He, useRef as k, useState as R, useContext as D, useCallback as Le, useEffect as M } from "react";
5
+ const Pe = ({
6
+ className: c,
7
+ viewBox: a,
8
+ title: d,
9
+ monotone: m,
10
+ ...i
11
+ }) => /* @__PURE__ */ h(
12
+ I,
13
+ {
14
+ defaultViewBox: "0 0 448 512",
15
+ size: "size-5",
16
+ viewBox: a,
17
+ className: c,
18
+ title: d || "Delete",
19
+ ...i,
20
+ children: [
21
+ /* @__PURE__ */ e(
22
+ "path",
23
+ {
24
+ d: "M32 96v352c0 35.3 28.7 64 64 64h256c35.3 0 64-28.7 64-64V96zm80 80c0-8.8 7.2-16 16-16s16 7.2 16 16v224c0 8.8-7.2 16-16 16s-16-7.2-16-16zm96 0c0-8.8 7.2-16 16-16s16 7.2 16 16v224c0 8.8-7.2 16-16 16s-16-7.2-16-16zm96 0c0-8.8 7.2-16 16-16s16 7.2 16 16v224c0 8.8-7.2 16-16 16s-16-7.2-16-16z",
25
+ opacity: m ? "1" : "0.4"
26
+ }
27
+ ),
28
+ /* @__PURE__ */ e("path", { d: "M163.8 0c-12.1 0-23.2 6.8-28.6 17.7L128 32H32C14.3 32 0 46.3 0 64s14.3 32 32 32h384c17.7 0 32-14.3 32-32s-14.3-32-32-32h-96l-7.2-14.3C307.4 6.8 296.3 0 284.2 0z" })
29
+ ]
30
+ }
31
+ ), Ue = ({
32
+ className: c,
33
+ viewBox: a,
34
+ title: d,
35
+ monotone: m,
36
+ ...i
37
+ }) => /* @__PURE__ */ h(
38
+ I,
39
+ {
40
+ defaultViewBox: "0 0 512 512",
41
+ size: "size-5",
42
+ viewBox: a,
43
+ className: c,
44
+ title: d || "Restore",
45
+ ...i,
46
+ children: [
47
+ /* @__PURE__ */ e(
48
+ "path",
49
+ {
50
+ d: "M128 80v16h64V80c0-8.8 7.2-16 16-16h224c8.8 0 16 7.2 16 16v224c0 8.8-7.2 16-16 16h-16v64h16c44.2 0 80-35.8 80-80V80c0-44.2-35.8-80-80-80H208c-44.2 0-80 35.8-80 80",
51
+ opacity: m ? "1" : "0.4"
52
+ }
53
+ ),
54
+ /* @__PURE__ */ e("path", { d: "M64 128c-35.3 0-64 28.7-64 64v256c0 35.3 28.7 64 64 64h256c35.3 0 64-28.7 64-64V192c0-35.3-28.7-64-64-64zm32 64h192c17.7 0 32 14.3 32 32s-14.3 32-32 32H96c-17.7 0-32-14.3-32-32s14.3-32 32-32" })
55
+ ]
56
+ }
57
+ ), Ve = ({
58
+ className: c,
59
+ viewBox: a,
60
+ title: d,
61
+ monotone: m,
62
+ ...i
63
+ }) => /* @__PURE__ */ h(
64
+ I,
65
+ {
66
+ defaultViewBox: "0 0 512 512",
67
+ size: "size-5",
68
+ viewBox: a,
69
+ className: c,
70
+ title: d || "Search",
71
+ ...i,
72
+ children: [
73
+ /* @__PURE__ */ e(
74
+ "path",
75
+ {
76
+ d: "M0 208a208 208 0 1 0 416 0 208 208 0 1 0-416 0m352 0a144 144 0 1 1-288 0 144 144 0 1 1 288 0",
77
+ opacity: m ? "1" : "0.4"
78
+ }
79
+ ),
80
+ /* @__PURE__ */ e("path", { d: "m330.7 376 126.7 126.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L376 330.7c-12.7 17.3-28 32.6-45.3 45.3" })
81
+ ]
82
+ }
83
+ ), Be = {
84
+ [Ae]: fe,
85
+ [Ee]: xe,
86
+ [ye]: Te
87
+ }, r = {
88
+ ROW: "row",
89
+ TIMESTAMP: "timestamp",
90
+ SUMMARY: "summary",
91
+ PROVIDER: "provider",
92
+ TOKEN_USAGE: "tokenUsage",
93
+ ACTIONS: "actions"
94
+ }, V = [
95
+ r.ROW,
96
+ r.SUMMARY,
97
+ r.TIMESTAMP,
98
+ r.TOKEN_USAGE,
99
+ r.PROVIDER,
100
+ r.ACTIONS
101
+ ], $e = ({
102
+ filteredHistory: c,
103
+ historyState: a,
104
+ lastEntryToLoad: d,
105
+ onClickSort: m,
106
+ onClickRestore: i,
107
+ onClickDelete: T,
108
+ infinityScrollMarkerRef: x
109
+ }) => {
110
+ const l = re(), o = (t) => {
111
+ switch (t) {
112
+ case r.ROW:
113
+ return /* @__PURE__ */ e(p, { className: "sr-only", children: "Row" }, t);
114
+ case r.TIMESTAMP:
115
+ return /* @__PURE__ */ e(
116
+ H,
117
+ {
118
+ buttonClassName: "text-xs sm:text-sm",
119
+ cellId: "timestamp",
120
+ align: "left",
121
+ sortDirection: a.sortDirection,
122
+ sortedCell: a.sortedCell,
123
+ onClick: () => {
124
+ m("timestamp");
125
+ },
126
+ children: "Date"
127
+ },
128
+ t
129
+ );
130
+ case r.SUMMARY:
131
+ return /* @__PURE__ */ e(p, { className: "text-xs sm:text-sm", children: "Summary" }, t);
132
+ case r.PROVIDER:
133
+ return /* @__PURE__ */ e(p, { className: "text-xs sm:text-sm", children: "Provider" }, t);
134
+ case r.TOKEN_USAGE:
135
+ return l ? null : /* @__PURE__ */ e(
136
+ H,
137
+ {
138
+ buttonClassName: "text-xs sm:text-sm",
139
+ cellId: "tokenUsage",
140
+ align: "right",
141
+ sortDirection: a.sortDirection,
142
+ sortedCell: a.sortedCell,
143
+ onClick: () => {
144
+ m("tokenUsage");
145
+ },
146
+ children: "Tokens"
147
+ },
148
+ t
149
+ );
150
+ case r.ACTIONS:
151
+ return /* @__PURE__ */ e(p, { className: "text-xs sm:text-sm text-right", children: "Actions" }, t);
152
+ default:
153
+ return null;
154
+ }
155
+ }, y = (t, s, u) => {
156
+ switch (t) {
157
+ case r.ROW:
158
+ return /* @__PURE__ */ e(p, { children: u + 1 }, t);
159
+ case r.TIMESTAMP:
160
+ return /* @__PURE__ */ e(
161
+ p,
162
+ {
163
+ component: "th",
164
+ scope: "row",
165
+ className: "text-gray-400 sm:whitespace-nowrap text-xs sm:text-sm max-w-20 sm:max-w-none",
166
+ children: s.timestamp.split(",")[0]
167
+ },
168
+ t
169
+ );
170
+ case r.SUMMARY: {
171
+ const C = s.summary || (s.messages.length > 0 ? s.messages[0]?.content : "");
172
+ return /* @__PURE__ */ e(
173
+ p,
174
+ {
175
+ className: "max-w-[100px] text-white sm:max-w-full text-xs sm:text-sm",
176
+ style: {
177
+ wordBreak: "break-word"
178
+ },
179
+ children: C
180
+ },
181
+ t
182
+ );
183
+ }
184
+ case r.PROVIDER: {
185
+ const C = s.model ? ge(s.model) : null, E = C ? Be[C] : null;
186
+ return /* @__PURE__ */ e(
187
+ p,
188
+ {
189
+ component: "th",
190
+ scope: "row",
191
+ className: "text-gray-400",
192
+ align: "center",
193
+ children: E ? /* @__PURE__ */ e(
194
+ E,
195
+ {
196
+ size: "size-4 sm:size-5",
197
+ semantic: !0,
198
+ title: s.model || C
199
+ }
200
+ ) : null
201
+ },
202
+ t
203
+ );
204
+ }
205
+ case r.TOKEN_USAGE:
206
+ return l ? null : /* @__PURE__ */ e(
207
+ p,
208
+ {
209
+ className: "text-gray-400 text-xs sm:text-sm",
210
+ align: "right",
211
+ children: s.tokenUsage ? se.format(s.tokenUsage) : "0"
212
+ },
213
+ t
214
+ );
215
+ case r.ACTIONS:
216
+ return /* @__PURE__ */ h(p, { align: "right", children: [
217
+ /* @__PURE__ */ e(
218
+ L,
219
+ {
220
+ label: "Restore chat",
221
+ mode: "alt-system",
222
+ placement: "top",
223
+ trigger: /* @__PURE__ */ e(
224
+ O,
225
+ {
226
+ className: "mr-2",
227
+ focusMode: "alt-system",
228
+ noBorder: !0,
229
+ label: "Restore chat",
230
+ variant: "primary",
231
+ iconClassName: "text-green-800 dark:text-green-500",
232
+ onClick: async () => {
233
+ await i(s);
234
+ },
235
+ children: /* @__PURE__ */ e(Ue, { size: "size-3", monotone: !0 })
236
+ }
237
+ )
238
+ }
239
+ ),
240
+ /* @__PURE__ */ e(
241
+ L,
242
+ {
243
+ label: "Delete chat",
244
+ mode: "alt-system",
245
+ placement: "top",
246
+ trigger: /* @__PURE__ */ e(
247
+ O,
248
+ {
249
+ focusMode: "alt-system",
250
+ noBorder: !0,
251
+ label: "Delete chat",
252
+ variant: "primary",
253
+ iconClassName: "text-red-700 dark:text-red-500",
254
+ onClick: () => {
255
+ T(s);
256
+ },
257
+ children: /* @__PURE__ */ e(Pe, { size: "size-3", monotone: !0 })
258
+ }
259
+ )
260
+ }
261
+ )
262
+ ] }, t);
263
+ default:
264
+ return null;
265
+ }
266
+ };
267
+ return /* @__PURE__ */ h(ue, { stickyHeader: !0, stickyFooter: !0, compact: !0, children: [
268
+ /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e(w, { children: V.map((t) => o(t)) }) }),
269
+ /* @__PURE__ */ e(Ce, { children: c.slice(0, d).map((t, s) => t?.messages?.length > 0 ? /* @__PURE__ */ h(He, { children: [
270
+ s === d - B && /* @__PURE__ */ e("tr", { ref: x }),
271
+ /* @__PURE__ */ e(w, { children: V.map(
272
+ (u) => y(u, t, s)
273
+ ) })
274
+ ] }, `${ee.HISTORY.TITLE}-${t.id}-${s}`) : null) }),
275
+ /* @__PURE__ */ e(Se, { children: /* @__PURE__ */ e(w, { children: /* @__PURE__ */ e(p, { colSpan: 1e3, children: /* @__PURE__ */ e("div", { children: te(
276
+ `${c.length} chat`,
277
+ c.length
278
+ ) }) }) }) })
279
+ ] });
280
+ }, Fe = ({
281
+ filteredHistory: c,
282
+ dispatch: a,
283
+ onOpenChange: d,
284
+ mutate: m
285
+ }) => {
286
+ const { user: i, getAccessToken: T } = $(), x = k(null), l = k({
287
+ id: "",
288
+ timestamp: "",
289
+ message: ""
290
+ }), [o, y] = R(!1), [t, s] = R(
291
+ b + B
292
+ ), { state: u, dispatch: C } = D(G), {
293
+ state: { provider: E },
294
+ setChatId: N,
295
+ setInitialMessages: v
296
+ } = D(Y), { setInput: _ } = Ne(), [, g] = W({
297
+ key: F + ae,
298
+ initialValue: u.sortDirection
299
+ }), { refetch: K } = Re({
300
+ user: i?.username,
301
+ getAccessToken: T
302
+ }), j = (n) => {
303
+ switch (u.sortDirection) {
304
+ case A.ASC:
305
+ g(A.DESC), C({
306
+ type: z,
307
+ payload: {
308
+ sortedCell: n,
309
+ sortDirection: A.DESC
310
+ }
311
+ });
312
+ break;
313
+ default:
314
+ g(A.ASC), C({
315
+ type: z,
316
+ payload: {
317
+ sortedCell: n,
318
+ sortDirection: A.ASC
319
+ }
320
+ });
321
+ break;
322
+ }
323
+ }, q = async () => {
324
+ const n = l.current;
325
+ try {
326
+ await P({
327
+ accessToken: await T(),
328
+ type: U.DELETE_CHAT,
329
+ params: {
330
+ userId: i?.username || "",
331
+ id: n.id
332
+ }
333
+ }), m(""), await we(oe, {
334
+ autoClose: 2e3,
335
+ containerId: "history-table"
336
+ });
337
+ } catch {
338
+ }
339
+ }, X = async (n) => {
340
+ try {
341
+ const f = await T(), S = await P({
342
+ accessToken: f,
343
+ type: U.GET_CHAT,
344
+ params: {
345
+ id: n.id
346
+ }
347
+ });
348
+ S.status === 200 && (S.data.provider !== E && (await Oe({
349
+ provider: S.data.provider,
350
+ accessToken: f,
351
+ username: i?.username || ""
352
+ }), a({
353
+ type: ke,
354
+ payload: {
355
+ provider: S.data.provider
356
+ }
357
+ }), K(), await Me(
358
+ `${ce} ${S.data.provider}`,
359
+ {
360
+ containerId: "toggle-provider"
361
+ }
362
+ )), a({
363
+ type: Ie,
364
+ payload: {
365
+ restoring: !0,
366
+ restoredModel: S.data?.model || "",
367
+ restoredUsage: S.data?.tokenUsage || 0
368
+ }
369
+ }), _(""), N(n.id), v(S.data.messages), d(!1));
370
+ } catch {
371
+ }
372
+ }, J = (n) => {
373
+ l.current = {
374
+ id: n.id,
375
+ timestamp: n.timestamp,
376
+ message: n.messages.length > 0 ? n.messages[0]?.content : ""
377
+ }, y(!o);
378
+ }, Q = Le((n) => {
379
+ n[0].isIntersecting && s((S) => S + b);
380
+ }, []);
381
+ return M(() => {
382
+ const n = {
383
+ // root: null,
384
+ rootMargin: "20px"
385
+ }, f = new IntersectionObserver(Q, n);
386
+ x.current && f.observe(x.current);
387
+ }), /* @__PURE__ */ h(Z, { children: [
388
+ /* @__PURE__ */ h(
389
+ De,
390
+ {
391
+ showConfirmation: o,
392
+ setShowConfirmation: y,
393
+ action: q,
394
+ customStrings: {
395
+ confirmAction: "Delete",
396
+ cancelAction: "Cancel",
397
+ title: "Delete chat"
398
+ },
399
+ children: [
400
+ /* @__PURE__ */ e("p", { className: "m-0", children: "Are you sure you want to delete the following chat:" }),
401
+ /* @__PURE__ */ h("ul", { className: "m-0", children: [
402
+ /* @__PURE__ */ h("li", { children: [
403
+ "Timestamp:",
404
+ " ",
405
+ /* @__PURE__ */ e("span", { className: "text-lg", children: l.current && l.current.timestamp })
406
+ ] }),
407
+ /* @__PURE__ */ h("li", { children: [
408
+ "First message:",
409
+ " ",
410
+ /* @__PURE__ */ e("span", { className: "text-lg", children: l.current?.message })
411
+ ] })
412
+ ] })
413
+ ]
414
+ }
415
+ ),
416
+ /* @__PURE__ */ e("div", { className: ne, children: /* @__PURE__ */ e(ve, { containerId: "history-table" }) }),
417
+ /* @__PURE__ */ e(
418
+ $e,
419
+ {
420
+ filteredHistory: c,
421
+ historyState: u,
422
+ lastEntryToLoad: t,
423
+ onClickSort: j,
424
+ onClickRestore: X,
425
+ onClickDelete: J,
426
+ infinityScrollMarkerRef: x
427
+ }
428
+ )
429
+ ] });
430
+ }, je = ({
431
+ open: c,
432
+ onOpenChange: a
433
+ }) => {
434
+ const { getAccessToken: d, user: m } = $(), { dispatch: i } = D(Y), [T, x] = R([]), l = k(null), { state: o, dispatch: y } = D(G), [t, s] = R(
435
+ o.sortDirection
436
+ ), { data: u, refetch: C } = _e({
437
+ enabled: c,
438
+ user: m?.username || "",
439
+ searchString: o.searchString,
440
+ sortDirection: t,
441
+ sortedCell: o.sortedCell,
442
+ getAccessToken: d
443
+ }), [, E] = W({
444
+ key: F + ie,
445
+ initialValue: o.searchString
446
+ });
447
+ M(() => {
448
+ o.sortDirection !== t && s(o.sortDirection);
449
+ }, [o, t]), M(() => {
450
+ u && x(u);
451
+ }, [u]);
452
+ const N = async (g) => {
453
+ E(g), y({
454
+ type: he,
455
+ payload: { searchString: g }
456
+ });
457
+ }, v = me((g) => {
458
+ N(g.target.value.trim());
459
+ }, 500);
460
+ return /* @__PURE__ */ h(be, { open: c, onOpenChange: a, title: le, children: [
461
+ /* @__PURE__ */ e("form", { autoComplete: "off", onSubmit: async (g) => {
462
+ g.preventDefault();
463
+ }, children: /* @__PURE__ */ e(
464
+ de,
465
+ {
466
+ placeholder: "Search",
467
+ labelHidden: !0,
468
+ noBorder: !0,
469
+ autoCapitalize: "off",
470
+ autoComplete: "off",
471
+ autoCorrect: "off",
472
+ ref: l,
473
+ defaultValue: o.searchString,
474
+ focusMode: "light",
475
+ mode: "light",
476
+ name: "Search",
477
+ label: "Search",
478
+ onChange: v,
479
+ className: "my-2",
480
+ rightElement: /* @__PURE__ */ e("div", { className: "text-copy-dark", children: /* @__PURE__ */ e(
481
+ O,
482
+ {
483
+ mode: "dark",
484
+ focusMode: "dark",
485
+ label: "Search",
486
+ size: "small",
487
+ onClick: () => {
488
+ N(""), l.current?.value && (l.current.value = "", l.current.focus());
489
+ },
490
+ disabled: o.searchString === "",
491
+ children: o.searchString !== "" ? /* @__PURE__ */ e(ze, { monotone: !0, size: "size-3" }) : /* @__PURE__ */ e(Ve, { monotone: !0, size: "size-3" })
492
+ }
493
+ ) })
494
+ }
495
+ ) }),
496
+ /* @__PURE__ */ e("div", { className: "flex flex-col sm:flex-row max-h-[60vh] min-h-[60vh]", children: /* @__PURE__ */ e(
497
+ Fe,
498
+ {
499
+ mutate: C,
500
+ filteredHistory: T,
501
+ dispatch: i,
502
+ onOpenChange: a
503
+ }
504
+ ) })
505
+ ] });
506
+ };
507
+ export {
508
+ je as HistoryPanel
509
+ };
@@ -1,4 +1,4 @@
1
- import { createContext as xe, createSignal as z, onMount as Dt, createEffect as B, createMemo as q, createComponent as m, Portal as qo, memo as me, Show as R, template as _, insert as k, createRenderEffect as N, className as A, clearDelegatedEvents as bs, delegateEvents as ir, useContext as we, onCleanup as U, sortFns as Hn, mutationSortFns as Vn, on as ct, setAttribute as D, getSidedProp as xs, use as Dn, batch as ws, getQueryStatusLabel as Ot, getMutationStatusColor as Rt, getQueryStatusColor as $s, getQueryStatusColorByLabel as Cs, displayValue as xn, For as Ss, convertRemToPixels as Kr, untrack as Kt, useTransition as ks, spread as Es, mergeProps as j, createRoot as Br, serialize as Ms, Index as Ds, updateNestedDataByPath as sr, addEventListener as As, stringify as Ts, Match as zn, Switch as Fs, deleteNestedDataByPath as Is, createUniqueId as Be, splitProps as X, Dynamic as Ps, createComputed as Ls, getPreferredColorScheme as Os } from "./index.Bx_do3Wo.js";
1
+ import { createContext as xe, createSignal as z, onMount as Dt, createEffect as B, createMemo as q, createComponent as m, Portal as qo, memo as me, Show as R, template as _, insert as k, createRenderEffect as N, className as A, clearDelegatedEvents as bs, delegateEvents as ir, useContext as we, onCleanup as U, sortFns as Hn, mutationSortFns as Vn, on as ct, setAttribute as D, getSidedProp as xs, use as Dn, batch as ws, getQueryStatusLabel as Ot, getMutationStatusColor as Rt, getQueryStatusColor as $s, getQueryStatusColorByLabel as Cs, displayValue as xn, For as Ss, convertRemToPixels as Kr, untrack as Kt, useTransition as ks, spread as Es, mergeProps as j, createRoot as Br, serialize as Ms, Index as Ds, updateNestedDataByPath as sr, addEventListener as As, stringify as Ts, Match as zn, Switch as Fs, deleteNestedDataByPath as Is, createUniqueId as Be, splitProps as X, Dynamic as Ps, createComputed as Ls, getPreferredColorScheme as Os } from "./index.D_ttuklg.js";
2
2
  var qs = (e) => e != null, _s = (e) => e.filter(qs);
3
3
  function Rs(e) {
4
4
  return (...t) => {
@@ -1,6 +1,6 @@
1
1
  import { jsxs as n, Fragment as m, jsx as e } from "react/jsx-runtime";
2
- import { i as h, nt as S, tt as R } from "./App.jScnP0cm.js";
3
- import { n as N, S as E, renderDataAsList as P, CARDS as r, isTauri as u, ue as T, l, L as p, j as o, PROFILE_TITLE as C } from "./index.Bx_do3Wo.js";
2
+ import { i as h, nt as S, tt as R } from "./App.CIrOEX2C.js";
3
+ import { n as N, S as E, renderDataAsList as P, CARDS as r, isTauri as u, ue as T, l, L as p, j as o, PROFILE_TITLE as C } from "./index.D_ttuklg.js";
4
4
  const A = () => {
5
5
  const { isAuthenticated: t, user: i, registeringForPasskey: a, authenticationType: c } = N(), d = h(), s = i?.username || "";
6
6
  return t && s ? /* @__PURE__ */ n(m, { children: [
@@ -1,6 +1,6 @@
1
1
  import { jsxs as v, jsx as s } from "react/jsx-runtime";
2
- import { n as Ee, LOCAL_STORAGE_PREFIX as ne, LOCAL_STORAGE_CHAT_DETAILS as Te, LOCAL_STORAGE_SERVICE_WORKER as Ne, isServiceWorkerEnabled as ve, SETTINGS_TITLE as _e, S as V, CARDS as P, APP_NAME as we, C as re, PROMPTS_DESCRIPTION as Ce, L as Se, j as se, getCurrentGeoLocation as Ie, handleServiceWorkerToggle as Ae } from "./index.Bx_do3Wo.js";
3
- import { useUserPreferences as Le, E as le, tt as Re, mutateCall as ce, SERVICE_TYPES as ie } from "./App.jScnP0cm.js";
2
+ import { n as Ee, LOCAL_STORAGE_PREFIX as ne, LOCAL_STORAGE_CHAT_DETAILS as Te, LOCAL_STORAGE_SERVICE_WORKER as Ne, isServiceWorkerEnabled as ve, SETTINGS_TITLE as _e, S as V, CARDS as P, APP_NAME as we, C as re, PROMPTS_DESCRIPTION as Ce, L as Se, j as se, getCurrentGeoLocation as Ie, handleServiceWorkerToggle as Ae } from "./index.D_ttuklg.js";
3
+ import { useUserPreferences as Le, E as le, tt as Re, mutateCall as ce, SERVICE_TYPES as ie } from "./App.CIrOEX2C.js";
4
4
  import Oe, { useRef as _, useState as g, useLayoutEffect as j, useMemo as me, useEffect as X, useId as Me, useReducer as De, useCallback as Pe } from "react";
5
5
  import i from "clsx";
6
6
  const fe = "av-text-area", Be = "av-text-area-wrapper", ae = "av-text-area-helper-text", Ge = "av-text-area__control--right", He = "av-text-area__control--left";