UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

27 lines (26 loc) 1.17 kB
import { n as isRich, r as theme, t as colorize } from "./theme-vjDs9tao.js"; //#region src/daemon/output.ts /** Shared terminal output formatting helpers for daemon install/control commands. */ /** Normalizes Windows separators for command output paths. */ const normalizeWindowsPathSeparators = (value) => value.replace(/\\/g, "/"); /** Formats a labeled daemon output line with terminal-aware styling. */ function formatLine(label, value) { const rich = isRich(); return `${colorize(rich, theme.muted, `${label}:`)} ${colorize(rich, theme.command, value)}`; } function writeFormattedLines(stdout, lines, opts) { if (opts?.leadingBlankLine) stdout.write("\n"); for (const line of lines) stdout.write(`${formatLine(line.label, line.value)}\n`); } //#endregion //#region src/daemon/service-mutation.ts /** Isolate diagnostic observers from authoritative service-control mutations. */ function createGatewayLifecycleMutationReporter(onMutation) { return (mode) => { try { onMutation?.({ mode }); } catch {} }; } //#endregion export { writeFormattedLines as i, formatLine as n, normalizeWindowsPathSeparators as r, createGatewayLifecycleMutationReporter as t };