From bb15eb016e388baa55c92fb1d4b8ffdafe0f4353 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Sun, 9 Jun 2024 01:22:21 -0700 Subject: [PATCH] fix: message input delay --- src/lib/components/chat/Chat.svelte | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/lib/components/chat/Chat.svelte b/src/lib/components/chat/Chat.svelte index 91e46f4ad..939e4fc24 100644 --- a/src/lib/components/chat/Chat.svelte +++ b/src/lib/components/chat/Chat.svelte @@ -294,10 +294,14 @@ }; ////////////////////////// - // Ollama functions + // Chat functions ////////////////////////// const submitPrompt = async (userPrompt, _user = null) => { + // Reset chat input textarea + prompt = ''; + document.getElementById('chat-textarea').style.height = ''; + let _responses = []; console.log('submitPrompt', $chatId); @@ -374,9 +378,6 @@ await tick(); } - // Reset chat input textarea - prompt = ''; - document.getElementById('chat-textarea').style.height = ''; files = []; // Send prompt