落地转人工:三次补问或明确接管后出入口,真正转人工后冻结本票并允许新开询价。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -16,7 +16,12 @@ from agent.handlers.echo_text import handle_echo_text
|
||||
from agent.handlers.group_collab import handle_group_collab
|
||||
from agent.handlers.image_inquiry import handle_image_inquiry
|
||||
from agent.handlers.attachment_inquiry import handle_attachment_inquiry
|
||||
from agent.handlers.text_inquiry import handle_text_inquiry, handle_text_other, is_land_confirm_action
|
||||
from agent.handlers.text_inquiry import (
|
||||
handle_text_inquiry,
|
||||
handle_text_other,
|
||||
is_land_confirm_action,
|
||||
should_resume_other_as_inquiry,
|
||||
)
|
||||
from agent.routing.decision import RouteDecision
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@@ -124,6 +129,7 @@ HANDLER_REGISTRY: dict[str, HandlerFn] = {
|
||||
"ordinary_text_inquiry": _wrap_text_inquiry,
|
||||
"ordinary_text_other": _wrap_text_other,
|
||||
"quote_adjust": _wrap_text_inquiry,
|
||||
"handoff_human": _wrap_text_inquiry,
|
||||
"attachment_inquiry": _wrap_attachment,
|
||||
"image_inquiry": _wrap_image,
|
||||
"multi_segment_transport": _wrap_new,
|
||||
@@ -263,10 +269,18 @@ def dispatch_inbound(message: InboundMessage, decision: RouteDecision) -> str:
|
||||
logger.info("dispatch 陆运核对卡确定:纠正闲聊路由 sender=%s", message.sender_id)
|
||||
handle_text_inquiry(message)
|
||||
return "ordinary_text_inquiry"
|
||||
if decision.intent == "ordinary_text_other" and should_resume_other_as_inquiry(message):
|
||||
logger.info("dispatch 补问续填:纠正闲聊路由 sender=%s", message.sender_id)
|
||||
handle_text_inquiry(message)
|
||||
return "ordinary_text_inquiry"
|
||||
if decision.intent == "quote_adjust":
|
||||
logger.info("dispatch 调价意图 sender=%s", message.sender_id)
|
||||
handle_text_inquiry(message, prefer_quoted=True)
|
||||
return "quote_adjust"
|
||||
if decision.intent == "handoff_human":
|
||||
logger.info("dispatch 转人工意图 sender=%s", message.sender_id)
|
||||
handle_text_inquiry(message, prefer_handoff=True)
|
||||
return "handoff_human"
|
||||
if decision.intent == "continue_thread":
|
||||
continue_thread.handle_continue_thread(message, thread_id=decision.thread_id)
|
||||
return decision.intent
|
||||
|
||||
Reference in New Issue
Block a user