fix(chat): reject stale dispatch after session switch

This commit is contained in:
M57
2026-09-16 10:48:08 +03:00
parent 22b948f671
commit f94d1784d4
2 changed files with 4 additions and 8 deletions
@@ -1807,6 +1807,8 @@ class ChatViewModel(
if (text.isNotBlank()) "\n\n$text" else ""
}
if (dispatchGeneration != sessionGeneration) return@launch
// While a turn is actively streaming and this is a plain text prompt
// (no attachments — session.redirect carries text only), steer the
// in-flight turn via session.redirect instead of queueing a fresh