Fix auto-scroll bug: add messages and streamingContent as dependencies to useEffect

This commit is contained in:
Dave
2025-12-27 17:04:06 +00:00
parent b3dd5f5670
commit 9a61b03c09

View File

@@ -67,7 +67,7 @@ export function Chat({ projectPath, onCloseProject }: ChatProps) {
messagesEndRef.current?.scrollIntoView({ behavior: "smooth" });
};
useEffect(scrollToBottom, []);
useEffect(scrollToBottom, [messages, streamingContent]);
useEffect(() => {
inputRef.current?.focus();