mirror of
https://gitee.com/dify_ai/dify.git
synced 2024-12-04 20:28:12 +08:00
fix(log list): prevent duplicate data fetch (#9190)
This commit is contained in:
parent
05c1ef75c4
commit
a34891851b
@ -299,10 +299,14 @@ function DetailPanel<T extends ChatConversationFullDetailResponse | CompletionCo
|
||||
}))
|
||||
}, [items])
|
||||
|
||||
const fetchInitiated = useRef(false)
|
||||
|
||||
useEffect(() => {
|
||||
if (appDetail?.id && detail.id && appDetail?.mode !== 'completion')
|
||||
if (appDetail?.id && detail.id && appDetail?.mode !== 'completion' && !fetchInitiated.current) {
|
||||
fetchInitiated.current = true
|
||||
fetchData()
|
||||
}, [appDetail?.id, detail.id, appDetail?.mode])
|
||||
}
|
||||
}, [appDetail?.id, detail.id, appDetail?.mode, fetchData])
|
||||
|
||||
const isChatMode = appDetail?.mode !== 'completion'
|
||||
const isAdvanced = appDetail?.mode === 'advanced-chat'
|
||||
|
Loading…
Reference in New Issue
Block a user