diff --git a/ui/hanlinyuan-bindings.js b/ui/hanlinyuan-bindings.js
index 2a36dc4..f674534 100644
--- a/ui/hanlinyuan-bindings.js
+++ b/ui/hanlinyuan-bindings.js
@@ -1 +1 @@
-const _0xc2967b=_0x129f;(function(_0x2e69ed,_0x29425d){const _0x4e2df7=_0x129f,_0x3af0d4=_0x2e69ed();while(!![]){try{const _0x487b27=-parseInt(_0x4e2df7(0xf0))/0x1*(parseInt(_0x4e2df7(0xe0))/0x2)+-parseInt(_0x4e2df7(0x17f))/0x3*(parseInt(_0x4e2df7(0x14b))/0x4)+parseInt(_0x4e2df7(0x6d))/0x5+-parseInt(_0x4e2df7(0x164))/0x6*(parseInt(_0x4e2df7(0x137))/0x7)+-parseInt(_0x4e2df7(0xe7))/0x8*(parseInt(_0x4e2df7(0xdc))/0x9)+-parseInt(_0x4e2df7(0xec))/0xa+parseInt(_0x4e2df7(0x155))/0xb;if(_0x487b27===_0x29425d)break;else _0x3af0d4['push'](_0x3af0d4['shift']());}catch(_0x2dde75){_0x3af0d4['push'](_0x3af0d4['shift']());}}}(_0x17e6,0x99ff4));import{getContext}from'/scripts/extensions.js';import*as _0x5a3b7a from'../core/rag-processor.js';import*as _0x4c2e19 from'../core/historiographer.js';import*as _0x7f301b from'../core/utils/context-utils.js';import{showContentModal,showHtmlModal}from'./page-window.js';import{extractBlocksByTags,applyExclusionRules}from'../core/utils/rag-tag-extractor.js';_0xc2967b(0x181);function _0x17e6(){const _0x284e17=['\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20×\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20','\x0a忆识总数:\x20','startHLYHistoriography','hly-log-output','checked','none','hly-query-message-count','hly-rerank-api-key','hly-exclusion-rules-btn','amily2_open_hanlin_tutorial','log-warn','manual','closest','trim','...','filter','true','大功告成','\x27\x20已更新为:\x20','检测到预览后待处理的文本,开始直接凝识...','tagExtractionEnabled','fetchHLYRerankModels','确认并更新预览','messageTypes','编纂失败:\x20','url','getChatId','
','\x0a\x20\x20\x20\x20\x20\x20\x20\x20
\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
在这里定义需要从提取内容中排除的文本片段。例如,排除HTML注释,可以设置开始字符为\x20``。
\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
','正在清空宝库...','编纂任务已开始...','正在采集消息...','未能获取到任何Rerank模型。','.hly-preview-textarea','injection','dataset','active','add','成功加载\x20','string','exclusionRules','error','hly-log-entry\x20','finalText','hly-current-chat-id','input[name=\x22hly-injection-position\x22][value=\x22','info','input','join','length','hly-injection-role','开始对《','\x20楼:\x20[','value','enabled','\x20条忆识。','.hly-nav-item','hly-overlap-size','fa-exclamation-triangle','tab','options','加载书库列表失败:\x20','template','未找到符合条件的消息可供凝识。','正在获取可用书库列表...','
','depth','beforeend','[翰林院-枢纽]\x20加载《','executeCompilation','\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20','根据当前勾选条件,未找到符合的消息可供预览。','hly-batch-size','hly-api-key','hly-rerank-top-n','\x0a\x20\x20\x20\x20\x20\x20\x20\x20
未找到模型','customApiUrl','querySelectorAll','预览内容已更新,可随时开始凝识。','820557rODpJA','notify','\x20进行编纂...','hly-hist-select-library','12lAanSk','input[name=\x22hly-injection-position\x22]:checked','正在处理预览后的文本...','[翰林院-枢纽]\x20更新忆识数量失败:','batchSize','purgeHLYStorage','.hly-tab-pane','72QqQdds','[翰林院-枢纽]\x20获取Rerank模型列表失败:','hly-delete-rule-btn','condensation','[翰林院-枢纽]\x20已成功连接各部,政令畅通。','1962290GqIQQj','正在测试神力连接...','\x22\x20placeholder=\x22开始字符,\x20如\x20\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20
\x0a\x20\x20\x20\x20','log-success','hly-layer-start','
','scrollHeight','1304596xUHgOx','from','change','hly-condensation-results','[翰林院-枢纽]\x20加载书库列表失败:','previewHLYCondensation','清空宝库失败。','name','find','each','29459067MHQWBD','加载条目失败:\x20','stringify','position','resetHLYSettings','hly-rerank-model','appendChild','\x20个书库。','\x0a所用模型:\x20','
','hly-retrieval-notify','[自动保存]\x20设置项\x20\x27','apiEndpoint','getSettings','翰林院设定已存档封印。','6KVTfms','hly-current-vector-count','翰林院使用教程','integer','
','hly-','warning','文书录入失败:\x20','正在处理您提交的文书...','advanced','data','testApiConnection','ingestTextToHanlinyuan','message','.hly-preview-delete-btn-v2','push','[翰林院-枢纽]\x20编纂过程发生错误:','圣谕不明','scripts/extensions/third-party/ST-Amily2-Chat-Optimisation/HanLin.md','正在为《','[翰林院-枢纽]\x20获取模型列表失败:','\x20个Rerank模型。','fetchRerankModels','准备对《','contains','log-info','overlap','6tmJwTT','hly-layer-end','use\x20strict','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
\x0a\x20\x20\x20\x20\x20\x20\x20\x20
\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20';showHtmlModal('编辑内容排除规则',_0x44de9b,{'okText':'保存规则','onOk':_0x1aab2f=>{const _0x5a6db6=_0x49680e,_0x183021=[];_0x1aab2f['find']('.hly-exclusion-rule-row')[_0x5a6db6(0x154)](function(){const _0x1968f6=_0x5a6db6,_0x2158e5=$(this)[_0x1968f6(0x153)](_0x1968f6(0xb5))['eq'](0x0)[_0x1968f6(0xf4)]()[_0x1968f6(0x93)](),_0x22ab7e=$(this)[_0x1968f6(0x153)](_0x1968f6(0xb5))['eq'](0x1)['val']()[_0x1968f6(0x93)]();_0x2158e5&&_0x22ab7e&&_0x183021['push']({'start':_0x2158e5,'end':_0x22ab7e});}),updateAndSaveSetting('condensation.exclusionRules',_0x183021),toastr[_0x5a6db6(0x7c)](_0x5a6db6(0x6b),_0x5a6db6(0x12c));}});const _0x4d882a=document['getElementById']('hly-exclusion-rules-container'),_0x446d47=_0x4d882a[_0x49680e(0x71)]('#hly-rules-list');_0x4d882a[_0x49680e(0x71)](_0x49680e(0x127))[_0x49680e(0x104)](_0x49680e(0x126),()=>{const _0x34451c=_0x49680e,_0x2a7d2a=_0x446d47['children'][_0x34451c(0xb7)],_0x37db7b=_0x426364({'start':'','end':''},_0x2a7d2a);_0x446d47['insertAdjacentHTML'](_0x34451c(0xc9),_0x37db7b);}),_0x446d47[_0x49680e(0x104)](_0x49680e(0x126),_0x52ae81=>{const _0x34fd90=_0x49680e;_0x52ae81[_0x34fd90(0xfc)][_0x34fd90(0xf9)][_0x34fd90(0x17c)](_0x34fd90(0xe9))&&_0x52ae81[_0x34fd90(0xfc)][_0x34fd90(0x92)]('.hly-exclusion-rule-row')[_0x34fd90(0xd6)]();});}function previewCondensation(){const _0x114a8a=_0xc2967b,_0x1015c6=document[_0x114a8a(0xd2)](_0x114a8a(0x14e));try{const _0x250537=_0x5a3b7a[_0x114a8a(0x162)](),_0x34ee34=_0x250537[_0x114a8a(0xea)][_0x114a8a(0xae)]||[],_0x1366b5={'user':document['getElementById'](_0x114a8a(0xfa))[_0x114a8a(0x8a)],'ai':document['getElementById'](_0x114a8a(0x187))['checked']},_0x277af6=document[_0x114a8a(0xd2)]('hly-tag-extraction-toggle')[_0x114a8a(0x8a)],_0x3174aa=_0x277af6?document[_0x114a8a(0xd2)]('hly-tag-input')[_0x114a8a(0xbb)][_0x114a8a(0x78)](',')[_0x114a8a(0x122)](_0x4d1caa=>_0x4d1caa[_0x114a8a(0x93)]())[_0x114a8a(0x95)](Boolean):[],_0x293d78=_0x5a3b7a[_0x114a8a(0x116)](_0x1366b5);if(!_0x293d78||_0x293d78[_0x114a8a(0xb7)]===0x0){_0x1015c6[_0x114a8a(0x101)]=_0x114a8a(0xcd),toastr['warning'](_0x114a8a(0x6f),'翰林院启奏');return;}const _0x320d1b=_0x293d78['map']((_0x3514de,_0x1fe9b9)=>{const _0x1fa77f=_0x114a8a;let _0x7cb621;if(_0x277af6&&_0x3174aa[_0x1fa77f(0xb7)]>0x0){const _0x3441b6=extractBlocksByTags(_0x3514de[_0x1fa77f(0x66)],_0x3174aa);_0x7cb621=_0x3441b6['join']('\x0a\x0a');}else _0x7cb621=_0x3514de[_0x1fa77f(0x66)];return _0x7cb621=applyExclusionRules(_0x7cb621,_0x34ee34),{'id':_0x1fa77f(0x77)+_0x1fe9b9,'name':_0x3514de[_0x1fa77f(0x152)],'content':_0x7cb621[_0x1fa77f(0x93)]()};})['filter'](_0x583465=>_0x583465[_0x114a8a(0x12d)]);if(_0x320d1b[_0x114a8a(0xb7)]===0x0){_0x1015c6['textContent']=_0x114a8a(0x117),toastr[_0x114a8a(0x16a)](_0x114a8a(0x117),'翰林院启奏');return;}const _0x24b59e=_0x320d1b[_0x114a8a(0x122)]((_0x58a049,_0xab622a)=>_0x114a8a(0x182)+_0x58a049['id']+_0x114a8a(0x141)+(_0xab622a+0x1)+_0x114a8a(0xba)+_0x58a049[_0x114a8a(0x152)]+_0x114a8a(0x65)+_0x58a049[_0x114a8a(0x12d)]+_0x114a8a(0x145)+_0x58a049['id']+_0x114a8a(0x86))[_0x114a8a(0xb6)]('');showHtmlModal(_0x114a8a(0x13c),_0x114a8a(0xa1)+_0x24b59e+'
',{'okText':_0x114a8a(0x9c),'onOk':_0x5313be=>{const _0x526627=_0x114a8a,_0x4b1827=[];_0x5313be['find']('.hly-preview-item-v2')[_0x526627(0x154)](function(){const _0x4dfb8c=_0x526627,_0x673909=$(this)[_0x4dfb8c(0x153)](_0x4dfb8c(0xa7))[_0x4dfb8c(0xf4)]();_0x673909[_0x4dfb8c(0x93)]()&&_0x4b1827[_0x4dfb8c(0x173)](_0x673909);});const _0x31e5e3=_0x4b1827['join']('\x0a\x0a---\x0a\x0a');_0x1015c6[_0x526627(0x101)]=_0x526627(0x76)+_0x4b1827[_0x526627(0xb7)]+_0x526627(0x118)+_0x31e5e3,_0x1015c6[_0x526627(0xa9)]['finalText']=_0x31e5e3,toastr['success'](_0x526627(0xdb),_0x526627(0x12c));}}),$(_0x114a8a(0x172))['on']('click',function(_0x6b14a8){const _0x100018=_0x114a8a;_0x6b14a8['preventDefault']();const _0x4ae9e7=$(this)[_0x100018(0x16e)](_0x100018(0xfc));$('#'+_0x4ae9e7)[_0x100018(0xd6)]();});}catch(_0x32dbd0){console[_0x114a8a(0xaf)](_0x114a8a(0x110),_0x32dbd0),_0x1015c6['textContent']=_0x114a8a(0x18e)+_0x32dbd0[_0x114a8a(0x171)],toastr[_0x114a8a(0xaf)]('预览失败:\x20'+_0x32dbd0[_0x114a8a(0x171)],_0x114a8a(0x11a));}}function log(_0x92501f,_0x1d61ac=_0xc2967b(0xb4)){const _0x164157=_0xc2967b,_0x1fbbe0=document['getElementById'](_0x164157(0x89));if(!_0x1fbbe0)return;const _0x54487c=document['createElement']('p'),_0x2e86ab=new Date()[_0x164157(0x121)]();let _0x266f97=_0x164157(0x109),_0x2927e5=_0x164157(0x17d);switch(_0x1d61ac){case _0x164157(0x7c):_0x266f97=_0x164157(0x72),_0x2927e5=_0x164157(0x147);break;case _0x164157(0xaf):_0x266f97=_0x164157(0x70),_0x2927e5=_0x164157(0x13d);break;case _0x164157(0x136):_0x266f97=_0x164157(0xc0),_0x2927e5=_0x164157(0x90);break;}_0x54487c[_0x164157(0x18a)]=_0x164157(0xb0)+_0x2927e5,_0x54487c[_0x164157(0x144)]='
saveSettingsFromUI(![]),window['resetHLYSettings']=resetSettingsToUI,window[_0x3ea8ed(0x1a0)]=testApi,window[_0x3ea8ed(0xcc)]=fetchHLYEmbeddingModels,window[_0x3ea8ed(0x10a)]=fetchHLYRerankModels,window[_0x3ea8ed(0xc2)]=updatePanelStatus,window[_0x3ea8ed(0x15a)]=purgeStorage,window[_0x3ea8ed(0x15f)]=startCondensation,window[_0x3ea8ed(0x138)]=previewCondensation,window[_0x3ea8ed(0x1b8)]=ingestManualText,window[_0x3ea8ed(0x142)]=log,window[_0x3ea8ed(0xed)]=showStats,window['startHLYHistoriography']=startHistoriography;}function updateAndSaveSetting(_0x55f521,_0x1bb424){const _0x566433=_0x5589d6,_0xbd4a8b=_0x488321[_0x566433(0x1c2)]();if(!_0xbd4a8b)return;const _0x335f42=_0x55f521[_0x566433(0xd8)]('.');let _0x22c53d=_0xbd4a8b;for(let _0x37429d=0x0;_0x37429d<_0x335f42['length']-0x1;_0x37429d++){_0x22c53d=_0x22c53d[_0x335f42[_0x37429d]]=_0x22c53d[_0x335f42[_0x37429d]]||{};}_0x22c53d[_0x335f42[_0x335f42['length']-0x1]]=_0x1bb424,_0x488321[_0x566433(0xdf)](),log(_0x566433(0x18a)+_0x55f521+_0x566433(0x102)+JSON[_0x566433(0x19f)](_0x1bb424),_0x566433(0xc4));}function _0xc00f(_0x53ce35,_0x5648f3){const _0xc3939c=_0xc393();return _0xc00f=function(_0xc00f6c,_0x2f087b){_0xc00f6c=_0xc00f6c-0xb0;let _0x16f034=_0xc3939c[_0xc00f6c];return _0x16f034;},_0xc00f(_0x53ce35,_0x5648f3);}function bindAutoSaveEvents(){const _0x58186d=_0x5589d6,_0x4fd641=document[_0x58186d(0x1c0)](_0x58186d(0xe7));if(!_0x4fd641)return;_0x4fd641['addEventListener'](_0x58186d(0x170),_0x5198b6=>{const _0x28a8fd=_0x58186d,_0x451ca8=_0x5198b6['target'],_0x53df22=_0x451ca8[_0x28a8fd(0x105)][_0x28a8fd(0x181)];if(!_0x53df22)return;let _0x178615;const _0x35768b=_0x451ca8[_0x28a8fd(0x105)]['type']||_0x28a8fd(0xcd);if(_0x451ca8[_0x28a8fd(0x199)]===_0x28a8fd(0x148))_0x178615=_0x451ca8[_0x28a8fd(0x1b9)];else{if(_0x451ca8['type']===_0x28a8fd(0xb7)){if(_0x451ca8['checked']){const _0x1f7152=_0x4fd641[_0x28a8fd(0x18e)](_0x28a8fd(0x187)+_0x451ca8[_0x28a8fd(0xd6)]+'\x22]'),_0xc4e5dc=Array[_0x28a8fd(0x19c)](_0x1f7152)[_0x28a8fd(0x134)](_0x4b0bd2=>_0x4b0bd2[_0x28a8fd(0x1b9)]);_0x178615=_0xc4e5dc[_0x28a8fd(0x194)];}else return;}else _0x178615=_0x451ca8[_0x28a8fd(0x194)];}switch(_0x35768b){case _0x28a8fd(0x141):_0x178615=parseInt(_0x178615,0xa);break;case'float':_0x178615=parseFloat(_0x178615);break;case'boolean':typeof _0x178615!=='boolean'&&(_0x178615=_0x178615===_0x28a8fd(0x1fa));break;}if(_0x451ca8[_0x28a8fd(0x199)]===_0x28a8fd(0xb7)&&!_0x451ca8['checked'])return;updateAndSaveSetting(_0x53df22,_0x178615);});}export function bindHanlinyuanEvents(){const _0x17babb=_0x5589d6,_0x55372f=getContext();if(!_0x55372f){console[_0x17babb(0xf5)](_0x17babb(0x124));return;}setupGlobalEventHandlers(),bindPanelToggleEvents(),bindInternalUIEvents(),bindTutorialEvents(),bindAutoSaveEvents(),bindSessionLockEvent();if(_0x488321['initialize'])_0x488321[_0x17babb(0x167)]();else{console[_0x17babb(0xf5)](_0x17babb(0x198));return;}loadSettingsToUI(),loadWorldbookList(),log('[翰林院-枢纽]\x20已成功连接各部,政令畅通。','info');const _0x2fbe13=document[_0x17babb(0x1c0)](_0x17babb(0x214)),_0x4f955d=document[_0x17babb(0x1c0)](_0x17babb(0x117)),_0x4dd4bc=document['getElementById'](_0x17babb(0x203)),_0x412370=document[_0x17babb(0x1c0)](_0x17babb(0x216)),_0x4ba88f=document[_0x17babb(0x1c0)](_0x17babb(0x1b0)),_0x48911a=document[_0x17babb(0x1c0)](_0x17babb(0x10f)),_0x3e8435=document[_0x17babb(0x1c0)](_0x17babb(0xfd)),_0x507441=document['getElementById'](_0x17babb(0x1ec));let _0x23e963=null,_0x45a4dc=null;_0x2fbe13[_0x17babb(0x14c)](_0x17babb(0x170),_0x3a1621=>{const _0x4c43b9=_0x17babb;_0x23e963=_0x3a1621[_0x4c43b9(0x17b)]['files'][0x0],_0x23e963?(_0x4f955d['textContent']=_0x23e963[_0x4c43b9(0xd6)],_0x4f955d['title']=_0x23e963[_0x4c43b9(0xd6)]):_0x4f955d[_0x4c43b9(0x151)]=_0x4c43b9(0x17e);}),_0x4dd4bc[_0x17babb(0x14c)](_0x17babb(0x1bb),async()=>{const _0x4898f7=_0x17babb;if(!_0x23e963){toastr[_0x4898f7(0x1bc)](_0x4898f7(0x175));return;}let _0x40894c=0x0;const _0x46806b=_0x223bb0[_0x4898f7(0x149)](_0x23e963),_0xbcf9a5=_0x223bb0[_0x4898f7(0x1d7)](_0x46806b);if(_0xbcf9a5){const _0x2a4ed6=(_0xbcf9a5['processedChunks']/_0xbcf9a5[_0x4898f7(0x11e)]*0x64)[_0x4898f7(0x197)](0x1),_0x328119=confirm(_0x4898f7(0x209)+_0x2a4ed6+'%。是否从上次中断之处继续?');_0x328119?(_0x40894c=_0xbcf9a5[_0x4898f7(0x18f)],toastr['info'](_0x4898f7(0x122)+(_0x40894c+0x1)+'\x20块继续录入。',_0x4898f7(0xe6)),log('[断点续传]\x20用户选择继续任务\x20'+_0x46806b+_0x4898f7(0xfc)+_0x40894c+_0x4898f7(0x20e),_0x4898f7(0x11a))):(_0x223bb0['clearJob'](_0x46806b),toastr[_0x4898f7(0x11a)]('遵命,将从头开始录入此书。',_0x4898f7(0xe6)),log('[断点续传]\x20用户选择放弃旧任务\x20'+_0x46806b+',重新开始。','warn'));}_0x45a4dc=new AbortController();const _0x363495=_0x45a4dc[_0x4898f7(0x113)];_0x507441[_0x4898f7(0x13b)][_0x4898f7(0x166)]=_0x4898f7(0x14d),_0x4ba88f['style'][_0x4898f7(0x166)]=_0x4898f7(0xe5),_0x3e8435[_0x4898f7(0x151)]=_0x4898f7(0x101),_0x48911a[_0x4898f7(0x194)]=0x0;try{const _0x53d3cc=await _0x23e963[_0x4898f7(0x1ac)](),_0x1583b4=_0x5ce48d=>{const _0x360e6f=_0x4898f7;_0x3e8435[_0x360e6f(0x151)]=_0x360e6f(0x1b1)+_0x5ce48d[_0x360e6f(0x1c7)]+'\x20('+_0x5ce48d[_0x360e6f(0xc8)]+'/'+_0x5ce48d[_0x360e6f(0x129)]+')',_0x48911a[_0x360e6f(0x194)]=_0x5ce48d[_0x360e6f(0xc8)]/_0x5ce48d[_0x360e6f(0x129)]*0x64;},_0x538243=()=>{const _0x4fa87b=_0x4898f7;updatePanelStatus(),log(_0x4fa87b(0x12f),_0x4fa87b(0x11a));},_0x4a5d3d=await _0x488321[_0x4898f7(0xea)](_0x53d3cc,_0x4898f7(0x1d1),_0x23e963['name'],_0x1583b4,_0x363495,log,_0x538243,_0x46806b,_0x40894c);if(_0x4a5d3d['success'])toastr[_0x4898f7(0xc4)]('成功录入\x20'+_0x4a5d3d[_0x4898f7(0x161)]+_0x4898f7(0xf0)),_0x3e8435[_0x4898f7(0x151)]=_0x4898f7(0x1f2)+_0x4a5d3d[_0x4898f7(0x161)]+_0x4898f7(0x1a3),_0x48911a[_0x4898f7(0x194)]=0x64,updatePanelStatus();else throw new Error(_0x4a5d3d[_0x4898f7(0xf5)]||_0x4898f7(0xe9));}catch(_0x42503c){_0x42503c[_0x4898f7(0xd6)]===_0x4898f7(0x132)?(toastr['info'](_0x4898f7(0x15d)),_0x3e8435[_0x4898f7(0x151)]=_0x4898f7(0x1c8)):(toastr[_0x4898f7(0xf5)](_0x4898f7(0x126)+_0x42503c[_0x4898f7(0x1c7)]+_0x4898f7(0x215)),_0x3e8435[_0x4898f7(0x151)]=_0x4898f7(0x1db)+_0x42503c[_0x4898f7(0x1c7)]);}finally{setTimeout(()=>{const _0x50683c=_0x4898f7;_0x507441[_0x50683c(0x13b)]['display']=_0x50683c(0x200),_0x4ba88f[_0x50683c(0x13b)]['display']=_0x50683c(0x14d),_0x2fbe13[_0x50683c(0x194)]='',_0x23e963=null,_0x4f955d[_0x50683c(0x151)]=_0x50683c(0x17e);},0xbb8);}}),_0x412370[_0x17babb(0x14c)]('click',()=>{const _0x4d41ff=_0x17babb;_0x45a4dc&&_0x45a4dc[_0x4d41ff(0x165)]();});}function bindSessionLockEvent(){const _0x2f6cd6=_0x5589d6,_0x5bc9ed=document[_0x2f6cd6(0x1c0)](_0x2f6cd6(0x15c));if(!_0x5bc9ed)return;_0x5bc9ed[_0x2f6cd6(0x14c)]('click',()=>{const _0x171026=_0x2f6cd6,_0x3c2265=_0x488321['toggleSessionLock']();updateSessionLockUI(_0x3c2265);if(_0x3c2265){const _0x226ce7=_0x488321['getLockedSessionInfo']();toastr[_0x171026(0xc4)]('会话已锁定到:\x20'+_0x226ce7['id'],'圣旨已下'),log(_0x171026(0x109)+_0x226ce7['id'],_0x171026(0xc4));}else toastr[_0x171026(0x11a)](_0x171026(0x115),'诏曰'),log(_0x171026(0x16f),_0x171026(0x11a));updatePanelStatus();}),updateSessionLockUI(_0x488321[_0x2f6cd6(0xf3)]());}function updateSessionLockUI(_0x25443d){const _0x4319e3=_0x5589d6,_0x1c949c=document['getElementById']('hly-session-lock-btn');if(!_0x1c949c)return;const _0x42006c=_0x1c949c[_0x4319e3(0x1fc)]('i'),_0x4df7fc=_0x1c949c[_0x4319e3(0x1fc)](_0x4319e3(0x212));_0x25443d?(_0x1c949c[_0x4319e3(0x168)][_0x4319e3(0xca)]('active'),_0x42006c[_0x4319e3(0x137)]=_0x4319e3(0x1e1),_0x4df7fc[_0x4319e3(0x151)]=_0x4319e3(0xf7),_0x1c949c[_0x4319e3(0x20c)]=_0x4319e3(0x169)):(_0x1c949c[_0x4319e3(0x168)][_0x4319e3(0x186)](_0x4319e3(0x18b)),_0x42006c[_0x4319e3(0x137)]=_0x4319e3(0xbd),_0x4df7fc[_0x4319e3(0x151)]='锁定会话',_0x1c949c['title']=_0x4319e3(0x193));}function bindPanelToggleEvents(){const _0x3bf840=_0x5589d6,_0x4bb12e=document[_0x3bf840(0x1c0)]('amily2_open_rag_palace');if(_0x4bb12e){}}function bindTutorialEvents(){const _0x4fd43e=_0x5589d6,_0x1db727=document['getElementById']('amily2_open_hanlin_tutorial');_0x1db727&&_0x1db727['addEventListener'](_0x4fd43e(0x1bb),()=>{const _0x3223ab=_0x4fd43e;showContentModal(_0x3223ab(0x153),_0x3223ab(0xb1));});}function bindInternalUIEvents(){const _0x190933=_0x5589d6,_0x1576fb=document['querySelectorAll'](_0x190933(0x190));_0x1576fb[_0x190933(0x189)](_0xba13ef=>{const _0x3855ca=_0x190933;_0xba13ef[_0x3855ca(0x14c)]('click',()=>{const _0x1dc2d6=_0x3855ca,_0xcec30=_0xba13ef[_0x1dc2d6(0x105)][_0x1dc2d6(0x19a)],_0x49fbbb='hly-'+_0xcec30+'-tab';document['querySelectorAll']('.hly-tab-pane')[_0x1dc2d6(0x189)](_0x5037cd=>{const _0x12d9fd=_0x1dc2d6;_0x5037cd[_0x12d9fd(0x168)][_0x12d9fd(0x14e)]('active',_0x5037cd['id']===_0x49fbbb);}),_0x1576fb[_0x1dc2d6(0x189)](_0x2d6dc1=>_0x2d6dc1['classList']['toggle']('active',_0x2d6dc1===_0xba13ef));});});const _0x155a49=document[_0x190933(0x1c0)]('hly-api-endpoint');_0x155a49&&_0x155a49[_0x190933(0x14c)](_0x190933(0x170),toggleCustomEndpointDocket);const _0x30f4c5=document[_0x190933(0x18e)](_0x190933(0xd7));_0x30f4c5[_0x190933(0x189)](_0x2661cc=>{const _0x5aeae2=_0x190933;_0x2661cc[_0x5aeae2(0x14c)](_0x5aeae2(0x170),toggleInjectionDetails);});const _0x9a78b=document['getElementById'](_0x190933(0xfa)),_0x2f498f=document[_0x190933(0x1c0)](_0x190933(0x13c));_0x9a78b&&_0x2f498f&&_0x9a78b[_0x190933(0x14c)](_0x190933(0x170),()=>{const _0x160db4=_0x190933;_0x2f498f[_0x160db4(0x13b)][_0x160db4(0x166)]=_0x9a78b[_0x160db4(0x1b9)]?_0x160db4(0xe5):_0x160db4(0x14d);});const _0x11a268=document[_0x190933(0x1c0)](_0x190933(0x119));_0x11a268&&_0x11a268[_0x190933(0x14c)](_0x190933(0x170),handleWorldbookSelectionChange);const _0x1c1262=document[_0x190933(0x1c0)]('hly-exclusion-rules-btn');_0x1c1262&&_0x1c1262[_0x190933(0x14c)]('click',showExclusionRulesModal);}function toggleInjectionDetails(){const _0x4eadae=_0x5589d6,_0x203edb=document[_0x4eadae(0x1fc)](_0x4eadae(0x13d))[_0x4eadae(0x194)],_0x4507a9=document['getElementById'](_0x4eadae(0x11b)),_0x29e484=document[_0x4eadae(0x1c0)](_0x4eadae(0x1e9)),_0x33a03c=_0x203edb==='1';_0x4507a9[_0x4eadae(0xbb)]=!_0x33a03c,_0x29e484[_0x4eadae(0xbb)]=!_0x33a03c;}function toggleCustomEndpointDocket(){const _0x326635=_0x5589d6,_0x3da337=document['getElementById'](_0x326635(0xc3))[_0x326635(0x194)],_0x479d55=document[_0x326635(0x1c0)](_0x326635(0xd3));_0x479d55&&(_0x479d55[_0x326635(0x13b)]['display']=_0x3da337===_0x326635(0x1ae)||_0x3da337==='azure'?'block':_0x326635(0x14d));}function _0xc393(){const _0x35a1bf=['正在为《','您确定要将所有设定恢复为出厂默认值吗?','novel','加载书库列表失败:\x20','hly-injection-template','开始获取模型列表...','此操作将彻底清空当前角色的所有忆识(向量),且无法恢复。您确定要继续吗?','key','loadProgress','condensation','hly-query-message-count','宝库已清空。','错误:\x20','getAvailableWorldbooks','position','scrollHeight','hly-locked-status','.hly-preview-delete-btn-v2','fas\x20fa-lock','\x20个模型。','fa-times-circle','.hly-exclusion-rule-row','正在采集消息...','user','1247481ujODVt','fetchRerankModels','hly-injection-role','无法获取总数,可能是由于数据量过大导致服务器API错误:\x20','finalText','hanlinyuan-ingest-novel-controls','110173riCXre','[翰林院-枢纽]\x20编纂过程发生错误:','437987zTvvYd','成功加载\x20','hly-delete-rule-btn','任务完成!成功录入\x20','rerank','fetchEmbeddingModels','embeddingModel','contains','\x20个Rerank模型。','未找到符合条件的消息。','\x20条忆识。','true','神力连接失败:\x20','querySelector','\x20条消息,开始凝识...','[data-setting-key]','根据标签提取或内容排除条件,未找到任何有效内容。','flex','hly-manual-text','预览后文本录入成功,新增\x20','hanlinyuan-ingest-novel-start','hly-rerank-hybrid-alpha','未找到符合条件的消息可供凝识。','\x20个书库。','hly-max-results','advanced','启禀大人,发现此书上次录入已完成\x20','manual','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20','336uTmuJl','hly-condensation-enabled','手动录入失败:\x20','target','getCollectionId','use\x20strict','未选择文件','.hly-preview-item-v2','scrollTop','settingKey','input',')\x20进行编纂...','condensation.exclusionRules','','remove','input[name=\x22','\x20条内容进行凝识:\x0a\x0a','forEach','[自动保存]\x20设置项\x20\x27','active','val','手动录入成功,新增\x20','querySelectorAll','processedChunks','.hly-nav-item','','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
在这里定义需要从提取内容中排除的文本片段。例如,排除HTML注释,可以设置开始字符为\x20``。
\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
','点击以锁定,让翰林院固定操作当前角色的宝库','value','宝库状态','url','toFixed','[翰林院-枢纽]\x20核心法典未能提供初始化圣旨!','type','tab','大功告成','from','\x20(Key:\x20','length','stringify','testHLYApi','\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20','map','\x20个知识块。','
','
','录入内容不能为空。','hybrid_alpha','hly-tag-input','\x0a忆识总数:\x20','hly-api-key','未知的编纂错误','text','join','custom','hly-log-entry\x20','hanlinyuan-ingest-progress-container','处理中:\x20','hly-include-ai','216SgkbHA','\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
×\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
\x0a\x20\x20\x20\x20\x20\x20\x20\x20','click','warning','getVectorCount','N/A\x20(数据量过大)','top_n','getElementById','hly-rerank-enabled','getSettings','boolean','tagExtractionEnabled','notify','hly-condensation-results','message','任务已中止。','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'];_0xc393=function(){return _0x35a1bf;};return _0xc393();}function loadSettingsToUI(){const _0x6b7569=_0x5589d6,_0x1aefa3=_0x488321['getSettings']();if(!_0x1aefa3)return;document[_0x6b7569(0x1c0)]('hly-retrieval-enabled')[_0x6b7569(0x1b9)]=_0x1aefa3[_0x6b7569(0x158)][_0x6b7569(0x12c)],document[_0x6b7569(0x1c0)](_0x6b7569(0xc3))[_0x6b7569(0x194)]=_0x1aefa3[_0x6b7569(0x158)]['apiEndpoint'],document[_0x6b7569(0x1c0)](_0x6b7569(0xe8))[_0x6b7569(0x194)]=_0x1aefa3['retrieval']['customApiUrl'],document[_0x6b7569(0x1c0)](_0x6b7569(0x1aa))['value']=_0x1aefa3['retrieval']['apiKey'];const _0xf0384e=document[_0x6b7569(0x1c0)](_0x6b7569(0x1b7));if(_0xf0384e[_0x6b7569(0x106)]['length']===0x0){const _0x5431eb=_0x1aefa3[_0x6b7569(0x158)][_0x6b7569(0x1f5)],_0x117865=new Option(_0x5431eb,_0x5431eb,!![],!![]);_0xf0384e['add'](_0x117865);}_0xf0384e['value']=_0x1aefa3[_0x6b7569(0x158)][_0x6b7569(0x1f5)],document['getElementById'](_0x6b7569(0x10b))[_0x6b7569(0x1b9)]=_0x1aefa3[_0x6b7569(0x158)][_0x6b7569(0x1c5)],document[_0x6b7569(0x1c0)](_0x6b7569(0x143))[_0x6b7569(0x194)]=_0x1aefa3[_0x6b7569(0x208)]['chunkSize'],document[_0x6b7569(0x1c0)]('hly-overlap-size')[_0x6b7569(0x194)]=_0x1aefa3[_0x6b7569(0x208)][_0x6b7569(0xb0)],document['getElementById'](_0x6b7569(0x121))['value']=_0x1aefa3[_0x6b7569(0x208)][_0x6b7569(0x15b)],document[_0x6b7569(0x1c0)](_0x6b7569(0x1d9))[_0x6b7569(0x194)]=_0x1aefa3[_0x6b7569(0x208)][_0x6b7569(0x218)],document[_0x6b7569(0x1c0)](_0x6b7569(0x207))[_0x6b7569(0x194)]=_0x1aefa3[_0x6b7569(0x208)]['maxResults'],document[_0x6b7569(0x1c0)](_0x6b7569(0xb2))[_0x6b7569(0x194)]=_0x1aefa3[_0x6b7569(0x158)]['batchSize'],document[_0x6b7569(0x1c0)](_0x6b7569(0x1d3))[_0x6b7569(0x194)]=_0x1aefa3[_0x6b7569(0x145)][_0x6b7569(0xf4)];const _0x4bf599=document[_0x6b7569(0x1fc)]('input[name=\x22hly-injection-position\x22][value=\x22'+_0x1aefa3[_0x6b7569(0x145)][_0x6b7569(0x1dd)]+'\x22]');_0x4bf599&&(_0x4bf599[_0x6b7569(0x1b9)]=!![]);document['getElementById'](_0x6b7569(0x11b))[_0x6b7569(0x194)]=_0x1aefa3[_0x6b7569(0x145)]['depth'],document[_0x6b7569(0x1c0)](_0x6b7569(0x1e9))[_0x6b7569(0x194)]=_0x1aefa3['injection'][_0x6b7569(0x16b)],toggleInjectionDetails(),document[_0x6b7569(0x1c0)](_0x6b7569(0x179))[_0x6b7569(0x1b9)]=_0x1aefa3[_0x6b7569(0x1d8)][_0x6b7569(0x12c)],document[_0x6b7569(0x1c0)](_0x6b7569(0x111))[_0x6b7569(0x194)]=_0x1aefa3[_0x6b7569(0x1d8)][_0x6b7569(0xb9)],document[_0x6b7569(0x1c0)](_0x6b7569(0x13e))[_0x6b7569(0x194)]=_0x1aefa3[_0x6b7569(0x1d8)][_0x6b7569(0x176)],document[_0x6b7569(0x1c0)](_0x6b7569(0xc7))[_0x6b7569(0x1b9)]=_0x1aefa3[_0x6b7569(0x1d8)][_0x6b7569(0x107)][_0x6b7569(0x1e6)],document['getElementById'](_0x6b7569(0x1b2))['checked']=_0x1aefa3[_0x6b7569(0x1d8)]['messageTypes']['ai'];const _0x40ede2=document[_0x6b7569(0x1c0)](_0x6b7569(0xfa)),_0x433d99=document[_0x6b7569(0x1c0)](_0x6b7569(0x1a8)),_0x4e77c6=document[_0x6b7569(0x1c0)]('hly-tag-input-container');_0x40ede2[_0x6b7569(0x1b9)]=_0x1aefa3[_0x6b7569(0x1d8)][_0x6b7569(0x1c4)],_0x433d99['value']=_0x1aefa3['condensation']['tags'],_0x4e77c6[_0x6b7569(0x13b)][_0x6b7569(0x166)]=_0x40ede2[_0x6b7569(0x1b9)]?_0x6b7569(0xe5):_0x6b7569(0x14d),document['getElementById'](_0x6b7569(0x1c1))[_0x6b7569(0x1b9)]=_0x1aefa3[_0x6b7569(0x1f3)][_0x6b7569(0x12c)],document[_0x6b7569(0x1c0)](_0x6b7569(0x10e))['value']=_0x1aefa3[_0x6b7569(0x1f3)][_0x6b7569(0x196)],document[_0x6b7569(0x1c0)](_0x6b7569(0x130))[_0x6b7569(0x194)]=_0x1aefa3[_0x6b7569(0x1f3)]['apiKey'];const _0x54b6f7=document[_0x6b7569(0x1c0)](_0x6b7569(0xbc));if(_0x54b6f7[_0x6b7569(0x106)][_0x6b7569(0x19e)]===0x0){const _0x4da2cf=_0x1aefa3[_0x6b7569(0x1f3)][_0x6b7569(0x123)];if(_0x4da2cf){const _0x99318d=new Option(_0x4da2cf,_0x4da2cf,!![],!![]);_0x54b6f7[_0x6b7569(0xca)](_0x99318d);}}_0x54b6f7[_0x6b7569(0x194)]=_0x1aefa3[_0x6b7569(0x1f3)]['model'],document[_0x6b7569(0x1c0)](_0x6b7569(0x1b6))[_0x6b7569(0x194)]=_0x1aefa3['rerank'][_0x6b7569(0x1bf)],document['getElementById'](_0x6b7569(0x204))[_0x6b7569(0x194)]=_0x1aefa3[_0x6b7569(0x1f3)][_0x6b7569(0x1a7)],document[_0x6b7569(0x1c0)](_0x6b7569(0x128))[_0x6b7569(0x1b9)]=_0x1aefa3['rerank'][_0x6b7569(0x1c5)],toggleCustomEndpointDocket();}function saveSettingsFromUI(_0x5a461f=!![]){const _0x5f1c45=_0x5589d6,_0xd46350=document[_0x5f1c45(0x1c0)](_0x5f1c45(0xe7));if(!_0xd46350)return;const _0x38adf7=_0xd46350[_0x5f1c45(0x18e)](_0x5f1c45(0x1fe));_0x38adf7[_0x5f1c45(0x189)](_0x4757e4=>{const _0x4bb532=_0x5f1c45,_0x4d8772=_0x4757e4[_0x4bb532(0x105)]['settingKey'];if(!_0x4d8772)return;let _0x56d4cc;const _0x4a9fb4=_0x4757e4[_0x4bb532(0x105)][_0x4bb532(0x199)]||_0x4bb532(0xcd);if(_0x4757e4[_0x4bb532(0x199)]===_0x4bb532(0x148))_0x56d4cc=_0x4757e4[_0x4bb532(0x1b9)];else{if(_0x4757e4['type']===_0x4bb532(0xb7)){if(!_0x4757e4[_0x4bb532(0x1b9)])return;_0x56d4cc=_0x4757e4[_0x4bb532(0x194)];}else _0x56d4cc=_0x4757e4[_0x4bb532(0x194)];}switch(_0x4a9fb4){case _0x4bb532(0x141):_0x56d4cc=parseInt(_0x56d4cc,0xa);break;case'float':_0x56d4cc=parseFloat(_0x56d4cc);break;case _0x4bb532(0x1c3):if(typeof _0x56d4cc!==_0x4bb532(0x1c3))_0x56d4cc=_0x56d4cc===_0x4bb532(0x1fa);break;}const _0x45a21c=_0x488321[_0x4bb532(0x1c2)](),_0x3e179d=_0x4d8772[_0x4bb532(0xd8)]('.');let _0x5d8ac5=_0x45a21c;for(let _0x14ae7a=0x0;_0x14ae7a<_0x3e179d['length']-0x1;_0x14ae7a++){_0x5d8ac5=_0x5d8ac5[_0x3e179d[_0x14ae7a]]=_0x5d8ac5[_0x3e179d[_0x14ae7a]]||{};}_0x5d8ac5[_0x3e179d[_0x3e179d[_0x4bb532(0x19e)]-0x1]]=_0x56d4cc;}),_0x488321[_0x5f1c45(0xdf)](),!_0x5a461f&&(log(_0x5f1c45(0xb4),_0x5f1c45(0xc4)),toastr[_0x5f1c45(0xc4)]('翰林院设定已存档封印。',_0x5f1c45(0xe6)));}function resetSettingsToUI(){const _0x523af8=_0x5589d6;confirm(_0x523af8(0x1d0))&&(_0x488321['resetSettings'](),loadSettingsToUI(),toastr[_0x523af8(0x11a)]('翰林院设定已重置为初始状态。','诏曰'));}async function updatePanelStatus(){const _0x22cc9e=_0x5589d6,_0x390bd4=_0x488321[_0x22cc9e(0xf3)](),_0x31a512=document[_0x22cc9e(0x1c0)](_0x22cc9e(0xd9)),_0x5713d6=document[_0x22cc9e(0x1c0)]('hly-current-chat-id');if(_0x390bd4){const _0x2820cf=_0x488321[_0x22cc9e(0x114)]();_0x31a512['textContent']='会话已锁定',_0x5713d6['textContent']=_0x2820cf['id'],_0x5713d6['title']=_0x22cc9e(0x112)+_0x2820cf['id'],_0x31a512['classList'][_0x22cc9e(0xca)](_0x22cc9e(0x1df)),_0x5713d6[_0x22cc9e(0x168)]['add'](_0x22cc9e(0x1df));}else _0x31a512[_0x22cc9e(0x151)]=_0x1ab3b1[_0x22cc9e(0x16d)](),_0x5713d6[_0x22cc9e(0x151)]=_0x1ab3b1[_0x22cc9e(0xf8)]()||'无',_0x5713d6[_0x22cc9e(0x20c)]='',_0x31a512['classList'][_0x22cc9e(0x186)]('hly-locked-status'),_0x5713d6[_0x22cc9e(0x168)][_0x22cc9e(0x186)](_0x22cc9e(0x1df));const _0x33e606=document['getElementById'](_0x22cc9e(0x14f));_0x33e606[_0x22cc9e(0x151)]=_0x22cc9e(0xf2);try{const _0x171151=await _0x488321[_0x22cc9e(0x1bd)]();_0x33e606[_0x22cc9e(0x151)]=_0x171151;}catch(_0x383033){console[_0x22cc9e(0xf5)]('[翰林院-枢纽]\x20更新忆识数量失败:',_0x383033),_0x33e606[_0x22cc9e(0x151)]=_0x22cc9e(0x1be),_0x33e606['title']=_0x22cc9e(0x1ea)+_0x383033['message'];}}async function testApi(){const _0x4876a5=_0x5589d6;toastr[_0x4876a5(0x11a)]('正在测试神力连接...','圣旨');try{await _0x488321['testApiConnection'](),toastr[_0x4876a5(0xc4)](_0x4876a5(0x108),'圣意');}catch(_0x16a95){toastr[_0x4876a5(0xf5)](_0x4876a5(0x1fb)+_0x16a95[_0x4876a5(0x1c7)],'警报');}}async function fetchHLYEmbeddingModels(){const _0x3334c0=_0x5589d6,_0x4c8a92=document[_0x3334c0(0x1c0)](_0x3334c0(0x1b7)),_0x2eb19f=_0x4c8a92[_0x3334c0(0x194)];_0x4c8a92[_0x3334c0(0xb8)]=_0x3334c0(0x135),_0x4c8a92['disabled']=!![];try{log(_0x3334c0(0x1d4),_0x3334c0(0x11a));const _0x34e15b=await _0x488321[_0x3334c0(0x1f4)]();_0x4c8a92[_0x3334c0(0xb8)]='';if(_0x34e15b[_0x3334c0(0x19e)]===0x0){_0x4c8a92[_0x3334c0(0xb8)]=_0x3334c0(0x172),toastr['warn']('未能获取到任何模型。',_0x3334c0(0x116)),log(_0x3334c0(0x150),_0x3334c0(0x1cd));return;}_0x34e15b['forEach'](_0x529214=>{const _0x3b6500=_0x3334c0,_0x4aa034=new Option(_0x529214,_0x529214);_0x4c8a92[_0x3b6500(0xca)](_0x4aa034);}),_0x34e15b['includes'](_0x2eb19f)?_0x4c8a92[_0x3334c0(0x194)]=_0x2eb19f:_0x4c8a92[_0x3334c0(0x12e)]=0x0,toastr[_0x3334c0(0xc4)](_0x3334c0(0x159)+_0x34e15b[_0x3334c0(0x19e)]+_0x3334c0(0x1e2),'圣意'),log(_0x3334c0(0x159)+_0x34e15b[_0x3334c0(0x19e)]+'\x20个模型。',_0x3334c0(0xc4));}catch(_0x108f5a){console['error']('[翰林院-枢纽]\x20获取模型列表失败:',_0x108f5a),toastr['error']('获取模型失败:\x20'+_0x108f5a[_0x3334c0(0x1c7)],_0x3334c0(0xef)),log('获取模型失败:\x20'+_0x108f5a[_0x3334c0(0x1c7)],_0x3334c0(0xf5)),_0x4c8a92['innerHTML']=_0x3334c0(0xda);}finally{_0x4c8a92['disabled']=![];}}async function fetchHLYRerankModels(){const _0x16ada5=_0x5589d6,_0x333989=document[_0x16ada5(0x1c0)](_0x16ada5(0xbc)),_0x3fbfa6=_0x333989[_0x16ada5(0x194)];_0x333989[_0x16ada5(0xb8)]=_0x16ada5(0x135),_0x333989[_0x16ada5(0xbb)]=!![];try{log(_0x16ada5(0x217),_0x16ada5(0x11a));const _0x513f52=await _0x488321[_0x16ada5(0x1e8)]();_0x333989['innerHTML']='';if(_0x513f52['length']===0x0){_0x333989['innerHTML']=_0x16ada5(0x172),toastr[_0x16ada5(0x1cd)](_0x16ada5(0x162),_0x16ada5(0x116)),log(_0x16ada5(0x162),'warn');return;}_0x513f52[_0x16ada5(0x189)](_0x3061f0=>{const _0x1a512f=_0x16ada5,_0x1199f0=new Option(_0x3061f0,_0x3061f0);_0x333989[_0x1a512f(0xca)](_0x1199f0);}),_0x513f52[_0x16ada5(0x163)](_0x3fbfa6)?_0x333989[_0x16ada5(0x194)]=_0x3fbfa6:_0x333989[_0x16ada5(0x12e)]=0x0,toastr[_0x16ada5(0xc4)](_0x16ada5(0x159)+_0x513f52[_0x16ada5(0x19e)]+_0x16ada5(0x1f7),'圣意'),log(_0x16ada5(0x159)+_0x513f52[_0x16ada5(0x19e)]+'\x20个Rerank模型。',_0x16ada5(0xc4));}catch(_0xd12c93){console[_0x16ada5(0xf5)](_0x16ada5(0xdc),_0xd12c93),toastr[_0x16ada5(0xf5)](_0x16ada5(0xee)+_0xd12c93[_0x16ada5(0x1c7)],_0x16ada5(0xef)),log(_0x16ada5(0xee)+_0xd12c93[_0x16ada5(0x1c7)],'error'),_0x333989[_0x16ada5(0xb8)]='';}finally{_0x333989['disabled']=![];}}async function purgeStorage(){const _0x33f121=_0x5589d6;if(confirm(_0x33f121(0x1d5))){toastr['info'](_0x33f121(0xbe),'圣旨');const _0x5e815e=await _0x488321['purgeStorage']();_0x5e815e?toastr[_0x33f121(0xc4)](_0x33f121(0x1da),'圣意'):toastr[_0x33f121(0xf5)](_0x33f121(0x20d),'警报'),await updatePanelStatus();}}async function startCondensation(){const _0x2f0233=_0x5589d6,_0x310daa=document[_0x2f0233(0x1c0)]('hly-condensation-results'),_0x71d8a5=_0x310daa[_0x2f0233(0x105)]['finalText'];try{if(_0x71d8a5&&_0x71d8a5[_0x2f0233(0xeb)]()){log(_0x2f0233(0x20f),_0x2f0233(0x11a)),toastr[_0x2f0233(0x11a)](_0x2f0233(0x147),'圣旨'),_0x310daa['textContent']=_0x2f0233(0xdb);const _0x3943fd=await _0x488321['ingestTextToHanlinyuan'](_0x71d8a5);if(_0x3943fd['success'])toastr[_0x2f0233(0xc4)](_0x2f0233(0xff)+_0x3943fd[_0x2f0233(0x161)]+_0x2f0233(0x1f9),_0x2f0233(0x19b)),log(_0x2f0233(0x202)+_0x3943fd[_0x2f0233(0x161)]+_0x2f0233(0x1f9),_0x2f0233(0xc4)),_0x310daa[_0x2f0233(0x151)]=_0x2f0233(0x155)+_0x3943fd[_0x2f0233(0x161)]+_0x2f0233(0x1f9),delete _0x310daa['dataset'][_0x2f0233(0x1eb)];else throw new Error(_0x3943fd[_0x2f0233(0xf5)]||_0x2f0233(0xe9));}else{_0x310daa[_0x2f0233(0x151)]=_0x2f0233(0x1e5),toastr[_0x2f0233(0x11a)](_0x2f0233(0x10c),'圣旨'),log(_0x2f0233(0xd0),_0x2f0233(0x11a));const _0x525e80=_0x488321[_0x2f0233(0x173)]();if(!_0x525e80||_0x525e80[_0x2f0233(0x19e)]===0x0){toastr['warning'](_0x2f0233(0x205),_0x2f0233(0x116)),_0x310daa[_0x2f0233(0x151)]=_0x2f0233(0x1f8);return;}_0x310daa['textContent']=_0x2f0233(0xf6)+_0x525e80[_0x2f0233(0x19e)]+_0x2f0233(0x1fd),toastr[_0x2f0233(0x11a)]('已采集\x20'+_0x525e80[_0x2f0233(0x19e)]+_0x2f0233(0x1fd),_0x2f0233(0x116));const _0x16629e=await _0x488321[_0x2f0233(0xd5)](_0x525e80,log);if(_0x16629e['success'])toastr[_0x2f0233(0xc4)](_0x2f0233(0x155)+_0x16629e['count']+_0x2f0233(0x1f9),_0x2f0233(0x19b)),_0x310daa[_0x2f0233(0x151)]='凝识完成!新增\x20'+_0x16629e['count']+_0x2f0233(0x1f9);else throw new Error(_0x16629e[_0x2f0233(0xf5)]||_0x2f0233(0xe9));}}catch(_0x17c847){console[_0x2f0233(0xf5)]('[翰林院-枢纽]\x20凝识过程发生错误:',_0x17c847),toastr[_0x2f0233(0xf5)]('凝识失败:\x20'+_0x17c847[_0x2f0233(0x1c7)],_0x2f0233(0xef)),_0x310daa['textContent']=_0x2f0233(0x11f)+_0x17c847[_0x2f0233(0x1c7)];}finally{await updatePanelStatus();}}async function loadWorldbookList(){const _0x1ea523=_0x5589d6,_0x281e03=document[_0x1ea523(0x1c0)](_0x1ea523(0x119));if(!_0x281e03)return;try{log(_0x1ea523(0x164),'info');const _0x2e8775=await _0x114fcd[_0x1ea523(0x1dc)]();_0x281e03[_0x1ea523(0xb8)]=_0x1ea523(0xb6);if(_0x2e8775[_0x1ea523(0x19e)]===0x0){_0x281e03[_0x1ea523(0xb8)]=_0x1ea523(0x185);return;}_0x2e8775[_0x1ea523(0x189)](_0x121cdd=>{const _0x45d5c6=_0x1ea523,_0x4e5907=new Option(_0x121cdd,_0x121cdd);_0x281e03[_0x45d5c6(0xca)](_0x4e5907);}),log(_0x1ea523(0x1f0)+_0x2e8775['length']+_0x1ea523(0x206),_0x1ea523(0xc4));}catch(_0x17b2f1){console[_0x1ea523(0xf5)]('[翰林院-枢纽]\x20加载书库列表失败:',_0x17b2f1),log(_0x1ea523(0x1d2)+_0x17b2f1['message'],_0x1ea523(0xf5)),_0x281e03[_0x1ea523(0xb8)]='';}}async function handleWorldbookSelectionChange(){const _0x4ef148=_0x5589d6,_0x4430a9=document[_0x4ef148(0x1c0)](_0x4ef148(0x119)),_0x229dc8=document[_0x4ef148(0x1c0)](_0x4ef148(0xe0)),_0x2451cd=_0x4430a9['value'];_0x229dc8[_0x4ef148(0xb8)]=_0x4ef148(0x1a5),_0x229dc8[_0x4ef148(0xbb)]=!![];if(!_0x2451cd){_0x229dc8[_0x4ef148(0xb8)]=_0x4ef148(0x191);return;}try{log(_0x4ef148(0x1cf)+_0x2451cd+_0x4ef148(0x152),_0x4ef148(0x11a));const _0x51e653=await _0x114fcd[_0x4ef148(0xb5)](_0x2451cd);_0x229dc8[_0x4ef148(0xb8)]=_0x4ef148(0xba);if(_0x51e653[_0x4ef148(0x19e)]===0x0){_0x229dc8['innerHTML']=_0x4ef148(0x157);return;}_0x51e653[_0x4ef148(0x189)](_0x3a7c63=>{const _0x554d0b=_0x4ef148,_0x1398a4=new Option(_0x3a7c63[_0x554d0b(0x11d)]+_0x554d0b(0x19d)+_0x3a7c63['key']+')',_0x3a7c63[_0x554d0b(0x1d6)]);_0x229dc8[_0x554d0b(0xca)](_0x1398a4);}),log('成功加载\x20'+_0x51e653[_0x4ef148(0x19e)]+_0x4ef148(0x11c),_0x4ef148(0xc4));}catch(_0x5e308d){console['error'](_0x4ef148(0xe4)+_0x2451cd+'》的条目失败:',_0x5e308d),log(_0x4ef148(0x171)+_0x5e308d['message'],_0x4ef148(0xf5)),_0x229dc8[_0x4ef148(0xb8)]='';}finally{_0x229dc8[_0x4ef148(0xbb)]=![];}}async function startHistoriography(){const _0x143d9c=_0x5589d6,_0x341650=document['getElementById']('hly-hist-select-library')[_0x143d9c(0x194)],_0x91eac3=document[_0x143d9c(0x1c0)]('hly-hist-select-entry')[_0x143d9c(0x194)],_0x15fb01=document[_0x143d9c(0x1c0)]('hly-historiography-results');if(!_0x341650||!_0x91eac3){toastr['warning'](_0x143d9c(0xcf),'圣谕不明');return;}_0x15fb01[_0x143d9c(0x151)]='准备对《'+_0x341650+_0x143d9c(0xfe)+_0x91eac3+_0x143d9c(0x183),toastr['info'](_0x143d9c(0x211),'圣旨'),log('开始对《'+_0x341650+'》-'+_0x91eac3+_0x143d9c(0x1ca),_0x143d9c(0x11a));try{const _0x3e943f=await _0x114fcd[_0x143d9c(0xe3)](_0x341650,_0x91eac3);if(_0x3e943f[_0x143d9c(0xc4)]){const _0x1f3f1b='对《'+_0x341650+_0x143d9c(0x12a)+_0x91eac3+')\x20的编纂任务已完成。';_0x15fb01['textContent']=_0x3e943f[_0x143d9c(0xc1)],toastr['success'](_0x143d9c(0xde),_0x143d9c(0x19b)),log(_0x1f3f1b,_0x143d9c(0xc4));}else throw new Error(_0x3e943f[_0x143d9c(0xf5)]||_0x143d9c(0x1ab));}catch(_0xcaafd3){console[_0x143d9c(0xf5)](_0x143d9c(0x1ee),_0xcaafd3),toastr[_0x143d9c(0xf5)](_0x143d9c(0xfb)+_0xcaafd3[_0x143d9c(0x1c7)],_0x143d9c(0xef)),_0x15fb01[_0x143d9c(0x151)]='编纂失败:\x20'+_0xcaafd3['message'];}}async function showStats(){const _0x4d9f2b=_0x5589d6;try{log(_0x4d9f2b(0xd2),_0x4d9f2b(0x11a)),toastr[_0x4d9f2b(0x11a)]('正在查询宝库状态...','圣旨');const _0x156b70=await _0x488321[_0x4d9f2b(0x1bd)](),_0x56122e=_0x488321[_0x4d9f2b(0x17c)](),_0x39e6e6=_0x488321['getSettings'](),_0x343c1d=_0x4d9f2b(0xc6)+_0x56122e+_0x4d9f2b(0x1a9)+_0x156b70+_0x4d9f2b(0xcb)+_0x39e6e6[_0x4d9f2b(0x158)][_0x4d9f2b(0xbf)]+'\x0a所用模型:\x20'+_0x39e6e6['retrieval'][_0x4d9f2b(0x1f5)]+_0x4d9f2b(0x1a1);toastr[_0x4d9f2b(0x11a)](_0x343c1d,_0x4d9f2b(0x195),{'timeOut':0x3a98,'extendedTimeOut':0x1388,'tapToDismiss':!![],'closeButton':!![]}),log(_0x4d9f2b(0xd1)+_0x56122e+',\x20忆识总数='+_0x156b70,_0x4d9f2b(0xc4));}catch(_0x38b6b7){console[_0x4d9f2b(0xf5)]('[翰林院-枢纽]\x20查询宝库状态失败:',_0x38b6b7),toastr[_0x4d9f2b(0xf5)](_0x4d9f2b(0x104)+_0x38b6b7[_0x4d9f2b(0x1c7)],_0x4d9f2b(0xef)),log(_0x4d9f2b(0x104)+_0x38b6b7[_0x4d9f2b(0x1c7)],_0x4d9f2b(0xf5));}}function showExclusionRulesModal(){const _0x55671f=_0x5589d6,_0x56a266=_0x488321['getSettings'](),_0xb366ad=_0x56a266[_0x55671f(0x1d8)]['exclusionRules']||[],_0xc89ef=(_0x4bef0f={'start':'','end':''},_0x387458)=>_0x55671f(0xdd)+_0x387458+_0x55671f(0x1b4)+_0x4bef0f[_0x55671f(0x14a)]+'\x22\x20placeholder=\x22开始字符,\x20如\x20