fix: avoid simulation hook in mini mode
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user