refac: regenerate behaviour

This commit is contained in:
Timothy J. Baek committed 2024-05-19 05:53:43 -07:00
1 parent b9b25f872d
commit 120f8d7786
3 files changed
+16 -3

No files matched your search

+6 -1
View File
@@ -355,7 +355,12 @@
copyToClipboard={copyToClipboardWithToast}
{continueGeneration}
{regenerateResponse}
on:change={() => {
on:change={async () => {
await updateChatById(localStorage.token, chatId, {
messages: messages,
history: history
});
const element = document.getElementById('messages-container');
autoScroll =
element.scrollHeight - element.scrollTop <= element.clientHeight + 50;