@versini/sassysaint 5.5.11 → 5.5.12
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/{App.CbBMiVHr.js → App.CNyYloEL.js} +50 -39
- package/dist/chunks/{HeaderToolbar.CmGmS7yq.js → HeaderToolbar.Bq1bArQC.js} +752 -778
- package/dist/chunks/{MarkdownWithExtra.bpTOaT-U.js → MarkdownWithExtra.CFyPsO_C.js} +2 -2
- package/dist/chunks/{MessageAssistant.C_sIDCZ4.js → MessageAssistant.BihILyCE.js} +3 -3
- package/dist/chunks/{index.CTyCRIB4.js → index.B7w6LJPp.js} +42 -64
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as k, jsx as l, Fragment as Y } from "react/jsx-runtime";
|
|
2
|
-
import { g as me, ACTION_RESTORE as At, ACTION_MESSAGE as q, ROLE_ASSISTANT as K, ACTION_RESET as qe, ACTION_MODEL as Ke, ACTION_ENGINE as Je, ACTION_STREAMING as Qe, ACTION_SORT as zt, ACTION_SEARCH as Mt, ACTION_SET_TAGS as Xe, ACTION_RESET_TAGS as Ye, ACTION_TOGGLE_TAG as Ze, DEFAULT_AI_ENGINE as V, P as et, un as Z, ROLE_SYSTEM as Lt, ROLE_INTERNAL as he, ROLE_HIDDEN as Ot, STATS_SEPARATOR as
|
|
2
|
+
import { g as me, ACTION_RESTORE as At, ACTION_MESSAGE as q, ROLE_ASSISTANT as K, ACTION_RESET as qe, ACTION_MODEL as Ke, ACTION_ENGINE as Je, ACTION_STREAMING as Qe, ACTION_SORT as zt, ACTION_SEARCH as Mt, ACTION_SET_TAGS as Xe, ACTION_RESET_TAGS as Ye, ACTION_TOGGLE_TAG as Ze, DEFAULT_AI_ENGINE as V, P as et, un as Z, ROLE_SYSTEM as Lt, ROLE_INTERNAL as he, ROLE_HIDDEN as Ot, STATS_SEPARATOR as $e, CLIPBOARD_TAG as Ae, TYPE_QUESTION as Vt, C as tt, SEND as Ut, ERROR_MESSAGE as Ht, ROLE_USER as le, L as Pt, j as Dt, isLastMessageFromRole as Gt, getMessageContaintWrapperClass as Ft, Logo as Wt, getMainPaddingClass as ze, r as jt, LOCAL_STORAGE_PREFIX as Me, LOCAL_STORAGE_SEARCH as qt, LOCAL_STORAGE_SORT as Kt } from "./index.B7w6LJPp.js";
|
|
3
3
|
import i from "clsx";
|
|
4
|
-
import I, { useRef as v, useEffect as x, useCallback as U, useSyncExternalStore as Jt, useState as S, useMemo as pe, useContext as
|
|
4
|
+
import I, { useRef as v, useEffect as x, useCallback as U, useSyncExternalStore as Jt, useState as S, useMemo as pe, useContext as B, useLayoutEffect as P, useId as Qt, useReducer as Q, lazy as rt, Suspense as ce } from "react";
|
|
5
5
|
const Xt = ({
|
|
6
6
|
className: e,
|
|
7
7
|
viewBox: t,
|
|
@@ -897,7 +897,7 @@ const G = I.createContext({
|
|
|
897
897
|
className: t,
|
|
898
898
|
...r
|
|
899
899
|
}) => {
|
|
900
|
-
const a =
|
|
900
|
+
const a = B(G);
|
|
901
901
|
a.cellWrapper = ee;
|
|
902
902
|
const o = ur({
|
|
903
903
|
className: t,
|
|
@@ -910,7 +910,7 @@ const G = I.createContext({
|
|
|
910
910
|
className: t,
|
|
911
911
|
...r
|
|
912
912
|
}) => {
|
|
913
|
-
const a =
|
|
913
|
+
const a = B(G);
|
|
914
914
|
a.cellWrapper = be;
|
|
915
915
|
const o = mr({
|
|
916
916
|
className: t,
|
|
@@ -919,26 +919,26 @@ const G = I.createContext({
|
|
|
919
919
|
});
|
|
920
920
|
return /* @__PURE__ */ l("tfoot", { className: o, ...r, children: e });
|
|
921
921
|
}, ao = ({ children: e, ...t }) => {
|
|
922
|
-
const r =
|
|
922
|
+
const r = B(G);
|
|
923
923
|
return r.cellWrapper = D, /* @__PURE__ */ l("tbody", { ...t, children: e });
|
|
924
924
|
}, oo = ({
|
|
925
925
|
children: e,
|
|
926
926
|
className: t,
|
|
927
927
|
...r
|
|
928
928
|
}) => {
|
|
929
|
-
const a =
|
|
929
|
+
const a = B(G), o = hr({
|
|
930
930
|
mode: a.mode,
|
|
931
931
|
cellWrapper: a.cellWrapper,
|
|
932
932
|
className: t
|
|
933
933
|
});
|
|
934
934
|
return /* @__PURE__ */ l("tr", { className: o, ...r, children: e });
|
|
935
|
-
},
|
|
935
|
+
}, Br = ({
|
|
936
936
|
children: e,
|
|
937
937
|
component: t,
|
|
938
938
|
className: r,
|
|
939
939
|
...a
|
|
940
940
|
}) => {
|
|
941
|
-
const o =
|
|
941
|
+
const o = B(G), n = t || (o.cellWrapper === ee ? "th" : "td"), s = pr({
|
|
942
942
|
cellWrapper: o.cellWrapper,
|
|
943
943
|
className: r,
|
|
944
944
|
mode: o.mode,
|
|
@@ -961,7 +961,7 @@ const G = I.createContext({
|
|
|
961
961
|
}) => {
|
|
962
962
|
const m = br({ buttonClassName: r });
|
|
963
963
|
return /* @__PURE__ */ l(
|
|
964
|
-
|
|
964
|
+
Br,
|
|
965
965
|
{
|
|
966
966
|
component: o,
|
|
967
967
|
className: a,
|
|
@@ -988,7 +988,7 @@ const G = I.createContext({
|
|
|
988
988
|
}, w = [];
|
|
989
989
|
for (let e = 0; e < 256; ++e)
|
|
990
990
|
w.push((e + 256).toString(16).slice(1));
|
|
991
|
-
function
|
|
991
|
+
function $r(e, t = 0) {
|
|
992
992
|
return (w[e[t + 0]] + w[e[t + 1]] + w[e[t + 2]] + w[e[t + 3]] + "-" + w[e[t + 4]] + w[e[t + 5]] + "-" + w[e[t + 6]] + w[e[t + 7]] + "-" + w[e[t + 8]] + w[e[t + 9]] + "-" + w[e[t + 10]] + w[e[t + 11]] + w[e[t + 12]] + w[e[t + 13]] + w[e[t + 14]] + w[e[t + 15]]).toLowerCase();
|
|
993
993
|
}
|
|
994
994
|
let ie;
|
|
@@ -1007,7 +1007,7 @@ function ke(e, t, r) {
|
|
|
1007
1007
|
return He.randomUUID();
|
|
1008
1008
|
e = e || {};
|
|
1009
1009
|
const a = e.random || (e.rng || zr)();
|
|
1010
|
-
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128,
|
|
1010
|
+
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, $r(a);
|
|
1011
1011
|
}
|
|
1012
1012
|
const Lr = (e, t) => {
|
|
1013
1013
|
if ((t == null ? void 0 : t.type) === At) {
|
|
@@ -1747,7 +1747,7 @@ const ta = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
|
1747
1747
|
...E
|
|
1748
1748
|
}, M) => {
|
|
1749
1749
|
var Ne;
|
|
1750
|
-
const
|
|
1750
|
+
const $ = v(null), xt = jr([M, $]), [_t, J] = Pe(), [wt, H] = Pe(), re = v(80), Ee = v(-25), L = v(null), Se = v(30), ae = v(null), W = Jr({ id: e, prefix: `${dt}-` }), [Ce, Tt] = S(0), [Ie, Nt] = S(0), [Et, Re] = S(
|
|
1751
1751
|
!!(!f && b)
|
|
1752
1752
|
), St = `${t} error, ${b}`, O = sa({
|
|
1753
1753
|
className: n,
|
|
@@ -1775,7 +1775,7 @@ const ta = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
|
1775
1775
|
Ct(C.target.value);
|
|
1776
1776
|
}, Rt = (C) => {
|
|
1777
1777
|
f && b && Re(!0), N && N(C);
|
|
1778
|
-
},
|
|
1778
|
+
}, Bt = (C) => {
|
|
1779
1779
|
f && b && !A && Re(!1), R && R(C);
|
|
1780
1780
|
};
|
|
1781
1781
|
return P(() => {
|
|
@@ -1783,7 +1783,7 @@ const ta = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
|
1783
1783
|
}, [J]), P(() => {
|
|
1784
1784
|
H && H.width && Nt(H.width + 18 + 10);
|
|
1785
1785
|
}, [H]), P(() => {
|
|
1786
|
-
o ||
|
|
1786
|
+
o || $ && $.current && A !== void 0 && ($.current.style.height = "inherit", $.current.style.height = $.current.scrollHeight + "px");
|
|
1787
1787
|
}, [A, o]), P(() => {
|
|
1788
1788
|
o || setTimeout(() => {
|
|
1789
1789
|
var C;
|
|
@@ -1793,10 +1793,10 @@ const ta = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
|
1793
1793
|
);
|
|
1794
1794
|
}, 0);
|
|
1795
1795
|
}, [A, o]), P(() => {
|
|
1796
|
-
var C,
|
|
1797
|
-
if (!o &&
|
|
1798
|
-
const { labelOffset: oe, helperTextOffset: ne, scrollHeight:
|
|
1799
|
-
scrollHeight:
|
|
1796
|
+
var C, Be;
|
|
1797
|
+
if (!o && $ && $.current && A !== void 0) {
|
|
1798
|
+
const { labelOffset: oe, helperTextOffset: ne, scrollHeight: $t } = la({
|
|
1799
|
+
scrollHeight: $.current.scrollHeight,
|
|
1800
1800
|
currentHeight: re.current,
|
|
1801
1801
|
currentLabelOffset: Ee.current,
|
|
1802
1802
|
currentHelperTextOffset: Se.current
|
|
@@ -1804,10 +1804,10 @@ const ta = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
|
1804
1804
|
oe && (Ee.current = oe, (C = L == null ? void 0 : L.current) == null || C.style.setProperty(
|
|
1805
1805
|
"--av-text-area-label",
|
|
1806
1806
|
`${oe}px`
|
|
1807
|
-
)), ne && (Se.current = ne, (
|
|
1807
|
+
)), ne && (Se.current = ne, (Be = ae == null ? void 0 : ae.current) == null || Be.style.setProperty(
|
|
1808
1808
|
"--av-text-area-helper-text",
|
|
1809
1809
|
`${ne}px`
|
|
1810
|
-
)), re.current =
|
|
1810
|
+
)), re.current = $t || re.current;
|
|
1811
1811
|
}
|
|
1812
1812
|
}, [A, o]), H.width > 0 && ((Ne = L == null ? void 0 : L.current) == null || Ne.style.setProperty(
|
|
1813
1813
|
"--tw-translate-x",
|
|
@@ -1853,7 +1853,7 @@ const ta = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
|
1853
1853
|
value: A,
|
|
1854
1854
|
onChange: It,
|
|
1855
1855
|
onFocus: Rt,
|
|
1856
|
-
onBlur:
|
|
1856
|
+
onBlur: Bt,
|
|
1857
1857
|
...E
|
|
1858
1858
|
}
|
|
1859
1859
|
),
|
|
@@ -1894,7 +1894,7 @@ const ca = ({
|
|
|
1894
1894
|
focusMode: t = "light",
|
|
1895
1895
|
radius: r = "small"
|
|
1896
1896
|
}) => {
|
|
1897
|
-
const { state: a, dispatch: o } =
|
|
1897
|
+
const { state: a, dispatch: o } = B(F), n = v(null), s = v(!1), c = (d) => {
|
|
1898
1898
|
d.preventDefault(), o({
|
|
1899
1899
|
type: qe
|
|
1900
1900
|
});
|
|
@@ -1932,7 +1932,7 @@ const ca = ({
|
|
|
1932
1932
|
}
|
|
1933
1933
|
});
|
|
1934
1934
|
}, da = () => {
|
|
1935
|
-
const { state: e, dispatch: t } =
|
|
1935
|
+
const { state: e, dispatch: t } = B(F), { state: r, dispatch: a } = B(ve), [o, n] = S(""), { getAccessToken: s, user: c } = Z(), d = v(null), g = v(
|
|
1936
1936
|
null
|
|
1937
1937
|
);
|
|
1938
1938
|
x(() => {
|
|
@@ -1967,10 +1967,10 @@ const ca = ({
|
|
|
1967
1967
|
X(t, !1);
|
|
1968
1968
|
break;
|
|
1969
1969
|
}
|
|
1970
|
-
const T = f.decode(_, { stream: !0 }), N = T.indexOf(
|
|
1970
|
+
const T = f.decode(_, { stream: !0 }), N = T.indexOf($e);
|
|
1971
1971
|
if (N !== -1) {
|
|
1972
1972
|
const R = T.substring(0, N), E = JSON.parse(
|
|
1973
|
-
T.substring(N +
|
|
1973
|
+
T.substring(N + $e.length)
|
|
1974
1974
|
);
|
|
1975
1975
|
t({
|
|
1976
1976
|
type: Ke,
|
|
@@ -2061,7 +2061,7 @@ const ca = ({
|
|
|
2061
2061
|
}
|
|
2062
2062
|
) }) });
|
|
2063
2063
|
}, ga = () => {
|
|
2064
|
-
const { dispatch: e, state: t } =
|
|
2064
|
+
const { dispatch: e, state: t } = B(ve), { getAccessToken: r, user: a } = Z(), [o, n] = S({
|
|
2065
2065
|
loaded: !1
|
|
2066
2066
|
}), s = "mt-2 flex justify-center rounded-md", c = (d, g) => {
|
|
2067
2067
|
d.preventDefault(), e({
|
|
@@ -2110,7 +2110,7 @@ const ca = ({
|
|
|
2110
2110
|
}
|
|
2111
2111
|
) }) }, `tag-button-${d.slot}`)) }) });
|
|
2112
2112
|
}, ua = () => {
|
|
2113
|
-
const { state: e } =
|
|
2113
|
+
const { state: e } = B(F), t = v(!1), r = window.innerWidth < 403, [a, o] = S(
|
|
2114
2114
|
r ? "bottom-10" : "top-[245px]"
|
|
2115
2115
|
);
|
|
2116
2116
|
return x(() => {
|
|
@@ -2695,7 +2695,7 @@ const Sa = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", Ca = ({ kind: e }) =>
|
|
|
2695
2695
|
), Ra = ({ kind: e }) => i("rounded-b-xl", {
|
|
2696
2696
|
"rounded-tr-xl": e === "left",
|
|
2697
2697
|
"rounded-tl-xl": e === "right"
|
|
2698
|
-
}),
|
|
2698
|
+
}), Ba = ({
|
|
2699
2699
|
kind: e,
|
|
2700
2700
|
className: t
|
|
2701
2701
|
}) => {
|
|
@@ -2722,7 +2722,7 @@ const Sa = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", Ca = ({ kind: e }) =>
|
|
|
2722
2722
|
footer: o,
|
|
2723
2723
|
copyButton: n
|
|
2724
2724
|
};
|
|
2725
|
-
},
|
|
2725
|
+
}, $a = ({
|
|
2726
2726
|
children: e,
|
|
2727
2727
|
kind: t = "left",
|
|
2728
2728
|
className: r,
|
|
@@ -2732,7 +2732,7 @@ const Sa = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", Ca = ({ kind: e }) =>
|
|
|
2732
2732
|
copyToClipboardFocusMode: s = "system",
|
|
2733
2733
|
copyToClipboardMode: c = "system"
|
|
2734
2734
|
}) => {
|
|
2735
|
-
const [d, g] = S(!1), u =
|
|
2735
|
+
const [d, g] = S(!1), u = Ba({ kind: t, className: r }), h = !!n && (typeof n == "function" || typeof n == "string" || typeof e == "string"), m = () => {
|
|
2736
2736
|
g(!0), typeof n == "function" ? n(e) : typeof n == "string" ? navigator.clipboard.writeText(n) : typeof e == "string" && navigator.clipboard.writeText(e);
|
|
2737
2737
|
};
|
|
2738
2738
|
return x(() => {
|
|
@@ -3246,15 +3246,15 @@ try {
|
|
|
3246
3246
|
const je = rt(
|
|
3247
3247
|
() => import(
|
|
3248
3248
|
/* webpackChunkName: "LazyMessageAssistant" */
|
|
3249
|
-
"./MessageAssistant.
|
|
3249
|
+
"./MessageAssistant.BihILyCE.js"
|
|
3250
3250
|
).then((e) => e.MessageAssistant)
|
|
3251
3251
|
), qa = () => {
|
|
3252
|
-
const { state: e } =
|
|
3252
|
+
const { state: e } = B(F);
|
|
3253
3253
|
return /* @__PURE__ */ k("div", { className: "space-y-6 mt-2", children: [
|
|
3254
3254
|
e && e.messages.length > 0 && e.messages.map((t, r) => {
|
|
3255
3255
|
const { role: a, content: o, name: n, processingTime: s } = t.message;
|
|
3256
3256
|
return (a === K || a === he) && o ? /* @__PURE__ */ l(ce, { fallback: /* @__PURE__ */ l("span", {}), children: /* @__PURE__ */ l(je, { name: n, processingTime: s, children: o }) }, `${r}-${a}`) : a === le && o ? /* @__PURE__ */ l(
|
|
3257
|
-
|
|
3257
|
+
$a,
|
|
3258
3258
|
{
|
|
3259
3259
|
kind: "right",
|
|
3260
3260
|
copyToClipboard: o,
|
|
@@ -3267,7 +3267,7 @@ const je = rt(
|
|
|
3267
3267
|
Gt(le, e) && /* @__PURE__ */ l(ce, { fallback: /* @__PURE__ */ l("span", {}), children: /* @__PURE__ */ l(je, { loading: !0 }) })
|
|
3268
3268
|
] });
|
|
3269
3269
|
}, Ka = () => {
|
|
3270
|
-
const { isAuthenticated: e } = Z(), { state: t } =
|
|
3270
|
+
const { isAuthenticated: e } = Z(), { state: t } = B(F), [r, a] = S(!1), [o, n] = dr(), s = Ft({
|
|
3271
3271
|
isAuthenticated: e,
|
|
3272
3272
|
extraClass: "rounded-b-md"
|
|
3273
3273
|
}), c = v(!1), d = U(() => {
|
|
@@ -3300,11 +3300,22 @@ const je = rt(
|
|
|
3300
3300
|
r && /* @__PURE__ */ l("div", { className: "bottom-44 z-40 fixed left-1/2 transform -translate-x-1/2", children: /* @__PURE__ */ l(
|
|
3301
3301
|
et,
|
|
3302
3302
|
{
|
|
3303
|
-
className:
|
|
3303
|
+
className: i(
|
|
3304
|
+
"dark:bg-slate-50 dark:hover:bg-slate-300 dark:active:bg-slate-400",
|
|
3305
|
+
"bg-slate-500 hover:bg-slate-600 active:bg-slate-700"
|
|
3306
|
+
),
|
|
3307
|
+
noBorder: !0,
|
|
3304
3308
|
size: "medium",
|
|
3305
3309
|
mode: "dark",
|
|
3306
3310
|
onClick: d,
|
|
3307
|
-
children: /* @__PURE__ */ l(
|
|
3311
|
+
children: /* @__PURE__ */ l(
|
|
3312
|
+
Zt,
|
|
3313
|
+
{
|
|
3314
|
+
monotone: !0,
|
|
3315
|
+
size: "size-4",
|
|
3316
|
+
className: "dark:text-copy-dark text-copy-lighter"
|
|
3317
|
+
}
|
|
3318
|
+
)
|
|
3308
3319
|
}
|
|
3309
3320
|
) }),
|
|
3310
3321
|
/* @__PURE__ */ l(Wt, {}),
|
|
@@ -3313,7 +3324,7 @@ const je = rt(
|
|
|
3313
3324
|
}, Ja = rt(
|
|
3314
3325
|
() => import(
|
|
3315
3326
|
/* webpackChunkName: "LazyHeader" */
|
|
3316
|
-
"./HeaderToolbar.
|
|
3327
|
+
"./HeaderToolbar.Bq1bArQC.js"
|
|
3317
3328
|
)
|
|
3318
3329
|
);
|
|
3319
3330
|
function vt({ isComponent: e = !1 }) {
|
|
@@ -3427,11 +3438,11 @@ export {
|
|
|
3427
3438
|
ve as TagsContext,
|
|
3428
3439
|
j as _,
|
|
3429
3440
|
ro as be,
|
|
3430
|
-
|
|
3441
|
+
Br as de,
|
|
3431
3442
|
eo as ge,
|
|
3432
3443
|
to as he,
|
|
3433
3444
|
no as ke,
|
|
3434
|
-
|
|
3445
|
+
$a as le,
|
|
3435
3446
|
ao as me,
|
|
3436
3447
|
ct as serviceCall,
|
|
3437
3448
|
oo as ue
|