openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
25 lines (24 loc) • 920 B
JavaScript
import { l as normalizeOptionalString } from "./string-coerce-CCIiB4H7.mjs";
import { i as getWorkerInferenceSessionControl } from "./inference-control-internal-B6MF-IIL.mjs";
//#region src/gateway/chat-abort-ops.ts
function createChatAbortOps(e) {
return {
resolveGatewayContext: e.resolveGatewayContext,
chatRunState: e.chatRunState,
removeChatRun: e.removeChatRun,
agentRunSeq: e.agentRunSeq,
getRuntimeConfig: e.getRuntimeConfig,
broadcast: e.broadcast,
nodeSendToSession: e.nodeSendToSession,
onRunAborted: (t) => {
e.cancelRunBoundApprovals?.(t).catch(() => {});
}
};
}
function captureWorkerInferenceForSession(e) {
const t = normalizeOptionalString(e.sessionId);
if (!t) return;
return getWorkerInferenceSessionControl(e.context.workerEnvironmentService)?.captureSessionCancellation(t, e.runId);
}
//#endregion
export { createChatAbortOps as n, captureWorkerInferenceForSession as t };