chore: error still can get vars

pull/21369/head
Joel 12 months ago
parent 963ada5c00
commit 90e755f463

@ -172,12 +172,13 @@ const useOneStepRun = <T>({
} = useInspectVarsCrud() } = useInspectVarsCrud()
const setRunResult = useCallback(async (data: NodeRunResult | null) => { const setRunResult = useCallback(async (data: NodeRunResult | null) => {
doSetRunResult(data) doSetRunResult(data)
// run fail may also update the inspect vars when the node set the error default output.
const vars = await fetchNodeInspectVars(appId!, id)
const { getNodes } = store.getState()
const nodes = getNodes()
appendNodeInspectVars(id, vars, nodes)
if(data?.status === NodeRunningStatus.Succeeded) { if(data?.status === NodeRunningStatus.Succeeded) {
invalidLastRun() invalidLastRun()
const vars = await fetchNodeInspectVars(appId!, id)
const { getNodes } = store.getState()
const nodes = getNodes()
appendNodeInspectVars(id, vars, nodes)
if(isStartNode) if(isStartNode)
invalidateSysVarValues() invalidateSysVarValues()
invalidateConversationVarValues() // loop, iteration, variable assigner node can update the conversation variables, but to simple the logic(some nodes may also can update in the future), all nodes refresh. invalidateConversationVarValues() // loop, iteration, variable assigner node can update the conversation variables, but to simple the logic(some nodes may also can update in the future), all nodes refresh.

Loading…
Cancel
Save