@omg-dev/app 0.1.399 → 0.1.401
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-DGV8uBAN.js → ChangelogPage-CBTGfRlb.js} +19 -1
- package/dist-lib/{SessionFilesPanel-WtWSOlAI.js → SessionFilesPanel-DFxTkeKg.js} +1 -1
- package/dist-lib/{TermView-DdSS9rss.js → TermView-D1-ZlzmR.js} +1 -1
- package/dist-lib/{chat-engine-B8p3R2HF.js → chat-engine-CIJaU8N0.js} +1 -1
- package/dist-lib/{coding-agents-page-fdyuOwFb.js → coding-agents-page-DNfYqSp-.js} +1 -1
- package/dist-lib/{embedded-BBlmRSMA.js → embedded-DwiVQpqX.js} +10 -10
- package/dist-lib/{highlighted-body-OFNGDK62-6vTmpHn0.js → highlighted-body-OFNGDK62-ByR7npS6.js} +1 -1
- package/dist-lib/{index-FKr8PaIX.js → index-CqiqXf5Q.js} +1 -1
- package/dist-lib/index.js +1 -1
- package/dist-lib/mermaid-GHXKKRXX-BCoMi0yK.js +4 -0
- package/dist-lib/{resume-session-sheet-sl7h4Xq_.js → resume-session-sheet-BATOKG90.js} +1 -1
- package/dist-lib/{session-token-usage-Cg5WLzaH.js → session-token-usage-C2V7e-YV.js} +1 -1
- package/dist-lib/{shipped-page-DgXw-kUV.js → shipped-page-zXaiyRnx.js} +228 -206
- package/dist-lib/{streamdown-response-3C4nnxxf.js → streamdown-response-CmidQ6aF.js} +4 -4
- package/dist-lib/styles.css +1 -1
- package/package.json +2 -2
- package/dist-lib/mermaid-GHXKKRXX-KxkykKcJ.js +0 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { y as
|
|
4
|
-
import { cn as
|
|
1
|
+
import { jsxs as o, jsx as s, Fragment as me } from "react/jsx-runtime";
|
|
2
|
+
import { useState as h, useEffect as w, useRef as he, useContext as Me, useMemo as Te } from "react";
|
|
3
|
+
import { y as ye, N as fe, O as ze, Q as j, U as ge, V as Se, W as je, Y as Pe, B as Fe, L as pe, u as J, x as Ye, R as Be, T as Ge, Z as Ke, j as be, f as Ue, _ as He, a as D, $ as k, a0 as L, k as R, a1 as W, a2 as Ve, a3 as qe, a4 as Qe, a5 as Xe, P as Je, a6 as We } from "./embedded-DwiVQpqX.js";
|
|
4
|
+
import { cn as _ } from "cnfast";
|
|
5
5
|
/**
|
|
6
6
|
* @license lucide-react v0.577.0 - ISC
|
|
7
7
|
*
|
|
@@ -11,7 +11,7 @@ import { cn as P } from "cnfast";
|
|
|
11
11
|
const Ze = [
|
|
12
12
|
["path", { d: "M18 6 7 17l-5-5", key: "116fxf" }],
|
|
13
13
|
["path", { d: "m22 10-7.5 7.5L13 16", key: "ke71qq" }]
|
|
14
|
-
], Oe =
|
|
14
|
+
], Oe = ye("check-check", Ze);
|
|
15
15
|
/**
|
|
16
16
|
* @license lucide-react v0.577.0 - ISC
|
|
17
17
|
*
|
|
@@ -29,99 +29,99 @@ const et = [
|
|
|
29
29
|
["path", { d: "M7 11h10", key: "1twpyw" }],
|
|
30
30
|
["path", { d: "M7 15h6", key: "d9of3u" }],
|
|
31
31
|
["path", { d: "M7 7h8", key: "af5zfr" }]
|
|
32
|
-
], tt =
|
|
33
|
-
function
|
|
34
|
-
return `${rt}${(
|
|
32
|
+
], tt = ye("message-square-text", et), O = "lfg-notification-read-state", rt = "lfg_notification_reads_v1:";
|
|
33
|
+
function ve(r) {
|
|
34
|
+
return `${rt}${(r == null ? void 0 : r.trim().toLowerCase()) || "__device__"}`;
|
|
35
35
|
}
|
|
36
|
-
function st(
|
|
37
|
-
if (!
|
|
38
|
-
const i =
|
|
39
|
-
return { through:
|
|
36
|
+
function st(r) {
|
|
37
|
+
if (!r || typeof r != "object") return null;
|
|
38
|
+
const i = r, d = typeof i.through == "number" && Number.isFinite(i.through) ? Math.max(0, i.through) : 0, l = Array.isArray(i.ids) ? i.ids.filter((m) => typeof m == "string").slice(-500) : [];
|
|
39
|
+
return { through: d, ids: [...new Set(l)] };
|
|
40
40
|
}
|
|
41
|
-
function M(
|
|
41
|
+
function M(r) {
|
|
42
42
|
if (typeof window > "u") return null;
|
|
43
43
|
try {
|
|
44
|
-
return st(JSON.parse(localStorage.getItem(
|
|
44
|
+
return st(JSON.parse(localStorage.getItem(ve(r)) ?? "null"));
|
|
45
45
|
} catch {
|
|
46
46
|
return null;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
function Ne(
|
|
50
|
-
return typeof window > "u" || (localStorage.setItem(
|
|
49
|
+
function Ne(r, i) {
|
|
50
|
+
return typeof window > "u" || (localStorage.setItem(ve(r), JSON.stringify(i)), window.dispatchEvent(
|
|
51
51
|
new CustomEvent(O, {
|
|
52
|
-
detail: { identity: (
|
|
52
|
+
detail: { identity: (r == null ? void 0 : r.trim().toLowerCase()) || "__device__" }
|
|
53
53
|
})
|
|
54
54
|
)), i;
|
|
55
55
|
}
|
|
56
|
-
function
|
|
57
|
-
return `shipped:${
|
|
56
|
+
function P(r) {
|
|
57
|
+
return `shipped:${r.id}:${r.rev}`;
|
|
58
58
|
}
|
|
59
|
-
function Z(
|
|
60
|
-
return
|
|
59
|
+
function Z(r, i) {
|
|
60
|
+
return r ? i.ts > r.through && !r.ids.includes(i.id) : !1;
|
|
61
61
|
}
|
|
62
|
-
function nt(
|
|
63
|
-
const
|
|
64
|
-
return
|
|
65
|
-
...
|
|
66
|
-
ids: [...
|
|
62
|
+
function nt(r, i) {
|
|
63
|
+
const d = M(r) ?? { through: 0, ids: [] };
|
|
64
|
+
return d.ids.includes(i) ? d : Ne(r, {
|
|
65
|
+
...d,
|
|
66
|
+
ids: [...d.ids, i].slice(-500)
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
|
-
function xe(
|
|
70
|
-
const
|
|
71
|
-
return Ne(
|
|
72
|
-
through: Math.max(
|
|
73
|
-
ids:
|
|
69
|
+
function xe(r, i) {
|
|
70
|
+
const d = M(r) ?? { through: 0, ids: [] };
|
|
71
|
+
return Ne(r, {
|
|
72
|
+
through: Math.max(d.through, i),
|
|
73
|
+
ids: d.ids
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
76
|
function at({
|
|
77
|
-
path:
|
|
77
|
+
path: r,
|
|
78
78
|
cacheKey: i,
|
|
79
|
-
children:
|
|
79
|
+
children: d
|
|
80
80
|
}) {
|
|
81
|
-
return /* @__PURE__ */
|
|
82
|
-
/* @__PURE__ */
|
|
83
|
-
|
|
81
|
+
return /* @__PURE__ */ o("div", { className: "relative h-32 w-full overflow-hidden bg-background", children: [
|
|
82
|
+
/* @__PURE__ */ s(qe, { path: r, cacheKey: i, className: "h-full w-full" }),
|
|
83
|
+
d
|
|
84
84
|
] });
|
|
85
85
|
}
|
|
86
86
|
function it({
|
|
87
|
-
items:
|
|
87
|
+
items: r,
|
|
88
88
|
total: i,
|
|
89
|
-
onExpand:
|
|
89
|
+
onExpand: d
|
|
90
90
|
}) {
|
|
91
|
-
const
|
|
92
|
-
if (!
|
|
91
|
+
const l = r[0];
|
|
92
|
+
if (!l) return null;
|
|
93
93
|
const m = Math.max(0, i - 1);
|
|
94
|
-
return /* @__PURE__ */
|
|
94
|
+
return /* @__PURE__ */ o(
|
|
95
95
|
"button",
|
|
96
96
|
{
|
|
97
97
|
type: "button",
|
|
98
|
-
onClick: () =>
|
|
99
|
-
url:
|
|
100
|
-
kind:
|
|
101
|
-
caption:
|
|
102
|
-
name:
|
|
103
|
-
version:
|
|
104
|
-
cacheKey:
|
|
98
|
+
onClick: () => d == null ? void 0 : d({
|
|
99
|
+
url: l.url,
|
|
100
|
+
kind: l.kind,
|
|
101
|
+
caption: l.caption,
|
|
102
|
+
name: l.name,
|
|
103
|
+
version: l.version,
|
|
104
|
+
cacheKey: l.updatedAt
|
|
105
105
|
}),
|
|
106
|
-
"aria-label": `Open ${
|
|
107
|
-
title:
|
|
106
|
+
"aria-label": `Open ${l.caption || l.name}`,
|
|
107
|
+
title: l.caption || l.name,
|
|
108
108
|
className: "relative size-[52px] shrink-0 overflow-hidden rounded-lg border border-border/60 bg-muted transition-transform active:scale-[0.97]",
|
|
109
109
|
children: [
|
|
110
|
-
|
|
110
|
+
l.kind === "image" ? /* @__PURE__ */ s(
|
|
111
111
|
Qe,
|
|
112
112
|
{
|
|
113
|
-
path:
|
|
114
|
-
alt:
|
|
113
|
+
path: l.url,
|
|
114
|
+
alt: l.caption || l.name,
|
|
115
115
|
thumb: !0,
|
|
116
116
|
className: "size-full object-cover"
|
|
117
117
|
}
|
|
118
|
-
) :
|
|
118
|
+
) : l.kind === "html" ? (
|
|
119
119
|
// Deliberately an icon, not a live preview. A document scaled into a
|
|
120
120
|
// 52px box is two words of giant text — unreadable, and it costs a
|
|
121
121
|
// fetch + parse per row. The Artifacts page is where previews belong.
|
|
122
|
-
/* @__PURE__ */
|
|
123
|
-
) : /* @__PURE__ */
|
|
124
|
-
m > 0 ? /* @__PURE__ */
|
|
122
|
+
/* @__PURE__ */ s("span", { className: "flex size-full items-center justify-center bg-primary/10 text-primary", children: /* @__PURE__ */ s(Xe, { className: "size-4" }) })
|
|
123
|
+
) : /* @__PURE__ */ s("span", { className: "flex size-full items-center justify-center bg-black/80 text-white/80", children: /* @__PURE__ */ s(Je, { className: "size-4" }) }),
|
|
124
|
+
m > 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: [
|
|
125
125
|
"+",
|
|
126
126
|
m
|
|
127
127
|
] }) : null
|
|
@@ -129,94 +129,113 @@ function it({
|
|
|
129
129
|
}
|
|
130
130
|
);
|
|
131
131
|
}
|
|
132
|
-
function lt(
|
|
133
|
-
const
|
|
134
|
-
const
|
|
135
|
-
return new Date(
|
|
136
|
-
},
|
|
137
|
-
if (
|
|
138
|
-
if (
|
|
139
|
-
const m = new Date(
|
|
132
|
+
function lt(r, i) {
|
|
133
|
+
const d = (p) => {
|
|
134
|
+
const y = new Date(p);
|
|
135
|
+
return new Date(y.getFullYear(), y.getMonth(), y.getDate()).getTime();
|
|
136
|
+
}, l = Math.round((d(i) - d(r)) / 864e5);
|
|
137
|
+
if (l <= 0) return "Today";
|
|
138
|
+
if (l === 1) return "Yesterday";
|
|
139
|
+
const m = new Date(r);
|
|
140
140
|
return m.toLocaleDateString(void 0, {
|
|
141
141
|
month: "long",
|
|
142
142
|
day: "numeric",
|
|
143
143
|
...m.getFullYear() === new Date(i).getFullYear() ? {} : { year: "numeric" }
|
|
144
144
|
});
|
|
145
145
|
}
|
|
146
|
-
function
|
|
147
|
-
|
|
146
|
+
function ot({ code: r }) {
|
|
147
|
+
if (!r || r.state === "landed") return null;
|
|
148
|
+
const i = r.state === "uncommitted" ? `${r.dirty} uncommitted` : r.state === "unlanded" ? `${r.ahead} not on main` : r.state === "clean" ? "no code" : "no git", d = r.state === "uncommitted" ? "border-amber-500/40 bg-amber-500/10 text-amber-600 dark:text-amber-400" : r.state === "unlanded" ? "border-sky-500/40 bg-sky-500/10 text-sky-600 dark:text-sky-400" : "border-border bg-muted/40 text-muted-foreground", l = [
|
|
149
|
+
r.state === "uncommitted" ? "Shipped with uncommitted changes in the session worktree." : r.state === "unlanded" ? "Committed, but these commits have not reached origin/main." : r.state === "clean" ? "No code changes in this session's worktree." : "The session worktree was not a readable Git checkout.",
|
|
150
|
+
r.branch ? `branch ${r.branch}` : null,
|
|
151
|
+
r.head ? `head ${r.head}` : null
|
|
152
|
+
].filter(Boolean).join(" · ");
|
|
153
|
+
return /* @__PURE__ */ s(
|
|
154
|
+
"span",
|
|
155
|
+
{
|
|
156
|
+
title: l,
|
|
157
|
+
className: _(
|
|
158
|
+
"shrink-0 rounded-full border px-1.5 py-px text-[10px] font-medium leading-tight",
|
|
159
|
+
d
|
|
160
|
+
),
|
|
161
|
+
children: i
|
|
162
|
+
}
|
|
163
|
+
);
|
|
164
|
+
}
|
|
165
|
+
function ht({
|
|
166
|
+
onOpenSession: r,
|
|
148
167
|
onOpenArtifactSession: i,
|
|
149
|
-
onReviewSession:
|
|
150
|
-
liveSessionIds:
|
|
168
|
+
onReviewSession: d,
|
|
169
|
+
liveSessionIds: l,
|
|
151
170
|
notificationIdentity: m,
|
|
152
171
|
artifactsOnly: p = !1,
|
|
153
|
-
active:
|
|
172
|
+
active: y = !0
|
|
154
173
|
}) {
|
|
155
|
-
const
|
|
174
|
+
const f = p ? "artifacts" : "feed", b = p ? fe(L) : null, x = p ? null : fe(W), [u, F] = h(() => (x == null ? void 0 : x.items) ?? null), [Y, ee] = h(() => (x == null ? void 0 : x.total) ?? 0), [B, te] = h(!1), [A, I] = h(
|
|
156
175
|
() => p ? null : M(m)
|
|
157
|
-
), [
|
|
176
|
+
), [G, re] = h(!1), [K, se] = h(null), { questions: v, busy: we, dismissAll: ke } = ze(), [U, T] = h(!1);
|
|
158
177
|
w(() => {
|
|
159
|
-
|
|
160
|
-
}, [
|
|
161
|
-
const [N,
|
|
178
|
+
T(!1);
|
|
179
|
+
}, [v.length]);
|
|
180
|
+
const [N, C] = h(() => (b == null ? void 0 : b.items) ?? null), [E, H] = h(() => (b == null ? void 0 : b.total) ?? 0), [V, ne] = h(!1), [ae, ie] = h(null), [le, oe] = h(null), de = "&kind=html", $ = he(Math.max(j, (b == null ? void 0 : b.items.length) ?? 0)), q = he(Math.max(ge, (x == null ? void 0 : x.items.length) ?? 0)), ce = Me(Se), Ae = je();
|
|
162
181
|
w(() => {
|
|
163
|
-
|
|
164
|
-
}, [m,
|
|
165
|
-
if (
|
|
166
|
-
const e = u.reduce((t,
|
|
182
|
+
f === "feed" && I(M(m));
|
|
183
|
+
}, [m, f]), w(() => {
|
|
184
|
+
if (f !== "feed" || u === null || A) return;
|
|
185
|
+
const e = u.reduce((t, c) => Math.max(t, c.ts), Date.now());
|
|
167
186
|
I(xe(m, e));
|
|
168
|
-
}, [m, A, u,
|
|
169
|
-
if (
|
|
187
|
+
}, [m, A, u, f]), w(() => {
|
|
188
|
+
if (f !== "feed") return;
|
|
170
189
|
const e = () => I(M(m));
|
|
171
190
|
return window.addEventListener("storage", e), window.addEventListener(O, e), () => {
|
|
172
191
|
window.removeEventListener("storage", e), window.removeEventListener(O, e);
|
|
173
192
|
};
|
|
174
|
-
}, [m,
|
|
175
|
-
if (
|
|
193
|
+
}, [m, f]), w(() => {
|
|
194
|
+
if (f !== "artifacts") return;
|
|
176
195
|
let e = !0;
|
|
177
196
|
const t = async () => {
|
|
178
197
|
try {
|
|
179
|
-
const a = await
|
|
180
|
-
`/api/artifacts?limit=${
|
|
198
|
+
const a = await D(
|
|
199
|
+
`/api/artifacts?limit=${j}${de}`,
|
|
181
200
|
{ cache: "no-store" }
|
|
182
201
|
);
|
|
183
202
|
if (!e) return;
|
|
184
203
|
const n = Array.isArray(a.artifacts) ? a.artifacts : [], g = a.total ?? n.length;
|
|
185
|
-
|
|
186
|
-
const
|
|
187
|
-
return
|
|
204
|
+
C((z) => {
|
|
205
|
+
const S = new Set(n.map((X) => X.id)), _e = (z ?? []).filter((X) => !S.has(X.id)), Q = [...n, ..._e];
|
|
206
|
+
return $.current = Math.max(j, Q.length), k(L, Q, g), Q;
|
|
188
207
|
}), H(g);
|
|
189
208
|
} catch {
|
|
190
|
-
e &&
|
|
209
|
+
e && C((a) => a ?? []);
|
|
191
210
|
}
|
|
192
211
|
};
|
|
193
|
-
if (t(), !
|
|
212
|
+
if (t(), !y)
|
|
194
213
|
return () => {
|
|
195
214
|
e = !1;
|
|
196
215
|
};
|
|
197
|
-
const
|
|
216
|
+
const c = setInterval(() => void t(), 2e4);
|
|
198
217
|
return () => {
|
|
199
|
-
e = !1, clearInterval(
|
|
218
|
+
e = !1, clearInterval(c);
|
|
200
219
|
};
|
|
201
|
-
}, [
|
|
220
|
+
}, [f, y]);
|
|
202
221
|
const Ie = async () => {
|
|
203
222
|
if (!V) {
|
|
204
223
|
ne(!0);
|
|
205
224
|
try {
|
|
206
|
-
const e = await
|
|
207
|
-
`/api/artifacts?limit=${
|
|
225
|
+
const e = await D(
|
|
226
|
+
`/api/artifacts?limit=${j}&offset=${$.current}${de}`,
|
|
208
227
|
{ cache: "no-store" }
|
|
209
228
|
);
|
|
210
|
-
|
|
211
|
-
const
|
|
212
|
-
return
|
|
229
|
+
C((t) => {
|
|
230
|
+
const c = new Set((t ?? []).map((n) => n.id)), a = [...t ?? [], ...e.artifacts.filter((n) => !c.has(n.id))];
|
|
231
|
+
return $.current = a.length, k(L, a, e.total ?? E), a;
|
|
213
232
|
}), H((t) => e.total ?? t);
|
|
214
233
|
} catch {
|
|
215
234
|
} finally {
|
|
216
235
|
ne(!1);
|
|
217
236
|
}
|
|
218
237
|
}
|
|
219
|
-
},
|
|
238
|
+
}, Ce = async (e) => {
|
|
220
239
|
const t = e.title || e.caption || e.name;
|
|
221
240
|
if (await Ae.confirm({
|
|
222
241
|
title: `Delete ${t}?`,
|
|
@@ -226,78 +245,78 @@ function mt({
|
|
|
226
245
|
})) {
|
|
227
246
|
oe(e.id);
|
|
228
247
|
try {
|
|
229
|
-
await
|
|
248
|
+
await D(
|
|
230
249
|
`/api/sessions/${encodeURIComponent(e.sessionId ?? "")}/artifacts/${encodeURIComponent(e.id)}`,
|
|
231
250
|
{
|
|
232
251
|
method: "DELETE",
|
|
233
252
|
headers: { "X-LFG-Session-ID": e.sessionId ?? "" }
|
|
234
253
|
}
|
|
235
|
-
),
|
|
254
|
+
), C((a) => {
|
|
236
255
|
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)),
|
|
256
|
+
return n && k(L, n, Math.max(0, E - 1)), n;
|
|
257
|
+
}), H((a) => Math.max(0, a - 1)), $.current = Math.max(0, $.current - 1), R.success("Artifact deleted");
|
|
239
258
|
} catch (a) {
|
|
240
|
-
|
|
259
|
+
R.error(a instanceof Error ? a.message : "Couldn't delete artifact");
|
|
241
260
|
} finally {
|
|
242
261
|
oe(null);
|
|
243
262
|
}
|
|
244
263
|
}
|
|
245
|
-
},
|
|
264
|
+
}, Ee = async (e) => {
|
|
246
265
|
if (!(!e.sessionId || e.refreshEnabled === void 0)) {
|
|
247
266
|
ie(e.id);
|
|
248
267
|
try {
|
|
249
|
-
const t = await
|
|
268
|
+
const t = await D(
|
|
250
269
|
`/api/sessions/${encodeURIComponent(e.sessionId)}/artifacts/html/${encodeURIComponent(e.id)}/refresh`,
|
|
251
270
|
{
|
|
252
271
|
method: "POST",
|
|
253
272
|
headers: { "X-LFG-Session-ID": e.sessionId }
|
|
254
273
|
}
|
|
255
274
|
);
|
|
256
|
-
|
|
257
|
-
const a = (
|
|
258
|
-
var g,
|
|
275
|
+
C((c) => {
|
|
276
|
+
const a = (c == null ? void 0 : c.map((n) => {
|
|
277
|
+
var g, z, S;
|
|
259
278
|
return n.id === e.id ? {
|
|
260
279
|
...n,
|
|
261
280
|
ts: t.artifact.updatedAt ?? n.ts,
|
|
262
281
|
version: t.artifact.version ?? n.version,
|
|
263
282
|
size: t.artifact.size ?? n.size,
|
|
264
283
|
lastRefreshedAt: ((g = t.artifact.refresh) == null ? void 0 : g.lastSuccessAt) ?? n.lastRefreshedAt,
|
|
265
|
-
refreshStatus: ((
|
|
266
|
-
refreshEnabled: ((
|
|
284
|
+
refreshStatus: ((z = t.artifact.refresh) == null ? void 0 : z.status) ?? n.refreshStatus,
|
|
285
|
+
refreshEnabled: ((S = t.artifact.refresh) == null ? void 0 : S.enabled) ?? n.refreshEnabled
|
|
267
286
|
} : n;
|
|
268
287
|
})) ?? null;
|
|
269
|
-
return a && k(
|
|
270
|
-
}),
|
|
288
|
+
return a && k(L, a, E), a;
|
|
289
|
+
}), R.success("Artifact refreshed");
|
|
271
290
|
} catch (t) {
|
|
272
|
-
|
|
291
|
+
R.error(t instanceof Error ? t.message : "Couldn't refresh artifact");
|
|
273
292
|
} finally {
|
|
274
293
|
ie(null);
|
|
275
294
|
}
|
|
276
295
|
}
|
|
277
296
|
};
|
|
278
297
|
w(() => {
|
|
279
|
-
if (!(
|
|
280
|
-
return
|
|
298
|
+
if (!(f !== "feed" || !y))
|
|
299
|
+
return Pe((e) => {
|
|
281
300
|
if (!e.ok) {
|
|
282
301
|
F((t) => (t === null && se(e.error), t));
|
|
283
302
|
return;
|
|
284
303
|
}
|
|
285
304
|
F((t) => {
|
|
286
|
-
const
|
|
305
|
+
const c = new Set(e.posts.map((g) => g.id)), a = (t ?? []).filter((g) => !c.has(g.id)), n = [...e.posts, ...a];
|
|
287
306
|
return q.current = Math.max(We, n.length), k(W, n, e.total), n;
|
|
288
307
|
}), ee(e.total), se(null);
|
|
289
308
|
});
|
|
290
|
-
}, [
|
|
291
|
-
const
|
|
292
|
-
if (!
|
|
309
|
+
}, [f, y]);
|
|
310
|
+
const $e = async () => {
|
|
311
|
+
if (!B) {
|
|
293
312
|
te(!0);
|
|
294
313
|
try {
|
|
295
|
-
const e = await
|
|
314
|
+
const e = await D(
|
|
296
315
|
`/api/shipped?limit=${ge}&offset=${q.current}`,
|
|
297
316
|
{ cache: "no-store" }
|
|
298
317
|
);
|
|
299
318
|
F((t) => {
|
|
300
|
-
const
|
|
319
|
+
const c = new Set((t ?? []).map((n) => n.id)), a = [...t ?? [], ...e.posts.filter((n) => !c.has(n.id))];
|
|
301
320
|
return q.current = a.length, k(W, a, e.total ?? Y), a;
|
|
302
321
|
}), ee((t) => e.total ?? t);
|
|
303
322
|
} catch {
|
|
@@ -307,69 +326,69 @@ function mt({
|
|
|
307
326
|
}
|
|
308
327
|
}, ue = (u == null ? void 0 : u.filter(
|
|
309
328
|
(e) => Z(A, {
|
|
310
|
-
id:
|
|
329
|
+
id: P(e),
|
|
311
330
|
ts: e.ts
|
|
312
331
|
})
|
|
313
|
-
).length) ?? 0,
|
|
332
|
+
).length) ?? 0, De = Te(() => {
|
|
314
333
|
if (!(u != null && u.length)) return [];
|
|
315
334
|
const e = Date.now(), t = [];
|
|
316
|
-
for (const
|
|
317
|
-
const a = lt(
|
|
318
|
-
n && n.label === a ? n.items.push(
|
|
335
|
+
for (const c of u) {
|
|
336
|
+
const a = lt(c.ts, e), n = t[t.length - 1];
|
|
337
|
+
n && n.label === a ? n.items.push(c) : t.push({ label: a, items: [c] });
|
|
319
338
|
}
|
|
320
339
|
return t;
|
|
321
|
-
}, [u]),
|
|
340
|
+
}, [u]), Le = (e) => {
|
|
322
341
|
Z(A, {
|
|
323
|
-
id:
|
|
342
|
+
id: P(e),
|
|
324
343
|
ts: e.ts
|
|
325
344
|
}) && I(
|
|
326
|
-
nt(m,
|
|
345
|
+
nt(m, P(e))
|
|
327
346
|
);
|
|
328
|
-
},
|
|
329
|
-
if (!
|
|
347
|
+
}, Re = async () => {
|
|
348
|
+
if (!G) {
|
|
330
349
|
re(!0);
|
|
331
350
|
try {
|
|
332
351
|
const e = Math.max(Date.now(), ...(u ?? []).map((t) => t.ts));
|
|
333
|
-
I(xe(m, e)), await Ve(),
|
|
352
|
+
I(xe(m, e)), await Ve(), R.success("Notifications marked read");
|
|
334
353
|
} finally {
|
|
335
354
|
re(!1);
|
|
336
355
|
}
|
|
337
356
|
}
|
|
338
357
|
};
|
|
339
|
-
return /* @__PURE__ */
|
|
340
|
-
/* @__PURE__ */
|
|
341
|
-
/* @__PURE__ */
|
|
342
|
-
/* @__PURE__ */
|
|
343
|
-
p ? /* @__PURE__ */
|
|
358
|
+
return /* @__PURE__ */ o("div", { className: "mx-auto max-w-xl space-y-4 pb-10", "data-lfg-page-column": !0, children: [
|
|
359
|
+
/* @__PURE__ */ o("div", { className: "flex items-center justify-between px-1", children: [
|
|
360
|
+
/* @__PURE__ */ o("div", { children: [
|
|
361
|
+
/* @__PURE__ */ s("h1", { className: "text-lg font-semibold tracking-[-0.01em]", children: p ? "Artifacts" : "Notifications" }),
|
|
362
|
+
p ? /* @__PURE__ */ s("p", { className: "mt-0.5 text-xs text-muted-foreground", children: "Interactive reports and live dashboards" }) : /* @__PURE__ */ s("p", { className: "mt-0.5 text-xs text-muted-foreground", children: v.length ? `${v.length} waiting on you` : ue ? `${ue} unread` : "You're all caught up" })
|
|
344
363
|
] }),
|
|
345
364
|
!p && u !== null ? (
|
|
346
365
|
// Icon only. It is a rare, undoable housekeeping action — it does not
|
|
347
366
|
// need to be the second-loudest thing on the page.
|
|
348
|
-
/* @__PURE__ */
|
|
367
|
+
/* @__PURE__ */ s(
|
|
349
368
|
Fe,
|
|
350
369
|
{
|
|
351
370
|
size: "icon-sm",
|
|
352
371
|
variant: "ghost",
|
|
353
372
|
"aria-label": "Mark all read",
|
|
354
373
|
title: "Mark all read — clears the app icon badge",
|
|
355
|
-
disabled:
|
|
356
|
-
onClick: () => void
|
|
357
|
-
children:
|
|
374
|
+
disabled: G,
|
|
375
|
+
onClick: () => void Re(),
|
|
376
|
+
children: G ? /* @__PURE__ */ s(pe, { className: "size-4 animate-spin" }) : /* @__PURE__ */ s(Oe, { className: "size-4" })
|
|
358
377
|
}
|
|
359
378
|
)
|
|
360
379
|
) : null
|
|
361
380
|
] }),
|
|
362
|
-
|
|
363
|
-
N === null ? /* @__PURE__ */
|
|
381
|
+
f === "artifacts" ? /* @__PURE__ */ o(me, { children: [
|
|
382
|
+
N === null ? /* @__PURE__ */ s("div", { className: "py-10 text-center text-sm text-muted-foreground", children: "Loading…" }) : N.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: [
|
|
364
383
|
"No artifacts yet — agents create them with ",
|
|
365
|
-
/* @__PURE__ */
|
|
384
|
+
/* @__PURE__ */ s("code", { children: "omg_publish_artifact" }),
|
|
366
385
|
"."
|
|
367
|
-
] }) : /* @__PURE__ */
|
|
386
|
+
] }) : /* @__PURE__ */ s("div", { className: "grid grid-cols-2 gap-2 sm:grid-cols-3", children: N.map((e) => /* @__PURE__ */ o(
|
|
368
387
|
"div",
|
|
369
388
|
{
|
|
370
389
|
className: "group relative overflow-hidden rounded-xl border border-border bg-card/40 text-left shadow-sm transition-colors hover:border-foreground/20",
|
|
371
390
|
children: [
|
|
372
|
-
/* @__PURE__ */
|
|
391
|
+
/* @__PURE__ */ o(
|
|
373
392
|
"button",
|
|
374
393
|
{
|
|
375
394
|
type: "button",
|
|
@@ -384,19 +403,19 @@ function mt({
|
|
|
384
403
|
}),
|
|
385
404
|
className: "block w-full text-left active:scale-[0.99]",
|
|
386
405
|
children: [
|
|
387
|
-
/* @__PURE__ */
|
|
388
|
-
/* @__PURE__ */
|
|
406
|
+
/* @__PURE__ */ s(at, { 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: [
|
|
407
|
+
/* @__PURE__ */ s("span", { className: "size-1.5 rounded-full bg-emerald-500" }),
|
|
389
408
|
"live · v",
|
|
390
409
|
e.version
|
|
391
410
|
] }) : null }),
|
|
392
|
-
/* @__PURE__ */
|
|
393
|
-
/* @__PURE__ */
|
|
394
|
-
/* @__PURE__ */
|
|
411
|
+
/* @__PURE__ */ o("div", { className: "px-2.5 py-2 pr-9", children: [
|
|
412
|
+
/* @__PURE__ */ s("div", { className: "truncate text-xs font-medium", children: e.title || e.caption || e.name }),
|
|
413
|
+
/* @__PURE__ */ s("div", { className: "mt-0.5 truncate text-[10px] text-muted-foreground", children: e.lastRefreshedAt ? `Refreshed ${J(e.lastRefreshedAt)}` : `Published ${J(e.ts)}` })
|
|
395
414
|
] })
|
|
396
415
|
]
|
|
397
416
|
}
|
|
398
417
|
),
|
|
399
|
-
e.sessionId ? /* @__PURE__ */
|
|
418
|
+
e.sessionId ? /* @__PURE__ */ o(
|
|
400
419
|
"button",
|
|
401
420
|
{
|
|
402
421
|
type: "button",
|
|
@@ -405,33 +424,33 @@ function mt({
|
|
|
405
424
|
title: e.sessionTitle || e.project || "Open related session",
|
|
406
425
|
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
426
|
children: [
|
|
408
|
-
/* @__PURE__ */
|
|
409
|
-
/* @__PURE__ */
|
|
410
|
-
/* @__PURE__ */
|
|
427
|
+
/* @__PURE__ */ s(tt, { className: "size-3 shrink-0", "aria-hidden": !0 }),
|
|
428
|
+
/* @__PURE__ */ s("span", { className: "min-w-0 flex-1 truncate text-left", children: e.sessionTitle || e.project || "Related session" }),
|
|
429
|
+
/* @__PURE__ */ s(Ye, { className: "size-3 shrink-0", "aria-hidden": !0 })
|
|
411
430
|
]
|
|
412
431
|
}
|
|
413
432
|
) : null,
|
|
414
|
-
/* @__PURE__ */
|
|
415
|
-
e.refreshEnabled !== void 0 ? /* @__PURE__ */
|
|
433
|
+
/* @__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: [
|
|
434
|
+
e.refreshEnabled !== void 0 ? /* @__PURE__ */ s(
|
|
416
435
|
"button",
|
|
417
436
|
{
|
|
418
437
|
type: "button",
|
|
419
|
-
onClick: () => void
|
|
438
|
+
onClick: () => void Ee(e),
|
|
420
439
|
disabled: ae === e.id,
|
|
421
440
|
"aria-label": `Refresh ${e.title || e.caption || e.name}`,
|
|
422
441
|
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__ */
|
|
442
|
+
children: /* @__PURE__ */ s(Be, { className: _("size-3.5", ae === e.id && "animate-spin") })
|
|
424
443
|
}
|
|
425
444
|
) : null,
|
|
426
|
-
/* @__PURE__ */
|
|
445
|
+
/* @__PURE__ */ s(
|
|
427
446
|
"button",
|
|
428
447
|
{
|
|
429
448
|
type: "button",
|
|
430
|
-
onClick: () => void
|
|
449
|
+
onClick: () => void Ce(e),
|
|
431
450
|
disabled: le === e.id,
|
|
432
451
|
"aria-label": `Delete ${e.title || e.caption || e.name}`,
|
|
433
452
|
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__ */
|
|
453
|
+
children: le === e.id ? /* @__PURE__ */ s(pe, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ s(Ge, { className: "size-3.5" })
|
|
435
454
|
}
|
|
436
455
|
)
|
|
437
456
|
] })
|
|
@@ -439,78 +458,78 @@ function mt({
|
|
|
439
458
|
},
|
|
440
459
|
e.id
|
|
441
460
|
)) }),
|
|
442
|
-
N !== null && N.length <
|
|
461
|
+
N !== null && N.length < E ? /* @__PURE__ */ s(
|
|
443
462
|
"button",
|
|
444
463
|
{
|
|
445
464
|
type: "button",
|
|
446
465
|
onClick: () => void Ie(),
|
|
447
466
|
disabled: V,
|
|
448
467
|
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
|
-
children: V ? "Loading…" : `Load more · ${
|
|
468
|
+
children: V ? "Loading…" : `Load more · ${E - N.length} left`
|
|
450
469
|
}
|
|
451
470
|
) : null
|
|
452
|
-
] }) : /* @__PURE__ */
|
|
453
|
-
K ? /* @__PURE__ */
|
|
454
|
-
u === null && !K ? /* @__PURE__ */
|
|
455
|
-
|
|
456
|
-
/* @__PURE__ */
|
|
457
|
-
/* @__PURE__ */
|
|
458
|
-
|
|
471
|
+
] }) : /* @__PURE__ */ o(me, { children: [
|
|
472
|
+
K ? /* @__PURE__ */ s("div", { className: "rounded-xl border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive", children: K }) : null,
|
|
473
|
+
u === null && !K ? /* @__PURE__ */ s("div", { className: "py-10 text-center text-sm text-muted-foreground", children: "Loading…" }) : null,
|
|
474
|
+
v.length ? /* @__PURE__ */ o("section", { className: "space-y-1.5", children: [
|
|
475
|
+
/* @__PURE__ */ o("div", { className: "flex items-center justify-between gap-2 px-1", children: [
|
|
476
|
+
/* @__PURE__ */ s("h2", { className: "text-[11px] font-semibold uppercase tracking-wide text-primary", children: "Needs you" }),
|
|
477
|
+
v.length > 1 ? /* @__PURE__ */ s(
|
|
459
478
|
"button",
|
|
460
479
|
{
|
|
461
480
|
type: "button",
|
|
462
481
|
disabled: we,
|
|
463
482
|
onClick: () => {
|
|
464
483
|
if (!U) {
|
|
465
|
-
|
|
484
|
+
T(!0);
|
|
466
485
|
return;
|
|
467
486
|
}
|
|
468
|
-
|
|
487
|
+
T(!1), ke();
|
|
469
488
|
},
|
|
470
|
-
onBlur: () =>
|
|
471
|
-
className:
|
|
489
|
+
onBlur: () => T(!1),
|
|
490
|
+
className: _(
|
|
472
491
|
"-my-1 rounded-full px-2 py-1 text-[11px] font-medium transition-colors disabled:opacity-50",
|
|
473
492
|
U ? "bg-destructive/10 text-destructive" : "text-muted-foreground hover:text-foreground"
|
|
474
493
|
),
|
|
475
|
-
children: U ? `Dismiss all ${
|
|
494
|
+
children: U ? `Dismiss all ${v.length}?` : "Dismiss all"
|
|
476
495
|
}
|
|
477
496
|
) : null
|
|
478
497
|
] }),
|
|
479
|
-
/* @__PURE__ */
|
|
498
|
+
/* @__PURE__ */ s("div", { className: "overflow-hidden rounded-2xl border border-primary/25 bg-primary/[0.03] shadow-sm", children: [...v].sort((e, t) => t.createdAt - e.createdAt).map((e) => /* @__PURE__ */ s(Ke, { q: e, onOpenSession: r }, e.id)) })
|
|
480
499
|
] }) : null,
|
|
481
|
-
u !== null && u.length === 0 && !
|
|
482
|
-
|
|
483
|
-
/* @__PURE__ */
|
|
484
|
-
/* @__PURE__ */
|
|
485
|
-
const
|
|
486
|
-
id:
|
|
500
|
+
u !== null && u.length === 0 && !v.length ? /* @__PURE__ */ s("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,
|
|
501
|
+
De.map((e) => /* @__PURE__ */ o("section", { className: "space-y-1.5", children: [
|
|
502
|
+
/* @__PURE__ */ s("h2", { className: "px-1 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground", children: e.label }),
|
|
503
|
+
/* @__PURE__ */ s("div", { className: "overflow-hidden rounded-2xl border border-border bg-card/40 shadow-sm", children: e.items.map((t) => {
|
|
504
|
+
const c = !!t.sessionId && l.has(t.sessionId), a = Z(A, {
|
|
505
|
+
id: P(t),
|
|
487
506
|
ts: t.ts
|
|
488
507
|
}), n = t.mediaItems.length > 0;
|
|
489
|
-
return /* @__PURE__ */
|
|
490
|
-
/* @__PURE__ */
|
|
508
|
+
return /* @__PURE__ */ o("article", { className: "relative border-b border-border/50 last:border-b-0", children: [
|
|
509
|
+
/* @__PURE__ */ o(
|
|
491
510
|
"button",
|
|
492
511
|
{
|
|
493
512
|
type: "button",
|
|
494
513
|
onClick: () => {
|
|
495
|
-
|
|
514
|
+
Le(t), t.sessionId && (d ? d(t) : c && r(t.sessionId));
|
|
496
515
|
},
|
|
497
|
-
className:
|
|
516
|
+
className: _(
|
|
498
517
|
"flex w-full items-start gap-2.5 py-2.5 pl-2.5 text-left transition-colors hover:bg-foreground/[0.02]",
|
|
499
518
|
n ? "pr-[4.75rem]" : "pr-3.5"
|
|
500
519
|
),
|
|
501
520
|
children: [
|
|
502
|
-
/* @__PURE__ */
|
|
521
|
+
/* @__PURE__ */ s(
|
|
503
522
|
"span",
|
|
504
523
|
{
|
|
505
|
-
className:
|
|
524
|
+
className: _(
|
|
506
525
|
"mt-3 size-1.5 shrink-0 rounded-full",
|
|
507
526
|
a && "bg-primary"
|
|
508
527
|
),
|
|
509
528
|
title: a ? "Unread" : void 0
|
|
510
529
|
}
|
|
511
530
|
),
|
|
512
|
-
/* @__PURE__ */
|
|
513
|
-
/* @__PURE__ */
|
|
531
|
+
/* @__PURE__ */ o("span", { className: "relative mt-0.5 shrink-0", children: [
|
|
532
|
+
/* @__PURE__ */ s(
|
|
514
533
|
"img",
|
|
515
534
|
{
|
|
516
535
|
src: Ue(t.agent),
|
|
@@ -518,7 +537,7 @@ function mt({
|
|
|
518
537
|
className: "size-7 rounded-full border border-border bg-background p-1"
|
|
519
538
|
}
|
|
520
539
|
),
|
|
521
|
-
|
|
540
|
+
c ? /* @__PURE__ */ s(
|
|
522
541
|
"span",
|
|
523
542
|
{
|
|
524
543
|
title: "Session is active",
|
|
@@ -526,27 +545,30 @@ function mt({
|
|
|
526
545
|
}
|
|
527
546
|
) : null
|
|
528
547
|
] }),
|
|
529
|
-
/* @__PURE__ */
|
|
530
|
-
/* @__PURE__ */
|
|
531
|
-
/* @__PURE__ */
|
|
532
|
-
t.project ? /* @__PURE__ */
|
|
548
|
+
/* @__PURE__ */ o("div", { className: "min-w-0 flex-1", children: [
|
|
549
|
+
/* @__PURE__ */ o("div", { className: "flex items-baseline gap-1.5 text-[11px] text-muted-foreground", children: [
|
|
550
|
+
/* @__PURE__ */ s("span", { className: "min-w-0 shrink truncate font-medium text-foreground/75", children: be(t.agent) }),
|
|
551
|
+
t.project ? /* @__PURE__ */ o("span", { className: "min-w-0 shrink truncate", children: [
|
|
533
552
|
"· ",
|
|
534
553
|
t.project
|
|
535
554
|
] }) : null,
|
|
536
|
-
/* @__PURE__ */
|
|
555
|
+
/* @__PURE__ */ o("span", { className: "ml-auto flex shrink-0 items-center gap-1.5", children: [
|
|
556
|
+
/* @__PURE__ */ s(ot, { code: t.code }),
|
|
557
|
+
/* @__PURE__ */ s("span", { className: "tabular-nums", children: J(t.ts) })
|
|
558
|
+
] })
|
|
537
559
|
] }),
|
|
538
|
-
/* @__PURE__ */
|
|
560
|
+
/* @__PURE__ */ s("h3", { className: "mt-0.5 line-clamp-2 text-[13.5px] font-semibold leading-snug tracking-[-0.01em]", children: t.title }),
|
|
539
561
|
t.summary ? (
|
|
540
562
|
// Plain text, two lines. Rendering markdown for a body
|
|
541
563
|
// that is clamped to two lines cost a whole markdown
|
|
542
564
|
// tree per row for text nobody can see.
|
|
543
|
-
/* @__PURE__ */
|
|
565
|
+
/* @__PURE__ */ s("p", { className: "mt-0.5 line-clamp-2 text-[12.5px] leading-relaxed text-muted-foreground", children: He(t.summary) })
|
|
544
566
|
) : null
|
|
545
567
|
] })
|
|
546
568
|
]
|
|
547
569
|
}
|
|
548
570
|
),
|
|
549
|
-
n ? /* @__PURE__ */
|
|
571
|
+
n ? /* @__PURE__ */ s("div", { className: "absolute right-3.5 top-2.5", children: /* @__PURE__ */ s(
|
|
550
572
|
it,
|
|
551
573
|
{
|
|
552
574
|
items: t.mediaItems,
|
|
@@ -557,19 +579,19 @@ function mt({
|
|
|
557
579
|
] }, t.id);
|
|
558
580
|
}) })
|
|
559
581
|
] }, e.label)),
|
|
560
|
-
u !== null && u.length < Y ? /* @__PURE__ */
|
|
582
|
+
u !== null && u.length < Y ? /* @__PURE__ */ s(
|
|
561
583
|
"button",
|
|
562
584
|
{
|
|
563
585
|
type: "button",
|
|
564
|
-
onClick: () => void
|
|
565
|
-
disabled:
|
|
586
|
+
onClick: () => void $e(),
|
|
587
|
+
disabled: B,
|
|
566
588
|
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
|
-
children:
|
|
589
|
+
children: B ? "Loading…" : `Load more · ${Y - u.length} left`
|
|
568
590
|
}
|
|
569
591
|
) : null
|
|
570
592
|
] })
|
|
571
593
|
] });
|
|
572
594
|
}
|
|
573
595
|
export {
|
|
574
|
-
|
|
596
|
+
ht as default
|
|
575
597
|
};
|