Scroll to bottom after messages render

This commit is contained in:
Webifi 2023-06-16 10:42:23 -05:00
parent ca0627306f
commit a84a7b269e
1 changed files with 6 additions and 7 deletions

View File

@ -33,9 +33,7 @@
faMicrophone,
faLightbulb,
faCommentSlash,
faCircleCheck
} from '@fortawesome/free-solid-svg-icons/index'
import { v4 as uuidv4 } from 'uuid'
import { getPrice } from './Stats.svelte'
@ -50,11 +48,6 @@
const chatId: number = parseInt(params.chatId)
let chatRequest = new ChatRequest()
// let controller:AbortController
// let updating: boolean|number = false
// let updatingMessage: string = ''
let input: HTMLTextAreaElement
let recognition: any = null
let recording = false
@ -98,6 +91,12 @@
$: onStateChange($checkStateChange, $showSetChatSettings, $submitExitingPromptsNow, $continueMessage)
const afterChatLoad = (...args:any) => {
scrollToBottom()
}
$: afterChatLoad($currentChatId)
setCurrentChat(0)
// Make sure chat object is ready to go
updateChatSettings(chatId)