feat(canvas): add video-prompt node and enhance video generation support
- Introduced a new node type "video-prompt" for AI video generation, including its integration into the canvas command palette and node template picker. - Updated connection validation to allow connections from text nodes to video-prompt and from video-prompt to ai-video nodes. - Enhanced error handling and messaging for video generation failures, including specific cases for provider issues. - Added tests to validate new video-prompt functionality and connection policies. - Updated localization files to include new labels and prompts for video-prompt and ai-video nodes.
This commit is contained in:
@@ -21,4 +21,60 @@ describe("canvas connection policy", () => {
|
||||
getCanvasConnectionValidationMessage("compare-incoming-limit"),
|
||||
).toBe("Compare-Nodes erlauben genau zwei eingehende Verbindungen.");
|
||||
});
|
||||
|
||||
it("allows text to video-prompt", () => {
|
||||
expect(
|
||||
validateCanvasConnectionPolicy({
|
||||
sourceType: "text",
|
||||
targetType: "video-prompt",
|
||||
targetIncomingCount: 0,
|
||||
}),
|
||||
).toBeNull();
|
||||
});
|
||||
|
||||
it("allows video-prompt to ai-video", () => {
|
||||
expect(
|
||||
validateCanvasConnectionPolicy({
|
||||
sourceType: "video-prompt",
|
||||
targetType: "ai-video",
|
||||
targetIncomingCount: 0,
|
||||
}),
|
||||
).toBeNull();
|
||||
});
|
||||
|
||||
it("blocks direct video-prompt to image prompt flow", () => {
|
||||
expect(
|
||||
validateCanvasConnectionPolicy({
|
||||
sourceType: "video-prompt",
|
||||
targetType: "prompt",
|
||||
targetIncomingCount: 0,
|
||||
}),
|
||||
).toBe("video-prompt-target-invalid");
|
||||
});
|
||||
|
||||
it("blocks ai-video as adjustment source", () => {
|
||||
expect(
|
||||
validateCanvasConnectionPolicy({
|
||||
sourceType: "ai-video",
|
||||
targetType: "curves",
|
||||
targetIncomingCount: 0,
|
||||
}),
|
||||
).toBe("adjustment-source-invalid");
|
||||
});
|
||||
|
||||
it("blocks ai-video as render source", () => {
|
||||
expect(
|
||||
validateCanvasConnectionPolicy({
|
||||
sourceType: "ai-video",
|
||||
targetType: "render",
|
||||
targetIncomingCount: 0,
|
||||
}),
|
||||
).toBe("render-source-invalid");
|
||||
});
|
||||
|
||||
it("describes video-only ai-video input", () => {
|
||||
expect(
|
||||
getCanvasConnectionValidationMessage("ai-video-source-invalid"),
|
||||
).toBe("KI-Video-Ausgabe akzeptiert nur Eingaben von KI-Video.");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user