@tangle-network/sandbox-cli 0.21.27 → 0.21.29
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/graph-viewer/{Analytics-DocMpB6T.js → Analytics-DFWW8Phh.js} +260 -275
- package/dist/graph-viewer/Checks-qgqV4xgV.js +155 -0
- package/dist/graph-viewer/{Conversations-CISiWrR9.js → Conversations-CGB45kpj.js} +112 -80
- package/dist/graph-viewer/{Files-Dh8p_Fpw.js → Files-DtZhf0ii.js} +121 -106
- package/dist/graph-viewer/LiveRun-C21wUKAY.js +210 -0
- package/dist/graph-viewer/Overview-BjeLsA2I.js +506 -0
- package/dist/graph-viewer/{RunPage-nJwCsArn.js → RunPage-CkkcBEUe.js} +22 -22
- package/dist/graph-viewer/{Timeline-bPjhV3il.js → Timeline-C2Xolk0t.js} +84 -84
- package/dist/graph-viewer/{Today-pebCsPJ1.js → Today-BVVDtSVN.js} +65 -58
- package/dist/graph-viewer/Topology-DO5XX8e4.js +545 -0
- package/dist/graph-viewer/{Traces-C5x2UvJh.js → Traces-BhMxjNgw.js} +79 -52
- package/dist/graph-viewer/{WallPages-DSmRm2v3.js → WallPages-4d9QUZDq.js} +3 -3
- package/dist/graph-viewer/index.js +103 -102
- package/dist/graph-viewer/{lazy-pages-CpmkG5o2.js → lazy-pages-DM0cZM10.js} +4 -4
- package/dist/graph-viewer/{record-part-Cx9GDQeo.js → record-part-CZal_IMH.js} +382 -352
- package/dist/graph-viewer/report-viewer.js +7 -7
- package/dist/graph-viewer/styles.css +596 -284
- package/dist/graph-viewer/{ui-CEhDqce8.js → ui-D8QZRsC3.js} +143 -111
- package/dist/graph-viewer/viewer/{AgentGraphCanvas-D7jjAE6i-DecKyUGA.js → AgentGraphCanvas-CMdOlSlh-4EervjeC.js} +54 -48
- package/dist/graph-viewer/viewer/{Analytics-CtKucZjs.js → Analytics-DD__nbLm.js} +203 -218
- package/dist/graph-viewer/viewer/{AnswerStrip-DsI9aF-i.js → AnswerStrip-CGUyXuYH.js} +2 -2
- package/dist/graph-viewer/viewer/Checks-Ds5M7eAW.js +156 -0
- package/dist/graph-viewer/viewer/{Conversations-DQBCyko6.js → Conversations-C1n0EBBd.js} +124 -92
- package/dist/graph-viewer/viewer/{Files-B-g25gSO.js → Files-Cjr7NMU_.js} +63 -48
- package/dist/graph-viewer/viewer/{LiveRun-BMQnTpTZ.js → LiveRun-uPTkPSjo.js} +1223 -1164
- package/dist/graph-viewer/viewer/{Outputs-DXnN1wEQ.js → Outputs-CumGyjQo.js} +6 -6
- package/dist/graph-viewer/viewer/Overview-4Umk14_2.js +507 -0
- package/dist/graph-viewer/viewer/{RunPage-ChipoSdO.js → RunPage-DZlBW7Va.js} +28 -28
- package/dist/graph-viewer/viewer/{Scores-CjriXjf_.js → Scores-ZS16yk0n.js} +3 -3
- package/dist/graph-viewer/viewer/{Timeline-DzEzobA0.js → Timeline-BnK6-yBR.js} +24 -24
- package/dist/graph-viewer/viewer/{Today-DLHe_wTA.js → Today-a_-oNigi.js} +69 -62
- package/dist/graph-viewer/viewer/Topology-CQPCLQT6.js +546 -0
- package/dist/graph-viewer/viewer/{Traces-BWBulSPE.js → Traces-C0IGk0L4.js} +75 -48
- package/dist/graph-viewer/viewer/{WallPages-Crj-qPoK.js → WallPages-CzWpyIfp.js} +8 -8
- package/dist/graph-viewer/viewer/{WorkflowGraph-DYsP_Kcg-C0O7M5iH.js → WorkflowGraph-DZ3xejKE-jRXKeSrg.js} +6 -6
- package/dist/graph-viewer/viewer/{agent-timeline-C-UIhXgu.js → agent-timeline-Cs9Qbpvo.js} +437 -425
- package/dist/graph-viewer/viewer/{bot-Bivadvxn.js → bot-D6Nrej7Z.js} +1 -1
- package/dist/graph-viewer/viewer/{chevron-right-WW7tFY6B.js → chevron-right-D_5IKLxu.js} +1 -1
- package/dist/graph-viewer/viewer/{createLucideIcon-Z6KTw8ff.js → createLucideIcon-yH0cxLMy.js} +1 -1
- package/dist/graph-viewer/viewer/{data-azhapQrS.js → data-CkWfWr7i.js} +1 -1
- package/dist/graph-viewer/viewer/{dist-CyOc-K4O.js → dist-C1-7EfoW.js} +3 -3
- package/dist/graph-viewer/viewer/{file-text-B34N7Soo.js → file-text-m7a3piQF.js} +1 -1
- package/dist/graph-viewer/viewer/{final-output-Db2D9cMT.js → final-output-kwY11u9X.js} +1 -1
- package/dist/graph-viewer/viewer/{highlights-Bgg6O5ub.js → highlights-Btsi5OXl.js} +2 -2
- package/dist/graph-viewer/viewer/{jsx-runtime-BSzbUOFc.js → jsx-runtime-DQWyJOhv.js} +1 -1
- package/dist/graph-viewer/viewer/{lazy-pages-fgtpXQ00.js → lazy-pages-BowaGsg-.js} +6 -6
- package/dist/graph-viewer/viewer/{markdown-BpJEJUTW.js → markdown-CX_sVrXB.js} +17 -17
- package/dist/graph-viewer/viewer/{model-brand-bTcMjQtB-C9bHPsPk.js → model-brand-bTcMjQtB-fagiBQam.js} +3 -3
- package/dist/graph-viewer/viewer/{page-header-C6YCPkzJ.js → page-header-Brq611fd.js} +3 -3
- package/dist/graph-viewer/viewer/{popover-DrLB9iar.js → popover-CvOAjlnk.js} +4 -4
- package/dist/graph-viewer/viewer/{react-CisnW4fB.js → react-CY3IbSNO.js} +24 -24
- package/dist/graph-viewer/viewer/{react-dom-C5NDYQCD.js → react-dom-t1L4_-il.js} +1 -1
- package/dist/graph-viewer/viewer/{record-part-d0gKKrMI.js → record-part-D3_Anfpe.js} +455 -425
- package/dist/graph-viewer/viewer/{segmented-control-ChhLMa6h.js → segmented-control-BaJmvTNd.js} +39 -39
- package/dist/graph-viewer/viewer/{shiki-BwlTRTY6.js → shiki-Qnby7Sh6.js} +2 -2
- package/dist/graph-viewer/viewer/{stream-tokenizer-CaVb21TO.js → stream-tokenizer-CWtnjmRd.js} +1 -1
- package/dist/graph-viewer/viewer/{terminal-BxRacTx0.js → terminal-83J_I4Ne.js} +1 -1
- package/dist/graph-viewer/viewer/{themes-BxrCCwH5.js → themes-1i1fzpRk.js} +1 -1
- package/dist/graph-viewer/viewer/{ui-DZiGjPwl.js → ui-C9b1rIUH.js} +222 -190
- package/dist/graph-viewer/viewer/{workspace-DalRxssx.js → workspace-CekmOBs3.js} +76 -76
- package/dist/graph-viewer/viewer/{x-B_F8B4lq.js → x-DOc2URqZ.js} +1 -1
- package/dist/graph-viewer/workspace-viewer.js +103 -102
- package/package.json +6 -6
- package/dist/graph-viewer/Checks-CbnY4tuh.js +0 -113
- package/dist/graph-viewer/LiveRun-C-yKwkKs.js +0 -190
- package/dist/graph-viewer/Overview-BaXPdCFC.js +0 -477
- package/dist/graph-viewer/Topology-CyhuK6XW.js +0 -550
- package/dist/graph-viewer/viewer/Checks-DZTgeYlV.js +0 -114
- package/dist/graph-viewer/viewer/Overview-u7-8-rGx.js +0 -478
- package/dist/graph-viewer/viewer/Topology-Dsmuu27J.js +0 -551
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { i as e } from "./rolldown-runtime-DArdT4gl.js";
|
|
2
|
-
import { i as t, t as n } from "./jsx-runtime-
|
|
3
|
-
import { o as r } from "./markdown-
|
|
4
|
-
import { a as i, i as a, n as o, o as s, r as c, t as l } from "./workspace-
|
|
5
|
-
import { d as u, r as d, s as f, t as p } from "./final-output-
|
|
6
|
-
import { m, p as h } from "./data-
|
|
7
|
-
import { n as g, o as _, r as v, t as y } from "./Scores-
|
|
2
|
+
import { i as t, t as n } from "./jsx-runtime-DQWyJOhv.js";
|
|
3
|
+
import { o as r } from "./markdown-CX_sVrXB.js";
|
|
4
|
+
import { a as i, i as a, n as o, o as s, r as c, t as l } from "./workspace-CekmOBs3.js";
|
|
5
|
+
import { d as u, r as d, s as f, t as p } from "./final-output-kwY11u9X.js";
|
|
6
|
+
import { m, p as h } from "./data-CkWfWr7i.js";
|
|
7
|
+
import { n as g, o as _, r as v, t as y } from "./Scores-ZS16yk0n.js";
|
|
8
8
|
//#region src/workspace/outputs-model.ts
|
|
9
9
|
var b = /* @__PURE__ */ e(t(), 1), x = n(), S = {
|
|
10
10
|
md: "markdown",
|
|
@@ -0,0 +1,507 @@
|
|
|
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 { a as r, i, t as a } from "./popover-CvOAjlnk.js";
|
|
4
|
+
import { C as o, T as s, _ as c, a as l, b as u, h as d, j as f, s as p, t as m, v as h, w as g, x as _ } from "./ui-C9b1rIUH.js";
|
|
5
|
+
import { O as v } from "./data-CkWfWr7i.js";
|
|
6
|
+
import { t as y } from "./plain-words-CgvxtEOa.js";
|
|
7
|
+
import { agentParam as b } from "./RunPage-DZlBW7Va.js";
|
|
8
|
+
//#region src/workspace/run/Overview.tsx
|
|
9
|
+
var x = /* @__PURE__ */ e(t(), 1), S = n();
|
|
10
|
+
function C(e, t = Infinity) {
|
|
11
|
+
if (!e) return "";
|
|
12
|
+
let n = e.replace(/\/(home|mnt|Users|tmp|private)\/\S+/g, "").replace(/:?\s*\b[0-9a-f]{10,40}\b/g, "").replace(/\s+/g, " ").trim();
|
|
13
|
+
n = n.replace(/^(?:[\w-]+(?: [\w-]+){0,3}: )+(?=\S)/, (e) => e.split(": ").length > 2 ? "" : e), n = n.split(/(?<=[.;])\s|;\s|, the |, starting /)[0] ?? n;
|
|
14
|
+
let r = n.split(" ");
|
|
15
|
+
return r.length > t ? `${r.slice(0, t).join(" ").replace(/[.;,:]+$/, "")}…` : n.replace(/[.;,:]$/, "");
|
|
16
|
+
}
|
|
17
|
+
function w(e) {
|
|
18
|
+
let t = e.steps.filter(({ step: e }) => e.kind !== "waiting").map(({ step: e }) => [e.t, e.t + e.d]).sort((e, t) => e[0] - t[0]), n = [];
|
|
19
|
+
for (let [e, r] of t) {
|
|
20
|
+
let t = n[n.length - 1];
|
|
21
|
+
t && e <= t[1] + 3e4 ? t[1] = Math.max(t[1], r) : n.push([e, r]);
|
|
22
|
+
}
|
|
23
|
+
return n;
|
|
24
|
+
}
|
|
25
|
+
function T(e, t) {
|
|
26
|
+
let n = Math.max(1, e.duration) / t, r = Array.from({ length: t }, () => /* @__PURE__ */ new Set());
|
|
27
|
+
for (let { agent: i, step: a } of e.steps) if (a.kind !== "waiting") for (let e = Math.max(0, Math.floor(a.t / n)); e <= Math.min(t - 1, Math.floor((a.t + a.d) / n)); e++) r[e].add(i.id);
|
|
28
|
+
return r.map((e) => e.size);
|
|
29
|
+
}
|
|
30
|
+
function E(e) {
|
|
31
|
+
let { m: t, doc: n, play: r, route: i } = e, a = n.view, o = n.run, s = n.execution, c = (r?.runs ?? []).filter((e) => e.id !== n.run.id && e.startedAt && n.run.startedAt && e.startedAt > n.run.startedAt).sort((e, t) => e.startedAt < t.startedAt ? -1 : 1)[0], u = (0, x.useMemo)(() => w(t), [t]), d = new Date(t.t0).toISOString().slice(0, 10) !== new Date(t.t0 + t.duration).toISOString().slice(0, 10), p = u.reduce((e, [t, n]) => e + (n - t), 0), m = t.best, h = m && m.passed !== null && m.passed !== void 0 && m.total && m.passed === m.total, _ = a?.status.label ?? n.run.state, y = t.live ? `Running for ${g(t.duration)}${m ? `; best release ${m.release} passed ${m.passed}/${m.total} steps` : ", no release checked yet"}.` : h ? `Solved in ${g(t.duration)}: ${m.release} passed every step.` : `${_} after ${g(t.duration)}${m ? `; best release ${m.release} passed ${m.passed ?? 0}/${m.total ?? "?"} steps` : " with no release checked"}.`, b = C(o.ending?.reason ?? a?.blocker?.why ?? a?.blocker?.sentence, 26), T = s?.failedAttempts ?? 0, E = [b && `${b}.`, T && t.totals.lastStep !== null ? `Agents worked for ${g(p)}; ${T} later tries failed${s?.lastAttempt?.error ? `, the last on “${C(s.lastAttempt.error, 8)}”` : ""}.` : ""].filter(Boolean).join(" "), O = t.live ? "clock" : h ? "check" : "stop", A = [
|
|
32
|
+
{
|
|
33
|
+
at: n.run.startedAt,
|
|
34
|
+
title: "Run started",
|
|
35
|
+
sub: `${t.agents.length} agents${t.root?.model ? ` on ${t.root.model}` : ""}`,
|
|
36
|
+
tone: ""
|
|
37
|
+
},
|
|
38
|
+
...t.totals.lastStep === null ? [] : [{
|
|
39
|
+
at: new Date(t.t0 + t.totals.lastStep).toISOString(),
|
|
40
|
+
title: t.live ? "Latest agent step" : "Last agent step",
|
|
41
|
+
sub: `+${g(t.totals.lastStep)} into the run`,
|
|
42
|
+
tone: t.duration - t.totals.lastStep > 18e5 ? "warn" : ""
|
|
43
|
+
}],
|
|
44
|
+
...s?.lastAttempt?.error ? [{
|
|
45
|
+
at: s.lastAttempt.at ?? null,
|
|
46
|
+
title: "Last try failed",
|
|
47
|
+
sub: C(s.lastAttempt.error, 10),
|
|
48
|
+
tone: "fail"
|
|
49
|
+
}] : [],
|
|
50
|
+
t.live ? {
|
|
51
|
+
at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
52
|
+
title: "Running now",
|
|
53
|
+
sub: `${t.agents.filter((e) => e.state.tone === "live").length} agents live`,
|
|
54
|
+
tone: "next"
|
|
55
|
+
} : {
|
|
56
|
+
at: o.ending?.at ?? n.run.settledAt,
|
|
57
|
+
title: _,
|
|
58
|
+
sub: c ? `continued in run ${v(n.run.play, c.id)}` : C(o.ending?.sentence, 8),
|
|
59
|
+
tone: "next"
|
|
60
|
+
}
|
|
61
|
+
];
|
|
62
|
+
return /* @__PURE__ */ (0, S.jsxs)("div", {
|
|
63
|
+
className: "rp-ov",
|
|
64
|
+
children: [
|
|
65
|
+
/* @__PURE__ */ (0, S.jsxs)("section", {
|
|
66
|
+
className: "rp-card rp-vd",
|
|
67
|
+
"aria-label": "Verdict",
|
|
68
|
+
children: [/* @__PURE__ */ (0, S.jsxs)("div", {
|
|
69
|
+
className: "rp-vd-top",
|
|
70
|
+
children: [
|
|
71
|
+
/* @__PURE__ */ (0, S.jsx)("div", {
|
|
72
|
+
className: "rp-vd-ic",
|
|
73
|
+
children: /* @__PURE__ */ (0, S.jsx)(l, {
|
|
74
|
+
name: O,
|
|
75
|
+
size: 22
|
|
76
|
+
})
|
|
77
|
+
}),
|
|
78
|
+
/* @__PURE__ */ (0, S.jsxs)("div", { children: [/* @__PURE__ */ (0, S.jsx)("h2", {
|
|
79
|
+
className: "rp-verdict",
|
|
80
|
+
children: y
|
|
81
|
+
}), E && /* @__PURE__ */ (0, S.jsx)("p", {
|
|
82
|
+
className: "rp-lede",
|
|
83
|
+
children: E
|
|
84
|
+
})] }),
|
|
85
|
+
/* @__PURE__ */ (0, S.jsxs)("div", {
|
|
86
|
+
className: "rp-vd-act",
|
|
87
|
+
children: [t.live ? /* @__PURE__ */ (0, S.jsxs)("a", {
|
|
88
|
+
className: "rp-btn primary",
|
|
89
|
+
href: i.href("timeline"),
|
|
90
|
+
children: ["Watch the timeline", /* @__PURE__ */ (0, S.jsx)(l, { name: "arrow" })]
|
|
91
|
+
}) : c ? /* @__PURE__ */ (0, S.jsxs)("a", {
|
|
92
|
+
className: "rp-btn primary",
|
|
93
|
+
href: `/run/${encodeURIComponent(c.id)}`,
|
|
94
|
+
children: [
|
|
95
|
+
"Open run ",
|
|
96
|
+
v(n.run.play, c.id),
|
|
97
|
+
/* @__PURE__ */ (0, S.jsx)(l, { name: "arrow" })
|
|
98
|
+
]
|
|
99
|
+
}) : m ? /* @__PURE__ */ (0, S.jsxs)("a", {
|
|
100
|
+
className: "rp-btn primary",
|
|
101
|
+
href: i.href("checks"),
|
|
102
|
+
children: [
|
|
103
|
+
"Review ",
|
|
104
|
+
m.release,
|
|
105
|
+
/* @__PURE__ */ (0, S.jsx)(l, { name: "arrow" })
|
|
106
|
+
]
|
|
107
|
+
}) : /* @__PURE__ */ (0, S.jsxs)("a", {
|
|
108
|
+
className: "rp-btn primary",
|
|
109
|
+
href: i.href("files"),
|
|
110
|
+
children: ["Open the files", /* @__PURE__ */ (0, S.jsx)(l, { name: "arrow" })]
|
|
111
|
+
}), (t.live || c || m) && /* @__PURE__ */ (0, S.jsx)("a", {
|
|
112
|
+
className: "rp-btn framed",
|
|
113
|
+
href: i.href("files"),
|
|
114
|
+
children: "Files"
|
|
115
|
+
})]
|
|
116
|
+
})
|
|
117
|
+
]
|
|
118
|
+
}), /* @__PURE__ */ (0, S.jsx)("ol", {
|
|
119
|
+
className: "rp-story",
|
|
120
|
+
children: A.map((e, t) => /* @__PURE__ */ (0, S.jsxs)("li", { children: [
|
|
121
|
+
/* @__PURE__ */ (0, S.jsx)("span", { className: `sd ${e.tone}` }),
|
|
122
|
+
/* @__PURE__ */ (0, S.jsx)("time", { children: e.at ? f(e.at, d) : "—" }),
|
|
123
|
+
/* @__PURE__ */ (0, S.jsx)("b", { children: e.title }),
|
|
124
|
+
/* @__PURE__ */ (0, S.jsx)("span", {
|
|
125
|
+
title: e.sub,
|
|
126
|
+
children: e.sub
|
|
127
|
+
})
|
|
128
|
+
] }, t))
|
|
129
|
+
})]
|
|
130
|
+
}),
|
|
131
|
+
/* @__PURE__ */ (0, S.jsx)(D, { ...e }),
|
|
132
|
+
/* @__PURE__ */ (0, S.jsxs)("div", {
|
|
133
|
+
className: "rp-ov-b",
|
|
134
|
+
children: [/* @__PURE__ */ (0, S.jsx)(k, {
|
|
135
|
+
m: t,
|
|
136
|
+
working: p,
|
|
137
|
+
failed: T
|
|
138
|
+
}), /* @__PURE__ */ (0, S.jsx)(j, { ...e })]
|
|
139
|
+
})
|
|
140
|
+
]
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
function D({ m: e, doc: t, route: n }) {
|
|
144
|
+
let s = t.run.check, c = s?.checkerNames?.find((e) => e.current) ?? s?.checkerNames?.[0], d = y(t.input?.objective), f = (t.findings?.items ?? []).filter((e) => e.path), m = e.agents.filter((e) => e.node.hasCode).length, h = e.agents.reduce((e, t) => e + (t.commits ?? 0), 0), g = e.best, _ = u(s), v = s?.counts?.checks ? `${c ? `Checker ${c.label}` : "The checker"} ran ${o(s.counts.checks)} times` : "No check has run";
|
|
145
|
+
return /* @__PURE__ */ (0, S.jsxs)("section", {
|
|
146
|
+
className: "rp-card rp-sum",
|
|
147
|
+
"aria-label": "Summary",
|
|
148
|
+
children: [
|
|
149
|
+
/* @__PURE__ */ (0, S.jsxs)("div", { children: [
|
|
150
|
+
/* @__PURE__ */ (0, S.jsx)("h3", { children: "Goal" }),
|
|
151
|
+
/* @__PURE__ */ (0, S.jsx)("div", {
|
|
152
|
+
className: "goal",
|
|
153
|
+
children: C(d) || "Not recorded"
|
|
154
|
+
}),
|
|
155
|
+
d && /* @__PURE__ */ (0, S.jsxs)(a, { children: [/* @__PURE__ */ (0, S.jsx)(r, {
|
|
156
|
+
asChild: !0,
|
|
157
|
+
children: /* @__PURE__ */ (0, S.jsx)("button", {
|
|
158
|
+
type: "button",
|
|
159
|
+
className: "rp-link",
|
|
160
|
+
children: "Read the goal"
|
|
161
|
+
})
|
|
162
|
+
}), /* @__PURE__ */ (0, S.jsxs)(i, {
|
|
163
|
+
className: "rp-pop wide",
|
|
164
|
+
align: "start",
|
|
165
|
+
children: [/* @__PURE__ */ (0, S.jsxs)("div", {
|
|
166
|
+
className: "ph",
|
|
167
|
+
children: [/* @__PURE__ */ (0, S.jsx)("b", { children: "Goal" }), /* @__PURE__ */ (0, S.jsx)("span", { children: "as pressed" })]
|
|
168
|
+
}), /* @__PURE__ */ (0, S.jsx)("div", {
|
|
169
|
+
className: "rp-pop-goal",
|
|
170
|
+
children: d
|
|
171
|
+
})]
|
|
172
|
+
})] })
|
|
173
|
+
] }),
|
|
174
|
+
/* @__PURE__ */ (0, S.jsxs)("div", { children: [
|
|
175
|
+
/* @__PURE__ */ (0, S.jsx)("h3", { children: "Check" }),
|
|
176
|
+
/* @__PURE__ */ (0, S.jsxs)("div", {
|
|
177
|
+
className: "v",
|
|
178
|
+
children: [/* @__PURE__ */ (0, S.jsx)(p, { tone: _.tone }), _.word]
|
|
179
|
+
}),
|
|
180
|
+
/* @__PURE__ */ (0, S.jsx)("div", {
|
|
181
|
+
className: "sub",
|
|
182
|
+
children: _.note ? `${_.note}.` : `${v}.`
|
|
183
|
+
}),
|
|
184
|
+
/* @__PURE__ */ (0, S.jsx)("a", {
|
|
185
|
+
className: "rp-link",
|
|
186
|
+
href: n.href("checks"),
|
|
187
|
+
children: "See the checks"
|
|
188
|
+
})
|
|
189
|
+
] }),
|
|
190
|
+
/* @__PURE__ */ (0, S.jsxs)("div", { children: [
|
|
191
|
+
/* @__PURE__ */ (0, S.jsx)("h3", { children: "Best release" }),
|
|
192
|
+
/* @__PURE__ */ (0, S.jsx)("div", {
|
|
193
|
+
className: "v",
|
|
194
|
+
children: g ? `${g.release}${g.total ? ` · ${g.passed ?? 0}/${g.total}` : ""}` : "None"
|
|
195
|
+
}),
|
|
196
|
+
/* @__PURE__ */ (0, S.jsx)("div", {
|
|
197
|
+
className: "sub",
|
|
198
|
+
children: g ? g.sentence ? C(g.sentence, 14) : `${e.releases.length} releases checked` : e.releases.length ? `${e.releases.length} releases, none scored` : `${o(h)} commits, none tagged`
|
|
199
|
+
})
|
|
200
|
+
] }),
|
|
201
|
+
/* @__PURE__ */ (0, S.jsxs)("div", { children: [
|
|
202
|
+
/* @__PURE__ */ (0, S.jsx)("h3", { children: "Work kept" }),
|
|
203
|
+
/* @__PURE__ */ (0, S.jsxs)("div", {
|
|
204
|
+
className: "v",
|
|
205
|
+
children: [
|
|
206
|
+
o(f.length),
|
|
207
|
+
" pages · ",
|
|
208
|
+
o(m),
|
|
209
|
+
" branches"
|
|
210
|
+
]
|
|
211
|
+
}),
|
|
212
|
+
/* @__PURE__ */ (0, S.jsxs)("div", {
|
|
213
|
+
className: "files",
|
|
214
|
+
children: [f.slice(0, 3).map((e, t, r) => /* @__PURE__ */ (0, S.jsxs)("a", {
|
|
215
|
+
href: n.href("files", { file: `page:${e.path}` }),
|
|
216
|
+
title: e.path,
|
|
217
|
+
children: [/* @__PURE__ */ (0, S.jsx)(l, {
|
|
218
|
+
name: "file",
|
|
219
|
+
size: 14
|
|
220
|
+
}), /* @__PURE__ */ (0, S.jsx)("span", { children: O(e.path, r.map((e) => e.path)) })]
|
|
221
|
+
}, e.path)), f.length > 3 && /* @__PURE__ */ (0, S.jsx)("a", {
|
|
222
|
+
href: n.href("files"),
|
|
223
|
+
children: /* @__PURE__ */ (0, S.jsxs)("span", { children: [f.length - 3, " more"] })
|
|
224
|
+
})]
|
|
225
|
+
})
|
|
226
|
+
] })
|
|
227
|
+
]
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
function O(e, t) {
|
|
231
|
+
let n = e.split("/"), r = (e, t) => e.split("/").slice(-t).join("/"), i = 1;
|
|
232
|
+
for (; i < n.length && t.some((t) => t !== e && r(t, i) === r(e, i));) i++;
|
|
233
|
+
return r(e, i);
|
|
234
|
+
}
|
|
235
|
+
function k({ m: e, working: t, failed: n }) {
|
|
236
|
+
let r = (0, x.useMemo)(() => T(e, 96), [e]), i = Math.max(1, ...r), a = (t) => `${Math.max(0, Math.min(100, t / Math.max(1, e.duration) * 100))}%`, o = e.duration > 36e5 ? Math.floor(e.duration / 36e5) : 0, s = new Date(e.t0).toISOString().slice(0, 10) !== new Date(e.t0 + e.duration).toISOString().slice(0, 10), c = e.duration * (s ? .16 : .08), l = o <= 10 ? 1 : Math.ceil(o / 8), u = o ? Array.from({ length: o }, (e, t) => t + 1).filter((t) => t % l === 0 && t * 36e5 >= c && (t + l) * 36e5 <= e.duration && t * 36e5 <= e.duration - c) : [], d = e.tree.filter((e) => e.restarts.length).sort((e, t) => t.restarts.length - e.restarts.length).slice(0, 14), p = (t) => s ? f(new Date(e.t0 + t).toISOString(), !0).replace(" UTC", "") : _(e.t0)(t);
|
|
237
|
+
return /* @__PURE__ */ (0, S.jsxs)("section", {
|
|
238
|
+
className: "rp-card",
|
|
239
|
+
"aria-label": "Where the time went",
|
|
240
|
+
children: [/* @__PURE__ */ (0, S.jsxs)("div", {
|
|
241
|
+
className: "rp-hd sm",
|
|
242
|
+
children: [/* @__PURE__ */ (0, S.jsxs)("h2", { children: [
|
|
243
|
+
"Where the ",
|
|
244
|
+
g(e.duration),
|
|
245
|
+
" went"
|
|
246
|
+
] }), /* @__PURE__ */ (0, S.jsxs)("span", {
|
|
247
|
+
className: "end rp-keys",
|
|
248
|
+
children: [
|
|
249
|
+
/* @__PURE__ */ (0, S.jsxs)("span", {
|
|
250
|
+
className: "rp-key",
|
|
251
|
+
children: [
|
|
252
|
+
/* @__PURE__ */ (0, S.jsx)("i", { className: "work" }),
|
|
253
|
+
/* @__PURE__ */ (0, S.jsx)("b", { children: g(t) }),
|
|
254
|
+
" agents working"
|
|
255
|
+
]
|
|
256
|
+
}),
|
|
257
|
+
/* @__PURE__ */ (0, S.jsxs)("span", {
|
|
258
|
+
className: "rp-key",
|
|
259
|
+
children: [
|
|
260
|
+
/* @__PURE__ */ (0, S.jsx)("i", { className: "hatch" }),
|
|
261
|
+
/* @__PURE__ */ (0, S.jsx)("b", { children: g(Math.max(0, e.duration - t)) }),
|
|
262
|
+
" idle"
|
|
263
|
+
]
|
|
264
|
+
}),
|
|
265
|
+
n > 0 && /* @__PURE__ */ (0, S.jsxs)("span", {
|
|
266
|
+
className: "rp-key",
|
|
267
|
+
children: [
|
|
268
|
+
/* @__PURE__ */ (0, S.jsx)("span", {
|
|
269
|
+
className: "x",
|
|
270
|
+
children: "✕"
|
|
271
|
+
}),
|
|
272
|
+
/* @__PURE__ */ (0, S.jsx)("b", { children: n }),
|
|
273
|
+
" tries failed"
|
|
274
|
+
]
|
|
275
|
+
})
|
|
276
|
+
]
|
|
277
|
+
})]
|
|
278
|
+
}), /* @__PURE__ */ (0, S.jsx)("div", {
|
|
279
|
+
className: "rp-twrap",
|
|
280
|
+
children: /* @__PURE__ */ (0, S.jsxs)("div", {
|
|
281
|
+
className: "rp-tg",
|
|
282
|
+
children: [
|
|
283
|
+
/* @__PURE__ */ (0, S.jsx)("span", {
|
|
284
|
+
className: "nm h",
|
|
285
|
+
children: "Agents at once"
|
|
286
|
+
}),
|
|
287
|
+
/* @__PURE__ */ (0, S.jsx)("div", {
|
|
288
|
+
className: "rp-strip",
|
|
289
|
+
role: "img",
|
|
290
|
+
"aria-label": `Agents working at once over the run, peak ${i}; they worked ${g(t)} of ${g(e.duration)}`,
|
|
291
|
+
children: r.map((t, n) => /* @__PURE__ */ (0, S.jsx)("i", {
|
|
292
|
+
className: t ? void 0 : "idle",
|
|
293
|
+
title: `${p(n * e.duration / r.length)}: ${t} working`,
|
|
294
|
+
style: {
|
|
295
|
+
left: `${n * 100 / r.length}%`,
|
|
296
|
+
width: `${100 / r.length}%`,
|
|
297
|
+
height: t ? `${Math.max(10, t / i * 100)}%` : void 0
|
|
298
|
+
}
|
|
299
|
+
}, n))
|
|
300
|
+
}),
|
|
301
|
+
/* @__PURE__ */ (0, S.jsxs)("span", {
|
|
302
|
+
className: "ct",
|
|
303
|
+
children: ["peak ", i]
|
|
304
|
+
}),
|
|
305
|
+
/* @__PURE__ */ (0, S.jsx)("span", {}),
|
|
306
|
+
/* @__PURE__ */ (0, S.jsxs)("div", {
|
|
307
|
+
className: "rp-strip-ax",
|
|
308
|
+
children: [
|
|
309
|
+
/* @__PURE__ */ (0, S.jsx)("span", {
|
|
310
|
+
className: "first",
|
|
311
|
+
style: { left: 0 },
|
|
312
|
+
children: p(0)
|
|
313
|
+
}),
|
|
314
|
+
u.map((e) => /* @__PURE__ */ (0, S.jsxs)("span", {
|
|
315
|
+
className: e % 4 ? "ph-hide" : void 0,
|
|
316
|
+
style: { left: a(e * 36e5) },
|
|
317
|
+
children: [e, "h"]
|
|
318
|
+
}, e)),
|
|
319
|
+
/* @__PURE__ */ (0, S.jsx)("span", {
|
|
320
|
+
className: "last",
|
|
321
|
+
style: { left: "100%" },
|
|
322
|
+
children: p(e.duration)
|
|
323
|
+
})
|
|
324
|
+
]
|
|
325
|
+
}),
|
|
326
|
+
/* @__PURE__ */ (0, S.jsx)("span", {}),
|
|
327
|
+
d.length > 0 && /* @__PURE__ */ (0, S.jsxs)(S.Fragment, { children: [/* @__PURE__ */ (0, S.jsxs)("div", {
|
|
328
|
+
className: "rp-tries-h",
|
|
329
|
+
children: [/* @__PURE__ */ (0, S.jsx)("b", { children: "Restarts by agent" }), /* @__PURE__ */ (0, S.jsxs)("span", {
|
|
330
|
+
className: "end rp-keys",
|
|
331
|
+
children: [/* @__PURE__ */ (0, S.jsxs)("span", {
|
|
332
|
+
className: "rp-key",
|
|
333
|
+
children: [/* @__PURE__ */ (0, S.jsx)("span", {
|
|
334
|
+
className: "x",
|
|
335
|
+
children: "✕"
|
|
336
|
+
}), "Restart"]
|
|
337
|
+
}), /* @__PURE__ */ (0, S.jsxs)("span", {
|
|
338
|
+
className: "rp-key",
|
|
339
|
+
children: [/* @__PURE__ */ (0, S.jsx)("span", { className: "rp-dot ok" }), "Finished"]
|
|
340
|
+
})]
|
|
341
|
+
})]
|
|
342
|
+
}), d.map((t) => /* @__PURE__ */ (0, S.jsx)(A, {
|
|
343
|
+
m: e,
|
|
344
|
+
a: t,
|
|
345
|
+
X: a
|
|
346
|
+
}, t.id))] })
|
|
347
|
+
]
|
|
348
|
+
})
|
|
349
|
+
})]
|
|
350
|
+
});
|
|
351
|
+
}
|
|
352
|
+
function A({ m: e, a: t, X: n }) {
|
|
353
|
+
let r = d(() => /* @__PURE__ */ (0, S.jsx)(m, {
|
|
354
|
+
m: e,
|
|
355
|
+
a: t
|
|
356
|
+
}), { wide: t.tools.length > 0 });
|
|
357
|
+
return /* @__PURE__ */ (0, S.jsxs)(S.Fragment, { children: [
|
|
358
|
+
/* @__PURE__ */ (0, S.jsx)("span", {
|
|
359
|
+
className: "nm",
|
|
360
|
+
title: t.name,
|
|
361
|
+
children: t.name
|
|
362
|
+
}),
|
|
363
|
+
/* @__PURE__ */ (0, S.jsxs)("div", {
|
|
364
|
+
className: "rp-tr-row",
|
|
365
|
+
tabIndex: 0,
|
|
366
|
+
"aria-label": `${t.name}: ${t.restarts.length} restarts`,
|
|
367
|
+
...r,
|
|
368
|
+
children: [
|
|
369
|
+
/* @__PURE__ */ (0, S.jsx)("span", {
|
|
370
|
+
className: "life",
|
|
371
|
+
style: {
|
|
372
|
+
left: n(Math.max(0, t.start ?? 0)),
|
|
373
|
+
right: `calc(100% - ${n(t.end ?? e.duration)})`
|
|
374
|
+
}
|
|
375
|
+
}),
|
|
376
|
+
t.restarts.map((e, t) => /* @__PURE__ */ (0, S.jsx)("span", {
|
|
377
|
+
className: "mk",
|
|
378
|
+
style: { left: n(e) },
|
|
379
|
+
children: "✕"
|
|
380
|
+
}, t)),
|
|
381
|
+
s(t.state.tone) && t.end !== null && /* @__PURE__ */ (0, S.jsx)("span", {
|
|
382
|
+
className: "mk ok",
|
|
383
|
+
style: { left: n(t.end) }
|
|
384
|
+
})
|
|
385
|
+
]
|
|
386
|
+
}),
|
|
387
|
+
/* @__PURE__ */ (0, S.jsx)("span", {
|
|
388
|
+
className: "ct",
|
|
389
|
+
children: t.restarts.length || "—"
|
|
390
|
+
})
|
|
391
|
+
] });
|
|
392
|
+
}
|
|
393
|
+
function j({ m: e, route: t, doc: n }) {
|
|
394
|
+
let r = (0, x.useMemo)(() => [...e.agents].sort((e, t) => (t.tokens ?? -1) - (e.tokens ?? -1)), [e]), i = (0, x.useRef)(null), a = c(i, r.length, 32), o = e.totals.lastStep ?? e.duration, s = (0, x.useMemo)(() => {
|
|
395
|
+
let t = 1;
|
|
396
|
+
for (let n of e.agents) {
|
|
397
|
+
let e = Array(28).fill(0);
|
|
398
|
+
for (let t of n.steps) t.t <= o && e[Math.min(27, Math.floor(t.t / Math.max(1, o) * 28))]++;
|
|
399
|
+
t = Math.max(t, ...e);
|
|
400
|
+
}
|
|
401
|
+
return t;
|
|
402
|
+
}, [e, o]);
|
|
403
|
+
return /* @__PURE__ */ (0, S.jsxs)("section", {
|
|
404
|
+
className: "rp-card",
|
|
405
|
+
"aria-label": "Agents",
|
|
406
|
+
children: [
|
|
407
|
+
/* @__PURE__ */ (0, S.jsxs)("div", {
|
|
408
|
+
className: "rp-hd sm",
|
|
409
|
+
children: [/* @__PURE__ */ (0, S.jsxs)("h2", { children: ["Agents", /* @__PURE__ */ (0, S.jsx)("span", {
|
|
410
|
+
className: "ct",
|
|
411
|
+
children: e.agents.length
|
|
412
|
+
})] }), /* @__PURE__ */ (0, S.jsx)("span", {
|
|
413
|
+
className: "end",
|
|
414
|
+
children: /* @__PURE__ */ (0, S.jsxs)("a", {
|
|
415
|
+
className: "rp-btn sm",
|
|
416
|
+
href: t.href("topology"),
|
|
417
|
+
children: ["Topology", /* @__PURE__ */ (0, S.jsx)(l, {
|
|
418
|
+
name: "arrow",
|
|
419
|
+
size: 14
|
|
420
|
+
})]
|
|
421
|
+
})
|
|
422
|
+
})]
|
|
423
|
+
}),
|
|
424
|
+
/* @__PURE__ */ (0, S.jsxs)("div", {
|
|
425
|
+
className: "rp-agt-h",
|
|
426
|
+
children: [
|
|
427
|
+
/* @__PURE__ */ (0, S.jsx)("span", {}),
|
|
428
|
+
/* @__PURE__ */ (0, S.jsx)("span", { children: "Agent" }),
|
|
429
|
+
/* @__PURE__ */ (0, S.jsxs)("span", {
|
|
430
|
+
className: "ph-hide",
|
|
431
|
+
title: `When each agent worked, over the run's ${g(o)}`,
|
|
432
|
+
children: ["Activity · ", g(o).split(" ")[0]]
|
|
433
|
+
}),
|
|
434
|
+
/* @__PURE__ */ (0, S.jsx)("span", { children: "Steps" }),
|
|
435
|
+
/* @__PURE__ */ (0, S.jsx)("span", { children: "Tokens" })
|
|
436
|
+
]
|
|
437
|
+
}),
|
|
438
|
+
/* @__PURE__ */ (0, S.jsxs)("div", {
|
|
439
|
+
className: "rp-scroll",
|
|
440
|
+
ref: i,
|
|
441
|
+
children: [
|
|
442
|
+
/* @__PURE__ */ (0, S.jsx)("div", { style: { height: a.before } }),
|
|
443
|
+
r.slice(a.first, a.last).map((r) => /* @__PURE__ */ (0, S.jsx)(M, {
|
|
444
|
+
m: e,
|
|
445
|
+
a: r,
|
|
446
|
+
bins: 28,
|
|
447
|
+
end: o,
|
|
448
|
+
peak: s,
|
|
449
|
+
href: t.href("timeline", { agent: b(n.run.id, r.id) })
|
|
450
|
+
}, r.id)),
|
|
451
|
+
/* @__PURE__ */ (0, S.jsx)("div", { style: { height: a.after } })
|
|
452
|
+
]
|
|
453
|
+
})
|
|
454
|
+
]
|
|
455
|
+
});
|
|
456
|
+
}
|
|
457
|
+
function M({ m: e, a: t, bins: n, end: r, peak: i, href: a }) {
|
|
458
|
+
let s = d(() => /* @__PURE__ */ (0, S.jsx)(m, {
|
|
459
|
+
m: e,
|
|
460
|
+
a: t
|
|
461
|
+
}), { wide: t.tools.length > 0 }), c = Array(n).fill(0);
|
|
462
|
+
for (let e of t.steps) e.t <= r && c[Math.min(n - 1, Math.floor(e.t / Math.max(1, r) * n))]++;
|
|
463
|
+
let l = 120 / n;
|
|
464
|
+
return /* @__PURE__ */ (0, S.jsxs)("a", {
|
|
465
|
+
className: "rp-agt",
|
|
466
|
+
href: a,
|
|
467
|
+
...s,
|
|
468
|
+
children: [
|
|
469
|
+
/* @__PURE__ */ (0, S.jsx)(p, { tone: t.state.tone }),
|
|
470
|
+
/* @__PURE__ */ (0, S.jsx)("span", {
|
|
471
|
+
className: "nm",
|
|
472
|
+
children: t.name
|
|
473
|
+
}),
|
|
474
|
+
/* @__PURE__ */ (0, S.jsxs)("svg", {
|
|
475
|
+
className: "ph-hide",
|
|
476
|
+
viewBox: "0 0 120 16",
|
|
477
|
+
"aria-hidden": "true",
|
|
478
|
+
children: [/* @__PURE__ */ (0, S.jsx)("line", {
|
|
479
|
+
x1: "0",
|
|
480
|
+
x2: "120",
|
|
481
|
+
y1: "15.5",
|
|
482
|
+
y2: "15.5",
|
|
483
|
+
className: "base"
|
|
484
|
+
}), c.map((e, t) => {
|
|
485
|
+
let n = e ? 6 + Math.sqrt(e / i) * 10 : 0;
|
|
486
|
+
return n ? /* @__PURE__ */ (0, S.jsx)("rect", {
|
|
487
|
+
x: t * l + .5,
|
|
488
|
+
width: l - 1.2,
|
|
489
|
+
y: 16 - n,
|
|
490
|
+
height: n,
|
|
491
|
+
rx: "1"
|
|
492
|
+
}, t) : null;
|
|
493
|
+
})]
|
|
494
|
+
}),
|
|
495
|
+
/* @__PURE__ */ (0, S.jsx)("span", {
|
|
496
|
+
className: "v",
|
|
497
|
+
children: t.steps.length ? o(t.steps.length) : "—"
|
|
498
|
+
}),
|
|
499
|
+
/* @__PURE__ */ (0, S.jsx)("span", {
|
|
500
|
+
className: "v",
|
|
501
|
+
children: t.tokens === null ? "—" : h(t.tokens)
|
|
502
|
+
})
|
|
503
|
+
]
|
|
504
|
+
});
|
|
505
|
+
}
|
|
506
|
+
//#endregion
|
|
507
|
+
export { E as Overview, C as clause };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { i as e } from "./rolldown-runtime-DArdT4gl.js";
|
|
2
|
-
import { i as t, t as n } from "./jsx-runtime-
|
|
3
|
-
import { t as r } from "./page-header-
|
|
4
|
-
import { C as i,
|
|
5
|
-
import { O as d, R as f, n as p, p as m } from "./data-
|
|
6
|
-
import { o as h } from "./lazy-pages-
|
|
2
|
+
import { i as t, t as n } from "./jsx-runtime-DQWyJOhv.js";
|
|
3
|
+
import { t as r } from "./page-header-Brq611fd.js";
|
|
4
|
+
import { C as i, M as a, o, r as s, v as c, w as l, y as u } from "./ui-C9b1rIUH.js";
|
|
5
|
+
import { O as d, R as f, n as p, p as m } from "./data-CkWfWr7i.js";
|
|
6
|
+
import { o as h } from "./lazy-pages-BowaGsg-.js";
|
|
7
7
|
//#region src/workspace/run/RunPage.tsx
|
|
8
8
|
var g = /* @__PURE__ */ e(t(), 1), _ = n(), v = [
|
|
9
9
|
"overview",
|
|
@@ -23,7 +23,7 @@ var g = /* @__PURE__ */ e(t(), 1), _ = n(), v = [
|
|
|
23
23
|
traces: "Traces",
|
|
24
24
|
analytics: "Analytics",
|
|
25
25
|
checks: "Checks"
|
|
26
|
-
}, b = (0, g.lazy)(() => import("./Overview-
|
|
26
|
+
}, b = (0, g.lazy)(() => import("./Overview-4Umk14_2.js").catch(h).then((e) => ({ default: e.Overview }))), x = (0, g.lazy)(() => import("./Timeline-BnK6-yBR.js").catch(h).then((e) => ({ default: e.TimelineTab }))), S = (0, g.lazy)(() => import("./Files-Cjr7NMU_.js").catch(h).then((e) => ({ default: e.Files }))), C = (0, g.lazy)(() => import("./Topology-CQPCLQT6.js").catch(h).then((e) => ({ default: e.Topology }))), w = (0, g.lazy)(() => import("./Conversations-C1n0EBBd.js").catch(h).then((e) => ({ default: e.Conversations }))), T = (0, g.lazy)(() => import("./Traces-C0IGk0L4.js").catch(h).then((e) => ({ default: e.Traces }))), E = (0, g.lazy)(() => import("./Analytics-DD__nbLm.js").catch(h).then((e) => ({ default: e.Analytics }))), D = (0, g.lazy)(() => import("./Checks-Ds5M7eAW.js").catch(h).then((e) => ({ default: e.Checks }))), O = {
|
|
27
27
|
agents: "conversations",
|
|
28
28
|
spend: "analytics",
|
|
29
29
|
progress: "overview"
|
|
@@ -81,17 +81,17 @@ var j = (e, t) => t === e ? "root" : t.startsWith(`${e}:`) ? t.slice(e.length +
|
|
|
81
81
|
return e.byId.has(r) ? r : null;
|
|
82
82
|
};
|
|
83
83
|
function N({ api: e, id: t, legacy: n }) {
|
|
84
|
-
let
|
|
84
|
+
let a = A(t), c = `${e}/runs/${encodeURIComponent(t)}`, l = m(c, void 0, !0), h = !!l.data?.execution?.alive, N = m(`${c}/workspace`, h ? 15e3 : void 0, !0), F = m(l.data ? `${e}/plays/${encodeURIComponent(l.data.run.play)}` : null), I = (0, g.useMemo)(() => N.data && l.data ? u(N.data, l.data.run) : null, [N.data, l.data]), L = a.params.get("section"), R = L ? O[L] : void 0;
|
|
85
85
|
(0, g.useEffect)(() => {
|
|
86
86
|
if (!R) return;
|
|
87
|
-
let e =
|
|
88
|
-
|
|
87
|
+
let e = a.params.get("node");
|
|
88
|
+
a.go(R, {
|
|
89
89
|
agent: e ? j(t, e) : void 0,
|
|
90
|
-
file:
|
|
90
|
+
file: a.params.get("file") ?? void 0
|
|
91
91
|
}, !0);
|
|
92
92
|
}, [R]);
|
|
93
|
-
let z =
|
|
94
|
-
|
|
93
|
+
let z = a.tab ?? "overview", B = I ? M(I, t, a.params.get("agent")) ?? I.root?.id ?? null : null, V = (0, g.useCallback)((e, n) => a.go(n ?? z, { agent: e ? j(t, e) : null }), [
|
|
94
|
+
a,
|
|
95
95
|
z,
|
|
96
96
|
t
|
|
97
97
|
]), H = (0, g.useRef)(null);
|
|
@@ -106,9 +106,9 @@ function N({ api: e, id: t, legacy: n }) {
|
|
|
106
106
|
children: "Loading…"
|
|
107
107
|
});
|
|
108
108
|
let U = l.data, W = I ? {
|
|
109
|
-
conversations:
|
|
110
|
-
traces:
|
|
111
|
-
checks:
|
|
109
|
+
conversations: i(I.agents.filter((e) => e.steps.length || e.turns).length),
|
|
110
|
+
traces: i(I.totals.steps),
|
|
111
|
+
checks: i(U.run.check?.counts?.checks ?? I.releases.length)
|
|
112
112
|
} : {}, G = (e) => {
|
|
113
113
|
let t = v.indexOf(z), n = {
|
|
114
114
|
ArrowRight: t + 1,
|
|
@@ -119,21 +119,21 @@ function N({ api: e, id: t, legacy: n }) {
|
|
|
119
119
|
if (n === void 0) return;
|
|
120
120
|
e.preventDefault();
|
|
121
121
|
let r = v[(n + v.length) % v.length];
|
|
122
|
-
|
|
122
|
+
a.go(r), requestAnimationFrame(() => H.current?.querySelector(`[data-tab="${r}"]`)?.focus());
|
|
123
123
|
}, K = L && !R && n ? n(L) : null, q = I ? {
|
|
124
124
|
api: e,
|
|
125
|
-
runUrl:
|
|
125
|
+
runUrl: c,
|
|
126
126
|
doc: U,
|
|
127
127
|
play: F.data ?? null,
|
|
128
128
|
m: I,
|
|
129
129
|
route: {
|
|
130
|
-
...
|
|
130
|
+
...a,
|
|
131
131
|
tab: z
|
|
132
132
|
},
|
|
133
133
|
agent: B,
|
|
134
134
|
selectAgent: V
|
|
135
135
|
} : null;
|
|
136
|
-
return /* @__PURE__ */ (0, _.jsx)(
|
|
136
|
+
return /* @__PURE__ */ (0, _.jsx)(s, { children: /* @__PURE__ */ (0, _.jsxs)("div", {
|
|
137
137
|
className: "rp rp-run",
|
|
138
138
|
"data-run": t,
|
|
139
139
|
"data-tab": K ? void 0 : z,
|
|
@@ -170,12 +170,12 @@ function N({ api: e, id: t, legacy: n }) {
|
|
|
170
170
|
children: [v.map((e) => /* @__PURE__ */ (0, _.jsxs)("a", {
|
|
171
171
|
role: "tab",
|
|
172
172
|
"data-tab": e,
|
|
173
|
-
href:
|
|
173
|
+
href: a.href(e),
|
|
174
174
|
"aria-selected": !K && e === z,
|
|
175
175
|
tabIndex: e === z ? 0 : -1,
|
|
176
176
|
"aria-controls": "rp-panel",
|
|
177
177
|
onClick: (t) => {
|
|
178
|
-
t.metaKey || t.ctrlKey || t.shiftKey || t.button !== 0 || (t.preventDefault(),
|
|
178
|
+
t.metaKey || t.ctrlKey || t.shiftKey || t.button !== 0 || (t.preventDefault(), a.go(e));
|
|
179
179
|
},
|
|
180
180
|
children: [y[e], W[e] ? /* @__PURE__ */ (0, _.jsx)("span", {
|
|
181
181
|
className: "ct",
|
|
@@ -183,7 +183,7 @@ function N({ api: e, id: t, legacy: n }) {
|
|
|
183
183
|
}) : null]
|
|
184
184
|
}, e)), /* @__PURE__ */ (0, _.jsx)("span", {
|
|
185
185
|
className: "rp-more",
|
|
186
|
-
children: /* @__PURE__ */ (0, _.jsx)(
|
|
186
|
+
children: /* @__PURE__ */ (0, _.jsx)(o, {
|
|
187
187
|
label: "More run sections",
|
|
188
188
|
options: k.map(([e, t]) => ({
|
|
189
189
|
id: e,
|
|
@@ -231,15 +231,15 @@ function N({ api: e, id: t, legacy: n }) {
|
|
|
231
231
|
}
|
|
232
232
|
function P({ m: e, doc: t }) {
|
|
233
233
|
let n = e.totals.billedUsd, r = [
|
|
234
|
-
[
|
|
235
|
-
[
|
|
236
|
-
[
|
|
234
|
+
[l(e.duration), e.live ? "running" : "run"],
|
|
235
|
+
[i(e.agents.length), e.agents.length === 1 ? "agent" : "agents"],
|
|
236
|
+
[i(e.totals.steps), "steps"],
|
|
237
237
|
[
|
|
238
|
-
|
|
238
|
+
c(e.totals.tokens),
|
|
239
239
|
"tokens",
|
|
240
|
-
e.totals.byClass ? `${
|
|
240
|
+
e.totals.byClass ? `${c(e.totals.byClass.input)} in · ${c(e.totals.byClass.output)} out · ${c(e.totals.byClass.cacheRead)} cached` : void 0
|
|
241
241
|
],
|
|
242
|
-
e.totals.listUsd === null ? [
|
|
242
|
+
e.totals.listUsd === null ? [a(n ?? t.spend.paidUsd ?? null), "billed"] : [a(e.totals.listUsd), "list"]
|
|
243
243
|
];
|
|
244
244
|
return /* @__PURE__ */ (0, _.jsx)("ul", {
|
|
245
245
|
className: "rp-stats",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as e } from "./rolldown-runtime-DArdT4gl.js";
|
|
2
|
-
import { i as t, t as n } from "./jsx-runtime-
|
|
3
|
-
import { s as r } from "./final-output-
|
|
4
|
-
import { m as i, p as a } from "./data-
|
|
2
|
+
import { i as t, t as n } from "./jsx-runtime-DQWyJOhv.js";
|
|
3
|
+
import { s as r } from "./final-output-kwY11u9X.js";
|
|
4
|
+
import { m as i, p as a } from "./data-CkWfWr7i.js";
|
|
5
5
|
//#region src/workspace/scores-model.ts
|
|
6
6
|
var o = /* @__PURE__ */ e(t(), 1);
|
|
7
7
|
function s(e, t) {
|