diff --git a/wwwroot/js/history.js b/wwwroot/js/history.js index b8eae66..9bd6a74 100644 --- a/wwwroot/js/history.js +++ b/wwwroot/js/history.js @@ -165,6 +165,7 @@ function _mergeConsecutiveAssistantTexts(msgs) { && !_isReviewMessage(msg.content) && !_isReviewMessage(prev.content)) { prev.content = (prev.content || '') + ' ' + (msg.content || ''); if (msg.id) prev.id = msg.id; + if (msg.sortKey && (!prev.sortKey || msg.sortKey > prev.sortKey)) prev.sortKey = msg.sortKey; if (msg.createdAt) prev.createdAt = msg.createdAt; if (msg.isMarked) prev.isMarked = true; continue;