MCPcopy Create free account
hub / github.com/anomalyco/opencode / stop

Function stop

packages/opencode/src/cli/cmd/tui.ts:218–224  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

216
217 let stopped = false
218 const stop = async () => {
219 if (stopped) return
220 stopped = true
221 process.off("SIGUSR2", reload)
222 await withTimeout(client.call("shutdown", undefined), 5000).catch(() => {})
223 worker.terminate()
224 }
225
226 const prompt = await input(args.prompt)
227 const config = await TuiConfig.get()

Callers 1

tui.tsFile · 0.70

Calls 2

withTimeoutFunction · 0.90
offMethod · 0.80

Tested by

no test coverage detected