修复附件询价:公网打开上传页不再出骨架 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
+17 -4
View File
@@ -262,16 +262,29 @@ def dispatch_inbound(message: InboundMessage, decision: RouteDecision) -> str:
handle_image_inquiry(message)
return "image_inquiry"
if kind in {"text", ""}:
from agent.handlers.attachment_inquiry import append_attach_text, is_active_attachment_wait
from agent.handlers.attachment_inquiry import (
abandon_idle_attach_wait,
append_attach_text,
is_active_attachment_wait,
is_idle_attachment_wait,
)
from agent.handlers.image_inquiry import append_wave_text, is_active_image_wave
if is_active_attachment_wait(message.sender_id) and (message.content or "").strip():
if decision.intent == "attachment_inquiry":
handle_attachment_inquiry(message)
return "attachment_inquiry"
append_attach_text(message.sender_id, message.content or "")
logger.info("dispatch 附件波次收字 sender=%s", message.sender_id)
return "attach_wave_follow_text"
if is_idle_attachment_wait(message.sender_id):
abandon_idle_attach_wait(message.sender_id)
logger.info(
"dispatch 附件未传材料,改走文字 sender=%s intent=%s",
message.sender_id,
decision.intent,
)
else:
append_attach_text(message.sender_id, message.content or "")
logger.info("dispatch 附件波次收字 sender=%s", message.sender_id)
return "attach_wave_follow_text"
if is_active_image_wave(message.sender_id) and (message.content or "").strip():
append_wave_text(message.sender_id, message.content or "")
logger.info("dispatch 图片波次收字 sender=%s", message.sender_id)