MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / cancelCurrentRequest

Method cancelCurrentRequest

src/core/task/Task.ts:2180–2186  ·  view source on GitHub ↗

* Cancels the current HTTP request if one is in progress. * This immediately aborts the underlying stream rather than waiting for the next chunk.

()

Source from the content-addressed store, hash-verified

2178 * This immediately aborts the underlying stream rather than waiting for the next chunk.
2179 */
2180 public cancelCurrentRequest(): void {
2181 if (this.currentRequestAbortController) {
2182 console.log(`[Task#${this.taskId}.${this.instanceId}] Aborting current HTTP request`)
2183 this.currentRequestAbortController.abort()
2184 this.currentRequestAbortController = undefined
2185 }
2186 }
2187
2188 /**
2189 * Force emit a final token usage update, ignoring throttle.

Callers 3

disposeMethod · 0.95
Task.spec.tsFile · 0.80
cancelTaskMethod · 0.80

Calls 2

logMethod · 0.65
abortMethod · 0.45

Tested by

no test coverage detected