@versini/sassysaint 8.44.2 → 8.44.3

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 (24) hide show
  1. package/dist/chunks/{AboutChangelog.BLHJq-Bx.js → AboutChangelog.BdZzSUba.js} +2 -2
  2. package/dist/chunks/{AboutEntry.BItg_Z_k.js → AboutEntry.DzSi7ibC.js} +6 -6
  3. package/dist/chunks/{App.BZtIT_71.js → App.DDTKqerX.js} +4137 -5868
  4. package/dist/chunks/{Chart.CjYL0_xH.js → Chart.PHloGZi7.js} +2 -2
  5. package/dist/chunks/ChatBubbleAssistant.DxGv-_Rb.js +76 -0
  6. package/dist/chunks/ChatHistoryTable.DnkLt1Je.js +1205 -0
  7. package/dist/chunks/HistoryEntry.De2vGpPR.js +282 -0
  8. package/dist/chunks/{LNWAZHJI.BFyrX4cF.js → LNWAZHJI.DBPRjK8f.js} +1 -1
  9. package/dist/chunks/{ProfileEntry.Cjd0chWx.js → ProfileEntry.B9ur9Dzf.js} +2 -2
  10. package/dist/chunks/{SettingsEntry.Bf_QHI_c.js → SettingsEntry.DeQAT_-t.js} +2 -2
  11. package/dist/chunks/{UsageEntry.uYJ25BOH.js → UsageEntry.BmEHDYHp.js} +3 -3
  12. package/dist/chunks/{index.CUG5oJCp.js → index.C1S2cFkO.js} +2 -2
  13. package/dist/chunks/{index.B6WNuA8u.js → index.CrwhT53o.js} +3 -3
  14. package/dist/chunks/{index.DrjLpZAY.js → index.CsbwtA6h.js} +1 -1
  15. package/dist/chunks/{index.DNDMcWAX.js → index.CvN58Fp8.js} +1 -1
  16. package/dist/chunks/index.CyMvgyLB.js +804 -0
  17. package/dist/chunks/{index.1P1jSZep.js → index.DI9PexVP.js} +1 -1
  18. package/dist/chunks/{index.BcjsrdyX.js → index.DNSGhajh.js} +2 -2
  19. package/dist/chunks/{useMarkdown.C0LVyK9z.js → useMarkdown.CujEnDtN.js} +8 -8
  20. package/dist/components/SassySaint/SassySaint.js +1 -1
  21. package/dist/index.js +4 -4
  22. package/package.json +3 -3
  23. package/dist/chunks/ChatBubbleAssistant.CcLVLe6h.js +0 -75
  24. package/dist/chunks/HistoryEntry.CXmbpyvN.js +0 -538
@@ -0,0 +1,282 @@
1
+ import { jsxs as u, jsx as t, Fragment as J } from "react/jsx-runtime";
2
+ import { I as Q, n as z, INFINITE_SCROLL_LIMIT as H, INFINITE_SCROLL_THRESHOLD as Z, LOCAL_STORAGE_PREFIX as g, LOCAL_STORAGE_SORT_TIMESTAMP as ee, LOCAL_STORAGE_SORT_TOKEN_USAGE as te, LOCAL_STORAGE_SORT as ae, ue$1 as A, APP_CLASSNAME as re, ACTION_SORT as se, pe as oe, TOAST_CHAT_DELETED as ne, TOAST_PROVIDER_CHANGED as ie, LOCAL_STORAGE_SEARCH as ce, HISTORY_TITLE as le, pe$1 as de, debounce as he, ue, ACTION_SEARCH as me } from "./index.DNSGhajh.js";
3
+ import { HistoryContext as M, ChatContext as P, useAiChat as Se, E as D, e as h, useUserPreferences as Ce, ConfirmationPanel as pe, LazyToastContainerWrapper as Te, mutateCall as N, SERVICE_TYPES as x, showErrorToast as fe, setNewProvider as ye, CHAT_SET_PROVIDER as Ee, showSuccessToast as ge, CHAT_SET_STATUS as Ae, useChatsHistory as De, tt as _e, a as Ie } from "./App.DDTKqerX.js";
4
+ import { useRef as R, useState as L, useContext as _, useCallback as Oe, useEffect as V, Suspense as Re, lazy as Le } from "react";
5
+ const ve = ({
6
+ className: i,
7
+ viewBox: l,
8
+ title: m,
9
+ monotone: S,
10
+ ...d
11
+ }) => /* @__PURE__ */ u(
12
+ Q,
13
+ {
14
+ defaultViewBox: "0 0 512 512",
15
+ size: "size-5",
16
+ viewBox: l,
17
+ className: i,
18
+ title: m || "Search",
19
+ ...d,
20
+ children: [
21
+ /* @__PURE__ */ t(
22
+ "path",
23
+ {
24
+ 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",
25
+ opacity: S ? "1" : "0.4"
26
+ }
27
+ ),
28
+ /* @__PURE__ */ t("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" })
29
+ ]
30
+ }
31
+ ), ke = Le(
32
+ () => import(
33
+ /* webpackChunkName: "history-table" */
34
+ "./ChatHistoryTable.DnkLt1Je.js"
35
+ ).then((i) => ({ default: i.ChatHistoryTable }))
36
+ ), be = ({
37
+ filteredHistory: i,
38
+ dispatch: l,
39
+ onOpenChange: m,
40
+ mutate: S
41
+ }) => {
42
+ const { user: d, getAccessToken: C } = z(), p = R(null), s = R({
43
+ id: "",
44
+ timestamp: "",
45
+ message: ""
46
+ }), [o, f] = L(!1), [T, I] = L(
47
+ H + Z
48
+ ), { state: n, dispatch: y } = _(M), O = {
49
+ searchString: n.searchString || "",
50
+ sortDirection: n.sortDirection || h.DESC,
51
+ sortedCell: n.sortedCell || A
52
+ }, {
53
+ state: { provider: v },
54
+ setChatId: c,
55
+ setInitialMessages: G
56
+ } = _(P), { setInput: U } = Se(), [k, b] = D({
57
+ key: g + ee,
58
+ initialValue: h.DESC
59
+ }), [F, $] = D({
60
+ key: g + te,
61
+ initialValue: h.ASC
62
+ }), [, B] = D({
63
+ key: g + ae,
64
+ initialValue: A
65
+ }), { refetch: j } = Ce({
66
+ user: d?.username,
67
+ getAccessToken: C
68
+ }), Y = (e) => {
69
+ const r = n.sortedCell === e;
70
+ let a, E;
71
+ switch (e) {
72
+ case A:
73
+ E = b, a = r ? n.sortDirection : k;
74
+ break;
75
+ case oe:
76
+ E = $, a = r ? n.sortDirection : F;
77
+ break;
78
+ default:
79
+ E = b, a = r ? n.sortDirection : k;
80
+ break;
81
+ }
82
+ const w = a === h.ASC ? h.DESC : h.ASC;
83
+ E(w), B(e), y({
84
+ type: se,
85
+ payload: {
86
+ sortedCell: e,
87
+ sortDirection: w
88
+ }
89
+ });
90
+ }, K = async () => {
91
+ const e = s.current;
92
+ try {
93
+ await N({
94
+ accessToken: await C(),
95
+ type: x.DELETE_CHAT,
96
+ params: {
97
+ userId: d?.username || "",
98
+ id: e.id
99
+ }
100
+ }), S(""), await fe(ne, {
101
+ autoClose: 2e3,
102
+ containerId: "history-table"
103
+ });
104
+ } catch {
105
+ }
106
+ }, W = async (e) => {
107
+ try {
108
+ const r = await C(), a = await N({
109
+ accessToken: r,
110
+ type: x.GET_CHAT,
111
+ params: {
112
+ id: e.id
113
+ }
114
+ });
115
+ a.status === 200 && (a.data.provider !== v && (await ye({
116
+ provider: a.data.provider,
117
+ accessToken: r,
118
+ username: d?.username || ""
119
+ }), l({
120
+ type: Ee,
121
+ payload: {
122
+ provider: a.data.provider
123
+ }
124
+ }), j(), await ge(
125
+ `${ie} ${a.data.provider}`,
126
+ {
127
+ containerId: "toggle-provider"
128
+ }
129
+ )), l({
130
+ type: Ae,
131
+ payload: {
132
+ restoring: !0,
133
+ restoredModel: a.data?.model || "",
134
+ restoredUsage: a.data?.tokenUsage || 0
135
+ }
136
+ }), U(""), c(e.id), G(a.data.messages), m(!1));
137
+ } catch {
138
+ }
139
+ }, X = (e) => {
140
+ s.current = {
141
+ id: e.id,
142
+ timestamp: e.timestamp,
143
+ message: e.messages.length > 0 ? e.messages[0]?.content : ""
144
+ }, f(!o);
145
+ }, q = Oe((e) => {
146
+ e[0].isIntersecting && I((a) => a + H);
147
+ }, []);
148
+ return V(() => {
149
+ const e = {
150
+ // root: null,
151
+ rootMargin: "20px"
152
+ }, r = new IntersectionObserver(q, e);
153
+ p.current && r.observe(p.current);
154
+ }), /* @__PURE__ */ u(J, { children: [
155
+ /* @__PURE__ */ u(
156
+ pe,
157
+ {
158
+ showConfirmation: o,
159
+ setShowConfirmation: f,
160
+ action: K,
161
+ customStrings: {
162
+ confirmAction: "Delete",
163
+ cancelAction: "Cancel",
164
+ title: "Delete chat"
165
+ },
166
+ children: [
167
+ /* @__PURE__ */ t("p", { className: "m-0", children: "Are you sure you want to delete the following chat:" }),
168
+ /* @__PURE__ */ u("ul", { className: "m-0", children: [
169
+ /* @__PURE__ */ u("li", { children: [
170
+ "Timestamp:",
171
+ " ",
172
+ /* @__PURE__ */ t("span", { className: "text-lg", children: s.current && s.current.timestamp })
173
+ ] }),
174
+ /* @__PURE__ */ u("li", { children: [
175
+ "First message:",
176
+ " ",
177
+ /* @__PURE__ */ t("span", { className: "text-lg", children: s.current?.message })
178
+ ] })
179
+ ] })
180
+ ]
181
+ }
182
+ ),
183
+ /* @__PURE__ */ t("div", { className: re, children: /* @__PURE__ */ t(Te, { containerId: "history-table" }) }),
184
+ /* @__PURE__ */ t(Re, { fallback: /* @__PURE__ */ t("div", {}), children: /* @__PURE__ */ t(
185
+ ke,
186
+ {
187
+ filteredHistory: i,
188
+ historyState: O,
189
+ lastEntryToLoad: T,
190
+ onClickSort: Y,
191
+ onClickRestore: W,
192
+ onClickDelete: X,
193
+ infinityScrollMarkerRef: p
194
+ }
195
+ ) })
196
+ ] });
197
+ }, ze = ({
198
+ open: i,
199
+ onOpenChange: l
200
+ }) => {
201
+ const { getAccessToken: m, user: S } = z(), { dispatch: d } = _(P), [C, p] = L([]), s = R(null), { state: o, dispatch: f } = _(M), { data: T, refetch: I } = De({
202
+ enabled: i,
203
+ user: S?.username || "",
204
+ searchString: o.searchString || "",
205
+ sortDirection: o.sortDirection || h.DESC,
206
+ sortedCell: o.sortedCell || A,
207
+ getAccessToken: m
208
+ }), [, n] = D({
209
+ key: g + ce,
210
+ initialValue: o.searchString
211
+ });
212
+ V(() => {
213
+ T && p(T);
214
+ }, [T]);
215
+ const y = async (c) => {
216
+ n(c), f({
217
+ type: me,
218
+ payload: { searchString: c }
219
+ });
220
+ }, O = he((c) => {
221
+ y(c.target.value.trim());
222
+ }, 500);
223
+ return /* @__PURE__ */ u(
224
+ _e,
225
+ {
226
+ open: i,
227
+ onOpenChange: l,
228
+ title: le,
229
+ animation: !0,
230
+ animationType: "fade",
231
+ children: [
232
+ /* @__PURE__ */ t("form", { autoComplete: "off", onSubmit: async (c) => {
233
+ c.preventDefault();
234
+ }, children: /* @__PURE__ */ t(
235
+ de,
236
+ {
237
+ placeholder: "Search",
238
+ labelHidden: !0,
239
+ noBorder: !0,
240
+ autoCapitalize: "off",
241
+ autoComplete: "off",
242
+ autoCorrect: "off",
243
+ ref: s,
244
+ defaultValue: o.searchString,
245
+ focusMode: "light",
246
+ mode: "light",
247
+ name: "Search",
248
+ label: "Search",
249
+ onChange: O,
250
+ className: "my-2",
251
+ rightElement: /* @__PURE__ */ t("div", { className: "text-copy-dark", children: /* @__PURE__ */ t(
252
+ ue,
253
+ {
254
+ mode: "dark",
255
+ focusMode: "dark",
256
+ label: "Search",
257
+ size: "small",
258
+ onClick: () => {
259
+ y(""), s.current?.value && (s.current.value = "", s.current.focus());
260
+ },
261
+ disabled: o.searchString === "",
262
+ children: o.searchString !== "" ? /* @__PURE__ */ t(Ie, { monotone: !0, size: "size-3" }) : /* @__PURE__ */ t(ve, { monotone: !0, size: "size-3" })
263
+ }
264
+ ) })
265
+ }
266
+ ) }),
267
+ /* @__PURE__ */ t("div", { className: "flex flex-col sm:flex-row max-h-[75vh] min-h-[60vh]", children: /* @__PURE__ */ t(
268
+ be,
269
+ {
270
+ mutate: I,
271
+ filteredHistory: C,
272
+ dispatch: d,
273
+ onOpenChange: l
274
+ }
275
+ ) })
276
+ ]
277
+ }
278
+ );
279
+ };
280
+ export {
281
+ ze as HistoryPanel
282
+ };
@@ -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.BcjsrdyX.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.DNSGhajh.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 t, Fragment as m, jsx as e } from "react/jsx-runtime";
2
- import { i as h, nt as S, tt as R } from "./App.BZtIT_71.js";
3
- import { n as u, S as a, renderDataAsList as N, CARDS as r, isTauri as P, ue as T, l as E, L as p, j as l, PROFILE_TITLE as C } from "./index.BcjsrdyX.js";
2
+ import { i as h, nt as S, tt as R } from "./App.DDTKqerX.js";
3
+ import { n as u, S as a, renderDataAsList as N, CARDS as r, isTauri as P, ue as T, l as E, L as p, j as l, PROFILE_TITLE as C } from "./index.DNSGhajh.js";
4
4
  const A = () => {
5
5
  const { isAuthenticated: n, user: i, registeringForPasskey: o, authenticationType: c } = u(), d = h(), s = i?.username || "";
6
6
  return n && s ? /* @__PURE__ */ t(m, { children: [
@@ -1,6 +1,6 @@
1
1
  import { jsxs as N, jsx as l } from "react/jsx-runtime";
2
- import { n as ke, LOCAL_STORAGE_PREFIX as xe, LOCAL_STORAGE_SERVICE_WORKER as Ee, isServiceWorkerEnabled as Te, SETTINGS_TITLE as we, S as $, CARDS as P, Oe as Ne, C as re, PROMPTS_DESCRIPTION as ve, L as _e, j as ne, getCurrentGeoLocation as Ce, handleServiceWorkerToggle as Se } from "./index.BcjsrdyX.js";
3
- import { useUserPreferences as Ie, E as Ae, tt as Le, mutateCall as se, SERVICE_TYPES as le } from "./App.BZtIT_71.js";
2
+ import { n as ke, LOCAL_STORAGE_PREFIX as xe, LOCAL_STORAGE_SERVICE_WORKER as Ee, isServiceWorkerEnabled as Te, SETTINGS_TITLE as we, S as $, CARDS as P, Oe as Ne, C as re, PROMPTS_DESCRIPTION as ve, L as _e, j as ne, getCurrentGeoLocation as Ce, handleServiceWorkerToggle as Se } from "./index.DNSGhajh.js";
3
+ import { useUserPreferences as Ie, E as Ae, tt as Le, mutateCall as se, SERVICE_TYPES as le } from "./App.DDTKqerX.js";
4
4
  import Re, { useRef as v, useState as h, useLayoutEffect as j, useMemo as de, useEffect as X, useId as Me, useReducer as Oe, useCallback as De } from "react";
5
5
  import i from "clsx";
6
6
  const ue = "av-text-area", Pe = "av-text-area-wrapper", ae = "av-text-area-helper-text", Be = "av-text-area__control--right", Ge = "av-text-area__control--left";
@@ -1,10 +1,10 @@
1
1
  import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
- import { n as f, USAGE_TITLE as U, S as h, renderDataAsList as v, CARDS as n, L as E, j as L, C as m, pluralize as i } from "./index.BcjsrdyX.js";
3
- import { i as M, useUserChatStats as _, useChatsUsage as D, tt as z } from "./App.BZtIT_71.js";
2
+ import { n as f, USAGE_TITLE as U, S as h, renderDataAsList as v, CARDS as n, L as E, j as L, C as m, pluralize as i } from "./index.DNSGhajh.js";
3
+ import { i as M, useUserChatStats as _, useChatsUsage as D, tt as z } from "./App.DDTKqerX.js";
4
4
  import { useState as O, Suspense as P, lazy as B } from "react";
5
5
  const t = [0, 3, 6, 9], j = B(() => import(
6
6
  /* webpackChunkName: "LazyChart" */
7
- "./Chart.CjYL0_xH.js"
7
+ "./Chart.PHloGZi7.js"
8
8
  )), b = ({
9
9
  open: S,
10
10
  onOpenChange: I
@@ -1,5 +1,5 @@
1
- import { find as Aa, parse as Ft, parse$1 as Ht, normalize as Pt, html as Ta, svg as Ba, visitParents as Na, SKIP as Da } from "./useMarkdown.C0LVyK9z.js";
2
- import { toText as Ca } from "./index.1P1jSZep.js";
1
+ import { find as Aa, parse as Ft, parse$1 as Ht, normalize as Pt, html as Ta, svg as Ba, visitParents as Na, SKIP as Da } from "./useMarkdown.CujEnDtN.js";
2
+ import { toText as Ca } from "./index.DI9PexVP.js";
3
3
  const Gt = /[#.]/g;
4
4
  function qa(r, e) {
5
5
  const t = r || "", a = {};
@@ -1,6 +1,6 @@
1
- import { getDefaultExportFromCjs as kn } from "./App.BZtIT_71.js";
2
- import { visit as In } from "./useMarkdown.C0LVyK9z.js";
3
- import { toText as Cn } from "./index.1P1jSZep.js";
1
+ import { getDefaultExportFromCjs as kn } from "./App.DDTKqerX.js";
2
+ import { visit as In } from "./useMarkdown.CujEnDtN.js";
3
+ import { toText as Cn } from "./index.DI9PexVP.js";
4
4
  function xn(e) {
5
5
  const t = e.regex, i = e.COMMENT("//", "$", { contains: [{ begin: /\\\n/ }] }), a = "decltype\\(auto\\)", r = "[a-zA-Z_]\\w*::", d = "(?!struct)(" + a + "|" + t.optional(r) + "[a-zA-Z_]\\w*" + t.optional("<[^<>]+>") + ")", c = {
6
6
  className: "type",
@@ -1,4 +1,4 @@
1
- import { convert as se, visitParents as Me, unicodeWhitespace as I, unicodePunctuation as N, normalizeIdentifier as _, classifyCharacter as W, visit as _e, toString as ce, EXIT as Oe, asciiAlphanumeric as Z, asciiAlpha as P, markdownLineEndingOrSpace as A, asciiControl as je, blankLine as Be, factorySpace as S, splice as q, resolveAll as We, markdownLineEnding as R, markdownSpace as T, combineExtensions as $e } from "./useMarkdown.C0LVyK9z.js";
1
+ import { convert as se, visitParents as Me, unicodeWhitespace as I, unicodePunctuation as N, normalizeIdentifier as _, classifyCharacter as W, visit as _e, toString as ce, EXIT as Oe, asciiAlphanumeric as Z, asciiAlpha as P, markdownLineEndingOrSpace as A, asciiControl as je, blankLine as Be, factorySpace as S, splice as q, resolveAll as We, markdownLineEnding as R, markdownSpace as T, combineExtensions as $e } from "./useMarkdown.CujEnDtN.js";
2
2
  import { longestStreak as qe } from "./index.Cyw5OC0t.js";
3
3
  function ne(e, n) {
4
4
  const t = String(e);
@@ -1,4 +1,4 @@
1
- import { factorySpace as M, markdownLineEnding as g } from "./useMarkdown.C0LVyK9z.js";
1
+ import { factorySpace as M, markdownLineEnding as g } from "./useMarkdown.CujEnDtN.js";
2
2
  import { longestStreak as q } from "./index.Cyw5OC0t.js";
3
3
  function b() {
4
4
  return {