Skip to content

feat: video generation#10699

Draft
EurFelux wants to merge 109 commits intov2from
v2-video-generation
Draft

feat: video generation#10699
EurFelux wants to merge 109 commits intov2from
v2-video-generation

Conversation

@EurFelux
Copy link
Collaborator

What this PR does

Support video generation

image

Fixes #

Why we need it and why it was done in this way

The following tradeoffs were made:

The following alternatives were considered:

Links to places where the discussion took place:

Breaking changes

If this PR introduces breaking changes, please describe the changes and the impact on users.

Special notes for your reviewer

Checklist

This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.

Release note


- Add new video page component with basic structure
- Include video icon in sidebar and launchpad
- Update i18n labels for video feature
- Increment store version and add migration for video icon
Implement provider selection dropdown in video settings panel
Add shared setting components for consistent styling
Update video page layout to accommodate settings sidebar
Implement video panel with placeholder prompt input and video display area
Add error states for invalid and undefined video cases
Update i18n strings for video related messages
Add ModelSetting component to allow selecting video generation models
Update all imports from 'openai' to '@cherrystudio/openai' across the codebase
Remove openai patch from package.json and add @cherrystudio/openai dependency
Add new translation keys for video feature in zh-cn locale and placeholder keys in other locales
Add video creation functionality using OpenAI SDK. Update types to match OpenAI's video API and implement the actual creation method in the OpenAI client.
- Split video types into base interfaces and OpenAI-specific implementations
- Add new createVideo service function to handle video creation
Implement video retrieval endpoint and integrate it through the API client stack. This enables fetching existing video resources from OpenAI's API.
Implement new interfaces and methods to handle video content retrieval from OpenAI, including type definitions and API client integration
- Initialize video store module with state management for video operations
- Add video state to root reducer
- Extend video types with id field and specific OpenAIVideo types
- Include video store in migration to initialize videoMap
Fix potential runtime errors by properly handling undefined videoMap entries. Update type definition and add null checks for videoMap operations.
Implement custom hook to handle video operations including add, update, remove and set videos
Add new video status types for downloading state and include metadata in OpenAIVideoBase. This allows better tracking of video processing stages and provides access to video metadata.
- Integrate OpenAI video creation API with proper provider handling
- Add keyboard event to trigger video creation on Enter key
… prop

Update VideoPanel to use VideoPlayer component instead of Video and accept video as a prop
- Add new i18n strings for video status and error messages
- Implement status-based UI rendering with progress indicators
- Include test radio group for status simulation
Add useProvider hook to fetch provider data and pass it to VideoPanel to enable provider-specific functionality
Move status radio group to absolute position and update background colors
- Add new error message for video loading failure in i18n
- Implement video loading state and error handling in VideoViewer
- Display appropriate UI for loading errors when video fails to load
Add retry and redownload buttons for failed video loading states
Improve error message display with detailed failure reason
Implement VideoList component to show videos from a provider. Replace placeholder div with the new component in VideoPage.
handle video creation errors by showing toast notifications and prevent multiple submissions by adding a loading state
Use i18next to translate the loading toast title for better localization support
Add a new custom hook to track pending states with a map in the runtime store. The hook provides a way to set and clear pending flags by id.
Add new interfaces for handling video deletion operations and optional thumbnail/fileId fields to VideoBase interface
… add remove functionality

The hook has been renamed to better reflect its purpose and expanded with a removeThumbnail function to provide complete thumbnail management capabilities
…logic

Move provider-specific video management to useProviderVideos hook
Simplify useVideos to handle global video operations
implement video deletion for openai provider
add i18n strings for deletion states and errors
update video list ui to support deletion
handle pending states during deletion
- Add new translations for thumbnail operations
- Extend video types to support thumbnail operations
- Implement thumbnail retrieval hook with error handling
- Add thumbnail get action to video list items
- Update video page to handle thumbnail retrieval
- Enhance provider videos hook with thumbnail support
Add new translation keys for video deletion, download, thumbnail and status messages
Add providerId to useAddOpenAIVideo and t to useProviderVideos dependency arrays to prevent stale closures
When a video is in 'queued' or 'in_progress' status, setting a thumbnail is not meaningful and could cause issues. This change ensures thumbnail remains undefined for these states.
@EurFelux EurFelux added the v2 label Oct 13, 2025
Add overflow-hidden to content containers to prevent unwanted scrolling and improve layout consistency
…ng check

Add isRetrieving function to check if a thumbnail request is already pending before making a new one. This prevents duplicate requests and potential errors when multiple thumbnail fetches are attempted for the same video.
Enable VideoPanel to update active video ID after processing and track processing state
Move all video-related type definitions from '@renderer/types/video' to '@renderer/types' to centralize type definitions and reduce module fragmentation
…ntax

The change improves consistency with the library's preferred style and makes the code more maintainable
} as const satisfies Partial<Record<SystemProviderId, string[]>>

// Mock data for testing
export const mockVideos: Video[] = [
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This array should be removed at last

@EurFelux EurFelux added this to the v2.0.0 milestone Oct 15, 2025
@Pleasurecruise Pleasurecruise linked an issue Oct 16, 2025 that may be closed by this pull request
4 tasks
@EurFelux EurFelux linked an issue Nov 17, 2025 that may be closed by this pull request
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Minor bugs in sora.3 version [Feature]: Support Sora 2, including Sora 2 on the Azure platform.

1 participant