feat: 剪辑计划与一键生成串联 — URL 参数传递配置 + source_edit_plan_id 关联
Deploy / Deploy Staging (push) Failing after 112h0m23s
CI/CD Pipeline / Frontend Lint (push) Failing after 112h0m30s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 112h0m30s
Deploy / Production Browser E2E (push) Failing after 1770h31m52s
Deploy / Build Production Runtime Images (push) Failing after 1770h33m59s
Deploy / Staging E2E Tests (push) Failing after 1770h31m54s
Deploy / Deploy Production (push) Failing after 1771h3m20s

- editPlans.ts: 新增 source_edit_plan_id 字段 + EditPlanGeneration 类型 + getEditPlanGenerations API
- EditingPlanner.tsx: 顶栏按钮跳转到一键生成(携带 edit_plan_id + plan_config)+ 底栏生成历史入口
- GeneratePage.tsx: 读取 URL 参数自动填充表单 + 创建计划时传递 source_edit_plan_id + 来源标签提示

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
灵应
2026-07-04 20:53:56 +08:00
parent 0e94adf7b6
commit f447048dc7
3 changed files with 186 additions and 7 deletions
+20
View File
@@ -31,6 +31,8 @@ export interface CreateEditPlanRequest {
name: string;
config?: Record<string, unknown>;
total_duration?: number;
/** 来源剪辑计划 ID(从剪辑计划跳转到一键生成时关联) */
source_edit_plan_id?: string;
}
/** 更新剪辑计划请求 */
@@ -49,6 +51,16 @@ export interface GenerateResponse {
clip_count: number;
}
/** 剪辑计划关联的生成记录 */
export interface EditPlanGeneration {
id: string;
edit_plan_id: string;
generation_task_id: string;
status: EditPlanStatus;
created_at: string;
updated_at: string;
}
/** 片段生成状态 */
export interface ClipStatusItem {
clip_id: string;
@@ -246,6 +258,14 @@ export async function generateCover(
return response.data;
}
/** 获取剪辑计划关联的生成记录 */
export async function getEditPlanGenerations(
planId: string,
): Promise<EditPlanGeneration[]> {
const response = await apiClient.get(`/edit-plans/${planId}/generations`);
return response.data.items || [];
}
/**
* 获取素材库列表 — 调用 GET /api/v1/assets?library_id=xxx
* 将后端 AssetResponse 映射为前端 MediaAsset 类型