Files
lemonspace_app/lib/video-poll-logging.ts
Matthias Meister ed08b976f9 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.
2026-04-07 08:50:59 +02:00

13 lines
377 B
TypeScript

export type VideoPollStatus = "CREATED" | "IN_PROGRESS" | "COMPLETED" | "FAILED";
export function shouldLogVideoPollAttempt(attempt: number): boolean {
return attempt === 1 || attempt % 5 === 0;
}
export function shouldLogVideoPollResult(
attempt: number,
status: VideoPollStatus,
): boolean {
return status !== "IN_PROGRESS" || shouldLogVideoPollAttempt(attempt);
}