@versini/sassysaint 8.50.1 → 8.51.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.
- package/dist/chunks/{AboutChangelog.BDo1-fzi.js → AboutChangelog.BIKGjlK4.js} +2 -2
- package/dist/chunks/{AboutEntry.BH88UaZx.js → AboutEntry.Bvl_l0xS.js} +5 -5
- package/dist/chunks/{App.QIy4AIaz.js → App.G5LEkLPc.js} +345 -341
- package/dist/chunks/{Chart.t3ZXF73j.js → Chart.O7iJjuZ1.js} +662 -660
- package/dist/chunks/{ChatBubbleAssistant.tWJz9jxI.js → ChatBubbleAssistant.DR6NuTsN.js} +4 -4
- package/dist/chunks/{ChatBubbleUser.BsPt1Fgz.js → ChatBubbleUser.DyDiVXkT.js} +3 -3
- package/dist/chunks/ChatHistoryTable.Ceddivd9.js +236 -0
- package/dist/chunks/{HistoryEntry.CdAYZCrj.js → HistoryEntry.DNEz-Xkp.js} +3 -3
- package/dist/chunks/{ProfileEntry.qPN0Xe6S.js → ProfileEntry.BGVFwilC.js} +2 -2
- package/dist/chunks/SettingsEntry.D9FWahsa.js +964 -0
- package/dist/chunks/Table.CpK7zURs.js +429 -0
- package/dist/chunks/{UsageEntry.axUSgiS0.js → UsageEntry.BdEcEOro.js} +3 -3
- package/dist/chunks/{index.N7LUSv0I.js → index.6OcHe6xE.js} +3 -3
- package/dist/chunks/{index.Caa3MVly.js → index.BUTJCc-o.js} +1 -1
- package/dist/chunks/{index.D1zH_2x6.js → index.CoXgq2rQ.js} +1 -1
- package/dist/chunks/{index.DtjS4202.js → index.DRMQdLp_.js} +2095 -1846
- package/dist/chunks/{index.Vi5HircF.js → index.DvVy8-Zq.js} +2 -2
- package/dist/chunks/{index.jefijINX.js → index.E5R-gRQM.js} +1 -1
- package/dist/chunks/{index.DTeiwmVN.js → index.T93ZkOuc.js} +1 -1
- package/dist/chunks/{useMarkdown.B5cyvrlh.js → useMarkdown.CYsjqhfo.js} +6 -6
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/dist/style.css +3 -3
- package/package.json +5 -5
- package/dist/chunks/ChatHistoryTable.RqkR5XYw.js +0 -649
- package/dist/chunks/SettingsEntry.CH79zLy_.js +0 -755
@@ -1,10 +1,10 @@
|
|
1
1
|
import { jsx as M } from "react/jsx-runtime";
|
2
|
-
import { n as N, useUserPreferences as O, convertCamelCaseToReadable as P, numberFormatter as R, pluralize as y, ne as L } from "./index.
|
3
|
-
import { BUBBLE_FOOTER_EMPTY as _ } from "./index.
|
2
|
+
import { n as N, useUserPreferences as O, convertCamelCaseToReadable as P, numberFormatter as R, pluralize as y, ne as L } from "./index.DRMQdLp_.js";
|
3
|
+
import { BUBBLE_FOOTER_EMPTY as _ } from "./index.BUTJCc-o.js";
|
4
4
|
import w from "clsx";
|
5
5
|
import v, { useState as b, useRef as A, useEffect as U, useContext as B } from "react";
|
6
|
-
import { ChatContext as G, AsyncBubble as E } from "./App.
|
7
|
-
import { useMarkdown as D } from "./useMarkdown.
|
6
|
+
import { ChatContext as G, AsyncBubble as E } from "./App.G5LEkLPc.js";
|
7
|
+
import { useMarkdown as D } from "./useMarkdown.CYsjqhfo.js";
|
8
8
|
const j = 2, q = j * 1e3, x = "", I = (e) => e * (2 - e);
|
9
9
|
function W(e, n = !0) {
|
10
10
|
const [a, p] = b(0), [i, C] = b(0), [t, T] = b(e), r = A(0), s = A(0);
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { jsx as n, Fragment as b, jsxs as A } from "react/jsx-runtime";
|
2
2
|
import { useState as C, useMemo as u, isValidElement as p, useEffect as I } from "react";
|
3
|
-
import { AsyncBubble as w } from "./App.
|
4
|
-
import { useMarkdown as _ } from "./useMarkdown.
|
5
|
-
import { C as M } from "./index.
|
3
|
+
import { AsyncBubble as w } from "./App.G5LEkLPc.js";
|
4
|
+
import { useMarkdown as _ } from "./useMarkdown.CYsjqhfo.js";
|
5
|
+
import { C as M } from "./index.DRMQdLp_.js";
|
6
6
|
const R = 200, N = ({
|
7
7
|
string: e,
|
8
8
|
idealLength: r = R
|
@@ -0,0 +1,236 @@
|
|
1
|
+
import { jsxs as m, jsx as e } from "react/jsx-runtime";
|
2
|
+
import { I as E, Ae as p, ue as u, INFINITE_SCROLL_THRESHOLD as w, CARDS as y, pluralize as f, te as g, numberFormatter as v, ye as D, isProbablyMobile as U, y as b, i$1 as I, E as k } from "./index.DRMQdLp_.js";
|
3
|
+
import { st as O, p$1 as z, z as P, p$2 as V } from "./App.G5LEkLPc.js";
|
4
|
+
import { Fragment as _ } from "react";
|
5
|
+
import { j as $, D as B, G as x, H, U as L, M as a, F as R, l as Y } from "./Table.CpK7zURs.js";
|
6
|
+
const F = ({
|
7
|
+
className: l,
|
8
|
+
viewBox: n,
|
9
|
+
title: o,
|
10
|
+
monotone: i,
|
11
|
+
...h
|
12
|
+
}) => /* @__PURE__ */ m(
|
13
|
+
E,
|
14
|
+
{
|
15
|
+
defaultViewBox: "0 0 512 512",
|
16
|
+
size: "size-5",
|
17
|
+
viewBox: n,
|
18
|
+
className: l,
|
19
|
+
title: o || "Restore",
|
20
|
+
...h,
|
21
|
+
children: [
|
22
|
+
/* @__PURE__ */ e(
|
23
|
+
"path",
|
24
|
+
{
|
25
|
+
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",
|
26
|
+
opacity: i ? "1" : "0.4"
|
27
|
+
}
|
28
|
+
),
|
29
|
+
/* @__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" })
|
30
|
+
]
|
31
|
+
}
|
32
|
+
), G = {
|
33
|
+
[k]: V,
|
34
|
+
[I]: P,
|
35
|
+
[b]: z
|
36
|
+
}, t = {
|
37
|
+
ROW: "row",
|
38
|
+
TIMESTAMP: p,
|
39
|
+
SUMMARY: "summary",
|
40
|
+
PROVIDER: "provider",
|
41
|
+
TOKEN_USAGE: u,
|
42
|
+
ACTIONS: "actions"
|
43
|
+
}, K = [
|
44
|
+
t.ROW,
|
45
|
+
t.TIMESTAMP,
|
46
|
+
t.SUMMARY,
|
47
|
+
t.ACTIONS
|
48
|
+
], W = [
|
49
|
+
t.ROW,
|
50
|
+
t.SUMMARY,
|
51
|
+
t.TIMESTAMP,
|
52
|
+
t.TOKEN_USAGE,
|
53
|
+
t.PROVIDER,
|
54
|
+
t.ACTIONS
|
55
|
+
], ee = ({
|
56
|
+
filteredHistory: l,
|
57
|
+
historyState: n,
|
58
|
+
lastEntryToLoad: o,
|
59
|
+
onClickSort: i,
|
60
|
+
onClickRestore: h,
|
61
|
+
onClickDelete: T,
|
62
|
+
infinityScrollMarkerRef: C
|
63
|
+
}) => {
|
64
|
+
const M = U() ? K : W, S = (s) => {
|
65
|
+
switch (s) {
|
66
|
+
case t.ROW:
|
67
|
+
return /* @__PURE__ */ e(a, { className: "sr-only", children: "Row" }, s);
|
68
|
+
case t.TIMESTAMP:
|
69
|
+
return /* @__PURE__ */ e(
|
70
|
+
R,
|
71
|
+
{
|
72
|
+
buttonClassName: "text-xs sm:text-sm",
|
73
|
+
cellId: p,
|
74
|
+
align: "left",
|
75
|
+
sortDirection: n.sortDirection,
|
76
|
+
sortedCell: n.sortedCell,
|
77
|
+
onClick: () => {
|
78
|
+
i(p);
|
79
|
+
},
|
80
|
+
children: "Date"
|
81
|
+
},
|
82
|
+
s
|
83
|
+
);
|
84
|
+
case t.SUMMARY:
|
85
|
+
return /* @__PURE__ */ e(a, { className: "text-xs sm:text-sm", children: "Summary" }, s);
|
86
|
+
case t.PROVIDER:
|
87
|
+
return /* @__PURE__ */ e(a, { className: "text-xs sm:text-sm", children: "Provider" }, s);
|
88
|
+
case t.TOKEN_USAGE:
|
89
|
+
return /* @__PURE__ */ e(
|
90
|
+
R,
|
91
|
+
{
|
92
|
+
buttonClassName: "text-xs sm:text-sm",
|
93
|
+
cellId: u,
|
94
|
+
align: "right",
|
95
|
+
sortDirection: n.sortDirection,
|
96
|
+
sortedCell: n.sortedCell,
|
97
|
+
onClick: () => {
|
98
|
+
i(u);
|
99
|
+
},
|
100
|
+
children: "Tokens"
|
101
|
+
},
|
102
|
+
s
|
103
|
+
);
|
104
|
+
case t.ACTIONS:
|
105
|
+
return /* @__PURE__ */ e(a, { className: "text-xs sm:text-sm text-right", children: "Actions" }, s);
|
106
|
+
default:
|
107
|
+
return null;
|
108
|
+
}
|
109
|
+
}, A = (s, r, d) => {
|
110
|
+
switch (s) {
|
111
|
+
case t.ROW:
|
112
|
+
return /* @__PURE__ */ e(a, { children: d + 1 }, s);
|
113
|
+
case t.TIMESTAMP:
|
114
|
+
return /* @__PURE__ */ e(
|
115
|
+
a,
|
116
|
+
{
|
117
|
+
component: "th",
|
118
|
+
scope: "row",
|
119
|
+
className: "text-gray-400 sm:whitespace-nowrap text-xs sm:text-sm max-w-20 sm:max-w-none",
|
120
|
+
children: r.timestamp.split(",")[0]
|
121
|
+
},
|
122
|
+
s
|
123
|
+
);
|
124
|
+
case t.SUMMARY: {
|
125
|
+
const c = r.summary || (r.messages.length > 0 ? r.messages[0]?.content : "");
|
126
|
+
return /* @__PURE__ */ e(
|
127
|
+
a,
|
128
|
+
{
|
129
|
+
className: "max-w-[100px] text-white sm:max-w-full text-xs sm:text-sm",
|
130
|
+
style: {
|
131
|
+
wordBreak: "break-word"
|
132
|
+
},
|
133
|
+
children: c
|
134
|
+
},
|
135
|
+
s
|
136
|
+
);
|
137
|
+
}
|
138
|
+
case t.PROVIDER: {
|
139
|
+
const c = r.model ? D(r.model) : null, N = c ? G[c] : null;
|
140
|
+
return /* @__PURE__ */ e(
|
141
|
+
a,
|
142
|
+
{
|
143
|
+
component: "th",
|
144
|
+
scope: "row",
|
145
|
+
className: "text-gray-400",
|
146
|
+
align: "center",
|
147
|
+
children: N ? /* @__PURE__ */ e(
|
148
|
+
N,
|
149
|
+
{
|
150
|
+
size: "size-4 sm:size-5",
|
151
|
+
semantic: !0,
|
152
|
+
title: r.model || c
|
153
|
+
}
|
154
|
+
) : null
|
155
|
+
},
|
156
|
+
s
|
157
|
+
);
|
158
|
+
}
|
159
|
+
case t.TOKEN_USAGE:
|
160
|
+
return /* @__PURE__ */ e(
|
161
|
+
a,
|
162
|
+
{
|
163
|
+
className: "text-gray-400 text-xs sm:text-sm",
|
164
|
+
align: "right",
|
165
|
+
children: r.tokenUsage ? v.format(r.tokenUsage) : "0"
|
166
|
+
},
|
167
|
+
s
|
168
|
+
);
|
169
|
+
case t.ACTIONS:
|
170
|
+
return /* @__PURE__ */ e(a, { children: /* @__PURE__ */ m("div", { className: "flex flex-col items-end sm:flex-row gap-2", children: [
|
171
|
+
/* @__PURE__ */ e(
|
172
|
+
O,
|
173
|
+
{
|
174
|
+
label: "Restore chat",
|
175
|
+
mode: "alt-system",
|
176
|
+
placement: "top",
|
177
|
+
trigger: /* @__PURE__ */ e(
|
178
|
+
g,
|
179
|
+
{
|
180
|
+
focusMode: "alt-system",
|
181
|
+
noBorder: !0,
|
182
|
+
label: "Restore chat",
|
183
|
+
variant: "primary",
|
184
|
+
iconClassName: "text-green-800 dark:text-green-500",
|
185
|
+
onClick: async () => {
|
186
|
+
await h(r);
|
187
|
+
},
|
188
|
+
children: /* @__PURE__ */ e(F, { size: "size-3", monotone: !0 })
|
189
|
+
}
|
190
|
+
)
|
191
|
+
}
|
192
|
+
),
|
193
|
+
/* @__PURE__ */ e(
|
194
|
+
O,
|
195
|
+
{
|
196
|
+
label: "Delete chat",
|
197
|
+
mode: "alt-system",
|
198
|
+
placement: "top",
|
199
|
+
trigger: /* @__PURE__ */ e(
|
200
|
+
g,
|
201
|
+
{
|
202
|
+
focusMode: "alt-system",
|
203
|
+
noBorder: !0,
|
204
|
+
label: "Delete chat",
|
205
|
+
variant: "primary",
|
206
|
+
iconClassName: "text-red-700 dark:text-red-500",
|
207
|
+
onClick: () => {
|
208
|
+
T(r);
|
209
|
+
},
|
210
|
+
children: /* @__PURE__ */ e(Y, { size: "size-3", monotone: !0 })
|
211
|
+
}
|
212
|
+
)
|
213
|
+
}
|
214
|
+
)
|
215
|
+
] }) }, s);
|
216
|
+
default:
|
217
|
+
return null;
|
218
|
+
}
|
219
|
+
};
|
220
|
+
return /* @__PURE__ */ m($, { stickyHeader: !0, stickyFooter: !0, compact: !0, children: [
|
221
|
+
/* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(x, { children: M.map((s) => S(s)) }) }),
|
222
|
+
/* @__PURE__ */ e(H, { children: l.slice(0, o).map((s, r) => s?.messages?.length > 0 ? /* @__PURE__ */ m(_, { children: [
|
223
|
+
r === o - w && /* @__PURE__ */ e("tr", { ref: C }),
|
224
|
+
/* @__PURE__ */ e(x, { children: M.map(
|
225
|
+
(d) => A(d, s, r)
|
226
|
+
) })
|
227
|
+
] }, `${y.HISTORY.TITLE}-${s.id}-${r}`) : null) }),
|
228
|
+
/* @__PURE__ */ e(L, { children: /* @__PURE__ */ e(x, { children: /* @__PURE__ */ e(a, { colSpan: 1e3, children: /* @__PURE__ */ e("div", { children: f(
|
229
|
+
`${l.length} chat`,
|
230
|
+
l.length
|
231
|
+
) }) }) }) })
|
232
|
+
] });
|
233
|
+
};
|
234
|
+
export {
|
235
|
+
ee as ChatHistoryTable
|
236
|
+
};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { jsxs as m, 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, Ae as A, useUserPreferences as re, APP_CLASSNAME as se, mutateCall as N, SERVICE_TYPES as x, setNewProvider as oe, ACTION_SORT as ne, ue as ie, TOAST_CHAT_DELETED as ce, TOAST_PROVIDER_CHANGED as le, useChatsHistory as de, LOCAL_STORAGE_SEARCH as he, HISTORY_TITLE as me, Y as ue, debounce as Se, te as Ce, ACTION_SEARCH as pe } from "./index.
|
3
|
-
import { HistoryContext as M, ChatContext as P, useAiChat as Te, E as D, e as h, ConfirmationPanel as fe, LazyToastContainerWrapper as ye, showErrorToast as Ee, CHAT_SET_PROVIDER as ge, showSuccessToast as Ae, CHAT_SET_STATUS as De, se as _e, a as Ie } from "./App.
|
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, Ae as A, useUserPreferences as re, APP_CLASSNAME as se, mutateCall as N, SERVICE_TYPES as x, setNewProvider as oe, ACTION_SORT as ne, ue as ie, TOAST_CHAT_DELETED as ce, TOAST_PROVIDER_CHANGED as le, useChatsHistory as de, LOCAL_STORAGE_SEARCH as he, HISTORY_TITLE as me, Y as ue, debounce as Se, te as Ce, ACTION_SEARCH as pe } from "./index.DRMQdLp_.js";
|
3
|
+
import { HistoryContext as M, ChatContext as P, useAiChat as Te, E as D, e as h, ConfirmationPanel as fe, LazyToastContainerWrapper as ye, showErrorToast as Ee, CHAT_SET_PROVIDER as ge, showSuccessToast as Ae, CHAT_SET_STATUS as De, se as _e, a as Ie } from "./App.G5LEkLPc.js";
|
4
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
5
|
const ve = ({
|
6
6
|
className: i,
|
@@ -31,7 +31,7 @@ const ve = ({
|
|
31
31
|
), ke = Le(
|
32
32
|
() => import(
|
33
33
|
/* webpackChunkName: "history-table" */
|
34
|
-
"./ChatHistoryTable.
|
34
|
+
"./ChatHistoryTable.Ceddivd9.js"
|
35
35
|
).then((i) => ({ default: i.ChatHistoryTable }))
|
36
36
|
), be = ({
|
37
37
|
filteredHistory: i,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { jsxs as t, Fragment as m, jsx as e } from "react/jsx-runtime";
|
2
|
-
import { se as h } from "./App.
|
3
|
-
import { n as S, i as R, S as a, renderDataAsList as N, CARDS as r, it as P, isTauri as u, te as T, l as E, L as p, j as l, PROFILE_TITLE as C } from "./index.
|
2
|
+
import { se as h } from "./App.G5LEkLPc.js";
|
3
|
+
import { n as S, i as R, S as a, renderDataAsList as N, CARDS as r, it as P, isTauri as u, te as T, l as E, L as p, j as l, PROFILE_TITLE as C } from "./index.DRMQdLp_.js";
|
4
4
|
const A = () => {
|
5
5
|
const { isAuthenticated: n, user: i, registeringForPasskey: o, authenticationType: c } = S(), d = R(), s = i?.username || "";
|
6
6
|
return n && s ? /* @__PURE__ */ t(m, { children: [
|