gemit-cli 2.0.0 → 2.1.2
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/dist-secure/aiPrompts.js +1 -1
- package/dist-secure/cli-version.js +1 -1
- package/dist-secure/commands/add.js +1 -1
- package/dist-secure/commands/branch.js +1 -1
- package/dist-secure/commands/changelog.js +1 -1
- package/dist-secure/commands/commit.js +1 -1
- package/dist-secure/commands/config.js +1 -1
- package/dist-secure/commands/ignore.js +1 -1
- package/dist-secure/commands/log.js +1 -1
- package/dist-secure/commands/pr.js +1 -1
- package/dist-secure/commands/prompts.js +1 -1
- package/dist-secure/commands/release.js +1 -1
- package/dist-secure/commands/review.js +1 -1
- package/dist-secure/commands/squash.js +1 -1
- package/dist-secure/commands/stash.js +1 -1
- package/dist-secure/commands/undo.js +1 -1
- package/dist-secure/config.js +1 -1
- package/dist-secure/git.js +1 -1
- package/dist-secure/index.js +1 -1
- package/dist-secure/llm.js +1 -1
- package/dist-secure/prompts.js +1 -1
- package/dist-secure/ui.js +1 -1
- package/dist-secure/update.js +1 -1
- package/package.json +1 -1
package/dist-secure/aiPrompts.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x12a5b6=_0x5b40;function _0x5b40(_0x29594e,_0x4eb404){_0x29594e=_0x29594e-0xdc;const _0x553518=_0x21d4();let _0x876ffb=_0x553518[_0x29594e];return _0x876ffb;}(function(_0x1ad393,_0x5be014){const _0x62468f=_0x5b40,_0x20d95f=_0x1ad393();while(!![]){try{const _0x40f9b2=-parseInt(_0x62468f(0x176))/0x1+-parseInt(_0x62468f(0xfa))/0x2*(-parseInt(_0x62468f(0x182))/0x3)+parseInt(_0x62468f(0x1b2))/0x4*(parseInt(_0x62468f(0x190))/0x5)+-parseInt(_0x62468f(0x118))/0x6*(parseInt(_0x62468f(0xfd))/0x7)+parseInt(_0x62468f(0x19c))/0x8*(-parseInt(_0x62468f(0x1a7))/0x9)+-parseInt(_0x62468f(0x158))/0xa+parseInt(_0x62468f(0x193))/0xb;if(_0x40f9b2===_0x5be014)break;else _0x20d95f['push'](_0x20d95f['shift']());}catch(_0x1f8fbd){_0x20d95f['push'](_0x20d95f['shift']());}}}(_0x21d4,0xcaf32));const _0x58e331=(function(){let _0x1ecad7=!![];return function(_0x86827f,_0x210d20){const _0x574878=_0x1ecad7?function(){const _0xe5b7fb=_0x5b40;if(_0x210d20){const _0x22db9c=_0x210d20[_0xe5b7fb(0x123)](_0x86827f,arguments);return _0x210d20=null,_0x22db9c;}}:function(){};return _0x1ecad7=![],_0x574878;};}()),_0x876ffb=_0x58e331(this,function(){const _0x128bf7=_0x5b40,_0x16fe93={'SoFvQ':_0x128bf7(0x11f)+_0x128bf7(0x11c)};return _0x876ffb['toString']()[_0x128bf7(0x13f)](_0x16fe93[_0x128bf7(0xe0)])['toString']()['construc'+_0x128bf7(0xfb)](_0x876ffb)[_0x128bf7(0x13f)](_0x16fe93[_0x128bf7(0xe0)]);});function _0x21d4(){const _0x1e8af8=['ulOsz','ng\x20conte','glish\x0a\x0aD','XZjVY','ikely\x20ty','ts):\x0a{{c','mmits\x22\x20c','ch_data}','pe\x20unles','50bjvzWR',')\x0a-\x20Incl','QUtQQ','24406855iMtgaT','o\x20histor','XHWXa','\x20GitHub\x20','psTjn','jwayj','ido\x0a\x0aCon','ength:\x205','test\x0a-\x20M','1172776uLZKjl','cplfP','\x20explana','utf8','it_limit','jetiva\x0a-','summary}','glish\x20(m','nt\x20for\x20a','e\x20mudanc','ta\x20com\x20b','63kdTdIp','elow,\x20cr','\x0aRespond','les:\x0a-\x20S','prompts','ars)\x0a-\x20A','ecao\x20\x22Co','\x20Respond','a\x20em\x20por','tulo,\x20re','as\x0a\x0aHist','397144whOGgf','branch','(Feature','commit','ry,\x20Chan','hort\x20sum','Wcgsd','story}}','\x20context','A\x20concis','sivel\x0a-\x20','re\x20descr',':\x0a{{bran','ch.\x0aRegr','.config',':\x20{{dete','replace','\x20e\x20assun','OsXJP','ch\x20excer','log','pacto\x20te','\x20chore,\x20','SoFvQ','diff_sta','feito\x20ne','portuguê','NLkpg','pe>/<keb','ELuOP','qbcMG','Crie\x20um\x20','t}}\x0a\x0aPat','m\x20portug','.txt','que\x20foi\x20','NzMhW','gemit','nch\x20data','baixo.\x0aR','ges,\x20Tes','wn>\x0a\x0aBra','ico\x20de\x20c','gMNZJ','om\x20lista','egras:\x0a-','.\x20Título','ypes:\x20fe','WLGMa','27612YBPAdG','tor','ua\x20uma\x20s','7DGqULe','ctly\x20in\x20','gem\x20natu','s\x20eviden','s\x20{{comm','tos\x0a-\x20Na','s:\x0a-\x20For','tions\x0a\x0aS','tugues\x20d','pecific\x0a','descript','pt:\x0a{{pa','ther\x20one','cente\x20de','n\x20the\x20st','oes\x20por\x20','ibed\x20bel','texto\x20do','\x201\x20parag','WATnz','VqRkq','tuguês\x20d','ando\x20pos','cHHFT','kdown\x20co','xVdgp','hoiMR','7728564OwByxn','darwin','\x20curta\x20d','ullets\x20d','+)+$','aged\x20cha','kKzGX','(((.+)+)','ort','LE:\x20<tit','tch}}','apply','he\x20featu','ranch\x20na','ax\x2072\x20ch','to\x20e\x20sec','0\x20charac','platform','ykNNX','You\x20are\x20','Library','win32','\x20clear\x20m','QMicx','h\x20data\x20b','scriptio','TFxkS','eate:\x0a-\x20','se\x20and\x20s','llowed\x20t','turn\x20exa','\x20branch:','\x0a-\x20Estru','RdzUa','mat:\x20<ty','e}}\x0a-\x20Us','taged_fi','aximum\x20l','stat:\x0a{{','search','\x20e\x20descr','cnico\x20qu','e\x20format','yFrMY','this\x20for','ow.\x0aRule','PLmmk','tional\x20C','IquZS','RIPTION:','LOVtc','o\x20Brasil',':\x20<type>','\x20fora\x20do','push','DEdwU','mudanca\x20','ipais\x20mu','he\x20branc','\x20commits','ues\x20do\x20B','e\x20hashes','toLowerC','s,\x20Chore','902300LVPYnB','gly\x20sugg','BrFbt','CHANGELO','le>\x0aDESC',',\x20withou','dancas\x0a-','\x20English','Pull\x20Req','trim','orico\x20re','n}}','\x20ONLY\x20th','(optiona','ommit_hi','changelo','}\x0a\x0aDiff\x20','rJhzF','fgqPi','.gemit','uest.\x0aBa','ab-case-','to\x20+\x20lis','\x20section','ct\x20conci','Nao\x20inve','nges.\x0aRu','ce\x20stron','Write\x20on','fUXOZ','169164yJiGPV','e\x20lingua','Resuma\x20e','\x20message','at,\x20fix,','Applicat','ommit\x20me','h_contex','tura:\x20ti','e\x20Conven','escripti','ors,\x20Doc','42KMvHNl','Muwey','nte\x20nada','taged\x20fi','ters\x0a-\x20R'];_0x21d4=function(){return _0x1e8af8;};return _0x21d4();}_0x876ffb();import{existsSync,mkdirSync,readFileSync,writeFileSync}from'fs';import{homedir}from'os';import{join}from'path';export const PROMPT_NAMES=[_0x12a5b6(0x1b5),_0x12a5b6(0x1b3),'pr',_0x12a5b6(0x167)+'g',_0x12a5b6(0xdd)];export const DEFAULT_PROMPTS={'commit':_0x12a5b6(0x174)+_0x12a5b6(0x17f)+_0x12a5b6(0x147)+_0x12a5b6(0x17c)+'ssage\x20in'+_0x12a5b6(0x15f)+'\x20based\x20o'+_0x12a5b6(0x10b)+_0x12a5b6(0x11d)+_0x12a5b6(0x172)+_0x12a5b6(0x1aa)+'tart\x20wit'+'h\x20this\x20l'+_0x12a5b6(0x18b)+_0x12a5b6(0x18f)+_0x12a5b6(0x100)+_0x12a5b6(0x173)+_0x12a5b6(0x159)+'ests\x20ano'+_0x12a5b6(0x109)+_0x12a5b6(0x1c1)+'cted_typ'+_0x12a5b6(0x13b)+_0x12a5b6(0x142)+_0x12a5b6(0x14c)+_0x12a5b6(0x165)+'l-scope)'+':\x20<subje'+'ct>\x0a-\x20Ke'+'ep\x20subje'+_0x12a5b6(0x170)+_0x12a5b6(0x134)+_0x12a5b6(0x106)+'-\x20Return'+_0x12a5b6(0x164)+'e\x20commit'+_0x12a5b6(0x179)+_0x12a5b6(0x15d)+'t\x20code\x20f'+'ences\x20or'+_0x12a5b6(0x19e)+_0x12a5b6(0x104)+_0x12a5b6(0x185)+'les:\x0a{{s'+_0x12a5b6(0x13c)+'les}}\x0a\x0aS'+_0x12a5b6(0x1b7)+'mary:\x0a{{'+_0x12a5b6(0x1a2)+_0x12a5b6(0x168)+_0x12a5b6(0x13e)+_0x12a5b6(0xe1)+_0x12a5b6(0xe9)+_0x12a5b6(0xdc)+_0x12a5b6(0x108)+_0x12a5b6(0x122),'branch':'Generate'+'\x20a\x20git\x20b'+_0x12a5b6(0x125)+'me\x20for\x20t'+_0x12a5b6(0x124)+_0x12a5b6(0x1bd)+_0x12a5b6(0x10d)+_0x12a5b6(0x145)+_0x12a5b6(0x103)+_0x12a5b6(0x13a)+_0x12a5b6(0xe5)+_0x12a5b6(0x16d)+_0x12a5b6(0x107)+'ion>\x0a-\x20A'+_0x12a5b6(0x135)+_0x12a5b6(0xf8)+_0x12a5b6(0x17a)+_0x12a5b6(0xdf)+'docs,\x20re'+'factor,\x20'+_0x12a5b6(0x19b)+_0x12a5b6(0x13d)+_0x12a5b6(0x19a)+_0x12a5b6(0x128)+_0x12a5b6(0x186)+'eturn\x20ON'+'LY\x20the\x20b'+_0x12a5b6(0x125)+'me\x20in\x20En'+_0x12a5b6(0x189)+_0x12a5b6(0x180)+'on:\x0a{{de'+_0x12a5b6(0x131)+_0x12a5b6(0x163),'pr':_0x12a5b6(0x12b)+'generati'+_0x12a5b6(0x188)+_0x12a5b6(0x1a4)+_0x12a5b6(0x196)+_0x12a5b6(0x160)+_0x12a5b6(0x16c)+'sed\x20on\x20t'+_0x12a5b6(0x152)+_0x12a5b6(0x130)+_0x12a5b6(0x1a8)+_0x12a5b6(0x133)+_0x12a5b6(0x1bb)+'e\x20PR\x20tit'+'le\x20in\x20En'+_0x12a5b6(0x1a3)+_0x12a5b6(0x126)+_0x12a5b6(0x1ac)+_0x12a5b6(0x12e)+'arkdown\x20'+_0x12a5b6(0x107)+'ion\x20with'+_0x12a5b6(0x16f)+'s:\x20Summa'+_0x12a5b6(0x1b6)+_0x12a5b6(0xf1)+'ting\x0a\x0aRe'+_0x12a5b6(0x136)+_0x12a5b6(0xfe)+_0x12a5b6(0x144)+'mat:\x0aTIT'+_0x12a5b6(0x121)+_0x12a5b6(0x15c)+_0x12a5b6(0x149)+'\x0a<markdo'+_0x12a5b6(0xf2)+_0x12a5b6(0xef)+_0x12a5b6(0x1be)+_0x12a5b6(0x18e)+'}','changelog':_0x12a5b6(0xe8)+_0x12a5b6(0x15b)+'G\x20em\x20mar'+_0x12a5b6(0x115)+'m\x20base\x20n'+_0x12a5b6(0x194)+_0x12a5b6(0xf3)+'ommits\x20a'+_0x12a5b6(0xf0)+_0x12a5b6(0xf6)+_0x12a5b6(0x1ae)+_0x12a5b6(0x1af)+_0x12a5b6(0x105)+_0x12a5b6(0x14b)+_0x12a5b6(0x138)+_0x12a5b6(0x17e)+_0x12a5b6(0x1b0)+'sumo\x20cur'+_0x12a5b6(0x127)+_0x12a5b6(0x10c)+'tipo\x20de\x20'+_0x12a5b6(0x150)+_0x12a5b6(0x1b4)+'s,\x20Fixes'+',\x20Refact'+_0x12a5b6(0x181)+_0x12a5b6(0x157)+_0x12a5b6(0x191)+_0x12a5b6(0xfc)+_0x12a5b6(0x1ad)+_0x12a5b6(0x18d)+_0x12a5b6(0xf5)+_0x12a5b6(0x11a)+_0x12a5b6(0x155)+_0x12a5b6(0x1c3)+_0x12a5b6(0x102)+'o\x20invent'+_0x12a5b6(0x1a5)+_0x12a5b6(0x1b1)+_0x12a5b6(0x162)+_0x12a5b6(0x10a)+_0x12a5b6(0x153)+'\x20(ultimo'+_0x12a5b6(0x101)+_0x12a5b6(0x1a0)+'}}\x20commi'+_0x12a5b6(0x18c)+_0x12a5b6(0x166)+_0x12a5b6(0x1b9),'log':_0x12a5b6(0x178)+_0x12a5b6(0xea)+_0x12a5b6(0x154)+'rasil\x20o\x20'+_0x12a5b6(0xec)+_0x12a5b6(0xe2)+'ste\x20bran'+_0x12a5b6(0x1bf)+'as:\x0a-\x20Us'+_0x12a5b6(0x177)+_0x12a5b6(0xff)+'ral\x20e\x20ob'+_0x12a5b6(0x1a1)+_0x12a5b6(0x10f)+'rafo\x20cur'+_0x12a5b6(0x16e)+_0x12a5b6(0x1a6)+_0x12a5b6(0x11b)+'as\x20princ'+_0x12a5b6(0x151)+_0x12a5b6(0x15e)+'\x20Cite\x20im'+_0x12a5b6(0xde)+_0x12a5b6(0x141)+_0x12a5b6(0x113)+_0x12a5b6(0x1bc)+_0x12a5b6(0x171)+_0x12a5b6(0x184)+_0x12a5b6(0x14d)+_0x12a5b6(0x1ba)+'o\x20fornec'+_0x12a5b6(0x199)+_0x12a5b6(0x10e)+_0x12a5b6(0x137)+'\x0a{{branc'+_0x12a5b6(0x17d)+'t}}'};export function getPromptsDir(){const _0x2a649e=_0x12a5b6,_0x539e99={'rJhzF':function(_0x1b99bb,_0x2e3dee){return _0x1b99bb===_0x2e3dee;},'qbcMG':_0x2a649e(0x12d),'NLkpg':function(_0x5d4702,_0x4e7faa,_0xe7805c,_0x678485){return _0x5d4702(_0x4e7faa,_0xe7805c,_0x678485);},'fgqPi':function(_0x611c34,_0x57d001,_0x221f5e){return _0x611c34(_0x57d001,_0x221f5e);},'psTjn':function(_0x107206){return _0x107206();},'XHWXa':_0x2a649e(0xee),'fUXOZ':_0x2a649e(0x1ab),'WLGMa':'JluWp','okGMO':'TBoRs','QUtQQ':function(_0x1a408b,_0x46a829,_0x53ee19,_0x550dbc,_0x3d60a2,_0x5755d6){return _0x1a408b(_0x46a829,_0x53ee19,_0x550dbc,_0x3d60a2,_0x5755d6);},'fDBuL':_0x2a649e(0x12c),'RdzUa':'Applicat'+'ion\x20Supp'+'ort','BrFbt':_0x2a649e(0x1c0)};if(_0x539e99[_0x2a649e(0x169)](process[_0x2a649e(0x129)],_0x539e99[_0x2a649e(0xe7)]))return _0x539e99[_0x2a649e(0xe4)](join,process.env.APPDATA||_0x539e99[_0x2a649e(0x16a)](join,_0x539e99[_0x2a649e(0x197)](homedir),_0x2a649e(0x16b)),_0x539e99['XHWXa'],_0x539e99[_0x2a649e(0x175)]);if(process[_0x2a649e(0x129)]===_0x2a649e(0x119)){if(_0x539e99[_0x2a649e(0xf9)]!==_0x539e99['okGMO'])return _0x539e99[_0x2a649e(0x192)](join,homedir(),_0x539e99['fDBuL'],_0x539e99[_0x2a649e(0x139)],_0x539e99[_0x2a649e(0x195)],_0x539e99[_0x2a649e(0x175)]);else _0x4771ba=_0x57a3e6[_0x5a248e];}return _0x539e99[_0x2a649e(0xe4)](join,process.env.XDG_CONFIG_HOME||join(_0x539e99['psTjn'](homedir),_0x539e99[_0x2a649e(0x15a)]),_0x539e99['XHWXa'],_0x2a649e(0x1ab));}const LANGUAGE_INSTRUCTIONS={'pt-br':{'commit':'\x0aRespond'+_0x12a5b6(0x1af)+'tuguês\x20d'+_0x12a5b6(0x14b)+'.','branch':_0x12a5b6(0x1a9)+_0x12a5b6(0x1af)+_0x12a5b6(0x112)+_0x12a5b6(0x14b)+'.','pr':_0x12a5b6(0x1a9)+_0x12a5b6(0x1af)+_0x12a5b6(0x112)+_0x12a5b6(0x14b)+_0x12a5b6(0xf7)+_0x12a5b6(0x140)+'ição\x20em\x20'+_0x12a5b6(0xe3)+'s.'}};export function loadPrompt(_0x39abe8){const _0x190441=_0x12a5b6,_0x2cb538={'NzMhW':function(_0x193a75){return _0x193a75();},'WATnz':function(_0x94218e,_0x424420,_0x36e42a){return _0x94218e(_0x424420,_0x36e42a);},'yDHxZ':function(_0x3f7cda,_0x44d202){return _0x3f7cda(_0x44d202);},'gMNZJ':function(_0x8b2e22,_0x32702d,_0x504961){return _0x8b2e22(_0x32702d,_0x504961);},'XZjVY':'utf8','cHHFT':function(_0x4125f1,_0x1026a6){return _0x4125f1+_0x1026a6;},'kKzGX':function(_0x59da3f,_0x3b7e01,_0x5d1641,_0x1d2261){return _0x59da3f(_0x3b7e01,_0x5d1641,_0x1d2261);},'cplfP':_0x190441(0xee),'ekTSH':_0x190441(0x1ab),'Muwey':function(_0x946b9c){return _0x946b9c();},'PLmmk':function(_0xe10d7b,_0x2ecaa2){return _0xe10d7b!==_0x2ecaa2;},'ELuOP':_0x190441(0x116),'DzlDt':_0x190441(0x1b8)},_0x94b031=_0x2cb538[_0x190441(0x183)](getPromptsDir),_0x4e84b0=_0x2cb538[_0x190441(0x110)](join,_0x94b031,_0x39abe8+'.txt');let _0x597b31;if(existsSync(_0x4e84b0)){if(_0x2cb538[_0x190441(0x146)](_0x2cb538[_0x190441(0xe6)],_0x2cb538['ELuOP'])){const _0x1218c6=_0x2cb538[_0x190441(0xed)](_0x20942d),_0x3dc528=_0x2cb538[_0x190441(0x110)](_0x3ef01d,_0x1218c6,_0x30100c+_0x190441(0xeb));let _0x5f1efe;if(_0x2cb538['yDHxZ'](_0x517627,_0x3dc528)){const _0x3a819c=_0x2cb538[_0x190441(0xf4)](_0x171278,_0x3dc528,_0x2cb538[_0x190441(0x18a)])[_0x190441(0x161)]();_0x5f1efe=_0x3a819c||_0xea525d[_0x155244];}else _0x5f1efe=_0x5abf1f[_0x45a8dd];const _0x16e5c8=(_0x34a537.env.GEMIT_LANGUAGE||'en')[_0x190441(0x156)+'ase']()['trim'](),_0x6c87f4=_0x196742[_0x16e5c8];return _0x6c87f4?.[_0x2ab16f]&&(_0x5f1efe=_0x2cb538[_0x190441(0x114)](_0x5f1efe,_0x6c87f4[_0x27e9b8])),_0x5f1efe;}else{const _0x2f76ef=readFileSync(_0x4e84b0,_0x2cb538[_0x190441(0x18a)])[_0x190441(0x161)]();_0x597b31=_0x2f76ef||DEFAULT_PROMPTS[_0x39abe8];}}else _0x597b31=DEFAULT_PROMPTS[_0x39abe8];const _0x133e20=(process.env.GEMIT_LANGUAGE||'en')[_0x190441(0x156)+'ase']()[_0x190441(0x161)](),_0x5cd199=LANGUAGE_INSTRUCTIONS[_0x133e20];if(_0x5cd199?.[_0x39abe8]){if(_0x190441(0x1b8)!==_0x2cb538['DzlDt'])return lpcJwl[_0x190441(0x11e)](_0x3413d2,_0x2ea218.env.APPDATA||lpcJwl[_0x190441(0xf4)](_0x4bd0a5,lpcJwl[_0x190441(0xed)](_0x241f59),_0x190441(0x16b)),lpcJwl[_0x190441(0x19d)],lpcJwl['ekTSH']);else _0x597b31=_0x2cb538['cHHFT'](_0x597b31,_0x5cd199[_0x39abe8]);}return _0x597b31;}export function interpolate(_0x31a8dd,_0x585373){const _0x564003=_0x12a5b6;return _0x31a8dd[_0x564003(0x1c2)](/\{\{(\w+)\}\}/g,(_0x132b3c,_0x5e9f2f)=>_0x585373[_0x5e9f2f]??'{{'+_0x5e9f2f+'}}');}export function initGlobalPrompts(_0x53ffe3=![]){const _0x3188a2=_0x12a5b6,_0xdbb249={'TFxkS':function(_0x28143c,_0x413224,_0x3351a2,_0x5602c2,_0x5f293a,_0x5e7618){return _0x28143c(_0x413224,_0x3351a2,_0x5602c2,_0x5f293a,_0x5e7618);},'QMicx':function(_0x1cb613){return _0x1cb613();},'hoiMR':'Library','ulOsz':_0x3188a2(0xee),'VqRkq':function(_0x51623f,_0x297ffb){return _0x51623f!==_0x297ffb;},'LOVtc':_0x3188a2(0x14f),'OsXJP':function(_0x2b822d,_0x14fa8a,_0x136a79){return _0x2b822d(_0x14fa8a,_0x136a79);},'IquZS':function(_0x13a350,_0x22a1c2){return _0x13a350(_0x22a1c2);},'jwayj':function(_0x285601,_0x513747,_0x215ac3,_0x3d3a53){return _0x285601(_0x513747,_0x215ac3,_0x3d3a53);},'ykNNX':_0x3188a2(0x19f)},_0x2e89f1=_0xdbb249[_0x3188a2(0x12f)](getPromptsDir);mkdirSync(_0x2e89f1,{'recursive':!![]});const _0x93aa7a=[];for(const _0x5c45ab of PROMPT_NAMES){if(_0xdbb249[_0x3188a2(0x111)](_0x3188a2(0x143),_0xdbb249[_0x3188a2(0x14a)])){const _0x261a20=_0xdbb249[_0x3188a2(0x1c4)](join,_0x2e89f1,_0x5c45ab+_0x3188a2(0xeb));(!_0xdbb249[_0x3188a2(0x148)](existsSync,_0x261a20)||_0x53ffe3)&&(_0xdbb249[_0x3188a2(0x198)](writeFileSync,_0x261a20,DEFAULT_PROMPTS[_0x5c45ab]+'\x0a',_0xdbb249[_0x3188a2(0x12a)]),_0x93aa7a[_0x3188a2(0x14e)](_0x261a20));}else return ZzHyAL[_0x3188a2(0x132)](_0x7f8c50,ZzHyAL[_0x3188a2(0x12f)](_0x3a6de7),ZzHyAL[_0x3188a2(0x117)],_0x3188a2(0x17b)+'ion\x20Supp'+_0x3188a2(0x120),ZzHyAL[_0x3188a2(0x187)],'prompts');}return _0x93aa7a;}
|
|
1
|
+
const _0x4e3fc1=_0x4aa0;(function(_0x3dfb0b,_0x41799c){const _0x57893e=_0x4aa0,_0x1dfb2c=_0x3dfb0b();while(!![]){try{const _0x304984=-parseInt(_0x57893e(0x270))/0x1*(parseInt(_0x57893e(0x247))/0x2)+-parseInt(_0x57893e(0x138))/0x3*(parseInt(_0x57893e(0x143))/0x4)+-parseInt(_0x57893e(0x200))/0x5+-parseInt(_0x57893e(0x292))/0x6+-parseInt(_0x57893e(0x20a))/0x7+-parseInt(_0x57893e(0x1e1))/0x8+parseInt(_0x57893e(0x197))/0x9;if(_0x304984===_0x41799c)break;else _0x1dfb2c['push'](_0x1dfb2c['shift']());}catch(_0x356f3b){_0x1dfb2c['push'](_0x1dfb2c['shift']());}}}(_0x53ef,0xd1f00));const _0x44ebb6=(function(){const _0x2e3af3=_0x4aa0,_0x2d9019={'KVyFz':function(_0x551585){return _0x551585();},'uWpNT':_0x2e3af3(0x217),'LuUZU':'lBytZ','vTxGB':'eKoEc'};let _0x2eb835=!![];return function(_0xb138b,_0x561235){const _0x548db0=_0x2e3af3,_0x29c773={'pkCtf':function(_0x153fa2){const _0x4afe1c=_0x4aa0;return _0x2d9019[_0x4afe1c(0x191)](_0x153fa2);},'mhHAL':function(_0x12e3e5,_0x3e89be){return _0x12e3e5(_0x3e89be);},'ZiaZx':_0x2d9019[_0x548db0(0x1c3)],'HeKTZ':_0x2d9019['LuUZU'],'fwrJu':_0x2d9019['vTxGB']},_0x516172=_0x2eb835?function(){const _0x5e1c11=_0x548db0;if(_0x561235){if(_0x29c773['HeKTZ']!==_0x29c773['fwrJu']){const _0x1fc515=_0x561235['apply'](_0xb138b,arguments);return _0x561235=null,_0x1fc515;}else{const _0xadae59=_0x29c773[_0x5e1c11(0x121)](_0x12908b);_0x23794b(_0xadae59,{'recursive':!![]});const _0x21cd76=[];for(const _0x50afb6 of _0x10978a){const _0x2b303b=_0x5ddfce(_0xadae59,_0x50afb6+_0x5e1c11(0x1e0));(!_0x29c773[_0x5e1c11(0x2bd)](_0x30e61c,_0x2b303b)||_0x29cda9)&&(_0x3281c5(_0x2b303b,_0x51839c[_0x50afb6]+'\x0a',_0x29c773[_0x5e1c11(0x117)]),_0x21cd76['push'](_0x2b303b));}return _0x21cd76;}}}:function(){};return _0x2eb835=![],_0x516172;};}()),_0x532092=_0x44ebb6(this,function(){const _0x416d4c=_0x4aa0,_0x331055={'uvIku':'(((.+)+)'+_0x416d4c(0x174)};return _0x532092['toString']()[_0x416d4c(0x26b)](_0x331055[_0x416d4c(0x2a6)])['toString']()[_0x416d4c(0x258)+_0x416d4c(0x293)](_0x532092)[_0x416d4c(0x26b)](_0x331055[_0x416d4c(0x2a6)]);});_0x532092();import{existsSync,mkdirSync,readFileSync,writeFileSync}from'fs';import{homedir}from'os';import{join}from'path';function _0x4aa0(_0xbf59fb,_0x1050cd){_0xbf59fb=_0xbf59fb-0xff;const _0xbabf33=_0x53ef();let _0x532092=_0xbabf33[_0xbf59fb];return _0x532092;}function _0x53ef(){const _0x2f4267=['unções\x20e','naming\x20a','OBjMK','build,\x20c','ub\x20Pull\x20','y\x20the\x20ch','itespace','ades\x20exi','\x20curto\x20(','ary\x20modu','le\x20(max\x20','ling\x0a\x20\x20\x20','\x0a{{descr','ve\x20from\x20','owing\x20th','me,\x20no\x20e','2–4\x20fras','i,\x20ui,\x20d','):\x20deriv','ontinuad','.txt','302568hzyfJa','platform','\x0aRespond','indicate','o\x20que\x20fo','release/','commit','s\x20genéri','adds\x20or\x20','seção\x20##','\x0a\x20\x20\x20\x20###','rico\x20rec','gelog.co','mit;\x20não','portuguê','ters\x0a-\x20R','uction\x20f','1.\x20Uma\x20f','\x0a\x20\x20\x20\x20cho','staged_f','\x20versão\x20','stentes\x0a','\x0a\x20\x20\x20\x20tes','\x20assunto','ependenc','s\x20a\x20diff','o\x0a-\x20Não\x20','\x20Maximum','\x0a{{commi','contexto','mit\x20hist','6137230FzVpqS','\x0a-\x20Be\x20sp','o\x20contex','flect\x20it','egras:\x0a-','des\x20marc','factor\x20–','\x20bugfix\x20','\x20–\x20new\x20c','a\x20senior','10905146WUNrEV','Request\x20','feat\x20\x20\x20\x20','onfig,\x20d','o\x20invent','s\x20in\x20keb','fix\x20to\x20b','\x20(use\x20on','-\x20Derive','o\x20Brasil','\x20when\x20re','2–5\x20word','ora\x20do\x20c','utf8','e)\x0a-\x20Sco','cription','\x20\x20\x203.\x20Li','efer\x20evi','\x20Git\x20bra','for\x20a\x20Gi','\x0aDESCRIP','adas\x20do\x20','TION:\x0a##','#\x20Commit','}}\x0a\x0aDiff','name\x20the','ist\x20of\x20c','correçõe','ame\x20pref','s\x0a-\x20Retu','t\x20messag','title\x20an','entional','iption:\x20','ranch\x20Gi','\x20hashes\x20','rutura\x20o','s\x20como\x20c','update\x22,','g\x20a\x20GitH','gelog\x20(h','branch','Staged\x20f','egressio','–\x20format','r\x20domain','.gemit','##\x20Adici','rne\x20apen','ic\x20chang','he\x20commi','he\x20diff\x20','en\x20they\x20','\x20affecte','extra\x20co','use\x20as\x20m','lnerabil','auth,\x20ap','branch\x20d','##\x20[Unre','ion\x20ment','757902VrGhZU','\x20modules','ayNuU',':\x0a-\x20Form','inclua\x20c','código;\x20','ionalida','idades\x0a-','n\x0a\x20\x20\x20\x20re','vzXeY','incipais','\x20Commit\x20','paration','rive\x20fro','do\x20branc','\x20perf\x20\x20\x20',':\x20qual\x20e','construc','etected_','eturn\x20ON','w,\x20produ','t\x20e\x20das\x20','ce\x20a\x20PR\x20','trada:\x20f','pository','HXktY','detectad','clearly\x20','ng\x0a\x20\x20\x20\x20d','eepachan','\x20profiss','ta,\x20impe','\x20\x20\x20\x20feat','apabilit','iption}}','ength:\x205','search','descript','ion\x20only','mmentary','\x20steps\x20—','2CRExSW','Format:\x20','onado\x20\x20\x20','rn\x20ONLY\x20','message\x20','\x20Alterad','###\x20Desc','formance','n\x20and\x20de','eature,\x20','\x20over\x20co','t_histor','s,\x20tooli','pe:\x20deri','ipo\x20do\x20b','r\x20releas','\x20or\x20func','cise\x20des','rifiable','LuLQk',',\x20no\x20fil','ehavior\x20','entado\x0a\x20','dence\x20fr','.config','ocs\x20\x20\x20\x20\x20','tyle\x20\x20\x20\x20','only\x20whe','sem\x20pont','ia:\x0a\x20\x20\x20\x20','ile\x20name','win32','nch_cont','\x20type\x20fr','1610298JiuPzQ','tor','om\x20the\x20c','ttps://k','\x20not\x20gen','kdown,\x20s','pe:\x0a\x20\x20\x20\x20','o\x20final\x0a','onclusõe','nte\x0a-\x20Nã','ure/,\x20bu','\x20in\x20impe','diff\x20sta','\x20enginee','a}}','\x20portugu','m\x20engenh','corrects','vos\x20ou\x20f','to\x20verif','uvIku','ting,\x20wh','ent\x20prod','s\x20com\x20os','\x20correçõ','s\x20as\x20que','rete,\x20ve','hore\x20\x20\x20\x20','ing\x0a-\x20Su','elop\x0a\x20\x20\x20','w\x20branch','ua\x20apena','tions\x20mo','HANGELOG','le,\x20dire','\x20Seguran','ullets\x20c','e>:\x20<con','leased]\x20','bject:\x20i','vior\x0a\x20\x20\x20','ra\x20o\x20obj','c\x20and\x20me','mhHAL','erent\x20ty','ith\x20no\x20b','timos\x20{{','replace','nmIcF','gemit','rase\x20de\x20','HJgaE','ab-case,','\x20de\x20comm','ecific:\x20','e\x20branch','ure\x20\x20–\x20n','stá\x20pron','r\x20writin','drão\x20Kee','iles:\x0a{{','se-descr','\x20mudança','s\x20em\x20fun','f\x20or\x20com','ntation\x20','72\x20chars','\x20by\x20area','Library','otfix/,\x20','revendo\x20','ntences\x20','AHXzV','tual\x20dif','es\x20de\x20vu','ler\x20word','tures\x20co','rative\x20m','rFRqM','\x0a\x0a##\x20Cha','ique\x20o\x20t','to\x20para\x20','ersion\x20o','change\x0a\x20','into\x20mai','push','r\x20–\x20code','prompts','tFlow\x20re','\x20entrada','ta:\x0a{{br','\x20tests\x0a\x20','\x20on\x20the\x20','ions\x20a\x20v','\x20stat:\x0a{','g\x20a\x20Conv','ZiaZx','\x20e\x20descr','\x20\x20\x20\x20–\x20te','e\x20mood,\x20','down\x20bod','unless\x20t','\x20Summary','ange\x20is\x20','om\x20the\x20n','rects\x20a\x20','pkCtf','cklist\x20o','e,\x20no\x20tr','t\x20\x20\x20\x20\x20–\x20','e\x20nada\x20f','s\x20de\x20com','0\x20charac','dicionai','e\x20módulo','cações\x20a','f\x20—\x20do\x20n','ules:\x0a-\x20','ode\x20diff','curtos\x20e','ly\x20when\x20','ies,\x20too','only\x0a\x20\x20\x20','lleted\x20l','re\x20\x20\x20\x20–\x20','i\x20implem','\x20ci\x20\x20\x20\x20\x20','hotfix,\x20','s\x0a-\x20Incl','3636UmfqPY','e\x20GitFlo','\x0a-\x20Descr','type}}\x22\x20','D\x20pipeli','LY\x20the\x20b','Applicat','e>):\x20<su','ior\x20resu','\x20behavio','it\x20apena','2664tLpiLa','nges\x0a<bu','#\x20Removi','\x0a-\x20Retur','M-DD\x20(ou','release)','the\x20prim','\x20merged\x20','\x0a<1–3\x20se','alidades','ints\x20onl','eçalho:\x20','UtVqE','ata\x20belo','nalidade','ction:\x20l','changes,','iles}}\x0a\x0a','ado\x20para','Você\x20é\x20u','d\x20a\x20mark','t\x20scope\x20','s\x20de\x20bug','at:\x20<typ','a\x20em\x20por','qaRgM','—\x20YYYY-M','tFlow\x20em','ailing\x20p','bject>\x0a-','ça\x20\x20\x20\x20\x20–','sts\x20only','s\x20técnic','ax\x2072\x20ch','\x20invente','oss-cutt','m)\x20adapt','ontexto\x20','Corrigid','asil.\x0a\x0aR','eiro\x20sên','You\x20are\x20','\x20Start\x20w','b)\x0a\x20\x20Omi','kebab-ca','omplemen','ive\x20o\x20re','sible\x20in','ood>\x0a\x20\x20D','+)+$','p\x20a\x20Chan','do\x20\x20\x20\x20\x20\x20','\x20\x20\x20test\x20','ente\x20(úl','s:\x0a-\x20Cab','.\x0a\x0aRegra','a\x20remoçã','d\x20(e.g.\x20','klcIS','fornecid','ne\x20chang','cumentat','nation,\x20','fences\x0a\x0a','\x20–\x20novas','no\x20code\x20','cas\x20(\x22o\x20','o\x20releva','o\x20–\x20func','\x20\x20–\x20bug\x20','xplanati','eat\x20comm','\x20branch\x0a','ith\x20\x22{{d','mindo\x20o\x20','asil.\x0a\x0aS','rase\x20cur','\x20\x20\x20docs\x20','KVyFz','trim','low,\x20no\x20','m\x20the\x20ac','re\x20to\x20be','\x20\x20\x20–\x20urg','49648734PwdujB','\x20\x20\x20\x202.\x20P','velop\x0a\x20\x20','st\x20affec','arágrafo','toLowerC','sting\x20se','n\x20ONLY\x20t','tch\x20exce','mperativ','atch}}','y\x20echo\x20f','SshSi','etivo\x20do','es\x0a\x20\x20\x20\x20s','MVtaN','das\x0a\x20\x20\x20\x20','ês\x20do\x20Br','rativa,\x20','\x20Cada\x20en','\x20\x22do\x22)\x0a-','pifjG','\x20grouped','\x20\x20releas','into\x20dev','s:\x0a-\x20Tit','\x20types:\x0a','to\x0a-\x20Cit','he\x20code\x20','imit}}\x20c','ceholder',')\x0a-\x20Cate','trabalho','ranch\x20da','on\x20what\x20','\x20specifi','s\x20removi','diff\x20de\x20','\x20(no\x20log','swWhs',',\x20files,','h:\x0a{{bra','r\x20not\x20vi','ua\x20ao\x20fi','uWpNT','\x20total\x20l','y.\x0a\x0aRule','tuguês\x20d','.\x20Título','ctory,\x20o','darwin','etc.)\x0a\x0aC','anch_dat'];_0x53ef=function(){return _0x2f4267;};return _0x53ef();}export const PROMPT_NAMES=[_0x4e3fc1(0x1e7),_0x4e3fc1(0x233),'pr','changelo'+'g','log'];export const DEFAULT_PROMPTS={'commit':'You\x20are\x20'+_0x4e3fc1(0x209)+_0x4e3fc1(0x29f)+'r\x20writin'+_0x4e3fc1(0x116)+_0x4e3fc1(0x22a)+_0x4e3fc1(0x252)+_0x4e3fc1(0x274)+_0x4e3fc1(0x21d)+_0x4e3fc1(0x10f)+_0x4e3fc1(0x25f)+'.\x0a\x0aRules'+_0x4e3fc1(0x24a)+_0x4e3fc1(0x15a)+'e>(<scop'+_0x4e3fc1(0x13f)+_0x4e3fc1(0x160)+_0x4e3fc1(0x16d)+_0x4e3fc1(0x18c)+_0x4e3fc1(0x259)+_0x4e3fc1(0x13b)+_0x4e3fc1(0x11c)+_0x4e3fc1(0x23d)+_0x4e3fc1(0x262)+_0x4e3fc1(0x1e4)+_0x4e3fc1(0x1fa)+_0x4e3fc1(0x2be)+_0x4e3fc1(0x298)+_0x4e3fc1(0x20c)+_0x4e3fc1(0x208)+_0x4e3fc1(0x268)+'y\x20or\x20beh'+'avior\x0a\x20\x20'+'\x20\x20fix\x20\x20\x20'+'\x20\x20\x20–\x20cor'+_0x4e3fc1(0x120)+'bug\x20or\x20r'+_0x4e3fc1(0x235)+_0x4e3fc1(0x24f)+_0x4e3fc1(0x206)+'\x20restruc'+_0x4e3fc1(0x103)+'de\x20witho'+'ut\x20chang'+'ing\x20beha'+_0x4e3fc1(0x2ba)+_0x4e3fc1(0x256)+'\x20\x20–\x20impr'+'oves\x20per'+_0x4e3fc1(0x277)+_0x4e3fc1(0x1f7)+_0x4e3fc1(0x124)+_0x4e3fc1(0x1e9)+_0x4e3fc1(0x2a3)+_0x4e3fc1(0x112)+_0x4e3fc1(0x190)+'\x20\x20\x20\x20–\x20do'+_0x4e3fc1(0x180)+_0x4e3fc1(0x26d)+_0x4e3fc1(0x1f3)+_0x4e3fc1(0x133)+_0x4e3fc1(0x1cf)+_0x4e3fc1(0x20d)+_0x4e3fc1(0x1f9)+_0x4e3fc1(0x130)+_0x4e3fc1(0x1d7)+_0x4e3fc1(0x135)+'\x20\x20–\x20CI/C'+_0x4e3fc1(0x13c)+_0x4e3fc1(0x17f)+_0x4e3fc1(0x1a5)+_0x4e3fc1(0x28a)+_0x4e3fc1(0x236)+_0x4e3fc1(0x2a7)+_0x4e3fc1(0x1d2)+_0x4e3fc1(0x1bd)+_0x4e3fc1(0x23b)+_0x4e3fc1(0x218)+_0x4e3fc1(0x27d)+_0x4e3fc1(0x1d9)+_0x4e3fc1(0x149)+_0x4e3fc1(0x1d5)+_0x4e3fc1(0x2b4)+_0x4e3fc1(0x1c8)+_0x4e3fc1(0x237)+_0x4e3fc1(0x23f)+_0x4e3fc1(0x17c)+_0x4e3fc1(0x243)+_0x4e3fc1(0x1dd)+_0x4e3fc1(0x16e)+_0x4e3fc1(0x158)+_0x4e3fc1(0x28b)+'n\x20the\x20ch'+_0x4e3fc1(0x11e)+'truly\x20cr'+_0x4e3fc1(0x166)+_0x4e3fc1(0x2ae)+_0x4e3fc1(0x2b9)+_0x4e3fc1(0x1a0)+_0x4e3fc1(0x11a)+'lowercas'+_0x4e3fc1(0x123)+_0x4e3fc1(0x15f)+'eriod,\x20m'+_0x4e3fc1(0x164)+'ars\x0a\x20\x20De'+_0x4e3fc1(0x254)+_0x4e3fc1(0x194)+_0x4e3fc1(0x100)+_0x4e3fc1(0x12b)+'ot\x20simpl'+_0x4e3fc1(0x1a2)+_0x4e3fc1(0x28e)+'s\x20as\x20the'+'\x20subject'+_0x4e3fc1(0x146)+_0x4e3fc1(0x19e)+_0x4e3fc1(0x23c)+_0x4e3fc1(0x228)+'e\x20line,\x20'+'no\x20expla'+_0x4e3fc1(0x181)+_0x4e3fc1(0x184)+_0x4e3fc1(0x182)+_0x4e3fc1(0x234)+(_0x4e3fc1(0x2ce)+_0x4e3fc1(0x1f4)+_0x4e3fc1(0x154)+'Short\x20su'+'mmary:\x0a{'+'{summary'+_0x4e3fc1(0x222)+_0x4e3fc1(0x115)+'{diff_st'+'at}}\x0a\x0aPa'+_0x4e3fc1(0x19f)+'rpt:\x0a{{p'+_0x4e3fc1(0x1a1)),'branch':_0x4e3fc1(0x16c)+_0x4e3fc1(0x1cd)+_0x4e3fc1(0x21c)+'nch\x20foll'+_0x4e3fc1(0x1da)+_0x4e3fc1(0x139)+'w\x20conven'+'tion.\x0a\x0aR'+_0x4e3fc1(0x12c)+_0x4e3fc1(0x271)+'<type>/<'+_0x4e3fc1(0x16f)+_0x4e3fc1(0x2cf)+'iption>\x0a'+'-\x20GitFlo'+_0x4e3fc1(0x2b0)+_0x4e3fc1(0x1b1)+_0x4e3fc1(0x267)+_0x4e3fc1(0x2ca)+'ew\x20featu'+_0x4e3fc1(0x195)+'\x20merged\x20'+_0x4e3fc1(0x1af)+_0x4e3fc1(0x2af)+_0x4e3fc1(0x207)+_0x4e3fc1(0x188)+_0x4e3fc1(0x210)+'e\x20merged'+'\x20into\x20de'+_0x4e3fc1(0x199)+'\x20\x20hotfix'+_0x4e3fc1(0x196)+_0x4e3fc1(0x2a8)+_0x4e3fc1(0x1f1)+'ix\x20to\x20be'+_0x4e3fc1(0x14a)+_0x4e3fc1(0x10b)+_0x4e3fc1(0x278)+'velop\x0a\x20\x20'+_0x4e3fc1(0x1ae)+'e\x20\x20–\x20rel'+'ease\x20pre'+_0x4e3fc1(0x253)+_0x4e3fc1(0x211)+_0x4e3fc1(0x12f)+_0x4e3fc1(0x26c)+_0x4e3fc1(0x246)+_0x4e3fc1(0x114)+_0x4e3fc1(0x109)+_0x4e3fc1(0x27f)+'e)\x0a\x20\x20\x20\x20c'+_0x4e3fc1(0x2ad)+'–\x20mainte'+'nance,\x20d'+_0x4e3fc1(0x1f9)+'y\x20update'+_0x4e3fc1(0x27c)+_0x4e3fc1(0x263)+_0x4e3fc1(0x289)+'–\x20docume'+_0x4e3fc1(0x2d3)+_0x4e3fc1(0x131)+'\x20refacto'+_0x4e3fc1(0x10d)+'\x20restruc'+'turing\x20w'+_0x4e3fc1(0x2bf)+_0x4e3fc1(0x285)+_0x4e3fc1(0x10a)+_0x4e3fc1(0x177)+_0x4e3fc1(0x119)+_0x4e3fc1(0x162)+_0x4e3fc1(0x13a)+_0x4e3fc1(0x22b)+_0x4e3fc1(0x215)+_0x4e3fc1(0x20f)+_0x4e3fc1(0x2c6)+_0x4e3fc1(0x1ba)+_0x4e3fc1(0x2bc)+'aningful'+_0x4e3fc1(0x284)+_0x4e3fc1(0x102)+'s\x20(e.g.\x20'+'\x22add\x22,\x20\x22'+_0x4e3fc1(0x230)+_0x4e3fc1(0x1ab)+_0x4e3fc1(0x1fc)+_0x4e3fc1(0x1c4)+_0x4e3fc1(0x26a)+_0x4e3fc1(0x127)+_0x4e3fc1(0x1f0)+_0x4e3fc1(0x25a)+_0x4e3fc1(0x13d)+'ranch\x20na'+_0x4e3fc1(0x1db)+_0x4e3fc1(0x189)+'on\x0a\x0aDesc'+'ription:'+_0x4e3fc1(0x1d8)+_0x4e3fc1(0x269),'pr':_0x4e3fc1(0x16c)+_0x4e3fc1(0x209)+'\x20enginee'+_0x4e3fc1(0x2cc)+_0x4e3fc1(0x231)+_0x4e3fc1(0x1d0)+_0x4e3fc1(0x20b)+_0x4e3fc1(0x21d)+_0x4e3fc1(0x10f)+_0x4e3fc1(0x25f)+'.\x0a\x0aBased'+_0x4e3fc1(0x113)+_0x4e3fc1(0x244)+_0x4e3fc1(0x150)+_0x4e3fc1(0x25b)+_0x4e3fc1(0x25d)+_0x4e3fc1(0x229)+_0x4e3fc1(0x157)+_0x4e3fc1(0x11b)+_0x4e3fc1(0x1c5)+_0x4e3fc1(0x1b0)+_0x4e3fc1(0x1d6)+_0x4e3fc1(0x2d4)+_0x4e3fc1(0x1de)+'e\x20from\x20t'+_0x4e3fc1(0x1b3)+'diff;\x20tr'+_0x4e3fc1(0x18a)+'it\x20messa'+'ges\x20as\x20h'+_0x4e3fc1(0x14d)+'y\x0a\x20\x20Form'+'at:\x20<typ'+_0x4e3fc1(0x2b7)+_0x4e3fc1(0x281)+_0x4e3fc1(0x219)+_0x4e3fc1(0x29d)+_0x4e3fc1(0x104)+_0x4e3fc1(0x173)+'etect\x20th'+_0x4e3fc1(0x2c9)+_0x4e3fc1(0x291)+_0x4e3fc1(0x11f)+_0x4e3fc1(0x226)+'ix\x20(feat'+_0x4e3fc1(0x29c)+'gfix/,\x20h'+_0x4e3fc1(0x2d7)+_0x4e3fc1(0x1e6)+')\x20and\x20re'+_0x4e3fc1(0x203)+_0x4e3fc1(0x201)+_0x4e3fc1(0x2c8)+_0x4e3fc1(0x223)+_0x4e3fc1(0x248)+_0x4e3fc1(0x1bf)+_0x4e3fc1(0x280)+_0x4e3fc1(0x2b2)+_0x4e3fc1(0x19a)+'ted\x0a-\x20Pr'+_0x4e3fc1(0x21b)+_0x4e3fc1(0x287)+_0x4e3fc1(0x294)+_0x4e3fc1(0x12d)+_0x4e3fc1(0x27a)+'mmit\x20mes'+'sages\x20wh'+_0x4e3fc1(0x23e)+'conflict'+'\x0a-\x20Do\x20no'+'t\x20invent'+_0x4e3fc1(0x141)+_0x4e3fc1(0x1c1)+_0x4e3fc1(0x172)+'\x20the\x20dif'+_0x4e3fc1(0x2d2)+_0x4e3fc1(0x1ff)+'ory\x0a-\x20Te'+_0x4e3fc1(0x19d)+_0x4e3fc1(0x152)+'ist\x20conc'+_0x4e3fc1(0x2ac)+_0x4e3fc1(0x282)+_0x4e3fc1(0x26f)+_0x4e3fc1(0x296)+'eric\x20pla'+_0x4e3fc1(0x1b5)+_0x4e3fc1(0x227)+_0x4e3fc1(0x273)+'the\x20stru'+'cture\x20be'+_0x4e3fc1(0x193)+_0x4e3fc1(0x240)+_0x4e3fc1(0x26e)+'\x0a\x0aTITLE:'+'\x20<title>'+_0x4e3fc1(0x21e)+_0x4e3fc1(0x220)+_0x4e3fc1(0x11d)+_0x4e3fc1(0x14b)+_0x4e3fc1(0x2d9)+_0x4e3fc1(0x1b9)+'changed\x20'+'and\x20why>'+_0x4e3fc1(0x106)+_0x4e3fc1(0x144)+_0x4e3fc1(0x132)+_0x4e3fc1(0x224)+'oncrete\x20'+_0x4e3fc1(0x153)+_0x4e3fc1(0x1ad)+_0x4e3fc1(0x2d5)+_0x4e3fc1(0x214)+'levant>\x0a'+'\x0a##\x20Test'+'ing\x0a<che'+_0x4e3fc1(0x122)+'f\x20steps\x20'+_0x4e3fc1(0x2a5)+_0x4e3fc1(0x1d1)+'ange>\x0a\x0aB'+_0x4e3fc1(0x1b8)+_0x4e3fc1(0x111)+_0x4e3fc1(0x1cb)+_0x4e3fc1(0x2a0),'changelog':_0x4e3fc1(0x156)+_0x4e3fc1(0x2a2)+'eiro\x20sên'+'ior\x20gera'+'ndo\x20um\x20C'+_0x4e3fc1(0x2b3)+_0x4e3fc1(0x265)+'ional\x20em'+_0x4e3fc1(0x2a1)+_0x4e3fc1(0x1a8)+_0x4e3fc1(0x18e)+'iga\x20o\x20pa'+_0x4e3fc1(0x2cd)+_0x4e3fc1(0x175)+_0x4e3fc1(0x232)+_0x4e3fc1(0x295)+_0x4e3fc1(0x264)+_0x4e3fc1(0x1ed)+_0x4e3fc1(0x167)+_0x4e3fc1(0x155)+'\x20GitFlow'+_0x4e3fc1(0x17a)+_0x4e3fc1(0x179)+_0x4e3fc1(0x14e)+_0x4e3fc1(0x245)+_0x4e3fc1(0x2b8)+_0x4e3fc1(0x15d)+_0x4e3fc1(0x147)+_0x4e3fc1(0x1f5)+_0x4e3fc1(0x261)+'a\x20nos\x20co'+'mmits\x20de'+'\x20release'+_0x4e3fc1(0x1b6)+'gorias\x20p'+'ermitida'+'s\x20—\x20incl'+_0x4e3fc1(0x2b1)+_0x4e3fc1(0x2ab)+'\x20tiverem'+_0x4e3fc1(0x110)+'s:\x0a\x20\x20\x20\x20#'+_0x4e3fc1(0x239)+_0x4e3fc1(0x272)+_0x4e3fc1(0x183)+'\x20funcion'+_0x4e3fc1(0x14c)+_0x4e3fc1(0x1eb)+_0x4e3fc1(0x275)+'o\x20\x20\x20\x20\x20\x20–'+_0x4e3fc1(0x2d0)+_0x4e3fc1(0x2d1)+'cionalid'+_0x4e3fc1(0x1d3)+_0x4e3fc1(0x1f6)+'\x20\x20\x20\x20###\x20'+_0x4e3fc1(0x169)+'o\x20\x20\x20\x20\x20–\x20'+_0x4e3fc1(0x225)+_0x4e3fc1(0x159)+'s\x0a\x20\x20\x20\x20##'+_0x4e3fc1(0x145)+_0x4e3fc1(0x176)+'–\x20funcio'+_0x4e3fc1(0x151)+_0x4e3fc1(0x1bb)+_0x4e3fc1(0x1a7)+_0x4e3fc1(0x276)+_0x4e3fc1(0x1df)+_0x4e3fc1(0x187)+_0x4e3fc1(0x24d)+_0x4e3fc1(0x205)+'adas\x20par'+_0x4e3fc1(0x17b)+'o\x20futura'+'\x0a\x20\x20\x20\x20###'+_0x4e3fc1(0x2b5)+_0x4e3fc1(0x161)+_0x4e3fc1(0x2aa)+_0x4e3fc1(0x101)+_0x4e3fc1(0x242)+_0x4e3fc1(0x24e)+_0x4e3fc1(0x1aa)+_0x4e3fc1(0x25e)+_0x4e3fc1(0x18f)+_0x4e3fc1(0x266)+_0x4e3fc1(0x1a9)+_0x4e3fc1(0x28c)+_0x4e3fc1(0x299)+_0x4e3fc1(0x212)+'\x20as\x20entr'+_0x4e3fc1(0x21f)+_0x4e3fc1(0x29e)+_0x4e3fc1(0x25c)+'mensagen'+_0x4e3fc1(0x126)+_0x4e3fc1(0x1ee)+_0x4e3fc1(0x165)+_0x4e3fc1(0x2d0)+_0x4e3fc1(0x137)+_0x4e3fc1(0x1c2)+'nal\x20uma\x20'+_0x4e3fc1(0x1ea)+_0x4e3fc1(0x221)+_0x4e3fc1(0x2a9)+_0x4e3fc1(0x22d)+_0x4e3fc1(0x12e)+_0x4e3fc1(0x1f8)+'s\x0a-\x20Reto'+_0x4e3fc1(0x23a)+'as\x20o\x20mar'+_0x4e3fc1(0x297)+'em\x20expli'+_0x4e3fc1(0x12a)+_0x4e3fc1(0x128)+'s\x0a\x0aHistó'+_0x4e3fc1(0x1ec)+_0x4e3fc1(0x178)+_0x4e3fc1(0x2c0)+'commit_l'+_0x4e3fc1(0x1b4)+'ommits):'+_0x4e3fc1(0x1fd)+_0x4e3fc1(0x27b)+'y}}','log':_0x4e3fc1(0x156)+_0x4e3fc1(0x2a2)+_0x4e3fc1(0x16b)+_0x4e3fc1(0x140)+_0x4e3fc1(0x18d)+_0x4e3fc1(0x1b7)+'\x20de\x20um\x20b'+_0x4e3fc1(0x22c)+_0x4e3fc1(0x15e)+_0x4e3fc1(0x2a1)+_0x4e3fc1(0x1a8)+_0x4e3fc1(0x16a)+_0x4e3fc1(0x204)+'\x20Identif'+_0x4e3fc1(0x107)+_0x4e3fc1(0x27e)+'ranch\x20(f'+_0x4e3fc1(0x279)+'bugfix,\x20'+_0x4e3fc1(0x136)+_0x4e3fc1(0x148)+'\x20pelo\x20no'+'me\x20e\x20pel'+_0x4e3fc1(0x202)+'to\x0a-\x20Est'+_0x4e3fc1(0x22e)+'brigatór'+_0x4e3fc1(0x28d)+_0x4e3fc1(0x1f2)+_0x4e3fc1(0x2c4)+_0x4e3fc1(0x1fe)+_0x4e3fc1(0x257)+_0x4e3fc1(0x2bb)+_0x4e3fc1(0x1a4)+_0x4e3fc1(0x18b)+_0x4e3fc1(0x198)+_0x4e3fc1(0x19b)+_0x4e3fc1(0x1d4)+_0x4e3fc1(0x1dc)+'es)\x20desc'+_0x4e3fc1(0x2d8)+_0x4e3fc1(0x1e5)+_0x4e3fc1(0x134)+_0x4e3fc1(0x286)+_0x4e3fc1(0x21a)+'sta\x20de\x20b'+_0x4e3fc1(0x2b6)+'om\x20as\x20pr'+_0x4e3fc1(0x251)+_0x4e3fc1(0x2d0)+_0x4e3fc1(0x163)+'as\x0a-\x20Der'+_0x4e3fc1(0x171)+'sumo\x20do\x20'+_0x4e3fc1(0x1bc)+_0x4e3fc1(0x24c)+_0x4e3fc1(0x241)+'ensagens'+_0x4e3fc1(0x2c7)+_0x4e3fc1(0x142)+_0x4e3fc1(0x22f)+_0x4e3fc1(0x170)+_0x4e3fc1(0x1b2)+_0x4e3fc1(0x129)+'s,\x20arqui'+_0x4e3fc1(0x2a4)+_0x4e3fc1(0x1cc)+'specífic'+'os\x20quand'+_0x4e3fc1(0x186)+_0x4e3fc1(0x29b)+_0x4e3fc1(0x20e)+_0x4e3fc1(0x125)+_0x4e3fc1(0x216)+'ontexto\x20'+_0x4e3fc1(0x17e)+_0x4e3fc1(0x1fb)+_0x4e3fc1(0x24b)+_0x4e3fc1(0x29a)+_0x4e3fc1(0x1e8)+_0x4e3fc1(0x185)+'branch\x20e'+_0x4e3fc1(0x2cb)+_0x4e3fc1(0x108)+'merge\x22,\x20'+_0x4e3fc1(0x1ca)+_0x4e3fc1(0x168)+_0x4e3fc1(0x255)+_0x4e3fc1(0x1c0)+_0x4e3fc1(0x290)+'ext}}'};export function getPromptsDir(){const _0x239954=_0x4e3fc1,_0xebc631={'HXktY':_0x239954(0x28f),'VfTnm':function(_0x3315aa,_0x5eac4e,_0x2a8703,_0x1c6c0b){return _0x3315aa(_0x5eac4e,_0x2a8703,_0x1c6c0b);},'rFRqM':function(_0x347d8a){return _0x347d8a();},'RQEtG':_0x239954(0x238),'OBjMK':function(_0x23b166,_0x3f7c73){return _0x23b166===_0x3f7c73;},'UtVqE':_0x239954(0x1c9),'klcIS':function(_0x3034da,_0x457b79,_0x178cfe,_0x399153,_0x4cfeab,_0x2d4fa6){return _0x3034da(_0x457b79,_0x178cfe,_0x399153,_0x4cfeab,_0x2d4fa6);},'AHXzV':_0x239954(0x2d6),'pifjG':_0x239954(0x10e),'dsGEm':_0x239954(0x288),'MVtaN':_0x239954(0x2c3)};if(process[_0x239954(0x1e2)]===_0xebc631[_0x239954(0x260)])return _0xebc631['VfTnm'](join,process.env.APPDATA||join(_0xebc631[_0x239954(0x105)](homedir),_0xebc631['RQEtG']),'gemit',_0x239954(0x10e));if(_0xebc631[_0x239954(0x1ce)](process[_0x239954(0x1e2)],_0xebc631[_0x239954(0x14f)]))return _0xebc631[_0x239954(0x17d)](join,_0xebc631['rFRqM'](homedir),_0xebc631[_0x239954(0xff)],_0x239954(0x13e)+'ion\x20Supp'+'ort','gemit',_0xebc631[_0x239954(0x1ac)]);return join(process.env.XDG_CONFIG_HOME||join(_0xebc631['rFRqM'](homedir),_0xebc631['dsGEm']),_0xebc631[_0x239954(0x1a6)],_0xebc631[_0x239954(0x1ac)]);}const LANGUAGE_INSTRUCTIONS={'pt-br':{'commit':_0x4e3fc1(0x1e3)+_0x4e3fc1(0x15b)+_0x4e3fc1(0x1c6)+'o\x20Brasil'+'.','branch':_0x4e3fc1(0x1e3)+_0x4e3fc1(0x15b)+_0x4e3fc1(0x1c6)+_0x4e3fc1(0x213)+'.','pr':_0x4e3fc1(0x1e3)+_0x4e3fc1(0x15b)+_0x4e3fc1(0x1c6)+_0x4e3fc1(0x213)+_0x4e3fc1(0x1c7)+_0x4e3fc1(0x118)+'ição\x20em\x20'+_0x4e3fc1(0x1ef)+'s.'}};export function loadPrompt(_0x32b4ce){const _0x4f5e8d=_0x4e3fc1,_0x42631d={'RfOqZ':function(_0x1ee2c7){return _0x1ee2c7();},'vzXeY':function(_0x1854d5,_0x2550c2,_0x290aa2){return _0x1854d5(_0x2550c2,_0x290aa2);},'swWhs':function(_0x499dd5,_0xe47df4){return _0x499dd5(_0xe47df4);},'ayNuU':'utf8'},_0x1b2a63=_0x42631d['RfOqZ'](getPromptsDir),_0x179fb1=_0x42631d[_0x4f5e8d(0x250)](join,_0x1b2a63,_0x32b4ce+'.txt');let _0x5546f7;if(_0x42631d[_0x4f5e8d(0x1be)](existsSync,_0x179fb1)){const _0x3e878c=_0x42631d[_0x4f5e8d(0x250)](readFileSync,_0x179fb1,_0x42631d[_0x4f5e8d(0x249)])[_0x4f5e8d(0x192)]();_0x5546f7=_0x3e878c||DEFAULT_PROMPTS[_0x32b4ce];}else _0x5546f7=DEFAULT_PROMPTS[_0x32b4ce];const _0x499570=(process.env.GEMIT_LANGUAGE||'en')[_0x4f5e8d(0x19c)+'ase']()[_0x4f5e8d(0x192)](),_0x132bdb=LANGUAGE_INSTRUCTIONS[_0x499570];return _0x132bdb?.[_0x32b4ce]&&(_0x5546f7=_0x5546f7+_0x132bdb[_0x32b4ce]),_0x5546f7;}export function interpolate(_0x2db00a,_0x2ba383){const _0x562112=_0x4e3fc1;return _0x2db00a[_0x562112(0x2c1)](/\{\{(\w+)\}\}/g,(_0x5172c5,_0x1f3cc7)=>_0x2ba383[_0x1f3cc7]??'{{'+_0x1f3cc7+'}}');}export function initGlobalPrompts(_0x4f01a5=![]){const _0x5c0ca7=_0x4e3fc1,_0x4b610e={'MKYWn':function(_0xa3815,_0x144ddc){return _0xa3815+_0x144ddc;},'HJgaE':function(_0x432b95){return _0x432b95();},'SshSi':function(_0x359350,_0x4f320b,_0x201d86){return _0x359350(_0x4f320b,_0x201d86);},'oipBw':function(_0x471e67,_0xeca31f){return _0x471e67!==_0xeca31f;},'nmIcF':function(_0x50a65c,_0x438b72){return _0x50a65c(_0x438b72);},'WrqIY':function(_0x321b4f,_0x5a1444,_0x19ca2a,_0x19651b){return _0x321b4f(_0x5a1444,_0x19ca2a,_0x19651b);},'qaRgM':'utf8'},_0x4ccc12=_0x4b610e[_0x5c0ca7(0x2c5)](getPromptsDir);_0x4b610e['SshSi'](mkdirSync,_0x4ccc12,{'recursive':!![]});const _0x327f43=[];for(const _0x1ba1d5 of PROMPT_NAMES){if(_0x4b610e['oipBw'](_0x5c0ca7(0x283),'ymwla')){const _0x2db59b=_0x4b610e[_0x5c0ca7(0x1a3)](join,_0x4ccc12,_0x1ba1d5+'.txt');(!_0x4b610e[_0x5c0ca7(0x2c2)](existsSync,_0x2db59b)||_0x4f01a5)&&(_0x4b610e['WrqIY'](writeFileSync,_0x2db59b,DEFAULT_PROMPTS[_0x1ba1d5]+'\x0a',_0x4b610e[_0x5c0ca7(0x15c)]),_0x327f43[_0x5c0ca7(0x10c)](_0x2db59b));}else _0x255f65=qQHYdy['MKYWn'](_0x2e4be8,_0xf94c7b[_0x4ba64d]);}return _0x327f43;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xb7e870,_0x401d3a){const _0x1eba0d=_0x5700,_0x17236d=_0xb7e870();while(!![]){try{const _0x141584=-parseInt(_0x1eba0d(0x11f))/0x1*(parseInt(_0x1eba0d(0x134))/0x2)+-parseInt(_0x1eba0d(0x12d))/0x3+parseInt(_0x1eba0d(0x130))/0x4*(-parseInt(_0x1eba0d(0x11c))/0x5)+-parseInt(_0x1eba0d(0x13b))/0x6*(-parseInt(_0x1eba0d(0x120))/0x7)+parseInt(_0x1eba0d(0x132))/0x8*(parseInt(_0x1eba0d(0x136))/0x9)+parseInt(_0x1eba0d(0x12a))/0xa*(parseInt(_0x1eba0d(0x125))/0xb)+-parseInt(_0x1eba0d(0x121))/0xc;if(_0x141584===_0x401d3a)break;else _0x17236d['push'](_0x17236d['shift']());}catch(_0x5199f7){_0x17236d['push'](_0x17236d['shift']());}}}(_0x48cd,0x26639));const _0x5da8e1=(function(){let _0x10a525=!![];return function(_0xc9eb8f,_0x3103c3){const _0x2148f2=_0x10a525?function(){const _0x201ba9=_0x5700;if(_0x3103c3){const _0x3ea550=_0x3103c3[_0x201ba9(0x124)](_0xc9eb8f,arguments);return _0x3103c3=null,_0x3ea550;}}:function(){};return _0x10a525=![],_0x2148f2;};}()),_0x507293=_0x5da8e1(this,function(){const _0x56e9bd=_0x5700,_0x55dd2e={'OtIgr':'(((.+)+)'+_0x56e9bd(0x135)};return _0x507293[_0x56e9bd(0x13e)]()[_0x56e9bd(0x133)](_0x55dd2e[_0x56e9bd(0x13c)])['toString']()[_0x56e9bd(0x12c)+_0x56e9bd(0x123)](_0x507293)['search'](_0x55dd2e[_0x56e9bd(0x13c)]);});_0x507293();import{basename,dirname,join}from'path';function _0x48cd(){const _0x251f69=['4xdArRr','PTHuB','392cFWwol','search','20918mpCthB','+)+$','54045mFuGua','package.','parse','json','0.0.0','132mbmFmP','OtIgr','edWdS','toString','417275smULrs','qbzen','version','3nyrWer','44016gavtrj','2322276TnjylE','utf8','tor','apply','14465cXTBPr','aLnxh','ure','PnsBu','QCmqu','720nrnuNQ','dist-sec','construc','184995ZbInoP','EWthP','gOYhm'];_0x48cd=function(){return _0x251f69;};return _0x48cd();}import{readFileSync}from'fs';function _0x5700(_0x4712ba,_0x2a5604){_0x4712ba=_0x4712ba-0x11c;const _0x5413d7=_0x48cd();let _0x507293=_0x5413d7[_0x4712ba];return _0x507293;}import{fileURLToPath}from'url';export function getCliVersion(){const _0x5d16dc=_0x5700,_0x2e1e64={'gOYhm':function(_0x48179f,_0x132141){return _0x48179f(_0x132141);},'aLnxh':function(_0x472544,_0xd751d6){return _0x472544===_0xd751d6;},'PTHuB':'dist','qbzen':function(_0x43bdf8,_0x177bd7){return _0x43bdf8(_0x177bd7);},'EWthP':_0x5d16dc(0x12b)+_0x5d16dc(0x127),'PnsBu':function(_0xc1bb4,_0x468ee5,_0x5273b6,_0x3f0f25){return _0xc1bb4(_0x468ee5,_0x5273b6,_0x3f0f25);},'edWdS':_0x5d16dc(0x137)+_0x5d16dc(0x139),'QCmqu':function(_0x1fd6cd,_0x398fcc,_0x427db7){return _0x1fd6cd(_0x398fcc,_0x427db7);},'jrDUX':_0x5d16dc(0x122),'mhmTX':_0x5d16dc(0x13a)};try{const _0x287c7a=_0x2e1e64[_0x5d16dc(0x12f)](fileURLToPath,import.meta.url),_0x4274ce=_0x2e1e64[_0x5d16dc(0x12f)](dirname,_0x287c7a),_0xf368d1=_0x2e1e64[_0x5d16dc(0x126)](basename(_0x4274ce),_0x2e1e64[_0x5d16dc(0x131)])||_0x2e1e64[_0x5d16dc(0x126)](_0x2e1e64[_0x5d16dc(0x11d)](basename,_0x4274ce),_0x2e1e64[_0x5d16dc(0x12e)])?_0x2e1e64[_0x5d16dc(0x128)](join,_0x4274ce,'..',_0x2e1e64[_0x5d16dc(0x13d)]):_0x2e1e64[_0x5d16dc(0x129)](join,_0x4274ce,_0x2e1e64[_0x5d16dc(0x13d)]),_0x154899=_0x2e1e64[_0x5d16dc(0x129)](readFileSync,_0xf368d1,_0x2e1e64['jrDUX']),_0x2f00e2=JSON[_0x5d16dc(0x138)](_0x154899);return _0x2f00e2[_0x5d16dc(0x11e)]||_0x2e1e64['mhmTX'];}catch{return _0x2e1e64['mhmTX'];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3e85ab,_0x35ba61){var _0xd16ecc=_0xd62f,_0x1a380c=_0x3e85ab();while(!![]){try{var _0x542d1e=-parseInt(_0xd16ecc(0x77))/0x1*(-parseInt(_0xd16ecc(0x79))/0x2)+parseInt(_0xd16ecc(0x80))/0x3+-parseInt(_0xd16ecc(0x7e))/0x4*(-parseInt(_0xd16ecc(0x68))/0x5)+parseInt(_0xd16ecc(0x6e))/0x6+-parseInt(_0xd16ecc(0x82))/0x7+parseInt(_0xd16ecc(0x76))/0x8+parseInt(_0xd16ecc(0x7f))/0x9*(-parseInt(_0xd16ecc(0x78))/0xa);if(_0x542d1e===_0x35ba61)break;else _0x1a380c['push'](_0x1a380c['shift']());}catch(_0x596a2e){_0x1a380c['push'](_0x1a380c['shift']());}}}(_0x3d78,0xe89a0));var _0x5bc884=(function(){var _0x136a71=!![];return function(_0x4ff8a9,_0x273538){var _0x289800=_0x136a71?function(){if(_0x273538){var _0xd1f8f4=_0x273538['apply'](_0x4ff8a9,arguments);return _0x273538=null,_0xd1f8f4;}}:function(){};return _0x136a71=![],_0x289800;};}()),_0x211604=_0x5bc884(this,function(){var _0x5dbda7=_0xd62f,_0x4045f8={'KgXwW':_0x5dbda7(0x69)+'+)+$'};return _0x211604[_0x5dbda7(0x75)]()['search'](_0x4045f8[_0x5dbda7(0x6d)])[_0x5dbda7(0x75)]()['construc'+_0x5dbda7(0x6a)](_0x211604)[_0x5dbda7(0x6b)](_0x5dbda7(0x69)+_0x5dbda7(0x71));});_0x211604();function _0xd62f(_0x2907e0,_0x159d5e){_0x2907e0=_0x2907e0-0x68;var _0x529a85=_0x3d78();var _0x211604=_0x529a85[_0x2907e0];return _0x211604;}function _0x3d78(){var _0x2b9b96=['search','iFXZJ','KgXwW','618858clTTNK','qHlUR','check','+)+$','ow.','Use\x20`gem','it\x20add\x20-','toString','14118520IdwLXY','1PtjWOP','30dThpPn','1575066xChFAq','RjkFk','stion\x20fl','all','ntinue\x20t','6356964IFIrwE','11969487MhuldE','3580626pqAVCJ','verythin','3469963hbEOks','g\x20and\x20co','5vMPsOg','(((.+)+)','tor'];_0x3d78=function(){return _0x2b9b96;};return _0x3d78();}import{failAndExit}from'../ui.js';import{generateCommit}from'./commit.js';export async function addAndCommit(_0x54c4fa={}){var _0x557e09=_0xd62f,_0x26a1d0={'iFXZJ':function(_0x3d48e5,_0x556a0e){return _0x3d48e5(_0x556a0e);},'RjkFk':_0x557e09(0x73)+_0x557e09(0x74)+'-all`\x20to'+'\x20stage\x20e'+_0x557e09(0x81)+_0x557e09(0x83)+_0x557e09(0x7d)+'he\x20sugge'+_0x557e09(0x7b)+_0x557e09(0x72),'qHlUR':function(_0x3f2a95,_0x164008){return _0x3f2a95(_0x164008);}};!_0x54c4fa[_0x557e09(0x7c)]&&_0x26a1d0[_0x557e09(0x6c)](failAndExit,_0x26a1d0[_0x557e09(0x7a)]),await _0x26a1d0[_0x557e09(0x6f)](generateCommit,{'all':!![],'check':_0x26a1d0[_0x557e09(0x6c)](Boolean,_0x54c4fa[_0x557e09(0x70)])});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4c8fef,_0x16b89d){const _0x329b83=_0x3571,_0x30735f=_0x4c8fef();while(!![]){try{const _0x52c7da=parseInt(_0x329b83(0x165))/0x1+-parseInt(_0x329b83(0x14f))/0x2*(-parseInt(_0x329b83(0x179))/0x3)+-parseInt(_0x329b83(0x176))/0x4+-parseInt(_0x329b83(0x164))/0x5*(parseInt(_0x329b83(0x127))/0x6)+-parseInt(_0x329b83(0x174))/0x7+parseInt(_0x329b83(0x171))/0x8+-parseInt(_0x329b83(0x178))/0x9*(parseInt(_0x329b83(0x12d))/0xa);if(_0x52c7da===_0x16b89d)break;else _0x30735f['push'](_0x30735f['shift']());}catch(_0x277a1d){_0x30735f['push'](_0x30735f['shift']());}}}(_0x4f16,0x3622a));const _0x2f4606=(function(){const _0x3d963e=_0x3571,_0x4be903={'dAOuY':function(_0x5d5b67,_0x2044ec){return _0x5d5b67===_0x2044ec;},'qXhss':_0x3d963e(0x124)};let _0x920922=!![];return function(_0x27ae42,_0x15ddc1){const _0x292fba={'ilkQy':function(_0x24c54d,_0x3ee6e7){return _0x4be903['dAOuY'](_0x24c54d,_0x3ee6e7);},'jbZnI':_0x4be903['qXhss']},_0x18870a=_0x920922?function(){const _0x4279b5=_0x3571;if(_0x15ddc1){if(_0x292fba[_0x4279b5(0x125)](_0x292fba[_0x4279b5(0x129)],_0x4279b5(0x144)))return _0x4279b5(0x131)+_0x54c129;else{const _0xed7c51=_0x15ddc1['apply'](_0x27ae42,arguments);return _0x15ddc1=null,_0xed7c51;}}}:function(){};return _0x920922=![],_0x18870a;};}()),_0x1519e9=_0x2f4606(this,function(){const _0x23b15b=_0x3571,_0x2e9e64={'BNtpm':_0x23b15b(0x123)+'+)+$'};return _0x1519e9[_0x23b15b(0x146)]()[_0x23b15b(0x16d)](_0x2e9e64[_0x23b15b(0x168)])[_0x23b15b(0x146)]()[_0x23b15b(0x177)+'tor'](_0x1519e9)['search'](_0x2e9e64[_0x23b15b(0x168)]);});_0x1519e9();import{execFileSync}from'child_process';import{interpolate,loadPrompt}from'../aiPrompts.js';import{createLLM,extractMessageText}from'../llm.js';import{askConfirmation}from'../prompts.js';import{branchExists,getGitStatus}from'../git.js';import{failAndExit,printKeyValues,section,warn,withProgress}from'../ui.js';function _0x4f16(){const _0x10911e=['1644228KEuGCx','construc','55017LITHhr','3cDLgRS','ic\x20detai','IZnHY','(((.+)+)','ENhHG','ilkQy','Branch\x20w','92994dVYYeV','fic\x20desc','jbZnI','XNkPD','rst.','svNHU','190tPupTz','invoke','Name','GUAWG','feat/','dcCBm','sting\x20re','slice','Failed\x20t','checkout','lready\x20e','Branch\x20a','th\x20this\x20','Try\x20reph','includes','o\x20genera','CEPLi','ase','replace','QTYLQ','AI\x20is\x20th','inking\x20a','name?\x20(y','EYhzc','lJXoe','toString','xists:\x20','ranch\x20fi','ranch\x20wi','dKuWU','our\x20desc','dghcm','zvNuI','isting\x20b','452714JeKMSQ','IMpMC','rasing\x20y','message','inherit','NFD','log','content','re\x20speci','KyabT','mpjmf','Use\x20a\x20mo','\x20branch.','CANCELED','as\x20not\x20c','o\x20create','pOKeq','with\x20mor','git','XrKcs','h\x20name.','25hifBjR','429737iNoSpC','BqvXs','Create\x20b','BNtpm','KhoUx','toLowerC','ription\x20','mvDiD','search','/n):\x20','normaliz','PzPps','3408800NVtpBK','bXbhD','or\x20delet','1790299bbSynp','UOpVm'];_0x4f16=function(){return _0x10911e;};return _0x4f16();}function sanitizeBranchName(_0x57dcfd){const _0x105754=_0x3571,_0x4447d2={'PzPps':_0x105754(0x154),'KyabT':function(_0x5ea194,_0x339433){return _0x5ea194||_0x339433;},'zvNuI':'feat/upd'+'ate'},_0x196bdf=_0x57dcfd[_0x105754(0x16f)+'e'](_0x4447d2[_0x105754(0x170)])[_0x105754(0x13f)](/[\u0300-\u036f]/g,'')[_0x105754(0x16a)+_0x105754(0x13e)]()[_0x105754(0x13f)](/[^a-z0-9/-]+/g,'-')['replace'](/-{2,}/g,'-')[_0x105754(0x13f)](/\/{2,}/g,'/')[_0x105754(0x13f)](/^-+|-+$/g,'')[_0x105754(0x13f)](/^\/+|\/+$/g,''),_0x30f9ae=_0x196bdf[_0x105754(0x134)](0x0,0x32)[_0x105754(0x13f)](/\/+$/g,'')[_0x105754(0x13f)](/-+$/g,''),_0x79bcd1=_0x4447d2[_0x105754(0x158)](_0x30f9ae,_0x4447d2[_0x105754(0x14d)]);if(!_0x79bcd1[_0x105754(0x13b)]('/'))return'feat/'+_0x79bcd1;return _0x79bcd1;}function getLLM(){const _0x4abbe9=_0x3571,_0x24a48b={'UOpVm':function(_0x11ebcc){return _0x11ebcc();},'jwevl':function(_0x3879f6,_0x14845f){return _0x3879f6 instanceof _0x14845f;},'dKuWU':function(_0x4000f7,_0x3f7558){return _0x4000f7(_0x3f7558);},'IMpMC':function(_0x8dc914,_0x4e8f6a){return _0x8dc914(_0x4e8f6a);}};try{return _0x24a48b[_0x4abbe9(0x175)](createLLM);}catch(_0x5de503){const _0x269f8a=_0x24a48b['jwevl'](_0x5de503,Error)?_0x5de503[_0x4abbe9(0x152)]:_0x24a48b[_0x4abbe9(0x14a)](String,_0x5de503);_0x24a48b[_0x4abbe9(0x150)](failAndExit,_0x269f8a);}}function _0x3571(_0x2508f6,_0x2e6726){_0x2508f6=_0x2508f6-0x121;const _0x2084f8=_0x4f16();let _0x1519e9=_0x2084f8[_0x2508f6];return _0x1519e9;}export async function suggestBranch(_0x58f2af){const _0x2d2747=_0x3571,_0x3749e6={'dghcm':function(_0xd64135){return _0xd64135();},'dcCBm':function(_0x203d31){return _0x203d31();},'BqvXs':'branch','svNHU':function(_0x5d667e,_0x3cb4c5,_0x3d9e5f){return _0x5d667e(_0x3cb4c5,_0x3d9e5f);},'QTYLQ':function(_0x268f5e,_0x516087,_0x1af5ea){return _0x268f5e(_0x516087,_0x1af5ea);},'IZnHY':_0x2d2747(0x141)+_0x2d2747(0x142)+'nd\x20reque'+_0x2d2747(0x133)+'sponse..'+'.','CEPLi':function(_0x4ca31f,_0x15bd05){return _0x4ca31f(_0x15bd05);},'mvDiD':function(_0x2145a8,_0x51cd93,_0x27e254){return _0x2145a8(_0x51cd93,_0x27e254);},'XNkPD':_0x2d2747(0x13a)+_0x2d2747(0x151)+_0x2d2747(0x14b)+_0x2d2747(0x16b)+_0x2d2747(0x160)+'e\x20specif'+_0x2d2747(0x121)+'ls.','XrKcs':function(_0x489f41,_0x34b2f2,_0x1135f2){return _0x489f41(_0x34b2f2,_0x1135f2);},'mpjmf':_0x2d2747(0x15a)+_0x2d2747(0x157)+_0x2d2747(0x128)+_0x2d2747(0x16b)+_0x2d2747(0x173)+'e\x20the\x20ex'+_0x2d2747(0x14e)+_0x2d2747(0x148)+_0x2d2747(0x12b),'wPHWN':'SUGGESTE'+'D\x20BRANCH','rNbUY':_0x2d2747(0x12f),'GUAWG':function(_0x2f42c5,_0x17daa8){return _0x2f42c5(_0x17daa8);},'lJXoe':_0x2d2747(0x15c),'pOKeq':_0x2d2747(0x126)+_0x2d2747(0x15d)+'reated.','bXbhD':function(_0x49b47b,_0x3962ce,_0x1a5057,_0x4a02f4){return _0x49b47b(_0x3962ce,_0x1a5057,_0x4a02f4);},'OjuOM':_0x2d2747(0x136),'KhoUx':function(_0x37107a,_0x1f3ebd){return _0x37107a(_0x1f3ebd);}};_0x3749e6[_0x2d2747(0x14c)](getGitStatus);const _0x5aa375=_0x3749e6[_0x2d2747(0x132)](getLLM),_0x1cbadb=loadPrompt(_0x3749e6[_0x2d2747(0x166)]),_0x41650f=_0x3749e6[_0x2d2747(0x12c)](interpolate,_0x1cbadb,{'description':_0x58f2af}),_0x3c8bd1=await _0x3749e6[_0x2d2747(0x140)](withProgress,_0x3749e6[_0x2d2747(0x122)],()=>_0x5aa375[_0x2d2747(0x12e)](_0x41650f)),_0x2988ad=_0x3749e6['CEPLi'](extractMessageText,_0x3c8bd1[_0x2d2747(0x156)]),_0x50e288=_0x3749e6[_0x2d2747(0x13d)](sanitizeBranchName,_0x2988ad);!_0x50e288&&_0x3749e6[_0x2d2747(0x16c)](failAndExit,_0x2d2747(0x135)+_0x2d2747(0x13c)+'te\x20branc'+_0x2d2747(0x163),_0x3749e6[_0x2d2747(0x12a)]);_0x3749e6[_0x2d2747(0x13d)](branchExists,_0x50e288)&&_0x3749e6[_0x2d2747(0x162)](failAndExit,_0x2d2747(0x138)+_0x2d2747(0x137)+_0x2d2747(0x147)+_0x50e288,_0x3749e6[_0x2d2747(0x159)]);_0x3749e6[_0x2d2747(0x13d)](section,_0x3749e6['wPHWN']),_0x3749e6['CEPLi'](printKeyValues,[{'key':_0x3749e6['rNbUY'],'value':_0x50e288}]);const _0x47a320=await _0x3749e6[_0x2d2747(0x130)](askConfirmation,_0x2d2747(0x167)+_0x2d2747(0x149)+_0x2d2747(0x139)+_0x2d2747(0x143)+_0x2d2747(0x16e));if(!_0x47a320){console[_0x2d2747(0x155)](_0x3749e6[_0x2d2747(0x12c)](warn,_0x3749e6[_0x2d2747(0x145)],_0x3749e6[_0x2d2747(0x15f)]));return;}try{_0x3749e6[_0x2d2747(0x172)](execFileSync,_0x2d2747(0x161),[_0x3749e6['OjuOM'],'-b',_0x50e288],{'stdio':_0x2d2747(0x153)});}catch{_0x3749e6[_0x2d2747(0x169)](failAndExit,'Failed\x20t'+_0x2d2747(0x15e)+_0x2d2747(0x15b));}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1d2b96,_0x3070ef){const _0x4ae95c=_0x57a5,_0x3af24f=_0x1d2b96();while(!![]){try{const _0x404c63=-parseInt(_0x4ae95c(0x16d))/0x1*(-parseInt(_0x4ae95c(0x196))/0x2)+-parseInt(_0x4ae95c(0x1aa))/0x3*(-parseInt(_0x4ae95c(0x17f))/0x4)+-parseInt(_0x4ae95c(0x1c3))/0x5+parseInt(_0x4ae95c(0x1c2))/0x6*(parseInt(_0x4ae95c(0x16f))/0x7)+-parseInt(_0x4ae95c(0x1a8))/0x8*(parseInt(_0x4ae95c(0x1c1))/0x9)+parseInt(_0x4ae95c(0x17b))/0xa*(parseInt(_0x4ae95c(0x1bf))/0xb)+parseInt(_0x4ae95c(0x190))/0xc;if(_0x404c63===_0x3070ef)break;else _0x3af24f['push'](_0x3af24f['shift']());}catch(_0x5228f7){_0x3af24f['push'](_0x3af24f['shift']());}}}(_0x33c8,0xb5cdf));const _0x568574=(function(){let _0x32c7ee=!![];return function(_0x33c684,_0x2b260f){const _0x2cd6d4=_0x32c7ee?function(){const _0x4805f7=_0x57a5;if(_0x2b260f){const _0x4fec37=_0x2b260f[_0x4805f7(0x17c)](_0x33c684,arguments);return _0x2b260f=null,_0x4fec37;}}:function(){};return _0x32c7ee=![],_0x2cd6d4;};}()),_0x262dd1=_0x568574(this,function(){const _0x1ecbd2=_0x57a5,_0x5f46bd={'brfOa':'(((.+)+)'+_0x1ecbd2(0x1a9)};return _0x262dd1[_0x1ecbd2(0x187)]()[_0x1ecbd2(0x184)](_0x5f46bd[_0x1ecbd2(0x1af)])['toString']()[_0x1ecbd2(0x1c6)+_0x1ecbd2(0x1bd)](_0x262dd1)['search'](_0x5f46bd[_0x1ecbd2(0x1af)]);});_0x262dd1();import{mkdirSync,writeFileSync}from'fs';import{join}from'path';import{interpolate,loadPrompt}from'../aiPrompts.js';import{createLLM,extractMessageText}from'../llm.js';function _0x33c8(){const _0x529d06=['least\x20on','hash','utf8','parseInt','6oltoMX','etwork\x20c','G\x20GENERA','cEvdK','tent.','og...','lfvEq','te\x20chang','n,\x20then\x20','ngelog.','nerating','unknown-','toISOStr','ositive\x20','jluZl','trim','oSpbi','used','63176VNcItY','+)+$','3nwEoWs','\x20to\x20gene','slice','min','Status','brfOa','\x20Use\x20a\x20p','\x20changel','bmJGZ','subject','date','rreQT','zZKap','diff\x20sta','join','NFD','cwd','LejUL','replace','tor','author','3228951nkAeNa','File','1413QSHkyH','17538hbgTwo','5666655LYqIuN','hwDEy','rate\x20cha','construc','Failed\x20t','changelo','ing','integer.','Hdksz','fbXAW','zRPBN','QFnOv','Make\x20at\x20','iTAoG','aDqia','Commits\x20','fpxtQ','ts\x20found','WJRse','362136MXpOHl','s\x20value.','2933TuqVVy','\x20|\x20','AAEZI','isNaN','normaliz','qQbTD','QFYHK','ase','Overall\x20','CHANGELO','RFJOF','ur\x20API\x20k','10LaeQsv','apply','Check\x20yo','sTuwd','86956NcRKxy','YUrfX','elog\x20con','length','try\x20agai','search','commits','o\x20genera','toString','e\x20commit','QdaYl','No\x20commi','toLowerC','onnectio','\x20reposit','body','ory\x20firs','5896872NEfZTD','Invalid\x20'];_0x33c8=function(){return _0x529d06;};return _0x33c8();}import{getCommitHistory,getCommitRangeDiffStat,getCurrentBranch,getGitStatus}from'../git.js';function _0x57a5(_0x498826,_0x1af61e){_0x498826=_0x498826-0x168;const _0x51f5e2=_0x33c8();let _0x262dd1=_0x51f5e2[_0x498826];return _0x262dd1;}import{failAndExit,ok,printKeyValues,section,withProgress}from'../ui.js';const DEFAULT_COMMIT_LIMIT=0x14,MAX_COMMIT_LIMIT=0xc8;function getLLM(){const _0x49eb9b=_0x57a5,_0x5c7619={'RFJOF':function(_0x58bd0d){return _0x58bd0d();},'QFnOv':function(_0x175cf8,_0x1adb8c){return _0x175cf8(_0x1adb8c);}};try{return _0x5c7619[_0x49eb9b(0x179)](createLLM);}catch(_0x44f3c5){const _0x472c9e=_0x44f3c5 instanceof Error?_0x44f3c5['message']:String(_0x44f3c5);_0x5c7619[_0x49eb9b(0x1ce)](failAndExit,_0x472c9e);}}function sanitizeName(_0x3a705c){const _0x1b1cce=_0x57a5,_0x411c1e={'QFYHK':_0x1b1cce(0x1b9),'AAEZI':_0x1b1cce(0x1c8)+'g'},_0x2eb9de=_0x3a705c[_0x1b1cce(0x173)+'e'](_0x411c1e[_0x1b1cce(0x175)])[_0x1b1cce(0x1bc)](/[\u0300-\u036f]/g,'')[_0x1b1cce(0x18b)+_0x1b1cce(0x176)]()[_0x1b1cce(0x1bc)](/[^a-z0-9-]+/g,'-')[_0x1b1cce(0x1bc)](/-{2,}/g,'-')[_0x1b1cce(0x1bc)](/^-+|-+$/g,'');return _0x2eb9de||_0x411c1e[_0x1b1cce(0x171)];}function formatDateForFile(_0xcb2a4c){const _0x378ffe=_0x57a5;return _0xcb2a4c[_0x378ffe(0x1a2)+_0x378ffe(0x1c9)]()[_0x378ffe(0x1ac)](0x0,0xa);}function resolveCommitLimit(_0x1180e9){const _0x89df47=_0x57a5,_0x3befb3={'lfvEq':function(_0x5b44ab,_0x4ca1b9,_0x220901){return _0x5b44ab(_0x4ca1b9,_0x220901);},'WJRse':_0x89df47(0x1cf)+_0x89df47(0x192)+_0x89df47(0x188)+'\x20in\x20this'+_0x89df47(0x18d)+'ory\x20firs'+'t.','zRPBN':function(_0x4d1668,_0x203d8b){return _0x4d1668!==_0x203d8b;},'cEvdK':function(_0x5cd4a2,_0x44af95){return _0x5cd4a2<=_0x44af95;},'zZKap':function(_0x15f0fa,_0x36b99c){return _0x15f0fa(_0x36b99c);},'rreQT':_0x89df47(0x191)+'--commit'+_0x89df47(0x16e)+_0x89df47(0x1b0)+_0x89df47(0x1a3)+_0x89df47(0x1ca)},_0x1805d8=_0x1180e9?.[_0x89df47(0x185)]?.[_0x89df47(0x1a5)]();if(!_0x1805d8){if(_0x3befb3[_0x89df47(0x1cd)]('EliTG',_0x89df47(0x1a4)))return DEFAULT_COMMIT_LIMIT;else _0x3befb3[_0x89df47(0x19c)](_0x570fee,_0x89df47(0x18a)+_0x89df47(0x16b)+'\x20to\x20gene'+_0x89df47(0x1c5)+'ngelog.',_0x3befb3[_0x89df47(0x16c)]);}const _0x5ade71=Number[_0x89df47(0x195)](_0x1805d8,0xa);return(Number[_0x89df47(0x172)](_0x5ade71)||_0x3befb3[_0x89df47(0x199)](_0x5ade71,0x0))&&_0x3befb3[_0x89df47(0x1b6)](failAndExit,_0x3befb3[_0x89df47(0x1b5)]),Math[_0x89df47(0x1ad)](_0x5ade71,MAX_COMMIT_LIMIT);}function buildCommitHistoryPrompt(_0x418337){const _0x5e1136=_0x57a5,_0x5d6228={'fpxtQ':_0x5e1136(0x1a1)+'date','FbKsc':_0x5e1136(0x1a1)+_0x5e1136(0x1be),'sTuwd':function(_0x396d84,_0x1076fd){return _0x396d84(_0x1076fd);},'wEzag':function(_0x230956,_0x45bdd7){return _0x230956===_0x45bdd7;},'fbXAW':'No\x20commi'+'ts\x20found'+_0x5e1136(0x1ab)+_0x5e1136(0x1c5)+_0x5e1136(0x19f),'qQbTD':_0x5e1136(0x1cf)+_0x5e1136(0x192)+_0x5e1136(0x188)+'\x20in\x20this'+_0x5e1136(0x18d)+_0x5e1136(0x18f)+'t.'},_0x54ce0d=_0x5d6228[_0x5e1136(0x17e)](getCommitHistory,_0x418337);_0x5d6228['wEzag'](_0x54ce0d[_0x5e1136(0x182)],0x0)&&failAndExit(_0x5d6228[_0x5e1136(0x1cc)],_0x5d6228[_0x5e1136(0x174)]);const _0x18af50=_0x54ce0d['map'](_0x262c10=>{const _0x437658=_0x5e1136,_0xbf8998=_0x262c10['body']?'\x20|\x20body:'+'\x20'+_0x262c10[_0x437658(0x18e)][_0x437658(0x1bc)](/\s+/g,'\x20')[_0x437658(0x1a5)]():'',_0x14d602=_0x262c10[_0x437658(0x1b4)]||_0x5d6228[_0x437658(0x16a)],_0x456f7a=_0x262c10[_0x437658(0x1be)]||_0x5d6228['FbKsc'];return'-\x20'+_0x14d602+_0x437658(0x170)+_0x262c10[_0x437658(0x193)][_0x437658(0x1ac)](0x0,0x7)+_0x437658(0x170)+_0x456f7a+_0x437658(0x170)+_0x262c10[_0x437658(0x1b3)]+_0xbf8998;})[_0x5e1136(0x1b8)]('\x0a'),_0x179e24=_0x5d6228['sTuwd'](getCommitRangeDiffStat,_0x418337);return[_0x18af50,'',_0x5e1136(0x177)+_0x5e1136(0x1b7)+'t:',_0x179e24][_0x5e1136(0x1b8)]('\x0a');}export async function generateChangelog(_0x11d973,_0x79a99d){const _0x28adf7=_0x57a5,_0x4872ad={'OWwIN':function(_0x354140){return _0x354140();},'iTAoG':function(_0x5efd17,_0x1875b8){return _0x5efd17(_0x1875b8);},'QdaYl':function(_0x5ae813,_0x5d5fe2){return _0x5ae813||_0x5d5fe2;},'Hdksz':function(_0x1866dc,_0x341e4d){return _0x1866dc(_0x341e4d);},'LejUL':_0x28adf7(0x1c8)+'g','WxqwL':function(_0x320c1d,_0x326fe1,_0xa6d691){return _0x320c1d(_0x326fe1,_0xa6d691);},'ipvpP':function(_0x374ceb,_0x2d5c0a,_0x5ede75){return _0x374ceb(_0x2d5c0a,_0x5ede75);},'uQnUu':_0x28adf7(0x1c8)+'gs','hwDEy':function(_0x476151,_0x25ba2a,_0x217beb){return _0x476151(_0x25ba2a,_0x217beb);},'oSpbi':_0x28adf7(0x194),'YUrfX':function(_0x56d5cd,_0x30639f){return _0x56d5cd(_0x30639f);},'aDqia':_0x28adf7(0x178)+_0x28adf7(0x198)+'TED','bmJGZ':_0x28adf7(0x1c0)};_0x4872ad['OWwIN'](getGitStatus);const _0x59b8ff=getLLM(),_0x427ed9=_0x4872ad[_0x28adf7(0x1d0)](resolveCommitLimit,_0x79a99d),_0xbcaf1e=getCurrentBranch(),_0x32528c=sanitizeName(_0x4872ad[_0x28adf7(0x189)](_0x11d973,_0xbcaf1e)[_0x28adf7(0x1a5)]()),_0x532334=_0x4872ad[_0x28adf7(0x1d0)](formatDateForFile,new Date()),_0xb2abb7=_0x32528c+'-'+_0x532334+'.md',_0x111a85=_0x4872ad[_0x28adf7(0x1cb)](buildCommitHistoryPrompt,_0x427ed9),_0x3eb6db=loadPrompt(_0x4872ad[_0x28adf7(0x1bb)]),_0x4757f2=_0x4872ad['WxqwL'](interpolate,_0x3eb6db,{'commit_limit':_0x4872ad[_0x28adf7(0x1cb)](String,_0x427ed9),'commit_history':_0x111a85}),_0x53f9dc=await _0x4872ad['ipvpP'](withProgress,'AI\x20is\x20ge'+_0x28adf7(0x1a0)+_0x28adf7(0x1b1)+_0x28adf7(0x19b),()=>_0x59b8ff['invoke'](_0x4757f2)),_0x1f4cc3=_0x4872ad[_0x28adf7(0x1cb)](extractMessageText,_0x53f9dc['content']);!_0x1f4cc3&&failAndExit(_0x28adf7(0x1c7)+_0x28adf7(0x186)+_0x28adf7(0x19d)+_0x28adf7(0x181)+_0x28adf7(0x19a),_0x28adf7(0x17d)+_0x28adf7(0x17a)+'ey\x20and\x20n'+_0x28adf7(0x197)+_0x28adf7(0x18c)+_0x28adf7(0x19e)+_0x28adf7(0x183)+'n.');const _0x1c6c44=join(process[_0x28adf7(0x1ba)](),_0x4872ad['uQnUu']),_0x342bd2=_0x4872ad[_0x28adf7(0x1c4)](join,_0x1c6c44,_0xb2abb7);_0x4872ad[_0x28adf7(0x1c4)](mkdirSync,_0x1c6c44,{'recursive':!![]}),writeFileSync(_0x342bd2,_0x1f4cc3[_0x28adf7(0x1a5)]()+'\x0a',_0x4872ad[_0x28adf7(0x1a6)]),_0x4872ad[_0x28adf7(0x180)](section,_0x4872ad[_0x28adf7(0x168)]),printKeyValues([{'key':_0x28adf7(0x1ae),'value':_0x4872ad['YUrfX'](ok,'OK')},{'key':_0x4872ad[_0x28adf7(0x1b2)],'value':_0x342bd2},{'key':_0x28adf7(0x169)+_0x28adf7(0x1a7),'value':_0x4872ad['iTAoG'](String,_0x427ed9)}]);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x2d3aac,_0xada2e2){const _0x19fb79=_0x5bb7,_0x25888c=_0x2d3aac();while(!![]){try{const _0xa14dd9=parseInt(_0x19fb79(0x278))/0x1+parseInt(_0x19fb79(0x22a))/0x2+parseInt(_0x19fb79(0x1ab))/0x3+parseInt(_0x19fb79(0x1ed))/0x4+-parseInt(_0x19fb79(0x1f2))/0x5*(parseInt(_0x19fb79(0x294))/0x6)+-parseInt(_0x19fb79(0x1d3))/0x7*(parseInt(_0x19fb79(0x206))/0x8)+-parseInt(_0x19fb79(0x1cf))/0x9*(parseInt(_0x19fb79(0x220))/0xa);if(_0xa14dd9===_0xada2e2)break;else _0x25888c['push'](_0x25888c['shift']());}catch(_0x2fef34){_0x25888c['push'](_0x25888c['shift']());}}}(_0x3095,0xada6f));const _0x21b619=(function(){const _0x302cc9=_0x5bb7,_0x527f47={'AbKeJ':_0x302cc9(0x272)+_0x302cc9(0x1a3),'KQfub':function(_0x3b6125,_0xf2ff39){return _0x3b6125!==_0xf2ff39;},'xTSuj':_0x302cc9(0x193),'RhHye':'uGcRI'};let _0xedb8de=!![];return function(_0x47396c,_0x5895f2){const _0x26052c=_0x302cc9,_0xe27da6={'RgXTM':_0x527f47[_0x26052c(0x1ba)]};if(_0x527f47[_0x26052c(0x247)](_0x527f47[_0x26052c(0x285)],_0x527f47['RhHye'])){const _0x533046=_0xedb8de?function(){if(_0x5895f2){const _0x2a560b=_0x5895f2['apply'](_0x47396c,arguments);return _0x5895f2=null,_0x2a560b;}}:function(){};return _0xedb8de=![],_0x533046;}else return _0x1757fe[_0x26052c(0x221)]()[_0x26052c(0x1f7)](_0xe27da6['RgXTM'])[_0x26052c(0x221)]()[_0x26052c(0x164)+'tor'](_0x4cea20)['search'](_0x26052c(0x272)+_0x26052c(0x1a3));};}()),_0x1c156c=_0x21b619(this,function(){const _0x18e26c=_0x5bb7,_0x31ae38={'cIhig':_0x18e26c(0x272)+_0x18e26c(0x1a3)};return _0x1c156c['toString']()['search'](_0x31ae38[_0x18e26c(0x1f0)])['toString']()[_0x18e26c(0x164)+_0x18e26c(0x1ad)](_0x1c156c)['search'](_0x18e26c(0x272)+'+)+$');});_0x1c156c();import{execFileSync}from'child_process';import{interpolate,loadPrompt}from'../aiPrompts.js';import{createLLM,extractMessageText}from'../llm.js';import{askConfirmation}from'../prompts.js';import{getCurrentBranch,getDefaultRemote,getGitStatus,getStagedContext,getUpstreamInfo,stageAll}from'../git.js';import{failAndExit,info,ok,printKeyValues,printList,section,style,ui,warn,withProgress}from'../ui.js';function _0x3095(){const _0xddbd08=['ast\x20comm','g\x20commit','\x20splitti','2736GHrzoN','run\x20`gem','rent\x20bra','AbhFC','1099kGVgPF','eam\x20conf','vcYhh','BmvYG','AvKmO','emote\x20co','sZQZr','dlwXw','invoke','deletion','Commit\x20w','GRxuW','ot\x20avail','\x20deletio','iles','CHECK','HsfPP','Large\x20st','stream','No\x20file\x20','insertio','Push\x20com','ToqVA','truncate','endsWith','.md','1682716JvGMgs','NcPSa','label','cIhig','--amend','27955QxYwRc','win32','o\x20amend\x20','HEAD','pqUBT','search','DDWoT','\x20files\x20c','\x20staged\x20','iXQSk','feat','ons,\x20','Could\x20no','Staged\x20f','fbqRS','will\x20inc','No\x20stage','every','nd\x20upstr','\x20commit.','18016rtQGav','nerating','(Y/n):\x20','\x20modifie','aqgoh','gwwvm','o\x20push\x20\x22','MhhKQ','\x0a(trunca','as\x20not\x20c','e...','AMENDED','t\x20read\x20l','length','TCsAV','jdUrT','\x20committ','--stat','added','r\x20messag','refactor','f\x20you\x20ha','lint','t\x20least\x20','fileCoun','BVvQZ','28490UcvhCe','toString','able.','TIP','xqeti','test','message?','xJTBB','paths\x20av','\x20Prompt\x20','546354lJgwFS','Amending','content','commit','Push\x20cur','inherit','slice','TMkCb','\x20chars).','DRY\x20RUN','d,\x20','repjy','mended.','xcerpt.','pvCBo','nIZzh','imKAA','\x20complet','BjgdS','o\x20create','ng\x20into\x20','CFcYT','t\x20upstre','tEFBk','ot\x20read\x20','ed\x20commi','t\x20--all`','--short','fBVmm','KQfub','LweFq','No\x20git\x20r','OwYDM','join','te\x20commi','ns.\x20','yellow','QZqBZ','aimBR','Failed\x20t','log','New\x20mess','AI\x20is\x20ge','Ehhlu','NSfqs','diff)','ere\x20is\x20a','one\x20comm','(none)','as\x20not\x20a','eYwBc','path','ted.','metrics','iiEkT','runcated','amend','EvsHs','Consider','status','LfGdW','docs','nfigured','check','modified','(already','NwnHg','files\x20de','itPFn','fullName','add\x20.).','skxBH','(((.+)+)','\x20more','Amend\x20co','t\x20was\x20cr','...','Current\x20','853551NQOFth','fix','\x20Abortin','WARNING','args','run','pipe','it\x20commi','MYegZ','diffStat','VWUbg','YIaWV','quZlt','xTSuj','IpWef','sting\x20re','\x22\x20and\x20se','o\x20push\x20t','=%B','\x20renamed','\x20deleted','rvksy','No\x20commi','\x22\x20to\x20\x22','npm.cmd','dim','Wqjqh','se\x20files','6BKOKMj','mTqRw','\x20mode).','git','npm','NngsK','ailable.','gzXFW','SSlZn','map','sjxWD','EyjGz','kMKUn','sponse..','it.','IYioC','\x20sure\x20th','dznpo','construc','DkihO','BZUUb','\x20failed.','wwkzx','commit.','MrORd','pleted\x20t','2|1|6|3|','SLQIC','reated.','te\x20amend','\x20a\x20bette','aALuD','yRfHH','4|0|5','split','\x20(Y/n):\x20','JTKlJ','jqyfT','okbqj','nEMJW','aLRFx','Message','Suggeste','y/N):\x20','message','kjoLn','hanged\x20(','\x20last\x20co','gIbtF','caBFR','files','trim','cmKfe','SjsWR','JiPYM','o\x20genera','):\x20','WFybA','it.\x20Make','\x20patch\x20e','show','vbnJA','Lfjhb','lude\x20a\x20t','KcNuA','dASdp','CPhdJ','eVwHw','patchCha','push','vGcdE','PvWeh','d\x20files.','SZmHn','akRxD','meedy','deleted','nnbrB','\x20inserti','YRlpD','HAPJx','+)+$','pleted\x20a','ase','Running\x20','BzrFA','EryQv','ve\x20stage','--set-up','1167369uNqcBm','sent','tor','d.\x20Push\x20','pqwBE','mmit\x20wit','startsWi','JjHor','chore','dryRun','eated\x20(-','PHTka','mmit\x20the','2.\x20SUGGE','Gtgap','AbKeJ','inking\x20a','kEhuc','renamed','TbcCC','age\x20upda','sing\x20AI\x20','Last\x20com','dZGHM','oAdSk','No\x20upstr','wyOiR','essage?\x20','(could\x20n','tected.\x20','AMEND','CANCELED','ed.'];_0x3095=function(){return _0xddbd08;};return _0x3095();}const MAX_PROMPT_PATCH_CHARS=0x2710,WARN_SPLIT_FILE_COUNT=0xa,WARN_PROMPT_DIFF_CHARS=0xc350;function getLLM(){const _0x5b356a=_0x5bb7,_0x508a13={'TCsAV':function(_0x56a210){return _0x56a210();},'DkihO':function(_0x2a3012,_0x1d9874){return _0x2a3012 instanceof _0x1d9874;},'AFnPf':function(_0x5d319b,_0x25e070){return _0x5d319b(_0x25e070);},'kMKUn':function(_0x550f7b,_0x27284b){return _0x550f7b(_0x27284b);}};try{return _0x508a13[_0x5b356a(0x214)](createLLM);}catch(_0x3b4f86){const _0x45b559=_0x508a13[_0x5b356a(0x165)](_0x3b4f86,Error)?_0x3b4f86['message']:_0x508a13['AFnPf'](String,_0x3b4f86);_0x508a13[_0x5b356a(0x15e)](failAndExit,_0x45b559);}}function _0x5bb7(_0x5b7e90,_0x345ae3){_0x5b7e90=_0x5b7e90-0x15b;const _0x10390f=_0x3095();let _0x1c156c=_0x10390f[_0x5b7e90];return _0x1c156c;}function countByStatus(_0x2de511){const _0x2ae4f6=_0x5bb7,_0x1efcb9={'added':0x0,'modified':0x0,'deleted':0x0,'renamed':0x0,'other':0x0};for(const _0x55c0e5 of _0x2de511['files']){if(_0x55c0e5[_0x2ae4f6(0x265)][_0x2ae4f6(0x1b1)+'th']('A')){_0x1efcb9[_0x2ae4f6(0x218)]+=0x1;continue;}if(_0x55c0e5[_0x2ae4f6(0x265)][_0x2ae4f6(0x1b1)+'th']('M')){_0x1efcb9['modified']+=0x1;continue;}if(_0x55c0e5[_0x2ae4f6(0x265)][_0x2ae4f6(0x1b1)+'th']('D')){_0x1efcb9[_0x2ae4f6(0x19e)]+=0x1;continue;}if(_0x55c0e5[_0x2ae4f6(0x265)][_0x2ae4f6(0x1b1)+'th']('R')){_0x1efcb9['renamed']+=0x1;continue;}_0x1efcb9['other']+=0x1;}return _0x1efcb9;}function detectCommitType(_0x1a8e55){const _0x138a9d=_0x5bb7,_0x1d15f4={'TMkCb':function(_0x1423c7,_0x3d6bff){return _0x1423c7(_0x3d6bff);},'tEFBk':_0x138a9d(0x267),'QqQpR':_0x138a9d(0x225),'aimBR':function(_0x13304c,_0x5e1b99){return _0x13304c>_0x5e1b99;},'akRxD':function(_0x372d00,_0x144c9a){return _0x372d00===_0x144c9a;},'iXQSk':_0x138a9d(0x1b3),'aALuD':function(_0x61d80e,_0x13fd84){return _0x61d80e>_0x13fd84;},'NngsK':_0x138a9d(0x1fc),'HsfPP':function(_0x864176,_0xab4c7e){return _0x864176>_0xab4c7e;},'jqyfT':_0x138a9d(0x279),'repjy':_0x138a9d(0x21a)},_0x552d1b=_0x1a8e55['files'][_0x138a9d(0x15b)](_0x515251=>_0x515251[_0x138a9d(0x25d)]['toLowerC'+_0x138a9d(0x1a5)]()),_0x382896=_0x1d15f4[_0x138a9d(0x231)](countByStatus,_0x1a8e55);if(_0x552d1b[_0x138a9d(0x213)]>0x0&&_0x552d1b[_0x138a9d(0x203)](_0x5aa104=>/(^|\/)(readme|docs?|changelog)/[_0x138a9d(0x225)](_0x5aa104)||_0x5aa104[_0x138a9d(0x1eb)](_0x138a9d(0x1ec))))return _0x1d15f4[_0x138a9d(0x241)];if(_0x552d1b['length']>0x0&&_0x552d1b['every'](_0x95388c=>/(^|\/)(test|tests|__tests__|spec)/[_0x138a9d(0x225)](_0x95388c)||/\.(spec|test)\./['test'](_0x95388c)))return _0x1d15f4['QqQpR'];if(_0x1d15f4[_0x138a9d(0x250)](_0x382896[_0x138a9d(0x19e)],0x0)&&_0x1d15f4[_0x138a9d(0x19c)](_0x382896['added'],0x0)&&_0x1d15f4[_0x138a9d(0x19c)](_0x382896[_0x138a9d(0x26a)],0x0))return _0x1d15f4[_0x138a9d(0x1fb)];if(_0x382896['added']>=_0x382896[_0x138a9d(0x26a)]&&_0x1d15f4[_0x138a9d(0x171)](_0x382896[_0x138a9d(0x218)],0x0))return _0x1d15f4[_0x138a9d(0x299)];if(_0x1d15f4[_0x138a9d(0x1e3)](_0x382896[_0x138a9d(0x26a)],0x0)&&_0x1a8e55[_0x138a9d(0x25f)][_0x138a9d(0x1e7)+'ns']<=_0x1a8e55['metrics']['deletion'+'s'])return _0x1d15f4[_0x138a9d(0x177)];return _0x1d15f4[_0x138a9d(0x235)];}function summarizeChanges(_0xe1eea7){const _0x5346b8=_0x5bb7,_0x3a8443={'aLRFx':function(_0x158bd4,_0x4958f9){return _0x158bd4(_0x4958f9);},'SSlZn':function(_0x19bc9f,_0x5f02ab){return _0x19bc9f>_0x5f02ab;},'wwkzx':function(_0x37464c,_0x195014){return _0x37464c-_0x195014;},'caBFR':function(_0x19a05e,_0x3aa50c){return _0x19a05e||_0x3aa50c;}},_0x40434d=_0x3a8443[_0x5346b8(0x17a)](countByStatus,_0xe1eea7),_0x489235=_0xe1eea7[_0x5346b8(0x184)][_0x5346b8(0x230)](0x0,0x3)['map'](_0x21bf5b=>_0x21bf5b[_0x5346b8(0x25d)]),_0x1bd1af=_0x3a8443[_0x5346b8(0x29c)](_0xe1eea7[_0x5346b8(0x184)][_0x5346b8(0x213)],0x3)?_0x489235[_0x5346b8(0x24b)](',\x20')+'\x20+'+_0x3a8443[_0x5346b8(0x168)](_0xe1eea7[_0x5346b8(0x184)][_0x5346b8(0x213)],0x3)+_0x5346b8(0x273):_0x489235['join'](',\x20');return _0xe1eea7[_0x5346b8(0x25f)][_0x5346b8(0x21e)+'t']+(_0x5346b8(0x1f9)+_0x5346b8(0x180))+_0x40434d[_0x5346b8(0x218)]+'\x20added,\x20'+_0x40434d['modified']+(_0x5346b8(0x209)+_0x5346b8(0x234))+_0x40434d['deleted']+(_0x5346b8(0x28c)+',\x20')+_0x40434d[_0x5346b8(0x1bd)]+(_0x5346b8(0x28b)+'),\x20')+_0xe1eea7[_0x5346b8(0x25f)][_0x5346b8(0x1e7)+'ns']+(_0x5346b8(0x1a0)+_0x5346b8(0x1fd))+_0xe1eea7[_0x5346b8(0x25f)][_0x5346b8(0x1dc)+'s']+(_0x5346b8(0x1e0)+_0x5346b8(0x24d))+_0x3a8443[_0x5346b8(0x183)](_0x1bd1af,_0x5346b8(0x1e6)+_0x5346b8(0x228)+_0x5346b8(0x29a));}function formatStagedFiles(_0x4822d6){const _0x4240d2=_0x5bb7;return _0x4822d6[_0x4240d2(0x184)][_0x4240d2(0x15b)](_0x3ee5c6=>'-\x20'+_0x3ee5c6[_0x4240d2(0x265)]+'\x20'+_0x3ee5c6[_0x4240d2(0x25d)])['join']('\x0a');}function runOptionalChecks(){const _0x3c1973=_0x5bb7,_0x3d215a={'LfGdW':function(_0x2b484d,_0x564e40,_0xedbcd6){return _0x2b484d(_0x564e40,_0xedbcd6);},'Lfjhb':_0x3c1973(0x1e2),'hDSFY':'inherit','RMZzc':function(_0x401135,_0xcc4dd0,_0x358d13){return _0x401135(_0xcc4dd0,_0x358d13);},'sjxWD':function(_0x1a4b8b,_0x3d6d27){return _0x1a4b8b(_0x3d6d27);},'AbhFC':function(_0x2c0c5d,_0x1952db){return _0x2c0c5d===_0x1952db;},'QZqBZ':_0x3c1973(0x1f3),'BjgdS':_0x3c1973(0x290),'pqUBT':_0x3c1973(0x298),'yRfHH':_0x3c1973(0x21c),'GXDJR':_0x3c1973(0x27d),'kjoLn':'--if-pre'+_0x3c1973(0x1ac),'YIaWV':_0x3c1973(0x225),'dZGHM':function(_0x44ed21,_0x925a0a,_0x35130f){return _0x44ed21(_0x925a0a,_0x35130f);},'YVLDU':function(_0x22390b,_0x548afe){return _0x22390b===_0x548afe;},'nnbrB':_0x3c1973(0x18f),'wKRhP':function(_0x32dc6e,_0x44758a){return _0x32dc6e(_0x44758a);}},_0x21649c=_0x3d215a[_0x3c1973(0x1d2)](process['platform'],_0x3d215a[_0x3c1973(0x24f)])?_0x3d215a[_0x3c1973(0x23c)]:_0x3d215a[_0x3c1973(0x1f6)],_0x16ed9b=[{'label':_0x3d215a['yRfHH'],'args':[_0x3d215a['GXDJR'],_0x3d215a[_0x3c1973(0x172)],_0x3d215a[_0x3c1973(0x17f)]]},{'label':_0x3d215a['YIaWV'],'args':[_0x3d215a['GXDJR'],_0x3d215a[_0x3c1973(0x283)],_0x3d215a[_0x3c1973(0x17f)]]}];for(const _0x3bad49 of _0x16ed9b){console[_0x3c1973(0x252)](_0x3d215a[_0x3c1973(0x1c2)](info,_0x3d215a[_0x3c1973(0x190)],_0x3c1973(0x1a6)+_0x3bad49[_0x3c1973(0x1ef)]+_0x3c1973(0x276)));try{if(_0x3d215a['YVLDU'](_0x3d215a[_0x3c1973(0x19f)],_0x3d215a[_0x3c1973(0x19f)]))execFileSync(_0x21649c,_0x3bad49['args'],{'stdio':_0x3c1973(0x22f)}),console[_0x3c1973(0x252)](_0x3d215a[_0x3c1973(0x1c2)](ok,'OK',_0x3bad49[_0x3c1973(0x1ef)]+(_0x3c1973(0x23b)+_0x3c1973(0x1cb))));else{_0x21e6c0[_0x3c1973(0x252)](_0x3d215a[_0x3c1973(0x266)](_0x1aa440,_0x3d215a[_0x3c1973(0x190)],_0x3c1973(0x1a6)+_0x292bf5[_0x3c1973(0x1ef)]+_0x3c1973(0x276)));try{_0x5ddaee(_0x14682f,_0x2405c0[_0x3c1973(0x27c)],{'stdio':_0x3d215a['hDSFY']}),_0x4a2d7f['log'](_0x3d215a['RMZzc'](_0x5d7e00,'OK',_0x5c6143['label']+(_0x3c1973(0x23b)+'ed.')));}catch{_0x3d215a[_0x3c1973(0x15c)](_0x3353e9,_0x5bb5a7[_0x3c1973(0x1ef)]+(_0x3c1973(0x167)+_0x3c1973(0x27a)+_0x3c1973(0x1cd)+'.'));}}}catch{_0x3d215a['wKRhP'](failAndExit,_0x3bad49[_0x3c1973(0x1ef)]+(_0x3c1973(0x167)+_0x3c1973(0x27a)+'g\x20commit'+'.'));}}}async function maybePushCurrentBranch(){const _0x4897f9=_0x5bb7,_0x2636e7={'nEMJW':function(_0x5ed950){return _0x5ed950();},'JiPYM':function(_0x4283f9,_0xd18109){return _0x4283f9(_0xd18109);},'TbcCC':function(_0x570293,_0x220ef4,_0x5ec06c,_0x9c6c99){return _0x570293(_0x220ef4,_0x5ec06c,_0x9c6c99);},'JjHor':_0x4897f9(0x297),'sZQZr':_0x4897f9(0x197),'aqgoh':'inherit','AvKmO':function(_0x4250a6,_0x3a7ddd,_0x9d45e7){return _0x4250a6(_0x3a7ddd,_0x9d45e7);},'JTKlJ':'SKIPPED','SLQIC':_0x4897f9(0x249)+_0x4897f9(0x1d8)+_0x4897f9(0x268)+'.\x20Push\x20n'+_0x4897f9(0x1df)+_0x4897f9(0x222),'PqYaP':function(_0x2a31c4,_0xd07785,_0x4a747f,_0x3b54f1){return _0x2a31c4(_0xd07785,_0x4a747f,_0x3b54f1);},'eVwHw':_0x4897f9(0x1aa)+_0x4897f9(0x1e5)},_0x3ae231=getCurrentBranch(),_0x352c49=_0x2636e7[_0x4897f9(0x179)](getUpstreamInfo);if(_0x352c49){const _0x54987c=await _0x2636e7[_0x4897f9(0x188)](askConfirmation,_0x4897f9(0x22e)+_0x4897f9(0x1d1)+'nch\x20\x22'+_0x3ae231+_0x4897f9(0x28f)+_0x352c49[_0x4897f9(0x26f)]+('\x22\x20now?\x20('+_0x4897f9(0x17d)));if(!_0x54987c)return;try{_0x2636e7[_0x4897f9(0x1be)](execFileSync,_0x2636e7['JjHor'],[_0x2636e7[_0x4897f9(0x1d9)],_0x352c49['remote'],_0x3ae231+':'+_0x352c49['branch']],{'stdio':_0x2636e7[_0x4897f9(0x20a)]}),console[_0x4897f9(0x252)](_0x2636e7[_0x4897f9(0x1d7)](ok,'OK',_0x4897f9(0x1e8)+_0x4897f9(0x16b)+'o\x20'+_0x352c49['fullName']+'.'));}catch{failAndExit(_0x4897f9(0x251)+_0x4897f9(0x289)+'o\x20'+_0x352c49['fullName']+'.');}return;}const _0x4f5a98=_0x2636e7['nEMJW'](getDefaultRemote);if(!_0x4f5a98){console[_0x4897f9(0x252)](_0x2636e7[_0x4897f9(0x1d7)](warn,_0x2636e7[_0x4897f9(0x176)],_0x2636e7[_0x4897f9(0x16d)]));return;}const _0x1c2933=await askConfirmation(_0x4897f9(0x1c4)+'eam\x20foun'+_0x4897f9(0x1ae)+'\x22'+_0x3ae231+'\x22\x20to\x20\x22'+_0x4f5a98+'/'+_0x3ae231+(_0x4897f9(0x288)+_0x4897f9(0x240)+'am?\x20(y/N'+_0x4897f9(0x18a)));if(!_0x1c2933)return;try{_0x2636e7['PqYaP'](execFileSync,_0x2636e7[_0x4897f9(0x1b2)],[_0x4897f9(0x197),_0x2636e7[_0x4897f9(0x195)],_0x4f5a98,_0x3ae231],{'stdio':_0x2636e7[_0x4897f9(0x20a)]}),console[_0x4897f9(0x252)](ok('OK',_0x4897f9(0x1e8)+_0x4897f9(0x1a4)+_0x4897f9(0x204)+_0x4897f9(0x1d4)+'igured\x20('+_0x4f5a98+'/'+_0x3ae231+').'));}catch{_0x2636e7['JiPYM'](failAndExit,'Failed\x20t'+_0x4897f9(0x20c)+_0x3ae231+_0x4897f9(0x28f)+_0x4f5a98+'\x22.');}}export async function generateCommit(_0x4afb2b={}){const _0x15f3df=_0x5bb7,_0xca30a7={'xqeti':_0x15f3df(0x1c7)+_0x15f3df(0x242)+_0x15f3df(0x257),'EvsHs':_0x15f3df(0x297),'mapqj':_0x15f3df(0x18e),'OwYDM':function(_0x22bbf0,_0x8c54a9){return _0x22bbf0>_0x8c54a9;},'PKtXm':function(_0x587495,_0x1b9c0a){return _0x587495+_0x1b9c0a;},'gwwvm':function(_0x1b7c3c,_0x442285){return _0x1b7c3c(_0x442285);},'HAPJx':_0x15f3df(0x1fe)+_0x15f3df(0x212)+_0x15f3df(0x1cc)+'it.\x20Make'+_0x15f3df(0x162)+_0x15f3df(0x258)+_0x15f3df(0x21d)+_0x15f3df(0x259)+_0x15f3df(0x160),'Ehhlu':function(_0x287aa3){return _0x287aa3();},'BzrFA':function(_0x33614b){return _0x33614b();},'meedy':'1.\x20STAGE','pvCBo':function(_0x12b579,_0x170027,_0x5db30a){return _0x12b579(_0x170027,_0x5db30a);},'YDqCt':'Staged\x20a'+'ll\x20chang'+'es\x20(git\x20'+_0x15f3df(0x270),'imKAA':function(_0x5b624f,_0x204e69){return _0x5b624f===_0x204e69;},'xJTBB':'MhhKQ','fUmLa':function(_0x160b28,_0x2ec443){return _0x160b28>=_0x2ec443;},'GRxuW':function(_0x1c898d,_0x4fdcae,_0x1dc9ff){return _0x1c898d(_0x4fdcae,_0x1dc9ff);},'mTqRw':_0x15f3df(0x1ff)+_0x15f3df(0x1e1),'dznpo':function(_0x252d39,_0x420f5b){return _0x252d39===_0x420f5b;},'gIbtF':_0x15f3df(0x26c),'CFcYT':function(_0x19f52c,_0x2ed214){return _0x19f52c(_0x2ed214);},'VWUbg':'commit','NcPSa':_0x15f3df(0x25a),'rvksy':_0x15f3df(0x20e)+'ted)','skxBH':function(_0xc4af41,_0x8616b1){return _0xc4af41(_0x8616b1);},'gzXFW':'AI\x20is\x20th'+_0x15f3df(0x1bb)+'nd\x20reque'+_0x15f3df(0x287)+_0x15f3df(0x15f)+'.','fpfPb':function(_0xc0409,_0xa79ab0){return _0xc0409(_0xa79ab0);},'MYegZ':_0x15f3df(0x251)+_0x15f3df(0x189)+_0x15f3df(0x24c)+'t\x20messag'+'e.','BpRgM':_0x15f3df(0x17c)+'d\x20commit','YRlpD':_0x15f3df(0x16c)+_0x15f3df(0x173),'DDWoT':function(_0x127dfc,_0x33e603,_0x23c01b){return _0x127dfc(_0x33e603,_0x23c01b);},'okbqj':_0x15f3df(0x233),'rcWtR':_0x15f3df(0x28e)+_0x15f3df(0x275)+_0x15f3df(0x1b5)+'-dry-run'+_0x15f3df(0x296),'qvOQX':function(_0x2acd30,_0x1de1c5){return _0x2acd30(_0x1de1c5);},'PHTka':'Would\x20co'+_0x15f3df(0x1b7)+_0x15f3df(0x293),'VTval':_0x15f3df(0x17b),'kEhuc':_0x15f3df(0x1ca),'PvWeh':_0x15f3df(0x1dd)+_0x15f3df(0x20f)+_0x15f3df(0x16e),'MrORd':'boIAv','SZmHn':_0x15f3df(0x286),'IYioC':_0x15f3df(0x251)+_0x15f3df(0x23d)+_0x15f3df(0x205)+'\x20Check\x20i'+_0x15f3df(0x21b)+_0x15f3df(0x1a9)+_0x15f3df(0x19a)};if(_0x4afb2b[_0x15f3df(0x262)])return _0xca30a7[_0x15f3df(0x255)](amendLastCommit);const _0x4dbdfd=_0xca30a7[_0x15f3df(0x1a7)](getLLM);_0xca30a7['BzrFA'](getGitStatus),_0xca30a7['gwwvm'](section,_0xca30a7[_0x15f3df(0x19d)]);_0x4afb2b['all']&&(_0xca30a7[_0x15f3df(0x255)](stageAll),console['log'](_0xca30a7[_0x15f3df(0x238)](ok,'OK',_0xca30a7['YDqCt'])));const _0x12dfaa=getStagedContext(MAX_PROMPT_PATCH_CHARS);_0xca30a7['imKAA'](_0x12dfaa[_0x15f3df(0x184)]['length'],0x0)&&(_0xca30a7[_0x15f3df(0x23a)](_0xca30a7[_0x15f3df(0x227)],_0x15f3df(0x20d))?failAndExit(_0x15f3df(0x202)+_0x15f3df(0x19a)+'\x20Stage\x20c'+'hanges\x20f'+'irst\x20or\x20'+_0x15f3df(0x1d0)+_0x15f3df(0x27f)+_0x15f3df(0x244)+'.'):_0x48e90d=_0xca30a7[_0x15f3df(0x224)]);_0xca30a7['fUmLa'](_0x12dfaa[_0x15f3df(0x25f)][_0x15f3df(0x21e)+'t'],WARN_SPLIT_FILE_COUNT)&&console[_0x15f3df(0x252)](_0xca30a7[_0x15f3df(0x1de)](warn,_0x15f3df(0x223),_0x12dfaa['metrics'][_0x15f3df(0x21e)+'t']+(_0x15f3df(0x1fa)+_0x15f3df(0x26d)+_0x15f3df(0x1c8)+_0x15f3df(0x264)+_0x15f3df(0x1ce)+_0x15f3df(0x23e)+'multiple'+'\x20commits'+'.')));printList(_0xca30a7[_0x15f3df(0x295)],_0x12dfaa['files'][_0x15f3df(0x15b)](_0x1d1708=>_0x1d1708[_0x15f3df(0x265)]+'\x20'+_0x1d1708[_0x15f3df(0x25d)]));if(_0x4afb2b[_0x15f3df(0x269)]){if(_0xca30a7[_0x15f3df(0x163)](_0x15f3df(0x26c),_0xca30a7[_0x15f3df(0x182)]))console['log'](),runOptionalChecks();else{const _0x4dc916=_0x1e21f0(_0xca30a7[_0x15f3df(0x263)],[_0xca30a7['mapqj'],_0x15f3df(0x217),_0x15f3df(0x1f5)],{'stdio':'pipe'})['toString']()['trim']();_0x495d24=_0xca30a7[_0x15f3df(0x24a)](_0x4dc916[_0x15f3df(0x213)],_0x1c9a53)?_0xca30a7['PKtXm'](_0x4dc916['slice'](0x0,_0x26cb31),_0x15f3df(0x20e)+'ted)'):_0x4dc916;}}const _0x570072=_0xca30a7[_0x15f3df(0x20b)](summarizeChanges,_0x12dfaa),_0x4c3aec=_0xca30a7[_0x15f3df(0x23f)](detectCommitType,_0x12dfaa);_0x12dfaa['metrics'][_0x15f3df(0x196)+'rs']>WARN_PROMPT_DIFF_CHARS&&console[_0x15f3df(0x252)](warn(_0x15f3df(0x27b),_0x15f3df(0x1e4)+'aged\x20dif'+'f\x20('+_0x12dfaa[_0x15f3df(0x25f)]['patchCha'+'rs']+(_0x15f3df(0x232)+_0x15f3df(0x229)+_0x15f3df(0x201)+_0x15f3df(0x191)+_0x15f3df(0x261)+_0x15f3df(0x18d)+_0x15f3df(0x237))));const _0x54a967=_0xca30a7[_0x15f3df(0x23f)](loadPrompt,_0xca30a7[_0x15f3df(0x282)]),_0x29c0ae=_0xca30a7['GRxuW'](interpolate,_0x54a967,{'detected_type':_0x4c3aec,'staged_files':formatStagedFiles(_0x12dfaa),'summary':_0x570072,'diff_stat':_0x12dfaa[_0x15f3df(0x281)]||_0xca30a7[_0x15f3df(0x1ee)],'patch':''+(_0x12dfaa['patch']||_0xca30a7[_0x15f3df(0x1ee)])+(_0x12dfaa[_0x15f3df(0x25f)][_0x15f3df(0x1ea)+'d']?_0xca30a7[_0x15f3df(0x28d)]:'')});_0xca30a7[_0x15f3df(0x271)](section,_0x15f3df(0x1b8)+'ST');const _0x493b6a=await withProgress(_0xca30a7[_0x15f3df(0x29b)],()=>_0x4dbdfd[_0x15f3df(0x1db)](_0x29c0ae)),_0x3b6785=_0xca30a7[_0x15f3df(0x23f)](extractMessageText,_0x493b6a[_0x15f3df(0x22c)]);!_0x3b6785&&_0xca30a7['fpfPb'](failAndExit,_0xca30a7[_0x15f3df(0x280)]);_0xca30a7['fpfPb'](printKeyValues,[{'key':_0xca30a7['BpRgM'],'value':_0x3b6785}]);if(_0x4afb2b[_0x15f3df(0x1b4)]){const _0x5c5bc0=_0xca30a7[_0x15f3df(0x1a1)][_0x15f3df(0x174)]('|');let _0x377643=0x0;while(!![]){switch(_0x5c5bc0[_0x377643++]){case'0':console[_0x15f3df(0x252)]();continue;case'1':console['log'](_0xca30a7[_0x15f3df(0x1f8)](info,_0xca30a7[_0x15f3df(0x178)],_0xca30a7['rcWtR']));continue;case'2':_0xca30a7['qvOQX'](section,_0xca30a7[_0x15f3df(0x178)]);continue;case'3':_0xca30a7['GRxuW'](printList,_0xca30a7[_0x15f3df(0x1b6)],_0x12dfaa[_0x15f3df(0x184)][_0x15f3df(0x15b)](_0x14dff1=>_0x14dff1[_0x15f3df(0x265)]+'\x20'+_0x14dff1['path']));continue;case'4':printKeyValues([{'key':_0xca30a7['VTval'],'value':_0x3b6785}]);continue;case'5':return;case'6':console[_0x15f3df(0x252)]();continue;}break;}}console['log']();const _0x2b041c=await _0xca30a7[_0x15f3df(0x1de)](askConfirmation,'Commit\x20u'+_0x15f3df(0x1c0)+_0x15f3df(0x226)+_0x15f3df(0x175),{'defaultYes':!![]});if(!_0x2b041c){console[_0x15f3df(0x252)](warn(_0xca30a7[_0x15f3df(0x1bc)],_0xca30a7[_0x15f3df(0x199)]));return;}try{_0xca30a7[_0x15f3df(0x16a)]!==_0xca30a7[_0x15f3df(0x19b)]?execFileSync(_0xca30a7[_0x15f3df(0x263)],[_0xca30a7['VWUbg'],'-m',_0x3b6785],{'stdio':_0x15f3df(0x22f)}):_0xca30a7[_0x15f3df(0x20b)](_0x305f1d,_0xca30a7[_0x15f3df(0x1a2)]);}catch{failAndExit(_0xca30a7[_0x15f3df(0x161)]);}await _0xca30a7[_0x15f3df(0x255)](maybePushCurrentBranch);}async function amendLastCommit(){const _0x598df9=_0x5bb7,_0xd3f1f0={'vGcdE':function(_0x5a2c71,_0x298e9a){return _0x5a2c71(_0x298e9a);},'dlwXw':function(_0x5d9a89){return _0x5d9a89();},'oAdSk':function(_0xb68060,_0x389cb0,_0x2ae00d,_0x1e78a2){return _0xb68060(_0x389cb0,_0x2ae00d,_0x1e78a2);},'WFybA':'git','Wqjqh':'rev-pars'+'e','iiEkT':_0x598df9(0x245),'eYwBc':_0x598df9(0x1f5),'jdUrT':_0x598df9(0x27e),'ZUeTM':function(_0x5ad272,_0x3a9534,_0x23355d,_0x51a303){return _0x5ad272(_0x3a9534,_0x23355d,_0x51a303);},'akqeG':'--pretty'+_0x598df9(0x28a),'SjsWR':'Could\x20no'+_0x598df9(0x212)+_0x598df9(0x1cc)+_0x598df9(0x18c)+_0x598df9(0x162)+'ere\x20is\x20a'+_0x598df9(0x21d)+_0x598df9(0x259)+_0x598df9(0x160),'DoIRC':function(_0x294492,_0x2c9b4f){return _0x294492===_0x2c9b4f;},'Gtgap':'NsbDq','BmvYG':'show','igogW':_0x598df9(0x217),'BVvQZ':function(_0x14bda3,_0xf7bbe5){return _0x14bda3>_0xf7bbe5;},'fRxbm':function(_0x3248c0,_0x5de404){return _0x3248c0+_0x5de404;},'fbqRS':_0x598df9(0x1c7)+_0x598df9(0x242)+_0x598df9(0x257),'CPhdJ':_0x598df9(0x1c9),'NSfqs':function(_0x19fa0f,_0x1a563d){return _0x19fa0f(_0x1a563d);},'lyLNN':_0x598df9(0x1c1)+'mit','EyjGz':function(_0x84e2b5,_0x58fbb1,_0x41c0ab){return _0x84e2b5(_0x58fbb1,_0x41c0ab);},'EryQv':_0x598df9(0x277)+_0x598df9(0x17e),'LweFq':_0x598df9(0x22d),'quZlt':function(_0x334714,_0x4f39dd,_0x351ddb){return _0x334714(_0x4f39dd,_0x351ddb);},'fBVmm':_0x598df9(0x21a),'oFPuo':_0x598df9(0x26b)+_0x598df9(0x216)+'ed)','fGXHG':_0x598df9(0x254)+_0x598df9(0x207)+_0x598df9(0x170)+_0x598df9(0x219)+_0x598df9(0x210),'BZUUb':_0x598df9(0x1d5),'KcNuA':_0x598df9(0x1af),'itPFn':_0x598df9(0x253)+'age','woljT':_0x598df9(0x274)+_0x598df9(0x1b0)+'h\x20this\x20m'+_0x598df9(0x1c6)+_0x598df9(0x208),'vuMoI':_0x598df9(0x1ca),'ToqVA':'Commit\x20w'+_0x598df9(0x25b)+_0x598df9(0x236),'nIZzh':_0x598df9(0x22f),'cmKfe':_0x598df9(0x211),'wyOiR':_0x598df9(0x251)+_0x598df9(0x1f4)+_0x598df9(0x169)},_0xed1ac7=_0xd3f1f0[_0x598df9(0x1da)](getLLM);let _0xb4c78f,_0x233837;try{_0xb4c78f=_0xd3f1f0[_0x598df9(0x1c3)](execFileSync,_0xd3f1f0[_0x598df9(0x18b)],[_0xd3f1f0[_0x598df9(0x292)],_0xd3f1f0[_0x598df9(0x260)],_0xd3f1f0[_0x598df9(0x25c)]],{'stdio':_0xd3f1f0[_0x598df9(0x215)]})[_0x598df9(0x221)]()[_0x598df9(0x185)](),_0x233837=_0xd3f1f0['ZUeTM'](execFileSync,_0xd3f1f0[_0x598df9(0x18b)],[_0x598df9(0x252),'-1',_0xd3f1f0['akqeG']],{'stdio':_0xd3f1f0[_0x598df9(0x215)]})[_0x598df9(0x221)]()[_0x598df9(0x185)]();}catch{_0xd3f1f0[_0x598df9(0x198)](failAndExit,_0xd3f1f0[_0x598df9(0x187)]);}let _0x52632b;try{if(_0xd3f1f0['DoIRC'](_0xd3f1f0[_0x598df9(0x1b9)],_0xd3f1f0['Gtgap'])){const _0x5be635=execFileSync(_0xd3f1f0[_0x598df9(0x18b)],[_0xd3f1f0[_0x598df9(0x1d6)],_0xd3f1f0['igogW'],_0xd3f1f0['eYwBc']],{'stdio':_0xd3f1f0[_0x598df9(0x215)]})[_0x598df9(0x221)]()['trim']();_0x52632b=_0xd3f1f0[_0x598df9(0x21f)](_0x5be635['length'],MAX_PROMPT_PATCH_CHARS)?_0xd3f1f0['fRxbm'](_0x5be635[_0x598df9(0x230)](0x0,MAX_PROMPT_PATCH_CHARS),_0x598df9(0x20e)+'ted)'):_0x5be635;}else woaylZ[_0x598df9(0x198)](_0x5c11bb,_0x598df9(0x251)+_0x598df9(0x289)+'o\x20'+_0x161ddd[_0x598df9(0x26f)]+'.');}catch{_0x52632b=_0xd3f1f0[_0x598df9(0x200)];}section(_0xd3f1f0[_0x598df9(0x194)]),_0xd3f1f0[_0x598df9(0x256)](printKeyValues,[{'key':_0xd3f1f0['lyLNN'],'value':_0xd3f1f0[_0x598df9(0x15d)](style,_0xb4c78f,ui[_0x598df9(0x24e)])},{'key':_0xd3f1f0[_0x598df9(0x1a8)],'value':style(_0x233837,ui[_0x598df9(0x291)])}]);const _0x25836a=loadPrompt(_0xd3f1f0[_0x598df9(0x248)]),_0x5dde92=_0xd3f1f0[_0x598df9(0x284)](interpolate,_0x25836a,{'detected_type':_0xd3f1f0[_0x598df9(0x246)],'staged_files':_0xd3f1f0['oFPuo'],'summary':_0x598df9(0x22b)+_0x598df9(0x181)+'mmit:\x20'+_0x233837,'diff_stat':_0x52632b,'patch':_0x52632b}),_0x1e8643=await withProgress(_0xd3f1f0['fGXHG'],()=>_0xed1ac7[_0x598df9(0x1db)](_0x5dde92)),_0x3ba7df=_0xd3f1f0['NSfqs'](extractMessageText,_0x1e8643['content']);if(!_0x3ba7df){if(_0xd3f1f0[_0x598df9(0x166)]!==_0xd3f1f0[_0x598df9(0x192)])_0xd3f1f0[_0x598df9(0x256)](failAndExit,_0x598df9(0x251)+_0x598df9(0x189)+_0x598df9(0x16f)+_0x598df9(0x243)+'t\x20messag'+'e.');else return;}console[_0x598df9(0x252)](),printKeyValues([{'key':_0xd3f1f0[_0x598df9(0x26e)],'value':_0x3ba7df}]),console['log']();const _0x3af17a=await _0xd3f1f0['EyjGz'](askConfirmation,_0xd3f1f0['woljT'],{'defaultYes':!![]});if(!_0x3af17a){console[_0x598df9(0x252)](_0xd3f1f0[_0x598df9(0x15d)](warn,_0xd3f1f0['vuMoI'],_0xd3f1f0[_0x598df9(0x1e9)]));return;}try{_0xd3f1f0[_0x598df9(0x1c3)](execFileSync,_0x598df9(0x297),['commit',_0x598df9(0x1f1),'-m',_0x3ba7df],{'stdio':_0xd3f1f0[_0x598df9(0x239)]}),console[_0x598df9(0x252)](_0xd3f1f0[_0x598df9(0x284)](ok,_0xd3f1f0[_0x598df9(0x186)],'Last\x20com'+'mit\x20mess'+_0x598df9(0x1bf)+_0x598df9(0x25e)));}catch{failAndExit(_0xd3f1f0[_0x598df9(0x1c5)]);}}
|
|
1
|
+
(function(_0x2fe0eb,_0x1ada67){const _0x4a0374=_0x463b,_0x44157b=_0x2fe0eb();while(!![]){try{const _0x3c3ed1=parseInt(_0x4a0374(0x21c))/0x1+-parseInt(_0x4a0374(0x229))/0x2*(-parseInt(_0x4a0374(0x226))/0x3)+-parseInt(_0x4a0374(0x1ec))/0x4*(-parseInt(_0x4a0374(0x19e))/0x5)+parseInt(_0x4a0374(0x196))/0x6+-parseInt(_0x4a0374(0x1f7))/0x7+parseInt(_0x4a0374(0x1fd))/0x8*(-parseInt(_0x4a0374(0x117))/0x9)+-parseInt(_0x4a0374(0x130))/0xa;if(_0x3c3ed1===_0x1ada67)break;else _0x44157b['push'](_0x44157b['shift']());}catch(_0x1c38f4){_0x44157b['push'](_0x44157b['shift']());}}}(_0x2664,0xebe9f));const _0x3cc874=(function(){let _0x3e6883=!![];return function(_0x2409af,_0x3bac70){const _0x635924=_0x3e6883?function(){if(_0x3bac70){const _0x60c234=_0x3bac70['apply'](_0x2409af,arguments);return _0x3bac70=null,_0x60c234;}}:function(){};return _0x3e6883=![],_0x635924;};}()),_0x26549c=_0x3cc874(this,function(){const _0x219f4b=_0x463b,_0x4a865a={'ZoSZz':_0x219f4b(0x16b)+_0x219f4b(0x13f)};return _0x26549c[_0x219f4b(0x1c1)]()[_0x219f4b(0x1e6)](_0x4a865a[_0x219f4b(0x251)])[_0x219f4b(0x1c1)]()[_0x219f4b(0x17b)+_0x219f4b(0x223)](_0x26549c)[_0x219f4b(0x1e6)](_0x219f4b(0x16b)+_0x219f4b(0x13f));});_0x26549c();function _0x463b(_0x148624,_0x127cd1){_0x148624=_0x148624-0x112;const _0x5ebe4f=_0x2664();let _0x26549c=_0x5ebe4f[_0x148624];return _0x26549c;}import{execFileSync}from'child_process';import{interpolate,loadPrompt}from'../aiPrompts.js';import{createLLM,extractMessageText}from'../llm.js';import{askConfirmation}from'../prompts.js';import{getCurrentBranch,getDefaultRemote,getGitStatus,getStagedContext,getUpstreamInfo,stageAll}from'../git.js';import{failAndExit,info,ok,printKeyValues,printList,section,style,ui,warn,warnBlock,withProgress}from'../ui.js';const MAX_PROMPT_PATCH_CHARS=0x2710,WARN_SPLIT_FILE_COUNT=0xa,WARN_PROMPT_DIFF_CHARS=0xc350;function getLLM(){const _0x504dc5=_0x463b,_0x4b60d9={'VQsEu':function(_0x487e4e){return _0x487e4e();},'dDgKL':function(_0x572770,_0x46afd1){return _0x572770(_0x46afd1);},'kbRXd':function(_0x2634a9,_0xc0d472){return _0x2634a9(_0xc0d472);}};try{return _0x4b60d9['VQsEu'](createLLM);}catch(_0x26a9c9){const _0x3d9d01=_0x26a9c9 instanceof Error?_0x26a9c9[_0x504dc5(0x1eb)]:_0x4b60d9['dDgKL'](String,_0x26a9c9);_0x4b60d9[_0x504dc5(0x204)](failAndExit,_0x3d9d01);}}function countByStatus(_0x10d98d){const _0x5979db=_0x463b,_0x14ef73={'added':0x0,'modified':0x0,'deleted':0x0,'renamed':0x0,'other':0x0};for(const _0x20df0c of _0x10d98d[_0x5979db(0x213)]){if(_0x20df0c['status'][_0x5979db(0x188)+'th']('A')){_0x14ef73['added']+=0x1;continue;}if(_0x20df0c[_0x5979db(0x1de)][_0x5979db(0x188)+'th']('M')){_0x14ef73[_0x5979db(0x185)]+=0x1;continue;}if(_0x20df0c[_0x5979db(0x1de)][_0x5979db(0x188)+'th']('D')){_0x14ef73[_0x5979db(0x14d)]+=0x1;continue;}if(_0x20df0c[_0x5979db(0x1de)][_0x5979db(0x188)+'th']('R')){_0x14ef73['renamed']+=0x1;continue;}_0x14ef73['other']+=0x1;}return _0x14ef73;}function detectCommitType(_0x5ed64c){const _0x877744=_0x463b,_0x513494={'MclFJ':function(_0x528a2d,_0x2db19b){return _0x528a2d(_0x2db19b);},'fQkRl':function(_0x44a7c4,_0x2e521d){return _0x44a7c4>_0x2e521d;},'qMSoF':'docs','vDvVV':_0x877744(0x17e),'Vysut':function(_0x1fb0fb,_0x1445f3){return _0x1fb0fb===_0x1445f3;},'OqTTE':function(_0x3be4ca,_0x5a4f4c){return _0x3be4ca===_0x5a4f4c;},'qGWpT':function(_0x2dc7d8,_0x20e608){return _0x2dc7d8>=_0x20e608;},'TRYrj':'feat','TxRMJ':function(_0xf21da6,_0x310c2b){return _0xf21da6<=_0x310c2b;},'fDLev':_0x877744(0x22f),'ugCBg':'refactor'},_0x1a61e5=_0x5ed64c[_0x877744(0x213)][_0x877744(0x1ca)](_0x3edb45=>_0x3edb45[_0x877744(0x200)][_0x877744(0x156)+_0x877744(0x230)]()),_0x475c19=_0x513494[_0x877744(0x1f8)](countByStatus,_0x5ed64c);if(_0x513494[_0x877744(0x237)](_0x1a61e5[_0x877744(0x1ac)],0x0)&&_0x1a61e5[_0x877744(0x1c9)](_0x5d6063=>/(^|\/)(readme|docs?|changelog)/[_0x877744(0x17e)](_0x5d6063)||_0x5d6063[_0x877744(0x12e)]('.md')))return _0x513494['qMSoF'];if(_0x1a61e5[_0x877744(0x1ac)]>0x0&&_0x1a61e5[_0x877744(0x1c9)](_0x3e9fab=>/(^|\/)(test|tests|__tests__|spec)/['test'](_0x3e9fab)||/\.(spec|test)\./[_0x877744(0x17e)](_0x3e9fab)))return _0x513494[_0x877744(0x15a)];if(_0x513494[_0x877744(0x237)](_0x475c19[_0x877744(0x14d)],0x0)&&_0x513494['Vysut'](_0x475c19[_0x877744(0x1bb)],0x0)&&_0x513494['OqTTE'](_0x475c19['modified'],0x0))return'chore';if(_0x513494[_0x877744(0x186)](_0x475c19[_0x877744(0x1bb)],_0x475c19['modified'])&&_0x475c19['added']>0x0)return _0x513494[_0x877744(0x181)];if(_0x475c19[_0x877744(0x185)]>0x0&&_0x513494[_0x877744(0x201)](_0x5ed64c['metrics'][_0x877744(0x1f4)+'ns'],_0x5ed64c[_0x877744(0x141)]['deletion'+'s']))return _0x513494[_0x877744(0x184)];return _0x513494[_0x877744(0x219)];}function summarizeChanges(_0x5c2502){const _0x2539b8=_0x463b,_0x3b5923={'xkILw':function(_0x5bc0c2,_0x37bf2f){return _0x5bc0c2(_0x37bf2f);},'rKKDt':function(_0x2b294b,_0x432074){return _0x2b294b>_0x432074;},'kytAV':function(_0x107f88,_0x289a6d){return _0x107f88-_0x289a6d;},'lRyTB':function(_0x296e4e,_0x48a6f0){return _0x296e4e||_0x48a6f0;},'GIJUF':_0x2539b8(0x23f)+_0x2539b8(0x1bf)+'ailable.'},_0x1779d6=_0x3b5923[_0x2539b8(0x1b9)](countByStatus,_0x5c2502),_0x57786a=_0x5c2502[_0x2539b8(0x213)][_0x2539b8(0x20d)](0x0,0x3)[_0x2539b8(0x1ca)](_0x1ad244=>_0x1ad244[_0x2539b8(0x200)]),_0x43f9e9=_0x3b5923[_0x2539b8(0x257)](_0x5c2502[_0x2539b8(0x213)]['length'],0x3)?_0x57786a['join'](',\x20')+'\x20+'+_0x3b5923[_0x2539b8(0x17d)](_0x5c2502['files'][_0x2539b8(0x1ac)],0x3)+_0x2539b8(0x142):_0x57786a[_0x2539b8(0x19f)](',\x20');return _0x5c2502[_0x2539b8(0x141)][_0x2539b8(0x1b8)+'t']+(_0x2539b8(0x1cf)+_0x2539b8(0x164))+_0x1779d6['added']+_0x2539b8(0x1f0)+_0x1779d6[_0x2539b8(0x185)]+(_0x2539b8(0x1e8)+_0x2539b8(0x227))+_0x1779d6[_0x2539b8(0x14d)]+(_0x2539b8(0x205)+',\x20')+_0x1779d6[_0x2539b8(0x17a)]+('\x20renamed'+_0x2539b8(0x1e9))+_0x5c2502[_0x2539b8(0x141)][_0x2539b8(0x1f4)+'ns']+(_0x2539b8(0x1b3)+_0x2539b8(0x1e7))+_0x5c2502[_0x2539b8(0x141)][_0x2539b8(0x240)+'s']+(_0x2539b8(0x21a)+'ns.\x20')+_0x3b5923[_0x2539b8(0x1ad)](_0x43f9e9,_0x3b5923[_0x2539b8(0x252)]);}function _0x2664(){const _0xf9568d=['pleted\x20t','Push\x20com','label','n,\x20then\x20','f\x20you\x20ha','emit\x20com','BJbMx','hbkMF','t\x20read\x20l','hanged\x20(','mmit\x20qua','HwuyB','\x22\x20now?\x20(','ted)','SKIPPED','RXmzP','(((.+)+)','aLspv','igured\x20(','New\x20mess','TfXFH','MONEh','files\x20de','onfMK','Last\x20com','it.\x20Make','ere\x20is\x20a','ll\x20chang','t\x20least\x20','aVevr','1.\x20STAGE','renamed','construc','kOrXO','kytAV','test','(could\x20n','all','TRYrj','uQNiw','leaner\x20h','fDLev','modified','qGWpT','Current\x20','startsWi','\x20staged\x20','JegGL','XBuOO','npm.cmd','pIAMh','o\x20push\x20\x22','AI\x20is\x20th','git','r\x20use\x20`g','CHECK','KCRbp','aged\x20dif','it.','221094hhhEUS','xLRGi','etwork\x20c','Commit\x20w','docs','mLSaN','log','--if-pre','43855lvUlPt','join','lity\x20may','AMEND','ast\x20comm','wXJmL','Amending','ed)','\x20failed.','aZGtf','ng\x20into\x20','zEYCA','ed\x20commi','bRQll','length','lRyTB','SjhUA','ITXcH','jVFvt','\x20(Y/n):\x20','sEBdb','\x20inserti','diff)','IUtbD','ZCmgM','trim','fileCoun','xkILw','mCTAf','added','essage?\x20','am?\x20(y/N','HDYoK','paths\x20av','--short','toString','tBkDf','Staged\x20f','mended.','xpvgF','Large\x20st','ey\x20and\x20n','aODOM','every','map','pMHRK','ch\x20sent\x20','pHCtg','Staged\x20a','\x20files\x20c','t\x20upstre','\x20complet','IWAHv','uQFMx','mmit:\x20','age\x20ever','nd\x20upstr','content','o\x20create','Ebesv','Kvsit','l`\x20to\x20st','e\x20trunca','--amend','status','FPCSu','oAgwI','orQcv','commit','vAXQz','invoke','ything.','search','ons,\x20','\x20modifie','),\x20','hDirT','message','572vFecmh','AMENDED','sponse..','inherit','\x20added,\x20','t\x20messag','Push\x20cur','6|4|5','insertio','\x20sure\x20th','\x20for\x20a\x20c','5019987daBtjt','MclFJ','Running\x20','KOFNo','TDAOx','check','239928QAOfvS','Could\x20no','AI\x20is\x20ge','path','TxRMJ','KIsRU','QdGhx','kbRXd','\x20deleted','\x20a\x20bette','-dry-run','snXCv','reated.','f\x20(','able.','multiple','slice','d\x20files.','--set-up','push','pleted\x20a','y/N):\x20','files','platform','OVYZQ','\x20committ','to\x20the\x20A','OlABT','ugCBg','\x20deletio','win32','155585ffFuBo','stage\x20ch','XOlxi','as\x20not\x20a','\x20splitti','eqAsG','\x20mode).','tor','No\x20upstr','age\x20upda','21UJbKGW','d,\x20','\x0a(trunca','180620cptJvL','sHrya','es\x20(git\x20','split','inking\x20a','h\x20this\x20m','fix','ase','No\x20git\x20r','\x20Check\x20i','tgbYL','args','MOtMX','OMlbz','fQkRl','LiIfN','truncate','r\x20messag','yellow','as\x20not\x20c','nch\x20\x22','\x20Abortin','No\x20file\x20','deletion','ot\x20avail','XMWFw','qFwle','nZUgT','2.\x20SUGGE','amend','dryRun','npm','lint','SVhCR','ifoaW','branch','le>`\x20to\x20','I\x20will\x20b','fYnIu','mWGDN','ZoSZz','GIJUF','No\x20commi','iles','\x20be\x20redu','g\x20commit','rKKDt','remote','fullName','diffStat','Run\x20`git','No\x20stage','d\x20commit','):\x20','ed.','36uPhsZK','nerating','te\x20commi','mit\x20mess','ced.','BUdCX','KfKYQ','XiaLi','mit','Consider','gkuyV','zrMvV','Failed\x20t','dim','Message','\x20commits','CANCELED','tmfko','o\x20genera','show','ted.','anges,\x20o','YGruk','endsWith','ToJzv','2754490cZoXXy','sing\x20AI\x20','nfigured','run','patchCha','--pretty','...','KjzoC','CrUTt','zRXZv','sTfcG','HEAD','(Y/n):\x20','EPVHS','SorSQ','+)+$','rev-pars','metrics','\x20more','ot\x20read\x20','QDzEm','yuClX','lZXAZ','sjZQy','3.\x20FINIS','\x20commit.','emote\x20co','onnectio','UQIms','deleted','\x22\x20and\x20se','eam\x20foun','refactor','JfHov','ted\x20—\x20co','eated\x20(-','(none)','DRY\x20RUN','toLowerC','t\x20was\x20cr','rent\x20bra','\x20chars).','vDvVV'];_0x2664=function(){return _0xf9568d;};return _0x2664();}function formatStagedFiles(_0xc2c3f0){const _0x2f2d03=_0x463b;return _0xc2c3f0[_0x2f2d03(0x213)][_0x2f2d03(0x1ca)](_0x4c7323=>'-\x20'+_0x4c7323[_0x2f2d03(0x1de)]+'\x20'+_0x4c7323['path'])['join']('\x0a');}function runOptionalChecks(){const _0x156c48=_0x463b,_0xed72a6={'mLSaN':function(_0x561c2b,_0x1c6be5){return _0x561c2b===_0x1c6be5;},'sUCkX':_0x156c48(0x21b),'UQIms':_0x156c48(0x18c),'MOtMX':_0x156c48(0x248),'HwuyB':_0x156c48(0x249),'OSUQz':_0x156c48(0x133),'nZUgT':_0x156c48(0x19d)+'sent','KOFNo':_0x156c48(0x17e),'TDAOx':function(_0xb585e,_0x42d4d1,_0x4534d5){return _0xb585e(_0x42d4d1,_0x4534d5);},'XmdSK':_0x156c48(0x192),'IoIeU':function(_0x44eb5c,_0x2b7759,_0x575041,_0x5d3ee9){return _0x44eb5c(_0x2b7759,_0x575041,_0x5d3ee9);},'CrUTt':'inherit','EDFEl':function(_0x261978,_0x1b34b0){return _0x261978(_0x1b34b0);}},_0x4da51a=_0xed72a6[_0x156c48(0x19b)](process[_0x156c48(0x214)],_0xed72a6['sUCkX'])?_0xed72a6[_0x156c48(0x14c)]:_0xed72a6[_0x156c48(0x235)],_0x5b8955=[{'label':_0xed72a6[_0x156c48(0x166)],'args':[_0xed72a6['OSUQz'],'lint',_0xed72a6[_0x156c48(0x244)]]},{'label':_0xed72a6[_0x156c48(0x1fa)],'args':[_0xed72a6['OSUQz'],_0xed72a6[_0x156c48(0x1fa)],_0x156c48(0x19d)+'sent']}];for(const _0x1a6a63 of _0x5b8955){console[_0x156c48(0x19c)](_0xed72a6[_0x156c48(0x1fb)](info,_0xed72a6['XmdSK'],_0x156c48(0x1f9)+_0x1a6a63[_0x156c48(0x15d)]+_0x156c48(0x136)));try{_0xed72a6['IoIeU'](execFileSync,_0x4da51a,_0x1a6a63[_0x156c48(0x234)],{'stdio':_0xed72a6[_0x156c48(0x138)]}),console[_0x156c48(0x19c)](_0xed72a6['TDAOx'](ok,'OK',_0x1a6a63['label']+(_0x156c48(0x1d1)+_0x156c48(0x116))));}catch{_0xed72a6['EDFEl'](failAndExit,_0x1a6a63[_0x156c48(0x15d)]+(_0x156c48(0x1a6)+_0x156c48(0x23e)+_0x156c48(0x256)+'.'));}}}async function maybePushCurrentBranch(){const _0x3a89ae=_0x463b,_0x38c1f5={'orQcv':function(_0x206e0c){return _0x206e0c();},'BJbMx':function(_0x691053){return _0x691053();},'SVhCR':function(_0x474d9a,_0x1f0d0b,_0x1b9336,_0x4102b6){return _0x474d9a(_0x1f0d0b,_0x1b9336,_0x4102b6);},'YGruk':_0x3a89ae(0x190),'lZXAZ':_0x3a89ae(0x210),'XMWFw':_0x3a89ae(0x1ef),'KjzoC':function(_0x12efd1,_0x48ed05,_0xccf7fe){return _0x12efd1(_0x48ed05,_0xccf7fe);},'SjhUA':function(_0x4b53b0,_0x48300a){return _0x4b53b0(_0x48300a);},'FPCSu':_0x3a89ae(0x169),'tBkDf':_0x3a89ae(0x231)+_0x3a89ae(0x14a)+_0x3a89ae(0x132)+'.\x20Push\x20n'+_0x3a89ae(0x241)+_0x3a89ae(0x20b),'XiaLi':function(_0x12fc2d,_0x17992b,_0x17481d,_0x73bccf){return _0x12fc2d(_0x17992b,_0x17481d,_0x73bccf);},'pIAMh':function(_0x46b68f,_0xd054e9,_0x1b7c7f){return _0x46b68f(_0xd054e9,_0x1b7c7f);},'JfHov':function(_0x4e47cd,_0x539e9d){return _0x4e47cd(_0x539e9d);}},_0x5edebc=_0x38c1f5[_0x3a89ae(0x1e1)](getCurrentBranch),_0x2ca0a5=_0x38c1f5[_0x3a89ae(0x161)](getUpstreamInfo);if(_0x2ca0a5){const _0x46f75a=await askConfirmation(_0x3a89ae(0x1f2)+_0x3a89ae(0x158)+_0x3a89ae(0x23d)+_0x5edebc+'\x22\x20to\x20\x22'+_0x2ca0a5[_0x3a89ae(0x259)]+(_0x3a89ae(0x167)+_0x3a89ae(0x212)));if(!_0x46f75a)return;try{_0x38c1f5[_0x3a89ae(0x24a)](execFileSync,_0x38c1f5[_0x3a89ae(0x12d)],[_0x38c1f5['lZXAZ'],_0x2ca0a5[_0x3a89ae(0x258)],_0x5edebc+':'+_0x2ca0a5[_0x3a89ae(0x24c)]],{'stdio':_0x38c1f5[_0x3a89ae(0x242)]}),console[_0x3a89ae(0x19c)](_0x38c1f5[_0x3a89ae(0x137)](ok,'OK',_0x3a89ae(0x15c)+_0x3a89ae(0x15b)+'o\x20'+_0x2ca0a5[_0x3a89ae(0x259)]+'.'));}catch{_0x38c1f5['SjhUA'](failAndExit,_0x3a89ae(0x123)+'o\x20push\x20t'+'o\x20'+_0x2ca0a5[_0x3a89ae(0x259)]+'.');}return;}const _0x37851c=getDefaultRemote();if(!_0x37851c){console[_0x3a89ae(0x19c)](_0x38c1f5[_0x3a89ae(0x137)](warn,_0x38c1f5[_0x3a89ae(0x1df)],_0x38c1f5[_0x3a89ae(0x1c2)]));return;}const _0x11997f=await _0x38c1f5[_0x3a89ae(0x1ae)](askConfirmation,_0x3a89ae(0x224)+_0x3a89ae(0x14f)+'d.\x20Push\x20'+'\x22'+_0x5edebc+'\x22\x20to\x20\x22'+_0x37851c+'/'+_0x5edebc+(_0x3a89ae(0x14e)+_0x3a89ae(0x1d0)+_0x3a89ae(0x1bd)+_0x3a89ae(0x115)));if(!_0x11997f)return;try{_0x38c1f5[_0x3a89ae(0x11e)](execFileSync,_0x3a89ae(0x190),[_0x38c1f5[_0x3a89ae(0x146)],_0x3a89ae(0x20f)+'stream',_0x37851c,_0x5edebc],{'stdio':_0x38c1f5[_0x3a89ae(0x242)]}),console[_0x3a89ae(0x19c)](_0x38c1f5[_0x3a89ae(0x18d)](ok,'OK','Push\x20com'+_0x3a89ae(0x211)+_0x3a89ae(0x1d6)+'eam\x20conf'+_0x3a89ae(0x16d)+_0x37851c+'/'+_0x5edebc+').'));}catch{_0x38c1f5[_0x3a89ae(0x151)](failAndExit,_0x3a89ae(0x123)+_0x3a89ae(0x18e)+_0x5edebc+'\x22\x20to\x20\x22'+_0x37851c+'\x22.');}}export async function generateCommit(_0x4898d1={}){const _0x4d7ccd=_0x463b,_0x3e6efa={'tgbYL':function(_0x1c7233){return _0x1c7233();},'xpvgF':function(_0x1bf9de,_0x1c3e2f){return _0x1bf9de(_0x1c3e2f);},'wtuJr':function(_0x26e360){return _0x26e360();},'XOlxi':_0x4d7ccd(0x179),'pHCtg':function(_0x44e41e,_0x55f45e,_0x51416f){return _0x44e41e(_0x55f45e,_0x51416f);},'kOrXO':_0x4d7ccd(0x1ce)+_0x4d7ccd(0x176)+_0x4d7ccd(0x22b)+'add\x20.).','XBuOO':function(_0x3bca43,_0xcc5712){return _0x3bca43===_0xcc5712;},'gkuyV':function(_0x1eba39,_0x1d6f93,_0x4c6213){return _0x1eba39(_0x1d6f93,_0x4c6213);},'JegGL':_0x4d7ccd(0x113)+_0x4d7ccd(0x20e),'gEyTQ':_0x4d7ccd(0x112)+'\x20add\x20<fi'+_0x4d7ccd(0x24d)+_0x4d7ccd(0x21d)+_0x4d7ccd(0x12c)+_0x4d7ccd(0x191)+_0x4d7ccd(0x160)+'mit\x20--al'+_0x4d7ccd(0x1db)+_0x4d7ccd(0x1d5)+_0x4d7ccd(0x1e5),'VkXFs':function(_0x37e258,_0x1dc68e){return _0x37e258>=_0x1dc68e;},'ifoaW':function(_0x3f2be4,_0x59781b){return _0x3f2be4(_0x59781b);},'pMHRK':function(_0xedd2ad,_0x430f29,_0x200bcf){return _0xedd2ad(_0x430f29,_0x200bcf);},'OMlbz':_0x4d7ccd(0x1c3)+_0x4d7ccd(0x254),'sEBdb':function(_0x309a83){return _0x309a83();},'RXmzP':function(_0x1d3617,_0x3a85ed){return _0x1d3617!==_0x3a85ed;},'hDirT':_0x4d7ccd(0x12f),'qkkoa':_0x4d7ccd(0x1b5),'QDzEm':function(_0x37dff6,_0xf4b9fd){return _0x37dff6(_0xf4b9fd);},'LiIfN':_0x4d7ccd(0x1e2),'sTfcG':_0x4d7ccd(0x154),'oAgwI':_0x4d7ccd(0x228)+_0x4d7ccd(0x168),'uQFMx':function(_0xb76066,_0x5ec8a2){return _0xb76066(_0x5ec8a2);},'zEYCA':function(_0x17af73,_0x4f541b,_0x129538){return _0x17af73(_0x4f541b,_0x129538);},'vAXQz':_0x4d7ccd(0x18f)+_0x4d7ccd(0x22d)+'nd\x20reque'+'sting\x20re'+_0x4d7ccd(0x1ee)+'.','mWGDN':_0x4d7ccd(0x123)+_0x4d7ccd(0x129)+_0x4d7ccd(0x119)+_0x4d7ccd(0x1f1)+'e.','OVYZQ':'Check\x20yo'+'ur\x20API\x20k'+_0x4d7ccd(0x1c7)+_0x4d7ccd(0x198)+_0x4d7ccd(0x14b)+_0x4d7ccd(0x15e)+'try\x20agai'+'n.','SorSQ':function(_0x20e616,_0x20cdfd){return _0x20e616(_0x20cdfd);},'nulbu':'Would\x20co'+'mmit\x20the'+'se\x20files','rCDIl':function(_0x44c05c,_0x554aac,_0x49645a){return _0x44c05c(_0x554aac,_0x49645a);},'aLspv':_0x4d7ccd(0x155),'jsGYa':_0x4d7ccd(0x253)+_0x4d7ccd(0x157)+_0x4d7ccd(0x153)+_0x4d7ccd(0x207)+_0x4d7ccd(0x222),'KIsRU':_0x4d7ccd(0x125),'zrMvV':'Commit\x20u'+_0x4d7ccd(0x131)+'message?'+_0x4d7ccd(0x1b1),'OSWzR':_0x4d7ccd(0x127),'HDYoK':_0x4d7ccd(0x190),'fnElM':_0x4d7ccd(0x1ef),'QdGhx':_0x4d7ccd(0x123)+_0x4d7ccd(0x1d8)+_0x4d7ccd(0x149)+_0x4d7ccd(0x232)+_0x4d7ccd(0x15f)+'ve\x20stage'+_0x4d7ccd(0x20e),'xLRGi':_0x4d7ccd(0x148)+'H'};if(_0x4898d1[_0x4d7ccd(0x246)])return _0x3e6efa['tgbYL'](amendLastCommit);const _0x44b7cd=_0x3e6efa['wtuJr'](getLLM);_0x3e6efa[_0x4d7ccd(0x233)](getGitStatus),_0x3e6efa[_0x4d7ccd(0x1c5)](section,_0x3e6efa[_0x4d7ccd(0x21e)]);_0x4898d1[_0x4d7ccd(0x180)]&&(stageAll(),console[_0x4d7ccd(0x19c)](_0x3e6efa[_0x4d7ccd(0x1cd)](ok,'OK',_0x3e6efa[_0x4d7ccd(0x17c)])));const _0x3c7eda=_0x3e6efa[_0x4d7ccd(0x1c5)](getStagedContext,MAX_PROMPT_PATCH_CHARS);_0x3e6efa[_0x4d7ccd(0x18b)](_0x3c7eda[_0x4d7ccd(0x213)][_0x4d7ccd(0x1ac)],0x0)&&_0x3e6efa[_0x4d7ccd(0x121)](failAndExit,_0x3e6efa[_0x4d7ccd(0x18a)],_0x3e6efa['gEyTQ']);_0x3e6efa['VkXFs'](_0x3c7eda['metrics'][_0x4d7ccd(0x1b8)+'t'],WARN_SPLIT_FILE_COUNT)&&_0x3e6efa[_0x4d7ccd(0x24b)](warnBlock,_0x3c7eda[_0x4d7ccd(0x141)][_0x4d7ccd(0x1b8)+'t']+(_0x4d7ccd(0x189)+_0x4d7ccd(0x171)+'tected.\x20'+_0x4d7ccd(0x120)+_0x4d7ccd(0x220)+_0x4d7ccd(0x1a8)+_0x4d7ccd(0x20c)+_0x4d7ccd(0x126)+_0x4d7ccd(0x1f6)+_0x4d7ccd(0x183)+'istory.'));_0x3e6efa[_0x4d7ccd(0x1cb)](printList,_0x3e6efa[_0x4d7ccd(0x236)],_0x3c7eda[_0x4d7ccd(0x213)]['map'](_0x54d59d=>_0x54d59d[_0x4d7ccd(0x1de)]+'\x20'+_0x54d59d[_0x4d7ccd(0x200)]));_0x4898d1[_0x4d7ccd(0x1fc)]&&(console['log'](),_0x3e6efa[_0x4d7ccd(0x1b2)](runOptionalChecks));const _0xf5a816=summarizeChanges(_0x3c7eda),_0xdbf693=detectCommitType(_0x3c7eda);if(_0x3c7eda[_0x4d7ccd(0x141)][_0x4d7ccd(0x134)+'rs']>WARN_PROMPT_DIFF_CHARS){if(_0x3e6efa[_0x4d7ccd(0x16a)](_0x3e6efa[_0x4d7ccd(0x1ea)],_0x3e6efa['qkkoa']))_0x3e6efa[_0x4d7ccd(0x144)](warnBlock,_0x4d7ccd(0x1c6)+_0x4d7ccd(0x194)+_0x4d7ccd(0x20a)+_0x3c7eda[_0x4d7ccd(0x141)][_0x4d7ccd(0x134)+'rs']+(_0x4d7ccd(0x159)+'\x20The\x20pat'+_0x4d7ccd(0x1cc)+_0x4d7ccd(0x217)+_0x4d7ccd(0x24e)+_0x4d7ccd(0x1dc)+_0x4d7ccd(0x152)+_0x4d7ccd(0x165)+_0x4d7ccd(0x1a0)+_0x4d7ccd(0x255)+_0x4d7ccd(0x11b)));else try{return EdKGll[_0x4d7ccd(0x233)](_0x49d97c);}catch(_0x49bc8c){const _0x4af274=_0x49bc8c instanceof _0x39b317?_0x49bc8c[_0x4d7ccd(0x1eb)]:_0x5b997b(_0x49bc8c);EdKGll[_0x4d7ccd(0x1c5)](_0x2486cc,_0x4af274);}}const _0x3eb8ce=_0x3e6efa[_0x4d7ccd(0x144)](loadPrompt,_0x3e6efa[_0x4d7ccd(0x238)]),_0x56ae4f=interpolate(_0x3eb8ce,{'detected_type':_0xdbf693,'staged_files':_0x3e6efa['QDzEm'](formatStagedFiles,_0x3c7eda),'summary':_0xf5a816,'diff_stat':_0x3c7eda[_0x4d7ccd(0x25a)]||_0x3e6efa[_0x4d7ccd(0x13a)],'patch':''+(_0x3c7eda['patch']||_0x4d7ccd(0x154))+(_0x3c7eda[_0x4d7ccd(0x141)][_0x4d7ccd(0x239)+'d']?_0x3e6efa[_0x4d7ccd(0x1e0)]:'')});_0x3e6efa['uQFMx'](section,_0x4d7ccd(0x245)+'ST');const _0x32742d=await _0x3e6efa[_0x4d7ccd(0x1a9)](withProgress,_0x3e6efa[_0x4d7ccd(0x1e3)],()=>_0x44b7cd[_0x4d7ccd(0x1e4)](_0x56ae4f)),_0x5d0502=_0x3e6efa[_0x4d7ccd(0x1d3)](extractMessageText,_0x32742d[_0x4d7ccd(0x1d7)]);!_0x5d0502&&_0x3e6efa[_0x4d7ccd(0x121)](failAndExit,_0x3e6efa[_0x4d7ccd(0x250)],_0x3e6efa[_0x4d7ccd(0x215)]);_0x3e6efa[_0x4d7ccd(0x13e)](printKeyValues,[{'key':'Suggeste'+_0x4d7ccd(0x114),'value':_0x5d0502}]);if(_0x4898d1[_0x4d7ccd(0x247)]){const _0x58b281=('3|2|0|1|'+_0x4d7ccd(0x1f3))[_0x4d7ccd(0x22c)]('|');let _0x19cc83=0x0;while(!![]){switch(_0x58b281[_0x19cc83++]){case'0':console['log']();continue;case'1':_0x3e6efa['pMHRK'](printList,_0x3e6efa['nulbu'],_0x3c7eda['files'][_0x4d7ccd(0x1ca)](_0x28d94c=>_0x28d94c[_0x4d7ccd(0x1de)]+'\x20'+_0x28d94c['path']));continue;case'2':console['log'](_0x3e6efa['rCDIl'](info,_0x3e6efa[_0x4d7ccd(0x16c)],_0x3e6efa['jsGYa']));continue;case'3':_0x3e6efa[_0x4d7ccd(0x144)](section,_0x3e6efa['aLspv']);continue;case'4':console['log']();continue;case'5':return;case'6':printKeyValues([{'key':_0x3e6efa[_0x4d7ccd(0x202)],'value':_0x5d0502}]);continue;}break;}}console[_0x4d7ccd(0x19c)]();const _0x4419fc=await askConfirmation(_0x3e6efa[_0x4d7ccd(0x122)],{'defaultYes':!![]});if(!_0x4419fc){console['log'](warn(_0x3e6efa['OSWzR'],_0x4d7ccd(0x199)+_0x4d7ccd(0x23c)+_0x4d7ccd(0x209)));return;}try{execFileSync(_0x3e6efa[_0x4d7ccd(0x1be)],[_0x3e6efa[_0x4d7ccd(0x238)],'-m',_0x5d0502],{'stdio':_0x3e6efa['fnElM']});}catch{_0x3e6efa['xpvgF'](failAndExit,_0x3e6efa[_0x4d7ccd(0x203)]);}_0x3e6efa[_0x4d7ccd(0x13e)](section,_0x3e6efa[_0x4d7ccd(0x197)]),await _0x3e6efa['sEBdb'](maybePushCurrentBranch);}async function amendLastCommit(){const _0xa073ff=_0x463b,_0xfef0f3={'KfKYQ':function(_0xc59714){return _0xc59714();},'aAJNr':function(_0x3b3ac4,_0x13d122,_0x29c283,_0x4f7ee5){return _0x3b3ac4(_0x13d122,_0x29c283,_0x4f7ee5);},'sHrya':_0xa073ff(0x190),'BUdCX':_0xa073ff(0x1c0),'Kvsit':function(_0x458921,_0x4f3f24,_0x354f6e,_0x2d6164){return _0x458921(_0x4f3f24,_0x354f6e,_0x2d6164);},'onfMK':_0xa073ff(0x135)+'=%B','fYnIu':'pipe','Ebesv':function(_0x14bd2d,_0x35d94c){return _0x14bd2d(_0x35d94c);},'bRQll':_0xa073ff(0x1fe)+_0xa073ff(0x163)+_0xa073ff(0x1a2)+_0xa073ff(0x174)+_0xa073ff(0x1f5)+_0xa073ff(0x175)+_0xa073ff(0x177)+'one\x20comm'+_0xa073ff(0x195),'EPVHS':function(_0x5f10eb,_0x3e91ca,_0x2ef531,_0x5bb1e1){return _0x5f10eb(_0x3e91ca,_0x2ef531,_0x5bb1e1);},'TfXFH':_0xa073ff(0x12a),'tmfko':_0xa073ff(0x13b),'tzlMt':function(_0x380517,_0x326016){return _0x380517>_0x326016;},'aODOM':function(_0x2344df,_0x4ef1be){return _0x2344df+_0x4ef1be;},'DrPKm':'\x0a(trunca'+_0xa073ff(0x168),'sjZQy':_0xa073ff(0x17f)+_0xa073ff(0x143)+_0xa073ff(0x1b4),'OlABT':function(_0x38fbcd,_0x1a09f6){return _0x38fbcd(_0x1a09f6);},'zRXZv':_0xa073ff(0x173)+_0xa073ff(0x11f),'snXCv':function(_0x39d9ce,_0x5a3077,_0x1d1711){return _0x39d9ce(_0x5a3077,_0x1d1711);},'mCTAf':_0xa073ff(0x187)+_0xa073ff(0x1eb),'hbkMF':function(_0x504725,_0x916b3a,_0x1e0708){return _0x504725(_0x916b3a,_0x1e0708);},'IWAHv':function(_0x38345f,_0x2eedc6){return _0x38345f(_0x2eedc6);},'MONEh':_0xa073ff(0x150),'uQNiw':'(already'+_0xa073ff(0x216)+_0xa073ff(0x1a5),'jVFvt':_0xa073ff(0x1ff)+_0xa073ff(0x118)+_0xa073ff(0x206)+_0xa073ff(0x23a)+'e...','ZCmgM':'Failed\x20t'+'o\x20genera'+'te\x20amend'+_0xa073ff(0x1aa)+_0xa073ff(0x1f1)+'e.','aVevr':'Amend\x20co'+'mmit\x20wit'+_0xa073ff(0x22e)+_0xa073ff(0x1bc)+_0xa073ff(0x13c),'KCRbp':_0xa073ff(0x127),'yuClX':function(_0x3182d1,_0x5613b3){return _0x3182d1!==_0x5613b3;},'nNXAw':_0xa073ff(0x1af),'wVZqY':'SDKIO','eqAsG':function(_0x2b3741,_0x31af12,_0x538c6a,_0x4e4c68){return _0x2b3741(_0x31af12,_0x538c6a,_0x4e4c68);},'aZGtf':_0xa073ff(0x1dd),'pxjpk':_0xa073ff(0x1ef),'wXJmL':_0xa073ff(0x1ed),'qFwle':_0xa073ff(0x173)+_0xa073ff(0x11a)+_0xa073ff(0x225)+_0xa073ff(0x12b)},_0x4cacfd=_0xfef0f3[_0xa073ff(0x11d)](getLLM);let _0x37d58f,_0x40c790;try{_0x37d58f=_0xfef0f3['aAJNr'](execFileSync,_0xfef0f3[_0xa073ff(0x22a)],[_0xa073ff(0x140)+'e',_0xfef0f3[_0xa073ff(0x11c)],_0xa073ff(0x13b)],{'stdio':'pipe'})[_0xa073ff(0x1c1)]()[_0xa073ff(0x1b7)](),_0x40c790=_0xfef0f3[_0xa073ff(0x1da)](execFileSync,_0xfef0f3['sHrya'],['log','-1',_0xfef0f3[_0xa073ff(0x172)]],{'stdio':_0xfef0f3[_0xa073ff(0x24f)]})['toString']()[_0xa073ff(0x1b7)]();}catch{_0xfef0f3['Ebesv'](failAndExit,_0xfef0f3[_0xa073ff(0x1ab)]);}let _0xe5375;try{const _0x3e04ba=_0xfef0f3[_0xa073ff(0x13d)](execFileSync,_0xa073ff(0x190),[_0xfef0f3[_0xa073ff(0x16f)],'--stat',_0xfef0f3[_0xa073ff(0x128)]],{'stdio':_0xfef0f3[_0xa073ff(0x24f)]})[_0xa073ff(0x1c1)]()['trim']();_0xe5375=_0xfef0f3['tzlMt'](_0x3e04ba[_0xa073ff(0x1ac)],MAX_PROMPT_PATCH_CHARS)?_0xfef0f3[_0xa073ff(0x1c8)](_0x3e04ba['slice'](0x0,MAX_PROMPT_PATCH_CHARS),_0xfef0f3['DrPKm']):_0x3e04ba;}catch{_0xe5375=_0xfef0f3[_0xa073ff(0x147)];}_0xfef0f3[_0xa073ff(0x218)](section,_0xa073ff(0x1a1)),_0xfef0f3[_0xa073ff(0x218)](printKeyValues,[{'key':_0xfef0f3[_0xa073ff(0x139)],'value':_0xfef0f3['snXCv'](style,_0x37d58f,ui[_0xa073ff(0x23b)])},{'key':_0xfef0f3[_0xa073ff(0x1ba)],'value':_0xfef0f3[_0xa073ff(0x162)](style,_0x40c790,ui[_0xa073ff(0x124)])}]);const _0x8fc3bd=_0xfef0f3[_0xa073ff(0x1d2)](loadPrompt,_0xa073ff(0x1e2)),_0x261aa6=interpolate(_0x8fc3bd,{'detected_type':_0xfef0f3[_0xa073ff(0x170)],'staged_files':_0xfef0f3[_0xa073ff(0x182)],'summary':_0xa073ff(0x1a4)+'\x20last\x20co'+_0xa073ff(0x1d4)+_0x40c790,'diff_stat':_0xe5375,'patch':_0xe5375}),_0x37e32c=await _0xfef0f3[_0xa073ff(0x208)](withProgress,_0xfef0f3[_0xa073ff(0x1b0)],()=>_0x4cacfd[_0xa073ff(0x1e4)](_0x261aa6)),_0x2faab7=extractMessageText(_0x37e32c[_0xa073ff(0x1d7)]);!_0x2faab7&&_0xfef0f3[_0xa073ff(0x218)](failAndExit,_0xfef0f3[_0xa073ff(0x1b6)]);console['log'](),_0xfef0f3[_0xa073ff(0x1d9)](printKeyValues,[{'key':_0xa073ff(0x16e)+'age','value':_0x2faab7}]),console[_0xa073ff(0x19c)]();const _0x376e22=await _0xfef0f3[_0xa073ff(0x162)](askConfirmation,_0xfef0f3[_0xa073ff(0x178)],{'defaultYes':!![]});if(!_0x376e22){console[_0xa073ff(0x19c)](warn(_0xfef0f3[_0xa073ff(0x193)],'Commit\x20w'+_0xa073ff(0x21f)+_0xa073ff(0x1c4)));return;}try{if(_0xfef0f3[_0xa073ff(0x145)](_0xfef0f3['nNXAw'],_0xfef0f3['wVZqY']))_0xfef0f3[_0xa073ff(0x221)](execFileSync,_0xfef0f3['sHrya'],[_0xa073ff(0x1e2),_0xfef0f3[_0xa073ff(0x1a7)],'-m',_0x2faab7],{'stdio':_0xfef0f3['pxjpk']}),console[_0xa073ff(0x19c)](ok(_0xfef0f3[_0xa073ff(0x1a3)],_0xfef0f3[_0xa073ff(0x243)]));else return _0xa073ff(0x19a);}catch{failAndExit('Failed\x20t'+'o\x20amend\x20'+'commit.');}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x51cbe6=_0x141e;(function(_0xcc820d,_0x5ae9dd){const _0x30176e=_0x141e,_0x48ad33=_0xcc820d();while(!![]){try{const _0x2507c0=-parseInt(_0x30176e(0x1ce))/0x1*(-parseInt(_0x30176e(0x1c6))/0x2)+parseInt(_0x30176e(0x1d7))/0x3+-parseInt(_0x30176e(0x1e6))/0x4+-parseInt(_0x30176e(0x159))/0x5+-parseInt(_0x30176e(0x1b0))/0x6*(parseInt(_0x30176e(0x1f4))/0x7)+-parseInt(_0x30176e(0x1ac))/0x8+parseInt(_0x30176e(0x175))/0x9;if(_0x2507c0===_0x5ae9dd)break;else _0x48ad33['push'](_0x48ad33['shift']());}catch(_0x5767dd){_0x48ad33['push'](_0x48ad33['shift']());}}}(_0x411a,0x6c51b));const _0x7b6725=(function(){let _0x30c219=!![];return function(_0x57bc2d,_0x236204){const _0x5a939f=_0x30c219?function(){const _0xa12b7c=_0x141e;if(_0x236204){const _0x269c57=_0x236204[_0xa12b7c(0x1a6)](_0x57bc2d,arguments);return _0x236204=null,_0x269c57;}}:function(){};return _0x30c219=![],_0x5a939f;};}()),_0x106f1a=_0x7b6725(this,function(){const _0x473055=_0x141e,_0x26ee16={'EyCII':_0x473055(0x1b8)+'+)+$'};return _0x106f1a[_0x473055(0x178)]()[_0x473055(0x1eb)](_0x26ee16['EyCII'])[_0x473055(0x178)]()['construc'+'tor'](_0x106f1a)[_0x473055(0x1eb)]('(((.+)+)'+'+)+$');});_0x106f1a();import{existsSync,mkdirSync,readFileSync,writeFileSync}from'fs';import{dirname}from'path';import{getGlobalEnvPath}from'../config.js';import{askConfirmation,askInput}from'../prompts.js';import{bad,failAndExit,ok,printKeyValues,section,warn}from'../ui.js';function _0x141e(_0x53fdb7,_0x5a7862){_0x53fdb7=_0x53fdb7-0x155;const _0x188ea3=_0x411a();let _0x106f1a=_0x188ea3[_0x53fdb7];return _0x106f1a;}function getProviderKeyName(_0x574911){const _0xad85ea=_0x141e,_0x25461c={'SgLck':'google','RYcbY':_0xad85ea(0x1e1)+'PI_KEY','wXBav':_0xad85ea(0x16c),'XognQ':_0xad85ea(0x17b)+_0xad85ea(0x1a4)+'Y'};if(_0x574911===_0x25461c[_0xad85ea(0x1f6)])return _0x25461c[_0xad85ea(0x1d2)];if(_0x574911===_0x25461c['wXBav'])return'OPENAI_A'+_0xad85ea(0x1a0);return _0x25461c[_0xad85ea(0x15e)];}function _0x411a(){const _0x300228=['Unknown\x20','PI_KEY','provider','(not\x20set','waHgA','C_API_KE','ini','apply','ATION\x20SA','Old\x20valu','anthropi','):\x20','zJlTD','2796624NLfnrz','s\x20(en/pt','BYbyW','***','18ldJhts','dgiTi','LLM_PROV','hsXrg','en\x20or\x20pt','trim','XemFS','set','(((.+)+)','NRToK','ed\x20keys:','PEPav','ROsns','WOqEg','gpCJW','GEMINI_A','iIywm','NGUAGE','LMFXs','\x20anthrop','IbIyH','le]:\x20','60epFBOl','VhcBX','nvdoE','language','TozOS','includes','yHGcV','\x20already','28081YKsmiq','QBvRu','OPENAI_A','PWHNr','RYcbY','rslvj','Invalid\x20','missing','join','1991772hAnBvP','-br','Use:\x20gem','ase','.5-flash','c)\x20[goog','HrXXp','HKAjw','NCCdw','xUnYa','GOOGLE_A','\x22.\x20Allow','LLM_MODE','vCqtn','KEY','834712gcuJaV','wn,\x20usin','kvraO','IDER=\x22','format.\x20','search','yEBMQ','env','env\x20path','g\x20--set\x20','MUCPd','XsSVK','kplIx','GEMIT_LA','122479ygwrUZ','google','SgLck','UpfXU','ywfvd','qhUzw','FEMEB','Key','Rtthc','utf8','Y=\x22','NABFb','BmOLq','ic.','OJdQo','key\x20\x22','UgQJA','gTkWU','NGUAGE=\x22','API_KEY','Provider','\x20for\x20AI\x20','gpt-4o-m','toUpperC','pt-br','4305900qZMMTG','IjaMW','ohixF','pZnpc','.\x20Use\x20go','XognQ','TniyZ','DRFFt','indexOf','exitCode','PDATED','NPmwp','TmOfu','ogle,\x20op','GGSXO','IAFQk','CXSCi','slice','log','openai','toLowerC','cLkDY','vGMrY','NjrWk','\x22\x20(unkno','missing/','sWAPg','DIAGNOST','3683232VILKSZ','YsBRk','invalid','toString','claude-3','\x20exists.','ANTHROPI','-5-sonne','startsWi','Status','dhvHZ','lTKwu','yablI','nMfkD',']:\x20','EawiH','aXBTZ','split','ABjmo','Setup\x20ca','enai,\x20or','endsWith','nQgBh','te?\x20(y/n','KxgZe','rANOe','KEY=valu','IDER','mNIen','UtlhE','entries','lOlhc','TWqli','igVMu','\x20(google','GYKdz','VED','PI_KEY=\x22','Global\x20.','it\x20confi','CANCELED','IBDac'];_0x411a=function(){return _0x300228;};return _0x411a();}export async function initConfig(){const _0x8ab0b7=_0x141e,_0x3fca90={'JbSuH':function(_0x5b4f92){return _0x5b4f92();},'iIywm':function(_0x2bf7ac,_0x486ad2){return _0x2bf7ac(_0x486ad2);},'iecQG':function(_0x3c72e4,_0x38c107,_0x51212f){return _0x3c72e4(_0x38c107,_0x51212f);},'YtUNx':_0x8ab0b7(0x19d),'nQgBh':_0x8ab0b7(0x188)+'nceled.','rANOe':function(_0x74b3bb,_0x4c1337){return _0x74b3bb(_0x4c1337);},'PEPav':_0x8ab0b7(0x208)+_0x8ab0b7(0x197)+'/openai/'+'anthropi'+_0x8ab0b7(0x1dc)+_0x8ab0b7(0x1c5),'yablI':function(_0x98753c,_0x144ed3){return _0x98753c||_0x144ed3;},'GGSXO':'google','UtlhE':function(_0x734efa,_0x483c02){return _0x734efa!==_0x483c02;},'pZnpc':_0x8ab0b7(0x16c),'UgQJA':function(_0x59252d,_0x49b1b3){return _0x59252d!==_0x49b1b3;},'waHgA':'anthropi'+'c','YsBRk':function(_0x12a921,_0x2486c7){return _0x12a921(_0x2486c7);},'nMfkD':'gemini-2'+_0x8ab0b7(0x1db),'BYbyW':function(_0x3f873b,_0x1b23e0){return _0x3f873b===_0x1b23e0;},'kplIx':_0x8ab0b7(0x156)+_0x8ab0b7(0x1a5),'MUCPd':function(_0x2151ab,_0x51df5f){return _0x2151ab(_0x51df5f);},'LMFXs':'pt-br','IBDac':_0x8ab0b7(0x168),'vGMrY':function(_0x2cbbc0,_0x54973c){return _0x2cbbc0(_0x54973c);},'QLKZr':_0x8ab0b7(0x1bf)+_0x8ab0b7(0x19a)+'\x22','EawiH':function(_0x6f30eb,_0x16cab8){return _0x6f30eb===_0x16cab8;},'KmvKs':function(_0x2aa607,_0x301d10){return _0x2aa607===_0x301d10;},'UpfXU':function(_0x3cd264,_0x22dddc){return _0x3cd264(_0x22dddc);},'gpCJW':function(_0x2bc7bf,_0x1174d8,_0x5de4fd,_0x5ac617){return _0x2bc7bf(_0x1174d8,_0x5de4fd,_0x5ac617);},'HPfdL':'utf8','BmOLq':'CONFIGUR'+_0x8ab0b7(0x1a7)+_0x8ab0b7(0x199),'zJlTD':function(_0x565568,_0x2d6847){return _0x565568(_0x2d6847);},'CEuCT':_0x8ab0b7(0x17e),'nvdoE':'Path'},_0x3c7c31=_0x3fca90['JbSuH'](getGlobalEnvPath);if(_0x3fca90[_0x8ab0b7(0x1c0)](existsSync,_0x3c7c31)){const _0x13701b=await _0x3fca90[_0x8ab0b7(0x1c0)](askConfirmation,_0x3c7c31+(_0x8ab0b7(0x1cd)+_0x8ab0b7(0x17a)+'\x20Overwri'+_0x8ab0b7(0x18c)+_0x8ab0b7(0x1aa)));if(!_0x13701b){console[_0x8ab0b7(0x16b)](_0x3fca90['iecQG'](warn,_0x3fca90['YtUNx'],_0x3fca90[_0x8ab0b7(0x18b)]));return;}}const _0x222aef=await _0x3fca90[_0x8ab0b7(0x18e)](askInput,_0x3fca90[_0x8ab0b7(0x1bb)]),_0x50fe8a=_0x3fca90['yablI'](_0x222aef,_0x3fca90['GGSXO'])[_0x8ab0b7(0x16d)+_0x8ab0b7(0x1da)]();_0x3fca90[_0x8ab0b7(0x192)](_0x50fe8a,_0x3fca90['GGSXO'])&&_0x50fe8a!==_0x3fca90[_0x8ab0b7(0x15c)]&&_0x3fca90[_0x8ab0b7(0x204)](_0x50fe8a,_0x3fca90[_0x8ab0b7(0x1a3)])&&_0x3fca90[_0x8ab0b7(0x176)](failAndExit,_0x8ab0b7(0x1d4)+_0x8ab0b7(0x1a1)+_0x8ab0b7(0x15d)+_0x8ab0b7(0x166)+_0x8ab0b7(0x189)+_0x8ab0b7(0x1c3)+_0x8ab0b7(0x201));const _0x48deff=_0x50fe8a,_0x5a892c=_0x48deff===_0x3fca90[_0x8ab0b7(0x167)]?_0x3fca90[_0x8ab0b7(0x182)]:_0x3fca90[_0x8ab0b7(0x1ae)](_0x48deff,_0x8ab0b7(0x16c))?_0x3fca90[_0x8ab0b7(0x1f2)]:_0x8ab0b7(0x179)+_0x8ab0b7(0x17c)+'t-latest',_0x453a15=await askInput('Model\x20['+_0x5a892c+_0x8ab0b7(0x183))||_0x5a892c,_0x3b38bf=getProviderKeyName(_0x48deff),_0x20bc69=await _0x3fca90['YsBRk'](askInput,_0x3b38bf+':\x20'),_0x5b6c6d=await _0x3fca90[_0x8ab0b7(0x1f0)](askInput,'Language'+_0x8ab0b7(0x155)+'response'+_0x8ab0b7(0x1ad)+'-br)\x20[en'+_0x8ab0b7(0x183)),_0x63548=_0x3fca90[_0x8ab0b7(0x181)](_0x5b6c6d,'en')[_0x8ab0b7(0x16d)+_0x8ab0b7(0x1da)]()[_0x8ab0b7(0x1b5)](),_0xaa3a4a=['en',_0x3fca90[_0x8ab0b7(0x1c2)]];!_0xaa3a4a[_0x8ab0b7(0x1cb)](_0x63548)&&(_0x3fca90['BYbyW'](_0x3fca90[_0x8ab0b7(0x19e)],_0x3fca90[_0x8ab0b7(0x19e)])?_0x3fca90[_0x8ab0b7(0x16f)](failAndExit,_0x8ab0b7(0x1d4)+_0x8ab0b7(0x1c9)+'\x20\x22'+_0x63548+('\x22.\x20Use:\x20'+_0x8ab0b7(0x1b4)+_0x8ab0b7(0x1d8))):_0x49fe2c=_0x4de5dd[_0x8ab0b7(0x16a)](0x1,-0x1));const _0x4a03ce=['LLM_PROV'+_0x8ab0b7(0x1e9)+_0x48deff+'\x22','LLM_MODE'+'L=\x22'+_0x453a15+'\x22','GEMIT_LA'+_0x8ab0b7(0x206)+_0x63548+'\x22','',_0x8ab0b7(0x1e1)+_0x8ab0b7(0x19a)+(_0x48deff===_0x8ab0b7(0x1f5)?_0x20bc69:'')+'\x22',_0x3fca90['QLKZr'],_0x8ab0b7(0x1d0)+'PI_KEY=\x22'+(_0x3fca90[_0x8ab0b7(0x184)](_0x48deff,_0x8ab0b7(0x16c))?_0x20bc69:'')+'\x22',_0x8ab0b7(0x17b)+_0x8ab0b7(0x1a4)+_0x8ab0b7(0x1fe)+(_0x3fca90['KmvKs'](_0x48deff,_0x3fca90[_0x8ab0b7(0x1a3)])?_0x20bc69:'')+'\x22',''][_0x8ab0b7(0x1d6)]('\x0a');mkdirSync(_0x3fca90[_0x8ab0b7(0x1f7)](dirname,_0x3c7c31),{'recursive':!![]}),_0x3fca90[_0x8ab0b7(0x1be)](writeFileSync,_0x3c7c31,_0x4a03ce,_0x3fca90['HPfdL']),_0x3fca90[_0x8ab0b7(0x1f0)](section,_0x3fca90[_0x8ab0b7(0x200)]),_0x3fca90[_0x8ab0b7(0x1ab)](printKeyValues,[{'key':_0x3fca90['CEuCT'],'value':_0x3fca90['zJlTD'](ok,'OK')},{'key':_0x3fca90[_0x8ab0b7(0x1c8)],'value':_0x3c7c31},{'key':'Language','value':_0x63548}]);}const ALLOWED_KEYS=[_0x51cbe6(0x1b2)+_0x51cbe6(0x190),_0x51cbe6(0x1e3)+'L',_0x51cbe6(0x1f3)+_0x51cbe6(0x1c1),'GOOGLE_A'+_0x51cbe6(0x1a0),'OPENAI_A'+_0x51cbe6(0x1a0),'ANTHROPI'+_0x51cbe6(0x1a4)+'Y',_0x51cbe6(0x1bf)+_0x51cbe6(0x1a0)];function parseEnvFile(_0xbd20d1){const _0x2dd632=_0x51cbe6,_0x5c6e8e={'hsXrg':function(_0x3d8e40,_0x31e9fa){return _0x3d8e40<_0x31e9fa;},'VhcBX':function(_0x17e46e,_0x453805){return _0x17e46e+_0x453805;}},_0x3a2d49={};for(const _0x5a4fc3 of _0xbd20d1[_0x2dd632(0x186)](/\r?\n/)){const _0xd20196=_0x5a4fc3['trim']();if(!_0xd20196||_0xd20196['startsWi'+'th']('#'))continue;const _0x2964d6=_0xd20196['indexOf']('=');if(_0x5c6e8e[_0x2dd632(0x1b3)](_0x2964d6,0x0))continue;const _0x90c029=_0xd20196['slice'](0x0,_0x2964d6)[_0x2dd632(0x1b5)]();let _0x1a7cac=_0xd20196['slice'](_0x5c6e8e[_0x2dd632(0x1c7)](_0x2964d6,0x1))['trim']();(_0x1a7cac[_0x2dd632(0x17d)+'th']('\x22')&&_0x1a7cac[_0x2dd632(0x18a)]('\x22')||_0x1a7cac['startsWi'+'th']('\x27')&&_0x1a7cac[_0x2dd632(0x18a)]('\x27'))&&(_0x1a7cac=_0x1a7cac[_0x2dd632(0x16a)](0x1,-0x1)),_0x3a2d49[_0x90c029]=_0x1a7cac;}return _0x3a2d49;}function serializeEnvFile(_0x2e2a02){const _0x4476e9=_0x51cbe6,_0x399ce6={'OJdQo':function(_0x286e33,_0x23d006){return _0x286e33+_0x23d006;}};return _0x399ce6[_0x4476e9(0x202)](Object[_0x4476e9(0x193)](_0x2e2a02)['map'](([_0x483280,_0x505392])=>_0x483280+'=\x22'+_0x505392+'\x22')[_0x4476e9(0x1d6)]('\x0a'),'\x0a');}export function setConfig(_0x565c7f){const _0x41c421=_0x51cbe6,_0x26a7dd={'GYKdz':function(_0xdf25cb,_0x5d9941){return _0xdf25cb(_0x5d9941);},'NCCdw':function(_0x4111ea,_0x368e09){return _0x4111ea<_0x368e09;},'rslvj':function(_0x241044,_0x35697c){return _0x241044===_0x35697c;},'NPmwp':_0x41c421(0x1ec),'PWHNr':_0x41c421(0x1dd),'eeokR':function(_0x2afa87,_0x12c631){return _0x2afa87+_0x12c631;},'aXBTZ':function(_0x586a5c,_0x139582){return _0x586a5c(_0x139582);},'gTkWU':function(_0x82ff30){return _0x82ff30();},'TniyZ':function(_0x22b0e7,_0x4867ab){return _0x22b0e7(_0x4867ab);},'HKAjw':function(_0x1c689e,_0x59b4ab,_0x1434fc){return _0x1c689e(_0x59b4ab,_0x1434fc);},'NABFb':_0x41c421(0x1fd),'iHjps':_0x41c421(0x1a2)+')','cLkDY':function(_0x4db9ba,_0x20cf8f,_0x274c45,_0x1a5f80){return _0x4db9ba(_0x20cf8f,_0x274c45,_0x1a5f80);},'IbIyH':'CONFIG\x20U'+_0x41c421(0x163),'WUfjT':function(_0x4af3bb,_0x21ba03){return _0x4af3bb(_0x21ba03);},'TozOS':_0x41c421(0x1fb),'NRToK':_0x41c421(0x1a8)+'e','ndotV':'KEY','JhZXq':function(_0x4c21db,_0x238bc1){return _0x4c21db!==_0x238bc1;},'WOqEg':'New\x20valu'+'e','dhvHZ':'File'},_0x35de47=_0x565c7f[_0x41c421(0x161)]('=');_0x26a7dd[_0x41c421(0x1df)](_0x35de47,0x0)&&(_0x26a7dd[_0x41c421(0x1d3)](_0x26a7dd[_0x41c421(0x164)],_0x26a7dd[_0x41c421(0x1d1)])?_0x26a7dd[_0x41c421(0x198)](_0x243bf4,'Unknown\x20'+_0x41c421(0x203)+_0x5fd036+('\x22.\x20Allow'+_0x41c421(0x1ba)+'\x20')+_0x60b484[_0x41c421(0x1d6)](',\x20')):_0x26a7dd[_0x41c421(0x198)](failAndExit,_0x41c421(0x1d4)+_0x41c421(0x1ea)+_0x41c421(0x1d9)+_0x41c421(0x19c)+_0x41c421(0x1ef)+_0x41c421(0x18f)+'e'));const _0x37fb70=_0x565c7f[_0x41c421(0x16a)](0x0,_0x35de47)[_0x41c421(0x1b5)]()[_0x41c421(0x157)+_0x41c421(0x1da)](),_0x19b91d=_0x565c7f[_0x41c421(0x16a)](_0x26a7dd['eeokR'](_0x35de47,0x1))['trim']();!ALLOWED_KEYS[_0x41c421(0x1cb)](_0x37fb70)&&_0x26a7dd[_0x41c421(0x185)](failAndExit,_0x41c421(0x19f)+'key\x20\x22'+_0x37fb70+(_0x41c421(0x1e2)+'ed\x20keys:'+'\x20')+ALLOWED_KEYS['join'](',\x20'));const _0x2e5068=_0x26a7dd[_0x41c421(0x205)](getGlobalEnvPath);let _0x428cec={};_0x26a7dd['TniyZ'](existsSync,_0x2e5068)?_0x428cec=_0x26a7dd['aXBTZ'](parseEnvFile,_0x26a7dd[_0x41c421(0x1de)](readFileSync,_0x2e5068,_0x26a7dd[_0x41c421(0x1ff)])):mkdirSync(_0x26a7dd[_0x41c421(0x198)](dirname,_0x2e5068),{'recursive':!![]});const _0x1bef5e=_0x428cec[_0x37fb70]??_0x26a7dd['iHjps'];_0x428cec[_0x37fb70]=_0x19b91d,_0x26a7dd[_0x41c421(0x16e)](writeFileSync,_0x2e5068,_0x26a7dd[_0x41c421(0x15f)](serializeEnvFile,_0x428cec),_0x26a7dd['NABFb']),_0x26a7dd[_0x41c421(0x15f)](section,_0x26a7dd[_0x41c421(0x1c4)]),_0x26a7dd['WUfjT'](printKeyValues,[{'key':_0x26a7dd[_0x41c421(0x1ca)],'value':_0x37fb70},{'key':_0x26a7dd[_0x41c421(0x1b9)],'value':_0x37fb70[_0x41c421(0x1cb)](_0x26a7dd['ndotV'])&&_0x26a7dd['JhZXq'](_0x1bef5e,_0x41c421(0x1a2)+')')?_0x41c421(0x1af):_0x1bef5e},{'key':_0x26a7dd[_0x41c421(0x1bd)],'value':_0x37fb70[_0x41c421(0x1cb)](_0x41c421(0x1e5))&&_0x19b91d?_0x41c421(0x1af):_0x19b91d},{'key':_0x26a7dd[_0x41c421(0x17f)],'value':_0x2e5068}]);}export function doctorConfig(){const _0x2e66f9=_0x51cbe6,_0x34990d={'QBvRu':function(_0x4eb913,_0x5b697f){return _0x4eb913(_0x5b697f);},'KxgZe':function(_0x28e058){return _0x28e058();},'TWqli':function(_0x4a28b6,_0x52bad1){return _0x4a28b6===_0x52bad1;},'DtjrE':_0x2e66f9(0x1f5),'ABjmo':_0x2e66f9(0x16c),'vCqtn':_0x2e66f9(0x1a9)+'c','xUnYa':function(_0x2cd0bf,_0x19dd83){return _0x2cd0bf(_0x19dd83);},'igVMu':function(_0x4d43ca,_0x21ee70){return _0x4d43ca===_0x21ee70;},'sWAPg':_0x2e66f9(0x158),'TmOfu':function(_0x374790,_0x520f6e){return _0x374790===_0x520f6e;},'FEMEB':_0x2e66f9(0x207),'XsSVK':function(_0x43980d,_0x52bcbc){return _0x43980d(_0x52bcbc);},'dgiTi':_0x2e66f9(0x174)+'ICS','CXSCi':'Global\x20.'+_0x2e66f9(0x1ee),'tyfiy':function(_0x420080,_0x26d72b){return _0x420080(_0x26d72b);},'lOlhc':'found','lTKwu':function(_0x5390c3,_0x59c5ff){return _0x5390c3(_0x59c5ff);},'mNIen':'missing','yHGcV':_0x2e66f9(0x1f3)+_0x2e66f9(0x1c1),'XLnxy':function(_0x1bdbfa,_0x1cdfdc){return _0x1bdbfa(_0x1cdfdc);},'IjaMW':function(_0x325521,_0x719d6a){return _0x325521(_0x719d6a);},'qhUzw':function(_0x5b8ea2,_0x432194){return _0x5b8ea2(_0x432194);},'tsnKd':_0x2e66f9(0x1e1)+'PI_KEY','EashN':function(_0x1503c6,_0x19e67e){return _0x1503c6(_0x19e67e);},'PHGUq':_0x2e66f9(0x1d0)+_0x2e66f9(0x1a0),'ROsns':function(_0x1309b6,_0x3b2842){return _0x1309b6(_0x3b2842);},'Rtthc':function(_0x556552,_0x4733e4){return _0x556552(_0x4733e4);},'NjrWk':_0x2e66f9(0x17b)+_0x2e66f9(0x1a4)+'Y','MmdmY':'set','ohixF':function(_0x417222,_0x213fe8){return _0x417222||_0x213fe8;},'ywfvd':function(_0x306228,_0x5bdbde){return _0x306228!==_0x5bdbde;},'lmOfM':_0x2e66f9(0x1e8),'XemFS':_0x2e66f9(0x160)},_0x25b238=_0x34990d[_0x2e66f9(0x18d)](getGlobalEnvPath),_0x2ea152=_0x34990d[_0x2e66f9(0x1cf)](existsSync,_0x25b238),_0x190292=(process.env.LLM_PROVIDER||'')[_0x2e66f9(0x16d)+'ase'](),_0x5400cc=process.env.LLM_MODEL||'',_0x4db87a=process.env.GEMIT_LANGUAGE||'en',_0x36df3c=process.env.GOOGLE_API_KEY||process.env.GEMINI_API_KEY||'',_0x2857a8=process.env.OPENAI_API_KEY||'',_0x5d45ad=process.env.ANTHROPIC_API_KEY||'',_0x216ea4=_0x34990d[_0x2e66f9(0x195)](_0x190292,_0x34990d['DtjrE'])||_0x190292===_0x34990d['ABjmo']||_0x34990d['TWqli'](_0x190292,_0x34990d[_0x2e66f9(0x1e4)]),_0x530c88=_0x34990d[_0x2e66f9(0x1e0)](Boolean,_0x5400cc),_0x289b96=_0x4db87a==='en'||_0x34990d[_0x2e66f9(0x196)](_0x4db87a,_0x34990d[_0x2e66f9(0x173)]),_0x46836a=_0x34990d[_0x2e66f9(0x165)](_0x190292,_0x2e66f9(0x1f5))?_0x36df3c:_0x34990d[_0x2e66f9(0x165)](_0x190292,_0x34990d[_0x2e66f9(0x187)])?_0x2857a8:_0x34990d[_0x2e66f9(0x195)](_0x190292,'anthropi'+'c')?_0x5d45ad:'',_0x2b169a=_0x216ea4?_0x34990d[_0x2e66f9(0x1cf)](getProviderKeyName,_0x190292):_0x34990d[_0x2e66f9(0x1fa)],_0x20ae00=Boolean(_0x46836a);_0x34990d['XsSVK'](section,_0x34990d[_0x2e66f9(0x1b1)]),printKeyValues([{'key':_0x34990d[_0x2e66f9(0x169)],'value':_0x25b238},{'key':_0x2e66f9(0x19b)+_0x2e66f9(0x1ed),'value':_0x2ea152?_0x34990d['tyfiy'](ok,_0x34990d[_0x2e66f9(0x194)]):_0x34990d['lTKwu'](warn,_0x34990d[_0x2e66f9(0x191)])}]),console[_0x2e66f9(0x16b)](),printKeyValues([{'key':_0x2e66f9(0x1b2)+_0x2e66f9(0x190),'value':_0x216ea4?_0x34990d[_0x2e66f9(0x1f1)](ok,'ok'):bad(_0x2e66f9(0x172)+_0x2e66f9(0x177))},{'key':_0x2e66f9(0x1e3)+'L','value':_0x530c88?_0x34990d[_0x2e66f9(0x180)](ok,'ok'):bad(_0x34990d[_0x2e66f9(0x191)])},{'key':_0x34990d[_0x2e66f9(0x1cc)],'value':_0x289b96?_0x34990d['XLnxy'](ok,_0x4db87a):_0x34990d[_0x2e66f9(0x15a)](warn,'\x22'+_0x4db87a+(_0x2e66f9(0x171)+_0x2e66f9(0x1e7)+'g\x20\x22en\x22)'))},{'key':'Expected'+'\x20('+_0x2b169a+')','value':_0x20ae00?_0x34990d[_0x2e66f9(0x1f9)](ok,'ok'):bad(_0x34990d[_0x2e66f9(0x191)])},{'key':_0x34990d['tsnKd'],'value':_0x36df3c?_0x34990d['EashN'](ok,_0x2e66f9(0x1b7)):_0x34990d[_0x2e66f9(0x1f1)](warn,_0x2e66f9(0x1d5))},{'key':_0x34990d['PHGUq'],'value':_0x2857a8?_0x34990d[_0x2e66f9(0x1bc)](ok,_0x2e66f9(0x1b7)):_0x34990d[_0x2e66f9(0x1fc)](warn,_0x34990d[_0x2e66f9(0x191)])},{'key':_0x34990d[_0x2e66f9(0x170)],'value':_0x5d45ad?_0x34990d[_0x2e66f9(0x1cf)](ok,_0x34990d['MmdmY']):_0x34990d[_0x2e66f9(0x1e0)](warn,_0x34990d[_0x2e66f9(0x191)])}]),(_0x34990d[_0x2e66f9(0x15b)](!_0x216ea4,!_0x530c88)||!_0x20ae00)&&(_0x34990d[_0x2e66f9(0x1f8)](_0x34990d['lmOfM'],_0x34990d[_0x2e66f9(0x1b6)])?process[_0x2e66f9(0x162)]=0x1:YqAygB[_0x2e66f9(0x1cf)](_0xb4e038,_0x2e66f9(0x1d4)+_0x2e66f9(0x1ea)+_0x2e66f9(0x1d9)+'it\x20confi'+'g\x20--set\x20'+_0x2e66f9(0x18f)+'e'));}
|
|
1
|
+
const _0x4981db=_0x2699;(function(_0x48dd6c,_0x4fc793){const _0x4ccd76=_0x2699,_0x2fc4e4=_0x48dd6c();while(!![]){try{const _0xa2c6a3=-parseInt(_0x4ccd76(0x175))/0x1+-parseInt(_0x4ccd76(0x18e))/0x2*(parseInt(_0x4ccd76(0x17e))/0x3)+-parseInt(_0x4ccd76(0x122))/0x4+-parseInt(_0x4ccd76(0x194))/0x5*(-parseInt(_0x4ccd76(0x13a))/0x6)+parseInt(_0x4ccd76(0x115))/0x7+parseInt(_0x4ccd76(0x133))/0x8+-parseInt(_0x4ccd76(0x13b))/0x9*(-parseInt(_0x4ccd76(0x14d))/0xa);if(_0xa2c6a3===_0x4fc793)break;else _0x2fc4e4['push'](_0x2fc4e4['shift']());}catch(_0x212748){_0x2fc4e4['push'](_0x2fc4e4['shift']());}}}(_0x50e5,0xde89a));const _0x2e9673=(function(){const _0x541755=_0x2699,_0x5de725={'MZbpQ':function(_0x1f64f3,_0x2d1cf3){return _0x1f64f3(_0x2d1cf3);},'APSri':function(_0x437840,_0x50b911){return _0x437840===_0x50b911;},'jYprn':_0x541755(0x183),'VyobU':'JXOPr'};let _0x3397b8=!![];return function(_0x5d693d,_0x2196ed){const _0xe5846f=_0x541755,_0x19b580={'msjqr':function(_0x4e2fa8,_0x3d5b7d){return _0x5de725['MZbpQ'](_0x4e2fa8,_0x3d5b7d);},'mGnzg':function(_0x5ea0a0,_0x401b2e){return _0x5de725['APSri'](_0x5ea0a0,_0x401b2e);},'TdRny':_0x5de725[_0xe5846f(0x14b)],'sAZYW':_0x5de725[_0xe5846f(0x111)]},_0x3762a5=_0x3397b8?function(){const _0x5a4fe4=_0xe5846f;if(_0x19b580[_0x5a4fe4(0x19e)](_0x19b580[_0x5a4fe4(0x165)],_0x19b580[_0x5a4fe4(0x146)]))_0xf63b8b(_0x19b580[_0x5a4fe4(0x141)](_0x279ec7,_0x36aa86),{'recursive':!![]});else{if(_0x2196ed){const _0x53433c=_0x2196ed[_0x5a4fe4(0x120)](_0x5d693d,arguments);return _0x2196ed=null,_0x53433c;}}}:function(){};return _0x3397b8=![],_0x3762a5;};}()),_0x23265c=_0x2e9673(this,function(){const _0x42b8ea=_0x2699;return _0x23265c['toString']()['search'](_0x42b8ea(0x164)+_0x42b8ea(0x192))[_0x42b8ea(0x11d)]()[_0x42b8ea(0x139)+_0x42b8ea(0x123)](_0x23265c)[_0x42b8ea(0x137)]('(((.+)+)'+'+)+$');});_0x23265c();import{existsSync,mkdirSync,readFileSync,writeFileSync}from'fs';import{dirname}from'path';function _0x50e5(){const _0x5a1946=['C_API_KE','DIAGNOST','response','jhfVL','endsWith','.\x20Use\x20go','1569032axaLBm','Y=\x22','Ugvih','CONFIGUR','WBrCZ','KwSHJ','ase','Expected','ZYXyf','15sBpTLK','wwuKf','kRMnu','LuHuZ','Setup\x20ca','fsYfX','wn,\x20usin','temIZ','s\x20(en/pt','wkTdj','aFsrI','FsOAV','utf8','le]:\x20','missing/','QmiKv','14396zZmBDM','g\x20--set\x20','anthropi','ROeMz','+)+$','ERmcS','994385bkLBik','USAnd','PgfaY','cagcv','mQAZe','ic.','zzuHv','bgStW','en\x20or\x20pt','claude-3','mGnzg','map','BOXtm','CxZmH','includes','EWBpd','LcxGF','-br)\x20[en','XxiOW','\x20already','New\x20valu','otxJq','ZuHAr','\x20for\x20AI\x20','BzOch','Key','-5-sonne','TLVbT','RwrFu','env\x20path','QsoAT','rcaqT','pSpiS','te?\x20(y/n','\x22.\x20Allow','openai','Unknown\x20','CANCELED','LLM_MODE','Invalid\x20','\x20exists.','slice','log','FSJFJ','VyobU','OPENAI_A','nzWdI','WDIWu','3251346PoSVUA','startsWi','yfIEh','PMxSo',']:\x20','provider','ICS','IBSZe','toString','c)\x20[goog','.5-flash','apply','GEMIT_LA','6936864hxYBuz','tor','IDER=\x22','IDER','):\x20','gjrai','KEY=valu','Language','Provider','set','EnNmb','t-latest','MmcNu','join','FBhep','PDATED','IuAuI','717448yipAZC','RYiHx','\x22\x20(unkno','Status','search','CONFIG\x20U','construc','12coSBTr','29689551dIUnyB','toLowerC','PI_KEY','GGgUo','ooWni','-br','msjqr','pt-br','Path','NNupK','Global\x20.','sAZYW','PI_KEY=\x22','missing','it\x20confi','GdtVJ','jYprn','nziNR','10cvpUxH','dzOnL','GOOGLE_A','ogle,\x20op','vQfVU','crCYA','PBtsb','ANTHROPI','(not\x20set','key\x20\x22','exitCode','gemini-2','\x20Overwri','yfAIA','yiTBF','\x22.\x20Use:\x20','voTvz','NGUAGE','biLlD','/openai/','poBJd','qjzve','trim','(((.+)+)','TdRny','google','yPtBa','gfiei','Nxmrx','indexOf','LapCN','GEMINI_A','enai,\x20or','Old\x20valu'];_0x50e5=function(){return _0x5a1946;};return _0x50e5();}import{getGlobalEnvPath}from'../config.js';import{askConfirmation,askInput}from'../prompts.js';import{bad,failAndExit,ok,printKeyValues,section,warn}from'../ui.js';function getProviderKeyName(_0x5e8d15){const _0xac2a0e=_0x2699,_0x3f57d7={'UzLRn':function(_0x19e8df,_0x5a5b84){return _0x19e8df===_0x5a5b84;},'temIZ':'google','dzOnL':function(_0x313d1a,_0x1d97c1){return _0x313d1a===_0x1d97c1;},'Ddvba':_0xac2a0e(0x112)+_0xac2a0e(0x13d),'nziNR':_0xac2a0e(0x154)+_0xac2a0e(0x16f)+'Y'};if(_0x3f57d7['UzLRn'](_0x5e8d15,_0x3f57d7[_0xac2a0e(0x185)]))return'GOOGLE_A'+'PI_KEY';if(_0x3f57d7[_0xac2a0e(0x14e)](_0x5e8d15,_0xac2a0e(0x108)))return _0x3f57d7['Ddvba'];return _0x3f57d7[_0xac2a0e(0x14c)];}export async function initConfig(){const _0xc8fbc9=_0x2699,_0x5a4ce6={'ZuHAr':function(_0x1c9a13){return _0x1c9a13();},'Ugvih':function(_0x45ccbb,_0x822a5){return _0x45ccbb(_0x822a5);},'IBSZe':function(_0x39b456,_0x2f08f0){return _0x39b456(_0x2f08f0);},'yfIEh':function(_0x4f690d,_0x5d9826,_0x35c423){return _0x4f690d(_0x5d9826,_0x35c423);},'mQAZe':_0xc8fbc9(0x10a),'aXFWw':_0xc8fbc9(0x182)+'nceled.','oiwoL':_0xc8fbc9(0x12a)+'\x20(google'+_0xc8fbc9(0x160)+_0xc8fbc9(0x190)+_0xc8fbc9(0x11e)+_0xc8fbc9(0x18b),'yfAIA':function(_0x285600,_0x495d70){return _0x285600||_0x495d70;},'biLlD':_0xc8fbc9(0x166),'LcxGF':function(_0x108301,_0x3bad73){return _0x108301!==_0x3bad73;},'pSpiS':_0xc8fbc9(0x108),'RYiHx':'anthropi'+'c','BOXtm':function(_0x4982e6,_0x44a6fc){return _0x4982e6(_0x44a6fc);},'QmiKv':function(_0x55771c,_0x6f1dd){return _0x55771c===_0x6f1dd;},'aFsrI':_0xc8fbc9(0x158)+_0xc8fbc9(0x11f),'vQfVU':'gpt-4o-m'+'ini','WDIWu':_0xc8fbc9(0x19d)+_0xc8fbc9(0xff)+_0xc8fbc9(0x12d),'voTvz':function(_0x5876d9,_0x15de07){return _0x5876d9(_0x15de07);},'ULXun':function(_0x2336f5,_0x26cecd){return _0x2336f5(_0x26cecd);},'DHIHr':_0xc8fbc9(0x129)+_0xc8fbc9(0xfc)+_0xc8fbc9(0x171)+_0xc8fbc9(0x186)+_0xc8fbc9(0xf6)+_0xc8fbc9(0x119),'FsOAV':_0xc8fbc9(0x16c)+_0xc8fbc9(0x147)+'\x22','cagcv':function(_0x5443b7,_0x240d53,_0x4b3431,_0x5f0b33){return _0x5443b7(_0x240d53,_0x4b3431,_0x5f0b33);},'crCYA':_0xc8fbc9(0x18a),'USAnd':_0xc8fbc9(0x178)+'ATION\x20SA'+'VED','FBhep':function(_0x20111d,_0x4b26e0){return _0x20111d(_0x4b26e0);},'gfiei':_0xc8fbc9(0x143)},_0x9eea44=_0x5a4ce6[_0xc8fbc9(0xfb)](getGlobalEnvPath);if(_0x5a4ce6[_0xc8fbc9(0x177)](existsSync,_0x9eea44)){const _0x3b9d69=await _0x5a4ce6[_0xc8fbc9(0x11c)](askConfirmation,_0x9eea44+(_0xc8fbc9(0xf8)+_0xc8fbc9(0x10d)+_0xc8fbc9(0x159)+_0xc8fbc9(0x106)+_0xc8fbc9(0x126)));if(!_0x3b9d69){console[_0xc8fbc9(0x10f)](_0x5a4ce6[_0xc8fbc9(0x117)](warn,_0x5a4ce6[_0xc8fbc9(0x198)],_0x5a4ce6['aXFWw']));return;}}const _0x2af2f1=await _0x5a4ce6[_0xc8fbc9(0x11c)](askInput,_0x5a4ce6['oiwoL']),_0x47c83c=_0x5a4ce6[_0xc8fbc9(0x15a)](_0x2af2f1,_0x5a4ce6[_0xc8fbc9(0x15f)])[_0xc8fbc9(0x13c)+_0xc8fbc9(0x17b)]();_0x5a4ce6[_0xc8fbc9(0xf5)](_0x47c83c,_0x5a4ce6[_0xc8fbc9(0x15f)])&&_0x47c83c!==_0x5a4ce6[_0xc8fbc9(0x105)]&&_0x5a4ce6[_0xc8fbc9(0xf5)](_0x47c83c,_0x5a4ce6[_0xc8fbc9(0x134)])&&_0x5a4ce6[_0xc8fbc9(0x1a0)](failAndExit,'Invalid\x20'+_0xc8fbc9(0x11a)+_0xc8fbc9(0x174)+_0xc8fbc9(0x150)+_0xc8fbc9(0x16d)+'\x20anthrop'+_0xc8fbc9(0x199));const _0x252d5a=_0x47c83c,_0xdd3803=_0x5a4ce6[_0xc8fbc9(0x18d)](_0x252d5a,_0x5a4ce6[_0xc8fbc9(0x15f)])?_0x5a4ce6[_0xc8fbc9(0x188)]:_0x5a4ce6['QmiKv'](_0x252d5a,_0x5a4ce6[_0xc8fbc9(0x105)])?_0x5a4ce6[_0xc8fbc9(0x151)]:_0x5a4ce6[_0xc8fbc9(0x114)],_0x534d97=await _0x5a4ce6[_0xc8fbc9(0x15d)](askInput,'Model\x20['+_0xdd3803+']:\x20')||_0xdd3803,_0x39c7d3=getProviderKeyName(_0x252d5a),_0x3fec3c=await _0x5a4ce6['ULXun'](askInput,_0x39c7d3+':\x20'),_0x463a9b=await askInput(_0x5a4ce6['DHIHr']),_0x29f483=(_0x463a9b||'en')[_0xc8fbc9(0x13c)+'ase']()['trim'](),_0x50bac0=['en','pt-br'];!_0x50bac0[_0xc8fbc9(0xf3)](_0x29f483)&&_0x5a4ce6['BOXtm'](failAndExit,_0xc8fbc9(0x10c)+'language'+'\x20\x22'+_0x29f483+(_0xc8fbc9(0x15c)+_0xc8fbc9(0x19c)+_0xc8fbc9(0x140)));const _0x59206e=['LLM_PROV'+_0xc8fbc9(0x124)+_0x252d5a+'\x22',_0xc8fbc9(0x10b)+'L=\x22'+_0x534d97+'\x22',_0xc8fbc9(0x121)+'NGUAGE=\x22'+_0x29f483+'\x22','','GOOGLE_A'+'PI_KEY=\x22'+(_0x252d5a===_0x5a4ce6['biLlD']?_0x3fec3c:'')+'\x22',_0x5a4ce6[_0xc8fbc9(0x189)],_0xc8fbc9(0x112)+_0xc8fbc9(0x147)+(_0x252d5a==='openai'?_0x3fec3c:'')+'\x22',_0xc8fbc9(0x154)+_0xc8fbc9(0x16f)+_0xc8fbc9(0x176)+(_0x5a4ce6['QmiKv'](_0x252d5a,_0xc8fbc9(0x190)+'c')?_0x3fec3c:'')+'\x22','']['join']('\x0a');mkdirSync(_0x5a4ce6[_0xc8fbc9(0x15d)](dirname,_0x9eea44),{'recursive':!![]}),_0x5a4ce6[_0xc8fbc9(0x197)](writeFileSync,_0x9eea44,_0x59206e,_0x5a4ce6[_0xc8fbc9(0x152)]),_0x5a4ce6['BOXtm'](section,_0x5a4ce6[_0xc8fbc9(0x195)]),_0x5a4ce6[_0xc8fbc9(0x130)](printKeyValues,[{'key':_0xc8fbc9(0x136),'value':ok('OK')},{'key':_0x5a4ce6[_0xc8fbc9(0x168)],'value':_0x9eea44},{'key':_0xc8fbc9(0x129),'value':_0x29f483}]);}function _0x2699(_0x307c9d,_0x2032d4){_0x307c9d=_0x307c9d-0xf3;const _0x28150c=_0x50e5();let _0x23265c=_0x28150c[_0x307c9d];return _0x23265c;}const ALLOWED_KEYS=['LLM_PROV'+_0x4981db(0x125),_0x4981db(0x10b)+'L',_0x4981db(0x121)+_0x4981db(0x15e),_0x4981db(0x14f)+_0x4981db(0x13d),_0x4981db(0x112)+'PI_KEY','ANTHROPI'+_0x4981db(0x16f)+'Y','GEMINI_A'+_0x4981db(0x13d)];function parseEnvFile(_0x451595){const _0x3bfc8f=_0x4981db,_0x380cc3={'CxZmH':function(_0x584cea,_0x528bf5){return _0x584cea<_0x528bf5;},'yPtBa':function(_0x161347,_0x2b9eef){return _0x161347+_0x2b9eef;}},_0x5ba0ac={};for(const _0x544c4e of _0x451595['split'](/\r?\n/)){const _0x53c8b9=_0x544c4e[_0x3bfc8f(0x163)]();if(!_0x53c8b9||_0x53c8b9[_0x3bfc8f(0x116)+'th']('#'))continue;const _0x439a62=_0x53c8b9[_0x3bfc8f(0x16a)]('=');if(_0x380cc3[_0x3bfc8f(0x1a1)](_0x439a62,0x0))continue;const _0x50310d=_0x53c8b9[_0x3bfc8f(0x10e)](0x0,_0x439a62)[_0x3bfc8f(0x163)]();let _0x38da4a=_0x53c8b9[_0x3bfc8f(0x10e)](_0x380cc3[_0x3bfc8f(0x167)](_0x439a62,0x1))['trim']();(_0x38da4a[_0x3bfc8f(0x116)+'th']('\x22')&&_0x38da4a[_0x3bfc8f(0x173)]('\x22')||_0x38da4a[_0x3bfc8f(0x116)+'th']('\x27')&&_0x38da4a[_0x3bfc8f(0x173)]('\x27'))&&(_0x38da4a=_0x38da4a['slice'](0x1,-0x1)),_0x5ba0ac[_0x50310d]=_0x38da4a;}return _0x5ba0ac;}function serializeEnvFile(_0x31ecaa){const _0x420b1e=_0x4981db;return Object['entries'](_0x31ecaa)[_0x420b1e(0x19f)](([_0x1cf1a6,_0x38df42])=>_0x1cf1a6+'=\x22'+_0x38df42+'\x22')['join']('\x0a')+'\x0a';}export function setConfig(_0x12e968){const _0x29be22=_0x4981db,_0x99b4dc={'wwuKf':_0x29be22(0x164)+_0x29be22(0x192),'wItFx':function(_0x2466be,_0x9102e1){return _0x2466be<_0x9102e1;},'nzWdI':function(_0x50f826,_0x51727d){return _0x50f826(_0x51727d);},'IuAuI':function(_0x5801e3,_0x25db7b){return _0x5801e3+_0x25db7b;},'bgStW':_0x29be22(0xf7),'ERmcS':function(_0x1c4fbd){return _0x1c4fbd();},'TLVbT':function(_0xdf333,_0x18866a){return _0xdf333(_0x18866a);},'UUrRI':function(_0x362201,_0x2e6c71,_0xd685b){return _0x362201(_0x2e6c71,_0xd685b);},'qjzve':_0x29be22(0x155)+')','FSJFJ':function(_0x994022,_0x565251,_0x21f0d9,_0x1792ef){return _0x994022(_0x565251,_0x21f0d9,_0x1792ef);},'KwSHJ':function(_0x19b293,_0x13ee55){return _0x19b293(_0x13ee55);},'LDXhG':_0x29be22(0x18a),'RJsxI':function(_0x4c5f04,_0x176548){return _0x4c5f04(_0x176548);},'NNupK':_0x29be22(0x138)+_0x29be22(0x131),'otxJq':_0x29be22(0xfe),'poBJd':'KEY','LapCN':function(_0x515b25,_0x41ebf2){return _0x515b25!==_0x41ebf2;},'GGgUo':'***','Nxmrx':_0x29be22(0xf9)+'e'},_0x15c1e5=_0x12e968[_0x29be22(0x16a)]('=');_0x99b4dc['wItFx'](_0x15c1e5,0x0)&&_0x99b4dc[_0x29be22(0x113)](failAndExit,'Invalid\x20'+'format.\x20'+'Use:\x20gem'+_0x29be22(0x149)+_0x29be22(0x18f)+_0x29be22(0x128)+'e');const _0x1d0f2f=_0x12e968[_0x29be22(0x10e)](0x0,_0x15c1e5)[_0x29be22(0x163)]()['toUpperC'+'ase'](),_0x7e5c96=_0x12e968[_0x29be22(0x10e)](_0x99b4dc[_0x29be22(0x132)](_0x15c1e5,0x1))[_0x29be22(0x163)]();if(!ALLOWED_KEYS[_0x29be22(0xf3)](_0x1d0f2f)){if(_0x99b4dc[_0x29be22(0x19b)]===_0x99b4dc[_0x29be22(0x19b)])_0x99b4dc['nzWdI'](failAndExit,_0x29be22(0x109)+_0x29be22(0x156)+_0x1d0f2f+(_0x29be22(0x107)+'ed\x20keys:'+'\x20')+ALLOWED_KEYS[_0x29be22(0x12f)](',\x20'));else return _0x542695[_0x29be22(0x11d)]()[_0x29be22(0x137)](smgbMr[_0x29be22(0x17f)])[_0x29be22(0x11d)]()[_0x29be22(0x139)+_0x29be22(0x123)](_0x107a26)[_0x29be22(0x137)](smgbMr[_0x29be22(0x17f)]);}const _0x338948=_0x99b4dc[_0x29be22(0x193)](getGlobalEnvPath);let _0x1e75d={};_0x99b4dc[_0x29be22(0x113)](existsSync,_0x338948)?_0x1e75d=_0x99b4dc[_0x29be22(0x100)](parseEnvFile,_0x99b4dc['UUrRI'](readFileSync,_0x338948,_0x29be22(0x18a))):mkdirSync(_0x99b4dc['nzWdI'](dirname,_0x338948),{'recursive':!![]});const _0xb6d99d=_0x1e75d[_0x1d0f2f]??_0x99b4dc[_0x29be22(0x162)];_0x1e75d[_0x1d0f2f]=_0x7e5c96,_0x99b4dc[_0x29be22(0x110)](writeFileSync,_0x338948,_0x99b4dc[_0x29be22(0x17a)](serializeEnvFile,_0x1e75d),_0x99b4dc['LDXhG']),_0x99b4dc['RJsxI'](section,_0x99b4dc[_0x29be22(0x144)]),printKeyValues([{'key':_0x99b4dc[_0x29be22(0xfa)],'value':_0x1d0f2f},{'key':_0x29be22(0x16e)+'e','value':_0x1d0f2f[_0x29be22(0xf3)](_0x99b4dc[_0x29be22(0x161)])&&_0x99b4dc[_0x29be22(0x16b)](_0xb6d99d,_0x99b4dc[_0x29be22(0x162)])?_0x99b4dc['GGgUo']:_0xb6d99d},{'key':_0x99b4dc[_0x29be22(0x169)],'value':_0x1d0f2f[_0x29be22(0xf3)](_0x99b4dc['poBJd'])&&_0x7e5c96?_0x99b4dc[_0x29be22(0x13e)]:_0x7e5c96},{'key':'File','value':_0x338948}]);}export function doctorConfig(){const _0x20c990=_0x4981db,_0x272e58={'gjrai':function(_0x1e0318,_0x375328){return _0x1e0318(_0x375328);},'yiTBF':_0x20c990(0x166),'LuHuZ':function(_0x5c35d5,_0x24c743){return _0x5c35d5===_0x24c743;},'ROeMz':'openai','WBrCZ':function(_0x21eea3,_0x18169d){return _0x21eea3(_0x18169d);},'QsoAT':_0x20c990(0x142),'zzuHv':function(_0x48ec9d,_0x1e7f2e){return _0x48ec9d===_0x1e7f2e;},'MmcNu':_0x20c990(0x190)+'c','ooWni':function(_0x3c1224,_0x798079){return _0x3c1224(_0x798079);},'BzOch':'API_KEY','PBtsb':function(_0x209019,_0x5a664f){return _0x209019(_0x5a664f);},'kRMnu':_0x20c990(0x145)+_0x20c990(0x102),'jhfVL':function(_0x345171,_0x52adbf){return _0x345171(_0x52adbf);},'GdtVJ':'found','RwrFu':function(_0x5ecaaf,_0x4b8ccc){return _0x5ecaaf(_0x4b8ccc);},'wkTdj':_0x20c990(0x148),'BObVL':_0x20c990(0x18c)+'invalid','PgfaY':function(_0x34a893,_0x1b3f6c){return _0x34a893(_0x1b3f6c);},'ZYXyf':function(_0xa8e09e,_0x159773){return _0xa8e09e(_0x159773);},'gpfWq':_0x20c990(0x14f)+_0x20c990(0x13d),'rcaqT':function(_0x4b41b0,_0x45b41b){return _0x4b41b0(_0x45b41b);},'WYkPY':function(_0x382f7f,_0x2b3d8c){return _0x382f7f(_0x2b3d8c);},'txioU':_0x20c990(0x112)+'PI_KEY','PMxSo':function(_0x41ad1b,_0x11add1){return _0x41ad1b(_0x11add1);},'EWBpd':_0x20c990(0x12b),'mWMKr':'ANTHROPI'+'C_API_KE'+'Y','EnNmb':function(_0x520cd8,_0x12811b){return _0x520cd8||_0x12811b;}},_0x10d94a=getGlobalEnvPath(),_0xc93b0d=_0x272e58[_0x20c990(0x127)](existsSync,_0x10d94a),_0x26a7e1=(process.env.LLM_PROVIDER||'')['toLowerC'+_0x20c990(0x17b)](),_0x270f08=process.env.LLM_MODEL||'',_0x136ca0=process.env.GEMIT_LANGUAGE||'en',_0x87d84=process.env.GOOGLE_API_KEY||process.env.GEMINI_API_KEY||'',_0x45cdc9=process.env.OPENAI_API_KEY||'',_0x18426a=process.env.ANTHROPIC_API_KEY||'',_0x109f02=_0x26a7e1===_0x272e58[_0x20c990(0x15b)]||_0x272e58[_0x20c990(0x181)](_0x26a7e1,_0x272e58[_0x20c990(0x191)])||_0x272e58[_0x20c990(0x181)](_0x26a7e1,_0x20c990(0x190)+'c'),_0x11b37a=_0x272e58[_0x20c990(0x179)](Boolean,_0x270f08),_0x594723=_0x272e58[_0x20c990(0x181)](_0x136ca0,'en')||_0x272e58['LuHuZ'](_0x136ca0,_0x272e58[_0x20c990(0x103)]),_0x5e4002=_0x272e58['LuHuZ'](_0x26a7e1,_0x20c990(0x166))?_0x87d84:_0x26a7e1===_0x272e58[_0x20c990(0x191)]?_0x45cdc9:_0x272e58[_0x20c990(0x19a)](_0x26a7e1,_0x272e58[_0x20c990(0x12e)])?_0x18426a:'',_0x5dd379=_0x109f02?_0x272e58[_0x20c990(0x13f)](getProviderKeyName,_0x26a7e1):_0x272e58[_0x20c990(0xfd)],_0x16266d=_0x272e58[_0x20c990(0x127)](Boolean,_0x5e4002);section(_0x20c990(0x170)+_0x20c990(0x11b)),_0x272e58[_0x20c990(0x153)](printKeyValues,[{'key':_0x272e58[_0x20c990(0x180)],'value':_0x10d94a},{'key':'Global\x20.'+'env','value':_0xc93b0d?_0x272e58[_0x20c990(0x172)](ok,_0x272e58[_0x20c990(0x14a)]):_0x272e58[_0x20c990(0x101)](warn,_0x272e58[_0x20c990(0x187)])}]),console[_0x20c990(0x10f)](),_0x272e58[_0x20c990(0x172)](printKeyValues,[{'key':'LLM_PROV'+_0x20c990(0x125),'value':_0x109f02?_0x272e58[_0x20c990(0x127)](ok,'ok'):_0x272e58[_0x20c990(0x179)](bad,_0x272e58['BObVL'])},{'key':_0x20c990(0x10b)+'L','value':_0x11b37a?ok('ok'):_0x272e58[_0x20c990(0x101)](bad,_0x272e58[_0x20c990(0x187)])},{'key':'GEMIT_LA'+_0x20c990(0x15e),'value':_0x594723?_0x272e58[_0x20c990(0x127)](ok,_0x136ca0):_0x272e58['PgfaY'](warn,'\x22'+_0x136ca0+(_0x20c990(0x135)+_0x20c990(0x184)+'g\x20\x22en\x22)'))},{'key':_0x20c990(0x17c)+'\x20('+_0x5dd379+')','value':_0x16266d?_0x272e58[_0x20c990(0x196)](ok,'ok'):_0x272e58[_0x20c990(0x17d)](bad,_0x20c990(0x148))},{'key':_0x272e58['gpfWq'],'value':_0x87d84?_0x272e58[_0x20c990(0x104)](ok,_0x20c990(0x12b)):_0x272e58['WYkPY'](warn,_0x272e58[_0x20c990(0x187)])},{'key':_0x272e58['txioU'],'value':_0x45cdc9?_0x272e58[_0x20c990(0x118)](ok,_0x272e58[_0x20c990(0xf4)]):warn(_0x272e58['wkTdj'])},{'key':_0x272e58['mWMKr'],'value':_0x18426a?_0x272e58[_0x20c990(0x127)](ok,_0x272e58[_0x20c990(0xf4)]):_0x272e58[_0x20c990(0x101)](warn,_0x272e58[_0x20c990(0x187)])}]),(_0x272e58[_0x20c990(0x12c)](!_0x109f02,!_0x11b37a)||!_0x16266d)&&(process[_0x20c990(0x157)]=0x1);}
|