mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-03 22:59:49 +08:00
A submission that never reached the server looked like an ordinary sent message, its connection error rendered as if it were an assistant reply, and both vanished after a reload because nothing was persisted. - Mark the optimistic user row "Not sent" when the transport never connected; drop the empty assistant placeholder so the failure cannot read as an errored reply. The connection error now surfaces in a banner next to the composer with a Resend action. - Persist the last unproven submission of each session locally and restore it after a reload as an unsent, retryable row. The record is cleared by any evidence the server took the turn over (done, terminal error, cancel), or when the server transcript already holds the text. - Server-accepted-but-disconnected turns keep the existing reconcile- before-resend path; drafts can now retry without a server session.