diff --git a/src/components/Shakespeare/ChatPane.tsx b/src/components/Shakespeare/ChatPane.tsx index 913011ad..d6d740f4 100644 --- a/src/components/Shakespeare/ChatPane.tsx +++ b/src/components/Shakespeare/ChatPane.tsx @@ -300,10 +300,12 @@ export const ChatPane = forwardRef(({ setIsModelSelectorOpen(true); }, []); - // Scroll to bottom when AI error occurs + // Scroll to bottom when any error occurs (AI error or console error) useEffect(() => { - scrollToBottom(); - }, [aiError, scrollToBottom]); + if (displayError) { + scrollToBottom(); + } + }, [displayError, scrollToBottom]); // Check for autostart parameter and trigger AI generation useEffect(() => {