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