refac: regenerate behaviour

This commit is contained in:
Timothy J. Baek
2024-05-19 05:53:43 -07:00
parent b9b25f872d
commit 120f8d7786
3 changed files with 16 additions and 3 deletions

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;