fix: prevent crash when regenerating message with missing parent (#20264)

This commit is contained in:
G30
2025-12-30 11:05:55 -05:00
committed by GitHub
parent fe84afd09a
commit b997d00947

View File

@@ -2141,6 +2141,11 @@
if (history.currentId) {
let userMessage = history.messages[message.parentId];
if (!userMessage) {
toast.error($i18n.t('Parent message not found'));
return;
}
if (autoScroll) {
scrollToBottom();
}