glimmervoid 0.52.3-next.794 → 0.52.3-next.796
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/chunks/{main-BIKKMhO4.js → main-CZQ_0_7o.js} +149 -20
- package/dist/client/assets/{agent-mark-dhKNgZyU.js → agent-mark-Cl3V4zSh.js} +1 -1
- package/dist/client/assets/agent-mark-Cl3V4zSh.js.br +0 -0
- package/dist/client/assets/{arena-panel-BeiH3d8g.js → arena-panel-Du478NKD.js} +2 -2
- package/dist/client/assets/arena-panel-Du478NKD.js.br +0 -0
- package/dist/client/assets/{benchmark-panel-DfM8UqWu.js → benchmark-panel-DlkCcgSm.js} +1 -1
- package/dist/client/assets/benchmark-panel-DlkCcgSm.js.br +0 -0
- package/dist/client/assets/{boards-view-C6K9E757.js → boards-view-DoZWTHcX.js} +1 -1
- package/dist/client/assets/boards-view-DoZWTHcX.js.br +0 -0
- package/dist/client/assets/{community-panel-TzjvxRYL.js → community-panel-COZep0z8.js} +1 -1
- package/dist/client/assets/community-panel-COZep0z8.js.br +0 -0
- package/dist/client/assets/{dialogs-BRMfvqcX.js → dialogs-BYL72xde.js} +1 -1
- package/dist/client/assets/dialogs-BYL72xde.js.br +0 -0
- package/dist/client/assets/{doc-editor-ui-eVm6g2PY.js → doc-editor-ui-CAj5bmnv.js} +1 -1
- package/dist/client/assets/doc-editor-ui-CAj5bmnv.js.br +0 -0
- package/dist/client/assets/{feature-hint-BBTt8O5C.js → feature-hint-BhETSIWY.js} +1 -1
- package/dist/client/assets/feature-hint-BhETSIWY.js.br +0 -0
- package/dist/client/assets/{first-run-checklist-BHY23Fhe.js → first-run-checklist-BsQA5LVE.js} +1 -1
- package/dist/client/assets/first-run-checklist-BsQA5LVE.js.br +0 -0
- package/dist/client/assets/{hooks-panel-B1g_h5F5.js → hooks-panel-DI6rmg-Q.js} +1 -1
- package/dist/client/assets/hooks-panel-DI6rmg-Q.js.br +0 -0
- package/dist/client/assets/{index-DOBQc6mx.js → index-DDClR54l.js} +5 -5
- package/dist/client/assets/index-DDClR54l.js.br +0 -0
- package/dist/client/assets/{issues-panel-ttlu-Z90.js → issues-panel-_wCMOQfE.js} +1 -1
- package/dist/client/assets/issues-panel-_wCMOQfE.js.br +0 -0
- package/dist/client/assets/{lane-read-token-step-DT6SJiRl.js → lane-read-token-step-DnczTywZ.js} +1 -1
- package/dist/client/assets/lane-read-token-step-DnczTywZ.js.br +0 -0
- package/dist/client/assets/{my-prs-panel-B4vvqLy3.js → my-prs-panel-Dh2TDGVu.js} +1 -1
- package/dist/client/assets/my-prs-panel-Dh2TDGVu.js.br +0 -0
- package/dist/client/assets/{nyan-cat-BIWSZcxU.js → nyan-cat-DwCbD37j.js} +1 -1
- package/dist/client/assets/nyan-cat-DwCbD37j.js.br +0 -0
- package/dist/client/assets/{phone-shell-G0E3WMnz.js → phone-shell-B4yIe2La.js} +1 -1
- package/dist/client/assets/phone-shell-B4yIe2La.js.br +0 -0
- package/dist/client/assets/{plan-face-BYtwyLwH.js → plan-face-DA60w7il.js} +1 -1
- package/dist/client/assets/plan-face-DA60w7il.js.br +0 -0
- package/dist/client/assets/{plan-render-BsnzRyIb.js → plan-render-4hu9U0By.js} +1 -1
- package/dist/client/assets/plan-render-4hu9U0By.js.br +0 -0
- package/dist/client/assets/{pr-queue-columns-BMRBKYDg.js → pr-queue-columns-DJDnf_z_.js} +1 -1
- package/dist/client/assets/pr-queue-columns-DJDnf_z_.js.br +0 -0
- package/dist/client/assets/{radar-panel-DRgtI-WX.js → radar-panel-g-kvcQyJ.js} +1 -1
- package/dist/client/assets/radar-panel-g-kvcQyJ.js.br +0 -0
- package/dist/client/assets/{repo-roots-adder-DyCC_kXa.js → repo-roots-adder-CZcozy8k.js} +1 -1
- package/dist/client/assets/repo-roots-adder-CZcozy8k.js.br +0 -0
- package/dist/client/assets/{resume-dialog-CqiPuy6a.js → resume-dialog-D3OlL8Gu.js} +1 -1
- package/dist/client/assets/resume-dialog-D3OlL8Gu.js.br +0 -0
- package/dist/client/assets/{review-queue-panel-CTZh4Nbg.js → review-queue-panel-BEZZ5L5P.js} +1 -1
- package/dist/client/assets/review-queue-panel-BEZZ5L5P.js.br +0 -0
- package/dist/client/assets/{session-actions-DpOnGIzs.js → session-actions-QVKyPetQ.js} +2 -2
- package/dist/client/assets/session-actions-QVKyPetQ.js.br +0 -0
- package/dist/client/assets/{session-row-Btah95Pw.js → session-row-BRvZTznX.js} +1 -1
- package/dist/client/assets/session-row-BRvZTznX.js.br +0 -0
- package/dist/client/assets/{settings-panel-DV2CPExI.js → settings-panel-COSfSGET.js} +2 -2
- package/dist/client/assets/settings-panel-COSfSGET.js.br +0 -0
- package/dist/client/assets/{trace-panel-CKrjkI36.js → trace-panel-BaUvjJiY.js} +1 -1
- package/dist/client/assets/trace-panel-BaUvjJiY.js.br +0 -0
- package/dist/client/assets/{usage-panel-DAuMjIjj.js → usage-panel-CAHQQ4z7.js} +1 -1
- package/dist/client/assets/usage-panel-CAHQQ4z7.js.br +0 -0
- package/dist/client/assets/{your-day-tip-CnDxOd_Y.js → your-day-tip-AlMatjnT.js} +1 -1
- package/dist/client/assets/your-day-tip-AlMatjnT.js.br +0 -0
- package/dist/client/index.html +4 -4
- package/dist/client/index.html.br +0 -0
- package/dist/server/index.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/agent-mark-dhKNgZyU.js.br +0 -0
- package/dist/client/assets/arena-panel-BeiH3d8g.js.br +0 -0
- package/dist/client/assets/benchmark-panel-DfM8UqWu.js.br +0 -0
- package/dist/client/assets/boards-view-C6K9E757.js.br +0 -0
- package/dist/client/assets/community-panel-TzjvxRYL.js.br +0 -0
- package/dist/client/assets/dialogs-BRMfvqcX.js.br +0 -0
- package/dist/client/assets/doc-editor-ui-eVm6g2PY.js.br +0 -0
- package/dist/client/assets/feature-hint-BBTt8O5C.js.br +0 -0
- package/dist/client/assets/first-run-checklist-BHY23Fhe.js.br +0 -0
- package/dist/client/assets/hooks-panel-B1g_h5F5.js.br +0 -0
- package/dist/client/assets/index-DOBQc6mx.js.br +0 -0
- package/dist/client/assets/issues-panel-ttlu-Z90.js.br +0 -0
- package/dist/client/assets/lane-read-token-step-DT6SJiRl.js.br +0 -0
- package/dist/client/assets/my-prs-panel-B4vvqLy3.js.br +0 -0
- package/dist/client/assets/nyan-cat-BIWSZcxU.js.br +0 -0
- package/dist/client/assets/phone-shell-G0E3WMnz.js.br +0 -0
- package/dist/client/assets/plan-face-BYtwyLwH.js.br +0 -0
- package/dist/client/assets/plan-render-BsnzRyIb.js.br +0 -0
- package/dist/client/assets/pr-queue-columns-BMRBKYDg.js.br +0 -0
- package/dist/client/assets/radar-panel-DRgtI-WX.js.br +0 -0
- package/dist/client/assets/repo-roots-adder-DyCC_kXa.js.br +0 -0
- package/dist/client/assets/resume-dialog-CqiPuy6a.js.br +0 -0
- package/dist/client/assets/review-queue-panel-CTZh4Nbg.js.br +0 -0
- package/dist/client/assets/session-actions-DpOnGIzs.js.br +0 -0
- package/dist/client/assets/session-row-Btah95Pw.js.br +0 -0
- package/dist/client/assets/settings-panel-DV2CPExI.js.br +0 -0
- package/dist/client/assets/trace-panel-CKrjkI36.js.br +0 -0
- package/dist/client/assets/usage-panel-DAuMjIjj.js.br +0 -0
- package/dist/client/assets/your-day-tip-CnDxOd_Y.js.br +0 -0
|
@@ -21768,11 +21768,27 @@ function raceIdsOf(projects) {
|
|
|
21768
21768
|
}
|
|
21769
21769
|
var RACE_JUDGE_RESULT_FILENAME = "race-judge-result.json";
|
|
21770
21770
|
var RACE_TASK_MAX_CHARS = 2e4;
|
|
21771
|
-
function
|
|
21772
|
-
return
|
|
21771
|
+
function judgeIdAt(judgeOrderIndex) {
|
|
21772
|
+
return String.fromCharCode("A".charCodeAt(0) + judgeOrderIndex);
|
|
21773
|
+
}
|
|
21774
|
+
function judgeDiffFileName(judgeId) {
|
|
21775
|
+
return `diff-${judgeId}.patch`;
|
|
21776
|
+
}
|
|
21777
|
+
function judgeCheckoutDirName(judgeId) {
|
|
21778
|
+
return `checkout-${judgeId}`;
|
|
21779
|
+
}
|
|
21780
|
+
function unblindJudgeResult(result, contestantIdByJudgeId) {
|
|
21781
|
+
const contestantIdOf = (judgeId) => contestantIdByJudgeId.get(judgeId) ?? judgeId;
|
|
21782
|
+
return {
|
|
21783
|
+
ranking: result.ranking.map((entry) => ({
|
|
21784
|
+
...entry,
|
|
21785
|
+
contestantId: contestantIdOf(entry.contestantId)
|
|
21786
|
+
})),
|
|
21787
|
+
notes: Object.fromEntries(Object.entries(result.notes).map(([judgeId, note]) => [contestantIdOf(judgeId), note]))
|
|
21788
|
+
};
|
|
21773
21789
|
}
|
|
21774
21790
|
function judgePrompt(record, inputs) {
|
|
21775
|
-
const contestantLines = inputs.map(({
|
|
21791
|
+
const contestantLines = inputs.map(({ judgeId, checkoutDirName, diffFileName, stats }) => `- id ${judgeId}: diff in ./${diffFileName} (${stats.filesChanged} files, +${stats.linesAdded} -${stats.linesRemoved}), full checkout in ./${checkoutDirName}`);
|
|
21776
21792
|
return [
|
|
21777
21793
|
"You judge a race: several coding agents were given the same task, each in its own checkout from the same commit.",
|
|
21778
21794
|
"Rank every contestant listed below from best (rank 1) to worst, judging whether the change does the task correctly, completely and without unrelated edits.",
|
|
@@ -21845,10 +21861,18 @@ function winnerNotesPrompt(notes) {
|
|
|
21845
21861
|
var SETTLE_CHECK_INTERVAL_MS = 15e3;
|
|
21846
21862
|
var JUDGE_TIMEOUT_MS$1 = 18e5;
|
|
21847
21863
|
var RACE_DIFF_MAX_CHARS = 2e5;
|
|
21864
|
+
function shuffled(items, random) {
|
|
21865
|
+
const copy = [...items];
|
|
21866
|
+
for (let index = copy.length - 1; index > 0; index -= 1) {
|
|
21867
|
+
const swapIndex = Math.floor(random() * (index + 1));
|
|
21868
|
+
[copy[index], copy[swapIndex]] = [copy[swapIndex], copy[index]];
|
|
21869
|
+
}
|
|
21870
|
+
return copy;
|
|
21871
|
+
}
|
|
21848
21872
|
function createRaceWiring({ store, git, integrationBranch, broadcast, log, sessionStateOf = () => REMOVED_CONTESTANT, worktreeOf = () => null, diffOf = async () => ({
|
|
21849
21873
|
ok: false,
|
|
21850
21874
|
reason: "diffs are unavailable"
|
|
21851
|
-
}), spawnJudge = null, judgeRoot = null, now = Date.now }) {
|
|
21875
|
+
}), spawnJudge = null, judgeRoot = null, now = Date.now, random = Math.random }) {
|
|
21852
21876
|
const raceById = /* @__PURE__ */ new Map();
|
|
21853
21877
|
let settleTimer = null;
|
|
21854
21878
|
let isWatchingStopped = false;
|
|
@@ -21960,16 +21984,23 @@ function createRaceWiring({ store, git, integrationBranch, broadcast, log, sessi
|
|
|
21960
21984
|
return next;
|
|
21961
21985
|
}
|
|
21962
21986
|
async function collectJudgeInputs(record, judgeDir) {
|
|
21963
|
-
const
|
|
21987
|
+
const changedContestants = [];
|
|
21964
21988
|
const statsByContestant = {};
|
|
21965
21989
|
const unreadable = [];
|
|
21966
|
-
for (const contestant of record.spec.contestants) {
|
|
21990
|
+
for (const [lineupIndex, contestant] of record.spec.contestants.entries()) {
|
|
21967
21991
|
const sessionId = record.sessionIdByContestant[contestant.id];
|
|
21968
21992
|
const worktreeDir = sessionId ? worktreeOf(sessionId) : null;
|
|
21969
21993
|
if (!worktreeDir) continue;
|
|
21994
|
+
const exportedCheckoutDir = path.join(judgeDir, `export-${lineupIndex}`);
|
|
21970
21995
|
const diff = await diffOf({
|
|
21971
21996
|
worktreeDir,
|
|
21972
|
-
startSha: record.startSha
|
|
21997
|
+
startSha: record.startSha,
|
|
21998
|
+
blindCheckoutDir: exportedCheckoutDir
|
|
21999
|
+
});
|
|
22000
|
+
const isJudged = diff.ok && diff.blindDiff.trim() !== "";
|
|
22001
|
+
if (!isJudged) await fs$1.rm(exportedCheckoutDir, {
|
|
22002
|
+
recursive: true,
|
|
22003
|
+
force: true
|
|
21973
22004
|
});
|
|
21974
22005
|
if (!diff.ok) {
|
|
21975
22006
|
log.warn(`[race] no diff for ${contestant.label} in ${record.spec.title}: ${diff.reason}`);
|
|
@@ -21977,24 +22008,39 @@ function createRaceWiring({ store, git, integrationBranch, broadcast, log, sessi
|
|
|
21977
22008
|
continue;
|
|
21978
22009
|
}
|
|
21979
22010
|
statsByContestant[contestant.id] = diff.stats;
|
|
21980
|
-
if (
|
|
21981
|
-
|
|
21982
|
-
|
|
22011
|
+
if (!isJudged) continue;
|
|
22012
|
+
changedContestants.push({
|
|
22013
|
+
contestantId: contestant.id,
|
|
22014
|
+
exportedCheckoutDir,
|
|
22015
|
+
blindDiff: diff.blindDiff,
|
|
22016
|
+
blindStats: diff.blindStats
|
|
22017
|
+
});
|
|
22018
|
+
}
|
|
22019
|
+
const contestantIdByJudgeId = /* @__PURE__ */ new Map();
|
|
22020
|
+
const inputs = [];
|
|
22021
|
+
for (const [index, changed] of shuffled(changedContestants, random).entries()) {
|
|
22022
|
+
const judgeId = judgeIdAt(index);
|
|
22023
|
+
contestantIdByJudgeId.set(judgeId, changed.contestantId);
|
|
22024
|
+
const diffFileName = judgeDiffFileName(judgeId);
|
|
22025
|
+
const checkoutDirName = judgeCheckoutDirName(judgeId);
|
|
22026
|
+
await fs$1.writeFile(path.join(judgeDir, diffFileName), changed.blindDiff.slice(0, RACE_DIFF_MAX_CHARS), "utf8");
|
|
22027
|
+
await fs$1.rename(changed.exportedCheckoutDir, path.join(judgeDir, checkoutDirName));
|
|
21983
22028
|
inputs.push({
|
|
21984
|
-
|
|
21985
|
-
|
|
22029
|
+
judgeId,
|
|
22030
|
+
checkoutDirName,
|
|
21986
22031
|
diffFileName,
|
|
21987
|
-
stats:
|
|
22032
|
+
stats: changed.blindStats
|
|
21988
22033
|
});
|
|
21989
22034
|
}
|
|
21990
22035
|
return {
|
|
21991
22036
|
inputs,
|
|
22037
|
+
contestantIdByJudgeId,
|
|
21992
22038
|
statsByContestant,
|
|
21993
22039
|
unreadable
|
|
21994
22040
|
};
|
|
21995
22041
|
}
|
|
21996
22042
|
async function runJudgeOnce(record, judgeDir) {
|
|
21997
|
-
const { inputs, statsByContestant, unreadable } = await collectJudgeInputs(record, judgeDir);
|
|
22043
|
+
const { inputs, contestantIdByJudgeId, statsByContestant, unreadable } = await collectJudgeInputs(record, judgeDir);
|
|
21998
22044
|
const unreadableNote = unreadable.length > 0 ? `Could not read the diff of ${unreadable.join(", ")}, so it was left out.` : null;
|
|
21999
22045
|
const judgeSetup = record.spec.judge?.setup ?? null;
|
|
22000
22046
|
if (!judgeSetup || !spawnJudge) return {
|
|
@@ -22014,10 +22060,10 @@ function createRaceWiring({ store, git, integrationBranch, broadcast, log, sessi
|
|
|
22014
22060
|
prompt: judgePrompt(record, inputs),
|
|
22015
22061
|
cwd: judgeDir,
|
|
22016
22062
|
setup: judgeSetup,
|
|
22017
|
-
readPaths: inputs.map((input) => input.
|
|
22063
|
+
readPaths: inputs.map((input) => path.join(judgeDir, input.checkoutDirName)),
|
|
22018
22064
|
signal: timeout
|
|
22019
22065
|
});
|
|
22020
|
-
const parsed = parseJudgeResult$1(await readLaneResultFile(path.join(judgeDir, RACE_JUDGE_RESULT_FILENAME)), inputs.map((input) => input.
|
|
22066
|
+
const parsed = parseJudgeResult$1(await readLaneResultFile(path.join(judgeDir, RACE_JUDGE_RESULT_FILENAME)), inputs.map((input) => input.judgeId));
|
|
22021
22067
|
if (!parsed.ok) return {
|
|
22022
22068
|
diffStatsByContestant: statsByContestant,
|
|
22023
22069
|
judge: null,
|
|
@@ -22025,7 +22071,7 @@ function createRaceWiring({ store, git, integrationBranch, broadcast, log, sessi
|
|
|
22025
22071
|
};
|
|
22026
22072
|
return {
|
|
22027
22073
|
diffStatsByContestant: statsByContestant,
|
|
22028
|
-
judge: parsed.result,
|
|
22074
|
+
judge: unblindJudgeResult(parsed.result, contestantIdByJudgeId),
|
|
22029
22075
|
judgeError: unreadableNote
|
|
22030
22076
|
};
|
|
22031
22077
|
}
|
|
@@ -22169,7 +22215,56 @@ function createRaceWiring({ store, git, integrationBranch, broadcast, log, sessi
|
|
|
22169
22215
|
// server/race/race-diff.ts
|
|
22170
22216
|
var DIFF_TIMEOUT_MS = 6e4;
|
|
22171
22217
|
var DIFF_MAX_BUFFER_BYTES = 67108864;
|
|
22172
|
-
|
|
22218
|
+
var WITHOUT_AGENT_CONFIG_PATHSPEC = [
|
|
22219
|
+
"--",
|
|
22220
|
+
".",
|
|
22221
|
+
...[
|
|
22222
|
+
".claude",
|
|
22223
|
+
".codex",
|
|
22224
|
+
".kimi",
|
|
22225
|
+
".gemini",
|
|
22226
|
+
".qwen",
|
|
22227
|
+
".grok",
|
|
22228
|
+
".github/copilot"
|
|
22229
|
+
].map((folder) => `:(exclude,glob)**/${folder}/**`)
|
|
22230
|
+
];
|
|
22231
|
+
async function copyIndexKeepingMtime(sourceIndex, scratchIndex) {
|
|
22232
|
+
await fs$1.copyFile(sourceIndex, scratchIndex);
|
|
22233
|
+
const { atime, mtime } = await fs$1.stat(sourceIndex);
|
|
22234
|
+
await fs$1.utimes(scratchIndex, atime, mtime);
|
|
22235
|
+
}
|
|
22236
|
+
async function exportBlindCheckout(gitOptions, blindCheckoutDir) {
|
|
22237
|
+
const blindFiles = await runGit([
|
|
22238
|
+
"--no-literal-pathspecs",
|
|
22239
|
+
"ls-files",
|
|
22240
|
+
"-z",
|
|
22241
|
+
"--cached",
|
|
22242
|
+
...WITHOUT_AGENT_CONFIG_PATHSPEC
|
|
22243
|
+
], {
|
|
22244
|
+
...gitOptions,
|
|
22245
|
+
trim: false
|
|
22246
|
+
});
|
|
22247
|
+
if (!blindFiles.ok) return {
|
|
22248
|
+
ok: false,
|
|
22249
|
+
reason: `could not list the working tree: ${blindFiles.err}`
|
|
22250
|
+
};
|
|
22251
|
+
await fs$1.mkdir(blindCheckoutDir, { recursive: true });
|
|
22252
|
+
const exported = await runGit([
|
|
22253
|
+
"checkout-index",
|
|
22254
|
+
"-z",
|
|
22255
|
+
"--stdin",
|
|
22256
|
+
`--prefix=${blindCheckoutDir}${path.sep}`
|
|
22257
|
+
], {
|
|
22258
|
+
...gitOptions,
|
|
22259
|
+
input: blindFiles.out
|
|
22260
|
+
});
|
|
22261
|
+
if (!exported.ok) return {
|
|
22262
|
+
ok: false,
|
|
22263
|
+
reason: `could not copy the working tree for the judge: ${exported.err}`
|
|
22264
|
+
};
|
|
22265
|
+
return { ok: true };
|
|
22266
|
+
}
|
|
22267
|
+
async function contestantDiff({ worktreeDir, startSha, blindCheckoutDir = null }) {
|
|
22173
22268
|
const indexPath = await runGit([
|
|
22174
22269
|
"rev-parse",
|
|
22175
22270
|
"--git-path",
|
|
@@ -22185,7 +22280,7 @@ async function contestantDiff({ worktreeDir, startSha }) {
|
|
|
22185
22280
|
const scratchDir = await fs$1.mkdtemp(path.join(os.tmpdir(), "glimmervoid-race-diff-"));
|
|
22186
22281
|
const scratchIndex = path.join(scratchDir, "index");
|
|
22187
22282
|
try {
|
|
22188
|
-
await
|
|
22283
|
+
await copyIndexKeepingMtime(path.resolve(worktreeDir, indexPath.out.trim()), scratchIndex).catch(() => {});
|
|
22189
22284
|
const gitOptions = {
|
|
22190
22285
|
cwd: worktreeDir,
|
|
22191
22286
|
env: { GIT_INDEX_FILE: scratchIndex },
|
|
@@ -22221,10 +22316,44 @@ async function contestantDiff({ worktreeDir, startSha }) {
|
|
|
22221
22316
|
ok: false,
|
|
22222
22317
|
reason: `could not diff against ${startSha}: ${diff.err}`
|
|
22223
22318
|
};
|
|
22319
|
+
const blindShortstat = await runGit([
|
|
22320
|
+
"--no-literal-pathspecs",
|
|
22321
|
+
"diff",
|
|
22322
|
+
"--cached",
|
|
22323
|
+
"--shortstat",
|
|
22324
|
+
startSha,
|
|
22325
|
+
...WITHOUT_AGENT_CONFIG_PATHSPEC
|
|
22326
|
+
], gitOptions);
|
|
22327
|
+
if (!blindShortstat.ok) return {
|
|
22328
|
+
ok: false,
|
|
22329
|
+
reason: `could not diff against ${startSha}: ${blindShortstat.err}`
|
|
22330
|
+
};
|
|
22331
|
+
const blindDiff = await runGit([
|
|
22332
|
+
"--no-literal-pathspecs",
|
|
22333
|
+
"diff",
|
|
22334
|
+
"--cached",
|
|
22335
|
+
"--no-color",
|
|
22336
|
+
"--no-ext-diff",
|
|
22337
|
+
startSha,
|
|
22338
|
+
...WITHOUT_AGENT_CONFIG_PATHSPEC
|
|
22339
|
+
], {
|
|
22340
|
+
...gitOptions,
|
|
22341
|
+
trim: false
|
|
22342
|
+
});
|
|
22343
|
+
if (!blindDiff.ok) return {
|
|
22344
|
+
ok: false,
|
|
22345
|
+
reason: `could not diff against ${startSha}: ${blindDiff.err}`
|
|
22346
|
+
};
|
|
22347
|
+
if (blindCheckoutDir) {
|
|
22348
|
+
const exported = await exportBlindCheckout(gitOptions, blindCheckoutDir);
|
|
22349
|
+
if (!exported.ok) return exported;
|
|
22350
|
+
}
|
|
22224
22351
|
return {
|
|
22225
22352
|
ok: true,
|
|
22226
22353
|
diff: diff.out,
|
|
22227
|
-
stats: parseShortstat(shortstat.out)
|
|
22354
|
+
stats: parseShortstat(shortstat.out),
|
|
22355
|
+
blindDiff: blindDiff.out,
|
|
22356
|
+
blindStats: parseShortstat(blindShortstat.out)
|
|
22228
22357
|
};
|
|
22229
22358
|
} finally {
|
|
22230
22359
|
await fs$1.rm(scratchDir, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{x as e}from"./dom-helpers-DGbgEgul.js";import"./session-actions-DpOnGIzs.js";var t=new Map([[`claude-code`,`<svg aria-hidden="true" fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z"></path></svg>`],[`codex`,`<svg aria-hidden="true" fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z"></path></svg>`],[`copilot`,`<svg aria-hidden="true" fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M19.245 5.364c1.322 1.36 1.877 3.216 2.11 5.817.622 0 1.2.135 1.592.654l.73.964c.21.278.323.61.323.955v2.62c0 .339-.173.669-.453.868C20.239 19.602 16.157 21.5 12 21.5c-4.6 0-9.205-2.583-11.547-4.258-.28-.2-.452-.53-.453-.868v-2.62c0-.345.113-.679.321-.956l.73-.963c.392-.517.974-.654 1.593-.654l.029-.297c.25-2.446.81-4.213 2.082-5.52 2.461-2.54 5.71-2.851 7.146-2.864h.198c1.436.013 4.685.323 7.146 2.864zm-7.244 4.328c-.284 0-.613.016-.962.05-.123.447-.305.85-.57 1.108-1.05 1.023-2.316 1.18-2.994 1.18-.638 0-1.306-.13-1.851-.464-.516.165-1.012.403-1.044.996a65.882 65.882 0 00-.063 2.884l-.002.48c-.002.563-.005 1.126-.013 1.69.002.326.204.63.51.765 2.482 1.102 4.83 1.657 6.99 1.657 2.156 0 4.504-.555 6.985-1.657a.854.854 0 00.51-.766c.03-1.682.006-3.372-.076-5.053-.031-.596-.528-.83-1.046-.996-.546.333-1.212.464-1.85.464-.677 0-1.942-.157-2.993-1.18-.266-.258-.447-.661-.57-1.108-.32-.032-.64-.049-.96-.05zm-2.525 4.013c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zm5 0c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zM7.635 5.087c-1.05.102-1.935.438-2.385.906-.975 1.037-.765 3.668-.21 4.224.405.394 1.17.657 1.995.657h.09c.649-.013 1.785-.176 2.73-1.11.435-.41.705-1.433.675-2.47-.03-.834-.27-1.52-.63-1.813-.39-.336-1.275-.482-2.265-.394zm6.465.394c-.36.292-.6.98-.63 1.813-.03 1.037.24 2.06.675 2.47.968.957 2.136 1.104 2.776 1.11h.044c.825 0 1.59-.263 1.995-.657.555-.556.765-3.187-.21-4.224-.45-.468-1.335-.804-2.385-.906-.99-.088-1.875.058-2.265.394zM12 7.615c-.24 0-.525.015-.84.044.03.16.045.336.06.526l-.001.159a2.94 2.94 0 01-.014.25c.225-.022.425-.027.612-.028h.366c.187 0 .387.006.612.028-.015-.146-.015-.277-.015-.409.015-.19.03-.365.06-.526a9.29 9.29 0 00-.84-.044z"></path></svg>`],[`cursor`,`<svg aria-hidden="true" fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M22.106 5.68L12.5.135a.998.998 0 00-.998 0L1.893 5.68a.84.84 0 00-.419.726v11.186c0 .3.16.577.42.727l9.607 5.547a.999.999 0 00.998 0l9.608-5.547a.84.84 0 00.42-.727V6.407a.84.84 0 00-.42-.726zm-.603 1.176L12.228 22.92c-.063.108-.228.064-.228-.061V12.34a.59.59 0 00-.295-.51l-9.11-5.26c-.107-.062-.063-.228.062-.228h18.55c.264 0 .428.286.296.514z"></path></svg>`],[`gemini`,`<svg aria-hidden="true" fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z"></path></svg>`],[`goose`,`<svg aria-hidden="true" fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M21.595 23.61c1.167-.254 2.405-.944 2.405-.944l-2.167-1.784a12.124 12.124 0 01-2.695-3.131 12.127 12.127 0 00-3.97-4.049l-.794-.462a1.115 1.115 0 01-.488-.815.844.844 0 01.154-.575c.413-.582 2.548-3.115 2.94-3.44.503-.416 1.065-.762 1.586-1.159.074-.056.148-.112.221-.17.003-.002.007-.004.009-.007.167-.131.325-.272.45-.438.453-.524.563-.988.59-1.193-.061-.197-.244-.639-.753-1.148.319.02.705.272 1.056.569.235-.376.481-.773.727-1.171.165-.266-.08-.465-.086-.471h-.001V3.22c-.007-.007-.206-.25-.471-.086-.567.35-1.134.702-1.639 1.021 0 0-.597-.012-1.305.599a2.464 2.464 0 00-.438.45l-.007.009c-.058.072-.114.147-.17.221-.397.521-.743 1.083-1.16 1.587-.323.391-2.857 2.526-3.44 2.94a.842.842 0 01-.574.153 1.115 1.115 0 01-.815-.488l-.462-.794a12.123 12.123 0 00-4.049-3.97 12.133 12.133 0 01-3.13-2.695L1.332 0S.643 1.238.39 2.405c.352.428 1.27 1.49 2.34 2.302C1.58 4.167.73 3.75.06 3.4c-.103.765-.063 1.92.043 2.816.726.317 1.961.806 3.219 1.066-1.006.236-2.11.278-2.961.262.15.554.358 1.119.64 1.688.119.263.25.52.39.77.452.125 2.222.383 3.164.171l-2.51.897a27.776 27.776 0 002.544 2.726c2.031-1.092 2.494-1.241 4.018-2.238-2.467 2.008-3.108 2.828-3.8 3.67l-.483.678c-.25.351-.469.725-.65 1.117-.61 1.31-1.47 4.1-1.47 4.1-.154.486.202.842.674.674 0 0 2.79-.861 4.1-1.47.392-.182.766-.4 1.118-.65l.677-.483c.227-.187.453-.37.701-.586 0 0 1.705 2.02 3.458 3.349l.896-2.511c-.211.942.046 2.712.17 3.163.252.142.509.272.772.392.569.28 1.134.49 1.688.64-.016-.853.026-1.956.261-2.962.26 1.258.75 2.493 1.067 3.219.895.106 2.051.146 2.816.043a73.87 73.87 0 01-1.308-2.67c.811 1.07 1.874 1.988 2.302 2.34h-.001z"></path></svg>`],[`grok`,`<svg aria-hidden="true" fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M9.27 15.29l7.978-5.897c.391-.29.95-.177 1.137.272.98 2.369.542 5.215-1.41 7.169-1.951 1.954-4.667 2.382-7.149 1.406l-2.711 1.257c3.889 2.661 8.611 2.003 11.562-.953 2.341-2.344 3.066-5.539 2.388-8.42l.006.007c-.983-4.232.242-5.924 2.75-9.383.06-.082.12-.164.179-.248l-3.301 3.305v-.01L9.267 15.292M7.623 16.723c-2.792-2.67-2.31-6.801.071-9.184 1.761-1.763 4.647-2.483 7.166-1.425l2.705-1.25a7.808 7.808 0 00-1.829-1A8.975 8.975 0 005.984 5.83c-2.533 2.536-3.33 6.436-1.962 9.764 1.022 2.487-.653 4.246-2.34 6.022-.599.63-1.199 1.259-1.682 1.925l7.62-6.815"></path></svg>`],[`kimi`,`<svg aria-hidden="true" fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M21.846 0a1.923 1.923 0 110 3.846H20.15a.226.226 0 01-.227-.226V1.923C19.923.861 20.784 0 21.846 0z"></path><path d="M11.065 11.199l7.257-7.2c.137-.136.06-.41-.116-.41H14.3a.164.164 0 00-.117.051l-7.82 7.756c-.122.12-.302.013-.302-.179V3.82c0-.127-.083-.23-.185-.23H3.186c-.103 0-.186.103-.186.23V19.77c0 .128.083.23.186.23h2.69c.103 0 .186-.102.186-.23v-3.25c0-.069.025-.135.069-.178l2.424-2.406a.158.158 0 01.205-.023l6.484 4.772a7.677 7.677 0 003.453 1.283c.108.012.2-.095.2-.23v-3.06c0-.117-.07-.212-.164-.227a5.028 5.028 0 01-2.027-.807l-5.613-4.064c-.117-.078-.132-.279-.028-.381z"></path></svg>`],[`opencode`,`<svg aria-hidden="true" fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M16 6H8v12h8V6zm4 16H4V2h16v20z"></path></svg>`],[`qwen`,`<svg aria-hidden="true" fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M19.713 2.825h-5.907c0-.251-.066-.503-.196-.728L12.819.728A1.46 1.46 0 0 0 11.559 0h-1.58c-.52 0-1 .275-1.26.728l-2.42 4.19a1.45 1.45 0 0 0 0 1.453l.791 1.37c.26.448.74.727 1.26.727h11.36c.52 0 1-.275 1.26-.728l.79-1.37a1.45 1.45 0 0 0 0-1.451l-.79-1.37a1.46 1.46 0 0 0-1.26-.728zM.195 9.905l2.951 5.115a1.46 1.46 0 0 0-.531.531l-.791 1.37a1.45 1.45 0 0 0 0 1.452l.79 1.37c.26.448.74.727 1.26.727h4.84c.52 0 1-.275 1.26-.728l.79-1.37a1.45 1.45 0 0 0 0-1.451L5.086 7.083a1.46 1.46 0 0 0-1.26-.728h-1.58c-.52 0-1 .276-1.26.728l-.79 1.37a1.45 1.45 0 0 0 0 1.452m15.888 13.367 2.951-5.115c.217.125.469.196.728.196h1.582c.52 0 1-.275 1.26-.728l.79-1.37a1.45 1.45 0 0 0 0-1.451l-2.42-4.191a1.46 1.46 0 0 0-1.259-.728h-1.582c-.52 0-1 .276-1.259.728l-5.678 9.838a1.45 1.45 0 0 0 0 1.452l.79 1.37c.26.448.74.727 1.26.727h1.582c.52 0 1-.275 1.26-.728z"></path></svg>`]]);function n(n,r,i=null){let a=r===`shell`?null:r;if(n.dataset.agent===(a??``))return;if(n.dataset.agent=a??``,n.hidden=a===null,a===null){n.replaceChildren();return}let o=t.get(a);n.toggleAttribute(`data-monogram`,o===void 0),o===void 0?n.textContent=e(i??a):n.innerHTML=o}export{n as t};
|
|
1
|
+
import{x as e}from"./dom-helpers-DGbgEgul.js";import"./session-actions-QVKyPetQ.js";var t=new Map([[`claude-code`,`<svg aria-hidden="true" fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z"></path></svg>`],[`codex`,`<svg aria-hidden="true" fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z"></path></svg>`],[`copilot`,`<svg aria-hidden="true" fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M19.245 5.364c1.322 1.36 1.877 3.216 2.11 5.817.622 0 1.2.135 1.592.654l.73.964c.21.278.323.61.323.955v2.62c0 .339-.173.669-.453.868C20.239 19.602 16.157 21.5 12 21.5c-4.6 0-9.205-2.583-11.547-4.258-.28-.2-.452-.53-.453-.868v-2.62c0-.345.113-.679.321-.956l.73-.963c.392-.517.974-.654 1.593-.654l.029-.297c.25-2.446.81-4.213 2.082-5.52 2.461-2.54 5.71-2.851 7.146-2.864h.198c1.436.013 4.685.323 7.146 2.864zm-7.244 4.328c-.284 0-.613.016-.962.05-.123.447-.305.85-.57 1.108-1.05 1.023-2.316 1.18-2.994 1.18-.638 0-1.306-.13-1.851-.464-.516.165-1.012.403-1.044.996a65.882 65.882 0 00-.063 2.884l-.002.48c-.002.563-.005 1.126-.013 1.69.002.326.204.63.51.765 2.482 1.102 4.83 1.657 6.99 1.657 2.156 0 4.504-.555 6.985-1.657a.854.854 0 00.51-.766c.03-1.682.006-3.372-.076-5.053-.031-.596-.528-.83-1.046-.996-.546.333-1.212.464-1.85.464-.677 0-1.942-.157-2.993-1.18-.266-.258-.447-.661-.57-1.108-.32-.032-.64-.049-.96-.05zm-2.525 4.013c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zm5 0c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zM7.635 5.087c-1.05.102-1.935.438-2.385.906-.975 1.037-.765 3.668-.21 4.224.405.394 1.17.657 1.995.657h.09c.649-.013 1.785-.176 2.73-1.11.435-.41.705-1.433.675-2.47-.03-.834-.27-1.52-.63-1.813-.39-.336-1.275-.482-2.265-.394zm6.465.394c-.36.292-.6.98-.63 1.813-.03 1.037.24 2.06.675 2.47.968.957 2.136 1.104 2.776 1.11h.044c.825 0 1.59-.263 1.995-.657.555-.556.765-3.187-.21-4.224-.45-.468-1.335-.804-2.385-.906-.99-.088-1.875.058-2.265.394zM12 7.615c-.24 0-.525.015-.84.044.03.16.045.336.06.526l-.001.159a2.94 2.94 0 01-.014.25c.225-.022.425-.027.612-.028h.366c.187 0 .387.006.612.028-.015-.146-.015-.277-.015-.409.015-.19.03-.365.06-.526a9.29 9.29 0 00-.84-.044z"></path></svg>`],[`cursor`,`<svg aria-hidden="true" fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M22.106 5.68L12.5.135a.998.998 0 00-.998 0L1.893 5.68a.84.84 0 00-.419.726v11.186c0 .3.16.577.42.727l9.607 5.547a.999.999 0 00.998 0l9.608-5.547a.84.84 0 00.42-.727V6.407a.84.84 0 00-.42-.726zm-.603 1.176L12.228 22.92c-.063.108-.228.064-.228-.061V12.34a.59.59 0 00-.295-.51l-9.11-5.26c-.107-.062-.063-.228.062-.228h18.55c.264 0 .428.286.296.514z"></path></svg>`],[`gemini`,`<svg aria-hidden="true" fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z"></path></svg>`],[`goose`,`<svg aria-hidden="true" fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M21.595 23.61c1.167-.254 2.405-.944 2.405-.944l-2.167-1.784a12.124 12.124 0 01-2.695-3.131 12.127 12.127 0 00-3.97-4.049l-.794-.462a1.115 1.115 0 01-.488-.815.844.844 0 01.154-.575c.413-.582 2.548-3.115 2.94-3.44.503-.416 1.065-.762 1.586-1.159.074-.056.148-.112.221-.17.003-.002.007-.004.009-.007.167-.131.325-.272.45-.438.453-.524.563-.988.59-1.193-.061-.197-.244-.639-.753-1.148.319.02.705.272 1.056.569.235-.376.481-.773.727-1.171.165-.266-.08-.465-.086-.471h-.001V3.22c-.007-.007-.206-.25-.471-.086-.567.35-1.134.702-1.639 1.021 0 0-.597-.012-1.305.599a2.464 2.464 0 00-.438.45l-.007.009c-.058.072-.114.147-.17.221-.397.521-.743 1.083-1.16 1.587-.323.391-2.857 2.526-3.44 2.94a.842.842 0 01-.574.153 1.115 1.115 0 01-.815-.488l-.462-.794a12.123 12.123 0 00-4.049-3.97 12.133 12.133 0 01-3.13-2.695L1.332 0S.643 1.238.39 2.405c.352.428 1.27 1.49 2.34 2.302C1.58 4.167.73 3.75.06 3.4c-.103.765-.063 1.92.043 2.816.726.317 1.961.806 3.219 1.066-1.006.236-2.11.278-2.961.262.15.554.358 1.119.64 1.688.119.263.25.52.39.77.452.125 2.222.383 3.164.171l-2.51.897a27.776 27.776 0 002.544 2.726c2.031-1.092 2.494-1.241 4.018-2.238-2.467 2.008-3.108 2.828-3.8 3.67l-.483.678c-.25.351-.469.725-.65 1.117-.61 1.31-1.47 4.1-1.47 4.1-.154.486.202.842.674.674 0 0 2.79-.861 4.1-1.47.392-.182.766-.4 1.118-.65l.677-.483c.227-.187.453-.37.701-.586 0 0 1.705 2.02 3.458 3.349l.896-2.511c-.211.942.046 2.712.17 3.163.252.142.509.272.772.392.569.28 1.134.49 1.688.64-.016-.853.026-1.956.261-2.962.26 1.258.75 2.493 1.067 3.219.895.106 2.051.146 2.816.043a73.87 73.87 0 01-1.308-2.67c.811 1.07 1.874 1.988 2.302 2.34h-.001z"></path></svg>`],[`grok`,`<svg aria-hidden="true" fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M9.27 15.29l7.978-5.897c.391-.29.95-.177 1.137.272.98 2.369.542 5.215-1.41 7.169-1.951 1.954-4.667 2.382-7.149 1.406l-2.711 1.257c3.889 2.661 8.611 2.003 11.562-.953 2.341-2.344 3.066-5.539 2.388-8.42l.006.007c-.983-4.232.242-5.924 2.75-9.383.06-.082.12-.164.179-.248l-3.301 3.305v-.01L9.267 15.292M7.623 16.723c-2.792-2.67-2.31-6.801.071-9.184 1.761-1.763 4.647-2.483 7.166-1.425l2.705-1.25a7.808 7.808 0 00-1.829-1A8.975 8.975 0 005.984 5.83c-2.533 2.536-3.33 6.436-1.962 9.764 1.022 2.487-.653 4.246-2.34 6.022-.599.63-1.199 1.259-1.682 1.925l7.62-6.815"></path></svg>`],[`kimi`,`<svg aria-hidden="true" fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M21.846 0a1.923 1.923 0 110 3.846H20.15a.226.226 0 01-.227-.226V1.923C19.923.861 20.784 0 21.846 0z"></path><path d="M11.065 11.199l7.257-7.2c.137-.136.06-.41-.116-.41H14.3a.164.164 0 00-.117.051l-7.82 7.756c-.122.12-.302.013-.302-.179V3.82c0-.127-.083-.23-.185-.23H3.186c-.103 0-.186.103-.186.23V19.77c0 .128.083.23.186.23h2.69c.103 0 .186-.102.186-.23v-3.25c0-.069.025-.135.069-.178l2.424-2.406a.158.158 0 01.205-.023l6.484 4.772a7.677 7.677 0 003.453 1.283c.108.012.2-.095.2-.23v-3.06c0-.117-.07-.212-.164-.227a5.028 5.028 0 01-2.027-.807l-5.613-4.064c-.117-.078-.132-.279-.028-.381z"></path></svg>`],[`opencode`,`<svg aria-hidden="true" fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M16 6H8v12h8V6zm4 16H4V2h16v20z"></path></svg>`],[`qwen`,`<svg aria-hidden="true" fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M19.713 2.825h-5.907c0-.251-.066-.503-.196-.728L12.819.728A1.46 1.46 0 0 0 11.559 0h-1.58c-.52 0-1 .275-1.26.728l-2.42 4.19a1.45 1.45 0 0 0 0 1.453l.791 1.37c.26.448.74.727 1.26.727h11.36c.52 0 1-.275 1.26-.728l.79-1.37a1.45 1.45 0 0 0 0-1.451l-.79-1.37a1.46 1.46 0 0 0-1.26-.728zM.195 9.905l2.951 5.115a1.46 1.46 0 0 0-.531.531l-.791 1.37a1.45 1.45 0 0 0 0 1.452l.79 1.37c.26.448.74.727 1.26.727h4.84c.52 0 1-.275 1.26-.728l.79-1.37a1.45 1.45 0 0 0 0-1.451L5.086 7.083a1.46 1.46 0 0 0-1.26-.728h-1.58c-.52 0-1 .276-1.26.728l-.79 1.37a1.45 1.45 0 0 0 0 1.452m15.888 13.367 2.951-5.115c.217.125.469.196.728.196h1.582c.52 0 1-.275 1.26-.728l.79-1.37a1.45 1.45 0 0 0 0-1.451l-2.42-4.191a1.46 1.46 0 0 0-1.259-.728h-1.582c-.52 0-1 .276-1.259.728l-5.678 9.838a1.45 1.45 0 0 0 0 1.452l.79 1.37c.26.448.74.727 1.26.727h1.582c.52 0 1-.275 1.26-.728z"></path></svg>`]]);function n(n,r,i=null){let a=r===`shell`?null:r;if(n.dataset.agent===(a??``))return;if(n.dataset.agent=a??``,n.hidden=a===null,a===null){n.replaceChildren();return}let o=t.get(a);n.toggleAttribute(`data-monogram`,o===void 0),o===void 0?n.textContent=e(i??a):n.innerHTML=o}export{n as t};
|
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/benchmark-panel-
|
|
2
|
-
import{Ht as e,Kt as t,Ut as n,Vt as r,Wt as i,t as a}from"./button-BZKKRkAO.js";import{$a as o,Ga as s,Za as c,bt as l,gt as u,vt as d,xt as ee,yt as f}from"./index-DOBQc6mx.js";import{Y as p,s as m}from"./dom-helpers-DGbgEgul.js";import{f as h}from"./control-ws-DzxzsvLv.js";import{o as g}from"./card-registry-DeJCxQOx.js";import{n as _}from"./session-tick-Bi93hGkg.js";import{n as te}from"./modal-B-ac519L.js";import{t as ne}from"./preload-helper-BLdHbfdN.js";var v=[`agent`,`model`,`effort`],re={"claude-code":`Claude Code`,codex:`Codex`,kimi:`Kimi Code`};function y(e){return re[e]??e}function b(e,t){return e.agents.find(e=>e.agent===t)?.models??[]}function x(e){return i.filter(t=>b(e,t).length>0)}function S(e,t,n){return b(e,t).find(e=>e.id===n)?.options.find(e=>e.id===`effort`)?.choices??[]}function C(e){return e.options.find(e=>e.id===`effort`)?.value??null}function w(e,n){let r=e.options.filter(e=>e.id!==t);return{...e,options:n===null?r:[...r,{id:t,value:n}]}}function T(e,t){let n=b(e,t),r=n.find(e=>e.isDefault)??n[0]??null,i=r?.options.find(e=>e.id===`effort`)?.defaultChoice??null;return w({agent:t,model:r?.id??null,options:[],instructions:``},i)}function E(e,t,n){let r=S(e,t.agent,n),i=C(t),a=b(e,t.agent).find(e=>e.id===n),o=i!==null&&r.includes(i)?i:a?.options.find(e=>e.id===`effort`)?.defaultChoice??null;return w({...t,model:n},o)}function D(e,t){return w(e,t)}function ie(e,t){let n=b(t,e.agent).find(t=>t.id===e.model)?.label??e.model??y(e.agent),r=C(e);return(r===null?n:`${n} ${r}`).slice(0,60)}function ae(e,t,n){return n===`agent`?x(e).map(e=>({value:e,label:y(e)})):n===`model`?b(e,t.agent).map(e=>({value:e.id,label:e.label})):S(e,t.agent,t.model).map(e=>({value:e,label:e}))}function oe(e,t,n,r){return n===`agent`?{...T(e,r),instructions:t.instructions}:n===`model`?E(e,t,r):w(t,r)}function O(e,t){let n=new Map;return t.slice(0,5).map((t,r)=>{let i=ie(t,e),a=(n.get(i)??0)+1;return n.set(i,a),{id:`c${r+1}`,label:a===1?i:`${i} ${a}`.slice(0,60),setup:t}})}function k(e,t,n,r){return O(e,r.map(r=>oe(e,t,n,r)))}var A=12e4,j=6e4,se=8,M=null,N=null,P={agents:[]},F={raceTitle:``,prompt:``,repoPath:``,contestants:[],judgeSetup:null},I=!1,L=new Map,R=new Map;function z(e){return Object.entries(p).find(([t])=>t===e)?.[1]??e}function B(e){let t=e?g.get(e):void 0;return t?t.currentState:l}function V(e,t){return`${e}:${t}`}function H(e,t){let n=V(e.id,t.id);L.has(n)?(L.delete(n),K()):(L.set(n,`Loading the diff.`),K(),h(`race-diff`,{raceId:e.id,contestantId:t.id},{timeoutMs:j}).then(e=>{e.type===`race-diff-result`&&L.set(n,e.ok?e.diff||`No changes.`:`Could not read the diff: ${e.error??`unknown error`}`)}).catch(e=>L.set(n,`Could not read the diff: ${e instanceof Error?e.message:String(e)}`)).finally(K))}function U(e,t){let n=m(`li`,`arena-contestant`),r=e.sessionIdByContestant[t.id],i=B(r),o=e.judge?.ranking.find(e=>e.contestantId===t.id)??null,s=e.diffStatsByContestant[t.id],c=m(`div`,`arena-contestant-head`);if(c.append(m(`span`,`arena-contestant-rank`,o?`#${o.rank}`:`-`)),c.append(m(`span`,`arena-contestant-label`,t.label)),c.append(m(`span`,`arena-contestant-state`,i===`removed`?`Removed`:z(i))),s&&c.append(m(`span`,`arena-contestant-stats`,`+${s.linesAdded} -${s.linesRemoved}, ${s.filesChanged} files`)),e.winnerContestantId===t.id&&c.append(m(`span`,`arena-contestant-winner`,`Winner`)),r&&i!==`removed`){c.append(a({variant:`quiet`,size:`small`,label:`Open`,onClick:()=>u(r)})),(e.winnerContestantId===null||e.winnerContestantId===t.id)&&c.append(a({variant:`quiet`,size:`small`,label:`Pick winner`,onClick:()=>W(e,t)}));let n=a({variant:`quiet`,size:`small`,label:`Show diff`,onClick:()=>H(e,t)});n.setAttribute(`aria-expanded`,String(L.has(V(e.id,t.id)))),c.append(n)}n.append(c),o&&n.append(m(`p`,`arena-contestant-reason`,o.reason));let l=L.get(V(e.id,t.id));return l!==void 0&&n.append(m(`pre`,`arena-diff`,l)),n}function W(e,t){let{dialog:n,close:r,actions:i,btnCancel:o}=te({title:`Pick ${t.label} as the winner`}),s=e.spec.contestants.filter(n=>n.id!==t.id&&B(e.sessionIdByContestant[n.id])!==`removed`),c=s.length>0?`${s.map(e=>e.label).join(`, `)} will be stopped and removed with their worktrees and branches, without pushing. ${t.label} stays an ordinary session.`:`${t.label} stays an ordinary session. No other contestant is left to remove.`;n.append(m(`p`,`dialog-message`,c));let l=e.judge?.notes[t.id]??null,u=m(`input`);if(u.type=`checkbox`,l){let e=m(`label`,`dialog-checkbox-label`);e.append(u,m(`span`,null,`Also send it the judge's notes`)),n.append(e,m(`pre`,`arena-diff`,l))}let d=a({variant:`danger`,label:`Pick winner`,onClick:()=>{r(),G(e,t,l!==null&&u.checked)}});i.append(d),n.append(i),o.addEventListener(`click`,r)}function G(e,t,n){R.set(e.id,`Picking ${t.label}.`),K(),h(`race-pick-winner`,{raceId:e.id,contestantId:t.id,sendNotes:n},{timeoutMs:A}).then(n=>{n.type===`race-pick-winner-result`&&R.set(e.id,n.ok?``:`Picked ${t.label} with problems: ${n.error??`unknown error`}`)}).catch(t=>R.set(e.id,`Could not pick the winner: ${t instanceof Error?t.message:String(t)}`)).finally(K)}function ce(e){R.set(e.id,`Asking the judge.`),K(),h(`race-judge`,{raceId:e.id},{timeoutMs:j}).then(t=>{t.type===`race-judge-result`&&R.set(e.id,t.ok?``:`Could not judge: ${t.error??`unknown error`}`)}).catch(t=>R.set(e.id,`Could not judge: ${t instanceof Error?t.message:String(t)}`)).finally(K)}function le(e){let t=ee(Object.values(e.sessionIdByContestant),e=>B(e));return e.winnerContestantId?`Winner: ${e.spec.contestants.find(t=>t.id===e.winnerContestantId)?.label??e.winnerContestantId}.`:e.phase===`judging`?`Judging.`:e.phase===`judged`?[e.judge?`Judged.`:`Finished.`,e.judgeError].filter(Boolean).join(` `):`${t.settled} of ${t.total} settled.`}function ue(e){let t=t=>e.judge?.ranking.find(e=>e.contestantId===t.id)?.rank??2**53-1;return[...e.spec.contestants].sort((e,n)=>t(e)-t(n))}function de(e){let t=m(`article`,`arena-race`);t.append(m(`h3`,`arena-race-title`,e.spec.title)),t.append(m(`p`,`arena-race-meta`,`${e.baseBranch} at ${e.startSha.slice(0,se)}, ${new Date(e.createdAt).toLocaleString()}`));let n=m(`div`,`arena-race-actions`),r=a({variant:`secondary`,size:`small`,label:`Judge now`,disabled:e.phase===`judging`,onClick:()=>ce(e)}),i=m(`span`,`arena-status`,R.get(e.id)||le(e));i.setAttribute(`role`,`status`),n.append(r,i),t.append(n);let o=m(`ul`,`arena-contestants`);for(let t of ue(e))o.append(U(e,t));return t.append(o),t}function K(){if(!N)return;let e=d();if(N.replaceChildren(m(`h2`,`arena-section-title`,`Races`)),e.length===0)N.append(m(`p`,`arena-empty`,`No races yet.`));else for(let t of e)N.append(de(t))}function q(e,t,n,r){let i=m(`select`,`settings-view-input arena-select`);i.setAttribute(`aria-label`,r);for(let n of e){let e=m(`option`,null,n.label);e.value=n.value,e.selected=n.value===t,i.append(e)}return i.addEventListener(`change`,()=>n(i.value)),i}function J(e,t,n=null){let r=m(`div`,`arena-setup`),i=x(P).filter(e=>!n||n.includes(e)).map(e=>({value:e,label:y(e)}));r.append(q(i,e.agent,n=>t({...T(P,n),instructions:e.instructions}),`Agent`));let a=b(P,e.agent).map(e=>({value:e.id,label:e.label}));r.append(q(a,e.model,n=>t(E(P,e,n)),`Model`));let o=S(P,e.agent,e.model);return o.length>0&&r.append(q(o.map(e=>({value:e,label:e})),C(e),n=>t(D(e,n)),`Effort`)),r}function Y(){return{version:1,title:F.raceTitle,prompt:F.prompt,repoPath:F.repoPath,contestants:F.contestants,judge:F.judgeSetup?{setup:F.judgeSetup}:null}}function X(e,t,n,r=!1){let i=m(`label`,`arena-field`);i.append(m(`span`,`arena-field-label`,e));let a=r?m(`textarea`,`settings-view-input arena-prompt`):m(`input`,`settings-view-input`);return a.value=t,a.addEventListener(`input`,()=>n(a.value)),i.append(a),i}function Z(e){return O(P,e.map(e=>e.setup))}function Q(e){let t=m(`div`,`arena-lineup`);return F.contestants.forEach((n,r)=>{let i=m(`div`,`arena-column`);i.append(m(`span`,`arena-column-label`,n.label)),i.append(J(n.setup,t=>{F.contestants=Z(F.contestants.map((e,n)=>n===r?{...e,setup:t}:e)),e()}));let o=m(`textarea`,`settings-view-input`);o.placeholder=`Extra instructions for this contestant`,o.rows=3,o.value=n.setup.instructions,o.addEventListener(`input`,()=>{F.contestants=F.contestants.map((e,t)=>t===r?{...e,setup:{...e.setup,instructions:o.value}}:e)}),i.append(o),i.append(a({variant:`quiet`,size:`small`,label:`Remove`,onClick:()=>{F.contestants=Z(F.contestants.filter((e,t)=>t!==r)),e()}})),t.append(i)}),t}function fe(e){let t=m(`div`,`arena-vary`),n=F.contestants[0]?.setup??T(P,x(P)[0]??`claude-code`),r=`model`,i=m(`div`,`arena-vary-choices`),o=()=>{i.replaceChildren();for(let e of ae(P,n,r)){let t=m(`label`,`dialog-checkbox-label`),n=m(`input`);n.type=`checkbox`,n.value=e.value,t.append(n,m(`span`,null,e.label)),i.append(t)}},s=m(`div`,`arena-vary-base`),c=()=>{s.replaceChildren(J(n,e=>{n=e,c(),o()}))};return t.append(m(`span`,`arena-field-label`,`Start from`),s),t.append(m(`span`,`arena-field-label`,`Vary`),q(v.map(e=>({value:e,label:e})),r,e=>{r=v.find(t=>t===e)??`model`,o()},`Setting to vary`)),t.append(i),t.append(a({variant:`secondary`,size:`small`,label:`Use these`,onClick:()=>{let t=[...i.querySelectorAll(`input:checked`)].map(e=>e instanceof HTMLInputElement?e.value:``).filter(Boolean);F.contestants=k(P,n,r,t),e()}})),c(),o(),t}function $(e){try{return JSON.parse(e)}catch{return null}}function pe(t){let n=e.safeParse($(t));if(!n.success)return`The race file is not valid: ${n.error.issues.map(e=>`${e.path.join(`.`)||`file`}: ${e.message}`).join(`; `)}`;let r=n.data;return F={raceTitle:r.title,prompt:r.prompt,repoPath:r.repoPath,contestants:r.contestants,judgeSetup:r.judge?.setup??null},null}function me(){let e=m(`section`,`arena-new`),t=m(`div`,`arena-new-body`),i=m(`span`,`arena-status`);i.setAttribute(`role`,`status`);let o=m(`textarea`,`settings-view-input arena-file`);o.setAttribute(`aria-label`,`Race spec JSON`);let s=()=>{if(t.replaceChildren(),o.hidden=!I,I){o.value=JSON.stringify(Y(),null,2),t.append(o);return}t.append(X(`Title`,F.raceTitle,e=>{F.raceTitle=e}));let e=X(`Repository folder`,F.repoPath,e=>{F.repoPath=e}),n=e.querySelector(`input`),i=m(`datalist`);i.id=`arena-repo-paths`;for(let e of new Set([...g.values()].map(e=>e.path))){let t=m(`option`);t.value=e,i.append(t)}n?.setAttribute(`list`,i.id),t.append(e,i),t.append(X(`Prompt`,F.prompt,e=>{F.prompt=e},!0)),t.append(fe(s)),t.append(Q(s));let c=a({variant:`quiet`,size:`small`,label:`Add contestant`,disabled:F.contestants.length>=5,onClick:()=>{let e=x(P)[0]??`claude-code`;F.contestants=Z([...F.contestants,{id:`new`,label:`new`,setup:F.contestants.at(-1)?.setup??T(P,e)}]),s()}}),l=m(`div`,`arena-judge`),u=m(`label`,`dialog-checkbox-label`),d=m(`input`);d.type=`checkbox`,d.checked=F.judgeSetup!==null,d.addEventListener(`change`,()=>{F.judgeSetup=d.checked?T(P,r):null,s()}),u.append(d,m(`span`,null,`Judge the results`)),l.append(u),F.judgeSetup&&l.append(J(F.judgeSetup,e=>{F.judgeSetup=e,s()},[r])),t.append(c,l)},c=a({variant:`quiet`,size:`small`,label:`Edit as file`,onClick:()=>{if(I){let e=pe(o.value);if(i.textContent=e??``,e)return}I=!I,c.setAttribute(`aria-pressed`,String(I)),s()}});c.setAttribute(`aria-pressed`,`false`);let l=a({variant:`primary`,label:`Start race`,onClick:()=>{let e=I?$(o.value):Y();l.disabled=!0,i.textContent=`Starting the contestants.`,h(`race-start`,{spec:e},{timeoutMs:A}).then(e=>{e.type===`race-start-result`&&(i.textContent=e.ok?e.error??`Race started.`:`Could not start the race: ${e.error??`unknown error`}`)}).catch(e=>{i.textContent=`Could not start the race: ${e instanceof Error?e.message:String(e)}`}).finally(()=>{l.disabled=!1})}}),u=m(`div`,`arena-new-head`);u.append(m(`h2`,`arena-section-title`,`New race`),c);let d=m(`div`,`arena-actions`);return d.append(l,i),e.append(u,t,d),s(),h(`get-settings`,{}).then(e=>{if(e.type!==`settings`)return;let t=n.safeParse(e.settings.agentModels);t.success&&(P=t.data,F.judgeSetup??=T(P,r),F.contestants.length===0&&(F.contestants=k(P,T(P,x(P)[0]??`claude-code`),`agent`,x(P).slice(0,2))),s())}).catch(e=>{i.textContent=`Could not load the model list: ${e instanceof Error?e.message:String(e)}`}),e}function he(e){if(M)return;M=m(`div`,`arena-content`),N=m(`section`,`arena-races`),M.append(N),s()||M.append(me());let t=m(`section`,`arena-bench`);M.append(t);let n=()=>{t.hidden=c().status?.configured!==!0};o(n),n(),e.append(M),f(K),_(K),K(),ne(()=>import(`./benchmark-panel-DfM8UqWu.js`).then(e=>e.view.mount(t)),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23]))}var ge={mount:he};export{ge as view};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/benchmark-panel-DlkCcgSm.js","assets/index-DDClR54l.js","assets/control-ws-DzxzsvLv.js","assets/button-BZKKRkAO.js","assets/zod-CioPbz_P.js","assets/dom-helpers-DGbgEgul.js","assets/modal-B-ac519L.js","assets/session-row-BRvZTznX.js","assets/session-actions-QVKyPetQ.js","assets/action-status-BuNMVnRh.js","assets/card-registry-DeJCxQOx.js","assets/card-actions-wUzC48xn.js","assets/ui-state-core-Nssh-6QJ.js","assets/ui-prefs-ZaJh9NjT.js","assets/alert-sound-core-CmJhj4qI.js","assets/local-store-CVQ5ByvB.js","assets/preload-helper-BLdHbfdN.js","assets/menu-DKkGG1mD.js","assets/roving-keys-core-BDobx2It.js","assets/session-tick-Bi93hGkg.js","assets/pr-status-icon-CgEk5wpC.js","assets/agent-mark-Cl3V4zSh.js","assets/index-CrTAdiY6.css","assets/benchmark-panel-E7vrfppm.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{Ht as e,Kt as t,Ut as n,Vt as r,Wt as i,t as a}from"./button-BZKKRkAO.js";import{$a as o,Ga as s,Za as c,bt as l,gt as u,vt as d,xt as ee,yt as f}from"./index-DDClR54l.js";import{Y as p,s as m}from"./dom-helpers-DGbgEgul.js";import{f as h}from"./control-ws-DzxzsvLv.js";import{o as g}from"./card-registry-DeJCxQOx.js";import{n as _}from"./session-tick-Bi93hGkg.js";import{n as te}from"./modal-B-ac519L.js";import{t as ne}from"./preload-helper-BLdHbfdN.js";var v=[`agent`,`model`,`effort`],re={"claude-code":`Claude Code`,codex:`Codex`,kimi:`Kimi Code`};function y(e){return re[e]??e}function b(e,t){return e.agents.find(e=>e.agent===t)?.models??[]}function x(e){return i.filter(t=>b(e,t).length>0)}function S(e,t,n){return b(e,t).find(e=>e.id===n)?.options.find(e=>e.id===`effort`)?.choices??[]}function C(e){return e.options.find(e=>e.id===`effort`)?.value??null}function w(e,n){let r=e.options.filter(e=>e.id!==t);return{...e,options:n===null?r:[...r,{id:t,value:n}]}}function T(e,t){let n=b(e,t),r=n.find(e=>e.isDefault)??n[0]??null,i=r?.options.find(e=>e.id===`effort`)?.defaultChoice??null;return w({agent:t,model:r?.id??null,options:[],instructions:``},i)}function E(e,t,n){let r=S(e,t.agent,n),i=C(t),a=b(e,t.agent).find(e=>e.id===n),o=i!==null&&r.includes(i)?i:a?.options.find(e=>e.id===`effort`)?.defaultChoice??null;return w({...t,model:n},o)}function D(e,t){return w(e,t)}function ie(e,t){let n=b(t,e.agent).find(t=>t.id===e.model)?.label??e.model??y(e.agent),r=C(e);return(r===null?n:`${n} ${r}`).slice(0,60)}function ae(e,t,n){return n===`agent`?x(e).map(e=>({value:e,label:y(e)})):n===`model`?b(e,t.agent).map(e=>({value:e.id,label:e.label})):S(e,t.agent,t.model).map(e=>({value:e,label:e}))}function oe(e,t,n,r){return n===`agent`?{...T(e,r),instructions:t.instructions}:n===`model`?E(e,t,r):w(t,r)}function O(e,t){let n=new Map;return t.slice(0,5).map((t,r)=>{let i=ie(t,e),a=(n.get(i)??0)+1;return n.set(i,a),{id:`c${r+1}`,label:a===1?i:`${i} ${a}`.slice(0,60),setup:t}})}function k(e,t,n,r){return O(e,r.map(r=>oe(e,t,n,r)))}var A=12e4,j=6e4,se=8,M=null,N=null,P={agents:[]},F={raceTitle:``,prompt:``,repoPath:``,contestants:[],judgeSetup:null},I=!1,L=new Map,R=new Map;function z(e){return Object.entries(p).find(([t])=>t===e)?.[1]??e}function B(e){let t=e?g.get(e):void 0;return t?t.currentState:l}function V(e,t){return`${e}:${t}`}function H(e,t){let n=V(e.id,t.id);L.has(n)?(L.delete(n),K()):(L.set(n,`Loading the diff.`),K(),h(`race-diff`,{raceId:e.id,contestantId:t.id},{timeoutMs:j}).then(e=>{e.type===`race-diff-result`&&L.set(n,e.ok?e.diff||`No changes.`:`Could not read the diff: ${e.error??`unknown error`}`)}).catch(e=>L.set(n,`Could not read the diff: ${e instanceof Error?e.message:String(e)}`)).finally(K))}function U(e,t){let n=m(`li`,`arena-contestant`),r=e.sessionIdByContestant[t.id],i=B(r),o=e.judge?.ranking.find(e=>e.contestantId===t.id)??null,s=e.diffStatsByContestant[t.id],c=m(`div`,`arena-contestant-head`);if(c.append(m(`span`,`arena-contestant-rank`,o?`#${o.rank}`:`-`)),c.append(m(`span`,`arena-contestant-label`,t.label)),c.append(m(`span`,`arena-contestant-state`,i===`removed`?`Removed`:z(i))),s&&c.append(m(`span`,`arena-contestant-stats`,`+${s.linesAdded} -${s.linesRemoved}, ${s.filesChanged} files`)),e.winnerContestantId===t.id&&c.append(m(`span`,`arena-contestant-winner`,`Winner`)),r&&i!==`removed`){c.append(a({variant:`quiet`,size:`small`,label:`Open`,onClick:()=>u(r)})),(e.winnerContestantId===null||e.winnerContestantId===t.id)&&c.append(a({variant:`quiet`,size:`small`,label:`Pick winner`,onClick:()=>W(e,t)}));let n=a({variant:`quiet`,size:`small`,label:`Show diff`,onClick:()=>H(e,t)});n.setAttribute(`aria-expanded`,String(L.has(V(e.id,t.id)))),c.append(n)}n.append(c),o&&n.append(m(`p`,`arena-contestant-reason`,o.reason));let l=L.get(V(e.id,t.id));return l!==void 0&&n.append(m(`pre`,`arena-diff`,l)),n}function W(e,t){let{dialog:n,close:r,actions:i,btnCancel:o}=te({title:`Pick ${t.label} as the winner`}),s=e.spec.contestants.filter(n=>n.id!==t.id&&B(e.sessionIdByContestant[n.id])!==`removed`),c=s.length>0?`${s.map(e=>e.label).join(`, `)} will be stopped and removed with their worktrees and branches, without pushing. ${t.label} stays an ordinary session.`:`${t.label} stays an ordinary session. No other contestant is left to remove.`;n.append(m(`p`,`dialog-message`,c));let l=e.judge?.notes[t.id]??null,u=m(`input`);if(u.type=`checkbox`,l){let e=m(`label`,`dialog-checkbox-label`);e.append(u,m(`span`,null,`Also send it the judge's notes`)),n.append(e,m(`pre`,`arena-diff`,l))}let d=a({variant:`danger`,label:`Pick winner`,onClick:()=>{r(),G(e,t,l!==null&&u.checked)}});i.append(d),n.append(i),o.addEventListener(`click`,r)}function G(e,t,n){R.set(e.id,`Picking ${t.label}.`),K(),h(`race-pick-winner`,{raceId:e.id,contestantId:t.id,sendNotes:n},{timeoutMs:A}).then(n=>{n.type===`race-pick-winner-result`&&R.set(e.id,n.ok?``:`Picked ${t.label} with problems: ${n.error??`unknown error`}`)}).catch(t=>R.set(e.id,`Could not pick the winner: ${t instanceof Error?t.message:String(t)}`)).finally(K)}function ce(e){R.set(e.id,`Asking the judge.`),K(),h(`race-judge`,{raceId:e.id},{timeoutMs:j}).then(t=>{t.type===`race-judge-result`&&R.set(e.id,t.ok?``:`Could not judge: ${t.error??`unknown error`}`)}).catch(t=>R.set(e.id,`Could not judge: ${t instanceof Error?t.message:String(t)}`)).finally(K)}function le(e){let t=ee(Object.values(e.sessionIdByContestant),e=>B(e));return e.winnerContestantId?`Winner: ${e.spec.contestants.find(t=>t.id===e.winnerContestantId)?.label??e.winnerContestantId}.`:e.phase===`judging`?`Judging.`:e.phase===`judged`?[e.judge?`Judged.`:`Finished.`,e.judgeError].filter(Boolean).join(` `):`${t.settled} of ${t.total} settled.`}function ue(e){let t=t=>e.judge?.ranking.find(e=>e.contestantId===t.id)?.rank??2**53-1;return[...e.spec.contestants].sort((e,n)=>t(e)-t(n))}function de(e){let t=m(`article`,`arena-race`);t.append(m(`h3`,`arena-race-title`,e.spec.title)),t.append(m(`p`,`arena-race-meta`,`${e.baseBranch} at ${e.startSha.slice(0,se)}, ${new Date(e.createdAt).toLocaleString()}`));let n=m(`div`,`arena-race-actions`),r=a({variant:`secondary`,size:`small`,label:`Judge now`,disabled:e.phase===`judging`,onClick:()=>ce(e)}),i=m(`span`,`arena-status`,R.get(e.id)||le(e));i.setAttribute(`role`,`status`),n.append(r,i),t.append(n);let o=m(`ul`,`arena-contestants`);for(let t of ue(e))o.append(U(e,t));return t.append(o),t}function K(){if(!N)return;let e=d();if(N.replaceChildren(m(`h2`,`arena-section-title`,`Races`)),e.length===0)N.append(m(`p`,`arena-empty`,`No races yet.`));else for(let t of e)N.append(de(t))}function q(e,t,n,r){let i=m(`select`,`settings-view-input arena-select`);i.setAttribute(`aria-label`,r);for(let n of e){let e=m(`option`,null,n.label);e.value=n.value,e.selected=n.value===t,i.append(e)}return i.addEventListener(`change`,()=>n(i.value)),i}function J(e,t,n=null){let r=m(`div`,`arena-setup`),i=x(P).filter(e=>!n||n.includes(e)).map(e=>({value:e,label:y(e)}));r.append(q(i,e.agent,n=>t({...T(P,n),instructions:e.instructions}),`Agent`));let a=b(P,e.agent).map(e=>({value:e.id,label:e.label}));r.append(q(a,e.model,n=>t(E(P,e,n)),`Model`));let o=S(P,e.agent,e.model);return o.length>0&&r.append(q(o.map(e=>({value:e,label:e})),C(e),n=>t(D(e,n)),`Effort`)),r}function Y(){return{version:1,title:F.raceTitle,prompt:F.prompt,repoPath:F.repoPath,contestants:F.contestants,judge:F.judgeSetup?{setup:F.judgeSetup}:null}}function X(e,t,n,r=!1){let i=m(`label`,`arena-field`);i.append(m(`span`,`arena-field-label`,e));let a=r?m(`textarea`,`settings-view-input arena-prompt`):m(`input`,`settings-view-input`);return a.value=t,a.addEventListener(`input`,()=>n(a.value)),i.append(a),i}function Z(e){return O(P,e.map(e=>e.setup))}function Q(e){let t=m(`div`,`arena-lineup`);return F.contestants.forEach((n,r)=>{let i=m(`div`,`arena-column`);i.append(m(`span`,`arena-column-label`,n.label)),i.append(J(n.setup,t=>{F.contestants=Z(F.contestants.map((e,n)=>n===r?{...e,setup:t}:e)),e()}));let o=m(`textarea`,`settings-view-input`);o.placeholder=`Extra instructions for this contestant`,o.rows=3,o.value=n.setup.instructions,o.addEventListener(`input`,()=>{F.contestants=F.contestants.map((e,t)=>t===r?{...e,setup:{...e.setup,instructions:o.value}}:e)}),i.append(o),i.append(a({variant:`quiet`,size:`small`,label:`Remove`,onClick:()=>{F.contestants=Z(F.contestants.filter((e,t)=>t!==r)),e()}})),t.append(i)}),t}function fe(e){let t=m(`div`,`arena-vary`),n=F.contestants[0]?.setup??T(P,x(P)[0]??`claude-code`),r=`model`,i=m(`div`,`arena-vary-choices`),o=()=>{i.replaceChildren();for(let e of ae(P,n,r)){let t=m(`label`,`dialog-checkbox-label`),n=m(`input`);n.type=`checkbox`,n.value=e.value,t.append(n,m(`span`,null,e.label)),i.append(t)}},s=m(`div`,`arena-vary-base`),c=()=>{s.replaceChildren(J(n,e=>{n=e,c(),o()}))};return t.append(m(`span`,`arena-field-label`,`Start from`),s),t.append(m(`span`,`arena-field-label`,`Vary`),q(v.map(e=>({value:e,label:e})),r,e=>{r=v.find(t=>t===e)??`model`,o()},`Setting to vary`)),t.append(i),t.append(a({variant:`secondary`,size:`small`,label:`Use these`,onClick:()=>{let t=[...i.querySelectorAll(`input:checked`)].map(e=>e instanceof HTMLInputElement?e.value:``).filter(Boolean);F.contestants=k(P,n,r,t),e()}})),c(),o(),t}function $(e){try{return JSON.parse(e)}catch{return null}}function pe(t){let n=e.safeParse($(t));if(!n.success)return`The race file is not valid: ${n.error.issues.map(e=>`${e.path.join(`.`)||`file`}: ${e.message}`).join(`; `)}`;let r=n.data;return F={raceTitle:r.title,prompt:r.prompt,repoPath:r.repoPath,contestants:r.contestants,judgeSetup:r.judge?.setup??null},null}function me(){let e=m(`section`,`arena-new`),t=m(`div`,`arena-new-body`),i=m(`span`,`arena-status`);i.setAttribute(`role`,`status`);let o=m(`textarea`,`settings-view-input arena-file`);o.setAttribute(`aria-label`,`Race spec JSON`);let s=()=>{if(t.replaceChildren(),o.hidden=!I,I){o.value=JSON.stringify(Y(),null,2),t.append(o);return}t.append(X(`Title`,F.raceTitle,e=>{F.raceTitle=e}));let e=X(`Repository folder`,F.repoPath,e=>{F.repoPath=e}),n=e.querySelector(`input`),i=m(`datalist`);i.id=`arena-repo-paths`;for(let e of new Set([...g.values()].map(e=>e.path))){let t=m(`option`);t.value=e,i.append(t)}n?.setAttribute(`list`,i.id),t.append(e,i),t.append(X(`Prompt`,F.prompt,e=>{F.prompt=e},!0)),t.append(fe(s)),t.append(Q(s));let c=a({variant:`quiet`,size:`small`,label:`Add contestant`,disabled:F.contestants.length>=5,onClick:()=>{let e=x(P)[0]??`claude-code`;F.contestants=Z([...F.contestants,{id:`new`,label:`new`,setup:F.contestants.at(-1)?.setup??T(P,e)}]),s()}}),l=m(`div`,`arena-judge`),u=m(`label`,`dialog-checkbox-label`),d=m(`input`);d.type=`checkbox`,d.checked=F.judgeSetup!==null,d.addEventListener(`change`,()=>{F.judgeSetup=d.checked?T(P,r):null,s()}),u.append(d,m(`span`,null,`Judge the results`)),l.append(u),F.judgeSetup&&l.append(J(F.judgeSetup,e=>{F.judgeSetup=e,s()},[r])),t.append(c,l)},c=a({variant:`quiet`,size:`small`,label:`Edit as file`,onClick:()=>{if(I){let e=pe(o.value);if(i.textContent=e??``,e)return}I=!I,c.setAttribute(`aria-pressed`,String(I)),s()}});c.setAttribute(`aria-pressed`,`false`);let l=a({variant:`primary`,label:`Start race`,onClick:()=>{let e=I?$(o.value):Y();l.disabled=!0,i.textContent=`Starting the contestants.`,h(`race-start`,{spec:e},{timeoutMs:A}).then(e=>{e.type===`race-start-result`&&(i.textContent=e.ok?e.error??`Race started.`:`Could not start the race: ${e.error??`unknown error`}`)}).catch(e=>{i.textContent=`Could not start the race: ${e instanceof Error?e.message:String(e)}`}).finally(()=>{l.disabled=!1})}}),u=m(`div`,`arena-new-head`);u.append(m(`h2`,`arena-section-title`,`New race`),c);let d=m(`div`,`arena-actions`);return d.append(l,i),e.append(u,t,d),s(),h(`get-settings`,{}).then(e=>{if(e.type!==`settings`)return;let t=n.safeParse(e.settings.agentModels);t.success&&(P=t.data,F.judgeSetup??=T(P,r),F.contestants.length===0&&(F.contestants=k(P,T(P,x(P)[0]??`claude-code`),`agent`,x(P).slice(0,2))),s())}).catch(e=>{i.textContent=`Could not load the model list: ${e instanceof Error?e.message:String(e)}`}),e}function he(e){if(M)return;M=m(`div`,`arena-content`),N=m(`section`,`arena-races`),M.append(N),s()||M.append(me());let t=m(`section`,`arena-bench`);M.append(t);let n=()=>{t.hidden=c().status?.configured!==!0};o(n),n(),e.append(M),f(K),_(K),K(),ne(()=>import(`./benchmark-panel-DlkCcgSm.js`).then(e=>e.view.mount(t)),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23]))}var ge={mount:he};export{ge as view};
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$a as e,Qa as t,Za as n}from"./index-
|
|
1
|
+
import{$a as e,Qa as t,Za as n}from"./index-DDClR54l.js";import{n as r,r as i,s as a}from"./dom-helpers-DGbgEgul.js";import{t as o}from"./button-BZKKRkAO.js";var s={mine:`Mine`,run:`Run`,cancel:`Cancel`},c=null;function l(e){return e===null?`n/a`:`${Math.round(e*100)}%`}function u(e){if(e===null)return`n/a`;let t=Math.round(e*100);return t>0?`+${t}`:String(t)}function d(e,n,r){return o({variant:n===`cancel`?`secondary`:`primary`,size:`small`,label:s[n],action:`benchmark-${n}`,disabled:r,onClick:()=>t(e.id,n)})}function f(e,t){let n=e.inFlight;if(!n||n.suiteId!==t.id)return``;let r=n.caseId?`case ${n.caseId}, `:``;return`Cell ${n.cellIndex+1} of ${n.cellCount}: ${r}arm ${n.armId}, trial ${n.trial}, ${n.phase}.`}function p(e){let t=e&&e.invalid>0?` (${e.invalid} invalid)`:``,n=a(`td`,`bench-score`,`${l(e?.recall??null)}${t}`);return e&&e.degraded>0&&(n.dataset.degraded=`true`),n}function m(e){let t=e.armIds.filter(t=>t!==e.baselineArm),n=a(`table`,`bench-table`),r=a(`tr`);r.append(a(`th`,null,`Case`),...e.armIds.map(t=>a(`th`,null,t===e.baselineArm?`${t} (baseline)`:t))),r.append(...t.map(e=>a(`th`,null,`${e} vs baseline`))),n.append(r);for(let r of e.rows){let i=a(`tr`);i.append(a(`td`,`bench-case`,r.caseId),...e.armIds.map(e=>p(r.arms[e]))),i.append(...t.map(e=>a(`td`,`bench-delta`,u(r.deltaVsBaseline[e]??null)))),n.append(i)}let i=[...new Set(e.armIds.flatMap(t=>Object.keys(e.totals[t]?.recallByTag??{})))].sort(),o=a(`tr`,`bench-total`);o.append(a(`td`,`bench-case`,`Paired recall`),...e.armIds.map(t=>p(e.totals[t]))),n.append(o);for(let t of i){let r=a(`tr`,`bench-total`);r.append(a(`td`,`bench-case`,`Recall, ${t}`),...e.armIds.map(n=>a(`td`,`bench-score`,l(e.totals[n]?.recallByTag[t]??null)))),n.append(r)}return n}function h(e,t){let{isServerConnected:r,pendingActionBySuite:o,outcomeBySuite:s}=n(),c=a(`div`,`bench-suite`),l=e.inFlight?.suiteId===t.id,u=!!e.inFlight&&!l,p=o.has(t.id)||!r,h=a(`div`,`bench-summary`);h.append(a(`span`,`bench-suite-title`,t.title),i(`bench`,t.caseCount===1?`case`:`cases`,String(t.caseCount)),i(`bench`,t.candidateCount===1?`candidate`:`candidates`,String(t.candidateCount)),i(`bench`,`arms`,String(t.armIds.length))),c.append(h);let g=a(`div`,`bench-controls`),_=e.configured===!0&&t.error===null;g.append(d(t,`mine`,!_||p||l),d(t,`run`,!_||p||l||u||t.caseCount===0),d(t,`cancel`,p||!l));let v=a(`span`,`bench-status`,(r?``:`Not connected to the server. Reconnecting.`)||f(e,t)||s.get(t.id)||``);if(v.setAttribute(`role`,`status`),g.append(v),c.append(g),t.error)return c.append(a(`p`,`bench-error`,t.error)),c;let y=t.latestReport;return y?(c.append(a(`p`,`bench-run-line`,`Latest run ${y.runId}: ${y.status}. Only cases every arm scored count toward paired recall.`)),y.rows.length>0&&c.append(m(y)),c):(c.append(a(`p`,`bench-empty`,t.caseCount===0?`Move approved candidates into the cases folder, then choose Run.`:`No run yet.`)),c)}function g(){if(!c)return;c.textContent=``;let{status:e}=n(),t=r(`bench`,`Benchmarks`,`Suites from the benchmarks folder of the Glimmervoid home, one run at a time.`);if(c.append(t),!e)c.append(a(`p`,`bench-empty`,`Waiting for the server.`));else if(!e.configured)c.append(a(`p`,`bench-empty`,e.reason||`Benchmarks are off.`));else if(e.suites.length===0)c.append(a(`p`,`bench-empty`,`No suites yet. Create a folder holding suite.json under benchmarks in the Glimmervoid home.`));else for(let t of e.suites)c.append(h(e,t))}function _(t){c||(c=a(`div`,`bench-content`),t.append(c),e(g),g())}var v={mount:_};export{v as view};
|
|
Binary file
|