refactor: extract order helpers and stabilize first-image ack replies
This commit is contained in:
@@ -3,6 +3,7 @@ from __future__ import annotations
|
||||
import asyncio
|
||||
from typing import TYPE_CHECKING, Optional
|
||||
from core.post_ops import record_deal_success
|
||||
from core.order_helpers import parse_order_info
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from core.pydantic_ai_agent import AgentResponse, ConversationState, CustomerMessage, CustomerServiceAgent
|
||||
@@ -22,7 +23,7 @@ async def handle_order_notification(
|
||||
|
||||
_, order_block = agent._split_customer_text(message.msg)
|
||||
customer_text, _ = agent._split_customer_text(message.msg)
|
||||
order = agent._parse_order_info(order_block or message.msg)
|
||||
order = parse_order_info(order_block or message.msg)
|
||||
pay_status = order.get("pay_status", "")
|
||||
order_status = order.get("order_status", "")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user