openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
18 lines (17 loc) • 798 B
JavaScript
import { l as normalizeOptionalString } from "./string-coerce-CIXf7egm.js";
import "./error-runtime-Bz9Tw57Z.js";
import "./string-coerce-runtime-GQa0ehRA.js";
//#region extensions/memory-core/src/dreaming-shared.ts
function includesSystemEventToken(cleanedBody, eventText) {
const normalizedBody = normalizeOptionalString(cleanedBody);
const normalizedEventText = normalizeOptionalString(eventText);
if (!normalizedBody || !normalizedEventText) return false;
if (normalizedBody === normalizedEventText) return true;
return normalizedBody.split(/\r?\n/).some((line) => {
const trimmed = line.trim();
if (trimmed === normalizedEventText) return true;
return trimmed.replace(/^\[cron:[^\]]+\]\s*/, "") === normalizedEventText;
});
}
//#endregion
export { includesSystemEventToken as t };