feat: two-stage status messages: 获取邮件中 -> AI思考中
This commit is contained in:
@@ -57,10 +57,10 @@ def send_text(tg_cfg: TelegramConfig, chat_id: str, text: str,
|
||||
return result["result"]["message_id"]
|
||||
|
||||
|
||||
def send_thinking(tg_cfg: TelegramConfig, chat_id: str) -> int:
|
||||
def send_thinking(tg_cfg: TelegramConfig, chat_id: str, text: str = "💭 思考中...") -> int:
|
||||
result = _tg_req(tg_cfg, "sendMessage", {
|
||||
"chat_id": chat_id,
|
||||
"text": "💭 思考中...",
|
||||
"text": text,
|
||||
})
|
||||
return result["result"]["message_id"]
|
||||
|
||||
@@ -345,10 +345,10 @@ def _handle_callback(tg_cfg: TelegramConfig, cfg: Config, cb: dict):
|
||||
if not conv or conv.get("summary_msg_id") != msg_id:
|
||||
return
|
||||
logger.info(" 换一批 (已有 %d 条历史)", len(conv.get("all_suggestions", [])))
|
||||
# 先显示思考中
|
||||
# AI 处理中
|
||||
_tg_req(tg_cfg, "editMessageText", {
|
||||
"chat_id": chat_id, "message_id": msg_id,
|
||||
"text": "💭 思考中...", "parse_mode": None,
|
||||
"text": "🤖 AI思考中...", "parse_mode": None,
|
||||
})
|
||||
try:
|
||||
new_suggestions = generate_more_replies(
|
||||
@@ -390,10 +390,9 @@ def _handle_callback(tg_cfg: TelegramConfig, cfg: Config, cb: dict):
|
||||
logger.info(" 取消, 删除提示消息")
|
||||
|
||||
elif action == CALLBACK_PROMO_DETAIL and ctx:
|
||||
# 先显示思考中
|
||||
_tg_req(tg_cfg, "editMessageText", {
|
||||
"chat_id": chat_id, "message_id": msg_id,
|
||||
"text": "💭 思考中...", "parse_mode": None,
|
||||
"text": "🤖 AI思考中...", "parse_mode": None,
|
||||
})
|
||||
try:
|
||||
details = expand_promo_detail(
|
||||
|
||||
Reference in New Issue
Block a user