feat(pipeline): 资产页实体提取闸门 — 蒙版+3按钮替掉自动生成(不掏口袋)
进资产趴原会自动 genPersonWithTri/genBaseAsset 出图、直接扣用户费,"被掏口袋"感。 改为用户点了才提取/生成: - 删掉进资产趴的自动生成 effect(及 autoGenRef)。 - STAGE 2 盖半透明蒙版 + 三按钮:① 只提取关键词(不出图) / ② 提取+生成角色和场景 (立绘+场景图) / ③ 提取+全套(立绘+三视图+场景图);running 态转 loading,完成自动揭开。 - runExtract 调 /extract-entities 提实体落库,②③ 再按返回实体循环 genBaseAsset/genPersonWithTri。 - 提取后露「重新提取角色/场景」按钮(改了脚本可重提)。 - 闸门据 metadata.script_entities 是否落库自动显隐;已有资产的老项目不打扰。 - api.extractEntities + 类型 script_entities;蒙版 CSS 守 design token(--heat/--r-md/--accent-crimson)。 角色卡仍只露可改的 visual_prompt(质量模板后端 build_person_frontal_prompt 包,用户看不到)。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
827fa7fa54
commit
c6d1d2f6fe
@@ -291,6 +291,17 @@ export const api = {
|
||||
body: JSON.stringify({ script_version_id })
|
||||
});
|
||||
},
|
||||
// 独立实体提取:读已定稿脚本 → AI 识别角色/场景 + 每镜 refs,落库覆盖 metadata。商品不提(参考图层用真实主图)。
|
||||
extractEntities(projectId: string) {
|
||||
return request<{
|
||||
entities: Array<{ id: string; type: "character" | "scene"; name: string; visual_prompt: string; ref_index: number }>;
|
||||
segments: Array<{ index: number; entity_refs: string[] }>;
|
||||
cast: string[];
|
||||
cast_prompts: Record<string, string>;
|
||||
scenes: string[];
|
||||
scene_prompts: Record<string, string>;
|
||||
}>(`/api/projects/${projectId}/extract-entities/`, { method: "POST" });
|
||||
},
|
||||
updateScriptSegment(projectId: string, payload: { segment_id: string; narration?: string; visual_prompt?: string; duration_seconds?: number }) {
|
||||
return request<ScriptVersion>(`/api/projects/${projectId}/update-script-segment/`, { method: "POST", body: JSON.stringify(payload) });
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user