openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
3 lines • 726 B
JavaScript
import{l as normalizeOptionalString}from"./string-coerce-CpTFcSwY.mjs";import{v as clearSessionControllerMailbox}from"./session-controller.mailbox-9GxioY-x.mjs";import{n as completeFollowupRunLifecycle}from"./lifecycle-9W2sZTIl.mjs";import{a as getExistingFollowupQueue}from"./state-t6zhY2pl.mjs";
//!src/auto-reply/reply/queue/cleanup.ts
function clearSessionQueues(e,t,n,r){const i=/* @__PURE__ */ new Set;const a=/* @__PURE__ */ new Set;const o=[];for(const s of e){const e=normalizeOptionalString(s);if(!e||i.has(e))continue;i.add(e);o.push(e);r?.();const c=getExistingFollowupQueue(e,t);if(c&&!a.has(c)){a.add(c);clearSessionControllerMailbox(c,completeFollowupRunLifecycle,n,r)}}return o}export{clearSessionQueues as t};