UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

16 lines (15 loc) • 734 B
import { n as sanitizeExecApprovalDisplayText } from "./exec-approval-text-sanitize-Xx3Q87a8.mjs"; //#region src/infra/exec-approval-command-display.ts /** Resolves sanitized command and preview text for exec approval prompts. */ function resolveExecApprovalCommandDisplay(e) { const t = e.command || (e.host === "node" && e.systemRunPlan ? e.systemRunPlan.commandText : ""); const n = sanitizeExecApprovalDisplayText(t); const r = (e.commandPreview ?? (e.host === "node" ? e.systemRunPlan?.commandPreview ?? null : null))?.trim() ?? ""; const i = r ? sanitizeExecApprovalDisplayText(r) : null; return { commandText: n, commandPreview: i !== n ? i : null }; } //#endregion export { resolveExecApprovalCommandDisplay as t };