add icon for tool node

This commit is contained in:
JzoNg
2024-03-28 21:37:06 +08:00
parent 85285931e2
commit 05bb65bd94
8 changed files with 98 additions and 7 deletions

View File

@ -271,8 +271,14 @@ export const useWorkflowRun = () => {
setWorkflowRunningData(produce(workflowRunningData!, (draft) => {
const currentIndex = draft.tracing!.findIndex(trace => trace.node_id === data.node_id)
if (currentIndex > -1 && draft.tracing)
draft.tracing[currentIndex] = data as any
if (currentIndex > -1 && draft.tracing) {
draft.tracing[currentIndex] = {
...(draft.tracing[currentIndex].extras
? { extras: draft.tracing[currentIndex].extras }
: {}),
...data,
} as any
}
}))
const newNodes = produce(nodes, (draft) => {