MCPcopy Create free account
hub / github.com/tiann/hapi / cleanup

Method cleanup

cli/src/opencode/opencodeRemoteLauncher.ts:307–324  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

305 }
306
307 protected async cleanup(): Promise<void> {
308 this.clearAbortHandlers(this.session.client.rpcHandlerManager);
309
310 if (this.permissionHandler) {
311 await this.permissionHandler.cancelAll('Session ended');
312 this.permissionHandler = null;
313 }
314
315 if (this.backend) {
316 await this.backend.disconnect();
317 this.backend = null;
318 }
319
320 if (this.happyServer) {
321 this.happyServer.stop();
322 this.happyServer = null;
323 }
324 }
325
326 private rollbackReasoningEffort(batch: { mode: OpencodeMode }, effort: string | null): void {
327 batch.mode.modelReasoningEffort = effort;

Callers 1

opencodeLocalLauncherFunction · 0.45

Calls 3

disconnectMethod · 0.65
stopMethod · 0.65
cancelAllMethod · 0.45

Tested by

no test coverage detected