智能体按 reply_code 读后台回复语;陆运整车报价单顶栏色与填表更稳,工单页展示同步收紧。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
linmianxun
2026-10-07 11:41:09 +08:00
co-authored by Cursor
parent 177dd0b25f
commit 419b4a1bf7
35 changed files with 2439 additions and 268 deletions
+11 -3
View File
@@ -504,12 +504,20 @@ def looks_like_confirm(text: str) -> bool:
"""
判断是否在表示确定查价。
「确定」「确认」「查价」「可以查了」及相近说法都算。
同一句像在改始发/目的/体积/车型/「改成」则不当确定,避免改内容被当成查价。
「确定」「确认」「查价」「可以查了」及相近短句才算。
长询价里「需确认/请确认」不算点核对卡,避免误回「核对已过期」。
同一句像在改始发/目的/体积/车型/「改成」则不当确定。
纯函数,无副作用。
"""
raw = (text or "").strip()
if not raw:
return False
if any(x in raw for x in _CONFIRM_EXCLUDE):
return False
return any(p in raw for p in _CONFIRM_PHRASES)
# 超过约 20 字一定是需求正文,不是「确定」短答。
if len(raw) > 20:
return False
compact = re.sub(r"[\s。!?!?,,、]+", "", raw)
if not compact:
return False
return any(p in compact for p in _CONFIRM_PHRASES)