From 41e7422f3d25f57fd460628c7e9f9cf3dcdb82f8 Mon Sep 17 00:00:00 2001 From: Wx-2025 <351320169@qq.com> Date: Wed, 13 Aug 2025 00:54:56 +0800 Subject: [PATCH] Update events.js --- core/events.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/events.js b/core/events.js index c5c7bb5..4e814cf 100644 --- a/core/events.js +++ b/core/events.js @@ -1 +1 @@ -(function(_0x3de457,_0x2948cc){const _0x59ade8=_0xe535,_0x5289a1=_0x3de457();while(!![]){try{const _0x4c598c=parseInt(_0x59ade8(0xe7))/0x1+parseInt(_0x59ade8(0xda))/0x2*(-parseInt(_0x59ade8(0xe5))/0x3)+parseInt(_0x59ade8(0xea))/0x4+-parseInt(_0x59ade8(0xca))/0x5+-parseInt(_0x59ade8(0xd3))/0x6*(-parseInt(_0x59ade8(0xe4))/0x7)+parseInt(_0x59ade8(0xeb))/0x8+parseInt(_0x59ade8(0xc8))/0x9;if(_0x4c598c===_0x2948cc)break;else _0x5289a1['push'](_0x5289a1['shift']());}catch(_0x101218){_0x5289a1['push'](_0x5289a1['shift']());}}}(_0x3569,0xd2eb2));import{getContext,extension_settings}from'/scripts/extensions.js';import{saveChatConditional}from'/script.js';import{extensionName}from'../utils/settings.js';import*as _0x41cd54 from'./table-system/manager.js';function _0x3569(){const _0x2aed93=['7089000BBFhvu','chat','length','apiUrl','【监察系统】消息\x20ID:\x20','【监察系统】正在处理的奏折内容:\x20\x22','【监察系统】错误:未找到消息\x20ID:\x20','【监察系统-步骤1】为消息\x20','success','24VZjbyP','substring','【监察系统】接到圣旨,开始处理消息\x20ID:\x20','enabled','\x20并保存。','【监察系统】检测到“分步填表”或“优化中填表”模式已启用,主API填表逻辑已自动禁用。','log','2914qCLuIt','warn',',流程中止。','【监察系统-步骤3】检测到变化,已将新状态写入消息\x20','filling_mode','【监察系统-步骤2】推演完毕。是否有变化:\x20','optimized','error','isWaitingForUserInput','optimizationMode','1358756aDtiSe','2943AhNMPg','optimizedContent','612150LNMxJb','max','[Amily2号]\x20检测到消息并非AI对用户的直接回复,已跳过优化。','524976hSituX','7537808xMjOwG','mes','\x20是用户消息,无需处理。','contextMessages','main-api','is_user','setMemoryState','info','11240883aFRjgP','secondary-api'];_0x3569=function(){return _0x2aed93;};return _0x3569();}import*as _0x36e01b from'./table-system/executor.js';import{renderTables}from'../ui/table-bindings.js';import{log}from'./table-system/logger.js';async function handleTableUpdate(_0x4926c3){const _0x47f9c0=_0xe535,_0x1b2ba1=extension_settings[extensionName],_0x11cf84=_0x1b2ba1[_0x47f9c0(0xde)]||_0x47f9c0(0xef);if(_0x11cf84===_0x47f9c0(0xc9)||_0x11cf84===_0x47f9c0(0xe0)){log(_0x47f9c0(0xd8),'info');return;}log(_0x47f9c0(0xd5)+_0x4926c3,_0x47f9c0(0xdb));const _0x273dff=getContext(),_0x209925=_0x273dff['chat'][_0x4926c3];if(!_0x209925){log(_0x47f9c0(0xd0)+_0x4926c3+_0x47f9c0(0xdc),_0x47f9c0(0xe1));return;}if(_0x209925[_0x47f9c0(0xc5)]){log(_0x47f9c0(0xce)+_0x4926c3+_0x47f9c0(0xed),_0x47f9c0(0xc7));return;}log(_0x47f9c0(0xcf)+_0x209925[_0x47f9c0(0xec)][_0x47f9c0(0xd4)](0x0,0x32)+'...\x22',_0x47f9c0(0xc7));const _0x54154c=_0x41cd54['loadTables'](_0x4926c3);log(_0x47f9c0(0xd1)+_0x4926c3+'\x20加载了基准状态。','info',_0x54154c);const {finalState:_0x34edc0,hasChanges:_0x2e45e9}=_0x36e01b['executeCommands'](_0x209925[_0x47f9c0(0xec)],_0x54154c);log(_0x47f9c0(0xdf)+_0x2e45e9,_0x47f9c0(0xc7),_0x34edc0),_0x2e45e9?(_0x41cd54['saveStateToMessage'](_0x34edc0,_0x209925),_0x41cd54[_0x47f9c0(0xc6)](_0x34edc0),await saveChatConditional(),log(_0x47f9c0(0xdd)+_0x4926c3+_0x47f9c0(0xd7),_0x47f9c0(0xd2))):log('【监察系统-步骤3】未检测到有效指令或变化,无需写入。',_0x47f9c0(0xc7)),renderTables();}import{checkAndFixWithAPI}from'./summarizer.js';import{executeAutoHide}from'./autoHideManager.js';import{checkAndTriggerAutoSummary}from'./historiographer.js';import{fillWithSecondaryApi}from'./table-system/secondary-filler.js';export async function onMessageReceived(_0xfb7aa8){const _0x3f1bdc=_0xe535,_0x239437=getContext();if(_0xfb7aa8&&_0xfb7aa8['is_user']||_0x239437[_0x3f1bdc(0xe2)])return;const _0x320650=extension_settings[extensionName],_0x17a335=_0x239437[_0x3f1bdc(0xcb)];if(!_0x17a335||_0x17a335[_0x3f1bdc(0xcc)]===0x0)return;const _0x6ee609=_0x17a335[_0x17a335[_0x3f1bdc(0xcc)]-0x1];if(_0x6ee609[_0x3f1bdc(0xc5)])return;await executeAutoHide();const _0x25625c=_0x320650[_0x3f1bdc(0xd6)]&&_0x320650['optimizationEnabled']&&_0x320650[_0x3f1bdc(0xcd)];if(_0x25625c){if(_0x17a335[_0x3f1bdc(0xcc)]>=0x2&&_0x17a335[_0x17a335[_0x3f1bdc(0xcc)]-0x2][_0x3f1bdc(0xc5)]){const _0x1fa123=_0x320650[_0x3f1bdc(0xee)]||0x2,_0x11026a=Math[_0x3f1bdc(0xe8)](0x0,_0x17a335[_0x3f1bdc(0xcc)]-0x1-_0x1fa123),_0x3f7a43=_0x17a335['slice'](_0x11026a,_0x17a335['length']-0x1),_0x1b6156=await checkAndFixWithAPI(_0x6ee609,_0x3f7a43);_0x1b6156&&_0x1b6156[_0x3f1bdc(0xe6)]&&_0x1b6156['optimizedContent']!==_0x6ee609[_0x3f1bdc(0xec)]&&(_0x6ee609[_0x3f1bdc(0xec)]=_0x1b6156[_0x3f1bdc(0xe6)],await saveChatConditional(),_0x320650[_0x3f1bdc(0xe3)]==='refresh'&&await reloadCurrentChat());}else console[_0x3f1bdc(0xd9)](_0x3f1bdc(0xe9));}const _0x4e8b75=_0x320650['filling_mode']||_0x3f1bdc(0xef);_0x4e8b75===_0x3f1bdc(0xc9)&&fillWithSecondaryApi(_0x6ee609),((async()=>{const _0x2ae57b=_0x3f1bdc;try{await new Promise(_0x2c567e=>setTimeout(_0x2c567e,0x64)),await checkAndTriggerAutoSummary();}catch(_0x173127){console[_0x2ae57b(0xe1)]('[大史官]\x20后台自动总结任务执行时发生错误:',_0x173127);}})());}function _0xe535(_0x3d8899,_0xfecf2d){const _0x356959=_0x3569();return _0xe535=function(_0xe535dc,_0x6a64a3){_0xe535dc=_0xe535dc-0xc5;let _0x574ad2=_0x356959[_0xe535dc];return _0x574ad2;},_0xe535(_0x3d8899,_0xfecf2d);}export{handleTableUpdate}; +(function(_0xf09fe1,_0x5526a6){const _0x1dc666=_0x354c,_0x508b85=_0xf09fe1();while(!![]){try{const _0x3a4309=-parseInt(_0x1dc666(0x1b5))/0x1+-parseInt(_0x1dc666(0x1a6))/0x2+parseInt(_0x1dc666(0x18f))/0x3*(-parseInt(_0x1dc666(0x1c1))/0x4)+-parseInt(_0x1dc666(0x19e))/0x5*(-parseInt(_0x1dc666(0x1a4))/0x6)+parseInt(_0x1dc666(0x197))/0x7*(-parseInt(_0x1dc666(0x1bc))/0x8)+-parseInt(_0x1dc666(0x1a5))/0x9+parseInt(_0x1dc666(0x1aa))/0xa;if(_0x3a4309===_0x5526a6)break;else _0x508b85['push'](_0x508b85['shift']());}catch(_0x268ae5){_0x508b85['push'](_0x508b85['shift']());}}}(_0x4990,0x436f4));import{getContext,extension_settings}from'/scripts/extensions.js';import{saveChatConditional}from'/script.js';import{extensionName}from'../utils/settings.js';import*as _0x3f5cd8 from'./table-system/manager.js';import*as _0x1df3d7 from'./table-system/executor.js';import{renderTables}from'../ui/table-bindings.js';import{log}from'./table-system/logger.js';function _0x354c(_0x3fc362,_0xcf4bca){const _0x4990e6=_0x4990();return _0x354c=function(_0x354c1d,_0x1d5730){_0x354c1d=_0x354c1d-0x18f;let _0x1bd0a1=_0x4990e6[_0x354c1d];return _0x1bd0a1;},_0x354c(_0x3fc362,_0xcf4bca);}async function handleTableUpdate(_0x553205){const _0x23f085=_0x354c,_0x4e58c0=extension_settings[extensionName],_0x4c139e=_0x4e58c0[_0x23f085(0x190)]||_0x23f085(0x199);if(_0x4c139e===_0x23f085(0x1ab)||_0x4c139e===_0x23f085(0x1b2)){log(_0x23f085(0x19b),_0x23f085(0x1be));return;}log(_0x23f085(0x1b4)+_0x553205,_0x23f085(0x1ba));const _0x452739=getContext(),_0x176f0e=_0x452739[_0x23f085(0x1b8)][_0x553205];if(!_0x176f0e){log(_0x23f085(0x193)+_0x553205+_0x23f085(0x1a9),'error');return;}if(_0x176f0e[_0x23f085(0x191)]){log(_0x23f085(0x195)+_0x553205+_0x23f085(0x1bf),'info');return;}log('【监察系统】正在处理的奏折内容:\x20\x22'+_0x176f0e['mes'][_0x23f085(0x196)](0x0,0x32)+_0x23f085(0x1a3),_0x23f085(0x1be));const _0x4b9417=_0x3f5cd8[_0x23f085(0x1b6)](_0x553205);log('【监察系统-步骤1】为消息\x20'+_0x553205+_0x23f085(0x1bb),_0x23f085(0x1be),_0x4b9417);const {finalState:_0x53104f,hasChanges:_0x4332b4,changes:_0x5532fa}=_0x1df3d7[_0x23f085(0x1a2)](_0x176f0e[_0x23f085(0x1b7)],_0x4b9417);log('【监察系统-步骤2】推演完毕。是否有变化:\x20'+_0x4332b4,'info',_0x53104f),_0x4332b4?(_0x5532fa&&_0x5532fa[_0x23f085(0x19c)]>0x0&&_0x5532fa[_0x23f085(0x192)](_0x1fccee=>{const _0x221aeb=_0x23f085;_0x3f5cd8['addHighlight'](_0x1fccee[_0x221aeb(0x1a1)],_0x1fccee[_0x221aeb(0x19a)],_0x1fccee[_0x221aeb(0x19f)]);}),_0x3f5cd8['saveStateToMessage'](_0x53104f,_0x176f0e),_0x3f5cd8[_0x23f085(0x1c2)](_0x53104f),await saveChatConditional(),log(_0x23f085(0x1a7)+_0x553205+_0x23f085(0x1b0),_0x23f085(0x1ad))):log(_0x23f085(0x1ac),_0x23f085(0x1be)),_0x4332b4&&renderTables();}import{checkAndFixWithAPI}from'./summarizer.js';function _0x4990(){const _0x12e929=['warn','\x20加载了基准状态。','8rvJEdU','slice','info','\x20是用户消息,无需处理。','optimizationMode','51116QpPrbW','setMemoryState','120grHgrO','filling_mode','is_user','forEach','【监察系统】错误:未找到消息\x20ID:\x20','enabled','【监察系统】消息\x20ID:\x20','substring','1852207btZdau','max','main-api','rowIndex','【监察系统】检测到“分步填表”或“优化中填表”模式已启用,主API填表逻辑已自动禁用。','length','error','5AdDviz','colIndex','isWaitingForUserInput','tableIndex','executeCommands','...\x22','3235110VVBePu','400671GbXQja','1033984piTbYU','【监察系统-步骤3】检测到变化,已将新状态写入消息\x20','optimizedContent',',流程中止。','16243510hVrDFk','secondary-api','【监察系统-步骤3】未检测到有效指令或变化,无需写入。','success','apiUrl','[大史官]\x20后台自动总结任务执行时发生错误:','\x20并保存。','log','optimized','contextMessages','【监察系统】接到圣旨,开始处理消息\x20ID:\x20','550052fLbjOW','loadTables','mes','chat','[Amily2号]\x20检测到消息并非AI对用户的直接回复,已跳过优化。'];_0x4990=function(){return _0x12e929;};return _0x4990();}import{executeAutoHide}from'./autoHideManager.js';import{checkAndTriggerAutoSummary}from'./historiographer.js';import{fillWithSecondaryApi}from'./table-system/secondary-filler.js';export async function onMessageReceived(_0x2afb69){const _0x49b729=_0x354c,_0x57a3ec=getContext();if(_0x2afb69&&_0x2afb69[_0x49b729(0x191)]||_0x57a3ec[_0x49b729(0x1a0)])return;const _0x2fd317=extension_settings[extensionName],_0x1cbdf9=_0x57a3ec[_0x49b729(0x1b8)];if(!_0x1cbdf9||_0x1cbdf9['length']===0x0)return;const _0x430e12=_0x1cbdf9[_0x1cbdf9[_0x49b729(0x19c)]-0x1];if(_0x430e12[_0x49b729(0x191)])return;await executeAutoHide();const _0x2ff52b=_0x2fd317[_0x49b729(0x194)]&&_0x2fd317['optimizationEnabled']&&_0x2fd317[_0x49b729(0x1ae)];if(_0x2ff52b){if(_0x1cbdf9['length']>=0x2&&_0x1cbdf9[_0x1cbdf9['length']-0x2][_0x49b729(0x191)]){const _0x53235d=_0x2fd317[_0x49b729(0x1b3)]||0x2,_0x83ccd1=Math[_0x49b729(0x198)](0x0,_0x1cbdf9['length']-0x1-_0x53235d),_0x48c8fd=_0x1cbdf9[_0x49b729(0x1bd)](_0x83ccd1,_0x1cbdf9[_0x49b729(0x19c)]-0x1),_0xf98c49=await checkAndFixWithAPI(_0x430e12,_0x48c8fd);_0xf98c49&&_0xf98c49[_0x49b729(0x1a8)]&&_0xf98c49[_0x49b729(0x1a8)]!==_0x430e12[_0x49b729(0x1b7)]&&(_0x430e12[_0x49b729(0x1b7)]=_0xf98c49[_0x49b729(0x1a8)],await saveChatConditional(),_0x2fd317[_0x49b729(0x1c0)]==='refresh'&&await reloadCurrentChat());}else console[_0x49b729(0x1b1)](_0x49b729(0x1b9));}const _0x1c6f8f=_0x2fd317[_0x49b729(0x190)]||_0x49b729(0x199);_0x1c6f8f===_0x49b729(0x1ab)&&fillWithSecondaryApi(_0x430e12),((async()=>{const _0x293832=_0x49b729;try{await new Promise(_0x138d1a=>setTimeout(_0x138d1a,0x64)),await checkAndTriggerAutoSummary();}catch(_0x4d2bde){console[_0x293832(0x19d)](_0x293832(0x1af),_0x4d2bde);}})());}export{handleTableUpdate};