fix: harden image handling and update docs

This commit is contained in:
2026-03-08 13:20:18 +08:00
parent 2e3409d8c5
commit fddd879ba0
8 changed files with 180 additions and 37 deletions

View File

@@ -121,7 +121,9 @@ async def lookup_chat_history_tool(
line = f"[{ts}] {role}{msg}"
lines.append(line)
if r["direction"] == "in":
if "已收到" in msg and "" in msg:
msg_type = int(r.get("msg_type") or 0)
image_urls = str(r.get("image_urls", "") or "").strip()
if msg_type == 1 or image_urls or ("已收到" in msg and "" in msg):
has_images = True
if any(k in msg for k in ["找原图", "修复", "高清", "去背景", "抠图", "做衣服", "打印"]):
customer_needs.append(msg[:60])