@peasant-labs/fairtrade 0.0.29 → 0.0.30

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, Et as o, F as s, G as c, H as l, I as u, J as d, K as f, L as p, M as m, N as h, O as g, P as _, Q as v, R as y, S 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 M, ct as N, d as P, et as F, g as I, gt as ee, h as te, i as L, it as ne, j as re, k as ie, n as ae, nt as oe, o as se, ot as ce, p as le, pt as ue, q as de, r as fe, rt as pe, s as me, st as he, t as ge, tt as _e, v as ve, vt as ye, w as be, wt as xe, x as Se, y as R, z as Ce } from "./GraphLegend-kO2WP4yM.js";
2
- import { memo as we, useCallback as z, useEffect as B, useMemo as V, useRef as H, useState as U } from "react";
3
- import { Fragment as Te, jsx as W, jsxs as G } from "react/jsx-runtime";
4
- import { Box as Ee, Check as De, ChevronDown as Oe, ChevronRight as K, Coins as ke, CornerDownRight as Ae, FileCode as je, FileDiff as Me, FileText as Ne, Folder as Pe, GitMerge as Fe, Hash as Ie, Map as Le, Maximize2 as Re, MessageSquare as ze, Minus as Be, Plus as Ve, RotateCcw as He, RotateCw as Ue, Search as We, Share2 as Ge, Star as Ke, Tag as qe, TriangleAlert as Je, X as Ye } from "lucide-react";
5
- import { AllChangeBindings as Xe, AllDiffLineKinds as Ze, AllEdgeViolationKinds as Qe, AllFileChangeStatuses as $e, AllInsightKinds as et, AllInsightProvenances as tt, AllMapNodeKinds as nt, AllReadAttributionStates as rt, AllReadStateGrades as it, ChangeBinding as at, DiffLineKind as ot, EdgeViolationKind as st, FileChangeStatus as ct, InsightKind as lt, InsightProvenance as ut, MapNodeKind as dt, ReadAttributionState as ft, ReadStateGrade as pt, isChangeBinding as mt, isDiffLineKind as ht, isEdgeViolationKind as gt, isFileChangeStatus as _t, isInsightKind as vt, isInsightProvenance as yt, isMapNodeKind as bt, isReadAttributionState as xt, isReadStateGrade as St } from "@peasant-labs/schema";
6
- import { Background as Ct, BackgroundVariant as wt, Handle as q, MiniMap as Tt, Position as J, ReactFlow as Et, ReactFlowProvider as Dt, useEdgesState as Ot, useNodesState as kt, useReactFlow as At } from "@xyflow/react";
1
+ import { $ as e, A as t, B as n, C as r, D as i, Dt as a, E as o, F as s, G as c, H as l, I as u, J as d, K as f, L as p, M as m, N as h, O as g, P as _, Q as v, R as y, S as b, T as x, Tt as S, U as C, V as w, W as T, X as E, Y as D, Z as O, _ as k, _t as A, a as j, at as M, b as N, c as P, ct as F, et as I, f as ee, g as te, i as L, it as ne, j as re, k as ie, l as ae, lt as oe, m as se, mt as ce, n as le, nt as ue, o as de, ot as fe, q as pe, r as me, rt as he, s as ge, st as _e, t as ve, tt as ye, v as be, w as xe, x as Se, y as Ce, yt as we, z as Te } from "./GraphLegend-CxEDHRXa.js";
2
+ import { memo as Ee, useCallback as R, useEffect as z, useMemo as B, useRef as V, useState as H } from "react";
3
+ import { Fragment as De, jsx as U, jsxs as W } from "react/jsx-runtime";
4
+ import { Box as Oe, Check as ke, ChevronDown as Ae, ChevronRight as G, Coins as je, CornerDownRight as Me, FileCode as Ne, FileDiff as Pe, FileText as Fe, Folder as Ie, GitMerge as Le, Hash as Re, Map as ze, Maximize2 as Be, MessageSquare as Ve, Minus as He, Plus as Ue, RotateCcw as We, RotateCw as Ge, Search as Ke, Share2 as qe, Star as Je, Tag as Ye, TriangleAlert as Xe, X as Ze } from "lucide-react";
5
+ import { AllChangeBindings as Qe, AllDiffLineKinds as $e, AllEdgeViolationKinds as et, AllFileChangeStatuses as tt, AllInsightKinds as nt, AllInsightProvenances as rt, AllMapNodeKinds as it, AllReadAttributionStates as at, AllReadStateGrades as ot, ChangeBinding as st, DiffLineKind as ct, EdgeViolationKind as lt, FileChangeStatus as ut, InsightKind as dt, InsightProvenance as ft, MapNodeKind as pt, ReadAttributionState as mt, ReadStateGrade as ht, isChangeBinding as gt, isDiffLineKind as _t, isEdgeViolationKind as vt, isFileChangeStatus as yt, isInsightKind as bt, isInsightProvenance as xt, isMapNodeKind as St, isReadAttributionState as Ct, isReadStateGrade as wt } from "@peasant-labs/schema";
6
+ import { Background as Tt, BackgroundVariant as Et, Handle as K, MiniMap as Dt, Position as q, ReactFlow as Ot, ReactFlowProvider as kt, useEdgesState as At, useNodesState as jt, useReactFlow as Mt } from "@xyflow/react";
7
7
  //#region src/ui/graph/changeGraph.js
8
- var jt = 6e4, Mt = 60 * jt, Nt = 24 * Mt, Pt = 7 * Nt;
9
- function Y(e, t) {
8
+ var Nt = 6e4, Pt = 60 * Nt, Ft = 24 * Pt, It = 7 * Ft;
9
+ function J(e, t) {
10
10
  if (e == null) return "";
11
11
  let n = Math.max(0, t - e);
12
- return n < Mt ? `${Math.max(1, Math.floor(n / jt))}m ago` : n < Nt ? `${Math.floor(n / Mt)}h ago` : n < Pt ? `${Math.floor(n / Nt)}d ago` : `${Math.floor(n / Pt)}wk ago`;
12
+ return n < Pt ? `${Math.max(1, Math.floor(n / Nt))}m ago` : n < Ft ? `${Math.floor(n / Pt)}h ago` : n < It ? `${Math.floor(n / Ft)}d ago` : `${Math.floor(n / It)}wk ago`;
13
13
  }
14
- function Ft(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) => It(t) - It(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 Lt(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) => Rt(t) - Rt(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,
@@ -32,7 +32,7 @@ function Ft(e, { nowMs: t }) {
32
32
  branch: i.branch,
33
33
  session: (i.sessionCount ?? 0) > 0,
34
34
  tip: !0,
35
- time: Y(n.tipMs, t)
35
+ time: J(n.tipMs, t)
36
36
  });
37
37
  }
38
38
  };
@@ -51,13 +51,13 @@ function Ft(e, { nowMs: t }) {
51
51
  return t ? [t] : [];
52
52
  }),
53
53
  merged: c ? !0 : void 0,
54
- time: Y(e.timeMs, t)
54
+ time: J(e.timeMs, t)
55
55
  });
56
56
  }), h(-Infinity);
57
57
  let g = u.map((e) => ({
58
58
  branch: e.branch,
59
59
  mergedAtMs: e.mergedAtMs ?? null,
60
- when: Y(e.mergedAtMs, t)
60
+ when: J(e.mergedAtMs, t)
61
61
  })), _ = a.filter((e) => e.hasCommitBinding === !0 && !s.has(e.sessionId));
62
62
  return {
63
63
  commits: p,
@@ -68,33 +68,33 @@ function Ft(e, { nowMs: t }) {
68
68
  outsideWindowSessions: _
69
69
  };
70
70
  }
71
- function It(e) {
71
+ function Rt(e) {
72
72
  return e.tipCommitMs ?? Infinity;
73
73
  }
74
74
  //#endregion
75
75
  //#region src/ui/graph/Changes.jsx
76
- function Lt({ 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 } = V(() => Ft(e, { nowMs: u }), [e, u]), _ = e.defaultBranch, v = V(() => new Set(d.filter((e) => (e.sessionRefs?.length ?? 0) > 2).map((e) => e.id)), [d]), [y, b] = U([]);
78
- B(() => {
76
+ function zt({ 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(() => Lt(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
+ z(() => {
79
79
  b((e) => {
80
80
  let t = e.filter((e) => v.has(e));
81
81
  return t.length === e.length ? e : t;
82
82
  });
83
83
  }, [v]);
84
- let x = z((e) => {
84
+ let x = R((e) => {
85
85
  v.has(e) && b((t) => {
86
86
  let n = new Set(t);
87
87
  return n.has(e) ? n.delete(e) : n.add(e), [...n];
88
88
  });
89
89
  }, [v]);
90
- return /* @__PURE__ */ G("div", {
90
+ return /* @__PURE__ */ W("div", {
91
91
  className: "gmp-root gmp-changes-root",
92
- children: [/* @__PURE__ */ G("div", {
92
+ children: [/* @__PURE__ */ W("div", {
93
93
  className: "gmp-changes-head",
94
- children: [/* @__PURE__ */ G("div", { children: [t && /* @__PURE__ */ G("span", {
94
+ children: [/* @__PURE__ */ W("div", { children: [t && /* @__PURE__ */ W("span", {
95
95
  className: "label",
96
96
  children: ["lines of work, ", t]
97
- }), /* @__PURE__ */ G("div", {
97
+ }), /* @__PURE__ */ W("div", {
98
98
  className: "gmp-changes-sub mono",
99
99
  children: [
100
100
  _ ? `default branch ${_}, ` : "",
@@ -103,21 +103,21 @@ function Lt({ payload: e, projectLabel: t, selectedId: n, onNavigate: r, onSelec
103
103
  g,
104
104
  " merged"
105
105
  ]
106
- })] }), /* @__PURE__ */ G("button", {
106
+ })] }), /* @__PURE__ */ W("button", {
107
107
  type: "button",
108
108
  className: "btn btn-secondary btn-sm",
109
109
  onClick: () => {
110
110
  r ? r({ type: "open-map" }) : a?.();
111
111
  },
112
- children: [/* @__PURE__ */ W(Ee, {
112
+ children: [/* @__PURE__ */ U(Oe, {
113
113
  size: 14,
114
114
  "aria-hidden": "true"
115
115
  }), " open the map"]
116
116
  })]
117
- }), /* @__PURE__ */ G("div", {
117
+ }), /* @__PURE__ */ W("div", {
118
118
  className: "gmp-changes-body",
119
119
  children: [
120
- /* @__PURE__ */ W(_e, {
120
+ /* @__PURE__ */ U(ue, {
121
121
  className: "gmp-cg",
122
122
  commits: d,
123
123
  selectedId: n,
@@ -130,16 +130,16 @@ function Lt({ payload: e, projectLabel: t, selectedId: n, onNavigate: r, onSelec
130
130
  expandedCommitSessions: y,
131
131
  onToggleCommitSessions: x
132
132
  }),
133
- p.length > 0 && /* @__PURE__ */ G("section", {
133
+ p.length > 0 && /* @__PURE__ */ W("section", {
134
134
  className: "gmp-unlinked-sessions",
135
135
  "aria-labelledby": "gmp-unlinked-sessions-heading",
136
- children: [/* @__PURE__ */ W("h2", {
136
+ children: [/* @__PURE__ */ U("h2", {
137
137
  id: "gmp-unlinked-sessions-heading",
138
138
  className: "sb-head gmp-unlinked-sessions-head",
139
139
  children: "sessions not linked to a commit"
140
- }), /* @__PURE__ */ W("div", {
140
+ }), /* @__PURE__ */ U("div", {
141
141
  className: "gmp-unlinked-sessions-list",
142
- children: p.map((e) => /* @__PURE__ */ G("button", {
142
+ children: p.map((e) => /* @__PURE__ */ W("button", {
143
143
  type: "button",
144
144
  className: "gmp-unlinked-session",
145
145
  onClick: () => {
@@ -149,20 +149,20 @@ function Lt({ payload: e, projectLabel: t, selectedId: n, onNavigate: r, onSelec
149
149
  source: { kind: "unlinked" }
150
150
  }) : c?.(e.sessionId);
151
151
  },
152
- children: [/* @__PURE__ */ W(ue, { harness: e.harness }), /* @__PURE__ */ W("span", { children: e.title || e.sessionId })]
152
+ children: [/* @__PURE__ */ U(ce, { harness: e.harness }), /* @__PURE__ */ U("span", { children: e.title || e.sessionId })]
153
153
  }, e.sessionId))
154
154
  })]
155
155
  }),
156
- m.length > 0 && /* @__PURE__ */ G("section", {
156
+ m.length > 0 && /* @__PURE__ */ W("section", {
157
157
  className: "gmp-unlinked-sessions",
158
158
  "aria-labelledby": "gmp-outside-window-sessions-heading",
159
- children: [/* @__PURE__ */ W("h2", {
159
+ children: [/* @__PURE__ */ U("h2", {
160
160
  id: "gmp-outside-window-sessions-heading",
161
161
  className: "sb-head gmp-unlinked-sessions-head",
162
162
  children: "sessions linked outside this visible commit window"
163
- }), /* @__PURE__ */ W("div", {
163
+ }), /* @__PURE__ */ U("div", {
164
164
  className: "gmp-unlinked-sessions-list",
165
- children: m.map((e) => /* @__PURE__ */ G("button", {
165
+ children: m.map((e) => /* @__PURE__ */ W("button", {
166
166
  type: "button",
167
167
  className: "gmp-unlinked-session",
168
168
  onClick: () => {
@@ -172,18 +172,18 @@ function Lt({ 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__ */ W(ue, { harness: e.harness }), /* @__PURE__ */ W("span", { children: e.title || e.sessionId })]
175
+ children: [/* @__PURE__ */ U(ce, { harness: e.harness }), /* @__PURE__ */ U("span", { children: e.title || e.sessionId })]
176
176
  }, e.sessionId))
177
177
  })]
178
178
  }),
179
- f.length > 0 && /* @__PURE__ */ G("div", {
179
+ f.length > 0 && /* @__PURE__ */ W("div", {
180
180
  className: "gmp-merged-sec",
181
- children: [/* @__PURE__ */ W("div", {
181
+ children: [/* @__PURE__ */ U("div", {
182
182
  className: "sb-head gmp-merged-head",
183
183
  children: "already merged in"
184
- }), /* @__PURE__ */ W("div", {
184
+ }), /* @__PURE__ */ U("div", {
185
185
  className: "gmp-merged-list",
186
- children: f.map((e) => /* @__PURE__ */ G("button", {
186
+ children: f.map((e) => /* @__PURE__ */ W("button", {
187
187
  type: "button",
188
188
  className: "gmp-merged-chip gmp-merged-revert",
189
189
  onClick: () => {
@@ -200,7 +200,7 @@ function Lt({ payload: e, projectLabel: t, selectedId: n, onNavigate: r, onSelec
200
200
  }) : i?.(t);
201
201
  },
202
202
  children: [
203
- /* @__PURE__ */ W(Fe, {
203
+ /* @__PURE__ */ U(Le, {
204
204
  size: 14,
205
205
  "aria-hidden": "true"
206
206
  }),
@@ -212,23 +212,23 @@ function Lt({ payload: e, projectLabel: t, selectedId: n, onNavigate: r, onSelec
212
212
  }, e.branch))
213
213
  })]
214
214
  }),
215
- /* @__PURE__ */ G("div", {
215
+ /* @__PURE__ */ W("div", {
216
216
  className: "gmp-changes-legend",
217
217
  children: [
218
- /* @__PURE__ */ G("span", {
218
+ /* @__PURE__ */ W("span", {
219
219
  className: "gmp-legend-item",
220
- children: [/* @__PURE__ */ W("span", {
220
+ children: [/* @__PURE__ */ U("span", {
221
221
  className: "cg-dot cg-dot-filled",
222
222
  "aria-hidden": "true",
223
- children: /* @__PURE__ */ W(Ke, {
223
+ children: /* @__PURE__ */ U(Je, {
224
224
  className: "cg-spark",
225
225
  "aria-hidden": "true"
226
226
  })
227
227
  }), " commit with a recorded session"]
228
228
  }),
229
- /* @__PURE__ */ G("span", {
229
+ /* @__PURE__ */ W("span", {
230
230
  className: "gmp-legend-item",
231
- children: [/* @__PURE__ */ W("span", {
231
+ children: [/* @__PURE__ */ U("span", {
232
232
  className: "cg-dot cg-dot-hollow",
233
233
  style: {
234
234
  width: 9,
@@ -237,7 +237,7 @@ function Lt({ payload: e, projectLabel: t, selectedId: n, onNavigate: r, onSelec
237
237
  "aria-hidden": "true"
238
238
  }), " no session captured"]
239
239
  }),
240
- /* @__PURE__ */ W("span", {
240
+ /* @__PURE__ */ U("span", {
241
241
  className: "gmp-legend-item gmp-legend-dim",
242
242
  children: "a star marks a recorded session, select a commit to open it"
243
243
  })
@@ -249,29 +249,29 @@ function Lt({ payload: e, projectLabel: t, selectedId: n, onNavigate: r, onSelec
249
249
  }
250
250
  //#endregion
251
251
  //#region src/ui/graph/ChangeDetail.jsx
252
- var Rt = {
252
+ var Bt = {
253
253
  M: "changed",
254
254
  A: "added",
255
255
  D: "deleted",
256
256
  R: "renamed"
257
- }, zt = {
257
+ }, Vt = {
258
258
  A: "chip-ok",
259
259
  M: "",
260
260
  D: "chip-err",
261
261
  R: "chip-warn"
262
- }, Bt = {
262
+ }, Ht = {
263
263
  context: "ctx",
264
264
  add: "add",
265
265
  del: "del"
266
266
  };
267
- function Vt(e) {
267
+ function Ut(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 Ht = (e) => e >= 1e3 ? `≈${(e / 1e3).toFixed(1)}k` : String(e);
272
- function Ut(e) {
271
+ var Wt = (e) => e >= 1e3 ? `≈${(e / 1e3).toFixed(1)}k` : String(e);
272
+ function Gt(e) {
273
273
  let t = e.oldStart, n = e.newStart, r = e.lines.map((e) => {
274
- let r = Bt[e.kind] ?? "ctx";
274
+ let r = Ht[e.kind] ?? "ctx";
275
275
  return r === "add" ? {
276
276
  type: r,
277
277
  newNo: n++,
@@ -292,109 +292,109 @@ function Ut(e) {
292
292
  lines: r
293
293
  };
294
294
  }
295
- function Wt({ file: e, diff: t, open: n, onToggle: r }) {
296
- t && v(t);
297
- let i = e.status, a = t ? new Set(t.hunks.map((e) => e.sessionId).filter(Boolean)).size : null;
298
- return /* @__PURE__ */ G("div", {
295
+ function Kt({ 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;
298
+ return /* @__PURE__ */ W("div", {
299
299
  className: "gmp-file",
300
- children: [/* @__PURE__ */ G("button", {
300
+ children: [/* @__PURE__ */ W("button", {
301
301
  type: "button",
302
302
  className: "gmp-file-head",
303
- "aria-expanded": n,
304
- onClick: r,
303
+ "aria-expanded": r,
304
+ onClick: i,
305
305
  children: [
306
- W(n ? Oe : K, {
306
+ U(r ? Ae : G, {
307
307
  size: 14,
308
308
  "aria-hidden": "true"
309
309
  }),
310
- /* @__PURE__ */ W("span", {
310
+ /* @__PURE__ */ U("span", {
311
311
  className: "mono gmp-file-path",
312
- children: e.path
312
+ children: t.path
313
313
  }),
314
- /* @__PURE__ */ W("span", {
315
- className: "chip gmp-file-status " + (zt[i] ?? ""),
316
- children: Rt[i] ?? i
314
+ /* @__PURE__ */ U("span", {
315
+ className: "chip gmp-file-status " + (Vt[a] ?? ""),
316
+ children: Bt[a] ?? a
317
317
  }),
318
- a != null && a > 0 && /* @__PURE__ */ G("span", {
318
+ o != null && o > 0 && /* @__PURE__ */ W("span", {
319
319
  className: "gmp-file-convos metaitem",
320
320
  children: [
321
- /* @__PURE__ */ W(ze, {
321
+ /* @__PURE__ */ U(Ve, {
322
322
  size: 14,
323
323
  "aria-hidden": "true"
324
324
  }),
325
325
  " ",
326
- /* @__PURE__ */ W("span", {
326
+ /* @__PURE__ */ U("span", {
327
327
  className: "tnum",
328
- children: a
328
+ children: o
329
329
  })
330
330
  ]
331
331
  })
332
332
  ]
333
- }), n && /* @__PURE__ */ W("div", {
333
+ }), r && /* @__PURE__ */ U("div", {
334
334
  className: "gmp-file-body",
335
- children: t ? t.error ? /* @__PURE__ */ W("p", {
335
+ children: n ? n.error ? /* @__PURE__ */ U("p", {
336
336
  className: "gmp-diff-state gmp-diff-error mono",
337
- children: t.error
338
- }) : t.binary ? /* @__PURE__ */ W("p", {
337
+ children: n.error
338
+ }) : n.binary ? /* @__PURE__ */ U("p", {
339
339
  className: "gmp-diff-state mono",
340
340
  children: "binary file — no textual diff."
341
- }) : t.hunks.length === 0 ? /* @__PURE__ */ W("p", {
341
+ }) : n.hunks.length === 0 ? /* @__PURE__ */ U("p", {
342
342
  className: "gmp-diff-state mono",
343
343
  children: "no line changes."
344
- }) : t.hunks.map((e, n) => /* @__PURE__ */ G("div", {
344
+ }) : n.hunks.map((e, t) => /* @__PURE__ */ W("div", {
345
345
  className: "gmp-hunk",
346
346
  children: [
347
- e.sessionTitle && /* @__PURE__ */ G("div", {
347
+ e.sessionTitle && /* @__PURE__ */ W("div", {
348
348
  className: "gmp-hunk-attrib",
349
349
  children: [
350
- /* @__PURE__ */ W(Ae, {
350
+ /* @__PURE__ */ U(Me, {
351
351
  size: 14,
352
352
  "aria-hidden": "true"
353
353
  }),
354
- /* @__PURE__ */ W("span", {
354
+ /* @__PURE__ */ U("span", {
355
355
  className: "gmp-hunk-from",
356
356
  children: "from"
357
357
  }),
358
- /* @__PURE__ */ W("span", {
358
+ /* @__PURE__ */ U("span", {
359
359
  className: "gmp-hunk-link",
360
360
  children: e.sessionTitle
361
361
  }),
362
- e.sessionId && /* @__PURE__ */ W("span", {
362
+ e.sessionId && /* @__PURE__ */ U("span", {
363
363
  className: "mono gmp-hunk-hash",
364
364
  children: e.sessionId.slice(0, 7)
365
365
  })
366
366
  ]
367
367
  }),
368
- /* @__PURE__ */ W(F, {
368
+ /* @__PURE__ */ U(ye, {
369
369
  file: "",
370
- hunks: [Ut(e)],
370
+ hunks: [Gt(e)],
371
371
  className: "gmp-hunk-diff"
372
372
  }),
373
- t.truncated && n === t.hunks.length - 1 && /* @__PURE__ */ W("p", {
373
+ n.truncated && t === n.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
- }, n)) : /* @__PURE__ */ W("p", {
378
+ }, t)) : /* @__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 Gt({ 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] = U(l), [f, p] = U(null), [m, h] = U(!1), [g, _] = U(""), v = H({}), y = H(null), b = n ?? Vt(e.branch), x = e.work.length, S = e.newEdges.length, C = e.removedEdges.length, w = (e) => d((t) => ({
385
+ function qt({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnotation: i, onRemoveAnnotation: a, onOpenMap: o, onShare: s, onCopyRecap: c, initialOpenFiles: l = {} }) {
386
+ v(e);
387
+ let [u, d] = H(l), [f, p] = H(null), [m, h] = H(!1), [g, _] = H(""), y = V({}), b = V(null), x = n ?? Ut(e.branch), S = e.work.length, C = e.newEdges.length, w = e.removedEdges.length, T = (e) => d((t) => ({
388
388
  ...t,
389
389
  [e]: !t[e]
390
390
  }));
391
- function T(e, t) {
391
+ function E(e, t) {
392
392
  if (p(e), t) {
393
393
  d((e) => ({
394
394
  ...e,
395
395
  [t]: !0
396
396
  }));
397
- let e = v.current[t], n = y.current;
397
+ let e = y.current[t], n = b.current;
398
398
  if (e && n) {
399
399
  let t = window.matchMedia && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
400
400
  n.scrollTo({
@@ -404,106 +404,106 @@ function Gt({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
404
404
  }
405
405
  }
406
406
  }
407
- function E(e) {
407
+ function D(e) {
408
408
  e.preventDefault();
409
409
  let t = g.trim();
410
410
  t && i?.(t), h(!1), _("");
411
411
  }
412
412
  let O = e.files[0]?.path;
413
- return /* @__PURE__ */ G("div", {
413
+ return /* @__PURE__ */ W("div", {
414
414
  className: "gmp-root gmp-detail-root",
415
- ref: y,
415
+ ref: b,
416
416
  children: [
417
- /* @__PURE__ */ G("div", {
417
+ /* @__PURE__ */ W("div", {
418
418
  className: "gmp-detail-head",
419
419
  children: [
420
- /* @__PURE__ */ G("div", {
420
+ /* @__PURE__ */ W("div", {
421
421
  className: "crumb",
422
422
  children: [
423
423
  "review ",
424
- /* @__PURE__ */ W(K, {
424
+ /* @__PURE__ */ U(G, {
425
425
  size: 14,
426
426
  "aria-hidden": "true"
427
427
  }),
428
428
  " ",
429
429
  e.defaultBranch,
430
430
  " ",
431
- /* @__PURE__ */ W(K, {
431
+ /* @__PURE__ */ U(G, {
432
432
  size: 14,
433
433
  "aria-hidden": "true"
434
434
  }),
435
435
  " ",
436
- /* @__PURE__ */ W("span", {
436
+ /* @__PURE__ */ U("span", {
437
437
  className: "cur",
438
438
  children: e.branch
439
439
  })
440
440
  ]
441
441
  }),
442
- /* @__PURE__ */ W("div", {
442
+ /* @__PURE__ */ U("div", {
443
443
  className: "gmp-detail-title",
444
- children: b
444
+ children: x
445
445
  }),
446
- /* @__PURE__ */ G("p", {
446
+ /* @__PURE__ */ W("p", {
447
447
  className: "gmp-caption",
448
448
  children: [
449
449
  "this line of work touched",
450
450
  " ",
451
- /* @__PURE__ */ G("button", {
451
+ /* @__PURE__ */ W("button", {
452
452
  type: "button",
453
453
  className: "gmp-frag" + (f === "files" ? " gmp-frag-on" : ""),
454
- onClick: () => T("files", O),
454
+ onClick: () => E("files", O),
455
455
  children: [e.filesChanged, " files"]
456
456
  }),
457
457
  " ",
458
458
  "across",
459
459
  " ",
460
- /* @__PURE__ */ G("button", {
460
+ /* @__PURE__ */ W("button", {
461
461
  type: "button",
462
462
  className: "gmp-frag" + (f === "conversations" ? " gmp-frag-on" : ""),
463
- onClick: () => T("conversations"),
464
- children: [x, " conversations"]
463
+ onClick: () => E("conversations"),
464
+ children: [S, " conversations"]
465
465
  }),
466
466
  ", reshaping",
467
467
  " ",
468
- /* @__PURE__ */ G("button", {
468
+ /* @__PURE__ */ W("button", {
469
469
  type: "button",
470
470
  className: "gmp-frag" + (f === "conn" ? " gmp-frag-on" : ""),
471
- onClick: () => T("conn"),
471
+ onClick: () => E("conn"),
472
472
  children: [
473
473
  "+",
474
- S,
475
- "/−",
476
474
  C,
475
+ "/−",
476
+ w,
477
477
  " connections"
478
478
  ]
479
479
  }),
480
480
  "."
481
481
  ]
482
482
  }),
483
- /* @__PURE__ */ W("span", {
483
+ /* @__PURE__ */ U("span", {
484
484
  className: "gmp-caption-hint mono",
485
485
  children: "click any number to jump to its proof"
486
486
  })
487
487
  ]
488
488
  }),
489
- (e.frictions.length > 0 || e.violations.length > 0) && /* @__PURE__ */ G("div", {
489
+ (e.frictions.length > 0 || e.violations.length > 0) && /* @__PURE__ */ W("div", {
490
490
  className: "gmp-signals",
491
- children: [e.frictions.map((e, t) => /* @__PURE__ */ G("span", {
491
+ children: [e.frictions.map((e, t) => /* @__PURE__ */ W("span", {
492
492
  className: "gmp-signal",
493
493
  children: [
494
- /* @__PURE__ */ W(Ue, {
494
+ /* @__PURE__ */ U(Ge, {
495
495
  size: 14,
496
496
  "aria-hidden": "true"
497
497
  }),
498
498
  " ",
499
499
  e.label,
500
500
  ", ",
501
- /* @__PURE__ */ W("span", {
501
+ /* @__PURE__ */ U("span", {
502
502
  className: "mono",
503
503
  children: e.file
504
504
  }),
505
505
  " ",
506
- /* @__PURE__ */ G("b", {
506
+ /* @__PURE__ */ W("b", {
507
507
  className: "tnum",
508
508
  children: [e.count, "×"]
509
509
  }),
@@ -511,15 +511,15 @@ function Gt({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
511
511
  e.sessions,
512
512
  " conversations"
513
513
  ]
514
- }, t)), e.violations.length > 0 && /* @__PURE__ */ G("span", {
514
+ }, t)), e.violations.length > 0 && /* @__PURE__ */ W("span", {
515
515
  className: "gmp-signal gmp-signal-warn",
516
516
  children: [
517
- /* @__PURE__ */ W(Je, {
517
+ /* @__PURE__ */ U(Xe, {
518
518
  size: 14,
519
519
  "aria-hidden": "true"
520
520
  }),
521
521
  " ",
522
- /* @__PURE__ */ W("b", {
522
+ /* @__PURE__ */ U("b", {
523
523
  className: "tnum",
524
524
  children: e.violations.length
525
525
  }),
@@ -527,13 +527,13 @@ function Gt({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
527
527
  ]
528
528
  })]
529
529
  }),
530
- /* @__PURE__ */ G("div", {
530
+ /* @__PURE__ */ W("div", {
531
531
  className: "gmp-totals",
532
532
  children: [
533
- /* @__PURE__ */ G("span", {
533
+ /* @__PURE__ */ W("span", {
534
534
  className: "metaitem tnum",
535
535
  children: [
536
- /* @__PURE__ */ W(Me, {
536
+ /* @__PURE__ */ U(Pe, {
537
537
  size: 14,
538
538
  "aria-hidden": "true"
539
539
  }),
@@ -542,37 +542,37 @@ function Gt({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
542
542
  " files touched"
543
543
  ]
544
544
  }),
545
- /* @__PURE__ */ G("span", {
545
+ /* @__PURE__ */ W("span", {
546
546
  className: "metaitem tnum",
547
547
  children: [
548
- /* @__PURE__ */ G("span", {
548
+ /* @__PURE__ */ W("span", {
549
549
  className: "gmp-add",
550
- children: ["+", S]
550
+ children: ["+", C]
551
551
  }),
552
552
  "/",
553
- /* @__PURE__ */ G("span", {
553
+ /* @__PURE__ */ W("span", {
554
554
  className: "gmp-del",
555
- children: ["−", C]
555
+ children: ["−", w]
556
556
  }),
557
557
  " connections"
558
558
  ]
559
559
  }),
560
- /* @__PURE__ */ G("span", {
560
+ /* @__PURE__ */ W("span", {
561
561
  className: "metaitem tnum",
562
562
  children: [
563
- /* @__PURE__ */ W(Ie, {
563
+ /* @__PURE__ */ U(Re, {
564
564
  size: 14,
565
565
  "aria-hidden": "true"
566
566
  }),
567
567
  " ai wrote ",
568
- Ht(Number(e.outputTokens)),
568
+ Wt(Number(e.outputTokens)),
569
569
  " tokens"
570
570
  ]
571
571
  }),
572
- e.costUsd != null && /* @__PURE__ */ G("span", {
572
+ e.costUsd != null && /* @__PURE__ */ W("span", {
573
573
  className: "metaitem tnum",
574
574
  children: [
575
- /* @__PURE__ */ W(ke, {
575
+ /* @__PURE__ */ U(je, {
576
576
  size: 14,
577
577
  "aria-hidden": "true"
578
578
  }),
@@ -582,62 +582,62 @@ function Gt({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
582
582
  })
583
583
  ]
584
584
  }),
585
- /* @__PURE__ */ G("div", {
585
+ /* @__PURE__ */ W("div", {
586
586
  className: "gmp-detail-sec",
587
- children: [/* @__PURE__ */ W("div", {
587
+ children: [/* @__PURE__ */ U("div", {
588
588
  className: "sb-head gmp-detail-sechead",
589
589
  children: "files changed, click a path to open its diff"
590
- }), /* @__PURE__ */ W("div", {
590
+ }), /* @__PURE__ */ U("div", {
591
591
  className: "gmp-files",
592
- children: e.files.map((e) => /* @__PURE__ */ W("div", {
592
+ children: e.files.map((e) => /* @__PURE__ */ U("div", {
593
593
  ref: (t) => {
594
- v.current[e.path] = t;
594
+ y.current[e.path] = t;
595
595
  },
596
- children: /* @__PURE__ */ W(Wt, {
596
+ children: /* @__PURE__ */ U(Kt, {
597
597
  file: e,
598
598
  diff: u[e.path] ? t?.(e) : void 0,
599
599
  open: !!u[e.path],
600
- onToggle: () => w(e.path)
600
+ onToggle: () => T(e.path)
601
601
  })
602
602
  }, e.path))
603
603
  })]
604
604
  }),
605
- /* @__PURE__ */ G("div", {
605
+ /* @__PURE__ */ W("div", {
606
606
  className: "gmp-detail-sec",
607
- children: [/* @__PURE__ */ W("div", {
607
+ children: [/* @__PURE__ */ U("div", {
608
608
  className: "sb-head gmp-detail-sechead",
609
609
  children: "your annotation"
610
- }), /* @__PURE__ */ G("div", {
610
+ }), /* @__PURE__ */ W("div", {
611
611
  className: "gmp-annot",
612
612
  children: [
613
- r && /* @__PURE__ */ G("span", {
613
+ r && /* @__PURE__ */ W("span", {
614
614
  className: "gmp-label-chip gmp-annot-chip",
615
615
  children: [
616
- /* @__PURE__ */ W(qe, {
616
+ /* @__PURE__ */ U(Ye, {
617
617
  size: 14,
618
618
  "aria-hidden": "true"
619
619
  }),
620
620
  " ",
621
621
  r,
622
- /* @__PURE__ */ W("button", {
622
+ /* @__PURE__ */ U("button", {
623
623
  type: "button",
624
624
  className: "gmp-annot-x",
625
625
  "aria-label": "remove annotation",
626
626
  onClick: () => a?.(),
627
- children: /* @__PURE__ */ W(Ye, {
627
+ children: /* @__PURE__ */ U(Ze, {
628
628
  size: 14,
629
629
  "aria-hidden": "true"
630
630
  })
631
631
  })
632
632
  ]
633
633
  }),
634
- /* @__PURE__ */ G("button", {
634
+ /* @__PURE__ */ W("button", {
635
635
  type: "button",
636
636
  className: "gmp-annot-add",
637
637
  "aria-expanded": m,
638
638
  onClick: () => h((e) => !e),
639
639
  children: [
640
- /* @__PURE__ */ W(qe, {
640
+ /* @__PURE__ */ U(Ye, {
641
641
  size: 14,
642
642
  "aria-hidden": "true"
643
643
  }),
@@ -645,15 +645,15 @@ function Gt({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
645
645
  r ? "change label" : "add a label"
646
646
  ]
647
647
  }),
648
- m && /* @__PURE__ */ G("form", {
648
+ m && /* @__PURE__ */ W("form", {
649
649
  className: "gmp-annot-pop",
650
- onSubmit: E,
650
+ onSubmit: D,
651
651
  children: [
652
- /* @__PURE__ */ W("span", {
652
+ /* @__PURE__ */ U("span", {
653
653
  className: "label",
654
654
  children: "user.custom_label"
655
655
  }),
656
- /* @__PURE__ */ W("input", {
656
+ /* @__PURE__ */ U("input", {
657
657
  className: "input",
658
658
  type: "text",
659
659
  autoFocus: !0,
@@ -662,17 +662,17 @@ function Gt({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
662
662
  placeholder: "e.g. good handoff",
663
663
  "aria-label": "annotation value"
664
664
  }),
665
- /* @__PURE__ */ G("div", {
665
+ /* @__PURE__ */ W("div", {
666
666
  className: "gmp-annot-pop-foot",
667
- children: [/* @__PURE__ */ W("button", {
667
+ children: [/* @__PURE__ */ U("button", {
668
668
  type: "button",
669
669
  className: "btn btn-ghost btn-sm",
670
670
  onClick: () => h(!1),
671
671
  children: "cancel"
672
- }), /* @__PURE__ */ G("button", {
672
+ }), /* @__PURE__ */ W("button", {
673
673
  type: "submit",
674
674
  className: "btn btn-primary btn-sm",
675
- children: [/* @__PURE__ */ W(De, {
675
+ children: [/* @__PURE__ */ U(ke, {
676
676
  size: 14,
677
677
  "aria-hidden": "true"
678
678
  }), " save"]
@@ -683,42 +683,42 @@ function Gt({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
683
683
  ]
684
684
  })]
685
685
  }),
686
- /* @__PURE__ */ G("div", {
686
+ /* @__PURE__ */ W("div", {
687
687
  className: "gmp-exits",
688
688
  children: [
689
- /* @__PURE__ */ G("button", {
689
+ /* @__PURE__ */ W("button", {
690
690
  type: "button",
691
691
  className: "btn btn-secondary btn-sm",
692
692
  onClick: () => o?.(),
693
- children: [/* @__PURE__ */ W(Ee, {
693
+ children: [/* @__PURE__ */ U(Oe, {
694
694
  size: 14,
695
695
  "aria-hidden": "true"
696
696
  }), " see this work on the code map"]
697
697
  }),
698
- /* @__PURE__ */ G("button", {
698
+ /* @__PURE__ */ W("button", {
699
699
  type: "button",
700
700
  className: "btn btn-secondary btn-sm",
701
701
  onClick: () => s?.(),
702
702
  children: [
703
- /* @__PURE__ */ W(Ge, {
703
+ /* @__PURE__ */ U(qe, {
704
704
  size: 14,
705
705
  "aria-hidden": "true"
706
706
  }),
707
707
  " share ",
708
- x,
708
+ S,
709
709
  " conversations…"
710
710
  ]
711
711
  }),
712
- /* @__PURE__ */ G("button", {
712
+ /* @__PURE__ */ W("button", {
713
713
  type: "button",
714
714
  className: "btn btn-secondary btn-sm",
715
715
  onClick: () => c?.(),
716
- children: [/* @__PURE__ */ W(Ne, {
716
+ children: [/* @__PURE__ */ U(Fe, {
717
717
  size: 14,
718
718
  "aria-hidden": "true"
719
719
  }), " copy recap"]
720
720
  }),
721
- /* @__PURE__ */ G("code", {
721
+ /* @__PURE__ */ W("code", {
722
722
  className: "gmp-gitdiff mono",
723
723
  children: [
724
724
  "git diff ",
@@ -729,7 +729,7 @@ function Gt({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
729
729
  })
730
730
  ]
731
731
  }),
732
- /* @__PURE__ */ W("p", {
732
+ /* @__PURE__ */ U("p", {
733
733
  className: "gmp-boundary mono",
734
734
  children: "shows what changed and the recorded work behind it, not whether the change is correct or secure."
735
735
  })
@@ -738,83 +738,83 @@ function Gt({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
738
738
  }
739
739
  //#endregion
740
740
  //#region src/ui/graph/CodeMap.jsx
741
- var Kt = Object.freeze({
741
+ var Jt = Object.freeze({
742
742
  project: "overview",
743
743
  package: "folders",
744
744
  file: "files"
745
- }), qt = Object.freeze({
745
+ }), Yt = Object.freeze({
746
746
  overview: "project",
747
747
  folders: "package",
748
748
  files: "file"
749
749
  });
750
- function Jt({ 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 _ = V(() => {
750
+ function Xt({ 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(() => {
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]), v = V(() => h === void 0 ? null : R(h), [h]), y = V(() => v ? j(e, v) : null, [e, v]), b = V(() => Yt(e && {
755
+ }, [e?.nodes]), _ = B(() => m === void 0 ? null : N(m), [m]), v = B(() => _ ? Se(e, _) : null, [e, _]), y = B(() => Zt(e && {
756
756
  ...e,
757
- nodes: y?.canvas.allNodes ?? e.nodes
758
- }), [e, y?.canvas.allNodes]), x = y ? Kt[y.canvas.grain] ?? "folders" : Kt[t?.level ?? "package"], S = y?.canvas.expandedIds ?? t?.expanded, C = H(x);
759
- C.current = x;
760
- function w(e) {
761
- if (!v) return;
762
- let t = r(v, e);
763
- ve(v, t) || g?.(t);
757
+ nodes: v?.canvas.allNodes ?? e.nodes
758
+ }), [e, v?.canvas.allNodes]), b = v ? Jt[v.canvas.grain] ?? "folders" : Jt[t?.level ?? "package"], x = v?.canvas.expandedIds ?? t?.expanded, S = V(b);
759
+ S.current = b;
760
+ function C(e) {
761
+ if (!_) return;
762
+ let t = xe(_, e);
763
+ Ce(_, t) || h?.(t);
764
764
  }
765
- return /* @__PURE__ */ W(te, {
766
- data: b,
767
- grain: x,
768
- expandedIds: S,
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,
765
+ return /* @__PURE__ */ U(te, {
766
+ data: y,
767
+ grain: b,
768
+ expandedIds: x,
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,
775
775
  onSelect: (e) => {
776
- a?.(e, e ? _.get(e) ?? null : null);
776
+ i?.(e, e ? g.get(e) ?? null : null);
777
777
  },
778
- onExpand: o,
778
+ onExpand: a,
779
779
  onGrainChange: (e) => {
780
- C.current = e, n?.({
781
- level: qt[e] ?? "package",
780
+ S.current = e, n?.({
781
+ level: Yt[e] ?? "package",
782
782
  expanded: []
783
783
  });
784
784
  },
785
785
  onExpandedIdsChange: (e) => {
786
786
  n?.({
787
- level: qt[C.current] ?? "package",
787
+ level: Yt[S.current] ?? "package",
788
788
  expanded: e
789
789
  });
790
790
  },
791
- height: u,
792
- ariaLabel: d,
793
- className: f,
794
- viewport: y ? y.canvas.viewport : p,
791
+ height: l,
792
+ ariaLabel: u,
793
+ className: d,
794
+ viewport: v ? v.canvas.viewport : f,
795
795
  onViewportChange: (e) => {
796
- m?.(e);
796
+ p?.(e);
797
797
  },
798
- onStateAction: v ? w : void 0,
799
- canonicalControlled: v !== null
798
+ onStateAction: _ ? C : void 0,
799
+ canonicalControlled: _ !== null
800
800
  });
801
801
  }
802
- function Yt(t) {
803
- t && e(t);
804
- let n = t?.nodes ?? [], r = Zt(t?.violations ?? []);
802
+ function Zt(e) {
803
+ e && I(e);
804
+ let t = e?.nodes ?? [], n = $t(e?.violations ?? []);
805
805
  return {
806
- nodes: n.map((e) => ({
806
+ nodes: t.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: Xt(e.recordedFiles, e.totalFiles),
811
+ coverage: Qt(e.recordedFiles, e.totalFiles),
812
812
  parent: e.parent || void 0,
813
- violations: r.get(e.id) ?? 0,
813
+ violations: n.get(e.id) ?? 0,
814
814
  layer: e.layer,
815
815
  order: e.order
816
816
  })),
817
- edges: (t?.structureEdges ?? []).map((e) => ({
817
+ edges: (e?.structureEdges ?? []).map((e) => ({
818
818
  from: e.from,
819
819
  to: e.to,
820
820
  kind: "structure",
@@ -822,24 +822,24 @@ function Yt(t) {
822
822
  }))
823
823
  };
824
824
  }
825
- function Xt(e, t) {
825
+ function Qt(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 Zt(e) {
831
+ function $t(e) {
832
832
  let t = /* @__PURE__ */ new Map();
833
- for (let n of e) Qt(t, n.from), Qt(t, n.to);
833
+ for (let n of e) en(t, n.from), en(t, n.to);
834
834
  return t;
835
835
  }
836
- function Qt(e, t) {
836
+ function en(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 $t({ 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] = U(() => /* @__PURE__ */ new Set()), [h, g] = U(null), _ = n === void 0 ? p : new Set(n), v = o === void 0 ? h : o, y = H(/* @__PURE__ */ new Map()), b = V(() => j(e, R({
841
+ function tn({ 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(() => Se(e, N({
843
843
  grain: t,
844
844
  expandedIds: Array.from(_),
845
845
  selectedId: i,
@@ -848,7 +848,7 @@ function $t({ payload: e, grain: t = "package", expandedIds: n, onExpandedIdsCha
848
848
  })), [
849
849
  e,
850
850
  t,
851
- tn(_),
851
+ rn(_),
852
852
  i,
853
853
  v,
854
854
  c
@@ -891,27 +891,27 @@ function $t({ payload: e, grain: t = "package", expandedIds: n, onExpandedIdsCha
891
891
  } else return;
892
892
  e.preventDefault(), i && O(i);
893
893
  }
894
- return /* @__PURE__ */ G("section", {
894
+ return /* @__PURE__ */ W("section", {
895
895
  className: "gmp-navigator",
896
896
  "aria-label": f,
897
897
  children: [
898
- /* @__PURE__ */ G("header", {
898
+ /* @__PURE__ */ W("header", {
899
899
  className: "gmp-navigator-head",
900
- children: [/* @__PURE__ */ G("div", { children: [/* @__PURE__ */ W("p", {
900
+ children: [/* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("p", {
901
901
  className: "gmp-navigator-kicker",
902
902
  children: "browse the codebase"
903
- }), /* @__PURE__ */ W("p", {
903
+ }), /* @__PURE__ */ U("p", {
904
904
  className: "gmp-navigator-note",
905
905
  children: "choose an area for its recorded work, then open the spatial map when relationships matter"
906
- })] }), /* @__PURE__ */ G("label", {
906
+ })] }), /* @__PURE__ */ W("label", {
907
907
  className: "gmp-navigator-search",
908
908
  children: [
909
- /* @__PURE__ */ W(We, { "aria-hidden": "true" }),
910
- /* @__PURE__ */ W("span", {
909
+ /* @__PURE__ */ U(Ke, { "aria-hidden": "true" }),
910
+ /* @__PURE__ */ U("span", {
911
911
  className: "mc-sr",
912
912
  children: "filter code areas"
913
913
  }),
914
- /* @__PURE__ */ W("input", {
914
+ /* @__PURE__ */ U("input", {
915
915
  value: c,
916
916
  onChange: (e) => {
917
917
  d?.({
@@ -924,13 +924,13 @@ function $t({ payload: e, grain: t = "package", expandedIds: n, onExpandedIdsCha
924
924
  ]
925
925
  })]
926
926
  }),
927
- b.staleSelectedId ? /* @__PURE__ */ G("p", {
927
+ b.staleSelectedId ? /* @__PURE__ */ W("p", {
928
928
  className: "gmp-navigator-missing",
929
929
  role: "status",
930
930
  children: [
931
931
  "the selected code area is not present in this map.",
932
932
  " ",
933
- /* @__PURE__ */ W("button", {
933
+ /* @__PURE__ */ U("button", {
934
934
  type: "button",
935
935
  onClick: () => {
936
936
  d?.({ type: "clear-selection" }), a?.(null, null);
@@ -939,20 +939,20 @@ function $t({ payload: e, grain: t = "package", expandedIds: n, onExpandedIdsCha
939
939
  })
940
940
  ]
941
941
  }) : null,
942
- /* @__PURE__ */ G("div", {
942
+ /* @__PURE__ */ W("div", {
943
943
  className: "gmp-navigator-body",
944
- children: [/* @__PURE__ */ W("div", {
944
+ children: [/* @__PURE__ */ U("div", {
945
945
  role: x.length ? "tree" : void 0,
946
946
  "aria-label": "code areas",
947
947
  className: "gmp-navigator-tree",
948
948
  "data-grain": t,
949
- children: x.length === 0 ? /* @__PURE__ */ W("p", {
949
+ children: x.length === 0 ? /* @__PURE__ */ U("p", {
950
950
  className: "gmp-navigator-empty",
951
951
  role: "status",
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__ */ W(en, {
955
+ return /* @__PURE__ */ U(nn, {
956
956
  row: e,
957
957
  hasChildren: n,
958
958
  isExpanded: r,
@@ -971,25 +971,25 @@ function $t({ payload: e, grain: t = "package", expandedIds: n, onExpandedIdsCha
971
971
  onKeyDown: (e) => A(e, t)
972
972
  }, e.node.id);
973
973
  })
974
- }), /* @__PURE__ */ W("aside", {
974
+ }), /* @__PURE__ */ U("aside", {
975
975
  className: "gmp-navigator-actions",
976
976
  "aria-label": "selected code area",
977
- children: C ? /* @__PURE__ */ G(Te, { children: [
978
- /* @__PURE__ */ W("p", {
977
+ children: C ? /* @__PURE__ */ W(De, { children: [
978
+ /* @__PURE__ */ U("p", {
979
979
  className: "gmp-navigator-selected",
980
980
  children: C.name || C.id
981
981
  }),
982
- /* @__PURE__ */ W("p", {
982
+ /* @__PURE__ */ U("p", {
983
983
  className: "gmp-navigator-selected-path",
984
984
  children: C.id
985
985
  }),
986
- T ? /* @__PURE__ */ G("button", {
986
+ T ? /* @__PURE__ */ W("button", {
987
987
  type: "button",
988
988
  className: "gmp-navigator-action",
989
989
  onClick: () => D(C.id),
990
- children: [/* @__PURE__ */ W(K, { "aria-hidden": "true" }), _.has(C.id) ? "hide children" : "show children"]
990
+ children: [/* @__PURE__ */ U(G, { "aria-hidden": "true" }), _.has(C.id) ? "hide children" : "show children"]
991
991
  }) : null,
992
- /* @__PURE__ */ G("button", {
992
+ /* @__PURE__ */ W("button", {
993
993
  type: "button",
994
994
  className: "gmp-navigator-action gmp-navigator-action--primary",
995
995
  onClick: () => {
@@ -998,9 +998,9 @@ function $t({ payload: e, grain: t = "package", expandedIds: n, onExpandedIdsCha
998
998
  id: C.id
999
999
  }), u?.(C.id);
1000
1000
  },
1001
- children: [/* @__PURE__ */ W(Le, { "aria-hidden": "true" }), " open in map"]
1001
+ children: [/* @__PURE__ */ U(ze, { "aria-hidden": "true" }), " open in map"]
1002
1002
  })
1003
- ] }) : /* @__PURE__ */ W("p", {
1003
+ ] }) : /* @__PURE__ */ U("p", {
1004
1004
  className: "gmp-navigator-empty",
1005
1005
  children: "select an area to see its recorded work and map context"
1006
1006
  })
@@ -1009,13 +1009,13 @@ function $t({ payload: e, grain: t = "package", expandedIds: n, onExpandedIdsCha
1009
1009
  ]
1010
1010
  });
1011
1011
  }
1012
- function en({ row: e, hasChildren: t, isExpanded: n, selected: r, tabbable: i, setRef: a, onFocus: o, onSelect: s, onToggle: c, onKeyDown: l }) {
1013
- return /* @__PURE__ */ G("div", {
1012
+ function nn({ row: e, hasChildren: t, isExpanded: n, selected: r, tabbable: i, setRef: a, onFocus: o, onSelect: s, onToggle: c, onKeyDown: l }) {
1013
+ return /* @__PURE__ */ W("div", {
1014
1014
  role: "none",
1015
1015
  className: "gmp-navigator-row-wrap",
1016
1016
  "data-selected": r,
1017
1017
  style: { "--gmp-tree-depth": e.depth },
1018
- children: [t ? /* @__PURE__ */ W("button", {
1018
+ children: [t ? /* @__PURE__ */ U("button", {
1019
1019
  type: "button",
1020
1020
  className: "gmp-navigator-disclosure",
1021
1021
  tabIndex: -1,
@@ -1027,14 +1027,14 @@ function en({ row: e, hasChildren: t, isExpanded: n, selected: r, tabbable: i, s
1027
1027
  onClick: (t) => {
1028
1028
  t.stopPropagation(), e.forcedOpen || c();
1029
1029
  },
1030
- children: /* @__PURE__ */ W(K, {
1030
+ children: /* @__PURE__ */ U(G, {
1031
1031
  className: "gmp-navigator-chevron",
1032
1032
  "aria-hidden": "true"
1033
1033
  })
1034
- }) : /* @__PURE__ */ W("span", {
1034
+ }) : /* @__PURE__ */ U("span", {
1035
1035
  className: "gmp-navigator-disclosure-placeholder",
1036
1036
  "aria-hidden": "true"
1037
- }), /* @__PURE__ */ G("div", {
1037
+ }), /* @__PURE__ */ W("div", {
1038
1038
  ref: a,
1039
1039
  role: "treeitem",
1040
1040
  "aria-level": e.depth + 1,
@@ -1049,151 +1049,151 @@ function en({ row: e, hasChildren: t, isExpanded: n, selected: r, tabbable: i, s
1049
1049
  },
1050
1050
  onKeyDown: l,
1051
1051
  children: [
1052
- e.node.kind === "file" ? /* @__PURE__ */ W(je, { "aria-hidden": "true" }) : /* @__PURE__ */ W(Pe, { "aria-hidden": "true" }),
1053
- /* @__PURE__ */ W("span", {
1052
+ e.node.kind === "file" ? /* @__PURE__ */ U(Ne, { "aria-hidden": "true" }) : /* @__PURE__ */ U(Ie, { "aria-hidden": "true" }),
1053
+ /* @__PURE__ */ U("span", {
1054
1054
  className: "gmp-navigator-path",
1055
1055
  children: e.node.name || e.node.id
1056
1056
  }),
1057
- /* @__PURE__ */ G("span", {
1057
+ /* @__PURE__ */ W("span", {
1058
1058
  className: "gmp-navigator-meta",
1059
- children: [/* @__PURE__ */ G("span", { children: [nn(e.node.loc ?? 0), " lines"] }), /* @__PURE__ */ W("span", { children: rn(e.node.recordedFiles, e.node.totalFiles) })]
1059
+ children: [/* @__PURE__ */ W("span", { children: [an(e.node.loc ?? 0), " lines"] }), /* @__PURE__ */ U("span", { children: on(e.node.recordedFiles, e.node.totalFiles) })]
1060
1060
  })
1061
1061
  ]
1062
1062
  })]
1063
1063
  });
1064
1064
  }
1065
- function tn(e) {
1065
+ function rn(e) {
1066
1066
  return Array.from(e).sort().join("\0");
1067
1067
  }
1068
- function nn(e) {
1069
- return N(Number(e) || 0);
1068
+ function an(e) {
1069
+ return oe(Number(e) || 0);
1070
1070
  }
1071
- function rn(e, t) {
1071
+ function on(e, t) {
1072
1072
  let n = Number(t) || 0;
1073
1073
  return n <= 0 ? "no coverage data" : `${Math.round((Number(e) || 0) / n * 100)}% recorded`;
1074
1074
  }
1075
1075
  //#endregion
1076
1076
  //#region src/ui/graph/CodeMapComposition.jsx
1077
- function an({ 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 }) {
1078
- let A = D !== void 0 || O !== void 0, [j, M] = U(() => R(O)), N = V(() => A ? R(D ?? j) : null, [
1079
- A,
1080
- D,
1081
- j
1082
- ]), P = N?.presentation ?? S;
1077
+ function sn({ 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: y, className: b = "", presentation: x = "canvas", navigatorSlot: S, onPresentationChange: C, viewport: w, onViewportChange: T, state: E, defaultState: D, onStateChange: O }) {
1078
+ let k = E !== void 0 || D !== void 0, [A, j] = H(() => N(D)), M = B(() => k ? N(E ?? A) : null, [
1079
+ k,
1080
+ E,
1081
+ A
1082
+ ]), P = M?.presentation ?? x;
1083
1083
  function F(e, t) {
1084
- D === void 0 && M(e), k?.(e), t?.(e);
1084
+ E === void 0 && j(e), O?.(e), t?.(e);
1085
1085
  }
1086
1086
  function I(e, t) {
1087
- if (!N) return;
1088
- let n = r(N, e);
1089
- ve(N, n) || F(n, t);
1087
+ if (!M) return;
1088
+ let n = xe(M, e);
1089
+ Ce(M, n) || F(n, t);
1090
1090
  }
1091
- let ee = A || w ? /* @__PURE__ */ G(Te, { children: [/* @__PURE__ */ G("div", {
1091
+ let ee = k || C ? /* @__PURE__ */ W(De, { children: [/* @__PURE__ */ W("div", {
1092
1092
  className: "gmp-presentation-switch",
1093
1093
  role: "group",
1094
1094
  "aria-label": "code map view",
1095
- children: [/* @__PURE__ */ W("button", {
1095
+ children: [/* @__PURE__ */ U("button", {
1096
1096
  type: "button",
1097
1097
  "aria-pressed": P === "navigator",
1098
- onClick: () => A ? I({
1098
+ onClick: () => k ? I({
1099
1099
  type: "set-presentation",
1100
1100
  presentation: "navigator"
1101
- }, () => w?.("navigator")) : w?.("navigator"),
1101
+ }, () => C?.("navigator")) : C?.("navigator"),
1102
1102
  children: P === "canvas" ? "back to browse" : "browse"
1103
- }), /* @__PURE__ */ W("button", {
1103
+ }), /* @__PURE__ */ U("button", {
1104
1104
  type: "button",
1105
1105
  "aria-pressed": P === "canvas",
1106
- onClick: () => A ? I({
1106
+ onClick: () => k ? I({
1107
1107
  type: "set-presentation",
1108
1108
  presentation: "canvas"
1109
- }, () => w?.("canvas")) : w?.("canvas"),
1109
+ }, () => C?.("canvas")) : C?.("canvas"),
1110
1110
  children: "spatial map"
1111
1111
  })]
1112
- }), m] }) : m, te = f ?? /* @__PURE__ */ W(Jt, {
1112
+ }), p] }) : p, te = d ?? /* @__PURE__ */ U(Xt, {
1113
1113
  payload: e,
1114
- zoom: N ? {
1115
- level: N.grain,
1116
- expanded: N.expandedIds
1114
+ zoom: M ? {
1115
+ level: M.grain,
1116
+ expanded: M.expandedIds
1117
1117
  } : t,
1118
1118
  onZoomChange: n,
1119
- selectedId: N ? N.selectedId : i,
1120
- onSelect: a,
1121
- onExpand: o,
1122
- highlightedIds: s,
1123
- nodeDeltas: c,
1124
- structureEdgeDeltas: l,
1125
- height: u,
1126
- ariaLabel: d,
1127
- viewport: N ? N.viewport ?? void 0 : T,
1128
- onViewportChange: E,
1129
- state: N ?? void 0,
1130
- onStateChange: N ? (e) => F(e) : void 0
1131
- }), L = C ?? (N && e ? /* @__PURE__ */ W($t, {
1119
+ selectedId: M ? M.selectedId : r,
1120
+ onSelect: i,
1121
+ onExpand: a,
1122
+ highlightedIds: o,
1123
+ nodeDeltas: s,
1124
+ structureEdgeDeltas: c,
1125
+ height: l,
1126
+ ariaLabel: u,
1127
+ viewport: M ? M.viewport ?? void 0 : w,
1128
+ onViewportChange: T,
1129
+ state: M ?? void 0,
1130
+ onStateChange: M ? (e) => F(e) : void 0
1131
+ }), L = S ?? (M && e ? /* @__PURE__ */ U(tn, {
1132
1132
  payload: e,
1133
- grain: N.grain,
1134
- expandedIds: N.expandedIds,
1135
- selectedId: N.selectedId,
1136
- focusedId: N.navigatorFocusedId,
1137
- filter: N.navigatorFilter,
1133
+ grain: M.grain,
1134
+ expandedIds: M.expandedIds,
1135
+ selectedId: M.selectedId,
1136
+ focusedId: M.navigatorFocusedId,
1137
+ filter: M.navigatorFilter,
1138
1138
  onStateAction: (t) => I(t, () => {
1139
- 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?.({
1140
- level: N.grain,
1139
+ 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?.({
1140
+ level: M.grain,
1141
1141
  expanded: Array.from(t.ids)
1142
- }) : t.type === "open-in-map" && (a?.(t.id, e.nodes.find((e) => e.id === t.id) ?? null), w?.("canvas"));
1142
+ }) : t.type === "open-in-map" && (i?.(t.id, e.nodes.find((e) => e.id === t.id) ?? null), C?.("canvas"));
1143
1143
  }),
1144
- ariaLabel: `browse ${d}`
1144
+ ariaLabel: `browse ${u}`
1145
1145
  }) : null), ne = P === "navigator" && L !== null;
1146
- return /* @__PURE__ */ W("div", {
1147
- className: ["gmp-root", x].filter(Boolean).join(" "),
1148
- children: /* @__PURE__ */ G(le, {
1146
+ return /* @__PURE__ */ U("div", {
1147
+ className: ["gmp-root", b].filter(Boolean).join(" "),
1148
+ children: /* @__PURE__ */ W(se, {
1149
1149
  toolbar: ee,
1150
- rail: p,
1151
- sheetTitle: h,
1152
- sheetMeta: g,
1153
- railSide: _,
1154
- children: [/* @__PURE__ */ W("div", {
1155
- className: ["gmp-map-canvas-region", y].filter(Boolean).join(" "),
1156
- style: b,
1150
+ rail: f,
1151
+ sheetTitle: m,
1152
+ sheetMeta: h,
1153
+ railSide: g,
1154
+ children: [/* @__PURE__ */ U("div", {
1155
+ className: ["gmp-map-canvas-region", v].filter(Boolean).join(" "),
1156
+ style: y,
1157
1157
  "data-testid": "gmp-map-canvas-region",
1158
1158
  children: ne ? L : te
1159
- }), !ne && v !== !1 && (v ?? /* @__PURE__ */ W(on, {}))]
1159
+ }), !ne && _ !== !1 && (_ ?? /* @__PURE__ */ U(cn, {}))]
1160
1160
  })
1161
1161
  });
1162
1162
  }
1163
- function on() {
1164
- return /* @__PURE__ */ G("p", {
1163
+ function cn() {
1164
+ return /* @__PURE__ */ W("p", {
1165
1165
  className: "gmp-map-legend",
1166
1166
  children: [
1167
- /* @__PURE__ */ G("span", {
1167
+ /* @__PURE__ */ W("span", {
1168
1168
  className: "gmp-legend-item",
1169
- children: [/* @__PURE__ */ W("span", {
1169
+ children: [/* @__PURE__ */ U("span", {
1170
1170
  className: "gmp-map-swatch",
1171
1171
  "aria-hidden": "true"
1172
1172
  }), " code area (folder or file)"]
1173
1173
  }),
1174
- /* @__PURE__ */ G("span", {
1174
+ /* @__PURE__ */ W("span", {
1175
1175
  className: "gmp-legend-item gmp-legend-dim",
1176
- children: [/* @__PURE__ */ W("span", {
1176
+ children: [/* @__PURE__ */ U("span", {
1177
1177
  className: "gmp-map-swatch gmp-map-swatch--empty",
1178
1178
  "aria-hidden": "true"
1179
1179
  }), " no saved conversation behind it"]
1180
1180
  }),
1181
- /* @__PURE__ */ W("span", {
1181
+ /* @__PURE__ */ U("span", {
1182
1182
  className: "gmp-legend-item gmp-legend-dim",
1183
1183
  children: "brighter = more of it built with AI on record"
1184
1184
  }),
1185
- /* @__PURE__ */ G("span", {
1185
+ /* @__PURE__ */ W("span", {
1186
1186
  className: "gmp-legend-item gmp-legend-dim",
1187
- children: [/* @__PURE__ */ W("span", {
1187
+ children: [/* @__PURE__ */ U("span", {
1188
1188
  className: "gmp-map-swatch gmp-map-swatch--edge",
1189
1189
  "aria-hidden": "true"
1190
1190
  }), " one area uses another"]
1191
1191
  }),
1192
- /* @__PURE__ */ W("span", {
1192
+ /* @__PURE__ */ U("span", {
1193
1193
  className: "gmp-legend-item gmp-map-legend-danger",
1194
1194
  children: "⚠ tangle — two areas that depend on each other"
1195
1195
  }),
1196
- /* @__PURE__ */ W("span", {
1196
+ /* @__PURE__ */ U("span", {
1197
1197
  className: "gmp-legend-item gmp-legend-dim",
1198
1198
  children: "double-click a folder to open its files"
1199
1199
  })
@@ -1202,26 +1202,26 @@ function on() {
1202
1202
  }
1203
1203
  //#endregion
1204
1204
  //#region src/ui/graph/timelineNavigation.js
1205
- function sn(e) {
1205
+ function Y(e) {
1206
1206
  return typeof e == "object" && !!e && !Array.isArray(e);
1207
1207
  }
1208
1208
  function X(e, t) {
1209
1209
  let n = Object.keys(e).sort();
1210
1210
  return n.length === t.length && t.slice().sort().every((e, t) => e === n[t]);
1211
1211
  }
1212
- function cn(e) {
1213
- return typeof e == "string" && e.length > 0;
1214
- }
1215
1212
  function ln(e) {
1216
- return e === null || cn(e);
1213
+ return typeof e == "string" && e.length > 0;
1217
1214
  }
1218
1215
  function un(e) {
1216
+ return e === null || ln(e);
1217
+ }
1218
+ function dn(e) {
1219
1219
  let t = !1;
1220
- if (sn(e) && typeof e.type == "string" && (e.type === "open-change" && X(e, ["type", "change"]) && sn(e.change) ? t = X(e.change, ["id", "branch"]) && cn(e.change.id) && ln(e.change.branch) : e.type === "open-session" && X(e, [
1220
+ if (Y(e) && typeof e.type == "string" && (e.type === "open-change" && X(e, ["type", "change"]) && Y(e.change) ? t = X(e.change, ["id", "branch"]) && ln(e.change.id) && un(e.change.branch) : e.type === "open-session" && X(e, [
1221
1221
  "type",
1222
1222
  "sessionId",
1223
1223
  "source"
1224
- ]) && cn(e.sessionId) && sn(e.source) ? e.source.kind === "commit" && X(e.source, ["kind", "commit"]) && sn(e.source.commit) ? t = X(e.source.commit, ["id", "branch"]) && cn(e.source.commit.id) && ln(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([
1224
+ ]) && ln(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"]) && ln(e.source.commit.id) && un(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([
1225
1225
  "Timeline navigation action rejected.",
1226
1226
  "What went wrong: the value is not an exact supported TimelineNavigationAction.",
1227
1227
  "Why it happened: an untyped caller supplied an unknown action, missing context, or extra fields.",
@@ -1233,37 +1233,37 @@ function un(e) {
1233
1233
  }
1234
1234
  //#endregion
1235
1235
  //#region src/ui/graph/ScentTag.jsx
1236
- function dn({ tag: e, hoverText: t, active: n = !1, onToggle: r, className: i = "", ...a }) {
1237
- if (!re.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 ${re.join(", ")}.`);
1236
+ function fn({ tag: e, hoverText: t, active: n = !1, onToggle: r, className: i = "", ...o }) {
1237
+ if (!m.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 ${m.join(", ")}.`);
1238
1238
  if (!r) {
1239
- let n = /* @__PURE__ */ W("span", {
1239
+ let n = /* @__PURE__ */ U("span", {
1240
1240
  className: `tlp-scent${i ? ` ${i}` : ""}`,
1241
1241
  tabIndex: t ? 0 : void 0,
1242
- ...a,
1242
+ ...o,
1243
1243
  children: e
1244
1244
  });
1245
- return t ? /* @__PURE__ */ W(o, {
1245
+ return t ? /* @__PURE__ */ U(a, {
1246
1246
  content: t,
1247
1247
  children: n
1248
1248
  }) : n;
1249
1249
  }
1250
- let s = /* @__PURE__ */ W("button", {
1250
+ let s = /* @__PURE__ */ U("button", {
1251
1251
  type: "button",
1252
1252
  className: `tlp-scent tlp-scent-filter${n ? " tlp-scent-filter-active" : ""}${i ? ` ${i}` : ""}`,
1253
1253
  "aria-pressed": n,
1254
1254
  onClick: () => r(n ? null : e),
1255
- ...a,
1255
+ ...o,
1256
1256
  children: e
1257
1257
  });
1258
- return t ? /* @__PURE__ */ W(o, {
1258
+ return t ? /* @__PURE__ */ U(a, {
1259
1259
  content: t,
1260
1260
  children: s
1261
1261
  }) : s;
1262
1262
  }
1263
1263
  //#endregion
1264
1264
  //#region src/ui/graph/RankedRow.jsx
1265
- function fn({ row: e, loc: t = 0, selected: n = !1, onSelect: r, className: i = "", ...a }) {
1266
- return /* @__PURE__ */ G("button", {
1265
+ function pn({ row: e, loc: t = 0, selected: n = !1, onSelect: r, className: i = "", ...a }) {
1266
+ return /* @__PURE__ */ W("button", {
1267
1267
  type: "button",
1268
1268
  className: [
1269
1269
  "tlp-ranked-row",
@@ -1274,9 +1274,9 @@ function fn({ row: e, loc: t = 0, selected: n = !1, onSelect: r, className: i =
1274
1274
  onClick: () => r?.(e.id),
1275
1275
  ...a,
1276
1276
  children: [
1277
- /* @__PURE__ */ W(ee, {
1277
+ /* @__PURE__ */ U(A, {
1278
1278
  className: "tlp-ranked-doi-scope",
1279
- children: /* @__PURE__ */ W(ye, {
1279
+ children: /* @__PURE__ */ U(we, {
1280
1280
  label: e.name,
1281
1281
  loc: t,
1282
1282
  recorded: Number(e.doi.toFixed(2)),
@@ -1286,20 +1286,20 @@ function fn({ row: e, loc: t = 0, selected: n = !1, onSelect: r, className: i =
1286
1286
  className: "tlp-ranked-doi"
1287
1287
  })
1288
1288
  }),
1289
- /* @__PURE__ */ W("span", {
1289
+ /* @__PURE__ */ U("span", {
1290
1290
  className: "tlp-ranked-name",
1291
1291
  title: e.name,
1292
1292
  children: e.name
1293
1293
  }),
1294
- /* @__PURE__ */ W("span", {
1294
+ /* @__PURE__ */ U("span", {
1295
1295
  className: "tlp-ranked-tags",
1296
1296
  "aria-label": "comprehension signals",
1297
- children: e.scentTags.map((t) => /* @__PURE__ */ W(dn, {
1297
+ children: e.scentTags.map((t) => /* @__PURE__ */ U(fn, {
1298
1298
  tag: t,
1299
1299
  hoverText: t.startsWith("agent wrote:") ? e.hoverText ?? void 0 : void 0
1300
1300
  }, t))
1301
1301
  }),
1302
- /* @__PURE__ */ W("span", {
1302
+ /* @__PURE__ */ U("span", {
1303
1303
  className: "tlp-ranked-doi-val tnum",
1304
1304
  "aria-hidden": "true",
1305
1305
  children: e.doi.toFixed(2)
@@ -1314,8 +1314,8 @@ var Z = [
1314
1314
  "debt",
1315
1315
  "churn"
1316
1316
  ];
1317
- function pn({ rankMode: e, onChange: t, className: n = "", ...r }) {
1318
- let i = H([]), a = (e) => {
1317
+ function mn({ rankMode: e, onChange: t, className: n = "", ...r }) {
1318
+ let i = V([]), a = (e) => {
1319
1319
  let n = Z[e];
1320
1320
  n && (t(n), i.current[e]?.focus());
1321
1321
  }, o = (e, t) => {
@@ -1339,12 +1339,12 @@ function pn({ rankMode: e, onChange: t, className: n = "", ...r }) {
1339
1339
  }
1340
1340
  e.preventDefault(), a(n);
1341
1341
  };
1342
- return /* @__PURE__ */ W("span", {
1342
+ return /* @__PURE__ */ U("span", {
1343
1343
  className: `tlp-rank-mode${n ? ` ${n}` : ""}`,
1344
1344
  role: "radiogroup",
1345
1345
  "aria-label": "rank mode",
1346
1346
  ...r,
1347
- children: Z.map((n, r) => /* @__PURE__ */ W("button", {
1347
+ children: Z.map((n, r) => /* @__PURE__ */ U("button", {
1348
1348
  type: "button",
1349
1349
  role: "radio",
1350
1350
  "aria-checked": e === n,
@@ -1361,8 +1361,8 @@ function pn({ rankMode: e, onChange: t, className: n = "", ...r }) {
1361
1361
  }
1362
1362
  //#endregion
1363
1363
  //#region src/ui/graph/InsightPanel.jsx
1364
- function mn({ insights: e, onOpenEvidence: t, className: n = "", ...r }) {
1365
- if (c(e), e.length === 0) return /* @__PURE__ */ W("p", {
1364
+ function hn({ insights: e, onOpenEvidence: t, className: n = "", ...r }) {
1365
+ if (f(e), e.length === 0) return /* @__PURE__ */ U("p", {
1366
1366
  className: `tlp-insight-empty${n ? ` ${n}` : ""}`,
1367
1367
  ...r,
1368
1368
  children: "no insights recorded for this node yet."
@@ -1372,35 +1372,35 @@ function mn({ insights: e, onOpenEvidence: t, className: n = "", ...r }) {
1372
1372
  let e = i.get(t.kind) ?? [];
1373
1373
  e.push(t), i.set(t.kind, e);
1374
1374
  }
1375
- return /* @__PURE__ */ W("div", {
1375
+ return /* @__PURE__ */ U("div", {
1376
1376
  className: `tlp-insight-panel${n ? ` ${n}` : ""}`,
1377
1377
  ...r,
1378
- children: [...i.entries()].map(([e, n]) => /* @__PURE__ */ G("section", {
1378
+ children: [...i.entries()].map(([e, n]) => /* @__PURE__ */ W("section", {
1379
1379
  className: "tlp-insight-group",
1380
- "aria-label": S[e],
1381
- children: [/* @__PURE__ */ W("p", {
1380
+ "aria-label": T[e],
1381
+ children: [/* @__PURE__ */ U("p", {
1382
1382
  className: "tlp-insight-group-title",
1383
- children: S[e]
1384
- }), /* @__PURE__ */ W("ul", {
1383
+ children: T[e]
1384
+ }), /* @__PURE__ */ U("ul", {
1385
1385
  className: "tlp-insight-list",
1386
- children: n.map((e, n) => /* @__PURE__ */ G("li", {
1386
+ children: n.map((e, n) => /* @__PURE__ */ W("li", {
1387
1387
  className: "tlp-insight-item",
1388
1388
  children: [
1389
- /* @__PURE__ */ W("span", {
1390
- className: `tlp-insight-provenance ${w[e.provenance].markerClass}`,
1389
+ /* @__PURE__ */ U("span", {
1390
+ className: `tlp-insight-provenance ${c[e.provenance].markerClass}`,
1391
1391
  "aria-hidden": "true"
1392
1392
  }),
1393
- /* @__PURE__ */ W("span", {
1393
+ /* @__PURE__ */ U("span", {
1394
1394
  className: "tlp-insight-title",
1395
1395
  children: e.title
1396
1396
  }),
1397
- e.summary && /* @__PURE__ */ W("span", {
1397
+ e.summary && /* @__PURE__ */ U("span", {
1398
1398
  className: "tlp-insight-summary",
1399
1399
  children: e.summary
1400
1400
  }),
1401
- /* @__PURE__ */ W("span", {
1401
+ /* @__PURE__ */ U("span", {
1402
1402
  className: "tlp-insight-evidence",
1403
- children: e.evidence.map((e, n) => /* @__PURE__ */ W("button", {
1403
+ children: e.evidence.map((e, n) => /* @__PURE__ */ U("button", {
1404
1404
  type: "button",
1405
1405
  className: "tlp-insight-evidence-link",
1406
1406
  onClick: () => t?.(e.sessionId),
@@ -1433,7 +1433,7 @@ var Q = Object.freeze({
1433
1433
  subagentSpawnColor: "var(--edge)",
1434
1434
  subagentReturnColor: "var(--edge)",
1435
1435
  errorColor: "var(--edge-error)"
1436
- }), hn = {
1436
+ }), gn = {
1437
1437
  planning: "var(--edge)",
1438
1438
  exploration: "var(--edge)",
1439
1439
  implementation: "var(--edge)",
@@ -1445,7 +1445,7 @@ var Q = Object.freeze({
1445
1445
  recovery: "var(--edge)",
1446
1446
  abandonment: "var(--edge)"
1447
1447
  };
1448
- function gn(e) {
1448
+ function _n(e) {
1449
1449
  let t = /* @__PURE__ */ new Map();
1450
1450
  for (let n of e) {
1451
1451
  let e = t.get(n.turnIndex) ?? [];
@@ -1453,13 +1453,13 @@ function gn(e) {
1453
1453
  }
1454
1454
  return t;
1455
1455
  }
1456
- function _n(e) {
1456
+ function vn(e) {
1457
1457
  let t = /* @__PURE__ */ new Map();
1458
1458
  for (let n of e) for (let e = n.startTurn; e <= n.endTurn; e++) t.set(e, n.type);
1459
1459
  return t;
1460
1460
  }
1461
- function vn({ turns: e, toolVMsByTurn: t, phases: n, annotations: r, searchMatches: i, filteredIndices: a, searchQuery: o, selectedTurns: s }) {
1462
- let c = gn(r), l = _n(n), u = new Set(i), d = [], f = [], p = 0, m = 0, h = null, g, _ = 0, v = !1;
1461
+ function yn({ turns: e, toolVMsByTurn: t, phases: n, annotations: r, searchMatches: i, filteredIndices: a, searchQuery: o, selectedTurns: s }) {
1462
+ let c = _n(r), l = vn(n), u = new Set(i), d = [], f = [], p = 0, m = 0, h = null, g, _ = 0, v = !1;
1463
1463
  for (let n = 0; n < e.length; n++) {
1464
1464
  let r = e[n], i = !!r.content?.trim(), y = (r.toolCalls?.length ?? 0) > 0;
1465
1465
  if (!i && !y || r.role === "system" && !y && (!r.content || r.content.trim().length < 8)) continue;
@@ -1526,7 +1526,7 @@ function vn({ turns: e, toolVMsByTurn: t, phases: n, annotations: r, searchMatch
1526
1526
  }
1527
1527
  if (h) {
1528
1528
  let e = x !== g && x !== void 0, t = b !== _, n = "sequential", r = $.sequentialColor, i = $.sequentialWidth, a;
1529
- 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 = hn[x] ?? $.sequentialColor, i = $.phaseTransitionWidth), S.some((e) => e.type === "error") && (n = "error", r = $.errorColor, i = 2);
1529
+ 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 = gn[x] ?? $.sequentialColor, i = $.phaseTransitionWidth), S.some((e) => e.type === "error") && (n = "error", r = $.errorColor, i = 2);
1530
1530
  let o = w || v;
1531
1531
  f.push({
1532
1532
  id: `e-${h}-${D}`,
@@ -1542,7 +1542,7 @@ function vn({ turns: e, toolVMsByTurn: t, phases: n, annotations: r, searchMatch
1542
1542
  },
1543
1543
  data: {
1544
1544
  edgeType: n,
1545
- phaseColor: x ? hn[x] : void 0
1545
+ phaseColor: x ? gn[x] : void 0
1546
1546
  }
1547
1547
  });
1548
1548
  }
@@ -1553,7 +1553,7 @@ function vn({ turns: e, toolVMsByTurn: t, phases: n, annotations: r, searchMatch
1553
1553
  edges: f
1554
1554
  };
1555
1555
  }
1556
- function yn(e) {
1556
+ function bn(e) {
1557
1557
  let t = /* @__PURE__ */ new Map();
1558
1558
  for (let n of e) {
1559
1559
  if (n.type !== "turn") continue;
@@ -1585,10 +1585,10 @@ function yn(e) {
1585
1585
  }
1586
1586
  //#endregion
1587
1587
  //#region src/ui/transcript/graph/engine/useCanvasSync.js
1588
- function bn(e, t, n) {
1589
- let r = At();
1588
+ function xn(e, t, n) {
1589
+ let r = Mt();
1590
1590
  return {
1591
- focusPhase: z((i) => {
1591
+ focusPhase: R((i) => {
1592
1592
  let a = e[i];
1593
1593
  if (!a) return;
1594
1594
  let o = /* @__PURE__ */ new Set();
@@ -1616,7 +1616,7 @@ function bn(e, t, n) {
1616
1616
  r,
1617
1617
  n
1618
1618
  ]),
1619
- focusTurn: z((e) => {
1619
+ focusTurn: R((e) => {
1620
1620
  let n = t[e]?.index ?? e, i = r.getNodes().find((e) => e.type === "turn" && e.data.turn.index === n);
1621
1621
  i && r.setCenter(i.position.x + Q.turnWidth / 2, i.position.y + Q.turnBaseHeight / 2, {
1622
1622
  zoom: 1,
@@ -1627,28 +1627,28 @@ function bn(e, t, n) {
1627
1627
  }
1628
1628
  //#endregion
1629
1629
  //#region src/ui/transcript/graph/engine/nodes/TurnCardNode.jsx
1630
- function xn(e, t) {
1630
+ function Sn(e, t) {
1631
1631
  if (!e) return "";
1632
1632
  let n = e.replace(/\s+/g, " ").trim();
1633
1633
  return n.length > t ? `${n.slice(0, t - 1)}…` : n;
1634
1634
  }
1635
- function Sn({ data: e, selected: t }) {
1635
+ function Cn({ data: e, selected: t }) {
1636
1636
  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");
1637
- return /* @__PURE__ */ G("div", {
1637
+ return /* @__PURE__ */ W("div", {
1638
1638
  "data-turn-index": n.index,
1639
1639
  "data-harness": u ? void 0 : n.role === "assistant" ? c : void 0,
1640
1640
  style: { width: Q.turnWidth },
1641
1641
  children: [
1642
- /* @__PURE__ */ W(q, {
1642
+ /* @__PURE__ */ U(K, {
1643
1643
  type: "target",
1644
- position: J.Top,
1644
+ position: q.Top,
1645
1645
  className: "tb-gnode-handle tb-gnode-handle-top"
1646
1646
  }),
1647
- /* @__PURE__ */ W(k, {
1647
+ /* @__PURE__ */ U(j, {
1648
1648
  role: n.role,
1649
1649
  agentName: u ? n.agentName : void 0,
1650
1650
  turnNumber: s,
1651
- contentPreview: xn(n.content, 160),
1651
+ contentPreview: Sn(n.content, 160),
1652
1652
  toolCount: n.toolCalls?.length ?? 0,
1653
1653
  totalTokens: (n.tokensIn ?? 0) + (n.tokensOut ?? 0),
1654
1654
  tokensIn: n.tokensIn ?? void 0,
@@ -1661,24 +1661,24 @@ function Sn({ data: e, selected: t }) {
1661
1661
  isSelected: t || o,
1662
1662
  provider: c
1663
1663
  }),
1664
- /* @__PURE__ */ W(q, {
1664
+ /* @__PURE__ */ U(K, {
1665
1665
  type: "source",
1666
- position: J.Bottom,
1666
+ position: q.Bottom,
1667
1667
  className: "tb-gnode-handle tb-gnode-handle-bottom"
1668
1668
  }),
1669
- /* @__PURE__ */ W(q, {
1669
+ /* @__PURE__ */ U(K, {
1670
1670
  type: "source",
1671
1671
  id: "tool-source",
1672
- position: J.Right,
1672
+ position: q.Right,
1673
1673
  className: "tb-gnode-handle tb-gnode-handle-right"
1674
1674
  })
1675
1675
  ]
1676
1676
  });
1677
1677
  }
1678
- var Cn = we(Sn);
1678
+ var wn = Ee(Cn);
1679
1679
  //#endregion
1680
1680
  //#region src/ui/transcript/graph/engine/nodes/ToolPillNode.jsx
1681
- function wn({ data: e }) {
1681
+ function Tn({ data: e }) {
1682
1682
  let { toolCalls: t, previewById: n, totalDurationMs: r, hasError: i, isFilteredOut: a } = e, o = t.map((e) => ({
1683
1683
  id: e.id,
1684
1684
  name: e.name,
@@ -1688,14 +1688,14 @@ function wn({ data: e }) {
1688
1688
  exitCode: e.exitCode ?? void 0,
1689
1689
  preview: n[e.id] ?? ""
1690
1690
  }));
1691
- return /* @__PURE__ */ G("div", {
1691
+ return /* @__PURE__ */ W("div", {
1692
1692
  style: { width: Q.toolCallWidth },
1693
- children: [/* @__PURE__ */ W(q, {
1693
+ children: [/* @__PURE__ */ U(K, {
1694
1694
  type: "target",
1695
1695
  id: "tool-target",
1696
- position: J.Left,
1696
+ position: q.Left,
1697
1697
  className: "tb-gnode-handle tb-gnode-handle-left"
1698
- }), /* @__PURE__ */ W(L, {
1698
+ }), /* @__PURE__ */ U(L, {
1699
1699
  tools: o,
1700
1700
  totalDurationMs: r,
1701
1701
  hasError: i,
@@ -1703,59 +1703,59 @@ function wn({ data: e }) {
1703
1703
  })]
1704
1704
  });
1705
1705
  }
1706
- var Tn = we(wn);
1706
+ var En = Ee(Tn);
1707
1707
  //#endregion
1708
1708
  //#region src/ui/transcript/graph/engine/nodes/SubagentBranchNode.jsx
1709
- function En({ data: e }) {
1709
+ function Dn({ data: e }) {
1710
1710
  let { agentName: t, depth: n } = e;
1711
- return /* @__PURE__ */ W(fe, {
1711
+ return /* @__PURE__ */ U(me, {
1712
1712
  agentName: t,
1713
1713
  depth: n
1714
1714
  });
1715
1715
  }
1716
- var Dn = we(En);
1716
+ var On = Ee(Dn);
1717
1717
  //#endregion
1718
1718
  //#region src/ui/transcript/graph/engine/GraphControls.jsx
1719
- function On({ className: e = "" }) {
1720
- let t = At();
1721
- return /* @__PURE__ */ G("div", {
1719
+ function kn({ className: e = "" }) {
1720
+ let t = Mt();
1721
+ return /* @__PURE__ */ W("div", {
1722
1722
  className: ["tb-graph-controls", e].filter(Boolean).join(" "),
1723
1723
  children: [
1724
- /* @__PURE__ */ W(kn, {
1724
+ /* @__PURE__ */ U(An, {
1725
1725
  label: "zoom in",
1726
1726
  onClick: () => t.zoomIn({ duration: 150 }),
1727
- children: /* @__PURE__ */ W(Ve, {
1727
+ children: /* @__PURE__ */ U(Ue, {
1728
1728
  size: 14,
1729
1729
  strokeWidth: 2
1730
1730
  })
1731
1731
  }),
1732
- /* @__PURE__ */ W(kn, {
1732
+ /* @__PURE__ */ U(An, {
1733
1733
  label: "zoom out",
1734
1734
  onClick: () => t.zoomOut({ duration: 150 }),
1735
- children: /* @__PURE__ */ W(Be, {
1735
+ children: /* @__PURE__ */ U(He, {
1736
1736
  size: 14,
1737
1737
  strokeWidth: 2
1738
1738
  })
1739
1739
  }),
1740
- /* @__PURE__ */ W(kn, {
1740
+ /* @__PURE__ */ U(An, {
1741
1741
  label: "fit view",
1742
1742
  onClick: () => t.fitView({
1743
1743
  padding: .1,
1744
1744
  duration: 250
1745
1745
  }),
1746
- children: /* @__PURE__ */ W(Re, {
1746
+ children: /* @__PURE__ */ U(Be, {
1747
1747
  size: 14,
1748
1748
  strokeWidth: 1.75
1749
1749
  })
1750
1750
  }),
1751
- /* @__PURE__ */ W(kn, {
1751
+ /* @__PURE__ */ U(An, {
1752
1752
  label: "reset",
1753
1753
  onClick: () => t.setViewport({
1754
1754
  x: 0,
1755
1755
  y: 0,
1756
1756
  zoom: 1
1757
1757
  }, { duration: 200 }),
1758
- children: /* @__PURE__ */ W(He, {
1758
+ children: /* @__PURE__ */ U(We, {
1759
1759
  size: 14,
1760
1760
  strokeWidth: 1.75
1761
1761
  })
@@ -1763,8 +1763,8 @@ function On({ className: e = "" }) {
1763
1763
  ]
1764
1764
  });
1765
1765
  }
1766
- function kn({ label: e, onClick: t, children: n }) {
1767
- return /* @__PURE__ */ W("button", {
1766
+ function An({ label: e, onClick: t, children: n }) {
1767
+ return /* @__PURE__ */ U("button", {
1768
1768
  type: "button",
1769
1769
  onClick: t,
1770
1770
  "aria-label": e,
@@ -1775,9 +1775,9 @@ function kn({ label: e, onClick: t, children: n }) {
1775
1775
  }
1776
1776
  //#endregion
1777
1777
  //#region src/ui/transcript/graph/engine/TrajectoryGraphLegend.jsx
1778
- function An({ provider: e, className: t = "" }) {
1779
- let n = e && xe(e).toLocaleLowerCase("en-US") || "agent";
1780
- return /* @__PURE__ */ W(ae, {
1778
+ function jn({ provider: e, className: t = "" }) {
1779
+ let n = e && S(e).toLocaleLowerCase("en-US") || "agent";
1780
+ return /* @__PURE__ */ U(le, {
1781
1781
  className: ["tb-graph-legend", t].filter(Boolean).join(" "),
1782
1782
  items: [
1783
1783
  {
@@ -1806,21 +1806,21 @@ function An({ provider: e, className: t = "" }) {
1806
1806
  }
1807
1807
  //#endregion
1808
1808
  //#region src/ui/transcript/graph/engine/TrajectoryGraph.jsx
1809
- var jn = {
1810
- turn: Cn,
1811
- toolCall: Tn,
1812
- subagentLane: Dn
1809
+ var Mn = {
1810
+ turn: wn,
1811
+ toolCall: En,
1812
+ subagentLane: On
1813
1813
  };
1814
- function Mn(e) {
1815
- return /* @__PURE__ */ W(Dt, { children: /* @__PURE__ */ W(Nn, { ...e }) });
1814
+ function Nn(e) {
1815
+ return /* @__PURE__ */ U(kt, { children: /* @__PURE__ */ U(Pn, { ...e }) });
1816
1816
  }
1817
- function Nn({ 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 = "" }) {
1818
- let h = At(), { focusTurn: g, focusPhase: _ } = bn(r, e, u), v = V(() => {
1817
+ function Pn({ 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 = "" }) {
1818
+ let h = Mt(), { focusTurn: g, focusPhase: _ } = xn(r, e, u), v = B(() => {
1819
1819
  if (n.length === e.length) return /* @__PURE__ */ new Set();
1820
1820
  let t = new Set(n), r = /* @__PURE__ */ new Set();
1821
1821
  for (let n = 0; n < e.length; n++) t.has(e[n]) && r.add(n);
1822
1822
  return r;
1823
- }, [e, n]), y = V(() => vn({
1823
+ }, [e, n]), y = B(() => yn({
1824
1824
  turns: e,
1825
1825
  toolVMsByTurn: t,
1826
1826
  phases: r,
@@ -1838,13 +1838,13 @@ function Nn({ turns: e, toolVMsByTurn: t, filteredTurns: n, phases: r, annotatio
1838
1838
  v,
1839
1839
  o,
1840
1840
  f
1841
- ]), b = V(() => y.nodes.map((e) => e.type === "turn" ? {
1841
+ ]), b = B(() => y.nodes.map((e) => e.type === "turn" ? {
1842
1842
  ...e,
1843
1843
  data: {
1844
1844
  ...e.data,
1845
1845
  provider: p
1846
1846
  }
1847
- } : e), [y.nodes, p]), x = V(() => yn(b), [b]), S = V(() => y.edges.map((e) => {
1847
+ } : e), [y.nodes, p]), x = B(() => bn(b), [b]), S = B(() => y.edges.map((e) => {
1848
1848
  let t = e.sourceHandle === "tool-source";
1849
1849
  return {
1850
1850
  ...e,
@@ -1857,8 +1857,8 @@ function Nn({ turns: e, toolVMsByTurn: t, filteredTurns: n, phases: r, annotatio
1857
1857
  },
1858
1858
  animated: t ? !1 : e.animated
1859
1859
  };
1860
- }), [y.edges]), C = V(() => [...x, ...b], [x, b]), [w, T, E] = kt(C), [D, O, k] = Ot(S), A = H(e.length), j = H(o), M = H(n.length);
1861
- B(() => {
1860
+ }), [y.edges]), C = B(() => [...x, ...b], [x, b]), [w, T, E] = jt(C), [D, O, k] = At(S), A = V(e.length), j = V(o), M = V(n.length);
1861
+ z(() => {
1862
1862
  (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);
1863
1863
  }, [
1864
1864
  C,
@@ -1868,7 +1868,7 @@ function Nn({ turns: e, toolVMsByTurn: t, filteredTurns: n, phases: r, annotatio
1868
1868
  n.length,
1869
1869
  T,
1870
1870
  O
1871
- ]), B(() => {
1871
+ ]), z(() => {
1872
1872
  if (s === void 0) return;
1873
1873
  let t = e[s]?.index;
1874
1874
  if (t === void 0) return;
@@ -1883,16 +1883,16 @@ function Nn({ turns: e, toolVMsByTurn: t, filteredTurns: n, phases: r, annotatio
1883
1883
  h,
1884
1884
  e
1885
1885
  ]);
1886
- let N = H(-1);
1887
- B(() => {
1886
+ let N = V(-1);
1887
+ z(() => {
1888
1888
  !c || c.seq === N.current || (N.current = c.seq, g(c.target));
1889
1889
  }, [c, g]);
1890
- let P = H(-1);
1891
- B(() => {
1890
+ let P = V(-1);
1891
+ z(() => {
1892
1892
  !l || l.seq === P.current || (P.current = l.seq, _(l.target));
1893
1893
  }, [l, _]);
1894
- let F = H(!1);
1895
- B(() => {
1894
+ let F = V(!1);
1895
+ z(() => {
1896
1896
  w.length > 0 && !F.current && (F.current = !0, setTimeout(() => {
1897
1897
  let e = w.find((e) => e.type === "turn");
1898
1898
  e ? h.setCenter(e.position.x + Q.turnWidth / 2, e.position.y + Q.turnBaseHeight, {
@@ -1908,13 +1908,13 @@ function Nn({ turns: e, toolVMsByTurn: t, filteredTurns: n, phases: r, annotatio
1908
1908
  h,
1909
1909
  w
1910
1910
  ]);
1911
- let I = z((e) => {
1911
+ let I = R((e) => {
1912
1912
  if (e.type === "turn") {
1913
1913
  let t = e.data;
1914
1914
  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)";
1915
1915
  }
1916
1916
  return e.type === "toolCall" ? "var(--ink-3)" : "var(--rule)";
1917
- }, []), ee = z((e, t) => {
1917
+ }, []), ee = R((e, t) => {
1918
1918
  if (t.type !== "turn") return;
1919
1919
  let n = t.data;
1920
1920
  d?.({
@@ -1922,22 +1922,22 @@ function Nn({ turns: e, toolVMsByTurn: t, filteredTurns: n, phases: r, annotatio
1922
1922
  end: n.turn.index
1923
1923
  });
1924
1924
  }, [d]);
1925
- return /* @__PURE__ */ W("div", {
1925
+ return /* @__PURE__ */ U("div", {
1926
1926
  className: [
1927
1927
  "tb-root",
1928
1928
  "tb-graph",
1929
1929
  m
1930
1930
  ].filter(Boolean).join(" "),
1931
- children: /* @__PURE__ */ G("div", {
1931
+ children: /* @__PURE__ */ W("div", {
1932
1932
  className: "tb-graph-flow",
1933
1933
  children: [
1934
- /* @__PURE__ */ G(Et, {
1934
+ /* @__PURE__ */ W(Ot, {
1935
1935
  nodes: w,
1936
1936
  edges: D,
1937
1937
  onNodesChange: E,
1938
1938
  onEdgesChange: k,
1939
1939
  onNodeClick: ee,
1940
- nodeTypes: jn,
1940
+ nodeTypes: Mn,
1941
1941
  fitView: !1,
1942
1942
  minZoom: .2,
1943
1943
  maxZoom: 2,
@@ -1953,12 +1953,12 @@ function Nn({ turns: e, toolVMsByTurn: t, filteredTurns: n, phases: r, annotatio
1953
1953
  panOnDrag: !0,
1954
1954
  panOnScroll: !0,
1955
1955
  zoomOnScroll: !0,
1956
- children: [/* @__PURE__ */ W(Ct, {
1957
- variant: wt.Dots,
1956
+ children: [/* @__PURE__ */ U(Tt, {
1957
+ variant: Et.Dots,
1958
1958
  gap: 20,
1959
1959
  size: 1,
1960
1960
  color: "var(--rule)"
1961
- }), /* @__PURE__ */ W(Tt, {
1961
+ }), /* @__PURE__ */ U(Dt, {
1962
1962
  zoomable: !0,
1963
1963
  pannable: !0,
1964
1964
  nodeColor: I,
@@ -1968,11 +1968,11 @@ function Nn({ turns: e, toolVMsByTurn: t, filteredTurns: n, phases: r, annotatio
1968
1968
  className: "tb-graph-minimap"
1969
1969
  })]
1970
1970
  }),
1971
- /* @__PURE__ */ W(On, {}),
1972
- /* @__PURE__ */ W(An, { provider: p })
1971
+ /* @__PURE__ */ U(kn, {}),
1972
+ /* @__PURE__ */ U(jn, { provider: p })
1973
1973
  ]
1974
1974
  })
1975
1975
  });
1976
1976
  }
1977
1977
  //#endregion
1978
- export { Xe as AllChangeBindings, Ze as AllDiffLineKinds, Qe as AllEdgeViolationKinds, $e as AllFileChangeStatuses, et as AllInsightKinds, tt as AllInsightProvenances, nt as AllMapNodeKinds, rt as AllReadAttributionStates, it as AllReadStateGrades, f as CHANGE_BINDINGS, I as CODE_MAP_STATE_VERSION, O as CODE_MAP_VIEWPORT_SCALE, x as COVERAGE_CAP, at as ChangeBinding, Gt as ChangeDetail, Lt as Changes, Jt as CodeMap, an as CodeMapComposition, $t as CodeMapNavigator, a as DEBT_VIEWED, de as DIFF_LINE_KINDS, i as DOI_WEIGHTS, on as DefaultMapLegend, ot as DiffLineKind, $ as EDGE_DEFAULTS, d as EDGE_VIOLATION_KINDS, st as EdgeViolationKind, E as FILE_CHANGE_STATUSES, ct as FileChangeStatus, se as GRAPH_APP_SECTIONS, ge as GRAPH_LEGEND_ITEMS, he as GhostCommitNode, A as GhostGroup, me as GraphAppShell, On as GraphControls, ae as GraphLegend, M as GraphSectionNav, fe as GraphSubagentBranch, L as GraphToolNode, k as GraphTurnNode, pe as HighlightEdge, lt as InsightKind, mn as InsightPanel, ut as InsightProvenance, P as LOCAL_APP_SECTIONS, T as MAP_NODE_KINDS, dt as MapNodeKind, Q as NODE_DIMENSIONS, g as RANK_CAP, ie as RANK_FLOOR, t as RECENCY_HALF_LIFE_DAYS, pn as RankModeControl, fn as RankedRow, ft as ReadAttributionState, pt as ReadStateGrade, re as SCENT_TAGS, dn as ScentTag, ce as SessionLane, ne as SessionOverflowDisclosure, Dn as SubagentBranchNode, Tn as ToolPillNode, oe as TouchedFileCluster, Mn as TrajectoryGraph, An as TrajectoryGraphLegend, Cn as TurnCardNode, D as assertChangeDetailPayloadEnums, v as assertChangeDiffPayloadEnums, e as assertCodeMapPayloadEnums, un as assertTimelineNavigationAction, Ft as buildChangesGraph, Yt as codeMapPayloadToMapData, ve as codeMapStatesEqual, yn as computeLaneHeaders, m as coverage, R as createCodeMapState, h as debt, _ as debtHoverText, s as debtState, j as deriveCodeMapView, u as deriveRankedRows, Se as deriveTimelineHighlight, p as gateRankedRows, Y as humanizeAge, y as hunkClears, mt as isChangeBinding, b as isCodeMapViewportScale, ht as isDiffLineKind, gt as isEdgeViolationKind, _t as isFileChangeStatus, vt as isInsightKind, yt as isInsightProvenance, bt as isMapNodeKind, xt as isReadAttributionState, St as isReadStateGrade, Ce as partialReadHoverText, n as rankMapNodes, C as rankMapNodesIntrinsic, r as reduceCodeMapState, be as resolveEscapeAction, l as scentTagsFor, vn as turnsToFlow, bn as useCanvasSync };
1978
+ export { Qe as AllChangeBindings, $e as AllDiffLineKinds, et as AllEdgeViolationKinds, tt as AllFileChangeStatuses, nt as AllInsightKinds, rt as AllInsightProvenances, it as AllMapNodeKinds, at as AllReadAttributionStates, ot as AllReadStateGrades, pe as CHANGE_BINDINGS, k as CODE_MAP_STATE_VERSION, be as CODE_MAP_VIEWPORT_SCALE, o as COVERAGE_CAP, st as ChangeBinding, qt as ChangeDetail, zt as Changes, Xt as CodeMap, sn as CodeMapComposition, tn as CodeMapNavigator, i as DEBT_VIEWED, d as DIFF_LINE_KINDS, g as DOI_WEIGHTS, cn as DefaultMapLegend, ct as DiffLineKind, $ as EDGE_DEFAULTS, D as EDGE_VIOLATION_KINDS, lt as EdgeViolationKind, E as FILE_CHANGE_STATUSES, ut as FileChangeStatus, ge as GRAPH_APP_SECTIONS, ve as GRAPH_LEGEND_ITEMS, F as GhostCommitNode, fe as GhostGroup, P as GraphAppShell, kn as GraphControls, le as GraphLegend, ae as GraphSectionNav, me as GraphSubagentBranch, L as GraphToolNode, j as GraphTurnNode, ne as HighlightEdge, dt as InsightKind, hn as InsightPanel, ft as InsightProvenance, ee as LOCAL_APP_SECTIONS, O as MAP_NODE_KINDS, pt as MapNodeKind, Q as NODE_DIMENSIONS, ie as RANK_CAP, t as RANK_FLOOR, re as RECENCY_HALF_LIFE_DAYS, mn as RankModeControl, pn as RankedRow, mt as ReadAttributionState, ht as ReadStateGrade, m as SCENT_TAGS, fn as ScentTag, _e as SessionLane, M as SessionOverflowDisclosure, On as SubagentBranchNode, En as ToolPillNode, he as TouchedFileCluster, Nn as TrajectoryGraph, jn as TrajectoryGraphLegend, wn as TurnCardNode, de as VillageObservations, v as assertChangeDetailPayloadEnums, e as assertChangeDiffPayloadEnums, I as assertCodeMapPayloadEnums, dn as assertTimelineNavigationAction, Lt as buildChangesGraph, Zt as codeMapPayloadToMapData, Ce as codeMapStatesEqual, bn as computeLaneHeaders, h as coverage, N as createCodeMapState, _ as debt, s as debtHoverText, u as debtState, Se as deriveCodeMapView, p as deriveRankedRows, b as deriveTimelineHighlight, y as gateRankedRows, J as humanizeAge, Te as hunkClears, gt as isChangeBinding, r as isCodeMapViewportScale, _t as isDiffLineKind, vt as isEdgeViolationKind, yt as isFileChangeStatus, bt as isInsightKind, xt as isInsightProvenance, St as isMapNodeKind, Ct as isReadAttributionState, wt as isReadStateGrade, n as partialReadHoverText, w as rankMapNodes, l as rankMapNodesIntrinsic, xe as reduceCodeMapState, x as resolveEscapeAction, C as scentTagsFor, yn as turnsToFlow, xn as useCanvasSync };