diff --git a/src/lib/components/chat/Chat.svelte b/src/lib/components/chat/Chat.svelte index c5221d6f6..a423b1694 100644 --- a/src/lib/components/chat/Chat.svelte +++ b/src/lib/components/chat/Chat.svelte @@ -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(); }