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