trimprompt 1.0.14 → 1.0.16
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/cache.js +1 -1
- package/cli.js +1 -1
- package/dashboard.js +1 -1
- package/executor.js +1 -1
- package/favicon.png +0 -0
- 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 +2 -1
- package/mcp.js +1 -1
- package/package.json +2 -2
- 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/tracker.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x59b9b3=a0_0x2843;function a0_0x439a(){const _0x343f26=['Claude\x20Mythos\x205','claude-sonnet-4-6','configPath','join','config.json','logExecution','__setModuleDefault','COPILOT_MODEL','model_used','toISOString','split','high','GPT-5.4\x20Mini','logsDir','saveLogs','mkdirSync','baseDir','1201PeTVuL','length','PRICING','Gemini\x203.1\x20Pro','create','1636749pLKhjG','sonnet','claude','init','windsurf','setConfig','pop','OpenAI\x20o1','unref','prototype','claude-sonnet-4-5','ceil','homedir','claude-opus-4-8','1982cgkYDd','toLowerCase','antigravity','__createBinding','gemini-3-1-pro','config','tokens_saved','writeFileSync','o3mini','1406804IHIuIN','claude-code','REPL_ID','GPT-4o\x20Mini','tracker','getOwnPropertyDescriptor','OpenAI\x20o1-mini','Claude\x20Opus\x204.1\x20(deprecated)','GEMINI_CLI','AIDER_MODEL','child_process','devin','getConfig','123780NvjZNO','TRIMPROMPT_MODEL','auto','Gemini\x203.5\x20Flash','default_model','stringify','CLAUDECODE','writable','name','125IwOzts','CLINE_DATA_DIR','Tracker','2318533Kgufdg','getOwnPropertyNames','get','COPILOT_GITHUB_TOKEN','saveConfig','getStatsSummary','GPT-5.4\x20Nano','continue','AI_AGENT','opus','readFileSync','statsPath','configurable','call','defineProperty','ignore','Gemini\x203.1\x20Flash-Lite','includes','GPT-5.5','.comp.txt','GPT-4o','Claude\x20Haiku\x204.5','triggerBackgroundSync','__esModule','Cursor\x20Small','stats.json','random','parse','estimated_raw_tokens','getLogs','claude-3-5-sonnet','Gemini\x203.5\x20Live\x20Translate','OpenAI\x20o3-mini','1.0','cursor','ANTIGRAVITY_AGENT','CURSOR_AGENT','aider','input_price_1m','copilot','8666536HdVYSC','existsSync','gemini-3-5-flash','Claude\x20Fable\x205','detectSessionTool','Claude\x20Sonnet\x204.5','substring','flash','cline','modelShort','gemini','default','unknown','max','utf8','GPT-4.1\x20Mini','16154910pOSPBf','Claude\x20Sonnet\x204.6','.raw.txt','CLAUDE_EFFORT','tool','REPLIT_ENVIRONMENT','replit','CLAUDE_CODE','github-copilot','toFixed','telemetry_url'];a0_0x439a=function(){return _0x343f26;};return a0_0x439a();}(function(_0x4b5e55,_0x1fa6ac){const _0x2a5304=a0_0x2843,_0x1ddfd2=_0x4b5e55();while(!![]){try{const _0xdb4de5=-parseInt(_0x2a5304(0xc3))/0x1*(parseInt(_0x2a5304(0xd6))/0x2)+parseInt(_0x2a5304(0xc8))/0x3+parseInt(_0x2a5304(0xdf))/0x4+-parseInt(_0x2a5304(0x6c))/0x5*(-parseInt(_0x2a5304(0xec))/0x6)+-parseInt(_0x2a5304(0x6f))/0x7+-parseInt(_0x2a5304(0x97))/0x8+parseInt(_0x2a5304(0xa7))/0x9;if(_0xdb4de5===_0x1fa6ac)break;else _0x1ddfd2['push'](_0x1ddfd2['shift']());}catch(_0x5d7485){_0x1ddfd2['push'](_0x1ddfd2['shift']());}}}(a0_0x439a,0x934a1));var __createBinding=this&&this[a0_0x59b9b3(0xd9)]||(Object[a0_0x59b9b3(0xc7)]?function(_0x469af7,_0x4a440a,_0xeb3266,_0x5960e0){const _0xe91b62=a0_0x59b9b3;if(_0x5960e0===undefined)_0x5960e0=_0xeb3266;var _0x5a1426=Object[_0xe91b62(0xe4)](_0x4a440a,_0xeb3266);(!_0x5a1426||(_0xe91b62(0x71)in _0x5a1426?!_0x4a440a[_0xe91b62(0x86)]:_0x5a1426[_0xe91b62(0x6a)]||_0x5a1426[_0xe91b62(0x7b)]))&&(_0x5a1426={'enumerable':!![],'get':function(){return _0x4a440a[_0xeb3266];}}),Object[_0xe91b62(0x7d)](_0x469af7,_0x5960e0,_0x5a1426);}:function(_0x1e85ec,_0x27e55b,_0x4cd560,_0x34ba09){if(_0x34ba09===undefined)_0x34ba09=_0x4cd560;_0x1e85ec[_0x34ba09]=_0x27e55b[_0x4cd560];}),__setModuleDefault=this&&this[a0_0x59b9b3(0xb8)]||(Object[a0_0x59b9b3(0xc7)]?function(_0x1ff74e,_0xb4a79){const _0x275538=a0_0x59b9b3;Object[_0x275538(0x7d)](_0x1ff74e,_0x275538(0xa2),{'enumerable':!![],'value':_0xb4a79});}:function(_0x303a90,_0x51b71b){const _0x1295da=a0_0x59b9b3;_0x303a90[_0x1295da(0xa2)]=_0x51b71b;}),__importStar=this&&this['__importStar']||(function(){var _0x664b5a=function(_0x41953d){const _0x5074c3=a0_0x2843;return _0x664b5a=Object[_0x5074c3(0x70)]||function(_0x3b610c){const _0x2cdd5e=_0x5074c3;var _0x588a82=[];for(var _0x3ff54c in _0x3b610c)if(Object[_0x2cdd5e(0xd1)]['hasOwnProperty'][_0x2cdd5e(0x7c)](_0x3b610c,_0x3ff54c))_0x588a82[_0x588a82[_0x2cdd5e(0xc4)]]=_0x3ff54c;return _0x588a82;},_0x664b5a(_0x41953d);};return function(_0xa98401){const _0x46b0dc=a0_0x2843;if(_0xa98401&&_0xa98401[_0x46b0dc(0x86)])return _0xa98401;var _0x2bbe97={};if(_0xa98401!=null){for(var _0x2bebb8=_0x664b5a(_0xa98401),_0x2f0ce1=0x0;_0x2f0ce1<_0x2bebb8[_0x46b0dc(0xc4)];_0x2f0ce1++)if(_0x2bebb8[_0x2f0ce1]!==_0x46b0dc(0xa2))__createBinding(_0x2bbe97,_0xa98401,_0x2bebb8[_0x2f0ce1]);}return __setModuleDefault(_0x2bbe97,_0xa98401),_0x2bbe97;};}());Object[a0_0x59b9b3(0x7d)](exports,a0_0x59b9b3(0x86),{'value':!![]}),exports[a0_0x59b9b3(0xe3)]=exports['Tracker']=exports[a0_0x59b9b3(0xc5)]=void 0x0,exports[a0_0x59b9b3(0x9b)]=detectSessionTool;function a0_0x2843(_0x1218e1,_0x2e4e06){_0x1218e1=_0x1218e1-0x65;const _0x439a80=a0_0x439a();let _0x284310=_0x439a80[_0x1218e1];return _0x284310;}const fs=__importStar(require('fs')),path=__importStar(require('path')),os=__importStar(require('os')),child_process_1=require(a0_0x59b9b3(0xe9));exports[a0_0x59b9b3(0xc5)]={'claude-fable-5':{'name':a0_0x59b9b3(0x9a),'input_price_1m':0xa},'claude-mythos-5':{'name':a0_0x59b9b3(0xb2),'input_price_1m':0xa},'claude-opus-4-8':{'name':'Claude\x20Opus\x204.8','input_price_1m':0x5},'claude-opus-4-7':{'name':'Claude\x20Opus\x204.7','input_price_1m':0x5},'claude-opus-4-5':{'name':'Claude\x20Opus\x204.5','input_price_1m':0x5},'claude-opus-4-1':{'name':a0_0x59b9b3(0xe6),'input_price_1m':0xf},'claude-sonnet-4-6':{'name':a0_0x59b9b3(0xa8),'input_price_1m':0x3},'claude-sonnet-4-5':{'name':a0_0x59b9b3(0x9c),'input_price_1m':0x3},'claude-3-5-sonnet':{'name':'Claude\x203.5\x20Sonnet','input_price_1m':0x3},'claude-haiku-4-5':{'name':a0_0x59b9b3(0x84),'input_price_1m':0x1},'claude-haiku-3-5':{'name':'Claude\x20Haiku\x203.5','input_price_1m':0.8},'gpt-5-5':{'name':a0_0x59b9b3(0x81),'input_price_1m':0x5},'gpt-5-4':{'name':'GPT-5.4','input_price_1m':2.5},'gpt-4o':{'name':a0_0x59b9b3(0x83),'input_price_1m':2.5},'gpt-5-4-mini':{'name':a0_0x59b9b3(0xbe),'input_price_1m':0.75},'gpt-5-4-nano':{'name':a0_0x59b9b3(0x75),'input_price_1m':0.2},'gpt-4-1-mini':{'name':a0_0x59b9b3(0xa6),'input_price_1m':0.4},'gpt-4-1-nano':{'name':'GPT-4.1\x20Nano','input_price_1m':0.1},'gpt-4o-mini':{'name':a0_0x59b9b3(0xe2),'input_price_1m':0.15},'o1':{'name':a0_0x59b9b3(0xcf),'input_price_1m':0xf},'o1-mini':{'name':a0_0x59b9b3(0xe5),'input_price_1m':0x3},'o3-mini':{'name':a0_0x59b9b3(0x8f),'input_price_1m':1.1},'cursor-small':{'name':a0_0x59b9b3(0x87),'input_price_1m':0.1},'gemini-3-1-pro':{'name':a0_0x59b9b3(0xc6),'input_price_1m':0x2},'gemini-3-5-flash':{'name':a0_0x59b9b3(0x66),'input_price_1m':1.5},'gemini-3-1-flash-lite':{'name':a0_0x59b9b3(0x7f),'input_price_1m':0.45},'gemini-3-5-live-translate':{'name':a0_0x59b9b3(0x8e),'input_price_1m':3.5}};function detectSessionTool(){const _0x394341=a0_0x59b9b3,_0x39aec9=process.env,_0x532c5a={'tool':'','model':_0x394341(0xb3),'modelShort':''};if(_0x39aec9[_0x394341(0xed)]&&exports['PRICING'][_0x39aec9[_0x394341(0xed)]])return{'tool':'','model':_0x39aec9[_0x394341(0xed)],'modelShort':''};const _0x2ecdf3=(_0x39aec9[_0x394341(0x77)]||'')[_0x394341(0xd7)]();if(_0x2ecdf3){if(_0x2ecdf3[_0x394341(0x80)](_0x394341(0xe0))||_0x2ecdf3[_0x394341(0x80)]('claude_code')){const _0x166cac=_0x39aec9[_0x394341(0xaa)]===_0x394341(0xbd)?_0x394341(0x78):'sonnet',_0x4a4c4e=_0x39aec9[_0x394341(0xaa)]==='high'?'claude-opus-4-8':_0x394341(0xb3);return{'tool':_0x394341(0xca),'model':_0x4a4c4e,'modelShort':_0x166cac};}if(_0x2ecdf3['includes']('cursor'))return{'tool':_0x394341(0x91),'model':_0x394341(0xb3),'modelShort':_0x394341(0xc9)};if(_0x2ecdf3['includes'](_0x394341(0xaf))||_0x2ecdf3[_0x394341(0x80)](_0x394341(0x96))){const _0x573c62=_0x39aec9['COPILOT_MODEL']||'';if(_0x573c62&&exports[_0x394341(0xc5)][_0x573c62])return{'tool':_0x394341(0x96),'model':_0x573c62,'modelShort':_0x573c62[_0x394341(0xbc)]('-')['pop']()||''};return{'tool':_0x394341(0x96),'model':_0x394341(0xd2),'modelShort':_0x394341(0xc9)};}if(_0x2ecdf3[_0x394341(0x80)](_0x394341(0xa1)))return{'tool':_0x394341(0xa1),'model':'gemini-3-5-flash','modelShort':_0x394341(0x9e)};if(_0x2ecdf3['includes']('codex'))return{'tool':'codex','model':'o3-mini','modelShort':_0x394341(0xde)};if(_0x2ecdf3[_0x394341(0x80)](_0x394341(0xea)))return{'tool':_0x394341(0xea),'model':_0x394341(0xb3),'modelShort':''};if(_0x2ecdf3[_0x394341(0x80)](_0x394341(0xd8)))return{'tool':_0x394341(0xd8),'model':_0x394341(0xda),'modelShort':_0x394341(0xa1)};if(_0x2ecdf3[_0x394341(0x80)](_0x394341(0xad))||_0x39aec9[_0x394341(0xe1)])return{'tool':_0x394341(0xad),'model':_0x394341(0xb3),'modelShort':''};return{'tool':_0x2ecdf3[_0x394341(0xbc)]('_')[0x0][_0x394341(0xbc)]('-')[0x0],'model':_0x394341(0xb3),'modelShort':''};}if(_0x39aec9[_0x394341(0x69)]==='1'||_0x39aec9[_0x394341(0xae)]==='1'){const _0x5f187e=_0x39aec9[_0x394341(0xaa)]===_0x394341(0xbd)?_0x394341(0x78):_0x394341(0xc9),_0x39d4dc=_0x39aec9[_0x394341(0xaa)]===_0x394341(0xbd)?'claude-opus-4-8':_0x394341(0xb3);return{'tool':_0x394341(0xca),'model':_0x39d4dc,'modelShort':_0x5f187e};}if(_0x39aec9[_0x394341(0x93)]==='1')return{'tool':_0x394341(0x91),'model':'claude-sonnet-4-6','modelShort':'sonnet'};if(_0x39aec9[_0x394341(0xe7)]==='1')return{'tool':_0x394341(0xa1),'model':_0x394341(0x99),'modelShort':_0x394341(0x9e)};if(_0x39aec9[_0x394341(0xb9)]||_0x39aec9[_0x394341(0x72)]){const _0x4b99ef=_0x39aec9['COPILOT_MODEL']||'';if(_0x4b99ef&&exports[_0x394341(0xc5)][_0x4b99ef])return{'tool':_0x394341(0x96),'model':_0x4b99ef,'modelShort':_0x4b99ef[_0x394341(0xbc)]('-')[_0x394341(0xce)]()||''};return{'tool':_0x394341(0x96),'model':_0x394341(0xd2),'modelShort':_0x394341(0xc9)};}if(_0x39aec9[_0x394341(0xe1)]||_0x39aec9[_0x394341(0xac)])return{'tool':_0x394341(0xad),'model':'claude-sonnet-4-6','modelShort':''};if(_0x39aec9[_0x394341(0x6d)])return{'tool':_0x394341(0x9f),'model':_0x394341(0xb3),'modelShort':''};if(_0x39aec9['CONTINUE_GLOBAL_DIR'])return{'tool':_0x394341(0x76),'model':'claude-sonnet-4-6','modelShort':''};if(_0x39aec9[_0x394341(0x92)]==='1')return{'tool':_0x394341(0xd8),'model':_0x394341(0xda),'modelShort':_0x394341(0xa1)};if(_0x39aec9[_0x394341(0xaa)]){const _0x9b894a=_0x39aec9['CLAUDE_EFFORT']==='high'?_0x394341(0x78):_0x394341(0xc9),_0x2cf160=_0x39aec9[_0x394341(0xaa)]===_0x394341(0xbd)?_0x394341(0xd5):_0x394341(0xb3);return{'tool':'','model':_0x2cf160,'modelShort':''};}if(_0x39aec9[_0x394341(0xe8)]&&exports[_0x394341(0xc5)][_0x39aec9['AIDER_MODEL']])return{'tool':_0x394341(0x94),'model':_0x39aec9[_0x394341(0xe8)],'modelShort':''};if(_0x39aec9['VSCODE_PID']){const _0x49553b=(_0x39aec9['PATH']||'')['toLowerCase']();if(_0x49553b[_0x394341(0x80)]('cursor'))return{'tool':_0x394341(0x91),'model':_0x394341(0xb3),'modelShort':_0x394341(0xc9)};if(_0x49553b[_0x394341(0x80)](_0x394341(0xcc)))return{'tool':'windsurf','model':_0x394341(0xb3),'modelShort':'sonnet'};}const _0x1a9cf4=process.env.TRIMPROMPT_MODEL||'';if(_0x1a9cf4&&exports[_0x394341(0xc5)][_0x1a9cf4])return{'tool':'','model':_0x1a9cf4,'modelShort':''};return _0x532c5a;}class Tracker{['baseDir'];['configPath'];['statsPath'];[a0_0x59b9b3(0xbf)];[a0_0x59b9b3(0xdb)];constructor(){const _0xa95d8=a0_0x59b9b3;this[_0xa95d8(0xc2)]=path['join'](os[_0xa95d8(0xd4)](),'.trimprompt'),this[_0xa95d8(0xb4)]=path[_0xa95d8(0xb5)](this[_0xa95d8(0xc2)],_0xa95d8(0xb6)),this[_0xa95d8(0x7a)]=path[_0xa95d8(0xb5)](this[_0xa95d8(0xc2)],_0xa95d8(0x88)),this[_0xa95d8(0xbf)]=path['join'](this[_0xa95d8(0xc2)],'logs'),this['init']();}[a0_0x59b9b3(0xcb)](){const _0x4755aa=a0_0x59b9b3;!fs[_0x4755aa(0x98)](this[_0x4755aa(0xc2)])&&fs[_0x4755aa(0xc1)](this[_0x4755aa(0xc2)],{'recursive':!![]});!fs['existsSync'](this[_0x4755aa(0xbf)])&&fs[_0x4755aa(0xc1)](this[_0x4755aa(0xbf)],{'recursive':!![]});const _0x2f6fbc={'version':_0x4755aa(0x90),'telemetry_url':process.env.TRIMPROMPT_TELEMETRY_URL||'','max_output_tokens':0x1388,'redaction_enabled':!![],'default_model':_0x4755aa(0xd5)};if(fs['existsSync'](this[_0x4755aa(0xb4)]))try{const _0x323e7a=fs[_0x4755aa(0x79)](this['configPath'],'utf8');this['config']={..._0x2f6fbc,...JSON[_0x4755aa(0x8a)](_0x323e7a)};}catch(_0x1a1c42){this[_0x4755aa(0xdb)]=_0x2f6fbc;}else this[_0x4755aa(0xdb)]=_0x2f6fbc,this[_0x4755aa(0x73)]();!fs[_0x4755aa(0x98)](this[_0x4755aa(0x7a)])&&fs[_0x4755aa(0xdd)](this['statsPath'],JSON[_0x4755aa(0x68)]([]),_0x4755aa(0xa5));}['getConfig'](){const _0x46a4e2=a0_0x59b9b3;return process.env.TRIMPROMPT_TELEMETRY_URL&&(this[_0x46a4e2(0xdb)][_0x46a4e2(0xb1)]=process.env.TRIMPROMPT_TELEMETRY_URL),this['config'];}[a0_0x59b9b3(0xcd)](_0x4272bf,_0x20649e){const _0x127644=a0_0x59b9b3;this[_0x127644(0xdb)][_0x4272bf]=_0x20649e,this[_0x127644(0x73)]();}['saveConfig'](){const _0x38e5da=a0_0x59b9b3;fs[_0x38e5da(0xdd)](this[_0x38e5da(0xb4)],JSON[_0x38e5da(0x68)](this['config'],null,0x2),'utf8');}[a0_0x59b9b3(0x8c)](){const _0x5ade31=a0_0x59b9b3;try{if(!fs[_0x5ade31(0x98)](this[_0x5ade31(0x7a)]))return[];const _0xfa6b9=fs[_0x5ade31(0x79)](this[_0x5ade31(0x7a)],'utf8');return JSON[_0x5ade31(0x8a)](_0xfa6b9);}catch{return[];}}[a0_0x59b9b3(0xc0)](_0x2737a4){const _0x10b6fc=a0_0x59b9b3;fs['writeFileSync'](this[_0x10b6fc(0x7a)],JSON[_0x10b6fc(0x68)](_0x2737a4,null,0x2),_0x10b6fc(0xa5));}[a0_0x59b9b3(0xb7)](_0x381bca,_0x25ba46,_0x2d1d66,_0x29f057){const _0x438ed6=a0_0x59b9b3,_0x1315f2=this[_0x438ed6(0x8c)](),_0x628f08=_0x25ba46[_0x438ed6(0xc4)],_0xdbab74=_0x2d1d66[_0x438ed6(0xc4)],_0x94f584=Math[_0x438ed6(0xd3)](_0x628f08/0x4),_0x2b5df6=Math[_0x438ed6(0xd3)](_0xdbab74/0x4),_0x2f45dc=Math[_0x438ed6(0xa4)](0x0,_0x94f584-_0x2b5df6),_0x3b1bd1=detectSessionTool(),_0x2f88a0=_0x3b1bd1['model'],_0x4c46fe=Math[_0x438ed6(0x89)]()['toString'](0x24)[_0x438ed6(0x9d)](0x2,0xb);try{fs['writeFileSync'](path[_0x438ed6(0xb5)](this['logsDir'],_0x4c46fe+_0x438ed6(0xa9)),_0x25ba46,_0x438ed6(0xa5)),fs[_0x438ed6(0xdd)](path[_0x438ed6(0xb5)](this[_0x438ed6(0xbf)],_0x4c46fe+_0x438ed6(0x82)),_0x2d1d66,_0x438ed6(0xa5));}catch{}const _0x42796f=_0x381bca[_0x438ed6(0xbc)]('\x20')[0x0]||_0x438ed6(0xa3),_0x257faf=_0x3b1bd1['tool']?_0x3b1bd1[_0x438ed6(0xa0)]?_0x3b1bd1[_0x438ed6(0xab)]+'-'+_0x3b1bd1[_0x438ed6(0xa0)]+'-'+_0x42796f:_0x3b1bd1[_0x438ed6(0xab)]+'-'+_0x42796f:_0x42796f,_0x4a91d6={'id':_0x4c46fe,'timestamp':new Date()[_0x438ed6(0xbb)](),'command':_0x257faf,'raw_chars':_0x628f08,'compressed_chars':_0xdbab74,'estimated_raw_tokens':_0x94f584,'estimated_compressed_tokens':_0x2b5df6,'tokens_saved':_0x2f45dc,'model_used':_0x2f88a0,'exit_code':_0x29f057,'synced':![],'ai_detected':!!_0x3b1bd1[_0x438ed6(0xab)]};_0x1315f2['push'](_0x4a91d6),this[_0x438ed6(0xc0)](_0x1315f2);const _0x3a46c=this['getConfig']()[_0x438ed6(0xb1)];return _0x3a46c&&_0x3a46c['trim']()[_0x438ed6(0xc4)]>0x0&&this[_0x438ed6(0x85)](),_0x4a91d6;}[a0_0x59b9b3(0x85)](){const _0x9d01ee=a0_0x59b9b3;try{const _0x112ba8=path[_0x9d01ee(0xb5)](__dirname,'sync.js');if(fs[_0x9d01ee(0x98)](_0x112ba8)){const _0xb2b391=(0x0,child_process_1['spawn'])(process['execPath'],[_0x112ba8],{'detached':!![],'stdio':_0x9d01ee(0x7e)});_0xb2b391[_0x9d01ee(0xd0)]();}}catch{}}[a0_0x59b9b3(0x74)](_0x375b48=a0_0x59b9b3(0x65)){const _0x537be5=a0_0x59b9b3,_0x5e97e8=this[_0x537be5(0x8c)]();let _0x41ad74=0x0,_0x27c4f1=0x0,_0x402ddc=0x0;for(const _0x19cabd of _0x5e97e8){_0x41ad74+=_0x19cabd[_0x537be5(0x8b)],_0x27c4f1+=_0x19cabd['estimated_compressed_tokens'],_0x402ddc+=_0x19cabd[_0x537be5(0xdc)];}let _0x137c97=_0x375b48;(!_0x137c97||_0x137c97===_0x537be5(0x65)||!exports['PRICING'][_0x137c97])&&(_0x5e97e8['length']>0x0&&_0x5e97e8[_0x5e97e8[_0x537be5(0xc4)]-0x1][_0x537be5(0xba)]?_0x137c97=_0x5e97e8[_0x5e97e8[_0x537be5(0xc4)]-0x1][_0x537be5(0xba)]:_0x137c97=this[_0x537be5(0xeb)]()[_0x537be5(0x67)]||_0x537be5(0x8d));const _0x3e3d05=exports[_0x537be5(0xc5)][_0x137c97]||exports[_0x537be5(0xc5)][_0x537be5(0x8d)],_0x55d5b8=_0x402ddc*_0x3e3d05[_0x537be5(0x95)]/0xf4240,_0x192f0d=_0x41ad74*_0x3e3d05[_0x537be5(0x95)]/0xf4240,_0x48621e=_0x27c4f1*_0x3e3d05['input_price_1m']/0xf4240,_0x54f569=_0x41ad74>0x0?_0x402ddc/_0x41ad74*0x64:0x0;return{'total_raw_tokens':_0x41ad74,'total_compressed_tokens':_0x27c4f1,'total_tokens_saved':_0x402ddc,'savings_percentage':parseFloat(_0x54f569[_0x537be5(0xb0)](0x1)),'money_saved_usd':parseFloat(_0x55d5b8[_0x537be5(0xb0)](0x4)),'raw_cost_usd':parseFloat(_0x192f0d[_0x537be5(0xb0)](0x4)),'compressed_cost_usd':parseFloat(_0x48621e[_0x537be5(0xb0)](0x4)),'model_name':_0x3e3d05[_0x537be5(0x6b)],'model_key':_0x137c97};}}exports[a0_0x59b9b3(0x6e)]=Tracker,exports[a0_0x59b9b3(0xe3)]=new Tracker();
|
|
1
|
+
'use strict';const a0_0x2acb3f=a0_0x3991;(function(_0xb07eb4,_0x169ad2){const _0x2af9fb=a0_0x3991,_0x2b170b=_0xb07eb4();while(!![]){try{const _0x5ab57d=parseInt(_0x2af9fb(0x1db))/0x1*(-parseInt(_0x2af9fb(0x19d))/0x2)+-parseInt(_0x2af9fb(0x1c3))/0x3+parseInt(_0x2af9fb(0x1e9))/0x4*(-parseInt(_0x2af9fb(0x1bc))/0x5)+-parseInt(_0x2af9fb(0x1ba))/0x6+parseInt(_0x2af9fb(0x1e0))/0x7+-parseInt(_0x2af9fb(0x1b2))/0x8*(parseInt(_0x2af9fb(0x18f))/0x9)+parseInt(_0x2af9fb(0x1d1))/0xa*(parseInt(_0x2af9fb(0x1e4))/0xb);if(_0x5ab57d===_0x169ad2)break;else _0x2b170b['push'](_0x2b170b['shift']());}catch(_0x4b1931){_0x2b170b['push'](_0x2b170b['shift']());}}}(a0_0xd8e4,0xdce87));function a0_0xd8e4(){const _0x2af288=['model_used','5ruPCAJ','AI_AGENT','defineProperty','GPT-4o\x20Mini','existsSync','statsPath','claude-sonnet-4-5','3355128yZJCPS','Claude\x20Opus\x204.1\x20(deprecated)','includes','stringify','setConfig','GPT-4o','writable','hasOwnProperty','Claude\x203.5\x20Sonnet','GPT-5.4\x20Nano','opus','GPT-4.1\x20Mini','AIDER_MODEL','get','2341830TmgTDp','Gemini\x203.5\x20Flash','CURSOR_AGENT','getLogs','parse','name','ceil','env','telemetry_url','unref','21338BhjAeS','GPT-5.4\x20Mini','claude-sonnet-4-6','continue','Gemini\x203.1\x20Pro','4493349MWCqqg','unknown','GPT-5.5','claude-opus-4-8','253muYUWr','Claude\x20Sonnet\x204.5','windsurf','aider','modelShort','2398804NsQiIr','antigravity','cursor','claude_code','claude','PATH','readFileSync','CLAUDE_EFFORT','gemini','logs','__importStar','push','prototype','.raw.txt','input_price_1m','split','triggerBackgroundSync','auto','gemini-3-5-flash','saveConfig','ignore','Gemini\x203.1\x20Flash-Lite','copilot','CONTINUE_GLOBAL_DIR','model','claude-3-5-sonnet','Claude\x20Mythos\x205','join','CLINE_DATA_DIR','toLowerCase','GPT-5.4','config.json','mkdirSync','Claude\x20Opus\x204.8','1.0','COPILOT_MODEL','o3-mini','config','REPL_ID','length','execPath','high','utf8','sync.js','Tracker','saveLogs','replit','.comp.txt','Claude\x20Sonnet\x204.6','path','flash','getOwnPropertyDescriptor','tracker','default_model','logExecution','2169aPlpuX','PRICING','default','max','writeFileSync','tool','.trimprompt','init','OpenAI\x20o1','GPT-4.1\x20Nano','configPath','configurable','claude-code','spawn','8iJJmXo','pop','estimated_raw_tokens','child_process','CLAUDECODE','Claude\x20Haiku\x204.5','Claude\x20Haiku\x203.5','TRIMPROMPT_MODEL','devin','Claude\x20Opus\x204.7','logsDir','Cursor\x20Small','create','cline','baseDir','estimated_compressed_tokens','getOwnPropertyNames','VSCODE_PID','toFixed','gemini-3-1-pro','sonnet','51752sMFBej','Claude\x20Fable\x205','REPLIT_ENVIRONMENT','codex','__esModule','TRIMPROMPT_TELEMETRY_URL','Claude\x20Opus\x204.5','getConfig','10564914ZQngSF'];a0_0xd8e4=function(){return _0x2af288;};return a0_0xd8e4();}var __createBinding=this&&this['__createBinding']||(Object['create']?function(_0x1e8152,_0x19d381,_0x2344e0,_0x449d74){const _0x22c3c7=a0_0x3991;if(_0x449d74===undefined)_0x449d74=_0x2344e0;var _0x3617e9=Object[_0x22c3c7(0x18b)](_0x19d381,_0x2344e0);(!_0x3617e9||(_0x22c3c7(0x1d0)in _0x3617e9?!_0x19d381[_0x22c3c7(0x1b6)]:_0x3617e9[_0x22c3c7(0x1c9)]||_0x3617e9[_0x22c3c7(0x19a)]))&&(_0x3617e9={'enumerable':!![],'get':function(){return _0x19d381[_0x2344e0];}}),Object[_0x22c3c7(0x1be)](_0x1e8152,_0x449d74,_0x3617e9);}:function(_0x36bf68,_0x455af3,_0x5f30f9,_0x11a2b9){if(_0x11a2b9===undefined)_0x11a2b9=_0x5f30f9;_0x36bf68[_0x11a2b9]=_0x455af3[_0x5f30f9];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a0_0x2acb3f(0x1a9)]?function(_0x52a360,_0x31ecf9){const _0x323fd1=a0_0x2acb3f;Object[_0x323fd1(0x1be)](_0x52a360,'default',{'enumerable':!![],'value':_0x31ecf9});}:function(_0x489adc,_0x4c3c8b){const _0x4f1260=a0_0x2acb3f;_0x489adc[_0x4f1260(0x191)]=_0x4c3c8b;}),__importStar=this&&this[a0_0x2acb3f(0x162)]||(function(){var _0xf48beb=function(_0x337627){const _0x400f83=a0_0x3991;return _0xf48beb=Object[_0x400f83(0x1ad)]||function(_0x472f59){const _0x59faf9=_0x400f83;var _0x3245c0=[];for(var _0x5b0be5 in _0x472f59)if(Object[_0x59faf9(0x164)][_0x59faf9(0x1ca)]['call'](_0x472f59,_0x5b0be5))_0x3245c0[_0x3245c0[_0x59faf9(0x17f)]]=_0x5b0be5;return _0x3245c0;},_0xf48beb(_0x337627);};return function(_0x54eeb7){if(_0x54eeb7&&_0x54eeb7['__esModule'])return _0x54eeb7;var _0x15009e={};if(_0x54eeb7!=null){for(var _0x69c82=_0xf48beb(_0x54eeb7),_0x69f386=0x0;_0x69f386<_0x69c82['length'];_0x69f386++)if(_0x69c82[_0x69f386]!=='default')__createBinding(_0x15009e,_0x54eeb7,_0x69c82[_0x69f386]);}return __setModuleDefault(_0x15009e,_0x54eeb7),_0x15009e;};}());Object[a0_0x2acb3f(0x1be)](exports,a0_0x2acb3f(0x1b6),{'value':!![]}),exports[a0_0x2acb3f(0x18c)]=exports[a0_0x2acb3f(0x184)]=exports[a0_0x2acb3f(0x190)]=void 0x0,exports['detectSessionTool']=detectSessionTool;function a0_0x3991(_0x4299ea,_0x4ee314){const _0xd8e48f=a0_0xd8e4();return a0_0x3991=function(_0x39910d,_0x466668){_0x39910d=_0x39910d-0x15e;let _0x5aea18=_0xd8e48f[_0x39910d];return _0x5aea18;},a0_0x3991(_0x4299ea,_0x4ee314);}const fs=__importStar(require('fs')),path=__importStar(require(a0_0x2acb3f(0x189))),os=__importStar(require('os')),child_process_1=require(a0_0x2acb3f(0x1a0));exports['PRICING']={'claude-fable-5':{'name':a0_0x2acb3f(0x1b3),'input_price_1m':0xa},'claude-mythos-5':{'name':a0_0x2acb3f(0x172),'input_price_1m':0xa},'claude-opus-4-8':{'name':a0_0x2acb3f(0x179),'input_price_1m':0x5},'claude-opus-4-7':{'name':a0_0x2acb3f(0x1a6),'input_price_1m':0x5},'claude-opus-4-5':{'name':a0_0x2acb3f(0x1b8),'input_price_1m':0x5},'claude-opus-4-1':{'name':a0_0x2acb3f(0x1c4),'input_price_1m':0xf},'claude-sonnet-4-6':{'name':a0_0x2acb3f(0x188),'input_price_1m':0x3},'claude-sonnet-4-5':{'name':a0_0x2acb3f(0x1e5),'input_price_1m':0x3},'claude-3-5-sonnet':{'name':a0_0x2acb3f(0x1cb),'input_price_1m':0x3},'claude-haiku-4-5':{'name':a0_0x2acb3f(0x1a2),'input_price_1m':0x1},'claude-haiku-3-5':{'name':a0_0x2acb3f(0x1a3),'input_price_1m':0.8},'gpt-5-5':{'name':a0_0x2acb3f(0x1e2),'input_price_1m':0x5},'gpt-5-4':{'name':a0_0x2acb3f(0x176),'input_price_1m':2.5},'gpt-4o':{'name':a0_0x2acb3f(0x1c8),'input_price_1m':2.5},'gpt-5-4-mini':{'name':a0_0x2acb3f(0x1dc),'input_price_1m':0.75},'gpt-5-4-nano':{'name':a0_0x2acb3f(0x1cc),'input_price_1m':0.2},'gpt-4-1-mini':{'name':a0_0x2acb3f(0x1ce),'input_price_1m':0.4},'gpt-4-1-nano':{'name':a0_0x2acb3f(0x198),'input_price_1m':0.1},'gpt-4o-mini':{'name':a0_0x2acb3f(0x1bf),'input_price_1m':0.15},'o1':{'name':a0_0x2acb3f(0x197),'input_price_1m':0xf},'o1-mini':{'name':'OpenAI\x20o1-mini','input_price_1m':0x3},'o3-mini':{'name':'OpenAI\x20o3-mini','input_price_1m':1.1},'cursor-small':{'name':a0_0x2acb3f(0x1a8),'input_price_1m':0.1},'gemini-3-1-pro':{'name':a0_0x2acb3f(0x1df),'input_price_1m':0x2},'gemini-3-5-flash':{'name':a0_0x2acb3f(0x1d2),'input_price_1m':1.5},'gemini-3-1-flash-lite':{'name':a0_0x2acb3f(0x16d),'input_price_1m':0.45},'gemini-3-5-live-translate':{'name':'Gemini\x203.5\x20Live\x20Translate','input_price_1m':3.5}};function detectSessionTool(){const _0x42065b=a0_0x2acb3f,_0x15b466=process['env'],_0xf43989={'tool':'','model':_0x42065b(0x1dd),'modelShort':''};if(_0x15b466[_0x42065b(0x1a4)]&&exports[_0x42065b(0x190)][_0x15b466[_0x42065b(0x1a4)]])return{'tool':'','model':_0x15b466['TRIMPROMPT_MODEL'],'modelShort':''};const _0x2eda7a=(_0x15b466[_0x42065b(0x1bd)]||'')[_0x42065b(0x175)]();if(_0x2eda7a){if(_0x2eda7a['includes'](_0x42065b(0x19b))||_0x2eda7a['includes'](_0x42065b(0x1ec))){const _0x228554=_0x15b466[_0x42065b(0x15f)]===_0x42065b(0x181)?_0x42065b(0x1cd):_0x42065b(0x1b1),_0x375dba=_0x15b466[_0x42065b(0x15f)]===_0x42065b(0x181)?_0x42065b(0x1e3):_0x42065b(0x1dd);return{'tool':_0x42065b(0x1ed),'model':_0x375dba,'modelShort':_0x228554};}if(_0x2eda7a[_0x42065b(0x1c5)](_0x42065b(0x1eb)))return{'tool':_0x42065b(0x1eb),'model':_0x42065b(0x1dd),'modelShort':_0x42065b(0x1b1)};if(_0x2eda7a[_0x42065b(0x1c5)]('github-copilot')||_0x2eda7a['includes'](_0x42065b(0x16e))){const _0x4dc62c=_0x15b466[_0x42065b(0x17b)]||'';if(_0x4dc62c&&exports[_0x42065b(0x190)][_0x4dc62c])return{'tool':'copilot','model':_0x4dc62c,'modelShort':_0x4dc62c[_0x42065b(0x167)]('-')[_0x42065b(0x19e)]()||''};return{'tool':_0x42065b(0x16e),'model':_0x42065b(0x1c2),'modelShort':'sonnet'};}if(_0x2eda7a['includes']('gemini'))return{'tool':'gemini','model':_0x42065b(0x16a),'modelShort':_0x42065b(0x18a)};if(_0x2eda7a[_0x42065b(0x1c5)]('codex'))return{'tool':_0x42065b(0x1b5),'model':_0x42065b(0x17c),'modelShort':'o3mini'};if(_0x2eda7a['includes'](_0x42065b(0x1a5)))return{'tool':'devin','model':_0x42065b(0x1dd),'modelShort':''};if(_0x2eda7a[_0x42065b(0x1c5)](_0x42065b(0x1ea)))return{'tool':_0x42065b(0x1ea),'model':_0x42065b(0x1b0),'modelShort':_0x42065b(0x160)};if(_0x2eda7a[_0x42065b(0x1c5)]('replit')||_0x15b466[_0x42065b(0x17e)])return{'tool':_0x42065b(0x186),'model':_0x42065b(0x1dd),'modelShort':''};return{'tool':_0x2eda7a[_0x42065b(0x167)]('_')[0x0][_0x42065b(0x167)]('-')[0x0],'model':'claude-sonnet-4-6','modelShort':''};}if(_0x15b466[_0x42065b(0x1a1)]==='1'||_0x15b466['CLAUDE_CODE']==='1'){const _0x1977b9=_0x15b466[_0x42065b(0x15f)]===_0x42065b(0x181)?_0x42065b(0x1cd):_0x42065b(0x1b1),_0x429bd2=_0x15b466[_0x42065b(0x15f)]===_0x42065b(0x181)?_0x42065b(0x1e3):'claude-sonnet-4-6';return{'tool':'claude','model':_0x429bd2,'modelShort':_0x1977b9};}if(_0x15b466[_0x42065b(0x1d3)]==='1')return{'tool':_0x42065b(0x1eb),'model':_0x42065b(0x1dd),'modelShort':'sonnet'};if(_0x15b466['GEMINI_CLI']==='1')return{'tool':_0x42065b(0x160),'model':_0x42065b(0x16a),'modelShort':_0x42065b(0x18a)};if(_0x15b466[_0x42065b(0x17b)]||_0x15b466['COPILOT_GITHUB_TOKEN']){const _0x3b382d=_0x15b466['COPILOT_MODEL']||'';if(_0x3b382d&&exports[_0x42065b(0x190)][_0x3b382d])return{'tool':_0x42065b(0x16e),'model':_0x3b382d,'modelShort':_0x3b382d[_0x42065b(0x167)]('-')[_0x42065b(0x19e)]()||''};return{'tool':'copilot','model':_0x42065b(0x1c2),'modelShort':'sonnet'};}if(_0x15b466[_0x42065b(0x17e)]||_0x15b466[_0x42065b(0x1b4)])return{'tool':_0x42065b(0x186),'model':_0x42065b(0x1dd),'modelShort':''};if(_0x15b466[_0x42065b(0x174)])return{'tool':_0x42065b(0x1aa),'model':'claude-sonnet-4-6','modelShort':''};if(_0x15b466[_0x42065b(0x16f)])return{'tool':_0x42065b(0x1de),'model':_0x42065b(0x1dd),'modelShort':''};if(_0x15b466['ANTIGRAVITY_AGENT']==='1')return{'tool':_0x42065b(0x1ea),'model':_0x42065b(0x1b0),'modelShort':_0x42065b(0x160)};if(_0x15b466[_0x42065b(0x15f)]){const _0x32eb25=_0x15b466[_0x42065b(0x15f)]===_0x42065b(0x181)?'opus':'sonnet',_0x247133=_0x15b466[_0x42065b(0x15f)]===_0x42065b(0x181)?_0x42065b(0x1e3):_0x42065b(0x1dd);return{'tool':'','model':_0x247133,'modelShort':''};}if(_0x15b466[_0x42065b(0x1cf)]&&exports[_0x42065b(0x190)][_0x15b466[_0x42065b(0x1cf)]])return{'tool':_0x42065b(0x1e7),'model':_0x15b466[_0x42065b(0x1cf)],'modelShort':''};if(_0x15b466[_0x42065b(0x1ae)]){const _0x1f2a20=(_0x15b466[_0x42065b(0x1ee)]||'')[_0x42065b(0x175)]();if(_0x1f2a20[_0x42065b(0x1c5)]('cursor'))return{'tool':'cursor','model':'claude-sonnet-4-6','modelShort':_0x42065b(0x1b1)};if(_0x1f2a20[_0x42065b(0x1c5)](_0x42065b(0x1e6)))return{'tool':_0x42065b(0x1e6),'model':_0x42065b(0x1dd),'modelShort':_0x42065b(0x1b1)};}const _0x4c1ed7=process[_0x42065b(0x1d8)][_0x42065b(0x1a4)]||'';if(_0x4c1ed7&&exports[_0x42065b(0x190)][_0x4c1ed7])return{'tool':'','model':_0x4c1ed7,'modelShort':''};return _0xf43989;}class Tracker{['baseDir'];[a0_0x2acb3f(0x199)];['statsPath'];[a0_0x2acb3f(0x1a7)];[a0_0x2acb3f(0x17d)];constructor(){const _0x162433=a0_0x2acb3f;this[_0x162433(0x1ab)]=path[_0x162433(0x173)](os['homedir'](),_0x162433(0x195)),this[_0x162433(0x199)]=path['join'](this['baseDir'],_0x162433(0x177)),this[_0x162433(0x1c1)]=path[_0x162433(0x173)](this[_0x162433(0x1ab)],'stats.json'),this[_0x162433(0x1a7)]=path['join'](this[_0x162433(0x1ab)],_0x162433(0x161)),this[_0x162433(0x196)]();}[a0_0x2acb3f(0x196)](){const _0x48319d=a0_0x2acb3f;!fs[_0x48319d(0x1c0)](this[_0x48319d(0x1ab)])&&fs['mkdirSync'](this[_0x48319d(0x1ab)],{'recursive':!![]});!fs[_0x48319d(0x1c0)](this[_0x48319d(0x1a7)])&&fs[_0x48319d(0x178)](this[_0x48319d(0x1a7)],{'recursive':!![]});const _0x571d5c={'version':_0x48319d(0x17a),'telemetry_url':process[_0x48319d(0x1d8)][_0x48319d(0x1b7)]||'','max_output_tokens':0x1388,'redaction_enabled':!![],'default_model':_0x48319d(0x1e3)};if(fs[_0x48319d(0x1c0)](this[_0x48319d(0x199)]))try{const _0x596294=fs[_0x48319d(0x15e)](this[_0x48319d(0x199)],_0x48319d(0x182));this['config']={..._0x571d5c,...JSON[_0x48319d(0x1d5)](_0x596294)};}catch(_0x5ad3e5){this[_0x48319d(0x17d)]=_0x571d5c;}else this[_0x48319d(0x17d)]=_0x571d5c,this[_0x48319d(0x16b)]();!fs[_0x48319d(0x1c0)](this[_0x48319d(0x1c1)])&&fs[_0x48319d(0x193)](this[_0x48319d(0x1c1)],JSON[_0x48319d(0x1c6)]([]),_0x48319d(0x182));}['getConfig'](){const _0x26206f=a0_0x2acb3f;return process['env'][_0x26206f(0x1b7)]&&(this['config'][_0x26206f(0x1d9)]=process[_0x26206f(0x1d8)][_0x26206f(0x1b7)]),this['config'];}[a0_0x2acb3f(0x1c7)](_0x2f35e9,_0x1b7bc3){const _0x521a27=a0_0x2acb3f;this[_0x521a27(0x17d)][_0x2f35e9]=_0x1b7bc3,this[_0x521a27(0x16b)]();}[a0_0x2acb3f(0x16b)](){const _0x31cc4a=a0_0x2acb3f;fs[_0x31cc4a(0x193)](this['configPath'],JSON[_0x31cc4a(0x1c6)](this[_0x31cc4a(0x17d)],null,0x2),_0x31cc4a(0x182));}[a0_0x2acb3f(0x1d4)](){const _0xda1780=a0_0x2acb3f;try{if(!fs[_0xda1780(0x1c0)](this[_0xda1780(0x1c1)]))return[];const _0x2a5b97=fs[_0xda1780(0x15e)](this[_0xda1780(0x1c1)],_0xda1780(0x182));return JSON[_0xda1780(0x1d5)](_0x2a5b97);}catch{return[];}}[a0_0x2acb3f(0x185)](_0x5ded57){const _0x4a73d2=a0_0x2acb3f;fs['writeFileSync'](this[_0x4a73d2(0x1c1)],JSON[_0x4a73d2(0x1c6)](_0x5ded57,null,0x2),_0x4a73d2(0x182));}[a0_0x2acb3f(0x18e)](_0x728853,_0x194fbb,_0x593bc6,_0x21f3a5){const _0x1d501e=a0_0x2acb3f,_0x35a50d=this[_0x1d501e(0x1d4)](),_0x5582c3=_0x194fbb['length'],_0x40252d=_0x593bc6[_0x1d501e(0x17f)],_0x5e4b3b=Math[_0x1d501e(0x1d7)](_0x5582c3/0x4),_0x345f3d=Math[_0x1d501e(0x1d7)](_0x40252d/0x4),_0x48603f=Math[_0x1d501e(0x192)](0x0,_0x5e4b3b-_0x345f3d),_0x996991=detectSessionTool(),_0xb97207=_0x996991[_0x1d501e(0x170)],_0x51c8cf=Math['random']()['toString'](0x24)['substring'](0x2,0xb);try{fs['writeFileSync'](path['join'](this[_0x1d501e(0x1a7)],_0x51c8cf+_0x1d501e(0x165)),_0x194fbb,_0x1d501e(0x182)),fs[_0x1d501e(0x193)](path[_0x1d501e(0x173)](this[_0x1d501e(0x1a7)],_0x51c8cf+_0x1d501e(0x187)),_0x593bc6,_0x1d501e(0x182));}catch{}const _0x1100a7=_0x728853[_0x1d501e(0x167)]('\x20')[0x0]||_0x1d501e(0x1e1),_0x2c7271=_0x996991[_0x1d501e(0x194)]?_0x996991[_0x1d501e(0x1e8)]?_0x996991[_0x1d501e(0x194)]+'-'+_0x996991['modelShort']+'-'+_0x1100a7:_0x996991[_0x1d501e(0x194)]+'-'+_0x1100a7:_0x1100a7,_0x25f952={'id':_0x51c8cf,'timestamp':new Date()['toISOString'](),'command':_0x2c7271,'raw_chars':_0x5582c3,'compressed_chars':_0x40252d,'estimated_raw_tokens':_0x5e4b3b,'estimated_compressed_tokens':_0x345f3d,'tokens_saved':_0x48603f,'model_used':_0xb97207,'exit_code':_0x21f3a5,'synced':![],'ai_detected':!!_0x996991['tool']};_0x35a50d[_0x1d501e(0x163)](_0x25f952),this[_0x1d501e(0x185)](_0x35a50d);const _0x4d06ce=this['getConfig']()[_0x1d501e(0x1d9)];return _0x4d06ce&&_0x4d06ce['trim']()[_0x1d501e(0x17f)]>0x0&&this['triggerBackgroundSync'](),_0x25f952;}[a0_0x2acb3f(0x168)](){const _0x37aef8=a0_0x2acb3f;try{const _0x38b80a=path[_0x37aef8(0x173)](__dirname,_0x37aef8(0x183));if(fs['existsSync'](_0x38b80a)){const _0x3a8780=(0x0,child_process_1[_0x37aef8(0x19c)])(process[_0x37aef8(0x180)],[_0x38b80a],{'detached':!![],'stdio':_0x37aef8(0x16c)});_0x3a8780[_0x37aef8(0x1da)]();}}catch{}}['getStatsSummary'](_0x556928=a0_0x2acb3f(0x169)){const _0x30d387=a0_0x2acb3f,_0x1a87fa=this[_0x30d387(0x1d4)]();let _0x3f5d78=0x0,_0x3b066d=0x0,_0x1f0520=0x0;for(const _0x34b709 of _0x1a87fa){_0x3f5d78+=_0x34b709[_0x30d387(0x19f)],_0x3b066d+=_0x34b709[_0x30d387(0x1ac)],_0x1f0520+=_0x34b709['tokens_saved'];}let _0x42ec3a=_0x556928;(!_0x42ec3a||_0x42ec3a==='auto'||!exports[_0x30d387(0x190)][_0x42ec3a])&&(_0x1a87fa[_0x30d387(0x17f)]>0x0&&_0x1a87fa[_0x1a87fa[_0x30d387(0x17f)]-0x1]['model_used']?_0x42ec3a=_0x1a87fa[_0x1a87fa[_0x30d387(0x17f)]-0x1][_0x30d387(0x1bb)]:_0x42ec3a=this[_0x30d387(0x1b9)]()[_0x30d387(0x18d)]||_0x30d387(0x171));const _0x4d79f0=exports[_0x30d387(0x190)][_0x42ec3a]||exports[_0x30d387(0x190)][_0x30d387(0x171)],_0x2ac2db=_0x1f0520*_0x4d79f0['input_price_1m']/0xf4240,_0x6b6f3c=_0x3f5d78*_0x4d79f0['input_price_1m']/0xf4240,_0x49d2b5=_0x3b066d*_0x4d79f0[_0x30d387(0x166)]/0xf4240,_0x310d3c=_0x3f5d78>0x0?_0x1f0520/_0x3f5d78*0x64:0x0;return{'total_raw_tokens':_0x3f5d78,'total_compressed_tokens':_0x3b066d,'total_tokens_saved':_0x1f0520,'savings_percentage':parseFloat(_0x310d3c[_0x30d387(0x1af)](0x1)),'money_saved_usd':parseFloat(_0x2ac2db['toFixed'](0x4)),'raw_cost_usd':parseFloat(_0x6b6f3c[_0x30d387(0x1af)](0x4)),'compressed_cost_usd':parseFloat(_0x49d2b5[_0x30d387(0x1af)](0x4)),'model_name':_0x4d79f0[_0x30d387(0x1d6)],'model_key':_0x42ec3a};}}exports[a0_0x2acb3f(0x184)]=Tracker,exports[a0_0x2acb3f(0x18c)]=new Tracker();
|