From ea80285e9c4d8aa7ae25d2cd2466b43f5a1990da Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Fri, 7 Jun 2024 00:37:54 -0700 Subject: [PATCH] fix: disable empty string --- .../chat/MessageInput/CallOverlay.svelte | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/lib/components/chat/MessageInput/CallOverlay.svelte b/src/lib/components/chat/MessageInput/CallOverlay.svelte index 6e15bf2c8..1b204db3e 100644 --- a/src/lib/components/chat/MessageInput/CallOverlay.svelte +++ b/src/lib/components/chat/MessageInput/CallOverlay.svelte @@ -199,13 +199,15 @@ if (res) { console.log(res.text); - const _responses = await submitPrompt(res.text); - console.log(_responses); + if (res.text !== '') { + const _responses = await submitPrompt(res.text); + console.log(_responses); - if (_responses.at(0)) { - const content = _responses[0]; - if (content) { - assistantSpeakingHandler(content); + if (_responses.at(0)) { + const content = _responses[0]; + if (content) { + assistantSpeakingHandler(content); + } } } }