落地陆运私聊文字询价:选项核对后再建单查价,并按线路拉产品进群。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -14,7 +14,7 @@ from agent.channel.wecom.models import InboundMessage
|
||||
from agent.handlers import abnormal, card_action, close_deal, continue_thread, new_inquiry
|
||||
from agent.handlers.echo_text import handle_echo_text
|
||||
from agent.handlers.group_collab import handle_group_collab
|
||||
from agent.handlers.text_inquiry import handle_text_inquiry, handle_text_other
|
||||
from agent.handlers.text_inquiry import handle_text_inquiry, handle_text_other, is_land_confirm_action
|
||||
from agent.routing.decision import RouteDecision
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@@ -210,12 +210,21 @@ def dispatch_inbound(message: InboundMessage, decision: RouteDecision) -> str:
|
||||
return "unknown_intent"
|
||||
|
||||
logger.info(
|
||||
"dispatch intent=%s sender=%s msg=%s wo=%s",
|
||||
"dispatch intent=%s sender=%s msg=%s wo=%s land_confirm=%s",
|
||||
decision.intent,
|
||||
message.sender_id,
|
||||
message.message_id,
|
||||
decision.thread_id or "-",
|
||||
is_land_confirm_action(message) if message.has_sender() else False,
|
||||
)
|
||||
if decision.intent in {
|
||||
"ordinary_text_other",
|
||||
"route_model_failed",
|
||||
"route_parse_failed",
|
||||
} and is_land_confirm_action(message):
|
||||
logger.info("dispatch 陆运核对卡确定:纠正闲聊路由 sender=%s", message.sender_id)
|
||||
handle_text_inquiry(message)
|
||||
return "ordinary_text_inquiry"
|
||||
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