diff --git a/chatbot.js b/chatbot.js index 6f281ca..5058a36 100644 --- a/chatbot.js +++ b/chatbot.js @@ -325,7 +325,9 @@ function askAI(message, historyText, kbBlock) { } const UNSURE_RE = /(not sure|do not know|don't know|cannot help|can't help|unable to help|no way for me|i (can|could) not (see|check|look)|contact support|reach support|support (ticket|desk)|\/support\b|my#help)/i; -async function answer(message, historyText) { +// every reply leaves without em dashes (Marty's voice rule; the model slips one in now and then, 2026-10-20) +async function answer(message, historyText) { const r = await answerRaw(message, historyText); if (r && typeof r.reply === 'string') r.reply = r.reply.replace(/\s*\u2014\s*/g, ', '); return r; } +async function answerRaw(message, historyText) { const msg = String(message || '').trim(); if (!msg) return { error: 'Say something first.' }; // fast path: the knowledge base's instant answers (seeded from CANNED); the in-code list only if the KB store is down