openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
17 lines (16 loc) • 601 B
JavaScript
import { t as isPlainObject } from "./plain-object-CGY5w7fM.mjs";
//#region src/config/commands.flags.ts
function getOwnCommandFlagValue(e, t) {
const { commands: n } = e ?? {};
if (!isPlainObject(n) || !Object.hasOwn(n, t)) return;
return n[t];
}
function isCommandFlagEnabled(e, t) {
return getOwnCommandFlagValue(e, t) === true;
}
/** Returns the public restart command state; restart defaults on and is disabled only by false. */
function isRestartEnabled(e) {
return getOwnCommandFlagValue(e, "restart") !== false;
}
//#endregion
export { isRestartEnabled as n, isCommandFlagEnabled as t };