MCPcopy Index your code
hub / github.com/TanStack/ai / teardown

Function teardown

packages/ai-opencode/src/process/server.ts:146–151  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

144 const lifecycle = { disposed: false }
145
146 const teardown = async (): Promise<void> => {
147 if (lifecycle.disposed) return
148 lifecycle.disposed = true
149 ownedServer?.close()
150 await Promise.resolve()
151 }
152
153 try {
154 // Resolve the session before subscribing so the event filter has an id.

Callers 2

startOpencodeSessionFunction · 0.85
startAcpSessionFunction · 0.85

Calls 2

resolveMethod · 0.80
closeMethod · 0.65

Tested by

no test coverage detected