openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
18 lines (17 loc) • 809 B
JavaScript
import { l as getSession, u as hasActiveBackgroundExecSession } from "./bash-process-registry-DvUU9bL3.js";
import { t as getProcessSupervisor } from "./supervisor--Gozeeeu.js";
//#region src/agents/bash-process-control.ts
function isBackgroundExecSessionActive(sessionId) {
return hasActiveBackgroundExecSession(sessionId);
}
function cancelBackgroundExecSession(sessionId) {
const session = getSession(sessionId);
if (!session?.backgrounded || session.exited || session.finalizing) return false;
const supervisor = getProcessSupervisor();
const record = supervisor.getRecord(sessionId);
if (!record || record.state === "exited") return false;
supervisor.cancel(sessionId, "manual-cancel");
return true;
}
//#endregion
export { isBackgroundExecSessionActive as n, cancelBackgroundExecSession as t };