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