mirror of
https://github.com/langgenius/dify.git
synced 2026-05-06 01:26:33 +08:00
fix: click log panel of log page cause whole page crash (#28218)
This commit is contained in:
parent
e0c05b2123
commit
4a89403566
@ -42,6 +42,7 @@ import { getProcessedFilesFromResponse } from '@/app/components/base/file-upload
|
|||||||
import cn from '@/utils/classnames'
|
import cn from '@/utils/classnames'
|
||||||
import { noop } from 'lodash-es'
|
import { noop } from 'lodash-es'
|
||||||
import PromptLogModal from '../../base/prompt-log-modal'
|
import PromptLogModal from '../../base/prompt-log-modal'
|
||||||
|
import { WorkflowContextProvider } from '@/app/components/workflow/context'
|
||||||
|
|
||||||
type AppStoreState = ReturnType<typeof useAppStore.getState>
|
type AppStoreState = ReturnType<typeof useAppStore.getState>
|
||||||
type ConversationListItem = ChatConversationGeneralDetail | CompletionConversationGeneralDetail
|
type ConversationListItem = ChatConversationGeneralDetail | CompletionConversationGeneralDetail
|
||||||
@ -779,15 +780,17 @@ function DetailPanel({ detail, onFeedback }: IDetailPanel) {
|
|||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
{showMessageLogModal && (
|
{showMessageLogModal && (
|
||||||
<MessageLogModal
|
<WorkflowContextProvider>
|
||||||
width={width}
|
<MessageLogModal
|
||||||
currentLogItem={currentLogItem}
|
width={width}
|
||||||
onCancel={() => {
|
currentLogItem={currentLogItem}
|
||||||
setCurrentLogItem()
|
onCancel={() => {
|
||||||
setShowMessageLogModal(false)
|
setCurrentLogItem()
|
||||||
}}
|
setShowMessageLogModal(false)
|
||||||
defaultTab={currentLogModalActiveTab}
|
}}
|
||||||
/>
|
defaultTab={currentLogModalActiveTab}
|
||||||
|
/>
|
||||||
|
</WorkflowContextProvider>
|
||||||
)}
|
)}
|
||||||
{!isChatMode && showPromptLogModal && (
|
{!isChatMode && showPromptLogModal && (
|
||||||
<PromptLogModal
|
<PromptLogModal
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import { useStore } from '@/app/components/app/store'
|
|||||||
import type { WorkflowRunDetailResponse } from '@/models/log'
|
import type { WorkflowRunDetailResponse } from '@/models/log'
|
||||||
import type { NodeTracing, NodeTracingListResponse } from '@/types/workflow'
|
import type { NodeTracing, NodeTracingListResponse } from '@/types/workflow'
|
||||||
import { BlockEnum } from '@/app/components/workflow/types'
|
import { BlockEnum } from '@/app/components/workflow/types'
|
||||||
|
import { WorkflowContextProvider } from '@/app/components/workflow/context'
|
||||||
|
|
||||||
const SAMPLE_APP_DETAIL = {
|
const SAMPLE_APP_DETAIL = {
|
||||||
id: 'app-demo-1',
|
id: 'app-demo-1',
|
||||||
@ -143,10 +144,12 @@ const MessageLogPreview = (props: MessageLogModalProps) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="relative min-h-[640px] w-full bg-background-default-subtle p-6">
|
<div className="relative min-h-[640px] w-full bg-background-default-subtle p-6">
|
||||||
<MessageLogModal
|
<WorkflowContextProvider>
|
||||||
{...props}
|
<MessageLogModal
|
||||||
currentLogItem={mockCurrentLogItem}
|
{...props}
|
||||||
/>
|
currentLogItem={mockCurrentLogItem}
|
||||||
|
/>
|
||||||
|
</WorkflowContextProvider>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user