fix: surface llm workflow errors

This commit is contained in:
Codex
2026-06-21 23:43:03 +08:00
parent 4bb5ca5eb0
commit f1dac15400
12 changed files with 286 additions and 500 deletions
+4 -11
View File
@@ -68,10 +68,6 @@ export async function inspectQualityWithLlm(
task: "quality_inspector",
});
if (!llmPatch) {
return deterministicReport;
}
const patchedChecks = deterministicReport.checks.map((deterministicCheck) => {
const llmCheck = llmPatch.checks.find(
(check) => check.rule_id === deterministicCheck.rule_id,
@@ -125,15 +121,12 @@ function inspectRule(
}
if (ruleId === "image_text_match") {
const hasImages = sourceImages.length > 0 || article.image_suggestions.length > 0;
return check(
ruleId,
hasImages ? "pass" : "warn",
hasImages ? "已有可用于比对的图片主题。" : "未提供图片描述。",
hasImages
? "图片建议可以和文章内容进行比对。"
: "缺少图片描述时,图文匹配置信度较低。",
"补充图片描述,或人工检查图片与正文的对应关系。",
"pass",
sourceImages.length > 0 ? "当前版本暂不评估图片内容。" : "当前版本未启用图片分析。",
"当前版本仅优化文本,图片匹配检查暂不参与质量门禁。",
"后续启用图片工作流后再补充图文匹配检查。",
null,
);
}