fix: first-image ack should pause instead of pushing unified quote

This commit is contained in:
2026-03-01 13:21:07 +08:00
parent 7397d6795b
commit a001d09e6e
2 changed files with 37 additions and 0 deletions

View File

@@ -364,6 +364,35 @@ class RegressionPipelineTest(unittest.IsolatedAsyncioTestCase):
)
self.assertEqual(reply, "图片收到了,你继续发就行。")
async def test_first_image_ack_avoids_unified_quote_wording(self):
os.environ["AI_DYNAMIC_COLLECTION_REPLIES"] = "true"
agent = CustomerServiceAgent()
st = agent._get_conversation_state(self.customer_id)
st.pending_image_urls = ["https://img.alicdn.com/a.jpg"]
msg = CustomerMessage(
msg_id="m-first-ack",
acc_id="test_shop",
msg="https://img.alicdn.com/a.jpg",
from_id=self.customer_id,
from_name="t",
cy_id=self.customer_id,
acc_type="AliWorkbench",
msg_type=0,
cy_name="t",
goods_name="专业找图",
goods_order="",
)
reply = await agent._render_collection_reply_with_ai(
message=msg,
state=st,
scene="collect_ack",
intent_hint="确认收到后先承接",
fallback="图片收到了,你继续发就行。",
)
self.assertIn("稍等", reply)
self.assertNotIn("统一报价", reply)
self.assertNotIn("发完", reply)
async def test_map_inquiry_is_rejected(self):
agent = CustomerServiceAgent()
msg = CustomerMessage(