fix: exclude failed answer when sending messages (#9835)

This commit is contained in:
Hash Brown 2024-10-25 14:06:33 +08:00 committed by GitHub
parent 18106a4fc6
commit 59a32aaae6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -24,7 +24,7 @@ function getProcessedInputsFromUrlParams(): Record<string, any> {
function getLastAnswer(chatList: ChatItem[]) {
for (let i = chatList.length - 1; i >= 0; i--) {
const item = chatList[i]
if (item.isAnswer && !item.isOpeningStatement)
if (item.isAnswer && !item.id.startsWith('answer-placeholder-') && !item.isOpeningStatement)
return item
}
return null