fix: 预加载文件大小 30KB → 1MB

This commit is contained in:
Your Name
2026-05-31 01:04:44 +08:00
parent ca4aceba3e
commit c0296b9d8e
+1 -1
View File
@@ -406,7 +406,7 @@
}
// ── File content preload + cache ──
const PRELOAD_MAX_SIZE=30000;
const PRELOAD_MAX_SIZE=1000000;
const PRELOAD_MAX_FILES=10;
const PRELOAD_TEXT_EXTS=new Set(['conf','cfg','ini','toml','sh','bash','py','js','ts','json','yml','yaml','html','htm','css','xml','sql','md','env','txt','log','service','nginx','vhost','properties']);
function isTextFile(name){const ext=name.includes('.')?name.split('.').pop().toLowerCase():'';return PRELOAD_TEXT_EXTS.has(ext)||ext.length<=4}