@markmo/europacore-session-ui 0.2.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.
Files changed (63) hide show
  1. package/README.md +1 -1
  2. package/dist/ArtifactsPage-BxaqShTv.js +1178 -0
  3. package/dist/{BoardPage-BAQrGP7G.js → BoardPage-DH7p5o99.js} +274 -265
  4. package/dist/{CardDetail-CCgP8R61.js → CardDetail-LfDCJQhS.js} +42 -33
  5. package/dist/{ComparePage-FcLLhKzC.js → ComparePage-CrbCyu4u.js} +33 -33
  6. package/dist/MemoriesPage-BRA53Hlb.js +679 -0
  7. package/dist/{OverviewPage-CbfbyGNT.js → OverviewPage-BSBqY83_.js} +50 -49
  8. package/dist/{RegisterPage-3-hJNQEV.js → RegisterPage-64yGl9E-.js} +76 -76
  9. package/dist/SessionPage-C4hSlxWQ.js +906 -0
  10. package/dist/api/agentClient.d.ts +66 -1
  11. package/dist/api/wire.d.ts +540 -4
  12. package/dist/features/artifacts/ArtifactDetail.d.ts +15 -0
  13. package/dist/features/artifacts/ArtifactDialogs.d.ts +29 -0
  14. package/dist/features/artifacts/ArtifactLedger.d.ts +11 -0
  15. package/dist/features/artifacts/ArtifactStats.d.ts +9 -0
  16. package/dist/features/artifacts/ArtifactsPage.d.ts +1 -0
  17. package/dist/features/artifacts/artifactsCommands.d.ts +3 -0
  18. package/dist/features/artifacts/artifactsStore.d.ts +27 -0
  19. package/dist/features/artifacts/artifactsUi.d.ts +33 -0
  20. package/dist/features/bootstrap.d.ts +1 -0
  21. package/dist/features/chat/model/artifactAccess.d.ts +50 -0
  22. package/dist/features/chat/model/artifactCsv.d.ts +11 -0
  23. package/dist/features/chat/model/artifactExport.d.ts +45 -0
  24. package/dist/features/chat/model/artifactStats.d.ts +79 -0
  25. package/dist/features/chat/model/artifacts.d.ts +151 -0
  26. package/dist/features/chat/model/claims.d.ts +102 -0
  27. package/dist/features/chat/model/contextSources.d.ts +41 -0
  28. package/dist/features/chat/model/entries.d.ts +37 -2
  29. package/dist/features/chat/model/fleet.d.ts +11 -0
  30. package/dist/features/chat/model/format.d.ts +6 -0
  31. package/dist/features/chat/model/inspect.d.ts +11 -0
  32. package/dist/features/chat/model/memory.d.ts +3 -3
  33. package/dist/features/chat/model/memoryRecords.d.ts +79 -0
  34. package/dist/features/chat/model/monitors.d.ts +11 -0
  35. package/dist/features/chat/model/progress.d.ts +73 -0
  36. package/dist/features/chat/model/routing.d.ts +20 -0
  37. package/dist/features/chat/model/store.d.ts +5 -0
  38. package/dist/features/chat/model/tasks.d.ts +1 -1
  39. package/dist/features/chat/panels/ProgressPanel.d.ts +8 -0
  40. package/dist/features/chat/session/ComposerHistory.d.ts +1 -1
  41. package/dist/features/chat/session/SessionController.d.ts +3 -2
  42. package/dist/features/chat/session/useFileMentions.d.ts +18 -5
  43. package/dist/features/chat/transcript/ArtifactCard.d.ts +8 -0
  44. package/dist/features/chat/transcript/Rows.d.ts +12 -1
  45. package/dist/features/commands/InspectDialog.d.ts +3 -0
  46. package/dist/features/commands/dialogs.d.ts +1 -1
  47. package/dist/features/commands/registry.d.ts +1 -1
  48. package/dist/features/memories/MemoriesPage.d.ts +1 -0
  49. package/dist/features/memories/memoriesCommands.d.ts +3 -0
  50. package/dist/features/memories/memoriesController.d.ts +81 -0
  51. package/dist/features/memory/MemoryDialog.d.ts +1 -1
  52. package/dist/features/memory/memoryService.d.ts +10 -10
  53. package/dist/features/workspace/claimsCommands.d.ts +26 -0
  54. package/dist/features/workspace/collisionsWatcher.d.ts +7 -0
  55. package/dist/features/workspace/useSessionPageHooks.d.ts +1 -1
  56. package/dist/{index-NjGO7Jg1.js → index-CMPf-3JZ.js} +4821 -3447
  57. package/dist/index.d.ts +2 -0
  58. package/dist/index.js +86 -82
  59. package/dist/lib/paths.d.ts +12 -0
  60. package/dist/lib/zip.d.ts +14 -0
  61. package/dist/{promptHistory-DjSCHmEk.js → promptHistory-BR0NpLCI.js} +14 -14
  62. package/package.json +1 -1
  63. package/dist/SessionPage-CA9hAakW.js +0 -865
@@ -1,7 +1,7 @@
1
- import { jsxs as s, Fragment as C, jsx as a } from "react/jsx-runtime";
2
- import { useRef as B, useState as D, useLayoutEffect as O } from "react";
3
- import { createPortal as j } from "react-dom";
4
- import { z as T, O as G, a8 as w, aC as _, aD as v, ay as k, az as L, aE as P, ae as H, ad as U, a as W } from "./index-NjGO7Jg1.js";
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 E(e) {
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 = E(t.run);
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: _(e.runningMs), running: !0 } : e.stageSince ? { text: v(Math.max(0, t - e.stageSince)), running: !1 } : null;
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) ? G() : T(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 z = {
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
- }, F = {
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 = H(e.costUsd);
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(C, { children: [
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
  ] });
@@ -100,24 +100,27 @@ function g({ children: e }) {
100
100
  function $({ row: e }) {
101
101
  if (!e.criteria.length) return null;
102
102
  const t = e.stage === "done" || e.stage === "in_review";
103
- return /* @__PURE__ */ a(l, { label: "Criteria", children: /* @__PURE__ */ a("ul", { className: "space-y-0.5", children: e.criteria.slice(0, 4).map((i, n) => /* @__PURE__ */ s("li", { className: "flex gap-1.5", children: [
104
- /* @__PURE__ */ a("span", { className: t ? "text-ok" : "text-faint", "aria-hidden": "true", children: t ? "✔" : "○" }),
105
- /* @__PURE__ */ a("span", { children: i })
106
- ] }, n)) }) });
107
- }
108
- function Y({ card: e, seen: t, now: i = Date.now() }) {
109
- const { row: n } = e, f = n.stageSince ? ` for ${v(Math.max(0, i - n.stageSince))}` : "", u = /* @__PURE__ */ s(C, { children: [
110
- /* @__PURE__ */ a("span", { className: z[n.stage], "aria-hidden": "true", children: L[n.stage] }),
103
+ return /* @__PURE__ */ a(l, { label: "Criteria", children: /* @__PURE__ */ a("ul", { className: "space-y-0.5", children: e.criteria.slice(0, 4).map((i, n) => (
104
+ // biome-ignore lint/suspicious/noArrayIndexKey: a static list of strings, which may repeat
105
+ /* @__PURE__ */ s("li", { className: "flex gap-1.5", children: [
106
+ /* @__PURE__ */ a("span", { className: t ? "text-ok" : "text-faint", "aria-hidden": "true", children: t ? "✔" : "○" }),
107
+ /* @__PURE__ */ a("span", { children: i })
108
+ ] }, n)
109
+ )) }) });
110
+ }
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] }),
111
114
  " ",
112
115
  n.stageText ?? k[n.stage],
113
116
  f
114
117
  ] }), m = n.runningMs ? /* @__PURE__ */ s(g, { children: [
115
118
  " · ran ",
116
- _(n.runningMs)
119
+ v(n.runningMs)
117
120
  ] }) : null, c = w(n, t), r = [];
118
121
  let h;
119
122
  if (n.run) {
120
- const o = E(n.run);
123
+ const o = M(n.run);
121
124
  r.push(
122
125
  /* @__PURE__ */ s(l, { label: "Fleet run", children: [
123
126
  n.run.runId,
@@ -156,7 +159,10 @@ function Y({ card: e, seen: t, now: i = Date.now() }) {
156
159
  "⎇ ",
157
160
  n.branch
158
161
  ] }, "branch")), (n.tokens || n.costUsd !== null) && r.push(/* @__PURE__ */ a(l, { label: "Usage", children: N(n) }, "usage")), n.explain.length && r.push(
159
- /* @__PURE__ */ a(l, { label: "Why", children: /* @__PURE__ */ a("ul", { className: "space-y-0.5 text-muted", children: n.explain.slice(0, 3).map((o, p) => /* @__PURE__ */ a("li", { children: o }, p)) }) }, "why")
162
+ /* @__PURE__ */ a(l, { label: "Why", children: /* @__PURE__ */ a("ul", { className: "space-y-0.5 text-muted", children: n.explain.slice(0, 3).map((o, p) => (
163
+ // biome-ignore lint/suspicious/noArrayIndexKey: a static list of strings, which may repeat
164
+ /* @__PURE__ */ a("li", { children: o }, p)
165
+ )) }) }, "why")
160
166
  ), r.push(/* @__PURE__ */ a($, { row: n }, "criteria")), h = `Opens its fleet session${e.fleet ? `, ${e.fleet}` : ""}.`;
161
167
  else {
162
168
  const o = [n.agent, n.model].filter(Boolean).join(" · "), p = n.waiting > 1 ? ` · ${n.waiting} waits` : "";
@@ -165,7 +171,7 @@ function Y({ card: e, seen: t, now: i = Date.now() }) {
165
171
  o,
166
172
  /* @__PURE__ */ s(g, { children: [
167
173
  o ? " · " : "",
168
- F[n.status],
174
+ Y[n.status],
169
175
  p
170
176
  ] }),
171
177
  c && c !== "input" && /* @__PURE__ */ s("span", { className: "text-warn", children: [
@@ -182,11 +188,14 @@ function Y({ card: e, seen: t, now: i = Date.now() }) {
182
188
  ] })
183
189
  ] }, "stage")
184
190
  ), n.children.length) {
185
- const x = P.map((d) => [d, n.children.filter((b) => b.stage === d).length]).filter(([, d]) => d).map(([d, b]) => `${b} ${k[d].toLowerCase()}`);
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()}`);
186
192
  r.push(/* @__PURE__ */ a(l, { label: "Tasks", children: x.join(" · ") }, "tasks"));
187
193
  }
188
194
  r.push(/* @__PURE__ */ a($, { row: n }, "criteria")), n.explain.length && r.push(
189
- /* @__PURE__ */ a(l, { label: "Collides", children: /* @__PURE__ */ a("ul", { className: "space-y-0.5 text-warn", children: n.explain.slice(0, 2).map((x, d) => /* @__PURE__ */ a("li", { children: x }, d)) }) }, "collides")
195
+ /* @__PURE__ */ a(l, { label: "Collides", children: /* @__PURE__ */ a("ul", { className: "space-y-0.5 text-warn", children: n.explain.slice(0, 2).map((x, d) => (
196
+ // biome-ignore lint/suspicious/noArrayIndexKey: a static list of strings, which may repeat
197
+ /* @__PURE__ */ a("li", { children: x }, d)
198
+ )) }) }, "collides")
190
199
  ), n.branch && r.push(/* @__PURE__ */ s(l, { label: "Branch", children: [
191
200
  "⎇ ",
192
201
  n.branch
@@ -211,12 +220,12 @@ function le({
211
220
  onPointerLeave: u
212
221
  }) {
213
222
  const m = B(null), [c, r] = D(null);
214
- return O(() => {
223
+ return L(() => {
215
224
  const h = m.current;
216
225
  if (!h) return;
217
- const o = t.getBoundingClientRect(), p = h.offsetWidth || 320, x = h.offsetHeight || 200, d = window.innerWidth, b = window.innerHeight, y = 10, M = 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));
218
- r({ left: M, top: A });
219
- }, [t, e]), j(
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(
220
229
  /* @__PURE__ */ s(
221
230
  "div",
222
231
  {
@@ -232,7 +241,7 @@ function le({
232
241
  ),
233
242
  children: [
234
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 }),
235
- /* @__PURE__ */ a(Y, { card: e, seen: i, now: n })
244
+ /* @__PURE__ */ a(z, { card: e, seen: i, now: n })
236
245
  ]
237
246
  }
238
247
  ),
@@ -240,13 +249,13 @@ function le({
240
249
  );
241
250
  }
242
251
  export {
243
- Y as C,
252
+ z as C,
244
253
  re as S,
245
254
  ee as a,
246
255
  te as b,
247
256
  ne as c,
248
257
  ie as d,
249
- z as e,
258
+ F as e,
250
259
  ae as f,
251
260
  V as g,
252
261
  Z as h,
@@ -1,25 +1,25 @@
1
1
  import { jsx as t, jsxs as n } from "react/jsx-runtime";
2
- import { useEffect as F, useMemo as I, useState as x, useRef as ee } from "react";
3
- import { useParams as te, Link as z } from "react-router";
2
+ import { useEffect as B, useMemo as O, useState as x, useRef as ee } from "react";
3
+ import { useParams as te, Link as S } from "react-router";
4
4
  import { Star as ae, X as ne, ArrowLeft as se, Check as ie, ExternalLink as le } from "lucide-react";
5
- import { E as de, y as K, G as ce, u as re, a2 as oe, aX as me, aY as pe, aZ as fe, Q as O, a_ as he, F as xe, aB as ue, z as L, a$ as f, a as k, H, b0 as X, b1 as ke, b2 as be, b3 as ge, b4 as Ne, aC as _e, B as ye, C as P } from "./index-NjGO7Jg1.js";
5
+ import { Q as de, K as A, X as ce, u as re, ab as oe, bL as me, bM as pe, bN as fe, a2 as I, bO as he, V as xe, aK as ue, O as F, bP as f, a as k, Y, bQ as q, bR as ke, bS as be, bw as ge, bx as Ne, aL as _e, B as ye, C as P } from "./index-CMPf-3JZ.js";
6
6
  function we(e) {
7
7
  return e.picked ? { label: "★ picked", tone: "ok" } : e.fleet_state === "passed" ? { label: "✔ passed", tone: "ok" } : e.fleet_state === "failed" ? { label: "✗ failed", tone: "danger" } : e.fleet_state === "cancelled" || e.fleet_state === "skipped" ? { label: "⊘ cancelled", tone: "neutral" } : e.pending_tool_call_id ? { label: "⏸ waiting", tone: "warn" } : { label: "● running", tone: "accent" };
8
8
  }
9
9
  function Q(e, s, d) {
10
10
  return d ? be(e, s) ? null : e.fleet_state === "passed" ? "A variant has been picked." : `${f(e)} did not pass: it can't be picked.` : s.some((p) => p.picked) ? "A variant has been picked." : "Nothing to pick yet: the variants are still running.";
11
11
  }
12
- function Le() {
12
+ function Fe() {
13
13
  const { id: e = "", group: s = "" } = te(), d = de(e);
14
- return F(() => {
15
- e && !K.get(e) && K.attach(e);
14
+ return B(() => {
15
+ e && !A.get(e) && A.attach(e);
16
16
  }, [e]), d ? /* @__PURE__ */ t($e, { controller: d, group: s }) : /* @__PURE__ */ t(ce, {});
17
17
  }
18
18
  const Ce = (e) => `${e.task_id}:${e.files_changed ?? ""}:${e.lines_added ?? ""}:${e.lines_deleted ?? ""}:${e.attempt ?? ""}`;
19
19
  function $e({ controller: e, group: s }) {
20
20
  re(e, P.fleet, P.pause, P.session, P.run);
21
- const d = oe(me), p = e.store.state, i = I(() => (p.fleetTasks ?? []).filter((a) => a.group === s), [p.fleetTasks, s]), o = pe(e, s), m = fe(e.session)?.run_id ?? null, [b, g] = x(/* @__PURE__ */ new Map()), [Y, S] = x(/* @__PURE__ */ new Map()), [M, D] = x(null), [q, U] = x(null), [N, E] = x(null), [w, j] = x(!1), [C, W] = x(null), Z = i.map(Ce).join("|");
22
- F(() => {
21
+ const d = oe(me), p = e.store.state, i = O(() => (p.fleetTasks ?? []).filter((a) => a.group === s), [p.fleetTasks, s]), o = pe(e, s), m = fe(e.session)?.run_id ?? null, [b, g] = x(/* @__PURE__ */ new Map()), [G, z] = x(/* @__PURE__ */ new Map()), [M, D] = x(null), [H, U] = x(null), [N, V] = x(null), [w, j] = x(!1), [C, W] = x(null), J = i.map(Ce).join("|");
22
+ B(() => {
23
23
  if (!m) return;
24
24
  let a = !0;
25
25
  for (const l of i) {
@@ -27,7 +27,7 @@ function $e({ controller: e, group: s }) {
27
27
  g((r) => new Map(r).set(l.task_id, null));
28
28
  continue;
29
29
  }
30
- O.fleetTaskDiff(m, l.task_id).then(
30
+ I.fleetTaskDiff(m, l.task_id).then(
31
31
  (r) => a && g((u) => new Map(u).set(l.task_id, r)),
32
32
  () => a && g((r) => new Map(r).set(l.task_id, null))
33
33
  );
@@ -35,33 +35,33 @@ function $e({ controller: e, group: s }) {
35
35
  return () => {
36
36
  a = !1;
37
37
  };
38
- }, [m, Z]);
39
- const T = i.map((a) => a.task_id), _ = T.join("|"), h = I(() => he(_ ? _.split("|") : [], b), [_, b]), c = M && h.some((a) => a.path === M) ? M : h[0]?.path ?? null, y = i.find((a) => a.task_id === q) ?? i[0] ?? null, V = ee(/* @__PURE__ */ new Set());
40
- if (F(() => {
38
+ }, [m, J]);
39
+ const T = i.map((a) => a.task_id), _ = T.join("|"), h = O(() => he(_ ? _.split("|") : [], b), [_, b]), c = M && h.some((a) => a.path === M) ? M : h[0]?.path ?? null, y = i.find((a) => a.task_id === H) ?? i[0] ?? null, E = ee(/* @__PURE__ */ new Set());
40
+ if (B(() => {
41
41
  if (!m || !c) return;
42
42
  const a = h.find((l) => l.path === c);
43
43
  a && a.cells.forEach((l, r) => {
44
44
  const u = _.split("|")[r], $ = `${u}:${c}`;
45
- !l || V.current.has($) || (V.current.add($), O.fleetTaskDiff(m, u, { path: c }).then(
46
- (B) => S((v) => new Map(v).set($, B.patch ?? "")),
47
- () => S((B) => new Map(B).set($, null))
45
+ !l || E.current.has($) || (E.current.add($), I.fleetTaskDiff(m, u, { path: c }).then(
46
+ (L) => z((v) => new Map(v).set($, L.patch ?? "")),
47
+ () => z((L) => new Map(L).set($, null))
48
48
  ));
49
49
  });
50
50
  }, [m, c, h, _]), !i.length)
51
- return /* @__PURE__ */ t(G, { controller: e, group: s, children: /* @__PURE__ */ t(xe, { title: `No variants in ${s}`, children: "The fleet lists a best-of group's variants once its run starts them." }) });
51
+ return /* @__PURE__ */ t(X, { controller: e, group: s, children: /* @__PURE__ */ t(xe, { title: `No variants in ${s}`, children: "The fleet lists a best-of group's variants once its run starts them." }) });
52
52
  const R = async (a) => {
53
53
  if (o) {
54
- E(a?.task_id ?? "none");
54
+ V(a?.task_id ?? "none");
55
55
  try {
56
56
  const l = a ? f(a) : null;
57
57
  await e.pick(o, l) && W(l ?? "none");
58
58
  } finally {
59
- E(null), j(!1);
59
+ V(null), j(!1);
60
60
  }
61
61
  }
62
- }, A = d ? i : y ? [y] : [], J = i.some((a) => a.files_changed && b.get(a.task_id) === void 0);
63
- return /* @__PURE__ */ n(G, { controller: e, group: s, count: i.length, picking: !!o, children: [
64
- C && /* @__PURE__ */ t(ue, { tone: "ok", className: "mb-3", action: /* @__PURE__ */ t(z, { to: L(e.id), className: "text-[12.5px] font-semibold text-accent hover:underline", children: "Back to the session" }), children: C === "none" ? `Picked none: ${s} is cancelled.` : `Picked ${C}: the fleet merges it.` }),
62
+ }, K = d ? i : y ? [y] : [], Z = i.some((a) => a.files_changed && b.get(a.task_id) === void 0);
63
+ return /* @__PURE__ */ n(X, { controller: e, group: s, count: i.length, picking: !!o, children: [
64
+ C && /* @__PURE__ */ t(ue, { tone: "ok", className: "mb-3", action: /* @__PURE__ */ t(S, { to: F(e.id), className: "text-[12.5px] font-semibold text-accent hover:underline", children: "Back to the session" }), children: C === "none" ? `Picked none: ${s} is cancelled.` : `Picked ${C}: the fleet merges it.` }),
65
65
  !o && !C && /* @__PURE__ */ n("p", { className: "mb-3 text-[13px] text-muted", children: [
66
66
  Q(i[0], i, null),
67
67
  " This view only compares."
@@ -89,7 +89,7 @@ function $e({ controller: e, group: s }) {
89
89
  {
90
90
  className: k(d && "grid gap-3 overflow-x-auto"),
91
91
  style: d ? { gridTemplateColumns: `repeat(${i.length}, minmax(240px, 1fr))` } : void 0,
92
- children: A.map((a) => /* @__PURE__ */ t(
92
+ children: K.map((a) => /* @__PURE__ */ t(
93
93
  Pe,
94
94
  {
95
95
  variant: a,
@@ -112,7 +112,7 @@ function $e({ controller: e, group: s }) {
112
112
  ": none of them is merged."
113
113
  ] }),
114
114
  /* @__PURE__ */ t(
115
- H,
115
+ Y,
116
116
  {
117
117
  size: "sm",
118
118
  variant: w ? "danger" : "secondary",
@@ -139,12 +139,12 @@ function $e({ controller: e, group: s }) {
139
139
  className: k("cursor-pointer border-t border-line-soft", a.path === c ? "bg-accent-soft" : "hover:bg-surface-hover"),
140
140
  children: [
141
141
  /* @__PURE__ */ t("td", { className: "max-w-[40ch] truncate px-3 py-1.5 font-mono text-ink", title: a.path, children: /* @__PURE__ */ t("button", { type: "button", className: "text-left", onClick: () => D(a.path), children: a.path }) }),
142
- a.cells.map((l, r) => /* @__PURE__ */ t("td", { className: "px-3 py-1.5", children: l ? /* @__PURE__ */ t(X, { added: l.added, deleted: l.deleted }) : /* @__PURE__ */ t("span", { className: "text-faint", children: "·" }) }, T[r]))
142
+ a.cells.map((l, r) => /* @__PURE__ */ t("td", { className: "px-3 py-1.5", children: l ? /* @__PURE__ */ t(q, { added: l.added, deleted: l.deleted }) : /* @__PURE__ */ t("span", { className: "text-faint", children: "·" }) }, T[r]))
143
143
  ]
144
144
  },
145
145
  a.path
146
146
  )) })
147
- ] }) }) : /* @__PURE__ */ t("p", { className: "text-[13px] text-muted", children: J ? "Reading the variants' changes…" : "No variant has changed a file yet." })
147
+ ] }) }) : /* @__PURE__ */ t("p", { className: "text-[13px] text-muted", children: Z ? "Reading the variants' changes…" : "No variant has changed a file yet." })
148
148
  ] }),
149
149
  c && /* @__PURE__ */ n("section", { "aria-label": `Diffs of ${c}`, className: "mt-5", children: [
150
150
  /* @__PURE__ */ t("h2", { className: "mb-2 truncate font-mono text-[13px] font-semibold text-ink", children: c }),
@@ -153,8 +153,8 @@ function $e({ controller: e, group: s }) {
153
153
  {
154
154
  className: k(d && "grid gap-3 overflow-x-auto"),
155
155
  style: d ? { gridTemplateColumns: `repeat(${i.length}, minmax(320px, 1fr))` } : void 0,
156
- children: A.map((a) => {
157
- const l = h.find((u) => u.path === c)?.cells[T.indexOf(a.task_id)], r = Y.get(`${a.task_id}:${c}`);
156
+ children: K.map((a) => {
157
+ const l = h.find((u) => u.path === c)?.cells[T.indexOf(a.task_id)], r = G.get(`${a.task_id}:${c}`);
158
158
  return /* @__PURE__ */ n("div", { className: "min-w-0", children: [
159
159
  /* @__PURE__ */ t("div", { className: "mb-1 text-[12px] font-semibold text-muted", children: f(a) }),
160
160
  l ? r === void 0 ? /* @__PURE__ */ t("p", { className: "px-3 py-4 text-center text-[12.5px] text-muted", children: "Reading…" }) : r === null ? /* @__PURE__ */ t("p", { className: "px-3 py-4 text-center text-[12.5px] text-danger", children: "Could not read this diff." }) : /* @__PURE__ */ t(ke, { patch: r, path: c, bare: !0, fileList: !1, defaultLayout: "unified" }) : /* @__PURE__ */ t("p", { className: "rounded-lg border border-line-soft px-3 py-4 text-center text-[12.5px] text-faint", children: "Left alone." })
@@ -165,7 +165,7 @@ function $e({ controller: e, group: s }) {
165
165
  ] })
166
166
  ] });
167
167
  }
168
- function G({
168
+ function X({
169
169
  controller: e,
170
170
  group: s,
171
171
  count: d,
@@ -174,7 +174,7 @@ function G({
174
174
  }) {
175
175
  return /* @__PURE__ */ n("div", { className: "mx-auto w-full max-w-[1600px] px-4 py-4 sm:px-6", children: [
176
176
  /* @__PURE__ */ n("div", { className: "mb-4 flex flex-wrap items-center gap-x-3 gap-y-1", children: [
177
- /* @__PURE__ */ n(z, { to: L(e.id), className: "inline-flex items-center gap-1 text-[13px] text-muted hover:text-ink", children: [
177
+ /* @__PURE__ */ n(S, { to: F(e.id), className: "inline-flex items-center gap-1 text-[13px] text-muted hover:text-ink", children: [
178
178
  /* @__PURE__ */ t(se, { size: 14, "aria-hidden": "true" }),
179
179
  e.title()
180
180
  ] }),
@@ -214,7 +214,7 @@ function Pe({
214
214
  /* @__PURE__ */ t("dt", { className: "text-muted", children: "Files" }),
215
215
  /* @__PURE__ */ t("dd", { className: "text-ink", children: e.files_changed === null || e.files_changed === void 0 ? /* @__PURE__ */ t("span", { className: "text-faint", children: "no change yet" }) : e.files_changed }),
216
216
  /* @__PURE__ */ t("dt", { className: "text-muted", children: "Lines" }),
217
- /* @__PURE__ */ t("dd", { children: e.files_changed === null || e.files_changed === void 0 ? /* @__PURE__ */ t("span", { className: "text-faint", children: "–" }) : /* @__PURE__ */ t(X, { added: e.lines_added ?? 0, deleted: e.lines_deleted ?? 0 }) }),
217
+ /* @__PURE__ */ t("dd", { children: e.files_changed === null || e.files_changed === void 0 ? /* @__PURE__ */ t("span", { className: "text-faint", children: "–" }) : /* @__PURE__ */ t(q, { added: e.lines_added ?? 0, deleted: e.lines_deleted ?? 0 }) }),
218
218
  /* @__PURE__ */ t("dt", { className: "text-muted", children: "Tokens" }),
219
219
  /* @__PURE__ */ t("dd", { className: "text-ink", children: b || /* @__PURE__ */ t("span", { className: "text-faint", children: "–" }) }),
220
220
  /* @__PURE__ */ t("dt", { className: "text-muted", children: "Time" }),
@@ -227,11 +227,11 @@ function Pe({
227
227
  ] }),
228
228
  e.error && /* @__PURE__ */ t("p", { className: "mt-2 text-[12px] text-danger", children: e.error }),
229
229
  /* @__PURE__ */ n("div", { className: "mt-auto flex flex-wrap items-center gap-2 pt-3", children: [
230
- /* @__PURE__ */ n(H, { size: "sm", variant: "primary", icon: /* @__PURE__ */ t(ie, { size: 14 }), loading: p, disabled: !!s || i, title: s ?? void 0, onClick: o, children: [
230
+ /* @__PURE__ */ n(Y, { size: "sm", variant: "primary", icon: /* @__PURE__ */ t(ie, { size: 14 }), loading: p, disabled: !!s || i, title: s ?? void 0, onClick: o, children: [
231
231
  "Pick ",
232
232
  f(e)
233
233
  ] }),
234
- e.child_session_id && /* @__PURE__ */ n(z, { to: L(e.child_session_id), className: "inline-flex items-center gap-1 text-[12.5px] font-semibold text-accent hover:underline", children: [
234
+ e.child_session_id && /* @__PURE__ */ n(S, { to: F(e.child_session_id), className: "inline-flex items-center gap-1 text-[12.5px] font-semibold text-accent hover:underline", children: [
235
235
  "Open worker transcript",
236
236
  /* @__PURE__ */ t(le, { size: 12, "aria-hidden": "true" })
237
237
  ] })
@@ -241,7 +241,7 @@ function Pe({
241
241
  }
242
242
  export {
243
243
  $e as CompareView,
244
- Le as default,
244
+ Fe as default,
245
245
  we as variantState,
246
246
  Q as whyNotPickable
247
247
  };