mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-11 03:46:52 +08:00
fix: close child modal on log drawer close (#10839)
This commit is contained in:
@@ -676,6 +676,10 @@ const ConversationList: FC<IConversationList> = ({ logs, appDetail, onRefresh })
|
|||||||
const [showDrawer, setShowDrawer] = useState<boolean>(false) // Whether to display the chat details drawer
|
const [showDrawer, setShowDrawer] = useState<boolean>(false) // Whether to display the chat details drawer
|
||||||
const [currentConversation, setCurrentConversation] = useState<ChatConversationGeneralDetail | CompletionConversationGeneralDetail | undefined>() // Currently selected conversation
|
const [currentConversation, setCurrentConversation] = useState<ChatConversationGeneralDetail | CompletionConversationGeneralDetail | undefined>() // Currently selected conversation
|
||||||
const isChatMode = appDetail.mode !== 'completion' // Whether the app is a chat app
|
const isChatMode = appDetail.mode !== 'completion' // Whether the app is a chat app
|
||||||
|
const { setShowPromptLogModal, setShowAgentLogModal } = useAppStore(useShallow(state => ({
|
||||||
|
setShowPromptLogModal: state.setShowPromptLogModal,
|
||||||
|
setShowAgentLogModal: state.setShowAgentLogModal,
|
||||||
|
})))
|
||||||
|
|
||||||
// Annotated data needs to be highlighted
|
// Annotated data needs to be highlighted
|
||||||
const renderTdValue = (value: string | number | null, isEmptyStyle: boolean, isHighlight = false, annotation?: LogAnnotation) => {
|
const renderTdValue = (value: string | number | null, isEmptyStyle: boolean, isHighlight = false, annotation?: LogAnnotation) => {
|
||||||
@@ -699,6 +703,8 @@ const ConversationList: FC<IConversationList> = ({ logs, appDetail, onRefresh })
|
|||||||
onRefresh()
|
onRefresh()
|
||||||
setShowDrawer(false)
|
setShowDrawer(false)
|
||||||
setCurrentConversation(undefined)
|
setCurrentConversation(undefined)
|
||||||
|
setShowPromptLogModal(false)
|
||||||
|
setShowAgentLogModal(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!logs)
|
if (!logs)
|
||||||
|
|||||||
Reference in New Issue
Block a user