diff --git a/src/components/ConversationCard/index.jsx b/src/components/ConversationCard/index.jsx index ad24ac0..d77d85a 100644 --- a/src/components/ConversationCard/index.jsx +++ b/src/components/ConversationCard/index.jsx @@ -211,6 +211,15 @@ function ConversationCard(props) { updateAnswer(`

${t('Waiting for response...')}

`, false, 'answer') setIsReady(false) + if (session.conversationRecords.length > 0) { + const lastRecord = session.conversationRecords[session.conversationRecords.length - 1] + if ( + conversationItemData[conversationItemData.length - 1].done && + lastRecord.question === conversationItemData[conversationItemData.length - 2].content + ) { + session.conversationRecords.pop() + } + } const newSession = { ...session, isRetry: true } setSession(newSession) try {