trimprompt 1.0.7 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/cache.js +1 -1
- package/cli.js +1 -1
- package/dashboard.js +1 -1
- package/dashboard.png +0 -0
- package/executor.js +1 -1
- package/filters/devops.js +1 -1
- package/filters/generic.js +1 -1
- package/filters/git.js +1 -1
- package/filters/go.js +1 -1
- package/filters/index.js +1 -1
- package/filters/js.js +1 -1
- package/filters/python.js +1 -1
- package/filters/rust.js +1 -1
- package/filters/shell.js +1 -1
- package/index.html +123 -38
- package/mcp.js +1 -1
- package/package.json +1 -1
- package/redactor.js +1 -1
- package/seed.js +1 -1
- package/shims.js +1 -1
- package/simulate.js +1 -1
- package/sync.js +1 -1
- package/tracker.js +1 -1
package/filters/js.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';function a0_0x4056(){const _0xe27cb4=['12jUkcLk','8898030dQIWOU','startsWith','2128920eWERPD','found\x20','Tests:','5408575xlMIkh','trim','FAIL\x20\x20','filterNpmInstall','includes','\x20passed,\x20','2786782GLzUyt','audited\x20','\x20failed\x20(','\x0aFailures:','Test\x20Runner:\x20','length','Test\x20Files:','slice','\x20passed','push','added\x20','removed\x20','up\x20to\x20date','Test\x20Suites:','1053171NPUvNx','join','\x20lines\x20of\x20trace\x20details\x20truncated)','match','4791913btsXay','NPM:\x20Packages\x20verified/installed\x20successfully','3tJVrrX','923896DisCGv'];a0_0x4056=function(){return _0xe27cb4;};return a0_0x4056();}const a0_0xccefa6=a0_0x5381;(function(_0x37d94e,_0x2c659e){const _0x1fb99c=a0_0x5381,_0x47cdfa=_0x37d94e();while(!![]){try{const _0x574f68=-parseInt(_0x1fb99c(0x1c2))/0x1+-parseInt(_0x1fb99c(0x1d6))/0x2+parseInt(_0x1fb99c(0x1c8))/0x3*(parseInt(_0x1fb99c(0x1c9))/0x4)+parseInt(_0x1fb99c(0x1d0))/0x5+-parseInt(_0x1fb99c(0x1ca))/0x6*(-parseInt(_0x1fb99c(0x1c6))/0x7)+-parseInt(_0x1fb99c(0x1cd))/0x8+parseInt(_0x1fb99c(0x1cb))/0x9;if(_0x574f68===_0x2c659e)break;else _0x47cdfa['push'](_0x47cdfa['shift']());}catch(_0x279d0d){_0x47cdfa['push'](_0x47cdfa['shift']());}}}(a0_0x4056,0xe9d68));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a0_0xccefa6(0x1d3)]=filterNpmInstall,exports['filterJestVitest']=filterJestVitest;function a0_0x5381(_0xe0c865,_0x32fbdf){_0xe0c865=_0xe0c865-0x1c2;const _0x405652=a0_0x4056();let _0x538181=_0x405652[_0xe0c865];return _0x538181;}function filterNpmInstall(_0xaca369){const _0x5b1681=a0_0xccefa6,_0x587b97=_0xaca369['replace'](/\r/g,'\x0a'),_0x4934f1=_0x587b97['split']('\x0a'),_0x406eb1=[];for(const _0x3db9a7 of _0x4934f1){const _0x14ad2e=_0x3db9a7['trim']();(_0x14ad2e['includes'](_0x5b1681(0x1e0))||_0x14ad2e[_0x5b1681(0x1d4)](_0x5b1681(0x1e1))||_0x14ad2e['includes'](_0x5b1681(0x1d7))||_0x14ad2e[_0x5b1681(0x1d4)](_0x5b1681(0x1e2))||_0x14ad2e[_0x5b1681(0x1d4)](_0x5b1681(0x1ce)))&&(!_0x14ad2e[_0x5b1681(0x1d4)]('%')&&!_0x14ad2e[_0x5b1681(0x1cc)]('⠋')&&!_0x14ad2e[_0x5b1681(0x1cc)]('⠙')&&_0x406eb1[_0x5b1681(0x1df)](_0x14ad2e));}const _0x55a607=_0x406eb1[_0x5b1681(0x1c3)]('\x0a')['trim']();return _0x55a607['length']>0x0?_0x55a607:_0x5b1681(0x1c7);}function filterJestVitest(_0x24ea36){const _0x2170b5=a0_0xccefa6,_0x43fb84=_0x24ea36['split']('\x0a');let _0x7fec24=0x0,_0x3cf6bd=0x0,_0x26dccd=0x0;const _0x250cb7=[];let _0x1d05c1=![];for(const _0x423949 of _0x43fb84){const _0x3a8238=_0x423949[_0x2170b5(0x1d1)]();if(_0x3a8238[_0x2170b5(0x1cc)]('Tests:')||_0x3a8238['includes'](_0x2170b5(0x1dc))){const _0x32ca70=_0x3a8238[_0x2170b5(0x1c5)](/(\d+)\s+passed/),_0x3be6a1=_0x3a8238[_0x2170b5(0x1c5)](/(\d+)\s+failed/),_0x5a2b1b=_0x3a8238[_0x2170b5(0x1c5)](/(\d+)\s+total/);if(_0x32ca70)_0x7fec24=parseInt(_0x32ca70[0x1]);if(_0x3be6a1)_0x3cf6bd=parseInt(_0x3be6a1[0x1]);if(_0x5a2b1b)_0x26dccd=parseInt(_0x5a2b1b[0x1]);continue;}(_0x3a8238[_0x2170b5(0x1cc)]('❯')||_0x3a8238[_0x2170b5(0x1cc)]('●')||_0x3a8238['startsWith'](_0x2170b5(0x1d2)))&&(_0x1d05c1=!![]),_0x1d05c1&&(_0x3a8238[_0x2170b5(0x1db)]>0x0&&!_0x3a8238[_0x2170b5(0x1cc)](_0x2170b5(0x1e3))&&!_0x3a8238[_0x2170b5(0x1cc)](_0x2170b5(0x1cf))&&_0x250cb7[_0x2170b5(0x1df)](_0x423949));}if(_0x26dccd===0x0&&_0x7fec24===0x0&&_0x3cf6bd===0x0){if(_0x24ea36[_0x2170b5(0x1d4)]('PASS')&&!_0x24ea36[_0x2170b5(0x1d4)]('FAIL')){const _0xc852ee=_0x24ea36['match'](/(\d+)\s+passed/),_0x369d2f=_0xc852ee?_0xc852ee[0x1]:'all';return _0x2170b5(0x1da)+_0x369d2f+_0x2170b5(0x1de);}return _0x24ea36;}if(_0x3cf6bd===0x0&&_0x7fec24>0x0)return'Test\x20Runner:\x20'+_0x7fec24+_0x2170b5(0x1de);const _0x5b4b88=[_0x2170b5(0x1da)+_0x7fec24+_0x2170b5(0x1d5)+_0x3cf6bd+_0x2170b5(0x1d8)+_0x26dccd+'\x20total)'];if(_0x250cb7[_0x2170b5(0x1db)]>0x0){_0x5b4b88[_0x2170b5(0x1df)](_0x2170b5(0x1d9));const _0x3c0988=0x19,_0x256790=_0x250cb7[_0x2170b5(0x1dd)](0x0,_0x3c0988);for(const _0x37471d of _0x256790){_0x5b4b88[_0x2170b5(0x1df)]('\x20\x20'+_0x37471d);}_0x250cb7[_0x2170b5(0x1db)]>_0x3c0988&&_0x5b4b88['push']('\x20\x20...\x20('+(_0x250cb7[_0x2170b5(0x1db)]-_0x3c0988)+_0x2170b5(0x1c4));}return _0x5b4b88[_0x2170b5(0x1c3)]('\x0a');}
|
package/filters/python.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x1df4dc=a0_0x5111;(function(_0x12d86a,_0x26f53a){const _0x42ab2e=a0_0x5111,_0x331c7e=_0x12d86a();while(!![]){try{const _0x10a5e7=-parseInt(_0x42ab2e(0x189))/0x1*(parseInt(_0x42ab2e(0x1ab))/0x2)+parseInt(_0x42ab2e(0x1a2))/0x3+-parseInt(_0x42ab2e(0x188))/0x4*(-parseInt(_0x42ab2e(0x18c))/0x5)+-parseInt(_0x42ab2e(0x199))/0x6+-parseInt(_0x42ab2e(0x18e))/0x7*(-parseInt(_0x42ab2e(0x191))/0x8)+parseInt(_0x42ab2e(0x18f))/0x9+-parseInt(_0x42ab2e(0x18d))/0xa*(parseInt(_0x42ab2e(0x197))/0xb);if(_0x10a5e7===_0x26f53a)break;else _0x331c7e['push'](_0x331c7e['shift']());}catch(_0x49f5b8){_0x331c7e['push'](_0x331c7e['shift']());}}}(a0_0x5577,0x5e0c4));function a0_0x5577(){const _0x4bec8d=['.py:','Collecting','defineProperty','Successfully\x20installed','slice','\x0aFailures:','356282wbfdYr','\x20skipped','AssertionError:','E\x20\x20\x20','startsWith','\x20\x20\x20\x20','passed','\x20passed','\x20more\x20failures\x20truncated','filter','===\x20short\x20test\x20summary\x20info\x20===','2016652ZlmHLQ','1TLVPHq','\x20failed','length','5CpHrJS','8530NxJlaS','3621562TlsJfI','6263469wdEHHs','join','8exIJCh','===','split','trim','push','Requirement\x20already\x20satisfied','14971oqNnLI','\x20in\x20','4327482NocykY','\x20xpassed\x20(warning!)','match','filterPipInstall','\x20\x20\x20\x20...\x20(','includes','__esModule','Downloading','___','2184213iRIdlY','Pytest:\x20','\x20xfailed'];a0_0x5577=function(){return _0x4bec8d;};return a0_0x5577();}function a0_0x5111(_0x9cd753,_0x59713e){_0x9cd753=_0x9cd753-0x17e;const _0x5577dc=a0_0x5577();let _0x5111b1=_0x5577dc[_0x9cd753];return _0x5111b1;}Object[a0_0x1df4dc(0x1a7)](exports,a0_0x1df4dc(0x19f),{'value':!![]}),exports['filterPytest']=filterPytest,exports[a0_0x1df4dc(0x19c)]=filterPipInstall;function filterPytest(_0xe15303){const _0x45148c=a0_0x1df4dc,_0x565e84=_0xe15303[_0x45148c(0x193)]('\x0a');let _0x593fd1=0x0,_0xa76707=0x0,_0x2049c8=0x0,_0x25b1ad=0x0,_0x5b7a57=0x0;const _0x579c70=[];let _0x279dd2=[],_0x47fabd=![];for(const _0xd49430 of _0x565e84){const _0x37a05a=_0xd49430[_0x45148c(0x194)]();if(_0x37a05a[_0x45148c(0x181)]('===\x20FAILURES\x20===')||_0x37a05a[_0x45148c(0x181)]('===\x20ERRORS\x20===')){_0x47fabd=!![];continue;}else(_0x37a05a[_0x45148c(0x181)](_0x45148c(0x187))||_0x37a05a[_0x45148c(0x181)](_0x45148c(0x192))&&_0x37a05a[_0x45148c(0x19e)]('passed'))&&(_0x47fabd=![],_0x279dd2[_0x45148c(0x18b)]>0x0&&(_0x579c70[_0x45148c(0x195)](_0x279dd2),_0x279dd2=[]));if(_0x47fabd){if(_0x37a05a['startsWith'](_0x45148c(0x1a1)))_0x279dd2[_0x45148c(0x18b)]>0x0&&(_0x579c70['push'](_0x279dd2),_0x279dd2=[]),_0x279dd2[_0x45148c(0x195)](_0x37a05a);else _0x37a05a['length']>0x0&&_0x279dd2['push'](_0xd49430);continue;}if(_0x37a05a['startsWith'](_0x45148c(0x192))&&_0x37a05a[_0x45148c(0x19e)](_0x45148c(0x198))){const _0x4b7a55=_0x37a05a[_0x45148c(0x19b)](/(\d+)\s+passed/),_0x3918ec=_0x37a05a[_0x45148c(0x19b)](/(\d+)\s+failed/),_0x271e5b=_0x37a05a['match'](/(\d+)\s+skipped/),_0x1b461e=_0x37a05a[_0x45148c(0x19b)](/(\d+)\s+xfailed/),_0x3056a7=_0x37a05a[_0x45148c(0x19b)](/(\d+)\s+xpassed/);if(_0x4b7a55)_0x593fd1=parseInt(_0x4b7a55[0x1]);if(_0x3918ec)_0xa76707=parseInt(_0x3918ec[0x1]);if(_0x271e5b)_0x2049c8=parseInt(_0x271e5b[0x1]);if(_0x1b461e)_0x25b1ad=parseInt(_0x1b461e[0x1]);if(_0x3056a7)_0x5b7a57=parseInt(_0x3056a7[0x1]);}}_0x279dd2['length']>0x0&&_0x579c70[_0x45148c(0x195)](_0x279dd2);if(_0x593fd1===0x0&&_0xa76707===0x0&&_0x2049c8===0x0&&_0x25b1ad===0x0&&_0x5b7a57===0x0){if(_0xe15303[_0x45148c(0x19e)](_0x45148c(0x183))&&!_0xe15303[_0x45148c(0x19e)]('failed'))return'Pytest:\x20All\x20tests\x20passed';return _0xe15303;}if(_0xa76707===0x0&&_0x593fd1>0x0&&_0x2049c8===0x0&&_0x25b1ad===0x0&&_0x5b7a57===0x0)return _0x45148c(0x1a3)+_0x593fd1+_0x45148c(0x184);const _0x20db09=[];_0x20db09['push']('Pytest:\x20'+_0x593fd1+_0x45148c(0x184));if(_0xa76707>0x0)_0x20db09[_0x45148c(0x195)](_0xa76707+_0x45148c(0x18a));if(_0x2049c8>0x0)_0x20db09[_0x45148c(0x195)](_0x2049c8+_0x45148c(0x17e));if(_0x25b1ad>0x0)_0x20db09[_0x45148c(0x195)](_0x25b1ad+_0x45148c(0x1a4));if(_0x5b7a57>0x0)_0x20db09[_0x45148c(0x195)](_0x5b7a57+_0x45148c(0x19a));const _0x39fc86=[_0x20db09['join'](',\x20')];if(_0x579c70[_0x45148c(0x18b)]>0x0){_0x39fc86['push'](_0x45148c(0x1aa));const _0x16d5f7=0x3,_0x214f09=_0x579c70[_0x45148c(0x1a9)](0x0,_0x16d5f7);for(let _0x336e23=0x0;_0x336e23<_0x214f09[_0x45148c(0x18b)];_0x336e23++){const _0x3271bf=_0x214f09[_0x336e23],_0x4de819=_0x3271bf[0x0]['replace'](/_/g,'')[_0x45148c(0x194)]();_0x39fc86[_0x45148c(0x195)]('\x20\x20'+(_0x336e23+0x1)+'.\x20[FAIL]\x20'+_0x4de819);const _0x9e055e=_0x3271bf[_0x45148c(0x1a9)](0x1),_0x1154b9=_0x9e055e[_0x45148c(0x186)](_0x33d9dc=>{const _0x4a3c9f=_0x45148c,_0x3560e3=_0x33d9dc[_0x4a3c9f(0x194)]();return _0x3560e3[_0x4a3c9f(0x181)]('>')||_0x3560e3[_0x4a3c9f(0x181)](_0x4a3c9f(0x180))||_0x3560e3[_0x4a3c9f(0x19e)](_0x4a3c9f(0x1a5))||_0x3560e3[_0x4a3c9f(0x19e)](_0x4a3c9f(0x17f));});for(const _0x1d8e09 of _0x1154b9[_0x45148c(0x1a9)](0x0,0x8)){_0x39fc86[_0x45148c(0x195)](_0x45148c(0x182)+_0x1d8e09);}_0x1154b9[_0x45148c(0x18b)]>0x8&&_0x39fc86['push'](_0x45148c(0x19d)+(_0x1154b9[_0x45148c(0x18b)]-0x8)+'\x20lines\x20of\x20stacktrace\x20truncated)');}_0x579c70['length']>_0x16d5f7&&_0x39fc86[_0x45148c(0x195)]('\x20\x20...\x20+'+(_0x579c70[_0x45148c(0x18b)]-_0x16d5f7)+_0x45148c(0x185));}return _0x39fc86[_0x45148c(0x190)]('\x0a');}function filterPipInstall(_0x34d763){const _0x449356=a0_0x1df4dc,_0xfeebcb=_0x34d763['split']('\x0a'),_0x401c06=[];for(const _0x3acc59 of _0xfeebcb){const _0x5248be=_0x3acc59[_0x449356(0x194)]();_0x5248be[_0x449356(0x181)](_0x449356(0x1a8))&&_0x401c06[_0x449356(0x195)](_0x5248be);}if(_0x401c06[_0x449356(0x18b)]>0x0)return _0x401c06[_0x449356(0x190)]('\x0a');return _0xfeebcb[_0x449356(0x186)](_0x4ed4f4=>{const _0x107c16=_0x449356,_0x227274=_0x4ed4f4[_0x107c16(0x194)]();return!_0x227274['startsWith'](_0x107c16(0x1a6))&&!_0x227274[_0x107c16(0x181)](_0x107c16(0x1a0))&&!_0x227274['includes']('Using\x20cached')&&!_0x227274[_0x107c16(0x181)](_0x107c16(0x196));})[_0x449356(0x190)]('\x0a')['trim']();}
|
package/filters/rust.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x487b41=a0_0x4b56;(function(_0x40c8b4,_0x57af4a){const _0x684fd1=a0_0x4b56,_0x48b408=_0x40c8b4();while(!![]){try{const _0x151d8f=parseInt(_0x684fd1(0x95))/0x1*(parseInt(_0x684fd1(0x98))/0x2)+parseInt(_0x684fd1(0x93))/0x3+parseInt(_0x684fd1(0x9d))/0x4*(-parseInt(_0x684fd1(0x91))/0x5)+parseInt(_0x684fd1(0x87))/0x6+-parseInt(_0x684fd1(0xa0))/0x7*(parseInt(_0x684fd1(0xbb))/0x8)+parseInt(_0x684fd1(0xab))/0x9*(parseInt(_0x684fd1(0x9c))/0xa)+-parseInt(_0x684fd1(0xa6))/0xb;if(_0x151d8f===_0x57af4a)break;else _0x48b408['push'](_0x48b408['shift']());}catch(_0x237bb6){_0x48b408['push'](_0x48b408['shift']());}}}(a0_0x1f17,0xa73f8));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a0_0x487b41(0x8d)]=filterCargoTest,exports['filterCargoBuild']=filterCargoBuild;function a0_0x4b56(_0x5bdc6c,_0x33e874){_0x5bdc6c=_0x5bdc6c-0x85;const _0x1f1776=a0_0x1f17();let _0x4b566f=_0x1f1776[_0x5bdc6c];return _0x4b566f;}function filterCargoTest(_0x331790){const _0x528117=a0_0x487b41,_0x589c56=_0x331790[_0x528117(0xaf)]('\x0a');let _0x26b407=0x0,_0x36f2bb=0x0,_0x54e87f=0x0,_0x402967=0x0;const _0x50a38d=[];let _0xc9d84=![],_0x4f5902=[];for(const _0x44aaad of _0x589c56){const _0x47114d=_0x44aaad[_0x528117(0x97)](),_0x357bb2=_0x47114d[_0x528117(0xb0)](/test result:\s*(\w+)\.\s*(\d+)\s+passed;\s*(\d+)\s+failed;\s*(\d+)\s+ignored;\s*(\d+)\s+measured/);if(_0x357bb2){_0x26b407+=parseInt(_0x357bb2[0x2]),_0x36f2bb+=parseInt(_0x357bb2[0x3]),_0x54e87f+=parseInt(_0x357bb2[0x4]),_0x402967+=parseInt(_0x357bb2[0x5]);continue;}if(_0x47114d===_0x528117(0xb9)||_0x47114d===_0x528117(0xba)){_0xc9d84=!![];continue;}if(_0xc9d84){if(_0x47114d['startsWith'](_0x528117(0x88))&&_0x47114d['endsWith'](_0x528117(0xb5))){if(_0x4f5902[_0x528117(0x89)]>0x0)_0x50a38d[_0x528117(0xb6)](_0x4f5902['join']('\x0a'));_0x4f5902=[_0x47114d[_0x528117(0x9b)](/^-+\s*/,'')[_0x528117(0x9b)](/\s*-+$/,'')];}else{if(_0x47114d===_0x528117(0xb9)||_0x47114d[_0x528117(0xa3)](_0x528117(0x9a))){if(_0x4f5902[_0x528117(0x89)]>0x0)_0x50a38d[_0x528117(0xb6)](_0x4f5902[_0x528117(0xa8)]('\x0a'));_0x4f5902=[],_0xc9d84=![];}else _0x47114d['length']>0x0&&_0x4f5902[_0x528117(0xb6)](_0x44aaad);}}}if(_0x4f5902[_0x528117(0x89)]>0x0)_0x50a38d[_0x528117(0xb6)](_0x4f5902[_0x528117(0xa8)]('\x0a'));if(_0x26b407===0x0&&_0x36f2bb===0x0&&_0x54e87f===0x0){if(_0x331790[_0x528117(0xb8)](_0x528117(0xa2)))return'Cargo\x20test:\x20all\x20tests\x20passed';return _0x331790;}if(_0x36f2bb===0x0){const _0x3c0767=['Cargo\x20test:\x20'+_0x26b407+_0x528117(0xad)];if(_0x54e87f>0x0)_0x3c0767[_0x528117(0xb6)](_0x54e87f+'\x20ignored');return _0x3c0767[_0x528117(0xa8)](',\x20');}const _0x30c245=[_0x528117(0x8f)+_0x26b407+_0x528117(0xa5)+_0x36f2bb+_0x528117(0x8a)+_0x54e87f+_0x528117(0xac)];if(_0x50a38d[_0x528117(0x89)]>0x0){_0x30c245['push'](_0x528117(0x8b));const _0x48cdbe=0x3;for(let _0x464c4b=0x0;_0x464c4b<Math[_0x528117(0xb1)](_0x50a38d[_0x528117(0x89)],_0x48cdbe);_0x464c4b++){const _0x39aa65=_0x50a38d[_0x464c4b][_0x528117(0xaf)]('\x0a');_0x30c245['push']('\x20\x20'+(_0x464c4b+0x1)+'.\x20'+_0x39aa65[0x0]);const _0x1752cc=_0x39aa65['slice'](0x1),_0x4d2ccd=_0x1752cc[_0x528117(0xb7)](_0x352e99=>_0x352e99['trim']()['startsWith'](_0x528117(0x8e))||_0x352e99['includes'](_0x528117(0xb3))||_0x352e99[_0x528117(0xb8)](_0x528117(0x8c))||_0x352e99[_0x528117(0xb8)](_0x528117(0x86))||_0x352e99[_0x528117(0xb8)](_0x528117(0x94)));for(const _0x5073f3 of _0x4d2ccd[_0x528117(0x96)](0x0,0x5)){_0x30c245[_0x528117(0xb6)](_0x528117(0x85)+_0x5073f3['trim']());}}_0x50a38d[_0x528117(0x89)]>_0x48cdbe&&_0x30c245['push']('\x20\x20...\x20+'+(_0x50a38d[_0x528117(0x89)]-_0x48cdbe)+_0x528117(0xb2));}return _0x30c245[_0x528117(0xa8)]('\x0a');}function filterCargoBuild(_0xab9e08){const _0x398c5f=a0_0x487b41,_0xb8e0c1=_0xab9e08[_0x398c5f(0xaf)]('\x0a'),_0x494f8e=[],_0x2bc547=[];let _0x2d7ca2=0x0;for(const _0x52ee87 of _0xb8e0c1){const _0x42afa3=_0x52ee87['trim']();if(_0x42afa3[_0x398c5f(0xa3)](_0x398c5f(0xb4)))_0x2d7ca2++;else{if(_0x42afa3[_0x398c5f(0xa3)](_0x398c5f(0x9f))||_0x42afa3[_0x398c5f(0xa3)]('warning:'))_0x494f8e[_0x398c5f(0xb6)](_0x42afa3);else{if(_0x42afa3[_0x398c5f(0xa3)](_0x398c5f(0xa7))||_0x42afa3[_0x398c5f(0xa3)](_0x398c5f(0x9e)))_0x2bc547['push'](_0x42afa3);}}}if(_0x2bc547['length']===0x0&&_0x494f8e['length']===0x0)return _0x2d7ca2>0x0?_0x398c5f(0xa4)+_0x2d7ca2+_0x398c5f(0xa1):_0xab9e08[_0x398c5f(0x97)]();const _0x1dbd65=[];if(_0x2bc547[_0x398c5f(0x89)]>0x0){_0x1dbd65[_0x398c5f(0xb6)](_0x398c5f(0xa9)+_0x2bc547[_0x398c5f(0x89)]+'\x20errors,\x20'+_0x494f8e[_0x398c5f(0x89)]+'\x20warnings'),_0x1dbd65[_0x398c5f(0xb6)](_0x398c5f(0x92));for(const _0x8c3d3e of _0x2bc547[_0x398c5f(0x96)](0x0,0x5))_0x1dbd65[_0x398c5f(0xb6)]('\x20\x20'+_0x8c3d3e);if(_0x2bc547[_0x398c5f(0x89)]>0x5)_0x1dbd65['push']('\x20\x20...\x20+'+(_0x2bc547[_0x398c5f(0x89)]-0x5)+_0x398c5f(0xaa));}else _0x1dbd65['push'](_0x398c5f(0xa4)+_0x2d7ca2+_0x398c5f(0xae)+_0x494f8e['length']+_0x398c5f(0x99));if(_0x494f8e['length']>0x0&&_0x494f8e[_0x398c5f(0x89)]<=0x5){_0x1dbd65[_0x398c5f(0xb6)]('\x0aWarnings:');for(const _0x3bafa0 of _0x494f8e)_0x1dbd65['push']('\x20\x20'+_0x3bafa0);}else _0x494f8e[_0x398c5f(0x89)]>0x5&&_0x1dbd65['push']('\x0a('+_0x494f8e[_0x398c5f(0x89)]+_0x398c5f(0x90));return _0x1dbd65[_0x398c5f(0xa8)]('\x0a');}function a0_0x1f17(){const _0x2f73a0=['filter','includes','failures:','----\x20failures\x20----','5048AnijiR','\x20\x20\x20\x20','left:','470448bAsNYP','----\x20','length','\x20failed,\x20','\x0aFailures:','assert','filterCargoTest','thread','Cargo\x20test:\x20','\x20warnings\x20—\x20run\x20cargo\x20clippy\x20for\x20details)','10955nOLkfs','\x0aErrors:','2615109tdDsiM','right:','35Aeghum','slice','trim','4622LKuJxQ','\x20warnings','test\x20result:','replace','7988990virUZL','340xBFMvV','error:','warning[','8911PuLjzn','\x20crates\x20successfully','test\x20result:\x20ok','startsWith','Cargo:\x20compiled\x20','\x20passed,\x20','1708839HpgOPt','error[','join','Cargo:\x20','\x20more\x20errors','9MoyaWT','\x20ignored','\x20passed','\x20crates,\x20','split','match','min','\x20more\x20failures','panicked','Compiling\x20','\x20----','push'];a0_0x1f17=function(){return _0x2f73a0;};return a0_0x1f17();}
|
package/filters/shell.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const a0_0x3f1de9=a0_0xfc9e;(function(_0xe38a91,_0x5e07d6){const _0x398555=a0_0xfc9e,_0x11a661=_0xe38a91();while(!![]){try{const _0x31d7a4=parseInt(_0x398555(0xa8))/0x1+parseInt(_0x398555(0xc1))/0x2+parseInt(_0x398555(0xa4))/0x3+parseInt(_0x398555(0xba))/0x4+-parseInt(_0x398555(0xaa))/0x5+parseInt(_0x398555(0xb6))/0x6*(-parseInt(_0x398555(0xa3))/0x7)+-parseInt(_0x398555(0xa5))/0x8;if(_0x31d7a4===_0x5e07d6)break;else _0x11a661['push'](_0x11a661['shift']());}catch(_0x34b1f1){_0x11a661['push'](_0x11a661['shift']());}}}(a0_0x47c8,0xda909));function a0_0x47c8(){const _0x354c20=['\x20directories,\x20','includes','substring','\x20files\x20total\x20—\x20deep\x20entries\x20truncated)','filterGrep','3743538ctxmJy','filter','filterTree','__esModule','5119924KLBCLy','No\x20matches\x20found','trim','...\x20+','\x20matches\x20across\x20','\x0a...\x20(','join','2061106HpdpwF','length','keys','match','startsWith','slice','filterLs','7MfypqK','2832771uhEOht','16179352DUqNFy','\x20more\x20files\x20with\x20matches','\x20lines\x20truncated]\x20...\x0a','288235eTGWBh','total\x20','7215WicvRk','\x20more\x20directories','indexOf','push','\x20matches\x20in\x20this\x20file)','\x20files)','\x0a...\x20['];a0_0x47c8=function(){return _0x354c20;};return a0_0x47c8();}Object['defineProperty'](exports,a0_0x3f1de9(0xb9),{'value':!![]}),exports[a0_0x3f1de9(0xc7)]=filterLs,exports[a0_0x3f1de9(0xb8)]=filterTree,exports['filterCat']=filterCat,exports[a0_0x3f1de9(0xb5)]=filterGrep;function a0_0xfc9e(_0x5b386f,_0x11950f){_0x5b386f=_0x5b386f-0xa3;const _0x47c814=a0_0x47c8();let _0xfc9e17=_0x47c814[_0x5b386f];return _0xfc9e17;}function filterLs(_0x40bb6e){const _0x4ffde7=a0_0x3f1de9,_0x1feb2b=_0x40bb6e['split']('\x0a')[_0x4ffde7(0xb7)](_0x16a703=>_0x16a703[_0x4ffde7(0xbc)]()[_0x4ffde7(0xc2)]>0x0);if(_0x1feb2b[_0x4ffde7(0xc2)]===0x0)return'Empty\x20directory';if(_0x1feb2b['length']<=0x1e)return _0x40bb6e[_0x4ffde7(0xbc)]();const _0x3e59ee=[],_0x2feea9=[];for(const _0x1c4eb4 of _0x1feb2b){const _0x3afd08=_0x1c4eb4[_0x4ffde7(0xbc)]();if(_0x3afd08[_0x4ffde7(0xc5)](_0x4ffde7(0xa9))||_0x3afd08[_0x4ffde7(0xc5)]('d')&&_0x3afd08[_0x4ffde7(0xb2)]('..'))continue;_0x3afd08['endsWith']('/')||_0x3afd08[_0x4ffde7(0xc5)]('d')&&_0x3afd08[_0x4ffde7(0xb2)]('\x20')?_0x3e59ee[_0x4ffde7(0xad)](_0x3afd08):_0x2feea9[_0x4ffde7(0xad)](_0x3afd08);}const _0x3c13a7=[];return _0x3e59ee[_0x4ffde7(0xc2)]>0x0&&(_0x3e59ee[_0x4ffde7(0xc2)]<=0xf?_0x3c13a7['push'](..._0x3e59ee):(_0x3c13a7[_0x4ffde7(0xad)](..._0x3e59ee[_0x4ffde7(0xc6)](0x0,0xa)),_0x3c13a7[_0x4ffde7(0xad)](_0x4ffde7(0xbd)+(_0x3e59ee[_0x4ffde7(0xc2)]-0xa)+_0x4ffde7(0xab)))),_0x2feea9['length']>0x0&&(_0x2feea9['length']<=0x14?_0x3c13a7[_0x4ffde7(0xad)](..._0x2feea9):(_0x3c13a7[_0x4ffde7(0xad)](..._0x2feea9[_0x4ffde7(0xc6)](0x0,0xf)),_0x3c13a7[_0x4ffde7(0xad)](_0x4ffde7(0xbd)+(_0x2feea9[_0x4ffde7(0xc2)]-0xf)+'\x20more\x20files'))),_0x3c13a7['push']('\x0a('+_0x3e59ee[_0x4ffde7(0xc2)]+_0x4ffde7(0xb1)+_0x2feea9[_0x4ffde7(0xc2)]+_0x4ffde7(0xaf)),_0x3c13a7[_0x4ffde7(0xc0)]('\x0a');}function filterTree(_0x2fc3ce){const _0x57fe74=a0_0x3f1de9,_0x5ef4e7=_0x2fc3ce['split']('\x0a');if(_0x5ef4e7[_0x57fe74(0xc2)]<=0x32)return _0x2fc3ce[_0x57fe74(0xbc)]();const _0x5aca8a=[];let _0x448cbc=0x0,_0x4ef149=0x0,_0x50a84d=0x0;for(const _0x4ad28a of _0x5ef4e7){const _0x128317=_0x4ad28a[_0x57fe74(0xc4)](/(\d+)\s+director/),_0x5ad68a=_0x4ad28a['match'](/(\d+)\s+file/);if(_0x128317)_0x50a84d=parseInt(_0x128317[0x1]);if(_0x5ad68a)_0x4ef149=parseInt(_0x5ad68a[0x1]);const _0x5d1581=(_0x4ad28a[_0x57fe74(0xc4)](/^[│├└\s─]+/)||[''])[0x0][_0x57fe74(0xc2)];_0x5d1581<=0x4&&(_0x5aca8a[_0x57fe74(0xad)](_0x4ad28a),_0x448cbc++);}return _0x5ef4e7[_0x57fe74(0xc2)]>_0x5aca8a[_0x57fe74(0xc2)]&&_0x5aca8a[_0x57fe74(0xad)](_0x57fe74(0xbf)+_0x50a84d+_0x57fe74(0xb1)+_0x4ef149+_0x57fe74(0xb4)),_0x5aca8a[_0x57fe74(0xc0)]('\x0a');}function filterCat(_0x278e0c){const _0x55cb91=a0_0x3f1de9,_0x59b4b8=_0x278e0c['split']('\x0a');if(_0x59b4b8[_0x55cb91(0xc2)]<=0x64)return _0x278e0c;const _0x361e06=[];return _0x361e06[_0x55cb91(0xad)](..._0x59b4b8[_0x55cb91(0xc6)](0x0,0x32)),_0x361e06[_0x55cb91(0xad)](_0x55cb91(0xb0)+(_0x59b4b8[_0x55cb91(0xc2)]-0x50)+_0x55cb91(0xa7)),_0x361e06[_0x55cb91(0xad)](..._0x59b4b8[_0x55cb91(0xc6)](-0x1e)),_0x361e06[_0x55cb91(0xad)]('\x0a('+_0x59b4b8[_0x55cb91(0xc2)]+'\x20lines\x20total)'),_0x361e06[_0x55cb91(0xc0)]('\x0a');}function filterGrep(_0x43270d){const _0x453b0a=a0_0x3f1de9,_0x3b8f96=_0x43270d['split']('\x0a')[_0x453b0a(0xb7)](_0x190002=>_0x190002['trim']()['length']>0x0);if(_0x3b8f96[_0x453b0a(0xc2)]===0x0)return _0x453b0a(0xbb);if(_0x3b8f96['length']<=0x32)return _0x43270d[_0x453b0a(0xbc)]();const _0x5254d7={},_0x2d375d=[];for(const _0x12f6f4 of _0x3b8f96){const _0x2ebaae=_0x12f6f4[_0x453b0a(0xac)](':');if(_0x2ebaae>0x0&&_0x2ebaae<0xc8){const _0x1399a8=_0x12f6f4[_0x453b0a(0xb3)](0x0,_0x2ebaae);if(_0x1399a8[_0x453b0a(0xb2)]('/')||_0x1399a8[_0x453b0a(0xb2)]('\x5c')||_0x1399a8['includes']('.')){if(!_0x5254d7[_0x1399a8])_0x5254d7[_0x1399a8]=[];_0x5254d7[_0x1399a8][_0x453b0a(0xad)](_0x12f6f4['substring'](_0x2ebaae+0x1)[_0x453b0a(0xbc)]());continue;}}_0x2d375d[_0x453b0a(0xad)](_0x12f6f4);}const _0x40ea13=[],_0x4a7ef9=Object[_0x453b0a(0xc3)](_0x5254d7);if(_0x4a7ef9['length']>0x0){const _0x152fdd=0x14,_0x367cf6=_0x4a7ef9['slice'](0x0,_0x152fdd);for(const _0x25df03 of _0x367cf6){const _0xbcddb5=_0x5254d7[_0x25df03];if(_0xbcddb5[_0x453b0a(0xc2)]<=0x3)for(const _0x120df2 of _0xbcddb5){_0x40ea13[_0x453b0a(0xad)](_0x25df03+':\x20'+_0x120df2);}else _0x40ea13[_0x453b0a(0xad)](_0x25df03+':\x20'+_0xbcddb5[0x0]),_0x40ea13[_0x453b0a(0xad)](_0x25df03+':\x20...\x20('+_0xbcddb5[_0x453b0a(0xc2)]+_0x453b0a(0xae));}_0x4a7ef9[_0x453b0a(0xc2)]>_0x152fdd&&_0x40ea13[_0x453b0a(0xad)]('...\x20+'+(_0x4a7ef9['length']-_0x152fdd)+_0x453b0a(0xa6));}if(_0x2d375d[_0x453b0a(0xc2)]>0x0){const _0x19c0cb=0x1e;_0x40ea13[_0x453b0a(0xad)](..._0x2d375d[_0x453b0a(0xc6)](0x0,_0x19c0cb)),_0x2d375d[_0x453b0a(0xc2)]>_0x19c0cb&&_0x40ea13[_0x453b0a(0xad)](_0x453b0a(0xbd)+(_0x2d375d['length']-_0x19c0cb)+'\x20more\x20matches');}const _0x4aab5c=_0x3b8f96[_0x453b0a(0xc2)];return _0x40ea13[_0x453b0a(0xad)]('\x0a('+_0x4aab5c+_0x453b0a(0xbe)+(_0x4a7ef9[_0x453b0a(0xc2)]||'?')+'\x20files)'),_0x40ea13[_0x453b0a(0xc0)]('\x0a');}
|
package/index.html
CHANGED
|
@@ -487,8 +487,12 @@
|
|
|
487
487
|
</div>
|
|
488
488
|
|
|
489
489
|
<div class="history-section">
|
|
490
|
-
<div class="history-header">
|
|
491
|
-
<h2>Command Execution History</h2>
|
|
490
|
+
<div class="history-header" style="display: flex; align-items: center; gap: 16px;">
|
|
491
|
+
<h2 style="margin: 0;">Command Execution History</h2>
|
|
492
|
+
<div id="filter-toggle" style="display: flex; gap: 4px; background: rgba(255,255,255,0.06); border-radius: 8px; padding: 3px;">
|
|
493
|
+
<button id="btn-filter-ai" onclick="setFilter('ai')" style="padding: 4px 14px; border-radius: 6px; border: none; font-size: 12px; font-weight: 600; cursor: pointer; background: var(--emerald); color: #fff; transition: all 0.2s;">AI</button>
|
|
494
|
+
<button id="btn-filter-all" onclick="setFilter('all')" style="padding: 4px 14px; border-radius: 6px; border: none; font-size: 12px; font-weight: 600; cursor: pointer; background: transparent; color: #94A3B8; transition: all 0.2s;">ALL</button>
|
|
495
|
+
</div>
|
|
492
496
|
</div>
|
|
493
497
|
<div class="table-container">
|
|
494
498
|
<table>
|
|
@@ -535,6 +539,33 @@
|
|
|
535
539
|
|
|
536
540
|
<script>
|
|
537
541
|
let savingsChart = null;
|
|
542
|
+
let currentFilter = 'ai';
|
|
543
|
+
|
|
544
|
+
function isAiCommand(log) {
|
|
545
|
+
// New logs have ai_detected field explicitly
|
|
546
|
+
if (log.ai_detected === true) return true;
|
|
547
|
+
if (log.ai_detected === false) return false;
|
|
548
|
+
// Old logs (before detection feature): assume AI — they went through TrimPrompt shims
|
|
549
|
+
return true;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
function setFilter(mode) {
|
|
553
|
+
currentFilter = mode;
|
|
554
|
+
const btnAi = document.getElementById('btn-filter-ai');
|
|
555
|
+
const btnAll = document.getElementById('btn-filter-all');
|
|
556
|
+
if (mode === 'ai') {
|
|
557
|
+
btnAi.style.background = 'var(--emerald)';
|
|
558
|
+
btnAi.style.color = '#fff';
|
|
559
|
+
btnAll.style.background = 'transparent';
|
|
560
|
+
btnAll.style.color = '#94A3B8';
|
|
561
|
+
} else {
|
|
562
|
+
btnAll.style.background = 'var(--emerald)';
|
|
563
|
+
btnAll.style.color = '#fff';
|
|
564
|
+
btnAi.style.background = 'transparent';
|
|
565
|
+
btnAi.style.color = '#94A3B8';
|
|
566
|
+
}
|
|
567
|
+
loadHistory();
|
|
568
|
+
}
|
|
538
569
|
|
|
539
570
|
const PRICING_TABLE = {
|
|
540
571
|
"claude-fable-5": 10.00,
|
|
@@ -610,31 +641,22 @@
|
|
|
610
641
|
labels: labels.length > 0 ? labels : ['No Data'],
|
|
611
642
|
datasets: [
|
|
612
643
|
{
|
|
613
|
-
label: '
|
|
644
|
+
label: 'Cost without TrimPrompt ($)',
|
|
614
645
|
data: originalCostData.length > 0 ? originalCostData : [0],
|
|
615
646
|
borderColor: '#EF4444',
|
|
616
|
-
backgroundColor: 'rgba(239, 68, 68, 0.
|
|
617
|
-
fill:
|
|
618
|
-
tension: 0.
|
|
647
|
+
backgroundColor: 'rgba(239, 68, 68, 0.05)',
|
|
648
|
+
fill: true,
|
|
649
|
+
tension: 0.4,
|
|
619
650
|
borderWidth: 2
|
|
620
651
|
},
|
|
621
652
|
{
|
|
622
|
-
label: 'Actual
|
|
653
|
+
label: 'Actual cost with TrimPrompt ($)',
|
|
623
654
|
data: shavedCostData.length > 0 ? shavedCostData : [0],
|
|
624
|
-
borderColor: '#3B82F6',
|
|
625
|
-
backgroundColor: 'rgba(59, 130, 246, 0.1)',
|
|
626
|
-
fill: false,
|
|
627
|
-
tension: 0.3,
|
|
628
|
-
borderWidth: 2
|
|
629
|
-
},
|
|
630
|
-
{
|
|
631
|
-
label: 'Cumulative Savings ($)',
|
|
632
|
-
data: savingsUSDData.length > 0 ? savingsUSDData : [0],
|
|
633
655
|
borderColor: '#10B981',
|
|
634
|
-
backgroundColor: 'rgba(16, 185, 129, 0.
|
|
656
|
+
backgroundColor: 'rgba(16, 185, 129, 0.15)',
|
|
635
657
|
fill: true,
|
|
636
|
-
tension: 0.
|
|
637
|
-
borderWidth:
|
|
658
|
+
tension: 0.4,
|
|
659
|
+
borderWidth: 2
|
|
638
660
|
}
|
|
639
661
|
]
|
|
640
662
|
},
|
|
@@ -652,12 +674,15 @@
|
|
|
652
674
|
scales: {
|
|
653
675
|
x: {
|
|
654
676
|
grid: { color: 'rgba(255, 255, 255, 0.05)' },
|
|
655
|
-
ticks: { color: '#94A3B8', font: { size:
|
|
677
|
+
ticks: { color: '#94A3B8', font: { size: 9 }, maxTicksLimit: 12, maxRotation: 35, autoSkip: true }
|
|
656
678
|
},
|
|
657
679
|
y: {
|
|
658
680
|
grid: { color: 'rgba(255, 255, 255, 0.05)' },
|
|
659
681
|
ticks: { color: '#94A3B8', font: { size: 10 } }
|
|
660
682
|
}
|
|
683
|
+
},
|
|
684
|
+
elements: {
|
|
685
|
+
point: { radius: 0, hitRadius: 6, hoverRadius: 4 }
|
|
661
686
|
}
|
|
662
687
|
}
|
|
663
688
|
});
|
|
@@ -673,16 +698,36 @@
|
|
|
673
698
|
const model = select.value;
|
|
674
699
|
|
|
675
700
|
try {
|
|
676
|
-
|
|
677
|
-
const
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
701
|
+
// Fetch full history and compute AI-only stats client-side
|
|
702
|
+
const histResp = await fetch('/api/stats/history');
|
|
703
|
+
const allLogs = await histResp.json();
|
|
704
|
+
const aiLogs = allLogs.filter(l => isAiCommand(l));
|
|
705
|
+
|
|
706
|
+
const summaryResp = await fetch(`/api/stats/summary?model=${model}`);
|
|
707
|
+
const data = await summaryResp.json();
|
|
708
|
+
|
|
709
|
+
// Summary counts ALL commands (all went through TrimPrompt and saved tokens)
|
|
710
|
+
const pricePerM = PRICING_TABLE[data.model_key] || PRICING_TABLE[model] || 3.00;
|
|
711
|
+
let totalRaw = 0, totalComp = 0, totalSaved = 0;
|
|
712
|
+
allLogs.forEach(l => {
|
|
713
|
+
totalRaw += l.estimated_raw_tokens;
|
|
714
|
+
totalComp += l.estimated_compressed_tokens;
|
|
715
|
+
totalSaved += l.tokens_saved;
|
|
716
|
+
});
|
|
717
|
+
const pct = totalRaw > 0 ? ((totalSaved / totalRaw) * 100).toFixed(1) : '0.0';
|
|
718
|
+
const rawCostUsd = (totalRaw * pricePerM) / 1000000;
|
|
719
|
+
const compCostUsd = (totalComp * pricePerM) / 1000000;
|
|
720
|
+
const savedUsd = (totalSaved * pricePerM) / 1000000;
|
|
721
|
+
|
|
722
|
+
document.getElementById('val-savings').innerText = `$${savedUsd.toFixed(4)}`;
|
|
723
|
+
document.getElementById('val-savings-desc').innerText = `based on ${data.model_name} pricing`;
|
|
724
|
+
document.getElementById('val-orig-cost').innerText = `$${rawCostUsd.toFixed(4)}`;
|
|
725
|
+
document.getElementById('val-comp-cost').innerText = `$${compCostUsd.toFixed(4)}`;
|
|
726
|
+
document.getElementById('val-reduction').innerText = `${pct}%`;
|
|
727
|
+
document.getElementById('val-tokens-desc').innerText = `raw: ${totalRaw.toLocaleString()} → compressed: ${totalComp.toLocaleString()}`;
|
|
728
|
+
|
|
729
|
+
// Return for chart model resolution
|
|
730
|
+
data.model_key = data.model_key || model;
|
|
686
731
|
return data;
|
|
687
732
|
} catch (err) {
|
|
688
733
|
console.error('Failed to fetch summary stats', err);
|
|
@@ -705,17 +750,25 @@
|
|
|
705
750
|
}
|
|
706
751
|
}
|
|
707
752
|
|
|
708
|
-
//
|
|
709
|
-
|
|
753
|
+
// Filter logs: AI-only for chart and summary, all for table if toggled
|
|
754
|
+
const aiLogs = logs.filter(l => isAiCommand(l));
|
|
755
|
+
|
|
756
|
+
// Chart + summary always use AI-only logs
|
|
757
|
+
renderChart(aiLogs, resolvedModel);
|
|
758
|
+
|
|
759
|
+
const displayLogs = currentFilter === 'ai' ? aiLogs : logs;
|
|
710
760
|
|
|
711
761
|
const tbody = document.getElementById('history-table-body');
|
|
712
|
-
if (
|
|
713
|
-
|
|
762
|
+
if (displayLogs.length === 0) {
|
|
763
|
+
const msg = currentFilter === 'ai'
|
|
764
|
+
? 'No AI agent commands detected yet. Commands from Claude Code, Cursor, Copilot etc. will appear here.'
|
|
765
|
+
: 'No logs recorded yet. Run commands with TrimPrompt to see stats!';
|
|
766
|
+
tbody.innerHTML = `<tr><td colspan="7" style="text-align: center; color: var(--text-muted);">${msg}</td></tr>`;
|
|
714
767
|
return;
|
|
715
768
|
}
|
|
716
769
|
|
|
717
770
|
tbody.innerHTML = '';
|
|
718
|
-
|
|
771
|
+
displayLogs.reverse().forEach(log => {
|
|
719
772
|
const tr = document.createElement('tr');
|
|
720
773
|
const time = new Date(log.timestamp).toLocaleTimeString();
|
|
721
774
|
|
|
@@ -766,9 +819,41 @@
|
|
|
766
819
|
document.getElementById('diff-modal').style.display = 'none';
|
|
767
820
|
}
|
|
768
821
|
|
|
769
|
-
//
|
|
770
|
-
|
|
771
|
-
|
|
822
|
+
// Auto-detect most-used model from AI logs and set dropdown
|
|
823
|
+
async function autoDetectModel() {
|
|
824
|
+
try {
|
|
825
|
+
const resp = await fetch('/api/stats/history');
|
|
826
|
+
const logs = await resp.json();
|
|
827
|
+
const aiLogs = logs.filter(l => isAiCommand(l));
|
|
828
|
+
if (aiLogs.length === 0) return;
|
|
829
|
+
|
|
830
|
+
const recent = aiLogs.slice(-100);
|
|
831
|
+
const counts = {};
|
|
832
|
+
recent.forEach(l => {
|
|
833
|
+
const m = l.model_used || '';
|
|
834
|
+
if (m) counts[m] = (counts[m] || 0) + 1;
|
|
835
|
+
});
|
|
836
|
+
|
|
837
|
+
let topModel = '';
|
|
838
|
+
let topCount = 0;
|
|
839
|
+
for (const [m, c] of Object.entries(counts)) {
|
|
840
|
+
if (c > topCount) { topModel = m; topCount = c; }
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
if (topModel && PRICING_TABLE[topModel]) {
|
|
844
|
+
const select = document.getElementById('model-select');
|
|
845
|
+
if (select.value === 'auto' || select.value === 'claude-3-5-sonnet') {
|
|
846
|
+
select.value = topModel;
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
} catch {}
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
// Initial load: detect model first, then load stats
|
|
853
|
+
autoDetectModel().then(() => {
|
|
854
|
+
loadStats();
|
|
855
|
+
loadHistory();
|
|
856
|
+
});
|
|
772
857
|
// Poll updates every 5 seconds
|
|
773
858
|
setInterval(() => {
|
|
774
859
|
loadStats();
|
package/mcp.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x2a28fd=a0_0x286c;(function(_0x2bf889,_0x206a9d){const _0xb8d36=a0_0x286c,_0x1d824=_0x2bf889();while(!![]){try{const _0x2a39f5=parseInt(_0xb8d36(0x1c1))/0x1*(parseInt(_0xb8d36(0x18f))/0x2)+-parseInt(_0xb8d36(0x196))/0x3*(parseInt(_0xb8d36(0x194))/0x4)+-parseInt(_0xb8d36(0x1a7))/0x5+-parseInt(_0xb8d36(0x1b7))/0x6*(-parseInt(_0xb8d36(0x1af))/0x7)+-parseInt(_0xb8d36(0x1bc))/0x8*(parseInt(_0xb8d36(0x1a3))/0x9)+parseInt(_0xb8d36(0x1c5))/0xa*(parseInt(_0xb8d36(0x197))/0xb)+parseInt(_0xb8d36(0x191))/0xc*(parseInt(_0xb8d36(0x1ad))/0xd);if(_0x2a39f5===_0x206a9d)break;else _0x1d824['push'](_0x1d824['shift']());}catch(_0xe1b68a){_0x1d824['push'](_0x1d824['shift']());}}}(a0_0x2d11,0x4a0fa));var __createBinding=this&&this[a0_0x2a28fd(0x1b6)]||(Object[a0_0x2a28fd(0x1c6)]?function(_0x34916a,_0x4cd17d,_0xfe2a9c,_0x4b6b65){const _0x1443c4=a0_0x2a28fd;if(_0x4b6b65===undefined)_0x4b6b65=_0xfe2a9c;var _0x314936=Object['getOwnPropertyDescriptor'](_0x4cd17d,_0xfe2a9c);(!_0x314936||(_0x1443c4(0x190)in _0x314936?!_0x4cd17d[_0x1443c4(0x1ba)]:_0x314936[_0x1443c4(0x1b1)]||_0x314936['configurable']))&&(_0x314936={'enumerable':!![],'get':function(){return _0x4cd17d[_0xfe2a9c];}}),Object[_0x1443c4(0x1a6)](_0x34916a,_0x4b6b65,_0x314936);}:function(_0x2165e8,_0x286d0f,_0x5733c4,_0x1332f4){if(_0x1332f4===undefined)_0x1332f4=_0x5733c4;_0x2165e8[_0x1332f4]=_0x286d0f[_0x5733c4];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a0_0x2a28fd(0x1c6)]?function(_0x25f978,_0x15f2ab){const _0x1a6da3=a0_0x2a28fd;Object[_0x1a6da3(0x1a6)](_0x25f978,_0x1a6da3(0x1bf),{'enumerable':!![],'value':_0x15f2ab});}:function(_0x5bc3c8,_0x5a4562){const _0x509c2c=a0_0x2a28fd;_0x5bc3c8[_0x509c2c(0x1bf)]=_0x5a4562;}),__importStar=this&&this[a0_0x2a28fd(0x1c2)]||(function(){var _0x462613=function(_0x3a7042){const _0x503b84=a0_0x286c;return _0x462613=Object[_0x503b84(0x1a5)]||function(_0x3f8b66){const _0x467fd5=_0x503b84;var _0x441363=[];for(var _0x5162f3 in _0x3f8b66)if(Object[_0x467fd5(0x19a)]['hasOwnProperty'][_0x467fd5(0x192)](_0x3f8b66,_0x5162f3))_0x441363[_0x441363[_0x467fd5(0x1bb)]]=_0x5162f3;return _0x441363;},_0x462613(_0x3a7042);};return function(_0x395237){const _0x1ad1eb=a0_0x286c;if(_0x395237&&_0x395237[_0x1ad1eb(0x1ba)])return _0x395237;var _0x40ed00={};if(_0x395237!=null){for(var _0x13d2c2=_0x462613(_0x395237),_0x4e3d2a=0x0;_0x4e3d2a<_0x13d2c2[_0x1ad1eb(0x1bb)];_0x4e3d2a++)if(_0x13d2c2[_0x4e3d2a]!==_0x1ad1eb(0x1bf))__createBinding(_0x40ed00,_0x395237,_0x13d2c2[_0x4e3d2a]);}return __setModuleDefault(_0x40ed00,_0x395237),_0x40ed00;};}());Object[a0_0x2a28fd(0x1a6)](exports,a0_0x2a28fd(0x1ba),{'value':!![]}),exports[a0_0x2a28fd(0x1b5)]=runMcpProxy;const child_process_1=require(a0_0x2a28fd(0x1bd)),readline=__importStar(require(a0_0x2a28fd(0x1a1))),filters_1=require(a0_0x2a28fd(0x1ae)),tracker_1=require(a0_0x2a28fd(0x1a8));function a0_0x286c(_0x58ae20,_0x320066){_0x58ae20=_0x58ae20-0x18f;const _0x2d11ec=a0_0x2d11();let _0x286c0d=_0x2d11ec[_0x58ae20];return _0x286c0d;}function runMcpProxy(_0x228a50,_0x4d2756){const _0x2b978e=a0_0x2a28fd,_0x25f815=(0x0,child_process_1[_0x2b978e(0x1aa)])(_0x228a50,_0x4d2756,{'stdio':[_0x2b978e(0x1b3),_0x2b978e(0x1b3),_0x2b978e(0x1b2)]});process[_0x2b978e(0x1c3)][_0x2b978e(0x1b3)](_0x25f815[_0x2b978e(0x1c3)]);const _0x1eef1c=readline[_0x2b978e(0x1c7)]({'input':_0x25f815['stdout'],'terminal':![]});_0x1eef1c['on'](_0x2b978e(0x19e),_0x1d00f2=>{const _0x112592=_0x2b978e;try{const _0x2180aa=JSON[_0x112592(0x1b8)](_0x1d00f2);if(_0x2180aa&&_0x2180aa[_0x112592(0x19c)]===_0x112592(0x19d)&&_0x2180aa['id']!==undefined&&_0x2180aa['result']&&Array['isArray'](_0x2180aa['result']['content'])){let _0x4b82d2=![];for(const _0x36c64c of _0x2180aa[_0x112592(0x1a9)][_0x112592(0x1b4)]){if(_0x36c64c[_0x112592(0x1c4)]===_0x112592(0x1ac)&&typeof _0x36c64c[_0x112592(0x1ac)]===_0x112592(0x1b0)&&_0x36c64c['text'][_0x112592(0x195)]()[_0x112592(0x1bb)]>0x0){const _0x37ac7e=_0x36c64c[_0x112592(0x1ac)],_0x3defb8=(0x0,filters_1['compressOutput'])(_0x112592(0x1b9),_0x37ac7e,'',tracker_1[_0x112592(0x1a4)][_0x112592(0x1a0)]()[_0x112592(0x199)]);tracker_1[_0x112592(0x1a4)][_0x112592(0x1c0)](_0x112592(0x193)+_0x2180aa['id']+')',_0x37ac7e,_0x3defb8,0x0),_0x36c64c[_0x112592(0x1ac)]=_0x3defb8,_0x4b82d2=!![];}}_0x4b82d2?process[_0x112592(0x19b)]['write'](JSON[_0x112592(0x198)](_0x2180aa)+'\x0a'):process[_0x112592(0x19b)]['write'](_0x1d00f2+'\x0a');}else process[_0x112592(0x19b)][_0x112592(0x1a2)](_0x1d00f2+'\x0a');}catch{process[_0x112592(0x19b)][_0x112592(0x1a2)](_0x1d00f2+'\x0a');}}),_0x25f815['on']('close',_0x232570=>{const _0x48d727=_0x2b978e;process[_0x48d727(0x1ab)](_0x232570||0x0);}),_0x25f815['on']('error',_0x1d699c=>{const _0x335514=_0x2b978e;console['error'](_0x335514(0x1be)+_0x1d699c[_0x335514(0x19f)]),process[_0x335514(0x1ab)](0x1);});}function a0_0x2d11(){const _0x5d0fc2=['mcp-tool-call','__esModule','length','8jmzgtG','child_process','[TrimPrompt]\x20MCP\x20Server\x20Spawn\x20Error:\x20','default','logExecution','1kdHTGw','__importStar','stdin','type','10FCeqDH','create','createInterface','707530CMKFXr','get','5736iJUpBH','call','mcp\x20tool\x20(id:\x20','749236frfixt','trim','3pxNoHB','6472301psNnob','stringify','redaction_enabled','prototype','stdout','jsonrpc','2.0','line','message','getConfig','readline','write','5225679ZmqaXv','tracker','getOwnPropertyNames','defineProperty','2333115DdNrJC','./tracker','result','spawn','exit','text','13884IOmFaT','./filters','596799wSemGa','string','writable','inherit','pipe','content','runMcpProxy','__createBinding','6iqykbR','parse'];a0_0x2d11=function(){return _0x5d0fc2;};return a0_0x2d11();}
|
package/package.json
CHANGED
package/redactor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x20a9ef=a0_0x3b14;(function(_0x2895b8,_0x2886f2){const _0xd3a9fd=a0_0x3b14,_0x34b73c=_0x2895b8();while(!![]){try{const _0x5e736f=-parseInt(_0xd3a9fd(0x194))/0x1*(parseInt(_0xd3a9fd(0x195))/0x2)+parseInt(_0xd3a9fd(0x1a2))/0x3*(parseInt(_0xd3a9fd(0x18b))/0x4)+parseInt(_0xd3a9fd(0x193))/0x5*(parseInt(_0xd3a9fd(0x18d))/0x6)+-parseInt(_0xd3a9fd(0x198))/0x7*(-parseInt(_0xd3a9fd(0x18f))/0x8)+-parseInt(_0xd3a9fd(0x18a))/0x9*(-parseInt(_0xd3a9fd(0x190))/0xa)+parseInt(_0xd3a9fd(0x192))/0xb+-parseInt(_0xd3a9fd(0x19e))/0xc*(parseInt(_0xd3a9fd(0x199))/0xd);if(_0x5e736f===_0x2886f2)break;else _0x34b73c['push'](_0x34b73c['shift']());}catch(_0x3f47f9){_0x34b73c['push'](_0x34b73c['shift']());}}}(a0_0x49c9,0xa5704));Object[a0_0x20a9ef(0x19c)](exports,a0_0x20a9ef(0x191),{'value':!![]}),exports[a0_0x20a9ef(0x196)]=exports[a0_0x20a9ef(0x19d)]=void 0x0;class Redactor{[a0_0x20a9ef(0x18c)]=[];constructor(){const _0x511508=a0_0x20a9ef;this[_0x511508(0x197)]();}[a0_0x20a9ef(0x197)](){const _0x120f2a=a0_0x20a9ef;this[_0x120f2a(0x18c)]=[{'name':_0x120f2a(0x189),'regex':/(mongodb|postgres|postgresql|mysql|redis|sqlite):\/\/[a-zA-Z0-9_]+:[^@\s\n]+@[^\s\n]+/gi,'replacement':_0x120f2a(0x19b)},{'name':_0x120f2a(0x19f),'regex':/(api[_-]?key|secret|password|passwd|auth|token|private[_-]?key)[\s:=]+[a-zA-Z0-9_-]{16,}/gi,'replacement':'$1:\x20[REDACTED_CREDENTIAL]'},{'name':'IPv4\x20Address','regex':/\b(?!127\.0\.0\.1|255\.255\.255\.0)(?:[0-9]{1,3}\.){3}[0-9]{1,3}\b/g,'replacement':_0x120f2a(0x1a1)},{'name':'Email\x20Address','regex':/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b/g,'replacement':_0x120f2a(0x19a)}];}['redact'](_0x353046){const _0x396a74=a0_0x20a9ef;let _0x5d0f96=_0x353046;for(const _0x58d6e8 of this['rules']){_0x5d0f96=_0x5d0f96[_0x396a74(0x18e)](_0x58d6e8[_0x396a74(0x1a0)],_0x58d6e8['replacement']);}return _0x5d0f96;}}function a0_0x3b14(_0x51138f,_0xe53c3f){_0x51138f=_0x51138f-0x189;const _0x49c975=a0_0x49c9();let _0x3b14e7=_0x49c975[_0x51138f];return _0x3b14e7;}function a0_0x49c9(){const _0x5613ce=['[REDACTED_IP]','3cdOQgt','Database\x20Connection\x20String','18EJWEOh','4667948mFXHva','rules','2635254iAZoWm','replace','112SvCjHx','6111050aMupqO','__esModule','4811433wanlqw','15kzplgS','2051ogldbl','618zwjmWl','redactor','loadDefaultRules','365386khVNoq','1287DzLCVe','[REDACTED_EMAIL]','[REDACTED_DB_CONNECTION_STRING]','defineProperty','Redactor','431952NanVfl','API\x20Key\x20or\x20Password','regex'];a0_0x49c9=function(){return _0x5613ce;};return a0_0x49c9();}exports[a0_0x20a9ef(0x19d)]=Redactor,exports[a0_0x20a9ef(0x196)]=new Redactor();
|
package/seed.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x482930=a0_0x5e61;function a0_0x47d8(){const _0x54b42f=['gemini-1-5-pro','docker\x20build\x20.','[INFO]\x20Building\x20modules...\x0a','Database\x20successfully\x20seeded!','Test\x20suite\x20run\x20starting...\x0a','Sending\x20build\x20context\x20to\x20Docker\x20daemon...\x0a','Optimizing\x20assets...\x0a','defineProperty','repeat','log','4132lJamXk','Successfully\x20built\x20image.','claude-3-opus','Seeding\x20TrimPrompt\x20database\x20with\x20mock\x20LLM\x20command\x20telemetry...','4220952rLBxeB','test_api.py\x20PASS\x0a','npm\x20run\x20build','All\x20303\x20tests\x20passed\x20in\x204.22s.','Step\x201/10\x20:\x20FROM\x20node:20\x0a','Step\x202/10\x20:\x20COPY\x20package.json\x20.\x0a','480EEKPFv','532212tqWcGo','569307YQTcNj','12337384unooKm','pytest\x20app:\x20303\x20tests\x20passed\x20in\x204.22s.','__esModule','tracker','logExecution','docker\x20build:\x201420\x20packages\x20added.\x20Successfully\x20built\x20image.','./tracker','Compilation\x20Output:\x0a','gpt-4o','399653RUatTK','[SUCCESS]\x20Compiled\x20512\x20modules.\x0a','[INFO]\x20Building\x20modules...\x0a[SUCCESS]\x20Compiled\x20512\x20modules.\x20(repeated\x20400\x20times)','test_auth.py\x20PASS\x0a','test_db.py\x20PASS\x0a','2849903QvAhDt'];a0_0x47d8=function(){return _0x54b42f;};return a0_0x47d8();}(function(_0x2a7fff,_0x491134){const _0x54ba35=a0_0x5e61,_0x4f8738=_0x2a7fff();while(!![]){try{const _0x57b786=-parseInt(_0x54ba35(0x1d4))/0x1+parseInt(_0x54ba35(0x1c9))/0x2+parseInt(_0x54ba35(0x1ca))/0x3+parseInt(_0x54ba35(0x1e4))/0x4*(-parseInt(_0x54ba35(0x1ee))/0x5)+-parseInt(_0x54ba35(0x1e8))/0x6+-parseInt(_0x54ba35(0x1d9))/0x7+parseInt(_0x54ba35(0x1cb))/0x8;if(_0x57b786===_0x491134)break;else _0x4f8738['push'](_0x4f8738['shift']());}catch(_0xc05fa5){_0x4f8738['push'](_0x4f8738['shift']());}}}(a0_0x47d8,0x5edfe));function a0_0x5e61(_0x28e3a1,_0x4be74c){_0x28e3a1=_0x28e3a1-0x1c9;const _0x47d864=a0_0x47d8();let _0x5e61df=_0x47d864[_0x28e3a1];return _0x5e61df;}Object[a0_0x482930(0x1e1)](exports,a0_0x482930(0x1cd),{'value':!![]});const tracker_1=require(a0_0x482930(0x1d1));console[a0_0x482930(0x1e3)](a0_0x482930(0x1e7)),process.env.TRIMPROMPT_MODEL=a0_0x482930(0x1e6),tracker_1[a0_0x482930(0x1ce)][a0_0x482930(0x1cf)](a0_0x482930(0x1ea),a0_0x482930(0x1d2)+a0_0x482930(0x1dc)+a0_0x482930(0x1e0)+a0_0x482930(0x1d5)[a0_0x482930(0x1e2)](0x190),a0_0x482930(0x1d6),0x0),process.env.TRIMPROMPT_MODEL=a0_0x482930(0x1d3),tracker_1[a0_0x482930(0x1ce)][a0_0x482930(0x1cf)]('pytest\x20tests/app',a0_0x482930(0x1de)+a0_0x482930(0x1d7)+a0_0x482930(0x1d8)+a0_0x482930(0x1e9)[a0_0x482930(0x1e2)](0x12c)+a0_0x482930(0x1eb),a0_0x482930(0x1cc),0x0),process.env.TRIMPROMPT_MODEL=a0_0x482930(0x1da),tracker_1[a0_0x482930(0x1ce)]['logExecution'](a0_0x482930(0x1db),a0_0x482930(0x1df)+a0_0x482930(0x1ec)+a0_0x482930(0x1ed)+'Step\x203/10\x20:\x20RUN\x20npm\x20install\x0a'+'added\x201420\x20packages\x20in\x2014s\x0a'[a0_0x482930(0x1e2)](0x3)+a0_0x482930(0x1e5),a0_0x482930(0x1d0),0x0),console[a0_0x482930(0x1e3)](a0_0x482930(0x1dd));
|