fix: prevent detail prompt pack guard self-trigger
This commit is contained in:
parent
5aab184a97
commit
29930f3c14
@ -639,7 +639,6 @@ function inferPeoplePolicy(params: {
|
||||
|
||||
function planTextForPolicyGuards(scenePlan: ReplacementScenePlan) {
|
||||
return [
|
||||
scenePlan.routeReason,
|
||||
scenePlan.sceneSummary,
|
||||
scenePlan.cameraSummary,
|
||||
scenePlan.placementSummary,
|
||||
@ -683,6 +682,9 @@ function applyDetailReplacementScenePlanGuards(
|
||||
|
||||
const isProductOnly = params.replacementStrategy === "product_only";
|
||||
const planText = planTextForPolicyGuards(scenePlan);
|
||||
const alreadyAllowsPromptPack =
|
||||
scenePlan.generationRoute === "prompt_pack_scene" &&
|
||||
scenePlan.promptPackPolicy !== "forbid";
|
||||
const hasWhiteLayoutHint = DETAIL_WHITE_LAYOUT_HINT_PATTERN.test(planText);
|
||||
const hasPeopleActionHint = DETAIL_PEOPLE_ACTION_HINT_PATTERN.test(planText);
|
||||
const shouldProtectWhiteLayout =
|
||||
@ -692,9 +694,9 @@ function applyDetailReplacementScenePlanGuards(
|
||||
hasWhiteLayoutHint);
|
||||
const shouldProtectPeople =
|
||||
!isProductOnly &&
|
||||
(scenePlan.peoplePolicy !== "none" ||
|
||||
params.containsPeople ||
|
||||
(params.containsPeople ||
|
||||
params.containsMultiplePeople ||
|
||||
(!alreadyAllowsPromptPack && scenePlan.peoplePolicy !== "none") ||
|
||||
hasPeopleActionHint);
|
||||
const shouldLockCopy =
|
||||
!isProductOnly &&
|
||||
@ -1003,7 +1005,7 @@ export function buildHeuristicReplacementScenePlan(params: {
|
||||
: isDetailReplacement
|
||||
? shouldProtectFallbackLayout
|
||||
? "兜底命中白底/说明/强文案特征,按详情版式保护执行,不使用词包。"
|
||||
: "兜底未命中白底、强文案或明确人物关系,按通用场景图执行词包场景替换。"
|
||||
: "兜底未命中白底、强文案或真人互动硬约束,按通用场景图执行词包场景替换。"
|
||||
: "兜底未检测到强约束,允许使用词包生成场景。"
|
||||
: params.reason,
|
||||
selectedProductImageIndexes: productImageSelection.selectedProductImageIndexes,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user