diff --git a/scripts/e2e_quickvideo_cover.py b/scripts/e2e_quickvideo_cover.py index 49e315e..668e077 100644 --- a/scripts/e2e_quickvideo_cover.py +++ b/scripts/e2e_quickvideo_cover.py @@ -320,8 +320,9 @@ def main(): # 断言:用户输入的标题 → 项目文件名(顶栏 title + 刷新后持久化) res_title = res.get("title") log("构建后 title: %s" % res_title) - checks["title_applied_after_build"] = res_title == "封面功能端到端验证" - checks["title_persist_after_reload"] = after.get("title") == "封面功能端到端验证" + # AI 出片项目文件名须带【AI】前缀 + checks["title_applied_after_build"] = res_title == "【AI】封面功能端到端验证" + checks["title_persist_after_reload"] = after.get("title") == "【AI】封面功能端到端验证" # 项目列表卡片名(meta.name) meta_name = page.evaluate("""async () => { try { @@ -335,7 +336,7 @@ def main(): } catch (e) { return 'ERR:' + e; } }""") log("项目卡片名: %s" % meta_name) - checks["project_card_name"] = meta_name == "封面功能端到端验证" + checks["project_card_name"] = meta_name == "【AI】封面功能端到端验证" ok = all(checks.values()) print(json.dumps({"ok": ok, "checks": checks, "errors": errors[-5:]}, ensure_ascii=False)) diff --git a/src/pages/editor/components/sources/ai/QuickVideo.tsx b/src/pages/editor/components/sources/ai/QuickVideo.tsx index c998655..300a5db 100644 --- a/src/pages/editor/components/sources/ai/QuickVideo.tsx +++ b/src/pages/editor/components/sources/ai/QuickVideo.tsx @@ -774,7 +774,9 @@ export default function QuickVideo({ const transCount = fxTrans === 'none' ? 0 : Math.max(0, segs.length - 1); // 项目文件名 = 用户输入的标题:顶栏标题、工程数据、项目列表卡片名三处同步 - const projTitle = title.trim(); + // AI 出片的项目文件名带【AI】标识(已带前缀则不重复叠加) + const rawTitle = title.trim(); + const projTitle = rawTitle ? (rawTitle.startsWith('【AI】') ? rawTitle : `【AI】${rawTitle}`) : ''; if (projTitle) { editor.data.title = projTitle; // movie.data 若是独立引用,一并改掉(保存走 sortZIndexNewData)