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

Method createAbortToken

ai/ai.ts:3611–3620  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3609
3610 createAbortToken(): AbortToken {
3611 const token = createAbortToken();
3612 this.activeTokens.add(token);
3613 token.signal.addEventListener(
3614 "abort",
3615 () => this.activeTokens.delete(token),
3616 { once: true },
3617 );
3618 return token;
3619 }
3620
3621 releaseToken(token: AbortToken): void {
3622 this.activeTokens.delete(token);
3623 }

Callers 4

runQuestionMethod · 0.80
executeMethod · 0.80
executeMethod · 0.80
executeMethod · 0.80

Calls 3

createAbortTokenFunction · 0.85
addMethod · 0.45
deleteMethod · 0.45

Tested by

no test coverage detected