glimmervoid 0.52.3-next.781 → 0.52.3-next.782

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.
Files changed (96) hide show
  1. package/dist/bin/glimmervoid.js +1 -1
  2. package/dist/chunks/{adapters-scNb_8zN.js → adapters-B5OoLoCc.js} +10 -1
  3. package/dist/chunks/adapters-D4HZn-iw.js +1 -0
  4. package/dist/chunks/{main-D1-V_l0f.js → main-BIVCaUz3.js} +183 -25
  5. package/dist/client/assets/{agent-mark-tyCNNktc.js → agent-mark-BqFnJem8.js} +1 -1
  6. package/dist/client/assets/agent-mark-BqFnJem8.js.br +0 -0
  7. package/dist/client/assets/{arena-panel-FeRXdFDr.js → arena-panel-DQEuedK0.js} +2 -2
  8. package/dist/client/assets/arena-panel-DQEuedK0.js.br +0 -0
  9. package/dist/client/assets/{benchmark-panel-Bm5Z_O5D.js → benchmark-panel-C96qR8J1.js} +1 -1
  10. package/dist/client/assets/benchmark-panel-C96qR8J1.js.br +0 -0
  11. package/dist/client/assets/{boards-view-BEVXQrHC.js → boards-view-CgmdWZf3.js} +1 -1
  12. package/dist/client/assets/boards-view-CgmdWZf3.js.br +0 -0
  13. package/dist/client/assets/{community-panel-CnP2FDM2.js → community-panel-DCzhK5mM.js} +1 -1
  14. package/dist/client/assets/community-panel-DCzhK5mM.js.br +0 -0
  15. package/dist/client/assets/{dialogs-CKXJDC7K.js → dialogs-BGdllLTd.js} +1 -1
  16. package/dist/client/assets/dialogs-BGdllLTd.js.br +0 -0
  17. package/dist/client/assets/{doc-editor-ui-CpGUGIdT.js → doc-editor-ui-DFn8JBbd.js} +1 -1
  18. package/dist/client/assets/doc-editor-ui-DFn8JBbd.js.br +0 -0
  19. package/dist/client/assets/{feature-hint-CF-3Yh6K.js → feature-hint-D5IyCAkP.js} +1 -1
  20. package/dist/client/assets/feature-hint-D5IyCAkP.js.br +0 -0
  21. package/dist/client/assets/{first-run-checklist-CpABKg9r.js → first-run-checklist-BitVBYhA.js} +1 -1
  22. package/dist/client/assets/first-run-checklist-BitVBYhA.js.br +0 -0
  23. package/dist/client/assets/{hooks-panel-Dtbz9h7T.js → hooks-panel-BafEIm_4.js} +1 -1
  24. package/dist/client/assets/hooks-panel-BafEIm_4.js.br +0 -0
  25. package/dist/client/assets/{index-hG3gurrQ.js → index-D-I5Bdux.js} +5 -5
  26. package/dist/client/assets/index-D-I5Bdux.js.br +0 -0
  27. package/dist/client/assets/{issues-panel-DYi_4bYR.js → issues-panel-CwwQlCEK.js} +1 -1
  28. package/dist/client/assets/issues-panel-CwwQlCEK.js.br +0 -0
  29. package/dist/client/assets/{lane-read-token-step-Cx5mTjyD.js → lane-read-token-step-CYM006Vc.js} +1 -1
  30. package/dist/client/assets/lane-read-token-step-CYM006Vc.js.br +0 -0
  31. package/dist/client/assets/{my-prs-panel-DeZBi7ct.js → my-prs-panel-DEchkpZe.js} +1 -1
  32. package/dist/client/assets/my-prs-panel-DEchkpZe.js.br +0 -0
  33. package/dist/client/assets/{nyan-cat-CeMEd5ws.js → nyan-cat-qs0ED6MV.js} +1 -1
  34. package/dist/client/assets/nyan-cat-qs0ED6MV.js.br +0 -0
  35. package/dist/client/assets/{phone-shell-D9-jjzqD.js → phone-shell-DxXTcRyb.js} +1 -1
  36. package/dist/client/assets/phone-shell-DxXTcRyb.js.br +0 -0
  37. package/dist/client/assets/{plan-face-C94R0So2.js → plan-face-dN2WM4E0.js} +1 -1
  38. package/dist/client/assets/plan-face-dN2WM4E0.js.br +0 -0
  39. package/dist/client/assets/{plan-render-gpMjjhSu.js → plan-render-9nde5tnv.js} +1 -1
  40. package/dist/client/assets/plan-render-9nde5tnv.js.br +0 -0
  41. package/dist/client/assets/{pr-queue-columns-DgClEjx0.js → pr-queue-columns-CuwA-nIp.js} +1 -1
  42. package/dist/client/assets/pr-queue-columns-CuwA-nIp.js.br +0 -0
  43. package/dist/client/assets/{radar-panel-BOfkbfxI.js → radar-panel-DrtZQ9aW.js} +1 -1
  44. package/dist/client/assets/radar-panel-DrtZQ9aW.js.br +0 -0
  45. package/dist/client/assets/{repo-roots-adder-BaEgrPro.js → repo-roots-adder-DJFf0IDa.js} +1 -1
  46. package/dist/client/assets/repo-roots-adder-DJFf0IDa.js.br +0 -0
  47. package/dist/client/assets/{resume-dialog-BgZIcb8u.js → resume-dialog-XHxojRra.js} +1 -1
  48. package/dist/client/assets/resume-dialog-XHxojRra.js.br +0 -0
  49. package/dist/client/assets/{review-queue-panel-B3QicQOg.js → review-queue-panel-Cov6cA_r.js} +1 -1
  50. package/dist/client/assets/review-queue-panel-Cov6cA_r.js.br +0 -0
  51. package/dist/client/assets/{session-actions-EiiG4HO5.js → session-actions-K7U3UnMC.js} +2 -2
  52. package/dist/client/assets/session-actions-K7U3UnMC.js.br +0 -0
  53. package/dist/client/assets/{session-row-DoFRwIgi.js → session-row-DhrcM0P7.js} +1 -1
  54. package/dist/client/assets/session-row-DhrcM0P7.js.br +0 -0
  55. package/dist/client/assets/{settings-panel-CYIKr0yv.js → settings-panel-D48-ajAr.js} +2 -2
  56. package/dist/client/assets/settings-panel-D48-ajAr.js.br +0 -0
  57. package/dist/client/assets/{trace-panel-Br-D8Xf1.js → trace-panel-C2_LuozU.js} +1 -1
  58. package/dist/client/assets/trace-panel-C2_LuozU.js.br +0 -0
  59. package/dist/client/assets/{usage-panel-D-OxKh24.js → usage-panel-gJuz1Yn1.js} +1 -1
  60. package/dist/client/assets/usage-panel-gJuz1Yn1.js.br +0 -0
  61. package/dist/client/assets/{your-day-tip-CBeUTMsJ.js → your-day-tip-67SHCDes.js} +1 -1
  62. package/dist/client/assets/your-day-tip-67SHCDes.js.br +5 -0
  63. package/dist/client/index.html +4 -4
  64. package/dist/client/index.html.br +0 -0
  65. package/dist/server/index.js +1 -1
  66. package/package.json +1 -1
  67. package/dist/chunks/adapters-UruGG71z.js +0 -1
  68. package/dist/client/assets/agent-mark-tyCNNktc.js.br +0 -0
  69. package/dist/client/assets/arena-panel-FeRXdFDr.js.br +0 -0
  70. package/dist/client/assets/benchmark-panel-Bm5Z_O5D.js.br +0 -0
  71. package/dist/client/assets/boards-view-BEVXQrHC.js.br +0 -0
  72. package/dist/client/assets/community-panel-CnP2FDM2.js.br +0 -0
  73. package/dist/client/assets/dialogs-CKXJDC7K.js.br +0 -0
  74. package/dist/client/assets/doc-editor-ui-CpGUGIdT.js.br +0 -0
  75. package/dist/client/assets/feature-hint-CF-3Yh6K.js.br +0 -0
  76. package/dist/client/assets/first-run-checklist-CpABKg9r.js.br +0 -0
  77. package/dist/client/assets/hooks-panel-Dtbz9h7T.js.br +0 -0
  78. package/dist/client/assets/index-hG3gurrQ.js.br +0 -0
  79. package/dist/client/assets/issues-panel-DYi_4bYR.js.br +0 -0
  80. package/dist/client/assets/lane-read-token-step-Cx5mTjyD.js.br +0 -0
  81. package/dist/client/assets/my-prs-panel-DeZBi7ct.js.br +0 -0
  82. package/dist/client/assets/nyan-cat-CeMEd5ws.js.br +0 -0
  83. package/dist/client/assets/phone-shell-D9-jjzqD.js.br +0 -0
  84. package/dist/client/assets/plan-face-C94R0So2.js.br +0 -0
  85. package/dist/client/assets/plan-render-gpMjjhSu.js.br +0 -0
  86. package/dist/client/assets/pr-queue-columns-DgClEjx0.js.br +0 -0
  87. package/dist/client/assets/radar-panel-BOfkbfxI.js.br +0 -0
  88. package/dist/client/assets/repo-roots-adder-BaEgrPro.js.br +0 -0
  89. package/dist/client/assets/resume-dialog-BgZIcb8u.js.br +0 -0
  90. package/dist/client/assets/review-queue-panel-B3QicQOg.js.br +0 -0
  91. package/dist/client/assets/session-actions-EiiG4HO5.js.br +0 -0
  92. package/dist/client/assets/session-row-DoFRwIgi.js.br +0 -0
  93. package/dist/client/assets/settings-panel-CYIKr0yv.js.br +0 -0
  94. package/dist/client/assets/trace-panel-Br-D8Xf1.js.br +0 -0
  95. package/dist/client/assets/usage-panel-D-OxKh24.js.br +0 -0
  96. package/dist/client/assets/your-day-tip-CBeUTMsJ.js.br +0 -0
@@ -274,7 +274,7 @@ async function runDoctor() {
274
274
  }
275
275
  switchSection("Agents");
276
276
  try {
277
- const { listAgentIds, describeAgentResolvability, setCustomAgents } = await import("../chunks/adapters-UruGG71z.js");
277
+ const { listAgentIds, describeAgentResolvability, setCustomAgents } = await import("../chunks/adapters-D4HZn-iw.js");
278
278
  const declaredCustomAgents = await readDeclaredCustomAgents();
279
279
  if (declaredCustomAgents.error) line("config", declaredCustomAgents.error);
280
280
  setCustomAgents(declaredCustomAgents.declared);
@@ -3769,6 +3769,15 @@ function hookProfileOf(adapter) {
3769
3769
  if (!adapter.capabilities.hooks) return null;
3770
3770
  return adapter.hooks;
3771
3771
  }
3772
+ function projectHookConfigRelPaths() {
3773
+ const relPaths = /* @__PURE__ */ new Set();
3774
+ for (const { adapter } of BUILT_IN_AGENTS) {
3775
+ const injection = hookProfileOf(adapter)?.injection;
3776
+ if (!injection || !("projectConfigCandidates" in injection)) continue;
3777
+ for (const { relPath } of injection.projectConfigCandidates) relPaths.add(relPath);
3778
+ }
3779
+ return [...relPaths];
3780
+ }
3772
3781
  function listAgentIds() {
3773
3782
  return [...ADAPTERS.keys(), ...customAdapters.keys()];
3774
3783
  }
@@ -3832,4 +3841,4 @@ function resetCommandCache() {
3832
3841
  resolvedCommands.clear();
3833
3842
  }
3834
3843
  //#endregion
3835
- export { decideFileRead as $, openContainedFile as A, HOOK_EVENTS$4 as At, TRACE_TAIL_SCAN_BYTES as B, hooksForProject as Bt, normalizeSha as C, mergeGenerationRollups as Ct, parseResolvedSha as D, totalTokensOf as Dt, parseRegistryLatest as E, shouldReplace as Et, framePathPaste as F, writeSessionSettings as Ft, planContiguousRead as G, upsertHook as Gt, completeLineBytes as H, rawStoredHooks as Ht, imageMimeForUploadFilename as I, HOOK_EVENT_CATALOG as It, codexFallbackRoots as J, appendRemovalRecord as Jt, resumeOffsetFrom as K, makeHostScratchDirectory as Kt, isSafePathSegment as L, ID_RE as Lt, buildUploadFilename as M, buildHookSettings as Mt, decideUploadType as N, generateToken as Nt, pickNewestPublished as O, vendorUsageEntry as Ot, exceedsUploadCap as P, sweepOrphans as Pt, continuationDelayMs as Q, listClaudeGlobalConfigPathCandidates as Qt, planUploadRetention as R, agentHookGroupOf as Rt, isCheckFresh as S, isWithinGenerationRecencyWindow as St, parseRegistryDeprecation as T, parseUsageLine as Tt, containmentRefusalReason as U, readStoredHooks as Ut, committedOffsetFromTraceTailOrNull as V, normalizeHook as Vt, isOversizedPartialLine as W, removeHook as Wt, codexRootCandidates as X, recordSweptPath as Xt, codexHomes as Y, appendRemovalRecordSync as Yt, codexSessionIdFromPath as Z, removalsJournalPath as Zt, readHostCodexVersion as _, emptyTotals as _t, customAgentFingerprint as a, passOutcome as at, decideInstallFlavor as b, foldReplacementIntoGenerationRollup as bt, hookProfileOf as c, scopedClaudeRoots as ct, listAgentIds as d, shouldPersistWarehouse as dt, dedupeCodexFiles as et, resetCommandCache as f, splitLines as ft, codex as g, dedupKeys as gt, folderTrustRoot as h, addEntryToTotals as ht, commandFor as i, kimiHomes as it, MAX_UPLOAD_BYTES as j, PLAN_HOLD_RELEASE_MS as jt, shortSha as k, claudeCode as kt, isBuiltInAgentId as l, sessionsRootCandidates as lt, setCustomAgents as m, parseKimiUsageLine as mt, DEFAULT_AGENT_ID as n, grokHomes as nt, describeAgentResolvability as o, projectDirCandidates as ot, resolveAdapter as p, kimiDedupIdentity as pt, withCommittedOffset as q, sweepOrphanedHostScratch as qt, cachedAgentResolvability as r, isUsageFile as rt, getAdapter as s, resolveProjectsDirs as st, BUILT_IN_AGENTS as t, expandTilde as tt, isKnownAgentId as u, shouldEvaluateDespiteIoFailures as ut, requestCodexAppServer as v, expandAdvisorIterations as vt, normalizeUpdateChannel as w, parseJsonLine as wt, decideUpdateStatus as x, identityFromRelPath as xt, NODE_PTY_INSTALL_SCRIPT_FLAG as y, foldEntryIntoGenerationRollup as yt, MAX_TRANSCRIPT_READ_BYTES as z, appendUserHooks as zt };
3844
+ export { continuationDelayMs as $, listClaudeGlobalConfigPathCandidates as $t, shortSha as A, claudeCode as At, MAX_TRANSCRIPT_READ_BYTES as B, appendUserHooks as Bt, isCheckFresh as C, isWithinGenerationRecencyWindow as Ct, parseRegistryLatest as D, shouldReplace as Dt, parseRegistryDeprecation as E, parseUsageLine as Et, exceedsUploadCap as F, sweepOrphans as Ft, isOversizedPartialLine as G, removeHook as Gt, committedOffsetFromTraceTailOrNull as H, normalizeHook as Ht, framePathPaste as I, writeSessionSettings as It, withCommittedOffset as J, sweepOrphanedHostScratch as Jt, planContiguousRead as K, upsertHook as Kt, imageMimeForUploadFilename as L, HOOK_EVENT_CATALOG as Lt, MAX_UPLOAD_BYTES as M, PLAN_HOLD_RELEASE_MS as Mt, buildUploadFilename as N, buildHookSettings as Nt, parseResolvedSha as O, totalTokensOf as Ot, decideUploadType as P, generateToken as Pt, codexSessionIdFromPath as Q, removalsJournalPath as Qt, isSafePathSegment as R, ID_RE as Rt, decideUpdateStatus as S, identityFromRelPath as St, normalizeUpdateChannel as T, parseJsonLine as Tt, completeLineBytes as U, rawStoredHooks as Ut, TRACE_TAIL_SCAN_BYTES as V, hooksForProject as Vt, containmentRefusalReason as W, readStoredHooks as Wt, codexHomes as X, appendRemovalRecordSync as Xt, codexFallbackRoots as Y, appendRemovalRecord as Yt, codexRootCandidates as Z, recordSweptPath as Zt, codex as _, dedupKeys as _t, customAgentFingerprint as a, kimiHomes as at, NODE_PTY_INSTALL_SCRIPT_FLAG as b, foldEntryIntoGenerationRollup as bt, hookProfileOf as c, resolveProjectsDirs as ct, listAgentIds as d, shouldEvaluateDespiteIoFailures as dt, decideFileRead as et, projectHookConfigRelPaths as f, shouldPersistWarehouse as ft, folderTrustRoot as g, addEntryToTotals as gt, setCustomAgents as h, parseKimiUsageLine as ht, commandFor as i, isUsageFile as it, openContainedFile as j, HOOK_EVENTS$4 as jt, pickNewestPublished as k, vendorUsageEntry as kt, isBuiltInAgentId as l, scopedClaudeRoots as lt, resolveAdapter as m, kimiDedupIdentity as mt, DEFAULT_AGENT_ID as n, expandTilde as nt, describeAgentResolvability as o, passOutcome as ot, resetCommandCache as p, splitLines as pt, resumeOffsetFrom as q, makeHostScratchDirectory as qt, cachedAgentResolvability as r, grokHomes as rt, getAdapter as s, projectDirCandidates as st, BUILT_IN_AGENTS as t, dedupeCodexFiles as tt, isKnownAgentId as u, sessionsRootCandidates as ut, readHostCodexVersion as v, emptyTotals as vt, normalizeSha as w, mergeGenerationRollups as wt, decideInstallFlavor as x, foldReplacementIntoGenerationRollup as xt, requestCodexAppServer as y, expandAdvisorIterations as yt, planUploadRetention as z, agentHookGroupOf as zt };
@@ -0,0 +1 @@
1
+ export { o as describeAgentResolvability, d as listAgentIds, h as setCustomAgents } from "./adapters-B5OoLoCc.js";
@@ -30,7 +30,7 @@ import { $ as buildExceptionProperties, B as isExperimentalSetting, D as SETTING
30
30
  import { n as isSameHostEntry, r as removeHostFrom, t as addHostTo } from "./host-registry-core-CUflbwkh.js";
31
31
  import { n as configFileViewOf, u as readSettingsForAgent } from "./settings-readout-core-CbGnRdGi.js";
32
32
  import { i as resolveArgvCommandMatches, t as kimi } from "./kimi-B8jwbXxY.js";
33
- import { $ as decideFileRead, A as openContainedFile, At as HOOK_EVENTS, B as TRACE_TAIL_SCAN_BYTES, Bt as hooksForProject, C as normalizeSha, Ct as mergeGenerationRollups, D as parseResolvedSha, Dt as totalTokensOf$1, E as parseRegistryLatest, Et as shouldReplace, F as framePathPaste, Ft as writeSessionSettings, G as planContiguousRead, Gt as upsertHook, H as completeLineBytes, Ht as rawStoredHooks, I as imageMimeForUploadFilename, It as HOOK_EVENT_CATALOG, J as codexFallbackRoots, Jt as appendRemovalRecord, K as resumeOffsetFrom, Kt as makeHostScratchDirectory, L as isSafePathSegment, Lt as ID_RE, M as buildUploadFilename, Mt as buildHookSettings, N as decideUploadType, Nt as generateToken, O as pickNewestPublished, Ot as vendorUsageEntry, P as exceedsUploadCap, Pt as sweepOrphans, Q as continuationDelayMs, Qt as listClaudeGlobalConfigPathCandidates, R as planUploadRetention, Rt as agentHookGroupOf, S as isCheckFresh, St as isWithinGenerationRecencyWindow, T as parseRegistryDeprecation, Tt as parseUsageLine, U as containmentRefusalReason, Ut as readStoredHooks, V as committedOffsetFromTraceTailOrNull, Vt as normalizeHook, W as isOversizedPartialLine, Wt as removeHook, X as codexRootCandidates, Xt as recordSweptPath, Y as codexHomes, Yt as appendRemovalRecordSync, Z as codexSessionIdFromPath, Zt as removalsJournalPath, _ as readHostCodexVersion, _t as emptyTotals, a as customAgentFingerprint, at as passOutcome, b as decideInstallFlavor, bt as foldReplacementIntoGenerationRollup, c as hookProfileOf, ct as scopedClaudeRoots, d as listAgentIds, dt as shouldPersistWarehouse, et as dedupeCodexFiles, f as resetCommandCache, ft as splitLines, g as codex, gt as dedupKeys, h as folderTrustRoot, ht as addEntryToTotals, i as commandFor, it as kimiHomes, j as MAX_UPLOAD_BYTES, jt as PLAN_HOLD_RELEASE_MS, k as shortSha$1, kt as claudeCode, l as isBuiltInAgentId, lt as sessionsRootCandidates, m as setCustomAgents, mt as parseKimiUsageLine, n as DEFAULT_AGENT_ID$1, nt as grokHomes, o as describeAgentResolvability, ot as projectDirCandidates, p as resolveAdapter, pt as kimiDedupIdentity, q as withCommittedOffset, qt as sweepOrphanedHostScratch, r as cachedAgentResolvability, rt as isUsageFile, s as getAdapter, st as resolveProjectsDirs, tt as expandTilde, u as isKnownAgentId, ut as shouldEvaluateDespiteIoFailures, v as requestCodexAppServer, vt as expandAdvisorIterations, w as normalizeUpdateChannel, wt as parseJsonLine, x as decideUpdateStatus, xt as identityFromRelPath, y as NODE_PTY_INSTALL_SCRIPT_FLAG, yt as foldEntryIntoGenerationRollup, z as MAX_TRANSCRIPT_READ_BYTES, zt as appendUserHooks } from "./adapters-scNb_8zN.js";
33
+ import { $ as continuationDelayMs, $t as listClaudeGlobalConfigPathCandidates, A as shortSha$1, At as claudeCode, B as MAX_TRANSCRIPT_READ_BYTES, Bt as appendUserHooks, C as isCheckFresh, Ct as isWithinGenerationRecencyWindow, D as parseRegistryLatest, Dt as shouldReplace, E as parseRegistryDeprecation, Et as parseUsageLine, F as exceedsUploadCap, Ft as sweepOrphans, G as isOversizedPartialLine, Gt as removeHook, H as committedOffsetFromTraceTailOrNull, Ht as normalizeHook, I as framePathPaste, It as writeSessionSettings, J as withCommittedOffset, Jt as sweepOrphanedHostScratch, K as planContiguousRead, Kt as upsertHook, L as imageMimeForUploadFilename, Lt as HOOK_EVENT_CATALOG, M as MAX_UPLOAD_BYTES, Mt as PLAN_HOLD_RELEASE_MS, N as buildUploadFilename, Nt as buildHookSettings, O as parseResolvedSha, Ot as totalTokensOf$1, P as decideUploadType, Pt as generateToken, Q as codexSessionIdFromPath, Qt as removalsJournalPath, R as isSafePathSegment, Rt as ID_RE, S as decideUpdateStatus, St as identityFromRelPath, T as normalizeUpdateChannel, Tt as parseJsonLine, U as completeLineBytes, Ut as rawStoredHooks, V as TRACE_TAIL_SCAN_BYTES, Vt as hooksForProject, W as containmentRefusalReason, Wt as readStoredHooks, X as codexHomes, Xt as appendRemovalRecordSync, Y as codexFallbackRoots, Yt as appendRemovalRecord, Z as codexRootCandidates, Zt as recordSweptPath, _ as codex, _t as dedupKeys, a as customAgentFingerprint, at as kimiHomes, b as NODE_PTY_INSTALL_SCRIPT_FLAG, bt as foldEntryIntoGenerationRollup, c as hookProfileOf, ct as resolveProjectsDirs, d as listAgentIds, dt as shouldEvaluateDespiteIoFailures, et as decideFileRead, f as projectHookConfigRelPaths, ft as shouldPersistWarehouse, g as folderTrustRoot, gt as addEntryToTotals, h as setCustomAgents, ht as parseKimiUsageLine, i as commandFor, it as isUsageFile, j as openContainedFile, jt as HOOK_EVENTS, k as pickNewestPublished, kt as vendorUsageEntry, l as isBuiltInAgentId, lt as scopedClaudeRoots, m as resolveAdapter, mt as kimiDedupIdentity, n as DEFAULT_AGENT_ID$1, nt as expandTilde, o as describeAgentResolvability, ot as passOutcome, p as resetCommandCache, pt as splitLines, q as resumeOffsetFrom, qt as makeHostScratchDirectory, r as cachedAgentResolvability, rt as grokHomes, s as getAdapter, st as projectDirCandidates, tt as dedupeCodexFiles, u as isKnownAgentId, ut as sessionsRootCandidates, v as readHostCodexVersion, vt as emptyTotals, w as normalizeSha, wt as mergeGenerationRollups, x as decideInstallFlavor, xt as foldReplacementIntoGenerationRollup, y as requestCodexAppServer, yt as expandAdvisorIterations, z as planUploadRetention, zt as agentHookGroupOf } from "./adapters-B5OoLoCc.js";
34
34
  import { C as matchPathPatterns, S as createTsconfigPathsResolver, T as resolveExtendsPath, d as KIMI_HOME_PROFILE, i as AGENT_HOME_PROFILES, w as parseTsconfigJsonc } from "./agent-home-core-jwbtRYeT.js";
35
35
  import { c as realAgentHome, d as createHeldSessionTempFolder, f as releaseSessionLock, m as trashSessionTempFolderOnceUnheld, n as generatedAgentHomePath, p as sessionIdOfLockFile, u as releaseUnheldAgentHomeSecrets } from "./agent-home-EaMTOzrq.js";
36
36
  import { _ as decideHostAllowed, c as approvedPackPanels, d as packRow, f as pendingPackNote, g as readCappedBody, h as parseJsonBody$1, l as approvedPackThemes, m as decodeHeaderText, n as readPacksForAgent, p as declaredContentLength, u as packFileHeaders } from "./pack-agent-DLaGtU3W.js";
@@ -15776,6 +15776,48 @@ function isSameNpmPackage(wanted, installed) {
15776
15776
  function isRecord(value) {
15777
15777
  return typeof value === "object" && value !== null && !Array.isArray(value);
15778
15778
  }
15779
+ var COHERENCE_LOCK_PATH = "node_modules/@posthog/coherence";
15780
+ var RELEASE_VERSION = /^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/;
15781
+ function coherenceSeedVersion(npmLockText, rootPackageJsonText) {
15782
+ if (npmLockText === null || rootPackageJsonText === null) return null;
15783
+ if (declaresWorkspaces(rootPackageJsonText)) return null;
15784
+ const lockedPackages = readNpmPackages(npmLockText);
15785
+ if (!lockedPackages) return null;
15786
+ if ([...lockedPackages.values()].some(isLocalPackage)) return null;
15787
+ const coherence = lockedPackages.get(COHERENCE_LOCK_PATH);
15788
+ if (!coherence || typeof coherence.version !== "string" || !RELEASE_VERSION.test(coherence.version)) return null;
15789
+ if (typeof coherence.resolved !== "string" || !coherence.resolved.startsWith("https://")) return null;
15790
+ return coherence.version;
15791
+ }
15792
+ function coherenceSeedArgs(version) {
15793
+ return [
15794
+ "install",
15795
+ `@posthog/coherence@${version}`,
15796
+ "--omit=optional",
15797
+ "--ignore-scripts",
15798
+ "--no-audit",
15799
+ "--no-fund",
15800
+ "--no-package-lock",
15801
+ "--prefer-offline",
15802
+ ...REGISTRY_STALL_ARGS
15803
+ ];
15804
+ }
15805
+ var COHERENCE_NODE_MODULES_PATH = /node_modules\/(?:@posthog\/coherence|\.bin\/coherence)(?![\w.-])/g;
15806
+ function mentionsNodeModulesBeyondCoherence(configText) {
15807
+ return configText.replace(COHERENCE_NODE_MODULES_PATH, "").includes("node_modules");
15808
+ }
15809
+ function declaresWorkspaces(packageJsonText) {
15810
+ let parsed;
15811
+ try {
15812
+ parsed = JSON.parse(packageJsonText);
15813
+ } catch {
15814
+ return true;
15815
+ }
15816
+ return !isRecord(parsed) || parsed.workspaces !== void 0;
15817
+ }
15818
+ function isLocalPackage(entry) {
15819
+ return entry.link === true || typeof entry.resolved === "string" && entry.resolved.startsWith("file:");
15820
+ }
15779
15821
  function packageDirsFromTrackedFiles(trackedPackageJsonPaths) {
15780
15822
  const dirs = /* @__PURE__ */ new Set();
15781
15823
  for (const trackedPath of trackedPackageJsonPaths) {
@@ -15994,6 +16036,7 @@ function createWorktreeProvisioning(context, deps) {
15994
16036
  return false;
15995
16037
  }
15996
16038
  async function provision(options = {}) {
16039
+ provisionAbort.abort();
15997
16040
  provisionAbort = new AbortController();
15998
16041
  return provisionWorktree(options);
15999
16042
  }
@@ -16108,24 +16151,26 @@ function createWorktreeProvisioning(context, deps) {
16108
16151
  return true;
16109
16152
  }
16110
16153
  let provisionAbort = new AbortController();
16111
- let seedInFlight = null;
16154
+ const seedsInFlight = /* @__PURE__ */ new Set();
16112
16155
  async function stopSeeding() {
16113
16156
  provisionAbort.abort();
16114
- await seedInFlight;
16157
+ await Promise.all(seedsInFlight);
16115
16158
  }
16116
16159
  async function seedWorktreeDependencies(mainCheckout, worktreeDir, branch) {
16117
16160
  if (!seedDependencies) return;
16118
16161
  const { signal } = provisionAbort;
16119
16162
  if (signal.aborted) return;
16120
- const seeding = seedDependencies({
16163
+ const seedRun = seedDependencies({
16121
16164
  mainCheckout,
16122
16165
  worktreeDir,
16123
16166
  signal
16124
16167
  });
16125
- seedInFlight = seeding;
16126
- const outcome = await seeding.finally(() => {
16127
- if (seedInFlight === seeding) seedInFlight = null;
16128
- });
16168
+ const reported = seedRun.completion.then((outcome) => reportSeedOutcome(outcome, worktreeDir, branch));
16169
+ seedsInFlight.add(reported);
16170
+ reported.finally(() => seedsInFlight.delete(reported));
16171
+ if (await seedRun.blocksSpawn) await reported;
16172
+ }
16173
+ function reportSeedOutcome(outcome, worktreeDir, branch) {
16129
16174
  if (!outcome) return;
16130
16175
  const { clone, install } = outcome;
16131
16176
  logCloneOutcome(clone, worktreeDir);
@@ -51555,13 +51600,31 @@ function createRecorder(sessionName, captureConfig, recordSignals = true) {
51555
51600
  //#region server/git/dependency-clone.ts
51556
51601
  var CLONE_TIMEOUT_MS = 6e5;
51557
51602
  var NODE_MODULES = "node_modules";
51603
+ var COHERENCE_CONFIG_FILE = "coherence.config.json";
51604
+ var COHERENCE_SEED_TIMEOUT_MS = 12e4;
51605
+ var COHERENCE_SEED_MARKER = ".glimmervoid-coherence-seed";
51606
+ var COHERENCE_SEED_STAGING_KEY = "@coherence-seed";
51607
+ var STAGED_ROOT_INSTALL_KEY = "@staged-root-install";
51608
+ var STAGED_INSTALL_FILES = [
51609
+ "package.json",
51610
+ "package-lock.json",
51611
+ ".npmrc"
51612
+ ];
51558
51613
  var LINK_LIST_MAX_BYTES = 67108864;
51559
51614
  var INSTALL_OUTPUT_MAX_BYTES = 16777216;
51560
51615
  var seedQueue = createSerialQueue();
51561
- var seedWorktreeDependencies = ({ mainCheckout, worktreeDir, signal }) => seedQueue.run(async () => {
51616
+ function seedWorktreeDependencies({ mainCheckout, worktreeDir, signal, hookConfigRelPaths }) {
51617
+ const rootSeeding = seedCoherence(mainCheckout, worktreeDir, signal).catch(() => false);
51618
+ const completion = rootSeeding.then((isRootSeeded) => seedQueue.run(() => seedInQueue(mainCheckout, worktreeDir, signal, isRootSeeded), { signal })).catch(() => null);
51619
+ return {
51620
+ blocksSpawn: rootSeeding.then((isRootSeeded) => isRootSeeded ? hookConfigsNeedUnseededPackages(worktreeDir, hookConfigRelPaths) : hookConfigsNeedNodeModules(worktreeDir, hookConfigRelPaths)),
51621
+ completion
51622
+ };
51623
+ }
51624
+ async function seedInQueue(mainCheckout, worktreeDir, signal, isRootSeeded) {
51562
51625
  const clone = await cloneDependencies(mainCheckout, worktreeDir).catch(() => skipDependencyClone("failed"));
51563
51626
  if (signal.aborted) return null;
51564
- const install = await installDependencies(worktreeDir, signal).catch((error) => unreadableInstallOutcome(error));
51627
+ const install = await installDependencies(worktreeDir, signal, isRootSeeded).catch((error) => unreadableInstallOutcome(error));
51565
51628
  if (signal.aborted) return null;
51566
51629
  const skippedDirs = clone.action === "cloned" ? clone.skippedDirs : [];
51567
51630
  const reportedDirs = /* @__PURE__ */ new Set([...install.unsupportedDirs, ...install.results.map((result) => result.dir)]);
@@ -51573,14 +51636,59 @@ var seedWorktreeDependencies = ({ mainCheckout, worktreeDir, signal }) => seedQu
51573
51636
  unsupportedDirs: [...install.unsupportedDirs, ...emptyDirs]
51574
51637
  }
51575
51638
  };
51576
- }, { signal }).catch(() => null);
51577
- async function installDependencies(worktreeDir, signal) {
51639
+ }
51640
+ async function seedCoherence(mainCheckout, worktreeDir, signal) {
51641
+ if (process.platform === "win32" || signal.aborted) return false;
51642
+ const [hasCoherenceConfig, hasRootNodeModules, isSeedLeftover, isMainCheckoutInstalled, npmLockText, rootPackageJsonText] = await Promise.all([
51643
+ pathExists(path.join(worktreeDir, COHERENCE_CONFIG_FILE)),
51644
+ pathExists(path.join(worktreeDir, NODE_MODULES)),
51645
+ pathExists(path.join(worktreeDir, NODE_MODULES, COHERENCE_SEED_MARKER)),
51646
+ pathExists(path.join(mainCheckout, NODE_MODULES)),
51647
+ readTextOrNull(path.join(worktreeDir, LOCKFILE_BY_KIND.npm.lockfile)),
51648
+ readTextOrNull(path.join(worktreeDir, "package.json"))
51649
+ ]);
51650
+ if (!hasCoherenceConfig) return false;
51651
+ if (hasRootNodeModules) return isSeedLeftover;
51652
+ if (process.platform === "darwin" && isMainCheckoutInstalled) return false;
51653
+ const version = coherenceSeedVersion(npmLockText, rootPackageJsonText);
51654
+ if (!version) return false;
51655
+ const stagingDir = stagingPathFor(worktreeDir, COHERENCE_SEED_STAGING_KEY);
51656
+ try {
51657
+ await prepareStagingDir(stagingDir);
51658
+ await fs$1.writeFile(path.join(stagingDir, "package.json"), "{\"private\":true}\n");
51659
+ await copyIfPresent(path.join(worktreeDir, ".npmrc"), path.join(stagingDir, ".npmrc"));
51660
+ if (!(await runCommand("npm", coherenceSeedArgs(version), {
51661
+ cwd: stagingDir,
51662
+ timeoutMs: COHERENCE_SEED_TIMEOUT_MS,
51663
+ maxBuffer: INSTALL_OUTPUT_MAX_BYTES,
51664
+ replaceEnv: installEnvFrom(process.env),
51665
+ signal
51666
+ })).ok || signal.aborted) return false;
51667
+ await fs$1.writeFile(path.join(stagingDir, NODE_MODULES, COHERENCE_SEED_MARKER), "");
51668
+ return await renamed(path.join(stagingDir, NODE_MODULES), path.join(worktreeDir, NODE_MODULES));
51669
+ } finally {
51670
+ await removeTree(stagingDir);
51671
+ }
51672
+ }
51673
+ async function hookConfigsNeedNodeModules(worktreeDir, hookConfigRelPaths) {
51674
+ if (await pathExists(path.join(worktreeDir, COHERENCE_CONFIG_FILE))) return true;
51675
+ return (await Promise.all(hookConfigRelPaths.map((relPath) => readTextOrNull(path.join(worktreeDir, relPath))))).some((configText) => configText?.includes("node_modules") === true);
51676
+ }
51677
+ async function hookConfigsNeedUnseededPackages(worktreeDir, hookConfigRelPaths) {
51678
+ return (await Promise.all(hookConfigRelPaths.map((relPath) => readTextOrNull(path.join(worktreeDir, relPath))))).some((configText) => configText !== null && mentionsNodeModulesBeyondCoherence(configText));
51679
+ }
51680
+ async function installDependencies(worktreeDir, signal, isRootSeeded) {
51578
51681
  const startedAt = performance.now();
51579
- const plan = planDependencyInstall(process.platform, await listPackageDirFacts(worktreeDir));
51682
+ const packageDirFacts = (await listPackageDirFacts(worktreeDir)).map((facts) => isRootSeeded && facts.dir === "." ? {
51683
+ ...facts,
51684
+ hasNodeModules: false
51685
+ } : facts);
51686
+ const plan = planDependencyInstall(process.platform, packageDirFacts);
51580
51687
  const results = [];
51581
51688
  for (const install of plan.installs) {
51582
51689
  if (signal.aborted) break;
51583
- results.push(await runInstall(worktreeDir, install, signal));
51690
+ const isStagedRootInstall = isRootSeeded && install.dir === "." && install.command === "npm";
51691
+ results.push(await (isStagedRootInstall ? runStagedRootInstall(worktreeDir, install, signal) : runInstall(worktreeDir, install, signal)));
51584
51692
  }
51585
51693
  return {
51586
51694
  results,
@@ -51618,28 +51726,75 @@ async function listPackageDirFacts(worktreeDir) {
51618
51726
  }
51619
51727
  async function runInstall(worktreeDir, install, signal) {
51620
51728
  const packageDir = path.join(worktreeDir, install.dir);
51621
- const commandLine = [install.command, ...install.args].join(" ");
51622
- const run = await runCommand(install.command, install.args, {
51623
- cwd: packageDir,
51729
+ const run = await runInstallCommand(packageDir, install, signal);
51730
+ if (run.ok) return installSucceeded(install);
51731
+ await removeTree(path.join(packageDir, NODE_MODULES));
51732
+ return installRunFailed(install, run);
51733
+ }
51734
+ async function runStagedRootInstall(worktreeDir, install, signal) {
51735
+ const stagingDir = stagingPathFor(worktreeDir, STAGED_ROOT_INSTALL_KEY);
51736
+ const previousNodeModules = `${stagingDir}-previous`;
51737
+ try {
51738
+ await prepareStagingDir(stagingDir);
51739
+ await removeTree(previousNodeModules);
51740
+ for (const file of STAGED_INSTALL_FILES) await copyIfPresent(path.join(worktreeDir, file), path.join(stagingDir, file));
51741
+ const run = await runInstallCommand(stagingDir, install, signal);
51742
+ if (!run.ok) return installRunFailed(install, run);
51743
+ if (await swapNodeModules(path.join(stagingDir, NODE_MODULES), path.join(worktreeDir, NODE_MODULES), previousNodeModules)) return installSucceeded(install);
51744
+ return installFailed(install, "could not move the installed node_modules into the worktree", false);
51745
+ } finally {
51746
+ await removeTree(stagingDir);
51747
+ await removeTree(previousNodeModules);
51748
+ }
51749
+ }
51750
+ async function swapNodeModules(stagedNodeModules, liveNodeModules, previousNodeModules) {
51751
+ const hasLiveNodeModules = await pathExists(liveNodeModules);
51752
+ if (hasLiveNodeModules && !await renamed(liveNodeModules, previousNodeModules)) return false;
51753
+ if (await renamed(stagedNodeModules, liveNodeModules)) return true;
51754
+ if (hasLiveNodeModules) await renamed(previousNodeModules, liveNodeModules);
51755
+ return false;
51756
+ }
51757
+ function runInstallCommand(cwd, install, signal) {
51758
+ return runCommand(install.command, install.args, {
51759
+ cwd,
51624
51760
  timeoutMs: INSTALL_TIMEOUT_MS$1,
51625
51761
  maxBuffer: INSTALL_OUTPUT_MAX_BYTES,
51626
51762
  replaceEnv: installEnvFrom(process.env),
51627
51763
  signal
51628
51764
  });
51629
- if (run.ok) return {
51765
+ }
51766
+ function installSucceeded(install) {
51767
+ return {
51630
51768
  dir: install.dir,
51631
- command: commandLine,
51769
+ command: [install.command, ...install.args].join(" "),
51632
51770
  ok: true
51633
51771
  };
51634
- await removeTree(path.join(packageDir, NODE_MODULES));
51772
+ }
51773
+ function installRunFailed(install, run) {
51774
+ return installFailed(install, lastOutputLineOf(run.stderr ?? "") || lastOutputLineOf(run.err), run.timedOut === true);
51775
+ }
51776
+ function installFailed(install, lastOutputLine, timedOut) {
51635
51777
  return {
51636
51778
  dir: install.dir,
51637
- command: commandLine,
51779
+ command: [install.command, ...install.args].join(" "),
51638
51780
  ok: false,
51639
- lastOutputLine: lastOutputLineOf(run.stderr ?? "") || lastOutputLineOf(run.err),
51640
- timedOut: run.timedOut === true
51781
+ lastOutputLine,
51782
+ timedOut
51641
51783
  };
51642
51784
  }
51785
+ async function prepareStagingDir(stagingDir) {
51786
+ await removeTree(stagingDir);
51787
+ await fs$1.mkdir(stagingDir, { recursive: true });
51788
+ }
51789
+ async function copyIfPresent(source, destination) {
51790
+ await fs$1.copyFile(source, destination).catch((error) => {
51791
+ if (isMissingFileError(error)) return;
51792
+ throw error;
51793
+ });
51794
+ }
51795
+ function renamed(from, to) {
51796
+ return fs$1.rename(from, to).then(() => true, () => false);
51797
+ }
51643
51798
  async function dirsWithoutNodeModules(worktreeDir, relativeDirs) {
51644
51799
  const emptyDirs = [];
51645
51800
  for (const relativeDir of relativeDirs) if (!await pathExists(path.join(worktreeDir, relativeDir, NODE_MODULES))) emptyDirs.push(relativeDir);
@@ -51700,7 +51855,7 @@ async function cloneDependencies(mainCheckout, worktreeDir) {
51700
51855
  }
51701
51856
  const landedDirs = [];
51702
51857
  for (const { relativeDir, stagingPath } of stagedDirs) {
51703
- if (await fs$1.rename(stagingPath, path.join(worktreeDir, relativeDir, NODE_MODULES)).then(() => true, () => false)) {
51858
+ if (await renamed(stagingPath, path.join(worktreeDir, relativeDir, NODE_MODULES))) {
51704
51859
  landedDirs.push(relativeDir);
51705
51860
  continue;
51706
51861
  }
@@ -51894,7 +52049,10 @@ function createSessionFactory(dependencies) {
51894
52049
  liveWorktreeReview: config.liveWorktreeReview !== false,
51895
52050
  worktreeRoot: config.worktreeRoot || path.join(path.dirname(path.resolve(project.path)), ".glimmervoid-worktrees"),
51896
52051
  worktreeShare: config.worktreeShare || DEFAULT_CONFIG.worktreeShare,
51897
- seedDependencies: config.worktreeCloneDependencies === false ? null : seedWorktreeDependencies,
52052
+ seedDependencies: config.worktreeCloneDependencies === false ? null : (seedArgs) => seedWorktreeDependencies({
52053
+ ...seedArgs,
52054
+ hookConfigRelPaths: projectHookConfigRelPaths()
52055
+ }),
51898
52056
  detectBackgroundAgents: config.detectBackgroundAgents,
51899
52057
  detectScheduledWakeups: config.detectScheduledWakeups,
51900
52058
  hookTools: originalHookTools,
@@ -1 +1 @@
1
- import{x as e}from"./dom-helpers-DGbgEgul.js";import"./session-actions-EiiG4HO5.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-K7U3UnMC.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,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/benchmark-panel-Bm5Z_O5D.js","assets/button-xFPkZ-gt.js","assets/zod-_N0uRWDY.js","assets/dom-helpers-DGbgEgul.js","assets/index-hG3gurrQ.js","assets/control-ws-Yhdu0KQE.js","assets/modal-_N5DlGmN.js","assets/session-row-DoFRwIgi.js","assets/card-registry-a-DTIBRT.js","assets/ui-state-core-Nssh-6QJ.js","assets/action-status-DOqonzMM.js","assets/session-tick-YSKtJdUK.js","assets/session-actions-EiiG4HO5.js","assets/preload-helper-BLdHbfdN.js","assets/ui-prefs-BTWW90we.js","assets/local-store-CVQ5ByvB.js","assets/alert-sound-core-CmJhj4qI.js","assets/card-actions-Ee8hlgLh.js","assets/menu-C8A771QQ.js","assets/roving-keys-core-BDobx2It.js","assets/pr-status-icon-DTV7jXwj.js","assets/agent-mark-tyCNNktc.js","assets/index-D8gNCJWC.css","assets/benchmark-panel-E7vrfppm.css"])))=>i.map(i=>d[i]);
2
- import{f as e}from"./control-ws-Yhdu0KQE.js";import{Ht as t,Kt as n,Ut as r,Vt as i,Wt as a,t as o}from"./button-xFPkZ-gt.js";import{Y as s,s as c}from"./dom-helpers-DGbgEgul.js";import{n as l}from"./modal-_N5DlGmN.js";import{o as u}from"./card-registry-a-DTIBRT.js";import{t as d}from"./preload-helper-BLdHbfdN.js";import{n as f}from"./session-tick-YSKtJdUK.js";import{Ha as p,Ia as m,Wa as ee,_t as h,ft as g,gt as _,ht as te,mt as ne}from"./index-hG3gurrQ.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 a.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,t){let r=e.options.filter(e=>e.id!==n);return{...e,options:t===null?r:[...r,{id:n,value:t}]}}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 O(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 ie(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 ae(e,t,n,r){return n===`agent`?{...T(e,r),instructions:t.instructions}:n===`model`?E(e,t,r):w(t,r)}function k(e,t){let n=new Map;return t.slice(0,5).map((t,r)=>{let i=O(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 A(e,t,n,r){return k(e,r.map(r=>ae(e,t,n,r)))}var j=12e4,M=6e4,oe=8,N=null,P=null,F={agents:[]},I={raceTitle:``,prompt:``,repoPath:``,contestants:[],judgeSetup:null},L=!1,R=new Map,z=new Map;function B(e){return Object.entries(s).find(([t])=>t===e)?.[1]??e}function V(e){let t=e?u.get(e):void 0;return t?t.currentState:_}function H(e,t){return`${e}:${t}`}function U(t,n){let r=H(t.id,n.id);R.has(r)?(R.delete(r),q()):(R.set(r,`Loading the diff.`),q(),e(`race-diff`,{raceId:t.id,contestantId:n.id},{timeoutMs:M}).then(e=>{e.type===`race-diff-result`&&R.set(r,e.ok?e.diff||`No changes.`:`Could not read the diff: ${e.error??`unknown error`}`)}).catch(e=>R.set(r,`Could not read the diff: ${e instanceof Error?e.message:String(e)}`)).finally(q))}function W(e,t){let n=c(`li`,`arena-contestant`),r=e.sessionIdByContestant[t.id],i=V(r),a=e.judge?.ranking.find(e=>e.contestantId===t.id)??null,s=e.diffStatsByContestant[t.id],l=c(`div`,`arena-contestant-head`);if(l.append(c(`span`,`arena-contestant-rank`,a?`#${a.rank}`:`-`)),l.append(c(`span`,`arena-contestant-label`,t.label)),l.append(c(`span`,`arena-contestant-state`,i===`removed`?`Removed`:B(i))),s&&l.append(c(`span`,`arena-contestant-stats`,`+${s.linesAdded} -${s.linesRemoved}, ${s.filesChanged} files`)),e.winnerContestantId===t.id&&l.append(c(`span`,`arena-contestant-winner`,`Winner`)),r&&i!==`removed`){l.append(o({variant:`quiet`,size:`small`,label:`Open`,onClick:()=>g(r)})),(e.winnerContestantId===null||e.winnerContestantId===t.id)&&l.append(o({variant:`quiet`,size:`small`,label:`Pick winner`,onClick:()=>G(e,t)}));let n=o({variant:`quiet`,size:`small`,label:`Show diff`,onClick:()=>U(e,t)});n.setAttribute(`aria-expanded`,String(R.has(H(e.id,t.id)))),l.append(n)}n.append(l),a&&n.append(c(`p`,`arena-contestant-reason`,a.reason));let u=R.get(H(e.id,t.id));return u!==void 0&&n.append(c(`pre`,`arena-diff`,u)),n}function G(e,t){let{dialog:n,close:r,actions:i,btnCancel:a}=l({title:`Pick ${t.label} as the winner`}),s=e.spec.contestants.filter(n=>n.id!==t.id&&V(e.sessionIdByContestant[n.id])!==`removed`),u=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(c(`p`,`dialog-message`,u));let d=e.judge?.notes[t.id]??null,f=c(`input`);if(f.type=`checkbox`,d){let e=c(`label`,`dialog-checkbox-label`);e.append(f,c(`span`,null,`Also send it the judge's notes`)),n.append(e,c(`pre`,`arena-diff`,d))}let p=o({variant:`danger`,label:`Pick winner`,onClick:()=>{r(),K(e,t,d!==null&&f.checked)}});i.append(p),n.append(i),a.addEventListener(`click`,r)}function K(t,n,r){z.set(t.id,`Picking ${n.label}.`),q(),e(`race-pick-winner`,{raceId:t.id,contestantId:n.id,sendNotes:r},{timeoutMs:j}).then(e=>{e.type===`race-pick-winner-result`&&z.set(t.id,e.ok?``:`Picked ${n.label} with problems: ${e.error??`unknown error`}`)}).catch(e=>z.set(t.id,`Could not pick the winner: ${e instanceof Error?e.message:String(e)}`)).finally(q)}function se(t){z.set(t.id,`Asking the judge.`),q(),e(`race-judge`,{raceId:t.id},{timeoutMs:M}).then(e=>{e.type===`race-judge-result`&&z.set(t.id,e.ok?``:`Could not judge: ${e.error??`unknown error`}`)}).catch(e=>z.set(t.id,`Could not judge: ${e instanceof Error?e.message:String(e)}`)).finally(q)}function ce(e){let t=h(Object.values(e.sessionIdByContestant),e=>V(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 le(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 ue(e){let t=c(`article`,`arena-race`);t.append(c(`h3`,`arena-race-title`,e.spec.title)),t.append(c(`p`,`arena-race-meta`,`${e.baseBranch} at ${e.startSha.slice(0,oe)}, ${new Date(e.createdAt).toLocaleString()}`));let n=c(`div`,`arena-race-actions`),r=o({variant:`secondary`,size:`small`,label:`Judge now`,disabled:e.phase===`judging`,onClick:()=>se(e)}),i=c(`span`,`arena-status`,z.get(e.id)||ce(e));i.setAttribute(`role`,`status`),n.append(r,i),t.append(n);let a=c(`ul`,`arena-contestants`);for(let t of le(e))a.append(W(e,t));return t.append(a),t}function q(){if(!P)return;let e=ne();if(P.replaceChildren(c(`h2`,`arena-section-title`,`Races`)),e.length===0)P.append(c(`p`,`arena-empty`,`No races yet.`));else for(let t of e)P.append(ue(t))}function J(e,t,n,r){let i=c(`select`,`settings-view-input arena-select`);i.setAttribute(`aria-label`,r);for(let n of e){let e=c(`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 Y(e,t,n=null){let r=c(`div`,`arena-setup`),i=x(F).filter(e=>!n||n.includes(e)).map(e=>({value:e,label:y(e)}));r.append(J(i,e.agent,n=>t({...T(F,n),instructions:e.instructions}),`Agent`));let a=b(F,e.agent).map(e=>({value:e.id,label:e.label}));r.append(J(a,e.model,n=>t(E(F,e,n)),`Model`));let o=S(F,e.agent,e.model);return o.length>0&&r.append(J(o.map(e=>({value:e,label:e})),C(e),n=>t(D(e,n)),`Effort`)),r}function X(){return{version:1,title:I.raceTitle,prompt:I.prompt,repoPath:I.repoPath,contestants:I.contestants,judge:I.judgeSetup?{setup:I.judgeSetup}:null}}function Z(e,t,n,r=!1){let i=c(`label`,`arena-field`);i.append(c(`span`,`arena-field-label`,e));let a=r?c(`textarea`,`settings-view-input arena-prompt`):c(`input`,`settings-view-input`);return a.value=t,a.addEventListener(`input`,()=>n(a.value)),i.append(a),i}function Q(e){return k(F,e.map(e=>e.setup))}function de(e){let t=c(`div`,`arena-lineup`);return I.contestants.forEach((n,r)=>{let i=c(`div`,`arena-column`);i.append(c(`span`,`arena-column-label`,n.label)),i.append(Y(n.setup,t=>{I.contestants=Q(I.contestants.map((e,n)=>n===r?{...e,setup:t}:e)),e()}));let a=c(`textarea`,`settings-view-input`);a.placeholder=`Extra instructions for this contestant`,a.rows=3,a.value=n.setup.instructions,a.addEventListener(`input`,()=>{I.contestants=I.contestants.map((e,t)=>t===r?{...e,setup:{...e.setup,instructions:a.value}}:e)}),i.append(a),i.append(o({variant:`quiet`,size:`small`,label:`Remove`,onClick:()=>{I.contestants=Q(I.contestants.filter((e,t)=>t!==r)),e()}})),t.append(i)}),t}function fe(e){let t=c(`div`,`arena-vary`),n=I.contestants[0]?.setup??T(F,x(F)[0]??`claude-code`),r=`model`,i=c(`div`,`arena-vary-choices`),a=()=>{i.replaceChildren();for(let e of ie(F,n,r)){let t=c(`label`,`dialog-checkbox-label`),n=c(`input`);n.type=`checkbox`,n.value=e.value,t.append(n,c(`span`,null,e.label)),i.append(t)}},s=c(`div`,`arena-vary-base`),l=()=>{s.replaceChildren(Y(n,e=>{n=e,l(),a()}))};return t.append(c(`span`,`arena-field-label`,`Start from`),s),t.append(c(`span`,`arena-field-label`,`Vary`),J(v.map(e=>({value:e,label:e})),r,e=>{r=v.find(t=>t===e)??`model`,a()},`Setting to vary`)),t.append(i),t.append(o({variant:`secondary`,size:`small`,label:`Use these`,onClick:()=>{let t=[...i.querySelectorAll(`input:checked`)].map(e=>e instanceof HTMLInputElement?e.value:``).filter(Boolean);I.contestants=A(F,n,r,t),e()}})),l(),a(),t}function $(e){try{return JSON.parse(e)}catch{return null}}function pe(e){let n=t.safeParse($(e));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 I={raceTitle:r.title,prompt:r.prompt,repoPath:r.repoPath,contestants:r.contestants,judgeSetup:r.judge?.setup??null},null}function me(){let t=c(`section`,`arena-new`),n=c(`div`,`arena-new-body`),a=c(`span`,`arena-status`);a.setAttribute(`role`,`status`);let s=c(`textarea`,`settings-view-input arena-file`);s.setAttribute(`aria-label`,`Race spec JSON`);let l=()=>{if(n.replaceChildren(),s.hidden=!L,L){s.value=JSON.stringify(X(),null,2),n.append(s);return}n.append(Z(`Title`,I.raceTitle,e=>{I.raceTitle=e}));let e=Z(`Repository folder`,I.repoPath,e=>{I.repoPath=e}),t=e.querySelector(`input`),r=c(`datalist`);r.id=`arena-repo-paths`;for(let e of new Set([...u.values()].map(e=>e.path))){let t=c(`option`);t.value=e,r.append(t)}t?.setAttribute(`list`,r.id),n.append(e,r),n.append(Z(`Prompt`,I.prompt,e=>{I.prompt=e},!0)),n.append(fe(l)),n.append(de(l));let a=o({variant:`quiet`,size:`small`,label:`Add contestant`,disabled:I.contestants.length>=5,onClick:()=>{let e=x(F)[0]??`claude-code`;I.contestants=Q([...I.contestants,{id:`new`,label:`new`,setup:I.contestants.at(-1)?.setup??T(F,e)}]),l()}}),d=c(`div`,`arena-judge`),f=c(`label`,`dialog-checkbox-label`),p=c(`input`);p.type=`checkbox`,p.checked=I.judgeSetup!==null,p.addEventListener(`change`,()=>{I.judgeSetup=p.checked?T(F,i):null,l()}),f.append(p,c(`span`,null,`Judge the results`)),d.append(f),I.judgeSetup&&d.append(Y(I.judgeSetup,e=>{I.judgeSetup=e,l()},[i])),n.append(a,d)},d=o({variant:`quiet`,size:`small`,label:`Edit as file`,onClick:()=>{if(L){let e=pe(s.value);if(a.textContent=e??``,e)return}L=!L,d.setAttribute(`aria-pressed`,String(L)),l()}});d.setAttribute(`aria-pressed`,`false`);let f=o({variant:`primary`,label:`Start race`,onClick:()=>{let t=L?$(s.value):X();f.disabled=!0,a.textContent=`Starting the contestants.`,e(`race-start`,{spec:t},{timeoutMs:j}).then(e=>{e.type===`race-start-result`&&(a.textContent=e.ok?e.error??`Race started.`:`Could not start the race: ${e.error??`unknown error`}`)}).catch(e=>{a.textContent=`Could not start the race: ${e instanceof Error?e.message:String(e)}`}).finally(()=>{f.disabled=!1})}}),p=c(`div`,`arena-new-head`);p.append(c(`h2`,`arena-section-title`,`New race`),d);let m=c(`div`,`arena-actions`);return m.append(f,a),t.append(p,n,m),l(),e(`get-settings`,{}).then(e=>{if(e.type!==`settings`)return;let t=r.safeParse(e.settings.agentModels);t.success&&(F=t.data,I.judgeSetup??=T(F,i),I.contestants.length===0&&(I.contestants=A(F,T(F,x(F)[0]??`claude-code`),`agent`,x(F).slice(0,2))),l())}).catch(e=>{a.textContent=`Could not load the model list: ${e instanceof Error?e.message:String(e)}`}),t}function he(e){if(N)return;N=c(`div`,`arena-content`),P=c(`section`,`arena-races`),N.append(P),m()||N.append(me());let t=c(`section`,`arena-bench`);N.append(t);let n=()=>{t.hidden=p().status?.configured!==!0};ee(n),n(),e.append(N),te(q),f(q),q(),d(()=>import(`./benchmark-panel-Bm5Z_O5D.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-C96qR8J1.js","assets/button-xFPkZ-gt.js","assets/zod-_N0uRWDY.js","assets/dom-helpers-DGbgEgul.js","assets/index-D-I5Bdux.js","assets/control-ws-Yhdu0KQE.js","assets/modal-_N5DlGmN.js","assets/session-row-DhrcM0P7.js","assets/card-registry-a-DTIBRT.js","assets/ui-state-core-Nssh-6QJ.js","assets/action-status-DOqonzMM.js","assets/session-tick-YSKtJdUK.js","assets/session-actions-K7U3UnMC.js","assets/preload-helper-BLdHbfdN.js","assets/ui-prefs-BTWW90we.js","assets/local-store-CVQ5ByvB.js","assets/alert-sound-core-CmJhj4qI.js","assets/card-actions-Ee8hlgLh.js","assets/menu-C8A771QQ.js","assets/roving-keys-core-BDobx2It.js","assets/pr-status-icon-DTV7jXwj.js","assets/agent-mark-BqFnJem8.js","assets/index-D8gNCJWC.css","assets/benchmark-panel-E7vrfppm.css"])))=>i.map(i=>d[i]);
2
+ import{f as e}from"./control-ws-Yhdu0KQE.js";import{Ht as t,Kt as n,Ut as r,Vt as i,Wt as a,t as o}from"./button-xFPkZ-gt.js";import{Y as s,s as c}from"./dom-helpers-DGbgEgul.js";import{n as l}from"./modal-_N5DlGmN.js";import{o as u}from"./card-registry-a-DTIBRT.js";import{t as d}from"./preload-helper-BLdHbfdN.js";import{n as f}from"./session-tick-YSKtJdUK.js";import{Ha as p,Ia as m,Wa as ee,_t as h,ft as g,gt as _,ht as te,mt as ne}from"./index-D-I5Bdux.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 a.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,t){let r=e.options.filter(e=>e.id!==n);return{...e,options:t===null?r:[...r,{id:n,value:t}]}}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 O(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 ie(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 ae(e,t,n,r){return n===`agent`?{...T(e,r),instructions:t.instructions}:n===`model`?E(e,t,r):w(t,r)}function k(e,t){let n=new Map;return t.slice(0,5).map((t,r)=>{let i=O(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 A(e,t,n,r){return k(e,r.map(r=>ae(e,t,n,r)))}var j=12e4,M=6e4,oe=8,N=null,P=null,F={agents:[]},I={raceTitle:``,prompt:``,repoPath:``,contestants:[],judgeSetup:null},L=!1,R=new Map,z=new Map;function B(e){return Object.entries(s).find(([t])=>t===e)?.[1]??e}function V(e){let t=e?u.get(e):void 0;return t?t.currentState:_}function H(e,t){return`${e}:${t}`}function U(t,n){let r=H(t.id,n.id);R.has(r)?(R.delete(r),q()):(R.set(r,`Loading the diff.`),q(),e(`race-diff`,{raceId:t.id,contestantId:n.id},{timeoutMs:M}).then(e=>{e.type===`race-diff-result`&&R.set(r,e.ok?e.diff||`No changes.`:`Could not read the diff: ${e.error??`unknown error`}`)}).catch(e=>R.set(r,`Could not read the diff: ${e instanceof Error?e.message:String(e)}`)).finally(q))}function W(e,t){let n=c(`li`,`arena-contestant`),r=e.sessionIdByContestant[t.id],i=V(r),a=e.judge?.ranking.find(e=>e.contestantId===t.id)??null,s=e.diffStatsByContestant[t.id],l=c(`div`,`arena-contestant-head`);if(l.append(c(`span`,`arena-contestant-rank`,a?`#${a.rank}`:`-`)),l.append(c(`span`,`arena-contestant-label`,t.label)),l.append(c(`span`,`arena-contestant-state`,i===`removed`?`Removed`:B(i))),s&&l.append(c(`span`,`arena-contestant-stats`,`+${s.linesAdded} -${s.linesRemoved}, ${s.filesChanged} files`)),e.winnerContestantId===t.id&&l.append(c(`span`,`arena-contestant-winner`,`Winner`)),r&&i!==`removed`){l.append(o({variant:`quiet`,size:`small`,label:`Open`,onClick:()=>g(r)})),(e.winnerContestantId===null||e.winnerContestantId===t.id)&&l.append(o({variant:`quiet`,size:`small`,label:`Pick winner`,onClick:()=>G(e,t)}));let n=o({variant:`quiet`,size:`small`,label:`Show diff`,onClick:()=>U(e,t)});n.setAttribute(`aria-expanded`,String(R.has(H(e.id,t.id)))),l.append(n)}n.append(l),a&&n.append(c(`p`,`arena-contestant-reason`,a.reason));let u=R.get(H(e.id,t.id));return u!==void 0&&n.append(c(`pre`,`arena-diff`,u)),n}function G(e,t){let{dialog:n,close:r,actions:i,btnCancel:a}=l({title:`Pick ${t.label} as the winner`}),s=e.spec.contestants.filter(n=>n.id!==t.id&&V(e.sessionIdByContestant[n.id])!==`removed`),u=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(c(`p`,`dialog-message`,u));let d=e.judge?.notes[t.id]??null,f=c(`input`);if(f.type=`checkbox`,d){let e=c(`label`,`dialog-checkbox-label`);e.append(f,c(`span`,null,`Also send it the judge's notes`)),n.append(e,c(`pre`,`arena-diff`,d))}let p=o({variant:`danger`,label:`Pick winner`,onClick:()=>{r(),K(e,t,d!==null&&f.checked)}});i.append(p),n.append(i),a.addEventListener(`click`,r)}function K(t,n,r){z.set(t.id,`Picking ${n.label}.`),q(),e(`race-pick-winner`,{raceId:t.id,contestantId:n.id,sendNotes:r},{timeoutMs:j}).then(e=>{e.type===`race-pick-winner-result`&&z.set(t.id,e.ok?``:`Picked ${n.label} with problems: ${e.error??`unknown error`}`)}).catch(e=>z.set(t.id,`Could not pick the winner: ${e instanceof Error?e.message:String(e)}`)).finally(q)}function se(t){z.set(t.id,`Asking the judge.`),q(),e(`race-judge`,{raceId:t.id},{timeoutMs:M}).then(e=>{e.type===`race-judge-result`&&z.set(t.id,e.ok?``:`Could not judge: ${e.error??`unknown error`}`)}).catch(e=>z.set(t.id,`Could not judge: ${e instanceof Error?e.message:String(e)}`)).finally(q)}function ce(e){let t=h(Object.values(e.sessionIdByContestant),e=>V(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 le(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 ue(e){let t=c(`article`,`arena-race`);t.append(c(`h3`,`arena-race-title`,e.spec.title)),t.append(c(`p`,`arena-race-meta`,`${e.baseBranch} at ${e.startSha.slice(0,oe)}, ${new Date(e.createdAt).toLocaleString()}`));let n=c(`div`,`arena-race-actions`),r=o({variant:`secondary`,size:`small`,label:`Judge now`,disabled:e.phase===`judging`,onClick:()=>se(e)}),i=c(`span`,`arena-status`,z.get(e.id)||ce(e));i.setAttribute(`role`,`status`),n.append(r,i),t.append(n);let a=c(`ul`,`arena-contestants`);for(let t of le(e))a.append(W(e,t));return t.append(a),t}function q(){if(!P)return;let e=ne();if(P.replaceChildren(c(`h2`,`arena-section-title`,`Races`)),e.length===0)P.append(c(`p`,`arena-empty`,`No races yet.`));else for(let t of e)P.append(ue(t))}function J(e,t,n,r){let i=c(`select`,`settings-view-input arena-select`);i.setAttribute(`aria-label`,r);for(let n of e){let e=c(`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 Y(e,t,n=null){let r=c(`div`,`arena-setup`),i=x(F).filter(e=>!n||n.includes(e)).map(e=>({value:e,label:y(e)}));r.append(J(i,e.agent,n=>t({...T(F,n),instructions:e.instructions}),`Agent`));let a=b(F,e.agent).map(e=>({value:e.id,label:e.label}));r.append(J(a,e.model,n=>t(E(F,e,n)),`Model`));let o=S(F,e.agent,e.model);return o.length>0&&r.append(J(o.map(e=>({value:e,label:e})),C(e),n=>t(D(e,n)),`Effort`)),r}function X(){return{version:1,title:I.raceTitle,prompt:I.prompt,repoPath:I.repoPath,contestants:I.contestants,judge:I.judgeSetup?{setup:I.judgeSetup}:null}}function Z(e,t,n,r=!1){let i=c(`label`,`arena-field`);i.append(c(`span`,`arena-field-label`,e));let a=r?c(`textarea`,`settings-view-input arena-prompt`):c(`input`,`settings-view-input`);return a.value=t,a.addEventListener(`input`,()=>n(a.value)),i.append(a),i}function Q(e){return k(F,e.map(e=>e.setup))}function de(e){let t=c(`div`,`arena-lineup`);return I.contestants.forEach((n,r)=>{let i=c(`div`,`arena-column`);i.append(c(`span`,`arena-column-label`,n.label)),i.append(Y(n.setup,t=>{I.contestants=Q(I.contestants.map((e,n)=>n===r?{...e,setup:t}:e)),e()}));let a=c(`textarea`,`settings-view-input`);a.placeholder=`Extra instructions for this contestant`,a.rows=3,a.value=n.setup.instructions,a.addEventListener(`input`,()=>{I.contestants=I.contestants.map((e,t)=>t===r?{...e,setup:{...e.setup,instructions:a.value}}:e)}),i.append(a),i.append(o({variant:`quiet`,size:`small`,label:`Remove`,onClick:()=>{I.contestants=Q(I.contestants.filter((e,t)=>t!==r)),e()}})),t.append(i)}),t}function fe(e){let t=c(`div`,`arena-vary`),n=I.contestants[0]?.setup??T(F,x(F)[0]??`claude-code`),r=`model`,i=c(`div`,`arena-vary-choices`),a=()=>{i.replaceChildren();for(let e of ie(F,n,r)){let t=c(`label`,`dialog-checkbox-label`),n=c(`input`);n.type=`checkbox`,n.value=e.value,t.append(n,c(`span`,null,e.label)),i.append(t)}},s=c(`div`,`arena-vary-base`),l=()=>{s.replaceChildren(Y(n,e=>{n=e,l(),a()}))};return t.append(c(`span`,`arena-field-label`,`Start from`),s),t.append(c(`span`,`arena-field-label`,`Vary`),J(v.map(e=>({value:e,label:e})),r,e=>{r=v.find(t=>t===e)??`model`,a()},`Setting to vary`)),t.append(i),t.append(o({variant:`secondary`,size:`small`,label:`Use these`,onClick:()=>{let t=[...i.querySelectorAll(`input:checked`)].map(e=>e instanceof HTMLInputElement?e.value:``).filter(Boolean);I.contestants=A(F,n,r,t),e()}})),l(),a(),t}function $(e){try{return JSON.parse(e)}catch{return null}}function pe(e){let n=t.safeParse($(e));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 I={raceTitle:r.title,prompt:r.prompt,repoPath:r.repoPath,contestants:r.contestants,judgeSetup:r.judge?.setup??null},null}function me(){let t=c(`section`,`arena-new`),n=c(`div`,`arena-new-body`),a=c(`span`,`arena-status`);a.setAttribute(`role`,`status`);let s=c(`textarea`,`settings-view-input arena-file`);s.setAttribute(`aria-label`,`Race spec JSON`);let l=()=>{if(n.replaceChildren(),s.hidden=!L,L){s.value=JSON.stringify(X(),null,2),n.append(s);return}n.append(Z(`Title`,I.raceTitle,e=>{I.raceTitle=e}));let e=Z(`Repository folder`,I.repoPath,e=>{I.repoPath=e}),t=e.querySelector(`input`),r=c(`datalist`);r.id=`arena-repo-paths`;for(let e of new Set([...u.values()].map(e=>e.path))){let t=c(`option`);t.value=e,r.append(t)}t?.setAttribute(`list`,r.id),n.append(e,r),n.append(Z(`Prompt`,I.prompt,e=>{I.prompt=e},!0)),n.append(fe(l)),n.append(de(l));let a=o({variant:`quiet`,size:`small`,label:`Add contestant`,disabled:I.contestants.length>=5,onClick:()=>{let e=x(F)[0]??`claude-code`;I.contestants=Q([...I.contestants,{id:`new`,label:`new`,setup:I.contestants.at(-1)?.setup??T(F,e)}]),l()}}),d=c(`div`,`arena-judge`),f=c(`label`,`dialog-checkbox-label`),p=c(`input`);p.type=`checkbox`,p.checked=I.judgeSetup!==null,p.addEventListener(`change`,()=>{I.judgeSetup=p.checked?T(F,i):null,l()}),f.append(p,c(`span`,null,`Judge the results`)),d.append(f),I.judgeSetup&&d.append(Y(I.judgeSetup,e=>{I.judgeSetup=e,l()},[i])),n.append(a,d)},d=o({variant:`quiet`,size:`small`,label:`Edit as file`,onClick:()=>{if(L){let e=pe(s.value);if(a.textContent=e??``,e)return}L=!L,d.setAttribute(`aria-pressed`,String(L)),l()}});d.setAttribute(`aria-pressed`,`false`);let f=o({variant:`primary`,label:`Start race`,onClick:()=>{let t=L?$(s.value):X();f.disabled=!0,a.textContent=`Starting the contestants.`,e(`race-start`,{spec:t},{timeoutMs:j}).then(e=>{e.type===`race-start-result`&&(a.textContent=e.ok?e.error??`Race started.`:`Could not start the race: ${e.error??`unknown error`}`)}).catch(e=>{a.textContent=`Could not start the race: ${e instanceof Error?e.message:String(e)}`}).finally(()=>{f.disabled=!1})}}),p=c(`div`,`arena-new-head`);p.append(c(`h2`,`arena-section-title`,`New race`),d);let m=c(`div`,`arena-actions`);return m.append(f,a),t.append(p,n,m),l(),e(`get-settings`,{}).then(e=>{if(e.type!==`settings`)return;let t=r.safeParse(e.settings.agentModels);t.success&&(F=t.data,I.judgeSetup??=T(F,i),I.contestants.length===0&&(I.contestants=A(F,T(F,x(F)[0]??`claude-code`),`agent`,x(F).slice(0,2))),l())}).catch(e=>{a.textContent=`Could not load the model list: ${e instanceof Error?e.message:String(e)}`}),t}function he(e){if(N)return;N=c(`div`,`arena-content`),P=c(`section`,`arena-races`),N.append(P),m()||N.append(me());let t=c(`section`,`arena-bench`);N.append(t);let n=()=>{t.hidden=p().status?.configured!==!0};ee(n),n(),e.append(N),te(q),f(q),q(),d(()=>import(`./benchmark-panel-C96qR8J1.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 +1 @@
1
- import{t as e}from"./button-xFPkZ-gt.js";import{n as t,r as n,s as r}from"./dom-helpers-DGbgEgul.js";import{Ha as i,Ua as a,Wa as o}from"./index-hG3gurrQ.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(t,n,r){return e({variant:n===`cancel`?`secondary`:`primary`,size:`small`,label:s[n],action:`benchmark-${n}`,disabled:r,onClick:()=>a(t.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=r(`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=r(`table`,`bench-table`),i=r(`tr`);i.append(r(`th`,null,`Case`),...e.armIds.map(t=>r(`th`,null,t===e.baselineArm?`${t} (baseline)`:t))),i.append(...t.map(e=>r(`th`,null,`${e} vs baseline`))),n.append(i);for(let i of e.rows){let a=r(`tr`);a.append(r(`td`,`bench-case`,i.caseId),...e.armIds.map(e=>p(i.arms[e]))),a.append(...t.map(e=>r(`td`,`bench-delta`,u(i.deltaVsBaseline[e]??null)))),n.append(a)}let a=[...new Set(e.armIds.flatMap(t=>Object.keys(e.totals[t]?.recallByTag??{})))].sort(),o=r(`tr`,`bench-total`);o.append(r(`td`,`bench-case`,`Paired recall`),...e.armIds.map(t=>p(e.totals[t]))),n.append(o);for(let t of a){let i=r(`tr`,`bench-total`);i.append(r(`td`,`bench-case`,`Recall, ${t}`),...e.armIds.map(n=>r(`td`,`bench-score`,l(e.totals[n]?.recallByTag[t]??null)))),n.append(i)}return n}function h(e,t){let{isServerConnected:a,pendingActionBySuite:o,outcomeBySuite:s}=i(),c=r(`div`,`bench-suite`),l=e.inFlight?.suiteId===t.id,u=!!e.inFlight&&!l,p=o.has(t.id)||!a,h=r(`div`,`bench-summary`);h.append(r(`span`,`bench-suite-title`,t.title),n(`bench`,t.caseCount===1?`case`:`cases`,String(t.caseCount)),n(`bench`,t.candidateCount===1?`candidate`:`candidates`,String(t.candidateCount)),n(`bench`,`arms`,String(t.armIds.length))),c.append(h);let g=r(`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=r(`span`,`bench-status`,(a?``:`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(r(`p`,`bench-error`,t.error)),c;let y=t.latestReport;return y?(c.append(r(`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(r(`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}=i(),n=t(`bench`,`Benchmarks`,`Suites from the benchmarks folder of the Glimmervoid home, one run at a time.`);if(c.append(n),!e)c.append(r(`p`,`bench-empty`,`Waiting for the server.`));else if(!e.configured)c.append(r(`p`,`bench-empty`,e.reason||`Benchmarks are off.`));else if(e.suites.length===0)c.append(r(`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 _(e){c||(c=r(`div`,`bench-content`),e.append(c),o(g),g())}var v={mount:_};export{v as view};
1
+ import{t as e}from"./button-xFPkZ-gt.js";import{n as t,r as n,s as r}from"./dom-helpers-DGbgEgul.js";import{Ha as i,Ua as a,Wa as o}from"./index-D-I5Bdux.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(t,n,r){return e({variant:n===`cancel`?`secondary`:`primary`,size:`small`,label:s[n],action:`benchmark-${n}`,disabled:r,onClick:()=>a(t.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=r(`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=r(`table`,`bench-table`),i=r(`tr`);i.append(r(`th`,null,`Case`),...e.armIds.map(t=>r(`th`,null,t===e.baselineArm?`${t} (baseline)`:t))),i.append(...t.map(e=>r(`th`,null,`${e} vs baseline`))),n.append(i);for(let i of e.rows){let a=r(`tr`);a.append(r(`td`,`bench-case`,i.caseId),...e.armIds.map(e=>p(i.arms[e]))),a.append(...t.map(e=>r(`td`,`bench-delta`,u(i.deltaVsBaseline[e]??null)))),n.append(a)}let a=[...new Set(e.armIds.flatMap(t=>Object.keys(e.totals[t]?.recallByTag??{})))].sort(),o=r(`tr`,`bench-total`);o.append(r(`td`,`bench-case`,`Paired recall`),...e.armIds.map(t=>p(e.totals[t]))),n.append(o);for(let t of a){let i=r(`tr`,`bench-total`);i.append(r(`td`,`bench-case`,`Recall, ${t}`),...e.armIds.map(n=>r(`td`,`bench-score`,l(e.totals[n]?.recallByTag[t]??null)))),n.append(i)}return n}function h(e,t){let{isServerConnected:a,pendingActionBySuite:o,outcomeBySuite:s}=i(),c=r(`div`,`bench-suite`),l=e.inFlight?.suiteId===t.id,u=!!e.inFlight&&!l,p=o.has(t.id)||!a,h=r(`div`,`bench-summary`);h.append(r(`span`,`bench-suite-title`,t.title),n(`bench`,t.caseCount===1?`case`:`cases`,String(t.caseCount)),n(`bench`,t.candidateCount===1?`candidate`:`candidates`,String(t.candidateCount)),n(`bench`,`arms`,String(t.armIds.length))),c.append(h);let g=r(`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=r(`span`,`bench-status`,(a?``:`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(r(`p`,`bench-error`,t.error)),c;let y=t.latestReport;return y?(c.append(r(`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(r(`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}=i(),n=t(`bench`,`Benchmarks`,`Suites from the benchmarks folder of the Glimmervoid home, one run at a time.`);if(c.append(n),!e)c.append(r(`p`,`bench-empty`,`Waiting for the server.`));else if(!e.configured)c.append(r(`p`,`bench-empty`,e.reason||`Benchmarks are off.`));else if(e.suites.length===0)c.append(r(`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 _(e){c||(c=r(`div`,`bench-content`),e.append(c),o(g),g())}var v={mount:_};export{v as view};