UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

19 lines (18 loc) 779 B
import { l as normalizeOptionalString } from "./string-coerce-CIXf7egm.js"; import { r as normalizeCommandBody } from "./commands-registry-normalize-Bugd8r0v.js"; import "./commands-registry-zRoXYk7P.js"; //#region src/auto-reply/reply/btw-command.ts const BTW_COMMAND_RE = /^\/btw(?::|\s|$)/i; function isBtwRequestText(text, options) { if (!text) return false; const normalized = normalizeCommandBody(text, options).trim(); return BTW_COMMAND_RE.test(normalized); } function extractBtwQuestion(text, options) { if (!text) return null; const match = normalizeCommandBody(text, options).trim().match(/^\/btw(?:\s+(.*))?$/i); if (!match) return null; return normalizeOptionalString(match[1]) ?? ""; } //#endregion export { isBtwRequestText as n, extractBtwQuestion as t };