feat(telegram): enforce canonical product routing

This commit is contained in:
ogt
2026-07-14 19:14:11 +08:00
parent 1431abba54
commit 180e708444
54 changed files with 7746 additions and 740 deletions

View File

@@ -171,6 +171,7 @@ class ImageAnalysisService:
self,
chat_id: str,
file_id: str,
original_message_id: int | None = None,
question: str = "請用繁體中文描述這張圖片,如果是截圖或介面請分析其內容和問題",
) -> None:
"""
@@ -192,7 +193,11 @@ class ImageAnalysisService:
from src.services.telegram_gateway import get_telegram_gateway
tg = get_telegram_gateway()
await tg.initialize()
await tg.send_as_openclaw(f"🖼️ <b>圖片分析</b>\n{result}")
await tg.send_as_openclaw(
f"🖼️ <b>圖片分析</b>\n{result}",
reply_to_message_id=original_message_id,
inbound_chat_id=chat_id,
)
except Exception as e:
logger.warning("download_and_analyze_failed", error=str(e))