@versini/sassysaint 8.110.1 → 8.110.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.
- package/dist/chunks/{AboutChangelog.DfItgg_1.js → AboutChangelog.lkiW0mb0.js} +2 -2
- package/dist/chunks/{AboutEntry.DIYTS0Pp.js → AboutEntry.UmqlpC-6.js} +7 -7
- package/dist/chunks/{App.7P9lyXTX.js → App.B6slW82y.js} +17 -17
- package/dist/chunks/{Bubble.C3J-YrAQ.js → Bubble.Bzb0yWg5.js} +1 -1
- package/dist/chunks/{ButtonIconDelete.CAEfJOI7.js → ButtonIconDelete.yEcP--tW.js} +109 -107
- package/dist/chunks/{Chart.Dg1jAFpj.js → Chart.CtM9GlAA.js} +2 -2
- package/dist/chunks/{ChatBubbleAssistant.DavDkAFx.js → ChatBubbleAssistant.B52zcfCw.js} +4 -4
- package/dist/chunks/{ChatBubbleUser.DSMfBmEP.js → ChatBubbleUser.CHmdyTg5.js} +3 -3
- package/dist/chunks/{ChatHistoryTable.qju2f_Sh.js → ChatHistoryTable.D8OwdEcC.js} +4 -4
- package/dist/chunks/{HistoryEntry.QxUwQO5B.js → HistoryEntry.BbWinMPG.js} +6 -6
- package/dist/chunks/{LoginEntry.BbhZpovW.js → LoginEntry.BRcsqkn1.js} +4 -4
- package/dist/chunks/{LogoEntry.CTMAkXZN.js → LogoEntry.Bu1wr6W3.js} +1 -1
- package/dist/chunks/MemoriesEntry.B8Jduj0p.js +649 -0
- package/dist/chunks/{ProfileEntry.vCF-ayWr.js → ProfileEntry.DWVYl6vU.js} +4 -4
- package/dist/chunks/{SettingsEntry.DEaHLi7A.js → SettingsEntry.qPh6dhcd.js} +18 -18
- package/dist/chunks/{UsageEntry.B3Z4Zr4a.js → UsageEntry.C60Nsx8M.js} +5 -5
- package/dist/chunks/{_baseUniq.CKo3g19j.js → _baseUniq.COocjMTd.js} +1 -1
- package/dist/chunks/{arc.ny1AnYpL.js → arc.kGh-cDYj.js} +1 -1
- package/dist/chunks/{architecture-U656AL7Q.CoJV4P-W.js → architecture-U656AL7Q.CsU3Wwt7.js} +1 -1
- package/dist/chunks/{architectureDiagram-VXUJARFQ.C_r6hPXf.js → architectureDiagram-VXUJARFQ.b2cm1XLO.js} +4 -4
- package/dist/chunks/{blockDiagram-VD42YOAC.DeTKi9HH.js → blockDiagram-VD42YOAC.CCVcuksY.js} +5 -5
- package/dist/chunks/{browser.Dd1PVu4Q.js → browser.QIuapGgB.js} +1 -1
- package/dist/chunks/{c4Diagram-YG6GDRKO.PYJXPQRd.js → c4Diagram-YG6GDRKO.DMaD8nyL.js} +2 -2
- package/dist/chunks/{channel.CldxJpdX.js → channel.BUsnjrUn.js} +1 -1
- package/dist/chunks/{chunk-4BX2VUAB.D_xGzQXV.js → chunk-4BX2VUAB.DlTt12ES.js} +1 -1
- package/dist/chunks/{chunk-55IACEB6.D91lGO9k.js → chunk-55IACEB6.DCeL79zS.js} +1 -1
- package/dist/chunks/{chunk-B4BG7PRW.rABluadn.js → chunk-B4BG7PRW.CX1uytRd.js} +4 -4
- package/dist/chunks/{chunk-DI55MBZ5.BisMfdbP.js → chunk-DI55MBZ5.dvgZW1UK.js} +3 -3
- package/dist/chunks/{chunk-FMBD7UC4.IZluU3TG.js → chunk-FMBD7UC4.CaCU5hmN.js} +1 -1
- package/dist/chunks/{chunk-QN33PNHL.DdhRwJuC.js → chunk-QN33PNHL.DNC6zMVf.js} +1 -1
- package/dist/chunks/{chunk-QZHKN3VN.DxJRkbxl.js → chunk-QZHKN3VN.Dw_nvEyB.js} +1 -1
- package/dist/chunks/{chunk-TZMSLE5B.yJUdJdZG.js → chunk-TZMSLE5B.CtF-QOyw.js} +1 -1
- package/dist/chunks/{classDiagram-2ON5EDUG.BJJShSGE.js → classDiagram-2ON5EDUG.Ca7Ta_OD.js} +2 -2
- package/dist/chunks/{classDiagram-v2-WZHVMYZB.BJJShSGE.js → classDiagram-v2-WZHVMYZB.Ca7Ta_OD.js} +2 -2
- package/dist/chunks/{clone.CYQWcQos.js → clone.BtKf4xC_.js} +1 -1
- package/dist/chunks/{cose-bilkent-S5V4N54A.CFiLRTlV.js → cose-bilkent-S5V4N54A.DwW1cev3.js} +2 -2
- package/dist/chunks/{dagre-6UL2VRFP.BAOLjlsO.js → dagre-6UL2VRFP.BUkhHXYk.js} +5 -5
- package/dist/chunks/{diagram-PSM6KHXK.B7fd_KvS.js → diagram-PSM6KHXK.DJ_Lr38x.js} +4 -4
- package/dist/chunks/{diagram-QEK2KX5R.nRWB6Pdu.js → diagram-QEK2KX5R.BpMcOoOC.js} +3 -3
- package/dist/chunks/{diagram-S2PKOQOG.C4gQIrc_.js → diagram-S2PKOQOG.DVtNt8J8.js} +3 -3
- package/dist/chunks/{erDiagram-Q2GNP2WA.U2TDWSHg.js → erDiagram-Q2GNP2WA.aSDenSqN.js} +4 -4
- package/dist/chunks/{flowDiagram-NV44I4VS.CmXaVrq9.js → flowDiagram-NV44I4VS.CJbH__17.js} +5 -5
- package/dist/chunks/{ganttDiagram-JELNMOA3.DSD39bjf.js → ganttDiagram-JELNMOA3.u6-CJID3.js} +2 -2
- package/dist/chunks/{gitGraph-F6HP7TQM.C_axBowD.js → gitGraph-F6HP7TQM.SAvUllla.js} +1 -1
- package/dist/chunks/{gitGraphDiagram-NY62KEGX.Y6LpuRjD.js → gitGraphDiagram-NY62KEGX.D_xjcCME.js} +4 -4
- package/dist/chunks/{graph.CsEnoNl4.js → graph.BMpJQe8Z.js} +2 -2
- package/dist/chunks/{index.whZY27YH.js → index.CC_BDGYS.js} +1 -1
- package/dist/chunks/{index.MD-I3XF8.js → index.CV3VT680.js} +5 -5
- package/dist/chunks/{index.-DOP9Ckx.js → index.CwDoM4xu.js} +1 -1
- package/dist/chunks/{index.CR9-xbTg.js → index.D4BYiu5b.js} +3 -3
- package/dist/chunks/{index.76MlCVOY.js → index.DBMr9ZIG.js} +1 -1
- package/dist/chunks/{index.Bi2ow_w5.js → index.DBhmddrz.js} +1 -1
- package/dist/chunks/{index.BYUyJHzk.js → index.DGAn9DSb.js} +1 -1
- package/dist/chunks/{index.CK3q1Sfv.js → index.P0YK3CXH.js} +1 -1
- package/dist/chunks/{index.4552QdXH.js → index.uVyMig2w.js} +3 -3
- package/dist/chunks/{info-NVLQJR56.BM1oszeu.js → info-NVLQJR56.UWLM7NLW.js} +1 -1
- package/dist/chunks/{infoDiagram-WHAUD3N6.BOdkf_MU.js → infoDiagram-WHAUD3N6.CXXBBBvD.js} +2 -2
- package/dist/chunks/{journeyDiagram-XKPGCS4Q.Dw7-F-3G.js → journeyDiagram-XKPGCS4Q.WlKdK6d-.js} +4 -4
- package/dist/chunks/{kanban-definition-3W4ZIXB7.DBHZd8kd.js → kanban-definition-3W4ZIXB7.yLrosYt3.js} +2 -2
- package/dist/chunks/{layout.FDyoYwG2.js → layout.BsNu2DpU.js} +4 -4
- package/dist/chunks/{mermaid-parser.core.C4lg1K9H.js → mermaid-parser.core.-fztw1tq.js} +10 -10
- package/dist/chunks/{min.DBs1Msoe.js → min.CzeGcSjf.js} +2 -2
- package/dist/chunks/{mindmap-definition-VGOIOE7T.CU1TS1Wz.js → mindmap-definition-VGOIOE7T.LL23ZJeJ.js} +3 -3
- package/dist/chunks/{packet-BFZMPI3H.BQDJHYjU.js → packet-BFZMPI3H.sUqQan1_.js} +1 -1
- package/dist/chunks/{pie-7BOR55EZ.BlU94TQO.js → pie-7BOR55EZ.7e8JmkIh.js} +1 -1
- package/dist/chunks/{pieDiagram-ADFJNKIX.CKbT8AbG.js → pieDiagram-ADFJNKIX.BLXB9TYh.js} +4 -4
- package/dist/chunks/{quadrantDiagram-AYHSOK5B.iibdk6QV.js → quadrantDiagram-AYHSOK5B.npeOw87_.js} +1 -1
- package/dist/chunks/{radar-NHE76QYJ.CqellN1R.js → radar-NHE76QYJ.CH1mMYSt.js} +1 -1
- package/dist/chunks/{rehype-mermaid.D5rxFoLJ.js → rehype-mermaid.CF3pcJvp.js} +33 -33
- package/dist/chunks/{requirementDiagram-UZGBJVZJ.BeoYCRTt.js → requirementDiagram-UZGBJVZJ.b0uvf183.js} +3 -3
- package/dist/chunks/{sankeyDiagram-TZEHDZUN.Cl7AJQyH.js → sankeyDiagram-TZEHDZUN.b20Blkrh.js} +1 -1
- package/dist/chunks/{sequenceDiagram-WL72ISMW.DJiYzLwe.js → sequenceDiagram-WL72ISMW.BylR9rfC.js} +3 -3
- package/dist/chunks/{stateDiagram-FKZM4ZOC.CEH77n-u.js → stateDiagram-FKZM4ZOC.Dwq-R-dt.js} +4 -4
- package/dist/chunks/{stateDiagram-v2-4FDKWEC3.C7e8FoNM.js → stateDiagram-v2-4FDKWEC3.H1Hbg_Hp.js} +2 -2
- package/dist/chunks/{timeline-definition-IT6M3QCI.DpH45C9N.js → timeline-definition-IT6M3QCI.BD-L74X0.js} +2 -2
- package/dist/chunks/{treemap-KMMF4GRG.CaXoo_S5.js → treemap-KMMF4GRG.DHmPB-yR.js} +1 -1
- package/dist/chunks/{useMarkdown.C2zWe9xE.js → useMarkdown.CVqU22vr.js} +8 -8
- package/dist/chunks/{xychartDiagram-PRI3JC2R.l9efaY6c.js → xychartDiagram-PRI3JC2R.UW4hhcjJ.js} +1 -1
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +3 -3
- package/package.json +4 -4
- package/dist/chunks/MemoriesEntry.BYYT1IVl.js +0 -729
|
@@ -1,729 +0,0 @@
|
|
|
1
|
-
import { jsx as e, jsxs as r, Fragment as T } from "react/jsx-runtime";
|
|
2
|
-
import { n as be, LOCAL_STORAGE_PREFIX as W, LOCAL_STORAGE_SORT_MEMORY_DIRECTION as we, LOCAL_STORAGE_SORT_MEMORY_COLUMN as Ce, useUserMemories as ve, useExpiredMemories as Te, useDeleteMemory as Se, useDeleteAllActiveMemories as ke, useDeleteAllExpiredMemories as De, useUpdateMemory as Ee, useRestoreMemory as Me } from "./index.MD-I3XF8.js";
|
|
3
|
-
import { Button as L, TableCellSortDirections as s, ButtonIcon as F, IconEdit as Re, IconRestore as Ie, IconDelete as Le } from "./LogoEntry.CTMAkXZN.js";
|
|
4
|
-
import { Panel as le, Toggle as R, ButtonCancel as se, useLocalStorage as Z, ConfirmationPanel as ee, ResponsiveTooltip as U } from "./App.7P9lyXTX.js";
|
|
5
|
-
import { Table as te, TableHead as re, TableRow as S, TableCell as a, TableCellSort as I, TableBody as ie, ButtonIconDelete as Oe, TableFooter as oe } from "./ButtonIconDelete.CAEfJOI7.js";
|
|
6
|
-
import A from "clsx";
|
|
7
|
-
import { useState as N, useEffect as _e, useRef as z } from "react";
|
|
8
|
-
import { TextArea as Be } from "./index.CK3q1Sfv.js";
|
|
9
|
-
const Pe = ({
|
|
10
|
-
open: b,
|
|
11
|
-
onOpenChange: k,
|
|
12
|
-
initialText: d,
|
|
13
|
-
metadata: o,
|
|
14
|
-
onSave: g,
|
|
15
|
-
isSaving: D = !1
|
|
16
|
-
}) => {
|
|
17
|
-
const [n, E] = N(d), [y, p] = N("none");
|
|
18
|
-
_e(() => {
|
|
19
|
-
if (b) {
|
|
20
|
-
E(d);
|
|
21
|
-
const l = o?.expiration || "none";
|
|
22
|
-
p(l);
|
|
23
|
-
}
|
|
24
|
-
}, [b, d, o?.expiration]);
|
|
25
|
-
const O = () => {
|
|
26
|
-
if (n.trim().length >= 3) {
|
|
27
|
-
const l = y === "none" ? null : y;
|
|
28
|
-
g(n.trim(), l);
|
|
29
|
-
}
|
|
30
|
-
}, C = n.trim().length >= 3, u = n.trim() !== d.trim() || y !== (o?.expiration || "none");
|
|
31
|
-
return /* @__PURE__ */ e(
|
|
32
|
-
le,
|
|
33
|
-
{
|
|
34
|
-
open: b,
|
|
35
|
-
onOpenChange: k,
|
|
36
|
-
title: "Edit Memory",
|
|
37
|
-
animation: !0,
|
|
38
|
-
animationType: "fade",
|
|
39
|
-
footer: /* @__PURE__ */ r("div", { className: "flex flex-wrap justify-end gap-x-2", children: [
|
|
40
|
-
/* @__PURE__ */ e("div", { className: "box-border max-w-full basis-auto", children: /* @__PURE__ */ e(se, { onOpenChange: k, label: "Cancel" }) }),
|
|
41
|
-
/* @__PURE__ */ e("div", { className: "box-border max-w-full basis-auto", children: /* @__PURE__ */ e(
|
|
42
|
-
L,
|
|
43
|
-
{
|
|
44
|
-
mode: "dark",
|
|
45
|
-
focusMode: "light",
|
|
46
|
-
disabled: D || !C || !u,
|
|
47
|
-
onClick: O,
|
|
48
|
-
children: D ? "Saving..." : "Save"
|
|
49
|
-
}
|
|
50
|
-
) })
|
|
51
|
-
] }),
|
|
52
|
-
children: /* @__PURE__ */ r("div", { className: "flex flex-col pt-2 gap-4", children: [
|
|
53
|
-
/* @__PURE__ */ e(
|
|
54
|
-
Be,
|
|
55
|
-
{
|
|
56
|
-
mode: "dark",
|
|
57
|
-
focusMode: "light",
|
|
58
|
-
label: "Memory text",
|
|
59
|
-
name: "memoryText",
|
|
60
|
-
value: n,
|
|
61
|
-
onChange: (l) => E(l.target.value),
|
|
62
|
-
autoFocus: !0,
|
|
63
|
-
helperText: n.trim().length < 3 ? "Memory text must be at least 3 characters" : `${n.length} characters`
|
|
64
|
-
}
|
|
65
|
-
),
|
|
66
|
-
/* @__PURE__ */ r("div", { className: "flex flex-col gap-3 p-4 bg-surface-darker rounded-md", children: [
|
|
67
|
-
/* @__PURE__ */ e("h3", { className: "text-sm m-0", children: "Memory Expiration" }),
|
|
68
|
-
/* @__PURE__ */ e("p", { className: "text-xs text-copy-medium m-0", children: "Set when this memory should expire and be automatically removed." }),
|
|
69
|
-
/* @__PURE__ */ r("div", { className: "flex flex-col gap-2", children: [
|
|
70
|
-
/* @__PURE__ */ e(
|
|
71
|
-
R,
|
|
72
|
-
{
|
|
73
|
-
mode: "dark",
|
|
74
|
-
focusMode: "light",
|
|
75
|
-
noBorder: !0,
|
|
76
|
-
narrow: !0,
|
|
77
|
-
label: "Never expire",
|
|
78
|
-
name: "expiration-none",
|
|
79
|
-
checked: y === "none",
|
|
80
|
-
onChange: (l) => {
|
|
81
|
-
l && p("none");
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
),
|
|
85
|
-
/* @__PURE__ */ e(
|
|
86
|
-
R,
|
|
87
|
-
{
|
|
88
|
-
mode: "dark",
|
|
89
|
-
focusMode: "light",
|
|
90
|
-
noBorder: !0,
|
|
91
|
-
narrow: !0,
|
|
92
|
-
label: "Short (1 month)",
|
|
93
|
-
name: "expiration-short",
|
|
94
|
-
checked: y === "short",
|
|
95
|
-
onChange: (l) => {
|
|
96
|
-
l && p("short");
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
),
|
|
100
|
-
/* @__PURE__ */ e(
|
|
101
|
-
R,
|
|
102
|
-
{
|
|
103
|
-
mode: "dark",
|
|
104
|
-
focusMode: "light",
|
|
105
|
-
noBorder: !0,
|
|
106
|
-
narrow: !0,
|
|
107
|
-
label: "Medium (6 months)",
|
|
108
|
-
name: "expiration-medium",
|
|
109
|
-
checked: y === "medium",
|
|
110
|
-
onChange: (l) => {
|
|
111
|
-
l && p("medium");
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
),
|
|
115
|
-
/* @__PURE__ */ e(
|
|
116
|
-
R,
|
|
117
|
-
{
|
|
118
|
-
mode: "dark",
|
|
119
|
-
focusMode: "light",
|
|
120
|
-
noBorder: !0,
|
|
121
|
-
narrow: !0,
|
|
122
|
-
label: "Long (1 year)",
|
|
123
|
-
name: "expiration-long",
|
|
124
|
-
checked: y === "long",
|
|
125
|
-
onChange: (l) => {
|
|
126
|
-
l && p("long");
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
)
|
|
130
|
-
] })
|
|
131
|
-
] }),
|
|
132
|
-
o && /* @__PURE__ */ r("div", { className: "flex flex-col gap-3 p-4 bg-surface-darker rounded-md", children: [
|
|
133
|
-
/* @__PURE__ */ e("h3", { className: "text-sm m-0", children: "Memory Details" }),
|
|
134
|
-
o.categories && o.categories.length > 0 && /* @__PURE__ */ r("div", { className: "flex flex-col gap-1", children: [
|
|
135
|
-
/* @__PURE__ */ e("span", { className: "text-xs text-copy-medium uppercase", children: "Category" }),
|
|
136
|
-
/* @__PURE__ */ e("div", { className: "flex flex-wrap gap-1", children: o.categories.map((l, h) => /* @__PURE__ */ e(
|
|
137
|
-
"span",
|
|
138
|
-
{
|
|
139
|
-
className: "text-xs px-2 py-1 text-copy-light rounded",
|
|
140
|
-
children: l
|
|
141
|
-
},
|
|
142
|
-
`${l}-${h}`
|
|
143
|
-
)) })
|
|
144
|
-
] }),
|
|
145
|
-
/* @__PURE__ */ r("div", { className: "flex flex-col sm:flex-row gap-4", children: [
|
|
146
|
-
/* @__PURE__ */ r("div", { className: "flex flex-col gap-3 sm:flex-1", children: [
|
|
147
|
-
o.confidence !== void 0 && o.confidence !== null && /* @__PURE__ */ r("div", { className: "flex flex-col gap-1", children: [
|
|
148
|
-
/* @__PURE__ */ e("span", { className: "text-xs text-copy-medium uppercase", children: "Confidence" }),
|
|
149
|
-
/* @__PURE__ */ r("span", { className: "text-sm text-copy-light", children: [
|
|
150
|
-
(o.confidence * 100).toFixed(0),
|
|
151
|
-
"%"
|
|
152
|
-
] })
|
|
153
|
-
] }),
|
|
154
|
-
o.status && /* @__PURE__ */ r("div", { className: "flex flex-col gap-1", children: [
|
|
155
|
-
/* @__PURE__ */ e("span", { className: "text-xs text-copy-medium uppercase", children: "Status" }),
|
|
156
|
-
/* @__PURE__ */ e("span", { className: "text-sm text-copy-light capitalize", children: o.status })
|
|
157
|
-
] }),
|
|
158
|
-
o.sourceType && /* @__PURE__ */ r("div", { className: "flex flex-col gap-1", children: [
|
|
159
|
-
/* @__PURE__ */ e("span", { className: "text-xs text-copy-medium uppercase", children: "Source Type" }),
|
|
160
|
-
/* @__PURE__ */ e("span", { className: "text-sm text-copy-light capitalize", children: o.sourceType })
|
|
161
|
-
] })
|
|
162
|
-
] }),
|
|
163
|
-
/* @__PURE__ */ r("div", { className: "flex flex-col gap-3 sm:flex-1", children: [
|
|
164
|
-
o.quote && /* @__PURE__ */ r("div", { className: "flex flex-col gap-1", children: [
|
|
165
|
-
/* @__PURE__ */ e("span", { className: "text-xs text-copy-medium uppercase", children: "Original Prompt" }),
|
|
166
|
-
/* @__PURE__ */ r("p", { className: "text-sm text-copy-light m-0 italic", children: [
|
|
167
|
-
'"',
|
|
168
|
-
o.quote,
|
|
169
|
-
'"'
|
|
170
|
-
] })
|
|
171
|
-
] }),
|
|
172
|
-
o.canonicalText && /* @__PURE__ */ r("div", { className: "flex flex-col gap-1", children: [
|
|
173
|
-
/* @__PURE__ */ e("span", { className: "text-xs text-copy-medium uppercase", children: "Canonical Text" }),
|
|
174
|
-
/* @__PURE__ */ e("p", { className: "text-sm text-copy-light m-0 font-mono", children: o.canonicalText })
|
|
175
|
-
] })
|
|
176
|
-
] })
|
|
177
|
-
] })
|
|
178
|
-
] })
|
|
179
|
-
] })
|
|
180
|
-
}
|
|
181
|
-
);
|
|
182
|
-
}, Ve = ({ open: b, onOpenChange: k, user: d }) => {
|
|
183
|
-
const o = z(null), { getAccessToken: g } = be(), [D] = N(void 0), [n, E] = N("active"), [y, p] = Z({
|
|
184
|
-
key: W + we,
|
|
185
|
-
initialValue: s.DESC
|
|
186
|
-
}), [O, C] = Z({
|
|
187
|
-
key: W + Ce,
|
|
188
|
-
initialValue: "createdAt"
|
|
189
|
-
}), [u, l] = N(y || s.DESC), [h, M] = N(
|
|
190
|
-
O || "createdAt"
|
|
191
|
-
), { data: v, isLoading: q, isError: j } = ve({
|
|
192
|
-
user: d,
|
|
193
|
-
query: D,
|
|
194
|
-
getAccessToken: g,
|
|
195
|
-
enabled: b && n === "active"
|
|
196
|
-
}), {
|
|
197
|
-
data: f,
|
|
198
|
-
isLoading: G,
|
|
199
|
-
isError: $
|
|
200
|
-
} = Te({
|
|
201
|
-
user: d,
|
|
202
|
-
query: D,
|
|
203
|
-
getAccessToken: g,
|
|
204
|
-
enabled: b && n === "expired"
|
|
205
|
-
}), _ = Se({ getAccessToken: g }), X = ke({ getAccessToken: g }), V = De({ getAccessToken: g }), B = Ee({ getAccessToken: g }), H = Me({ getAccessToken: g }), [ae, Y] = N(!1), w = z(null), [ne, J] = N(!1), [ce, P] = N(!1), x = z(null), K = (t, i, c, m) => {
|
|
206
|
-
w.current = { id: t, text: i, description: c, createdAt: m }, Y(!0);
|
|
207
|
-
}, de = () => {
|
|
208
|
-
w.current && _.mutate({ user: d, memoryId: w.current.id });
|
|
209
|
-
}, me = (t, i, c, m, he, fe, ge, ye, Ae, Ne) => {
|
|
210
|
-
x.current = {
|
|
211
|
-
id: t,
|
|
212
|
-
description: i,
|
|
213
|
-
categories: c,
|
|
214
|
-
quote: m,
|
|
215
|
-
canonicalText: he,
|
|
216
|
-
confidence: fe,
|
|
217
|
-
status: ge,
|
|
218
|
-
sourceType: ye,
|
|
219
|
-
expiration: Ae,
|
|
220
|
-
expiresAt: Ne
|
|
221
|
-
}, P(!0);
|
|
222
|
-
}, xe = (t, i) => {
|
|
223
|
-
x.current && d && B.mutate(
|
|
224
|
-
{
|
|
225
|
-
user: d,
|
|
226
|
-
memoryId: x.current.id,
|
|
227
|
-
description: t,
|
|
228
|
-
expiration: i || void 0
|
|
229
|
-
},
|
|
230
|
-
{
|
|
231
|
-
onSuccess: () => {
|
|
232
|
-
P(!1);
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
);
|
|
236
|
-
}, pe = () => {
|
|
237
|
-
d && J(!0);
|
|
238
|
-
}, ue = () => {
|
|
239
|
-
d && (n === "active" ? X.mutate({ user: d }) : V.mutate({ user: d }));
|
|
240
|
-
}, Q = (t) => {
|
|
241
|
-
const i = `${t.total} memor${t.total === 1 ? "y" : "ies"}`, c = t.totalTokenUsage ? ` (~${t.totalTokenUsage} tokens)` : "";
|
|
242
|
-
return i + c;
|
|
243
|
-
};
|
|
244
|
-
return /* @__PURE__ */ r(T, { children: [
|
|
245
|
-
/* @__PURE__ */ e(
|
|
246
|
-
Pe,
|
|
247
|
-
{
|
|
248
|
-
open: ce,
|
|
249
|
-
onOpenChange: P,
|
|
250
|
-
initialText: x.current?.description || "",
|
|
251
|
-
metadata: x.current ? {
|
|
252
|
-
categories: x.current.categories,
|
|
253
|
-
quote: x.current.quote,
|
|
254
|
-
canonicalText: x.current.canonicalText,
|
|
255
|
-
confidence: x.current.confidence,
|
|
256
|
-
status: x.current.status,
|
|
257
|
-
sourceType: x.current.sourceType,
|
|
258
|
-
expiration: x.current.expiration,
|
|
259
|
-
expiresAt: x.current.expiresAt
|
|
260
|
-
} : void 0,
|
|
261
|
-
onSave: xe,
|
|
262
|
-
isSaving: B.isPending
|
|
263
|
-
}
|
|
264
|
-
),
|
|
265
|
-
/* @__PURE__ */ r(
|
|
266
|
-
ee,
|
|
267
|
-
{
|
|
268
|
-
showConfirmation: ae,
|
|
269
|
-
setShowConfirmation: Y,
|
|
270
|
-
action: de,
|
|
271
|
-
customStrings: {
|
|
272
|
-
title: "Delete memory",
|
|
273
|
-
confirmAction: "Delete",
|
|
274
|
-
cancelAction: "Cancel"
|
|
275
|
-
},
|
|
276
|
-
children: [
|
|
277
|
-
/* @__PURE__ */ e("p", { className: "m-0", children: "Are you sure you want to delete this memory?" }),
|
|
278
|
-
/* @__PURE__ */ r("ul", { className: "m-0 mt-2 list-disc list-inside text-xs opacity-80", children: [
|
|
279
|
-
/* @__PURE__ */ r("li", { children: [
|
|
280
|
-
"Excerpt:",
|
|
281
|
-
" ",
|
|
282
|
-
(w.current?.description || w.current?.text || "").slice(0, 80)
|
|
283
|
-
] }),
|
|
284
|
-
/* @__PURE__ */ r("li", { children: [
|
|
285
|
-
"Created:",
|
|
286
|
-
" ",
|
|
287
|
-
w.current?.createdAt ? new Date(w.current.createdAt).toLocaleString() : "-"
|
|
288
|
-
] })
|
|
289
|
-
] })
|
|
290
|
-
]
|
|
291
|
-
}
|
|
292
|
-
),
|
|
293
|
-
/* @__PURE__ */ e(
|
|
294
|
-
ee,
|
|
295
|
-
{
|
|
296
|
-
showConfirmation: ne,
|
|
297
|
-
setShowConfirmation: J,
|
|
298
|
-
action: ue,
|
|
299
|
-
customStrings: {
|
|
300
|
-
title: "Delete memories",
|
|
301
|
-
confirmAction: "Delete all",
|
|
302
|
-
cancelAction: "Cancel"
|
|
303
|
-
},
|
|
304
|
-
children: /* @__PURE__ */ e("p", { className: "m-0", children: n === "active" ? /* @__PURE__ */ r(T, { children: [
|
|
305
|
-
"This will permanently delete all ",
|
|
306
|
-
/* @__PURE__ */ e("em", { children: "active memories" }),
|
|
307
|
-
" for this user. This action cannot be undone."
|
|
308
|
-
] }) : /* @__PURE__ */ r(T, { children: [
|
|
309
|
-
"This will permanently delete all ",
|
|
310
|
-
/* @__PURE__ */ e("em", { children: "expired memories" }),
|
|
311
|
-
" for this user. This action cannot be undone."
|
|
312
|
-
] }) })
|
|
313
|
-
}
|
|
314
|
-
),
|
|
315
|
-
/* @__PURE__ */ e(
|
|
316
|
-
le,
|
|
317
|
-
{
|
|
318
|
-
open: b,
|
|
319
|
-
onOpenChange: (t) => k(t),
|
|
320
|
-
title: "User Memories",
|
|
321
|
-
animation: !0,
|
|
322
|
-
animationType: "fade",
|
|
323
|
-
blurEffect: "large",
|
|
324
|
-
initialFocus: o,
|
|
325
|
-
footer: /* @__PURE__ */ r("div", { className: "flex flex-wrap justify-end gap-x-2", children: [
|
|
326
|
-
/* @__PURE__ */ e("div", { className: "box-border max-w-full basis-auto", children: /* @__PURE__ */ e(
|
|
327
|
-
se,
|
|
328
|
-
{
|
|
329
|
-
onOpenChange: k,
|
|
330
|
-
label: "Close",
|
|
331
|
-
ref: o
|
|
332
|
-
}
|
|
333
|
-
) }),
|
|
334
|
-
/* @__PURE__ */ e("div", { className: "box-border max-w-full basis-auto", children: /* @__PURE__ */ e(
|
|
335
|
-
L,
|
|
336
|
-
{
|
|
337
|
-
mode: "dark",
|
|
338
|
-
focusMode: "light",
|
|
339
|
-
variant: "danger",
|
|
340
|
-
disabled: (n === "active" ? X.isPending : V.isPending) || (n === "active" ? (v?.total ?? 0) === 0 : (f?.total ?? 0) === 0),
|
|
341
|
-
onClick: pe,
|
|
342
|
-
children: "Delete All"
|
|
343
|
-
}
|
|
344
|
-
) })
|
|
345
|
-
] }),
|
|
346
|
-
children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-4 @container/editmemoriespanel", children: [
|
|
347
|
-
/* @__PURE__ */ r("div", { className: "flex flex-wrap justify-center gap-x-2", children: [
|
|
348
|
-
/* @__PURE__ */ e("div", { className: "box-border max-w-full basis-auto", children: /* @__PURE__ */ e(
|
|
349
|
-
L,
|
|
350
|
-
{
|
|
351
|
-
focusMode: "light",
|
|
352
|
-
mode: n === "active" ? "light" : "dark",
|
|
353
|
-
size: "small",
|
|
354
|
-
noBorder: !0,
|
|
355
|
-
onClick: () => E("active"),
|
|
356
|
-
children: "Active Memories"
|
|
357
|
-
}
|
|
358
|
-
) }),
|
|
359
|
-
/* @__PURE__ */ e("div", { className: "box-border max-w-full basis-auto", children: /* @__PURE__ */ e(
|
|
360
|
-
L,
|
|
361
|
-
{
|
|
362
|
-
focusMode: "light",
|
|
363
|
-
mode: n === "expired" ? "light" : "dark",
|
|
364
|
-
size: "small",
|
|
365
|
-
noBorder: !0,
|
|
366
|
-
onClick: () => E("expired"),
|
|
367
|
-
children: "Expired Memories"
|
|
368
|
-
}
|
|
369
|
-
) })
|
|
370
|
-
] }),
|
|
371
|
-
/* @__PURE__ */ e(
|
|
372
|
-
"div",
|
|
373
|
-
{
|
|
374
|
-
className: A(
|
|
375
|
-
"flex flex-col sm:flex-row",
|
|
376
|
-
"max-h-[75vh]",
|
|
377
|
-
"sm:max-h-[75vh]",
|
|
378
|
-
"min-h-[70vh]"
|
|
379
|
-
),
|
|
380
|
-
children: n === "active" ? /* @__PURE__ */ r(T, { children: [
|
|
381
|
-
q && /* @__PURE__ */ e("p", { className: "m-0", children: "Loading memories..." }),
|
|
382
|
-
j && /* @__PURE__ */ e("p", { className: "m-0 text-copy-error-light", children: "Failed to load memories." }),
|
|
383
|
-
!q && !j && (v && v.items.length > 0 ? /* @__PURE__ */ r(
|
|
384
|
-
te,
|
|
385
|
-
{
|
|
386
|
-
stickyHeader: !0,
|
|
387
|
-
stickyFooter: !0,
|
|
388
|
-
compact: !0,
|
|
389
|
-
mode: "alt-system",
|
|
390
|
-
caption: Q(v),
|
|
391
|
-
children: [
|
|
392
|
-
/* @__PURE__ */ e(re, { children: /* @__PURE__ */ r(S, { children: [
|
|
393
|
-
/* @__PURE__ */ e(a, { className: "sr-only", children: "Row" }),
|
|
394
|
-
/* @__PURE__ */ e(a, { children: "Memory" }),
|
|
395
|
-
/* @__PURE__ */ e(
|
|
396
|
-
I,
|
|
397
|
-
{
|
|
398
|
-
focusMode: "system",
|
|
399
|
-
buttonClassName: "text-xs sm:text-sm",
|
|
400
|
-
cellId: "createdAt",
|
|
401
|
-
align: "left",
|
|
402
|
-
sortDirection: u,
|
|
403
|
-
sortedCell: h,
|
|
404
|
-
onClick: () => {
|
|
405
|
-
M("createdAt"), C("createdAt"), l((t) => {
|
|
406
|
-
const i = t === s.ASC ? s.DESC : s.ASC;
|
|
407
|
-
return p(i), i;
|
|
408
|
-
});
|
|
409
|
-
},
|
|
410
|
-
children: "Date"
|
|
411
|
-
}
|
|
412
|
-
),
|
|
413
|
-
/* @__PURE__ */ e(
|
|
414
|
-
I,
|
|
415
|
-
{
|
|
416
|
-
focusMode: "system",
|
|
417
|
-
buttonClassName: "text-xs sm:text-sm",
|
|
418
|
-
cellId: "expiresAt",
|
|
419
|
-
align: "left",
|
|
420
|
-
sortDirection: u,
|
|
421
|
-
sortedCell: h,
|
|
422
|
-
onClick: () => {
|
|
423
|
-
M("expiresAt"), C("expiresAt"), l((t) => {
|
|
424
|
-
const i = t === s.ASC ? s.DESC : s.ASC;
|
|
425
|
-
return p(i), i;
|
|
426
|
-
});
|
|
427
|
-
},
|
|
428
|
-
children: "Expires"
|
|
429
|
-
}
|
|
430
|
-
),
|
|
431
|
-
/* @__PURE__ */ e(a, { align: "right", children: "Actions" })
|
|
432
|
-
] }) }),
|
|
433
|
-
/* @__PURE__ */ e(ie, { children: [...v.items].sort((t, i) => {
|
|
434
|
-
if (h === "createdAt") {
|
|
435
|
-
const c = t.createdAt ? new Date(t.createdAt).getTime() : 0, m = i.createdAt ? new Date(i.createdAt).getTime() : 0;
|
|
436
|
-
return u === s.ASC ? c - m : m - c;
|
|
437
|
-
}
|
|
438
|
-
if (h === "expiresAt") {
|
|
439
|
-
const c = t.expiresAt ? new Date(t.expiresAt).getTime() : Number.MAX_SAFE_INTEGER, m = i.expiresAt ? new Date(i.expiresAt).getTime() : Number.MAX_SAFE_INTEGER;
|
|
440
|
-
return u === s.ASC ? c - m : m - c;
|
|
441
|
-
}
|
|
442
|
-
return 0;
|
|
443
|
-
}).map((t, i) => /* @__PURE__ */ r(S, { children: [
|
|
444
|
-
/* @__PURE__ */ e(
|
|
445
|
-
a,
|
|
446
|
-
{
|
|
447
|
-
className: A("dark:text-copy-medium"),
|
|
448
|
-
children: i + 1
|
|
449
|
-
}
|
|
450
|
-
),
|
|
451
|
-
/* @__PURE__ */ e(
|
|
452
|
-
a,
|
|
453
|
-
{
|
|
454
|
-
className: A(
|
|
455
|
-
"dark:text-copy-lighter",
|
|
456
|
-
"max-w-25 sm:max-w-100",
|
|
457
|
-
"text-xs sm:text-sm"
|
|
458
|
-
),
|
|
459
|
-
style: {
|
|
460
|
-
wordBreak: "break-word"
|
|
461
|
-
},
|
|
462
|
-
children: t.description || t.text
|
|
463
|
-
}
|
|
464
|
-
),
|
|
465
|
-
/* @__PURE__ */ e(
|
|
466
|
-
a,
|
|
467
|
-
{
|
|
468
|
-
className: A(
|
|
469
|
-
"dark:text-copy-medium",
|
|
470
|
-
"sm:whitespace-nowrap text-xs sm:text-sm max-w-20 sm:max-w-none"
|
|
471
|
-
),
|
|
472
|
-
children: t.createdAt ? new Date(t.createdAt).toLocaleDateString() : "-"
|
|
473
|
-
}
|
|
474
|
-
),
|
|
475
|
-
/* @__PURE__ */ e(
|
|
476
|
-
a,
|
|
477
|
-
{
|
|
478
|
-
className: A(
|
|
479
|
-
"dark:text-copy-medium",
|
|
480
|
-
"sm:whitespace-nowrap text-xs sm:text-sm"
|
|
481
|
-
),
|
|
482
|
-
children: t.expiresAt ? new Date(t.expiresAt).toLocaleDateString() : "Never"
|
|
483
|
-
}
|
|
484
|
-
),
|
|
485
|
-
/* @__PURE__ */ e(
|
|
486
|
-
a,
|
|
487
|
-
{
|
|
488
|
-
className: "align-top border-l border-table-light dark:border-table-dark",
|
|
489
|
-
align: "right",
|
|
490
|
-
children: /* @__PURE__ */ r("div", { className: "flex flex-wrap justify-end gap-x-2", children: [
|
|
491
|
-
/* @__PURE__ */ e("div", { className: "box-border max-w-full basis-auto", children: /* @__PURE__ */ e(
|
|
492
|
-
U,
|
|
493
|
-
{
|
|
494
|
-
label: "Edit memory",
|
|
495
|
-
mode: "system",
|
|
496
|
-
placement: "top",
|
|
497
|
-
trigger: /* @__PURE__ */ e(
|
|
498
|
-
F,
|
|
499
|
-
{
|
|
500
|
-
focusMode: "system",
|
|
501
|
-
noBorder: !0,
|
|
502
|
-
label: "Edit memory",
|
|
503
|
-
variant: "primary",
|
|
504
|
-
disabled: B.isPending,
|
|
505
|
-
onClick: () => me(
|
|
506
|
-
t.memoryId,
|
|
507
|
-
t.description || t.text,
|
|
508
|
-
t.categories,
|
|
509
|
-
t.quote,
|
|
510
|
-
t.canonicalText,
|
|
511
|
-
t.confidence,
|
|
512
|
-
t.status,
|
|
513
|
-
t.sourceType,
|
|
514
|
-
t.expiration,
|
|
515
|
-
t.expiresAt
|
|
516
|
-
),
|
|
517
|
-
children: /* @__PURE__ */ e(Re, { size: "size-3", monotone: !0 })
|
|
518
|
-
}
|
|
519
|
-
)
|
|
520
|
-
}
|
|
521
|
-
) }),
|
|
522
|
-
/* @__PURE__ */ e("div", { className: "box-border max-w-full basis-auto", children: /* @__PURE__ */ e(
|
|
523
|
-
Oe,
|
|
524
|
-
{
|
|
525
|
-
label: "Delete memory",
|
|
526
|
-
disabled: _.isPending,
|
|
527
|
-
onClick: () => K(
|
|
528
|
-
t.memoryId,
|
|
529
|
-
t.text,
|
|
530
|
-
t.description,
|
|
531
|
-
t.createdAt
|
|
532
|
-
)
|
|
533
|
-
}
|
|
534
|
-
) })
|
|
535
|
-
] })
|
|
536
|
-
}
|
|
537
|
-
)
|
|
538
|
-
] }, t.memoryId)) }),
|
|
539
|
-
/* @__PURE__ */ e(oe, { children: /* @__PURE__ */ e(S, { children: /* @__PURE__ */ e(a, { colSpan: 5, children: Q(v) }) }) })
|
|
540
|
-
]
|
|
541
|
-
}
|
|
542
|
-
) : /* @__PURE__ */ e("p", { className: "m-0 italic opacity-70", children: "No memories stored." }))
|
|
543
|
-
] }) : /* @__PURE__ */ r(T, { children: [
|
|
544
|
-
G && /* @__PURE__ */ e("p", { className: "m-0", children: "Loading expired memories..." }),
|
|
545
|
-
$ && /* @__PURE__ */ e("p", { className: "m-0 text-copy-error-light", children: "Failed to load expired memories." }),
|
|
546
|
-
!G && !$ && (f && f.items.length > 0 ? /* @__PURE__ */ r(te, { stickyHeader: !0, stickyFooter: !0, compact: !0, mode: "alt-system", children: [
|
|
547
|
-
/* @__PURE__ */ e(re, { children: /* @__PURE__ */ r(S, { children: [
|
|
548
|
-
/* @__PURE__ */ e(a, { className: "sr-only", children: "Row" }),
|
|
549
|
-
/* @__PURE__ */ e(a, { children: "Memory" }),
|
|
550
|
-
/* @__PURE__ */ e(
|
|
551
|
-
I,
|
|
552
|
-
{
|
|
553
|
-
focusMode: "system",
|
|
554
|
-
buttonClassName: "text-xs sm:text-sm",
|
|
555
|
-
cellId: "createdAt",
|
|
556
|
-
align: "left",
|
|
557
|
-
sortDirection: u,
|
|
558
|
-
sortedCell: h,
|
|
559
|
-
onClick: () => {
|
|
560
|
-
M("createdAt"), C("createdAt"), l((t) => {
|
|
561
|
-
const i = t === s.ASC ? s.DESC : s.ASC;
|
|
562
|
-
return p(i), i;
|
|
563
|
-
});
|
|
564
|
-
},
|
|
565
|
-
children: "Date"
|
|
566
|
-
}
|
|
567
|
-
),
|
|
568
|
-
/* @__PURE__ */ e(
|
|
569
|
-
I,
|
|
570
|
-
{
|
|
571
|
-
focusMode: "system",
|
|
572
|
-
buttonClassName: "text-xs sm:text-sm",
|
|
573
|
-
cellId: "expiresAt",
|
|
574
|
-
align: "left",
|
|
575
|
-
sortDirection: u,
|
|
576
|
-
sortedCell: h,
|
|
577
|
-
onClick: () => {
|
|
578
|
-
M("expiresAt"), C("expiresAt"), l((t) => {
|
|
579
|
-
const i = t === s.ASC ? s.DESC : s.ASC;
|
|
580
|
-
return p(i), i;
|
|
581
|
-
});
|
|
582
|
-
},
|
|
583
|
-
children: "Expired"
|
|
584
|
-
}
|
|
585
|
-
),
|
|
586
|
-
/* @__PURE__ */ e(a, { align: "right", children: "Actions" })
|
|
587
|
-
] }) }),
|
|
588
|
-
/* @__PURE__ */ e(ie, { children: [...f.items].sort((t, i) => {
|
|
589
|
-
if (h === "createdAt") {
|
|
590
|
-
const c = t.createdAt ? new Date(t.createdAt).getTime() : 0, m = i.createdAt ? new Date(i.createdAt).getTime() : 0;
|
|
591
|
-
return u === s.ASC ? c - m : m - c;
|
|
592
|
-
}
|
|
593
|
-
if (h === "expiresAt") {
|
|
594
|
-
const c = t.expiresAt ? new Date(t.expiresAt).getTime() : Number.MAX_SAFE_INTEGER, m = i.expiresAt ? new Date(i.expiresAt).getTime() : Number.MAX_SAFE_INTEGER;
|
|
595
|
-
return u === s.ASC ? c - m : m - c;
|
|
596
|
-
}
|
|
597
|
-
return 0;
|
|
598
|
-
}).map((t, i) => /* @__PURE__ */ r(S, { children: [
|
|
599
|
-
/* @__PURE__ */ e(
|
|
600
|
-
a,
|
|
601
|
-
{
|
|
602
|
-
className: A("dark:text-copy-medium"),
|
|
603
|
-
children: i + 1
|
|
604
|
-
}
|
|
605
|
-
),
|
|
606
|
-
/* @__PURE__ */ e(
|
|
607
|
-
a,
|
|
608
|
-
{
|
|
609
|
-
className: A(
|
|
610
|
-
"dark:text-copy-lighter",
|
|
611
|
-
"max-w-25 sm:max-w-100",
|
|
612
|
-
"text-xs sm:text-sm"
|
|
613
|
-
),
|
|
614
|
-
style: {
|
|
615
|
-
wordBreak: "break-word"
|
|
616
|
-
},
|
|
617
|
-
children: t.description || t.text
|
|
618
|
-
}
|
|
619
|
-
),
|
|
620
|
-
/* @__PURE__ */ e(
|
|
621
|
-
a,
|
|
622
|
-
{
|
|
623
|
-
className: A(
|
|
624
|
-
"dark:text-copy-medium",
|
|
625
|
-
"sm:whitespace-nowrap text-xs sm:text-sm max-w-20 sm:max-w-none"
|
|
626
|
-
),
|
|
627
|
-
children: t.createdAt ? new Date(t.createdAt).toLocaleDateString() : "-"
|
|
628
|
-
}
|
|
629
|
-
),
|
|
630
|
-
/* @__PURE__ */ e(
|
|
631
|
-
a,
|
|
632
|
-
{
|
|
633
|
-
className: A(
|
|
634
|
-
"dark:text-copy-medium",
|
|
635
|
-
"sm:whitespace-nowrap text-xs sm:text-sm"
|
|
636
|
-
),
|
|
637
|
-
children: t.expiresAt ? new Date(t.expiresAt).toLocaleDateString() : "-"
|
|
638
|
-
}
|
|
639
|
-
),
|
|
640
|
-
/* @__PURE__ */ e(
|
|
641
|
-
a,
|
|
642
|
-
{
|
|
643
|
-
className: "align-top border-l border-table-light dark:border-table-dark",
|
|
644
|
-
align: "right",
|
|
645
|
-
children: /* @__PURE__ */ r("div", { className: "flex flex-wrap justify-end gap-x-2", children: [
|
|
646
|
-
/* @__PURE__ */ e("div", { className: "box-border max-w-full basis-auto", children: /* @__PURE__ */ e(
|
|
647
|
-
U,
|
|
648
|
-
{
|
|
649
|
-
label: "Restore memory",
|
|
650
|
-
mode: "system",
|
|
651
|
-
placement: "top",
|
|
652
|
-
trigger: /* @__PURE__ */ e(
|
|
653
|
-
F,
|
|
654
|
-
{
|
|
655
|
-
focusMode: "system",
|
|
656
|
-
noBorder: !0,
|
|
657
|
-
label: "Restore memory",
|
|
658
|
-
variant: "primary",
|
|
659
|
-
disabled: H.isPending,
|
|
660
|
-
onClick: () => {
|
|
661
|
-
d && H.mutate({
|
|
662
|
-
user: d,
|
|
663
|
-
memoryId: t.memoryId
|
|
664
|
-
});
|
|
665
|
-
},
|
|
666
|
-
children: /* @__PURE__ */ e(Ie, { size: "size-3", monotone: !0 })
|
|
667
|
-
}
|
|
668
|
-
)
|
|
669
|
-
}
|
|
670
|
-
) }),
|
|
671
|
-
/* @__PURE__ */ e("div", { className: "box-border max-w-full basis-auto", children: /* @__PURE__ */ e(
|
|
672
|
-
U,
|
|
673
|
-
{
|
|
674
|
-
label: "Delete memory",
|
|
675
|
-
mode: "system",
|
|
676
|
-
placement: "top",
|
|
677
|
-
trigger: /* @__PURE__ */ e(
|
|
678
|
-
F,
|
|
679
|
-
{
|
|
680
|
-
focusMode: "system",
|
|
681
|
-
noBorder: !0,
|
|
682
|
-
label: "Delete memory",
|
|
683
|
-
variant: "primary",
|
|
684
|
-
iconClassName: "text-copy-error-dark dark:text-copy-error-light",
|
|
685
|
-
disabled: _.isPending,
|
|
686
|
-
onClick: () => K(
|
|
687
|
-
t.memoryId,
|
|
688
|
-
t.text,
|
|
689
|
-
t.description,
|
|
690
|
-
t.createdAt
|
|
691
|
-
),
|
|
692
|
-
children: /* @__PURE__ */ e(Le, { size: "size-3", monotone: !0 })
|
|
693
|
-
}
|
|
694
|
-
)
|
|
695
|
-
}
|
|
696
|
-
) })
|
|
697
|
-
] })
|
|
698
|
-
}
|
|
699
|
-
)
|
|
700
|
-
] }, t.memoryId)) }),
|
|
701
|
-
/* @__PURE__ */ e(oe, { children: /* @__PURE__ */ e(S, { children: /* @__PURE__ */ r(a, { colSpan: 5, children: [
|
|
702
|
-
f.total,
|
|
703
|
-
" expired memor",
|
|
704
|
-
f.total === 1 ? "y" : "ies",
|
|
705
|
-
f.totalTokenUsage !== void 0 && f.totalTokenUsage > 0 && /* @__PURE__ */ r(T, { children: [
|
|
706
|
-
" ",
|
|
707
|
-
"(approximately",
|
|
708
|
-
" ",
|
|
709
|
-
Math.round(
|
|
710
|
-
f.totalTokenUsage
|
|
711
|
-
).toLocaleString(),
|
|
712
|
-
" ",
|
|
713
|
-
"token",
|
|
714
|
-
Math.round(f.totalTokenUsage) === 1 ? "" : "s",
|
|
715
|
-
")"
|
|
716
|
-
] })
|
|
717
|
-
] }) }) })
|
|
718
|
-
] }) : /* @__PURE__ */ e("p", { className: "m-0 italic opacity-70", children: "No expired memories." }))
|
|
719
|
-
] })
|
|
720
|
-
}
|
|
721
|
-
)
|
|
722
|
-
] })
|
|
723
|
-
}
|
|
724
|
-
)
|
|
725
|
-
] });
|
|
726
|
-
};
|
|
727
|
-
export {
|
|
728
|
-
Ve as default
|
|
729
|
-
};
|