Refine report asset naming and include review notes in section 6

This commit is contained in:
gitea committed 2026-10-13 10:16:49 +08:00
1 parent 140d7bb33a
commit d71be55ec8
2 files changed
+7 -3

No files matched your search

+3 -2
View File
@@ -44,8 +44,9 @@ export function saveReportMarkdown(
const path = decodeURIComponent(source);
let target = images.get(path);
if (!target) {
target = `${assetDir}/${images.size + 1}-${basename(path)}`;
const dynamic = dynamicAssets?.[path] ?? dynamicAssets?.[basename(path)];
const cleanBase = basename(path).replace(/^\d+-/, "");
target = `${assetDir}/${images.size + 1}-${cleanBase}`;
const dynamic = dynamicAssets?.[path] ?? dynamicAssets?.[basename(path)] ?? dynamicAssets?.[cleanBase];
const bundled = templatePath === BUILTIN_TEMPLATE_PATH ? REPORT_ASSETS[path] : undefined;
const data = dynamic ?? bundled ?? readFileSync(inputFile(resolve(dirname(templatePath), path)));
files.set(resolve(dirname(file), target), data);
+4 -1
View File
@@ -389,7 +389,10 @@ function replacementRows(
return diverged.map((block) => {
const isAiRight = block.verdict === "ai_correct" || (!block.verdict && block.agreement === "diverged");
const category = isAiRight ? "**依规正确(计入 D4)**" : "**AI 失准(不计入分子)**";
const conclusion = block.aiSummary || (isAiRight ? "人工复核确认依规拦截风险" : "AI 误报");
const reviewNote = data.reviews.get(block.sn)?.note;
const conclusion = (!isAiRight && reviewNote)
? `${reviewNote}(AI原判:${block.aiSummary || "—"})`
: (block.aiSummary || reviewNote || (isAiRight ? "人工复核确认依规拦截风险" : "AI 误报"));
return [
block.sn,
block.template || "—",