@versini/sassysaint 8.115.1 → 8.117.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 (83) hide show
  1. package/dist/chunks/{AboutChangelog.h8uZDiRa.js → AboutChangelog.Bn_KfUZc.js} +2 -2
  2. package/dist/chunks/{AboutEntry.Dm-VAlos.js → AboutEntry.GETrm77g.js} +7 -7
  3. package/dist/chunks/{App.kZ7zFOCZ.js → App.BzCbkgv8.js} +2478 -2344
  4. package/dist/chunks/BubbleActions.CbQ9BHWl.js +174 -0
  5. package/dist/chunks/{ButtonIconDelete.CMTWH4G_.js → ButtonIconDelete.B5IpSZrD.js} +112 -100
  6. package/dist/chunks/{Chart.DjDJmuv4.js → Chart.Czhhtzdx.js} +2 -2
  7. package/dist/chunks/{ChatBubbleAssistant.Ct1kuBfY.js → ChatBubbleAssistant.DESMaXGq.js} +682 -663
  8. package/dist/chunks/{ChatBubbleUser.DWjAo_57.js → ChatBubbleUser.B_Sniupu.js} +39 -33
  9. package/dist/chunks/{ChatHistoryTable.CPGJDP3u.js → ChatHistoryTable.LPF05gFQ.js} +136 -110
  10. package/dist/chunks/{HistoryEntry.vorKgBkE.js → HistoryEntry.CbyRX9rD.js} +148 -138
  11. package/dist/chunks/{LoginEntry.DMTx7dAX.js → LoginEntry.Bf8vuUIL.js} +4 -4
  12. package/dist/chunks/{LogoEntry.QCG_Oqpu.js → LogoEntry.yn5_B-fa.js} +193 -176
  13. package/dist/chunks/{MemoriesEntry.NKPDzd6E.js → MemoriesEntry.Bljvi6W9.js} +5 -5
  14. package/dist/chunks/{ProfileEntry.D4nsWyk-.js → ProfileEntry.DitROf-m.js} +4 -4
  15. package/dist/chunks/SettingsEntry.DUMuo462.js +446 -0
  16. package/dist/chunks/{UsageEntry.3E-1gpeB.js → UsageEntry.CFMWYodz.js} +5 -5
  17. package/dist/chunks/{_baseUniq.C9w-5slz.js → _baseUniq.D6y3dh-S.js} +1 -1
  18. package/dist/chunks/{arc.Bhkeu8Ne.js → arc.CitIvzp8.js} +1 -1
  19. package/dist/chunks/{architecture-U656AL7Q.BQ0dLOXF.js → architecture-U656AL7Q.IEP3vDFZ.js} +1 -1
  20. package/dist/chunks/{architectureDiagram-VXUJARFQ.PMB1snGu.js → architectureDiagram-VXUJARFQ.BhDBUrYi.js} +4 -4
  21. package/dist/chunks/{blockDiagram-VD42YOAC.cc6SS-Ut.js → blockDiagram-VD42YOAC.BFTM8GAn.js} +5 -5
  22. package/dist/chunks/{browser.-b7MIoe3.js → browser.DK_o_vwl.js} +1 -1
  23. package/dist/chunks/{c4Diagram-YG6GDRKO.CkH4zhHB.js → c4Diagram-YG6GDRKO.B1vLaqvZ.js} +2 -2
  24. package/dist/chunks/{channel.BZF7A0lk.js → channel.PCRnhDz7.js} +1 -1
  25. package/dist/chunks/{chunk-4BX2VUAB.Cp0rcpX_.js → chunk-4BX2VUAB.C6rU7w6S.js} +1 -1
  26. package/dist/chunks/{chunk-55IACEB6.vT382srr.js → chunk-55IACEB6.BpJZHN1o.js} +1 -1
  27. package/dist/chunks/{chunk-B4BG7PRW.D1UQqJBC.js → chunk-B4BG7PRW.F4PL3cMr.js} +4 -4
  28. package/dist/chunks/{chunk-DI55MBZ5.BGj41J2L.js → chunk-DI55MBZ5.BF8GKejt.js} +3 -3
  29. package/dist/chunks/{chunk-FMBD7UC4.DbK41wsg.js → chunk-FMBD7UC4.B1OYwU0R.js} +1 -1
  30. package/dist/chunks/{chunk-QN33PNHL.CKXkOIKW.js → chunk-QN33PNHL.BD5brt5t.js} +1 -1
  31. package/dist/chunks/{chunk-QZHKN3VN.BqCNNrna.js → chunk-QZHKN3VN.D5WYYv36.js} +1 -1
  32. package/dist/chunks/{chunk-TZMSLE5B.GMeazl5c.js → chunk-TZMSLE5B.C-MZAsEe.js} +1 -1
  33. package/dist/chunks/{classDiagram-2ON5EDUG.D9HdU8dF.js → classDiagram-2ON5EDUG.C5vYqJ4o.js} +2 -2
  34. package/dist/chunks/{classDiagram-v2-WZHVMYZB.D9HdU8dF.js → classDiagram-v2-WZHVMYZB.C5vYqJ4o.js} +2 -2
  35. package/dist/chunks/{clone.BvA919-S.js → clone.REJ_Pnlj.js} +1 -1
  36. package/dist/chunks/{cose-bilkent-S5V4N54A.Cgu7-tFO.js → cose-bilkent-S5V4N54A.DXqAwGZ0.js} +2 -2
  37. package/dist/chunks/{dagre-6UL2VRFP.BknfeRUw.js → dagre-6UL2VRFP.CoGy5JIV.js} +5 -5
  38. package/dist/chunks/{diagram-PSM6KHXK.C_6k_6p5.js → diagram-PSM6KHXK.D9vCcidT.js} +4 -4
  39. package/dist/chunks/{diagram-QEK2KX5R.DJy76ACj.js → diagram-QEK2KX5R.6csREdR0.js} +3 -3
  40. package/dist/chunks/{diagram-S2PKOQOG.CfC-dKeX.js → diagram-S2PKOQOG.YPf4qVIj.js} +3 -3
  41. package/dist/chunks/{erDiagram-Q2GNP2WA.Dq-M4wvK.js → erDiagram-Q2GNP2WA.CGV8xXOX.js} +4 -4
  42. package/dist/chunks/{flowDiagram-NV44I4VS.CWEOg9vI.js → flowDiagram-NV44I4VS.eQKIimm7.js} +5 -5
  43. package/dist/chunks/{ganttDiagram-JELNMOA3.B7lZEF5Y.js → ganttDiagram-JELNMOA3.BazHhqv4.js} +2 -2
  44. package/dist/chunks/{gitGraph-F6HP7TQM.BpsZ10rD.js → gitGraph-F6HP7TQM.Cb-fQXsF.js} +1 -1
  45. package/dist/chunks/{gitGraphDiagram-NY62KEGX.BEr46lqB.js → gitGraphDiagram-NY62KEGX.Dvqk5LX3.js} +4 -4
  46. package/dist/chunks/{graph.duUTsfAo.js → graph.CgbRK_Pv.js} +2 -2
  47. package/dist/chunks/{index.C7L6Qy0p.js → index.BEg4_Utt.js} +1 -1
  48. package/dist/chunks/{index.CQB6p5rc.js → index.BMJ9q_CF.js} +3 -3
  49. package/dist/chunks/{index.BEImwMfM.js → index.BkL02aS1.js} +3 -3
  50. package/dist/chunks/{index.BocHTBAX.js → index.BkPtehbe.js} +1 -1
  51. package/dist/chunks/{index.CZzUkzEP.js → index.Bzms2RRF.js} +1 -1
  52. package/dist/chunks/{index.1lyseSZD.js → index.CX_kqcF4.js} +1 -1
  53. package/dist/chunks/{index.Duppkty5.js → index.DzZEadJV.js} +1 -1
  54. package/dist/chunks/{index.D5GVHxAW.js → index.OAZ5W9VH.js} +5 -2
  55. package/dist/chunks/{index.C8LhNQL3.js → index.hL-ju5aR.js} +1 -1
  56. package/dist/chunks/{info-NVLQJR56.rpoj5hAd.js → info-NVLQJR56.53x0eQWW.js} +1 -1
  57. package/dist/chunks/{infoDiagram-WHAUD3N6.1qgGbBxV.js → infoDiagram-WHAUD3N6.BlrSZ-3e.js} +2 -2
  58. package/dist/chunks/{journeyDiagram-XKPGCS4Q.BrzX8o5P.js → journeyDiagram-XKPGCS4Q.CJqy8tkA.js} +4 -4
  59. package/dist/chunks/{kanban-definition-3W4ZIXB7.CuQZY6Sy.js → kanban-definition-3W4ZIXB7.CRKN0s6T.js} +2 -2
  60. package/dist/chunks/{layout.Ch_nETSB.js → layout.B3vPW_pZ.js} +4 -4
  61. package/dist/chunks/{mermaid-parser.core.Bqz_hY8U.js → mermaid-parser.core.ChRIRaJW.js} +10 -10
  62. package/dist/chunks/{min.B-XpJzFe.js → min.CnRvIY0R.js} +2 -2
  63. package/dist/chunks/{mindmap-definition-VGOIOE7T.DM10BWV6.js → mindmap-definition-VGOIOE7T.D_ABLFPV.js} +4 -4
  64. package/dist/chunks/{packet-BFZMPI3H.DxbiL8bi.js → packet-BFZMPI3H.CxGfStzw.js} +1 -1
  65. package/dist/chunks/{pie-7BOR55EZ.DlLaqQ8p.js → pie-7BOR55EZ.DNt3EJ4F.js} +1 -1
  66. package/dist/chunks/{pieDiagram-ADFJNKIX.PKqZ_L7B.js → pieDiagram-ADFJNKIX.DIQfkreO.js} +4 -4
  67. package/dist/chunks/{quadrantDiagram-AYHSOK5B.4Y46BKFd.js → quadrantDiagram-AYHSOK5B.CiwquW9n.js} +1 -1
  68. package/dist/chunks/{radar-NHE76QYJ.Bu4ymprr.js → radar-NHE76QYJ.BjalOWfU.js} +1 -1
  69. package/dist/chunks/{rehype-mermaid.BhbxArqE.js → rehype-mermaid.DiVW4LDn.js} +33 -33
  70. package/dist/chunks/{requirementDiagram-UZGBJVZJ.DdL8pOOk.js → requirementDiagram-UZGBJVZJ.zxucHbPP.js} +3 -3
  71. package/dist/chunks/{sankeyDiagram-TZEHDZUN.DHQdQ9qa.js → sankeyDiagram-TZEHDZUN.DD-PyOn-.js} +1 -1
  72. package/dist/chunks/{sequenceDiagram-WL72ISMW.CUg9rPpB.js → sequenceDiagram-WL72ISMW.DR9lsGWA.js} +3 -3
  73. package/dist/chunks/{stateDiagram-FKZM4ZOC.CRkwSlLY.js → stateDiagram-FKZM4ZOC.CsNkAXRg.js} +4 -4
  74. package/dist/chunks/{stateDiagram-v2-4FDKWEC3.BLmOYFdB.js → stateDiagram-v2-4FDKWEC3.8NFC4sNp.js} +2 -2
  75. package/dist/chunks/{timeline-definition-IT6M3QCI.DouwaOHK.js → timeline-definition-IT6M3QCI.KVweqk-o.js} +2 -2
  76. package/dist/chunks/{treemap-KMMF4GRG.DSo16U9j.js → treemap-KMMF4GRG.VQYaLH7h.js} +1 -1
  77. package/dist/chunks/{useMarkdown.dHVgqkuN.js → useMarkdown.BwBe50mc.js} +8 -8
  78. package/dist/chunks/{xychartDiagram-PRI3JC2R.CQx23hyH.js → xychartDiagram-PRI3JC2R.DLJNhHkJ.js} +1 -1
  79. package/dist/components/SassySaint/SassySaint.js +1 -1
  80. package/dist/index.js +3 -3
  81. package/package.json +4 -4
  82. package/dist/chunks/Bubble.CaOJA6px.js +0 -144
  83. package/dist/chunks/SettingsEntry.ktYNthLp.js +0 -456
@@ -1,9 +1,10 @@
1
- import { jsx as i, Fragment as C, jsxs as S } from "react/jsx-runtime";
2
- import { Button as b } from "./LogoEntry.QCG_Oqpu.js";
3
- import { useState as k, useMemo as m, isValidElement as T, useEffect as H } from "react";
4
- import { useMarkdown as h } from "./useMarkdown.dHVgqkuN.js";
5
- import { AsyncBubble as M } from "./App.kZ7zFOCZ.js";
6
- const O = 200, w = ({ string: e, idealLength: r = O }) => {
1
+ import { jsx as a, Fragment as S, jsxs as b } from "react/jsx-runtime";
2
+ import { Bubble as k } from "./App.BzCbkgv8.js";
3
+ import { Button as C } from "./LogoEntry.yn5_B-fa.js";
4
+ import { useState as H, useMemo as m, isValidElement as T, useEffect as O } from "react";
5
+ import { useMarkdown as w } from "./useMarkdown.BwBe50mc.js";
6
+ import { BubbleCopyToClipboard as I } from "./BubbleActions.CbQ9BHWl.js";
7
+ const L = 200, h = ({ string: e, idealLength: r = L }) => {
7
8
  if (e.length <= r)
8
9
  return {
9
10
  string: e,
@@ -19,7 +20,7 @@ const O = 200, w = ({ string: e, idealLength: r = O }) => {
19
20
  string: e.slice(0, r + s),
20
21
  isTruncated: !0
21
22
  };
22
- }, 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) : "", I = /* @__PURE__ */ new Set([
23
+ }, 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) : "", D = /* @__PURE__ */ new Set([
23
24
  "P",
24
25
  "DIV",
25
26
  "UL",
@@ -53,67 +54,72 @@ const O = 200, w = ({ string: e, idealLength: r = O }) => {
53
54
  return e.some(u);
54
55
  if (/* @__PURE__ */ T(e)) {
55
56
  const r = e;
56
- return typeof r.type == "string" && I.has(r.type.toUpperCase()) ? !0 : u(r.props.children);
57
+ return typeof r.type == "string" && D.has(r.type.toUpperCase()) ? !0 : u(r.props.children);
57
58
  }
58
59
  return !1;
59
- }, L = ({ children: e, length: r = 200, mode: n = "system", focusMode: c = "system", enableRichTruncation: s = !1, noBorder: d = !1 }) => {
60
- const [t, y] = k(!1), g = typeof e != "string" && !s, f = m(() => typeof e == "string" ? e : l(e), [
60
+ }, M = ({ children: e, length: r = 200, mode: n = "system", focusMode: f = "system", enableRichTruncation: s = !1, noBorder: d = !1 }) => {
61
+ const [t, y] = H(!1), g = typeof e != "string" && !s, c = m(() => typeof e == "string" ? e : l(e), [
61
62
  e
62
- ]), { string: p, isTruncated: a } = m(() => w({
63
- string: f,
63
+ ]), { string: p, isTruncated: i } = m(() => h({
64
+ string: c,
64
65
  idealLength: r
65
66
  }), [
66
- f,
67
+ c,
67
68
  r
68
- ]), E = s && a && !t, A = (x) => {
69
+ ]), E = s && i && !t, B = (x) => {
69
70
  x.preventDefault(), y(!t);
70
71
  };
71
72
  if (g)
72
- return /* @__PURE__ */ i(C, {
73
+ return /* @__PURE__ */ a(S, {
73
74
  children: e
74
75
  });
75
76
  let o;
76
- a ? t ? o = e : o = p : o = e;
77
- const B = s ? u(e) : !1;
78
- return /* @__PURE__ */ S("span", {
77
+ i ? t ? o = e : o = p : o = e;
78
+ const A = s ? u(e) : !1;
79
+ return /* @__PURE__ */ b("span", {
79
80
  style: {
80
81
  wordBreak: "break-word"
81
82
  },
82
83
  "data-testid": "truncate-root",
83
- "aria-expanded": a ? t : void 0,
84
+ "aria-expanded": i ? t : void 0,
84
85
  children: [
85
86
  o,
86
- a && /* @__PURE__ */ i(b, {
87
+ i && /* @__PURE__ */ a(C, {
87
88
  mode: n,
88
- focusMode: c,
89
+ focusMode: f,
89
90
  noBorder: d,
90
- className: !(s && t && B) ? "ml-2" : void 0,
91
+ className: !(s && t && A) ? "ml-2" : void 0,
91
92
  size: "small",
92
- onClick: A,
93
+ onClick: B,
93
94
  "aria-label": t ? "Show less" : "Show more",
94
95
  children: t ? "less..." : "more..."
95
96
  })
96
97
  ]
97
98
  });
98
- }, R = ({ content: e }) => {
99
- const [r, n] = h();
100
- return H(() => {
99
+ }, K = ({ content: e }) => {
100
+ const [r, n] = w();
101
+ return O(() => {
101
102
  e && n(e);
102
- }, [e, n]), /* @__PURE__ */ i(
103
- M,
103
+ }, [e, n]), /* @__PURE__ */ a(
104
+ k,
104
105
  {
105
106
  gradient: "medium",
106
107
  tail: !0,
107
- copyToClipboardMode: "light",
108
- copyToClipboardFocusMode: "light",
109
- copyToClipboard: e,
110
108
  kind: "right",
111
109
  className: "mt-3",
112
110
  contentClassName: "prose prose-lighter prose-p:only:my-0",
113
- children: /* @__PURE__ */ i(L, { mode: "dark", focusMode: "light", noBorder: !0, enableRichTruncation: !0, children: r })
111
+ action: /* @__PURE__ */ a(
112
+ I,
113
+ {
114
+ streaming: !1,
115
+ content: e,
116
+ placement: "left"
117
+ }
118
+ ),
119
+ children: /* @__PURE__ */ a(M, { mode: "dark", focusMode: "light", noBorder: !0, enableRichTruncation: !0, children: r })
114
120
  }
115
121
  );
116
122
  };
117
123
  export {
118
- R as default
124
+ K as default
119
125
  };
@@ -1,50 +1,50 @@
1
- import { jsxs as c, jsx as e } from "react/jsx-runtime";
2
- import { y as T, V as N, INFINITE_SCROLL_THRESHOLD as L } from "./index.D5GVHxAW.js";
3
- import { IconCloseLight as D, CARDS as B, ButtonIcon as M, IconRestore as z, IconStarInCircle as _, IconStarInCircleLight as $ } from "./LogoEntry.QCG_Oqpu.js";
4
- import { useState as Y, Fragment as K } from "react";
5
- import i from "clsx";
6
- import { Table as W, TableHead as G, TableRow as C, TableBody as H, TableCell as o, TableCellSort as w, ButtonIconDelete as V } from "./ButtonIconDelete.CMTWH4G_.js";
7
- import { pluralize as A, ResponsiveTooltip as k, numberFormatter as j, isProbablyMobile as F } from "./App.kZ7zFOCZ.js";
8
- const q = "av-pill", J = ({ variant: t }) => i("rounded-xs border", {
1
+ import { jsxs as u, jsx as e } from "react/jsx-runtime";
2
+ import { y as w, V as y, INFINITE_SCROLL_THRESHOLD as Y } from "./index.OAZ5W9VH.js";
3
+ import { IconCloseLight as K, CARDS as V, ButtonIcon as R, IconRestore as W, IconStarInCircle as G, IconStarInCircleLight as H } from "./LogoEntry.yn5_B-fa.js";
4
+ import { useState as j, useRef as k, useEffect as O, Fragment as F } from "react";
5
+ import c from "clsx";
6
+ import { Table as q, TableHead as J, TableRow as S, TableBody as Q, TableCell as l, TableCellSort as E, ButtonIconDelete as X } from "./ButtonIconDelete.B5IpSZrD.js";
7
+ import { pluralize as v, ResponsiveTooltip as I, numberFormatter as Z, isProbablyMobile as ee } from "./App.BzCbkgv8.js";
8
+ const re = "av-pill", te = ({ variant: t }) => c("rounded-xs border", {
9
9
  "border-border-information": t === "information",
10
10
  "border-border-warning": t === "warning",
11
11
  "border-border-success": t === "success",
12
12
  "border-border-error": t === "error"
13
- }), O = ({ variant: t }) => i("not-prose", {
13
+ }), P = ({ variant: t }) => c("not-prose", {
14
14
  "text-copy-information": t === "information",
15
15
  "text-copy-warning": t === "warning",
16
16
  "text-copy-success": t === "success",
17
17
  "text-copy-error": t === "error"
18
- }), Q = ({ variant: t }) => i({
18
+ }), se = ({ variant: t }) => c({
19
19
  "bg-surface-information": t === "information",
20
20
  "bg-surface-warning": t === "warning",
21
21
  "bg-surface-success": t === "success",
22
22
  "bg-surface-error": t === "error"
23
- }), X = (t) => {
23
+ }), oe = (t) => {
24
24
  const { className: a, variant: n } = t;
25
25
  return {
26
- main: i(q, "inline-flex items-center gap-1 px-2 py-0.5 text-xs", J({
26
+ main: c(re, "inline-flex items-center gap-1 px-2 py-0.5 text-xs", te({
27
27
  variant: n
28
- }), O({
28
+ }), P({
29
29
  variant: n
30
- }), Q(t), a),
31
- button: i("inline-flex items-center justify-center", "ml-1", "focus:outline", "focus:outline-1", "focus:outline-offset-1", "focus:outline-focus-dark", "hover:bg-surface-medium/50", "rounded-full", O({
30
+ }), se(t), a),
31
+ button: c("inline-flex items-center justify-center", "ml-1", "focus:outline", "focus:outline-1", "focus:outline-offset-1", "focus:outline-focus-dark", "hover:bg-surface-medium/50", "rounded-full", P({
32
32
  variant: n
33
33
  }))
34
34
  };
35
- }, R = ({ label: t, className: a, variant: n = "information", description: m, onClose: d }) => {
36
- const [h, b] = Y(!0), p = (f) => {
37
- d && (d(f), f.defaultPrevented || b(!1));
35
+ }, U = ({ label: t, className: a, variant: n = "information", description: m, onClose: d }) => {
36
+ const [p, g] = j(!0), C = (x) => {
37
+ d && (d(x), x.defaultPrevented || g(!1));
38
38
  };
39
- if (!h)
39
+ if (!p)
40
40
  return null;
41
- const u = X({
41
+ const f = oe({
42
42
  className: a,
43
43
  variant: n
44
44
  });
45
- return /* @__PURE__ */ c("div", {
45
+ return /* @__PURE__ */ u("div", {
46
46
  role: "text",
47
- className: u.main,
47
+ className: f.main,
48
48
  children: [
49
49
  m && /* @__PURE__ */ e("span", {
50
50
  className: "sr-only",
@@ -55,100 +55,116 @@ const q = "av-pill", J = ({ variant: t }) => i("rounded-xs border", {
55
55
  }),
56
56
  d && /* @__PURE__ */ e("button", {
57
57
  type: "button",
58
- onClick: p,
59
- className: u.button,
58
+ onClick: C,
59
+ className: f.button,
60
60
  "aria-label": "Close",
61
- children: /* @__PURE__ */ e(D, {
61
+ children: /* @__PURE__ */ e(K, {
62
62
  size: "size-3"
63
63
  })
64
64
  })
65
65
  ]
66
66
  });
67
- }, l = {
67
+ }, o = {
68
68
  ROW: "row",
69
- TIMESTAMP: T,
69
+ TIMESTAMP: w,
70
70
  SUMMARY: "summary",
71
- TOKEN_USAGE: N,
71
+ TOKEN_USAGE: y,
72
72
  ACTIONS: "actions"
73
- }, Z = [
74
- l.ROW,
75
- l.TIMESTAMP,
76
- l.SUMMARY,
77
- l.ACTIONS
78
- ], ee = [
79
- l.ROW,
80
- l.SUMMARY,
81
- l.TIMESTAMP,
82
- l.TOKEN_USAGE,
83
- l.ACTIONS
84
- ], me = ({
73
+ }, le = [
74
+ o.ROW,
75
+ o.TIMESTAMP,
76
+ o.SUMMARY,
77
+ o.ACTIONS
78
+ ], ne = [
79
+ o.ROW,
80
+ o.SUMMARY,
81
+ o.TIMESTAMP,
82
+ o.TOKEN_USAGE,
83
+ o.ACTIONS
84
+ ], he = ({
85
85
  filteredHistory: t,
86
86
  historyState: a,
87
87
  lastEntryToLoad: n,
88
88
  onClickSort: m,
89
89
  onClickRestore: d,
90
- onClickDelete: h,
91
- onClickFavorite: b,
92
- infinityScrollMarkerRef: p,
93
- isLoading: u = !1,
94
- totalHistoryCount: f,
95
- isFiltered: E = !1,
96
- isSearchActive: S = !1
90
+ onClickDelete: p,
91
+ onClickFavorite: g,
92
+ infinityScrollMarkerRef: C,
93
+ isLoading: f = !1,
94
+ totalHistoryCount: x,
95
+ isFiltered: D = !1,
96
+ isSearchActive: M = !1,
97
+ activeChatId: h
97
98
  }) => {
98
- const y = F() ? Z : ee, I = (r) => {
99
+ const L = ee(), T = k(null), N = k(!1);
100
+ O(() => {
101
+ N.current = !1;
102
+ }, [h]), O(() => {
103
+ if (h && T.current && !N.current) {
104
+ N.current = !0;
105
+ const r = setTimeout(() => {
106
+ T.current?.scrollIntoView({
107
+ behavior: "smooth",
108
+ block: "center"
109
+ });
110
+ }, 100);
111
+ return () => clearTimeout(r);
112
+ }
113
+ }, [h, n]);
114
+ const A = L ? le : ne, B = (r) => {
99
115
  switch (r) {
100
- case l.ROW:
101
- return /* @__PURE__ */ e(o, { className: "sr-only", children: "Row" }, r);
102
- case l.TIMESTAMP:
103
- return S ? /* @__PURE__ */ e(o, { className: "text-xs sm:text-sm", children: "Date" }, r) : /* @__PURE__ */ e(
104
- w,
116
+ case o.ROW:
117
+ return /* @__PURE__ */ e(l, { className: "sr-only", children: "Row" }, r);
118
+ case o.TIMESTAMP:
119
+ return M ? /* @__PURE__ */ e(l, { className: "text-xs sm:text-sm", children: "Date" }, r) : /* @__PURE__ */ e(
120
+ E,
105
121
  {
106
122
  focusMode: "system",
107
123
  buttonClassName: "text-xs sm:text-sm",
108
- cellId: T,
124
+ cellId: w,
109
125
  align: "left",
110
126
  sortDirection: a.sortDirection,
111
127
  sortedCell: a.sortedCell,
112
128
  onClick: () => {
113
- m(T);
129
+ m(w);
114
130
  },
115
131
  children: "Date"
116
132
  },
117
133
  r
118
134
  );
119
- case l.SUMMARY:
120
- return /* @__PURE__ */ e(o, { className: "text-xs sm:text-sm", children: "Summary" }, r);
121
- case l.TOKEN_USAGE:
122
- return S ? /* @__PURE__ */ e(o, { className: "text-xs sm:text-sm text-right", children: "Tokens" }, r) : /* @__PURE__ */ e(
123
- w,
135
+ case o.SUMMARY:
136
+ return /* @__PURE__ */ e(l, { className: "text-xs sm:text-sm", children: "Summary" }, r);
137
+ case o.TOKEN_USAGE:
138
+ return M ? /* @__PURE__ */ e(l, { className: "text-xs sm:text-sm text-right", children: "Tokens" }, r) : /* @__PURE__ */ e(
139
+ E,
124
140
  {
125
141
  focusMode: "system",
126
142
  buttonClassName: "text-xs sm:text-sm",
127
- cellId: N,
143
+ cellId: y,
128
144
  align: "right",
129
145
  sortDirection: a.sortDirection,
130
146
  sortedCell: a.sortedCell,
131
147
  onClick: () => {
132
- m(N);
148
+ m(y);
133
149
  },
134
150
  children: "Tokens"
135
151
  },
136
152
  r
137
153
  );
138
- case l.ACTIONS:
139
- return /* @__PURE__ */ e(o, { className: "text-xs sm:text-sm text-right", children: "Actions" }, r);
154
+ case o.ACTIONS:
155
+ return /* @__PURE__ */ e(l, { className: "text-xs sm:text-sm text-right", children: "Actions" }, r);
140
156
  default:
141
157
  return null;
142
158
  }
143
- }, P = (r, s, g) => {
159
+ }, z = (r, s, b) => {
144
160
  switch (r) {
145
- case l.ROW:
146
- return /* @__PURE__ */ e(o, { children: g + 1 }, r);
147
- case l.TIMESTAMP:
161
+ case o.ROW:
162
+ return /* @__PURE__ */ e(l, { children: b + 1 }, r);
163
+ case o.TIMESTAMP:
148
164
  return /* @__PURE__ */ e(
149
- o,
165
+ l,
150
166
  {
151
- className: i(
167
+ className: c(
152
168
  "dark:text-copy-medium",
153
169
  "sm:whitespace-nowrap text-xs sm:text-sm max-w-20 sm:max-w-none"
154
170
  ),
@@ -156,28 +172,28 @@ const q = "av-pill", J = ({ variant: t }) => i("rounded-xs border", {
156
172
  },
157
173
  r
158
174
  );
159
- case l.SUMMARY: {
160
- const x = s.similarityScore !== void 0 && s.similarityScore !== null ? Math.round(s.similarityScore * 100) : null, v = x !== null && x < 40 ? "warning" : "success", U = s.keywordMatch === !0;
175
+ case o.SUMMARY: {
176
+ const i = s.similarityScore !== void 0 && s.similarityScore !== null ? Math.round(s.similarityScore * 100) : null, _ = i !== null && i < 40 ? "warning" : "success", $ = s.keywordMatch === !0;
161
177
  return /* @__PURE__ */ e(
162
- o,
178
+ l,
163
179
  {
164
- className: i(
180
+ className: c(
165
181
  "dark:text-white",
166
182
  "max-w-25 sm:max-w-full text-xs sm:text-sm"
167
183
  ),
168
184
  style: {
169
185
  wordBreak: "break-word"
170
186
  },
171
- children: /* @__PURE__ */ c("div", { className: "flex flex-col gap-1", children: [
172
- /* @__PURE__ */ c("div", { className: "flex flex-wrap gap-1", children: [
173
- x !== null && /* @__PURE__ */ e(
174
- R,
187
+ children: /* @__PURE__ */ u("div", { className: "flex flex-col gap-1", children: [
188
+ /* @__PURE__ */ u("div", { className: "flex flex-wrap gap-1", children: [
189
+ i !== null && /* @__PURE__ */ e(
190
+ U,
175
191
  {
176
- variant: v,
177
- label: `${x}% semantic`
192
+ variant: _,
193
+ label: `${i}% semantic`
178
194
  }
179
195
  ),
180
- U && /* @__PURE__ */ e(R, { variant: "information", label: "keyword" })
196
+ $ && /* @__PURE__ */ e(U, { variant: "information", label: "keyword" })
181
197
  ] }),
182
198
  /* @__PURE__ */ e("span", { children: s.summary })
183
199
  ] })
@@ -185,29 +201,29 @@ const q = "av-pill", J = ({ variant: t }) => i("rounded-xs border", {
185
201
  r
186
202
  );
187
203
  }
188
- case l.TOKEN_USAGE:
204
+ case o.TOKEN_USAGE:
189
205
  return /* @__PURE__ */ e(
190
- o,
206
+ l,
191
207
  {
192
- className: i("dark:text-copy-medium", "text-xs sm:text-sm"),
208
+ className: c("dark:text-copy-medium", "text-xs sm:text-sm"),
193
209
  align: "right",
194
- children: s.tokenUsage ? j.format(s.tokenUsage) : "0"
210
+ children: s.tokenUsage ? Z.format(s.tokenUsage) : "0"
195
211
  },
196
212
  r
197
213
  );
198
- case l.ACTIONS:
214
+ case o.ACTIONS:
199
215
  return /* @__PURE__ */ e(
200
- o,
216
+ l,
201
217
  {
202
218
  className: "border-l border-table-light dark:border-table-dark",
203
- children: /* @__PURE__ */ c("div", { className: "flex flex-col items-end sm:flex-row gap-2", children: [
219
+ children: /* @__PURE__ */ u("div", { className: "flex flex-col items-end sm:flex-row gap-2", children: [
204
220
  /* @__PURE__ */ e(
205
- k,
221
+ I,
206
222
  {
207
223
  label: "Restore chat",
208
224
  placement: "top",
209
225
  trigger: /* @__PURE__ */ e(
210
- M,
226
+ R,
211
227
  {
212
228
  noBorder: !0,
213
229
  label: "Restore chat",
@@ -216,7 +232,7 @@ const q = "av-pill", J = ({ variant: t }) => i("rounded-xs border", {
216
232
  await d(s);
217
233
  },
218
234
  children: /* @__PURE__ */ e(
219
- z,
235
+ W,
220
236
  {
221
237
  size: "size-3",
222
238
  monotone: !0,
@@ -228,31 +244,31 @@ const q = "av-pill", J = ({ variant: t }) => i("rounded-xs border", {
228
244
  }
229
245
  ),
230
246
  /* @__PURE__ */ e(
231
- k,
247
+ I,
232
248
  {
233
249
  label: s.favoriteChat ? "Remove from favorites" : "Add to favorites",
234
250
  placement: "top",
235
251
  trigger: /* @__PURE__ */ e(
236
- M,
252
+ R,
237
253
  {
238
254
  noBorder: !0,
239
255
  label: s.favoriteChat ? "Remove from favorites" : "Add to favorites",
240
256
  variant: "primary",
241
257
  onClick: async () => {
242
- await b(s);
258
+ await g(s);
243
259
  },
244
- children: s.favoriteChat ? /* @__PURE__ */ e(_, { size: "size-4", monotone: !0 }) : /* @__PURE__ */ e($, { size: "size-4", monotone: !0 })
260
+ children: s.favoriteChat ? /* @__PURE__ */ e(G, { size: "size-4", monotone: !0 }) : /* @__PURE__ */ e(H, { size: "size-4", monotone: !0 })
245
261
  }
246
262
  )
247
263
  }
248
264
  ),
249
265
  /* @__PURE__ */ e(
250
- V,
266
+ X,
251
267
  {
252
268
  label: "Delete chat",
253
269
  disabled: !1,
254
270
  onClick: () => {
255
- h(s);
271
+ p(s);
256
272
  }
257
273
  }
258
274
  )
@@ -264,29 +280,39 @@ const q = "av-pill", J = ({ variant: t }) => i("rounded-xs border", {
264
280
  return null;
265
281
  }
266
282
  };
267
- return /* @__PURE__ */ c(
268
- W,
283
+ return /* @__PURE__ */ u(
284
+ q,
269
285
  {
270
286
  stickyHeader: !0,
271
287
  compact: !0,
272
288
  mode: "alt-system",
273
289
  caption: (() => {
274
- const r = t.length, s = f ?? r;
275
- return E && s > r ? `Showing ${A(`${r} chat`, r)} out of ${s}` : A(`${r} chat`, r);
290
+ const r = t.length, s = x ?? r;
291
+ return D && s > r ? `Showing ${v(`${r} chat`, r)} out of ${s}` : v(`${r} chat`, r);
276
292
  })(),
277
- disabled: u && t.length > 0,
293
+ disabled: f && t.length > 0,
278
294
  children: [
279
- /* @__PURE__ */ e(G, { children: /* @__PURE__ */ e(C, { children: y.map((r) => I(r)) }) }),
280
- /* @__PURE__ */ e(H, { children: u && t.length === 0 ? /* @__PURE__ */ e(C, { children: /* @__PURE__ */ e(o, { colSpan: 1e3, children: /* @__PURE__ */ e("div", { children: "Loading..." }) }) }) : t.slice(0, n).map((r, s) => r?.summary ? /* @__PURE__ */ c(K, { children: [
281
- s === n - L && /* @__PURE__ */ e("tr", { ref: p }),
282
- /* @__PURE__ */ e(C, { children: y.map(
283
- (g) => P(g, r, s)
284
- ) })
285
- ] }, `${B.HISTORY.TITLE}-${r.id}-${s}`) : null) })
295
+ /* @__PURE__ */ e(J, { children: /* @__PURE__ */ e(S, { children: A.map((r) => B(r)) }) }),
296
+ /* @__PURE__ */ e(Q, { children: f && t.length === 0 ? /* @__PURE__ */ e(S, { children: /* @__PURE__ */ e(l, { colSpan: 1e3, children: /* @__PURE__ */ e("div", { children: "Loading..." }) }) }) : t.slice(0, n).map((r, s) => {
297
+ const b = h === r.id;
298
+ return r?.summary ? /* @__PURE__ */ u(F, { children: [
299
+ s === n - Y && /* @__PURE__ */ e("tr", { ref: C }),
300
+ /* @__PURE__ */ e(
301
+ S,
302
+ {
303
+ ref: b ? T : void 0,
304
+ active: b,
305
+ children: A.map(
306
+ (i) => z(i, r, s)
307
+ )
308
+ }
309
+ )
310
+ ] }, `${V.HISTORY.TITLE}-${r.id}-${s}`) : null;
311
+ }) })
286
312
  ]
287
313
  }
288
314
  );
289
315
  };
290
316
  export {
291
- me as ChatHistoryTable
317
+ he as ChatHistoryTable
292
318
  };