fix: avoid simulation hook in mini mode

This commit is contained in:
James Long
2026-07-01 14:11:14 -04:00
parent 640b42b0a1
commit 6281f17124
2 changed files with 3 additions and 14 deletions
@@ -229,8 +229,6 @@ export async function createRuntimeLifecycle(input: LifecycleInput): Promise<Lif
const { RunFooter } = await footerTask
let closed = false
let sigintRegistered = false
let simulation: { readonly url: string; readonly stop: () => void } | undefined
const footer = new RunFooter(renderer, {
directory: input.directory,
findFiles: input.findFiles,
@@ -281,13 +279,6 @@ export async function createRuntimeLifecycle(input: LifecycleInput): Promise<Lif
onSubagentInterrupt: input.onSubagentInterrupt,
})
if (process.env.OPENCODE_SIMULATION === "1" || process.env.OPENCODE_SIMULATION === "true") {
const { SimulationActions } = await import("@/testing/simulation/actions")
const { SimulationServer } = await import("@/testing/simulation/server")
simulation = SimulationServer.start(SimulationActions.createHarness(renderer))
if (simulation) process.stderr.write(`opencode simulation websocket: ${simulation.url}\n`)
}
const sigint = () => {
footer.requestExit()
}
@@ -348,8 +339,6 @@ export async function createRuntimeLifecycle(input: LifecycleInput): Promise<Lif
await renderer.idle().catch(() => {})
}
} finally {
simulation?.stop()
simulation = undefined
footer.close()
await footer.idle().catch(() => {})
footer.destroy()