From 72613846551e402dd650265163bd359606dc1c68 Mon Sep 17 00:00:00 2001 From: kimjion <45935338+kimjion@users.noreply.github.com> Date: Tue, 19 Nov 2024 12:09:55 +0800 Subject: [PATCH] fix: close child modal on log drawer close (#10839) --- web/app/components/app/log/list.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/web/app/components/app/log/list.tsx b/web/app/components/app/log/list.tsx index 4c12cab581..9a8cca4378 100644 --- a/web/app/components/app/log/list.tsx +++ b/web/app/components/app/log/list.tsx @@ -676,6 +676,10 @@ const ConversationList: FC = ({ logs, appDetail, onRefresh }) const [showDrawer, setShowDrawer] = useState(false) // Whether to display the chat details drawer const [currentConversation, setCurrentConversation] = useState() // Currently selected conversation 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 const renderTdValue = (value: string | number | null, isEmptyStyle: boolean, isHighlight = false, annotation?: LogAnnotation) => { @@ -699,6 +703,8 @@ const ConversationList: FC = ({ logs, appDetail, onRefresh }) onRefresh() setShowDrawer(false) setCurrentConversation(undefined) + setShowPromptLogModal(false) + setShowAgentLogModal(false) } if (!logs)