MCPcopy Index your code
hub / github.com/anomalyco/opencode / teardown

Function teardown

packages/core/src/pty.ts:116–125  ·  view source on GitHub ↗
(session: Active)

Source from the content-addressed store, hash-verified

114 }
115
116 function teardown(session: Active) {
117 for (const listener of session.listeners) listener.dispose()
118 session.listeners.length = 0
119 if (session.info.status === "running") {
120 try {
121 session.process.kill()
122 } catch {}
123 }
124 notifyEnd(session, {})
125 }
126
127 yield* Effect.addFinalizer(() =>
128 Effect.sync(() => {

Callers 1

pty.tsFile · 0.85

Calls 2

notifyEndFunction · 0.85
disposeMethod · 0.45

Tested by

no test coverage detected