@tangle-network/sandbox-cli 0.21.64 → 0.21.66
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/README.md +32 -4
- package/SKILL.md +37 -5
- package/dist/graph-native-CS_TmaCK.mjs +1 -0
- package/dist/graph-viewer/Analytics-bWsqhurt.js +1001 -0
- package/dist/graph-viewer/{AnswerStrip-DhwqOyxI.js → AnswerStrip-COxV7gLW.js} +2 -2
- package/dist/graph-viewer/Checks-CQGmKcQ0.js +164 -0
- package/dist/graph-viewer/Conversations-DgCshBAf.js +627 -0
- package/dist/graph-viewer/{Files-DtZhf0ii.js → Files-CvIOGrAs.js} +81 -90
- package/dist/graph-viewer/LiveRun-DHmsr6F7.js +311 -0
- package/dist/graph-viewer/{Outputs-QET3nPPp.js → Outputs-rwBg_x36.js} +4 -4
- package/dist/graph-viewer/Overview-C150tkVa.js +194 -0
- package/dist/graph-viewer/{RunOverview-DJQDAMIx.js → RunOverview-CSqsunqf.js} +2 -2
- package/dist/graph-viewer/RunPage-F_prVwiV.js +286 -0
- package/dist/graph-viewer/Timeline-BFDywlmz.js +335 -0
- package/dist/graph-viewer/Today-BdDuqZGF.js +623 -0
- package/dist/graph-viewer/Topology-SAfGtd5u.js +238 -0
- package/dist/graph-viewer/Traces-BYqXaS_s.js +254 -0
- package/dist/graph-viewer/{WallPages-4d9QUZDq.js → WallPages-MM70VZrC.js} +48 -30
- package/dist/graph-viewer/agent-runtime.js +55 -55
- package/dist/graph-viewer/{data-BJmP7F1M.js → data-DTGmre1W.js} +31 -27
- package/dist/graph-viewer/harness-sessions.js +1 -1
- package/dist/graph-viewer/index.js +1357 -1392
- package/dist/graph-viewer/{lazy-pages-DM0cZM10.js → lazy-pages-BYuq_L_n.js} +9 -5
- package/dist/graph-viewer/{outputs-model-CGdvjkQh.js → outputs-model-CHTx8rMz.js} +2 -2
- package/dist/graph-viewer/{viewer/plain-words-CgvxtEOa.js → plain-words-BrMHl0On.js} +9 -4
- package/dist/graph-viewer/receipt.js +2 -2
- package/dist/graph-viewer/record-CsP_3NJS.js +612 -0
- package/dist/graph-viewer/record-part-CuT9Xw37.js +334 -0
- package/dist/graph-viewer/record.js +2 -336
- package/dist/graph-viewer/report-viewer.js +65 -65
- package/dist/graph-viewer/report.js +1 -1
- package/dist/graph-viewer/research-publication.js +1 -1
- package/dist/graph-viewer/{run-files-C1NgzM0l.js → run-files-BckQDdTD.js} +1 -1
- package/dist/graph-viewer/{run-receipt-Bvi4-KVM.js → run-receipt-Bt2iXJUy.js} +1 -0
- package/dist/graph-viewer/schemas/agent-workspace.play.v1.json +3 -0
- package/dist/graph-viewer/schemas/agent-workspace.plays.v1.json +2 -0
- package/dist/graph-viewer/schemas/agent-workspace.run.v1.json +1 -0
- package/dist/graph-viewer/styles.css +4559 -2385
- package/dist/graph-viewer/trace-spans.js +1 -1
- package/dist/graph-viewer/ui-xa5w5bEN.js +889 -0
- package/dist/graph-viewer/viewer/{AgentGraphCanvas-CMdOlSlh-4EervjeC.js → AgentGraphCanvas-B74GN1o6-BZEumF7-.js} +2610 -2707
- package/dist/graph-viewer/viewer/Analytics-E3XS570U.js +1002 -0
- package/dist/graph-viewer/viewer/{AnswerStrip-CGUyXuYH.js → AnswerStrip-B7xMU57A.js} +2 -2
- package/dist/graph-viewer/viewer/Checks-CJ5XSHbv.js +165 -0
- package/dist/graph-viewer/viewer/Conversations-AX8G7Qyl.js +904 -0
- package/dist/graph-viewer/viewer/Files-DxL1576V.js +630 -0
- package/dist/graph-viewer/viewer/LiveRun-B-BckyEj.js +820 -0
- package/dist/graph-viewer/viewer/{Outputs-CumGyjQo.js → Outputs-BoIpgfMv.js} +24 -23
- package/dist/graph-viewer/viewer/Overview-Dzg5XJgy.js +436 -0
- package/dist/graph-viewer/viewer/RunPage-NtevWXBs.js +285 -0
- package/dist/graph-viewer/viewer/{Scores-ZS16yk0n.js → Scores-Dgv4WePL.js} +3 -3
- package/dist/graph-viewer/viewer/Timeline-CzY3LVDu.js +335 -0
- package/dist/graph-viewer/viewer/Today-Bi9IIwuh.js +623 -0
- package/dist/graph-viewer/viewer/Topology-CzjqSFXH.js +239 -0
- package/dist/graph-viewer/viewer/Traces-CMX0H1VU.js +254 -0
- package/dist/graph-viewer/viewer/{WallPages-CzWpyIfp.js → WallPages-Clj4bORg.js} +50 -32
- package/dist/graph-viewer/viewer/addon-webgl-BSCscllv.js +4027 -0
- package/dist/graph-viewer/viewer/agent-record-BrP-ENHg.css +2 -0
- package/dist/graph-viewer/viewer/{bot-D6Nrej7Z.js → bot-BaQU59LG.js} +1 -1
- package/dist/graph-viewer/viewer/{chevron-right-D_5IKLxu.js → chevron-right-Xn05jYLT.js} +1 -1
- package/dist/graph-viewer/viewer/{createLucideIcon-yH0cxLMy.js → createLucideIcon-BSphcoOJ.js} +1 -1
- package/dist/graph-viewer/viewer/dashboard-D3JhmRhe-DSl0zhkw.js +371 -0
- package/dist/graph-viewer/viewer/{data-CkWfWr7i.js → data-CVHeKhrh.js} +144 -139
- package/dist/graph-viewer/viewer/dist-4_KJz8ZM.js +349 -0
- package/dist/graph-viewer/viewer/dist-Dy-wrdTt.js +1615 -0
- package/dist/graph-viewer/viewer/es2015-utW4DTOJ.js +3506 -0
- package/dist/graph-viewer/viewer/{final-output-kwY11u9X.js → final-output-BYT-g-9j.js} +1 -1
- package/dist/graph-viewer/viewer/flow-waterfall-model-DvrgPLGS-BdThSFH-.js +2696 -0
- package/dist/graph-viewer/viewer/git-branch-BzTbIcYL.js +28 -0
- package/dist/graph-viewer/viewer/{highlights-Btsi5OXl.js → highlights-DWeSCtiR.js} +4 -4
- package/dist/graph-viewer/viewer/jsx-runtime-DPT6sCLq.js +319 -0
- package/dist/graph-viewer/viewer/lazy-pages-ChiMJ8r_.js +803 -0
- package/dist/graph-viewer/viewer/{markdown-CX_sVrXB.js → markdown-lADwhD7y.js} +2324 -2608
- package/dist/graph-viewer/viewer/model-brand-bTcMjQtB-RSb7EbGB.js +476 -0
- package/dist/graph-viewer/viewer/{page-header-Brq611fd.js → page-header-QbUg8F8i.js} +12 -11
- package/dist/graph-viewer/{plain-words-CgvxtEOa.js → viewer/plain-words-BrMHl0On.js} +9 -4
- package/dist/graph-viewer/viewer/primitives-znfPK9NP-B6UO7uDr.js +346 -0
- package/dist/graph-viewer/viewer/react-DQ7E2Epi.js +4254 -0
- package/dist/graph-viewer/viewer/{react-dom-t1L4_-il.js → react-dom-BEusmvQH.js} +1 -1
- package/dist/graph-viewer/viewer/record-DZnT6SWN-H-ul3U3a.js +3523 -0
- package/dist/graph-viewer/viewer/record-W39D5MO-.js +1 -0
- package/dist/graph-viewer/viewer/record-part-CbweyYoV.js +335 -0
- package/dist/graph-viewer/viewer/{segmented-control-BaJmvTNd.js → segmented-control-Di1mbQlP.js} +27 -26
- package/dist/graph-viewer/viewer/{shiki-Qnby7Sh6.js → shiki-BfNNlmfZ.js} +15 -15
- package/dist/graph-viewer/viewer/status-meta-S0kV_RDp.js +273 -0
- package/dist/graph-viewer/viewer/{stream-tokenizer-CWtnjmRd.js → stream-tokenizer-B5wWaM3U.js} +12 -12
- package/dist/graph-viewer/viewer/{themes-1i1fzpRk.js → themes-DuRxHiga.js} +1 -1
- package/dist/graph-viewer/viewer/ui-Co03nZUX.js +889 -0
- package/dist/graph-viewer/viewer/utils-BuObIC0n.js +1815 -0
- package/dist/graph-viewer/viewer/workbench-E6_5q_oL.js +28351 -0
- package/dist/graph-viewer/viewer/workflows--mZpHYqo.js +3298 -0
- package/dist/graph-viewer/viewer/workspace-cKs9sGEO.js +2468 -0
- package/dist/graph-viewer/{workspace-model-Ewf17pTW.js → workspace-model-BkPl_J8E.js} +1 -1
- package/dist/graph-viewer/workspace-viewer.js +7452 -7489
- package/dist/graph-viewer/workspace.js +1 -1
- package/dist/index.mjs +27 -22
- package/package.json +14 -13
- package/dist/graph-viewer/Analytics-DFWW8Phh.js +0 -938
- package/dist/graph-viewer/Checks-qgqV4xgV.js +0 -155
- package/dist/graph-viewer/Conversations-CGB45kpj.js +0 -545
- package/dist/graph-viewer/LiveRun-C21wUKAY.js +0 -210
- package/dist/graph-viewer/Overview-BjeLsA2I.js +0 -506
- package/dist/graph-viewer/RunPage-CkkcBEUe.js +0 -258
- package/dist/graph-viewer/Timeline-C2Xolk0t.js +0 -293
- package/dist/graph-viewer/Today-BVVDtSVN.js +0 -660
- package/dist/graph-viewer/Topology-DO5XX8e4.js +0 -545
- package/dist/graph-viewer/Traces-BhMxjNgw.js +0 -259
- package/dist/graph-viewer/part-events-BrLrg_EV.js +0 -276
- package/dist/graph-viewer/record-part-CZal_IMH.js +0 -1408
- package/dist/graph-viewer/ui-D8QZRsC3.js +0 -938
- package/dist/graph-viewer/viewer/Analytics-DD__nbLm.js +0 -939
- package/dist/graph-viewer/viewer/Checks-Ds5M7eAW.js +0 -156
- package/dist/graph-viewer/viewer/Conversations-C1n0EBBd.js +0 -819
- package/dist/graph-viewer/viewer/Files-Cjr7NMU_.js +0 -448
- package/dist/graph-viewer/viewer/LiveRun-uPTkPSjo.js +0 -6772
- package/dist/graph-viewer/viewer/Overview-4Umk14_2.js +0 -507
- package/dist/graph-viewer/viewer/RunPage-DZlBW7Va.js +0 -257
- package/dist/graph-viewer/viewer/Timeline-BnK6-yBR.js +0 -294
- package/dist/graph-viewer/viewer/Today-a_-oNigi.js +0 -660
- package/dist/graph-viewer/viewer/Topology-CQPCLQT6.js +0 -546
- package/dist/graph-viewer/viewer/Traces-C0IGk0L4.js +0 -259
- package/dist/graph-viewer/viewer/WorkflowGraph-DZ3xejKE-jRXKeSrg.js +0 -1559
- package/dist/graph-viewer/viewer/agent-record-Dw772ROs.css +0 -2
- package/dist/graph-viewer/viewer/agent-timeline-Cs9Qbpvo.js +0 -1798
- package/dist/graph-viewer/viewer/dist-C1-7EfoW.js +0 -488
- package/dist/graph-viewer/viewer/file-text-m7a3piQF.js +0 -47
- package/dist/graph-viewer/viewer/jsx-runtime-DQWyJOhv.js +0 -2136
- package/dist/graph-viewer/viewer/lazy-pages-BowaGsg-.js +0 -20
- package/dist/graph-viewer/viewer/model-brand-bTcMjQtB-fagiBQam.js +0 -723
- package/dist/graph-viewer/viewer/popover-CvOAjlnk.js +0 -5329
- package/dist/graph-viewer/viewer/react-CY3IbSNO.js +0 -4262
- package/dist/graph-viewer/viewer/record-part-D3_Anfpe.js +0 -1329
- package/dist/graph-viewer/viewer/terminal-83J_I4Ne.js +0 -52
- package/dist/graph-viewer/viewer/ui-C9b1rIUH.js +0 -938
- package/dist/graph-viewer/viewer/workspace-CekmOBs3.js +0 -25100
- package/dist/graph-viewer/viewer/x-DOc2URqZ.js +0 -56
|
@@ -1,938 +0,0 @@
|
|
|
1
|
-
import { i as e } from "./rolldown-runtime-DArdT4gl.js";
|
|
2
|
-
import { i as t, t as n } from "./jsx-runtime-DQWyJOhv.js";
|
|
3
|
-
import { t as r } from "./react-dom-t1L4_-il.js";
|
|
4
|
-
//#region src/workspace/run/model.ts
|
|
5
|
-
var i = /* @__PURE__ */ e(t(), 1), a = /* @__PURE__ */ e(r(), 1), o = (e) => e === "ok" || e === "done", s = (e) => e ? Date.parse(e) : NaN;
|
|
6
|
-
function c(e, t) {
|
|
7
|
-
if (!e.length) return null;
|
|
8
|
-
let n = [...e].sort((e, t) => e - t);
|
|
9
|
-
return n[Math.min(n.length - 1, Math.max(0, Math.ceil(t / 100 * n.length) - 1))];
|
|
10
|
-
}
|
|
11
|
-
function l(e, t, n, r) {
|
|
12
|
-
return {
|
|
13
|
-
name: e,
|
|
14
|
-
calls: t.length,
|
|
15
|
-
failures: n,
|
|
16
|
-
ms: r,
|
|
17
|
-
durations: t,
|
|
18
|
-
p50: c(t, 50),
|
|
19
|
-
p90: c(t, 90),
|
|
20
|
-
p99: c(t, 99)
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
var u = (e) => e ? e.split("/").pop() ?? e : null, d = (e) => {
|
|
24
|
-
let t = e.name ?? "", n = t.indexOf(" · ");
|
|
25
|
-
return n >= 0 ? t.slice(n + 3) : null;
|
|
26
|
-
};
|
|
27
|
-
function f(e, t, n) {
|
|
28
|
-
return e.status === "running" || t && e.status === "waiting" ? {
|
|
29
|
-
label: e.status === "waiting" ? "Waiting" : "Running",
|
|
30
|
-
tone: "live"
|
|
31
|
-
} : e.shipped ? {
|
|
32
|
-
label: "Shipped",
|
|
33
|
-
tone: "ok"
|
|
34
|
-
} : e.status === "succeeded" ? {
|
|
35
|
-
label: "Done",
|
|
36
|
-
tone: "done"
|
|
37
|
-
} : e.status === "failed" ? {
|
|
38
|
-
label: "Failed",
|
|
39
|
-
tone: "fail"
|
|
40
|
-
} : !n && (!e.start || !e.usage) ? {
|
|
41
|
-
label: "Never ran",
|
|
42
|
-
tone: "none"
|
|
43
|
-
} : {
|
|
44
|
-
label: e.status === "idle" ? "Idle" : "Stopped",
|
|
45
|
-
tone: ""
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
function p(e, t) {
|
|
49
|
-
let n = e.nodes, r = new Map(e.edges.filter((e) => e.kind === "spawn").map((e) => [e.to, e.from])), i = new Set(n.map((e) => e.id)), a = n.map((e) => s(e.start)).filter(Number.isFinite), o = Number.isFinite(s(t.startedAt)) ? s(t.startedAt) : a.length ? Math.min(...a) : Date.now(), p = n.map((e) => s(e.end ?? e.lastAt)).filter(Number.isFinite), m = e.live ? Math.max(0, Date.now() - o) : t.durationMs ?? Math.max(0, (p.length ? Math.max(...p) : o) - o), h = (e) => {
|
|
50
|
-
let t = r.get(e.id);
|
|
51
|
-
if (t && i.has(t)) return t;
|
|
52
|
-
let n = e.id.lastIndexOf(":"), a = n > 0 ? e.id.slice(0, n) : null;
|
|
53
|
-
return a && i.has(a) ? a : null;
|
|
54
|
-
}, g = n.map((t) => {
|
|
55
|
-
let n = t.usage ?? null, r = (n?.steps ?? []).map((e) => ({
|
|
56
|
-
t: e.startMs - o,
|
|
57
|
-
d: Math.max(0, e.endMs - e.startMs),
|
|
58
|
-
kind: e.kind,
|
|
59
|
-
failed: !!e.failed,
|
|
60
|
-
tool: e.kind === "tool" ? e.tool ?? e.name?.split(" · ")[0] ?? "tool" : null,
|
|
61
|
-
target: e.kind === "tool" ? d(e) : null,
|
|
62
|
-
model: e.model ?? null,
|
|
63
|
-
latency: e.kind === "model" ? e.latencyMs ?? Math.max(0, e.endMs - e.startMs) : null,
|
|
64
|
-
tokens: e.byClass ? {
|
|
65
|
-
input: e.byClass.input ?? 0,
|
|
66
|
-
output: e.byClass.output ?? 0,
|
|
67
|
-
cacheRead: e.byClass.cacheRead ?? 0
|
|
68
|
-
} : null,
|
|
69
|
-
usd: e.billedUsd ?? null
|
|
70
|
-
}));
|
|
71
|
-
r.sort((e, t) => e.t - t.t);
|
|
72
|
-
let i = r.filter((e) => e.kind === "model"), a = /* @__PURE__ */ new Map();
|
|
73
|
-
for (let e of r) {
|
|
74
|
-
if (e.kind !== "tool" || !e.tool) continue;
|
|
75
|
-
let t = a.get(e.tool) ?? {
|
|
76
|
-
d: [],
|
|
77
|
-
f: 0,
|
|
78
|
-
ms: 0
|
|
79
|
-
};
|
|
80
|
-
t.d.push(e.d), t.f += +!!e.failed, t.ms += e.d, a.set(e.tool, t);
|
|
81
|
-
}
|
|
82
|
-
let p = a.size ? [...a].map(([e, t]) => l(e, t.d, t.f, t.ms)) : Object.entries(n?.tools ?? {}).map(([e, t]) => ({
|
|
83
|
-
...l(e, [], t.failures, t.ms),
|
|
84
|
-
calls: t.calls
|
|
85
|
-
}));
|
|
86
|
-
p.sort((e, t) => t.calls - e.calls || e.name.localeCompare(t.name));
|
|
87
|
-
let m = i.map((e) => e.latency).filter((e) => Number.isFinite(e)), g = r.map((e) => e.t + e.d), _ = Number.isFinite(s(t.start)) ? s(t.start) - o : r[0]?.t ?? null, v = Number.isFinite(s(t.end)) ? s(t.end) - o : g.length ? Math.max(...g) : null, y = a.size ? r.filter((e) => e.kind === "tool").length : p.reduce((e, t) => e + t.calls, 0);
|
|
88
|
-
return {
|
|
89
|
-
id: t.id,
|
|
90
|
-
name: t.role ?? t.label,
|
|
91
|
-
short: t.role ?? t.label,
|
|
92
|
-
node: t,
|
|
93
|
-
parent: h(t),
|
|
94
|
-
children: [],
|
|
95
|
-
depth: 0,
|
|
96
|
-
team: null,
|
|
97
|
-
status: t.status,
|
|
98
|
-
state: f(t, e.live, r.length),
|
|
99
|
-
model: u(t.model ?? Object.keys(n?.models ?? {})[0]),
|
|
100
|
-
harness: t.harness,
|
|
101
|
-
start: _,
|
|
102
|
-
end: v,
|
|
103
|
-
tokens: n?.tokens ?? null,
|
|
104
|
-
byClass: n?.byClass ?? null,
|
|
105
|
-
billedUsd: n?.billedUsd ?? null,
|
|
106
|
-
listUsd: n?.listUsd ?? null,
|
|
107
|
-
steps: r,
|
|
108
|
-
modelCalls: i.length || n?.calls || 0,
|
|
109
|
-
toolCalls: y,
|
|
110
|
-
failedSteps: r.length ? r.filter((e) => e.failed).length : (n?.failures?.model ?? 0) + (n?.failures?.tool ?? 0),
|
|
111
|
-
toolFailures: r.length ? r.filter((e) => e.kind === "tool" && e.failed).length : n?.failures?.tool ?? 0,
|
|
112
|
-
retries: (n?.retries?.model ?? 0) + (n?.retries?.tool ?? 0),
|
|
113
|
-
latency: m.length ? {
|
|
114
|
-
p50: c(m, 50),
|
|
115
|
-
p90: c(m, 90),
|
|
116
|
-
p99: c(m, 99)
|
|
117
|
-
} : {
|
|
118
|
-
p50: n?.latencyMs?.p50 ?? null,
|
|
119
|
-
p90: n?.latencyMs?.p90 ?? null,
|
|
120
|
-
p99: n?.latencyMs?.max ?? null
|
|
121
|
-
},
|
|
122
|
-
tools: p,
|
|
123
|
-
busy: r.filter((e) => e.kind !== "waiting").reduce((e, t) => e + t.d, 0),
|
|
124
|
-
first: r.length ? r[0].t : null,
|
|
125
|
-
last: g.length ? Math.max(...g) : null,
|
|
126
|
-
restarts: (t.restarts ?? []).map((e) => s(e) - o).filter(Number.isFinite),
|
|
127
|
-
turns: t.turns ?? null,
|
|
128
|
-
commits: typeof t.shipped == "number" ? t.shipped : null
|
|
129
|
-
};
|
|
130
|
-
}), _ = new Map(g.map((e) => [e.id, e]));
|
|
131
|
-
for (let e of g) e.parent && _.get(e.parent)?.children.push(e.id);
|
|
132
|
-
let v = (e) => _.get(e)?.start ?? 2 ** 53 - 1;
|
|
133
|
-
for (let e of g) e.children.sort((e, t) => v(e) - v(t));
|
|
134
|
-
let y = g.find((e) => !e.parent) ?? null, b = [], x = /* @__PURE__ */ new Set(), S = (e, t) => {
|
|
135
|
-
if (!x.has(e.id)) {
|
|
136
|
-
x.add(e.id), e.depth = t, b.push(e);
|
|
137
|
-
for (let n of e.children) S(_.get(n), t + 1);
|
|
138
|
-
}
|
|
139
|
-
};
|
|
140
|
-
for (let e of g.filter((e) => !e.parent).sort((e, t) => (e.start ?? 0) - (t.start ?? 0))) S(e, 0);
|
|
141
|
-
for (let e of g) x.has(e.id) || S(e, 0);
|
|
142
|
-
let C = /* @__PURE__ */ new Map();
|
|
143
|
-
for (let e of g) for (let t = e.name.indexOf("-"); t > 0; t = e.name.indexOf("-", t + 1)) C.set(e.name.slice(0, t + 1), (C.get(e.name.slice(0, t + 1)) ?? 0) + 1);
|
|
144
|
-
let w = [...C].filter(([, e]) => e >= 3 && e * 2 >= g.length).sort((e, t) => t[0].length - e[0].length)[0]?.[0] ?? "";
|
|
145
|
-
for (let e of g) e.short = w && e.name.startsWith(w) && e.name.length > w.length ? e.name.slice(w.length) : e.name;
|
|
146
|
-
let T = g.filter((e) => e.children.length > 8).map((e) => ({
|
|
147
|
-
id: e.id,
|
|
148
|
-
label: `${e.name} team`,
|
|
149
|
-
members: e.children
|
|
150
|
-
}));
|
|
151
|
-
for (let e of T) for (let t of e.members) _.get(t).team = e.id;
|
|
152
|
-
for (let e of T) _.get(e.id).team ??= e.id;
|
|
153
|
-
let E = g.flatMap((e) => e.steps.map((t) => ({
|
|
154
|
-
agent: e,
|
|
155
|
-
step: t
|
|
156
|
-
}))).sort((e, t) => e.step.t - t.step.t), D = /* @__PURE__ */ new Map();
|
|
157
|
-
for (let { step: e } of E) {
|
|
158
|
-
if (e.kind !== "tool" || !e.tool) continue;
|
|
159
|
-
let t = D.get(e.tool) ?? {
|
|
160
|
-
d: [],
|
|
161
|
-
f: 0,
|
|
162
|
-
ms: 0
|
|
163
|
-
};
|
|
164
|
-
t.d.push(e.d), t.f += +!!e.failed, t.ms += e.d, D.set(e.tool, t);
|
|
165
|
-
}
|
|
166
|
-
let O = [...D].map(([e, t]) => l(e, t.d, t.f, t.ms)).sort((e, t) => t.calls - e.calls), k = e.runUsage ?? null, A = (e) => g.some((t) => e(t) !== null) ? g.reduce((t, n) => t + (e(n) ?? 0), 0) : null, j = E.map(({ step: e }) => e.t + e.d), M = e.releases.map((e) => ({
|
|
167
|
-
...e,
|
|
168
|
-
tagged: !!e.taggedAt,
|
|
169
|
-
taggedAt: e.taggedAt ?? e.at ?? null
|
|
170
|
-
}));
|
|
171
|
-
return {
|
|
172
|
-
t0: o,
|
|
173
|
-
duration: m,
|
|
174
|
-
live: e.live,
|
|
175
|
-
agents: g,
|
|
176
|
-
byId: _,
|
|
177
|
-
root: y,
|
|
178
|
-
tree: b,
|
|
179
|
-
teams: T,
|
|
180
|
-
tools: O,
|
|
181
|
-
steps: E,
|
|
182
|
-
totals: {
|
|
183
|
-
steps: E.length,
|
|
184
|
-
model: E.filter((e) => e.step.kind === "model").length,
|
|
185
|
-
tool: E.filter((e) => e.step.kind === "tool").length,
|
|
186
|
-
failed: E.filter((e) => e.step.failed).length,
|
|
187
|
-
toolFailures: E.filter((e) => e.step.kind === "tool" && e.step.failed).length,
|
|
188
|
-
retries: (k?.retries?.model ?? 0) + (k?.retries?.tool ?? 0),
|
|
189
|
-
tokens: k?.tokens ?? A((e) => e.tokens),
|
|
190
|
-
byClass: k?.byClass ?? null,
|
|
191
|
-
billedUsd: k?.billedUsd ?? A((e) => e.billedUsd),
|
|
192
|
-
listUsd: k?.listUsd ?? null,
|
|
193
|
-
busy: g.reduce((e, t) => e + t.busy, 0),
|
|
194
|
-
lastStep: j.length ? Math.max(...j) : null
|
|
195
|
-
},
|
|
196
|
-
pauses: (e.pauses ?? []).map((e) => ({
|
|
197
|
-
from: s(e.from) - o,
|
|
198
|
-
to: s(e.to) - o,
|
|
199
|
-
reason: e.reason
|
|
200
|
-
})).filter((e) => Number.isFinite(e.from) && Number.isFinite(e.to)),
|
|
201
|
-
releases: M,
|
|
202
|
-
best: M.find((t) => t.release === e.best) ?? null,
|
|
203
|
-
ws: e
|
|
204
|
-
};
|
|
205
|
-
}
|
|
206
|
-
function m(e) {
|
|
207
|
-
let t = /* @__PURE__ */ new Map();
|
|
208
|
-
for (let n of e) for (let e of n.tools) {
|
|
209
|
-
let n = t.get(e.name) ?? {
|
|
210
|
-
d: [],
|
|
211
|
-
f: 0,
|
|
212
|
-
ms: 0,
|
|
213
|
-
calls: 0
|
|
214
|
-
};
|
|
215
|
-
n.d.push(...e.durations), n.f += e.failures, n.ms += e.ms, n.calls += e.calls, t.set(e.name, n);
|
|
216
|
-
}
|
|
217
|
-
return [...t].map(([e, t]) => ({
|
|
218
|
-
...l(e, t.d, t.f, t.ms),
|
|
219
|
-
calls: t.calls
|
|
220
|
-
})).sort((e, t) => t.calls - e.calls);
|
|
221
|
-
}
|
|
222
|
-
var h = (e) => String(e).padStart(2, "0"), g = (e) => (t) => {
|
|
223
|
-
let n = new Date(e + t);
|
|
224
|
-
return `${h(n.getUTCHours())}:${h(n.getUTCMinutes())}`;
|
|
225
|
-
}, _ = (e) => (t) => {
|
|
226
|
-
let n = new Date(e + t);
|
|
227
|
-
return `${h(n.getUTCHours())}:${h(n.getUTCMinutes())}:${h(n.getUTCSeconds())}`;
|
|
228
|
-
}, v = (e, t, n = `${t}s`) => `${e.toLocaleString("en-US")} ${e === 1 ? t : n}`, y = (e, t, n) => {
|
|
229
|
-
let r = g(e);
|
|
230
|
-
return n === "now" ? `${r(t)}–now` : new Date(e + t).toISOString().slice(0, 10) === new Date(e + n).toISOString().slice(0, 10) ? `${r(t)}–${r(n)}` : `${r(t)}, ${x(n - t)}`;
|
|
231
|
-
}, b = (e, t) => `${t ? `${new Date(e).toLocaleDateString("en-US", {
|
|
232
|
-
month: "short",
|
|
233
|
-
day: "numeric",
|
|
234
|
-
timeZone: "UTC"
|
|
235
|
-
})} ` : ""}${e.slice(11, 16)} UTC`;
|
|
236
|
-
function x(e) {
|
|
237
|
-
if (e == null || !Number.isFinite(e)) return "—";
|
|
238
|
-
if (e < 1e3) return `${Math.round(e)} ms`;
|
|
239
|
-
if (e < 59500) return `${(e / 1e3).toFixed(+(e < 9950))} s`;
|
|
240
|
-
if (e < 36e5) {
|
|
241
|
-
let t = Math.round(e / 1e3);
|
|
242
|
-
if (t < 3600) return t % 60 ? `${Math.floor(t / 60)}m ${h(t % 60)}s` : `${t / 60} min`;
|
|
243
|
-
}
|
|
244
|
-
let t = Math.round(e / 6e4);
|
|
245
|
-
return `${Math.floor(t / 60)}h ${h(t % 60)}m`;
|
|
246
|
-
}
|
|
247
|
-
function S(e) {
|
|
248
|
-
if (e == null || !Number.isFinite(e)) return "—";
|
|
249
|
-
if (e < 1e3) return `${Math.round(e)}ms`;
|
|
250
|
-
if (e < 59500) return `${(e / 1e3).toFixed(+(e < 9950))}s`;
|
|
251
|
-
let t = Math.round(e / 1e3);
|
|
252
|
-
return t < 3600 ? `${Math.floor(t / 60)}m${h(t % 60)}s` : x(e);
|
|
253
|
-
}
|
|
254
|
-
var C = (e) => e == null ? "—" : e.toLocaleString("en-US"), w = (e) => e == null ? "—" : new Intl.NumberFormat("en-US", {
|
|
255
|
-
notation: "compact",
|
|
256
|
-
maximumFractionDigits: e >= 1e8 ? 0 : e >= 1e6 ? 2 : 1
|
|
257
|
-
}).format(e), T = (e) => e == null ? "—" : e >= 100 ? `$${e.toFixed(0)}` : `$${e.toFixed(2)}`, E = (e) => e.length < 2 ? e.join("") : `${e.slice(0, -1).join(", ")} and ${e.at(-1)}`;
|
|
258
|
-
function D(e) {
|
|
259
|
-
let t = e?.latest;
|
|
260
|
-
if (!t) return {
|
|
261
|
-
word: "Not checked",
|
|
262
|
-
tone: "none",
|
|
263
|
-
note: null
|
|
264
|
-
};
|
|
265
|
-
if (t.solved) return {
|
|
266
|
-
word: "Passed",
|
|
267
|
-
tone: "ok",
|
|
268
|
-
note: t.tag ? `${t.tag} passed the check` : null
|
|
269
|
-
};
|
|
270
|
-
if (e?.held && (!e.held.tag || e.held.tag === t.tag)) {
|
|
271
|
-
let n = e.calibration?.uncalibrated ?? e.calibration?.stages?.filter((e) => e.state !== "calibrated").map((e) => e.name) ?? [];
|
|
272
|
-
return {
|
|
273
|
-
word: "Held",
|
|
274
|
-
tone: "held",
|
|
275
|
-
note: `${t.tag ? `${t.tag} passed; it` : "It"} counts once ${n.length ? `${E(n)} ${n.length === 1 ? "has" : "have"} a known-good fixture` : "its checker is calibrated"}`
|
|
276
|
-
};
|
|
277
|
-
}
|
|
278
|
-
return t.known ? {
|
|
279
|
-
word: "Not solved",
|
|
280
|
-
tone: "fail",
|
|
281
|
-
note: null
|
|
282
|
-
} : {
|
|
283
|
-
word: "No verdict",
|
|
284
|
-
tone: "none",
|
|
285
|
-
note: null
|
|
286
|
-
};
|
|
287
|
-
}
|
|
288
|
-
//#endregion
|
|
289
|
-
//#region src/workspace/run/ui.tsx
|
|
290
|
-
var O = n(), k = {
|
|
291
|
-
search: "M11 11l3.5 3.5M7 12.5a5.5 5.5 0 1 0 0-11 5.5 5.5 0 0 0 0 11z",
|
|
292
|
-
chevron: "M4 6l4 4 4-4",
|
|
293
|
-
arrow: "M3 8h10M9 4l4 4-4 4",
|
|
294
|
-
x: "M4 4l8 8M12 4l-8 8",
|
|
295
|
-
stop: "M8 14.5a6.5 6.5 0 1 0 0-13 6.5 6.5 0 0 0 0 13zM3.5 12.5l9-9",
|
|
296
|
-
download: "M8 2v8M4.5 6.5L8 10l3.5-3.5M2.5 13.5h11",
|
|
297
|
-
link: "M6.5 9.5l3-3M7 4.5l1-1a2.8 2.8 0 0 1 4 4l-1 1M9 11.5l-1 1a2.8 2.8 0 0 1-4-4l1-1",
|
|
298
|
-
info: "M8 14.5a6.5 6.5 0 1 0 0-13 6.5 6.5 0 0 0 0 13zM8 7.2v4M8 4.8v.2",
|
|
299
|
-
max: "M9.5 2.5h4v4M6.5 13.5h-4v-4M13.5 2.5L9 7M2.5 13.5L7 9",
|
|
300
|
-
min: "M13.5 6.5h-4v-4M2.5 9.5h4v4M9.5 6.5l4-4M6.5 9.5l-4 4",
|
|
301
|
-
more: "M3.5 8h.01M8 8h.01M12.5 8h.01",
|
|
302
|
-
users: "M6 7a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5zM1.5 14c0-2.5 2-4.5 4.5-4.5s4.5 2 4.5 4.5M11 2.2a2.5 2.5 0 0 1 0 4.6M12.5 9.7c1.2.6 2 1.9 2 3.3",
|
|
303
|
-
alert: "M8 1.8l6.5 11.5h-13zM8 6v3.5M8 11.4v.2",
|
|
304
|
-
check: "M3 8.5l3 3 7-7",
|
|
305
|
-
clock: "M8 14.5a6.5 6.5 0 1 0 0-13 6.5 6.5 0 0 0 0 13zM8 4.5V8l2.5 1.5",
|
|
306
|
-
flag: "M3 14.5V2M3 2.5h8l-1.5 3 1.5 3H3",
|
|
307
|
-
down: "M8 2.5v11M3.5 9L8 13.5 12.5 9",
|
|
308
|
-
file: "M9.5 1.8h-5a1.5 1.5 0 0 0-1.5 1.5v9.4a1.5 1.5 0 0 0 1.5 1.5h7a1.5 1.5 0 0 0 1.5-1.5V5.3zM9.5 1.8v3.5H13M5.5 8.5h5M5.5 11h3.5"
|
|
309
|
-
};
|
|
310
|
-
function A({ name: e, size: t = 16, className: n }) {
|
|
311
|
-
return /* @__PURE__ */ (0, O.jsx)("svg", {
|
|
312
|
-
className: `rp-i${n ? ` ${n}` : ""}`,
|
|
313
|
-
width: t,
|
|
314
|
-
height: t,
|
|
315
|
-
viewBox: "0 0 16 16",
|
|
316
|
-
"aria-hidden": "true",
|
|
317
|
-
children: /* @__PURE__ */ (0, O.jsx)("path", { d: k[e] })
|
|
318
|
-
});
|
|
319
|
-
}
|
|
320
|
-
var j = ({ tone: e }) => /* @__PURE__ */ (0, O.jsx)("span", {
|
|
321
|
-
className: `rp-dot${e ? ` ${e}` : ""}`,
|
|
322
|
-
"aria-hidden": "true"
|
|
323
|
-
});
|
|
324
|
-
function M(e, t) {
|
|
325
|
-
if (e.length <= t) return e;
|
|
326
|
-
let n = Math.ceil((t - 1) * .55);
|
|
327
|
-
return `${e.slice(0, n)}…${e.slice(e.length - (t - 1 - n))}`;
|
|
328
|
-
}
|
|
329
|
-
var N = (e, t) => e.name.length <= t ? e.name : M(e.short, t);
|
|
330
|
-
function P({ text: e, query: t }) {
|
|
331
|
-
let n = t.trim().toLowerCase(), r = n ? e.toLowerCase().indexOf(n) : -1;
|
|
332
|
-
return r < 0 ? /* @__PURE__ */ (0, O.jsx)(O.Fragment, { children: e }) : /* @__PURE__ */ (0, O.jsxs)(O.Fragment, { children: [
|
|
333
|
-
e.slice(0, r),
|
|
334
|
-
/* @__PURE__ */ (0, O.jsx)("mark", { children: e.slice(r, r + n.length) }),
|
|
335
|
-
e.slice(r + n.length)
|
|
336
|
-
] });
|
|
337
|
-
}
|
|
338
|
-
var F = (0, i.createContext)(null), I = () => (0, i.useContext)(F);
|
|
339
|
-
function L({ children: e }) {
|
|
340
|
-
let [t, n] = (0, i.useState)(null), r = (0, i.useRef)(!1), o = (0, i.useRef)(0), s = (0, i.useRef)(null), c = (0, i.useMemo)(() => ({
|
|
341
|
-
show: (e) => {
|
|
342
|
-
r.current || (window.clearTimeout(o.current), n(e));
|
|
343
|
-
},
|
|
344
|
-
hide: () => {
|
|
345
|
-
r.current || (window.clearTimeout(o.current), o.current = window.setTimeout(() => {
|
|
346
|
-
!s.current?.matches(":hover") && !s.current?.contains(document.activeElement) && n(null);
|
|
347
|
-
}, 160));
|
|
348
|
-
},
|
|
349
|
-
hideNow: () => {
|
|
350
|
-
window.clearTimeout(o.current), r.current = !1, n(null);
|
|
351
|
-
},
|
|
352
|
-
pin: () => {
|
|
353
|
-
r.current = !0, n((e) => e && {
|
|
354
|
-
...e,
|
|
355
|
-
follow: !1,
|
|
356
|
-
pinned: !0
|
|
357
|
-
});
|
|
358
|
-
},
|
|
359
|
-
pinned: () => r.current
|
|
360
|
-
}), []);
|
|
361
|
-
return (0, i.useEffect)(() => {
|
|
362
|
-
let e = (e) => {
|
|
363
|
-
e.key === "Escape" && c.hideNow();
|
|
364
|
-
}, t = (e) => {
|
|
365
|
-
r.current && s.current && !s.current.contains(e.target) && c.hideNow();
|
|
366
|
-
};
|
|
367
|
-
return window.addEventListener("keydown", e), window.addEventListener("pointerdown", t), () => {
|
|
368
|
-
window.removeEventListener("keydown", e), window.removeEventListener("pointerdown", t);
|
|
369
|
-
};
|
|
370
|
-
}, [c]), (0, i.useLayoutEffect)(() => {
|
|
371
|
-
let e = s.current;
|
|
372
|
-
if (!e || !t) return;
|
|
373
|
-
let n = e.offsetWidth, r = e.offsetHeight, i = window.innerWidth, a = window.innerHeight, { rect: o, bounds: c } = t, l, u;
|
|
374
|
-
if (i <= 720 || t.vertical && c) l = Math.max((c?.left ?? 0) + 8, Math.min(o.left, (c?.right ?? i) - 8 - n)), i <= 720 && (l = Math.max(12, (i - n) / 2)), u = o.bottom + 8, u + r > Math.min(a, c?.bottom ?? a) - 8 && (u = o.top - 8 - r);
|
|
375
|
-
else {
|
|
376
|
-
let e = c ? {
|
|
377
|
-
l: Math.max(12, c.left + 8),
|
|
378
|
-
r: Math.min(i - 12, c.right - 8),
|
|
379
|
-
t: Math.max(12, c.top + 8),
|
|
380
|
-
b: Math.min(a - 12, c.bottom - 8)
|
|
381
|
-
} : {
|
|
382
|
-
l: 12,
|
|
383
|
-
r: i - 12,
|
|
384
|
-
t: 12,
|
|
385
|
-
b: a - 12
|
|
386
|
-
}, s = t.x ?? o.right, d = t.x ?? o.left;
|
|
387
|
-
l = s + 14, l + n > e.r && (l = d - 14 - n), l < e.l && (l = Math.max(12, Math.min(i - n - 12, s + 14))), u = o.top + (o.bottom - o.top) / 2 - r / 2, u = r <= e.b - e.t ? Math.max(e.t, Math.min(u, e.b - r)) : Math.max(12, Math.min(u, a - r - 12));
|
|
388
|
-
}
|
|
389
|
-
e.style.left = `${Math.round(Math.max(12, l))}px`, e.style.top = `${Math.round(Math.max(12, Math.min(u, a - r - 12)))}px`;
|
|
390
|
-
}, [t]), /* @__PURE__ */ (0, O.jsxs)(F.Provider, {
|
|
391
|
-
value: c,
|
|
392
|
-
children: [e, t && typeof document < "u" && (0, a.createPortal)(/* @__PURE__ */ (0, O.jsxs)("div", {
|
|
393
|
-
ref: s,
|
|
394
|
-
className: `rp-hc${t.wide ? " wide" : ""}${t.follow ? " follow" : ""}`,
|
|
395
|
-
role: t.pinned ? "dialog" : "tooltip",
|
|
396
|
-
"data-pinned": t.pinned || void 0,
|
|
397
|
-
onPointerLeave: () => {
|
|
398
|
-
r.current || n(null);
|
|
399
|
-
},
|
|
400
|
-
children: [t.pinned && /* @__PURE__ */ (0, O.jsx)("button", {
|
|
401
|
-
type: "button",
|
|
402
|
-
className: "rp-card-x",
|
|
403
|
-
"aria-label": "Close",
|
|
404
|
-
onClick: c.hideNow,
|
|
405
|
-
children: /* @__PURE__ */ (0, O.jsx)(A, {
|
|
406
|
-
name: "x",
|
|
407
|
-
size: 14
|
|
408
|
-
})
|
|
409
|
-
}), t.content]
|
|
410
|
-
}), document.querySelector(".agent-record") ?? document.body)]
|
|
411
|
-
});
|
|
412
|
-
}
|
|
413
|
-
function R(e, t = {}) {
|
|
414
|
-
let n = I(), r = (r) => {
|
|
415
|
-
let i = r.getBoundingClientRect();
|
|
416
|
-
n.show({
|
|
417
|
-
content: e(),
|
|
418
|
-
rect: i,
|
|
419
|
-
bounds: t.bounds?.(),
|
|
420
|
-
vertical: t.vertical,
|
|
421
|
-
wide: t.wide
|
|
422
|
-
});
|
|
423
|
-
};
|
|
424
|
-
return {
|
|
425
|
-
onPointerEnter: (e) => r(e.currentTarget),
|
|
426
|
-
onPointerLeave: () => n.hide(),
|
|
427
|
-
onFocus: (e) => r(e.currentTarget),
|
|
428
|
-
onBlur: () => n.hide()
|
|
429
|
-
};
|
|
430
|
-
}
|
|
431
|
-
function z({ tools: e, rows: t = 9 }) {
|
|
432
|
-
let n = Math.max(1, ...e.map((e) => e.calls));
|
|
433
|
-
return /* @__PURE__ */ (0, O.jsxs)("div", {
|
|
434
|
-
className: "rp-tt",
|
|
435
|
-
children: [
|
|
436
|
-
/* @__PURE__ */ (0, O.jsx)("span", {
|
|
437
|
-
className: "h",
|
|
438
|
-
children: "Tool"
|
|
439
|
-
}),
|
|
440
|
-
/* @__PURE__ */ (0, O.jsx)("span", { className: "h" }),
|
|
441
|
-
/* @__PURE__ */ (0, O.jsx)("span", {
|
|
442
|
-
className: "h r",
|
|
443
|
-
children: "calls"
|
|
444
|
-
}),
|
|
445
|
-
/* @__PURE__ */ (0, O.jsx)("span", {
|
|
446
|
-
className: "h r",
|
|
447
|
-
children: "✕ · p50"
|
|
448
|
-
}),
|
|
449
|
-
e.slice(0, t).map((e) => /* @__PURE__ */ (0, O.jsx)(B, {
|
|
450
|
-
t: e,
|
|
451
|
-
max: n
|
|
452
|
-
}, e.name)),
|
|
453
|
-
e.length > t && /* @__PURE__ */ (0, O.jsxs)(O.Fragment, { children: [
|
|
454
|
-
/* @__PURE__ */ (0, O.jsxs)("span", {
|
|
455
|
-
className: "l",
|
|
456
|
-
children: [e.length - t, " more tools"]
|
|
457
|
-
}),
|
|
458
|
-
/* @__PURE__ */ (0, O.jsx)("span", {}),
|
|
459
|
-
/* @__PURE__ */ (0, O.jsx)("span", {
|
|
460
|
-
className: "r",
|
|
461
|
-
children: C(e.slice(t).reduce((e, t) => e + t.calls, 0))
|
|
462
|
-
}),
|
|
463
|
-
/* @__PURE__ */ (0, O.jsx)("span", {})
|
|
464
|
-
] })
|
|
465
|
-
]
|
|
466
|
-
});
|
|
467
|
-
}
|
|
468
|
-
function B({ t: e, max: t }) {
|
|
469
|
-
return /* @__PURE__ */ (0, O.jsxs)(O.Fragment, { children: [
|
|
470
|
-
/* @__PURE__ */ (0, O.jsx)("span", {
|
|
471
|
-
className: "l",
|
|
472
|
-
title: e.name,
|
|
473
|
-
children: e.name
|
|
474
|
-
}),
|
|
475
|
-
/* @__PURE__ */ (0, O.jsx)(V, {
|
|
476
|
-
ok: e.calls - e.failures,
|
|
477
|
-
failed: e.failures,
|
|
478
|
-
max: t
|
|
479
|
-
}),
|
|
480
|
-
/* @__PURE__ */ (0, O.jsx)("span", {
|
|
481
|
-
className: "r",
|
|
482
|
-
children: C(e.calls)
|
|
483
|
-
}),
|
|
484
|
-
/* @__PURE__ */ (0, O.jsx)("span", {
|
|
485
|
-
className: e.failures ? "f" : "r",
|
|
486
|
-
children: e.failures ? `${e.failures} ✕` : S(e.p50)
|
|
487
|
-
})
|
|
488
|
-
] });
|
|
489
|
-
}
|
|
490
|
-
function V({ ok: e, failed: t = 0, max: n }) {
|
|
491
|
-
return /* @__PURE__ */ (0, O.jsxs)("span", {
|
|
492
|
-
className: "rp-bar",
|
|
493
|
-
"aria-hidden": "true",
|
|
494
|
-
children: [/* @__PURE__ */ (0, O.jsx)("b", { style: { width: `${Math.max(0, e) / n * 100}%` } }), t > 0 && /* @__PURE__ */ (0, O.jsx)("b", {
|
|
495
|
-
className: "f",
|
|
496
|
-
style: { width: `${t / n * 100}%` }
|
|
497
|
-
})]
|
|
498
|
-
});
|
|
499
|
-
}
|
|
500
|
-
var H = (e) => e.listUsd === null ? e.billedUsd === null ? "not recorded" : `${T(e.billedUsd)} billed` : `${T(e.listUsd)} list · ${T(e.billedUsd ?? 0)} billed`;
|
|
501
|
-
function U({ m: e, a: t, head: n }) {
|
|
502
|
-
let r = (t) => new Date(e.t0 + t).toISOString().slice(11, 16), i = t.parent ? e.byId.get(t.parent) : null;
|
|
503
|
-
return /* @__PURE__ */ (0, O.jsxs)(O.Fragment, { children: [n ?? /* @__PURE__ */ (0, O.jsxs)("div", {
|
|
504
|
-
className: "rp-card-h",
|
|
505
|
-
children: [/* @__PURE__ */ (0, O.jsxs)("div", {
|
|
506
|
-
className: "t",
|
|
507
|
-
children: [
|
|
508
|
-
/* @__PURE__ */ (0, O.jsx)(j, { tone: t.state.tone }),
|
|
509
|
-
/* @__PURE__ */ (0, O.jsx)("span", {
|
|
510
|
-
className: "nm",
|
|
511
|
-
children: t.name
|
|
512
|
-
}),
|
|
513
|
-
/* @__PURE__ */ (0, O.jsx)("span", {
|
|
514
|
-
className: "v",
|
|
515
|
-
children: t.state.label
|
|
516
|
-
})
|
|
517
|
-
]
|
|
518
|
-
}), /* @__PURE__ */ (0, O.jsx)("div", {
|
|
519
|
-
className: "s",
|
|
520
|
-
children: i ? `spawned by ${i.name}${t.start === null ? "" : ` at ${r(Math.max(0, t.start))} UTC`}` : `run root · ${r(0)} UTC`
|
|
521
|
-
})]
|
|
522
|
-
}), /* @__PURE__ */ (0, O.jsxs)("div", {
|
|
523
|
-
className: `rp-card-cols${t.tools.length ? " two" : ""}`,
|
|
524
|
-
children: [/* @__PURE__ */ (0, O.jsxs)("section", { children: [/* @__PURE__ */ (0, O.jsxs)("h6", { children: ["Whole run", t.model ? ` · ${t.model}` : ""] }), /* @__PURE__ */ (0, O.jsxs)("dl", { children: [
|
|
525
|
-
/* @__PURE__ */ (0, O.jsx)("dt", { children: "Tokens" }),
|
|
526
|
-
/* @__PURE__ */ (0, O.jsx)("dd", { children: t.tokens === null ? "not recorded" : w(t.tokens) }),
|
|
527
|
-
t.tokens !== null && /* @__PURE__ */ (0, O.jsxs)(O.Fragment, { children: [/* @__PURE__ */ (0, O.jsx)("dt", { children: "In · out · cached" }), /* @__PURE__ */ (0, O.jsx)("dd", { children: t.byClass ? `${w(t.byClass.input)} · ${w(t.byClass.output)} · ${w(t.byClass.cacheRead)}` : /* @__PURE__ */ (0, O.jsx)("small", { children: "not recorded" }) })] }),
|
|
528
|
-
/* @__PURE__ */ (0, O.jsx)("dt", { children: "Cost" }),
|
|
529
|
-
/* @__PURE__ */ (0, O.jsx)("dd", { children: H(t) }),
|
|
530
|
-
/* @__PURE__ */ (0, O.jsx)("dt", { children: "Model calls" }),
|
|
531
|
-
/* @__PURE__ */ (0, O.jsx)("dd", { children: C(t.modelCalls) }),
|
|
532
|
-
t.latency.p50 !== null && /* @__PURE__ */ (0, O.jsxs)(O.Fragment, { children: [/* @__PURE__ */ (0, O.jsx)("dt", { children: "Model p50 · p90 · p99" }), /* @__PURE__ */ (0, O.jsxs)("dd", { children: [
|
|
533
|
-
S(t.latency.p50),
|
|
534
|
-
" · ",
|
|
535
|
-
S(t.latency.p90),
|
|
536
|
-
" · ",
|
|
537
|
-
S(t.latency.p99)
|
|
538
|
-
] })] }),
|
|
539
|
-
/* @__PURE__ */ (0, O.jsx)("dt", { children: "Tool calls" }),
|
|
540
|
-
/* @__PURE__ */ (0, O.jsxs)("dd", { children: [C(t.toolCalls), t.toolFailures ? /* @__PURE__ */ (0, O.jsxs)("span", {
|
|
541
|
-
className: "f",
|
|
542
|
-
children: [
|
|
543
|
-
" · ",
|
|
544
|
-
t.toolFailures,
|
|
545
|
-
" failed"
|
|
546
|
-
]
|
|
547
|
-
}) : null] }),
|
|
548
|
-
t.retries > 0 && /* @__PURE__ */ (0, O.jsxs)(O.Fragment, { children: [/* @__PURE__ */ (0, O.jsx)("dt", { children: "Retried steps" }), /* @__PURE__ */ (0, O.jsx)("dd", { children: t.retries })] }),
|
|
549
|
-
/* @__PURE__ */ (0, O.jsx)("dt", { children: "Restarts" }),
|
|
550
|
-
/* @__PURE__ */ (0, O.jsx)("dd", { children: t.restarts.length }),
|
|
551
|
-
/* @__PURE__ */ (0, O.jsx)("dt", { children: "Spawned · commits" }),
|
|
552
|
-
/* @__PURE__ */ (0, O.jsxs)("dd", { children: [
|
|
553
|
-
t.children.length,
|
|
554
|
-
" · ",
|
|
555
|
-
t.commits ?? "—"
|
|
556
|
-
] }),
|
|
557
|
-
/* @__PURE__ */ (0, O.jsx)("dt", { children: "Active" }),
|
|
558
|
-
/* @__PURE__ */ (0, O.jsx)("dd", { children: t.first === null ? "never" : `${r(t.first)}–${t.state.tone === "live" ? "now" : r(t.last ?? t.first)} UTC` }),
|
|
559
|
-
t.first !== null && /* @__PURE__ */ (0, O.jsxs)(O.Fragment, { children: [/* @__PURE__ */ (0, O.jsx)("dt", { children: "Busy" }), /* @__PURE__ */ (0, O.jsx)("dd", { children: x(t.busy) })] })
|
|
560
|
-
] })] }), t.tools.length > 0 && /* @__PURE__ */ (0, O.jsxs)("section", { children: [/* @__PURE__ */ (0, O.jsx)("h6", { children: "Tool calls by tool" }), /* @__PURE__ */ (0, O.jsx)(z, { tools: t.tools })] })]
|
|
561
|
-
})] });
|
|
562
|
-
}
|
|
563
|
-
function W({ m: e, team: t }) {
|
|
564
|
-
let n = t.members.map((t) => e.byId.get(t)).filter(Boolean), r = /* @__PURE__ */ new Map();
|
|
565
|
-
for (let e of n) for (let t of e.tools) {
|
|
566
|
-
let e = r.get(t.name) ?? {
|
|
567
|
-
...t,
|
|
568
|
-
calls: 0,
|
|
569
|
-
failures: 0,
|
|
570
|
-
ms: 0,
|
|
571
|
-
durations: []
|
|
572
|
-
};
|
|
573
|
-
r.set(t.name, {
|
|
574
|
-
...e,
|
|
575
|
-
calls: e.calls + t.calls,
|
|
576
|
-
failures: e.failures + t.failures,
|
|
577
|
-
ms: e.ms + t.ms,
|
|
578
|
-
durations: [...e.durations, ...t.durations]
|
|
579
|
-
});
|
|
580
|
-
}
|
|
581
|
-
let i = (e) => n.reduce((t, n) => t + e(n), 0), a = n.filter((e) => e.state.tone === "live").length;
|
|
582
|
-
return /* @__PURE__ */ (0, O.jsxs)(O.Fragment, { children: [/* @__PURE__ */ (0, O.jsxs)("div", {
|
|
583
|
-
className: "rp-card-h",
|
|
584
|
-
children: [/* @__PURE__ */ (0, O.jsxs)("div", {
|
|
585
|
-
className: "t",
|
|
586
|
-
children: [
|
|
587
|
-
/* @__PURE__ */ (0, O.jsx)(A, { name: "users" }),
|
|
588
|
-
/* @__PURE__ */ (0, O.jsx)("span", {
|
|
589
|
-
className: "nm",
|
|
590
|
-
children: t.label
|
|
591
|
-
}),
|
|
592
|
-
/* @__PURE__ */ (0, O.jsxs)("span", {
|
|
593
|
-
className: "v",
|
|
594
|
-
children: [n.length, " agents"]
|
|
595
|
-
})
|
|
596
|
-
]
|
|
597
|
-
}), /* @__PURE__ */ (0, O.jsxs)("div", {
|
|
598
|
-
className: "s",
|
|
599
|
-
children: [
|
|
600
|
-
a,
|
|
601
|
-
" running · ",
|
|
602
|
-
n.filter((e) => o(e.state.tone)).length,
|
|
603
|
-
" done"
|
|
604
|
-
]
|
|
605
|
-
})]
|
|
606
|
-
}), /* @__PURE__ */ (0, O.jsxs)("div", {
|
|
607
|
-
className: "rp-card-cols two",
|
|
608
|
-
children: [/* @__PURE__ */ (0, O.jsxs)("section", { children: [/* @__PURE__ */ (0, O.jsx)("h6", { children: "Team totals" }), /* @__PURE__ */ (0, O.jsxs)("dl", { children: [
|
|
609
|
-
/* @__PURE__ */ (0, O.jsx)("dt", { children: "Tokens" }),
|
|
610
|
-
/* @__PURE__ */ (0, O.jsx)("dd", { children: w(i((e) => e.tokens ?? 0)) }),
|
|
611
|
-
/* @__PURE__ */ (0, O.jsx)("dt", { children: "Model calls" }),
|
|
612
|
-
/* @__PURE__ */ (0, O.jsx)("dd", { children: C(i((e) => e.modelCalls)) }),
|
|
613
|
-
/* @__PURE__ */ (0, O.jsx)("dt", { children: "Tool calls" }),
|
|
614
|
-
/* @__PURE__ */ (0, O.jsxs)("dd", { children: [C(i((e) => e.toolCalls)), /* @__PURE__ */ (0, O.jsxs)("span", {
|
|
615
|
-
className: "f",
|
|
616
|
-
children: [
|
|
617
|
-
" · ",
|
|
618
|
-
i((e) => e.toolFailures),
|
|
619
|
-
" failed"
|
|
620
|
-
]
|
|
621
|
-
})] }),
|
|
622
|
-
/* @__PURE__ */ (0, O.jsx)("dt", { children: "Commits" }),
|
|
623
|
-
/* @__PURE__ */ (0, O.jsx)("dd", { children: i((e) => e.commits ?? 0) })
|
|
624
|
-
] })] }), /* @__PURE__ */ (0, O.jsxs)("section", { children: [/* @__PURE__ */ (0, O.jsx)("h6", { children: "Tool calls by tool" }), /* @__PURE__ */ (0, O.jsx)(z, { tools: [...r.values()].sort((e, t) => t.calls - e.calls) })] })]
|
|
625
|
-
})] });
|
|
626
|
-
}
|
|
627
|
-
var G = 36;
|
|
628
|
-
function K(e) {
|
|
629
|
-
let [t, n] = (0, i.useState)(!1), r = (0, i.useRef)(null);
|
|
630
|
-
return /* @__PURE__ */ (0, O.jsxs)(O.Fragment, { children: [/* @__PURE__ */ (0, O.jsxs)("button", {
|
|
631
|
-
ref: r,
|
|
632
|
-
type: "button",
|
|
633
|
-
className: `rp-cbx${e.className ? ` ${e.className}` : ""}`,
|
|
634
|
-
style: e.style,
|
|
635
|
-
"aria-haspopup": "listbox",
|
|
636
|
-
"aria-expanded": t,
|
|
637
|
-
"aria-label": e.label,
|
|
638
|
-
onClick: () => n(!t),
|
|
639
|
-
children: [/* @__PURE__ */ (0, O.jsx)("span", {
|
|
640
|
-
className: "lbl",
|
|
641
|
-
children: e.children
|
|
642
|
-
}), /* @__PURE__ */ (0, O.jsx)("span", {
|
|
643
|
-
className: "cv",
|
|
644
|
-
children: /* @__PURE__ */ (0, O.jsx)(A, {
|
|
645
|
-
name: "chevron",
|
|
646
|
-
size: 14
|
|
647
|
-
})
|
|
648
|
-
})]
|
|
649
|
-
}), t && /* @__PURE__ */ (0, O.jsx)(q, {
|
|
650
|
-
...e,
|
|
651
|
-
anchor: r.current,
|
|
652
|
-
onClose: (e) => {
|
|
653
|
-
n(!1), e && r.current?.focus();
|
|
654
|
-
}
|
|
655
|
-
})] });
|
|
656
|
-
}
|
|
657
|
-
function q(e) {
|
|
658
|
-
let { options: t, groups: n, all: r, multi: o, anchor: s, onClose: c } = e, [l, u] = (0, i.useState)(""), [d, f] = (0, i.useState)(0), [p, m] = (0, i.useState)(0), h = (0, i.useRef)(null), g = (0, i.useRef)(null), _ = (0, i.useMemo)(() => `pk-${Math.random().toString(36).slice(2, 8)}`, []), v = (t) => o ? e.value.has(t) : e.value === t, y = (0, i.useMemo)(() => {
|
|
659
|
-
let e = l.trim().toLowerCase(), i = (t) => !e || `${t.label} ${t.find ?? ""}`.toLowerCase().includes(e), a = [];
|
|
660
|
-
r && !e && a.push({ kind: "all" });
|
|
661
|
-
let o = new Set((n ?? []).map((e) => e.id));
|
|
662
|
-
for (let e of t) (!e.group || !o.has(e.group)) && i(e) && a.push({
|
|
663
|
-
kind: "option",
|
|
664
|
-
option: e
|
|
665
|
-
});
|
|
666
|
-
for (let e of n ?? []) {
|
|
667
|
-
let n = t.filter((t) => t.group === e.id), r = n.filter(i);
|
|
668
|
-
if (r.length) {
|
|
669
|
-
a.push({
|
|
670
|
-
kind: "group",
|
|
671
|
-
id: e.id,
|
|
672
|
-
label: e.label,
|
|
673
|
-
members: n.map((e) => e.id)
|
|
674
|
-
});
|
|
675
|
-
for (let e of r) a.push({
|
|
676
|
-
kind: "option",
|
|
677
|
-
option: e
|
|
678
|
-
});
|
|
679
|
-
}
|
|
680
|
-
}
|
|
681
|
-
return a;
|
|
682
|
-
}, [
|
|
683
|
-
t,
|
|
684
|
-
n,
|
|
685
|
-
r,
|
|
686
|
-
l
|
|
687
|
-
]);
|
|
688
|
-
(0, i.useLayoutEffect)(() => {
|
|
689
|
-
let t = h.current;
|
|
690
|
-
if (!t) return;
|
|
691
|
-
let n = s.getBoundingClientRect(), r = Math.max(n.width, e.width ?? 280);
|
|
692
|
-
t.style.width = `${Math.min(r, window.innerWidth - 24)}px`, t.style.left = `${Math.max(12, Math.min(n.left, window.innerWidth - t.offsetWidth - 12))}px`;
|
|
693
|
-
let i = window.innerHeight - n.bottom;
|
|
694
|
-
t.style.top = i > t.offsetHeight + 16 || i > n.top ? `${n.bottom + 6}px` : `${Math.max(12, n.top - 6 - t.offsetHeight)}px`;
|
|
695
|
-
}, [
|
|
696
|
-
s,
|
|
697
|
-
y.length,
|
|
698
|
-
e.width
|
|
699
|
-
]), (0, i.useEffect)(() => {
|
|
700
|
-
let e = (e) => {
|
|
701
|
-
!h.current?.contains(e.target) && !s.contains(e.target) && c(!1);
|
|
702
|
-
};
|
|
703
|
-
return window.addEventListener("pointerdown", e), () => window.removeEventListener("pointerdown", e);
|
|
704
|
-
}, [s, c]), (0, i.useEffect)(() => f(0), [l]);
|
|
705
|
-
let b = (t) => {
|
|
706
|
-
if (!t) return;
|
|
707
|
-
if (!o) {
|
|
708
|
-
let n = e.onChange;
|
|
709
|
-
n(t.kind === "option" ? t.option.id : t.kind === "group" ? t.id : null), c(!0);
|
|
710
|
-
return;
|
|
711
|
-
}
|
|
712
|
-
let n = new Set(e.value), r = e.onChange;
|
|
713
|
-
if (t.kind === "all") return r(/* @__PURE__ */ new Set());
|
|
714
|
-
if (t.kind === "group") {
|
|
715
|
-
let e = t.members.every((e) => n.has(e));
|
|
716
|
-
for (let r of t.members) e ? n.delete(r) : n.add(r);
|
|
717
|
-
return r(n);
|
|
718
|
-
}
|
|
719
|
-
n.has(t.option.id) ? n.delete(t.option.id) : n.add(t.option.id), r(n);
|
|
720
|
-
}, x = (e) => {
|
|
721
|
-
let t = g.current;
|
|
722
|
-
if (!t) return;
|
|
723
|
-
let n = e * G;
|
|
724
|
-
n < t.scrollTop ? t.scrollTop = n : n + G > t.scrollTop + t.clientHeight && (t.scrollTop = n + G - t.clientHeight);
|
|
725
|
-
}, S = (e) => {
|
|
726
|
-
let t = Math.max(0, Math.min(y.length - 1, e));
|
|
727
|
-
f(t), x(t);
|
|
728
|
-
}, C = (e) => {
|
|
729
|
-
let t = Math.max(1, Math.floor((g.current?.clientHeight ?? 360) / G) - 1), n = {
|
|
730
|
-
ArrowDown: () => S(d + 1),
|
|
731
|
-
ArrowUp: () => S(d - 1),
|
|
732
|
-
PageDown: () => S(d + t),
|
|
733
|
-
PageUp: () => S(d - t),
|
|
734
|
-
Home: () => S(0),
|
|
735
|
-
End: () => S(y.length - 1),
|
|
736
|
-
Enter: () => b(y[d]),
|
|
737
|
-
Escape: () => c(!0),
|
|
738
|
-
Tab: () => c(!1)
|
|
739
|
-
}[e.key];
|
|
740
|
-
n && (e.key !== "Tab" && e.preventDefault(), n());
|
|
741
|
-
}, w = Math.min(y.length * G + 8, 296), T = Math.max(0, Math.floor(p / G) - 4), E = Math.min(y.length, Math.ceil((p + w) / G) + 4), D = o ? e.value.size === 0 : e.value === null;
|
|
742
|
-
return (0, a.createPortal)(/* @__PURE__ */ (0, O.jsxs)("div", {
|
|
743
|
-
ref: h,
|
|
744
|
-
className: "rp-lb",
|
|
745
|
-
role: "presentation",
|
|
746
|
-
children: [
|
|
747
|
-
/* @__PURE__ */ (0, O.jsxs)("div", {
|
|
748
|
-
className: "rp-lb-s",
|
|
749
|
-
children: [
|
|
750
|
-
/* @__PURE__ */ (0, O.jsx)(A, { name: "search" }),
|
|
751
|
-
/* @__PURE__ */ (0, O.jsx)("input", {
|
|
752
|
-
autoFocus: !0,
|
|
753
|
-
value: l,
|
|
754
|
-
onChange: (e) => u(e.target.value),
|
|
755
|
-
onKeyDown: C,
|
|
756
|
-
placeholder: e.placeholder ?? "Search",
|
|
757
|
-
"aria-label": e.placeholder ?? e.label,
|
|
758
|
-
role: "combobox",
|
|
759
|
-
"aria-expanded": "true",
|
|
760
|
-
"aria-controls": _,
|
|
761
|
-
"aria-activedescendant": y[d] ? `${_}-${d}` : void 0,
|
|
762
|
-
"aria-autocomplete": "list"
|
|
763
|
-
}),
|
|
764
|
-
/* @__PURE__ */ (0, O.jsx)("kbd", { children: "Esc" })
|
|
765
|
-
]
|
|
766
|
-
}),
|
|
767
|
-
y.length ? /* @__PURE__ */ (0, O.jsx)("div", {
|
|
768
|
-
ref: g,
|
|
769
|
-
id: _,
|
|
770
|
-
className: "rp-lb-l",
|
|
771
|
-
role: "listbox",
|
|
772
|
-
"aria-multiselectable": o || void 0,
|
|
773
|
-
"aria-label": e.label,
|
|
774
|
-
style: { height: w },
|
|
775
|
-
onScroll: (e) => m(e.currentTarget.scrollTop),
|
|
776
|
-
children: /* @__PURE__ */ (0, O.jsx)("div", {
|
|
777
|
-
style: {
|
|
778
|
-
height: y.length * G,
|
|
779
|
-
position: "relative"
|
|
780
|
-
},
|
|
781
|
-
children: y.slice(T, E).map((e, t) => {
|
|
782
|
-
let n = T + t, i = { top: n * G + 4 }, a = `rp-lb-r${n === d ? " active" : ""}`;
|
|
783
|
-
if (e.kind === "group") {
|
|
784
|
-
let t = e.members.filter((e) => v(e)).length;
|
|
785
|
-
return /* @__PURE__ */ (0, O.jsxs)("div", {
|
|
786
|
-
id: `${_}-${n}`,
|
|
787
|
-
role: "option",
|
|
788
|
-
"aria-selected": o ? t === e.members.length : v(e.id),
|
|
789
|
-
className: `${a} grp`,
|
|
790
|
-
style: i,
|
|
791
|
-
onPointerEnter: () => f(n),
|
|
792
|
-
onClick: () => b(e),
|
|
793
|
-
children: [
|
|
794
|
-
o ? /* @__PURE__ */ (0, O.jsx)("span", {
|
|
795
|
-
className: `box${t && t < e.members.length ? " part" : ""}`,
|
|
796
|
-
children: t === e.members.length ? /* @__PURE__ */ (0, O.jsx)(A, {
|
|
797
|
-
name: "check",
|
|
798
|
-
size: 12
|
|
799
|
-
}) : t ? "–" : null
|
|
800
|
-
}) : /* @__PURE__ */ (0, O.jsx)("span", { className: "ck" }),
|
|
801
|
-
/* @__PURE__ */ (0, O.jsx)(A, {
|
|
802
|
-
name: "users",
|
|
803
|
-
size: 14
|
|
804
|
-
}),
|
|
805
|
-
/* @__PURE__ */ (0, O.jsx)("span", {
|
|
806
|
-
className: "nm",
|
|
807
|
-
children: e.label
|
|
808
|
-
}),
|
|
809
|
-
/* @__PURE__ */ (0, O.jsx)("span", {
|
|
810
|
-
className: "mt",
|
|
811
|
-
children: e.members.length
|
|
812
|
-
})
|
|
813
|
-
]
|
|
814
|
-
}, `g:${e.id}`);
|
|
815
|
-
}
|
|
816
|
-
let s = e.kind === "all" ? D : v(e.option.id), c = e.kind === "all" ? r.label : e.option.label, u = e.kind === "all" ? r.meta : e.option.meta;
|
|
817
|
-
return /* @__PURE__ */ (0, O.jsxs)("div", {
|
|
818
|
-
id: `${_}-${n}`,
|
|
819
|
-
role: "option",
|
|
820
|
-
"aria-selected": s,
|
|
821
|
-
className: `${a} opt`,
|
|
822
|
-
style: i,
|
|
823
|
-
onPointerEnter: () => f(n),
|
|
824
|
-
onClick: () => b(e),
|
|
825
|
-
children: [
|
|
826
|
-
o ? /* @__PURE__ */ (0, O.jsx)("span", {
|
|
827
|
-
className: "box",
|
|
828
|
-
children: s ? /* @__PURE__ */ (0, O.jsx)(A, {
|
|
829
|
-
name: "check",
|
|
830
|
-
size: 12
|
|
831
|
-
}) : null
|
|
832
|
-
}) : /* @__PURE__ */ (0, O.jsx)("span", {
|
|
833
|
-
className: "ck",
|
|
834
|
-
children: s ? /* @__PURE__ */ (0, O.jsx)(A, {
|
|
835
|
-
name: "check",
|
|
836
|
-
size: 14
|
|
837
|
-
}) : null
|
|
838
|
-
}),
|
|
839
|
-
e.kind === "option" && e.option.tone !== void 0 && /* @__PURE__ */ (0, O.jsx)(j, { tone: e.option.tone }),
|
|
840
|
-
/* @__PURE__ */ (0, O.jsx)("span", {
|
|
841
|
-
className: "nm",
|
|
842
|
-
children: /* @__PURE__ */ (0, O.jsx)(P, {
|
|
843
|
-
text: c,
|
|
844
|
-
query: l
|
|
845
|
-
})
|
|
846
|
-
}),
|
|
847
|
-
u && /* @__PURE__ */ (0, O.jsx)("span", {
|
|
848
|
-
className: "mt",
|
|
849
|
-
children: u
|
|
850
|
-
})
|
|
851
|
-
]
|
|
852
|
-
}, e.kind === "all" ? "all" : e.option.id);
|
|
853
|
-
})
|
|
854
|
-
})
|
|
855
|
-
}) : /* @__PURE__ */ (0, O.jsxs)("div", {
|
|
856
|
-
className: "rp-lb-e",
|
|
857
|
-
children: [
|
|
858
|
-
"Nothing matches “",
|
|
859
|
-
l,
|
|
860
|
-
"”"
|
|
861
|
-
]
|
|
862
|
-
}),
|
|
863
|
-
o && /* @__PURE__ */ (0, O.jsxs)("div", {
|
|
864
|
-
className: "rp-lb-f",
|
|
865
|
-
children: [/* @__PURE__ */ (0, O.jsx)("span", { children: e.value.size ? `${e.value.size} selected` : "All" }), /* @__PURE__ */ (0, O.jsxs)("span", {
|
|
866
|
-
className: "end",
|
|
867
|
-
children: [/* @__PURE__ */ (0, O.jsx)("button", {
|
|
868
|
-
type: "button",
|
|
869
|
-
className: "rp-btn sm",
|
|
870
|
-
onClick: () => e.onChange(/* @__PURE__ */ new Set()),
|
|
871
|
-
children: "Clear"
|
|
872
|
-
}), /* @__PURE__ */ (0, O.jsx)("button", {
|
|
873
|
-
type: "button",
|
|
874
|
-
className: "rp-btn sm framed",
|
|
875
|
-
onClick: () => c(!0),
|
|
876
|
-
children: "Done"
|
|
877
|
-
})]
|
|
878
|
-
})]
|
|
879
|
-
})
|
|
880
|
-
]
|
|
881
|
-
}), s.closest(".agent-record") ?? document.body);
|
|
882
|
-
}
|
|
883
|
-
function J(e, t = () => !0, n = (e) => e.tokens === null ? "—" : w(e.tokens)) {
|
|
884
|
-
return e.tree.filter(t).map((t) => ({
|
|
885
|
-
id: t.id,
|
|
886
|
-
label: t.name,
|
|
887
|
-
find: t.node.label,
|
|
888
|
-
tone: t.state.tone,
|
|
889
|
-
meta: n(t),
|
|
890
|
-
group: e.teams.length && t.team && t.team !== t.id ? t.team : null
|
|
891
|
-
}));
|
|
892
|
-
}
|
|
893
|
-
var Y = (e) => e.teams.length ? e.teams.map((e) => ({
|
|
894
|
-
id: e.id,
|
|
895
|
-
label: e.label
|
|
896
|
-
})) : void 0;
|
|
897
|
-
function X(e, t, n, r = 6) {
|
|
898
|
-
let [a, o] = (0, i.useState)({
|
|
899
|
-
top: 0,
|
|
900
|
-
height: 800,
|
|
901
|
-
width: 0
|
|
902
|
-
});
|
|
903
|
-
(0, i.useEffect)(() => {
|
|
904
|
-
let t = e.current;
|
|
905
|
-
if (!t) return;
|
|
906
|
-
let n = 0, r = () => {
|
|
907
|
-
n = 0, o({
|
|
908
|
-
top: t.scrollTop,
|
|
909
|
-
height: t.clientHeight || 800,
|
|
910
|
-
width: t.clientWidth
|
|
911
|
-
});
|
|
912
|
-
}, i = () => {
|
|
913
|
-
n ||= requestAnimationFrame(r);
|
|
914
|
-
};
|
|
915
|
-
r(), t.addEventListener("scroll", i, { passive: !0 });
|
|
916
|
-
let a = new ResizeObserver(i);
|
|
917
|
-
return a.observe(t), () => {
|
|
918
|
-
cancelAnimationFrame(n), t.removeEventListener("scroll", i), a.disconnect();
|
|
919
|
-
};
|
|
920
|
-
}, [e]);
|
|
921
|
-
let s = Math.max(0, Math.floor(a.top / n) - r), c = Math.min(t, Math.ceil((a.top + a.height) / n) + r);
|
|
922
|
-
return {
|
|
923
|
-
first: s,
|
|
924
|
-
last: c,
|
|
925
|
-
before: s * n,
|
|
926
|
-
after: Math.max(0, (t - c) * n),
|
|
927
|
-
width: a.width
|
|
928
|
-
};
|
|
929
|
-
}
|
|
930
|
-
function Z() {
|
|
931
|
-
let e = "(max-width: 720px)", [t, n] = (0, i.useState)(() => typeof window < "u" && window.matchMedia(e).matches);
|
|
932
|
-
return (0, i.useEffect)(() => {
|
|
933
|
-
let t = window.matchMedia(e), r = () => n(t.matches);
|
|
934
|
-
return t.addEventListener("change", r), () => t.removeEventListener("change", r);
|
|
935
|
-
}, []), t;
|
|
936
|
-
}
|
|
937
|
-
//#endregion
|
|
938
|
-
export { y as A, C, m as D, S as E, T as M, c as O, _ as S, o as T, X as _, A as a, D as b, W as c, J as d, M as f, Z as g, R as h, P as i, b as j, v as k, H as l, I as m, V as n, K as o, N as p, L as r, j as s, U as t, Y as u, w as v, x as w, g as x, p as y };
|