Chatbot: replies never carry an em dash (scrubbed to a comma)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-10-20 05:57:31 -05:00
parent 9992dd061d
commit 8b1395a90c
+3 -1
View File
@@ -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