refactor: 拆分templates_editor.py巨无霸为16个模块 #806
1 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
c34603125d |
refactor: 拆分templates_editor.py巨无霸为16个模块
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 57s
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 55s
CI/CD Pipeline / Validate - Type Check (mypy) (pull_request) Successful in 1m59s
CI/CD Pipeline / Validate - Migration (alembic) (pull_request) Successful in 1m16s
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Validate - Code Quality (pull_request) Failing after 2m34s
CI/CD Pipeline / PR Build Web Image (pull_request) Successful in 53s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Successful in 1m22s
Preview Deploy / Deploy Preview Environment (pull_request) Failing after 35s
CI/CD Pipeline / Frontend Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Build Production API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Has been skipped
PR Automation / Auto Approve on CI Green (pull_request) Successful in 3m43s
CI/CD Pipeline / Deploy Production (pull_request) Has been skipped
CI/CD Pipeline / Staging E2E Tests (pull_request) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / ACR Image Cleanup (pull_request) Has been skipped
CI/CD Pipeline / Production Browser E2E (pull_request) Has been skipped
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 6m41s
CI/CD Pipeline / Integration Tests (pull_request) Successful in 2m11s
CI/CD Pipeline / Unit Tests (pull_request) Successful in 3m26s
AI Code Review / AI Code Review (pull_request) Successful in 9m6s
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 10m58s
Preview Cleanup / Cleanup Preview Environment (pull_request) Successful in 19s
将2560行的templates_editor.py按功能拆分为独立模块: - schemas.py: 所有Pydantic model(40+个) - dependencies.py: 依赖注入(get_editor_services/get_draft_plan_id) - _utils.py: 工具函数(时间格式化/片段调整辅助等) - _fallback.py: 自动兜底逻辑(生成前的4步自动修复) - draft.py: 草稿管理(详情/更新/发布/版本/回滚) - clips.py: 片段管理(CRUD/分割/合并/重排/批量删除) - adjustments.py: 片段调整(速度/音量/裁剪/批量调速) - bgm.py: BGM管理 - effects.py: 转场+滤镜 - export.py: 导出配置 - cover.py: 封面管理+AI生成封面 - subtitles.py: 字幕管理 - ai_features.py: AI推荐 - generation.py: 生成(触发/进度/记录) - timeline.py: 时间线 保持所有路由路径和行为完全不变,37个模板编辑器API测试全绿, 107个edit_plan/edit_template服务测试全绿。 |