fix(core/frontend): 脚本趴左侧显示最近一版(重新生成即更新)+ 分镜卡补结构化字段
- currentScript 改「最近一版」而非「采用版优先」:右侧 agent 重新生成后左侧立即显示新稿(下游故事板/视频仍按后端 is_adopted,互不影响) - 分镜卡补「标记」行:镜型(钩子/痛点/卖点/CTA)+ 商品露出,只读展示 ScriptDraft 结构化字段 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
07a13224fe
commit
163a6627ba
@@ -412,10 +412,11 @@ export function PipelinePage(props: {
|
||||
const frameUrl = (f?: { asset: string; asset_url?: string } | null): string => f?.asset_url || assetUrl(f?.asset);
|
||||
const segUrl = (s?: { adopted_asset?: string | null; adopted_asset_url?: string } | null): string => s?.adopted_asset_url || assetUrl(s?.adopted_asset);
|
||||
|
||||
// ── Stage 1:脚本(采用版优先,否则最近一版)+ 镜头列表 ──
|
||||
// ── Stage 1:脚本(显示最近一版,采用状态用 badge 标)+ 镜头列表 ──
|
||||
// 取最近一版而非「采用版优先」:右侧 agent 重新生成后(新版未采用),左侧要立刻显示新稿供 review,
|
||||
// 否则会一直停在旧的已采用版,看着像「没更新」。下游故事板/视频仍按后端 is_adopted 取,互不影响。
|
||||
const scripts = [...(project.script_versions ?? [])];
|
||||
const currentScript =
|
||||
scripts.find((s) => s.is_adopted) ||
|
||||
[...scripts].sort((a, b) => (b.created_at || "").localeCompare(a.created_at || ""))[0] ||
|
||||
null;
|
||||
const scriptAdopted = Boolean(currentScript?.is_adopted);
|
||||
@@ -1834,6 +1835,17 @@ export function PipelinePage(props: {
|
||||
}}
|
||||
>{visualShown}</div>
|
||||
</div>
|
||||
{/* ScriptDraft 结构化字段:镜型(钩子/痛点/卖点/CTA)+ 商品露出方式(只读展示) */}
|
||||
{(shot.role || shot.product_exposure) ? (
|
||||
<div className="shot-row">
|
||||
<span className="shot-k">标记</span>
|
||||
<div className="shot-v" style={{ opacity: 0.8 }}>
|
||||
{shot.role ? `镜型·${shot.role}` : ""}
|
||||
{shot.role && shot.product_exposure ? " " : ""}
|
||||
{shot.product_exposure ? `露出·${shot.product_exposure}` : ""}
|
||||
</div>
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
</div>
|
||||
{/* 行34 · 该卡之后挂着的本地草稿分镜(点「添加分镜」插入,可编辑,有内容失焦才落库) */}
|
||||
|
||||
Reference in New Issue
Block a user