mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-23 15:38:55 +01:00
Do not erase partial message when generation stopped via button on web app
Previously, we'd replace the generated message with an error message when message generation stopped via stop button on chat page of web app. So the partially generated message (which could be useful) gets lost. This change just stops generation, while keeping the generated response so any useful information from the partially generated message can be retrieved.
This commit is contained in:
parent
285006d6c9
commit
48567fd468
1 changed files with 0 additions and 1 deletions
|
@ -303,7 +303,6 @@ export default function Chat() {
|
|||
const currentMessage = messages.find((message) => !message.completed);
|
||||
if (!currentMessage) return;
|
||||
|
||||
currentMessage.rawResponse = `I've stopped processing this message. If you'd like to continue, please send another message.`;
|
||||
currentMessage.completed = true;
|
||||
setMessages([...messages]);
|
||||
setQueryToProcess("");
|
||||
|
|
Loading…
Reference in a new issue