MCPcopy Index your code
hub / github.com/tiann/hapi / handleAbort

Method handleAbort

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

Source from the content-addressed store, hash-verified

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());

Callers 4

runMainLoopMethod · 0.95
handleExitFromUiMethod · 0.95
handleSwitchFromUiMethod · 0.95
handleSwitchRequestMethod · 0.95

Calls 5

cancelPromptMethod · 0.65
cancelAllMethod · 0.45
resetMethod · 0.45
abortMethod · 0.45
addMessageMethod · 0.45

Tested by

no test coverage detected