refac: styling

This commit is contained in:
Timothy Jaeryang Baek
2025-06-03 21:51:12 +04:00
parent 0a1ff4a8fa
commit abae0a837f
3 changed files with 31 additions and 7 deletions
+6 -3
View File
@@ -304,7 +304,7 @@
message.followUps = data.follow_ups;
if (autoScroll) {
scrollToBottom();
scrollToBottom('smooth');
}
} else if (type === 'chat:title') {
chatTitle.set(data);
@@ -919,10 +919,13 @@
}
};
const scrollToBottom = async () => {
const scrollToBottom = async (behavior = 'auto') => {
await tick();
if (messagesContainerElement) {
messagesContainerElement.scrollTop = messagesContainerElement.scrollHeight;
messagesContainerElement.scrollTo({
top: messagesContainerElement.scrollHeight,
behavior
});
}
};
const chatCompletedHandler = async (chatId, modelId, responseMessageId, messages) => {