@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,74 +0,0 @@
1
- import { jsx as T } from "react/jsx-runtime";
2
- import { ChatContext as b, E as _, Me as N, Oe as S } from "./App.fCKFZhqI.js";
3
- import L from "clsx";
4
- import k, { useState as E, useRef as g, useEffect as O, useContext as w } from "react";
5
- import { LOCAL_STORAGE_PREFIX as F, LOCAL_STORAGE_CHAT_DETAILS as G, convertCamelCaseToReadable as U, numberFormatter as I, pluralize as P, ROLE_INTERNAL as v } from "./index.Dym4y9es.js";
6
- import { useMarkdown as y } from "./useMarkdown.ClVoAzdf.js";
7
- const D = 2, j = D * 1e3, h = "", q = (e) => e * (2 - e);
8
- function V(e, a = !0) {
9
- const [i, C] = E(0), [c, p] = E(0), [t, A] = E(e), r = g(0), s = g(0);
10
- return t !== e && (A(e), p(e.startsWith(t) ? i : 0)), O(() => {
11
- if (!a)
12
- return;
13
- const u = e.split(h).length, o = (l) => {
14
- s.current || (s.current = l);
15
- const m = l - s.current, f = Math.min(m / j, 1), n = q(f), R = c + (u - c) * n;
16
- C(Math.floor(R)), f < 1 && (r.current = requestAnimationFrame(o));
17
- };
18
- return s.current = 0, r.current = requestAnimationFrame(o), () => {
19
- r.current && cancelAnimationFrame(r.current);
20
- };
21
- }, [c, e, a]), a ? e.split(h).slice(0, i).join(h) : e;
22
- }
23
- const d = {
24
- MODEL: "Model",
25
- PLUGIN: "Plugin",
26
- USAGE: "Session usage"
27
- }, x = L("max-w-[99cqw] mt-3"), M = L("max-w-xs", "sm:max-w-3xl", "prose-li:ps-3"), X = k.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: A, restoredModel: r, tokenUsage: s }
38
- } = w(b), u = a?.model || r, o = s, [l, m] = y(), [f] = _({
39
- key: F + G,
40
- initialValue: !1
41
- });
42
- let n;
43
- return f && (n = {
44
- [d.MODEL]: u || null,
45
- [d.PLUGIN]: i ? U(i) : null
46
- }, o && (p ? n[d.USAGE] = `${I.format(o)} ${P("token", o)}` : n[d.USAGE] = N)), O(() => {
47
- t && m(t);
48
- }, [t, m]), C === v ? /* @__PURE__ */ T(
49
- S,
50
- {
51
- tail: !0,
52
- className: x,
53
- contentClassName: M,
54
- noMaxWidth: !0,
55
- children: /* @__PURE__ */ T("div", { className: "flex items-center justify-center italic text-copy-error-dark dark:text-red-300", children: l })
56
- }
57
- ) : /* @__PURE__ */ T(
58
- S,
59
- {
60
- tail: !0,
61
- copyToClipboard: A ? "loading..." : e,
62
- copyToClipboardFocusMode: "light",
63
- footer: n,
64
- className: x,
65
- contentClassName: M,
66
- noMaxWidth: !0,
67
- children: l
68
- }
69
- );
70
- }
71
- );
72
- export {
73
- X as default
74
- };