@versini/sassysaint 8.76.1 → 8.78.0
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.Bi_-dpeZ.js → AboutChangelog.Oqc6JIA-.js} +3 -3
- package/dist/chunks/{AboutEntry.CTwezLPC.js → AboutEntry.SvwVjpEz.js} +5 -5
- package/dist/chunks/{App.CV0Bjlae.js → App.DXGdoHmW.js} +145 -145
- package/dist/chunks/{Chart.uzxgAiX2.js → Chart.BTyaVE_V.js} +2 -2
- package/dist/chunks/{ChatBubbleAssistant.BVlp2GoO.js → ChatBubbleAssistant.lqDPohS8.js} +23 -21
- package/dist/chunks/{ChatBubbleUser.BrWZttfQ.js → ChatBubbleUser.DVCYqFLp.js} +29 -28
- package/dist/chunks/{ChatHistoryTable.uFTyBF2A.js → ChatHistoryTable.CCUGl-Jy.js} +91 -90
- package/dist/chunks/HistoryEntry.Ct2lOREI.js +316 -0
- package/dist/chunks/{ProfileEntry.CyBWFkHS.js → ProfileEntry.wLJ4_8-_.js} +2 -2
- package/dist/chunks/{SettingsEntry.QaYvHkdk.js → SettingsEntry.DoWBoOUU.js} +3 -3
- package/dist/chunks/{Table.Ckql2SnG.js → Table.CcIpdr5t.js} +2 -2
- package/dist/chunks/{UsageEntry.CDzDYeHf.js → UsageEntry.CQv5nedN.js} +3 -3
- package/dist/chunks/{UserMemoriesPanel.B6egCowo.js → UserMemoriesPanel.4oKdwzjk.js} +4 -4
- package/dist/chunks/{index.BXdpJpQs.js → index.BkbSbOap.js} +1 -1
- package/dist/chunks/{index.C6T0AZQ_.js → index.BqQTG3xS.js} +2 -2
- package/dist/chunks/{index.A4p6x5_T.js → index.C8_q0yRq.js} +1 -1
- package/dist/chunks/{index.BdPmgM6G.js → index.CEhhP2GE.js} +1 -1
- package/dist/chunks/index.DCl9t_FZ.js +153 -0
- package/dist/chunks/{index.CgUGA3LA.js → index.GHQv1Sm2.js} +1 -1
- package/dist/chunks/{index.rzw7MU5J.js → index.RtpWGHE1.js} +1 -1
- package/dist/chunks/{index.C4Rma01G.js → index.ineuZm_t.js} +3 -3
- package/dist/chunks/{useMarkdown.B4NWSGJz.js → useMarkdown.a9gbIvtd.js} +1733 -1374
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +4 -4
- package/dist/chunks/HistoryEntry.ThaD-b5r.js +0 -307
- package/dist/chunks/index.C3aZ0rB_.js +0 -142
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as Ap } from "react/jsx-runtime";
|
|
2
|
-
import { getDefaultExportFromCjs as ln } from "./App.
|
|
2
|
+
import { getDefaultExportFromCjs as ln } from "./App.DXGdoHmW.js";
|
|
3
3
|
import Cp, { useState as Pp, useEffect as Op } from "react";
|
|
4
|
-
import { TRIMESTERS as rn, TRIMESTERS_SHORT as Lp, isProbablyMobile as Ep } from "./index.
|
|
4
|
+
import { TRIMESTERS as rn, TRIMESTERS_SHORT as Lp, isProbablyMobile as Ep } from "./index.RtpWGHE1.js";
|
|
5
5
|
var ls = { exports: {} }, Ip = ls.exports, on;
|
|
6
6
|
function Dp() {
|
|
7
7
|
return on || (on = 1, (function(we, he) {
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { n as P, useUserPreferences as R, convertCamelCaseToReadable as y, numberFormatter as L, pluralize as _, J as v } from "./index.
|
|
3
|
-
import { BUBBLE_FOOTER_EMPTY as B } from "./index.
|
|
1
|
+
import { jsx as x } from "react/jsx-runtime";
|
|
2
|
+
import { n as P, useUserPreferences as R, convertCamelCaseToReadable as y, numberFormatter as L, pluralize as _, J as v } from "./index.RtpWGHE1.js";
|
|
3
|
+
import { BUBBLE_FOOTER_EMPTY as B } from "./index.DCl9t_FZ.js";
|
|
4
4
|
import U from "clsx";
|
|
5
5
|
import G, { useState as M, useRef as E, useEffect as F, useContext as S } from "react";
|
|
6
|
-
import { ChatContext as D, AppContext as j, AsyncBubble as k } from "./App.
|
|
7
|
-
import { useMarkdown as q } from "./useMarkdown.
|
|
6
|
+
import { ChatContext as D, AppContext as j, AsyncBubble as k } from "./App.DXGdoHmW.js";
|
|
7
|
+
import { useMarkdown as q } from "./useMarkdown.a9gbIvtd.js";
|
|
8
8
|
const I = 2, W = I * 1e3, b = "", V = (e) => e * (2 - e);
|
|
9
9
|
function Y(e, n = !0) {
|
|
10
|
-
const [a, d] = M(0), [
|
|
10
|
+
const [a, d] = M(0), [i, p] = M(0), [t, C] = M(e), r = E(0), s = E(0);
|
|
11
11
|
return t !== e && (C(e), p(e.startsWith(t) ? a : 0)), F(() => {
|
|
12
12
|
if (!n)
|
|
13
13
|
return;
|
|
14
|
-
const
|
|
14
|
+
const g = e.split(b).length, c = (o) => {
|
|
15
15
|
s.current || (s.current = o);
|
|
16
|
-
const u = o - s.current, l = Math.min(u / W, 1), h = V(l),
|
|
17
|
-
d(Math.floor(
|
|
16
|
+
const u = o - s.current, l = Math.min(u / W, 1), h = V(l), T = i + (g - i) * h;
|
|
17
|
+
d(Math.floor(T)), l < 1 && (r.current = requestAnimationFrame(c));
|
|
18
18
|
};
|
|
19
|
-
return s.current = 0, r.current = requestAnimationFrame(
|
|
19
|
+
return s.current = 0, r.current = requestAnimationFrame(c), () => {
|
|
20
20
|
r.current && cancelAnimationFrame(r.current);
|
|
21
21
|
};
|
|
22
|
-
}, [
|
|
22
|
+
}, [i, e, n]), n ? e.split(b).slice(0, a).join(b) : e;
|
|
23
23
|
}
|
|
24
24
|
const f = {
|
|
25
25
|
MODEL: "Model",
|
|
@@ -31,37 +31,39 @@ const f = {
|
|
|
31
31
|
annotations: n,
|
|
32
32
|
toolName: a,
|
|
33
33
|
role: d,
|
|
34
|
-
smooth:
|
|
34
|
+
smooth: i = !1,
|
|
35
35
|
isLastAssistantMessage: p = !1
|
|
36
36
|
}) => {
|
|
37
|
-
const t = Y(e,
|
|
37
|
+
const t = Y(e, i), {
|
|
38
38
|
state: { streaming: C, restoredModel: r, tokenUsage: s }
|
|
39
39
|
} = S(D), {
|
|
40
|
-
state: { fullScreen:
|
|
41
|
-
} = S(j),
|
|
40
|
+
state: { fullScreen: g }
|
|
41
|
+
} = S(j), c = n?.model || r, o = s, [u, l] = q(), { user: h, getAccessToken: T } = P(), { data: N } = R({
|
|
42
42
|
user: h?.username,
|
|
43
|
-
getAccessToken:
|
|
43
|
+
getAccessToken: T
|
|
44
44
|
}), O = N?.showDetails || !1, A = U("prose-li:ps-3", {
|
|
45
|
-
"max-w-xs sm:max-w-3xl": !
|
|
45
|
+
"max-w-xs sm:max-w-3xl": !g
|
|
46
46
|
});
|
|
47
47
|
let m;
|
|
48
48
|
return O && (m = {
|
|
49
|
-
[f.MODEL]:
|
|
49
|
+
[f.MODEL]: c || null,
|
|
50
50
|
[f.PLUGIN]: a ? y(a) : null
|
|
51
51
|
}, o && (p ? m[f.USAGE] = `${L.format(o)} ${_("token", o)}` : m[f.USAGE] = B)), F(() => {
|
|
52
52
|
t && l(t);
|
|
53
|
-
}, [t, l]), d === v ? /* @__PURE__ */
|
|
53
|
+
}, [t, l]), d === v ? /* @__PURE__ */ x(
|
|
54
54
|
k,
|
|
55
55
|
{
|
|
56
|
+
gradient: "medium",
|
|
56
57
|
tail: !0,
|
|
57
58
|
className: w,
|
|
58
59
|
contentClassName: A,
|
|
59
60
|
noMaxWidth: !0,
|
|
60
|
-
children: /* @__PURE__ */
|
|
61
|
+
children: /* @__PURE__ */ x("div", { className: "flex items-center justify-center italic text-copy-error-dark dark:text-red-300", children: u })
|
|
61
62
|
}
|
|
62
|
-
) : /* @__PURE__ */
|
|
63
|
+
) : /* @__PURE__ */ x(
|
|
63
64
|
k,
|
|
64
65
|
{
|
|
66
|
+
gradient: "light",
|
|
65
67
|
tail: !0,
|
|
66
68
|
copyToClipboardMode: "dark",
|
|
67
69
|
copyToClipboardFocusMode: "light",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as a, Fragment as
|
|
2
|
-
import { Button as C } from "./index.
|
|
1
|
+
import { jsx as a, Fragment as h, jsxs as S } from "react/jsx-runtime";
|
|
2
|
+
import { Button as C } from "./index.RtpWGHE1.js";
|
|
3
3
|
import { useState as _, useMemo as m, isValidElement as T, useEffect as b } from "react";
|
|
4
|
-
import { AsyncBubble as w } from "./App.
|
|
5
|
-
import { useMarkdown as x } from "./useMarkdown.
|
|
4
|
+
import { AsyncBubble as w } from "./App.DXGdoHmW.js";
|
|
5
|
+
import { useMarkdown as x } from "./useMarkdown.a9gbIvtd.js";
|
|
6
6
|
/*!
|
|
7
7
|
@versini/ui-truncate v5.2.0
|
|
8
8
|
© 2025 gizmette.com
|
|
@@ -16,20 +16,20 @@ try {
|
|
|
16
16
|
});
|
|
17
17
|
} catch {
|
|
18
18
|
}
|
|
19
|
-
const M = 200, k = ({ string: e, idealLength:
|
|
20
|
-
if (e.length <=
|
|
19
|
+
const M = 200, k = ({ string: e, idealLength: t = M }) => {
|
|
20
|
+
if (e.length <= t)
|
|
21
21
|
return {
|
|
22
22
|
string: e,
|
|
23
23
|
isTruncated: !1
|
|
24
24
|
};
|
|
25
|
-
if (e.charAt(
|
|
25
|
+
if (e.charAt(t) === " ")
|
|
26
26
|
return {
|
|
27
|
-
string: e.slice(0,
|
|
27
|
+
string: e.slice(0, t),
|
|
28
28
|
isTruncated: !0
|
|
29
29
|
};
|
|
30
|
-
const s = e.slice(
|
|
30
|
+
const s = e.slice(t).search(" ");
|
|
31
31
|
return {
|
|
32
|
-
string: e.slice(0,
|
|
32
|
+
string: e.slice(0, t + s),
|
|
33
33
|
isTruncated: !0
|
|
34
34
|
};
|
|
35
35
|
}, l = (e) => e == null || typeof e == "boolean" ? "" : typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map(l).join("") : /* @__PURE__ */ T(e) ? l(e.props.children) : "", B = /* @__PURE__ */ new Set([
|
|
@@ -65,55 +65,56 @@ const M = 200, k = ({ string: e, idealLength: r = M }) => {
|
|
|
65
65
|
if (Array.isArray(e))
|
|
66
66
|
return e.some(u);
|
|
67
67
|
if (/* @__PURE__ */ T(e)) {
|
|
68
|
-
const
|
|
69
|
-
return typeof
|
|
68
|
+
const t = e;
|
|
69
|
+
return typeof t.type == "string" && B.has(t.type.toUpperCase()) ? !0 : u(t.props.children);
|
|
70
70
|
}
|
|
71
71
|
return !1;
|
|
72
|
-
}, H = ({ children: e, length:
|
|
73
|
-
const [
|
|
72
|
+
}, H = ({ children: e, length: t = 200, mode: n = "system", focusMode: c = "system", enableRichTruncation: s = !1 }) => {
|
|
73
|
+
const [r, d] = _(!1), y = typeof e != "string" && !s, p = m(() => typeof e == "string" ? e : l(e), [
|
|
74
74
|
e
|
|
75
75
|
]), { string: f, isTruncated: i } = m(() => k({
|
|
76
76
|
string: p,
|
|
77
|
-
idealLength:
|
|
77
|
+
idealLength: t
|
|
78
78
|
}), [
|
|
79
79
|
p,
|
|
80
|
-
|
|
81
|
-
]), g = s && i && !
|
|
82
|
-
I.preventDefault(),
|
|
80
|
+
t
|
|
81
|
+
]), g = s && i && !r, E = (I) => {
|
|
82
|
+
I.preventDefault(), d(!r);
|
|
83
83
|
};
|
|
84
|
-
if (
|
|
85
|
-
return /* @__PURE__ */ a(
|
|
84
|
+
if (y)
|
|
85
|
+
return /* @__PURE__ */ a(h, {
|
|
86
86
|
children: e
|
|
87
87
|
});
|
|
88
88
|
let o;
|
|
89
|
-
i ?
|
|
89
|
+
i ? r ? o = e : o = f : o = e;
|
|
90
90
|
const A = s ? u(e) : !1;
|
|
91
|
-
return /* @__PURE__ */
|
|
91
|
+
return /* @__PURE__ */ S("span", {
|
|
92
92
|
style: {
|
|
93
93
|
wordBreak: "break-word"
|
|
94
94
|
},
|
|
95
95
|
"data-testid": "truncate-root",
|
|
96
|
-
"aria-expanded": i ?
|
|
96
|
+
"aria-expanded": i ? r : void 0,
|
|
97
97
|
children: [
|
|
98
98
|
o,
|
|
99
99
|
i && /* @__PURE__ */ a(C, {
|
|
100
100
|
mode: n,
|
|
101
101
|
focusMode: c,
|
|
102
|
-
className: !(s &&
|
|
102
|
+
className: !(s && r && A) ? "ml-2" : void 0,
|
|
103
103
|
size: "small",
|
|
104
104
|
onClick: E,
|
|
105
|
-
"aria-label":
|
|
106
|
-
children:
|
|
105
|
+
"aria-label": r ? "Show less" : "Show more",
|
|
106
|
+
children: r ? "less..." : "more..."
|
|
107
107
|
})
|
|
108
108
|
]
|
|
109
109
|
});
|
|
110
110
|
}, F = ({ content: e }) => {
|
|
111
|
-
const [
|
|
111
|
+
const [t, n] = x();
|
|
112
112
|
return b(() => {
|
|
113
113
|
e && n(e);
|
|
114
114
|
}, [e, n]), /* @__PURE__ */ a(
|
|
115
115
|
w,
|
|
116
116
|
{
|
|
117
|
+
gradient: "light",
|
|
117
118
|
tail: !0,
|
|
118
119
|
copyToClipboardMode: "dark",
|
|
119
120
|
copyToClipboardFocusMode: "light",
|
|
@@ -121,7 +122,7 @@ const M = 200, k = ({ string: e, idealLength: r = M }) => {
|
|
|
121
122
|
kind: "right",
|
|
122
123
|
className: "mt-3",
|
|
123
124
|
contentClassName: "prose prose-lighter prose-p:only:my-0",
|
|
124
|
-
children: /* @__PURE__ */ a(H, { mode: "light", focusMode: "light", enableRichTruncation: !0, children:
|
|
125
|
+
children: /* @__PURE__ */ a(H, { mode: "light", focusMode: "light", enableRichTruncation: !0, children: t })
|
|
125
126
|
}
|
|
126
127
|
);
|
|
127
128
|
};
|
|
@@ -1,57 +1,59 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { f as p, h as u, INFINITE_SCROLL_THRESHOLD as
|
|
3
|
-
import { Tooltip as
|
|
4
|
-
import
|
|
5
|
-
import { Fragment as
|
|
6
|
-
import { W as
|
|
7
|
-
const
|
|
8
|
-
[
|
|
9
|
-
[
|
|
10
|
-
[
|
|
11
|
-
},
|
|
1
|
+
import { jsxs as m, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { f as p, h as u, INFINITE_SCROLL_THRESHOLD as b, CARDS as D, pluralize as T, ButtonIcon as d, IconRestore as y, IconStarInCircle as U, IconStarInCircleLight as z, IconDelete as P, numberFormatter as L, k as _, IconGoogleGemini as G, IconOpenAI as $, IconAnthropic as B, isProbablyMobile as W, z as Y, Z as H, E as K } from "./index.RtpWGHE1.js";
|
|
3
|
+
import { Tooltip as h } from "./App.DXGdoHmW.js";
|
|
4
|
+
import l from "clsx";
|
|
5
|
+
import { Fragment as F } from "react";
|
|
6
|
+
import { W as V, j, G as x, H as Z, M as n, F as N } from "./Table.CcIpdr5t.js";
|
|
7
|
+
const q = {
|
|
8
|
+
[K]: B,
|
|
9
|
+
[H]: $,
|
|
10
|
+
[Y]: G
|
|
11
|
+
}, s = {
|
|
12
12
|
ROW: "row",
|
|
13
13
|
TIMESTAMP: p,
|
|
14
14
|
SUMMARY: "summary",
|
|
15
15
|
PROVIDER: "provider",
|
|
16
16
|
TOKEN_USAGE: u,
|
|
17
17
|
ACTIONS: "actions"
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
],
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
],
|
|
31
|
-
filteredHistory:
|
|
32
|
-
historyState:
|
|
18
|
+
}, J = [
|
|
19
|
+
s.ROW,
|
|
20
|
+
s.TIMESTAMP,
|
|
21
|
+
s.SUMMARY,
|
|
22
|
+
s.ACTIONS
|
|
23
|
+
], Q = [
|
|
24
|
+
s.ROW,
|
|
25
|
+
s.SUMMARY,
|
|
26
|
+
s.TIMESTAMP,
|
|
27
|
+
s.TOKEN_USAGE,
|
|
28
|
+
s.PROVIDER,
|
|
29
|
+
s.ACTIONS
|
|
30
|
+
], le = ({
|
|
31
|
+
filteredHistory: c,
|
|
32
|
+
historyState: o,
|
|
33
33
|
lastEntryToLoad: g,
|
|
34
34
|
onClickSort: C,
|
|
35
|
-
onClickRestore:
|
|
36
|
-
onClickDelete:
|
|
37
|
-
onClickFavorite:
|
|
38
|
-
infinityScrollMarkerRef:
|
|
39
|
-
isLoading:
|
|
35
|
+
onClickRestore: R,
|
|
36
|
+
onClickDelete: S,
|
|
37
|
+
onClickFavorite: O,
|
|
38
|
+
infinityScrollMarkerRef: A,
|
|
39
|
+
isLoading: I = !1,
|
|
40
|
+
totalHistoryCount: E,
|
|
41
|
+
isFiltered: v = !1
|
|
40
42
|
}) => {
|
|
41
|
-
const M =
|
|
43
|
+
const M = W() ? J : Q, w = (t) => {
|
|
42
44
|
switch (t) {
|
|
43
|
-
case
|
|
45
|
+
case s.ROW:
|
|
44
46
|
return /* @__PURE__ */ e(n, { className: "sr-only", children: "Row" }, t);
|
|
45
|
-
case
|
|
47
|
+
case s.TIMESTAMP:
|
|
46
48
|
return /* @__PURE__ */ e(
|
|
47
|
-
|
|
49
|
+
N,
|
|
48
50
|
{
|
|
49
51
|
focusMode: "system",
|
|
50
52
|
buttonClassName: "text-xs sm:text-sm",
|
|
51
53
|
cellId: p,
|
|
52
54
|
align: "left",
|
|
53
|
-
sortDirection:
|
|
54
|
-
sortedCell:
|
|
55
|
+
sortDirection: o.sortDirection,
|
|
56
|
+
sortedCell: o.sortedCell,
|
|
55
57
|
onClick: () => {
|
|
56
58
|
C(p);
|
|
57
59
|
},
|
|
@@ -59,20 +61,20 @@ const Z = {
|
|
|
59
61
|
},
|
|
60
62
|
t
|
|
61
63
|
);
|
|
62
|
-
case
|
|
64
|
+
case s.SUMMARY:
|
|
63
65
|
return /* @__PURE__ */ e(n, { className: "text-xs sm:text-sm", children: "Summary" }, t);
|
|
64
|
-
case
|
|
66
|
+
case s.PROVIDER:
|
|
65
67
|
return /* @__PURE__ */ e(n, { className: "text-xs sm:text-sm", children: "Provider" }, t);
|
|
66
|
-
case
|
|
68
|
+
case s.TOKEN_USAGE:
|
|
67
69
|
return /* @__PURE__ */ e(
|
|
68
|
-
|
|
70
|
+
N,
|
|
69
71
|
{
|
|
70
72
|
focusMode: "system",
|
|
71
73
|
buttonClassName: "text-xs sm:text-sm",
|
|
72
74
|
cellId: u,
|
|
73
75
|
align: "right",
|
|
74
|
-
sortDirection:
|
|
75
|
-
sortedCell:
|
|
76
|
+
sortDirection: o.sortDirection,
|
|
77
|
+
sortedCell: o.sortedCell,
|
|
76
78
|
onClick: () => {
|
|
77
79
|
C(u);
|
|
78
80
|
},
|
|
@@ -80,35 +82,35 @@ const Z = {
|
|
|
80
82
|
},
|
|
81
83
|
t
|
|
82
84
|
);
|
|
83
|
-
case
|
|
85
|
+
case s.ACTIONS:
|
|
84
86
|
return /* @__PURE__ */ e(n, { className: "text-xs sm:text-sm text-right", children: "Actions" }, t);
|
|
85
87
|
default:
|
|
86
88
|
return null;
|
|
87
89
|
}
|
|
88
|
-
},
|
|
90
|
+
}, k = (t, r, i) => {
|
|
89
91
|
switch (t) {
|
|
90
|
-
case
|
|
91
|
-
return /* @__PURE__ */ e(n, { children:
|
|
92
|
-
case
|
|
92
|
+
case s.ROW:
|
|
93
|
+
return /* @__PURE__ */ e(n, { children: i + 1 }, t);
|
|
94
|
+
case s.TIMESTAMP:
|
|
93
95
|
return /* @__PURE__ */ e(
|
|
94
96
|
n,
|
|
95
97
|
{
|
|
96
98
|
component: "th",
|
|
97
99
|
scope: "row",
|
|
98
|
-
className:
|
|
100
|
+
className: l(
|
|
99
101
|
"dark:text-gray-400",
|
|
100
102
|
"sm:whitespace-nowrap text-xs sm:text-sm max-w-20 sm:max-w-none"
|
|
101
103
|
),
|
|
102
|
-
children:
|
|
104
|
+
children: r.timestamp.split(",")[0]
|
|
103
105
|
},
|
|
104
106
|
t
|
|
105
107
|
);
|
|
106
|
-
case
|
|
107
|
-
const a =
|
|
108
|
+
case s.SUMMARY: {
|
|
109
|
+
const a = r.summary || (r.messages.length > 0 ? r.messages[0]?.content : "");
|
|
108
110
|
return /* @__PURE__ */ e(
|
|
109
111
|
n,
|
|
110
112
|
{
|
|
111
|
-
className:
|
|
113
|
+
className: l(
|
|
112
114
|
"dark:text-white",
|
|
113
115
|
"max-w-[100px] sm:max-w-full text-xs sm:text-sm"
|
|
114
116
|
),
|
|
@@ -120,94 +122,94 @@ const Z = {
|
|
|
120
122
|
t
|
|
121
123
|
);
|
|
122
124
|
}
|
|
123
|
-
case
|
|
124
|
-
const a =
|
|
125
|
+
case s.PROVIDER: {
|
|
126
|
+
const a = r.model ? _(r.model) : null, f = a ? q[a] : null;
|
|
125
127
|
return /* @__PURE__ */ e(
|
|
126
128
|
n,
|
|
127
129
|
{
|
|
128
130
|
component: "th",
|
|
129
131
|
scope: "row",
|
|
130
|
-
className:
|
|
132
|
+
className: l("dark:text-gray-400"),
|
|
131
133
|
align: "center",
|
|
132
|
-
children:
|
|
133
|
-
|
|
134
|
+
children: f ? /* @__PURE__ */ e(
|
|
135
|
+
f,
|
|
134
136
|
{
|
|
135
137
|
size: "size-4 sm:size-5",
|
|
136
138
|
semantic: !0,
|
|
137
|
-
title:
|
|
139
|
+
title: r.model || a
|
|
138
140
|
}
|
|
139
141
|
) : null
|
|
140
142
|
},
|
|
141
143
|
t
|
|
142
144
|
);
|
|
143
145
|
}
|
|
144
|
-
case
|
|
146
|
+
case s.TOKEN_USAGE:
|
|
145
147
|
return /* @__PURE__ */ e(
|
|
146
148
|
n,
|
|
147
149
|
{
|
|
148
|
-
className:
|
|
150
|
+
className: l("dark:text-gray-400", "text-xs sm:text-sm"),
|
|
149
151
|
align: "right",
|
|
150
|
-
children:
|
|
152
|
+
children: r.tokenUsage ? L.format(r.tokenUsage) : "0"
|
|
151
153
|
},
|
|
152
154
|
t
|
|
153
155
|
);
|
|
154
|
-
case
|
|
155
|
-
return /* @__PURE__ */ e(n, { children: /* @__PURE__ */
|
|
156
|
+
case s.ACTIONS:
|
|
157
|
+
return /* @__PURE__ */ e(n, { children: /* @__PURE__ */ m("div", { className: "flex flex-col items-end sm:flex-row gap-2", children: [
|
|
156
158
|
/* @__PURE__ */ e(
|
|
157
|
-
|
|
159
|
+
h,
|
|
158
160
|
{
|
|
159
161
|
label: "Restore chat",
|
|
160
162
|
placement: "top",
|
|
161
163
|
trigger: /* @__PURE__ */ e(
|
|
162
|
-
|
|
164
|
+
d,
|
|
163
165
|
{
|
|
164
166
|
noBorder: !0,
|
|
165
167
|
label: "Restore chat",
|
|
166
168
|
variant: "primary",
|
|
167
169
|
iconClassName: "text-green-800 dark:text-green-500",
|
|
168
170
|
onClick: async () => {
|
|
169
|
-
await
|
|
171
|
+
await R(r);
|
|
170
172
|
},
|
|
171
|
-
children: /* @__PURE__ */ e(
|
|
173
|
+
children: /* @__PURE__ */ e(y, { size: "size-3", monotone: !0 })
|
|
172
174
|
}
|
|
173
175
|
)
|
|
174
176
|
}
|
|
175
177
|
),
|
|
176
178
|
/* @__PURE__ */ e(
|
|
177
|
-
|
|
179
|
+
h,
|
|
178
180
|
{
|
|
179
|
-
label:
|
|
181
|
+
label: r.favoriteChat ? "Remove from favorites" : "Add to favorites",
|
|
180
182
|
placement: "top",
|
|
181
183
|
trigger: /* @__PURE__ */ e(
|
|
182
|
-
|
|
184
|
+
d,
|
|
183
185
|
{
|
|
184
186
|
noBorder: !0,
|
|
185
|
-
label:
|
|
187
|
+
label: r.favoriteChat ? "Remove from favorites" : "Add to favorites",
|
|
186
188
|
variant: "primary",
|
|
187
189
|
onClick: async () => {
|
|
188
|
-
await
|
|
190
|
+
await O(r);
|
|
189
191
|
},
|
|
190
|
-
children:
|
|
192
|
+
children: r.favoriteChat ? /* @__PURE__ */ e(U, { size: "size-4", monotone: !0 }) : /* @__PURE__ */ e(z, { size: "size-4", monotone: !0 })
|
|
191
193
|
}
|
|
192
194
|
)
|
|
193
195
|
}
|
|
194
196
|
),
|
|
195
197
|
/* @__PURE__ */ e(
|
|
196
|
-
|
|
198
|
+
h,
|
|
197
199
|
{
|
|
198
200
|
label: "Delete chat",
|
|
199
201
|
placement: "top",
|
|
200
202
|
trigger: /* @__PURE__ */ e(
|
|
201
|
-
|
|
203
|
+
d,
|
|
202
204
|
{
|
|
203
205
|
noBorder: !0,
|
|
204
206
|
label: "Delete chat",
|
|
205
207
|
variant: "primary",
|
|
206
208
|
iconClassName: "text-red-700 dark:text-red-500",
|
|
207
209
|
onClick: () => {
|
|
208
|
-
|
|
210
|
+
S(r);
|
|
209
211
|
},
|
|
210
|
-
children: /* @__PURE__ */ e(
|
|
212
|
+
children: /* @__PURE__ */ e(P, { size: "size-3", monotone: !0 })
|
|
211
213
|
}
|
|
212
214
|
)
|
|
213
215
|
}
|
|
@@ -217,20 +219,19 @@ const Z = {
|
|
|
217
219
|
return null;
|
|
218
220
|
}
|
|
219
221
|
};
|
|
220
|
-
return /* @__PURE__ */
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
222
|
+
return /* @__PURE__ */ m(V, { stickyHeader: !0, compact: !0, mode: "alt-system", caption: (() => {
|
|
223
|
+
const t = c.length, r = E ?? t;
|
|
224
|
+
return v && r > t ? `Showing ${T(`${t} chat`, t)} out of ${r}` : T(`${t} chat`, t);
|
|
225
|
+
})(), children: [
|
|
226
|
+
/* @__PURE__ */ e(j, { children: /* @__PURE__ */ e(x, { children: M.map((t) => w(t)) }) }),
|
|
227
|
+
/* @__PURE__ */ e(Z, { children: I && c.length === 0 ? /* @__PURE__ */ e(x, { children: /* @__PURE__ */ e(n, { colSpan: 1e3, children: /* @__PURE__ */ e("div", { children: "Loading..." }) }) }) : c.slice(0, g).map((t, r) => t?.messages?.length > 0 ? /* @__PURE__ */ m(F, { children: [
|
|
228
|
+
r === g - b && /* @__PURE__ */ e("tr", { ref: A }),
|
|
229
|
+
/* @__PURE__ */ e(x, { children: M.map(
|
|
230
|
+
(i) => k(i, t, r)
|
|
226
231
|
) })
|
|
227
|
-
] }, `${
|
|
228
|
-
/* @__PURE__ */ e(j, { children: /* @__PURE__ */ e(i, { children: /* @__PURE__ */ e(n, { colSpan: 1e3, children: /* @__PURE__ */ e("div", { children: w(
|
|
229
|
-
`${o.length} chat`,
|
|
230
|
-
o.length
|
|
231
|
-
) }) }) }) })
|
|
232
|
+
] }, `${D.HISTORY.TITLE}-${t.id}-${r}`) : null) })
|
|
232
233
|
] });
|
|
233
234
|
};
|
|
234
235
|
export {
|
|
235
|
-
|
|
236
|
+
le as ChatHistoryTable
|
|
236
237
|
};
|