diff --git a/src/components/chat/chat-widget.tsx b/src/components/chat/chat-widget.tsx index 0363098..ef1d89a 100644 --- a/src/components/chat/chat-widget.tsx +++ b/src/components/chat/chat-widget.tsx @@ -567,6 +567,10 @@ export function ChatWidget() { }) setAttachments([]) inputRef.current?.focus() + // Scroll para o final após enviar (com pequeno delay para garantir que a mensagem foi renderizada) + setTimeout(() => { + messagesEndRef.current?.scrollIntoView({ behavior: "smooth" }) + }, 100) } catch (error) { console.error(error) toast.error("Não foi possível enviar a mensagem.")