From bcc5ef6a5ada5ecb9908603daa2e1dd862db2c26 Mon Sep 17 00:00:00 2001 From: Shrimbly Date: Wed, 10 Dec 2025 21:16:43 +1300 Subject: [PATCH] fix regens --- src/store/workflowStore.ts | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/src/store/workflowStore.ts b/src/store/workflowStore.ts index 3808b629..fe26596c 100644 --- a/src/store/workflowStore.ts +++ b/src/store/workflowStore.ts @@ -781,15 +781,10 @@ export const useWorkflowStore = create((set, get) => ({ if (node.type === "nanoBanana") { const nodeData = node.data as NanoBananaNodeData; - // Use stored inputs if available, otherwise get connected inputs - let images = nodeData.inputImages; - let text = nodeData.inputPrompt; - - if (!images || images.length === 0 || !text) { - const inputs = getConnectedInputs(nodeId); - images = inputs.images; - text = inputs.text; - } + // Always get fresh connected inputs first, fall back to stored inputs only if not connected + const inputs = getConnectedInputs(nodeId); + let images = inputs.images.length > 0 ? inputs.images : nodeData.inputImages; + let text = inputs.text ?? nodeData.inputPrompt; if (!images || images.length === 0 || !text) { updateNodeData(nodeId, { @@ -848,13 +843,9 @@ export const useWorkflowStore = create((set, get) => ({ } else if (node.type === "llmGenerate") { const nodeData = node.data as LLMGenerateNodeData; - // Use stored input if available, otherwise get connected input - let text = nodeData.inputPrompt; - - if (!text) { - const inputs = getConnectedInputs(nodeId); - text = inputs.text; - } + // Always get fresh connected input first, fall back to stored input only if not connected + const inputs = getConnectedInputs(nodeId); + const text = inputs.text ?? nodeData.inputPrompt; if (!text) { updateNodeData(nodeId, {