diff --git a/biome.json b/biome.json index ef6f488be91..24b13ecf941 100644 --- a/biome.json +++ b/biome.json @@ -86,7 +86,7 @@ "noExcessiveCognitiveComplexity": { "level": "error", "options": { - "maxAllowedComplexity": 224 + "maxAllowedComplexity": 215 } } }, diff --git a/src/lib/actions/sandbox/rebuild.ts b/src/lib/actions/sandbox/rebuild.ts index 566c80eee95..d9e114311b1 100644 --- a/src/lib/actions/sandbox/rebuild.ts +++ b/src/lib/actions/sandbox/rebuild.ts @@ -384,6 +384,22 @@ function isSingleAgentRebuildSupported( return true; } +function printRebuildVersionSummary( + sandboxName: string, + agentName: string, + versionCheck: ReturnType, +): void { + console.log(""); + console.log(` ${B}Rebuild sandbox '${sandboxName}'${R}`); + if (versionCheck.sandboxVersion) { + console.log(` Current: ${agentName} v${versionCheck.sandboxVersion}`); + } + if (versionCheck.expectedVersion) { + console.log(` Target: ${agentName} v${versionCheck.expectedVersion}`); + } + console.log(""); +} + async function reapplyMessagingManifestAfterOpenClawDoctor( sandboxName: string, plan: SandboxMessagingPlan | null, @@ -470,15 +486,7 @@ export async function rebuildSandbox( // Version check — show what's changing const versionCheck = sandboxVersion.checkAgentVersion(sandboxName); - console.log(""); - console.log(` ${B}Rebuild sandbox '${sandboxName}'${R}`); - if (versionCheck.sandboxVersion) { - console.log(` Current: ${agentName} v${versionCheck.sandboxVersion}`); - } - if (versionCheck.expectedVersion) { - console.log(` Target: ${agentName} v${versionCheck.expectedVersion}`); - } - console.log(""); + printRebuildVersionSummary(sandboxName, agentName, versionCheck); const rebuildConfirmed = await confirmSandboxRebuildIfNeeded( skipConfirm,