export function EscalationPanel({ escalation }) { if (!escalation) { return `

Escalations

No pending escalations

`; } const reason = escapeHtml(escalation.reason || "Needs review"); const source = escapeHtml(escalation.context?.source_email || escalation.context?.email_body || "No email preview available."); const issue = escapeHtml(escalation.context?.message || escalation.reason || "FlowPilot paused this action."); return `

Needs your input

${reason}

Original email

${source}

Why it paused

${issue}

`; } function escapeHtml(value) { return String(value) .replaceAll("&", "&") .replaceAll("<", "<") .replaceAll(">", ">") .replaceAll('"', """) .replaceAll("'", "'"); }