@peasant-labs/fairtrade 0.0.21 → 0.0.22

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/graph.js CHANGED
@@ -1,18 +1,18 @@
1
- import { $ as e, A as t, B as n, C as r, D as i, E as a, F as o, G as s, H as c, I as l, J as u, K as d, L as f, M as p, N as m, O as h, P as g, Q as _, R as v, S as y, T as b, U as x, V as S, W as C, X as w, Y as T, Z as E, _ as D, a as O, at as k, b as A, c as j, et as M, f as ee, g as N, h as P, ht as F, i as I, it as te, j as ne, k as re, m as ie, n as ae, nt as oe, o as se, ot as ce, pt as le, q as ue, r as de, rt as fe, s as pe, t as me, tt as he, ut as ge, v as L, w as _e, x as ve, xt as ye, y as be, z as xe } from "./GraphLegend-BB0V2w59.js";
2
- import { memo as Se, useCallback as R, useEffect as z, useMemo as B, useRef as V, useState as H } from "react";
3
- import { Fragment as Ce, jsx as U, jsxs as W } from "react/jsx-runtime";
4
- import { Box as we, Check as Te, ChevronDown as Ee, ChevronRight as G, Coins as De, CornerDownRight as Oe, FileCode as ke, FileDiff as Ae, FileText as je, Folder as Me, GitMerge as Ne, Hash as Pe, Map as Fe, Maximize2 as Ie, MessageSquare as Le, Minus as Re, Plus as ze, RotateCcw as Be, RotateCw as Ve, Search as He, Share2 as Ue, Tag as We, TriangleAlert as Ge, X as Ke } from "lucide-react";
5
- import { AllChangeBindings as qe, AllDiffLineKinds as Je, AllEdgeViolationKinds as Ye, AllFileChangeStatuses as Xe, AllInsightKinds as Ze, AllInsightProvenances as Qe, AllMapNodeKinds as $e, AllReadAttributionStates as et, AllReadStateGrades as tt, ChangeBinding as nt, DiffLineKind as rt, EdgeViolationKind as it, FileChangeStatus as at, InsightKind as ot, InsightProvenance as st, MapNodeKind as ct, ReadAttributionState as lt, ReadStateGrade as ut, isChangeBinding as dt, isDiffLineKind as ft, isEdgeViolationKind as pt, isFileChangeStatus as mt, isInsightKind as ht, isInsightProvenance as gt, isMapNodeKind as _t, isReadAttributionState as vt, isReadStateGrade as yt } from "@peasant-labs/schema";
6
- import { Background as bt, BackgroundVariant as xt, Handle as K, MiniMap as St, Position as q, ReactFlow as Ct, ReactFlowProvider as wt, useEdgesState as Tt, useNodesState as Et, useReactFlow as Dt } from "@xyflow/react";
1
+ import { $ as e, A as t, B as n, C as r, D as i, E as a, F as o, G as s, H as c, I as l, J as u, K as d, L as f, M as p, N as m, O as h, P as g, Q as _, R as v, S as y, St as b, T as x, U as S, V as C, W as w, X as T, Y as E, Z as D, _ as O, a as k, at as A, b as j, c as ee, d as M, dt as N, et as P, g as F, gt as te, h as ne, i as I, it as re, j as ie, k as ae, mt as oe, n as se, nt as ce, o as le, ot as ue, p as de, q as fe, r as pe, rt as me, s as he, st as ge, t as _e, tt as ve, v as ye, w as be, x as xe, y as L, z as Se } from "./GraphLegend-sgixmPER.js";
2
+ import { memo as Ce, useCallback as R, useEffect as z, useMemo as B, useRef as V, useState as H } from "react";
3
+ import { Fragment as we, jsx as U, jsxs as W } from "react/jsx-runtime";
4
+ import { Box as Te, Check as Ee, ChevronDown as De, ChevronRight as G, Coins as Oe, CornerDownRight as ke, FileCode as Ae, FileDiff as je, FileText as Me, Folder as Ne, GitMerge as Pe, Hash as Fe, Map as Ie, Maximize2 as Le, MessageSquare as Re, Minus as ze, Plus as Be, RotateCcw as Ve, RotateCw as He, Search as Ue, Share2 as We, Tag as Ge, TriangleAlert as Ke, X as qe } from "lucide-react";
5
+ import { AllChangeBindings as Je, AllDiffLineKinds as Ye, AllEdgeViolationKinds as Xe, AllFileChangeStatuses as Ze, AllInsightKinds as Qe, AllInsightProvenances as $e, AllMapNodeKinds as et, AllReadAttributionStates as tt, AllReadStateGrades as nt, ChangeBinding as rt, DiffLineKind as it, EdgeViolationKind as at, FileChangeStatus as ot, InsightKind as st, InsightProvenance as ct, MapNodeKind as lt, ReadAttributionState as ut, ReadStateGrade as dt, isChangeBinding as ft, isDiffLineKind as pt, isEdgeViolationKind as mt, isFileChangeStatus as ht, isInsightKind as gt, isInsightProvenance as _t, isMapNodeKind as vt, isReadAttributionState as yt, isReadStateGrade as bt } from "@peasant-labs/schema";
6
+ import { Background as xt, BackgroundVariant as St, Handle as K, MiniMap as Ct, Position as q, ReactFlow as wt, ReactFlowProvider as Tt, useEdgesState as Et, useNodesState as Dt, useReactFlow as Ot } from "@xyflow/react";
7
7
  //#region src/ui/graph/changeGraph.js
8
- var Ot = 6e4, kt = 60 * Ot, At = 24 * kt, jt = 7 * At;
8
+ var kt = 6e4, At = 60 * kt, jt = 24 * At, Mt = 7 * jt;
9
9
  function J(e, t) {
10
10
  if (e == null) return "";
11
11
  let n = Math.max(0, t - e);
12
- return n < kt ? `${Math.max(1, Math.floor(n / Ot))}m ago` : n < At ? `${Math.floor(n / kt)}h ago` : n < jt ? `${Math.floor(n / At)}d ago` : `${Math.floor(n / jt)}wk ago`;
12
+ return n < At ? `${Math.max(1, Math.floor(n / kt))}m ago` : n < jt ? `${Math.floor(n / At)}h ago` : n < Mt ? `${Math.floor(n / jt)}d ago` : `${Math.floor(n / Mt)}wk ago`;
13
13
  }
14
- function Mt(e, { nowMs: t }) {
15
- let n = e.recentCommits ?? [], r = e.changes ?? [], i = e.defaultBranch, a = e.sessions ?? [], o = new Map(a.map((e) => [e.sessionId, e])), s = new Set(n.flatMap((e) => e.sessionIds ?? [])), c = r.filter((e) => !e.merged).slice().sort((e, t) => Nt(t) - Nt(e) || e.branch.localeCompare(t.branch)), l = r.filter((e) => e.merged && !e.reverted), u = r.filter((e) => e.merged && e.reverted), d = new Map(l.filter((e) => e.mergeCommitHash).map((e) => [e.mergeCommitHash, e])), f = c.map((e, t) => ({
14
+ function Nt(e, { nowMs: t }) {
15
+ let n = e.recentCommits ?? [], r = e.changes ?? [], i = e.defaultBranch, a = e.sessions ?? [], o = new Map(a.map((e) => [e.sessionId, e])), s = new Set(n.flatMap((e) => e.sessionIds ?? [])), c = r.filter((e) => !e.merged).slice().sort((e, t) => Pt(t) - Pt(e) || e.branch.localeCompare(t.branch)), l = r.filter((e) => e.merged && !e.reverted), u = r.filter((e) => e.merged && e.reverted), d = new Map(l.filter((e) => e.mergeCommitHash).map((e) => [e.mergeCommitHash, e])), f = c.map((e, t) => ({
16
16
  change: e,
17
17
  lane: t + 1,
18
18
  baseHash: e.baseHash,
@@ -68,13 +68,13 @@ function Mt(e, { nowMs: t }) {
68
68
  outsideWindowSessions: _
69
69
  };
70
70
  }
71
- function Nt(e) {
71
+ function Pt(e) {
72
72
  return e.tipCommitMs ?? Infinity;
73
73
  }
74
74
  //#endregion
75
75
  //#region src/ui/graph/Changes.jsx
76
- function Pt({ payload: e, projectLabel: t, selectedId: n, onNavigate: r, onSelectChange: i, onOpenMap: a, hasMore: o = !1, onShowOlder: s, onOpenSession: c, nowMs: l }) {
77
- let u = l ?? Date.now(), { commits: d, reverted: f, unlinkedSessions: p, outsideWindowSessions: m, openCount: h, mergedCount: g } = B(() => Mt(e, { nowMs: u }), [e, u]), _ = e.defaultBranch, v = B(() => new Set(d.filter((e) => (e.sessionRefs?.length ?? 0) > 2).map((e) => e.id)), [d]), [y, b] = H([]);
76
+ function Ft({ payload: e, projectLabel: t, selectedId: n, onNavigate: r, onSelectChange: i, onOpenMap: a, hasMore: o = !1, onShowOlder: s, onOpenSession: c, nowMs: l }) {
77
+ let u = l ?? Date.now(), { commits: d, reverted: f, unlinkedSessions: p, outsideWindowSessions: m, openCount: h, mergedCount: g } = B(() => Nt(e, { nowMs: u }), [e, u]), _ = e.defaultBranch, v = B(() => new Set(d.filter((e) => (e.sessionRefs?.length ?? 0) > 2).map((e) => e.id)), [d]), [y, b] = H([]);
78
78
  z(() => {
79
79
  b((e) => {
80
80
  let t = e.filter((e) => v.has(e));
@@ -109,7 +109,7 @@ function Pt({ payload: e, projectLabel: t, selectedId: n, onNavigate: r, onSelec
109
109
  onClick: () => {
110
110
  r ? r({ type: "open-map" }) : a?.();
111
111
  },
112
- children: [/* @__PURE__ */ U(we, {
112
+ children: [/* @__PURE__ */ U(Te, {
113
113
  size: 14,
114
114
  "aria-hidden": "true"
115
115
  }), " open the map"]
@@ -117,7 +117,7 @@ function Pt({ payload: e, projectLabel: t, selectedId: n, onNavigate: r, onSelec
117
117
  }), /* @__PURE__ */ W("div", {
118
118
  className: "gmp-changes-body",
119
119
  children: [
120
- /* @__PURE__ */ U(M, {
120
+ /* @__PURE__ */ U(ve, {
121
121
  className: "gmp-cg",
122
122
  commits: d,
123
123
  selectedId: n,
@@ -149,7 +149,7 @@ function Pt({ payload: e, projectLabel: t, selectedId: n, onNavigate: r, onSelec
149
149
  source: { kind: "unlinked" }
150
150
  }) : c?.(e.sessionId);
151
151
  },
152
- children: [/* @__PURE__ */ U(ge, { harness: e.harness }), /* @__PURE__ */ U("span", { children: e.title || e.sessionId })]
152
+ children: [/* @__PURE__ */ U(N, { harness: e.harness }), /* @__PURE__ */ U("span", { children: e.title || e.sessionId })]
153
153
  }, e.sessionId))
154
154
  })]
155
155
  }),
@@ -172,7 +172,7 @@ function Pt({ payload: e, projectLabel: t, selectedId: n, onNavigate: r, onSelec
172
172
  source: { kind: "outside-window" }
173
173
  }) : c?.(e.sessionId);
174
174
  },
175
- children: [/* @__PURE__ */ U(ge, { harness: e.harness }), /* @__PURE__ */ U("span", { children: e.title || e.sessionId })]
175
+ children: [/* @__PURE__ */ U(N, { harness: e.harness }), /* @__PURE__ */ U("span", { children: e.title || e.sessionId })]
176
176
  }, e.sessionId))
177
177
  })]
178
178
  }),
@@ -200,7 +200,7 @@ function Pt({ payload: e, projectLabel: t, selectedId: n, onNavigate: r, onSelec
200
200
  }) : i?.(t);
201
201
  },
202
202
  children: [
203
- /* @__PURE__ */ U(Ne, {
203
+ /* @__PURE__ */ U(Pe, {
204
204
  size: 13,
205
205
  "aria-hidden": "true"
206
206
  }),
@@ -249,29 +249,29 @@ function Pt({ payload: e, projectLabel: t, selectedId: n, onNavigate: r, onSelec
249
249
  }
250
250
  //#endregion
251
251
  //#region src/ui/graph/ChangeDetail.jsx
252
- var Ft = {
252
+ var It = {
253
253
  M: "changed",
254
254
  A: "added",
255
255
  D: "deleted",
256
256
  R: "renamed"
257
- }, It = {
257
+ }, Lt = {
258
258
  A: "chip-ok",
259
259
  M: "",
260
260
  D: "chip-err",
261
261
  R: "chip-warn"
262
- }, Lt = {
262
+ }, Rt = {
263
263
  context: "ctx",
264
264
  add: "add",
265
265
  del: "del"
266
266
  };
267
- function Rt(e) {
267
+ function zt(e) {
268
268
  let t = (e.split("/").pop() ?? e).replace(/[-_]+/g, " ").trim();
269
269
  return t.charAt(0).toUpperCase() + t.slice(1);
270
270
  }
271
- var zt = (e) => e >= 1e3 ? `≈${(e / 1e3).toFixed(1)}k` : String(e);
272
- function Bt(e) {
271
+ var Bt = (e) => e >= 1e3 ? `≈${(e / 1e3).toFixed(1)}k` : String(e);
272
+ function Vt(e) {
273
273
  let t = e.oldStart, n = e.newStart, r = e.lines.map((e) => {
274
- let r = Lt[e.kind] ?? "ctx";
274
+ let r = Rt[e.kind] ?? "ctx";
275
275
  return r === "add" ? {
276
276
  type: r,
277
277
  newNo: n++,
@@ -292,62 +292,62 @@ function Bt(e) {
292
292
  lines: r
293
293
  };
294
294
  }
295
- function Vt({ file: t, diff: n, open: r, onToggle: i }) {
296
- n && E(n);
297
- let a = t.status, o = n ? new Set(n.hunks.map((e) => e.sessionId).filter(Boolean)).size : null;
295
+ function Ht({ file: e, diff: t, open: n, onToggle: r }) {
296
+ t && _(t);
297
+ let i = e.status, a = t ? new Set(t.hunks.map((e) => e.sessionId).filter(Boolean)).size : null;
298
298
  return /* @__PURE__ */ W("div", {
299
299
  className: "gmp-file",
300
300
  children: [/* @__PURE__ */ W("button", {
301
301
  type: "button",
302
302
  className: "gmp-file-head",
303
- "aria-expanded": r,
304
- onClick: i,
303
+ "aria-expanded": n,
304
+ onClick: r,
305
305
  children: [
306
- U(r ? Ee : G, {
306
+ U(n ? De : G, {
307
307
  size: 14,
308
308
  "aria-hidden": "true"
309
309
  }),
310
310
  /* @__PURE__ */ U("span", {
311
311
  className: "mono gmp-file-path",
312
- children: t.path
312
+ children: e.path
313
313
  }),
314
314
  /* @__PURE__ */ U("span", {
315
- className: "chip gmp-file-status " + (It[a] ?? ""),
316
- children: Ft[a] ?? a
315
+ className: "chip gmp-file-status " + (Lt[i] ?? ""),
316
+ children: It[i] ?? i
317
317
  }),
318
- o != null && o > 0 && /* @__PURE__ */ W("span", {
318
+ a != null && a > 0 && /* @__PURE__ */ W("span", {
319
319
  className: "gmp-file-convos metaitem",
320
320
  children: [
321
- /* @__PURE__ */ U(Le, {
321
+ /* @__PURE__ */ U(Re, {
322
322
  size: 13,
323
323
  "aria-hidden": "true"
324
324
  }),
325
325
  " ",
326
326
  /* @__PURE__ */ U("span", {
327
327
  className: "tnum",
328
- children: o
328
+ children: a
329
329
  })
330
330
  ]
331
331
  })
332
332
  ]
333
- }), r && /* @__PURE__ */ U("div", {
333
+ }), n && /* @__PURE__ */ U("div", {
334
334
  className: "gmp-file-body",
335
- children: n ? n.error ? /* @__PURE__ */ U("p", {
335
+ children: t ? t.error ? /* @__PURE__ */ U("p", {
336
336
  className: "gmp-diff-state gmp-diff-error mono",
337
- children: n.error
338
- }) : n.binary ? /* @__PURE__ */ U("p", {
337
+ children: t.error
338
+ }) : t.binary ? /* @__PURE__ */ U("p", {
339
339
  className: "gmp-diff-state mono",
340
340
  children: "binary file — no textual diff."
341
- }) : n.hunks.length === 0 ? /* @__PURE__ */ U("p", {
341
+ }) : t.hunks.length === 0 ? /* @__PURE__ */ U("p", {
342
342
  className: "gmp-diff-state mono",
343
343
  children: "no line changes."
344
- }) : n.hunks.map((t, r) => /* @__PURE__ */ W("div", {
344
+ }) : t.hunks.map((e, n) => /* @__PURE__ */ W("div", {
345
345
  className: "gmp-hunk",
346
346
  children: [
347
- t.sessionTitle && /* @__PURE__ */ W("div", {
347
+ e.sessionTitle && /* @__PURE__ */ W("div", {
348
348
  className: "gmp-hunk-attrib",
349
349
  children: [
350
- /* @__PURE__ */ U(Oe, {
350
+ /* @__PURE__ */ U(ke, {
351
351
  size: 13,
352
352
  "aria-hidden": "true"
353
353
  }),
@@ -357,38 +357,38 @@ function Vt({ file: t, diff: n, open: r, onToggle: i }) {
357
357
  }),
358
358
  /* @__PURE__ */ U("span", {
359
359
  className: "gmp-hunk-link",
360
- children: t.sessionTitle
360
+ children: e.sessionTitle
361
361
  }),
362
- t.sessionId && /* @__PURE__ */ U("span", {
362
+ e.sessionId && /* @__PURE__ */ U("span", {
363
363
  className: "mono gmp-hunk-hash",
364
- children: t.sessionId.slice(0, 7)
364
+ children: e.sessionId.slice(0, 7)
365
365
  })
366
366
  ]
367
367
  }),
368
- /* @__PURE__ */ U(e, {
368
+ /* @__PURE__ */ U(P, {
369
369
  file: "",
370
- hunks: [Bt(t)],
370
+ hunks: [Vt(e)],
371
371
  className: "gmp-hunk-diff"
372
372
  }),
373
- n.truncated && r === n.hunks.length - 1 && /* @__PURE__ */ U("p", {
373
+ t.truncated && n === t.hunks.length - 1 && /* @__PURE__ */ U("p", {
374
374
  className: "gmp-diff-state mono",
375
375
  children: "diff truncated (file exceeds the size cap)."
376
376
  })
377
377
  ]
378
- }, r)) : /* @__PURE__ */ U("p", {
378
+ }, n)) : /* @__PURE__ */ U("p", {
379
379
  className: "gmp-diff-state mono",
380
380
  children: "loading diff…"
381
381
  })
382
382
  })]
383
383
  });
384
384
  }
385
- function Ht({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnotation: i, onRemoveAnnotation: a, onOpenMap: o, onShare: s, onCopyRecap: c, initialOpenFiles: l = {} }) {
386
- w(e);
387
- let [u, d] = H(l), [f, p] = H(null), [m, h] = H(!1), [g, _] = H(""), v = V({}), y = V(null), b = n ?? Rt(e.branch), x = e.work.length, S = e.newEdges.length, C = e.removedEdges.length, T = (e) => d((t) => ({
385
+ function Ut({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnotation: i, onRemoveAnnotation: a, onOpenMap: o, onShare: s, onCopyRecap: c, initialOpenFiles: l = {} }) {
386
+ D(e);
387
+ let [u, d] = H(l), [f, p] = H(null), [m, h] = H(!1), [g, _] = H(""), v = V({}), y = V(null), b = n ?? zt(e.branch), x = e.work.length, S = e.newEdges.length, C = e.removedEdges.length, w = (e) => d((t) => ({
388
388
  ...t,
389
389
  [e]: !t[e]
390
390
  }));
391
- function E(e, t) {
391
+ function T(e, t) {
392
392
  if (p(e), t) {
393
393
  d((e) => ({
394
394
  ...e,
@@ -404,7 +404,7 @@ function Ht({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
404
404
  }
405
405
  }
406
406
  }
407
- function D(e) {
407
+ function E(e) {
408
408
  e.preventDefault();
409
409
  let t = g.trim();
410
410
  t && i?.(t), h(!1), _("");
@@ -451,7 +451,7 @@ function Ht({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
451
451
  /* @__PURE__ */ W("button", {
452
452
  type: "button",
453
453
  className: "gmp-frag" + (f === "files" ? " gmp-frag-on" : ""),
454
- onClick: () => E("files", O),
454
+ onClick: () => T("files", O),
455
455
  children: [e.filesChanged, " files"]
456
456
  }),
457
457
  " ",
@@ -460,7 +460,7 @@ function Ht({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
460
460
  /* @__PURE__ */ W("button", {
461
461
  type: "button",
462
462
  className: "gmp-frag" + (f === "conversations" ? " gmp-frag-on" : ""),
463
- onClick: () => E("conversations"),
463
+ onClick: () => T("conversations"),
464
464
  children: [x, " conversations"]
465
465
  }),
466
466
  ", reshaping",
@@ -468,7 +468,7 @@ function Ht({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
468
468
  /* @__PURE__ */ W("button", {
469
469
  type: "button",
470
470
  className: "gmp-frag" + (f === "conn" ? " gmp-frag-on" : ""),
471
- onClick: () => E("conn"),
471
+ onClick: () => T("conn"),
472
472
  children: [
473
473
  "+",
474
474
  S,
@@ -491,7 +491,7 @@ function Ht({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
491
491
  children: [e.frictions.map((e, t) => /* @__PURE__ */ W("span", {
492
492
  className: "gmp-signal",
493
493
  children: [
494
- /* @__PURE__ */ U(Ve, {
494
+ /* @__PURE__ */ U(He, {
495
495
  size: 14,
496
496
  "aria-hidden": "true"
497
497
  }),
@@ -514,7 +514,7 @@ function Ht({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
514
514
  }, t)), e.violations.length > 0 && /* @__PURE__ */ W("span", {
515
515
  className: "gmp-signal gmp-signal-warn",
516
516
  children: [
517
- /* @__PURE__ */ U(Ge, {
517
+ /* @__PURE__ */ U(Ke, {
518
518
  size: 14,
519
519
  "aria-hidden": "true"
520
520
  }),
@@ -533,7 +533,7 @@ function Ht({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
533
533
  /* @__PURE__ */ W("span", {
534
534
  className: "metaitem tnum",
535
535
  children: [
536
- /* @__PURE__ */ U(Ae, {
536
+ /* @__PURE__ */ U(je, {
537
537
  size: 14,
538
538
  "aria-hidden": "true"
539
539
  }),
@@ -560,19 +560,19 @@ function Ht({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
560
560
  /* @__PURE__ */ W("span", {
561
561
  className: "metaitem tnum",
562
562
  children: [
563
- /* @__PURE__ */ U(Pe, {
563
+ /* @__PURE__ */ U(Fe, {
564
564
  size: 14,
565
565
  "aria-hidden": "true"
566
566
  }),
567
567
  " ai wrote ",
568
- zt(Number(e.outputTokens)),
568
+ Bt(Number(e.outputTokens)),
569
569
  " tokens"
570
570
  ]
571
571
  }),
572
572
  e.costUsd != null && /* @__PURE__ */ W("span", {
573
573
  className: "metaitem tnum",
574
574
  children: [
575
- /* @__PURE__ */ U(De, {
575
+ /* @__PURE__ */ U(Oe, {
576
576
  size: 14,
577
577
  "aria-hidden": "true"
578
578
  }),
@@ -593,11 +593,11 @@ function Ht({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
593
593
  ref: (t) => {
594
594
  v.current[e.path] = t;
595
595
  },
596
- children: /* @__PURE__ */ U(Vt, {
596
+ children: /* @__PURE__ */ U(Ht, {
597
597
  file: e,
598
598
  diff: u[e.path] ? t?.(e) : void 0,
599
599
  open: !!u[e.path],
600
- onToggle: () => T(e.path)
600
+ onToggle: () => w(e.path)
601
601
  })
602
602
  }, e.path))
603
603
  })]
@@ -613,7 +613,7 @@ function Ht({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
613
613
  r && /* @__PURE__ */ W("span", {
614
614
  className: "gmp-label-chip gmp-annot-chip",
615
615
  children: [
616
- /* @__PURE__ */ U(We, {
616
+ /* @__PURE__ */ U(Ge, {
617
617
  size: 12,
618
618
  "aria-hidden": "true"
619
619
  }),
@@ -624,7 +624,7 @@ function Ht({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
624
624
  className: "gmp-annot-x",
625
625
  "aria-label": "remove annotation",
626
626
  onClick: () => a?.(),
627
- children: /* @__PURE__ */ U(Ke, {
627
+ children: /* @__PURE__ */ U(qe, {
628
628
  size: 11,
629
629
  "aria-hidden": "true"
630
630
  })
@@ -637,7 +637,7 @@ function Ht({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
637
637
  "aria-expanded": m,
638
638
  onClick: () => h((e) => !e),
639
639
  children: [
640
- /* @__PURE__ */ U(We, {
640
+ /* @__PURE__ */ U(Ge, {
641
641
  size: 13,
642
642
  "aria-hidden": "true"
643
643
  }),
@@ -647,7 +647,7 @@ function Ht({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
647
647
  }),
648
648
  m && /* @__PURE__ */ W("form", {
649
649
  className: "gmp-annot-pop",
650
- onSubmit: D,
650
+ onSubmit: E,
651
651
  children: [
652
652
  /* @__PURE__ */ U("span", {
653
653
  className: "label",
@@ -672,7 +672,7 @@ function Ht({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
672
672
  }), /* @__PURE__ */ W("button", {
673
673
  type: "submit",
674
674
  className: "btn btn-primary btn-sm",
675
- children: [/* @__PURE__ */ U(Te, {
675
+ children: [/* @__PURE__ */ U(Ee, {
676
676
  size: 13,
677
677
  "aria-hidden": "true"
678
678
  }), " save"]
@@ -690,7 +690,7 @@ function Ht({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
690
690
  type: "button",
691
691
  className: "btn btn-secondary btn-sm",
692
692
  onClick: () => o?.(),
693
- children: [/* @__PURE__ */ U(we, {
693
+ children: [/* @__PURE__ */ U(Te, {
694
694
  size: 14,
695
695
  "aria-hidden": "true"
696
696
  }), " see this work on the code map"]
@@ -700,7 +700,7 @@ function Ht({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
700
700
  className: "btn btn-secondary btn-sm",
701
701
  onClick: () => s?.(),
702
702
  children: [
703
- /* @__PURE__ */ U(Ue, {
703
+ /* @__PURE__ */ U(We, {
704
704
  size: 14,
705
705
  "aria-hidden": "true"
706
706
  }),
@@ -713,7 +713,7 @@ function Ht({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
713
713
  type: "button",
714
714
  className: "btn btn-secondary btn-sm",
715
715
  onClick: () => c?.(),
716
- children: [/* @__PURE__ */ U(je, {
716
+ children: [/* @__PURE__ */ U(Me, {
717
717
  size: 14,
718
718
  "aria-hidden": "true"
719
719
  }), " copy recap"]
@@ -738,83 +738,83 @@ function Ht({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
738
738
  }
739
739
  //#endregion
740
740
  //#region src/ui/graph/CodeMap.jsx
741
- var Ut = Object.freeze({
741
+ var Wt = Object.freeze({
742
742
  project: "overview",
743
743
  package: "folders",
744
744
  file: "files"
745
- }), Wt = Object.freeze({
745
+ }), Gt = Object.freeze({
746
746
  overview: "project",
747
747
  folders: "package",
748
748
  files: "file"
749
749
  });
750
- function Gt({ payload: e, zoom: t, onZoomChange: n, selectedId: r, onSelect: i, onExpand: a, highlightedIds: o, nodeDeltas: s, structureEdgeDeltas: c, height: l = 520, ariaLabel: u = "code map", className: d = "", viewport: f, onViewportChange: p, state: m, onStateChange: h }) {
751
- let g = B(() => {
750
+ function Kt({ payload: e, zoom: t, onZoomChange: n, selectedId: i, onSelect: a, onExpand: o, highlightedIds: s, nodeDeltas: c, structureEdgeDeltas: l, height: u = 520, ariaLabel: d = "code map", className: f = "", viewport: p, onViewportChange: m, state: h, onStateChange: g }) {
751
+ let _ = B(() => {
752
752
  let t = /* @__PURE__ */ new Map();
753
753
  for (let n of e?.nodes ?? []) t.set(n.id, n);
754
754
  return t;
755
- }, [e?.nodes]), _ = B(() => m === void 0 ? null : L(m), [m]), v = B(() => _ ? be(e, _) : null, [e, _]), b = B(() => Kt(e && {
755
+ }, [e?.nodes]), v = B(() => h === void 0 ? null : L(h), [h]), y = B(() => v ? j(e, v) : null, [e, v]), b = B(() => qt(e && {
756
756
  ...e,
757
- nodes: v?.canvas.allNodes ?? e.nodes
758
- }), [e, v?.canvas.allNodes]), x = v ? Ut[v.canvas.grain] ?? "folders" : Ut[t?.level ?? "package"], S = v?.canvas.expandedIds ?? t?.expanded, C = V(x);
757
+ nodes: y?.canvas.allNodes ?? e.nodes
758
+ }), [e, y?.canvas.allNodes]), x = y ? Wt[y.canvas.grain] ?? "folders" : Wt[t?.level ?? "package"], S = y?.canvas.expandedIds ?? t?.expanded, C = V(x);
759
759
  C.current = x;
760
760
  function w(e) {
761
- if (!_) return;
762
- let t = y(_, e);
763
- D(_, t) || h?.(t);
761
+ if (!v) return;
762
+ let t = r(v, e);
763
+ ye(v, t) || g?.(t);
764
764
  }
765
- return /* @__PURE__ */ U(ie, {
765
+ return /* @__PURE__ */ U(ne, {
766
766
  data: b,
767
767
  grain: x,
768
768
  expandedIds: S,
769
- visibleIds: v?.canvas.visibleIds,
770
- hierarchy: v?.canvas.hierarchy,
771
- selectedId: v ? v.canvas.selectedId : r,
772
- highlightedIds: o,
773
- nodeDeltas: s,
774
- edgeDeltas: c,
769
+ visibleIds: y?.canvas.visibleIds,
770
+ hierarchy: y?.canvas.hierarchy,
771
+ selectedId: y ? y.canvas.selectedId : i,
772
+ highlightedIds: s,
773
+ nodeDeltas: c,
774
+ edgeDeltas: l,
775
775
  onSelect: (e) => {
776
- i?.(e, e ? g.get(e) ?? null : null);
776
+ a?.(e, e ? _.get(e) ?? null : null);
777
777
  },
778
- onExpand: a,
778
+ onExpand: o,
779
779
  onGrainChange: (e) => {
780
780
  C.current = e, n?.({
781
- level: Wt[e] ?? "package",
781
+ level: Gt[e] ?? "package",
782
782
  expanded: []
783
783
  });
784
784
  },
785
785
  onExpandedIdsChange: (e) => {
786
786
  n?.({
787
- level: Wt[C.current] ?? "package",
787
+ level: Gt[C.current] ?? "package",
788
788
  expanded: e
789
789
  });
790
790
  },
791
- height: l,
792
- ariaLabel: u,
793
- className: d,
794
- viewport: v ? v.canvas.viewport : f,
791
+ height: u,
792
+ ariaLabel: d,
793
+ className: f,
794
+ viewport: y ? y.canvas.viewport : p,
795
795
  onViewportChange: (e) => {
796
- p?.(e);
796
+ m?.(e);
797
797
  },
798
- onStateAction: _ ? w : void 0,
799
- canonicalControlled: _ !== null
798
+ onStateAction: v ? w : void 0,
799
+ canonicalControlled: v !== null
800
800
  });
801
801
  }
802
- function Kt(e) {
803
- e && _(e);
804
- let t = e?.nodes ?? [], n = Jt(e?.violations ?? []);
802
+ function qt(t) {
803
+ t && e(t);
804
+ let n = t?.nodes ?? [], r = Yt(t?.violations ?? []);
805
805
  return {
806
- nodes: t.map((e) => ({
806
+ nodes: n.map((e) => ({
807
807
  id: e.id,
808
808
  label: e.name || e.id,
809
809
  kind: e.kind === "file" ? "file" : "folder",
810
810
  loc: e.loc ?? 0,
811
- coverage: qt(e.recordedFiles, e.totalFiles),
811
+ coverage: Jt(e.recordedFiles, e.totalFiles),
812
812
  parent: e.parent || void 0,
813
- violations: n.get(e.id) ?? 0,
813
+ violations: r.get(e.id) ?? 0,
814
814
  layer: e.layer,
815
815
  order: e.order
816
816
  })),
817
- edges: (e?.structureEdges ?? []).map((e) => ({
817
+ edges: (t?.structureEdges ?? []).map((e) => ({
818
818
  from: e.from,
819
819
  to: e.to,
820
820
  kind: "structure",
@@ -822,24 +822,24 @@ function Kt(e) {
822
822
  }))
823
823
  };
824
824
  }
825
- function qt(e, t) {
825
+ function Jt(e, t) {
826
826
  let n = Number(t) || 0;
827
827
  if (n <= 0) return 0;
828
828
  let r = Math.max(0, Math.min(1, (Number(e) || 0) / n));
829
829
  return Math.max(0, Math.min(4, Math.round(r * 4)));
830
830
  }
831
- function Jt(e) {
831
+ function Yt(e) {
832
832
  let t = /* @__PURE__ */ new Map();
833
- for (let n of e) Yt(t, n.from), Yt(t, n.to);
833
+ for (let n of e) Xt(t, n.from), Xt(t, n.to);
834
834
  return t;
835
835
  }
836
- function Yt(e, t) {
836
+ function Xt(e, t) {
837
837
  t && e.set(t, (e.get(t) ?? 0) + 1);
838
838
  }
839
839
  //#endregion
840
840
  //#region src/ui/graph/CodeMapNavigator.jsx
841
- function Xt({ payload: e, grain: t = "package", expandedIds: n, onExpandedIdsChange: r, selectedId: i = null, onSelect: a, focusedId: o, onFocusChange: s, filter: c = "", onFilterChange: l, onOpenMap: u, onStateAction: d, ariaLabel: f = "code map navigator" }) {
842
- let [p, m] = H(() => /* @__PURE__ */ new Set()), [h, g] = H(null), _ = n === void 0 ? p : new Set(n), v = o === void 0 ? h : o, y = V(/* @__PURE__ */ new Map()), b = B(() => be(e, L({
841
+ function Zt({ payload: e, grain: t = "package", expandedIds: n, onExpandedIdsChange: r, selectedId: i = null, onSelect: a, focusedId: o, onFocusChange: s, filter: c = "", onFilterChange: l, onOpenMap: u, onStateAction: d, ariaLabel: f = "code map navigator" }) {
842
+ let [p, m] = H(() => /* @__PURE__ */ new Set()), [h, g] = H(null), _ = n === void 0 ? p : new Set(n), v = o === void 0 ? h : o, y = V(/* @__PURE__ */ new Map()), b = B(() => j(e, L({
843
843
  grain: t,
844
844
  expandedIds: Array.from(_),
845
845
  selectedId: i,
@@ -848,7 +848,7 @@ function Xt({ payload: e, grain: t = "package", expandedIds: n, onExpandedIdsCha
848
848
  })), [
849
849
  e,
850
850
  t,
851
- Qt(_),
851
+ $t(_),
852
852
  i,
853
853
  v,
854
854
  c
@@ -906,7 +906,7 @@ function Xt({ payload: e, grain: t = "package", expandedIds: n, onExpandedIdsCha
906
906
  })] }), /* @__PURE__ */ W("label", {
907
907
  className: "gmp-navigator-search",
908
908
  children: [
909
- /* @__PURE__ */ U(He, { "aria-hidden": "true" }),
909
+ /* @__PURE__ */ U(Ue, { "aria-hidden": "true" }),
910
910
  /* @__PURE__ */ U("span", {
911
911
  className: "mc-sr",
912
912
  children: "filter code areas"
@@ -952,7 +952,7 @@ function Xt({ payload: e, grain: t = "package", expandedIds: n, onExpandedIdsCha
952
952
  children: "no code areas match this filter"
953
953
  }) : x.map((e, t) => {
954
954
  let n = e.canExpand || e.forcedOpen, r = e.expanded, a = S === e.node.id;
955
- return /* @__PURE__ */ U(Zt, {
955
+ return /* @__PURE__ */ U(Qt, {
956
956
  row: e,
957
957
  hasChildren: n,
958
958
  isExpanded: r,
@@ -974,7 +974,7 @@ function Xt({ payload: e, grain: t = "package", expandedIds: n, onExpandedIdsCha
974
974
  }), /* @__PURE__ */ U("aside", {
975
975
  className: "gmp-navigator-actions",
976
976
  "aria-label": "selected code area",
977
- children: C ? /* @__PURE__ */ W(Ce, { children: [
977
+ children: C ? /* @__PURE__ */ W(we, { children: [
978
978
  /* @__PURE__ */ U("p", {
979
979
  className: "gmp-navigator-selected",
980
980
  children: C.name || C.id
@@ -998,7 +998,7 @@ function Xt({ payload: e, grain: t = "package", expandedIds: n, onExpandedIdsCha
998
998
  id: C.id
999
999
  }), u?.(C.id);
1000
1000
  },
1001
- children: [/* @__PURE__ */ U(Fe, { "aria-hidden": "true" }), " open in map"]
1001
+ children: [/* @__PURE__ */ U(Ie, { "aria-hidden": "true" }), " open in map"]
1002
1002
  })
1003
1003
  ] }) : /* @__PURE__ */ U("p", {
1004
1004
  className: "gmp-navigator-empty",
@@ -1009,7 +1009,7 @@ function Xt({ payload: e, grain: t = "package", expandedIds: n, onExpandedIdsCha
1009
1009
  ]
1010
1010
  });
1011
1011
  }
1012
- function Zt({ row: e, hasChildren: t, isExpanded: n, selected: r, tabbable: i, setRef: a, onFocus: o, onSelect: s, onToggle: c, onKeyDown: l }) {
1012
+ function Qt({ row: e, hasChildren: t, isExpanded: n, selected: r, tabbable: i, setRef: a, onFocus: o, onSelect: s, onToggle: c, onKeyDown: l }) {
1013
1013
  return /* @__PURE__ */ W("div", {
1014
1014
  role: "none",
1015
1015
  className: "gmp-navigator-row-wrap",
@@ -1048,121 +1048,121 @@ function Zt({ row: e, hasChildren: t, isExpanded: n, selected: r, tabbable: i, s
1048
1048
  },
1049
1049
  onKeyDown: l,
1050
1050
  children: [
1051
- e.node.kind === "file" ? /* @__PURE__ */ U(ke, { "aria-hidden": "true" }) : /* @__PURE__ */ U(Me, { "aria-hidden": "true" }),
1051
+ e.node.kind === "file" ? /* @__PURE__ */ U(Ae, { "aria-hidden": "true" }) : /* @__PURE__ */ U(Ne, { "aria-hidden": "true" }),
1052
1052
  /* @__PURE__ */ U("span", {
1053
1053
  className: "gmp-navigator-path",
1054
1054
  children: e.node.name || e.node.id
1055
1055
  }),
1056
1056
  /* @__PURE__ */ W("span", {
1057
1057
  className: "gmp-navigator-meta",
1058
- children: [/* @__PURE__ */ W("span", { children: [$t(e.node.loc ?? 0), " lines"] }), /* @__PURE__ */ U("span", { children: en(e.node.recordedFiles, e.node.totalFiles) })]
1058
+ children: [/* @__PURE__ */ W("span", { children: [en(e.node.loc ?? 0), " lines"] }), /* @__PURE__ */ U("span", { children: tn(e.node.recordedFiles, e.node.totalFiles) })]
1059
1059
  })
1060
1060
  ]
1061
1061
  })]
1062
1062
  });
1063
1063
  }
1064
- function Qt(e) {
1064
+ function $t(e) {
1065
1065
  return Array.from(e).sort().join("\0");
1066
1066
  }
1067
- function $t(e) {
1067
+ function en(e) {
1068
1068
  return new Intl.NumberFormat("en", {
1069
1069
  notation: "compact",
1070
1070
  maximumFractionDigits: 1
1071
1071
  }).format(Number(e) || 0);
1072
1072
  }
1073
- function en(e, t) {
1073
+ function tn(e, t) {
1074
1074
  let n = Number(t) || 0;
1075
1075
  return n <= 0 ? "no coverage data" : `${Math.round((Number(e) || 0) / n * 100)}% recorded`;
1076
1076
  }
1077
1077
  //#endregion
1078
1078
  //#region src/ui/graph/CodeMapComposition.jsx
1079
- function tn({ payload: e, zoom: t, onZoomChange: n, selectedId: r, onSelect: i, onExpand: a, highlightedIds: o, nodeDeltas: s, structureEdgeDeltas: c, height: l = 480, ariaLabel: u = "code map", canvasSlot: d, rail: f, toolbar: p, sheetTitle: m = "code area", sheetMeta: h, railSide: g = "right", legend: _, canvasWrapperClassName: v = "", canvasWrapperStyle: b, className: x = "", presentation: S = "canvas", navigatorSlot: C, onPresentationChange: w, viewport: T, onViewportChange: E, state: O, defaultState: k, onStateChange: A }) {
1080
- let j = O !== void 0 || k !== void 0, [M, N] = H(() => L(k)), P = B(() => j ? L(O ?? M) : null, [
1081
- j,
1082
- O,
1083
- M
1084
- ]), F = P?.presentation ?? S;
1085
- function I(e, t) {
1086
- O === void 0 && N(e), A?.(e), t?.(e);
1079
+ function nn({ payload: e, zoom: t, onZoomChange: n, selectedId: i, onSelect: a, onExpand: o, highlightedIds: s, nodeDeltas: c, structureEdgeDeltas: l, height: u = 480, ariaLabel: d = "code map", canvasSlot: f, rail: p, toolbar: m, sheetTitle: h = "code area", sheetMeta: g, railSide: _ = "right", legend: v, canvasWrapperClassName: y = "", canvasWrapperStyle: b, className: x = "", presentation: S = "canvas", navigatorSlot: C, onPresentationChange: w, viewport: T, onViewportChange: E, state: D, defaultState: O, onStateChange: k }) {
1080
+ let A = D !== void 0 || O !== void 0, [j, ee] = H(() => L(O)), M = B(() => A ? L(D ?? j) : null, [
1081
+ A,
1082
+ D,
1083
+ j
1084
+ ]), N = M?.presentation ?? S;
1085
+ function P(e, t) {
1086
+ D === void 0 && ee(e), k?.(e), t?.(e);
1087
1087
  }
1088
- function te(e, t) {
1089
- if (!P) return;
1090
- let n = y(P, e);
1091
- D(P, n) || I(n, t);
1088
+ function F(e, t) {
1089
+ if (!M) return;
1090
+ let n = r(M, e);
1091
+ ye(M, n) || P(n, t);
1092
1092
  }
1093
- let ne = j || w ? /* @__PURE__ */ W(Ce, { children: [/* @__PURE__ */ W("div", {
1093
+ let te = A || w ? /* @__PURE__ */ W(we, { children: [/* @__PURE__ */ W("div", {
1094
1094
  className: "gmp-presentation-switch",
1095
1095
  role: "group",
1096
1096
  "aria-label": "code map view",
1097
1097
  children: [/* @__PURE__ */ U("button", {
1098
1098
  type: "button",
1099
- "aria-pressed": F === "navigator",
1100
- onClick: () => j ? te({
1099
+ "aria-pressed": N === "navigator",
1100
+ onClick: () => A ? F({
1101
1101
  type: "set-presentation",
1102
1102
  presentation: "navigator"
1103
1103
  }, () => w?.("navigator")) : w?.("navigator"),
1104
- children: F === "canvas" ? "back to browse" : "browse"
1104
+ children: N === "canvas" ? "back to browse" : "browse"
1105
1105
  }), /* @__PURE__ */ U("button", {
1106
1106
  type: "button",
1107
- "aria-pressed": F === "canvas",
1108
- onClick: () => j ? te({
1107
+ "aria-pressed": N === "canvas",
1108
+ onClick: () => A ? F({
1109
1109
  type: "set-presentation",
1110
1110
  presentation: "canvas"
1111
1111
  }, () => w?.("canvas")) : w?.("canvas"),
1112
1112
  children: "spatial map"
1113
1113
  })]
1114
- }), p] }) : p, re = d ?? /* @__PURE__ */ U(Gt, {
1114
+ }), m] }) : m, ne = f ?? /* @__PURE__ */ U(Kt, {
1115
1115
  payload: e,
1116
- zoom: P ? {
1117
- level: P.grain,
1118
- expanded: P.expandedIds
1116
+ zoom: M ? {
1117
+ level: M.grain,
1118
+ expanded: M.expandedIds
1119
1119
  } : t,
1120
1120
  onZoomChange: n,
1121
- selectedId: P ? P.selectedId : r,
1122
- onSelect: i,
1123
- onExpand: a,
1124
- highlightedIds: o,
1125
- nodeDeltas: s,
1126
- structureEdgeDeltas: c,
1127
- height: l,
1128
- ariaLabel: u,
1129
- viewport: P ? P.viewport ?? void 0 : T,
1121
+ selectedId: M ? M.selectedId : i,
1122
+ onSelect: a,
1123
+ onExpand: o,
1124
+ highlightedIds: s,
1125
+ nodeDeltas: c,
1126
+ structureEdgeDeltas: l,
1127
+ height: u,
1128
+ ariaLabel: d,
1129
+ viewport: M ? M.viewport ?? void 0 : T,
1130
1130
  onViewportChange: E,
1131
- state: P ?? void 0,
1132
- onStateChange: P ? (e) => I(e) : void 0
1133
- }), ie = C ?? (P && e ? /* @__PURE__ */ U(Xt, {
1131
+ state: M ?? void 0,
1132
+ onStateChange: M ? (e) => P(e) : void 0
1133
+ }), I = C ?? (M && e ? /* @__PURE__ */ U(Zt, {
1134
1134
  payload: e,
1135
- grain: P.grain,
1136
- expandedIds: P.expandedIds,
1137
- selectedId: P.selectedId,
1138
- focusedId: P.navigatorFocusedId,
1139
- filter: P.navigatorFilter,
1140
- onStateAction: (t) => te(t, () => {
1141
- t.type === "select" ? i?.(t.id, e.nodes.find((e) => e.id === t.id) ?? null) : t.type === "clear-selection" ? i?.(null, null) : t.type === "set-expanded" ? n?.({
1142
- level: P.grain,
1135
+ grain: M.grain,
1136
+ expandedIds: M.expandedIds,
1137
+ selectedId: M.selectedId,
1138
+ focusedId: M.navigatorFocusedId,
1139
+ filter: M.navigatorFilter,
1140
+ onStateAction: (t) => F(t, () => {
1141
+ t.type === "select" ? a?.(t.id, e.nodes.find((e) => e.id === t.id) ?? null) : t.type === "clear-selection" ? a?.(null, null) : t.type === "set-expanded" ? n?.({
1142
+ level: M.grain,
1143
1143
  expanded: Array.from(t.ids)
1144
- }) : t.type === "open-in-map" && (i?.(t.id, e.nodes.find((e) => e.id === t.id) ?? null), w?.("canvas"));
1144
+ }) : t.type === "open-in-map" && (a?.(t.id, e.nodes.find((e) => e.id === t.id) ?? null), w?.("canvas"));
1145
1145
  }),
1146
- ariaLabel: `browse ${u}`
1147
- }) : null), ae = F === "navigator" && ie !== null;
1146
+ ariaLabel: `browse ${d}`
1147
+ }) : null), re = N === "navigator" && I !== null;
1148
1148
  return /* @__PURE__ */ U("div", {
1149
1149
  className: ["gmp-root", x].filter(Boolean).join(" "),
1150
- children: /* @__PURE__ */ W(ee, {
1151
- toolbar: ne,
1152
- rail: f,
1153
- sheetTitle: m,
1154
- sheetMeta: h,
1155
- railSide: g,
1150
+ children: /* @__PURE__ */ W(de, {
1151
+ toolbar: te,
1152
+ rail: p,
1153
+ sheetTitle: h,
1154
+ sheetMeta: g,
1155
+ railSide: _,
1156
1156
  children: [/* @__PURE__ */ U("div", {
1157
- className: ["gmp-map-canvas-region", v].filter(Boolean).join(" "),
1157
+ className: ["gmp-map-canvas-region", y].filter(Boolean).join(" "),
1158
1158
  style: b,
1159
1159
  "data-testid": "gmp-map-canvas-region",
1160
- children: ae ? ie : re
1161
- }), !ae && _ !== !1 && (_ ?? /* @__PURE__ */ U(nn, {}))]
1160
+ children: re ? I : ne
1161
+ }), !re && v !== !1 && (v ?? /* @__PURE__ */ U(rn, {}))]
1162
1162
  })
1163
1163
  });
1164
1164
  }
1165
- function nn() {
1165
+ function rn() {
1166
1166
  return /* @__PURE__ */ W("p", {
1167
1167
  className: "gmp-map-legend",
1168
1168
  children: [
@@ -1211,19 +1211,19 @@ function X(e, t) {
1211
1211
  let n = Object.keys(e).sort();
1212
1212
  return n.length === t.length && t.slice().sort().every((e, t) => e === n[t]);
1213
1213
  }
1214
- function rn(e) {
1215
- return typeof e == "string" && e.length > 0;
1216
- }
1217
1214
  function an(e) {
1218
- return e === null || rn(e);
1215
+ return typeof e == "string" && e.length > 0;
1219
1216
  }
1220
1217
  function on(e) {
1218
+ return e === null || an(e);
1219
+ }
1220
+ function sn(e) {
1221
1221
  let t = !1;
1222
- if (Y(e) && typeof e.type == "string" && (e.type === "open-change" && X(e, ["type", "change"]) && Y(e.change) ? t = X(e.change, ["id", "branch"]) && rn(e.change.id) && an(e.change.branch) : e.type === "open-session" && X(e, [
1222
+ if (Y(e) && typeof e.type == "string" && (e.type === "open-change" && X(e, ["type", "change"]) && Y(e.change) ? t = X(e.change, ["id", "branch"]) && an(e.change.id) && on(e.change.branch) : e.type === "open-session" && X(e, [
1223
1223
  "type",
1224
1224
  "sessionId",
1225
1225
  "source"
1226
- ]) && rn(e.sessionId) && Y(e.source) ? e.source.kind === "commit" && X(e.source, ["kind", "commit"]) && Y(e.source.commit) ? t = X(e.source.commit, ["id", "branch"]) && rn(e.source.commit.id) && an(e.source.commit.branch) : (e.source.kind === "unlinked" || e.source.kind === "outside-window") && X(e.source, ["kind"]) && (t = !0) : (e.type === "open-map" || e.type === "show-older") && X(e, ["type"]) && (t = !0)), !t) throw TypeError([
1226
+ ]) && an(e.sessionId) && Y(e.source) ? e.source.kind === "commit" && X(e.source, ["kind", "commit"]) && Y(e.source.commit) ? t = X(e.source.commit, ["id", "branch"]) && an(e.source.commit.id) && on(e.source.commit.branch) : (e.source.kind === "unlinked" || e.source.kind === "outside-window") && X(e.source, ["kind"]) && (t = !0) : (e.type === "open-map" || e.type === "show-older") && X(e, ["type"]) && (t = !0)), !t) throw TypeError([
1227
1227
  "Timeline navigation action rejected.",
1228
1228
  "What went wrong: the value is not an exact supported TimelineNavigationAction.",
1229
1229
  "Why it happened: an untyped caller supplied an unknown action, missing context, or extra fields.",
@@ -1235,31 +1235,31 @@ function on(e) {
1235
1235
  }
1236
1236
  //#endregion
1237
1237
  //#region src/ui/graph/ScentTag.jsx
1238
- function sn({ tag: e, hoverText: n, active: r = !1, onToggle: i, className: a = "", ...o }) {
1239
- if (!t.includes(e)) throw Error(`ScentTag render failed: what went wrong: unknown scent tag ${JSON.stringify(e)}; why: the value is not a member of the closed SCENT_TAGS set; where: src/ui/graph/ScentTag.jsx; when: rendering a ranked-list row; what it means: an upstream ranking derivation produced a value outside the frozen vocabulary; how to fix: only pass one of ${t.join(", ")}.`);
1240
- return i ? /* @__PURE__ */ W("button", {
1238
+ function cn({ tag: e, hoverText: t, active: n = !1, onToggle: r, className: i = "", ...a }) {
1239
+ if (!ie.includes(e)) throw Error(`ScentTag render failed: what went wrong: unknown scent tag ${JSON.stringify(e)}; why: the value is not a member of the closed SCENT_TAGS set; where: src/ui/graph/ScentTag.jsx; when: rendering a ranked-list row; what it means: an upstream ranking derivation produced a value outside the frozen vocabulary; how to fix: only pass one of ${ie.join(", ")}.`);
1240
+ return r ? /* @__PURE__ */ W("button", {
1241
1241
  type: "button",
1242
- className: `tlp-scent tlp-scent-filter${r ? " tlp-scent-filter-active" : ""}${a ? ` ${a}` : ""}`,
1243
- title: n || void 0,
1244
- "aria-pressed": r,
1245
- onClick: () => i(r ? null : e),
1246
- ...o,
1242
+ className: `tlp-scent tlp-scent-filter${n ? " tlp-scent-filter-active" : ""}${i ? ` ${i}` : ""}`,
1243
+ title: t || void 0,
1244
+ "aria-pressed": n,
1245
+ onClick: () => r(n ? null : e),
1246
+ ...a,
1247
1247
  children: [e, /* @__PURE__ */ U("span", {
1248
1248
  className: "tlp-sr",
1249
1249
  role: "status",
1250
1250
  "aria-live": "polite",
1251
- children: r ? `filtering by ${e}` : ""
1251
+ children: n ? `filtering by ${e}` : ""
1252
1252
  })]
1253
1253
  }) : /* @__PURE__ */ U("span", {
1254
- className: `tlp-scent${a ? ` ${a}` : ""}`,
1255
- title: n || void 0,
1256
- ...o,
1254
+ className: `tlp-scent${i ? ` ${i}` : ""}`,
1255
+ title: t || void 0,
1256
+ ...a,
1257
1257
  children: e
1258
1258
  });
1259
1259
  }
1260
1260
  //#endregion
1261
1261
  //#region src/ui/graph/RankedRow.jsx
1262
- function cn({ row: e, loc: t = 0, selected: n = !1, onSelect: r, className: i = "", ...a }) {
1262
+ function ln({ row: e, loc: t = 0, selected: n = !1, onSelect: r, className: i = "", ...a }) {
1263
1263
  return /* @__PURE__ */ W("button", {
1264
1264
  type: "button",
1265
1265
  className: [
@@ -1271,9 +1271,9 @@ function cn({ row: e, loc: t = 0, selected: n = !1, onSelect: r, className: i =
1271
1271
  onClick: () => r?.(e.id),
1272
1272
  ...a,
1273
1273
  children: [
1274
- /* @__PURE__ */ U(le, {
1274
+ /* @__PURE__ */ U(oe, {
1275
1275
  className: "tlp-ranked-doi-scope",
1276
- children: /* @__PURE__ */ U(F, {
1276
+ children: /* @__PURE__ */ U(te, {
1277
1277
  label: e.name,
1278
1278
  loc: t,
1279
1279
  recorded: e.doi,
@@ -1291,7 +1291,7 @@ function cn({ row: e, loc: t = 0, selected: n = !1, onSelect: r, className: i =
1291
1291
  /* @__PURE__ */ U("span", {
1292
1292
  className: "tlp-ranked-tags",
1293
1293
  "aria-label": "comprehension signals",
1294
- children: e.scentTags.map((t) => /* @__PURE__ */ U(sn, {
1294
+ children: e.scentTags.map((t) => /* @__PURE__ */ U(cn, {
1295
1295
  tag: t,
1296
1296
  hoverText: t.startsWith("agent wrote:") ? e.hoverText ?? void 0 : void 0
1297
1297
  }, t))
@@ -1311,7 +1311,7 @@ var Z = [
1311
1311
  "debt",
1312
1312
  "churn"
1313
1313
  ];
1314
- function ln({ rankMode: e, onChange: t, className: n = "", ...r }) {
1314
+ function un({ rankMode: e, onChange: t, className: n = "", ...r }) {
1315
1315
  let i = V([]), a = (e) => {
1316
1316
  let n = Z[e];
1317
1317
  n && (t(n), i.current[e]?.focus());
@@ -1363,8 +1363,8 @@ function ln({ rankMode: e, onChange: t, className: n = "", ...r }) {
1363
1363
  }
1364
1364
  //#endregion
1365
1365
  //#region src/ui/graph/InsightPanel.jsx
1366
- function un({ insights: e, onOpenEvidence: t, className: n = "", ...r }) {
1367
- if (C(e), e.length === 0) return /* @__PURE__ */ U("p", {
1366
+ function dn({ insights: e, onOpenEvidence: t, className: n = "", ...r }) {
1367
+ if (s(e), e.length === 0) return /* @__PURE__ */ U("p", {
1368
1368
  className: `tlp-insight-empty${n ? ` ${n}` : ""}`,
1369
1369
  ...r,
1370
1370
  children: "no insights recorded for this node yet."
@@ -1379,17 +1379,17 @@ function un({ insights: e, onOpenEvidence: t, className: n = "", ...r }) {
1379
1379
  ...r,
1380
1380
  children: [...i.entries()].map(([e, n]) => /* @__PURE__ */ W("section", {
1381
1381
  className: "tlp-insight-group",
1382
- "aria-label": c[e],
1382
+ "aria-label": S[e],
1383
1383
  children: [/* @__PURE__ */ U("h3", {
1384
1384
  className: "tlp-insight-group-title",
1385
- children: c[e]
1385
+ children: S[e]
1386
1386
  }), /* @__PURE__ */ U("ul", {
1387
1387
  className: "tlp-insight-list",
1388
1388
  children: n.map((e, n) => /* @__PURE__ */ W("li", {
1389
1389
  className: "tlp-insight-item",
1390
1390
  children: [
1391
1391
  /* @__PURE__ */ U("span", {
1392
- className: `tlp-insight-provenance ${x[e.provenance].markerClass}`,
1392
+ className: `tlp-insight-provenance ${w[e.provenance].markerClass}`,
1393
1393
  "aria-hidden": "true"
1394
1394
  }),
1395
1395
  /* @__PURE__ */ U("span", {
@@ -1435,7 +1435,7 @@ var Q = Object.freeze({
1435
1435
  subagentSpawnColor: "var(--edge)",
1436
1436
  subagentReturnColor: "var(--edge)",
1437
1437
  errorColor: "var(--edge-error)"
1438
- }), dn = {
1438
+ }), fn = {
1439
1439
  planning: "var(--edge)",
1440
1440
  exploration: "var(--edge)",
1441
1441
  implementation: "var(--edge)",
@@ -1447,7 +1447,7 @@ var Q = Object.freeze({
1447
1447
  recovery: "var(--edge)",
1448
1448
  abandonment: "var(--edge)"
1449
1449
  };
1450
- function fn(e) {
1450
+ function pn(e) {
1451
1451
  let t = /* @__PURE__ */ new Map();
1452
1452
  for (let n of e) {
1453
1453
  let e = t.get(n.turnIndex) ?? [];
@@ -1455,13 +1455,13 @@ function fn(e) {
1455
1455
  }
1456
1456
  return t;
1457
1457
  }
1458
- function pn(e) {
1458
+ function mn(e) {
1459
1459
  let t = /* @__PURE__ */ new Map();
1460
1460
  for (let n of e) for (let e = n.startTurn; e <= n.endTurn; e++) t.set(e, n.type);
1461
1461
  return t;
1462
1462
  }
1463
- function mn({ turns: e, toolVMsByTurn: t, phases: n, annotations: r, searchMatches: i, filteredIndices: a, searchQuery: o, selectedTurns: s }) {
1464
- let c = fn(r), l = pn(n), u = new Set(i), d = [], f = [], p = 0, m = 0, h = null, g, _ = 0, v = !1;
1463
+ function hn({ turns: e, toolVMsByTurn: t, phases: n, annotations: r, searchMatches: i, filteredIndices: a, searchQuery: o, selectedTurns: s }) {
1464
+ let c = pn(r), l = mn(n), u = new Set(i), d = [], f = [], p = 0, m = 0, h = null, g, _ = 0, v = !1;
1465
1465
  for (let n = 0; n < e.length; n++) {
1466
1466
  let r = e[n], i = !!r.content?.trim(), y = (r.toolCalls?.length ?? 0) > 0;
1467
1467
  if (!i && !y || r.role === "system" && !y && (!r.content || r.content.trim().length < 8)) continue;
@@ -1528,7 +1528,7 @@ function mn({ turns: e, toolVMsByTurn: t, phases: n, annotations: r, searchMatch
1528
1528
  }
1529
1529
  if (h) {
1530
1530
  let e = x !== g && x !== void 0, t = b !== _, n = "sequential", r = $.sequentialColor, i = $.sequentialWidth, a;
1531
- t && b > _ ? (n = "spawn", r = $.subagentSpawnColor, i = 2, a = "6 4") : t && b < _ ? (n = "return", r = $.subagentReturnColor, i = 1.5, a = "2 3") : e && x && (n = "phase-transition", r = dn[x] ?? $.sequentialColor, i = $.phaseTransitionWidth), S.some((e) => e.type === "error") && (n = "error", r = $.errorColor, i = 2);
1531
+ t && b > _ ? (n = "spawn", r = $.subagentSpawnColor, i = 2, a = "6 4") : t && b < _ ? (n = "return", r = $.subagentReturnColor, i = 1.5, a = "2 3") : e && x && (n = "phase-transition", r = fn[x] ?? $.sequentialColor, i = $.phaseTransitionWidth), S.some((e) => e.type === "error") && (n = "error", r = $.errorColor, i = 2);
1532
1532
  let o = w || v;
1533
1533
  f.push({
1534
1534
  id: `e-${h}-${D}`,
@@ -1544,7 +1544,7 @@ function mn({ turns: e, toolVMsByTurn: t, phases: n, annotations: r, searchMatch
1544
1544
  },
1545
1545
  data: {
1546
1546
  edgeType: n,
1547
- phaseColor: x ? dn[x] : void 0
1547
+ phaseColor: x ? fn[x] : void 0
1548
1548
  }
1549
1549
  });
1550
1550
  }
@@ -1555,7 +1555,7 @@ function mn({ turns: e, toolVMsByTurn: t, phases: n, annotations: r, searchMatch
1555
1555
  edges: f
1556
1556
  };
1557
1557
  }
1558
- function hn(e) {
1558
+ function gn(e) {
1559
1559
  let t = /* @__PURE__ */ new Map();
1560
1560
  for (let n of e) {
1561
1561
  if (n.type !== "turn") continue;
@@ -1587,8 +1587,8 @@ function hn(e) {
1587
1587
  }
1588
1588
  //#endregion
1589
1589
  //#region src/ui/transcript/graph/engine/useCanvasSync.js
1590
- function gn(e, t, n) {
1591
- let r = Dt();
1590
+ function _n(e, t, n) {
1591
+ let r = Ot();
1592
1592
  return {
1593
1593
  focusPhase: R((i) => {
1594
1594
  let a = e[i];
@@ -1629,12 +1629,12 @@ function gn(e, t, n) {
1629
1629
  }
1630
1630
  //#endregion
1631
1631
  //#region src/ui/transcript/graph/engine/nodes/TurnCardNode.jsx
1632
- function _n(e, t) {
1632
+ function vn(e, t) {
1633
1633
  if (!e) return "";
1634
1634
  let n = e.replace(/\s+/g, " ").trim();
1635
1635
  return n.length > t ? `${n.slice(0, t - 1)}…` : n;
1636
1636
  }
1637
- function vn({ data: e, selected: t }) {
1637
+ function yn({ data: e, selected: t }) {
1638
1638
  let { turn: n, annotations: r, isSearchMatch: i, isFilteredOut: a, isSelected: o, turnNumber: s, provider: c } = e, l = n.depth ?? 0, u = n.role === "assistant" && l > 0, d = r.some((e) => e.type === "error"), f = r.some((e) => e.type === "retry"), p = r.some((e) => e.type === "revert");
1639
1639
  return /* @__PURE__ */ W("div", {
1640
1640
  "data-turn-index": n.index,
@@ -1646,11 +1646,11 @@ function vn({ data: e, selected: t }) {
1646
1646
  position: q.Top,
1647
1647
  className: "tb-gnode-handle tb-gnode-handle-top"
1648
1648
  }),
1649
- /* @__PURE__ */ U(O, {
1649
+ /* @__PURE__ */ U(k, {
1650
1650
  role: n.role,
1651
1651
  agentName: u ? n.agentName : void 0,
1652
1652
  turnNumber: s,
1653
- contentPreview: _n(n.content, 160),
1653
+ contentPreview: vn(n.content, 160),
1654
1654
  toolCount: n.toolCalls?.length ?? 0,
1655
1655
  totalTokens: (n.tokensIn ?? 0) + (n.tokensOut ?? 0),
1656
1656
  tokensIn: n.tokensIn ?? void 0,
@@ -1677,10 +1677,10 @@ function vn({ data: e, selected: t }) {
1677
1677
  ]
1678
1678
  });
1679
1679
  }
1680
- var yn = Se(vn);
1680
+ var bn = Ce(yn);
1681
1681
  //#endregion
1682
1682
  //#region src/ui/transcript/graph/engine/nodes/ToolPillNode.jsx
1683
- function bn({ data: e }) {
1683
+ function xn({ data: e }) {
1684
1684
  let { toolCalls: t, previewById: n, totalDurationMs: r, hasError: i, isFilteredOut: a } = e, o = t.map((e) => ({
1685
1685
  id: e.id,
1686
1686
  name: e.name,
@@ -1705,59 +1705,59 @@ function bn({ data: e }) {
1705
1705
  })]
1706
1706
  });
1707
1707
  }
1708
- var xn = Se(bn);
1708
+ var Sn = Ce(xn);
1709
1709
  //#endregion
1710
1710
  //#region src/ui/transcript/graph/engine/nodes/SubagentBranchNode.jsx
1711
- function Sn({ data: e }) {
1711
+ function Cn({ data: e }) {
1712
1712
  let { agentName: t, depth: n } = e;
1713
- return /* @__PURE__ */ U(de, {
1713
+ return /* @__PURE__ */ U(pe, {
1714
1714
  agentName: t,
1715
1715
  depth: n
1716
1716
  });
1717
1717
  }
1718
- var Cn = Se(Sn);
1718
+ var wn = Ce(Cn);
1719
1719
  //#endregion
1720
1720
  //#region src/ui/transcript/graph/engine/GraphControls.jsx
1721
- function wn({ className: e = "" }) {
1722
- let t = Dt();
1721
+ function Tn({ className: e = "" }) {
1722
+ let t = Ot();
1723
1723
  return /* @__PURE__ */ W("div", {
1724
1724
  className: ["tb-graph-controls", e].filter(Boolean).join(" "),
1725
1725
  children: [
1726
- /* @__PURE__ */ U(Tn, {
1726
+ /* @__PURE__ */ U(En, {
1727
1727
  label: "zoom in",
1728
1728
  onClick: () => t.zoomIn({ duration: 150 }),
1729
- children: /* @__PURE__ */ U(ze, {
1729
+ children: /* @__PURE__ */ U(Be, {
1730
1730
  size: 12,
1731
1731
  strokeWidth: 2
1732
1732
  })
1733
1733
  }),
1734
- /* @__PURE__ */ U(Tn, {
1734
+ /* @__PURE__ */ U(En, {
1735
1735
  label: "zoom out",
1736
1736
  onClick: () => t.zoomOut({ duration: 150 }),
1737
- children: /* @__PURE__ */ U(Re, {
1737
+ children: /* @__PURE__ */ U(ze, {
1738
1738
  size: 12,
1739
1739
  strokeWidth: 2
1740
1740
  })
1741
1741
  }),
1742
- /* @__PURE__ */ U(Tn, {
1742
+ /* @__PURE__ */ U(En, {
1743
1743
  label: "fit view",
1744
1744
  onClick: () => t.fitView({
1745
1745
  padding: .1,
1746
1746
  duration: 250
1747
1747
  }),
1748
- children: /* @__PURE__ */ U(Ie, {
1748
+ children: /* @__PURE__ */ U(Le, {
1749
1749
  size: 11,
1750
1750
  strokeWidth: 1.75
1751
1751
  })
1752
1752
  }),
1753
- /* @__PURE__ */ U(Tn, {
1753
+ /* @__PURE__ */ U(En, {
1754
1754
  label: "reset",
1755
1755
  onClick: () => t.setViewport({
1756
1756
  x: 0,
1757
1757
  y: 0,
1758
1758
  zoom: 1
1759
1759
  }, { duration: 200 }),
1760
- children: /* @__PURE__ */ U(Be, {
1760
+ children: /* @__PURE__ */ U(Ve, {
1761
1761
  size: 11,
1762
1762
  strokeWidth: 1.75
1763
1763
  })
@@ -1765,7 +1765,7 @@ function wn({ className: e = "" }) {
1765
1765
  ]
1766
1766
  });
1767
1767
  }
1768
- function Tn({ label: e, onClick: t, children: n }) {
1768
+ function En({ label: e, onClick: t, children: n }) {
1769
1769
  return /* @__PURE__ */ U("button", {
1770
1770
  type: "button",
1771
1771
  onClick: t,
@@ -1777,9 +1777,9 @@ function Tn({ label: e, onClick: t, children: n }) {
1777
1777
  }
1778
1778
  //#endregion
1779
1779
  //#region src/ui/transcript/graph/engine/TrajectoryGraphLegend.jsx
1780
- function En({ provider: e, className: t = "" }) {
1781
- let n = e && ye(e).toLocaleLowerCase("en-US") || "agent";
1782
- return /* @__PURE__ */ U(ae, {
1780
+ function Dn({ provider: e, className: t = "" }) {
1781
+ let n = e && b(e).toLocaleLowerCase("en-US") || "agent";
1782
+ return /* @__PURE__ */ U(se, {
1783
1783
  className: ["tb-graph-legend", t].filter(Boolean).join(" "),
1784
1784
  items: [
1785
1785
  {
@@ -1808,21 +1808,21 @@ function En({ provider: e, className: t = "" }) {
1808
1808
  }
1809
1809
  //#endregion
1810
1810
  //#region src/ui/transcript/graph/engine/TrajectoryGraph.jsx
1811
- var Dn = {
1812
- turn: yn,
1813
- toolCall: xn,
1814
- subagentLane: Cn
1811
+ var On = {
1812
+ turn: bn,
1813
+ toolCall: Sn,
1814
+ subagentLane: wn
1815
1815
  };
1816
- function On(e) {
1817
- return /* @__PURE__ */ U(wt, { children: /* @__PURE__ */ U(kn, { ...e }) });
1816
+ function kn(e) {
1817
+ return /* @__PURE__ */ U(Tt, { children: /* @__PURE__ */ U(An, { ...e }) });
1818
1818
  }
1819
- function kn({ turns: e, toolVMsByTurn: t, filteredTurns: n, phases: r, annotations: i, searchMatches: a, searchQuery: o, activeMatchIndex: s, focusTurn: c, focusPhase: l, onPhaseActivate: u, onViewportChange: d, selectedTurns: f, provider: p, className: m = "" }) {
1820
- let h = Dt(), { focusTurn: g, focusPhase: _ } = gn(r, e, u), v = B(() => {
1819
+ function An({ turns: e, toolVMsByTurn: t, filteredTurns: n, phases: r, annotations: i, searchMatches: a, searchQuery: o, activeMatchIndex: s, focusTurn: c, focusPhase: l, onPhaseActivate: u, onViewportChange: d, selectedTurns: f, provider: p, className: m = "" }) {
1820
+ let h = Ot(), { focusTurn: g, focusPhase: _ } = _n(r, e, u), v = B(() => {
1821
1821
  if (n.length === e.length) return /* @__PURE__ */ new Set();
1822
1822
  let t = new Set(n), r = /* @__PURE__ */ new Set();
1823
1823
  for (let n = 0; n < e.length; n++) t.has(e[n]) && r.add(n);
1824
1824
  return r;
1825
- }, [e, n]), y = B(() => mn({
1825
+ }, [e, n]), y = B(() => hn({
1826
1826
  turns: e,
1827
1827
  toolVMsByTurn: t,
1828
1828
  phases: r,
@@ -1846,7 +1846,7 @@ function kn({ turns: e, toolVMsByTurn: t, filteredTurns: n, phases: r, annotatio
1846
1846
  ...e.data,
1847
1847
  provider: p
1848
1848
  }
1849
- } : e), [y.nodes, p]), x = B(() => hn(b), [b]), S = B(() => y.edges.map((e) => {
1849
+ } : e), [y.nodes, p]), x = B(() => gn(b), [b]), S = B(() => y.edges.map((e) => {
1850
1850
  let t = e.sourceHandle === "tool-source";
1851
1851
  return {
1852
1852
  ...e,
@@ -1859,9 +1859,9 @@ function kn({ turns: e, toolVMsByTurn: t, filteredTurns: n, phases: r, annotatio
1859
1859
  },
1860
1860
  animated: t ? !1 : e.animated
1861
1861
  };
1862
- }), [y.edges]), C = B(() => [...x, ...b], [x, b]), [w, T, E] = Et(C), [D, O, k] = Tt(S), A = V(e.length), j = V(o), M = V(n.length);
1862
+ }), [y.edges]), C = B(() => [...x, ...b], [x, b]), [w, T, E] = Dt(C), [D, O, k] = Et(S), A = V(e.length), j = V(o), ee = V(n.length);
1863
1863
  z(() => {
1864
- (e.length !== A.current || o !== j.current || n.length !== M.current) && (T(C), O(S), A.current = e.length, j.current = o, M.current = n.length);
1864
+ (e.length !== A.current || o !== j.current || n.length !== ee.current) && (T(C), O(S), A.current = e.length, j.current = o, ee.current = n.length);
1865
1865
  }, [
1866
1866
  C,
1867
1867
  S,
@@ -1885,9 +1885,9 @@ function kn({ turns: e, toolVMsByTurn: t, filteredTurns: n, phases: r, annotatio
1885
1885
  h,
1886
1886
  e
1887
1887
  ]);
1888
- let ee = V(-1);
1888
+ let M = V(-1);
1889
1889
  z(() => {
1890
- !c || c.seq === ee.current || (ee.current = c.seq, g(c.target));
1890
+ !c || c.seq === M.current || (M.current = c.seq, g(c.target));
1891
1891
  }, [c, g]);
1892
1892
  let N = V(-1);
1893
1893
  z(() => {
@@ -1916,7 +1916,7 @@ function kn({ turns: e, toolVMsByTurn: t, filteredTurns: n, phases: r, annotatio
1916
1916
  return t.annotations?.some?.((e) => e.type === "error") ? "var(--danger)" : t.isFilteredOut ? "var(--rule)" : t.turn.role === "user" ? "var(--teal)" : t.turn.role === "assistant" ? "var(--amber)" : "var(--ink-2)";
1917
1917
  }
1918
1918
  return e.type === "toolCall" ? "var(--ink-3)" : "var(--rule)";
1919
- }, []), I = R((e, t) => {
1919
+ }, []), te = R((e, t) => {
1920
1920
  if (t.type !== "turn") return;
1921
1921
  let n = t.data;
1922
1922
  d?.({
@@ -1933,13 +1933,13 @@ function kn({ turns: e, toolVMsByTurn: t, filteredTurns: n, phases: r, annotatio
1933
1933
  children: /* @__PURE__ */ W("div", {
1934
1934
  className: "tb-graph-flow",
1935
1935
  children: [
1936
- /* @__PURE__ */ W(Ct, {
1936
+ /* @__PURE__ */ W(wt, {
1937
1937
  nodes: w,
1938
1938
  edges: D,
1939
1939
  onNodesChange: E,
1940
1940
  onEdgesChange: k,
1941
- onNodeClick: I,
1942
- nodeTypes: Dn,
1941
+ onNodeClick: te,
1942
+ nodeTypes: On,
1943
1943
  fitView: !1,
1944
1944
  minZoom: .2,
1945
1945
  maxZoom: 2,
@@ -1955,12 +1955,12 @@ function kn({ turns: e, toolVMsByTurn: t, filteredTurns: n, phases: r, annotatio
1955
1955
  panOnDrag: !0,
1956
1956
  panOnScroll: !0,
1957
1957
  zoomOnScroll: !0,
1958
- children: [/* @__PURE__ */ U(bt, {
1959
- variant: xt.Dots,
1958
+ children: [/* @__PURE__ */ U(xt, {
1959
+ variant: St.Dots,
1960
1960
  gap: 20,
1961
1961
  size: 1,
1962
1962
  color: "var(--rule)"
1963
- }), /* @__PURE__ */ U(St, {
1963
+ }), /* @__PURE__ */ U(Ct, {
1964
1964
  zoomable: !0,
1965
1965
  pannable: !0,
1966
1966
  nodeColor: F,
@@ -1970,11 +1970,11 @@ function kn({ turns: e, toolVMsByTurn: t, filteredTurns: n, phases: r, annotatio
1970
1970
  className: "tb-graph-minimap"
1971
1971
  })]
1972
1972
  }),
1973
- /* @__PURE__ */ U(wn, {}),
1974
- /* @__PURE__ */ U(En, { provider: p })
1973
+ /* @__PURE__ */ U(Tn, {}),
1974
+ /* @__PURE__ */ U(Dn, { provider: p })
1975
1975
  ]
1976
1976
  })
1977
1977
  });
1978
1978
  }
1979
1979
  //#endregion
1980
- export { qe as AllChangeBindings, Je as AllDiffLineKinds, Ye as AllEdgeViolationKinds, Xe as AllFileChangeStatuses, Ze as AllInsightKinds, Qe as AllInsightProvenances, $e as AllMapNodeKinds, et as AllReadAttributionStates, tt as AllReadStateGrades, s as CHANGE_BINDINGS, P as CODE_MAP_STATE_VERSION, N as CODE_MAP_VIEWPORT_SCALE, _e as COVERAGE_CAP, nt as ChangeBinding, Ht as ChangeDetail, Pt as Changes, Gt as CodeMap, tn as CodeMapComposition, Xt as CodeMapNavigator, b as DEBT_VIEWED, d as DIFF_LINE_KINDS, a as DOI_WEIGHTS, nn as DefaultMapLegend, rt as DiffLineKind, $ as EDGE_DEFAULTS, ue as EDGE_VIOLATION_KINDS, it as EdgeViolationKind, u as FILE_CHANGE_STATUSES, at as FileChangeStatus, se as GRAPH_APP_SECTIONS, me as GRAPH_LEGEND_ITEMS, ce as GhostCommitNode, te as GhostGroup, pe as GraphAppShell, wn as GraphControls, ae as GraphLegend, j as GraphSectionNav, de as GraphSubagentBranch, I as GraphToolNode, O as GraphTurnNode, oe as HighlightEdge, ot as InsightKind, un as InsightPanel, st as InsightProvenance, T as MAP_NODE_KINDS, ct as MapNodeKind, Q as NODE_DIMENSIONS, i as RANK_CAP, h as RANK_FLOOR, re as RECENCY_HALF_LIFE_DAYS, ln as RankModeControl, cn as RankedRow, lt as ReadAttributionState, ut as ReadStateGrade, t as SCENT_TAGS, sn as ScentTag, k as SessionLane, fe as SessionOverflowDisclosure, Cn as SubagentBranchNode, xn as ToolPillNode, he as TouchedFileCluster, On as TrajectoryGraph, En as TrajectoryGraphLegend, yn as TurnCardNode, w as assertChangeDetailPayloadEnums, E as assertChangeDiffPayloadEnums, _ as assertCodeMapPayloadEnums, on as assertTimelineNavigationAction, Mt as buildChangesGraph, Kt as codeMapPayloadToMapData, D as codeMapStatesEqual, hn as computeLaneHeaders, ne as coverage, L as createCodeMapState, p as debt, m as debtHoverText, g as debtState, be as deriveCodeMapView, o as deriveRankedRows, A as deriveTimelineHighlight, l as gateRankedRows, J as humanizeAge, f as hunkClears, dt as isChangeBinding, ve as isCodeMapViewportScale, ft as isDiffLineKind, pt as isEdgeViolationKind, mt as isFileChangeStatus, ht as isInsightKind, gt as isInsightProvenance, _t as isMapNodeKind, vt as isReadAttributionState, yt as isReadStateGrade, v as partialReadHoverText, xe as rankMapNodes, n as rankMapNodesIntrinsic, y as reduceCodeMapState, r as resolveEscapeAction, S as scentTagsFor, mn as turnsToFlow, gn as useCanvasSync };
1980
+ export { Je as AllChangeBindings, Ye as AllDiffLineKinds, Xe as AllEdgeViolationKinds, Ze as AllFileChangeStatuses, Qe as AllInsightKinds, $e as AllInsightProvenances, et as AllMapNodeKinds, tt as AllReadAttributionStates, nt as AllReadStateGrades, d as CHANGE_BINDINGS, F as CODE_MAP_STATE_VERSION, O as CODE_MAP_VIEWPORT_SCALE, x as COVERAGE_CAP, rt as ChangeBinding, Ut as ChangeDetail, Ft as Changes, Kt as CodeMap, nn as CodeMapComposition, Zt as CodeMapNavigator, a as DEBT_VIEWED, fe as DIFF_LINE_KINDS, i as DOI_WEIGHTS, rn as DefaultMapLegend, it as DiffLineKind, $ as EDGE_DEFAULTS, u as EDGE_VIOLATION_KINDS, at as EdgeViolationKind, E as FILE_CHANGE_STATUSES, ot as FileChangeStatus, le as GRAPH_APP_SECTIONS, _e as GRAPH_LEGEND_ITEMS, ge as GhostCommitNode, A as GhostGroup, he as GraphAppShell, Tn as GraphControls, se as GraphLegend, ee as GraphSectionNav, pe as GraphSubagentBranch, I as GraphToolNode, k as GraphTurnNode, me as HighlightEdge, st as InsightKind, dn as InsightPanel, ct as InsightProvenance, M as LOCAL_APP_SECTIONS, T as MAP_NODE_KINDS, lt as MapNodeKind, Q as NODE_DIMENSIONS, h as RANK_CAP, ae as RANK_FLOOR, t as RECENCY_HALF_LIFE_DAYS, un as RankModeControl, ln as RankedRow, ut as ReadAttributionState, dt as ReadStateGrade, ie as SCENT_TAGS, cn as ScentTag, ue as SessionLane, re as SessionOverflowDisclosure, wn as SubagentBranchNode, Sn as ToolPillNode, ce as TouchedFileCluster, kn as TrajectoryGraph, Dn as TrajectoryGraphLegend, bn as TurnCardNode, D as assertChangeDetailPayloadEnums, _ as assertChangeDiffPayloadEnums, e as assertCodeMapPayloadEnums, sn as assertTimelineNavigationAction, Nt as buildChangesGraph, qt as codeMapPayloadToMapData, ye as codeMapStatesEqual, gn as computeLaneHeaders, p as coverage, L as createCodeMapState, m as debt, g as debtHoverText, o as debtState, j as deriveCodeMapView, l as deriveRankedRows, xe as deriveTimelineHighlight, f as gateRankedRows, J as humanizeAge, v as hunkClears, ft as isChangeBinding, y as isCodeMapViewportScale, pt as isDiffLineKind, mt as isEdgeViolationKind, ht as isFileChangeStatus, gt as isInsightKind, _t as isInsightProvenance, vt as isMapNodeKind, yt as isReadAttributionState, bt as isReadStateGrade, Se as partialReadHoverText, n as rankMapNodes, C as rankMapNodesIntrinsic, r as reduceCodeMapState, be as resolveEscapeAction, c as scentTagsFor, hn as turnsToFlow, _n as useCanvasSync };