修复附件询价:公网打开上传页不再出骨架 JSON,未上传时打字能正常回话。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -79,6 +79,21 @@ def is_active_attachment_wait(sender_id: str, *, now: Optional[float] = None) ->
|
||||
return get_attach_wave_book().active(sender_id, now=now) is not None
|
||||
|
||||
|
||||
def is_idle_attachment_wait(sender_id: str, *, now: Optional[float] = None) -> bool:
|
||||
"""已发卡但还没传 Excel/PDF/图。此时销售打字应走文字询价。"""
|
||||
wave = get_attach_wave_book().active(sender_id, now=now)
|
||||
return wave is not None and not wave.started
|
||||
|
||||
|
||||
def abandon_idle_attach_wait(sender_id: str) -> bool:
|
||||
"""
|
||||
作废未开始认的等待票。已开始认返回 False。
|
||||
|
||||
副作用:旧上传卡随后按过期拒绝。
|
||||
"""
|
||||
return get_attach_wave_book().abandon_if_idle(sender_id)
|
||||
|
||||
|
||||
def append_attach_text(sender_id: str, text: str) -> bool:
|
||||
"""认完之前的字并进本票,不走文字询价。"""
|
||||
return get_attach_wave_book().append_follow_text(sender_id, text)
|
||||
|
||||
Reference in New Issue
Block a user