fix: preserve delivered page links when auto images fail

This commit is contained in:
john
2026-07-24 17:57:39 +08:00
parent 412e5f149b
commit 550969bed2
6 changed files with 152 additions and 5 deletions
+5 -1
View File
@@ -134,7 +134,11 @@ export function resolveImageGenerationDecision({ text, requestedMode = IMAGE_GEN
isPageGenerationIntent(normalizedText)
&& VISUAL_PAGE_IMAGE_HINT_PATTERNS.some((pattern) => pattern.test(normalizedText))
) {
return { mode: IMAGE_GENERATION_MODE.REQUIRED, source: 'intent', reason: '视觉类页面需要真实主图和缩略图源图' };
return {
mode: IMAGE_GENERATION_MODE.AUTO,
source: 'intent',
reason: '视觉类页面建议生成主图,但用户未明确要求时不阻断页面交付',
};
}
return { mode: IMAGE_GENERATION_MODE.AUTO, source: 'default', reason: '未检测到必须生成或禁止生成图片的要求' };
}