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:
@@ -420,6 +420,12 @@ export const reserve = mutation({
|
||||
nodeId: v.optional(v.id("nodes")),
|
||||
canvasId: v.optional(v.id("canvases")),
|
||||
model: v.optional(v.string()),
|
||||
provider: v.optional(v.union(v.literal("openrouter"), v.literal("freepik"))),
|
||||
videoMeta: v.optional(v.object({
|
||||
model: v.string(),
|
||||
durationSeconds: v.number(),
|
||||
hasAudio: v.boolean(),
|
||||
})),
|
||||
},
|
||||
handler: async (ctx, args) => {
|
||||
const user = await requireAuth(ctx);
|
||||
@@ -502,6 +508,8 @@ export const reserve = mutation({
|
||||
nodeId: args.nodeId,
|
||||
canvasId: args.canvasId,
|
||||
model: args.model,
|
||||
provider: args.provider,
|
||||
videoMeta: args.videoMeta,
|
||||
});
|
||||
|
||||
return transactionId;
|
||||
|
||||
Reference in New Issue
Block a user