feat: enforce activity logs and tighten sizing/map reply policies

This commit is contained in:
2026-03-01 13:01:10 +08:00
parent 0f769607c4
commit 1c1b870d2b
9 changed files with 260 additions and 19 deletions

View File

@@ -364,6 +364,27 @@ class RegressionPipelineTest(unittest.IsolatedAsyncioTestCase):
)
self.assertEqual(reply, "图片收到了,你继续发就行。")
async def test_map_inquiry_is_rejected(self):
agent = CustomerServiceAgent()
msg = CustomerMessage(
msg_id="m-map-reject",
acc_id="test_shop",
msg="这个地图能做吗",
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="",
)
resp = await agent.process_message(msg)
self.assertTrue(resp.should_reply)
self.assertIn("地图", resp.reply)
self.assertIn("不做", resp.reply)
self.assertTrue(resp.reply.endswith(("", "", "好的", "嗯咯", "嗯啦")))
def tearDown(self):
db.clear_pending_quote_state(self.customer_id)