@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
14 lines • 732 B
JavaScript
/**
* The signal a nested call's hooks and tool run serve: the call's own signal combined with the turn's
* (senpi#6679 M1), so aborting either ends the call — and its permission prompt. A call signal not linked to
* the turn must not replace the turn's (the prompt would survive a whole-turn abort); the turn's must not
* silence the call's own (#6676). The union never aborts either original controller.
*/
export function combinedToolCallSignal(callSignal, turnSignal) {
if (callSignal === undefined)
return turnSignal;
if (turnSignal === undefined || turnSignal === callSignal)
return callSignal;
return AbortSignal.any([callSignal, turnSignal]);
}
//# sourceMappingURL=tool-call-signal.js.map