@omg-dev/app 0.2.23 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-lib/{ChangelogPage-CeCtrXuD.js → ChangelogPage-B6oxujtj.js} +135 -1
- package/dist-lib/{File-BszRWhXA.js → File-B-qYa2zY.js} +1 -1
- package/dist-lib/{FileEditor-ByMnm-sa.js → FileEditor-BIz0qCyW.js} +2 -2
- package/dist-lib/{FileViewer-DgjR_OJp.js → FileViewer-Clmf04v1.js} +1 -1
- package/dist-lib/{SessionFilesPanel-Ck0KNzua.js → SessionFilesPanel-CF_zsqbI.js} +18 -18
- package/dist-lib/{TermView-D2F19OhV.js → TermView-CJF4nZya.js} +1 -1
- package/dist-lib/apple-touch-icon.png +0 -0
- package/dist-lib/{chat-engine-Bo21-04D.js → chat-engine-CK_sLDum.js} +1 -1
- package/dist-lib/{streamdown-response-k_s41jX5.js → chunk-BO2N2NFS-kYiI5SD9.js} +5006 -6023
- package/dist-lib/{coding-agents-page-Bfy-IdbL.js → coding-agents-page-DR79T5z3.js} +80 -80
- package/dist-lib/embedded-B900iwBO.js +32318 -0
- package/dist-lib/engine-compile-BeDRSL6Y.js +9199 -0
- package/dist-lib/{highlighted-body-OFNGDK62-XrUZDzoE.js → highlighted-body-OFNGDK62-C2DGVKV8.js} +4 -4
- package/dist-lib/icon-192.png +0 -0
- package/dist-lib/icon-512.png +0 -0
- package/dist-lib/icon-maskable-512.png +0 -0
- package/dist-lib/icon-maskable.svg +11 -11
- package/dist-lib/icon-small.svg +18 -15
- package/dist-lib/icon.svg +18 -15
- package/dist-lib/index-BXzud6tj.js +1247 -0
- package/dist-lib/{index-CdRi0Fvj.js → index-DWkBvb-9.js} +27 -27
- package/dist-lib/{index-Bw4EY_Nm.js → index-DcwavxA1.js} +3 -3
- package/dist-lib/index-Dtkd4mEk.js +29 -0
- package/dist-lib/index.js +1 -1
- package/dist-lib/mermaid-GHXKKRXX-Ox_2d3uB.js +4 -0
- package/dist-lib/{resume-session-sheet-9na3HKD2.js → resume-session-sheet-5ffg3hJB.js} +1 -1
- package/dist-lib/{session-token-usage-Buv6ihdg.js → session-token-usage-Csrm3KDa.js} +6 -6
- package/dist-lib/{shipped-page-DRgFmUbI.js → shipped-page-B9ihw5Gz.js} +91 -101
- package/dist-lib/streamdown-response-B858u5YQ.js +1051 -0
- package/dist-lib/styles.css +1 -1
- package/package.json +4 -2
- package/dist-lib/embedded-pRKgmVAd.js +0 -27950
- package/dist-lib/engine-compile-BeZvvx0I.js +0 -10442
- package/dist-lib/mermaid-GHXKKRXX-CPr0wWN7.js +0 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as l, jsx as r, Fragment as me } from "react/jsx-runtime";
|
|
2
|
-
import { useState as f, useEffect as w, useRef as fe, useContext as
|
|
3
|
-
import { y as
|
|
2
|
+
import { useState as f, useEffect as w, useRef as fe, useContext as _e, useMemo as $e } from "react";
|
|
3
|
+
import { y as ze, z as he, E as Te, F as S, H as ge, I as Se, J as je, N as Fe, B as Pe, L as pe, O as Ye, j as q, C as Ge, R as Be, T as Ke, Q as Ue, u as be, o as He, U as Ve, a as R, V as k, W as L, v as M, Y as W, Z as Je, _ as Qe, $ as Xe, a0 as qe, m as We, a1 as Ze } from "./embedded-B900iwBO.js";
|
|
4
4
|
import { cn as j } from "cnfast";
|
|
5
5
|
/**
|
|
6
6
|
* @license lucide-react v0.577.0 - ISC
|
|
@@ -8,17 +8,7 @@ import { cn as j } from "cnfast";
|
|
|
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
|
|
12
|
-
["path", { d: "M18 6 7 17l-5-5", key: "116fxf" }],
|
|
13
|
-
["path", { d: "m22 10-7.5 7.5L13 16", key: "ke71qq" }]
|
|
14
|
-
], Oe = ve("check-check", Ze);
|
|
15
|
-
/**
|
|
16
|
-
* @license lucide-react v0.577.0 - ISC
|
|
17
|
-
*
|
|
18
|
-
* This source code is licensed under the ISC license.
|
|
19
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
20
|
-
*/
|
|
21
|
-
const et = [
|
|
11
|
+
const Oe = [
|
|
22
12
|
[
|
|
23
13
|
"path",
|
|
24
14
|
{
|
|
@@ -29,61 +19,61 @@ const et = [
|
|
|
29
19
|
["path", { d: "M7 11h10", key: "1twpyw" }],
|
|
30
20
|
["path", { d: "M7 15h6", key: "d9of3u" }],
|
|
31
21
|
["path", { d: "M7 7h8", key: "af5zfr" }]
|
|
32
|
-
],
|
|
33
|
-
function
|
|
34
|
-
return `${
|
|
22
|
+
], et = ze("message-square-text", Oe), O = "lfg-notification-read-state", tt = "lfg_notification_reads_v1:";
|
|
23
|
+
function ve(s) {
|
|
24
|
+
return `${tt}${(s == null ? void 0 : s.trim().toLowerCase()) || "__device__"}`;
|
|
35
25
|
}
|
|
36
|
-
function
|
|
26
|
+
function rt(s) {
|
|
37
27
|
if (!s || typeof s != "object") return null;
|
|
38
28
|
const i = s, c = typeof i.through == "number" && Number.isFinite(i.through) ? Math.max(0, i.through) : 0, o = Array.isArray(i.ids) ? i.ids.filter((m) => typeof m == "string").slice(-500) : [];
|
|
39
29
|
return { through: c, ids: [...new Set(o)] };
|
|
40
30
|
}
|
|
41
|
-
function
|
|
31
|
+
function _(s) {
|
|
42
32
|
if (typeof window > "u") return null;
|
|
43
33
|
try {
|
|
44
|
-
return
|
|
34
|
+
return rt(JSON.parse(localStorage.getItem(ve(s)) ?? "null"));
|
|
45
35
|
} catch {
|
|
46
36
|
return null;
|
|
47
37
|
}
|
|
48
38
|
}
|
|
49
|
-
function
|
|
50
|
-
return typeof window > "u" || (localStorage.setItem(
|
|
39
|
+
function ye(s, i) {
|
|
40
|
+
return typeof window > "u" || (localStorage.setItem(ve(s), JSON.stringify(i)), window.dispatchEvent(
|
|
51
41
|
new CustomEvent(O, {
|
|
52
42
|
detail: { identity: (s == null ? void 0 : s.trim().toLowerCase()) || "__device__" }
|
|
53
43
|
})
|
|
54
44
|
)), i;
|
|
55
45
|
}
|
|
56
|
-
function
|
|
46
|
+
function F(s) {
|
|
57
47
|
return `shipped:${s.id}:${s.rev}`;
|
|
58
48
|
}
|
|
59
49
|
function Z(s, i) {
|
|
60
50
|
return s ? i.ts > s.through && !s.ids.includes(i.id) : !1;
|
|
61
51
|
}
|
|
62
|
-
function
|
|
63
|
-
const c =
|
|
64
|
-
return c.ids.includes(i) ? c :
|
|
52
|
+
function st(s, i) {
|
|
53
|
+
const c = _(s) ?? { through: 0, ids: [] };
|
|
54
|
+
return c.ids.includes(i) ? c : ye(s, {
|
|
65
55
|
...c,
|
|
66
56
|
ids: [...c.ids, i].slice(-500)
|
|
67
57
|
});
|
|
68
58
|
}
|
|
69
59
|
function xe(s, i) {
|
|
70
|
-
const c =
|
|
71
|
-
return
|
|
60
|
+
const c = _(s) ?? { through: 0, ids: [] };
|
|
61
|
+
return ye(s, {
|
|
72
62
|
through: Math.max(c.through, i),
|
|
73
63
|
ids: c.ids
|
|
74
64
|
});
|
|
75
65
|
}
|
|
76
|
-
function
|
|
66
|
+
function nt({
|
|
77
67
|
path: s,
|
|
78
68
|
cacheKey: i,
|
|
79
69
|
children: c
|
|
80
70
|
}) {
|
|
81
71
|
return /* @__PURE__ */ l("div", { className: "relative h-32 w-full overflow-hidden bg-background", children: [
|
|
82
|
-
/* @__PURE__ */ r(
|
|
72
|
+
/* @__PURE__ */ r(Qe, { path: s, cacheKey: i, className: "h-full w-full" }),
|
|
83
73
|
c
|
|
84
74
|
] });
|
|
85
75
|
}
|
|
86
|
-
function
|
|
76
|
+
function at({
|
|
87
77
|
items: s,
|
|
88
78
|
total: i,
|
|
89
79
|
onExpand: c
|
|
@@ -108,7 +98,7 @@ function it({
|
|
|
108
98
|
className: "relative size-[52px] shrink-0 overflow-hidden rounded-lg border border-border/60 bg-muted transition-transform active:scale-[0.97]",
|
|
109
99
|
children: [
|
|
110
100
|
o.kind === "image" ? /* @__PURE__ */ r(
|
|
111
|
-
|
|
101
|
+
Xe,
|
|
112
102
|
{
|
|
113
103
|
path: o.url,
|
|
114
104
|
alt: o.caption || o.name,
|
|
@@ -119,8 +109,8 @@ function it({
|
|
|
119
109
|
// Deliberately an icon, not a live preview. A document scaled into a
|
|
120
110
|
// 52px box is two words of giant text — unreadable, and it costs a
|
|
121
111
|
// fetch + parse per row. The Artifacts page is where previews belong.
|
|
122
|
-
/* @__PURE__ */ r("span", { className: "flex size-full items-center justify-center bg-primary/10 text-primary", children: /* @__PURE__ */ r(
|
|
123
|
-
) : /* @__PURE__ */ r("span", { className: "flex size-full items-center justify-center bg-black/80 text-white/80", children: /* @__PURE__ */ r(
|
|
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(We, { className: "size-4" }) }),
|
|
124
114
|
m > 0 ? /* @__PURE__ */ l("span", { className: "absolute inset-x-0 bottom-0 bg-black/55 py-0.5 text-center text-[9px] font-semibold text-white", children: [
|
|
125
115
|
"+",
|
|
126
116
|
m
|
|
@@ -129,7 +119,7 @@ function it({
|
|
|
129
119
|
}
|
|
130
120
|
);
|
|
131
121
|
}
|
|
132
|
-
function
|
|
122
|
+
function it(s, i) {
|
|
133
123
|
const c = (p) => {
|
|
134
124
|
const v = new Date(p);
|
|
135
125
|
return new Date(v.getFullYear(), v.getMonth(), v.getDate()).getTime();
|
|
@@ -143,7 +133,7 @@ function lt(s, i) {
|
|
|
143
133
|
...m.getFullYear() === new Date(i).getFullYear() ? {} : { year: "numeric" }
|
|
144
134
|
});
|
|
145
135
|
}
|
|
146
|
-
function
|
|
136
|
+
function ut({
|
|
147
137
|
onOpenSession: s,
|
|
148
138
|
onOpenArtifactSession: i,
|
|
149
139
|
onReviewSession: c,
|
|
@@ -152,22 +142,22 @@ function mt({
|
|
|
152
142
|
artifactsOnly: p = !1,
|
|
153
143
|
active: v = !0
|
|
154
144
|
}) {
|
|
155
|
-
const h = p ? "artifacts" : "feed", b = p ? he(
|
|
156
|
-
() => p ? null :
|
|
157
|
-
), [B, re] = f(!1), [K, se] = f(null), { questions: y, busy:
|
|
145
|
+
const h = p ? "artifacts" : "feed", b = p ? he(L) : null, x = p ? null : he(W), [u, P] = f(() => (x == null ? void 0 : x.items) ?? null), [Y, ee] = f(() => (x == null ? void 0 : x.total) ?? 0), [G, te] = f(!1), [A, I] = f(
|
|
146
|
+
() => p ? null : _(m)
|
|
147
|
+
), [B, re] = f(!1), [K, se] = f(null), { questions: y, busy: Ne, dismissAll: we } = Te(), [U, $] = f(!1);
|
|
158
148
|
w(() => {
|
|
159
149
|
$(!1);
|
|
160
150
|
}, [y.length]);
|
|
161
|
-
const [N, E] = f(() => (b == null ? void 0 : b.items) ?? null), [C, H] = f(() => (b == null ? void 0 : b.total) ?? 0), [V, ne] = f(!1), [ae, ie] = f(null), [le, oe] = f(null), de = "&kind=html", D = fe(Math.max(S, (b == null ? void 0 : b.items.length) ?? 0)),
|
|
151
|
+
const [N, E] = f(() => (b == null ? void 0 : b.items) ?? null), [C, H] = f(() => (b == null ? void 0 : b.total) ?? 0), [V, ne] = f(!1), [ae, ie] = f(null), [le, oe] = f(null), de = "&kind=html", D = fe(Math.max(S, (b == null ? void 0 : b.items.length) ?? 0)), J = fe(Math.max(ge, (x == null ? void 0 : x.items.length) ?? 0)), ce = _e(Se), ke = je();
|
|
162
152
|
w(() => {
|
|
163
|
-
h === "feed" && I(
|
|
153
|
+
h === "feed" && I(_(m));
|
|
164
154
|
}, [m, h]), w(() => {
|
|
165
155
|
if (h !== "feed" || u === null || A) return;
|
|
166
156
|
const e = u.reduce((t, d) => Math.max(t, d.ts), Date.now());
|
|
167
157
|
I(xe(m, e));
|
|
168
158
|
}, [m, A, u, h]), w(() => {
|
|
169
159
|
if (h !== "feed") return;
|
|
170
|
-
const e = () => I(
|
|
160
|
+
const e = () => I(_(m));
|
|
171
161
|
return window.addEventListener("storage", e), window.addEventListener(O, e), () => {
|
|
172
162
|
window.removeEventListener("storage", e), window.removeEventListener(O, e);
|
|
173
163
|
};
|
|
@@ -176,15 +166,15 @@ function mt({
|
|
|
176
166
|
let e = !0;
|
|
177
167
|
const t = async () => {
|
|
178
168
|
try {
|
|
179
|
-
const a = await
|
|
169
|
+
const a = await R(
|
|
180
170
|
`/api/artifacts?limit=${S}${de}`,
|
|
181
171
|
{ cache: "no-store" }
|
|
182
172
|
);
|
|
183
173
|
if (!e) return;
|
|
184
174
|
const n = Array.isArray(a.artifacts) ? a.artifacts : [], g = a.total ?? n.length;
|
|
185
|
-
E((
|
|
186
|
-
const
|
|
187
|
-
return D.current = Math.max(S, Q.length), k(
|
|
175
|
+
E((z) => {
|
|
176
|
+
const T = new Set(n.map((X) => X.id)), Me = (z ?? []).filter((X) => !T.has(X.id)), Q = [...n, ...Me];
|
|
177
|
+
return D.current = Math.max(S, Q.length), k(L, Q, g), Q;
|
|
188
178
|
}), H(g);
|
|
189
179
|
} catch {
|
|
190
180
|
e && E((a) => a ?? []);
|
|
@@ -199,26 +189,26 @@ function mt({
|
|
|
199
189
|
e = !1, clearInterval(d);
|
|
200
190
|
};
|
|
201
191
|
}, [h, v]);
|
|
202
|
-
const
|
|
192
|
+
const Ae = async () => {
|
|
203
193
|
if (!V) {
|
|
204
194
|
ne(!0);
|
|
205
195
|
try {
|
|
206
|
-
const e = await
|
|
196
|
+
const e = await R(
|
|
207
197
|
`/api/artifacts?limit=${S}&offset=${D.current}${de}`,
|
|
208
198
|
{ cache: "no-store" }
|
|
209
199
|
);
|
|
210
200
|
E((t) => {
|
|
211
201
|
const d = new Set((t ?? []).map((n) => n.id)), a = [...t ?? [], ...e.artifacts.filter((n) => !d.has(n.id))];
|
|
212
|
-
return D.current = a.length, k(
|
|
202
|
+
return D.current = a.length, k(L, a, e.total ?? C), a;
|
|
213
203
|
}), H((t) => e.total ?? t);
|
|
214
204
|
} catch {
|
|
215
205
|
} finally {
|
|
216
206
|
ne(!1);
|
|
217
207
|
}
|
|
218
208
|
}
|
|
219
|
-
},
|
|
209
|
+
}, Ie = async (e) => {
|
|
220
210
|
const t = e.title || e.caption || e.name;
|
|
221
|
-
if (await
|
|
211
|
+
if (await ke.confirm({
|
|
222
212
|
title: `Delete ${t}?`,
|
|
223
213
|
description: "This permanently removes the artifact and stops its automatic refresh schedule.",
|
|
224
214
|
confirmLabel: "Delete artifact",
|
|
@@ -226,7 +216,7 @@ function mt({
|
|
|
226
216
|
})) {
|
|
227
217
|
oe(e.id);
|
|
228
218
|
try {
|
|
229
|
-
await
|
|
219
|
+
await R(
|
|
230
220
|
`/api/sessions/${encodeURIComponent(e.sessionId ?? "")}/artifacts/${encodeURIComponent(e.id)}`,
|
|
231
221
|
{
|
|
232
222
|
method: "DELETE",
|
|
@@ -234,19 +224,19 @@ function mt({
|
|
|
234
224
|
}
|
|
235
225
|
), E((a) => {
|
|
236
226
|
const n = (a == null ? void 0 : a.filter((g) => g.id !== e.id)) ?? null;
|
|
237
|
-
return n && k(
|
|
238
|
-
}), H((a) => Math.max(0, a - 1)), D.current = Math.max(0, D.current - 1),
|
|
227
|
+
return n && k(L, n, Math.max(0, C - 1)), n;
|
|
228
|
+
}), H((a) => Math.max(0, a - 1)), D.current = Math.max(0, D.current - 1), M.success("Artifact deleted");
|
|
239
229
|
} catch (a) {
|
|
240
|
-
|
|
230
|
+
M.error(a instanceof Error ? a.message : "Couldn't delete artifact");
|
|
241
231
|
} finally {
|
|
242
232
|
oe(null);
|
|
243
233
|
}
|
|
244
234
|
}
|
|
245
|
-
},
|
|
235
|
+
}, Ee = async (e) => {
|
|
246
236
|
if (!(!e.sessionId || e.refreshEnabled === void 0)) {
|
|
247
237
|
ie(e.id);
|
|
248
238
|
try {
|
|
249
|
-
const t = await
|
|
239
|
+
const t = await R(
|
|
250
240
|
`/api/sessions/${encodeURIComponent(e.sessionId)}/artifacts/html/${encodeURIComponent(e.id)}/refresh`,
|
|
251
241
|
{
|
|
252
242
|
method: "POST",
|
|
@@ -255,21 +245,21 @@ function mt({
|
|
|
255
245
|
);
|
|
256
246
|
E((d) => {
|
|
257
247
|
const a = (d == null ? void 0 : d.map((n) => {
|
|
258
|
-
var g,
|
|
248
|
+
var g, z, T;
|
|
259
249
|
return n.id === e.id ? {
|
|
260
250
|
...n,
|
|
261
251
|
ts: t.artifact.updatedAt ?? n.ts,
|
|
262
252
|
version: t.artifact.version ?? n.version,
|
|
263
253
|
size: t.artifact.size ?? n.size,
|
|
264
254
|
lastRefreshedAt: ((g = t.artifact.refresh) == null ? void 0 : g.lastSuccessAt) ?? n.lastRefreshedAt,
|
|
265
|
-
refreshStatus: ((
|
|
266
|
-
refreshEnabled: ((
|
|
255
|
+
refreshStatus: ((z = t.artifact.refresh) == null ? void 0 : z.status) ?? n.refreshStatus,
|
|
256
|
+
refreshEnabled: ((T = t.artifact.refresh) == null ? void 0 : T.enabled) ?? n.refreshEnabled
|
|
267
257
|
} : n;
|
|
268
258
|
})) ?? null;
|
|
269
|
-
return a && k(
|
|
270
|
-
}),
|
|
259
|
+
return a && k(L, a, C), a;
|
|
260
|
+
}), M.success("Artifact refreshed");
|
|
271
261
|
} catch (t) {
|
|
272
|
-
|
|
262
|
+
M.error(t instanceof Error ? t.message : "Couldn't refresh artifact");
|
|
273
263
|
} finally {
|
|
274
264
|
ie(null);
|
|
275
265
|
}
|
|
@@ -277,28 +267,28 @@ function mt({
|
|
|
277
267
|
};
|
|
278
268
|
w(() => {
|
|
279
269
|
if (!(h !== "feed" || !v))
|
|
280
|
-
return
|
|
270
|
+
return Fe((e) => {
|
|
281
271
|
if (!e.ok) {
|
|
282
|
-
|
|
272
|
+
P((t) => (t === null && se(e.error), t));
|
|
283
273
|
return;
|
|
284
274
|
}
|
|
285
|
-
|
|
275
|
+
P((t) => {
|
|
286
276
|
const d = new Set(e.posts.map((g) => g.id)), a = (t ?? []).filter((g) => !d.has(g.id)), n = [...e.posts, ...a];
|
|
287
|
-
return
|
|
277
|
+
return J.current = Math.max(Ze, n.length), k(W, n, e.total), n;
|
|
288
278
|
}), ee(e.total), se(null);
|
|
289
279
|
});
|
|
290
280
|
}, [h, v]);
|
|
291
|
-
const
|
|
281
|
+
const Ce = async () => {
|
|
292
282
|
if (!G) {
|
|
293
283
|
te(!0);
|
|
294
284
|
try {
|
|
295
|
-
const e = await
|
|
296
|
-
`/api/shipped?limit=${ge}&offset=${
|
|
285
|
+
const e = await R(
|
|
286
|
+
`/api/shipped?limit=${ge}&offset=${J.current}`,
|
|
297
287
|
{ cache: "no-store" }
|
|
298
288
|
);
|
|
299
|
-
|
|
289
|
+
P((t) => {
|
|
300
290
|
const d = new Set((t ?? []).map((n) => n.id)), a = [...t ?? [], ...e.posts.filter((n) => !d.has(n.id))];
|
|
301
|
-
return
|
|
291
|
+
return J.current = a.length, k(W, a, e.total ?? Y), a;
|
|
302
292
|
}), ee((t) => e.total ?? t);
|
|
303
293
|
} catch {
|
|
304
294
|
} finally {
|
|
@@ -307,30 +297,30 @@ function mt({
|
|
|
307
297
|
}
|
|
308
298
|
}, ue = (u == null ? void 0 : u.filter(
|
|
309
299
|
(e) => Z(A, {
|
|
310
|
-
id:
|
|
300
|
+
id: F(e),
|
|
311
301
|
ts: e.ts
|
|
312
302
|
})
|
|
313
|
-
).length) ?? 0,
|
|
303
|
+
).length) ?? 0, De = $e(() => {
|
|
314
304
|
if (!(u != null && u.length)) return [];
|
|
315
305
|
const e = Date.now(), t = [];
|
|
316
306
|
for (const d of u) {
|
|
317
|
-
const a =
|
|
307
|
+
const a = it(d.ts, e), n = t[t.length - 1];
|
|
318
308
|
n && n.label === a ? n.items.push(d) : t.push({ label: a, items: [d] });
|
|
319
309
|
}
|
|
320
310
|
return t;
|
|
321
311
|
}, [u]), Re = (e) => {
|
|
322
312
|
Z(A, {
|
|
323
|
-
id:
|
|
313
|
+
id: F(e),
|
|
324
314
|
ts: e.ts
|
|
325
315
|
}) && I(
|
|
326
|
-
|
|
316
|
+
st(m, F(e))
|
|
327
317
|
);
|
|
328
|
-
},
|
|
318
|
+
}, Le = async () => {
|
|
329
319
|
if (!B) {
|
|
330
320
|
re(!0);
|
|
331
321
|
try {
|
|
332
322
|
const e = Math.max(Date.now(), ...(u ?? []).map((t) => t.ts));
|
|
333
|
-
I(xe(m, e)), await
|
|
323
|
+
I(xe(m, e)), await Je(), M.success("Notifications marked read");
|
|
334
324
|
} finally {
|
|
335
325
|
re(!1);
|
|
336
326
|
}
|
|
@@ -346,15 +336,15 @@ function mt({
|
|
|
346
336
|
// Icon only. It is a rare, undoable housekeeping action — it does not
|
|
347
337
|
// need to be the second-loudest thing on the page.
|
|
348
338
|
/* @__PURE__ */ r(
|
|
349
|
-
|
|
339
|
+
Pe,
|
|
350
340
|
{
|
|
351
341
|
size: "icon-sm",
|
|
352
342
|
variant: "ghost",
|
|
353
343
|
"aria-label": "Mark all read",
|
|
354
344
|
title: "Mark all read — clears the app icon badge",
|
|
355
345
|
disabled: B,
|
|
356
|
-
onClick: () => void
|
|
357
|
-
children: B ? /* @__PURE__ */ r(pe, { className: "size-4 animate-spin" }) : /* @__PURE__ */ r(
|
|
346
|
+
onClick: () => void Le(),
|
|
347
|
+
children: B ? /* @__PURE__ */ r(pe, { className: "size-4 animate-spin" }) : /* @__PURE__ */ r(Ye, { className: "size-4" })
|
|
358
348
|
}
|
|
359
349
|
)
|
|
360
350
|
) : null
|
|
@@ -384,14 +374,14 @@ function mt({
|
|
|
384
374
|
}),
|
|
385
375
|
className: "block w-full text-left active:scale-[0.99]",
|
|
386
376
|
children: [
|
|
387
|
-
/* @__PURE__ */ r(
|
|
377
|
+
/* @__PURE__ */ r(nt, { path: e.url, cacheKey: e.ts, children: (e.version ?? 1) > 1 ? /* @__PURE__ */ l("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: [
|
|
388
378
|
/* @__PURE__ */ r("span", { className: "size-1.5 rounded-full bg-emerald-500" }),
|
|
389
379
|
"live · v",
|
|
390
380
|
e.version
|
|
391
381
|
] }) : null }),
|
|
392
382
|
/* @__PURE__ */ l("div", { className: "px-2.5 py-2 pr-9", children: [
|
|
393
383
|
/* @__PURE__ */ r("div", { className: "truncate text-xs font-medium", children: e.title || e.caption || e.name }),
|
|
394
|
-
/* @__PURE__ */ r("div", { className: "mt-0.5 truncate text-[10px] text-muted-foreground", children: e.lastRefreshedAt ? `Refreshed ${
|
|
384
|
+
/* @__PURE__ */ r("div", { className: "mt-0.5 truncate text-[10px] text-muted-foreground", children: e.lastRefreshedAt ? `Refreshed ${q(e.lastRefreshedAt)}` : `Published ${q(e.ts)}` })
|
|
395
385
|
] })
|
|
396
386
|
]
|
|
397
387
|
}
|
|
@@ -405,9 +395,9 @@ function mt({
|
|
|
405
395
|
title: e.sessionTitle || e.project || "Open related session",
|
|
406
396
|
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",
|
|
407
397
|
children: [
|
|
408
|
-
/* @__PURE__ */ r(
|
|
398
|
+
/* @__PURE__ */ r(et, { className: "size-3 shrink-0", "aria-hidden": !0 }),
|
|
409
399
|
/* @__PURE__ */ r("span", { className: "min-w-0 flex-1 truncate text-left", children: e.sessionTitle || e.project || "Related session" }),
|
|
410
|
-
/* @__PURE__ */ r(
|
|
400
|
+
/* @__PURE__ */ r(Ge, { className: "size-3 shrink-0", "aria-hidden": !0 })
|
|
411
401
|
]
|
|
412
402
|
}
|
|
413
403
|
) : null,
|
|
@@ -416,22 +406,22 @@ function mt({
|
|
|
416
406
|
"button",
|
|
417
407
|
{
|
|
418
408
|
type: "button",
|
|
419
|
-
onClick: () => void
|
|
409
|
+
onClick: () => void Ee(e),
|
|
420
410
|
disabled: ae === e.id,
|
|
421
411
|
"aria-label": `Refresh ${e.title || e.caption || e.name}`,
|
|
422
412
|
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",
|
|
423
|
-
children: /* @__PURE__ */ r(
|
|
413
|
+
children: /* @__PURE__ */ r(Be, { className: j("size-3.5", ae === e.id && "animate-spin") })
|
|
424
414
|
}
|
|
425
415
|
) : null,
|
|
426
416
|
/* @__PURE__ */ r(
|
|
427
417
|
"button",
|
|
428
418
|
{
|
|
429
419
|
type: "button",
|
|
430
|
-
onClick: () => void
|
|
420
|
+
onClick: () => void Ie(e),
|
|
431
421
|
disabled: le === e.id,
|
|
432
422
|
"aria-label": `Delete ${e.title || e.caption || e.name}`,
|
|
433
423
|
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",
|
|
434
|
-
children: le === e.id ? /* @__PURE__ */ r(pe, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ r(
|
|
424
|
+
children: le === e.id ? /* @__PURE__ */ r(pe, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ r(Ke, { className: "size-3.5" })
|
|
435
425
|
}
|
|
436
426
|
)
|
|
437
427
|
] })
|
|
@@ -443,7 +433,7 @@ function mt({
|
|
|
443
433
|
"button",
|
|
444
434
|
{
|
|
445
435
|
type: "button",
|
|
446
|
-
onClick: () => void
|
|
436
|
+
onClick: () => void Ae(),
|
|
447
437
|
disabled: V,
|
|
448
438
|
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",
|
|
449
439
|
children: V ? "Loading…" : `Load more · ${C - N.length} left`
|
|
@@ -459,13 +449,13 @@ function mt({
|
|
|
459
449
|
"button",
|
|
460
450
|
{
|
|
461
451
|
type: "button",
|
|
462
|
-
disabled:
|
|
452
|
+
disabled: Ne,
|
|
463
453
|
onClick: () => {
|
|
464
454
|
if (!U) {
|
|
465
455
|
$(!0);
|
|
466
456
|
return;
|
|
467
457
|
}
|
|
468
|
-
$(!1),
|
|
458
|
+
$(!1), we();
|
|
469
459
|
},
|
|
470
460
|
onBlur: () => $(!1),
|
|
471
461
|
className: j(
|
|
@@ -476,14 +466,14 @@ function mt({
|
|
|
476
466
|
}
|
|
477
467
|
) : null
|
|
478
468
|
] }),
|
|
479
|
-
/* @__PURE__ */ r("div", { className: "overflow-hidden rounded-2xl border border-primary/25 bg-primary/[0.03] shadow-sm", children: [...y].sort((e, t) => t.createdAt - e.createdAt).map((e) => /* @__PURE__ */ r(
|
|
469
|
+
/* @__PURE__ */ r("div", { className: "overflow-hidden rounded-2xl border border-primary/25 bg-primary/[0.03] shadow-sm", children: [...y].sort((e, t) => t.createdAt - e.createdAt).map((e) => /* @__PURE__ */ r(Ue, { q: e, onOpenSession: s }, e.id)) })
|
|
480
470
|
] }) : null,
|
|
481
471
|
u !== null && u.length === 0 && !y.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,
|
|
482
|
-
|
|
472
|
+
De.map((e) => /* @__PURE__ */ l("section", { className: "space-y-1.5", children: [
|
|
483
473
|
/* @__PURE__ */ r("h2", { className: "px-1 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground", children: e.label }),
|
|
484
474
|
/* @__PURE__ */ r("div", { className: "overflow-hidden rounded-2xl border border-border bg-card/40 shadow-sm", children: e.items.map((t) => {
|
|
485
475
|
const d = !!t.sessionId && o.has(t.sessionId), a = Z(A, {
|
|
486
|
-
id:
|
|
476
|
+
id: F(t),
|
|
487
477
|
ts: t.ts
|
|
488
478
|
}), n = t.mediaItems.length > 0;
|
|
489
479
|
return /* @__PURE__ */ l("article", { className: "relative border-b border-border/50 last:border-b-0", children: [
|
|
@@ -513,7 +503,7 @@ function mt({
|
|
|
513
503
|
/* @__PURE__ */ r(
|
|
514
504
|
"img",
|
|
515
505
|
{
|
|
516
|
-
src:
|
|
506
|
+
src: He(t.agent),
|
|
517
507
|
alt: be(t.agent),
|
|
518
508
|
className: "size-7 rounded-full border border-border bg-background p-1"
|
|
519
509
|
}
|
|
@@ -533,21 +523,21 @@ function mt({
|
|
|
533
523
|
"· ",
|
|
534
524
|
t.project
|
|
535
525
|
] }) : null,
|
|
536
|
-
/* @__PURE__ */ r("span", { className: "ml-auto shrink-0 tabular-nums", children:
|
|
526
|
+
/* @__PURE__ */ r("span", { className: "ml-auto shrink-0 tabular-nums", children: q(t.ts) })
|
|
537
527
|
] }),
|
|
538
528
|
/* @__PURE__ */ r("h3", { className: "mt-0.5 line-clamp-2 text-[13.5px] font-semibold leading-snug tracking-[-0.01em]", children: t.title }),
|
|
539
529
|
t.summary ? (
|
|
540
530
|
// Plain text, two lines. Rendering markdown for a body
|
|
541
531
|
// that is clamped to two lines cost a whole markdown
|
|
542
532
|
// tree per row for text nobody can see.
|
|
543
|
-
/* @__PURE__ */ r("p", { className: "mt-0.5 line-clamp-2 text-[12.5px] leading-relaxed text-muted-foreground", children:
|
|
533
|
+
/* @__PURE__ */ r("p", { className: "mt-0.5 line-clamp-2 text-[12.5px] leading-relaxed text-muted-foreground", children: Ve(t.summary) })
|
|
544
534
|
) : null
|
|
545
535
|
] })
|
|
546
536
|
]
|
|
547
537
|
}
|
|
548
538
|
),
|
|
549
539
|
n ? /* @__PURE__ */ r("div", { className: "absolute right-3.5 top-2.5", children: /* @__PURE__ */ r(
|
|
550
|
-
|
|
540
|
+
at,
|
|
551
541
|
{
|
|
552
542
|
items: t.mediaItems,
|
|
553
543
|
total: t.mediaTotal ?? t.mediaItems.length,
|
|
@@ -561,7 +551,7 @@ function mt({
|
|
|
561
551
|
"button",
|
|
562
552
|
{
|
|
563
553
|
type: "button",
|
|
564
|
-
onClick: () => void
|
|
554
|
+
onClick: () => void Ce(),
|
|
565
555
|
disabled: G,
|
|
566
556
|
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",
|
|
567
557
|
children: G ? "Loading…" : `Load more · ${Y - u.length} left`
|
|
@@ -571,5 +561,5 @@ function mt({
|
|
|
571
561
|
] });
|
|
572
562
|
}
|
|
573
563
|
export {
|
|
574
|
-
|
|
564
|
+
ut as default
|
|
575
565
|
};
|