@markmo/europacore-session-ui 0.3.0 → 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/ArtifactsPage-BxaqShTv.js +1178 -0
- package/dist/{BoardPage-DDcf5vup.js → BoardPage-DH7p5o99.js} +54 -54
- package/dist/{CardDetail-D0TLVhf7.js → CardDetail-LfDCJQhS.js} +26 -26
- package/dist/{ComparePage-C32hPOqV.js → ComparePage-CrbCyu4u.js} +33 -33
- package/dist/MemoriesPage-BRA53Hlb.js +679 -0
- package/dist/{OverviewPage-BkeuYg6d.js → OverviewPage-BSBqY83_.js} +31 -31
- package/dist/{RegisterPage-Dawr26jh.js → RegisterPage-64yGl9E-.js} +75 -75
- package/dist/SessionPage-C4hSlxWQ.js +906 -0
- package/dist/api/agentClient.d.ts +62 -1
- package/dist/api/wire.d.ts +461 -4
- package/dist/features/artifacts/ArtifactDetail.d.ts +15 -0
- package/dist/features/artifacts/ArtifactDialogs.d.ts +29 -0
- package/dist/features/artifacts/ArtifactLedger.d.ts +11 -0
- package/dist/features/artifacts/ArtifactStats.d.ts +9 -0
- package/dist/features/artifacts/ArtifactsPage.d.ts +1 -0
- package/dist/features/artifacts/artifactsCommands.d.ts +3 -0
- package/dist/features/artifacts/artifactsStore.d.ts +27 -0
- package/dist/features/artifacts/artifactsUi.d.ts +33 -0
- package/dist/features/bootstrap.d.ts +1 -0
- package/dist/features/chat/model/artifactAccess.d.ts +50 -0
- package/dist/features/chat/model/artifactCsv.d.ts +11 -0
- package/dist/features/chat/model/artifactExport.d.ts +45 -0
- package/dist/features/chat/model/artifactStats.d.ts +79 -0
- package/dist/features/chat/model/artifacts.d.ts +151 -0
- package/dist/features/chat/model/claims.d.ts +102 -0
- package/dist/features/chat/model/contextSources.d.ts +41 -0
- package/dist/features/chat/model/entries.d.ts +32 -2
- package/dist/features/chat/model/format.d.ts +6 -0
- package/dist/features/chat/model/memoryRecords.d.ts +79 -0
- package/dist/features/chat/model/monitors.d.ts +11 -0
- package/dist/features/chat/model/progress.d.ts +73 -0
- package/dist/features/chat/model/tasks.d.ts +1 -1
- package/dist/features/chat/panels/ProgressPanel.d.ts +8 -0
- package/dist/features/chat/session/SessionController.d.ts +3 -2
- package/dist/features/chat/session/useFileMentions.d.ts +18 -5
- package/dist/features/chat/transcript/ArtifactCard.d.ts +8 -0
- package/dist/features/chat/transcript/Rows.d.ts +12 -1
- package/dist/features/memories/MemoriesPage.d.ts +1 -0
- package/dist/features/memories/memoriesCommands.d.ts +3 -0
- package/dist/features/memories/memoriesController.d.ts +81 -0
- package/dist/features/workspace/claimsCommands.d.ts +26 -0
- package/dist/features/workspace/collisionsWatcher.d.ts +7 -0
- package/dist/features/workspace/useSessionPageHooks.d.ts +1 -1
- package/dist/{index-B0hmy2Cw.js → index-CMPf-3JZ.js} +4412 -3293
- package/dist/index.d.ts +2 -0
- package/dist/index.js +86 -82
- package/dist/lib/paths.d.ts +12 -0
- package/dist/lib/zip.d.ts +14 -0
- package/dist/{promptHistory-DQyt2Br0.js → promptHistory-BR0NpLCI.js} +14 -14
- package/package.json +1 -1
- package/dist/SessionPage-68nDek9w.js +0 -881
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { jsxs as b, jsx as a, Fragment as te } from "react/jsx-runtime";
|
|
2
|
-
import { memo as xe, useRef as
|
|
2
|
+
import { memo as xe, useRef as I, Fragment as be, useState as z, useLayoutEffect as ne, useEffect as V, createElement as we, useMemo as J, useCallback as U } from "react";
|
|
3
3
|
import { useNavigate as ye } from "react-router";
|
|
4
4
|
import { Menu as ve, MenuButton as ke, Field as Ne, Switch as Se, Label as Me } from "@headlessui/react";
|
|
5
5
|
import { MoreHorizontal as Ce, LayoutGrid as Te } from "lucide-react";
|
|
6
|
-
import {
|
|
7
|
-
import { a as
|
|
6
|
+
import { K as D, an as $e, a as E, I as Ae, aD as Ee, aE as K, aF as ae, aG as _e, aH as Q, am as Le, aI as pe, aa as Ie, n as Pe, aJ as se, aK as Fe, V as Oe, aq as Be, Y as oe } from "./index-CMPf-3JZ.js";
|
|
7
|
+
import { a as De, S as He, c as Ge, b as je, d as Re, i as Ke, e as me, f as qe, g as ze, h as Ye, j as Ue, C as Ve } from "./CardDetail-LfDCJQhS.js";
|
|
8
8
|
import { createPortal as We } from "react-dom";
|
|
9
9
|
const Xe = 15e3;
|
|
10
10
|
function Je(e) {
|
|
11
11
|
return e.started || e.missing ? Promise.resolve() : new Promise((t) => {
|
|
12
12
|
const n = () => {
|
|
13
13
|
clearTimeout(s), i(), t();
|
|
14
|
-
}, i =
|
|
14
|
+
}, i = D.subscribe(() => {
|
|
15
15
|
(e.started || e.missing) && n();
|
|
16
16
|
}), s = setTimeout(n, Xe);
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
async function Qe(e, t) {
|
|
20
|
-
const n =
|
|
20
|
+
const n = D.attach(e);
|
|
21
21
|
return await Je(n), n.missing || !n.started ? !1 : n.setStage(t);
|
|
22
22
|
}
|
|
23
23
|
const Ze = 500, et = 10, tt = xe(function({ card: t, seen: n, now: i, actions: s, onHover: r, onLongPress: p }) {
|
|
24
|
-
const { row: o } = t, y =
|
|
24
|
+
const { row: o } = t, y = I(null), f = I(null), v = I(!1), T = De(o, n), P = He[o.status], F = Ge(t), _ = je(o, i), H = $e(o.costUsd), l = o.status === "failed" || o.attention === "failed", m = Re(o), N = Ke(o, n), k = () => {
|
|
25
25
|
f.current && clearTimeout(f.current.timer), f.current = null;
|
|
26
26
|
};
|
|
27
27
|
return (
|
|
@@ -86,11 +86,11 @@ const Ze = 500, et = 10, tt = xe(function({ card: t, seen: n, now: i, actions: s
|
|
|
86
86
|
/* @__PURE__ */ a(
|
|
87
87
|
"span",
|
|
88
88
|
{
|
|
89
|
-
className: E("mt-px w-3 shrink-0 text-center text-[12px] leading-5",
|
|
90
|
-
title:
|
|
89
|
+
className: E("mt-px w-3 shrink-0 text-center text-[12px] leading-5", P.tone, o.status === "running" && "animate-pulse"),
|
|
90
|
+
title: P.label,
|
|
91
91
|
role: "img",
|
|
92
|
-
"aria-label":
|
|
93
|
-
children:
|
|
92
|
+
"aria-label": P.label,
|
|
93
|
+
children: P.glyph
|
|
94
94
|
}
|
|
95
95
|
),
|
|
96
96
|
/* @__PURE__ */ a(
|
|
@@ -117,18 +117,18 @@ const Ze = 500, et = 10, tt = xe(function({ card: t, seen: n, now: i, actions: s
|
|
|
117
117
|
}
|
|
118
118
|
) }),
|
|
119
119
|
/* @__PURE__ */ b(Ee, { children: [
|
|
120
|
-
/* @__PURE__ */ a(
|
|
121
|
-
o.prUrl && /* @__PURE__ */ a(
|
|
120
|
+
/* @__PURE__ */ a(K, { onClick: () => s.open(t), children: "Open" }),
|
|
121
|
+
o.prUrl && /* @__PURE__ */ a(K, { onClick: () => window.open(o.prUrl, "_blank", "noopener,noreferrer"), children: "Open pull request" }),
|
|
122
122
|
m && /* @__PURE__ */ b(te, { children: [
|
|
123
123
|
/* @__PURE__ */ a(ae, {}),
|
|
124
124
|
/* @__PURE__ */ a(_e, { children: "Set stage" }),
|
|
125
|
-
/* @__PURE__ */ a(
|
|
126
|
-
/* @__PURE__ */ a(
|
|
127
|
-
/* @__PURE__ */ a(
|
|
125
|
+
/* @__PURE__ */ a(K, { onClick: () => s.setStage(o, "backlog"), children: Q.backlog }),
|
|
126
|
+
/* @__PURE__ */ a(K, { onClick: () => s.setStage(o, "cancelled"), children: Q.cancelled }),
|
|
127
|
+
/* @__PURE__ */ a(K, { onClick: () => s.setStage(o, null), children: "Clear" })
|
|
128
128
|
] }),
|
|
129
129
|
N && /* @__PURE__ */ b(te, { children: [
|
|
130
130
|
/* @__PURE__ */ a(ae, {}),
|
|
131
|
-
/* @__PURE__ */ a(
|
|
131
|
+
/* @__PURE__ */ a(K, { onClick: () => s.markSeen(o), children: "Mark seen" })
|
|
132
132
|
] })
|
|
133
133
|
] })
|
|
134
134
|
] })
|
|
@@ -145,7 +145,7 @@ const Ze = 500, et = 10, tt = xe(function({ card: t, seen: n, now: i, actions: s
|
|
|
145
145
|
Le(o.tokens),
|
|
146
146
|
" tok"
|
|
147
147
|
] }),
|
|
148
|
-
|
|
148
|
+
H && /* @__PURE__ */ a("span", { children: H }),
|
|
149
149
|
o.model && /* @__PURE__ */ a("span", { className: "min-w-0 truncate", children: o.model })
|
|
150
150
|
] })
|
|
151
151
|
]
|
|
@@ -268,7 +268,7 @@ function de(e) {
|
|
|
268
268
|
return Math.round(Math.min(rt, Math.max(re, t)));
|
|
269
269
|
}
|
|
270
270
|
function ue(e, t, n = {}) {
|
|
271
|
-
const i = n.shadow || "var(--shadow-pop)", s =
|
|
271
|
+
const i = n.shadow || "var(--shadow-pop)", s = Y(t.left + t.width / 2 - (e.left + e.width / 2)), r = Y(t.top + t.height / 2 - (e.top + e.height / 2)), p = e.width > 0 ? Y(t.width / e.width, 4) : 1, o = e.height > 0 ? Y(t.height / e.height, 4) : 1, y = (v, T) => `translate(${v}px, ${T + Z.y}px) scale(${Z.scale}) rotate(${Z.rotate}deg)`;
|
|
272
272
|
return [
|
|
273
273
|
{ offset: 0, transform: "translate(0px, 0px) scale(1) rotate(0deg)", boxShadow: "none", opacity: 1 },
|
|
274
274
|
{ offset: 0.16, transform: y(0, 0), boxShadow: i, opacity: 1 },
|
|
@@ -277,7 +277,7 @@ function ue(e, t, n = {}) {
|
|
|
277
277
|
];
|
|
278
278
|
}
|
|
279
279
|
function lt(e, t) {
|
|
280
|
-
const n =
|
|
280
|
+
const n = Y(e.left - t.left), i = Y(e.top - t.top);
|
|
281
281
|
return Math.abs(n) < 0.5 && Math.abs(i) < 0.5 ? null : [{ transform: `translate(${n}px, ${i}px)` }, { transform: "translate(0px, 0px)" }];
|
|
282
282
|
}
|
|
283
283
|
function ct(e, t, n = "both", i = 1) {
|
|
@@ -295,7 +295,7 @@ function ut(e, t, n) {
|
|
|
295
295
|
const s = t.left + t.width / 2 >= n.left + n.width / 2 ? n.left + n.width - e.width * 0.35 : n.left - e.width * 0.65, r = Math.min(Math.max(e.top, n.top), Math.max(n.top, n.top + n.height - e.height));
|
|
296
296
|
return { left: s, top: r, width: e.width, height: e.height };
|
|
297
297
|
}
|
|
298
|
-
function
|
|
298
|
+
function Y(e, t = 2) {
|
|
299
299
|
const n = 10 ** t;
|
|
300
300
|
return Math.round(e * n) / n;
|
|
301
301
|
}
|
|
@@ -326,7 +326,7 @@ function fe(e) {
|
|
|
326
326
|
return t;
|
|
327
327
|
}
|
|
328
328
|
function mt(e, { containerRef: t, reducedMotion: n }) {
|
|
329
|
-
const [i, s] =
|
|
329
|
+
const [i, s] = z(e), r = le(X(e)), p = le(X(i)), o = I(null), y = I(null), f = I({
|
|
330
330
|
animations: /* @__PURE__ */ new Set(),
|
|
331
331
|
clones: /* @__PURE__ */ new Map(),
|
|
332
332
|
hidden: /* @__PURE__ */ new Set(),
|
|
@@ -362,9 +362,9 @@ function mt(e, { containerRef: t, reducedMotion: n }) {
|
|
|
362
362
|
v();
|
|
363
363
|
const h = it(X(i), X(e)), S = /* @__PURE__ */ new Map();
|
|
364
364
|
for (const g of [...h.flights.map((M) => M.id), ...h.exits.map((M) => M.id)]) {
|
|
365
|
-
const M = N.get(g),
|
|
366
|
-
if (!M || !
|
|
367
|
-
const $ = gt(m, M, g,
|
|
365
|
+
const M = N.get(g), O = k.get(g);
|
|
366
|
+
if (!M || !O) continue;
|
|
367
|
+
const $ = gt(m, M, g, O);
|
|
368
368
|
S.set(g, $), f.current.clones.set(g, $);
|
|
369
369
|
}
|
|
370
370
|
y.current = { plan: h, rects: k, clones: S }, s(e);
|
|
@@ -372,7 +372,7 @@ function mt(e, { containerRef: t, reducedMotion: n }) {
|
|
|
372
372
|
const l = y.current;
|
|
373
373
|
y.current = null;
|
|
374
374
|
const m = t.current;
|
|
375
|
-
!l || !m ||
|
|
375
|
+
!l || !m || P(l, m, n ?? ge());
|
|
376
376
|
}, [i]), V(
|
|
377
377
|
() => () => {
|
|
378
378
|
v();
|
|
@@ -380,11 +380,11 @@ function mt(e, { containerRef: t, reducedMotion: n }) {
|
|
|
380
380
|
},
|
|
381
381
|
[]
|
|
382
382
|
);
|
|
383
|
-
function
|
|
384
|
-
const S = f.current, g = fe(k), M = l.flights.length > ot,
|
|
383
|
+
function P({ plan: l, rects: m, clones: N }, k, h) {
|
|
384
|
+
const S = f.current, g = fe(k), M = l.flights.length > ot, O = L(k), $ = /* @__PURE__ */ new Set();
|
|
385
385
|
for (const c of l.flights) {
|
|
386
386
|
const x = g.get(c.id)?.closest("[data-board-column]");
|
|
387
|
-
x && !ct(L(x),
|
|
387
|
+
x && !ct(L(x), O, "x", 0.5) && $.add(c.id);
|
|
388
388
|
}
|
|
389
389
|
for (const c of l.flights) {
|
|
390
390
|
const d = g.get(c.id), x = d?.closest("[data-column-scroll]");
|
|
@@ -402,7 +402,7 @@ function mt(e, { containerRef: t, reducedMotion: n }) {
|
|
|
402
402
|
{ duration: C, easing: "ease-out", fill: c.hasAttribute("data-flip-clone") ? "forwards" : "none" }
|
|
403
403
|
),
|
|
404
404
|
u
|
|
405
|
-
),
|
|
405
|
+
), B = (c, d) => {
|
|
406
406
|
d.remove(), S.clones.get(c) === d && S.clones.delete(c);
|
|
407
407
|
};
|
|
408
408
|
if (!h)
|
|
@@ -418,22 +418,22 @@ function mt(e, { containerRef: t, reducedMotion: n }) {
|
|
|
418
418
|
}
|
|
419
419
|
for (const { id: c } of l.exits) {
|
|
420
420
|
const d = N.get(c);
|
|
421
|
-
d && G(d, 1, 0, q, () =>
|
|
421
|
+
d && G(d, 1, 0, q, () => B(c, d), !0);
|
|
422
422
|
}
|
|
423
423
|
const j = xt(k, "--shadow-pop");
|
|
424
424
|
for (const c of l.flights) {
|
|
425
425
|
const d = N.get(c.id), x = g.get(c.id), C = m.get(c.id);
|
|
426
426
|
if (!d || !C) continue;
|
|
427
427
|
if (!x) {
|
|
428
|
-
G(d, 1, 0, q, () =>
|
|
428
|
+
G(d, 1, 0, q, () => B(c.id, d));
|
|
429
429
|
continue;
|
|
430
430
|
}
|
|
431
431
|
if (h || M) {
|
|
432
|
-
G(d, 1, 0, q * 1.2, () =>
|
|
432
|
+
G(d, 1, 0, q * 1.2, () => B(c.id, d)), G(x, 0, 1, q * 1.2), $.has(c.id) && _(c.to, h);
|
|
433
433
|
continue;
|
|
434
434
|
}
|
|
435
435
|
if ($.has(c.id)) {
|
|
436
|
-
const w = x.closest("[data-board-column]"), A = ut(C, L(w),
|
|
436
|
+
const w = x.closest("[data-board-column]"), A = ut(C, L(w), O);
|
|
437
437
|
T(
|
|
438
438
|
d.animate(ue(C, A, { shadow: j, fade: !0 }), {
|
|
439
439
|
duration: de(ce(C, A)),
|
|
@@ -441,7 +441,7 @@ function mt(e, { containerRef: t, reducedMotion: n }) {
|
|
|
441
441
|
fill: "forwards"
|
|
442
442
|
}),
|
|
443
443
|
() => {
|
|
444
|
-
|
|
444
|
+
B(c.id, d), _(c.to, !1);
|
|
445
445
|
}
|
|
446
446
|
);
|
|
447
447
|
continue;
|
|
@@ -450,7 +450,7 @@ function mt(e, { containerRef: t, reducedMotion: n }) {
|
|
|
450
450
|
x.style.visibility = "hidden", S.hidden.add(x), T(
|
|
451
451
|
d.animate(ue(C, u, { shadow: j }), { duration: de(ce(C, u)), easing: ee, fill: "forwards" }),
|
|
452
452
|
() => {
|
|
453
|
-
|
|
453
|
+
B(c.id, d), x.style.visibility = "", S.hidden.delete(x), F(x);
|
|
454
454
|
}
|
|
455
455
|
);
|
|
456
456
|
}
|
|
@@ -473,7 +473,7 @@ function mt(e, { containerRef: t, reducedMotion: n }) {
|
|
|
473
473
|
() => N.removeAttribute("data-pulsed")
|
|
474
474
|
);
|
|
475
475
|
}
|
|
476
|
-
const
|
|
476
|
+
const H = typeof document > "u" ? null : We(
|
|
477
477
|
we("div", {
|
|
478
478
|
ref: o,
|
|
479
479
|
"data-board-overlay": "",
|
|
@@ -482,7 +482,7 @@ function mt(e, { containerRef: t, reducedMotion: n }) {
|
|
|
482
482
|
}),
|
|
483
483
|
document.body
|
|
484
484
|
);
|
|
485
|
-
return { shown: r === p ? e : i, overlay:
|
|
485
|
+
return { shown: r === p ? e : i, overlay: H };
|
|
486
486
|
}
|
|
487
487
|
function gt(e, t, n, i) {
|
|
488
488
|
const s = t.cloneNode(!0);
|
|
@@ -525,14 +525,14 @@ function vt(e, t) {
|
|
|
525
525
|
}
|
|
526
526
|
}
|
|
527
527
|
function kt(e) {
|
|
528
|
-
const [t, n] =
|
|
528
|
+
const [t, n] = z(() => Date.now());
|
|
529
529
|
return V(() => {
|
|
530
530
|
const i = setInterval(() => n(Date.now()), e);
|
|
531
531
|
return () => clearInterval(i);
|
|
532
532
|
}, [e]), t;
|
|
533
533
|
}
|
|
534
534
|
function Nt({ rows: e, seen: t, actions: n, loading: i, error: s, reducedMotion: r }) {
|
|
535
|
-
const [p, o] =
|
|
535
|
+
const [p, o] = z(() => yt(he)), y = J(() => ze(e, p), [e, p]), f = Ye(y), v = I(null), { shown: T, overlay: P } = mt(y, { containerRef: v, reducedMotion: r }), F = kt(3e4), [_, H] = z(y[0]?.stage ?? null), l = I(0), m = U(() => {
|
|
536
536
|
cancelAnimationFrame(l.current), l.current = requestAnimationFrame(() => {
|
|
537
537
|
const u = v.current;
|
|
538
538
|
if (!u) return;
|
|
@@ -542,31 +542,31 @@ function Nt({ rows: e, seen: t, actions: n, loading: i, error: s, reducedMotion:
|
|
|
542
542
|
const W = Math.abs(R.offsetLeft + R.offsetWidth / 2 - w);
|
|
543
543
|
(!A || W < A.d) && (A = { stage: R.dataset.boardColumn, d: W });
|
|
544
544
|
}
|
|
545
|
-
A &&
|
|
545
|
+
A && H(A.stage);
|
|
546
546
|
});
|
|
547
547
|
}, []);
|
|
548
548
|
V(() => () => cancelAnimationFrame(l.current), []);
|
|
549
|
-
const N =
|
|
549
|
+
const N = U(
|
|
550
550
|
(u) => {
|
|
551
551
|
const w = v.current, A = w?.querySelector(`[data-board-column="${u}"]`);
|
|
552
552
|
if (!w || !A) return;
|
|
553
|
-
|
|
553
|
+
H(u);
|
|
554
554
|
const R = Math.max(0, A.offsetLeft - (w.clientWidth - A.offsetWidth) / 2), W = r ?? ge() ? "auto" : "smooth";
|
|
555
555
|
typeof w.scrollTo == "function" ? w.scrollTo({ left: R, behavior: W }) : w.scrollLeft = R;
|
|
556
556
|
},
|
|
557
557
|
[r]
|
|
558
|
-
), [k, h] =
|
|
558
|
+
), [k, h] = z(null), S = I(null), g = U(() => {
|
|
559
559
|
S.current && clearTimeout(S.current), S.current = null;
|
|
560
|
-
}, []), M =
|
|
560
|
+
}, []), M = U((u, w) => {
|
|
561
561
|
g(), S.current = setTimeout(
|
|
562
562
|
() => h(w ? { key: u.row.key, el: w } : null),
|
|
563
563
|
w ? bt : wt
|
|
564
564
|
);
|
|
565
565
|
}, [g]);
|
|
566
566
|
V(() => g, [g]);
|
|
567
|
-
const [
|
|
567
|
+
const [O, $] = z(null), G = U((u) => {
|
|
568
568
|
g(), h(null), $(u.row.key);
|
|
569
|
-
}, [g]),
|
|
569
|
+
}, [g]), B = J(() => new Map(y.flatMap((u) => u.cards).map((u) => [u.row.key, u])), [y]), j = k?.el.isConnected ? B.get(k.key) : void 0, c = O ? B.get(O) : void 0, d = J(
|
|
570
570
|
() => ({
|
|
571
571
|
...n,
|
|
572
572
|
open: (u) => {
|
|
@@ -638,10 +638,10 @@ function Nt({ rows: e, seen: t, actions: n, loading: i, error: s, reducedMotion:
|
|
|
638
638
|
/* @__PURE__ */ a("div", { className: "w-px shrink-0", "aria-hidden": "true" })
|
|
639
639
|
]
|
|
640
640
|
}
|
|
641
|
-
) : /* @__PURE__ */ a(
|
|
642
|
-
|
|
641
|
+
) : /* @__PURE__ */ a(Oe, { icon: /* @__PURE__ */ a(Te, { size: 20 }), title: "No sessions yet", children: "Sessions you start appear here, one card each, and move between columns as their work goes on." }),
|
|
642
|
+
P,
|
|
643
643
|
j && k && /* @__PURE__ */ a(
|
|
644
|
-
|
|
644
|
+
Ue,
|
|
645
645
|
{
|
|
646
646
|
card: j,
|
|
647
647
|
anchor: k.el,
|
|
@@ -651,7 +651,7 @@ function Nt({ rows: e, seen: t, actions: n, loading: i, error: s, reducedMotion:
|
|
|
651
651
|
onPointerLeave: () => M(j, null)
|
|
652
652
|
}
|
|
653
653
|
),
|
|
654
|
-
/* @__PURE__ */ a(
|
|
654
|
+
/* @__PURE__ */ a(Be, { open: !!c, onClose: () => $(null), title: c?.row.title || c?.row.key || "", footer: c && /* @__PURE__ */ b(te, { children: [
|
|
655
655
|
/* @__PURE__ */ a(oe, { variant: "secondary", onClick: () => $(null), children: "Close" }),
|
|
656
656
|
/* @__PURE__ */ a(
|
|
657
657
|
oe,
|
|
@@ -667,9 +667,9 @@ function Nt({ rows: e, seen: t, actions: n, loading: i, error: s, reducedMotion:
|
|
|
667
667
|
] });
|
|
668
668
|
}
|
|
669
669
|
function Lt() {
|
|
670
|
-
const e =
|
|
670
|
+
const e = Ie(), t = ye(), { toast: n } = Pe(), i = e.filter((r) => r.fleet && !r.parent && !r.run && r.id).map((r) => `${r.id}:${r.status}`).join(",");
|
|
671
671
|
V(() => {
|
|
672
|
-
|
|
672
|
+
D.wantFleetTasks(D.activeFleetIds());
|
|
673
673
|
}, [i]);
|
|
674
674
|
const s = J(
|
|
675
675
|
() => ({
|
|
@@ -679,11 +679,11 @@ function Lt() {
|
|
|
679
679
|
o || n("Couldn't change the card's stage.", "danger");
|
|
680
680
|
});
|
|
681
681
|
},
|
|
682
|
-
markSeen: (r) =>
|
|
682
|
+
markSeen: (r) => D.markSeen(r)
|
|
683
683
|
}),
|
|
684
684
|
[t, n]
|
|
685
685
|
);
|
|
686
|
-
return /* @__PURE__ */ a(Nt, { rows: e, seen:
|
|
686
|
+
return /* @__PURE__ */ a(Nt, { rows: e, seen: D.seen, actions: s, loading: !D.listedOnce, error: D.listError });
|
|
687
687
|
}
|
|
688
688
|
export {
|
|
689
689
|
Nt as Board,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsxs as s, Fragment as
|
|
2
|
-
import { useRef as B, useState as D, useLayoutEffect as
|
|
3
|
-
import { createPortal as
|
|
4
|
-
import {
|
|
1
|
+
import { jsxs as s, Fragment as _, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as B, useState as D, useLayoutEffect as L } from "react";
|
|
3
|
+
import { createPortal as O } from "react-dom";
|
|
4
|
+
import { O as T, a0 as j, ah as w, aL as v, aM as C, aH as k, aI as G, aN as H, an as P, am as U, a as W } from "./index-CMPf-3JZ.js";
|
|
5
5
|
const I = ["backlog", "planned", "in_progress", "blocked", "in_review", "done", "cancelled"], R = {
|
|
6
6
|
input: "waits for you",
|
|
7
7
|
failed: "failed",
|
|
@@ -34,7 +34,7 @@ function ee(e, t) {
|
|
|
34
34
|
const i = w(e, t) ?? e.attention;
|
|
35
35
|
return i ? R[i] : null;
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function M(e) {
|
|
38
38
|
const t = e.subject?.split(":").pop();
|
|
39
39
|
return e.origin === "trigger" && t ? `from ${t}` : e.origin ? `from ${e.origin === "cli" ? "the command line" : `a ${e.origin}`}` : "";
|
|
40
40
|
}
|
|
@@ -42,16 +42,16 @@ function ne(e) {
|
|
|
42
42
|
const { row: t } = e;
|
|
43
43
|
if (e.fleet) return `↳ ${e.fleet}`;
|
|
44
44
|
if (t.run) {
|
|
45
|
-
const i =
|
|
45
|
+
const i = M(t.run);
|
|
46
46
|
return `fleet run${i ? ` · ${i}` : ""}`;
|
|
47
47
|
}
|
|
48
48
|
return [t.agent, t.branch ? `⎇ ${t.branch}` : null].filter(Boolean).join(" · ");
|
|
49
49
|
}
|
|
50
50
|
function te(e, t = Date.now()) {
|
|
51
|
-
return e.runningMs ? { text:
|
|
51
|
+
return e.runningMs ? { text: v(e.runningMs), running: !0 } : e.stageSince ? { text: C(Math.max(0, t - e.stageSince)), running: !1 } : null;
|
|
52
52
|
}
|
|
53
53
|
function ae(e) {
|
|
54
|
-
return e.parent ? T(e.parent.key) : e.run || !(e.id ?? e.key) ?
|
|
54
|
+
return e.parent ? T(e.parent.key) : e.run || !(e.id ?? e.key) ? j() : T(e.id ?? e.key);
|
|
55
55
|
}
|
|
56
56
|
function ie(e) {
|
|
57
57
|
return !!(e.id && !e.parent && !e.run);
|
|
@@ -59,7 +59,7 @@ function ie(e) {
|
|
|
59
59
|
function se(e, t) {
|
|
60
60
|
return e.attention === "finished" || w(e, t) === "done" || e.stage === "done" && e.status === "idle";
|
|
61
61
|
}
|
|
62
|
-
const
|
|
62
|
+
const F = {
|
|
63
63
|
backlog: "text-faint",
|
|
64
64
|
planned: "text-muted",
|
|
65
65
|
in_progress: "text-accent",
|
|
@@ -72,7 +72,7 @@ const z = {
|
|
|
72
72
|
running: { glyph: "●", tone: "text-accent", label: "running" },
|
|
73
73
|
failed: { glyph: "✗", tone: "text-danger", label: "failed" },
|
|
74
74
|
idle: { glyph: "○", tone: "text-faint", label: "idle" }
|
|
75
|
-
},
|
|
75
|
+
}, Y = {
|
|
76
76
|
input: "waiting for you",
|
|
77
77
|
running: "running",
|
|
78
78
|
failed: "the last turn failed",
|
|
@@ -85,11 +85,11 @@ const z = {
|
|
|
85
85
|
done: "finished"
|
|
86
86
|
};
|
|
87
87
|
function N(e) {
|
|
88
|
-
const t =
|
|
88
|
+
const t = P(e.costUsd);
|
|
89
89
|
return `${U(e.tokens)} tokens${t ? ` · ${t}` : ""}`;
|
|
90
90
|
}
|
|
91
91
|
function l({ label: e, children: t }) {
|
|
92
|
-
return /* @__PURE__ */ s(
|
|
92
|
+
return /* @__PURE__ */ s(_, { children: [
|
|
93
93
|
/* @__PURE__ */ a("dt", { className: "pt-px text-[11.5px] font-medium text-muted", children: e }),
|
|
94
94
|
/* @__PURE__ */ a("dd", { className: "min-w-0 text-[12.5px] text-ink [overflow-wrap:anywhere]", children: t })
|
|
95
95
|
] });
|
|
@@ -108,19 +108,19 @@ function $({ row: e }) {
|
|
|
108
108
|
] }, n)
|
|
109
109
|
)) }) });
|
|
110
110
|
}
|
|
111
|
-
function
|
|
112
|
-
const { row: n } = e, f = n.stageSince ? ` for ${
|
|
113
|
-
/* @__PURE__ */ a("span", { className:
|
|
111
|
+
function z({ card: e, seen: t, now: i = Date.now() }) {
|
|
112
|
+
const { row: n } = e, f = n.stageSince ? ` for ${C(Math.max(0, i - n.stageSince))}` : "", u = /* @__PURE__ */ s(_, { children: [
|
|
113
|
+
/* @__PURE__ */ a("span", { className: F[n.stage], "aria-hidden": "true", children: G[n.stage] }),
|
|
114
114
|
" ",
|
|
115
115
|
n.stageText ?? k[n.stage],
|
|
116
116
|
f
|
|
117
117
|
] }), m = n.runningMs ? /* @__PURE__ */ s(g, { children: [
|
|
118
118
|
" · ran ",
|
|
119
|
-
|
|
119
|
+
v(n.runningMs)
|
|
120
120
|
] }) : null, c = w(n, t), r = [];
|
|
121
121
|
let h;
|
|
122
122
|
if (n.run) {
|
|
123
|
-
const o =
|
|
123
|
+
const o = M(n.run);
|
|
124
124
|
r.push(
|
|
125
125
|
/* @__PURE__ */ s(l, { label: "Fleet run", children: [
|
|
126
126
|
n.run.runId,
|
|
@@ -171,7 +171,7 @@ function Y({ card: e, seen: t, now: i = Date.now() }) {
|
|
|
171
171
|
o,
|
|
172
172
|
/* @__PURE__ */ s(g, { children: [
|
|
173
173
|
o ? " · " : "",
|
|
174
|
-
|
|
174
|
+
Y[n.status],
|
|
175
175
|
p
|
|
176
176
|
] }),
|
|
177
177
|
c && c !== "input" && /* @__PURE__ */ s("span", { className: "text-warn", children: [
|
|
@@ -188,7 +188,7 @@ function Y({ card: e, seen: t, now: i = Date.now() }) {
|
|
|
188
188
|
] })
|
|
189
189
|
] }, "stage")
|
|
190
190
|
), n.children.length) {
|
|
191
|
-
const x =
|
|
191
|
+
const x = H.map((d) => [d, n.children.filter((b) => b.stage === d).length]).filter(([, d]) => d).map(([d, b]) => `${b} ${k[d].toLowerCase()}`);
|
|
192
192
|
r.push(/* @__PURE__ */ a(l, { label: "Tasks", children: x.join(" · ") }, "tasks"));
|
|
193
193
|
}
|
|
194
194
|
r.push(/* @__PURE__ */ a($, { row: n }, "criteria")), n.explain.length && r.push(
|
|
@@ -220,12 +220,12 @@ function le({
|
|
|
220
220
|
onPointerLeave: u
|
|
221
221
|
}) {
|
|
222
222
|
const m = B(null), [c, r] = D(null);
|
|
223
|
-
return
|
|
223
|
+
return L(() => {
|
|
224
224
|
const h = m.current;
|
|
225
225
|
if (!h) return;
|
|
226
|
-
const o = t.getBoundingClientRect(), p = h.offsetWidth || 320, x = h.offsetHeight || 200, d = window.innerWidth, b = window.innerHeight, y = 10,
|
|
227
|
-
r({ left:
|
|
228
|
-
}, [t, e]),
|
|
226
|
+
const o = t.getBoundingClientRect(), p = h.offsetWidth || 320, x = h.offsetHeight || 200, d = window.innerWidth, b = window.innerHeight, y = 10, E = o.right + y + p <= d - 8 ? o.right + y : Math.max(8, o.left - y - p), A = Math.min(Math.max(8, o.top), Math.max(8, b - x - 8));
|
|
227
|
+
r({ left: E, top: A });
|
|
228
|
+
}, [t, e]), O(
|
|
229
229
|
/* @__PURE__ */ s(
|
|
230
230
|
"div",
|
|
231
231
|
{
|
|
@@ -241,7 +241,7 @@ function le({
|
|
|
241
241
|
),
|
|
242
242
|
children: [
|
|
243
243
|
/* @__PURE__ */ a("div", { className: "mb-2.5 text-[13px] leading-5 font-semibold text-ink [overflow-wrap:anywhere]", children: e.row.title || e.row.key }),
|
|
244
|
-
/* @__PURE__ */ a(
|
|
244
|
+
/* @__PURE__ */ a(z, { card: e, seen: i, now: n })
|
|
245
245
|
]
|
|
246
246
|
}
|
|
247
247
|
),
|
|
@@ -249,13 +249,13 @@ function le({
|
|
|
249
249
|
);
|
|
250
250
|
}
|
|
251
251
|
export {
|
|
252
|
-
|
|
252
|
+
z as C,
|
|
253
253
|
re as S,
|
|
254
254
|
ee as a,
|
|
255
255
|
te as b,
|
|
256
256
|
ne as c,
|
|
257
257
|
ie as d,
|
|
258
|
-
|
|
258
|
+
F as e,
|
|
259
259
|
ae as f,
|
|
260
260
|
V as g,
|
|
261
261
|
Z as h,
|