From 29d2c936d1aee1196e7a0fd08458f8b0d173c544 Mon Sep 17 00:00:00 2001 From: Jared Van Bortel Date: Mon, 29 Jan 2024 13:57:42 -0500 Subject: [PATCH] chat: don't show "retrieving localdocs" for zero collections (#1874) Signed-off-by: Jared Van Bortel --- gpt4all-chat/chat.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gpt4all-chat/chat.cpp b/gpt4all-chat/chat.cpp index 0d9b7bc4f009..0e66c5c20bfd 100644 --- a/gpt4all-chat/chat.cpp +++ b/gpt4all-chat/chat.cpp @@ -112,7 +112,7 @@ void Chat::resetResponseState() m_tokenSpeed = QString(); emit tokenSpeedChanged(); m_responseInProgress = true; - m_responseState = Chat::LocalDocsRetrieval; + m_responseState = m_collections.empty() ? Chat::PromptProcessing : Chat::LocalDocsRetrieval; emit responseInProgressChanged(); emit responseStateChanged(); } @@ -120,7 +120,7 @@ void Chat::resetResponseState() void Chat::prompt(const QString &prompt) { resetResponseState(); - emit promptRequested( m_collections, prompt); + emit promptRequested(m_collections, prompt); } void Chat::regenerateResponse()