修复附件询价:公网打开上传页不再出骨架 JSON,未上传时打字能正常回话。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-22 18:54:41 +08:00
co-authored by Cursor
parent 49faa35f47
commit 8e73af0d03
6 changed files with 150 additions and 15 deletions
+23 -2
View File
@@ -239,13 +239,34 @@ class AttachmentInquiryTests(unittest.TestCase):
)
self.assertEqual(name, "attachment_inquiry")
def test_follow_text_not_create_ticket_before_upload(self) -> None:
def test_text_inquiry_before_upload_gets_reply(self) -> None:
"""发卡后还没传材料:销售改口打字询价必须有回话,不能默收。"""
handle_attachment_inquiry(
InboundMessage(sender_id="s1", message_id="m1", content="附件询价"),
store=self.store,
)
name = dispatch_inbound(
InboundMessage(sender_id="s1", message_id="m2", content="海运上海到纽约 2个40尺"),
InboundMessage(sender_id="s1", message_id="m2", content=SEA_ORAL),
RouteDecision(intent="ordinary_text_inquiry"),
)
self.assertEqual(name, "ordinary_text_inquiry")
self.assertIsNone(get_attach_wave_book().active("s1"))
self.assertIsNotNone(get_sea_text_flow().session_of("s1"))
def test_follow_text_while_recognizing_not_new_ticket(self) -> None:
"""已经开始认附件:期间的字并进口播,不另开文字询价。"""
handle_attachment_inquiry(
InboundMessage(sender_id="s1", message_id="m1", content="附件询价"),
store=self.store,
)
accept_h5_uploads(
sender_id="s1",
files=[("sea.xlsx", b"fake")],
store=self.store,
process_now=False,
)
name = dispatch_inbound(
InboundMessage(sender_id="s1", message_id="m2", content="只要整柜"),
RouteDecision(intent="ordinary_text_inquiry"),
)
self.assertEqual(name, "attach_wave_follow_text")