@omg-dev/app 0.5.0 → 0.6.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-lib/{ChangelogPage-8lbvM9Pz.js → ChangelogPage-Cjj_DiYL.js} +57 -1
- package/dist-lib/{File-B-qYa2zY.js → File-DQRr5F_e.js} +1761 -1826
- package/dist-lib/FileEditor-BrI3dfcp.js +6895 -0
- package/dist-lib/FileTreePane-J8P-OiHb.js +8413 -0
- package/dist-lib/{FileViewer-Clmf04v1.js → FileViewer-DRrfus7c.js} +1 -1
- package/dist-lib/{SessionFilesPanel-BKcTU57t.js → SessionFilesPanel-DxVJ43fE.js} +69 -69
- package/dist-lib/{TermView-gazV6UMU.js → TermView-B4V-DyD-.js} +521 -530
- package/dist-lib/{abnfDiagram-VRR7QNED-Chn1Z_p9.js → abnfDiagram-VRR7QNED-CiXfOnAu.js} +4 -4
- package/dist-lib/{arc-B652oHQ-.js → arc-QOMNKQA5.js} +1 -1
- package/dist-lib/{architectureDiagram-ZJ3FMSHR-CMatArpz.js → architectureDiagram-ZJ3FMSHR-BcFBTmfD.js} +2059 -2064
- package/dist-lib/{blockDiagram-677ZJIJ3-CEOPfI9A.js → blockDiagram-677ZJIJ3-Qj8-RIV3.js} +920 -925
- package/dist-lib/{c4Diagram-LMCZKHZV-DcUHrESL.js → c4Diagram-LMCZKHZV-BpinEmj4.js} +598 -593
- package/dist-lib/{channel-B5lJFbed.js → channel-D6YHMmF7.js} +1 -1
- package/dist-lib/{chat-engine-83mwx0z2.js → chat-engine-CUiDTHFP.js} +1173 -1218
- package/dist-lib/chunk-2Q5K7J3B-CFSi414U.js +18 -0
- package/dist-lib/{chunk-32BRIVSS-IYmNSvH8.js → chunk-32BRIVSS-DvywQiCk.js} +1 -1
- package/dist-lib/{chunk-5VM5RSS4-DO2g-xIj.js → chunk-5VM5RSS4-xd6XuI9Q.js} +1 -1
- package/dist-lib/{chunk-BO2N2NFS-kYiI5SD9.js → chunk-BO2N2NFS-BbJdm-59.js} +4892 -4903
- package/dist-lib/{chunk-EX3LRPZG-N96wfks9.js → chunk-EX3LRPZG-BLDKx-Yg.js} +507 -514
- package/dist-lib/chunk-JWPE2WC7-DnwG7Xzp.js +8 -0
- package/dist-lib/chunk-MOJQB5TN-BrENeFT5.js +670 -0
- package/dist-lib/chunk-RYQCIY6F-I-J4fVFd.js +313 -0
- package/dist-lib/{chunk-V7JOEXUC-DQwf2vkP.js → chunk-V7JOEXUC-Bkakcs1-.js} +458 -453
- package/dist-lib/chunk-VR4S4FIN-BDq3jZ0m.js +19 -0
- package/dist-lib/{chunk-XXDRQBXY-Ccv4aRcn.js → chunk-XXDRQBXY-DRKeYnrF.js} +1 -1
- package/dist-lib/{classDiagram-v2-EOCWNBFH-DOn-rhuL.js → classDiagram-OUVF2IWQ-DISUfvR5.js} +2 -2
- package/dist-lib/{classDiagram-OUVF2IWQ-DOn-rhuL.js → classDiagram-v2-EOCWNBFH-DISUfvR5.js} +2 -2
- package/dist-lib/{coding-agents-page-8Nf-IuE2.js → coding-agents-page-DtxZ0nbQ.js} +152 -131
- package/dist-lib/computer-page-DIJeFOZz.js +8860 -0
- package/dist-lib/{cose-bilkent-JH36ORCC-C-tACTrT.js → cose-bilkent-JH36ORCC-DCfmoChv.js} +281 -281
- package/dist-lib/{create-BrnHvSDE.js → create-CBk9uwJH.js} +2 -2
- package/dist-lib/cynefin-VYW2F7L2-XAY3mHv8.js +24430 -0
- package/dist-lib/{cynefinDiagram-TSTJHNR4-Be7CamD2.js → cynefinDiagram-TSTJHNR4-CrgvPEr1.js} +3 -3
- package/dist-lib/{cytoscape.esm-B0ledd6M.js → cytoscape.esm-BB6Ga9He.js} +3 -3
- package/dist-lib/dagre-VKFMJZFB-CE5k06mJ.js +343 -0
- package/dist-lib/{diagram-FQU43EPY-Jg12ow4Z.js → diagram-FQU43EPY-gOcCiJEN.js} +136 -139
- package/dist-lib/diagram-G47NLZAW-BVJLfRsd.js +531 -0
- package/dist-lib/diagram-NH7WQ7WH-u6QnHasL.js +145 -0
- package/dist-lib/diagram-OA4YK3LP-D4Kcl3uM.js +350 -0
- package/dist-lib/{diagram-WEI45ONY-D1kKPOc_.js → diagram-WEI45ONY-6a__oIb0.js} +38 -42
- package/dist-lib/{ebnfDiagram-CCIWWBDH-BhQWrGMc.js → ebnfDiagram-CCIWWBDH-PXSrB6lG.js} +4 -4
- package/dist-lib/{embedded-BmrQsEvQ.js → embedded-PUsgcSTE.js} +13043 -13082
- package/dist-lib/{engine-compile-BeDRSL6Y.js → engine-compile-D_stzVMa.js} +2939 -2991
- package/dist-lib/{erDiagram-Q63AITRT-D2q6Nmwa.js → erDiagram-Q63AITRT-BbsttUCs.js} +286 -284
- package/dist-lib/flowDiagram-23GEKE2U-CX5x3zVA.js +1641 -0
- package/dist-lib/{ganttDiagram-NO4QXBWP-C_Lj-cJB.js → ganttDiagram-NO4QXBWP-Bq0aSPs8.js} +2 -2
- package/dist-lib/gitGraphDiagram-IHSO6WYX-BjAezjIv.js +815 -0
- package/dist-lib/{graph-B68L3K2T.js → graph-DAHC4kPm.js} +2 -2
- package/dist-lib/{highlighted-body-OFNGDK62-C2DGVKV8.js → highlighted-body-OFNGDK62-DWhG_ijx.js} +1 -1
- package/dist-lib/index-B0neMIbR.js +16520 -0
- package/dist-lib/index-BBC0E3Qg.js +4994 -0
- package/dist-lib/{index-Dtkd4mEk.js → index-CE7H8LiZ.js} +2 -2
- package/dist-lib/{index-DWkBvb-9.js → index-FgVvPpIY.js} +2 -2
- package/dist-lib/index.js +1 -1
- package/dist-lib/{infoDiagram-FWYZ7A6U-BbUkT0KS.js → infoDiagram-FWYZ7A6U-Bo_FNR91.js} +2 -2
- package/dist-lib/ishikawaDiagram-FXEZZL3T-C5bGD-Eb.js +624 -0
- package/dist-lib/{journeyDiagram-5HDEW3XC-CgykmVSC.js → journeyDiagram-5HDEW3XC-C8qM7SxF.js} +4 -4
- package/dist-lib/kanban-definition-HUTT4EX6-C-EK5Puz.js +724 -0
- package/dist-lib/{katex-jHfnQmlp.js → katex-DoRnZ_sp.js} +1 -1
- package/dist-lib/{layout-BGrtsiRL.js → layout-DBbo_M5I.js} +2 -2
- package/dist-lib/{linear-B5ZSwawJ.js → linear-zGzX0-I0.js} +1 -1
- package/dist-lib/{map-hbfFlSln.js → map-DRdzG8Ho.js} +1 -1
- package/dist-lib/mermaid-GHXKKRXX-hOE9C3qW.js +4 -0
- package/dist-lib/{mindmap-definition-LN4V7U3C-CfhfeEht.js → mindmap-definition-LN4V7U3C-DlVCRx6k.js} +310 -311
- package/dist-lib/{pegDiagram-2B236MQR-CYDAJHPF.js → pegDiagram-2B236MQR-DrKNikeG.js} +4 -4
- package/dist-lib/{pieDiagram-ENE6RG2P-udKxQm4p.js → pieDiagram-ENE6RG2P-Fm_jc0HL.js} +83 -84
- package/dist-lib/quadrantDiagram-ABIIQ3AL-zDRY0VtB.js +1029 -0
- package/dist-lib/{railroadDiagram-RFXS5EU6-q0Svkmuy.js → railroadDiagram-RFXS5EU6-BQuFX39y.js} +4 -4
- package/dist-lib/{requirementDiagram-TGXJPOKE-tNxRI1gc.js → requirementDiagram-TGXJPOKE-BWwBQZXn.js} +269 -268
- package/dist-lib/{resume-session-sheet-Dr_81Gfm.js → resume-session-sheet-DTe_2QtJ.js} +2 -3
- package/dist-lib/sankeyDiagram-HTMAVEWB-BjRyuB6L.js +859 -0
- package/dist-lib/{sequenceDiagram-DBY2YBRQ-Dvl2_CXL.js → sequenceDiagram-DBY2YBRQ-69pcw_2M.js} +892 -899
- package/dist-lib/{session-token-usage-CGhHZ3lT.js → session-token-usage-DY4vFlfs.js} +82 -83
- package/dist-lib/{shadow-text-size-CBCTdbYU.js → shadow-text-size-smWA4wIU.js} +1 -2
- package/dist-lib/{shipped-page-p3oulUiM.js → shipped-page-B-ruG8li.js} +233 -236
- package/dist-lib/sizeCapture-X5ZJPWSS-DqkV8s1N.js +46 -0
- package/dist-lib/{stateDiagram-2N3HPSRC-CnWB7HvU.js → stateDiagram-2N3HPSRC-0vE3REl_.js} +4 -4
- package/dist-lib/{stateDiagram-v2-6OUMAXLB-DnZ0UI2p.js → stateDiagram-v2-6OUMAXLB-u_56Obsh.js} +2 -2
- package/dist-lib/{streamdown-response-Dbn0PKUH.js → streamdown-response-BQy3geXs.js} +290 -297
- package/dist-lib/styles.css +1 -1
- package/dist-lib/swimlanes-5IMT3BWC-H0raIBd1.js +5332 -0
- package/dist-lib/{swimlanesDiagram-G3AALYLV-CKyOeqF_.js → swimlanesDiagram-G3AALYLV-By52HaDu.js} +2 -2
- package/dist-lib/timeline-definition-FHXFAJF6-h1LLYUQk.js +1055 -0
- package/dist-lib/vennDiagram-L72KCM5P-B4wDw_Kh.js +1578 -0
- package/dist-lib/wardleyDiagram-EHGQE667-DLMBGiwD.js +678 -0
- package/dist-lib/{xychartDiagram-FW5EYKEG-m3s7caPv.js → xychartDiagram-FW5EYKEG-BHvf5Noj.js} +526 -496
- package/package.json +4 -3
- package/dist-lib/FileEditor-BIz0qCyW.js +0 -6892
- package/dist-lib/FileTreePane-BG2k7gTc.js +0 -8422
- package/dist-lib/chunk-2Q5K7J3B-Ex8Ly28R.js +0 -15
- package/dist-lib/chunk-JWPE2WC7-DFPBClX_.js +0 -9
- package/dist-lib/chunk-MOJQB5TN-dusfI9ob.js +0 -664
- package/dist-lib/chunk-RYQCIY6F-fkeERzIG.js +0 -315
- package/dist-lib/chunk-VR4S4FIN-hOZG7eF3.js +0 -20
- package/dist-lib/cynefin-VYW2F7L2-DQXPWaog.js +0 -23853
- package/dist-lib/dagre-VKFMJZFB-BhCjK7XQ.js +0 -346
- package/dist-lib/diagram-G47NLZAW-C3_z2t6T.js +0 -530
- package/dist-lib/diagram-NH7WQ7WH-DUdK08IT.js +0 -143
- package/dist-lib/diagram-OA4YK3LP-TUUyRYY3.js +0 -353
- package/dist-lib/flowDiagram-23GEKE2U-DU3S3biU.js +0 -1645
- package/dist-lib/gitGraphDiagram-IHSO6WYX-CvGu0XAR.js +0 -828
- package/dist-lib/index-DcwavxA1.js +0 -5062
- package/dist-lib/index-JkCQXUYs.js +0 -16566
- package/dist-lib/ishikawaDiagram-FXEZZL3T-D_Y6Tuyb.js +0 -622
- package/dist-lib/kanban-definition-HUTT4EX6-CPFLTskY.js +0 -726
- package/dist-lib/mermaid-GHXKKRXX-Ox_2d3uB.js +0 -4
- package/dist-lib/quadrantDiagram-ABIIQ3AL-BmDmLczk.js +0 -1025
- package/dist-lib/sankeyDiagram-HTMAVEWB-B9Bl7f2P.js +0 -847
- package/dist-lib/sizeCapture-X5ZJPWSS-B1EeO3N9.js +0 -47
- package/dist-lib/swimlanes-5IMT3BWC-CvqDJcS9.js +0 -5353
- package/dist-lib/timeline-definition-FHXFAJF6-b15X0Oru.js +0 -1066
- package/dist-lib/vennDiagram-L72KCM5P-C4lh5m77.js +0 -1585
- package/dist-lib/wardleyDiagram-EHGQE667-Cev6fT_D.js +0 -684
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as f, useEffect as
|
|
3
|
-
import {
|
|
4
|
-
import { cn as
|
|
1
|
+
import { jsxs as o, jsx as r, Fragment as ce } from "react/jsx-runtime";
|
|
2
|
+
import { useState as f, useEffect as v, useRef as ue, useContext as _e, useMemo as $e } from "react";
|
|
3
|
+
import { z as ze, E as me, F as Se, H as _, I as fe, J as Te, N as Pe, O as je, B as Fe, L as he, Q as Ge, j as Q, C as Ye, R as Be, T as Ke, U as Ue, u as pe, p as He, V as Ve, a as C, W as N, Y as D, v as R, Z as X, _ as Je, $ as Qe, a0 as Xe, a1 as qe, m as Oe, a2 as We } from "./embedded-PUsgcSTE.js";
|
|
4
|
+
import { cn as $ } from "cnfast";
|
|
5
5
|
/**
|
|
6
6
|
* @license lucide-react v0.577.0 - ISC
|
|
7
7
|
*
|
|
8
8
|
* This source code is licensed under the ISC license.
|
|
9
9
|
* See the LICENSE file in the root directory of this source tree.
|
|
10
10
|
*/
|
|
11
|
-
const
|
|
11
|
+
const Ze = [
|
|
12
12
|
[
|
|
13
13
|
"path",
|
|
14
14
|
{
|
|
@@ -19,168 +19,168 @@ const Oe = [
|
|
|
19
19
|
["path", { d: "M7 11h10", key: "1twpyw" }],
|
|
20
20
|
["path", { d: "M7 15h6", key: "d9of3u" }],
|
|
21
21
|
["path", { d: "M7 7h8", key: "af5zfr" }]
|
|
22
|
-
], et = ze("message-square-text",
|
|
23
|
-
function
|
|
24
|
-
return `${tt}${
|
|
22
|
+
], et = ze("message-square-text", Ze), O = "lfg-notification-read-state", tt = "lfg_notification_reads_v1:";
|
|
23
|
+
function be(n) {
|
|
24
|
+
return `${tt}${n?.trim().toLowerCase() || "__device__"}`;
|
|
25
25
|
}
|
|
26
|
-
function rt(
|
|
27
|
-
if (!
|
|
28
|
-
const i =
|
|
29
|
-
return { through: c, ids: [...new Set(
|
|
26
|
+
function rt(n) {
|
|
27
|
+
if (!n || typeof n != "object") return null;
|
|
28
|
+
const i = n, c = typeof i.through == "number" && Number.isFinite(i.through) ? Math.max(0, i.through) : 0, l = Array.isArray(i.ids) ? i.ids.filter((u) => typeof u == "string").slice(-500) : [];
|
|
29
|
+
return { through: c, ids: [...new Set(l)] };
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function L(n) {
|
|
32
32
|
if (typeof window > "u") return null;
|
|
33
33
|
try {
|
|
34
|
-
return rt(JSON.parse(localStorage.getItem(
|
|
34
|
+
return rt(JSON.parse(localStorage.getItem(be(n)) ?? "null"));
|
|
35
35
|
} catch {
|
|
36
36
|
return null;
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
function
|
|
40
|
-
return typeof window > "u" || (localStorage.setItem(
|
|
39
|
+
function xe(n, i) {
|
|
40
|
+
return typeof window > "u" || (localStorage.setItem(be(n), JSON.stringify(i)), window.dispatchEvent(
|
|
41
41
|
new CustomEvent(O, {
|
|
42
|
-
detail: { identity:
|
|
42
|
+
detail: { identity: n?.trim().toLowerCase() || "__device__" }
|
|
43
43
|
})
|
|
44
44
|
)), i;
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
return `shipped:${
|
|
46
|
+
function z(n) {
|
|
47
|
+
return `shipped:${n.id}:${n.rev}`;
|
|
48
48
|
}
|
|
49
|
-
function
|
|
50
|
-
return
|
|
49
|
+
function q(n, i) {
|
|
50
|
+
return n ? i.ts > n.through && !n.ids.includes(i.id) : !1;
|
|
51
51
|
}
|
|
52
|
-
function st(
|
|
53
|
-
const c =
|
|
54
|
-
return c.ids.includes(i) ? c :
|
|
52
|
+
function st(n, i) {
|
|
53
|
+
const c = L(n) ?? { through: 0, ids: [] };
|
|
54
|
+
return c.ids.includes(i) ? c : xe(n, {
|
|
55
55
|
...c,
|
|
56
56
|
ids: [...c.ids, i].slice(-500)
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
|
-
function
|
|
60
|
-
const c =
|
|
61
|
-
return
|
|
59
|
+
function ge(n, i) {
|
|
60
|
+
const c = L(n) ?? { through: 0, ids: [] };
|
|
61
|
+
return xe(n, {
|
|
62
62
|
through: Math.max(c.through, i),
|
|
63
63
|
ids: c.ids
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
66
|
function nt({
|
|
67
|
-
path:
|
|
67
|
+
path: n,
|
|
68
68
|
cacheKey: i,
|
|
69
69
|
children: c
|
|
70
70
|
}) {
|
|
71
|
-
return /* @__PURE__ */
|
|
72
|
-
/* @__PURE__ */ r(Qe, { path:
|
|
71
|
+
return /* @__PURE__ */ o("div", { className: "relative h-32 w-full overflow-hidden bg-background", children: [
|
|
72
|
+
/* @__PURE__ */ r(Qe, { path: n, cacheKey: i, className: "h-full w-full" }),
|
|
73
73
|
c
|
|
74
74
|
] });
|
|
75
75
|
}
|
|
76
76
|
function at({
|
|
77
|
-
items:
|
|
77
|
+
items: n,
|
|
78
78
|
total: i,
|
|
79
79
|
onExpand: c
|
|
80
80
|
}) {
|
|
81
|
-
const
|
|
82
|
-
if (!
|
|
83
|
-
const
|
|
84
|
-
return /* @__PURE__ */
|
|
81
|
+
const l = n[0];
|
|
82
|
+
if (!l) return null;
|
|
83
|
+
const u = Math.max(0, i - 1);
|
|
84
|
+
return /* @__PURE__ */ o(
|
|
85
85
|
"button",
|
|
86
86
|
{
|
|
87
87
|
type: "button",
|
|
88
|
-
onClick: () => c
|
|
89
|
-
url:
|
|
90
|
-
kind:
|
|
91
|
-
caption:
|
|
92
|
-
name:
|
|
93
|
-
version:
|
|
94
|
-
cacheKey:
|
|
88
|
+
onClick: () => c?.({
|
|
89
|
+
url: l.url,
|
|
90
|
+
kind: l.kind,
|
|
91
|
+
caption: l.caption,
|
|
92
|
+
name: l.name,
|
|
93
|
+
version: l.version,
|
|
94
|
+
cacheKey: l.updatedAt
|
|
95
95
|
}),
|
|
96
|
-
"aria-label": `Open ${
|
|
97
|
-
title:
|
|
96
|
+
"aria-label": `Open ${l.caption || l.name}`,
|
|
97
|
+
title: l.caption || l.name,
|
|
98
98
|
className: "relative size-[52px] shrink-0 overflow-hidden rounded-lg border border-border/60 bg-muted transition-transform active:scale-[0.97]",
|
|
99
99
|
children: [
|
|
100
|
-
|
|
100
|
+
l.kind === "image" ? /* @__PURE__ */ r(
|
|
101
101
|
Xe,
|
|
102
102
|
{
|
|
103
|
-
path:
|
|
104
|
-
alt:
|
|
103
|
+
path: l.url,
|
|
104
|
+
alt: l.caption || l.name,
|
|
105
105
|
thumb: !0,
|
|
106
106
|
className: "size-full object-cover"
|
|
107
107
|
}
|
|
108
|
-
) :
|
|
108
|
+
) : l.kind === "html" ? (
|
|
109
109
|
// Deliberately an icon, not a live preview. A document scaled into a
|
|
110
110
|
// 52px box is two words of giant text — unreadable, and it costs a
|
|
111
111
|
// fetch + parse per row. The Artifacts page is where previews belong.
|
|
112
112
|
/* @__PURE__ */ r("span", { className: "flex size-full items-center justify-center bg-primary/10 text-primary", children: /* @__PURE__ */ r(qe, { className: "size-4" }) })
|
|
113
|
-
) : /* @__PURE__ */ r("span", { className: "flex size-full items-center justify-center bg-black/80 text-white/80", children: /* @__PURE__ */ r(
|
|
114
|
-
|
|
113
|
+
) : /* @__PURE__ */ r("span", { className: "flex size-full items-center justify-center bg-black/80 text-white/80", children: /* @__PURE__ */ r(Oe, { className: "size-4" }) }),
|
|
114
|
+
u > 0 ? /* @__PURE__ */ o("span", { className: "absolute inset-x-0 bottom-0 bg-black/55 py-0.5 text-center text-[9px] font-semibold text-white", children: [
|
|
115
115
|
"+",
|
|
116
|
-
|
|
116
|
+
u
|
|
117
117
|
] }) : null
|
|
118
118
|
]
|
|
119
119
|
}
|
|
120
120
|
);
|
|
121
121
|
}
|
|
122
|
-
function it(
|
|
122
|
+
function it(n, i) {
|
|
123
123
|
const c = (p) => {
|
|
124
|
-
const
|
|
125
|
-
return new Date(
|
|
126
|
-
},
|
|
127
|
-
if (
|
|
128
|
-
if (
|
|
129
|
-
const
|
|
130
|
-
return
|
|
124
|
+
const g = new Date(p);
|
|
125
|
+
return new Date(g.getFullYear(), g.getMonth(), g.getDate()).getTime();
|
|
126
|
+
}, l = Math.round((c(i) - c(n)) / 864e5);
|
|
127
|
+
if (l <= 0) return "Today";
|
|
128
|
+
if (l === 1) return "Yesterday";
|
|
129
|
+
const u = new Date(n);
|
|
130
|
+
return u.toLocaleDateString(void 0, {
|
|
131
131
|
month: "long",
|
|
132
132
|
day: "numeric",
|
|
133
|
-
...
|
|
133
|
+
...u.getFullYear() === new Date(i).getFullYear() ? {} : { year: "numeric" }
|
|
134
134
|
});
|
|
135
135
|
}
|
|
136
136
|
function ut({
|
|
137
|
-
onOpenSession:
|
|
137
|
+
onOpenSession: n,
|
|
138
138
|
onOpenArtifactSession: i,
|
|
139
139
|
onReviewSession: c,
|
|
140
|
-
liveSessionIds:
|
|
141
|
-
notificationIdentity:
|
|
140
|
+
liveSessionIds: l,
|
|
141
|
+
notificationIdentity: u,
|
|
142
142
|
artifactsOnly: p = !1,
|
|
143
|
-
active:
|
|
143
|
+
active: g = !0
|
|
144
144
|
}) {
|
|
145
|
-
const h = p ? "artifacts" : "feed",
|
|
146
|
-
() => p ? null :
|
|
147
|
-
), [
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
}, [
|
|
151
|
-
const [
|
|
152
|
-
|
|
153
|
-
h === "feed" &&
|
|
154
|
-
}, [
|
|
155
|
-
if (h !== "feed" ||
|
|
156
|
-
const e =
|
|
157
|
-
|
|
158
|
-
}, [
|
|
145
|
+
const h = p ? "artifacts" : "feed", S = p ? me(D) : null, T = p ? null : me(X), [m, P] = f(() => T?.items ?? null), [j, W] = f(() => T?.total ?? 0), [F, Z] = f(!1), [w, k] = f(
|
|
146
|
+
() => p ? null : L(u)
|
|
147
|
+
), [G, ee] = f(!1), [Y, te] = f(null), { questions: b, busy: ye, dismissAll: ve } = Se(), [B, M] = f(!1);
|
|
148
|
+
v(() => {
|
|
149
|
+
M(!1);
|
|
150
|
+
}, [b.length]);
|
|
151
|
+
const [y, A] = f(() => S?.items ?? null), [E, K] = f(() => S?.total ?? 0), [U, re] = f(!1), [se, ne] = f(null), [ae, ie] = f(null), oe = "&kind=html", I = ue(Math.max(_, S?.items.length ?? 0)), H = ue(Math.max(fe, T?.items.length ?? 0)), le = _e(Te), Ne = Pe();
|
|
152
|
+
v(() => {
|
|
153
|
+
h === "feed" && k(L(u));
|
|
154
|
+
}, [u, h]), v(() => {
|
|
155
|
+
if (h !== "feed" || m === null || w) return;
|
|
156
|
+
const e = m.reduce((t, d) => Math.max(t, d.ts), Date.now());
|
|
157
|
+
k(ge(u, e));
|
|
158
|
+
}, [u, w, m, h]), v(() => {
|
|
159
159
|
if (h !== "feed") return;
|
|
160
|
-
const e = () =>
|
|
160
|
+
const e = () => k(L(u));
|
|
161
161
|
return window.addEventListener("storage", e), window.addEventListener(O, e), () => {
|
|
162
162
|
window.removeEventListener("storage", e), window.removeEventListener(O, e);
|
|
163
163
|
};
|
|
164
|
-
}, [
|
|
164
|
+
}, [u, h]), v(() => {
|
|
165
165
|
if (h !== "artifacts") return;
|
|
166
166
|
let e = !0;
|
|
167
167
|
const t = async () => {
|
|
168
168
|
try {
|
|
169
|
-
const a = await
|
|
170
|
-
`/api/artifacts?limit=${
|
|
169
|
+
const a = await C(
|
|
170
|
+
`/api/artifacts?limit=${_}${oe}`,
|
|
171
171
|
{ cache: "no-store" }
|
|
172
172
|
);
|
|
173
173
|
if (!e) return;
|
|
174
|
-
const
|
|
175
|
-
|
|
176
|
-
const
|
|
177
|
-
return
|
|
178
|
-
}),
|
|
174
|
+
const s = Array.isArray(a.artifacts) ? a.artifacts : [], x = a.total ?? s.length;
|
|
175
|
+
A((Re) => {
|
|
176
|
+
const Le = new Set(s.map((J) => J.id)), Me = (Re ?? []).filter((J) => !Le.has(J.id)), V = [...s, ...Me];
|
|
177
|
+
return I.current = Math.max(_, V.length), N(D, V, x), V;
|
|
178
|
+
}), K(x);
|
|
179
179
|
} catch {
|
|
180
|
-
e &&
|
|
180
|
+
e && A((a) => a ?? []);
|
|
181
181
|
}
|
|
182
182
|
};
|
|
183
|
-
if (t(), !
|
|
183
|
+
if (t(), !g)
|
|
184
184
|
return () => {
|
|
185
185
|
e = !1;
|
|
186
186
|
};
|
|
@@ -188,182 +188,179 @@ function ut({
|
|
|
188
188
|
return () => {
|
|
189
189
|
e = !1, clearInterval(d);
|
|
190
190
|
};
|
|
191
|
-
}, [h,
|
|
192
|
-
const
|
|
193
|
-
if (!
|
|
194
|
-
|
|
191
|
+
}, [h, g]);
|
|
192
|
+
const we = async () => {
|
|
193
|
+
if (!U) {
|
|
194
|
+
re(!0);
|
|
195
195
|
try {
|
|
196
|
-
const e = await
|
|
197
|
-
`/api/artifacts?limit=${
|
|
196
|
+
const e = await C(
|
|
197
|
+
`/api/artifacts?limit=${_}&offset=${I.current}${oe}`,
|
|
198
198
|
{ cache: "no-store" }
|
|
199
199
|
);
|
|
200
|
-
|
|
201
|
-
const d = new Set((t ?? []).map((
|
|
202
|
-
return
|
|
203
|
-
}),
|
|
200
|
+
A((t) => {
|
|
201
|
+
const d = new Set((t ?? []).map((s) => s.id)), a = [...t ?? [], ...e.artifacts.filter((s) => !d.has(s.id))];
|
|
202
|
+
return I.current = a.length, N(D, a, e.total ?? E), a;
|
|
203
|
+
}), K((t) => e.total ?? t);
|
|
204
204
|
} catch {
|
|
205
205
|
} finally {
|
|
206
|
-
|
|
206
|
+
re(!1);
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
|
-
},
|
|
209
|
+
}, ke = async (e) => {
|
|
210
210
|
const t = e.title || e.caption || e.name;
|
|
211
|
-
if (await
|
|
211
|
+
if (await Ne.confirm({
|
|
212
212
|
title: `Delete ${t}?`,
|
|
213
213
|
description: "This permanently removes the artifact and stops its automatic refresh schedule.",
|
|
214
214
|
confirmLabel: "Delete artifact",
|
|
215
215
|
destructive: !0
|
|
216
216
|
})) {
|
|
217
|
-
|
|
217
|
+
ie(e.id);
|
|
218
218
|
try {
|
|
219
|
-
await
|
|
219
|
+
await C(
|
|
220
220
|
`/api/sessions/${encodeURIComponent(e.sessionId ?? "")}/artifacts/${encodeURIComponent(e.id)}`,
|
|
221
221
|
{
|
|
222
222
|
method: "DELETE",
|
|
223
223
|
headers: { "X-LFG-Session-ID": e.sessionId ?? "" }
|
|
224
224
|
}
|
|
225
|
-
),
|
|
226
|
-
const
|
|
227
|
-
return
|
|
228
|
-
}),
|
|
225
|
+
), A((a) => {
|
|
226
|
+
const s = a?.filter((x) => x.id !== e.id) ?? null;
|
|
227
|
+
return s && N(D, s, Math.max(0, E - 1)), s;
|
|
228
|
+
}), K((a) => Math.max(0, a - 1)), I.current = Math.max(0, I.current - 1), R.success("Artifact deleted");
|
|
229
229
|
} catch (a) {
|
|
230
|
-
|
|
230
|
+
R.error(a instanceof Error ? a.message : "Couldn't delete artifact");
|
|
231
231
|
} finally {
|
|
232
|
-
|
|
232
|
+
ie(null);
|
|
233
233
|
}
|
|
234
234
|
}
|
|
235
|
-
},
|
|
235
|
+
}, Ae = async (e) => {
|
|
236
236
|
if (!(!e.sessionId || e.refreshEnabled === void 0)) {
|
|
237
|
-
|
|
237
|
+
ne(e.id);
|
|
238
238
|
try {
|
|
239
|
-
const t = await
|
|
239
|
+
const t = await C(
|
|
240
240
|
`/api/sessions/${encodeURIComponent(e.sessionId)}/artifacts/html/${encodeURIComponent(e.id)}/refresh`,
|
|
241
241
|
{
|
|
242
242
|
method: "POST",
|
|
243
243
|
headers: { "X-LFG-Session-ID": e.sessionId }
|
|
244
244
|
}
|
|
245
245
|
);
|
|
246
|
-
|
|
247
|
-
const a =
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
})) ?? null;
|
|
259
|
-
return a && k(L, a, C), a;
|
|
260
|
-
}), M.success("Artifact refreshed");
|
|
246
|
+
A((d) => {
|
|
247
|
+
const a = d?.map((s) => s.id === e.id ? {
|
|
248
|
+
...s,
|
|
249
|
+
ts: t.artifact.updatedAt ?? s.ts,
|
|
250
|
+
version: t.artifact.version ?? s.version,
|
|
251
|
+
size: t.artifact.size ?? s.size,
|
|
252
|
+
lastRefreshedAt: t.artifact.refresh?.lastSuccessAt ?? s.lastRefreshedAt,
|
|
253
|
+
refreshStatus: t.artifact.refresh?.status ?? s.refreshStatus,
|
|
254
|
+
refreshEnabled: t.artifact.refresh?.enabled ?? s.refreshEnabled
|
|
255
|
+
} : s) ?? null;
|
|
256
|
+
return a && N(D, a, E), a;
|
|
257
|
+
}), R.success("Artifact refreshed");
|
|
261
258
|
} catch (t) {
|
|
262
|
-
|
|
259
|
+
R.error(t instanceof Error ? t.message : "Couldn't refresh artifact");
|
|
263
260
|
} finally {
|
|
264
|
-
|
|
261
|
+
ne(null);
|
|
265
262
|
}
|
|
266
263
|
}
|
|
267
264
|
};
|
|
268
|
-
|
|
269
|
-
if (!(h !== "feed" || !
|
|
270
|
-
return
|
|
265
|
+
v(() => {
|
|
266
|
+
if (!(h !== "feed" || !g))
|
|
267
|
+
return je((e) => {
|
|
271
268
|
if (!e.ok) {
|
|
272
|
-
P((t) => (t === null &&
|
|
269
|
+
P((t) => (t === null && te(e.error), t));
|
|
273
270
|
return;
|
|
274
271
|
}
|
|
275
272
|
P((t) => {
|
|
276
|
-
const d = new Set(e.posts.map((
|
|
277
|
-
return
|
|
278
|
-
}),
|
|
273
|
+
const d = new Set(e.posts.map((x) => x.id)), a = (t ?? []).filter((x) => !d.has(x.id)), s = [...e.posts, ...a];
|
|
274
|
+
return H.current = Math.max(We, s.length), N(X, s, e.total), s;
|
|
275
|
+
}), W(e.total), te(null);
|
|
279
276
|
});
|
|
280
|
-
}, [h,
|
|
281
|
-
const
|
|
282
|
-
if (!
|
|
283
|
-
|
|
277
|
+
}, [h, g]);
|
|
278
|
+
const Ee = async () => {
|
|
279
|
+
if (!F) {
|
|
280
|
+
Z(!0);
|
|
284
281
|
try {
|
|
285
|
-
const e = await
|
|
286
|
-
`/api/shipped?limit=${
|
|
282
|
+
const e = await C(
|
|
283
|
+
`/api/shipped?limit=${fe}&offset=${H.current}`,
|
|
287
284
|
{ cache: "no-store" }
|
|
288
285
|
);
|
|
289
286
|
P((t) => {
|
|
290
|
-
const d = new Set((t ?? []).map((
|
|
291
|
-
return
|
|
292
|
-
}),
|
|
287
|
+
const d = new Set((t ?? []).map((s) => s.id)), a = [...t ?? [], ...e.posts.filter((s) => !d.has(s.id))];
|
|
288
|
+
return H.current = a.length, N(X, a, e.total ?? j), a;
|
|
289
|
+
}), W((t) => e.total ?? t);
|
|
293
290
|
} catch {
|
|
294
291
|
} finally {
|
|
295
|
-
|
|
292
|
+
Z(!1);
|
|
296
293
|
}
|
|
297
294
|
}
|
|
298
|
-
},
|
|
299
|
-
(e) =>
|
|
300
|
-
id:
|
|
295
|
+
}, de = m?.filter(
|
|
296
|
+
(e) => q(w, {
|
|
297
|
+
id: z(e),
|
|
301
298
|
ts: e.ts
|
|
302
299
|
})
|
|
303
|
-
).length
|
|
304
|
-
if (!
|
|
300
|
+
).length ?? 0, Ie = $e(() => {
|
|
301
|
+
if (!m?.length) return [];
|
|
305
302
|
const e = Date.now(), t = [];
|
|
306
|
-
for (const d of
|
|
307
|
-
const a = it(d.ts, e),
|
|
308
|
-
|
|
303
|
+
for (const d of m) {
|
|
304
|
+
const a = it(d.ts, e), s = t[t.length - 1];
|
|
305
|
+
s && s.label === a ? s.items.push(d) : t.push({ label: a, items: [d] });
|
|
309
306
|
}
|
|
310
307
|
return t;
|
|
311
|
-
}, [
|
|
312
|
-
|
|
313
|
-
id:
|
|
308
|
+
}, [m]), Ce = (e) => {
|
|
309
|
+
q(w, {
|
|
310
|
+
id: z(e),
|
|
314
311
|
ts: e.ts
|
|
315
|
-
}) &&
|
|
316
|
-
st(
|
|
312
|
+
}) && k(
|
|
313
|
+
st(u, z(e))
|
|
317
314
|
);
|
|
318
|
-
},
|
|
319
|
-
if (!
|
|
320
|
-
|
|
315
|
+
}, De = async () => {
|
|
316
|
+
if (!G) {
|
|
317
|
+
ee(!0);
|
|
321
318
|
try {
|
|
322
|
-
const e = Math.max(Date.now(), ...(
|
|
323
|
-
|
|
319
|
+
const e = Math.max(Date.now(), ...(m ?? []).map((t) => t.ts));
|
|
320
|
+
k(ge(u, e)), await Je(), R.success("Notifications marked read");
|
|
324
321
|
} finally {
|
|
325
|
-
|
|
322
|
+
ee(!1);
|
|
326
323
|
}
|
|
327
324
|
}
|
|
328
325
|
};
|
|
329
|
-
return /* @__PURE__ */
|
|
330
|
-
/* @__PURE__ */
|
|
331
|
-
/* @__PURE__ */
|
|
326
|
+
return /* @__PURE__ */ o("div", { className: "mx-auto max-w-xl space-y-4 pb-10", "data-lfg-page-column": !0, children: [
|
|
327
|
+
/* @__PURE__ */ o("div", { className: "flex items-center justify-between px-1", children: [
|
|
328
|
+
/* @__PURE__ */ o("div", { children: [
|
|
332
329
|
/* @__PURE__ */ r("h1", { className: "text-lg font-semibold tracking-[-0.01em]", children: p ? "Artifacts" : "Notifications" }),
|
|
333
|
-
p ? /* @__PURE__ */ r("p", { className: "mt-0.5 text-xs text-muted-foreground", children: "Interactive reports and live dashboards" }) : /* @__PURE__ */ r("p", { className: "mt-0.5 text-xs text-muted-foreground", children:
|
|
330
|
+
p ? /* @__PURE__ */ r("p", { className: "mt-0.5 text-xs text-muted-foreground", children: "Interactive reports and live dashboards" }) : /* @__PURE__ */ r("p", { className: "mt-0.5 text-xs text-muted-foreground", children: b.length ? `${b.length} waiting on you` : de ? `${de} unread` : "You're all caught up" })
|
|
334
331
|
] }),
|
|
335
|
-
!p &&
|
|
332
|
+
!p && m !== null ? (
|
|
336
333
|
// Icon only. It is a rare, undoable housekeeping action — it does not
|
|
337
334
|
// need to be the second-loudest thing on the page.
|
|
338
335
|
/* @__PURE__ */ r(
|
|
339
|
-
|
|
336
|
+
Fe,
|
|
340
337
|
{
|
|
341
338
|
size: "icon-sm",
|
|
342
339
|
variant: "ghost",
|
|
343
340
|
"aria-label": "Mark all read",
|
|
344
341
|
title: "Mark all read — clears the app icon badge",
|
|
345
|
-
disabled:
|
|
346
|
-
onClick: () => void
|
|
347
|
-
children:
|
|
342
|
+
disabled: G,
|
|
343
|
+
onClick: () => void De(),
|
|
344
|
+
children: G ? /* @__PURE__ */ r(he, { className: "size-4 animate-spin" }) : /* @__PURE__ */ r(Ge, { className: "size-4" })
|
|
348
345
|
}
|
|
349
346
|
)
|
|
350
347
|
) : null
|
|
351
348
|
] }),
|
|
352
|
-
h === "artifacts" ? /* @__PURE__ */
|
|
353
|
-
|
|
349
|
+
h === "artifacts" ? /* @__PURE__ */ o(ce, { children: [
|
|
350
|
+
y === null ? /* @__PURE__ */ r("div", { className: "py-10 text-center text-sm text-muted-foreground", children: "Loading…" }) : y.length === 0 ? /* @__PURE__ */ o("div", { className: "rounded-2xl border border-border bg-card/40 px-4 py-10 text-center text-sm text-muted-foreground", children: [
|
|
354
351
|
"No artifacts yet — agents create them with ",
|
|
355
352
|
/* @__PURE__ */ r("code", { children: "omg_publish_artifact" }),
|
|
356
353
|
"."
|
|
357
|
-
] }) : /* @__PURE__ */ r("div", { className: "grid grid-cols-2 gap-2 sm:grid-cols-3", children:
|
|
354
|
+
] }) : /* @__PURE__ */ r("div", { className: "grid grid-cols-2 gap-2 sm:grid-cols-3", children: y.map((e) => /* @__PURE__ */ o(
|
|
358
355
|
"div",
|
|
359
356
|
{
|
|
360
357
|
className: "group relative overflow-hidden rounded-xl border border-border bg-card/40 text-left shadow-sm transition-colors hover:border-foreground/20",
|
|
361
358
|
children: [
|
|
362
|
-
/* @__PURE__ */
|
|
359
|
+
/* @__PURE__ */ o(
|
|
363
360
|
"button",
|
|
364
361
|
{
|
|
365
362
|
type: "button",
|
|
366
|
-
onClick: () =>
|
|
363
|
+
onClick: () => le({
|
|
367
364
|
url: e.url,
|
|
368
365
|
kind: e.kind,
|
|
369
366
|
title: e.title,
|
|
@@ -374,54 +371,54 @@ function ut({
|
|
|
374
371
|
}),
|
|
375
372
|
className: "block w-full text-left active:scale-[0.99]",
|
|
376
373
|
children: [
|
|
377
|
-
/* @__PURE__ */ r(nt, { path: e.url, cacheKey: e.ts, children: (e.version ?? 1) > 1 ? /* @__PURE__ */
|
|
374
|
+
/* @__PURE__ */ r(nt, { path: e.url, cacheKey: e.ts, children: (e.version ?? 1) > 1 ? /* @__PURE__ */ o("span", { className: "absolute left-1.5 top-1.5 flex items-center gap-1 rounded-full bg-emerald-500/15 px-1.5 py-0.5 text-[10px] font-medium text-emerald-600 backdrop-blur dark:text-emerald-400", children: [
|
|
378
375
|
/* @__PURE__ */ r("span", { className: "size-1.5 rounded-full bg-emerald-500" }),
|
|
379
376
|
"live · v",
|
|
380
377
|
e.version
|
|
381
378
|
] }) : null }),
|
|
382
|
-
/* @__PURE__ */
|
|
379
|
+
/* @__PURE__ */ o("div", { className: "px-2.5 py-2 pr-9", children: [
|
|
383
380
|
/* @__PURE__ */ r("div", { className: "truncate text-xs font-medium", children: e.title || e.caption || e.name }),
|
|
384
|
-
/* @__PURE__ */ r("div", { className: "mt-0.5 truncate text-[10px] text-muted-foreground", children: e.lastRefreshedAt ? `Refreshed ${
|
|
381
|
+
/* @__PURE__ */ r("div", { className: "mt-0.5 truncate text-[10px] text-muted-foreground", children: e.lastRefreshedAt ? `Refreshed ${Q(e.lastRefreshedAt)}` : `Published ${Q(e.ts)}` })
|
|
385
382
|
] })
|
|
386
383
|
]
|
|
387
384
|
}
|
|
388
385
|
),
|
|
389
|
-
e.sessionId ? /* @__PURE__ */
|
|
386
|
+
e.sessionId ? /* @__PURE__ */ o(
|
|
390
387
|
"button",
|
|
391
388
|
{
|
|
392
389
|
type: "button",
|
|
393
|
-
onClick: () => i
|
|
390
|
+
onClick: () => i?.(e),
|
|
394
391
|
"aria-label": `Open related session for ${e.title || e.caption || e.name}`,
|
|
395
392
|
title: e.sessionTitle || e.project || "Open related session",
|
|
396
393
|
className: "flex w-full items-center gap-1.5 border-t border-border/60 px-2.5 py-2 text-[10px] font-medium text-muted-foreground transition-colors hover:bg-foreground/[0.03] hover:text-foreground",
|
|
397
394
|
children: [
|
|
398
395
|
/* @__PURE__ */ r(et, { className: "size-3 shrink-0", "aria-hidden": !0 }),
|
|
399
396
|
/* @__PURE__ */ r("span", { className: "min-w-0 flex-1 truncate text-left", children: e.sessionTitle || e.project || "Related session" }),
|
|
400
|
-
/* @__PURE__ */ r(
|
|
397
|
+
/* @__PURE__ */ r(Ye, { className: "size-3 shrink-0", "aria-hidden": !0 })
|
|
401
398
|
]
|
|
402
399
|
}
|
|
403
400
|
) : null,
|
|
404
|
-
/* @__PURE__ */
|
|
401
|
+
/* @__PURE__ */ o("div", { className: "absolute right-1.5 top-1.5 flex items-center gap-0.5 rounded-full bg-background/80 backdrop-blur", children: [
|
|
405
402
|
e.refreshEnabled !== void 0 ? /* @__PURE__ */ r(
|
|
406
403
|
"button",
|
|
407
404
|
{
|
|
408
405
|
type: "button",
|
|
409
|
-
onClick: () => void
|
|
410
|
-
disabled:
|
|
406
|
+
onClick: () => void Ae(e),
|
|
407
|
+
disabled: se === e.id,
|
|
411
408
|
"aria-label": `Refresh ${e.title || e.caption || e.name}`,
|
|
412
409
|
className: "flex size-7 items-center justify-center rounded-full text-muted-foreground opacity-100 transition-[color,background-color,transform,opacity] duration-150 hover:bg-foreground/[0.06] hover:text-foreground active:scale-[0.94] disabled:opacity-50 sm:opacity-0 sm:group-hover:opacity-100 sm:focus:opacity-100",
|
|
413
|
-
children: /* @__PURE__ */ r(Be, { className:
|
|
410
|
+
children: /* @__PURE__ */ r(Be, { className: $("size-3.5", se === e.id && "animate-spin") })
|
|
414
411
|
}
|
|
415
412
|
) : null,
|
|
416
413
|
/* @__PURE__ */ r(
|
|
417
414
|
"button",
|
|
418
415
|
{
|
|
419
416
|
type: "button",
|
|
420
|
-
onClick: () => void
|
|
421
|
-
disabled:
|
|
417
|
+
onClick: () => void ke(e),
|
|
418
|
+
disabled: ae === e.id,
|
|
422
419
|
"aria-label": `Delete ${e.title || e.caption || e.name}`,
|
|
423
420
|
className: "flex size-7 items-center justify-center rounded-full text-muted-foreground opacity-100 transition-[color,background-color,transform,opacity] duration-150 hover:bg-destructive/10 hover:text-destructive active:scale-[0.94] disabled:opacity-50 sm:opacity-0 sm:group-hover:opacity-100 sm:focus:opacity-100",
|
|
424
|
-
children:
|
|
421
|
+
children: ae === e.id ? /* @__PURE__ */ r(he, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ r(Ke, { className: "size-3.5" })
|
|
425
422
|
}
|
|
426
423
|
)
|
|
427
424
|
] })
|
|
@@ -429,82 +426,82 @@ function ut({
|
|
|
429
426
|
},
|
|
430
427
|
e.id
|
|
431
428
|
)) }),
|
|
432
|
-
|
|
429
|
+
y !== null && y.length < E ? /* @__PURE__ */ r(
|
|
433
430
|
"button",
|
|
434
431
|
{
|
|
435
432
|
type: "button",
|
|
436
|
-
onClick: () => void
|
|
437
|
-
disabled:
|
|
433
|
+
onClick: () => void we(),
|
|
434
|
+
disabled: U,
|
|
438
435
|
className: "w-full rounded-xl border border-border bg-card/40 px-4 py-2.5 text-sm font-medium text-muted-foreground transition-colors hover:border-foreground/20 hover:text-foreground disabled:opacity-60",
|
|
439
|
-
children:
|
|
436
|
+
children: U ? "Loading…" : `Load more · ${E - y.length} left`
|
|
440
437
|
}
|
|
441
438
|
) : null
|
|
442
|
-
] }) : /* @__PURE__ */
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
/* @__PURE__ */
|
|
439
|
+
] }) : /* @__PURE__ */ o(ce, { children: [
|
|
440
|
+
Y ? /* @__PURE__ */ r("div", { className: "rounded-xl border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive", children: Y }) : null,
|
|
441
|
+
m === null && !Y ? /* @__PURE__ */ r("div", { className: "py-10 text-center text-sm text-muted-foreground", children: "Loading…" }) : null,
|
|
442
|
+
b.length ? /* @__PURE__ */ o("section", { className: "space-y-1.5", children: [
|
|
443
|
+
/* @__PURE__ */ o("div", { className: "flex items-center justify-between gap-2 px-1", children: [
|
|
447
444
|
/* @__PURE__ */ r("h2", { className: "text-[11px] font-semibold uppercase tracking-wide text-primary", children: "Needs you" }),
|
|
448
|
-
|
|
445
|
+
b.length > 1 ? /* @__PURE__ */ r(
|
|
449
446
|
"button",
|
|
450
447
|
{
|
|
451
448
|
type: "button",
|
|
452
|
-
disabled:
|
|
449
|
+
disabled: ye,
|
|
453
450
|
onClick: () => {
|
|
454
|
-
if (!
|
|
455
|
-
|
|
451
|
+
if (!B) {
|
|
452
|
+
M(!0);
|
|
456
453
|
return;
|
|
457
454
|
}
|
|
458
|
-
|
|
455
|
+
M(!1), ve();
|
|
459
456
|
},
|
|
460
|
-
onBlur: () =>
|
|
461
|
-
className:
|
|
457
|
+
onBlur: () => M(!1),
|
|
458
|
+
className: $(
|
|
462
459
|
"-my-1 rounded-full px-2 py-1 text-[11px] font-medium transition-colors disabled:opacity-50",
|
|
463
|
-
|
|
460
|
+
B ? "bg-destructive/10 text-destructive" : "text-muted-foreground hover:text-foreground"
|
|
464
461
|
),
|
|
465
|
-
children:
|
|
462
|
+
children: B ? `Dismiss all ${b.length}?` : "Dismiss all"
|
|
466
463
|
}
|
|
467
464
|
) : null
|
|
468
465
|
] }),
|
|
469
|
-
/* @__PURE__ */ r("div", { className: "overflow-hidden rounded-2xl border border-primary/25 bg-primary/[0.03] shadow-sm", children: [...
|
|
466
|
+
/* @__PURE__ */ r("div", { className: "overflow-hidden rounded-2xl border border-primary/25 bg-primary/[0.03] shadow-sm", children: [...b].sort((e, t) => t.createdAt - e.createdAt).map((e) => /* @__PURE__ */ r(Ue, { q: e, onOpenSession: n }, e.id)) })
|
|
470
467
|
] }) : null,
|
|
471
|
-
|
|
472
|
-
|
|
468
|
+
m !== null && m.length === 0 && !b.length ? /* @__PURE__ */ r("div", { className: "rounded-2xl border border-border bg-card/40 px-4 py-10 text-center text-sm text-muted-foreground", children: "No notifications yet — verified results and future activity will collect here." }) : null,
|
|
469
|
+
Ie.map((e) => /* @__PURE__ */ o("section", { className: "space-y-1.5", children: [
|
|
473
470
|
/* @__PURE__ */ r("h2", { className: "px-1 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground", children: e.label }),
|
|
474
471
|
/* @__PURE__ */ r("div", { className: "overflow-hidden rounded-2xl border border-border bg-card/40 shadow-sm", children: e.items.map((t) => {
|
|
475
|
-
const d = !!t.sessionId &&
|
|
476
|
-
id:
|
|
472
|
+
const d = !!t.sessionId && l.has(t.sessionId), a = q(w, {
|
|
473
|
+
id: z(t),
|
|
477
474
|
ts: t.ts
|
|
478
|
-
}),
|
|
479
|
-
return /* @__PURE__ */
|
|
480
|
-
/* @__PURE__ */
|
|
475
|
+
}), s = t.mediaItems.length > 0;
|
|
476
|
+
return /* @__PURE__ */ o("article", { className: "relative border-b border-border/50 last:border-b-0", children: [
|
|
477
|
+
/* @__PURE__ */ o(
|
|
481
478
|
"button",
|
|
482
479
|
{
|
|
483
480
|
type: "button",
|
|
484
481
|
onClick: () => {
|
|
485
|
-
|
|
482
|
+
Ce(t), t.sessionId && (c ? c(t) : d && n(t.sessionId));
|
|
486
483
|
},
|
|
487
|
-
className:
|
|
484
|
+
className: $(
|
|
488
485
|
"flex w-full items-start gap-2.5 py-2.5 pl-2.5 text-left transition-colors hover:bg-foreground/[0.02]",
|
|
489
|
-
|
|
486
|
+
s ? "pr-[4.75rem]" : "pr-3.5"
|
|
490
487
|
),
|
|
491
488
|
children: [
|
|
492
489
|
/* @__PURE__ */ r(
|
|
493
490
|
"span",
|
|
494
491
|
{
|
|
495
|
-
className:
|
|
492
|
+
className: $(
|
|
496
493
|
"mt-3 size-1.5 shrink-0 rounded-full",
|
|
497
494
|
a && "bg-primary"
|
|
498
495
|
),
|
|
499
496
|
title: a ? "Unread" : void 0
|
|
500
497
|
}
|
|
501
498
|
),
|
|
502
|
-
/* @__PURE__ */
|
|
499
|
+
/* @__PURE__ */ o("span", { className: "relative mt-0.5 shrink-0", children: [
|
|
503
500
|
/* @__PURE__ */ r(
|
|
504
501
|
"img",
|
|
505
502
|
{
|
|
506
503
|
src: He(t.agent),
|
|
507
|
-
alt:
|
|
504
|
+
alt: pe(t.agent),
|
|
508
505
|
className: "size-7 rounded-full border border-border bg-background p-1"
|
|
509
506
|
}
|
|
510
507
|
),
|
|
@@ -516,14 +513,14 @@ function ut({
|
|
|
516
513
|
}
|
|
517
514
|
) : null
|
|
518
515
|
] }),
|
|
519
|
-
/* @__PURE__ */
|
|
520
|
-
/* @__PURE__ */
|
|
521
|
-
/* @__PURE__ */ r("span", { className: "min-w-0 shrink truncate font-medium text-foreground/75", children:
|
|
522
|
-
t.project ? /* @__PURE__ */
|
|
516
|
+
/* @__PURE__ */ o("div", { className: "min-w-0 flex-1", children: [
|
|
517
|
+
/* @__PURE__ */ o("div", { className: "flex items-baseline gap-1.5 text-[11px] text-muted-foreground", children: [
|
|
518
|
+
/* @__PURE__ */ r("span", { className: "min-w-0 shrink truncate font-medium text-foreground/75", children: pe(t.agent) }),
|
|
519
|
+
t.project ? /* @__PURE__ */ o("span", { className: "min-w-0 shrink truncate", children: [
|
|
523
520
|
"· ",
|
|
524
521
|
t.project
|
|
525
522
|
] }) : null,
|
|
526
|
-
/* @__PURE__ */ r("span", { className: "ml-auto shrink-0 tabular-nums", children:
|
|
523
|
+
/* @__PURE__ */ r("span", { className: "ml-auto shrink-0 tabular-nums", children: Q(t.ts) })
|
|
527
524
|
] }),
|
|
528
525
|
/* @__PURE__ */ r("h3", { className: "mt-0.5 line-clamp-2 text-[13.5px] font-semibold leading-snug tracking-[-0.01em]", children: t.title }),
|
|
529
526
|
t.summary ? (
|
|
@@ -536,25 +533,25 @@ function ut({
|
|
|
536
533
|
]
|
|
537
534
|
}
|
|
538
535
|
),
|
|
539
|
-
|
|
536
|
+
s ? /* @__PURE__ */ r("div", { className: "absolute right-3.5 top-2.5", children: /* @__PURE__ */ r(
|
|
540
537
|
at,
|
|
541
538
|
{
|
|
542
539
|
items: t.mediaItems,
|
|
543
540
|
total: t.mediaTotal ?? t.mediaItems.length,
|
|
544
|
-
onExpand:
|
|
541
|
+
onExpand: le
|
|
545
542
|
}
|
|
546
543
|
) }) : null
|
|
547
544
|
] }, t.id);
|
|
548
545
|
}) })
|
|
549
546
|
] }, e.label)),
|
|
550
|
-
|
|
547
|
+
m !== null && m.length < j ? /* @__PURE__ */ r(
|
|
551
548
|
"button",
|
|
552
549
|
{
|
|
553
550
|
type: "button",
|
|
554
|
-
onClick: () => void
|
|
555
|
-
disabled:
|
|
551
|
+
onClick: () => void Ee(),
|
|
552
|
+
disabled: F,
|
|
556
553
|
className: "w-full rounded-xl border border-border bg-card/40 px-4 py-2.5 text-sm font-medium text-muted-foreground transition-colors hover:border-foreground/20 hover:text-foreground disabled:opacity-60",
|
|
557
|
-
children:
|
|
554
|
+
children: F ? "Loading…" : `Load more · ${j - m.length} left`
|
|
558
555
|
}
|
|
559
556
|
) : null
|
|
560
557
|
] })
|