Skip to content

Commit

Permalink
fix: workflow run edge status (langgenius#3236)
Browse files Browse the repository at this point in the history
  • Loading branch information
zxhlyh authored and dengpeng committed Jun 16, 2024
1 parent dd4a2d7 commit 8208338
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions web/app/components/workflow/hooks/use-workflow-run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ export const useWorkflowRun = () => {
const {
getNodes,
setNodes,
edges,
setEdges,
} = store.getState()
setWorkflowRunningData(produce(workflowRunningData!, (draft) => {
draft.task_id = task_id
Expand All @@ -192,6 +194,15 @@ export const useWorkflowRun = () => {
})
})
setNodes(newNodes)
const newEdges = produce(edges, (draft) => {
draft.forEach((edge) => {
edge.data = {
...edge.data,
_runned: false,
}
})
})
setEdges(newEdges)

if (onWorkflowStarted)
onWorkflowStarted(params)
Expand Down

0 comments on commit 8208338

Please sign in to comment.