新增: Conditions 启用 + 工作流 DAG 展示 + 决策记录
- 开启 conditions-eval feature flag(df-workflow 默认启用) - 新增 WorkflowDagDisplay.vue 展示工作流节点/边/条件 - TaskDetail 工作流推进后自动获取并显示 DAG 结构 - 记录 2026-06-27 讨论决策到待决策.md - 记录 Inbox 设计想法到 todo.md
This commit is contained in:
@@ -168,6 +168,7 @@ import {
|
||||
} from '../constants/project'
|
||||
import type { TaskRecord, ProjectRecord, IdeaRecord, DfDataChangedPayload, WorkflowEventPayload } from '@/api/types'
|
||||
import TaskOutputCard from '@/components/task/TaskOutputCard.vue'
|
||||
import WorkflowDagDisplay from '@/components/workflow/WorkflowDagDisplay.vue'
|
||||
|
||||
const { t } = useI18n()
|
||||
const route = useRoute()
|
||||
@@ -198,6 +199,15 @@ let _wfResultTimer: ReturnType<typeof setTimeout> | null = null
|
||||
const wfProgressHint = computed(() => wfResult.value !== null)
|
||||
const wfCompletedHint = computed(() => wfResult.value === 'completed')
|
||||
const wfFailedHint = computed(() => wfResult.value === 'failed')
|
||||
|
||||
// 工作流 DAG 结构展示
|
||||
const wfDagJson = ref('')
|
||||
async function refreshWorkflowDag(execId: string) {
|
||||
try {
|
||||
const record = await workflowApi.getExecution(execId)
|
||||
if (record?.dag_json) wfDagJson.value = record.dag_json
|
||||
} catch { /* 静默 */ }
|
||||
}
|
||||
const wfDoneTotal = computed(() => wfTotalNodes.value)
|
||||
|
||||
const taskId = computed(() => route.params.id as string)
|
||||
@@ -337,6 +347,7 @@ async function handleWorkflowAdvance(target: string) {
|
||||
)
|
||||
wfExecId.value = execId
|
||||
errorMsg.value = ''
|
||||
await refreshWorkflowDag(execId)
|
||||
} catch (e: any) {
|
||||
wfAdvancing.value = false
|
||||
wfExecId.value = null
|
||||
|
||||
Reference in New Issue
Block a user