mirror of
https://github.com/langgenius/dify.git
synced 2026-06-07 16:13:59 +08:00
refactor(web): mark workflow run props readonly (#36857)
This commit is contained in:
parent
7d69302e9f
commit
4a6d278354
@ -18,9 +18,9 @@ import { NodeRunningStatus } from '@/app/components/workflow/types'
|
||||
const i18nPrefix = 'singleRun'
|
||||
|
||||
type Props = {
|
||||
list: NodeTracing[][]
|
||||
onBack: () => void
|
||||
iterDurationMap?: IterationDurationMap
|
||||
readonly list: NodeTracing[][]
|
||||
readonly onBack: () => void
|
||||
readonly iterDurationMap?: IterationDurationMap
|
||||
}
|
||||
|
||||
const IterationResultPanel: FC<Props> = ({
|
||||
|
||||
@ -32,10 +32,10 @@ const getLoopRunKey = (loop: NodeTracing[], fallbackIndex: number) => {
|
||||
}
|
||||
|
||||
type Props = {
|
||||
list: NodeTracing[][]
|
||||
onBack: () => void
|
||||
loopDurationMap?: LoopDurationMap
|
||||
loopVariableMap?: LoopVariableMap
|
||||
readonly list: NodeTracing[][]
|
||||
readonly onBack: () => void
|
||||
readonly loopDurationMap?: LoopDurationMap
|
||||
readonly loopVariableMap?: LoopVariableMap
|
||||
}
|
||||
|
||||
const LoopResultPanel: FC<Props> = ({
|
||||
|
||||
@ -16,10 +16,10 @@ import TracingPanel from './tracing-panel'
|
||||
const i18nPrefix = 'singleRun'
|
||||
|
||||
type Props = {
|
||||
list: NodeTracing[][]
|
||||
onHide: () => void
|
||||
onBack: () => void
|
||||
noWrap?: boolean
|
||||
readonly list: NodeTracing[][]
|
||||
readonly onHide: () => void
|
||||
readonly onBack: () => void
|
||||
readonly noWrap?: boolean
|
||||
}
|
||||
|
||||
const LoopResultPanel: FC<Props> = ({
|
||||
|
||||
@ -4,13 +4,13 @@ import { useTranslation } from 'react-i18next'
|
||||
import useTimestamp from '@/hooks/use-timestamp'
|
||||
|
||||
type Props = {
|
||||
status: string
|
||||
executor?: string
|
||||
startTime?: number
|
||||
time?: number
|
||||
tokens?: number
|
||||
steps?: number
|
||||
showSteps?: boolean
|
||||
readonly status: string
|
||||
readonly executor?: string
|
||||
readonly startTime?: number
|
||||
readonly time?: number
|
||||
readonly tokens?: number
|
||||
readonly steps?: number
|
||||
readonly showSteps?: boolean
|
||||
}
|
||||
|
||||
const MetaData: FC<Props> = ({
|
||||
|
||||
@ -34,18 +34,18 @@ import { LoopLogTrigger } from './loop-log'
|
||||
import { RetryLogTrigger } from './retry-log'
|
||||
|
||||
type Props = {
|
||||
className?: string
|
||||
nodeInfo: NodeTracing
|
||||
allExecutions?: NodeTracing[]
|
||||
inMessage?: boolean
|
||||
hideInfo?: boolean
|
||||
hideProcessDetail?: boolean
|
||||
onShowIterationDetail?: (detail: NodeTracing[][], iterDurationMap: IterationDurationMap) => void
|
||||
onShowLoopDetail?: (detail: NodeTracing[][], loopDurationMap: LoopDurationMap, loopVariableMap: LoopVariableMap) => void
|
||||
onShowRetryDetail?: (detail: NodeTracing[]) => void
|
||||
onShowAgentOrToolLog?: (detail?: AgentLogItemWithChildren) => void
|
||||
notShowIterationNav?: boolean
|
||||
notShowLoopNav?: boolean
|
||||
readonly className?: string
|
||||
readonly nodeInfo: NodeTracing
|
||||
readonly allExecutions?: NodeTracing[]
|
||||
readonly inMessage?: boolean
|
||||
readonly hideInfo?: boolean
|
||||
readonly hideProcessDetail?: boolean
|
||||
readonly onShowIterationDetail?: (detail: NodeTracing[][], iterDurationMap: IterationDurationMap) => void
|
||||
readonly onShowLoopDetail?: (detail: NodeTracing[][], loopDurationMap: LoopDurationMap, loopVariableMap: LoopVariableMap) => void
|
||||
readonly onShowRetryDetail?: (detail: NodeTracing[]) => void
|
||||
readonly onShowAgentOrToolLog?: (detail?: AgentLogItemWithChildren) => void
|
||||
readonly notShowIterationNav?: boolean
|
||||
readonly notShowLoopNav?: boolean
|
||||
}
|
||||
|
||||
const NodePanel: FC<Props> = ({
|
||||
|
||||
@ -10,8 +10,8 @@ import { useTranslation } from 'react-i18next'
|
||||
import TracingPanel from '../tracing-panel'
|
||||
|
||||
type Props = {
|
||||
list: NodeTracing[]
|
||||
onBack: () => void
|
||||
readonly list: NodeTracing[]
|
||||
readonly onBack: () => void
|
||||
}
|
||||
|
||||
const RetryResultPanel: FC<Props> = ({
|
||||
|
||||
@ -5,8 +5,8 @@ import useTheme from '@/hooks/use-theme'
|
||||
import { Theme } from '@/types/app'
|
||||
|
||||
type Props = {
|
||||
status: string
|
||||
children?: React.ReactNode
|
||||
readonly status: string
|
||||
readonly children?: React.ReactNode
|
||||
}
|
||||
|
||||
const StatusContainer: FC<Props> = ({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user