From 8b438c8c1b0ea3356adb8e1e30c266ceb3ff1e76 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Mon, 29 Sep 2025 22:19:18 -0500 Subject: [PATCH] Scroll down when Quilly appears --- src/components/Shakespeare/ChatPane.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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(() => {