fix(ui): restore nodes output tracking

This commit is contained in:
psychedelicious 2024-07-16 17:14:54 +10:00
parent 384a90958a
commit 9bbf430125

View File

@ -28,6 +28,19 @@ export const addInvocationCompleteEventListener = (startAppListening: AppStartLi
);
const { result, invocation_source_id } = data;
if (data.origin === 'workflows') {
const nes = deepClone($nodeExecutionStates.get()[invocation_source_id]);
if (nes) {
nes.status = zNodeStatus.enum.COMPLETED;
if (nes.progress !== null) {
nes.progress = 1;
}
nes.outputs.push(result);
upsertExecutionState(nes.nodeId, nes);
}
}
// This complete event has an associated image output
if (data.result.type === 'image_output' && !nodeTypeDenylist.includes(data.invocation.type)) {
const { image_name } = data.result.image;
@ -50,16 +63,6 @@ export const addInvocationCompleteEventListener = (startAppListening: AppStartLi
} else if (!canvasV2.session.isActive) {
$lastProgressEvent.set(null);
}
} else if (data.origin === 'workflows') {
const nes = deepClone($nodeExecutionStates.get()[invocation_source_id]);
if (nes) {
nes.status = zNodeStatus.enum.COMPLETED;
if (nes.progress !== null) {
nes.progress = 1;
}
nes.outputs.push(result);
upsertExecutionState(nes.nodeId, nes);
}
}
if (!imageDTO.is_intermediate) {