()
| 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; |
no test coverage detected