落地私聊空运询价与TMS报价回填,按后台模板出单。

查到价后把币种、单位、数量、单价、备注写入报价单,避免销售只看到光秃秃的金额。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-14 20:25:35 +08:00
co-authored by Cursor
parent cea3a6e51e
commit 99da1faf30
78 changed files with 8838 additions and 321 deletions
+20
View File
@@ -59,6 +59,26 @@ class IntentRouter:
"""一条入站一个 RouteDecision。"""
return self._a().route(text=text, sender_id=sender_id)
def route_inbound(
self,
*,
text: str,
sender_id: str,
event: str = "",
) -> RouteDecision:
"""
入站后再路由。
点卡片是结构化事件,不进大模型。
自由文字交给 DeepSeek A 认意图(续办 / 新询价 / 闲聊),不要求固定口令。
"""
if not sender_id:
return RouteDecision(intent="reject_no_sender", confidence=1.0)
kind = (event or "").strip().lower()
if kind in {"template_card_event", "click", "templatecardevent"}:
return RouteDecision(intent="card_action", confidence=1.0)
return self.route(text=text, sender_id=sender_id)
def enqueue_ordered_actions(
self,
*,