@versini/sassysaint 8.44.1 → 8.44.3

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 (24) hide show
  1. package/dist/chunks/{AboutChangelog.BcAh3Diw.js → AboutChangelog.BdZzSUba.js} +2 -2
  2. package/dist/chunks/{AboutEntry.B8XKsNz6.js → AboutEntry.DzSi7ibC.js} +5 -5
  3. package/dist/chunks/{App.B_z-iC81.js → App.DDTKqerX.js} +4137 -5868
  4. package/dist/chunks/{Chart.CC78baxd.js → Chart.PHloGZi7.js} +2 -2
  5. package/dist/chunks/ChatBubbleAssistant.DxGv-_Rb.js +76 -0
  6. package/dist/chunks/ChatHistoryTable.DnkLt1Je.js +1205 -0
  7. package/dist/chunks/HistoryEntry.De2vGpPR.js +282 -0
  8. package/dist/chunks/{LNWAZHJI.CQGzM2uj.js → LNWAZHJI.DBPRjK8f.js} +1 -1
  9. package/dist/chunks/{ProfileEntry.DGw-bmJD.js → ProfileEntry.B9ur9Dzf.js} +2 -2
  10. package/dist/chunks/{SettingsEntry.B_-nqp2P.js → SettingsEntry.DeQAT_-t.js} +2 -2
  11. package/dist/chunks/{UsageEntry.COgGtck2.js → UsageEntry.BmEHDYHp.js} +3 -3
  12. package/dist/chunks/{index.DR_lquuI.js → index.C1S2cFkO.js} +2 -2
  13. package/dist/chunks/{index.DtvRHloF.js → index.CrwhT53o.js} +3 -3
  14. package/dist/chunks/{index.BTVpPOuB.js → index.CsbwtA6h.js} +1 -1
  15. package/dist/chunks/{index.4XJr9Y3j.js → index.CvN58Fp8.js} +1 -1
  16. package/dist/chunks/index.CyMvgyLB.js +804 -0
  17. package/dist/chunks/{index.C5nUMIev.js → index.DI9PexVP.js} +1 -1
  18. package/dist/chunks/{index.B2mnuHfs.js → index.DNSGhajh.js} +2 -2
  19. package/dist/chunks/{useMarkdown.CM-gEMEy.js → useMarkdown.CujEnDtN.js} +8 -8
  20. package/dist/components/SassySaint/SassySaint.js +1 -1
  21. package/dist/index.js +4 -4
  22. package/package.json +3 -3
  23. package/dist/chunks/ChatBubbleAssistant.SNSTBHB6.js +0 -75
  24. package/dist/chunks/HistoryEntry.DSiLUTEb.js +0 -538
@@ -1,7 +1,7 @@
1
1
  import { jsx as Tp } from "react/jsx-runtime";
2
- import { getDefaultExportFromCjs as ln } from "./App.B_z-iC81.js";
2
+ import { getDefaultExportFromCjs as ln } from "./App.DDTKqerX.js";
3
3
  import Ap, { useState as Cp, useEffect as Pp } from "react";
4
- import { TRIMESTERS as rn, TRIMESTERS_SHORT as Op, isProbablyMobile as Lp } from "./index.B2mnuHfs.js";
4
+ import { TRIMESTERS as rn, TRIMESTERS_SHORT as Op, isProbablyMobile as Lp } from "./index.DNSGhajh.js";
5
5
  var ls = { exports: {} }, Ep = ls.exports, on;
6
6
  function Ip() {
7
7
  return on || (on = 1, (function(ve, ne) {
@@ -0,0 +1,76 @@
1
+ import { jsx as g } from "react/jsx-runtime";
2
+ import { n as N, convertCamelCaseToReadable as O, numberFormatter as P, pluralize as R, ne as y } from "./index.DNSGhajh.js";
3
+ import { BUBBLE_FOOTER_EMPTY as L } from "./index.CyMvgyLB.js";
4
+ import U from "clsx";
5
+ import _, { useState as b, useRef as A, useEffect as w, useContext as v } from "react";
6
+ import { ChatContext as B, useUserPreferences as G, AsyncBubble as E } from "./App.DDTKqerX.js";
7
+ import { useMarkdown as D } from "./useMarkdown.CujEnDtN.js";
8
+ const j = 2, q = j * 1e3, x = "", I = (e) => e * (2 - e);
9
+ function W(e, n = !0) {
10
+ const [a, p] = b(0), [i, C] = b(0), [t, T] = b(e), r = A(0), s = A(0);
11
+ return t !== e && (T(e), C(e.startsWith(t) ? a : 0)), w(() => {
12
+ if (!n)
13
+ return;
14
+ const u = e.split(x).length, o = (c) => {
15
+ s.current || (s.current = c);
16
+ const l = c - s.current, m = Math.min(l / q, 1), h = I(m), M = i + (u - i) * h;
17
+ p(Math.floor(M)), m < 1 && (r.current = requestAnimationFrame(o));
18
+ };
19
+ return s.current = 0, r.current = requestAnimationFrame(o), () => {
20
+ r.current && cancelAnimationFrame(r.current);
21
+ };
22
+ }, [i, e, n]), n ? e.split(x).slice(0, a).join(x) : e;
23
+ }
24
+ const d = {
25
+ MODEL: "Model",
26
+ PLUGIN: "Plugin",
27
+ USAGE: "Session usage"
28
+ }, S = U("max-w-[99cqw] mt-3"), k = U("max-w-xs", "sm:max-w-3xl", "prose-li:ps-3"), Q = _.memo(
29
+ ({
30
+ content: e,
31
+ annotations: n,
32
+ toolName: a,
33
+ role: p,
34
+ smooth: i = !1,
35
+ isLastAssistantMessage: C = !1
36
+ }) => {
37
+ const t = W(e, i), {
38
+ state: { streaming: T, restoredModel: r, tokenUsage: s }
39
+ } = v(B), u = n?.model || r, o = s, [c, l] = D(), { user: m, getAccessToken: h } = N(), { data: M } = G({
40
+ user: m?.username,
41
+ getAccessToken: h
42
+ }), F = M?.showDetails || !1;
43
+ let f;
44
+ return F && (f = {
45
+ [d.MODEL]: u || null,
46
+ [d.PLUGIN]: a ? O(a) : null
47
+ }, o && (C ? f[d.USAGE] = `${P.format(o)} ${R("token", o)}` : f[d.USAGE] = L)), w(() => {
48
+ t && l(t);
49
+ }, [t, l]), p === y ? /* @__PURE__ */ g(
50
+ E,
51
+ {
52
+ tail: !0,
53
+ className: S,
54
+ contentClassName: k,
55
+ noMaxWidth: !0,
56
+ children: /* @__PURE__ */ g("div", { className: "flex items-center justify-center italic text-copy-error-dark dark:text-red-300", children: c })
57
+ }
58
+ ) : /* @__PURE__ */ g(
59
+ E,
60
+ {
61
+ tail: !0,
62
+ copyToClipboardMode: "dark",
63
+ copyToClipboardFocusMode: "light",
64
+ copyToClipboard: T ? "loading..." : e,
65
+ footer: f,
66
+ className: S,
67
+ contentClassName: k,
68
+ noMaxWidth: !0,
69
+ children: c
70
+ }
71
+ );
72
+ }
73
+ );
74
+ export {
75
+ Q as default
76
+ };