Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

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

Hash Brown59a32aaae69a
diff --git a/web/app/components/base/chat/utils.ts b/web/app/components/base/chat/utils.ts
index 9205225f9ff..16357361cfd 100644
--- a/web/app/components/base/chat/utils.ts
+++ b/web/app/components/base/chat/utils.ts
@@ -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