@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.
Files changed (26) hide show
  1. package/dist/chunks/{AboutChangelog.BDo1-fzi.js → AboutChangelog.BIKGjlK4.js} +2 -2
  2. package/dist/chunks/{AboutEntry.BH88UaZx.js → AboutEntry.Bvl_l0xS.js} +5 -5
  3. package/dist/chunks/{App.QIy4AIaz.js → App.G5LEkLPc.js} +345 -341
  4. package/dist/chunks/{Chart.t3ZXF73j.js → Chart.O7iJjuZ1.js} +662 -660
  5. package/dist/chunks/{ChatBubbleAssistant.tWJz9jxI.js → ChatBubbleAssistant.DR6NuTsN.js} +4 -4
  6. package/dist/chunks/{ChatBubbleUser.BsPt1Fgz.js → ChatBubbleUser.DyDiVXkT.js} +3 -3
  7. package/dist/chunks/ChatHistoryTable.Ceddivd9.js +236 -0
  8. package/dist/chunks/{HistoryEntry.CdAYZCrj.js → HistoryEntry.DNEz-Xkp.js} +3 -3
  9. package/dist/chunks/{ProfileEntry.qPN0Xe6S.js → ProfileEntry.BGVFwilC.js} +2 -2
  10. package/dist/chunks/SettingsEntry.D9FWahsa.js +964 -0
  11. package/dist/chunks/Table.CpK7zURs.js +429 -0
  12. package/dist/chunks/{UsageEntry.axUSgiS0.js → UsageEntry.BdEcEOro.js} +3 -3
  13. package/dist/chunks/{index.N7LUSv0I.js → index.6OcHe6xE.js} +3 -3
  14. package/dist/chunks/{index.Caa3MVly.js → index.BUTJCc-o.js} +1 -1
  15. package/dist/chunks/{index.D1zH_2x6.js → index.CoXgq2rQ.js} +1 -1
  16. package/dist/chunks/{index.DtjS4202.js → index.DRMQdLp_.js} +2095 -1846
  17. package/dist/chunks/{index.Vi5HircF.js → index.DvVy8-Zq.js} +2 -2
  18. package/dist/chunks/{index.jefijINX.js → index.E5R-gRQM.js} +1 -1
  19. package/dist/chunks/{index.DTeiwmVN.js → index.T93ZkOuc.js} +1 -1
  20. package/dist/chunks/{useMarkdown.B5cyvrlh.js → useMarkdown.CYsjqhfo.js} +6 -6
  21. package/dist/components/SassySaint/SassySaint.js +1 -1
  22. package/dist/index.js +4 -4
  23. package/dist/style.css +3 -3
  24. package/package.json +5 -5
  25. package/dist/chunks/ChatHistoryTable.RqkR5XYw.js +0 -649
  26. package/dist/chunks/SettingsEntry.CH79zLy_.js +0 -755
@@ -1,649 +0,0 @@
1
- import { jsxs as _, jsx as t } from "react/jsx-runtime";
2
- import { I as V, b as A, Ae as M, ue as S, INFINITE_SCROLL_THRESHOLD as B, CARDS as D, pluralize as H, te as T, numberFormatter as U, ye as W, isProbablyMobile as F, y as P, i$1 as L, E as G } from "./index.DtjS4202.js";
3
- import { e as w, st as E, p$1 as j, z as Y, p$2 as K } from "./App.QIy4AIaz.js";
4
- import $, { useContext as N, Fragment as q } from "react";
5
- import y from "clsx";
6
- const J = ({
7
- className: e,
8
- viewBox: a,
9
- title: s,
10
- monotone: r,
11
- ...l
12
- }) => /* @__PURE__ */ _(
13
- V,
14
- {
15
- defaultViewBox: "0 0 448 512",
16
- size: "size-5",
17
- viewBox: a,
18
- className: e,
19
- title: s || "Delete",
20
- ...l,
21
- children: [
22
- /* @__PURE__ */ t(
23
- "path",
24
- {
25
- 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",
26
- opacity: r ? "1" : "0.4"
27
- }
28
- ),
29
- /* @__PURE__ */ t("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" })
30
- ]
31
- }
32
- ), Q = ({
33
- className: e,
34
- viewBox: a,
35
- title: s,
36
- monotone: r,
37
- ...l
38
- }) => /* @__PURE__ */ _(
39
- V,
40
- {
41
- defaultViewBox: "0 0 512 512",
42
- size: "size-5",
43
- viewBox: a,
44
- className: e,
45
- title: s || "Restore",
46
- ...l,
47
- children: [
48
- /* @__PURE__ */ t(
49
- "path",
50
- {
51
- 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",
52
- opacity: r ? "1" : "0.4"
53
- }
54
- ),
55
- /* @__PURE__ */ t("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" })
56
- ]
57
- }
58
- ), z = ({
59
- children: e,
60
- fill: a,
61
- viewBox: s,
62
- className: r,
63
- defaultViewBox: l,
64
- size: d,
65
- title: p,
66
- semantic: g = !1,
67
- ...n
68
- }) => {
69
- const m = y(d, r);
70
- return /* @__PURE__ */ _(
71
- "svg",
72
- {
73
- xmlns: "http://www.w3.org/2000/svg",
74
- className: m,
75
- viewBox: s || l,
76
- fill: a || "currentColor",
77
- role: "img",
78
- "aria-hidden": !g,
79
- focusable: !1,
80
- ...n,
81
- children: [
82
- p && g && /* @__PURE__ */ t("title", { children: p }),
83
- e
84
- ]
85
- }
86
- );
87
- };
88
- /*!
89
- @versini/ui-svgicon v4.2.1
90
- © 2025 gizmette.com
91
- */
92
- try {
93
- window.__VERSINI_UI_SVGICON__ || (window.__VERSINI_UI_SVGICON__ = {
94
- version: "4.2.1",
95
- buildTime: "08/27/2025 08:27 AM EDT",
96
- homepage: "https://github.com/aversini/ui-components",
97
- license: "MIT"
98
- });
99
- } catch {
100
- }
101
- const X = ({
102
- className: e,
103
- viewBox: a,
104
- title: s,
105
- monotone: r,
106
- ...l
107
- }) => /* @__PURE__ */ _(
108
- z,
109
- {
110
- defaultViewBox: "0 0 576 512",
111
- size: "size-5",
112
- viewBox: a,
113
- className: e,
114
- title: s || "Sort",
115
- ...l,
116
- children: [
117
- /* @__PURE__ */ t(
118
- "path",
119
- {
120
- d: "M297.4 137.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l41.3-41.4V448c0 17.7 14.3 32 32 32s32-14.3 32-32V141.3l41.4 41.4c12.5 12.5 32.8 12.5 45.3 0 6.2-6.2 9.4-14.4 9.4-22.6s-3.1-16.4-9.4-22.6l-96-96c-6.3-6.4-14.5-9.5-22.7-9.5s-16.4 3.1-22.6 9.4z",
121
- opacity: r ? "1" : "0.4"
122
- }
123
- ),
124
- /* @__PURE__ */ t("path", { d: "M137.4 470.6c12.5 12.5 32.8 12.5 45.3 0l96-96c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 370.7V64c0-17.7-14.3-32-32-32s-32 14.3-32 32v306.7l-41.4-41.3c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l96 96z" })
125
- ]
126
- }
127
- ), Z = ({
128
- className: e,
129
- viewBox: a,
130
- title: s,
131
- monotone: r,
132
- ...l
133
- }) => /* @__PURE__ */ _(
134
- z,
135
- {
136
- defaultViewBox: "0 0 576 512",
137
- size: "size-5",
138
- viewBox: a,
139
- className: e,
140
- title: s || "Sort Down",
141
- ...l,
142
- children: [
143
- /* @__PURE__ */ t(
144
- "path",
145
- {
146
- d: "M288 64c0-17.7 14.3-32 32-32h224c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32m0 128c0-17.7 14.3-32 32-32h160c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32m0 128c0-17.7 14.3-32 32-32h96c17.7 0 32 14.3 32 32s-14.3 32-32 32h-96c-17.7 0-32-14.3-32-32m0 128c0-17.7 14.3-32 32-32h32c17.7 0 32 14.3 32 32s-14.3 32-32 32h-32c-17.7 0-32-14.3-32-32",
147
- opacity: r ? "1" : "0.4"
148
- }
149
- ),
150
- /* @__PURE__ */ t("path", { d: "M128 480c9 0 17.5-3.8 23.6-10.4l88-96c11.9-13 11.1-33.3-2-45.2s-33.3-11.1-45.2 2L160 365.7V64c0-17.7-14.3-32-32-32S96 46.3 96 64v301.7l-32.4-35.3c-11.9-13-32.2-13.9-45.2-2s-13.9 32.2-2 45.2l88 96c6.1 6.6 14.6 10.4 23.6 10.4" })
151
- ]
152
- }
153
- ), ee = ({
154
- className: e,
155
- viewBox: a,
156
- title: s,
157
- monotone: r,
158
- ...l
159
- }) => /* @__PURE__ */ _(
160
- z,
161
- {
162
- defaultViewBox: "0 0 576 512",
163
- size: "size-5",
164
- viewBox: a,
165
- className: e,
166
- title: s || "Sort Up",
167
- ...l,
168
- children: [
169
- /* @__PURE__ */ t(
170
- "path",
171
- {
172
- d: "M288 64c0-17.7 14.3-32 32-32h32c17.7 0 32 14.3 32 32s-14.3 32-32 32h-32c-17.7 0-32-14.3-32-32m0 128c0-17.7 14.3-32 32-32h96c17.7 0 32 14.3 32 32s-14.3 32-32 32h-96c-17.7 0-32-14.3-32-32m0 128c0-17.7 14.3-32 32-32h160c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32m0 128c0-17.7 14.3-32 32-32h224c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32",
173
- opacity: r ? "1" : "0.4"
174
- }
175
- ),
176
- /* @__PURE__ */ t("path", { d: "M128 32c9 0 17.5 3.8 23.6 10.4l88 96c11.9 13 11.1 33.3-2 45.2s-33.3 11.1-45.2-2L160 146.3V448c0 17.7-14.3 32-32 32s-32-14.3-32-32V146.3l-32.4 35.3c-11.9 13-32.2 13.9-45.2 2s-13.9-32.2-2-45.2l88-96C110.5 35.8 119 32 128 32" })
177
- ]
178
- }
179
- );
180
- /*!
181
- @versini/ui-icons v4.11.0
182
- © 2025 gizmette.com
183
- */
184
- try {
185
- window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
186
- version: "4.11.0",
187
- buildTime: "08/27/2025 08:28 AM EDT",
188
- homepage: "https://github.com/aversini/ui-components",
189
- license: "MIT"
190
- });
191
- } catch {
192
- }
193
- const k = $.createContext({
194
- mode: "light",
195
- cellWrapper: "thead",
196
- stickyHeader: !1,
197
- stickyFooter: !1,
198
- compact: !1
199
- }), v = "thead", I = "tfoot", b = "tbody", te = ({
200
- mode: e,
201
- className: a,
202
- wrapperClassName: s,
203
- stickyHeader: r,
204
- stickyFooter: l
205
- }) => ({
206
- wrapper: y(
207
- "not-prose relative w-full rounded-lg shadow-md",
208
- {
209
- "overflow-x-auto": !r && !l,
210
- "overflow-y-scroll": r || l,
211
- "bg-surface-darker": e === "dark" || e === "system",
212
- "bg-surface-light": e === "light" || e === "alt-system",
213
- "dark:bg-surface-light": e === "system",
214
- "dark:bg-surface-darker": e === "alt-system",
215
- "text-copy-light": e === "dark",
216
- "text-copy-dark": e === "light",
217
- "text-copy-light dark:text-copy-dark": e === "system",
218
- "text-copy-dark dark:text-copy-light": e === "alt-system"
219
- },
220
- s
221
- ),
222
- table: y("my-0 w-full text-left text-sm", a, {
223
- "text-copy-light": e === "dark",
224
- "text-copy-dark": e === "light",
225
- "text-copy-light dark:text-copy-dark": e === "system",
226
- "text-copy-dark dark:text-copy-light": e === "alt-system"
227
- }),
228
- caption: y("py-2 text-sm font-bold", {
229
- "text-copy-light": e === "dark",
230
- "text-copy-dark": e === "light",
231
- "text-copy-light dark:text-copy-dark": e === "system",
232
- "text-copy-dark dark:text-copy-light": e === "alt-system"
233
- })
234
- }), se = ({
235
- className: e,
236
- stickyHeader: a,
237
- mode: s
238
- }) => y(
239
- {
240
- "sticky top-0 z-10": a,
241
- "shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem]": a && s === "dark",
242
- "shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem] dark:shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem]": a && s === "system",
243
- "shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem]": a && s === "light",
244
- "shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem] dark:shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem]": a && s === "alt-system"
245
- },
246
- e
247
- ), ae = ({
248
- className: e,
249
- stickyFooter: a,
250
- mode: s
251
- }) => y(
252
- {
253
- "sticky bottom-0 z-10": a,
254
- "shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem]": a && s === "dark",
255
- "shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem] dark:shadow-[rgb(65_65_65_/30%)_0_-0.5rem_1rem]": a && s === "system",
256
- "shadow-[rgb(65_65_65_/30%)_0_-0.5rem_1rem]": a && s === "light",
257
- "shadow-[rgb(65_65_65_/30%)_-0_0.5rem_1rem] dark:shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem]": a && s === "alt-system"
258
- },
259
- e
260
- ), re = ({
261
- mode: e,
262
- className: a,
263
- cellWrapper: s
264
- }) => s === v || s === I ? y(
265
- {
266
- "bg-table-head-dark": e === "dark" || e === "system",
267
- "bg-table-head-light": e === "light" || e === "alt-system",
268
- "dark:bg-table-head-light": e === "system",
269
- "dark:bg-table-head-dark": e === "alt-system"
270
- },
271
- a
272
- ) : y(
273
- "border-b last:border-0",
274
- {
275
- "border-table-dark": e === "dark" || e === "system",
276
- "odd:bg-table-dark-odd even:bg-table-dark-even": s === b && e === "dark",
277
- "border-table-light": e === "light" || e === "alt-system",
278
- "odd:bg-table-light-odd even:bg-table-light-even": s === b && e === "light",
279
- "dark:border-table-light": e === "system",
280
- "odd:bg-table-dark-odd even:bg-table-dark-even dark:odd:bg-table-light-odd dark:even:bg-table-light-even": s === b && e === "system",
281
- "dark:border-table-dark": e === "alt-system",
282
- "odd:bg-table-light-odd even:bg-table-light-even dark:odd:bg-table-dark-odd dark:even:bg-table-dark-even": s === b && e === "alt-system"
283
- },
284
- a
285
- ), le = ({
286
- cellWrapper: e,
287
- className: a,
288
- compact: s,
289
- mode: r,
290
- align: l
291
- }) => ({
292
- alignClasses: y({
293
- "flex justify-start text-left": l === "left",
294
- "flex justify-center text-center": l === "center",
295
- "flex justify-end text-right": l === "right"
296
- }),
297
- mainClasses: y(
298
- {
299
- "text-copy-light": r === "dark" || r === "system",
300
- "text-copy-dark": r === "light" || r === "alt-system",
301
- "dark:text-copy-dark": r === "system",
302
- "dark:text-copy-light": r === "alt-system",
303
- "px-4 py-3": !s && (e === v || e === I),
304
- "p-4": !s && e === b,
305
- "px-2 py-1.5": s
306
- },
307
- a
308
- )
309
- }), ce = ({
310
- buttonClassName: e
311
- }) => y("rounded-none text-sm", e), oe = ({
312
- children: e,
313
- mode: a = "system",
314
- caption: s,
315
- compact: r,
316
- summary: l,
317
- className: d,
318
- wrapperClassName: p,
319
- maxHeight: g,
320
- stickyHeader: n,
321
- stickyFooter: m,
322
- ...x
323
- }) => {
324
- const c = te({
325
- mode: a,
326
- className: d,
327
- wrapperClassName: p,
328
- stickyHeader: n,
329
- stickyFooter: m
330
- });
331
- return /* @__PURE__ */ t(
332
- k.Provider,
333
- {
334
- value: { mode: a, stickyHeader: n, stickyFooter: m, compact: r },
335
- children: /* @__PURE__ */ t(
336
- "div",
337
- {
338
- className: c.wrapper,
339
- ...g && {
340
- style: { maxHeight: g }
341
- },
342
- children: /* @__PURE__ */ _("table", { className: c.table, summary: l, ...x, children: [
343
- s && /* @__PURE__ */ t("caption", { className: c.caption, children: s }),
344
- e
345
- ] })
346
- }
347
- )
348
- }
349
- );
350
- }, ie = ({
351
- children: e,
352
- className: a,
353
- ...s
354
- }) => {
355
- const r = N(k);
356
- r.cellWrapper = v;
357
- const l = se({
358
- className: a,
359
- mode: r.mode,
360
- stickyHeader: r.stickyHeader
361
- });
362
- return /* @__PURE__ */ t("thead", { className: l, ...s, children: e });
363
- }, ne = ({
364
- children: e,
365
- className: a,
366
- ...s
367
- }) => {
368
- const r = N(k);
369
- r.cellWrapper = I;
370
- const l = ae({
371
- className: a,
372
- mode: r.mode,
373
- stickyFooter: r.stickyFooter
374
- });
375
- return /* @__PURE__ */ t("tfoot", { className: l, ...s, children: e });
376
- }, de = ({ children: e, ...a }) => {
377
- const s = N(k);
378
- return s.cellWrapper = b, /* @__PURE__ */ t("tbody", { ...a, children: e });
379
- }, C = ({
380
- children: e,
381
- className: a,
382
- ...s
383
- }) => {
384
- const r = N(k), l = re({
385
- mode: r.mode,
386
- cellWrapper: r.cellWrapper,
387
- className: a
388
- });
389
- return /* @__PURE__ */ t("tr", { className: l, ...s, children: e });
390
- }, h = ({
391
- children: e,
392
- component: a,
393
- className: s,
394
- align: r,
395
- ...l
396
- }) => {
397
- const d = N(k), p = a || (d.cellWrapper === v ? "th" : "td"), { mainClasses: g, alignClasses: n } = le({
398
- cellWrapper: d.cellWrapper,
399
- className: s,
400
- mode: d.mode,
401
- compact: d.compact,
402
- align: r
403
- });
404
- return r ? /* @__PURE__ */ t(p, { className: g, ...l, children: /* @__PURE__ */ t("div", { className: n, children: e }) }) : /* @__PURE__ */ t(p, { className: g, ...l, children: e });
405
- }, O = ({
406
- align: e,
407
- children: a,
408
- buttonClassName: s,
409
- className: r,
410
- component: l,
411
- focusMode: d = "alt-system",
412
- mode: p = "alt-system",
413
- onClick: g,
414
- sortDirection: n,
415
- sortedCell: m,
416
- cellId: x,
417
- ...c
418
- }) => {
419
- const i = ce({ buttonClassName: s });
420
- return /* @__PURE__ */ t(
421
- h,
422
- {
423
- component: l,
424
- className: r,
425
- role: "columnheader",
426
- "aria-sort": n === w.ASC && m === x ? "ascending" : n === w.DESC && m === x ? "descending" : "other",
427
- ...c,
428
- children: /* @__PURE__ */ t(
429
- A,
430
- {
431
- active: m === x,
432
- className: i,
433
- onClick: g,
434
- align: e,
435
- noBorder: !0,
436
- focusMode: d,
437
- mode: p,
438
- fullWidth: !0,
439
- labelRight: a,
440
- children: n === w.ASC && m === x ? /* @__PURE__ */ t(ee, { className: "size-4", monotone: !0 }) : n === w.DESC && m === x ? /* @__PURE__ */ t(Z, { className: "size-4", monotone: !0 }) : /* @__PURE__ */ t(X, { className: "size-4", monotone: !0 })
441
- }
442
- )
443
- }
444
- );
445
- }, me = {
446
- [G]: K,
447
- [L]: Y,
448
- [P]: j
449
- }, o = {
450
- ROW: "row",
451
- TIMESTAMP: M,
452
- SUMMARY: "summary",
453
- PROVIDER: "provider",
454
- TOKEN_USAGE: S,
455
- ACTIONS: "actions"
456
- }, he = [
457
- o.ROW,
458
- o.TIMESTAMP,
459
- o.SUMMARY,
460
- o.ACTIONS
461
- ], pe = [
462
- o.ROW,
463
- o.SUMMARY,
464
- o.TIMESTAMP,
465
- o.TOKEN_USAGE,
466
- o.PROVIDER,
467
- o.ACTIONS
468
- ], ke = ({
469
- filteredHistory: e,
470
- historyState: a,
471
- lastEntryToLoad: s,
472
- onClickSort: r,
473
- onClickRestore: l,
474
- onClickDelete: d,
475
- infinityScrollMarkerRef: p
476
- }) => {
477
- const n = F() ? he : pe, m = (c) => {
478
- switch (c) {
479
- case o.ROW:
480
- return /* @__PURE__ */ t(h, { className: "sr-only", children: "Row" }, c);
481
- case o.TIMESTAMP:
482
- return /* @__PURE__ */ t(
483
- O,
484
- {
485
- buttonClassName: "text-xs sm:text-sm",
486
- cellId: M,
487
- align: "left",
488
- sortDirection: a.sortDirection,
489
- sortedCell: a.sortedCell,
490
- onClick: () => {
491
- r(M);
492
- },
493
- children: "Date"
494
- },
495
- c
496
- );
497
- case o.SUMMARY:
498
- return /* @__PURE__ */ t(h, { className: "text-xs sm:text-sm", children: "Summary" }, c);
499
- case o.PROVIDER:
500
- return /* @__PURE__ */ t(h, { className: "text-xs sm:text-sm", children: "Provider" }, c);
501
- case o.TOKEN_USAGE:
502
- return /* @__PURE__ */ t(
503
- O,
504
- {
505
- buttonClassName: "text-xs sm:text-sm",
506
- cellId: S,
507
- align: "right",
508
- sortDirection: a.sortDirection,
509
- sortedCell: a.sortedCell,
510
- onClick: () => {
511
- r(S);
512
- },
513
- children: "Tokens"
514
- },
515
- c
516
- );
517
- case o.ACTIONS:
518
- return /* @__PURE__ */ t(h, { className: "text-xs sm:text-sm text-right", children: "Actions" }, c);
519
- default:
520
- return null;
521
- }
522
- }, x = (c, i, f) => {
523
- switch (c) {
524
- case o.ROW:
525
- return /* @__PURE__ */ t(h, { children: f + 1 }, c);
526
- case o.TIMESTAMP:
527
- return /* @__PURE__ */ t(
528
- h,
529
- {
530
- component: "th",
531
- scope: "row",
532
- className: "text-gray-400 sm:whitespace-nowrap text-xs sm:text-sm max-w-20 sm:max-w-none",
533
- children: i.timestamp.split(",")[0]
534
- },
535
- c
536
- );
537
- case o.SUMMARY: {
538
- const u = i.summary || (i.messages.length > 0 ? i.messages[0]?.content : "");
539
- return /* @__PURE__ */ t(
540
- h,
541
- {
542
- className: "max-w-[100px] text-white sm:max-w-full text-xs sm:text-sm",
543
- style: {
544
- wordBreak: "break-word"
545
- },
546
- children: u
547
- },
548
- c
549
- );
550
- }
551
- case o.PROVIDER: {
552
- const u = i.model ? W(i.model) : null, R = u ? me[u] : null;
553
- return /* @__PURE__ */ t(
554
- h,
555
- {
556
- component: "th",
557
- scope: "row",
558
- className: "text-gray-400",
559
- align: "center",
560
- children: R ? /* @__PURE__ */ t(
561
- R,
562
- {
563
- size: "size-4 sm:size-5",
564
- semantic: !0,
565
- title: i.model || u
566
- }
567
- ) : null
568
- },
569
- c
570
- );
571
- }
572
- case o.TOKEN_USAGE:
573
- return /* @__PURE__ */ t(
574
- h,
575
- {
576
- className: "text-gray-400 text-xs sm:text-sm",
577
- align: "right",
578
- children: i.tokenUsage ? U.format(i.tokenUsage) : "0"
579
- },
580
- c
581
- );
582
- case o.ACTIONS:
583
- return /* @__PURE__ */ t(h, { children: /* @__PURE__ */ _("div", { className: "flex flex-col items-end sm:flex-row gap-2", children: [
584
- /* @__PURE__ */ t(
585
- E,
586
- {
587
- label: "Restore chat",
588
- mode: "alt-system",
589
- placement: "top",
590
- trigger: /* @__PURE__ */ t(
591
- T,
592
- {
593
- focusMode: "alt-system",
594
- noBorder: !0,
595
- label: "Restore chat",
596
- variant: "primary",
597
- iconClassName: "text-green-800 dark:text-green-500",
598
- onClick: async () => {
599
- await l(i);
600
- },
601
- children: /* @__PURE__ */ t(Q, { size: "size-3", monotone: !0 })
602
- }
603
- )
604
- }
605
- ),
606
- /* @__PURE__ */ t(
607
- E,
608
- {
609
- label: "Delete chat",
610
- mode: "alt-system",
611
- placement: "top",
612
- trigger: /* @__PURE__ */ t(
613
- T,
614
- {
615
- focusMode: "alt-system",
616
- noBorder: !0,
617
- label: "Delete chat",
618
- variant: "primary",
619
- iconClassName: "text-red-700 dark:text-red-500",
620
- onClick: () => {
621
- d(i);
622
- },
623
- children: /* @__PURE__ */ t(J, { size: "size-3", monotone: !0 })
624
- }
625
- )
626
- }
627
- )
628
- ] }) }, c);
629
- default:
630
- return null;
631
- }
632
- };
633
- return /* @__PURE__ */ _(oe, { stickyHeader: !0, stickyFooter: !0, compact: !0, children: [
634
- /* @__PURE__ */ t(ie, { children: /* @__PURE__ */ t(C, { children: n.map((c) => m(c)) }) }),
635
- /* @__PURE__ */ t(de, { children: e.slice(0, s).map((c, i) => c?.messages?.length > 0 ? /* @__PURE__ */ _(q, { children: [
636
- i === s - B && /* @__PURE__ */ t("tr", { ref: p }),
637
- /* @__PURE__ */ t(C, { children: n.map(
638
- (f) => x(f, c, i)
639
- ) })
640
- ] }, `${D.HISTORY.TITLE}-${c.id}-${i}`) : null) }),
641
- /* @__PURE__ */ t(ne, { children: /* @__PURE__ */ t(C, { children: /* @__PURE__ */ t(h, { colSpan: 1e3, children: /* @__PURE__ */ t("div", { children: H(
642
- `${e.length} chat`,
643
- e.length
644
- ) }) }) }) })
645
- ] });
646
- };
647
- export {
648
- ke as ChatHistoryTable
649
- };