机器人显示名与站点标题可配;多段联运列表投影;协同群监听对账;工单附件落存;模板与工单后台补强

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
linmianxun
2026-10-19 09:41:59 +08:00
co-authored by Cursor
parent 277cdc1c28
commit 2b528758b4
119 changed files with 6760 additions and 3516 deletions
+33 -1
View File
@@ -151,6 +151,38 @@ class AirTextInquiryTests(unittest.TestCase):
land = validate_required_fields(facts={"运输类型": "国内整车"}, business_line="LAND")
self.assertTrue(land["facts"].get("报价日期"))
def test_paste_hint_must_not_become_quote_date(self) -> None:
"""
WO202610170068:补问提示误写入报价日期后出「线路」。
提示文案必须当空日期,建单摘要不能原样展示,normalize 后不能留在 facts。
"""
from agent.llm.extract_text import _harvest_labels, clip_inquiry_value
from agent.schema.field_validate import is_blank_quote_date, normalize_facts
hint = copy.CLARIFY_PASTE_HINT
self.assertTrue(is_blank_quote_date(hint))
self.assertEqual(clip_inquiry_value(hint), "")
cleaned = normalize_facts({"报价日期": hint, "目的港": "吉隆坡"})
self.assertNotIn("报价日期", cleaned)
squeezed = f"报价日期(非必填):{hint}\n件数(必填):10"
harvested = _harvest_labels(squeezed, ("报价日期", "件数"))
self.assertNotIn("报价日期", harvested)
card = copy.inquiry_card(
work_order_no="WO202610170068",
facts={
"目的港": "吉隆坡",
"品名": "普货",
"件数": "10",
"毛重": "21",
"体积": "1.1*1.2*1.3",
"包装方式": "散货",
"报价日期": hint,
},
)
self.assertIn("报价日期(非必填):", card)
self.assertNotIn("请复制粘贴", card)
def test_fly_is_air_and_followup_keeps_mode(self) -> None:
phase = self._on_text(
sender_id="u_fly",
@@ -906,7 +938,7 @@ class AirTextInquiryTests(unittest.TestCase):
self.assertNotIn("工单状态", sub)
self.assertTrue(sub.endswith(copy.collab_hint("WO202609140001")))
self.assertIn(
"请手动将相关方拉到空运原有协同群,并在空运协同群中发送“ WO202609140001@询价小助手”,谢谢。",
"请手动将相关方拉到空运原有协同群,并在空运协同群中发送“ WO202609140001@智报通AIQ”,谢谢。",
sub,
)
self.assertNotIn("内部协同", json.dumps(card, ensure_ascii=False))