openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
14 lines (13 loc) • 529 B
JavaScript
import { x as isCronSessionKey } from "./session-key-CqAyZeVk.mjs";
//#region src/sessions/classify-session-kind.ts
function classifySessionKind(e, t) {
if (e === "global") return "global";
if (e === "unknown") return "unknown";
if (isCronSessionKey(e)) return "cron";
if (t?.spawnedBy) return "spawn-child";
if (t?.chatType === "group" || t?.chatType === "channel") return "group";
if (e.includes(":group:") || e.includes(":channel:")) return "group";
return "direct";
}
//#endregion
export { classifySessionKind as t };