fix(chat): reject stale dispatch after session switch

This commit is contained in:
M57 committed 2026-09-16 10:48:08 +03:00
1 parent 22b948f671
commit f94d1784d4
2 files changed
+4 -8

No files matched your search

@@ -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