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

Function abortHandler

ai/ai.ts:1019–1025  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1017 }, ms);
1018 const abortHandler = () => {
1019 if (settled) return;
1020 settled = true;
1021 clearTimeout(timeoutId);
1022 cleanup();
1023 reject(new UserError(token?.reason?.toString() || "操作已取消"));
1024 };
1025 if (token?.signal)
1026 token.signal.addEventListener("abort", abortHandler, { once: true });
1027 });
1028};

Callers

nothing calls this directly

Calls 1

cleanupFunction · 0.70

Tested by

no test coverage detected