@versini/sassysaint 8.39.10 → 8.40.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.
Files changed (23) hide show
  1. package/dist/chunks/{AboutChangelog.CCL6woFi.js → AboutChangelog.sxwJVJMw.js} +2 -2
  2. package/dist/chunks/{AboutEntry.CdUMph5q.js → AboutEntry.BQ81lUub.js} +5 -5
  3. package/dist/chunks/App.B9gc6fg7.js +14162 -0
  4. package/dist/chunks/{Chart.BDCtfHpJ.js → Chart.C49WdExM.js} +2 -2
  5. package/dist/chunks/ChatBubbleAssistant.BGAdbVxr.js +75 -0
  6. package/dist/chunks/{HistoryEntry.DzQ2MSaZ.js → HistoryEntry.B9fK7Ffl.js} +231 -216
  7. package/dist/chunks/{LNWAZHJI.D7CCdvNo.js → LNWAZHJI.CdnUhcqc.js} +1 -1
  8. package/dist/chunks/{ProfileEntry.YotUrCiu.js → ProfileEntry.CfrDx_1j.js} +2 -2
  9. package/dist/chunks/{SettingsEntry.CnnDhK6w.js → SettingsEntry.D75eEHLZ.js} +2 -2
  10. package/dist/chunks/{UsageEntry.D2ZOKNfK.js → UsageEntry.In0ugMi8.js} +3 -3
  11. package/dist/chunks/{index.Dx6oN_z4.js → index.BKnr6q_J.js} +1 -1
  12. package/dist/chunks/{index.RXuXaAsE.js → index.Cl7AhqCZ.js} +1 -1
  13. package/dist/chunks/{index.Dym4y9es.js → index.CrPLofea.js} +626 -592
  14. package/dist/chunks/{index.7uobAuKV.js → index.D3As27U8.js} +2 -2
  15. package/dist/chunks/{index.f7-kYhdF.js → index.DBcnZQzl.js} +1 -1
  16. package/dist/chunks/{index.CVlucvO6.js → index.uP1AYao7.js} +3 -3
  17. package/dist/chunks/{useMarkdown.ClVoAzdf.js → useMarkdown.4lWqmQ_l.js} +6 -6
  18. package/dist/components/SassySaint/SassySaint.js +1 -1
  19. package/dist/index.js +4 -4
  20. package/dist/style.css +1 -1
  21. package/package.json +3 -3
  22. package/dist/chunks/App.fCKFZhqI.js +0 -10314
  23. package/dist/chunks/ChatBubbleAssistant.DNqS0sbL.js +0 -74
@@ -1,7 +1,7 @@
1
1
  import { jsx as Tp } from "react/jsx-runtime";
2
- import { getDefaultExportFromCjs as ln } from "./App.fCKFZhqI.js";
2
+ import { getDefaultExportFromCjs as ln } from "./App.B9gc6fg7.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.Dym4y9es.js";
4
+ import { TRIMESTERS as rn, TRIMESTERS_SHORT as Op, isProbablyMobile as Lp } from "./index.CrPLofea.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,75 @@
1
+ import { jsx as A } from "react/jsx-runtime";
2
+ import { LOCAL_STORAGE_PREFIX as k, LOCAL_STORAGE_CHAT_DETAILS as R, convertCamelCaseToReadable as _, numberFormatter as w, pluralize as F, re as G } from "./index.CrPLofea.js";
3
+ import { ChatContext as N, E as U, Me as y, Oe as S } from "./App.B9gc6fg7.js";
4
+ import b from "clsx";
5
+ import P, { useState as h, useRef as g, useEffect as L, useContext as v } from "react";
6
+ import { useMarkdown as I } from "./useMarkdown.4lWqmQ_l.js";
7
+ const D = 2, j = D * 1e3, M = "", q = (e) => e * (2 - e);
8
+ function V(e, a = !0) {
9
+ const [i, C] = h(0), [c, p] = h(0), [t, T] = h(e), r = g(0), o = g(0);
10
+ return t !== e && (T(e), p(e.startsWith(t) ? i : 0)), L(() => {
11
+ if (!a)
12
+ return;
13
+ const u = e.split(M).length, s = (l) => {
14
+ o.current || (o.current = l);
15
+ const m = l - o.current, f = Math.min(m / j, 1), n = q(f), O = c + (u - c) * n;
16
+ C(Math.floor(O)), f < 1 && (r.current = requestAnimationFrame(s));
17
+ };
18
+ return o.current = 0, r.current = requestAnimationFrame(s), () => {
19
+ r.current && cancelAnimationFrame(r.current);
20
+ };
21
+ }, [c, e, a]), a ? e.split(M).slice(0, i).join(M) : e;
22
+ }
23
+ const d = {
24
+ MODEL: "Model",
25
+ PLUGIN: "Plugin",
26
+ USAGE: "Session usage"
27
+ }, x = b("max-w-[99cqw] mt-3"), E = b("max-w-xs", "sm:max-w-3xl", "prose-li:ps-3"), X = P.memo(
28
+ ({
29
+ content: e,
30
+ annotations: a,
31
+ toolName: i,
32
+ role: C,
33
+ smooth: c = !1,
34
+ isLastAssistantMessage: p = !1
35
+ }) => {
36
+ const t = V(e, c), {
37
+ state: { streaming: T, restoredModel: r, tokenUsage: o }
38
+ } = v(N), u = a?.model || r, s = o, [l, m] = I(), [f] = U({
39
+ key: k + R,
40
+ initialValue: !1
41
+ });
42
+ let n;
43
+ return f && (n = {
44
+ [d.MODEL]: u || null,
45
+ [d.PLUGIN]: i ? _(i) : null
46
+ }, s && (p ? n[d.USAGE] = `${w.format(s)} ${F("token", s)}` : n[d.USAGE] = y)), L(() => {
47
+ t && m(t);
48
+ }, [t, m]), C === G ? /* @__PURE__ */ A(
49
+ S,
50
+ {
51
+ tail: !0,
52
+ className: x,
53
+ contentClassName: E,
54
+ noMaxWidth: !0,
55
+ children: /* @__PURE__ */ A("div", { className: "flex items-center justify-center italic text-copy-error-dark dark:text-red-300", children: l })
56
+ }
57
+ ) : /* @__PURE__ */ A(
58
+ S,
59
+ {
60
+ tail: !0,
61
+ copyToClipboardMode: "dark",
62
+ copyToClipboardFocusMode: "light",
63
+ copyToClipboard: T ? "loading..." : e,
64
+ footer: n,
65
+ className: x,
66
+ contentClassName: E,
67
+ noMaxWidth: !0,
68
+ children: l
69
+ }
70
+ );
71
+ }
72
+ );
73
+ export {
74
+ X as default
75
+ };