UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

18 lines (17 loc) 726 B
import { t as isPlainObject } from "./plain-object-5a0EzLzX.js"; //#region src/config/commands.flags.ts function getOwnCommandFlagValue(config, key) { const { commands } = config ?? {}; if (!isPlainObject(commands) || !Object.hasOwn(commands, key)) return; return commands[key]; } /** Returns true only when a command flag is explicitly enabled. */ function isCommandFlagEnabled(config, key) { return getOwnCommandFlagValue(config, key) === true; } /** Returns the public restart command state; restart defaults on and is disabled only by false. */ function isRestartEnabled(config) { return getOwnCommandFlagValue(config, "restart") !== false; } //#endregion export { isRestartEnabled as n, isCommandFlagEnabled as t };