fix(chat): preserve local command transcript anchor (#1261)

This commit is contained in:
m57 authored and GitHub committed 2026-09-25 15:50:12 +03:00
1 parent 28ca25d6c5
commit 0e228dec18
1 file changed
+5 -1
@@ -537,7 +537,11 @@ private fun List<ChatMessage>.inTranscriptOrder(
Long.MAX_VALUE
} else {
precedingCanonical?.takeIf { it >= 0L }
?: latestCanonical
?: if (message.role == MessageRole.USER) {
precedingCanonical ?: latestCanonical
} else {
latestCanonical
}
}
if (hasPendingPredecessor) pendingOrderByLocal[message.id] = pendingLocalOrder ?: Long.MAX_VALUE
} else if (message.isHistoricalCache || message.isRestoredUnconfirmed) {