()
| 378 | } |
| 379 | |
| 380 | private async handleAbort(): Promise<void> { |
| 381 | const backend = this.backend; |
| 382 | if (backend && this.session.sessionId) { |
| 383 | await backend.cancelPrompt(this.session.sessionId); |
| 384 | } |
| 385 | await this.permissionHandler?.cancelAll('User aborted'); |
| 386 | this.session.queue.reset(); |
| 387 | this.session.onThinkingChange(false); |
| 388 | this.abortController.abort(); |
| 389 | this.abortController = new AbortController(); |
| 390 | this.messageBuffer.addMessage('Turn aborted', 'status'); |
| 391 | } |
| 392 | |
| 393 | private async handleExitFromUi(): Promise<void> { |
| 394 | await this.requestExit('exit', () => this.handleAbort()); |
no test coverage detected