Browse Source

feat(06-02): connect generateVideo output to workflow pipeline

- Add generateVideo case to getConnectedInputs for downstream nodes
- Update output node execution to detect video content type
- Set video and contentType fields when receiving video content
- Enable Prompt -> GenerateVideo -> Output workflow pipeline
handoff-20260429-1057
shrimbly 6 months ago
parent
commit
5d8c1753fa
  1. 28
      src/store/workflowStore.ts

28
src/store/workflowStore.ts

@ -833,6 +833,10 @@ export const useWorkflowStore = create<WorkflowStore>((set, get) => ({
} else if (sourceNode.type === "nanoBanana") {
const sourceImage = (sourceNode.data as NanoBananaNodeData).outputImage;
if (sourceImage) images.push(sourceImage);
} else if (sourceNode.type === "generateVideo") {
// Video output can be used as input to downstream nodes
const sourceVideo = (sourceNode.data as GenerateVideoNodeData).outputVideo;
if (sourceVideo) images.push(sourceVideo);
}
}
@ -1579,9 +1583,27 @@ export const useWorkflowStore = create<WorkflowStore>((set, get) => ({
case "output": {
const { images } = getConnectedInputs(node.id);
const image = images[0] || null;
if (image) {
updateNodeData(node.id, { image });
const content = images[0] || null;
if (content) {
// Detect if content is video (data URL or URL extension)
const isVideoContent =
content.startsWith("data:video/") ||
content.includes(".mp4") ||
content.includes(".webm");
if (isVideoContent) {
updateNodeData(node.id, {
image: content,
video: content,
contentType: "video"
});
} else {
updateNodeData(node.id, {
image: content,
video: null,
contentType: "image"
});
}
}
break;
}

Loading…
Cancel
Save