落地转人工:三次补问或明确接管后出入口,真正转人工后冻结本票并允许新开询价。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1304,6 +1304,34 @@ class SeaGroupOpsTests(unittest.TestCase):
|
||||
self.assertTrue(any("不能再上传附件" in t for t in texts))
|
||||
self.assertFalse(self.ledger.get_ticket(work_order_no=wo).attachments)
|
||||
|
||||
def test_handoff_group_stays_silent(self) -> None:
|
||||
from agent.routing.group_intent import INTENT_FIELDS
|
||||
|
||||
wo, chat = self._open_group()
|
||||
self.ledger.transition(work_order_no=wo, to_status="转人工")
|
||||
sess = self.flow.session_of("sales1")
|
||||
sess.status = "转人工"
|
||||
sess.handoff_committed = True
|
||||
self.flow._save(sess)
|
||||
before = len(self.groups.sent)
|
||||
phase = handle_group_collab(
|
||||
InboundMessage(
|
||||
sender_id="prod4",
|
||||
message_id="h1",
|
||||
content="客户名称张三",
|
||||
chat_id=chat,
|
||||
chat_type="group",
|
||||
),
|
||||
flow=self.flow,
|
||||
ledger=self.ledger,
|
||||
injected_intent=INTENT_FIELDS,
|
||||
)
|
||||
self.assertEqual(phase, "handoff_ignore")
|
||||
after = [x.get("content") or "" for x in self.groups.sent[before:] if x.get("kind") == "text"]
|
||||
self.assertFalse(any("不能修改工单信息" in t for t in after))
|
||||
ticket = self.ledger.get_ticket(work_order_no=wo)
|
||||
self.assertNotIn("客户名称", ticket.collab_facts or {})
|
||||
|
||||
def test_dissolve_then_cannot_recreate(self) -> None:
|
||||
wo, chat = self._open_group()
|
||||
phase = handle_group_collab(
|
||||
|
||||
Reference in New Issue
Block a user