@versini/sassysaint 8.109.2 → 8.110.1
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.BSdcqHox.js → AboutChangelog.DfItgg_1.js} +2 -2
- package/dist/chunks/AboutEntry.DIYTS0Pp.js +77 -0
- package/dist/chunks/{App.Ck18sHiX.js → App.7P9lyXTX.js} +4104 -3874
- package/dist/chunks/{Bubble.B6v5eAOZ.js → Bubble.C3J-YrAQ.js} +1 -1
- package/dist/chunks/ButtonIconDelete.CAEfJOI7.js +333 -0
- package/dist/chunks/{Chart.BIy5YDm2.js → Chart.Dg1jAFpj.js} +2 -2
- package/dist/chunks/{ChatBubbleAssistant.CN-iqEkP.js → ChatBubbleAssistant.DavDkAFx.js} +4 -4
- package/dist/chunks/{ChatBubbleUser.D4OLR3vD.js → ChatBubbleUser.DSMfBmEP.js} +3 -3
- package/dist/chunks/{ChatHistoryTable.ZOLprzfc.js → ChatHistoryTable.qju2f_Sh.js} +73 -73
- package/dist/chunks/{HistoryEntry.DY5WIpTu.js → HistoryEntry.QxUwQO5B.js} +73 -81
- package/dist/chunks/LoginEntry.BbhZpovW.js +118 -0
- package/dist/chunks/{LogoEntry.B1e2c-s0.js → LogoEntry.CTMAkXZN.js} +643 -747
- package/dist/chunks/{MemoriesEntry.CVrI1Ter.js → MemoriesEntry.BYYT1IVl.js} +304 -318
- package/dist/chunks/ProfileEntry.vCF-ayWr.js +205 -0
- package/dist/chunks/{SettingsEntry.BxF_ZqA5.js → SettingsEntry.DEaHLi7A.js} +114 -122
- package/dist/chunks/UsageEntry.B3Z4Zr4a.js +230 -0
- package/dist/chunks/{_baseUniq.B6Gcl5nF.js → _baseUniq.CKo3g19j.js} +1 -1
- package/dist/chunks/{arc.w_BReByh.js → arc.ny1AnYpL.js} +1 -1
- package/dist/chunks/{architecture-U656AL7Q.BPCpLHAc.js → architecture-U656AL7Q.CoJV4P-W.js} +1 -1
- package/dist/chunks/{architectureDiagram-VXUJARFQ.D96Sa2WG.js → architectureDiagram-VXUJARFQ.C_r6hPXf.js} +4 -4
- package/dist/chunks/{blockDiagram-VD42YOAC.fDjFSO1h.js → blockDiagram-VD42YOAC.DeTKi9HH.js} +5 -5
- package/dist/chunks/{browser.Cb_vr1PR.js → browser.Dd1PVu4Q.js} +1 -1
- package/dist/chunks/{c4Diagram-YG6GDRKO.U8IWA3ML.js → c4Diagram-YG6GDRKO.PYJXPQRd.js} +2 -2
- package/dist/chunks/{channel.Dw9Rrvd2.js → channel.CldxJpdX.js} +1 -1
- package/dist/chunks/{chunk-4BX2VUAB.Cio3OsS-.js → chunk-4BX2VUAB.D_xGzQXV.js} +1 -1
- package/dist/chunks/{chunk-55IACEB6.CFaFqBKt.js → chunk-55IACEB6.D91lGO9k.js} +1 -1
- package/dist/chunks/{chunk-B4BG7PRW.DGkVxxTo.js → chunk-B4BG7PRW.rABluadn.js} +4 -4
- package/dist/chunks/{chunk-DI55MBZ5.DsnidbDu.js → chunk-DI55MBZ5.BisMfdbP.js} +3 -3
- package/dist/chunks/{chunk-FMBD7UC4.DTxRjjKJ.js → chunk-FMBD7UC4.IZluU3TG.js} +1 -1
- package/dist/chunks/{chunk-QN33PNHL.CuRPKMac.js → chunk-QN33PNHL.DdhRwJuC.js} +1 -1
- package/dist/chunks/{chunk-QZHKN3VN.CntLD_-Z.js → chunk-QZHKN3VN.DxJRkbxl.js} +1 -1
- package/dist/chunks/{chunk-TZMSLE5B.B7_0n6Dd.js → chunk-TZMSLE5B.yJUdJdZG.js} +1 -1
- package/dist/chunks/{classDiagram-2ON5EDUG.BJsNaiPY.js → classDiagram-2ON5EDUG.BJJShSGE.js} +2 -2
- package/dist/chunks/{classDiagram-v2-WZHVMYZB.BJsNaiPY.js → classDiagram-v2-WZHVMYZB.BJJShSGE.js} +2 -2
- package/dist/chunks/{clone.BFX0o9-g.js → clone.CYQWcQos.js} +1 -1
- package/dist/chunks/{cose-bilkent-S5V4N54A.CJtHnhhQ.js → cose-bilkent-S5V4N54A.CFiLRTlV.js} +2 -2
- package/dist/chunks/{dagre-6UL2VRFP.CuwjO6gV.js → dagre-6UL2VRFP.BAOLjlsO.js} +5 -5
- package/dist/chunks/{diagram-PSM6KHXK.CnNu5_LM.js → diagram-PSM6KHXK.B7fd_KvS.js} +4 -4
- package/dist/chunks/{diagram-QEK2KX5R.D74ae4xj.js → diagram-QEK2KX5R.nRWB6Pdu.js} +3 -3
- package/dist/chunks/{diagram-S2PKOQOG.C_JbSw1v.js → diagram-S2PKOQOG.C4gQIrc_.js} +3 -3
- package/dist/chunks/{erDiagram-Q2GNP2WA.Bu-foyWC.js → erDiagram-Q2GNP2WA.U2TDWSHg.js} +4 -4
- package/dist/chunks/{flowDiagram-NV44I4VS.YDgJ2OQY.js → flowDiagram-NV44I4VS.CmXaVrq9.js} +5 -5
- package/dist/chunks/{ganttDiagram-JELNMOA3.ymNQ3Hoy.js → ganttDiagram-JELNMOA3.DSD39bjf.js} +2 -2
- package/dist/chunks/{gitGraph-F6HP7TQM.D-mPOTEU.js → gitGraph-F6HP7TQM.C_axBowD.js} +1 -1
- package/dist/chunks/{gitGraphDiagram-NY62KEGX.jrbht_5k.js → gitGraphDiagram-NY62KEGX.Y6LpuRjD.js} +4 -4
- package/dist/chunks/{graph.Dw24ucCU.js → graph.CsEnoNl4.js} +2 -2
- package/dist/chunks/{index.KPs76GKZ.js → index.-DOP9Ckx.js} +1 -1
- package/dist/chunks/{index.CmWau6U1.js → index.4552QdXH.js} +3 -3
- package/dist/chunks/{index.Ci301JK4.js → index.76MlCVOY.js} +1 -1
- package/dist/chunks/{index.CQg0p3pG.js → index.BYUyJHzk.js} +1 -1
- package/dist/chunks/{index.BGnEq9eh.js → index.Bi2ow_w5.js} +1 -1
- package/dist/chunks/{index.BzMdQGY-.js → index.CK3q1Sfv.js} +1 -1
- package/dist/chunks/{index.Cn19xWGt.js → index.CR9-xbTg.js} +3 -3
- package/dist/chunks/{index.D5R76Qhp.js → index.MD-I3XF8.js} +2 -2
- package/dist/chunks/{index.CmK3RbmJ.js → index.whZY27YH.js} +1 -1
- package/dist/chunks/{info-NVLQJR56.CzwKOAh7.js → info-NVLQJR56.BM1oszeu.js} +1 -1
- package/dist/chunks/{infoDiagram-WHAUD3N6.au7bTIRT.js → infoDiagram-WHAUD3N6.BOdkf_MU.js} +2 -2
- package/dist/chunks/{journeyDiagram-XKPGCS4Q.C9l-1F8k.js → journeyDiagram-XKPGCS4Q.Dw7-F-3G.js} +4 -4
- package/dist/chunks/{kanban-definition-3W4ZIXB7.D6Vfi9gE.js → kanban-definition-3W4ZIXB7.DBHZd8kd.js} +2 -2
- package/dist/chunks/{layout.DPHpmMar.js → layout.FDyoYwG2.js} +4 -4
- package/dist/chunks/{mermaid-parser.core.DInxEyfY.js → mermaid-parser.core.C4lg1K9H.js} +10 -10
- package/dist/chunks/{min.MWawyr81.js → min.DBs1Msoe.js} +2 -2
- package/dist/chunks/{mindmap-definition-VGOIOE7T.AmwLTujL.js → mindmap-definition-VGOIOE7T.CU1TS1Wz.js} +3 -3
- package/dist/chunks/{packet-BFZMPI3H.CSmnVpE_.js → packet-BFZMPI3H.BQDJHYjU.js} +1 -1
- package/dist/chunks/{pie-7BOR55EZ.DJwvoEep.js → pie-7BOR55EZ.BlU94TQO.js} +1 -1
- package/dist/chunks/{pieDiagram-ADFJNKIX.Ci_Ogfw5.js → pieDiagram-ADFJNKIX.CKbT8AbG.js} +4 -4
- package/dist/chunks/{quadrantDiagram-AYHSOK5B.DenSBLBq.js → quadrantDiagram-AYHSOK5B.iibdk6QV.js} +1 -1
- package/dist/chunks/{radar-NHE76QYJ.Bs1Xji9w.js → radar-NHE76QYJ.CqellN1R.js} +1 -1
- package/dist/chunks/{rehype-mermaid.DlMgdumz.js → rehype-mermaid.D5rxFoLJ.js} +33 -33
- package/dist/chunks/{requirementDiagram-UZGBJVZJ.CjMQhoO7.js → requirementDiagram-UZGBJVZJ.BeoYCRTt.js} +3 -3
- package/dist/chunks/{sankeyDiagram-TZEHDZUN.B9hWlv5i.js → sankeyDiagram-TZEHDZUN.Cl7AJQyH.js} +1 -1
- package/dist/chunks/{sequenceDiagram-WL72ISMW.MHpp_BjQ.js → sequenceDiagram-WL72ISMW.DJiYzLwe.js} +3 -3
- package/dist/chunks/{stateDiagram-FKZM4ZOC.C4fbHKw_.js → stateDiagram-FKZM4ZOC.CEH77n-u.js} +4 -4
- package/dist/chunks/{stateDiagram-v2-4FDKWEC3.ByhBnYKV.js → stateDiagram-v2-4FDKWEC3.C7e8FoNM.js} +2 -2
- package/dist/chunks/{timeline-definition-IT6M3QCI.BVQ3wHwi.js → timeline-definition-IT6M3QCI.DpH45C9N.js} +2 -2
- package/dist/chunks/{treemap-KMMF4GRG.DCYbqvVC.js → treemap-KMMF4GRG.CaXoo_S5.js} +1 -1
- package/dist/chunks/{useMarkdown.4iaTIP2g.js → useMarkdown.C2zWe9xE.js} +8 -8
- package/dist/chunks/{xychartDiagram-PRI3JC2R.Dp6iurqL.js → xychartDiagram-PRI3JC2R.l9efaY6c.js} +1 -1
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +3 -3
- package/dist/style.css +1 -1
- package/package.json +3 -3
- package/dist/chunks/AboutEntry.CAewlRU7.js +0 -85
- package/dist/chunks/ButtonIconDelete.jqbd7Q9b.js +0 -456
- package/dist/chunks/LoginEntry.CC1V4TOR.js +0 -118
- package/dist/chunks/ProfileEntry.VlRvWAq4.js +0 -213
- package/dist/chunks/UsageEntry.DHYx6GmN.js +0 -238
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
import { jsx as e, jsxs as r, Fragment as
|
|
2
|
-
import { n as
|
|
3
|
-
import {
|
|
4
|
-
import { Panel as
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import { useState as N, useEffect as
|
|
8
|
-
import { TextArea as
|
|
9
|
-
const
|
|
10
|
-
open:
|
|
11
|
-
onOpenChange:
|
|
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
12
|
initialText: d,
|
|
13
13
|
metadata: o,
|
|
14
|
-
onSave:
|
|
15
|
-
isSaving:
|
|
14
|
+
onSave: g,
|
|
15
|
+
isSaving: D = !1
|
|
16
16
|
}) => {
|
|
17
|
-
const [
|
|
18
|
-
|
|
19
|
-
if (
|
|
20
|
-
|
|
21
|
-
const
|
|
22
|
-
p(
|
|
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
23
|
}
|
|
24
|
-
}, [
|
|
25
|
-
const
|
|
26
|
-
if (
|
|
27
|
-
const
|
|
28
|
-
|
|
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
29
|
}
|
|
30
|
-
},
|
|
30
|
+
}, C = n.trim().length >= 3, u = n.trim() !== d.trim() || y !== (o?.expiration || "none");
|
|
31
31
|
return /* @__PURE__ */ e(
|
|
32
|
-
|
|
32
|
+
le,
|
|
33
33
|
{
|
|
34
|
-
open:
|
|
35
|
-
onOpenChange:
|
|
34
|
+
open: b,
|
|
35
|
+
onOpenChange: k,
|
|
36
36
|
title: "Edit Memory",
|
|
37
37
|
animation: !0,
|
|
38
38
|
animationType: "fade",
|
|
39
|
-
footer: /* @__PURE__ */ r(
|
|
40
|
-
/* @__PURE__ */ e(
|
|
41
|
-
/* @__PURE__ */ e(
|
|
42
|
-
|
|
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
43
|
{
|
|
44
44
|
mode: "dark",
|
|
45
45
|
focusMode: "light",
|
|
46
|
-
disabled:
|
|
47
|
-
onClick:
|
|
48
|
-
children:
|
|
46
|
+
disabled: D || !C || !u,
|
|
47
|
+
onClick: O,
|
|
48
|
+
children: D ? "Saving..." : "Save"
|
|
49
49
|
}
|
|
50
50
|
) })
|
|
51
51
|
] }),
|
|
52
52
|
children: /* @__PURE__ */ r("div", { className: "flex flex-col pt-2 gap-4", children: [
|
|
53
53
|
/* @__PURE__ */ e(
|
|
54
|
-
|
|
54
|
+
Be,
|
|
55
55
|
{
|
|
56
56
|
mode: "dark",
|
|
57
57
|
focusMode: "light",
|
|
58
58
|
label: "Memory text",
|
|
59
59
|
name: "memoryText",
|
|
60
|
-
value:
|
|
61
|
-
onChange: (
|
|
60
|
+
value: n,
|
|
61
|
+
onChange: (l) => E(l.target.value),
|
|
62
62
|
autoFocus: !0,
|
|
63
|
-
helperText:
|
|
63
|
+
helperText: n.trim().length < 3 ? "Memory text must be at least 3 characters" : `${n.length} characters`
|
|
64
64
|
}
|
|
65
65
|
),
|
|
66
66
|
/* @__PURE__ */ r("div", { className: "flex flex-col gap-3 p-4 bg-surface-darker rounded-md", children: [
|
|
@@ -68,7 +68,7 @@ const Fe = ({
|
|
|
68
68
|
/* @__PURE__ */ e("p", { className: "text-xs text-copy-medium m-0", children: "Set when this memory should expire and be automatically removed." }),
|
|
69
69
|
/* @__PURE__ */ r("div", { className: "flex flex-col gap-2", children: [
|
|
70
70
|
/* @__PURE__ */ e(
|
|
71
|
-
|
|
71
|
+
R,
|
|
72
72
|
{
|
|
73
73
|
mode: "dark",
|
|
74
74
|
focusMode: "light",
|
|
@@ -76,14 +76,14 @@ const Fe = ({
|
|
|
76
76
|
narrow: !0,
|
|
77
77
|
label: "Never expire",
|
|
78
78
|
name: "expiration-none",
|
|
79
|
-
checked:
|
|
80
|
-
onChange: (
|
|
81
|
-
|
|
79
|
+
checked: y === "none",
|
|
80
|
+
onChange: (l) => {
|
|
81
|
+
l && p("none");
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
),
|
|
85
85
|
/* @__PURE__ */ e(
|
|
86
|
-
|
|
86
|
+
R,
|
|
87
87
|
{
|
|
88
88
|
mode: "dark",
|
|
89
89
|
focusMode: "light",
|
|
@@ -91,14 +91,14 @@ const Fe = ({
|
|
|
91
91
|
narrow: !0,
|
|
92
92
|
label: "Short (1 month)",
|
|
93
93
|
name: "expiration-short",
|
|
94
|
-
checked:
|
|
95
|
-
onChange: (
|
|
96
|
-
|
|
94
|
+
checked: y === "short",
|
|
95
|
+
onChange: (l) => {
|
|
96
|
+
l && p("short");
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
),
|
|
100
100
|
/* @__PURE__ */ e(
|
|
101
|
-
|
|
101
|
+
R,
|
|
102
102
|
{
|
|
103
103
|
mode: "dark",
|
|
104
104
|
focusMode: "light",
|
|
@@ -106,14 +106,14 @@ const Fe = ({
|
|
|
106
106
|
narrow: !0,
|
|
107
107
|
label: "Medium (6 months)",
|
|
108
108
|
name: "expiration-medium",
|
|
109
|
-
checked:
|
|
110
|
-
onChange: (
|
|
111
|
-
|
|
109
|
+
checked: y === "medium",
|
|
110
|
+
onChange: (l) => {
|
|
111
|
+
l && p("medium");
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
),
|
|
115
115
|
/* @__PURE__ */ e(
|
|
116
|
-
|
|
116
|
+
R,
|
|
117
117
|
{
|
|
118
118
|
mode: "dark",
|
|
119
119
|
focusMode: "light",
|
|
@@ -121,9 +121,9 @@ const Fe = ({
|
|
|
121
121
|
narrow: !0,
|
|
122
122
|
label: "Long (1 year)",
|
|
123
123
|
name: "expiration-long",
|
|
124
|
-
checked:
|
|
125
|
-
onChange: (
|
|
126
|
-
|
|
124
|
+
checked: y === "long",
|
|
125
|
+
onChange: (l) => {
|
|
126
|
+
l && p("long");
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
129
|
)
|
|
@@ -133,13 +133,13 @@ const Fe = ({
|
|
|
133
133
|
/* @__PURE__ */ e("h3", { className: "text-sm m-0", children: "Memory Details" }),
|
|
134
134
|
o.categories && o.categories.length > 0 && /* @__PURE__ */ r("div", { className: "flex flex-col gap-1", children: [
|
|
135
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((
|
|
136
|
+
/* @__PURE__ */ e("div", { className: "flex flex-wrap gap-1", children: o.categories.map((l, h) => /* @__PURE__ */ e(
|
|
137
137
|
"span",
|
|
138
138
|
{
|
|
139
139
|
className: "text-xs px-2 py-1 text-copy-light rounded",
|
|
140
|
-
children:
|
|
140
|
+
children: l
|
|
141
141
|
},
|
|
142
|
-
`${
|
|
142
|
+
`${l}-${h}`
|
|
143
143
|
)) })
|
|
144
144
|
] }),
|
|
145
145
|
/* @__PURE__ */ r("div", { className: "flex flex-col sm:flex-row gap-4", children: [
|
|
@@ -179,48 +179,48 @@ const Fe = ({
|
|
|
179
179
|
] })
|
|
180
180
|
}
|
|
181
181
|
);
|
|
182
|
-
},
|
|
183
|
-
const o =
|
|
184
|
-
key:
|
|
185
|
-
initialValue:
|
|
186
|
-
}), [
|
|
187
|
-
key:
|
|
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
188
|
initialValue: "createdAt"
|
|
189
|
-
}), [
|
|
190
|
-
|
|
191
|
-
), { data:
|
|
189
|
+
}), [u, l] = N(y || s.DESC), [h, M] = N(
|
|
190
|
+
O || "createdAt"
|
|
191
|
+
), { data: v, isLoading: q, isError: j } = ve({
|
|
192
192
|
user: d,
|
|
193
|
-
query:
|
|
194
|
-
getAccessToken:
|
|
195
|
-
enabled:
|
|
193
|
+
query: D,
|
|
194
|
+
getAccessToken: g,
|
|
195
|
+
enabled: b && n === "active"
|
|
196
196
|
}), {
|
|
197
|
-
data:
|
|
198
|
-
isLoading:
|
|
199
|
-
isError:
|
|
200
|
-
} =
|
|
197
|
+
data: f,
|
|
198
|
+
isLoading: G,
|
|
199
|
+
isError: $
|
|
200
|
+
} = Te({
|
|
201
201
|
user: d,
|
|
202
|
-
query:
|
|
203
|
-
getAccessToken:
|
|
204
|
-
enabled:
|
|
205
|
-
}),
|
|
206
|
-
|
|
207
|
-
},
|
|
208
|
-
|
|
209
|
-
},
|
|
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
210
|
x.current = {
|
|
211
211
|
id: t,
|
|
212
212
|
description: i,
|
|
213
|
-
categories:
|
|
213
|
+
categories: c,
|
|
214
214
|
quote: m,
|
|
215
|
-
canonicalText:
|
|
216
|
-
confidence:
|
|
217
|
-
status:
|
|
218
|
-
sourceType:
|
|
219
|
-
expiration:
|
|
220
|
-
expiresAt:
|
|
221
|
-
},
|
|
222
|
-
},
|
|
223
|
-
x.current && d &&
|
|
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
224
|
{
|
|
225
225
|
user: d,
|
|
226
226
|
memoryId: x.current.id,
|
|
@@ -229,24 +229,24 @@ const Fe = ({
|
|
|
229
229
|
},
|
|
230
230
|
{
|
|
231
231
|
onSuccess: () => {
|
|
232
|
-
|
|
232
|
+
P(!1);
|
|
233
233
|
}
|
|
234
234
|
}
|
|
235
235
|
);
|
|
236
|
+
}, pe = () => {
|
|
237
|
+
d && J(!0);
|
|
236
238
|
}, ue = () => {
|
|
237
|
-
d &&
|
|
238
|
-
},
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
const i = `${t.total} memor${t.total === 1 ? "y" : "ies"}`, a = t.totalTokenUsage ? ` (~${t.totalTokenUsage} tokens)` : "";
|
|
242
|
-
return i + a;
|
|
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
243
|
};
|
|
244
|
-
return /* @__PURE__ */ r(
|
|
244
|
+
return /* @__PURE__ */ r(T, { children: [
|
|
245
245
|
/* @__PURE__ */ e(
|
|
246
|
-
|
|
246
|
+
Pe,
|
|
247
247
|
{
|
|
248
|
-
open:
|
|
249
|
-
onOpenChange:
|
|
248
|
+
open: ce,
|
|
249
|
+
onOpenChange: P,
|
|
250
250
|
initialText: x.current?.description || "",
|
|
251
251
|
metadata: x.current ? {
|
|
252
252
|
categories: x.current.categories,
|
|
@@ -258,16 +258,16 @@ const Fe = ({
|
|
|
258
258
|
expiration: x.current.expiration,
|
|
259
259
|
expiresAt: x.current.expiresAt
|
|
260
260
|
} : void 0,
|
|
261
|
-
onSave:
|
|
262
|
-
isSaving:
|
|
261
|
+
onSave: xe,
|
|
262
|
+
isSaving: B.isPending
|
|
263
263
|
}
|
|
264
264
|
),
|
|
265
265
|
/* @__PURE__ */ r(
|
|
266
|
-
|
|
266
|
+
ee,
|
|
267
267
|
{
|
|
268
268
|
showConfirmation: ae,
|
|
269
|
-
setShowConfirmation:
|
|
270
|
-
action:
|
|
269
|
+
setShowConfirmation: Y,
|
|
270
|
+
action: de,
|
|
271
271
|
customStrings: {
|
|
272
272
|
title: "Delete memory",
|
|
273
273
|
confirmAction: "Delete",
|
|
@@ -279,33 +279,33 @@ const Fe = ({
|
|
|
279
279
|
/* @__PURE__ */ r("li", { children: [
|
|
280
280
|
"Excerpt:",
|
|
281
281
|
" ",
|
|
282
|
-
(
|
|
282
|
+
(w.current?.description || w.current?.text || "").slice(0, 80)
|
|
283
283
|
] }),
|
|
284
284
|
/* @__PURE__ */ r("li", { children: [
|
|
285
285
|
"Created:",
|
|
286
286
|
" ",
|
|
287
|
-
|
|
287
|
+
w.current?.createdAt ? new Date(w.current.createdAt).toLocaleString() : "-"
|
|
288
288
|
] })
|
|
289
289
|
] })
|
|
290
290
|
]
|
|
291
291
|
}
|
|
292
292
|
),
|
|
293
293
|
/* @__PURE__ */ e(
|
|
294
|
-
|
|
294
|
+
ee,
|
|
295
295
|
{
|
|
296
|
-
showConfirmation:
|
|
297
|
-
setShowConfirmation:
|
|
298
|
-
action:
|
|
296
|
+
showConfirmation: ne,
|
|
297
|
+
setShowConfirmation: J,
|
|
298
|
+
action: ue,
|
|
299
299
|
customStrings: {
|
|
300
300
|
title: "Delete memories",
|
|
301
301
|
confirmAction: "Delete all",
|
|
302
302
|
cancelAction: "Cancel"
|
|
303
303
|
},
|
|
304
|
-
children: /* @__PURE__ */ e("p", { className: "m-0", children:
|
|
304
|
+
children: /* @__PURE__ */ e("p", { className: "m-0", children: n === "active" ? /* @__PURE__ */ r(T, { children: [
|
|
305
305
|
"This will permanently delete all ",
|
|
306
306
|
/* @__PURE__ */ e("em", { children: "active memories" }),
|
|
307
307
|
" for this user. This action cannot be undone."
|
|
308
|
-
] }) : /* @__PURE__ */ r(
|
|
308
|
+
] }) : /* @__PURE__ */ r(T, { children: [
|
|
309
309
|
"This will permanently delete all ",
|
|
310
310
|
/* @__PURE__ */ e("em", { children: "expired memories" }),
|
|
311
311
|
" for this user. This action cannot be undone."
|
|
@@ -313,57 +313,57 @@ const Fe = ({
|
|
|
313
313
|
}
|
|
314
314
|
),
|
|
315
315
|
/* @__PURE__ */ e(
|
|
316
|
-
|
|
316
|
+
le,
|
|
317
317
|
{
|
|
318
|
-
open:
|
|
319
|
-
onOpenChange: (t) =>
|
|
318
|
+
open: b,
|
|
319
|
+
onOpenChange: (t) => k(t),
|
|
320
320
|
title: "User Memories",
|
|
321
321
|
animation: !0,
|
|
322
322
|
animationType: "fade",
|
|
323
323
|
blurEffect: "large",
|
|
324
324
|
initialFocus: o,
|
|
325
|
-
footer: /* @__PURE__ */ r(
|
|
326
|
-
/* @__PURE__ */ e(
|
|
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
327
|
se,
|
|
328
328
|
{
|
|
329
|
-
onOpenChange:
|
|
329
|
+
onOpenChange: k,
|
|
330
330
|
label: "Close",
|
|
331
331
|
ref: o
|
|
332
332
|
}
|
|
333
333
|
) }),
|
|
334
|
-
/* @__PURE__ */ e(
|
|
335
|
-
|
|
334
|
+
/* @__PURE__ */ e("div", { className: "box-border max-w-full basis-auto", children: /* @__PURE__ */ e(
|
|
335
|
+
L,
|
|
336
336
|
{
|
|
337
337
|
mode: "dark",
|
|
338
338
|
focusMode: "light",
|
|
339
339
|
variant: "danger",
|
|
340
|
-
disabled: (
|
|
341
|
-
onClick:
|
|
340
|
+
disabled: (n === "active" ? X.isPending : V.isPending) || (n === "active" ? (v?.total ?? 0) === 0 : (f?.total ?? 0) === 0),
|
|
341
|
+
onClick: pe,
|
|
342
342
|
children: "Delete All"
|
|
343
343
|
}
|
|
344
344
|
) })
|
|
345
345
|
] }),
|
|
346
346
|
children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-4 @container/editmemoriespanel", children: [
|
|
347
|
-
/* @__PURE__ */ r(
|
|
348
|
-
/* @__PURE__ */ e(
|
|
349
|
-
|
|
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
350
|
{
|
|
351
351
|
focusMode: "light",
|
|
352
|
-
mode:
|
|
352
|
+
mode: n === "active" ? "light" : "dark",
|
|
353
353
|
size: "small",
|
|
354
354
|
noBorder: !0,
|
|
355
|
-
onClick: () =>
|
|
355
|
+
onClick: () => E("active"),
|
|
356
356
|
children: "Active Memories"
|
|
357
357
|
}
|
|
358
358
|
) }),
|
|
359
|
-
/* @__PURE__ */ e(
|
|
360
|
-
|
|
359
|
+
/* @__PURE__ */ e("div", { className: "box-border max-w-full basis-auto", children: /* @__PURE__ */ e(
|
|
360
|
+
L,
|
|
361
361
|
{
|
|
362
362
|
focusMode: "light",
|
|
363
|
-
mode:
|
|
363
|
+
mode: n === "expired" ? "light" : "dark",
|
|
364
364
|
size: "small",
|
|
365
365
|
noBorder: !0,
|
|
366
|
-
onClick: () =>
|
|
366
|
+
onClick: () => E("expired"),
|
|
367
367
|
children: "Expired Memories"
|
|
368
368
|
}
|
|
369
369
|
) })
|
|
@@ -371,39 +371,39 @@ const Fe = ({
|
|
|
371
371
|
/* @__PURE__ */ e(
|
|
372
372
|
"div",
|
|
373
373
|
{
|
|
374
|
-
className:
|
|
374
|
+
className: A(
|
|
375
375
|
"flex flex-col sm:flex-row",
|
|
376
376
|
"max-h-[75vh]",
|
|
377
377
|
"sm:max-h-[75vh]",
|
|
378
378
|
"min-h-[70vh]"
|
|
379
379
|
),
|
|
380
|
-
children:
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
!
|
|
384
|
-
|
|
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
385
|
{
|
|
386
386
|
stickyHeader: !0,
|
|
387
387
|
stickyFooter: !0,
|
|
388
388
|
compact: !0,
|
|
389
389
|
mode: "alt-system",
|
|
390
|
-
caption:
|
|
390
|
+
caption: Q(v),
|
|
391
391
|
children: [
|
|
392
|
-
/* @__PURE__ */ e(
|
|
393
|
-
/* @__PURE__ */ e(
|
|
394
|
-
/* @__PURE__ */ e(
|
|
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
395
|
/* @__PURE__ */ e(
|
|
396
|
-
|
|
396
|
+
I,
|
|
397
397
|
{
|
|
398
398
|
focusMode: "system",
|
|
399
399
|
buttonClassName: "text-xs sm:text-sm",
|
|
400
400
|
cellId: "createdAt",
|
|
401
401
|
align: "left",
|
|
402
|
-
sortDirection:
|
|
403
|
-
sortedCell:
|
|
402
|
+
sortDirection: u,
|
|
403
|
+
sortedCell: h,
|
|
404
404
|
onClick: () => {
|
|
405
|
-
|
|
406
|
-
const i = t ===
|
|
405
|
+
M("createdAt"), C("createdAt"), l((t) => {
|
|
406
|
+
const i = t === s.ASC ? s.DESC : s.ASC;
|
|
407
407
|
return p(i), i;
|
|
408
408
|
});
|
|
409
409
|
},
|
|
@@ -411,47 +411,47 @@ const Fe = ({
|
|
|
411
411
|
}
|
|
412
412
|
),
|
|
413
413
|
/* @__PURE__ */ e(
|
|
414
|
-
|
|
414
|
+
I,
|
|
415
415
|
{
|
|
416
416
|
focusMode: "system",
|
|
417
417
|
buttonClassName: "text-xs sm:text-sm",
|
|
418
418
|
cellId: "expiresAt",
|
|
419
419
|
align: "left",
|
|
420
|
-
sortDirection:
|
|
421
|
-
sortedCell:
|
|
420
|
+
sortDirection: u,
|
|
421
|
+
sortedCell: h,
|
|
422
422
|
onClick: () => {
|
|
423
|
-
|
|
424
|
-
const i = t ===
|
|
423
|
+
M("expiresAt"), C("expiresAt"), l((t) => {
|
|
424
|
+
const i = t === s.ASC ? s.DESC : s.ASC;
|
|
425
425
|
return p(i), i;
|
|
426
426
|
});
|
|
427
427
|
},
|
|
428
428
|
children: "Expires"
|
|
429
429
|
}
|
|
430
430
|
),
|
|
431
|
-
/* @__PURE__ */ e(
|
|
431
|
+
/* @__PURE__ */ e(a, { align: "right", children: "Actions" })
|
|
432
432
|
] }) }),
|
|
433
|
-
/* @__PURE__ */ e(
|
|
434
|
-
if (
|
|
435
|
-
const
|
|
436
|
-
return
|
|
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
437
|
}
|
|
438
|
-
if (
|
|
439
|
-
const
|
|
440
|
-
return
|
|
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
441
|
}
|
|
442
442
|
return 0;
|
|
443
|
-
}).map((t, i) => /* @__PURE__ */ r(
|
|
443
|
+
}).map((t, i) => /* @__PURE__ */ r(S, { children: [
|
|
444
444
|
/* @__PURE__ */ e(
|
|
445
|
-
|
|
445
|
+
a,
|
|
446
446
|
{
|
|
447
|
-
className:
|
|
447
|
+
className: A("dark:text-copy-medium"),
|
|
448
448
|
children: i + 1
|
|
449
449
|
}
|
|
450
450
|
),
|
|
451
451
|
/* @__PURE__ */ e(
|
|
452
|
-
|
|
452
|
+
a,
|
|
453
453
|
{
|
|
454
|
-
className:
|
|
454
|
+
className: A(
|
|
455
455
|
"dark:text-copy-lighter",
|
|
456
456
|
"max-w-25 sm:max-w-100",
|
|
457
457
|
"text-xs sm:text-sm"
|
|
@@ -463,9 +463,9 @@ const Fe = ({
|
|
|
463
463
|
}
|
|
464
464
|
),
|
|
465
465
|
/* @__PURE__ */ e(
|
|
466
|
-
|
|
466
|
+
a,
|
|
467
467
|
{
|
|
468
|
-
className:
|
|
468
|
+
className: A(
|
|
469
469
|
"dark:text-copy-medium",
|
|
470
470
|
"sm:whitespace-nowrap text-xs sm:text-sm max-w-20 sm:max-w-none"
|
|
471
471
|
),
|
|
@@ -473,9 +473,9 @@ const Fe = ({
|
|
|
473
473
|
}
|
|
474
474
|
),
|
|
475
475
|
/* @__PURE__ */ e(
|
|
476
|
-
|
|
476
|
+
a,
|
|
477
477
|
{
|
|
478
|
-
className:
|
|
478
|
+
className: A(
|
|
479
479
|
"dark:text-copy-medium",
|
|
480
480
|
"sm:whitespace-nowrap text-xs sm:text-sm"
|
|
481
481
|
),
|
|
@@ -483,89 +483,82 @@ const Fe = ({
|
|
|
483
483
|
}
|
|
484
484
|
),
|
|
485
485
|
/* @__PURE__ */ e(
|
|
486
|
-
|
|
486
|
+
a,
|
|
487
487
|
{
|
|
488
488
|
className: "align-top border-l border-table-light dark:border-table-dark",
|
|
489
489
|
align: "right",
|
|
490
|
-
children: /* @__PURE__ */ r(
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
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,
|
|
498
499
|
{
|
|
500
|
+
focusMode: "system",
|
|
501
|
+
noBorder: !0,
|
|
499
502
|
label: "Edit memory",
|
|
500
|
-
|
|
501
|
-
placement: "top",
|
|
502
|
-
trigger: /* @__PURE__ */ e(
|
|
503
|
-
G,
|
|
504
|
-
{
|
|
505
|
-
focusMode: "system",
|
|
506
|
-
noBorder: !0,
|
|
507
|
-
label: "Edit memory",
|
|
508
|
-
variant: "primary",
|
|
509
|
-
disabled: P.isPending,
|
|
510
|
-
onClick: () => pe(
|
|
511
|
-
t.memoryId,
|
|
512
|
-
t.description || t.text,
|
|
513
|
-
t.categories,
|
|
514
|
-
t.quote,
|
|
515
|
-
t.canonicalText,
|
|
516
|
-
t.confidence,
|
|
517
|
-
t.status,
|
|
518
|
-
t.sourceType,
|
|
519
|
-
t.expiration,
|
|
520
|
-
t.expiresAt
|
|
521
|
-
),
|
|
522
|
-
children: /* @__PURE__ */ e(Le, { size: "size-3", monotone: !0 })
|
|
523
|
-
}
|
|
524
|
-
)
|
|
525
|
-
}
|
|
526
|
-
) }),
|
|
527
|
-
/* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(
|
|
528
|
-
ze,
|
|
529
|
-
{
|
|
530
|
-
label: "Delete memory",
|
|
503
|
+
variant: "primary",
|
|
531
504
|
disabled: B.isPending,
|
|
532
|
-
onClick: () =>
|
|
505
|
+
onClick: () => me(
|
|
533
506
|
t.memoryId,
|
|
534
|
-
t.text,
|
|
535
|
-
t.
|
|
536
|
-
t.
|
|
537
|
-
|
|
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 })
|
|
538
518
|
}
|
|
539
|
-
)
|
|
540
|
-
|
|
541
|
-
}
|
|
542
|
-
|
|
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
|
+
] })
|
|
543
536
|
}
|
|
544
537
|
)
|
|
545
538
|
] }, t.memoryId)) }),
|
|
546
|
-
/* @__PURE__ */ e(
|
|
539
|
+
/* @__PURE__ */ e(oe, { children: /* @__PURE__ */ e(S, { children: /* @__PURE__ */ e(a, { colSpan: 5, children: Q(v) }) }) })
|
|
547
540
|
]
|
|
548
541
|
}
|
|
549
542
|
) : /* @__PURE__ */ e("p", { className: "m-0 italic opacity-70", children: "No memories stored." }))
|
|
550
|
-
] }) : /* @__PURE__ */ r(
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
!
|
|
554
|
-
/* @__PURE__ */ e(
|
|
555
|
-
/* @__PURE__ */ e(
|
|
556
|
-
/* @__PURE__ */ e(
|
|
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" }),
|
|
557
550
|
/* @__PURE__ */ e(
|
|
558
|
-
|
|
551
|
+
I,
|
|
559
552
|
{
|
|
560
553
|
focusMode: "system",
|
|
561
554
|
buttonClassName: "text-xs sm:text-sm",
|
|
562
555
|
cellId: "createdAt",
|
|
563
556
|
align: "left",
|
|
564
|
-
sortDirection:
|
|
565
|
-
sortedCell:
|
|
557
|
+
sortDirection: u,
|
|
558
|
+
sortedCell: h,
|
|
566
559
|
onClick: () => {
|
|
567
|
-
|
|
568
|
-
const i = t ===
|
|
560
|
+
M("createdAt"), C("createdAt"), l((t) => {
|
|
561
|
+
const i = t === s.ASC ? s.DESC : s.ASC;
|
|
569
562
|
return p(i), i;
|
|
570
563
|
});
|
|
571
564
|
},
|
|
@@ -573,47 +566,47 @@ const Fe = ({
|
|
|
573
566
|
}
|
|
574
567
|
),
|
|
575
568
|
/* @__PURE__ */ e(
|
|
576
|
-
|
|
569
|
+
I,
|
|
577
570
|
{
|
|
578
571
|
focusMode: "system",
|
|
579
572
|
buttonClassName: "text-xs sm:text-sm",
|
|
580
573
|
cellId: "expiresAt",
|
|
581
574
|
align: "left",
|
|
582
|
-
sortDirection:
|
|
583
|
-
sortedCell:
|
|
575
|
+
sortDirection: u,
|
|
576
|
+
sortedCell: h,
|
|
584
577
|
onClick: () => {
|
|
585
|
-
|
|
586
|
-
const i = t ===
|
|
578
|
+
M("expiresAt"), C("expiresAt"), l((t) => {
|
|
579
|
+
const i = t === s.ASC ? s.DESC : s.ASC;
|
|
587
580
|
return p(i), i;
|
|
588
581
|
});
|
|
589
582
|
},
|
|
590
583
|
children: "Expired"
|
|
591
584
|
}
|
|
592
585
|
),
|
|
593
|
-
/* @__PURE__ */ e(
|
|
586
|
+
/* @__PURE__ */ e(a, { align: "right", children: "Actions" })
|
|
594
587
|
] }) }),
|
|
595
|
-
/* @__PURE__ */ e(
|
|
596
|
-
if (
|
|
597
|
-
const
|
|
598
|
-
return
|
|
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;
|
|
599
592
|
}
|
|
600
|
-
if (
|
|
601
|
-
const
|
|
602
|
-
return
|
|
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;
|
|
603
596
|
}
|
|
604
597
|
return 0;
|
|
605
|
-
}).map((t, i) => /* @__PURE__ */ r(
|
|
598
|
+
}).map((t, i) => /* @__PURE__ */ r(S, { children: [
|
|
606
599
|
/* @__PURE__ */ e(
|
|
607
|
-
|
|
600
|
+
a,
|
|
608
601
|
{
|
|
609
|
-
className:
|
|
602
|
+
className: A("dark:text-copy-medium"),
|
|
610
603
|
children: i + 1
|
|
611
604
|
}
|
|
612
605
|
),
|
|
613
606
|
/* @__PURE__ */ e(
|
|
614
|
-
|
|
607
|
+
a,
|
|
615
608
|
{
|
|
616
|
-
className:
|
|
609
|
+
className: A(
|
|
617
610
|
"dark:text-copy-lighter",
|
|
618
611
|
"max-w-25 sm:max-w-100",
|
|
619
612
|
"text-xs sm:text-sm"
|
|
@@ -625,9 +618,9 @@ const Fe = ({
|
|
|
625
618
|
}
|
|
626
619
|
),
|
|
627
620
|
/* @__PURE__ */ e(
|
|
628
|
-
|
|
621
|
+
a,
|
|
629
622
|
{
|
|
630
|
-
className:
|
|
623
|
+
className: A(
|
|
631
624
|
"dark:text-copy-medium",
|
|
632
625
|
"sm:whitespace-nowrap text-xs sm:text-sm max-w-20 sm:max-w-none"
|
|
633
626
|
),
|
|
@@ -635,9 +628,9 @@ const Fe = ({
|
|
|
635
628
|
}
|
|
636
629
|
),
|
|
637
630
|
/* @__PURE__ */ e(
|
|
638
|
-
|
|
631
|
+
a,
|
|
639
632
|
{
|
|
640
|
-
className:
|
|
633
|
+
className: A(
|
|
641
634
|
"dark:text-copy-medium",
|
|
642
635
|
"sm:whitespace-nowrap text-xs sm:text-sm"
|
|
643
636
|
),
|
|
@@ -645,87 +638,80 @@ const Fe = ({
|
|
|
645
638
|
}
|
|
646
639
|
),
|
|
647
640
|
/* @__PURE__ */ e(
|
|
648
|
-
|
|
641
|
+
a,
|
|
649
642
|
{
|
|
650
643
|
className: "align-top border-l border-table-light dark:border-table-dark",
|
|
651
644
|
align: "right",
|
|
652
|
-
children: /* @__PURE__ */ r(
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
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,
|
|
660
654
|
{
|
|
655
|
+
focusMode: "system",
|
|
656
|
+
noBorder: !0,
|
|
661
657
|
label: "Restore memory",
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
disabled: J.isPending,
|
|
672
|
-
onClick: () => {
|
|
673
|
-
d && J.mutate({
|
|
674
|
-
user: d,
|
|
675
|
-
memoryId: t.memoryId
|
|
676
|
-
});
|
|
677
|
-
},
|
|
678
|
-
children: /* @__PURE__ */ e(Oe, { size: "size-3", monotone: !0 })
|
|
679
|
-
}
|
|
680
|
-
)
|
|
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 })
|
|
681
667
|
}
|
|
682
|
-
)
|
|
683
|
-
|
|
684
|
-
|
|
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,
|
|
685
679
|
{
|
|
680
|
+
focusMode: "system",
|
|
681
|
+
noBorder: !0,
|
|
686
682
|
label: "Delete memory",
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
disabled: B.isPending,
|
|
698
|
-
onClick: () => W(
|
|
699
|
-
t.memoryId,
|
|
700
|
-
t.text,
|
|
701
|
-
t.description,
|
|
702
|
-
t.createdAt
|
|
703
|
-
),
|
|
704
|
-
children: /* @__PURE__ */ e(_e, { size: "size-3", monotone: !0 })
|
|
705
|
-
}
|
|
706
|
-
)
|
|
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 })
|
|
707
693
|
}
|
|
708
|
-
)
|
|
709
|
-
|
|
710
|
-
}
|
|
711
|
-
)
|
|
694
|
+
)
|
|
695
|
+
}
|
|
696
|
+
) })
|
|
697
|
+
] })
|
|
712
698
|
}
|
|
713
699
|
)
|
|
714
700
|
] }, t.memoryId)) }),
|
|
715
|
-
/* @__PURE__ */ e(
|
|
716
|
-
|
|
701
|
+
/* @__PURE__ */ e(oe, { children: /* @__PURE__ */ e(S, { children: /* @__PURE__ */ r(a, { colSpan: 5, children: [
|
|
702
|
+
f.total,
|
|
717
703
|
" expired memor",
|
|
718
|
-
|
|
719
|
-
|
|
704
|
+
f.total === 1 ? "y" : "ies",
|
|
705
|
+
f.totalTokenUsage !== void 0 && f.totalTokenUsage > 0 && /* @__PURE__ */ r(T, { children: [
|
|
720
706
|
" ",
|
|
721
707
|
"(approximately",
|
|
722
708
|
" ",
|
|
723
709
|
Math.round(
|
|
724
|
-
|
|
710
|
+
f.totalTokenUsage
|
|
725
711
|
).toLocaleString(),
|
|
726
712
|
" ",
|
|
727
713
|
"token",
|
|
728
|
-
Math.round(
|
|
714
|
+
Math.round(f.totalTokenUsage) === 1 ? "" : "s",
|
|
729
715
|
")"
|
|
730
716
|
] })
|
|
731
717
|
] }) }) })
|
|
@@ -739,5 +725,5 @@ const Fe = ({
|
|
|
739
725
|
] });
|
|
740
726
|
};
|
|
741
727
|
export {
|
|
742
|
-
|
|
728
|
+
Ve as default
|
|
743
729
|
};
|