mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-14 20:54:30 +08:00
Update logic-hooks.ts (#15194)
Empty reply configured in knowledge base chat, no content returned when matched empty content ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) Co-authored-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
@@ -300,6 +300,9 @@ export const useSendMessageWithSse = () => {
|
||||
if (typeof d !== 'boolean') {
|
||||
setAnswer((prev) => {
|
||||
const prevAnswer = prev.answer || '';
|
||||
// Skip final-chunk answer only when prior stream chunks exist (avoids duplicate).
|
||||
// Empty-response and other single-shot answers arrive with final=true only.
|
||||
// const currentAnswer = d.final ? '' : d.answer || '';
|
||||
const currentAnswer =
|
||||
d.final && prevAnswer ? '' : d.answer || '';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user