v2.1.1 — Clean Telegram Response Formatting
Fix: PAI Formatting Stripped from Responses
v2.1.0 added a system prompt override to suppress PAI output formatting (═══ PAI headers, TASK/CONTENT/VERIFY sections). However, the system prompt only applies to new sessions — resumed sessions already have PAI formatting rules baked into Claude's context from ~/.claude/CLAUDE.md.
What Changed
Added a post-processing stripPaiFormatting() function that runs on every response before sending to Telegram. It strips:
═══ PAI ═══and════ PAI | NATIVE MODE ═══header lines🗒️ TASK:metadata lines🔧 CHANGE:and✅ VERIFY:sections (including sub-bullets)📋 SUMMARY:sections🗣️ BotName:prefix lines (used as fallback if no other content found)- Mode label emoji prefix (
💡/🔧) that was prepended to every message
Extracts the actual conversational content — 📃 CONTENT: text takes priority, then free-form text, then the bot summary line as fallback.
Before
🔧 ═══ PAI ═══════════════════════════
🗣️ DORA: Nice! Tsunami is a solid pick — enjoy your sushi!
After
Nice! Tsunami is a solid pick — enjoy your sushi!
Upgrade
Drop-in replacement. No config changes needed.
Full Changelog: v2.1.0...v2.1.1