UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

26 lines (25 loc) • 996 B
import { n as sanitizeForLog } from "./ansi-CZa2t0Hf.mjs"; //#region src/commands/doctor/emit-notes.ts /** Strip terminal control sequences from a potentially multi-line doctor note. */ function sanitizeDoctorNote(e) { return e.split("\n").map(sanitizeForLog).join("\n"); } function emitDoctorNotes(e) { for (const [t, n] of [ ["Doctor changes", e.changeNotes], ["Doctor info", e.infoNotes], ["Doctor warnings", e.warningNotes] ]) for (const r of n ?? []) e.note(sanitizeDoctorNote(r), t); } /** Keep structured findings out of legacy warning panels while preserving change publication. */ function emitDoctorRepairSequenceNotes(e) { const t = e.repairSequence; emitDoctorNotes({ note: e.note, changeNotes: t.changeNotes, warningNotes: e.structuredWarnings ? t.displayWarningNotes : t.warningNotes }); for (const n of t.configChangeNotes ?? []) e.emitConfigChange(n); } //#endregion export { emitDoctorRepairSequenceNotes as n, sanitizeDoctorNote as r, emitDoctorNotes as t };