mirror of
https://github.com/SilenceLurker/ST-Amily2-Chat-Optimisation.git
synced 2026-06-06 21:45:51 +00:00
2 lines
33 KiB
JavaScript
2 lines
33 KiB
JavaScript
const _0x17f21b=_0x5497;function _0x44ce(){const _0x388ce3=['远征中止','historiographySmallTriggerThreshold','loreKeywords','historiographyLargeJailbreakPrompt','圣谕有误','historiographyExclusionRules','远征军已在营中,无需下达停战敕令。','579414VQWYkT','\x0a\x0a---\x0a\x0a','ceil','》天机时出错:','push','change','正在将此份“微言录”送往翰林院...','historiographySmallSummaryPrompt','\x20楼】\x20','map','disable','[大史官]\x20自动微言录已触发,处理\x20','\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<summary>【第\x20','jailbreakPrompt','type','char','\x20条。','</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<style>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#historiography-preview-controls\x20{\x20margin-bottom:\x2010px;\x20display:\x20flex;\x20gap:\x2015px;\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#historiography-preview-container\x20{\x20height:\x2065vh;\x20overflow-y:\x20auto;\x20border:\x201px\x20solid\x20#444;\x20padding:\x205px;\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.historiography-message-item\x20{\x20margin-bottom:\x205px;\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.historiography-message-item[hidden]\x20{\x20display:\x20none;\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.historiography-message-item\x20summary\x20{\x20cursor:\x20pointer;\x20padding:\x205px;\x20background-color:\x20#333;\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.historiography-editor-container\x20{\x20padding:\x2010px;\x20border:\x201px\x20solid\x20#444;\x20border-top:\x20none;\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20.historiography-editor-container\x20textarea\x20{\x20height:\x20150px;\x20resize:\x20vertical;\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</style>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','dedicated','count','遵旨!正在为您重铸《','微言录\x20(手动)','user','】处理失败:\x20','当前角色未绑定主世界书,远征军无法开拔!','3013002nMHHaf','[大史官]\x20','写入国史馆时发生错误:\x20','.historiography-message-item','史册缺少【流水金印】,无法执行重铸。','</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22historiography-preview-container\x22>','请严格根据以下\x22对话记录\x22中的内容进行总结,不要添加任何额外信息。\x0a\x0a<对话记录>\x0a','split','log','远征完毕','\x20楼。','warning','values','info','宏史卷重铸失败','请将以下多个零散的\x22详细总结记录\x22提炼并融合成一段连贯的章节历史。原文如下:\x0a\x0a','historiographySmallJailbreakPrompt','historiographyWriteToLorebook','】内容为空。','\x0a\x0a【前','prop',',将执行标准保存。','val','条目【','批量入库失败:\x20','735780OSlRpX','重铸史册时发生严重错误:\x20','圣谕不明','historiographyAutoSummaryInteractive','find','2870235wTlJOS','disabled','world','\x20批次战役准备中...\x20(','characterId','[大史官-调试]\x20读取到的原始设置:','\x20-\x20国史馆','match','请至少选择一条消息进行总结!','join','lorebook','楼详细总结记录】\x0a','远征已遵从您的敕令暂停!随时可以【继续远征】。','当前角色未绑定主世界书。','》时出错:','prompt','楼总结已完成】否则后续总结无法进行。','[大史官]\x20加载混合顺序失败:','模型召唤失败','hidden','微言录\x20(自动)','</textarea>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</details>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','选定的楼层范围内无有效对话或内容被规则排除。','远征军已在途中,无需重复下令。','确认原文并总结','name2','模型未能返回有效的精炼内容。','操作已取消','name1','远征开始','slice','replace','\x20批次任务失败而中止。','lorebookTarget','\x20个条目进行批量编纂...','4626783qiNPAJ','data','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<details\x20class=\x22historiography-message-item\x22\x20data-author-type=\x22','以下内容是【1楼-','本批次总结已取消。','function','远征军已开拔!目标:','[大史官]\x20阅览《','historiographySmallAutoEnable','找不到指定的史册条目,重铸任务中止。','\x20/\x20','》中的【微言录合集】...','国库无新事','No\x20lore\x20keys\x20provided.','正在重新生成,请稍候...','remove','\x0a\x0a本条勿动【前','#hist-include-char','批量编纂期间发生部分错误,详情请查看控制台。','远征战役\x20(','each','author','\x20批次征服!','[大史官]\x20检阅《','写入国史馆失败:','chat','编年史已成功更新!','鸣金收兵','filter','操作已取消。','当前角色未绑定主世界书,无法为翰林院确定目标。','送往翰林院的文书处理失败:\x20','Amily2-Lore-','使用\x20TavernHelper\x20写入失败,请检查控制台日志。','amily2-expedition-state-change','historiographyLargeRefinePrompt','国史已是最新,远征军无需出动。','loreDepth','historiographyTags','楼篇章编撰已完成】','停战敕令已下达!远征军将在完成当前批次的任务后休整。','character_main','#historiography-preview-container','dispatchEvent','get','\x0a\x0a发生以下错误:\x0a-\x20','宏史卷向量化失败:\x20','宏史卷重铸操作已取消。','宏史卷总结:\x201-','》的数据。','success','message','warn','秒后接敌)','floor','conditional','extensions','system','正在为您熔铸对话历史...','宏史卷重铸','large_summary','翰林院已成功接收记忆碎片!','[大史官-宏史卷向量化]\x20失败:','keyed','【第\x20','\x20至\x20','】未找到。','史册已成功重铸,并保存于《','“写入史册”和“存入翰林院”均未启用,总结任务已完成但未保存。','[翰林院]\x20批量编纂错误详情:','coreContent','comment','圣谕传达','史册条目中没有新的内容可供重铸。','amily2_prompt_presets_v2_mixed_order','41435FphpWW','翰林院','mes','min','翰林院入库','loreActivationMode','content','#hist-include-user','楼以后的总结内容】','【敕史局】对话流水总帐','trim','loreInsertionPosition','authorType','\x0a\x0a---\x0a\x0a【','getItem','楼】已发生的剧情回顾。\x0a\x0a---\x0a\x0a','原文预览与编辑','遵旨!开始对《','批量编纂完成!\x0a成功处理\x20','error','圣谕悉知','国史馆','未知的史册写入指令。','[大史官-远征失败]','未知的史册写入目标,远征军无法开拔!','\x0a\x0a===【截止至第','checked','length','497141llBExs','自动巡录:未找到符合条件的消息。','parse','楼聊天记录总结已由翰林院向量化注入。)\x0a\x0a【以下内容为','\x0a</对话记录>','small_summary','textarea','正在召唤模型进行内容精炼...','summaryPrompt','楼的宏史卷】===\x0a\x0a','重新生成失败,已恢复原始内容。',':checked','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22historiography-preview-controls\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label><input\x20type=\x22checkbox\x22\x20id=\x22hist-include-user\x22\x20checked>\x20','结构异常','is_user','close','批量编纂大功告成!新增\x20','isArray','</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label><input\x20type=\x22checkbox\x22\x20id=\x22hist-include-char\x22\x20checked>\x20','》中的\x20','远征已在准备阶段遵令暂停!','[大史官-微言录]\x20AI回复的全部内容:','entries'];_0x44ce=function(){return _0x388ce3;};return _0x44ce();}(function(_0x2ea1f8,_0x186823){const _0x273dad=_0x5497,_0x3fc592=_0x2ea1f8();while(!![]){try{const _0x5845d6=-parseInt(_0x273dad(0xed))/0x1+-parseInt(_0x273dad(0x10b))/0x2+parseInt(_0x273dad(0x142))/0x3+parseInt(_0x273dad(0x13d))/0x4+-parseInt(_0x273dad(0xd1))/0x5+-parseInt(_0x273dad(0x124))/0x6+parseInt(_0x273dad(0x86))/0x7;if(_0x5845d6===_0x186823)break;else _0x3fc592['push'](_0x3fc592['shift']());}catch(_0x1cb19e){_0x3fc592['push'](_0x3fc592['shift']());}}}(_0x44ce,0x7b225));import{getContext,extension_settings}from'/scripts/extensions.js';import{characters}from'/script.js';import{extractBlocksByTags,applyExclusionRules}from'./utils/rag-tag-extractor.js';import{world_names,loadWorldInfo,createNewWorldInfo,createWorldInfoEntry,saveWorldInfo}from'/scripts/world-info.js';import{extensionName}from'../utils/settings.js';import{getChatIdentifier,writeToLorebookWithTavernHelper}from'./lore.js';import{ingestTextToHanlinyuan}from'./rag-processor.js';import{showSummaryModal,showHtmlModal}from'../ui/page-window.js';import{getPresetPrompts,getMixedOrder}from'../PresetSettings/index.js';import{callAI,generateRandomSeed}from'./api.js';let isExpeditionRunning=![],manualStopRequested=![];const RUNNING_LOG_COMMENT=_0x17f21b(0xda),PROGRESS_SEAL_REGEX=/本条勿动【前(\d+)楼总结已完成】否则后续总结无法进行。$/;async function readGoldenLedgerProgress(_0xe403c){const _0x59ba8f=_0x17f21b;if(!_0xe403c)return 0x0;try{const _0x171e4c=await loadWorldInfo(_0xe403c);if(!_0x171e4c||!_0x171e4c[_0x59ba8f(0x103)])return 0x0;const _0xb478e0=Object[_0x59ba8f(0x130)](_0x171e4c[_0x59ba8f(0x103)])['find'](_0x3d48fa=>_0x3d48fa[_0x59ba8f(0xcd)]===RUNNING_LOG_COMMENT&&!_0x3d48fa[_0x59ba8f(0x115)]);if(!_0xb478e0)return 0x0;const _0x3c442e=_0xb478e0[_0x59ba8f(0xd7)][_0x59ba8f(0x149)](PROGRESS_SEAL_REGEX);return _0x3c442e?parseInt(_0x3c442e[0x1],0xa):0x0;}catch(_0x559691){return console['error'](_0x59ba8f(0x8d)+_0xe403c+_0x59ba8f(0x10e),_0x559691),0x0;}}export async function checkAndTriggerAutoSummary(){const _0x395f1f=_0x17f21b;if(isExpeditionRunning)return;const _0x4fc49a=extension_settings[extensionName];if(!_0x4fc49a[_0x395f1f(0x8e)])return;const _0x2973b2=getContext();let _0x58b809=null;switch(_0x4fc49a['lorebookTarget']){case _0x395f1f(0xaf):_0x58b809=characters[_0x2973b2[_0x395f1f(0x146)]]?.[_0x395f1f(0x87)]?.[_0x395f1f(0xbe)]?.['world'];break;case _0x395f1f(0x11d):const _0x3ad858=await getChatIdentifier();_0x58b809=_0x395f1f(0xa6)+_0x3ad858;break;default:return;}if(!_0x58b809)return;const _0x3487f1=await readGoldenLedgerProgress(_0x58b809),_0x486ad9=_0x2973b2[_0x395f1f(0x9f)][_0x395f1f(0xec)],_0x27ee1f=_0x486ad9-_0x3487f1;if(_0x27ee1f>=_0x4fc49a[_0x395f1f(0x105)]+0x2){const _0x4236dc=_0x4fc49a[_0x395f1f(0x105)],_0x56ec38=_0x3487f1+0x1,_0xdf0850=Math[_0x395f1f(0xd4)](_0x3487f1+_0x4236dc,_0x486ad9);console[_0x395f1f(0x12c)](_0x395f1f(0x116)+_0x56ec38+_0x395f1f(0xc7)+_0xdf0850+_0x395f1f(0x12e));const _0x2b7d56=_0x4fc49a[_0x395f1f(0x140)]??![];await executeManualSummary(_0x56ec38,_0xdf0850,!_0x2b7d56);}}export async function getAvailableWorldbooks(){return[...world_names];}function _0x5497(_0x9b9a47,_0xf5dca6){const _0x44ce48=_0x44ce();return _0x5497=function(_0x549767,_0x9619b9){_0x549767=_0x549767-0x70;let _0x86b7be=_0x44ce48[_0x549767];return _0x86b7be;},_0x5497(_0x9b9a47,_0xf5dca6);}export async function getLoresForWorldbook(_0x381819){const _0x38cacd=_0x17f21b;if(!_0x381819)return[];try{const _0x3fdabf=await loadWorldInfo(_0x381819);if(!_0x3fdabf||!_0x3fdabf[_0x38cacd(0x103)])return[];return Object[_0x38cacd(0x103)](_0x3fdabf[_0x38cacd(0x103)])[_0x38cacd(0xa2)](([,_0x31ca6b])=>!_0x31ca6b[_0x38cacd(0x115)])[_0x38cacd(0x114)](([_0x400724,_0x1c3e23])=>({'key':_0x400724,'comment':_0x1c3e23[_0x38cacd(0xcd)]||'无标题条目'}));}catch(_0x46ee54){return console[_0x38cacd(0xe4)](_0x38cacd(0x9d)+_0x381819+_0x38cacd(0x71),_0x46ee54),[];}}export async function executeManualSummary(_0x2e9b37,_0x251bcb,_0x21bc13=![]){return new Promise(async _0x22d588=>{const _0x2cd50e=_0x5497,_0x3c6a6c=_0x21bc13?_0x2cd50e(0x77):_0x2cd50e(0x120),_0x328e3d=getContext();if(_0x21bc13){const _0x2a4c5c=getRawMessagesForSummary(_0x2e9b37,_0x251bcb);if(!_0x2a4c5c||_0x2a4c5c['length']===0x0)return toastr['warning'](_0x2cd50e(0xee),_0x3c6a6c),_0x22d588(![]);const _0x413e1a=_0x2a4c5c[_0x2cd50e(0x114)](_0x5bce2a=>_0x2cd50e(0xc6)+_0x5bce2a[_0x2cd50e(0xbc)]+_0x2cd50e(0x113)+_0x5bce2a[_0x2cd50e(0x9b)]+':\x20'+_0x5bce2a[_0x2cd50e(0xd7)])[_0x2cd50e(0x14b)]('\x0a'),_0x59554b=await getSummary(_0x413e1a,_0x3c6a6c);_0x59554b?showSummaryModal(_0x59554b,{'onConfirm':async _0x475e53=>{const _0x58699e=await writeSummary(_0x475e53,_0x2e9b37,_0x251bcb,_0x3c6a6c);_0x22d588(_0x58699e);},'onRegenerate':async _0x583906=>{const _0x18629b=_0x2cd50e;_0x583906[_0x18629b(0x141)](_0x18629b(0xf3))[_0x18629b(0x138)](_0x18629b(0x143),!![])[_0x18629b(0x13a)](_0x18629b(0x94));const _0x2a9e6d=await getSummary(_0x413e1a,_0x3c6a6c);_0x2a9e6d?_0x583906[_0x18629b(0x141)](_0x18629b(0xf3))[_0x18629b(0x138)](_0x18629b(0x143),![])[_0x18629b(0x13a)](_0x2a9e6d):(_0x583906[_0x18629b(0x141)]('textarea')['prop'](_0x18629b(0x143),![])[_0x18629b(0x13a)](_0x59554b),toastr['error'](_0x18629b(0xf7),_0x18629b(0x75)));},'onCancel':()=>{const _0x302abc=_0x2cd50e;toastr[_0x302abc(0x131)](_0x302abc(0x8a),_0x3c6a6c),_0x22d588(![]);}}):_0x22d588(![]);return;}const _0x563ff1=getRawMessagesForSummary(_0x2e9b37,_0x251bcb);if(!_0x563ff1||_0x563ff1['length']===0x0)return toastr['warning'](_0x2cd50e(0x79),_0x2cd50e(0x108)),_0x22d588(![]);const _0x1e6a52=_0x5e78a1=>{const _0x1fe511=_0x2cd50e,_0x3c3029=_0x5e78a1[_0x1fe511(0x114)](_0x5cbb7e=>_0x1fe511(0x88)+_0x5cbb7e[_0x1fe511(0xdd)]+_0x1fe511(0x117)+_0x5cbb7e[_0x1fe511(0xbc)]+_0x1fe511(0x113)+_0x5cbb7e[_0x1fe511(0x9b)]+'</summary>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22historiography-editor-container\x22>\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<textarea\x20class=\x22text_pole\x22\x20data-floor=\x22'+_0x5cbb7e[_0x1fe511(0xbc)]+'\x22>'+_0x5cbb7e[_0x1fe511(0xd7)]+_0x1fe511(0x78))[_0x1fe511(0x14b)]('');return _0x1fe511(0xf9)+(_0x328e3d[_0x1fe511(0x7f)]||'用户')+_0x1fe511(0xff)+(_0x328e3d['name2']||'角色')+_0x1fe511(0x129)+_0x3c3029+_0x1fe511(0x11c);},_0x4cb65d=_0x1e6a52(_0x563ff1);showHtmlModal(_0x2cd50e(0xe1),_0x4cb65d,{'okText':_0x2cd50e(0x7b),'cancelText':'取消','onOpen':_0xa53028=>{const _0x51700a=_0x2cd50e,_0x545ab8=_0xa53028['find'](_0x51700a(0xd8)),_0x3d77c9=_0xa53028[_0x51700a(0x141)](_0x51700a(0x97)),_0x10877b=_0xa53028[_0x51700a(0x141)](_0x51700a(0xb0)),_0x5971ed=()=>{const _0x257c30=_0x51700a,_0x463517=_0x545ab8['is'](_0x257c30(0xf8)),_0x3c6e24=_0x3d77c9['is'](_0x257c30(0xf8));_0x10877b[_0x257c30(0x141)](_0x257c30(0x127))[_0x257c30(0x9a)](function(){const _0x140ae4=_0x257c30,_0x328163=$(this),_0x5a1685=_0x328163['data']('author-type');_0x5a1685==='user'&&!_0x463517||_0x5a1685==='char'&&!_0x3c6e24?_0x328163[_0x140ae4(0x138)](_0x140ae4(0x76),!![]):_0x328163['prop']('hidden',![]);});};_0x545ab8['on'](_0x51700a(0x110),_0x5971ed),_0x3d77c9['on'](_0x51700a(0x110),_0x5971ed);},'onOk':async _0x13144b=>{const _0x4b1869=_0x2cd50e,_0x1f23b6=_0x13144b['find']('.historiography-message-item:not([hidden])\x20textarea')[_0x4b1869(0x114)](function(){const _0x1cdf39=_0x4b1869,_0x1135cc=$(this)[_0x1cdf39(0x87)]('floor'),_0x194f25=$(this)['closest']('.historiography-message-item')[_0x1cdf39(0x141)]('summary')['text']()[_0x1cdf39(0x82)](_0x1cdf39(0xc6)+_0x1135cc+_0x1cdf39(0x113),'');return _0x1cdf39(0xc6)+_0x1135cc+_0x1cdf39(0x113)+_0x194f25+':\x20'+$(this)[_0x1cdf39(0x13a)]();})[_0x4b1869(0xb2)]()[_0x4b1869(0x14b)]('\x0a');if(!_0x1f23b6[_0x4b1869(0xdb)]()){toastr[_0x4b1869(0xe4)](_0x4b1869(0x14a),_0x4b1869(0x108));return;}const _0x3bc3fa=_0x13144b[0x0];_0x3bc3fa&&typeof _0x3bc3fa['close']===_0x4b1869(0x8b)&&_0x3bc3fa[_0x4b1869(0xfc)]();_0x13144b[_0x4b1869(0x95)]();const _0x43b487=await getSummary(_0x1f23b6,_0x3c6a6c);_0x43b487?showSummaryModal(_0x43b487,{'onConfirm':async _0x1a91f0=>{const _0x25ad84=await writeSummary(_0x1a91f0,_0x2e9b37,_0x251bcb,_0x3c6a6c);_0x22d588(_0x25ad84);},'onRegenerate':async _0xe35aef=>{const _0x45a025=_0x4b1869;_0xe35aef['find'](_0x45a025(0xf3))[_0x45a025(0x138)](_0x45a025(0x143),!![])[_0x45a025(0x13a)](_0x45a025(0x94));const _0x26fb2c=await getSummary(_0x1f23b6,_0x3c6a6c);_0x26fb2c?_0xe35aef['find'](_0x45a025(0xf3))[_0x45a025(0x138)](_0x45a025(0x143),![])[_0x45a025(0x13a)](_0x26fb2c):(_0xe35aef[_0x45a025(0x141)]('textarea')[_0x45a025(0x138)](_0x45a025(0x143),![])['val'](_0x43b487),toastr[_0x45a025(0xe4)](_0x45a025(0xf7),'模型召唤失败'));},'onCancel':()=>{const _0x2088a6=_0x4b1869;toastr[_0x2088a6(0x131)]('本批次总结已取消。',_0x2088a6(0x7e)),_0x22d588(![]);}}):_0x22d588(![]);},'onCancel':()=>{const _0x396783=_0x2cd50e;toastr[_0x396783(0x131)](_0x396783(0xa3),_0x3c6a6c),_0x22d588(![]);}});});}function getRawMessagesForSummary(_0x356346,_0x419acf){const _0x43ea6b=_0x17f21b,_0x3e8999=getContext(),_0x33b793=_0x3e8999[_0x43ea6b(0x9f)],_0x5a44f5=extension_settings[extensionName],_0xbb5a66=_0x33b793[_0x43ea6b(0x81)](_0x356346-0x1,_0x419acf);if(_0xbb5a66[_0x43ea6b(0xec)]===0x0)return null;const _0x139497=_0x3e8999[_0x43ea6b(0x7f)]||'用户',_0x3a9dc5=_0x3e8999[_0x43ea6b(0x7c)]||'角色',_0x5a7114=_0x5a44f5['historiographyTagExtractionEnabled']??![],_0x34dc6c=_0x5a7114?(_0x5a44f5[_0x43ea6b(0xac)]||'')['split'](',')['map'](_0x4367f6=>_0x4367f6[_0x43ea6b(0xdb)]())['filter'](Boolean):[],_0x427044=_0x5a44f5[_0x43ea6b(0x109)]||[],_0x35210f=_0xbb5a66[_0x43ea6b(0x114)]((_0x15fc19,_0x3f3c15)=>{const _0x20873a=_0x43ea6b;let _0x2fb2e6=_0x15fc19[_0x20873a(0xd3)];if(_0x5a7114&&_0x34dc6c['length']>0x0){const _0x54adeb=extractBlocksByTags(_0x2fb2e6,_0x34dc6c);_0x54adeb['length']>0x0&&(_0x2fb2e6=_0x54adeb[_0x20873a(0x14b)]('\x0a\x0a'));}_0x2fb2e6=applyExclusionRules(_0x2fb2e6,_0x427044);if(!_0x2fb2e6[_0x20873a(0xdb)]())return null;return{'floor':_0x356346+_0x3f3c15,'author':_0x15fc19[_0x20873a(0xfb)]?_0x139497:_0x3a9dc5,'authorType':_0x15fc19[_0x20873a(0xfb)]?_0x20873a(0x121):_0x20873a(0x11a),'content':_0x2fb2e6['trim']()};})['filter'](Boolean);return _0x35210f;}async function getSummary(_0xb2a0d6,_0x4a497e){const _0x4764fa=_0x17f21b;toastr[_0x4764fa(0x131)](_0x4764fa(0xc0),_0x4a497e);const _0x166983=extension_settings[extensionName],_0x4ff214=getPresetPrompts(_0x4764fa(0xf2));let _0x557c5a;try{const _0x1386e9=localStorage[_0x4764fa(0xdf)](_0x4764fa(0xd0));_0x1386e9&&(_0x557c5a=JSON[_0x4764fa(0xef)](_0x1386e9));}catch(_0x333830){console['error'](_0x4764fa(0x74),_0x333830);}const _0x31fdfe=getMixedOrder(_0x4764fa(0xf2))||[],_0x4aa6da=[{'role':'system','content':generateRandomSeed()}];let _0x344ca2=0x0;for(const _0x12c97c of _0x31fdfe){if(_0x12c97c['type']===_0x4764fa(0x72))_0x4ff214&&_0x4ff214[_0x344ca2]&&(_0x4aa6da[_0x4764fa(0x10f)](_0x4ff214[_0x344ca2]),_0x344ca2++);else{if(_0x12c97c[_0x4764fa(0x119)]===_0x4764fa(0xbd))switch(_0x12c97c['id']){case _0x4764fa(0x118):_0x166983[_0x4764fa(0x134)]&&_0x4aa6da[_0x4764fa(0x10f)]({'role':'system','content':_0x166983[_0x4764fa(0x134)]});break;case _0x4764fa(0xf5):_0x166983[_0x4764fa(0x112)]&&_0x4aa6da[_0x4764fa(0x10f)]({'role':_0x4764fa(0xbf),'content':_0x166983[_0x4764fa(0x112)]});break;case _0x4764fa(0xcc):_0x4aa6da['push']({'role':_0x4764fa(0x121),'content':_0x4764fa(0x12a)+_0xb2a0d6+_0x4764fa(0xf1)});break;}}}const _0x3bfe54=await callAI(_0x4aa6da);return console[_0x4764fa(0x12c)](_0x4764fa(0x102),_0x3bfe54),_0x3bfe54;}async function writeSummary(_0x3c19af,_0x32b9d0,_0x553963,_0x6382b5){const _0xdaf6c6=_0x17f21b,_0x2fbe14=extension_settings[extensionName],_0x150ace=getContext(),_0x518b89=_0x2fbe14[_0xdaf6c6(0x135)]??!![],_0x12c175=_0x2fbe14['historiographyIngestToRag']??![];if(!_0x518b89&&!_0x12c175)return toastr[_0xdaf6c6(0x12f)](_0xdaf6c6(0xca),_0x6382b5),!![];if(_0x12c175)try{let _0x17a293;switch(_0x2fbe14['lorebookTarget']){case'character_main':_0x17a293=characters[_0x150ace['characterId']]?.['data']?.['extensions']?.[_0xdaf6c6(0x144)];if(!_0x17a293)throw new Error(_0xdaf6c6(0xa4));break;case'dedicated':const _0x3a9c2a=await getChatIdentifier();_0x17a293=_0xdaf6c6(0xa6)+_0x3a9c2a;break;default:throw new Error('未知的史册写入指令,无法为翰林院确定目标。');}toastr[_0xdaf6c6(0x131)](_0xdaf6c6(0x111),_0xdaf6c6(0xd2));const _0xa4820={'bookName':_0x17a293,'entryName':'微言录总结:\x20'+_0x32b9d0+'-'+_0x553963+'楼'},_0x499b58=await ingestTextToHanlinyuan(_0x3c19af,_0xdaf6c6(0x14c),_0xa4820);if(_0x499b58[_0xdaf6c6(0xb8)])toastr[_0xdaf6c6(0xb8)](_0xdaf6c6(0xc3),_0xdaf6c6(0xd2));else throw new Error(_0x499b58['error']);}catch(_0x5d9760){console[_0xdaf6c6(0xe4)]('[翰林院]\x20向量化处理失败:',_0x5d9760),toastr[_0xdaf6c6(0xe4)](_0xdaf6c6(0xa5)+_0x5d9760['message'],_0xdaf6c6(0xd2));}if(_0x518b89)try{let _0x58854d;switch(_0x2fbe14[_0xdaf6c6(0x84)]){case _0xdaf6c6(0xaf):_0x58854d=characters[_0x150ace[_0xdaf6c6(0x146)]]?.['data']?.[_0xdaf6c6(0xbe)]?.['world'];if(!_0x58854d)throw new Error(_0xdaf6c6(0x70));break;case _0xdaf6c6(0x11d):const _0x526167=await getChatIdentifier();_0x58854d=_0xdaf6c6(0xa6)+_0x526167;break;default:throw new Error(_0xdaf6c6(0xe7));}const _0x42de19=_0x385c6a=>{const _0x20495b=_0xdaf6c6,_0x4f0ee7=_0x20495b(0x96)+_0x553963+_0x20495b(0x73),_0xa2e5c=_0x20495b(0xde)+_0x32b9d0+'楼至'+_0x553963+_0x20495b(0x14d)+_0x3c19af;if(_0x385c6a){const _0x591e17=_0x385c6a[_0x20495b(0x82)](PROGRESS_SEAL_REGEX,'')[_0x20495b(0xdb)]();return _0x591e17+_0xa2e5c+_0x4f0ee7;}else{const _0x10b0b8='以下是依照顺序已发生剧情'+_0xa2e5c;return _0x10b0b8+_0x4f0ee7;}};console['log'](_0xdaf6c6(0x147),{'loreActivationMode':_0x2fbe14[_0xdaf6c6(0xd6)],'loreInsertionPosition':_0x2fbe14[_0xdaf6c6(0xdc)],'loreDepth':_0x2fbe14['loreDepth'],'loreKeywords':_0x2fbe14['loreKeywords']});const _0x46a7d4={'keys':_0x2fbe14[_0xdaf6c6(0x106)][_0xdaf6c6(0x12b)](',')[_0xdaf6c6(0x114)](_0x503c3b=>_0x503c3b['trim']())[_0xdaf6c6(0xa2)](Boolean),'isConstant':_0x2fbe14[_0xdaf6c6(0xd6)]!==_0xdaf6c6(0xc5),'insertion_position':_0x2fbe14['loreInsertionPosition'],'depth':_0x2fbe14[_0xdaf6c6(0xab)]};console[_0xdaf6c6(0x12c)]('[大史官-调试]\x20构建并传递的选项:',_0x46a7d4);const _0x21c93d=await writeToLorebookWithTavernHelper(_0x58854d,RUNNING_LOG_COMMENT,_0x42de19,_0x46a7d4);if(_0x21c93d)return toastr['success'](_0xdaf6c6(0xa0),_0x6382b5+_0xdaf6c6(0x148)),!![];else throw new Error(_0xdaf6c6(0xa7));}catch(_0x1b70a3){return console['error'](_0xdaf6c6(0x125)+_0x6382b5+_0xdaf6c6(0x9e),_0x1b70a3),toastr['error'](_0xdaf6c6(0x126)+_0x1b70a3[_0xdaf6c6(0xb9)],_0xdaf6c6(0xe6)),![];}return!![];}const CHAPTER_SEAL_REGEX=/【前(\d+)楼篇章编撰已完成】/;export async function executeRefinement(_0x388d14,_0x22d27d){const _0x3395f4=_0x17f21b;toastr[_0x3395f4(0x131)](_0x3395f4(0x11f)+_0x388d14+_0x3395f4(0x91),_0x3395f4(0xc1));try{const _0x3f0ce3=await loadWorldInfo(_0x388d14),_0x270f66=_0x3f0ce3?.[_0x3395f4(0x103)][_0x22d27d];if(!_0x270f66){toastr['error'](_0x3395f4(0x8f),_0x3395f4(0x108));return;}const _0x5617ae=_0x270f66[_0x3395f4(0xd7)],_0x820d45=extension_settings[extensionName],_0x14a4ed=_0x5617ae[_0x3395f4(0x149)](PROGRESS_SEAL_REGEX);if(!_0x14a4ed){toastr[_0x3395f4(0xe4)](_0x3395f4(0x128),_0x3395f4(0xfa));return;}const _0xe62522=_0x14a4ed[0x0],_0x3c2380=parseInt(_0x14a4ed[0x1],0xa),_0xc0e403=_0x5617ae[_0x3395f4(0x149)](CHAPTER_SEAL_REGEX);let _0x188f3b='',_0x42a260='',_0x351ec5=0x0;if(_0xc0e403){const _0x2ee460=_0xc0e403[0x0];_0x351ec5=parseInt(_0xc0e403[0x1],0xa);const _0x376be9=_0x5617ae['split'](_0x2ee460);_0x188f3b=_0x376be9[0x0][_0x3395f4(0xdb)](),_0x42a260=_0x376be9[0x1][_0x3395f4(0x82)](PROGRESS_SEAL_REGEX,'')[_0x3395f4(0xdb)]();}else _0x42a260=_0x5617ae[_0x3395f4(0x82)](PROGRESS_SEAL_REGEX,'')[_0x3395f4(0xdb)]();if(!_0x42a260[_0x3395f4(0xdb)]()){toastr[_0x3395f4(0x12f)](_0x3395f4(0xcf),_0x3395f4(0x92));return;}const _0x1af5f8=getPresetPrompts(_0x3395f4(0xc2));let _0x2c3ab0;try{const _0xcd2c26=localStorage[_0x3395f4(0xdf)](_0x3395f4(0xd0));_0xcd2c26&&(_0x2c3ab0=JSON[_0x3395f4(0xef)](_0xcd2c26));}catch(_0x1135b8){console[_0x3395f4(0xe4)](_0x3395f4(0x74),_0x1135b8);}const _0x4e0fc0=getMixedOrder('large_summary')||[],_0x4e8082=[{'role':_0x3395f4(0xbf),'content':generateRandomSeed()}];let _0x18c831=0x0;for(const _0x49bd8d of _0x4e0fc0){if(_0x49bd8d['type']===_0x3395f4(0x72))_0x1af5f8&&_0x1af5f8[_0x18c831]&&(_0x4e8082[_0x3395f4(0x10f)](_0x1af5f8[_0x18c831]),_0x18c831++);else{if(_0x49bd8d[_0x3395f4(0x119)]===_0x3395f4(0xbd))switch(_0x49bd8d['id']){case _0x3395f4(0x118):_0x820d45[_0x3395f4(0x107)]&&_0x4e8082['push']({'role':_0x3395f4(0xbf),'content':_0x820d45[_0x3395f4(0x107)]});break;case _0x3395f4(0xf5):_0x820d45[_0x3395f4(0xa9)]&&_0x4e8082[_0x3395f4(0x10f)]({'role':_0x3395f4(0xbf),'content':_0x820d45[_0x3395f4(0xa9)]});break;case _0x3395f4(0xcc):_0x4e8082[_0x3395f4(0x10f)]({'role':'user','content':_0x3395f4(0x133)+_0x42a260});break;}}}const _0x51b2f8=async()=>{const _0x5d04a7=_0x3395f4;return toastr['info'](_0x5d04a7(0xf4),_0x5d04a7(0xc1)),await callAI(_0x4e8082);},_0x5b472d=await _0x51b2f8();if(!_0x5b472d){toastr[_0x3395f4(0xe4)](_0x3395f4(0x7d),_0x3395f4(0x132));return;}const _0x237ee1=async _0x4dcc0f=>{showSummaryModal(_0x4dcc0f,{'onConfirm':async _0x3c71dd=>{const _0x25b5c8=_0x5497;let _0x5ac52a;const _0x5e4ed8=_0x25b5c8(0x137)+_0x3c2380+_0x25b5c8(0xad),_0x5962f7=document['getElementById']('amily2_vectorize_summary_content')?.[_0x25b5c8(0xeb)]??![];if(_0x5962f7&&_0xc0e403)try{toastr[_0x25b5c8(0x131)]('正在将前\x20'+_0x351ec5+'\x20楼的“宏史卷”内容送往翰林院...','翰林院');const _0x58e2f7={'bookName':_0x388d14,'entryName':_0x25b5c8(0xb6)+_0x351ec5+'楼'},_0x54ac96=await ingestTextToHanlinyuan(_0x188f3b,_0x25b5c8(0x14c),_0x58e2f7);if(!_0x54ac96['success'])throw new Error(_0x54ac96[_0x25b5c8(0xe4)]||'未知错误');toastr['success']('翰林院已成功接收旧“宏史卷”记忆!新增\x20'+_0x54ac96[_0x25b5c8(0x11e)]+_0x25b5c8(0x11b),_0x25b5c8(0xd2));const _0x4b2202='AI你好,以上内容为rag向量化后注入的相关剧情,以下内容是已发生的剧情回顾。\x0a\x0a(前'+_0x351ec5+_0x25b5c8(0xf0)+_0x351ec5+_0x25b5c8(0xd9);_0x5ac52a=_0x4b2202+_0x25b5c8(0x10c)+_0x3c71dd+_0x5e4ed8+'\x0a\x0a'+_0xe62522;}catch(_0x18c2c6){console[_0x25b5c8(0xe4)](_0x25b5c8(0xc4),_0x18c2c6),toastr[_0x25b5c8(0xe4)](_0x25b5c8(0xb4)+_0x18c2c6['message']+_0x25b5c8(0x139),_0x25b5c8(0xd2));const _0x51df30=_0x25b5c8(0xea)+_0x351ec5+_0x25b5c8(0xf6);_0x5ac52a=''+_0x188f3b+_0x51df30+_0x3c71dd+_0x5e4ed8+'\x0a\x0a'+_0xe62522;}else{if(_0xc0e403){const _0x4d337d=_0x25b5c8(0xea)+_0x351ec5+'楼的宏史卷】===\x0a\x0a';_0x5ac52a=''+_0x188f3b+_0x4d337d+_0x3c71dd+_0x5e4ed8+'\x0a\x0a'+_0xe62522;}else{const _0x11b0be=_0x25b5c8(0x89)+_0x3c2380+_0x25b5c8(0xe0);_0x5ac52a=''+_0x11b0be+_0x3c71dd+_0x5e4ed8+'\x0a\x0a'+_0xe62522;}}_0x270f66['content']=_0x5ac52a,await saveWorldInfo(_0x388d14,_0x3f0ce3,!![]),toastr[_0x25b5c8(0xb8)](_0x25b5c8(0xc9)+_0x388d14+'》!','宏史卷重铸完毕');},'onRegenerate':async _0x247ee5=>{const _0x2a972e=_0x5497;_0x247ee5[_0x2a972e(0x141)](_0x2a972e(0xf3))['prop'](_0x2a972e(0x143),!![])['val'](_0x2a972e(0x94));const _0x2c3b59=await _0x51b2f8();_0x2c3b59?_0x247ee5[_0x2a972e(0x141)](_0x2a972e(0xf3))[_0x2a972e(0x138)](_0x2a972e(0x143),![])['val'](_0x2c3b59):(_0x247ee5[_0x2a972e(0x141)](_0x2a972e(0xf3))[_0x2a972e(0x138)](_0x2a972e(0x143),![])['val'](_0x4dcc0f),toastr[_0x2a972e(0xe4)]('重新生成失败,已恢复原始内容。',_0x2a972e(0x75)));},'onCancel':()=>{const _0x4f28cf=_0x5497;toastr[_0x4f28cf(0x131)](_0x4f28cf(0xb5),_0x4f28cf(0x7e));}});};await _0x237ee1(_0x5b472d);}catch(_0x4297cf){console[_0x3395f4(0xe4)]('[大史官]\x20重铸任务失败:',_0x4297cf),toastr[_0x3395f4(0xe4)](_0x3395f4(0x13e)+_0x4297cf[_0x3395f4(0xb9)],_0x3395f4(0xe6));}}export async function executeExpedition(){const _0x22c2c6=_0x17f21b;if(isExpeditionRunning){toastr['info'](_0x22c2c6(0x7a),_0x22c2c6(0xe5));return;}isExpeditionRunning=!![],manualStopRequested=![],document[_0x22c2c6(0xb1)](new CustomEvent(_0x22c2c6(0xa8),{'detail':{'isRunning':!![]}}));try{const _0x5eca56=extension_settings[extensionName],_0x5d4255=getContext();let _0x4652d5=null;switch(_0x5eca56[_0x22c2c6(0x84)]){case _0x22c2c6(0xaf):_0x4652d5=characters[_0x5d4255[_0x22c2c6(0x146)]]?.[_0x22c2c6(0x87)]?.[_0x22c2c6(0xbe)]?.[_0x22c2c6(0x144)];if(!_0x4652d5){toastr['error'](_0x22c2c6(0x123),_0x22c2c6(0x13f)),isExpeditionRunning=![],document['dispatchEvent'](new CustomEvent('amily2-expedition-state-change',{'detail':{'isRunning':![],'manualStop':![]}}));return;}break;case _0x22c2c6(0x11d):const _0xd31577=await getChatIdentifier();_0x4652d5=_0x22c2c6(0xa6)+_0xd31577;break;default:toastr[_0x22c2c6(0xe4)](_0x22c2c6(0xe9),_0x22c2c6(0x13f)),isExpeditionRunning=![],document[_0x22c2c6(0xb1)](new CustomEvent(_0x22c2c6(0xa8),{'detail':{'isRunning':![],'manualStop':![]}}));return;}const _0xa8cf4a=await readGoldenLedgerProgress(_0x4652d5),_0x53f673=_0x5d4255['chat'][_0x22c2c6(0xec)],_0x4938e3=_0x53f673-_0xa8cf4a;if(_0x4938e3<=0x0){toastr[_0x22c2c6(0x131)](_0x22c2c6(0xaa),'凯旋'),isExpeditionRunning=![],document[_0x22c2c6(0xb1)](new CustomEvent('amily2-expedition-state-change',{'detail':{'isRunning':![],'manualStop':![]}}));return;}const _0x2741f2=_0x5eca56[_0x22c2c6(0x105)],_0x216893=Math[_0x22c2c6(0x10d)](_0x4938e3/_0x2741f2);toastr[_0x22c2c6(0x131)](_0x22c2c6(0x8c)+_0x4938e3+'\x20层历史,分\x20'+_0x216893+_0x22c2c6(0x9c),_0x22c2c6(0x80));let _0x49dac1=_0xa8cf4a;for(let _0x12935d=0x0;_0x12935d<_0x216893;_0x12935d++){if(manualStopRequested){toastr[_0x22c2c6(0x12f)](_0x22c2c6(0x14e),'鸣金收兵');break;}const _0x4ebe22=_0x49dac1+0x1,_0x530da1=Math['min'](_0x49dac1+_0x2741f2,_0x53f673),_0x439e3e=_0x22c2c6(0x99)+(_0x12935d+0x1)+'/'+_0x216893+')',_0x18cdfb=0x7d0;_0x12935d>0x0&&(toastr['info']('第\x20'+(_0x12935d+0x1)+_0x22c2c6(0x145)+_0x18cdfb/0x3e8+_0x22c2c6(0xbb),_0x439e3e),await new Promise(_0x52fd92=>setTimeout(_0x52fd92,_0x18cdfb)));if(manualStopRequested){toastr[_0x22c2c6(0x12f)](_0x22c2c6(0x101),_0x22c2c6(0xa1));break;}const _0x3530d3=await executeManualSummary(_0x4ebe22,_0x530da1,![]);if(_0x3530d3)_0x49dac1=_0x530da1;else{toastr[_0x22c2c6(0x12f)]('远征因第\x20'+(_0x12935d+0x1)+_0x22c2c6(0x83),_0x22c2c6(0x104)),manualStopRequested=!![];break;}}!manualStopRequested&&toastr[_0x22c2c6(0xb8)]('凯旋!远征大捷!所有未载之史均已化为帝国永恒的记忆!',_0x22c2c6(0x12d));}catch(_0x12e994){console['error'](_0x22c2c6(0xe8),_0x12e994),toastr[_0x22c2c6(0xe4)]('远征途中遭遇重大挫折,任务中止!您可以随时【继续远征】。','远征失败');}finally{isExpeditionRunning=![],document[_0x22c2c6(0xb1)](new CustomEvent(_0x22c2c6(0xa8),{'detail':{'isRunning':![],'manualStop':manualStopRequested}}));}}export function stopExpedition(){const _0x19d478=_0x17f21b;isExpeditionRunning?(manualStopRequested=!![],toastr[_0x19d478(0x131)](_0x19d478(0xae),_0x19d478(0xce))):toastr['warning'](_0x19d478(0x10a),_0x19d478(0xe5));}export async function executeCompilation(_0x260242,_0x2f1a7e){const _0x35a1e6=_0x17f21b;if(!Array[_0x35a1e6(0xfe)](_0x2f1a7e)||_0x2f1a7e['length']===0x0)return toastr[_0x35a1e6(0x12f)]('未选择任何条目进行编纂。',_0x35a1e6(0x13f)),{'success':![],'error':_0x35a1e6(0x93)};toastr[_0x35a1e6(0x131)](_0x35a1e6(0xe2)+_0x260242+_0x35a1e6(0x100)+_0x2f1a7e[_0x35a1e6(0xec)]+_0x35a1e6(0x85),_0x35a1e6(0xd5));let _0x38e949=0x0,_0x1e48fa=0x0,_0x293c41=[];try{const _0x82628f=await loadWorldInfo(_0x260242);if(!_0x82628f||!_0x82628f[_0x35a1e6(0x103)])throw new Error('无法加载书库《'+_0x260242+_0x35a1e6(0xb7));for(const _0x468b3f of _0x2f1a7e){const _0x5b1537=_0x82628f[_0x35a1e6(0x103)][_0x468b3f];if(!_0x5b1537){_0x293c41[_0x35a1e6(0x10f)](_0x35a1e6(0x13b)+_0x468b3f+_0x35a1e6(0xc8));continue;}const _0x157edf=_0x5b1537['content'];if(!_0x157edf[_0x35a1e6(0xdb)]()){_0x293c41[_0x35a1e6(0x10f)](_0x35a1e6(0x13b)+(_0x5b1537[_0x35a1e6(0xcd)]||_0x468b3f)+_0x35a1e6(0x136));continue;}const _0x3c02a6={'bookName':_0x260242,'entryName':_0x5b1537['comment']||_0x468b3f};try{const _0x42bee5=await ingestTextToHanlinyuan(_0x157edf,'lorebook',_0x3c02a6);_0x42bee5[_0x35a1e6(0xb8)]?(_0x38e949++,_0x1e48fa+=_0x42bee5['count']):_0x293c41[_0x35a1e6(0x10f)]('条目【'+(_0x5b1537[_0x35a1e6(0xcd)]||_0x468b3f)+_0x35a1e6(0x122)+_0x42bee5[_0x35a1e6(0xe4)]);}catch(_0x1528ba){_0x293c41[_0x35a1e6(0x10f)](_0x35a1e6(0x13b)+(_0x5b1537[_0x35a1e6(0xcd)]||_0x468b3f)+'】处理时发生严重错误:\x20'+_0x1528ba[_0x35a1e6(0xb9)]);}}let _0x2b59f0=_0x35a1e6(0xe3)+_0x38e949+_0x35a1e6(0x90)+_0x2f1a7e['length']+'\x20个条目,共新增\x20'+_0x1e48fa+'\x20条忆识。';return _0x293c41['length']>0x0?(_0x2b59f0+=_0x35a1e6(0xb3)+_0x293c41[_0x35a1e6(0x14b)]('\x0a-\x20'),toastr[_0x35a1e6(0x12f)](_0x35a1e6(0x98),_0x35a1e6(0xd2)),console[_0x35a1e6(0xba)](_0x35a1e6(0xcb),_0x293c41)):toastr['success'](_0x35a1e6(0xfd)+_0x1e48fa+'\x20条忆识。',_0x35a1e6(0xd2)),{'success':_0x293c41[_0x35a1e6(0xec)]===0x0,'content':_0x2b59f0,'totalSuccess':_0x38e949,'totalVectors':_0x1e48fa,'errors':_0x293c41};}catch(_0x2220cf){return console[_0x35a1e6(0xe4)]('[翰林院]\x20批量条目入库失败:',_0x2220cf),toastr['error'](_0x35a1e6(0x13c)+_0x2220cf[_0x35a1e6(0xb9)],_0x35a1e6(0xd2)),{'success':![],'error':_0x2220cf[_0x35a1e6(0xb9)]};}}
|