@versini/sassysaint 8.121.0 → 8.121.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.BEMLUbae.js → AboutChangelog.CueW7QKj.js} +2 -2
- package/dist/chunks/{AboutEntry.BP20V5kd.js → AboutEntry.dQ_4JNsz.js} +7 -7
- package/dist/chunks/{App.C4nxPutS.js → App.6iDkXSOb.js} +16 -16
- package/dist/chunks/{BubbleActions.C8c4YvcJ.js → BubbleActions.DB_SDTs9.js} +3 -3
- package/dist/chunks/ButtonIconDelete.B3hYKTP6.js +668 -0
- package/dist/chunks/{Chart.UpIl99Mp.js → Chart.m2plpxTN.js} +2 -2
- package/dist/chunks/{ChatBubbleAssistant.SZMMe-ds.js → ChatBubbleAssistant.DhP5KHH7.js} +5 -5
- package/dist/chunks/{ChatBubbleUser.CoUxF7fg.js → ChatBubbleUser.DythvYOo.js} +4 -4
- package/dist/chunks/HistoryEntry._G88vZeP.js +721 -0
- package/dist/chunks/{LoginEntry.B_hnp3kn.js → LoginEntry.BBF4_rEV.js} +4 -4
- package/dist/chunks/{LogoEntry.D5pr7J7L.js → LogoEntry.BtwLANob.js} +1 -1
- package/dist/chunks/{MemoriesEntry.CmCC7oIt.js → MemoriesEntry.r2Wtd8nu.js} +34 -35
- package/dist/chunks/{ProfileEntry.DD6EWAdg.js → ProfileEntry.DwGmWxH2.js} +4 -4
- package/dist/chunks/{SettingsEntry.D2vkhDVP.js → SettingsEntry.D7b4vTwv.js} +5 -5
- package/dist/chunks/{UsageEntry.CPwTEetP.js → UsageEntry.BB5KalRi.js} +5 -5
- package/dist/chunks/{_baseUniq.CoZJjsf4.js → _baseUniq.22z3R--R.js} +1 -1
- package/dist/chunks/{arc.DCa0ktHo.js → arc.Cg0BJN6o.js} +1 -1
- package/dist/chunks/{architecture-U656AL7Q.jPKmAcqF.js → architecture-U656AL7Q.D7Nmp0uq.js} +1 -1
- package/dist/chunks/{architectureDiagram-VXUJARFQ.De0i9yVs.js → architectureDiagram-VXUJARFQ.D58LaEiy.js} +4 -4
- package/dist/chunks/{blockDiagram-VD42YOAC.C_-0tieR.js → blockDiagram-VD42YOAC.BS_n-q2N.js} +5 -5
- package/dist/chunks/{browser.CHnC-ta2.js → browser.YA6spcA7.js} +1 -1
- package/dist/chunks/{c4Diagram-YG6GDRKO.BsCj771T.js → c4Diagram-YG6GDRKO.lVOg2-ZH.js} +2 -2
- package/dist/chunks/{channel.BMmrJgu1.js → channel.DqxR-oS7.js} +1 -1
- package/dist/chunks/{chunk-4BX2VUAB.PHnk2h7S.js → chunk-4BX2VUAB.D5lbe9g-.js} +1 -1
- package/dist/chunks/{chunk-55IACEB6.DO1lSVjK.js → chunk-55IACEB6.BlgGY9Q6.js} +1 -1
- package/dist/chunks/{chunk-B4BG7PRW.DWoXKkeu.js → chunk-B4BG7PRW.Bn-86p3H.js} +4 -4
- package/dist/chunks/{chunk-DI55MBZ5.AFC0J_hR.js → chunk-DI55MBZ5.C2fqe7wu.js} +3 -3
- package/dist/chunks/{chunk-FMBD7UC4.MibDfgHx.js → chunk-FMBD7UC4.8IJZbT_o.js} +1 -1
- package/dist/chunks/{chunk-QN33PNHL.Cc4-mgjY.js → chunk-QN33PNHL.DOV2bTYS.js} +1 -1
- package/dist/chunks/{chunk-QZHKN3VN.JSlC3cS6.js → chunk-QZHKN3VN.CM1K8z3e.js} +1 -1
- package/dist/chunks/{chunk-TZMSLE5B.DwO6_k9Q.js → chunk-TZMSLE5B.CH_b17FM.js} +1 -1
- package/dist/chunks/{classDiagram-2ON5EDUG.DTLG4V26.js → classDiagram-2ON5EDUG.DeWSBBaZ.js} +2 -2
- package/dist/chunks/{classDiagram-v2-WZHVMYZB.DTLG4V26.js → classDiagram-v2-WZHVMYZB.DeWSBBaZ.js} +2 -2
- package/dist/chunks/{clone.DKF4uk6r.js → clone.B0TtmQHA.js} +1 -1
- package/dist/chunks/{cose-bilkent-S5V4N54A.VviytYtj.js → cose-bilkent-S5V4N54A.IzOlhIoo.js} +2 -2
- package/dist/chunks/{dagre-6UL2VRFP.BnyaaYxG.js → dagre-6UL2VRFP.COZ3hsXn.js} +5 -5
- package/dist/chunks/{diagram-PSM6KHXK._9uw_Asg.js → diagram-PSM6KHXK.JEnBJXhp.js} +4 -4
- package/dist/chunks/{diagram-QEK2KX5R.D8fcj4HF.js → diagram-QEK2KX5R.Bb3EEO2D.js} +3 -3
- package/dist/chunks/{diagram-S2PKOQOG.dRyHvEKp.js → diagram-S2PKOQOG.B_aUDr5F.js} +3 -3
- package/dist/chunks/{erDiagram-Q2GNP2WA.C1BZ7IIw.js → erDiagram-Q2GNP2WA.CYpL6V9w.js} +4 -4
- package/dist/chunks/{flowDiagram-NV44I4VS.DGv1Di7m.js → flowDiagram-NV44I4VS.CF9-8TaP.js} +5 -5
- package/dist/chunks/{ganttDiagram-JELNMOA3.BxWIrV3k.js → ganttDiagram-JELNMOA3.CdE8GB2s.js} +2 -2
- package/dist/chunks/{gitGraph-F6HP7TQM.XlxG37gi.js → gitGraph-F6HP7TQM.BWmUmcZV.js} +1 -1
- package/dist/chunks/{gitGraphDiagram-NY62KEGX.C6IZCfaV.js → gitGraphDiagram-NY62KEGX.Cn0Cu7Ww.js} +4 -4
- package/dist/chunks/{graph.sJUgf4to.js → graph.B0nity3n.js} +2 -2
- package/dist/chunks/{index.dU_uFcp3.js → index.Biab5cek.js} +1 -1
- package/dist/chunks/{index.PkMUAYHK.js → index.BkSC8d7B.js} +3 -3
- package/dist/chunks/{index.CogeyeP6.js → index.C2WmpF2e.js} +1 -1
- package/dist/chunks/{index.DiX9H7xn.js → index.CAuXCAe5.js} +1 -1
- package/dist/chunks/{index.vVEbZqrY.js → index.CJxTPes-.js} +1 -1
- package/dist/chunks/{index.BK010vU3.js → index.Ci5e_98Z.js} +3 -3
- package/dist/chunks/{index.CFUvysz5.js → index.D3dY6con.js} +1 -1
- package/dist/chunks/{index.B9oaH0MK.js → index.D_0HoqM8.js} +1 -1
- package/dist/chunks/{index.BztNm3SQ.js → index.Ds4-4dzy.js} +2 -2
- package/dist/chunks/{info-NVLQJR56.CB1yFEh0.js → info-NVLQJR56.DfoQxnaP.js} +1 -1
- package/dist/chunks/{infoDiagram-WHAUD3N6.C-F2hnF3.js → infoDiagram-WHAUD3N6.CbDQCj4t.js} +2 -2
- package/dist/chunks/{journeyDiagram-XKPGCS4Q.BOGagEe6.js → journeyDiagram-XKPGCS4Q.BGwMjBf9.js} +4 -4
- package/dist/chunks/{kanban-definition-3W4ZIXB7.DRixYBgm.js → kanban-definition-3W4ZIXB7.CS-TV1ji.js} +2 -2
- package/dist/chunks/{layout.NBNj8tNt.js → layout.DKjnDekM.js} +4 -4
- package/dist/chunks/{mermaid-parser.core.WUAPU6bl.js → mermaid-parser.core.CBflstHb.js} +10 -10
- package/dist/chunks/{min.pcif1d-R.js → min.eDGqv0vt.js} +2 -2
- package/dist/chunks/{mindmap-definition-VGOIOE7T.BoB_83-j.js → mindmap-definition-VGOIOE7T.GckYx6Fd.js} +3 -3
- package/dist/chunks/{packet-BFZMPI3H.obdUPGmt.js → packet-BFZMPI3H.DzGbdOiU.js} +1 -1
- package/dist/chunks/{pie-7BOR55EZ.CULyWvsL.js → pie-7BOR55EZ.CRxLvxJh.js} +1 -1
- package/dist/chunks/{pieDiagram-ADFJNKIX.cAhdeEuZ.js → pieDiagram-ADFJNKIX.BuekQ8o8.js} +4 -4
- package/dist/chunks/{quadrantDiagram-AYHSOK5B.BzL8QKyn.js → quadrantDiagram-AYHSOK5B.Cz1W80fL.js} +1 -1
- package/dist/chunks/{radar-NHE76QYJ.CGQJLLyR.js → radar-NHE76QYJ.D_eJ0pAQ.js} +1 -1
- package/dist/chunks/{rehype-mermaid.CEYn3QGz.js → rehype-mermaid.C6vWaLbm.js} +33 -33
- package/dist/chunks/{requirementDiagram-UZGBJVZJ.HEMcLvIC.js → requirementDiagram-UZGBJVZJ.D29ENfNv.js} +3 -3
- package/dist/chunks/{sankeyDiagram-TZEHDZUN.DHbrhGCv.js → sankeyDiagram-TZEHDZUN.BkA8zy0e.js} +1 -1
- package/dist/chunks/{sequenceDiagram-WL72ISMW.DWButQpu.js → sequenceDiagram-WL72ISMW.CohhptW1.js} +3 -3
- package/dist/chunks/{stateDiagram-FKZM4ZOC.CBFgulEf.js → stateDiagram-FKZM4ZOC.DXcdl9T3.js} +4 -4
- package/dist/chunks/{stateDiagram-v2-4FDKWEC3.DEk41WUx.js → stateDiagram-v2-4FDKWEC3.CyTSxcZ6.js} +2 -2
- package/dist/chunks/{timeline-definition-IT6M3QCI.eEEdc2b2.js → timeline-definition-IT6M3QCI.BvhsFWgy.js} +2 -2
- package/dist/chunks/{treemap-KMMF4GRG.DRjxIKwf.js → treemap-KMMF4GRG.DdhwEUUj.js} +1 -1
- package/dist/chunks/{useMarkdown.DxjQgTku.js → useMarkdown.CdWXCETb.js} +8 -8
- package/dist/chunks/{xychartDiagram-PRI3JC2R.DoDDE7QI.js → xychartDiagram-PRI3JC2R.vlO9NN_Y.js} +1 -1
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +3 -3
- package/package.json +3 -3
- package/dist/chunks/ButtonIconDelete.CLpIgJ17.js +0 -550
- package/dist/chunks/HistoryDataGrid.BNOeaUQd.js +0 -445
- package/dist/chunks/HistoryEntry.CvshPCHz.js +0 -293
- package/dist/chunks/InlineFilter.C_2kmBp0.js +0 -123
|
@@ -1,445 +0,0 @@
|
|
|
1
|
-
import { jsx as t, jsxs as g, Fragment as L } from "react/jsx-runtime";
|
|
2
|
-
import { DataGridContext as M, useColumnMeasurement as Z, getBodyClass as J, DataGridHeader as K, DataGridRow as j, DataGridCell as x, DataGridCellSort as B, ButtonIconDelete as Q, DataGrid as ee } from "./ButtonIconDelete.CLpIgJ17.js";
|
|
3
|
-
import { CellWrapper as F, IconCloseLight as te, ButtonIcon as re, IconRestore as ne, CARDS as se } from "./LogoEntry.D5pr7J7L.js";
|
|
4
|
-
import { forwardRef as oe, useContext as le, useRef as D, useState as q, useCallback as P, useEffect as T, useImperativeHandle as ae, useMemo as $ } from "react";
|
|
5
|
-
import { pluralize as U, isProbablyMobile as z, numberFormatter as ce, ResponsiveTooltip as ie } from "./App.C4nxPutS.js";
|
|
6
|
-
import { y as _, V as H, INFINITE_SCROLL_THRESHOLD as ue, INFINITE_SCROLL_LIMIT as me } from "./index.BztNm3SQ.js";
|
|
7
|
-
import N from "clsx";
|
|
8
|
-
const de = 20, fe = 5, xe = "20px", V = "data-row-index";
|
|
9
|
-
function pe(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 he({ data: e, children: r, batchSize: s = de, threshold: l = fe, rootMargin: a = xe, onVisibleCountChange: b, className: f }, m) {
|
|
20
|
-
const y = le(M), p = D(null), c = D(null), h = D(null), o = e.length, C = Math.min(s + l, o), [i, R] = q(C), k = i < o, d = P((n) => {
|
|
21
|
-
const I = p.current;
|
|
22
|
-
if (!I)
|
|
23
|
-
return;
|
|
24
|
-
const u = I.querySelector(`[${V}="${n}"]`);
|
|
25
|
-
if (u) {
|
|
26
|
-
const S = u.querySelector('[role="row"]');
|
|
27
|
-
S && S.scrollIntoView({
|
|
28
|
-
behavior: "smooth",
|
|
29
|
-
block: "center"
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
}, []);
|
|
33
|
-
T(() => {
|
|
34
|
-
if (h.current !== null) {
|
|
35
|
-
const n = h.current;
|
|
36
|
-
n < i && (requestAnimationFrame(() => {
|
|
37
|
-
d(n);
|
|
38
|
-
}), h.current = null);
|
|
39
|
-
}
|
|
40
|
-
}, [
|
|
41
|
-
i,
|
|
42
|
-
d
|
|
43
|
-
]), ae(m, () => ({
|
|
44
|
-
scrollToIndex: (n) => {
|
|
45
|
-
if (n < 0 || n >= o) {
|
|
46
|
-
console.warn(`scrollToIndex: index ${n} is out of bounds (0-${o - 1})`);
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
if (n < i) {
|
|
50
|
-
d(n);
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
const I = Math.min(n + l + 1, o);
|
|
54
|
-
h.current = n, R(I);
|
|
55
|
-
}
|
|
56
|
-
}), [
|
|
57
|
-
o,
|
|
58
|
-
i,
|
|
59
|
-
l,
|
|
60
|
-
d
|
|
61
|
-
]), T(() => {
|
|
62
|
-
R(Math.min(s + l, o));
|
|
63
|
-
}, [
|
|
64
|
-
o,
|
|
65
|
-
s,
|
|
66
|
-
l
|
|
67
|
-
]), T(() => {
|
|
68
|
-
b?.(i, o);
|
|
69
|
-
}, [
|
|
70
|
-
i,
|
|
71
|
-
o,
|
|
72
|
-
b
|
|
73
|
-
]);
|
|
74
|
-
const w = P((n) => {
|
|
75
|
-
n[0]?.isIntersecting && R((u) => Math.min(u + s, o));
|
|
76
|
-
}, [
|
|
77
|
-
s,
|
|
78
|
-
o
|
|
79
|
-
]), E = P((n) => {
|
|
80
|
-
if (c.current && (c.current.disconnect(), c.current = null), n && k) {
|
|
81
|
-
const I = pe(n);
|
|
82
|
-
c.current = new IntersectionObserver(w, {
|
|
83
|
-
root: I,
|
|
84
|
-
rootMargin: a
|
|
85
|
-
}), c.current.observe(n);
|
|
86
|
-
}
|
|
87
|
-
}, [
|
|
88
|
-
k,
|
|
89
|
-
w,
|
|
90
|
-
a
|
|
91
|
-
]);
|
|
92
|
-
T(() => () => {
|
|
93
|
-
c.current?.disconnect();
|
|
94
|
-
}, []);
|
|
95
|
-
const A = $(() => k ? Math.max(0, i - l) : -1, [
|
|
96
|
-
k,
|
|
97
|
-
i,
|
|
98
|
-
l
|
|
99
|
-
]), O = $(() => ({
|
|
100
|
-
...y,
|
|
101
|
-
cellWrapper: F.BODY
|
|
102
|
-
}), [
|
|
103
|
-
y
|
|
104
|
-
]), G = $(() => {
|
|
105
|
-
const n = [], I = Math.min(i, o) - 1;
|
|
106
|
-
for (let u = 0; u < i && u < o; u++) {
|
|
107
|
-
u === A && n.push(/* @__PURE__ */ t("div", {
|
|
108
|
-
ref: E,
|
|
109
|
-
"aria-hidden": "true",
|
|
110
|
-
style: {
|
|
111
|
-
height: "1px",
|
|
112
|
-
background: "transparent"
|
|
113
|
-
}
|
|
114
|
-
}, "__infinite-scroll-marker-inline__"));
|
|
115
|
-
const S = !k && u === I;
|
|
116
|
-
n.push(/* @__PURE__ */ t(M.Provider, {
|
|
117
|
-
value: {
|
|
118
|
-
...O,
|
|
119
|
-
isLastRow: S
|
|
120
|
-
},
|
|
121
|
-
children: /* @__PURE__ */ t("div", {
|
|
122
|
-
[V]: u,
|
|
123
|
-
style: {
|
|
124
|
-
display: "contents"
|
|
125
|
-
},
|
|
126
|
-
children: r(e[u], u)
|
|
127
|
-
})
|
|
128
|
-
}, u));
|
|
129
|
-
}
|
|
130
|
-
return A === i && k && n.push(/* @__PURE__ */ t("div", {
|
|
131
|
-
ref: E,
|
|
132
|
-
"aria-hidden": "true",
|
|
133
|
-
style: {
|
|
134
|
-
height: "1px",
|
|
135
|
-
background: "transparent"
|
|
136
|
-
}
|
|
137
|
-
}, "__infinite-scroll-marker-end__")), n;
|
|
138
|
-
}, [
|
|
139
|
-
e,
|
|
140
|
-
i,
|
|
141
|
-
o,
|
|
142
|
-
A,
|
|
143
|
-
k,
|
|
144
|
-
r,
|
|
145
|
-
E,
|
|
146
|
-
O
|
|
147
|
-
]);
|
|
148
|
-
Z(p, G);
|
|
149
|
-
const X = J(f);
|
|
150
|
-
return /* @__PURE__ */ t(M.Provider, {
|
|
151
|
-
value: {
|
|
152
|
-
...y,
|
|
153
|
-
cellWrapper: F.BODY
|
|
154
|
-
},
|
|
155
|
-
children: /* @__PURE__ */ t("div", {
|
|
156
|
-
ref: p,
|
|
157
|
-
role: "rowgroup",
|
|
158
|
-
className: X,
|
|
159
|
-
children: G
|
|
160
|
-
})
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
const ge = /* @__PURE__ */ oe(he), be = ({
|
|
164
|
-
sortDirection: e,
|
|
165
|
-
sortedCell: r,
|
|
166
|
-
onSortChange: s,
|
|
167
|
-
caption: l,
|
|
168
|
-
isSearchActive: a = !1,
|
|
169
|
-
showTokenUsage: b = !0
|
|
170
|
-
}) => {
|
|
171
|
-
const f = (m) => {
|
|
172
|
-
s(m);
|
|
173
|
-
};
|
|
174
|
-
return /* @__PURE__ */ t(K, { caption: l, children: /* @__PURE__ */ g(j, { children: [
|
|
175
|
-
/* @__PURE__ */ t(x, { className: "invisible", children: "Row" }),
|
|
176
|
-
b ? /* @__PURE__ */ g(L, { children: [
|
|
177
|
-
/* @__PURE__ */ t(x, { className: "text-xs sm:text-sm", children: "Summary" }),
|
|
178
|
-
a ? /* @__PURE__ */ t(x, { className: "text-xs sm:text-sm", children: "Date" }) : /* @__PURE__ */ t(
|
|
179
|
-
B,
|
|
180
|
-
{
|
|
181
|
-
buttonClassName: "text-xs sm:text-sm",
|
|
182
|
-
cellId: _,
|
|
183
|
-
align: "left",
|
|
184
|
-
sortDirection: r === _ ? e : !1,
|
|
185
|
-
sortedCell: r,
|
|
186
|
-
onSort: f,
|
|
187
|
-
children: "Date"
|
|
188
|
-
}
|
|
189
|
-
),
|
|
190
|
-
a ? /* @__PURE__ */ t(x, { align: "right", className: "text-xs sm:text-sm", children: "Tokens" }) : /* @__PURE__ */ t(
|
|
191
|
-
B,
|
|
192
|
-
{
|
|
193
|
-
buttonClassName: "text-xs sm:text-sm",
|
|
194
|
-
cellId: H,
|
|
195
|
-
align: "right",
|
|
196
|
-
sortDirection: r === H ? e : !1,
|
|
197
|
-
sortedCell: r,
|
|
198
|
-
onSort: f,
|
|
199
|
-
children: "Tokens"
|
|
200
|
-
}
|
|
201
|
-
)
|
|
202
|
-
] }) : /* @__PURE__ */ g(L, { children: [
|
|
203
|
-
a ? /* @__PURE__ */ t(x, { className: "text-xs sm:text-sm", children: "Date" }) : /* @__PURE__ */ t(
|
|
204
|
-
B,
|
|
205
|
-
{
|
|
206
|
-
buttonClassName: "text-xs sm:text-sm",
|
|
207
|
-
cellId: _,
|
|
208
|
-
align: "left",
|
|
209
|
-
sortDirection: r === _ ? e : !1,
|
|
210
|
-
sortedCell: r,
|
|
211
|
-
onSort: f,
|
|
212
|
-
children: "Date"
|
|
213
|
-
}
|
|
214
|
-
),
|
|
215
|
-
/* @__PURE__ */ t(x, { className: "text-xs sm:text-sm", children: "Summary" })
|
|
216
|
-
] }),
|
|
217
|
-
/* @__PURE__ */ t(x, { align: "right", className: "text-xs sm:text-sm", children: "Actions" })
|
|
218
|
-
] }) });
|
|
219
|
-
};
|
|
220
|
-
const ye = "av-pill", we = ({ variant: e }) => N("rounded-xs border", {
|
|
221
|
-
"border-border-information": e === "information",
|
|
222
|
-
"border-border-warning": e === "warning",
|
|
223
|
-
"border-border-success": e === "success",
|
|
224
|
-
"border-border-error": e === "error"
|
|
225
|
-
}), Y = ({ variant: e }) => N("not-prose", {
|
|
226
|
-
"text-copy-information": e === "information",
|
|
227
|
-
"text-copy-warning": e === "warning",
|
|
228
|
-
"text-copy-success": e === "success",
|
|
229
|
-
"text-copy-error": e === "error"
|
|
230
|
-
}), Ie = ({ variant: e }) => N({
|
|
231
|
-
"bg-surface-information": e === "information",
|
|
232
|
-
"bg-surface-warning": e === "warning",
|
|
233
|
-
"bg-surface-success": e === "success",
|
|
234
|
-
"bg-surface-error": e === "error"
|
|
235
|
-
}), Ne = (e) => {
|
|
236
|
-
const { className: r, variant: s } = e;
|
|
237
|
-
return {
|
|
238
|
-
main: N(ye, "inline-flex items-center gap-1 px-2 py-0.5 text-xs", we({
|
|
239
|
-
variant: s
|
|
240
|
-
}), Y({
|
|
241
|
-
variant: s
|
|
242
|
-
}), Ie(e), r),
|
|
243
|
-
button: N("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", Y({
|
|
244
|
-
variant: s
|
|
245
|
-
}))
|
|
246
|
-
};
|
|
247
|
-
}, W = ({ label: e, className: r, variant: s = "information", description: l, onClose: a }) => {
|
|
248
|
-
const [b, f] = q(!0), m = (p) => {
|
|
249
|
-
a && (a(p), p.defaultPrevented || f(!1));
|
|
250
|
-
};
|
|
251
|
-
if (!b)
|
|
252
|
-
return null;
|
|
253
|
-
const y = Ne({
|
|
254
|
-
className: r,
|
|
255
|
-
variant: s
|
|
256
|
-
});
|
|
257
|
-
return /* @__PURE__ */ g("div", {
|
|
258
|
-
role: "text",
|
|
259
|
-
className: y.main,
|
|
260
|
-
children: [
|
|
261
|
-
l && /* @__PURE__ */ t("span", {
|
|
262
|
-
className: "sr-only",
|
|
263
|
-
children: l
|
|
264
|
-
}),
|
|
265
|
-
/* @__PURE__ */ t("span", {
|
|
266
|
-
children: e
|
|
267
|
-
}),
|
|
268
|
-
a && /* @__PURE__ */ t("button", {
|
|
269
|
-
type: "button",
|
|
270
|
-
onClick: m,
|
|
271
|
-
className: y.button,
|
|
272
|
-
"aria-label": "Close",
|
|
273
|
-
children: /* @__PURE__ */ t(te, {
|
|
274
|
-
size: "size-3"
|
|
275
|
-
})
|
|
276
|
-
})
|
|
277
|
-
]
|
|
278
|
-
});
|
|
279
|
-
};
|
|
280
|
-
function ke(e, r, s) {
|
|
281
|
-
return s && r > e ? `Showing ${U(`${e} chat`, e)} out of ${r}` : U(`${e} chat`, e);
|
|
282
|
-
}
|
|
283
|
-
const v = {
|
|
284
|
-
rowNumber: "dark:text-copy-medium",
|
|
285
|
-
summary: "dark:text-white sm:max-w-full text-xs sm:text-sm",
|
|
286
|
-
timestamp: "dark:text-copy-medium sm:whitespace-nowrap text-xs sm:text-sm max-w-20 sm:max-w-none",
|
|
287
|
-
tokenUsage: "dark:text-copy-medium text-xs sm:text-sm"
|
|
288
|
-
};
|
|
289
|
-
function Ce({
|
|
290
|
-
item: e,
|
|
291
|
-
index: r,
|
|
292
|
-
onClickRestore: s,
|
|
293
|
-
onClickDelete: l,
|
|
294
|
-
showTokenUsage: a = !0,
|
|
295
|
-
isActive: b = !1
|
|
296
|
-
}) {
|
|
297
|
-
const f = e.timestamp.split(",")[0], m = e.similarityScore !== void 0 && e.similarityScore !== null ? Math.round(e.similarityScore * 100) : null, y = m !== null && m < 40 ? "warning" : "success", p = e.keywordMatch === !0, c = /* @__PURE__ */ t(x, { className: N(v.summary), children: /* @__PURE__ */ g("div", { className: "flex flex-col gap-1", children: [
|
|
298
|
-
(m !== null || p) && /* @__PURE__ */ g("div", { className: "flex flex-wrap gap-1", children: [
|
|
299
|
-
m !== null && /* @__PURE__ */ t(
|
|
300
|
-
W,
|
|
301
|
-
{
|
|
302
|
-
variant: y,
|
|
303
|
-
label: `${m}% semantic`
|
|
304
|
-
}
|
|
305
|
-
),
|
|
306
|
-
p && /* @__PURE__ */ t(W, { variant: "information", label: "keyword" })
|
|
307
|
-
] }),
|
|
308
|
-
z() ? /* @__PURE__ */ t("span", { title: e.summary, children: e.summary }) : /* @__PURE__ */ t("span", { className: "truncate", title: e.summary, children: e.summary })
|
|
309
|
-
] }) }), h = /* @__PURE__ */ t(x, { className: N(v.timestamp), children: f }), o = a ? /* @__PURE__ */ t(x, { align: "right", className: N(v.tokenUsage), children: e.tokenUsage ? ce.format(e.tokenUsage) : "0" }) : null, C = /* @__PURE__ */ t(x, { align: "center", borderLeft: !0, children: /* @__PURE__ */ g("div", { className: "flex flex-col items-end sm:flex-row gap-2", children: [
|
|
310
|
-
/* @__PURE__ */ t(
|
|
311
|
-
ie,
|
|
312
|
-
{
|
|
313
|
-
label: "Restore chat",
|
|
314
|
-
placement: "top",
|
|
315
|
-
trigger: /* @__PURE__ */ t(
|
|
316
|
-
re,
|
|
317
|
-
{
|
|
318
|
-
noBorder: !0,
|
|
319
|
-
label: "Restore chat",
|
|
320
|
-
variant: "primary",
|
|
321
|
-
onClick: async () => {
|
|
322
|
-
await s(e);
|
|
323
|
-
},
|
|
324
|
-
children: /* @__PURE__ */ t(
|
|
325
|
-
ne,
|
|
326
|
-
{
|
|
327
|
-
size: "size-3",
|
|
328
|
-
monotone: !0,
|
|
329
|
-
className: "text-copy-success dark:text-copy-success-light"
|
|
330
|
-
}
|
|
331
|
-
)
|
|
332
|
-
}
|
|
333
|
-
)
|
|
334
|
-
}
|
|
335
|
-
),
|
|
336
|
-
/* @__PURE__ */ t(
|
|
337
|
-
Q,
|
|
338
|
-
{
|
|
339
|
-
label: "Delete chat",
|
|
340
|
-
disabled: !1,
|
|
341
|
-
onClick: () => {
|
|
342
|
-
l(e);
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
)
|
|
346
|
-
] }) });
|
|
347
|
-
return /* @__PURE__ */ g(j, { active: b, children: [
|
|
348
|
-
/* @__PURE__ */ t(x, { className: N(v.rowNumber), children: r + 1 }),
|
|
349
|
-
a ? /* @__PURE__ */ g(L, { children: [
|
|
350
|
-
c,
|
|
351
|
-
h,
|
|
352
|
-
o
|
|
353
|
-
] }) : /* @__PURE__ */ g(L, { children: [
|
|
354
|
-
h,
|
|
355
|
-
c
|
|
356
|
-
] }),
|
|
357
|
-
C
|
|
358
|
-
] });
|
|
359
|
-
}
|
|
360
|
-
const Ee = ({
|
|
361
|
-
filteredHistory: e,
|
|
362
|
-
sortDirection: r,
|
|
363
|
-
sortedCell: s,
|
|
364
|
-
onSortChange: l,
|
|
365
|
-
onClickRestore: a,
|
|
366
|
-
onClickDelete: b,
|
|
367
|
-
isLoading: f = !1,
|
|
368
|
-
totalHistoryCount: m,
|
|
369
|
-
isFiltered: y = !1,
|
|
370
|
-
isSearchActive: p = !1,
|
|
371
|
-
activeChatId: c
|
|
372
|
-
}) => {
|
|
373
|
-
const h = z(), o = D(null), C = D(!1);
|
|
374
|
-
T(() => {
|
|
375
|
-
if (!c || C.current)
|
|
376
|
-
return;
|
|
377
|
-
const d = e.findIndex(
|
|
378
|
-
(w) => w.id === c
|
|
379
|
-
);
|
|
380
|
-
if (d !== -1) {
|
|
381
|
-
C.current = !0;
|
|
382
|
-
const w = setTimeout(() => {
|
|
383
|
-
o.current?.scrollToIndex(d);
|
|
384
|
-
}, 100);
|
|
385
|
-
return () => clearTimeout(w);
|
|
386
|
-
}
|
|
387
|
-
}, [c, e]), T(() => {
|
|
388
|
-
C.current = !1;
|
|
389
|
-
}, [c]);
|
|
390
|
-
const i = ke(
|
|
391
|
-
e.length,
|
|
392
|
-
m ?? e.length,
|
|
393
|
-
y
|
|
394
|
-
);
|
|
395
|
-
return /* @__PURE__ */ g(
|
|
396
|
-
ee,
|
|
397
|
-
{
|
|
398
|
-
columns: h ? ["auto", "auto", "1fr", "0.4fr"] : [
|
|
399
|
-
"auto",
|
|
400
|
-
"minmax(10px, 1fr)",
|
|
401
|
-
"0.3fr",
|
|
402
|
-
"0.3fr",
|
|
403
|
-
"0.3fr"
|
|
404
|
-
],
|
|
405
|
-
loading: f && e.length > 0,
|
|
406
|
-
children: [
|
|
407
|
-
/* @__PURE__ */ t(
|
|
408
|
-
be,
|
|
409
|
-
{
|
|
410
|
-
sortDirection: r,
|
|
411
|
-
sortedCell: s,
|
|
412
|
-
onSortChange: l,
|
|
413
|
-
caption: i,
|
|
414
|
-
isSearchActive: p,
|
|
415
|
-
showTokenUsage: !h
|
|
416
|
-
}
|
|
417
|
-
),
|
|
418
|
-
f && e.length === 0 ? /* @__PURE__ */ t("div", { className: "p-4 text-center", role: "status", "aria-live": "polite", children: "Loading..." }) : /* @__PURE__ */ t(
|
|
419
|
-
ge,
|
|
420
|
-
{
|
|
421
|
-
ref: o,
|
|
422
|
-
data: e.filter((d) => d?.summary),
|
|
423
|
-
batchSize: me,
|
|
424
|
-
threshold: ue,
|
|
425
|
-
children: (d, w) => /* @__PURE__ */ t(
|
|
426
|
-
Ce,
|
|
427
|
-
{
|
|
428
|
-
item: d,
|
|
429
|
-
index: w,
|
|
430
|
-
onClickRestore: a,
|
|
431
|
-
onClickDelete: b,
|
|
432
|
-
showTokenUsage: !h,
|
|
433
|
-
isActive: c === d.id
|
|
434
|
-
},
|
|
435
|
-
`${se.HISTORY.TITLE}-${d.id}-${w}`
|
|
436
|
-
)
|
|
437
|
-
}
|
|
438
|
-
)
|
|
439
|
-
]
|
|
440
|
-
}
|
|
441
|
-
);
|
|
442
|
-
};
|
|
443
|
-
export {
|
|
444
|
-
Ee as HistoryDataGrid
|
|
445
|
-
};
|