mirror of
https://github.com/langgenius/dify.git
synced 2026-01-08 07:14:14 +00:00
add running state for step run
This commit is contained in:
@@ -10,6 +10,7 @@ import { StopCircle } from '@/app/components/base/icons/src/vender/solid/mediaAn
|
||||
import { Loading02, XClose } from '@/app/components/base/icons/src/vender/line/general'
|
||||
import Split from '@/app/components/workflow/nodes/_base/components/split'
|
||||
import { NodeRunningStatus } from '@/app/components/workflow/types'
|
||||
import ResultPanel from '@/app/components/workflow/run/result-panel'
|
||||
|
||||
const i18nPrefix = 'workflow.singleRun'
|
||||
|
||||
@@ -77,7 +78,9 @@ const BeforeRunForm: FC<BeforeRunFormProps> = ({
|
||||
<div>{t(`${i18nPrefix}.${isRunning ? 'running' : 'startRun'}`)}</div>
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
{isRunning && (
|
||||
<ResultPanel status='running' showSteps={false} />
|
||||
)}
|
||||
{isFinished && (
|
||||
<>
|
||||
{result}
|
||||
|
||||
@@ -14,9 +14,9 @@ type ResultPanelProps = {
|
||||
elapsed_time?: number
|
||||
total_tokens?: number
|
||||
created_at?: number
|
||||
created_by: string
|
||||
created_by?: string
|
||||
finished_at?: number
|
||||
steps: number
|
||||
steps?: number
|
||||
showSteps?: boolean
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ const ResultPanel: FC<ResultPanelProps> = ({
|
||||
onChange={() => {}}
|
||||
/>
|
||||
)}
|
||||
{outputs && (
|
||||
{(outputs || status === 'running') && (
|
||||
<CodeEditor
|
||||
readOnly
|
||||
title={<div>OUTPUT</div>}
|
||||
|
||||
Reference in New Issue
Block a user