Commit 805b25ca by Lin Wang

fix: change the files name

parent a014e1d3
......@@ -91,7 +91,7 @@ selectedSelectors
};
});
const outFile = `${baselineId}_vs_${otherId}_diff.json`;
const outFile = `${selectedLanguages[baselineId]}_vs_${selectedLanguages[otherId]}_diff.json`;
const outPath = join(outDir, outFile);
writeFileSync(outPath, JSON.stringify(semantic, null, 2), 'utf-8');
console.log(`✅ Diff between ${baselineId} and ${otherId} written to ${join(outDir, outFile)} ${useAiSelectors ? '(AI selectors)' : ''}`);
......
......@@ -2,7 +2,9 @@ import { writeFileSync, mkdirSync, existsSync, rmSync } from 'fs'
import { fetchSiteData } from '../clients/bobcat/SiteInfo'
import {
section_selectors,
ai_section_selectors
sectionSelectorLanguages,
ai_section_selectors,
aiSectionSelectorsLanguages
} from '../constant/section_selectors'
import { mainParse } from './handlePageContent'
......@@ -20,6 +22,7 @@ const useAiSelectors = process.env.USE_AI_SELECTORS === 'true';
// 根据环境变量选择使用哪个 selector 数组
const selectedSelectors = useAiSelectors ? ai_section_selectors : section_selectors;
const selectedLanguages = useAiSelectors ? aiSectionSelectorsLanguages : sectionSelectorLanguages;
// 确保输出目录存在
let outDir = ''
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment