diff --git a/web/app/components/app/configuration/debug/debug-with-multiple-model/chat-item.tsx b/web/app/components/app/configuration/debug/debug-with-multiple-model/chat-item.tsx index 04b56718a5..e79cdf4793 100644 --- a/web/app/components/app/configuration/debug/debug-with-multiple-model/chat-item.tsx +++ b/web/app/components/app/configuration/debug/debug-with-multiple-model/chat-item.tsx @@ -128,6 +128,7 @@ const ChatItem: FC = ({ showPromptLog questionIcon={} allToolIcons={allToolIcons} + hideLogModal /> ) } diff --git a/web/app/components/app/configuration/debug/index.tsx b/web/app/components/app/configuration/debug/index.tsx index dd89cf5368..ff476246fe 100644 --- a/web/app/components/app/configuration/debug/index.tsx +++ b/web/app/components/app/configuration/debug/index.tsx @@ -39,6 +39,7 @@ import { ModelFeatureEnum, ModelTypeEnum } from '@/app/components/header/account import type { ModelParameterModalProps } from '@/app/components/header/account-setting/model-provider-page/model-parameter-modal' import { useEventEmitterContextContext } from '@/context/event-emitter' import { useProviderContext } from '@/context/provider-context' +import AgentLogModal from '@/app/components/base/agent-log-modal' import PromptLogModal from '@/app/components/base/prompt-log-modal' import { useStore as useAppStore } from '@/app/components/app/store' @@ -370,11 +371,13 @@ const Debug: FC = ({ handleVisionConfigInMultipleModel() }, [multipleModelConfigs, mode]) - const { currentLogItem, setCurrentLogItem, showPromptLogModal, setShowPromptLogModal } = useAppStore(useShallow(state => ({ + const { currentLogItem, setCurrentLogItem, showPromptLogModal, setShowPromptLogModal, showAgentLogModal, setShowAgentLogModal } = useAppStore(useShallow(state => ({ currentLogItem: state.currentLogItem, setCurrentLogItem: state.setCurrentLogItem, showPromptLogModal: state.showPromptLogModal, setShowPromptLogModal: state.setShowPromptLogModal, + showAgentLogModal: state.showAgentLogModal, + setShowAgentLogModal: state.setShowAgentLogModal, }))) const [width, setWidth] = useState(0) const ref = useRef(null) @@ -434,13 +437,33 @@ const Debug: FC = ({ { debugWithMultipleModel && ( -
+
+ {showPromptLogModal && ( + { + setCurrentLogItem() + setShowPromptLogModal(false) + }} + /> + )} + {showAgentLogModal && ( + { + setCurrentLogItem() + setShowAgentLogModal(false) + }} + /> + )}
) } @@ -474,6 +497,7 @@ const Debug: FC = ({ supportAnnotation appId={appId} varList={varList} + siteInfo={null} /> )}
diff --git a/web/app/components/base/chat/chat/index.tsx b/web/app/components/base/chat/chat/index.tsx index 208d752253..c87e0a48f1 100644 --- a/web/app/components/base/chat/chat/index.tsx +++ b/web/app/components/base/chat/chat/index.tsx @@ -57,6 +57,7 @@ export type ChatProps = { onFeedback?: (messageId: string, feedback: Feedback) => void chatAnswerContainerInner?: string hideProcessDetail?: boolean + hideLogModal?: boolean } const Chat: FC = ({ appData, @@ -83,6 +84,7 @@ const Chat: FC = ({ onFeedback, chatAnswerContainerInner, hideProcessDetail, + hideLogModal, }) => { const { t } = useTranslation() const { currentLogItem, setCurrentLogItem, showPromptLogModal, setShowPromptLogModal, showAgentLogModal, setShowAgentLogModal } = useAppStore(useShallow(state => ({ @@ -265,7 +267,7 @@ const Chat: FC = ({ } - {showPromptLogModal && ( + {showPromptLogModal && !hideLogModal && ( = ({ }} /> )} - {showAgentLogModal && ( + {showAgentLogModal && !hideLogModal && ( = ({ return (