diff --git a/src/routes/(app)/+page.svelte b/src/routes/(app)/+page.svelte index 2343a4395..556115eaf 100644 --- a/src/routes/(app)/+page.svelte +++ b/src/routes/(app)/+page.svelte @@ -518,6 +518,10 @@ const sendPromptOpenAI = async (model, userPrompt, responseMessageId, _chatId) => { const responseMessage = history.messages[responseMessageId]; + + // Wait until history/message have been updated + await tick(); + scrollToBottom(); const docs = messages diff --git a/src/routes/(app)/c/[id]/+page.svelte b/src/routes/(app)/c/[id]/+page.svelte index 987338a3d..17af852e6 100644 --- a/src/routes/(app)/c/[id]/+page.svelte +++ b/src/routes/(app)/c/[id]/+page.svelte @@ -533,6 +533,10 @@ const sendPromptOpenAI = async (model, userPrompt, responseMessageId, _chatId) => { const responseMessage = history.messages[responseMessageId]; + + // Wait until history/message have been updated + await tick(); + scrollToBottom(); const docs = messages