trimprompt 1.0.12 → 1.0.13
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 +1 -1
- package/cache.js +1 -1
- package/cli.js +1 -1
- package/dashboard.js +1 -1
- 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/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/tracker.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function a0_0x1e86(){const _0x130c0f=['Gemini\x203.1\x20Flash-Lite','gemini-3-5-flash','create','split','Claude\x20Mythos\x205','input_price_1m','existsSync','CLAUDE_EFFORT','COPILOT_MODEL','5241900BKxyHt','config','Claude\x20Sonnet\x204.5','GPT-4o\x20Mini','ANTIGRAVITY_AGENT','child_process','AIDER_MODEL','AI_AGENT','3537861hXKobh','getLogs','230eETqHi','2MkawWM','path','toString','getOwnPropertyNames','continue','cline','Tracker','getOwnPropertyDescriptor','flash','estimated_compressed_tokens','configurable','writeFileSync','PRICING','REPL_ID','pop','default_model','CLAUDE_CODE','length','auto','GPT-5.4','GPT-5.4\x20Nano','50104luZxTa','claude-opus-4-8','Claude\x20Haiku\x204.5','modelShort','PATH','readFileSync','configPath','o3-mini','join','VSCODE_PID','defineProperty','toFixed','__setModuleDefault','claude-sonnet-4-6','889fKdRBd','8314647KLzlHZ','toLowerCase','substring','github-copilot','sonnet','2690sCGqcz','tokens_saved','.comp.txt','gemini','utf8','OpenAI\x20o3-mini','unref','4fzQZXa','saveConfig','262629mQrqqj','1009969szQPdg','Claude\x20Fable\x205','ignore','getConfig','claude-sonnet-4-5','triggerBackgroundSync','statsPath','CLAUDECODE','tool','Claude\x203.5\x20Sonnet','estimated_raw_tokens','CONTINUE_GLOBAL_DIR','2802yDxuBT','saveLogs','logsDir','stringify','execPath','ceil','tracker','high','init','claude_code','codex','claude-code','writable','gemini-3-1-pro','spawn','.trimprompt','trim','CLINE_DATA_DIR','Gemini\x203.5\x20Live\x20Translate','devin','push','cursor','__esModule','unknown','prototype','toISOString','GPT-4.1\x20Mini','replit','name','aider','default','parse','opus','baseDir','copilot','__importStar','get','Gemini\x203.1\x20Pro','includes','homedir','GPT-5.5','stats.json','call','claude-3-5-sonnet','o3mini','CURSOR_AGENT','GPT-4.1\x20Nano','13BtDnYs','1.0','logs','model','TRIMPROMPT_MODEL','model_used','COPILOT_GITHUB_TOKEN','Claude\x20Sonnet\x204.6','windsurf','antigravity'];a0_0x1e86=function(){return _0x130c0f;};return a0_0x1e86();}const a0_0x14d897=a0_0x56e9;(function(_0x5f4c25,_0x5ba017){const _0x1b2936=a0_0x56e9,_0x124af9=_0x5f4c25();while(!![]){try{const _0x18ed62=parseInt(_0x1b2936(0x1bc))/0x1*(parseInt(_0x1b2936(0x189))/0x2)+-parseInt(_0x1b2936(0x186))/0x3*(-parseInt(_0x1b2936(0x1b9))/0x4)+parseInt(_0x1b2936(0x1b2))/0x5*(-parseInt(_0x1b2936(0x1c8))/0x6)+-parseInt(_0x1b2936(0x1ac))/0x7*(parseInt(_0x1b2936(0x19e))/0x8)+-parseInt(_0x1b2936(0x1bb))/0x9*(-parseInt(_0x1b2936(0x188))/0xa)+-parseInt(_0x1b2936(0x1ad))/0xb+parseInt(_0x1b2936(0x17e))/0xc*(-parseInt(_0x1b2936(0x1f7))/0xd);if(_0x18ed62===_0x5ba017)break;else _0x124af9['push'](_0x124af9['shift']());}catch(_0x457d14){_0x124af9['push'](_0x124af9['shift']());}}}(a0_0x1e86,0x97a0e));var __createBinding=this&&this['__createBinding']||(Object['create']?function(_0x29dd07,_0x12cce5,_0x598ca8,_0x50f2e2){const _0x421c2f=a0_0x56e9;if(_0x50f2e2===undefined)_0x50f2e2=_0x598ca8;var _0x49313b=Object[_0x421c2f(0x190)](_0x12cce5,_0x598ca8);(!_0x49313b||(_0x421c2f(0x1ec)in _0x49313b?!_0x12cce5[_0x421c2f(0x1de)]:_0x49313b[_0x421c2f(0x1d4)]||_0x49313b[_0x421c2f(0x193)]))&&(_0x49313b={'enumerable':!![],'get':function(){return _0x12cce5[_0x598ca8];}}),Object[_0x421c2f(0x1a8)](_0x29dd07,_0x50f2e2,_0x49313b);}:function(_0x589f56,_0x148b04,_0x272efd,_0x42fa65){if(_0x42fa65===undefined)_0x42fa65=_0x272efd;_0x589f56[_0x42fa65]=_0x148b04[_0x272efd];}),__setModuleDefault=this&&this[a0_0x14d897(0x1aa)]||(Object[a0_0x14d897(0x177)]?function(_0x2b72d5,_0x1c16cb){const _0x19abe2=a0_0x14d897;Object[_0x19abe2(0x1a8)](_0x2b72d5,_0x19abe2(0x1e6),{'enumerable':!![],'value':_0x1c16cb});}:function(_0x1033a8,_0x2090ca){const _0x3f4cab=a0_0x14d897;_0x1033a8[_0x3f4cab(0x1e6)]=_0x2090ca;}),__importStar=this&&this[a0_0x14d897(0x1eb)]||(function(){var _0x3107c4=function(_0x245235){const _0x3a2072=a0_0x56e9;return _0x3107c4=Object[_0x3a2072(0x18c)]||function(_0x1fb7e2){const _0x322d9c=_0x3a2072;var _0x3ffdcc=[];for(var _0x2872bc in _0x1fb7e2)if(Object[_0x322d9c(0x1e0)]['hasOwnProperty'][_0x322d9c(0x1f2)](_0x1fb7e2,_0x2872bc))_0x3ffdcc[_0x3ffdcc[_0x322d9c(0x19a)]]=_0x2872bc;return _0x3ffdcc;},_0x3107c4(_0x245235);};return function(_0x1f2382){const _0x4c183e=a0_0x56e9;if(_0x1f2382&&_0x1f2382[_0x4c183e(0x1de)])return _0x1f2382;var _0x1c4659={};if(_0x1f2382!=null){for(var _0x168bfa=_0x3107c4(_0x1f2382),_0x319522=0x0;_0x319522<_0x168bfa[_0x4c183e(0x19a)];_0x319522++)if(_0x168bfa[_0x319522]!==_0x4c183e(0x1e6))__createBinding(_0x1c4659,_0x1f2382,_0x168bfa[_0x319522]);}return __setModuleDefault(_0x1c4659,_0x1f2382),_0x1c4659;};}());function a0_0x56e9(_0x4109ba,_0x9bd5e4){_0x4109ba=_0x4109ba-0x177;const _0x1e860a=a0_0x1e86();let _0x56e9c3=_0x1e860a[_0x4109ba];return _0x56e9c3;}Object[a0_0x14d897(0x1a8)](exports,a0_0x14d897(0x1de),{'value':!![]}),exports[a0_0x14d897(0x1ce)]=exports[a0_0x14d897(0x18f)]=exports[a0_0x14d897(0x195)]=void 0x0,exports['detectSessionTool']=detectSessionTool;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x14d897(0x18a))),os=__importStar(require('os')),child_process_1=require(a0_0x14d897(0x183));exports['PRICING']={'claude-fable-5':{'name':a0_0x14d897(0x1bd),'input_price_1m':0xa},'claude-mythos-5':{'name':a0_0x14d897(0x179),'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':'Claude\x20Opus\x204.1\x20(deprecated)','input_price_1m':0xf},'claude-sonnet-4-6':{'name':a0_0x14d897(0x1fe),'input_price_1m':0x3},'claude-sonnet-4-5':{'name':a0_0x14d897(0x180),'input_price_1m':0x3},'claude-3-5-sonnet':{'name':a0_0x14d897(0x1c5),'input_price_1m':0x3},'claude-haiku-4-5':{'name':a0_0x14d897(0x1a0),'input_price_1m':0x1},'claude-haiku-3-5':{'name':'Claude\x20Haiku\x203.5','input_price_1m':0.8},'gpt-5-5':{'name':a0_0x14d897(0x1f0),'input_price_1m':0x5},'gpt-5-4':{'name':a0_0x14d897(0x19c),'input_price_1m':2.5},'gpt-4o':{'name':'GPT-4o','input_price_1m':2.5},'gpt-5-4-mini':{'name':'GPT-5.4\x20Mini','input_price_1m':0.75},'gpt-5-4-nano':{'name':a0_0x14d897(0x19d),'input_price_1m':0.2},'gpt-4-1-mini':{'name':a0_0x14d897(0x1e2),'input_price_1m':0.4},'gpt-4-1-nano':{'name':a0_0x14d897(0x1f6),'input_price_1m':0.1},'gpt-4o-mini':{'name':a0_0x14d897(0x181),'input_price_1m':0.15},'o1':{'name':'OpenAI\x20o1','input_price_1m':0xf},'o1-mini':{'name':'OpenAI\x20o1-mini','input_price_1m':0x3},'o3-mini':{'name':a0_0x14d897(0x1b7),'input_price_1m':1.1},'cursor-small':{'name':'Cursor\x20Small','input_price_1m':0.1},'gemini-3-1-pro':{'name':a0_0x14d897(0x1ed),'input_price_1m':0x2},'gemini-3-5-flash':{'name':'Gemini\x203.5\x20Flash','input_price_1m':1.5},'gemini-3-1-flash-lite':{'name':a0_0x14d897(0x201),'input_price_1m':0.45},'gemini-3-5-live-translate':{'name':a0_0x14d897(0x1da),'input_price_1m':3.5}};function detectSessionTool(){const _0x5bbd10=a0_0x14d897,_0x50060f=process.env,_0x34ca17={'tool':'','model':_0x5bbd10(0x1ab),'modelShort':''};if(_0x50060f[_0x5bbd10(0x1fb)]&&exports['PRICING'][_0x50060f[_0x5bbd10(0x1fb)]])return{'tool':'','model':_0x50060f[_0x5bbd10(0x1fb)],'modelShort':''};const _0x230c6a=(_0x50060f[_0x5bbd10(0x185)]||'')[_0x5bbd10(0x1ae)]();if(_0x230c6a){if(_0x230c6a[_0x5bbd10(0x1ee)](_0x5bbd10(0x1d3))||_0x230c6a['includes'](_0x5bbd10(0x1d1))){const _0x53824a=_0x50060f[_0x5bbd10(0x17c)]===_0x5bbd10(0x1cf)?'opus':_0x5bbd10(0x1b1),_0x39d658=_0x50060f['CLAUDE_EFFORT']===_0x5bbd10(0x1cf)?'claude-opus-4-8':'claude-sonnet-4-6';return{'tool':'claude','model':_0x39d658,'modelShort':_0x53824a};}if(_0x230c6a[_0x5bbd10(0x1ee)](_0x5bbd10(0x1dd)))return{'tool':_0x5bbd10(0x1dd),'model':_0x5bbd10(0x1ab),'modelShort':_0x5bbd10(0x1b1)};if(_0x230c6a['includes'](_0x5bbd10(0x1b0))||_0x230c6a[_0x5bbd10(0x1ee)](_0x5bbd10(0x1ea))){const _0x4b7f5e=_0x50060f['COPILOT_MODEL']||'';if(_0x4b7f5e&&exports['PRICING'][_0x4b7f5e])return{'tool':'copilot','model':_0x4b7f5e,'modelShort':_0x4b7f5e['split']('-')[_0x5bbd10(0x197)]()||''};return{'tool':_0x5bbd10(0x1ea),'model':_0x5bbd10(0x1c0),'modelShort':_0x5bbd10(0x1b1)};}if(_0x230c6a['includes'](_0x5bbd10(0x1b5)))return{'tool':'gemini','model':_0x5bbd10(0x202),'modelShort':_0x5bbd10(0x191)};if(_0x230c6a[_0x5bbd10(0x1ee)](_0x5bbd10(0x1d2)))return{'tool':_0x5bbd10(0x1d2),'model':_0x5bbd10(0x1a5),'modelShort':_0x5bbd10(0x1f4)};if(_0x230c6a[_0x5bbd10(0x1ee)](_0x5bbd10(0x1db)))return{'tool':'devin','model':'claude-sonnet-4-6','modelShort':''};if(_0x230c6a[_0x5bbd10(0x1ee)]('antigravity'))return{'tool':_0x5bbd10(0x200),'model':'gemini-3-1-pro','modelShort':_0x5bbd10(0x1b5)};if(_0x230c6a[_0x5bbd10(0x1ee)](_0x5bbd10(0x1e3))||_0x50060f[_0x5bbd10(0x196)])return{'tool':_0x5bbd10(0x1e3),'model':_0x5bbd10(0x1ab),'modelShort':''};return{'tool':_0x230c6a[_0x5bbd10(0x178)]('_')[0x0][_0x5bbd10(0x178)]('-')[0x0],'model':_0x5bbd10(0x1ab),'modelShort':''};}if(_0x50060f[_0x5bbd10(0x1c3)]==='1'||_0x50060f[_0x5bbd10(0x199)]==='1'){const _0x17ec54=_0x50060f['CLAUDE_EFFORT']==='high'?_0x5bbd10(0x1e8):_0x5bbd10(0x1b1),_0x5260eb=_0x50060f[_0x5bbd10(0x17c)]===_0x5bbd10(0x1cf)?_0x5bbd10(0x19f):_0x5bbd10(0x1ab);return{'tool':'claude','model':_0x5260eb,'modelShort':_0x17ec54};}if(_0x50060f[_0x5bbd10(0x1f5)]==='1')return{'tool':_0x5bbd10(0x1dd),'model':_0x5bbd10(0x1ab),'modelShort':_0x5bbd10(0x1b1)};if(_0x50060f['GEMINI_CLI']==='1')return{'tool':_0x5bbd10(0x1b5),'model':_0x5bbd10(0x202),'modelShort':_0x5bbd10(0x191)};if(_0x50060f[_0x5bbd10(0x17d)]||_0x50060f[_0x5bbd10(0x1fd)]){const _0xe60382=_0x50060f[_0x5bbd10(0x17d)]||'';if(_0xe60382&&exports[_0x5bbd10(0x195)][_0xe60382])return{'tool':_0x5bbd10(0x1ea),'model':_0xe60382,'modelShort':_0xe60382[_0x5bbd10(0x178)]('-')[_0x5bbd10(0x197)]()||''};return{'tool':_0x5bbd10(0x1ea),'model':_0x5bbd10(0x1c0),'modelShort':'sonnet'};}if(_0x50060f[_0x5bbd10(0x196)]||_0x50060f['REPLIT_ENVIRONMENT'])return{'tool':'replit','model':_0x5bbd10(0x1ab),'modelShort':''};if(_0x50060f[_0x5bbd10(0x1d9)])return{'tool':_0x5bbd10(0x18e),'model':_0x5bbd10(0x1ab),'modelShort':''};if(_0x50060f[_0x5bbd10(0x1c7)])return{'tool':_0x5bbd10(0x18d),'model':'claude-sonnet-4-6','modelShort':''};if(_0x50060f[_0x5bbd10(0x182)]==='1')return{'tool':_0x5bbd10(0x200),'model':_0x5bbd10(0x1d5),'modelShort':'gemini'};if(_0x50060f[_0x5bbd10(0x17c)]){const _0xd28c2f=_0x50060f[_0x5bbd10(0x17c)]===_0x5bbd10(0x1cf)?_0x5bbd10(0x1e8):_0x5bbd10(0x1b1),_0x593732=_0x50060f[_0x5bbd10(0x17c)]===_0x5bbd10(0x1cf)?_0x5bbd10(0x19f):_0x5bbd10(0x1ab);return{'tool':'','model':_0x593732,'modelShort':''};}if(_0x50060f[_0x5bbd10(0x184)]&&exports['PRICING'][_0x50060f['AIDER_MODEL']])return{'tool':_0x5bbd10(0x1e5),'model':_0x50060f['AIDER_MODEL'],'modelShort':''};if(_0x50060f[_0x5bbd10(0x1a7)]){const _0x14ab47=(_0x50060f[_0x5bbd10(0x1a2)]||'')[_0x5bbd10(0x1ae)]();if(_0x14ab47[_0x5bbd10(0x1ee)](_0x5bbd10(0x1dd)))return{'tool':_0x5bbd10(0x1dd),'model':'claude-sonnet-4-6','modelShort':_0x5bbd10(0x1b1)};if(_0x14ab47[_0x5bbd10(0x1ee)](_0x5bbd10(0x1ff)))return{'tool':_0x5bbd10(0x1ff),'model':_0x5bbd10(0x1ab),'modelShort':_0x5bbd10(0x1b1)};}const _0x4dab9e=process.env.TRIMPROMPT_MODEL||'';if(_0x4dab9e&&exports[_0x5bbd10(0x195)][_0x4dab9e])return{'tool':'','model':_0x4dab9e,'modelShort':''};return _0x34ca17;}class Tracker{[a0_0x14d897(0x1e9)];[a0_0x14d897(0x1a4)];[a0_0x14d897(0x1c2)];['logsDir'];[a0_0x14d897(0x17f)];constructor(){const _0x22e381=a0_0x14d897;this[_0x22e381(0x1e9)]=path['join'](os[_0x22e381(0x1ef)](),_0x22e381(0x1d7)),this[_0x22e381(0x1a4)]=path['join'](this[_0x22e381(0x1e9)],'config.json'),this[_0x22e381(0x1c2)]=path['join'](this[_0x22e381(0x1e9)],_0x22e381(0x1f1)),this['logsDir']=path[_0x22e381(0x1a6)](this[_0x22e381(0x1e9)],_0x22e381(0x1f9)),this['init']();}[a0_0x14d897(0x1d0)](){const _0x39fa94=a0_0x14d897;!fs[_0x39fa94(0x17b)](this[_0x39fa94(0x1e9)])&&fs['mkdirSync'](this['baseDir'],{'recursive':!![]});!fs[_0x39fa94(0x17b)](this['logsDir'])&&fs['mkdirSync'](this[_0x39fa94(0x1ca)],{'recursive':!![]});const _0x55e380={'version':_0x39fa94(0x1f8),'telemetry_url':process.env.TRIMPROMPT_TELEMETRY_URL||'','max_output_tokens':0x1388,'redaction_enabled':!![],'default_model':_0x39fa94(0x19f)};if(fs[_0x39fa94(0x17b)](this[_0x39fa94(0x1a4)]))try{const _0x7e28a3=fs[_0x39fa94(0x1a3)](this[_0x39fa94(0x1a4)],_0x39fa94(0x1b6));this[_0x39fa94(0x17f)]={..._0x55e380,...JSON[_0x39fa94(0x1e7)](_0x7e28a3)};}catch(_0x2acb73){this['config']=_0x55e380;}else this[_0x39fa94(0x17f)]=_0x55e380,this[_0x39fa94(0x1ba)]();!fs[_0x39fa94(0x17b)](this[_0x39fa94(0x1c2)])&&fs[_0x39fa94(0x194)](this[_0x39fa94(0x1c2)],JSON['stringify']([]),_0x39fa94(0x1b6));}[a0_0x14d897(0x1bf)](){const _0x2b1535=a0_0x14d897;return process.env.TRIMPROMPT_TELEMETRY_URL&&(this[_0x2b1535(0x17f)]['telemetry_url']=process.env.TRIMPROMPT_TELEMETRY_URL),this['config'];}['setConfig'](_0x59dc8c,_0x4f0f63){const _0x3ebbbc=a0_0x14d897;this['config'][_0x59dc8c]=_0x4f0f63,this[_0x3ebbbc(0x1ba)]();}[a0_0x14d897(0x1ba)](){const _0x3eae63=a0_0x14d897;fs['writeFileSync'](this[_0x3eae63(0x1a4)],JSON['stringify'](this[_0x3eae63(0x17f)],null,0x2),'utf8');}['getLogs'](){const _0x4bb767=a0_0x14d897;try{if(!fs[_0x4bb767(0x17b)](this[_0x4bb767(0x1c2)]))return[];const _0x161a9e=fs[_0x4bb767(0x1a3)](this[_0x4bb767(0x1c2)],_0x4bb767(0x1b6));return JSON[_0x4bb767(0x1e7)](_0x161a9e);}catch{return[];}}[a0_0x14d897(0x1c9)](_0x47eeb7){const _0x5aad65=a0_0x14d897;fs['writeFileSync'](this[_0x5aad65(0x1c2)],JSON[_0x5aad65(0x1cb)](_0x47eeb7,null,0x2),'utf8');}['logExecution'](_0x156cb8,_0x4a1300,_0x267d75,_0x449184){const _0x2d27a4=a0_0x14d897,_0x30d31e=this[_0x2d27a4(0x187)](),_0x214276=_0x4a1300[_0x2d27a4(0x19a)],_0x13b933=_0x267d75[_0x2d27a4(0x19a)],_0x3468d6=Math[_0x2d27a4(0x1cd)](_0x214276/0x4),_0x8d4ef1=Math[_0x2d27a4(0x1cd)](_0x13b933/0x4),_0x2fcddb=Math['max'](0x0,_0x3468d6-_0x8d4ef1),_0x493dea=detectSessionTool(),_0x537978=_0x493dea[_0x2d27a4(0x1fa)],_0x2c8fa5=Math['random']()[_0x2d27a4(0x18b)](0x24)[_0x2d27a4(0x1af)](0x2,0xb);try{fs[_0x2d27a4(0x194)](path[_0x2d27a4(0x1a6)](this[_0x2d27a4(0x1ca)],_0x2c8fa5+'.raw.txt'),_0x4a1300,'utf8'),fs[_0x2d27a4(0x194)](path[_0x2d27a4(0x1a6)](this[_0x2d27a4(0x1ca)],_0x2c8fa5+_0x2d27a4(0x1b4)),_0x267d75,_0x2d27a4(0x1b6));}catch{}const _0x3f73b5=_0x156cb8[_0x2d27a4(0x178)]('\x20')[0x0]||_0x2d27a4(0x1df),_0x5eb705=_0x493dea[_0x2d27a4(0x1c4)]?_0x493dea['modelShort']?_0x493dea[_0x2d27a4(0x1c4)]+'-'+_0x493dea[_0x2d27a4(0x1a1)]+'-'+_0x3f73b5:_0x493dea[_0x2d27a4(0x1c4)]+'-'+_0x3f73b5:_0x3f73b5,_0x1fc9ce={'id':_0x2c8fa5,'timestamp':new Date()[_0x2d27a4(0x1e1)](),'command':_0x5eb705,'raw_chars':_0x214276,'compressed_chars':_0x13b933,'estimated_raw_tokens':_0x3468d6,'estimated_compressed_tokens':_0x8d4ef1,'tokens_saved':_0x2fcddb,'model_used':_0x537978,'exit_code':_0x449184,'synced':![],'ai_detected':!!_0x493dea[_0x2d27a4(0x1c4)]};_0x30d31e[_0x2d27a4(0x1dc)](_0x1fc9ce),this[_0x2d27a4(0x1c9)](_0x30d31e);const _0x4d8383=this[_0x2d27a4(0x1bf)]()['telemetry_url'];return _0x4d8383&&_0x4d8383[_0x2d27a4(0x1d8)]()[_0x2d27a4(0x19a)]>0x0&&this[_0x2d27a4(0x1c1)](),_0x1fc9ce;}[a0_0x14d897(0x1c1)](){const _0xb18d84=a0_0x14d897;try{const _0x2e17cd=path[_0xb18d84(0x1a6)](__dirname,'sync.js');if(fs[_0xb18d84(0x17b)](_0x2e17cd)){const _0x8082ae=(0x0,child_process_1[_0xb18d84(0x1d6)])(process[_0xb18d84(0x1cc)],[_0x2e17cd],{'detached':!![],'stdio':_0xb18d84(0x1be)});_0x8082ae[_0xb18d84(0x1b8)]();}}catch{}}['getStatsSummary'](_0x24038d=a0_0x14d897(0x19b)){const _0x5dc96e=a0_0x14d897,_0x47f120=this[_0x5dc96e(0x187)]();let _0x3968a8=0x0,_0x1405ac=0x0,_0x408dfa=0x0;for(const _0x2e1050 of _0x47f120){_0x3968a8+=_0x2e1050[_0x5dc96e(0x1c6)],_0x1405ac+=_0x2e1050[_0x5dc96e(0x192)],_0x408dfa+=_0x2e1050[_0x5dc96e(0x1b3)];}let _0x308f06=_0x24038d;(!_0x308f06||_0x308f06===_0x5dc96e(0x19b)||!exports['PRICING'][_0x308f06])&&(_0x47f120[_0x5dc96e(0x19a)]>0x0&&_0x47f120[_0x47f120['length']-0x1][_0x5dc96e(0x1fc)]?_0x308f06=_0x47f120[_0x47f120['length']-0x1][_0x5dc96e(0x1fc)]:_0x308f06=this[_0x5dc96e(0x1bf)]()[_0x5dc96e(0x198)]||_0x5dc96e(0x1f3));const _0x241c73=exports['PRICING'][_0x308f06]||exports[_0x5dc96e(0x195)][_0x5dc96e(0x1f3)],_0x2a7f4e=_0x408dfa*_0x241c73[_0x5dc96e(0x17a)]/0xf4240,_0xb99240=_0x3968a8*_0x241c73[_0x5dc96e(0x17a)]/0xf4240,_0xee6317=_0x1405ac*_0x241c73['input_price_1m']/0xf4240,_0x28b25b=_0x3968a8>0x0?_0x408dfa/_0x3968a8*0x64:0x0;return{'total_raw_tokens':_0x3968a8,'total_compressed_tokens':_0x1405ac,'total_tokens_saved':_0x408dfa,'savings_percentage':parseFloat(_0x28b25b['toFixed'](0x1)),'money_saved_usd':parseFloat(_0x2a7f4e[_0x5dc96e(0x1a9)](0x4)),'raw_cost_usd':parseFloat(_0xb99240['toFixed'](0x4)),'compressed_cost_usd':parseFloat(_0xee6317[_0x5dc96e(0x1a9)](0x4)),'model_name':_0x241c73[_0x5dc96e(0x1e4)],'model_key':_0x308f06};}}exports[a0_0x14d897(0x18f)]=Tracker,exports[a0_0x14d897(0x1ce)]=new Tracker();
|
|
1
|
+
'use strict';const a0_0x4d290=a0_0x1377;(function(_0x41dadb,_0xf48528){const _0x14cfb9=a0_0x1377,_0x1ee41c=_0x41dadb();while(!![]){try{const _0x39672d=parseInt(_0x14cfb9(0x13d))/0x1+parseInt(_0x14cfb9(0x150))/0x2+parseInt(_0x14cfb9(0x142))/0x3+parseInt(_0x14cfb9(0x103))/0x4+parseInt(_0x14cfb9(0x117))/0x5+parseInt(_0x14cfb9(0x13a))/0x6*(-parseInt(_0x14cfb9(0x12e))/0x7)+-parseInt(_0x14cfb9(0x15e))/0x8;if(_0x39672d===_0xf48528)break;else _0x1ee41c['push'](_0x1ee41c['shift']());}catch(_0x2b6373){_0x1ee41c['push'](_0x1ee41c['shift']());}}}(a0_0xabc6,0x3f2b1));function a0_0x1377(_0x296aa5,_0x4e7b6f){_0x296aa5=_0x296aa5-0xf6;const _0xabc6ef=a0_0xabc6();let _0x137792=_0xabc6ef[_0x296aa5];return _0x137792;}function a0_0xabc6(){const _0x4d6d03=['OpenAI\x20o1','14xqbVBW','auto','Claude\x20Mythos\x205','configPath','ANTIGRAVITY_AGENT','ceil','Gemini\x203.1\x20Pro','logsDir','getStatsSummary','claude-code','.comp.txt','claude','189078ZOwsjy','Gemini\x203.1\x20Flash-Lite','__esModule','235416UAFDlv','CLAUDE_CODE','GPT-4o','cline','unref','530193BaPBCa','o3-mini','high','modelShort','toFixed','homedir','setConfig','path','Claude\x20Opus\x204.5','github-copilot','OpenAI\x20o3-mini','tracker','logs','TRIMPROMPT_MODEL','628502FgtUma','gemini','mkdirSync','statsPath','Tracker','Claude\x203.5\x20Sonnet','AIDER_MODEL','hasOwnProperty','GPT-5.4\x20Mini','config.json','getOwnPropertyNames','Claude\x20Haiku\x203.5','GPT-5.4\x20Nano','aider','7926936nEqZEe','CURSOR_AGENT','Claude\x20Haiku\x204.5','existsSync','config','__createBinding','default_model','REPL_ID','REPLIT_ENVIRONMENT','claude-opus-4-8','readFileSync','tool','codex','split','model_used','CLAUDECODE','telemetry_url','getLogs','GPT-5.5','__setModuleDefault','Claude\x20Sonnet\x204.5','CONTINUE_GLOBAL_DIR','stringify','GPT-4.1\x20Mini','Cursor\x20Small','getConfig','sync.js','triggerBackgroundSync','parse','init','VSCODE_PID','detectSessionTool','COPILOT_MODEL','gemini-3-1-pro','windsurf','default','Claude\x20Opus\x204.8','replit','spawn','claude-sonnet-4-5','push','.raw.txt','logExecution','execPath','PRICING','OpenAI\x20o1-mini','devin','utf8','2038472yPsgAT','ignore','continue','GPT-4.1\x20Nano','prototype','antigravity','cursor','random','baseDir','claude-sonnet-4-6','create','length','Gemini\x203.5\x20Live\x20Translate','get','AI_AGENT','Gemini\x203.5\x20Flash','sonnet','name','Claude\x20Sonnet\x204.6','unknown','383070mHxrME','copilot','Claude\x20Opus\x204.7','toLowerCase','writeFileSync','saveConfig','opus','claude-3-5-sonnet','estimated_raw_tokens','gemini-3-5-flash','call','includes','CLAUDE_EFFORT','trim','pop','getOwnPropertyDescriptor','o3mini','model','defineProperty','input_price_1m','join','GPT-4o\x20Mini'];a0_0xabc6=function(){return _0x4d6d03;};return a0_0xabc6();}var __createBinding=this&&this[a0_0x4d290(0x163)]||(Object[a0_0x4d290(0x10d)]?function(_0x45db60,_0x16cbdd,_0x42402f,_0x33bff2){const _0x3ec6ee=a0_0x4d290;if(_0x33bff2===undefined)_0x33bff2=_0x42402f;var _0x2c6a45=Object[_0x3ec6ee(0x126)](_0x16cbdd,_0x42402f);(!_0x2c6a45||(_0x3ec6ee(0x110)in _0x2c6a45?!_0x16cbdd[_0x3ec6ee(0x13c)]:_0x2c6a45['writable']||_0x2c6a45['configurable']))&&(_0x2c6a45={'enumerable':!![],'get':function(){return _0x16cbdd[_0x42402f];}}),Object[_0x3ec6ee(0x129)](_0x45db60,_0x33bff2,_0x2c6a45);}:function(_0x36dc78,_0x75464b,_0x4dae80,_0x1aba68){if(_0x1aba68===undefined)_0x1aba68=_0x4dae80;_0x36dc78[_0x1aba68]=_0x75464b[_0x4dae80];}),__setModuleDefault=this&&this[a0_0x4d290(0x171)]||(Object['create']?function(_0x37f0e0,_0x2a5d36){const _0x57c0db=a0_0x4d290;Object['defineProperty'](_0x37f0e0,_0x57c0db(0xf6),{'enumerable':!![],'value':_0x2a5d36});}:function(_0x3097a7,_0x3f3938){const _0x5d6bf7=a0_0x4d290;_0x3097a7[_0x5d6bf7(0xf6)]=_0x3f3938;}),__importStar=this&&this['__importStar']||(function(){var _0x688321=function(_0x5b755d){const _0x36ef7f=a0_0x1377;return _0x688321=Object[_0x36ef7f(0x15a)]||function(_0x459491){const _0x5713af=_0x36ef7f;var _0x4734e1=[];for(var _0x509c6a in _0x459491)if(Object[_0x5713af(0x107)][_0x5713af(0x157)][_0x5713af(0x121)](_0x459491,_0x509c6a))_0x4734e1[_0x4734e1[_0x5713af(0x10e)]]=_0x509c6a;return _0x4734e1;},_0x688321(_0x5b755d);};return function(_0x341198){const _0x4965e4=a0_0x1377;if(_0x341198&&_0x341198[_0x4965e4(0x13c)])return _0x341198;var _0x1ab477={};if(_0x341198!=null){for(var _0x550399=_0x688321(_0x341198),_0x541068=0x0;_0x541068<_0x550399[_0x4965e4(0x10e)];_0x541068++)if(_0x550399[_0x541068]!==_0x4965e4(0xf6))__createBinding(_0x1ab477,_0x341198,_0x550399[_0x541068]);}return __setModuleDefault(_0x1ab477,_0x341198),_0x1ab477;};}());Object[a0_0x4d290(0x129)](exports,a0_0x4d290(0x13c),{'value':!![]}),exports['tracker']=exports[a0_0x4d290(0x154)]=exports[a0_0x4d290(0xff)]=void 0x0,exports[a0_0x4d290(0x17d)]=detectSessionTool;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x4d290(0x149))),os=__importStar(require('os')),child_process_1=require('child_process');exports[a0_0x4d290(0xff)]={'claude-fable-5':{'name':'Claude\x20Fable\x205','input_price_1m':0xa},'claude-mythos-5':{'name':a0_0x4d290(0x130),'input_price_1m':0xa},'claude-opus-4-8':{'name':a0_0x4d290(0xf7),'input_price_1m':0x5},'claude-opus-4-7':{'name':a0_0x4d290(0x119),'input_price_1m':0x5},'claude-opus-4-5':{'name':a0_0x4d290(0x14a),'input_price_1m':0x5},'claude-opus-4-1':{'name':'Claude\x20Opus\x204.1\x20(deprecated)','input_price_1m':0xf},'claude-sonnet-4-6':{'name':a0_0x4d290(0x115),'input_price_1m':0x3},'claude-sonnet-4-5':{'name':a0_0x4d290(0x172),'input_price_1m':0x3},'claude-3-5-sonnet':{'name':a0_0x4d290(0x155),'input_price_1m':0x3},'claude-haiku-4-5':{'name':a0_0x4d290(0x160),'input_price_1m':0x1},'claude-haiku-3-5':{'name':a0_0x4d290(0x15b),'input_price_1m':0.8},'gpt-5-5':{'name':a0_0x4d290(0x170),'input_price_1m':0x5},'gpt-5-4':{'name':'GPT-5.4','input_price_1m':2.5},'gpt-4o':{'name':a0_0x4d290(0x13f),'input_price_1m':2.5},'gpt-5-4-mini':{'name':a0_0x4d290(0x158),'input_price_1m':0.75},'gpt-5-4-nano':{'name':a0_0x4d290(0x15c),'input_price_1m':0.2},'gpt-4-1-mini':{'name':a0_0x4d290(0x175),'input_price_1m':0.4},'gpt-4-1-nano':{'name':a0_0x4d290(0x106),'input_price_1m':0.1},'gpt-4o-mini':{'name':a0_0x4d290(0x12c),'input_price_1m':0.15},'o1':{'name':a0_0x4d290(0x12d),'input_price_1m':0xf},'o1-mini':{'name':a0_0x4d290(0x100),'input_price_1m':0x3},'o3-mini':{'name':a0_0x4d290(0x14c),'input_price_1m':1.1},'cursor-small':{'name':a0_0x4d290(0x176),'input_price_1m':0.1},'gemini-3-1-pro':{'name':a0_0x4d290(0x134),'input_price_1m':0x2},'gemini-3-5-flash':{'name':a0_0x4d290(0x112),'input_price_1m':1.5},'gemini-3-1-flash-lite':{'name':a0_0x4d290(0x13b),'input_price_1m':0.45},'gemini-3-5-live-translate':{'name':a0_0x4d290(0x10f),'input_price_1m':3.5}};function detectSessionTool(){const _0x4bf28f=a0_0x4d290,_0x4e8559=process.env,_0x44709d={'tool':'','model':_0x4bf28f(0x10c),'modelShort':''};if(_0x4e8559['TRIMPROMPT_MODEL']&&exports[_0x4bf28f(0xff)][_0x4e8559[_0x4bf28f(0x14f)]])return{'tool':'','model':_0x4e8559[_0x4bf28f(0x14f)],'modelShort':''};const _0x448313=(_0x4e8559[_0x4bf28f(0x111)]||'')['toLowerCase']();if(_0x448313){if(_0x448313[_0x4bf28f(0x122)](_0x4bf28f(0x137))||_0x448313[_0x4bf28f(0x122)]('claude_code')){const _0x5017bf=_0x4e8559['CLAUDE_EFFORT']===_0x4bf28f(0x144)?_0x4bf28f(0x11d):_0x4bf28f(0x113),_0x3cf47a=_0x4e8559[_0x4bf28f(0x123)]===_0x4bf28f(0x144)?_0x4bf28f(0x167):_0x4bf28f(0x10c);return{'tool':_0x4bf28f(0x139),'model':_0x3cf47a,'modelShort':_0x5017bf};}if(_0x448313[_0x4bf28f(0x122)](_0x4bf28f(0x109)))return{'tool':_0x4bf28f(0x109),'model':'claude-sonnet-4-6','modelShort':_0x4bf28f(0x113)};if(_0x448313[_0x4bf28f(0x122)](_0x4bf28f(0x14b))||_0x448313[_0x4bf28f(0x122)](_0x4bf28f(0x118))){const _0x241196=_0x4e8559[_0x4bf28f(0x17e)]||'';if(_0x241196&&exports[_0x4bf28f(0xff)][_0x241196])return{'tool':_0x4bf28f(0x118),'model':_0x241196,'modelShort':_0x241196[_0x4bf28f(0x16b)]('-')[_0x4bf28f(0x125)]()||''};return{'tool':'copilot','model':_0x4bf28f(0xfa),'modelShort':'sonnet'};}if(_0x448313['includes'](_0x4bf28f(0x151)))return{'tool':_0x4bf28f(0x151),'model':_0x4bf28f(0x120),'modelShort':'flash'};if(_0x448313[_0x4bf28f(0x122)](_0x4bf28f(0x16a)))return{'tool':_0x4bf28f(0x16a),'model':_0x4bf28f(0x143),'modelShort':_0x4bf28f(0x127)};if(_0x448313['includes'](_0x4bf28f(0x101)))return{'tool':_0x4bf28f(0x101),'model':'claude-sonnet-4-6','modelShort':''};if(_0x448313[_0x4bf28f(0x122)](_0x4bf28f(0x108)))return{'tool':'antigravity','model':'gemini-3-1-pro','modelShort':_0x4bf28f(0x151)};if(_0x448313['includes']('replit')||_0x4e8559[_0x4bf28f(0x165)])return{'tool':_0x4bf28f(0xf8),'model':_0x4bf28f(0x10c),'modelShort':''};return{'tool':_0x448313[_0x4bf28f(0x16b)]('_')[0x0][_0x4bf28f(0x16b)]('-')[0x0],'model':_0x4bf28f(0x10c),'modelShort':''};}if(_0x4e8559[_0x4bf28f(0x16d)]==='1'||_0x4e8559[_0x4bf28f(0x13e)]==='1'){const _0x2b1826=_0x4e8559[_0x4bf28f(0x123)]===_0x4bf28f(0x144)?'opus':_0x4bf28f(0x113),_0x3958e0=_0x4e8559[_0x4bf28f(0x123)]===_0x4bf28f(0x144)?_0x4bf28f(0x167):_0x4bf28f(0x10c);return{'tool':_0x4bf28f(0x139),'model':_0x3958e0,'modelShort':_0x2b1826};}if(_0x4e8559[_0x4bf28f(0x15f)]==='1')return{'tool':'cursor','model':'claude-sonnet-4-6','modelShort':'sonnet'};if(_0x4e8559['GEMINI_CLI']==='1')return{'tool':_0x4bf28f(0x151),'model':'gemini-3-5-flash','modelShort':'flash'};if(_0x4e8559[_0x4bf28f(0x17e)]||_0x4e8559['COPILOT_GITHUB_TOKEN']){const _0x3873a0=_0x4e8559[_0x4bf28f(0x17e)]||'';if(_0x3873a0&&exports[_0x4bf28f(0xff)][_0x3873a0])return{'tool':_0x4bf28f(0x118),'model':_0x3873a0,'modelShort':_0x3873a0[_0x4bf28f(0x16b)]('-')[_0x4bf28f(0x125)]()||''};return{'tool':_0x4bf28f(0x118),'model':_0x4bf28f(0xfa),'modelShort':'sonnet'};}if(_0x4e8559['REPL_ID']||_0x4e8559[_0x4bf28f(0x166)])return{'tool':'replit','model':_0x4bf28f(0x10c),'modelShort':''};if(_0x4e8559['CLINE_DATA_DIR'])return{'tool':_0x4bf28f(0x140),'model':_0x4bf28f(0x10c),'modelShort':''};if(_0x4e8559[_0x4bf28f(0x173)])return{'tool':_0x4bf28f(0x105),'model':_0x4bf28f(0x10c),'modelShort':''};if(_0x4e8559[_0x4bf28f(0x132)]==='1')return{'tool':_0x4bf28f(0x108),'model':_0x4bf28f(0x17f),'modelShort':'gemini'};if(_0x4e8559['CLAUDE_EFFORT']){const _0xf6d893=_0x4e8559[_0x4bf28f(0x123)]==='high'?_0x4bf28f(0x11d):_0x4bf28f(0x113),_0x294219=_0x4e8559['CLAUDE_EFFORT']===_0x4bf28f(0x144)?_0x4bf28f(0x167):'claude-sonnet-4-6';return{'tool':'','model':_0x294219,'modelShort':''};}if(_0x4e8559['AIDER_MODEL']&&exports[_0x4bf28f(0xff)][_0x4e8559['AIDER_MODEL']])return{'tool':_0x4bf28f(0x15d),'model':_0x4e8559[_0x4bf28f(0x156)],'modelShort':''};if(_0x4e8559[_0x4bf28f(0x17c)]){const _0x52639a=(_0x4e8559['PATH']||'')[_0x4bf28f(0x11a)]();if(_0x52639a[_0x4bf28f(0x122)]('cursor'))return{'tool':_0x4bf28f(0x109),'model':_0x4bf28f(0x10c),'modelShort':_0x4bf28f(0x113)};if(_0x52639a[_0x4bf28f(0x122)]('windsurf'))return{'tool':_0x4bf28f(0x180),'model':_0x4bf28f(0x10c),'modelShort':_0x4bf28f(0x113)};}const _0x50c5b0=process.env.TRIMPROMPT_MODEL||'';if(_0x50c5b0&&exports[_0x4bf28f(0xff)][_0x50c5b0])return{'tool':'','model':_0x50c5b0,'modelShort':''};return _0x44709d;}class Tracker{['baseDir'];[a0_0x4d290(0x131)];[a0_0x4d290(0x153)];[a0_0x4d290(0x135)];[a0_0x4d290(0x162)];constructor(){const _0x1a139e=a0_0x4d290;this['baseDir']=path[_0x1a139e(0x12b)](os[_0x1a139e(0x147)](),'.trimprompt'),this[_0x1a139e(0x131)]=path[_0x1a139e(0x12b)](this[_0x1a139e(0x10b)],_0x1a139e(0x159)),this[_0x1a139e(0x153)]=path['join'](this[_0x1a139e(0x10b)],'stats.json'),this[_0x1a139e(0x135)]=path[_0x1a139e(0x12b)](this['baseDir'],_0x1a139e(0x14e)),this[_0x1a139e(0x17b)]();}['init'](){const _0x5a90d7=a0_0x4d290;!fs[_0x5a90d7(0x161)](this[_0x5a90d7(0x10b)])&&fs[_0x5a90d7(0x152)](this[_0x5a90d7(0x10b)],{'recursive':!![]});!fs[_0x5a90d7(0x161)](this['logsDir'])&&fs[_0x5a90d7(0x152)](this[_0x5a90d7(0x135)],{'recursive':!![]});const _0x38b580={'version':'1.0','telemetry_url':process.env.TRIMPROMPT_TELEMETRY_URL||'','max_output_tokens':0x1388,'redaction_enabled':!![],'default_model':'claude-opus-4-8'};if(fs['existsSync'](this[_0x5a90d7(0x131)]))try{const _0x2f03d0=fs[_0x5a90d7(0x168)](this[_0x5a90d7(0x131)],_0x5a90d7(0x102));this[_0x5a90d7(0x162)]={..._0x38b580,...JSON[_0x5a90d7(0x17a)](_0x2f03d0)};}catch(_0x497ec1){this['config']=_0x38b580;}else this[_0x5a90d7(0x162)]=_0x38b580,this[_0x5a90d7(0x11c)]();!fs[_0x5a90d7(0x161)](this[_0x5a90d7(0x153)])&&fs['writeFileSync'](this['statsPath'],JSON[_0x5a90d7(0x174)]([]),'utf8');}[a0_0x4d290(0x177)](){const _0x5acbab=a0_0x4d290;return process.env.TRIMPROMPT_TELEMETRY_URL&&(this[_0x5acbab(0x162)][_0x5acbab(0x16e)]=process.env.TRIMPROMPT_TELEMETRY_URL),this[_0x5acbab(0x162)];}[a0_0x4d290(0x148)](_0x424e5f,_0x457172){const _0x2c299f=a0_0x4d290;this[_0x2c299f(0x162)][_0x424e5f]=_0x457172,this['saveConfig']();}['saveConfig'](){const _0x1d2933=a0_0x4d290;fs['writeFileSync'](this[_0x1d2933(0x131)],JSON[_0x1d2933(0x174)](this[_0x1d2933(0x162)],null,0x2),_0x1d2933(0x102));}[a0_0x4d290(0x16f)](){const _0xae4654=a0_0x4d290;try{if(!fs['existsSync'](this['statsPath']))return[];const _0x27f684=fs[_0xae4654(0x168)](this['statsPath'],_0xae4654(0x102));return JSON[_0xae4654(0x17a)](_0x27f684);}catch{return[];}}['saveLogs'](_0x47c698){const _0x36e78c=a0_0x4d290;fs[_0x36e78c(0x11b)](this['statsPath'],JSON['stringify'](_0x47c698,null,0x2),'utf8');}[a0_0x4d290(0xfd)](_0x1aebb9,_0x265dc5,_0x177c76,_0x500c2b){const _0x1232b8=a0_0x4d290,_0x36664c=this[_0x1232b8(0x16f)](),_0x201d5b=_0x265dc5[_0x1232b8(0x10e)],_0x2c9590=_0x177c76[_0x1232b8(0x10e)],_0xdf84ed=Math['ceil'](_0x201d5b/0x4),_0x54164a=Math[_0x1232b8(0x133)](_0x2c9590/0x4),_0x31b60c=Math['max'](0x0,_0xdf84ed-_0x54164a),_0x1754ed=detectSessionTool(),_0xd94a74=_0x1754ed[_0x1232b8(0x128)],_0x44e663=Math[_0x1232b8(0x10a)]()['toString'](0x24)['substring'](0x2,0xb);try{fs[_0x1232b8(0x11b)](path[_0x1232b8(0x12b)](this[_0x1232b8(0x135)],_0x44e663+_0x1232b8(0xfc)),_0x265dc5,_0x1232b8(0x102)),fs[_0x1232b8(0x11b)](path[_0x1232b8(0x12b)](this[_0x1232b8(0x135)],_0x44e663+_0x1232b8(0x138)),_0x177c76,_0x1232b8(0x102));}catch{}const _0x2b0063=_0x1aebb9[_0x1232b8(0x16b)]('\x20')[0x0]||_0x1232b8(0x116),_0xdfc62d=_0x1754ed['tool']?_0x1754ed[_0x1232b8(0x145)]?_0x1754ed[_0x1232b8(0x169)]+'-'+_0x1754ed[_0x1232b8(0x145)]+'-'+_0x2b0063:_0x1754ed[_0x1232b8(0x169)]+'-'+_0x2b0063:_0x2b0063,_0x645cf2={'id':_0x44e663,'timestamp':new Date()['toISOString'](),'command':_0xdfc62d,'raw_chars':_0x201d5b,'compressed_chars':_0x2c9590,'estimated_raw_tokens':_0xdf84ed,'estimated_compressed_tokens':_0x54164a,'tokens_saved':_0x31b60c,'model_used':_0xd94a74,'exit_code':_0x500c2b,'synced':![],'ai_detected':!!_0x1754ed[_0x1232b8(0x169)]};_0x36664c[_0x1232b8(0xfb)](_0x645cf2),this['saveLogs'](_0x36664c);const _0x5decd8=this[_0x1232b8(0x177)]()[_0x1232b8(0x16e)];return _0x5decd8&&_0x5decd8[_0x1232b8(0x124)]()['length']>0x0&&this[_0x1232b8(0x179)](),_0x645cf2;}[a0_0x4d290(0x179)](){const _0x4bd2da=a0_0x4d290;try{const _0x1c3153=path[_0x4bd2da(0x12b)](__dirname,_0x4bd2da(0x178));if(fs[_0x4bd2da(0x161)](_0x1c3153)){const _0x519022=(0x0,child_process_1[_0x4bd2da(0xf9)])(process[_0x4bd2da(0xfe)],[_0x1c3153],{'detached':!![],'stdio':_0x4bd2da(0x104)});_0x519022[_0x4bd2da(0x141)]();}}catch{}}[a0_0x4d290(0x136)](_0x34f01d='auto'){const _0x34132d=a0_0x4d290,_0x1b703a=this[_0x34132d(0x16f)]();let _0x5dd283=0x0,_0x10bfe6=0x0,_0x3d17db=0x0;for(const _0x5647d1 of _0x1b703a){_0x5dd283+=_0x5647d1[_0x34132d(0x11f)],_0x10bfe6+=_0x5647d1['estimated_compressed_tokens'],_0x3d17db+=_0x5647d1['tokens_saved'];}let _0x513722=_0x34f01d;(!_0x513722||_0x513722===_0x34132d(0x12f)||!exports['PRICING'][_0x513722])&&(_0x1b703a[_0x34132d(0x10e)]>0x0&&_0x1b703a[_0x1b703a['length']-0x1][_0x34132d(0x16c)]?_0x513722=_0x1b703a[_0x1b703a['length']-0x1][_0x34132d(0x16c)]:_0x513722=this[_0x34132d(0x177)]()[_0x34132d(0x164)]||_0x34132d(0x11e));const _0x5476c8=exports[_0x34132d(0xff)][_0x513722]||exports[_0x34132d(0xff)]['claude-3-5-sonnet'],_0x5ec739=_0x3d17db*_0x5476c8[_0x34132d(0x12a)]/0xf4240,_0x419aa3=_0x5dd283*_0x5476c8[_0x34132d(0x12a)]/0xf4240,_0x4e9bb1=_0x10bfe6*_0x5476c8['input_price_1m']/0xf4240,_0x12e91e=_0x5dd283>0x0?_0x3d17db/_0x5dd283*0x64:0x0;return{'total_raw_tokens':_0x5dd283,'total_compressed_tokens':_0x10bfe6,'total_tokens_saved':_0x3d17db,'savings_percentage':parseFloat(_0x12e91e[_0x34132d(0x146)](0x1)),'money_saved_usd':parseFloat(_0x5ec739[_0x34132d(0x146)](0x4)),'raw_cost_usd':parseFloat(_0x419aa3['toFixed'](0x4)),'compressed_cost_usd':parseFloat(_0x4e9bb1[_0x34132d(0x146)](0x4)),'model_name':_0x5476c8[_0x34132d(0x114)],'model_key':_0x513722};}}exports[a0_0x4d290(0x154)]=Tracker,exports[a0_0x4d290(0x14d)]=new Tracker();
|