🚑️ Check if state has currentBlockId defined before autocontinuing

This commit is contained in:
Baptiste Arnaud 2024-12-11 22:15:45 +01:00
parent 5a770d30f2
commit 4d7423ed3a
No known key found for this signature in database

View File

@ -69,12 +69,14 @@ export const continueChat = async ({
lastMessageNewFormat,
visitedEdges,
setVariableHistory,
} = await autoContinueChatIfStartingWithInput({
message,
chatReply,
textBubbleContentFormat,
version: 2,
});
} = !session.state.currentBlockId
? await autoContinueChatIfStartingWithInput({
message,
chatReply,
textBubbleContentFormat,
version: 2,
})
: chatReply;
if (newSessionState)
await saveStateToDatabase({