MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / cancelAllOperations

Method cancelAllOperations

ai/ai.ts:3626–3632  ·  view source on GitHub ↗
(reason?: string)

Source from the content-addressed store, hash-verified

3624
3625 cancelAllOperations(reason?: string): void {
3626 const tokens = Array.from(this.activeTokens);
3627 this.activeTokens.clear();
3628 for (const token of tokens) {
3629 if (!token.aborted) token.abort(reason || "操作已取消");
3630 }
3631 }
3632
3633 async destroy(): Promise<void> {
3634 this.cancelAllOperations("服务已停止");
3635 if (this.configManager) this.configManager.unregisterListener(this);

Callers 1

destroyMethod · 0.95

Calls 2

clearMethod · 0.80
abortMethod · 0.65

Tested by

no test coverage detected