@versini/sassysaint 8.119.0 → 8.119.2

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 (84) hide show
  1. package/dist/chunks/{AboutChangelog.B3zToB4T.js → AboutChangelog.D2F7IsfA.js} +2 -2
  2. package/dist/chunks/{AboutEntry.Dc0GMtzL.js → AboutEntry.6St28Lf5.js} +7 -7
  3. package/dist/chunks/{App.Bcw00dJK.js → App.Dx0i7v1f.js} +16 -16
  4. package/dist/chunks/{BubbleActions.BcwPpzhU.js → BubbleActions.rlJwcUek.js} +3 -3
  5. package/dist/chunks/ButtonIconDelete.D1XluRE7.js +512 -0
  6. package/dist/chunks/{Chart.B0oqrdYo.js → Chart.ClEQYypc.js} +2 -2
  7. package/dist/chunks/{ChatBubbleAssistant.DAwx85Wd.js → ChatBubbleAssistant.BaNEs-WH.js} +5 -5
  8. package/dist/chunks/{ChatBubbleUser.BRTLYDmZ.js → ChatBubbleUser.BKQwt_MT.js} +4 -4
  9. package/dist/chunks/HistoryDataGrid.EVORyJf2.js +479 -0
  10. package/dist/chunks/{HistoryEntry.4GpBDf9x.js → HistoryEntry.B88FZSWr.js} +5 -5
  11. package/dist/chunks/{InlineFilter.Cv_LUpTp.js → InlineFilter.BC6p53ao.js} +3 -3
  12. package/dist/chunks/{LoginEntry.5bQhuYQl.js → LoginEntry.ChP-sVI8.js} +4 -4
  13. package/dist/chunks/{LogoEntry.CN5P16eA.js → LogoEntry.BX2BbPnz.js} +2 -2
  14. package/dist/chunks/{MemoriesEntry.D0q1U5FD.js → MemoriesEntry.7VLaTZvU.js} +6 -6
  15. package/dist/chunks/{ProfileEntry.Ck-5SP70.js → ProfileEntry.DjAWes3a.js} +4 -4
  16. package/dist/chunks/{SettingsEntry.CfB9DKIp.js → SettingsEntry.o9nEUETW.js} +5 -5
  17. package/dist/chunks/{UsageEntry.BCFJMOjQ.js → UsageEntry.CRYw7M5Q.js} +5 -5
  18. package/dist/chunks/{_baseUniq.DRTEXwBu.js → _baseUniq.qYL6t1qv.js} +1 -1
  19. package/dist/chunks/{arc.x_GRGNuD.js → arc.Cym5wUzu.js} +1 -1
  20. package/dist/chunks/{architecture-U656AL7Q.DSfD0nUy.js → architecture-U656AL7Q.DS4pgkMC.js} +1 -1
  21. package/dist/chunks/{architectureDiagram-VXUJARFQ.CAS-oDjc.js → architectureDiagram-VXUJARFQ.BvDQXBtF.js} +4 -4
  22. package/dist/chunks/{blockDiagram-VD42YOAC.P_XB2AgQ.js → blockDiagram-VD42YOAC.q0iBwpIB.js} +5 -5
  23. package/dist/chunks/{browser.oW1ZW8ge.js → browser.B2MccGxb.js} +1 -1
  24. package/dist/chunks/{c4Diagram-YG6GDRKO.Dc9Vyv3k.js → c4Diagram-YG6GDRKO.TUW7Jr-h.js} +2 -2
  25. package/dist/chunks/{channel.TjlRRr3U.js → channel.BbbTuklR.js} +1 -1
  26. package/dist/chunks/{chunk-4BX2VUAB.BwgmyLAX.js → chunk-4BX2VUAB.CeJFN81d.js} +1 -1
  27. package/dist/chunks/{chunk-55IACEB6.Cgq1oeLK.js → chunk-55IACEB6.kkb8e0kJ.js} +1 -1
  28. package/dist/chunks/{chunk-B4BG7PRW.Ds2wbzEG.js → chunk-B4BG7PRW.BCtv4gxR.js} +4 -4
  29. package/dist/chunks/{chunk-DI55MBZ5.Bft9jyaz.js → chunk-DI55MBZ5.BRNj1QQD.js} +3 -3
  30. package/dist/chunks/{chunk-FMBD7UC4.DF-Zr883.js → chunk-FMBD7UC4.DX4dWsGY.js} +1 -1
  31. package/dist/chunks/{chunk-QN33PNHL.BVMRH_Hs.js → chunk-QN33PNHL.H_LPM2vF.js} +1 -1
  32. package/dist/chunks/{chunk-QZHKN3VN.DS306ds1.js → chunk-QZHKN3VN.BMYfiX1a.js} +1 -1
  33. package/dist/chunks/{chunk-TZMSLE5B.Cl4RUaGp.js → chunk-TZMSLE5B.YB2DMjFF.js} +1 -1
  34. package/dist/chunks/{classDiagram-2ON5EDUG.DbFfjSp_.js → classDiagram-2ON5EDUG.BVw5YdVW.js} +2 -2
  35. package/dist/chunks/{classDiagram-v2-WZHVMYZB.DbFfjSp_.js → classDiagram-v2-WZHVMYZB.BVw5YdVW.js} +2 -2
  36. package/dist/chunks/{clone.B8XxgJj0.js → clone.CR4Q6L6w.js} +1 -1
  37. package/dist/chunks/{cose-bilkent-S5V4N54A.CL-tsB7O.js → cose-bilkent-S5V4N54A.DL75oZVQ.js} +2 -2
  38. package/dist/chunks/{dagre-6UL2VRFP.7xKesqEK.js → dagre-6UL2VRFP.skxnrW0m.js} +5 -5
  39. package/dist/chunks/{diagram-PSM6KHXK.D6JNXJQr.js → diagram-PSM6KHXK.CIKSCwqj.js} +4 -4
  40. package/dist/chunks/{diagram-QEK2KX5R.VaJKE9Ih.js → diagram-QEK2KX5R.CXfUdwio.js} +3 -3
  41. package/dist/chunks/{diagram-S2PKOQOG.BjCuqhPd.js → diagram-S2PKOQOG.DNP0yPuz.js} +3 -3
  42. package/dist/chunks/{erDiagram-Q2GNP2WA.BYnxwTG-.js → erDiagram-Q2GNP2WA.DsDL14E8.js} +4 -4
  43. package/dist/chunks/{flowDiagram-NV44I4VS.DefWDma3.js → flowDiagram-NV44I4VS.KyT8VEH0.js} +5 -5
  44. package/dist/chunks/{ganttDiagram-JELNMOA3.BrEeaW2n.js → ganttDiagram-JELNMOA3.BIc6-yIF.js} +2 -2
  45. package/dist/chunks/{gitGraph-F6HP7TQM.C4_YWAr0.js → gitGraph-F6HP7TQM.DZQnBw57.js} +1 -1
  46. package/dist/chunks/{gitGraphDiagram-NY62KEGX.GGrXKGya.js → gitGraphDiagram-NY62KEGX.dp5Oo2Wm.js} +4 -4
  47. package/dist/chunks/{graph.BxDrvENy.js → graph.Daj4nkbR.js} +2 -2
  48. package/dist/chunks/{index.DvThh-C6.js → index.B0nO3wvT.js} +1 -1
  49. package/dist/chunks/{index.CR0NHbVR.js → index.BbXK13Js.js} +1 -1
  50. package/dist/chunks/{index.DS9SCH32.js → index.BpBKcgEW.js} +1 -1
  51. package/dist/chunks/{index.o4ZD5ALX.js → index.C-7h2KOd.js} +2 -2
  52. package/dist/chunks/{index.DOwjLeiM.js → index.C0ecFrQh.js} +1 -1
  53. package/dist/chunks/{index.CZRaE0eA.js → index.CFO0VGN_.js} +1 -1
  54. package/dist/chunks/{index.CsAjUl3G.js → index.CHSGxc4N.js} +3 -3
  55. package/dist/chunks/{index.BMADibmh.js → index.Cxl91Epa.js} +3 -3
  56. package/dist/chunks/{index.tqKeN7sl.js → index.Dx1p6vnB.js} +1 -1
  57. package/dist/chunks/{info-NVLQJR56.E0G9wIVE.js → info-NVLQJR56.B1sH-qdY.js} +1 -1
  58. package/dist/chunks/{infoDiagram-WHAUD3N6.CY9ADLsc.js → infoDiagram-WHAUD3N6.1AjxKmSb.js} +2 -2
  59. package/dist/chunks/{journeyDiagram-XKPGCS4Q.BZHhK7w4.js → journeyDiagram-XKPGCS4Q.BXUWA_H0.js} +4 -4
  60. package/dist/chunks/{kanban-definition-3W4ZIXB7.DQSZD0Em.js → kanban-definition-3W4ZIXB7.DwKUNSwB.js} +2 -2
  61. package/dist/chunks/{layout.DUh_4gWb.js → layout.BurBG7fo.js} +4 -4
  62. package/dist/chunks/{mermaid-parser.core.lAJFSSvC.js → mermaid-parser.core.BYpuHuuP.js} +10 -10
  63. package/dist/chunks/{min.B3NH5ZNz.js → min.BUzVe1CC.js} +2 -2
  64. package/dist/chunks/{mindmap-definition-VGOIOE7T.CVTcq_-S.js → mindmap-definition-VGOIOE7T.CcFtF2ym.js} +3 -3
  65. package/dist/chunks/{packet-BFZMPI3H.CaaCaP6S.js → packet-BFZMPI3H.BYUkRp22.js} +1 -1
  66. package/dist/chunks/{pie-7BOR55EZ.Ctr5Wngs.js → pie-7BOR55EZ.D9vQx_ny.js} +1 -1
  67. package/dist/chunks/{pieDiagram-ADFJNKIX.v0K5SYBL.js → pieDiagram-ADFJNKIX.iNvnYxgY.js} +4 -4
  68. package/dist/chunks/{quadrantDiagram-AYHSOK5B.CSGhc5R-.js → quadrantDiagram-AYHSOK5B.DUv-EOEE.js} +1 -1
  69. package/dist/chunks/{radar-NHE76QYJ.BYJioslS.js → radar-NHE76QYJ.Cr-FgGCd.js} +1 -1
  70. package/dist/chunks/{rehype-mermaid.CYJb7tO-.js → rehype-mermaid.CNWjRv7t.js} +33 -33
  71. package/dist/chunks/{requirementDiagram-UZGBJVZJ.07FdvPam.js → requirementDiagram-UZGBJVZJ.BoczNkNl.js} +3 -3
  72. package/dist/chunks/{sankeyDiagram-TZEHDZUN.BJQl-LVq.js → sankeyDiagram-TZEHDZUN.PNrd5uuL.js} +1 -1
  73. package/dist/chunks/{sequenceDiagram-WL72ISMW.D3HP-wCt.js → sequenceDiagram-WL72ISMW.K8gyhsmA.js} +3 -3
  74. package/dist/chunks/{stateDiagram-FKZM4ZOC.uXuYKEnS.js → stateDiagram-FKZM4ZOC.lVblIqCD.js} +4 -4
  75. package/dist/chunks/{stateDiagram-v2-4FDKWEC3.i7NR_lBC.js → stateDiagram-v2-4FDKWEC3.ChcG_M0g.js} +2 -2
  76. package/dist/chunks/{timeline-definition-IT6M3QCI.CfrxZtW7.js → timeline-definition-IT6M3QCI.i6kfP-GH.js} +2 -2
  77. package/dist/chunks/{treemap-KMMF4GRG.D0E-EXib.js → treemap-KMMF4GRG.E6EpEM17.js} +1 -1
  78. package/dist/chunks/{useMarkdown.CVmi3L7b.js → useMarkdown.JIM6TAXs.js} +8 -8
  79. package/dist/chunks/{xychartDiagram-PRI3JC2R.BedGeb-X.js → xychartDiagram-PRI3JC2R.wqxzlkjJ.js} +1 -1
  80. package/dist/components/SassySaint/SassySaint.js +1 -1
  81. package/dist/index.js +3 -3
  82. package/package.json +4 -4
  83. package/dist/chunks/ButtonIconDelete.CASHORv6.js +0 -523
  84. package/dist/chunks/HistoryDataGrid.Bg984Jd_.js +0 -465
@@ -1,465 +0,0 @@
1
- import { jsx as t, jsxs as h, Fragment as L } from "react/jsx-runtime";
2
- import { DataGridContext as P, useColumnMeasurement as X, getBodyClass as Z, DataGridHeader as J, DataGridRow as j, DataGridCell as d, DataGridCellSort as A, ButtonIconDelete as K, DataGrid as Q } from "./ButtonIconDelete.CASHORv6.js";
3
- import { forwardRef as ee, useContext as te, useRef as R, useState as q, useCallback as M, useEffect as N, useImperativeHandle as re, useMemo as G } from "react";
4
- import { CellWrapper as ne, IconCloseLight as se, ButtonIcon as O, IconRestore as oe, IconStarInCircle as le, IconStarInCircleLight as ae, CARDS as ce } from "./LogoEntry.CN5P16eA.js";
5
- import { pluralize as F, numberFormatter as ie, ResponsiveTooltip as U, isProbablyMobile as me } from "./App.Bcw00dJK.js";
6
- import k from "clsx";
7
- import { y as D, V as H, INFINITE_SCROLL_THRESHOLD as ue, INFINITE_SCROLL_LIMIT as de } from "./index.o4ZD5ALX.js";
8
- const fe = 20, xe = 5, pe = "20px", z = "data-row-index";
9
- function he(e) {
10
- let r = e.parentElement;
11
- for (; r; ) {
12
- const l = getComputedStyle(r).overflowY;
13
- if (l === "auto" || l === "scroll")
14
- return r;
15
- r = r.parentElement;
16
- }
17
- return null;
18
- }
19
- function ge({ data: e, children: r, batchSize: o = fe, threshold: l = xe, rootMargin: i = pe, onVisibleCountChange: f, className: x }, g) {
20
- const u = te(P), b = R(null), y = R(null), m = R(null), s = e.length, C = Math.min(o + l, s), [a, v] = q(C), I = a < s, T = M((n) => {
21
- const c = b.current;
22
- if (!c)
23
- return;
24
- const S = c.querySelector(`[${z}="${n}"]`);
25
- if (S) {
26
- const $ = S.querySelector('[role="row"]');
27
- $ && $.scrollIntoView({
28
- behavior: "smooth",
29
- block: "center"
30
- });
31
- }
32
- }, []);
33
- N(() => {
34
- if (m.current !== null) {
35
- const n = m.current;
36
- n < a && (requestAnimationFrame(() => {
37
- T(n);
38
- }), m.current = null);
39
- }
40
- }, [
41
- a,
42
- T
43
- ]), re(g, () => ({
44
- scrollToIndex: (n) => {
45
- if (n < 0 || n >= s) {
46
- console.warn(`scrollToIndex: index ${n} is out of bounds (0-${s - 1})`);
47
- return;
48
- }
49
- if (n < a) {
50
- T(n);
51
- return;
52
- }
53
- const c = Math.min(n + l + 1, s);
54
- m.current = n, v(c);
55
- }
56
- }), [
57
- s,
58
- a,
59
- l,
60
- T
61
- ]), N(() => {
62
- v(Math.min(o + l, s));
63
- }, [
64
- s,
65
- o,
66
- l
67
- ]), N(() => {
68
- f?.(a, s);
69
- }, [
70
- a,
71
- s,
72
- f
73
- ]);
74
- const p = M((n) => {
75
- n[0]?.isIntersecting && v((S) => Math.min(S + o, s));
76
- }, [
77
- o,
78
- s
79
- ]), w = M((n) => {
80
- if (y.current && (y.current.disconnect(), y.current = null), n && I) {
81
- const c = he(n);
82
- y.current = new IntersectionObserver(p, {
83
- root: c,
84
- rootMargin: i
85
- }), y.current.observe(n);
86
- }
87
- }, [
88
- I,
89
- p,
90
- i
91
- ]);
92
- N(() => () => {
93
- y.current?.disconnect();
94
- }, []);
95
- const E = G(() => I ? Math.max(0, a - l) : -1, [
96
- I,
97
- a,
98
- l
99
- ]), B = G(() => {
100
- const n = [];
101
- for (let c = 0; c < a && c < s; c++)
102
- c === E && n.push(/* @__PURE__ */ t("div", {
103
- ref: w,
104
- "aria-hidden": "true",
105
- style: {
106
- height: "1px",
107
- background: "transparent"
108
- }
109
- }, "__infinite-scroll-marker-inline__")), n.push(/* @__PURE__ */ t("div", {
110
- [z]: c,
111
- style: {
112
- display: "contents"
113
- },
114
- children: r(e[c], c)
115
- }, c));
116
- return E === a && I && n.push(/* @__PURE__ */ t("div", {
117
- ref: w,
118
- "aria-hidden": "true",
119
- style: {
120
- height: "1px",
121
- background: "transparent"
122
- }
123
- }, "__infinite-scroll-marker-end__")), n;
124
- }, [
125
- e,
126
- a,
127
- s,
128
- E,
129
- I,
130
- r,
131
- w
132
- ]);
133
- X(b, B);
134
- const W = Z(!!u.columns, x);
135
- return /* @__PURE__ */ t(P.Provider, {
136
- value: {
137
- ...u,
138
- cellWrapper: ne.BODY
139
- },
140
- children: /* @__PURE__ */ t("div", {
141
- ref: b,
142
- role: "rowgroup",
143
- className: W,
144
- children: B
145
- })
146
- });
147
- }
148
- const be = /* @__PURE__ */ ee(ge), ye = ({
149
- sortDirection: e,
150
- sortedCell: r,
151
- onSortChange: o,
152
- caption: l,
153
- isSearchActive: i = !1,
154
- showTokenUsage: f = !0
155
- }) => {
156
- const x = (g) => {
157
- o(g);
158
- };
159
- return /* @__PURE__ */ t(J, { caption: l, children: /* @__PURE__ */ h(j, { children: [
160
- /* @__PURE__ */ t(d, { className: "invisible", children: "Row" }),
161
- f ? /* @__PURE__ */ h(L, { children: [
162
- /* @__PURE__ */ t(d, { className: "text-xs sm:text-sm", children: "Summary" }),
163
- i ? /* @__PURE__ */ t(d, { className: "text-xs sm:text-sm", children: "Date" }) : /* @__PURE__ */ t(
164
- A,
165
- {
166
- focusMode: "system",
167
- buttonClassName: "text-xs sm:text-sm",
168
- cellId: D,
169
- align: "left",
170
- sortDirection: r === D ? e : !1,
171
- sortedCell: r,
172
- onSort: x,
173
- children: "Date"
174
- }
175
- ),
176
- i ? /* @__PURE__ */ t(d, { align: "right", className: "text-xs sm:text-sm", children: "Tokens" }) : /* @__PURE__ */ t(
177
- A,
178
- {
179
- focusMode: "system",
180
- buttonClassName: "text-xs sm:text-sm",
181
- cellId: H,
182
- align: "right",
183
- sortDirection: r === H ? e : !1,
184
- sortedCell: r,
185
- onSort: x,
186
- children: "Tokens"
187
- }
188
- )
189
- ] }) : /* @__PURE__ */ h(L, { children: [
190
- i ? /* @__PURE__ */ t(d, { className: "text-xs sm:text-sm", children: "Date" }) : /* @__PURE__ */ t(
191
- A,
192
- {
193
- focusMode: "system",
194
- buttonClassName: "text-xs sm:text-sm",
195
- cellId: D,
196
- align: "left",
197
- sortDirection: r === D ? e : !1,
198
- sortedCell: r,
199
- onSort: x,
200
- children: "Date"
201
- }
202
- ),
203
- /* @__PURE__ */ t(d, { className: "text-xs sm:text-sm", children: "Summary" })
204
- ] }),
205
- /* @__PURE__ */ t(d, { align: "right", className: "text-xs sm:text-sm", children: "Actions" })
206
- ] }) });
207
- };
208
- const we = "av-pill", ke = ({ variant: e }) => k("rounded-xs border", {
209
- "border-border-information": e === "information",
210
- "border-border-warning": e === "warning",
211
- "border-border-success": e === "success",
212
- "border-border-error": e === "error"
213
- }), V = ({ variant: e }) => k("not-prose", {
214
- "text-copy-information": e === "information",
215
- "text-copy-warning": e === "warning",
216
- "text-copy-success": e === "success",
217
- "text-copy-error": e === "error"
218
- }), Ie = ({ variant: e }) => k({
219
- "bg-surface-information": e === "information",
220
- "bg-surface-warning": e === "warning",
221
- "bg-surface-success": e === "success",
222
- "bg-surface-error": e === "error"
223
- }), Ce = (e) => {
224
- const { className: r, variant: o } = e;
225
- return {
226
- main: k(we, "inline-flex items-center gap-1 px-2 py-0.5 text-xs", ke({
227
- variant: o
228
- }), V({
229
- variant: o
230
- }), Ie(e), r),
231
- button: k("inline-flex items-center justify-center", "ml-1", "focus:outline", "focus:outline-1", "focus:outline-offset-1", "focus:outline-focus-dark", "hover:bg-surface-medium/50", "rounded-full", V({
232
- variant: o
233
- }))
234
- };
235
- }, Y = ({ label: e, className: r, variant: o = "information", description: l, onClose: i }) => {
236
- const [f, x] = q(!0), g = (b) => {
237
- i && (i(b), b.defaultPrevented || x(!1));
238
- };
239
- if (!f)
240
- return null;
241
- const u = Ce({
242
- className: r,
243
- variant: o
244
- });
245
- return /* @__PURE__ */ h("div", {
246
- role: "text",
247
- className: u.main,
248
- children: [
249
- l && /* @__PURE__ */ t("span", {
250
- className: "sr-only",
251
- children: l
252
- }),
253
- /* @__PURE__ */ t("span", {
254
- children: e
255
- }),
256
- i && /* @__PURE__ */ t("button", {
257
- type: "button",
258
- onClick: g,
259
- className: u.button,
260
- "aria-label": "Close",
261
- children: /* @__PURE__ */ t(se, {
262
- size: "size-3"
263
- })
264
- })
265
- ]
266
- });
267
- };
268
- function Ne(e, r, o) {
269
- return o && r > e ? `Showing ${F(`${e} chat`, e)} out of ${r}` : F(`${e} chat`, e);
270
- }
271
- const _ = {
272
- rowNumber: "dark:text-copy-medium",
273
- summary: "dark:text-white sm:max-w-full text-xs sm:text-sm",
274
- timestamp: "dark:text-copy-medium sm:whitespace-nowrap text-xs sm:text-sm max-w-20 sm:max-w-none",
275
- tokenUsage: "dark:text-copy-medium text-xs sm:text-sm"
276
- };
277
- function ve({
278
- item: e,
279
- index: r,
280
- onClickRestore: o,
281
- onClickDelete: l,
282
- onClickFavorite: i,
283
- showTokenUsage: f = !0,
284
- isActive: x = !1
285
- }) {
286
- const g = e.timestamp.split(",")[0], u = e.similarityScore !== void 0 && e.similarityScore !== null ? Math.round(e.similarityScore * 100) : null, b = u !== null && u < 40 ? "warning" : "success", y = e.keywordMatch === !0, m = /* @__PURE__ */ t(
287
- d,
288
- {
289
- className: k(_.summary),
290
- style: { wordBreak: "break-word" },
291
- children: /* @__PURE__ */ h("div", { className: "flex flex-col gap-1", children: [
292
- /* @__PURE__ */ h("div", { className: "flex flex-wrap gap-1", children: [
293
- u !== null && /* @__PURE__ */ t(
294
- Y,
295
- {
296
- variant: b,
297
- label: `${u}% semantic`
298
- }
299
- ),
300
- y && /* @__PURE__ */ t(Y, { variant: "information", label: "keyword" })
301
- ] }),
302
- /* @__PURE__ */ t("span", { children: e.summary })
303
- ] })
304
- }
305
- ), s = /* @__PURE__ */ t(d, { className: k(_.timestamp), children: g }), C = f ? /* @__PURE__ */ t(d, { align: "right", className: k(_.tokenUsage), children: e.tokenUsage ? ie.format(e.tokenUsage) : "0" }) : null, a = /* @__PURE__ */ t(d, { align: "center", borderLeft: !0, children: /* @__PURE__ */ h("div", { className: "flex flex-col items-end sm:flex-row gap-2", children: [
306
- /* @__PURE__ */ t(
307
- U,
308
- {
309
- label: "Restore chat",
310
- placement: "top",
311
- trigger: /* @__PURE__ */ t(
312
- O,
313
- {
314
- noBorder: !0,
315
- label: "Restore chat",
316
- variant: "primary",
317
- onClick: async () => {
318
- await o(e);
319
- },
320
- children: /* @__PURE__ */ t(
321
- oe,
322
- {
323
- size: "size-3",
324
- monotone: !0,
325
- className: "text-copy-success dark:text-copy-success-light"
326
- }
327
- )
328
- }
329
- )
330
- }
331
- ),
332
- /* @__PURE__ */ t(
333
- U,
334
- {
335
- label: e.favoriteChat ? "Remove from favorites" : "Add to favorites",
336
- placement: "top",
337
- trigger: /* @__PURE__ */ t(
338
- O,
339
- {
340
- noBorder: !0,
341
- label: e.favoriteChat ? "Remove from favorites" : "Add to favorites",
342
- variant: "primary",
343
- onClick: async () => {
344
- await i(e);
345
- },
346
- children: e.favoriteChat ? /* @__PURE__ */ t(le, { size: "size-4", monotone: !0 }) : /* @__PURE__ */ t(ae, { size: "size-4", monotone: !0 })
347
- }
348
- )
349
- }
350
- ),
351
- /* @__PURE__ */ t(
352
- K,
353
- {
354
- label: "Delete chat",
355
- disabled: !1,
356
- onClick: () => {
357
- l(e);
358
- }
359
- }
360
- )
361
- ] }) });
362
- return /* @__PURE__ */ h(j, { active: x, children: [
363
- /* @__PURE__ */ t(d, { className: k(_.rowNumber), children: r + 1 }),
364
- f ? /* @__PURE__ */ h(L, { children: [
365
- m,
366
- s,
367
- C
368
- ] }) : /* @__PURE__ */ h(L, { children: [
369
- s,
370
- m
371
- ] }),
372
- a
373
- ] });
374
- }
375
- const Ae = ({
376
- filteredHistory: e,
377
- sortDirection: r,
378
- sortedCell: o,
379
- onSortChange: l,
380
- onClickRestore: i,
381
- onClickDelete: f,
382
- onClickFavorite: x,
383
- isLoading: g = !1,
384
- totalHistoryCount: u,
385
- isFiltered: b = !1,
386
- isSearchActive: y = !1,
387
- activeChatId: m
388
- }) => {
389
- const s = me(), C = R(null), a = R(!1);
390
- N(() => {
391
- if (!m || a.current)
392
- return;
393
- const p = e.findIndex(
394
- (w) => w.id === m
395
- );
396
- if (p !== -1) {
397
- a.current = !0;
398
- const w = setTimeout(() => {
399
- C.current?.scrollToIndex(p);
400
- }, 100);
401
- return () => clearTimeout(w);
402
- }
403
- }, [m, e]), N(() => {
404
- a.current = !1;
405
- }, [m]);
406
- const v = Ne(
407
- e.length,
408
- u ?? e.length,
409
- b
410
- );
411
- return /* @__PURE__ */ h(
412
- Q,
413
- {
414
- stickyHeader: !0,
415
- stickyFooter: !0,
416
- compact: !0,
417
- mode: "alt-system",
418
- blurEffect: "medium",
419
- columns: s ? ["auto", "auto", "1fr", ".4fr"] : ["auto", "minmax(10px, 1fr)", ".3fr", ".3fr", ".3fr"],
420
- wrapperClassName: k(
421
- "max-h-[clamp(12rem,calc(100dvh-24rem),60dvh)]",
422
- "sm:max-h-[clamp(12rem,calc(100dvh-24rem),60dvh)]"
423
- ),
424
- loading: g && e.length > 0,
425
- children: [
426
- /* @__PURE__ */ t(
427
- ye,
428
- {
429
- sortDirection: r,
430
- sortedCell: o,
431
- onSortChange: l,
432
- caption: v,
433
- isSearchActive: y,
434
- showTokenUsage: !s
435
- }
436
- ),
437
- g && e.length === 0 ? /* @__PURE__ */ t("div", { className: "p-4 text-center", role: "status", "aria-live": "polite", children: "Loading..." }) : /* @__PURE__ */ t(
438
- be,
439
- {
440
- ref: C,
441
- data: e.filter((p) => p?.summary),
442
- batchSize: de,
443
- threshold: ue,
444
- children: (p, w) => /* @__PURE__ */ t(
445
- ve,
446
- {
447
- item: p,
448
- index: w,
449
- onClickRestore: i,
450
- onClickDelete: f,
451
- onClickFavorite: x,
452
- showTokenUsage: !s,
453
- isActive: m === p.id
454
- },
455
- `${ce.HISTORY.TITLE}-${p.id}-${w}`
456
- )
457
- }
458
- )
459
- ]
460
- }
461
- );
462
- };
463
- export {
464
- Ae as HistoryDataGrid
465
- };