fix: remove storyboard meta terms from detail titles and prompts
Some checks failed
Lint / build (20) (push) Has been cancelled
Playwright Tests / test (push) Has been cancelled

This commit is contained in:
Your Name 2026-02-24 13:19:12 +08:00
parent 6df4d37bf4
commit 90d8b5e128

View File

@ -231,8 +231,13 @@ const TITLE_META_TERMS = [
"核心价值",
"场景痛点",
"方案拆解",
"机制拆解",
"核心机制拆解",
"核心收益可证",
"差异强化",
"细节证明",
"信任收口",
"证据收口",
"卖点延展",
"解决方案",
"价值延展",
@ -580,7 +585,7 @@ function enforceCoreFocusOnScreens(params: {
: `核心卖点锚点:${coreFocus.anchor}。本屏必须服务同一核心卖点,不得偏题。`;
const firstScreenPosterLine =
language === "en"
? "Screen 1 must be a hero poster cover: single dominant product visual, cinematic light, strong focal contrast, clean headline-safe top area, no collage."
? "Hero-cover rule: single dominant product visual, cinematic light, strong focal contrast, clean headline-safe top area, no collage."
: "首屏必须是封面海报感:单一主视觉主体、电影级光影、强焦点对比、顶部清晰标题安全区,禁止拼贴说明图。";
let title = screen.title;
@ -911,33 +916,33 @@ function buildFallbackScreens(params: {
? [
"Hero poster cover with one core value",
"Pain-point resonance and trigger moment",
"Solution structure and key mechanism",
"Differentiation reinforcement",
"Evidence and trust closing",
"Comfort benefit clarity in real use",
"Differentiated value in key details",
"Trust proof and confidence closing",
]
: [
"首屏海报主视觉聚焦单一核心卖点",
"痛点共鸣与触发场景放大",
"解决方案与关键机制说明",
"差异化优势重复强化",
"证据背书与信任收口",
"真实使用中的舒适收益说明",
"关键细节体现差异优势",
"证据背书与购买信心建立",
];
const screenTypeSequence: DetailScreenType[] = ["B", "A", "B", "C", "B"];
const defaultTitles =
language === "en"
? [
coreFocus.firstScreenTitle,
"Core Benefit Proof",
"Mechanism Breakdown",
"Difference Reinforcement",
"Trust Evidence",
"Sit Longer, Feel Better",
"Comfort That Holds Up",
"Stability You Can Trust",
"Built to Last Daily",
]
: [
coreFocus.firstScreenTitle,
"核心收益可证",
"机制拆解",
"差异强化",
"证据收口",
"久坐更轻松",
"贴合更舒适",
"稳固更省心",
"耐用不将就",
];
return Array.from({ length: count }).map((_, index) => {
@ -1028,14 +1033,14 @@ function buildFallbackScreens(params: {
const visualPrompt =
language === "en"
? [
`E-commerce detail frame ${index + 1}, objective: ${objective}.`,
`E-commerce detail frame, objective: ${objective}.`,
`Fixed vertical canvas 790x1300 pixels.`,
`Keep exact product identity consistent across all frames.`,
`Main scene: ${mainScenario}; core demand: ${coreNeed}.`,
"Audience profile is internal strategy only; do not expose explicit age/gender labels in visible copy.",
`Core selling-point anchor: ${coreFocus.anchor}; this frame must stay aligned to this anchor.`,
index === 0
? "Screen 1 hero-cover rule: this must look like a poster key visual with one dominant subject, strong focus contrast, and no collage cards."
? "Hero-cover rule: this must look like a poster key visual with one dominant subject, strong focus contrast, and no collage cards."
: "",
`Positioning statement: ${positioning}.`,
`Global style: ${globalStyle.designLanguage}.`,
@ -1055,7 +1060,7 @@ function buildFallbackScreens(params: {
`Task context: ${prompt}.`,
].join(" ")
: [
`电商详情页第${index + 1}屏,目标:${objective}。`,
`电商详情页分镜,目标:${objective}。`,
"画布固定竖版 790x1300 像素。",
"全套保持同一产品外观一致(结构、材质、颜色、比例、Logo)。",
`主场景:${mainScenario};核心需求:${coreNeed}。`,
@ -1157,7 +1162,14 @@ function sanitizeScreen(
const fabeSource = (source.fabe || {}) as Record<string, unknown>;
const visualPrompt = desensitizeAudienceCopy(
safeText(source.visualPrompt, fallback.visualPrompt),
stripAgentPlanningPhrases(
safeText(source.visualPrompt, fallback.visualPrompt)
.replace(/第\s*\d+\s*屏/gi, "")
.replace(/\bscreen\s*\d+\b/gi, "")
.replace(/\bframe\s*\d+\b/gi, "")
.replace(/\s+/g, " ")
.trim()
),
language
);
const normalizeTitle = (value: string) => {