import { hasControlCommand } from "../auto-reply/command-detection.js"; import type { CommandNormalizeOptions } from "../auto-reply/commands-registry.js"; import {
createInboundDebouncer,
resolveInboundDebounceMs,
type InboundDebounceCreateParams,
} from "../auto-reply/inbound-debounce.js"; import type { OpenClawConfig } from "../config/types.js"; import { normalizeOptionalString } from "../shared/string-coerce.js";
export function shouldDebounceTextInbound(params: {
text: string | null | undefined;
cfg: OpenClawConfig;
hasMedia?: boolean;
commandOptions?: CommandNormalizeOptions;
allowDebounce?: boolean;
}): boolean { if (params.allowDebounce === false) { returnfalse;
} if (params.hasMedia) { returnfalse;
} const text = normalizeOptionalString(params.text) ?? ""; if (!text) { returnfalse;
} return !hasControlCommand(text, params.cfg, params.commandOptions);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.