diff --git a/MEMORY.md b/MEMORY.md new file mode 100644 index 0000000..d270a36 --- /dev/null +++ b/MEMORY.md @@ -0,0 +1,5 @@ +# AI Mail Bot - 记忆 + +## 固定规则 + +- **Telegram parse_mode 永远为 MarkdownV2**,不传 None。需要发纯文本时,用 Markdown 转义包装,而不是去掉 parse_mode。 diff --git a/src/tg_bot.py b/src/tg_bot.py index b9abb40..8c0c369 100644 --- a/src/tg_bot.py +++ b/src/tg_bot.py @@ -367,7 +367,7 @@ def _handle_callback(tg_cfg: TelegramConfig, cfg: Config, cb: dict): # AI 处理中 _tg_req(tg_cfg, "editMessageText", { "chat_id": chat_id, "message_id": msg_id, - "text": "🤖 AI思考中...", + "text": "🤖 *AI思考中…*", "parse_mode": "MarkdownV2", }) # 丢到 AI 线程池处理,不阻塞按钮轮询 _ai_pool.submit(_do_regen, cfg, chat_id, msg_id, ctx, conv) @@ -400,7 +400,7 @@ def _handle_callback(tg_cfg: TelegramConfig, cfg: Config, cb: dict): elif action == CALLBACK_PROMO_DETAIL and ctx: _tg_req(tg_cfg, "editMessageText", { "chat_id": chat_id, "message_id": msg_id, - "text": "🤖 AI思考中...", "parse_mode": None, + "text": "🤖 *AI思考中…*", "parse_mode": "MarkdownV2", }) try: details = expand_promo_detail(