refac: styling
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user