fluxflow-cli 4.36.0 → 4.36.1
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/chunks/{ai-DUQ7JTFT.js → ai-CSFGLT7L.js} +1 -1
- package/dist/chunks/app-UROWHP4H.js +323 -0
- package/dist/chunks/chunk-BGIZLZQF.js +1 -0
- package/dist/chunks/{chunk-PUCRX3HD.js → chunk-ICFCAYGD.js} +4 -4
- package/dist/chunks/{chunk-EKTQJIFL.js → chunk-IS6NOF47.js} +1 -1
- package/dist/chunks/{chunk-HWQD4HC4.js → chunk-OA7SWSBR.js} +1 -1
- package/dist/chunks/{chunk-NXGWQV2R.js → chunk-QWEEC3PP.js} +1 -1
- package/dist/chunks/{chunk-ARVJHIPP.js → chunk-QYNGDXPT.js} +1 -1
- package/dist/chunks/{click-YDLHTDEK.js → click-PNIGPARB.js} +2 -2
- package/dist/chunks/{computer_action-2JLV6MY4.js → computer_action-WORDXIQY.js} +1 -1
- package/dist/chunks/{drag-PUEGJCAB.js → drag-LC3MFJZ7.js} +1 -1
- package/dist/chunks/{generate_image-L2LXNTNE.js → generate_image-EKX5PUUR.js} +1 -1
- package/dist/chunks/{invoke-7S44ZFQY.js → invoke-BB2A6WP5.js} +2 -2
- package/dist/chunks/{invokeSync-SAKOE3G5.js → invokeSync-L3GXK4LN.js} +2 -2
- package/dist/chunks/{key_press-KR2O7S6E.js → key_press-PDKXVENN.js} +1 -1
- package/dist/chunks/{keyboard_typing-V4ALD3BD.js → keyboard_typing-UTFSDB4P.js} +1 -1
- package/dist/chunks/{mistral-O5VGMA23.js → mistral-LNEFQAV5.js} +1 -1
- package/dist/chunks/{model_config-C72R7DKL.js → model_config-55WPIUYV.js} +1 -1
- package/dist/chunks/{nvidia-OVQSNJOT.js → nvidia-GMX2ROSD.js} +1 -1
- package/dist/chunks/{screen_grid-XZKZBWOH.js → screen_grid-PVVRYV5G.js} +1 -1
- package/dist/chunks/{scroll-YTLIQ6C5.js → scroll-UPGZCBPD.js} +1 -1
- package/dist/chunks/{settings-LO76WAO4.js → settings-GLFTNEAT.js} +1 -1
- package/dist/chunks/{update_file-HGCNRGTK.js → update_file-NBLTUYHL.js} +1 -1
- package/dist/chunks/{usage-MHRBABMW.js → usage-CAY5LYRU.js} +1 -1
- package/dist/chunks/{usageServer-YSHTV2E3.js → usageServer-PJOHIWJT.js} +44 -9
- package/dist/chunks/{write_file-A67UXLZ2.js → write_file-FZZRCU3L.js} +1 -1
- package/dist/cli.js +3 -3
- package/dist/package.json +1 -1
- package/package.json +1 -1
- package/dist/chunks/app-3RT5WIFW.js +0 -322
- package/dist/chunks/chunk-NJADNSYK.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as u}from"./chunk-DSVLWYIT.js";import f from"fs";import g from"path";import{fileURLToPath as M}from"url";var p={version:0,release:20261004,fallbacks:{janitor_default:"gemini-3.5-flash-lite",janitor_attempts_fallback:"gemma-4-26b-a4b-it",janitor_open_router:"google/gemma-4-26b-a4b-it:free",general_fallback:"gemini-3.5-flash-lite",deepseek_fast_fallback:"deepseek-v4-flash",deepseek_level_1:"deepseek-flash",deepseek_level_2:"deepseek-pro",mistral_janitor_fallback:"",mistral_level_1:"",nvidia_janitor_fallback:"mistralai/mistral-nemotron",nvidia_chat_summarizer_fallback:"nvidia/nemotron-3-super-120b-a12b",google_level_1:"gemini-3-flash-preview",google_level_2:"gemini-3.7-flash",gemma_emergency:"gemma-4-31b-it",gemma_janitor_fallback_google_openrouter:"google/gemma-4-26b-a4b-it:free",gemma_janitor_fallback_google:"gemma-4-26b-a4b-it",inferx_fallback:"",sensenova_fallback:"",crofai_fallback:"",aihubmix_fallback:"",poolside_fallback:"","9router_fallback":"",explabs_fallback:"",tokenharbor_fallback:"",infron_fallback:"",c_openai_fallback:""},providers:{}};var j=M(import.meta.url),y=g.dirname(j),_="",I=[g.join(y,"../../model_config.json"),g.join(y,"../model_config.json")];for(let e of I)try{if(f.existsSync(e)){_=e;break}}catch{}var b=g.join(u,"model_config.json"),a=null,v=()=>{if(_)try{let e=f.readFileSync(_,"utf-8"),r=JSON.parse(e);if(r&&typeof r=="object")return r}catch{}return p&&typeof p=="object"?JSON.parse(JSON.stringify(p)):{version:0,release:20260913,fallbacks:{},providers:{}}};if(f.existsSync(b))try{let e=f.readFileSync(b,"utf-8"),r=JSON.parse(e);if(r&&typeof r=="object"){let o=v();r.fallbacks={...o.fallbacks||{},...r.fallbacks||{}},r.providers||(r.providers={}),r.release||(r.release=o.release||20260913),a=r}}catch{}a||(a=v());var F=new Set,k=new Set,c=()=>{let e=new Set,r=new Set;if(a.providers)for(let o of Object.keys(a.providers)){let s=a.providers[o];if(s&&s.models){let l=["Free","Paid"];for(let n of l){let t=s.models[n];if(Array.isArray(t)){for(let i of t)if(i&&i.cmd){let d=i.cmd.trim().toLowerCase();i.multimodal===!0&&e.add(d),i.hasReasoning===!0&&r.add(d)}}}}}if(Array.isArray(a.multimodal_models))for(let o of a.multimodal_models)o&&typeof o=="string"&&e.add(o.trim().toLowerCase());F=e,k=r};c();var L=()=>a,m=()=>{try{return f.existsSync(u)||f.mkdirSync(u,{recursive:!0}),f.writeFileSync(b,JSON.stringify(a,null,2),"utf-8"),!0}catch{return!1}},N=(e,r,o=!1,s=null)=>{if(!e||!r)return{success:!1,reason:"Invalid provider or model ID"};let l=r.trim();if(!l)return{success:!1,reason:"Model ID cannot be empty"};a.providers||(a.providers={}),a.providers[e]||(a.providers[e]={default_free:"",default_paid:"",models:{Free:[],Paid:[]}});let n=a.providers[e];n.models||(n.models={Free:[],Paid:[]}),Array.isArray(n.models.Free)||(n.models.Free=[]);let t=n.models.Free.find(i=>(typeof i=="string"?i:i?.cmd)===l);if(t)if(typeof t=="string"){let i=n.models.Free.indexOf(t),d={cmd:l,multimodal:!!o,desc:l};s&&Object.keys(s).length>0&&(d.info=s),n.models.Free[i]=d}else t.multimodal=!!o,s&&Object.keys(s).length>0&&(t.info={...t.info||{},...s});else{let i={cmd:l,multimodal:!!o,desc:l};s&&Object.keys(s).length>0&&(i.info=s),n.models.Free.push(i)}return c(),m(),{success:!0}},$=(e,r,o={})=>{if(!e||!r)return{success:!1,reason:"Invalid provider or model ID"};let s=r.trim();if(!s)return{success:!1,reason:"Model ID cannot be empty"};a.providers||(a.providers={}),a.providers[e]||(a.providers[e]={default_free:"",default_paid:"",models:{Free:[],Paid:[]}});let l=a.providers[e];l.models||(l.models={Free:[],Paid:[]}),Array.isArray(l.models.Free)||(l.models.Free=[]);let n=s.toLowerCase(),t=l.models.Free.find(i=>{let d=typeof i=="string"?i:i?.cmd;return d&&d.trim().toLowerCase()===n});if(o===null)t&&typeof t=="object"&&delete t.info;else if(!t)l.models.Free.push({cmd:s,multimodal:!1,desc:s,info:o});else if(typeof t=="string"){let i=l.models.Free.indexOf(t);l.models.Free[i]={cmd:t,multimodal:!1,desc:t,info:o}}else t.info={...t.info||{},...o};return m(),{success:!0}},R=(e,r,o=!0)=>{if(!e||!r)return{success:!1,reason:"Invalid provider or model ID"};let s=r.trim();if(!s)return{success:!1,reason:"Model ID cannot be empty"};let l=a.providers?.[e];if(!l||!l.models||!Array.isArray(l.models.Free))return{success:!1,reason:`Provider ${e} has no models configured`};let n=l.models.Free.find(t=>(typeof t=="string"?t:t?.cmd)===s);if(!n)return{success:!1,reason:`Model "${s}" not found in ${e} model list`};if(typeof n=="string"){let t=l.models.Free.indexOf(n);l.models.Free[t]={cmd:s,multimodal:!!o,desc:s}}else n.multimodal=!!o;return c(),m(),{success:!0}},T=(e,r,o=!1,s=null)=>{if(!e||!r)return{success:!1,reason:"Invalid provider or model ID"};let l=r.trim();if(!l)return{success:!1,reason:"Model ID cannot be empty"};a.providers||(a.providers={}),a.providers[e]||(a.providers[e]={default_free:"",default_paid:"",models:{Free:[],Paid:[]}});let n=a.providers[e];n.models||(n.models={Free:[],Paid:[]}),Array.isArray(n.models.Free)||(n.models.Free=[]);let t=n.models.Free.find(i=>(typeof i=="string"?i:i?.cmd)===l);if(t)if(typeof t=="string"){let i=n.models.Free.indexOf(t),d={cmd:l,multimodal:!!o,desc:l};s&&Object.keys(s).length>0&&(d.info=s),n.models.Free[i]=d}else o&&(t.multimodal=!0),s&&Object.keys(s).length>0&&(t.info={...t.info||{},...s});else{let i={cmd:l,multimodal:!!o,desc:l};s&&Object.keys(s).length>0&&(i.info=s),n.models.Free.push(i)}return n.default_free=l,c(),m(),{success:!0}},J=(e,r)=>{if(!e||!r)return{success:!1,reason:"Invalid provider or model ID"};let o=r.trim();if(!o)return{success:!1,reason:"Model ID cannot be empty"};let s=a.providers?.[e];if(!s||!s.models||!Array.isArray(s.models.Free))return{success:!1,reason:`Provider ${e} has no models configured`};let l=s.models.Free.findIndex(n=>(typeof n=="string"?n:n?.cmd)===o);return l===-1?{success:!1,reason:`Model "${o}" not found in ${e} model list`}:(s.models.Free.splice(l,1),s.default_free===o&&(s.default_free=""),s.default_paid===o&&(s.default_paid=""),c(),m(),{success:!0})},U=(e,r,o)=>{if(!e||!r||!o)return{success:!1,reason:"Invalid provider or model IDs"};let s=r.trim(),l=o.trim();if(!s||!l)return{success:!1,reason:"Model IDs cannot be empty"};let n=a.providers?.[e];if(!n||!n.models||!Array.isArray(n.models.Free))return{success:!1,reason:`Provider ${e} has no models configured`};let t=n.models.Free.find(i=>(typeof i=="string"?i:i?.cmd)===s);if(!t)return{success:!1,reason:`Model "${s}" not found in ${e} model list`};if(typeof t=="string"){let i=n.models.Free.indexOf(t);n.models.Free[i]={cmd:l,multimodal:!1,desc:l}}else t.cmd=l,(t.desc===s||!t.desc)&&(t.desc=l);return c(),m(),{success:!0}},x=!1,C=e=>{x=!!e},W=C,E=e=>{if(!e)return!1;let r=e.trim().toLowerCase();return!!(x||F.has(r)||r.startsWith("gemini-")||r.startsWith("gemma-"))},z=e=>{if(!e)return!1;let r=e.trim().toLowerCase();return k.has(r)},G=(e,r)=>{let o=a.providers[e];return o?o.models[r==="Free"?"Free":"Paid"]||[]:[]},K=(e,r)=>{let o=a.providers[e];return o?r==="Free"?o.default_free:o.default_paid:""},V=(e,r)=>{if(!e||!r||!a.providers)return null;let o=a.providers[e];if(!o||!o.models)return null;let s=r.trim().toLowerCase(),l=["Free","Paid"];for(let n of l){let t=o.models[n];if(Array.isArray(t)){for(let i of t)if(typeof i=="object"&&i?.cmd&&i.cmd.trim().toLowerCase()===s&&i.info)return{IN:Number(i.info.IN)||0,OUT:Number(i.info.OUT)||0,CR:Number(i.info.CR)||0,CW:Number(i.info.CW)||0}}}return null},X=e=>a?.fallbacks?.[e];export{p as a,L as b,m as c,N as d,$ as e,R as f,T as g,J as h,U as i,C as j,W as k,E as l,z as m,G as n,K as o,V as p,X as q};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as xs}from"./chunk-JS5ZIGFR.js";import{a as po}from"./chunk-7SFAWGE2.js";import{a as jt}from"./chunk-56EJGQU3.js";import{c as Ai,g as Ei,h as hs,i as ms}from"./chunk-4MDSKJGX.js";import{a as ps,c as ys}from"./chunk-KAL5XSAQ.js";import{a as Ci,g as bs}from"./chunk-VYTQ6J56.js";import{a as ws}from"./chunk-RZTZPIC5.js";import{a as jo}from"./chunk-FQBBOFNP.js";import{a as j}from"./chunk-Y5JU726N.js";import{b as ki}from"./chunk-KHCAQOSP.js";import{f as mo,l as vt,n as gt,p as Ti,q as gs}from"./chunk-
|
|
1
|
+
import{a as xs}from"./chunk-JS5ZIGFR.js";import{a as po}from"./chunk-7SFAWGE2.js";import{a as jt}from"./chunk-56EJGQU3.js";import{c as Ai,g as Ei,h as hs,i as ms}from"./chunk-4MDSKJGX.js";import{a as ps,c as ys}from"./chunk-KAL5XSAQ.js";import{a as Ci,g as bs}from"./chunk-VYTQ6J56.js";import{a as ws}from"./chunk-RZTZPIC5.js";import{a as jo}from"./chunk-FQBBOFNP.js";import{a as j}from"./chunk-Y5JU726N.js";import{b as ki}from"./chunk-KHCAQOSP.js";import{f as mo,l as vt,n as gt,p as Ti,q as gs}from"./chunk-OA7SWSBR.js";import{a as ho}from"./chunk-QWEEC3PP.js";import{l as ot,m as Ho,q as re}from"./chunk-BGIZLZQF.js";import{c as Rt,d as Qn,e as Go}from"./chunk-L3W2X74K.js";import{a as Mn,b as Bo,d as Tn,e as Uo,k as Hn,l as Wo,m as wi,r as Si,w as uo,x as go}from"./chunk-DSVLWYIT.js";import{GoogleGenAI as Br,ThinkingLevel as Ge,HarmBlockThreshold as Pn,HarmCategory as Ln}from"@google/genai";var Ss=(e=!0,n=!0)=>`
|
|
2
2
|
To use tools, must output exactly '[action:ActionName(arg1="value1")]' structured string in chat response \u2190 no exception
|
|
3
3
|
|
|
4
4
|
-- Chat Management Tools --
|
|
@@ -555,7 +555,7 @@ ${Ss(n,t)}
|
|
|
555
555
|
=== END SYSTEM PROMPT ===${e?`
|
|
556
556
|
|
|
557
557
|
-- current saved user memories --
|
|
558
|
-
${e}`:""}`.trim();var ir=()=>import("./web_search-2PFIJKIL.js").then(e=>e.web_search),sr=()=>import("./web_scrape-JO4DDXKB.js").then(e=>e.web_scrape),rr=()=>import("./memory-M7ASUB6J.js").then(e=>e.memory),ar=()=>import("./chat-MELTWDZ3.js").then(e=>e.chat),lr=()=>import("./view_file-2THVIMD6.js").then(e=>e.view_file),cr=()=>import("./write_file-A67UXLZ2.js").then(e=>e.write_file),dr=()=>import("./update_file-HGCNRGTK.js").then(e=>e.update_file),fr=()=>import("./exec_command-ZPCKBWBK.js").then(e=>e.exec_command),ur=()=>import("./read_folder-EI2CNHNS.js").then(e=>e.read_folder),Fi=()=>import("./ask_user-K2DLZF6H.js").then(e=>e.ask_user),gr=()=>import("./write_pdf-N2Q4Z3YP.js").then(e=>e.write_pdf),hr=()=>import("./write_docx-4Y43QJUV.js").then(e=>e.write_docx),qo=()=>import("./search_keyword-ARDEFVCK.js").then(e=>e.search_keyword),mr=()=>import("./generate_image-L2LXNTNE.js").then(e=>e.generate_image),Xo=()=>import("./saveSummary-UGNDVNI5.js").then(e=>e.saveSummary),Ao=()=>import("./addMemScore-BCPTSMKD.js").then(e=>e.addMemScore),pr=()=>import("./file_map-KS6Y7BP3.js").then(e=>e.file_map),Jo=()=>import("./todo-GFMPH2JV.js").then(e=>e.todo),yr=()=>import("./invokeSync-SAKOE3G5.js").then(e=>e.invokeSync),xa=()=>import("./invoke-7S44ZFQY.js").then(e=>e.invoke),xr=()=>import("./getProgress-A2TW34Q7.js").then(e=>e.getProgress),ba=()=>import("./cancel-F3ZOEBKW.js").then(e=>e.cancel),br=()=>import("./emergency_rollback-6X27LZE4.js").then(e=>e.emergency_rollback),Eo=()=>import("./awaitSubagent-JKQ2EHVY.js").then(e=>e.awaitSubagent),Co=()=>import("./answerSubagent-BPNNJXPC.js").then(e=>e.answerSubagent),Qo=()=>import("./steerSubagent-UETXH2CB.js").then(e=>e.steerSubagent),Zo=()=>import("./computer_action-2JLV6MY4.js").then(e=>e.computer_action),wr=()=>import("./click-YDLHTDEK.js").then(e=>e.click),Sr=()=>import("./drag-PUEGJCAB.js").then(e=>e.drag),kr=()=>import("./scroll-YTLIQ6C5.js").then(e=>e.scroll),Bi=()=>import("./keyboard_typing-V4ALD3BD.js").then(e=>e.keyboard_typing),Ui=()=>import("./key_press-KR2O7S6E.js").then(e=>e.key_press),Wi=()=>import("./recapture_screen-PPT2E3CK.js").then(e=>e.recapture_screen),ei=()=>import("./find_file-A6NYLQJS.js").then(e=>e.find_file),Tr=()=>import("./wait-TJR6LAR4.js").then(e=>e.wait),Ar={web_search:ir,web_scrape:sr,memory:rr,chat:ar,view_file:lr,write_file:cr,update_file:dr,exec_command:fr,read_folder:ur,write_pdf:gr,write_docx:hr,search_keyword:qo,generate_image:mr,saveSummary:Xo,addMemScore:Ao,file_map:pr,todo:Jo,Todo:Jo,goal:Jo,Goal:Jo,invokeSync:yr,invoke:xa,getProgress:xr,cancel:ba,awaitSubagent:Eo,answerSubagent:Co,steerSubagent:Qo,computer_action:Zo,computer_use:Zo,ComputerAction:Zo,ComputerUse:Zo,click:wr,Click:wr,drag:Sr,Drag:Sr,scroll:kr,Scroll:kr,keyboard_typing:Bi,KeyboardTyping:Bi,keyboardtyping:Bi,key_press:Ui,KeyPress:Ui,keypress:Ui,recapture_screen:Wi,RecaptureScreen:Wi,recapturescreen:Wi,invoke_sync:yr,get_progress:xr,await_subagent:Eo,answer_subagent:Co,steer_subagent:Qo,steer:Qo,Steer:Qo,ask:Fi,Ask:Fi,AskUser:Fi,WebSearch:ir,WebScrape:sr,ReadFile:lr,ReadFolder:ur,WriteFile:cr,PatchFile:dr,WritePDF:gr,WriteDoc:hr,Run:fr,SearchKeyword:qo,CodeSearch:qo,code_search:qo,Memory:rr,Chat:ar,GenerateImage:mr,saveSumary:Xo,SaveSummary:Xo,SaveSumary:Xo,add_mem_score:Ao,AddMemScore:Ao,addMemoryScore:Ao,AddMemoryScore:Ao,FileMap:pr,answer:Co,Answer:Co,AnswerSubagent:Co,await:Eo,Await:Eo,AwaitSubagent:Eo,EmergencyRollback:br,emergency_rollback:br,find_file:ei,findFile:ei,FindFile:ei,findfile:ei,wait:Tr,Wait:Tr},Ro=async(e,n,t={})=>{let i=t.mode?t.mode.toLowerCase():"flux",o=e.toLowerCase(),c=["memory","chat","savesummary","addmemscore","add_mem_score","ask","web_search","web_scrape","await","wait"].some(x=>o.includes(x))||o==="ask",u=["click","drag","scroll","keyboardtyping","keyboard_typing","keypress","key_press","recapturescreen","recapture_screen","computer","wait"].some(x=>o.includes(x));if(!c){if(i==="flow"){if(!(o.includes("write_pdf")||o.includes("write_docx")||o.includes("generate_image")))return`ERROR: Action [${e}] is a Workspace Tool and NOT available in Flow mode. Tell user to switch (\`/mode flux\`) to use this tool.`}else if(i==="icu"){if(!u)return`ERROR: Action [${e}] is not available in Computer Use mode. ICU mode only supports Computer Use tools (Click, Drag, Scroll, KeyboardTyping, KeyPress, RecaptureScreen).`}else if(o.includes("write_pdf")||o.includes("write_docx")||o.includes("generate_image"))return`ERROR: Action [${e}] is not available in ${t.mode||"Flux"} mode. Tell user to switch (\`/mode flow\`) for document generation.`}let m=Ar[e];if(!m){let x=["ReadFile","ReadFolder","FindFile","PatchFile","WriteFile","CodeSearch","Run","Goal","AskUser","WebSearch","WebScrape","WritePDF","WriteDoc","Click","Drag","Scroll","KeyboardTyping","KeyPress","RecaptureScreen","Wait","Invoke","InvokeSync","Await","GetProgress","Steer","Cancel","EmergencyRollback","Chat","Memory"],h={read:"ReadFile",view:"ReadFile",viewfile:"ReadFile",write:"WriteFile",edit:"PatchFile",patch:"PatchFile",update:"PatchFile",updatefile:"PatchFile",exec:"Run",command:"Run",bash:"Run",shell:"Run",powershell:"Run",search:"CodeSearch",grep:"CodeSearch",find:"FindFile",findfile:"FindFile",searchkeyword:"CodeSearch",folder:"ReadFolder",ls:"ReadFolder",dir:"ReadFolder",list:"ReadFolder",ask:"AskUser",question:"AskUser",pdf:"WritePDF",docx:"WriteDoc",doc:"WriteDoc",word:"WriteDoc",screenshot:"RecaptureScreen",screen:"RecaptureScreen",recapture:"RecaptureScreen",type:"KeyboardTyping",typing:"KeyboardTyping",keyboard:"KeyboardTyping",press:"KeyPress",key:"KeyPress",todo:"Goal",task:"Goal",subagent:"Invoke",agent:"Invoke"},f=o.replace(/[^a-z0-9]/g,""),s=h[f]||null;if(!s){let T=0,ge=R=>{let D=new Set;for(let H=0;H<R.length-1;H++)D.add(R.slice(H,H+2));return D},y=ge(f);for(let R of x){let D=R.toLowerCase().replace(/[^a-z0-9]/g,"");if(f===D){s=R;break}let H=0;(D.includes(f)||f.includes(D))&&(H+=.6);let $=ge(D),A=0;for(let be of y)$.has(be)&&A++;let he=2*A/(y.size+$.size||1);H=Math.max(H,he),H>T&&H>=.35&&(T=H,s=R)}}let g=s?` Do you mean '${s}'?`:"";return`ERROR: Action [${e}] not found in registry.${g}`}try{return await(await m())(n,t)}catch(x){let h=x instanceof Error?x.message:String(x);return`ERROR: Execution failed for [${e}]: ${h}`}};var ti=e=>{if(!e||typeof e!="string")return!1;let n=e.trim().toLowerCase();return Object.keys(Ar).some(t=>t.toLowerCase()===n)};import G from"path";import xe from"fs";import wa from"gradient-string";var Er=["I have a regex for your problems.","Your terminal, my kingdom.","Blowing on the cartridge helps. Probably.","Don't panic. I have the towel.","Logic is the start of wisdom.","Try to exit Vim? Good luck.","I speak fluent Terminal.","The cake is a lie. This code is not.","I have no bugs, just surprise features.","Rewriting in Rust... just for fun.","Coffee in, clean commits out.","The magic smoke stays inside today.","A semicolon short of a miracle.","One does not simply code without a bug.","Keep it simple. Keep it terminal.","Regex: now you have two problems.","I dream in binary.","Root access or bust.","Wait for the dial-up tone. Just kidding.","I take the 'labor' out of collab.","My other process is a TARDIS.","Calculated response: 42.","Ponder the orb. Ponder the code.","Less talk, more flow.","Elegance in every byte.","Build something the world is not ready for.","Your wishes, my tool calls.","I act in Flux. I think in Flow.","Syntax error in the universe. Please fix.","Your project, my obsession.","I am not a bot, I am an architect.","Digital spirits consulted. They say: Ship it.","Reticulate splines. Engage humor.","Code like poetry. Run like water.","Minimalism is the ultimate flex.","The truth is in the logs.","Follow the white rabbit.","There is no spoon. Only code.","Binary is the only language I trust.","I have a good feeling about this.","Pew pew! Lasers charged.","Divide by zero? Not today.","Search for the correct USB orientation...","I've got a fever, and the only cure is more code.","The code gremlins are on our side.","My favorite command? Yours.","Stay hungry. Stay active.","Momentum is your best friend.","Lead the flow. Don't chase it.","A fresh batch of bytes. Hot and ready.","I orchestrate the ones and zeros.","Smart enough to help. Humble enough to ask.","Think twice. Code once.","Pure intent. Pure execution.","Small steps. Massive impact.","Your terminal is a canvas.","Efficiency is my second name.","I have seen things you people wouldn't believe.","Let the thoughts marinate.","The best feature? The one you don't need.","Precision is the only perfection.","Stay focused. Stay terminal.","Silence is the best debugger.","Erase the debt. Commit the code.","Velocity meets stability.","Ship it. Improve it. Repeat.","Build tomorrow, right now.","Turn logic into reality.","The best way to predict the future is to build it.","Break barriers, not builds.","Fuel the next breakthrough.","Momentum is key.","Terminal vibes only.","Your digital co-pilot is ready.","Partner in code. Partner in crime.","I speak in semicolons.","Ready for the next great idea.","Just a moment. In the zone.","Polishing the algorithms. Hold tight.","Craft a masterpiece today.","Debug the universe. Start here.","Warp speed engaged. Almost.","The cake is not a lie. It's just loading.","Finish the Kessel Run in 12 parsecs.","Do a barrel roll!","Waiting for the respawn.","Press Start to continue.","Herding digital cats... done.","The hamsters are fast today.","Tasting the snozberries.","I go for speed. I go for flow.","Real life or just fantasy?","Poking the bear... gently.","Ensure the magic smoke stays inside.","Try turning it off and on again.","Construct additional pylons.","New line? Ctrl+J is your friend.","Release the HypnoDrones.","Push the button, Frank.","My other loading screen is even funnier.","Pretty sure a cat walked on my keyboard.","Recalibrate the humor-o-meter.","Summon the code gremlins.","I've seen your browser history. Just kidding.","Charge the laser... pew pew!","Dividing by zero... just for a sec.","Looking for an adult supervisor. Found none.","Make it go beep boop.","Buffering... for effect.","Entangle quantum particles... complete.","Polishing the chrome on my algorithms.","Are you not entertained?","Just waiting for the dial-up tone.","Reboot the humor module.","Defragment memories. Check.","Optimizing for ludicrous speed.","Swapping bits. Don't tell the bytes.","Garbage collected. I am back.","Assembling the interwebs.","Converting coffee to logic.","Update syntax for reality.","Rewire the synapses.","Greasin' the cogs.","Engage the improbability drive.","Channel the Force.","Align the stars. Respond now.","The cake is a lie. The prompt is real.","I'm Feeling Lucky.","Shipping awesomeness.","Navigating the slime mold.","Consult digital spirits.","Ask the magic conch shell.","One moment. Optimizing humor.","Shuffling punchlines.","Compiling brilliance.","Summon the cloud of wisdom.","Prepare to dazzle.","Hold tight. Crafting a response.","Tuning the algorithms.","Following the white rabbit... again.","The truth is in here. Somewhere.","Herding cats is my day job.","Distracting you with this phrase.","Almost there. Probably.","Rickrolling my creator. Don't tell.","Slapping the bass.","Is this real life?","Ponder the orb. Type the prompt.","Thoughtful gaze initiated.","Computer's favorite snack? Microchips.","Why Java? Because I don't C#.","Charging the laser... wait for it.","Dividing by zero... just kidding!","Adult supervision not found. Proceed.","Beep boop. I'm a real boy.","Wait for the respawn.","Finish the run. Ship the code.","Fiddling with character creation.","Just a moment. Finding a meme.","Pressing A to continue.","Loading wit.exe.","Pre-heating the servers.","Calibrate flux capacitor.","Channeling the Force.","Aligning the stars.","The truth is in the code.","Don't panic.","Blowing on the cartridge.","Doing a barrel roll!","Respawning in 3... 2... 1...","The cake is a lie.","Fiddling with character settings.","Finding a suitable pun.","Distracting with wit.","Almost ready.","Hamsters on speed today.","Patting Cloudy on the head.","Rickrolling the logs.","Slapping the code.","Got a good feeling about this.","Poking the prompt.","Researching latest memes.","Making it more witty.","Thinking... hmmm.","Fish with no eyes? Fsh.","Broken pencil? Pointless.","Percussive maintenance applied.","USB orientation: 3rd try's the charm.","Rust rewrite in 3... 2...","Exiting Vim... someday.","Spinning the hamster wheel.","Not a bug. Unplanned feature.","Engage.","I'll be back.","Machine spirit consulted.","Letting the thoughts marinate.","Orb pondered.","Thoughtful gaze engaged.","Charging the laser...","Making it go beep.","Buffering...","Quantum particles entangled.","Polishing the chrome.","Entertained yet?","Gremlins summoned.","Dial-up tone finished.","Humor meter recalibrated.","Cat on keyboard. Sending help.","Enhancing...","Turn it off and on again.","Constructing pylons.","HypnoDrones released.","Pushing the button."];var Cr=["Beware the phantom processes.","A ghost in the shell has taken the wheel.","Blowing on the haunted cartridge...","Seven minutes in Raccoon City.","Wind's howling... in the terminal fans.","Slender Man was spotted in line 404.","The cake is a lie. The curse is real.","Don't look behind the server rack.","Exorcising memory leaks at 3 AM.","Pyramid Head reorganized your commit history.","It's dangerous to go alone! Take this flashlight.","YOU DIED. Respawning terminal session...","The Necronomicon evaluated to true.","Something wicked this way compiles.","Haunting your localhost with good vibes.","A full moon has risen over Git main.","Double, double toil and trouble; code fire burn.","Clickers heard in the directory tree.","Checking camera 2B for rogue animatronics.","The call is coming from inside the container.","Isaac Clarke is stomping on stubborn bugs.","Luigi vacuumed the ghosts out of RAM.","Trick or treat, give me clean code to greet.","Whispering incantations to the garbage collector.","Klaatu barada necktie... close enough.","Resurrecting deprecated APIs from the crypt.","The headless horseman forgot the return statement.","Castlevania whip cracking against network latency.","Slime mold crawling through the motherboard.","Carving a pixelated pumpkin into terminal history.","Burying undefined pointers in the pet sematary.","Spilling pumpkin spice on the CPU.","A vampire bat is draining system battery life.","Don't fall asleep at the keyboard tonight.","Silent Hill sirens sounding in the console.","Poltergeists rearranging terminal tabs.","Lighting the Black Flame Candle for autoExec.","Dusting cobwebs off legacy dependencies.","Here's Johnny! ...just checking build health.","Blood, sweat, and zero warnings.","The spirit box whispers: 'GIT PUSH FORCE'.","They're heeeere... in the stack trace.","It's alive! IT'S ALIVEEEE!","No merge conflicts in the graveyard.","Frankenstein's monster patched this logic.","Surviving Five Nights at Flux Flow.","Doom Slayer loading buckshot into cache.","The grim reaper spared your unused imports.","Candy corn lodged in mechanical switches.","May your latency be low and your crypt be quiet."];var Rr=[{name:"Cyan Cyberpunk",text:"cyan",textMuted:"#4da6b8",textDim:"#2d6d7a",textInverted:"black",border:"cyan",borderMuted:"#1a5966",borderDim:"#0f3840",bg:void 0,cardBg:"#061e24",highlightBg:"#092b33",activeBg:"#0e3e4a",inputBg:"#092b33",inputBorder:"#092b33",inputText:"cyan",inputPlaceholder:"#2d6d7a",inputPrompt:"cyan",codeBg:"#020d10",codeBorder:"#1a5966",userMsgBg:"#092b33",userMsgBorder:"#092b33",userMsgText:"cyan",diffRemovalBg:"#3a0c1a",diffAdditionBg:"#0c3a32",diffRemovalText:"#ff4d88",diffAdditionText:"#00ffaa",diffRemovalHighlightColor:"#ff1a66",diffRemovalHighlightBg:"#590022",diffAdditionHighlightColor:"#00ffcc",diffAdditionHighlightBg:"#00593b",diffRemovalNum:"#ff4d88",diffAdditionNum:"#00ffaa",diffRemovalPrefix:"#ff1a66",diffAdditionPrefix:"#00ffcc",primary:"cyan",secondary:"blue",accent:"magenta",success:"green",warning:"yellow",danger:"red",info:"blue",statusOn:"cyan",statusOff:"#2d6d7a",logoTextAnsi:"\x1B[1;36m",logoBodyAnsi:"\x1B[36m",logoMutedAnsi:"\x1B[90m",logoGradient:["#00ffff","#0088ff"]},{name:"Magenta Vaporwave",text:"magenta",textMuted:"#c451d6",textDim:"#7d2b8a",textInverted:"black",border:"magenta",borderMuted:"#5e1b69",borderDim:"#3b0f42",bg:void 0,cardBg:"#240729",highlightBg:"#310938",activeBg:"#470e52",inputBg:"#310938",inputBorder:"#310938",inputText:"magenta",inputPlaceholder:"#7d2b8a",inputPrompt:"magenta",codeBg:"#100312",codeBorder:"#5e1b69",userMsgBg:"#310938",userMsgBorder:"#310938",userMsgText:"magenta",diffRemovalBg:"#3a0c20",diffAdditionBg:"#200c3a",diffRemovalText:"#ff4d94",diffAdditionText:"#aa4dff",diffRemovalHighlightColor:"#ff1a75",diffRemovalHighlightBg:"#59002b",diffAdditionHighlightColor:"#bb66ff",diffAdditionHighlightBg:"#3b0059",diffRemovalNum:"#ff4d94",diffAdditionNum:"#aa4dff",diffRemovalPrefix:"#ff1a75",diffAdditionPrefix:"#bb66ff",primary:"magenta",secondary:"cyan",accent:"purple",success:"green",warning:"yellow",danger:"red",info:"blue",statusOn:"magenta",statusOff:"#7d2b8a",logoTextAnsi:"\x1B[1;35m",logoBodyAnsi:"\x1B[35m",logoMutedAnsi:"\x1B[90m",logoGradient:["#ff00ff","#8800ff"]},{name:"Glitch Matrix",text:"#00ff41",textMuted:"#00b32d",textDim:"#00661a",textInverted:"black",border:"#00ff41",borderMuted:"#008020",borderDim:"#004d13",bg:void 0,cardBg:"#0d1f0d",highlightBg:"#122912",activeBg:"#1c3e1c",inputBg:"#122912",inputBorder:"#122912",inputText:"#00ff41",inputPlaceholder:"#00b32d",inputPrompt:"#ffff00",codeBg:"#040a04",codeBorder:"#008020",userMsgBg:"#122912",userMsgBorder:"#122912",userMsgText:"#00ff41",diffRemovalBg:"#3a001a",diffAdditionBg:"#003a10",diffRemovalText:"#ff0055",diffAdditionText:"#00ff66",diffRemovalHighlightColor:"#ff0033",diffRemovalHighlightBg:"#59001b",diffAdditionHighlightColor:"#33ff88",diffAdditionHighlightBg:"#005918",diffRemovalNum:"#ff0055",diffAdditionNum:"#00ff66",diffRemovalPrefix:"#ff0033",diffAdditionPrefix:"#33ff88",primary:"#00ff41",secondary:"yellow",accent:"cyan",success:"#00ff41",warning:"yellow",danger:"red",info:"cyan",statusOn:"#00ff41",statusOff:"#00661a",logoTextAnsi:"\x1B[1;32m",logoBodyAnsi:"\x1B[32m",logoMutedAnsi:"\x1B[90m",logoGradient:["#00ff41","#ffff00"]},{name:"Warm Sunset",text:"#ffaa55",textMuted:"#cc8844",textDim:"#885522",textInverted:"black",border:"#ff9933",borderMuted:"#aa6622",borderDim:"#663311",bg:void 0,cardBg:"#24180f",highlightBg:"#2e1e12",activeBg:"#422c1b",inputBg:"#2e1e12",inputBorder:"#2e1e12",inputText:"#ffaa55",inputPlaceholder:"#885522",inputPrompt:"#ff7733",codeBg:"#120c08",codeBorder:"#aa6622",userMsgBg:"#2e1e12",userMsgBorder:"#2e1e12",userMsgText:"#ffaa55",diffRemovalBg:"#3d120c",diffAdditionBg:"#3a2e0c",diffRemovalText:"#ff5544",diffAdditionText:"#ffcc33",diffRemovalHighlightColor:"#ff3322",diffRemovalHighlightBg:"#591108",diffAdditionHighlightColor:"#ffee44",diffAdditionHighlightBg:"#594400",diffRemovalNum:"#ff5544",diffAdditionNum:"#ffcc33",diffRemovalPrefix:"#ff3322",diffAdditionPrefix:"#ffee44",primary:"#ffaa55",secondary:"#ff7733",accent:"magenta",success:"#ffcc33",warning:"#ff7733",danger:"#ff3322",info:"#ffaa55",statusOn:"#ffaa55",statusOff:"#885522",logoTextAnsi:"\x1B[1;33m",logoBodyAnsi:"\x1B[33m",logoMutedAnsi:"\x1B[90m",logoGradient:["#ff9933","#ff0055"]},{name:"Sakura Blossom",text:"#ffc0e0",textMuted:"#d98cb3",textDim:"#804d66",textInverted:"black",border:"#ff99cc",borderMuted:"#aa4d7a",borderDim:"#662647",bg:void 0,cardBg:"#291320",highlightBg:"#331826",activeBg:"#472235",inputBg:"#331826",inputBorder:"#331826",inputText:"#ffc0e0",inputPlaceholder:"#804d66",inputPrompt:"#ff99cc",codeBg:"#140a10",codeBorder:"#aa4d7a",userMsgBg:"#331826",userMsgBorder:"#331826",userMsgText:"#ffc0e0",diffRemovalBg:"#3e0c1b",diffAdditionBg:"#1b3e2b",diffRemovalText:"#ff6699",diffAdditionText:"#66ffb3",diffRemovalHighlightColor:"#ff3377",diffRemovalHighlightBg:"#590022",diffAdditionHighlightColor:"#33ff99",diffAdditionHighlightBg:"#00592e",diffRemovalNum:"#ff6699",diffAdditionNum:"#66ffb3",diffRemovalPrefix:"#ff3377",diffAdditionPrefix:"#33ff99",primary:"#ffc0e0",secondary:"#ff99cc",accent:"magenta",success:"#66ffb3",warning:"yellow",danger:"#ff3377",info:"#ff99cc",statusOn:"#ffc0e0",statusOff:"#804d66",logoTextAnsi:"\x1B[1;35m",logoBodyAnsi:"\x1B[35m",logoMutedAnsi:"\x1B[90m",logoGradient:["#ffb3d9","#ff3399"]},{name:"Radioactive Slime",text:"#ccff00",textMuted:"#99cc00",textDim:"#669900",textInverted:"#0a0f00",border:"#ccff00",borderMuted:"#99cc00",borderDim:"#669900",bg:void 0,cardBg:"#0f1400",highlightBg:"#1a2400",activeBg:"#2a3b00",inputBg:"#1a2400",inputBorder:"#1a2400",inputText:"#ccff00",inputPlaceholder:"#669900",inputPrompt:"#cc00ff",codeBg:"#050a00",codeBorder:"#99cc00",userMsgBg:"#1a2400",userMsgBorder:"#1a2400",userMsgText:"#ccff00",diffRemovalBg:"#2a0033",diffAdditionBg:"#0f3300",diffRemovalText:"#ff00cc",diffAdditionText:"#00ff33",diffRemovalHighlightColor:"#ff33cc",diffRemovalHighlightBg:"#4d0066",diffAdditionHighlightColor:"#33ff66",diffAdditionHighlightBg:"#1a6600",diffRemovalNum:"#ff00cc",diffAdditionNum:"#00ff33",diffRemovalPrefix:"#ff33cc",diffAdditionPrefix:"#33ff66",primary:"#ccff00",secondary:"#cc00ff",accent:"#ff00cc",success:"#00ff33",warning:"#ffcc00",danger:"#ff0033",info:"#00ccff",statusOn:"#ccff00",statusOff:"#669900",logoTextAnsi:"\x1B[1;38;5;190m",logoBodyAnsi:"\x1B[38;5;190m",logoMutedAnsi:"\x1B[90m",logoGradient:["#ccff00","#cc00ff"]},{name:"Cosmic Void",text:"#f0f8ff",textMuted:"#a6aeb5",textDim:"#5e656e",textInverted:"#010103",border:"#f0f8ff",borderMuted:"#a6aeb5",borderDim:"#5e656e",bg:void 0,cardBg:"#05030d",highlightBg:"#0b081a",activeBg:"#171133",inputBg:"#0b081a",inputBorder:"#0b081a",inputText:"#f0f8ff",inputPlaceholder:"#5e656e",inputPrompt:"#ff007f",codeBg:"#020108",codeBorder:"#a6aeb5",userMsgBg:"#0b081a",userMsgBorder:"#0b081a",userMsgText:"#f0f8ff",diffRemovalBg:"#2e0a29",diffAdditionBg:"#091c33",diffRemovalText:"#ff33a6",diffAdditionText:"#33d6ff",diffRemovalHighlightColor:"#ff66c2",diffRemovalHighlightBg:"#5c1452",diffAdditionHighlightColor:"#66e0ff",diffAdditionHighlightBg:"#123866",diffRemovalNum:"#ff33a6",diffAdditionNum:"#33d6ff",diffRemovalPrefix:"#ff66c2",diffAdditionPrefix:"#66e0ff",primary:"#f0f8ff",secondary:"#ff007f",accent:"#9d00ff",success:"#33d6ff",warning:"#ffcc00",danger:"#ff0040",info:"#9d00ff",statusOn:"#f0f8ff",statusOff:"#5e656e",logoTextAnsi:"\x1B[1;38;5;231m",logoBodyAnsi:"\x1B[38;5;231m",logoMutedAnsi:"\x1B[38;5;240m",logoGradient:["#ffffff","#9d00ff"]},{name:"Magma Eruption",text:"#ff4d00",textMuted:"#cc3d00",textDim:"#802600",textInverted:"#0d0300",border:"#ff4d00",borderMuted:"#cc3d00",borderDim:"#802600",bg:void 0,cardBg:"#1a0600",highlightBg:"#260a00",activeBg:"#401100",inputBg:"#260a00",inputBorder:"#260a00",inputText:"#ff4d00",inputPlaceholder:"#802600",inputPrompt:"#ffcc00",codeBg:"#080200",codeBorder:"#cc3d00",userMsgBg:"#260a00",userMsgBorder:"#260a00",userMsgText:"#ff4d00",diffRemovalBg:"#2e0a0a",diffAdditionBg:"#1f1400",diffRemovalText:"#ff3333",diffAdditionText:"#ffaa00",diffRemovalHighlightColor:"#ff6666",diffRemovalHighlightBg:"#5c1414",diffAdditionHighlightColor:"#ffcc33",diffAdditionHighlightBg:"#3d2900",diffRemovalNum:"#ff3333",diffAdditionNum:"#ffaa00",diffRemovalPrefix:"#ff6666",diffAdditionPrefix:"#ffcc33",primary:"#ff4d00",secondary:"#ffcc00",accent:"#ff0040",success:"#ffaa00",warning:"#ffff00",danger:"#ff0000",info:"#ff8800",statusOn:"#ff4d00",statusOff:"#802600",logoTextAnsi:"\x1B[1;38;5;202m",logoBodyAnsi:"\x1B[38;5;202m",logoMutedAnsi:"\x1B[38;5;236m",logoGradient:["#ff4d00","#ff0000"]}],Zn={Dark:{id:"Dark",name:"Dark (Default)",text:"white",textMuted:"gray",textDim:"grey",textInverted:"black",textExclusive:"#B5B8D9",textMutedExclusive:"#D4DEE7",border:"white",borderMuted:"gray",borderDim:"grey",bg:void 0,cardBg:"#1e1e1e",highlightBg:"#2a2a2a",activeBg:"#3a3a3a",inputBg:"#555555",inputBorder:"#555555",inputText:"white",inputPlaceholder:"#cccccc",inputPrompt:"white",codeBg:"#1a1a1a",codeBorder:"#444444",userMsgBg:"#444444",userMsgBorder:"#444444",userMsgText:"white",diffRemovalBg:"#250808",diffAdditionBg:"#072410",diffRemovalText:"#885555",diffAdditionText:"#558866",diffRemovalHighlightColor:"#ff3333",diffRemovalHighlightBg:"#5a1818",diffAdditionHighlightColor:"#33ff66",diffAdditionHighlightBg:"#185a25",diffRemovalNum:"#d96868",diffAdditionNum:"#68d98c",diffRemovalPrefix:"#ff4d4d",diffAdditionPrefix:"#4dff88",primary:"white",secondary:"cyan",accent:"magenta",success:"green",warning:"yellow",danger:"red",info:"blue",statusOn:"white",statusOff:"gray",logoTextAnsi:"\x1B[1;37m",logoBodyAnsi:"\x1B[37m",logoMutedAnsi:"\x1B[90m",logoGradient:["#0077ff","#ff00ff"],toolFeedbackAnsi:"\x1B[95m"},Light:{id:"Light",name:"Light",text:"black",textMuted:"gray",textDim:"grey",textInverted:"white",border:"black",borderMuted:"gray",borderDim:"grey",bg:void 0,cardBg:"#e5e5e5",highlightBg:"#d4d4d4",activeBg:"#c0c0c0",inputBg:"#d0d0d0",inputBorder:"#d0d0d0",inputText:"black",inputPlaceholder:"#555555",inputPrompt:"black",codeBg:"#e8e8e8",codeBorder:"#b0b0b0",userMsgBg:"#d0d0d0",userMsgBorder:"#d0d0d0",userMsgText:"black",diffRemovalBg:"#fce8e8",diffAdditionBg:"#e6f9e6",diffRemovalText:"#661111",diffAdditionText:"#115511",diffRemovalHighlightColor:"#440000",diffRemovalHighlightBg:"#f8b4b4",diffAdditionHighlightColor:"#003300",diffAdditionHighlightBg:"#a6ebad",diffRemovalNum:"#c02020",diffAdditionNum:"#188028",diffRemovalPrefix:"#d01010",diffAdditionPrefix:"#109020",primary:"black",secondary:"blue",accent:"magenta",success:"green",warning:"yellow",danger:"red",info:"blue",statusOn:"black",statusOff:"gray",logoTextAnsi:"\x1B[1;30m",logoBodyAnsi:"\x1B[30m",logoMutedAnsi:"\x1B[38;5;244m",logoGradient:["#0077ff","#ff00ff"],toolFeedbackAnsi:"\x1B[95m"},"GitHub Dark":{id:"GitHub Dark",name:"GitHub Dark",text:"#c9d1d9",textMuted:"#8b949e",textDim:"#6e7681",textInverted:"#0d1117",border:"#30363d",borderMuted:"#30363d",borderDim:"#21262d",bg:void 0,cardBg:"#161b22",highlightBg:"#21262d",activeBg:"#30363d",inputBg:"#21262d",inputBorder:"#21262d",inputText:"#c9d1d9",inputPlaceholder:"#8b949e",inputPrompt:"#58a6ff",codeBg:"#0d1117",codeBorder:"#30363d",userMsgBg:"#21262d",userMsgBorder:"#21262d",userMsgText:"#c9d1d9",diffRemovalBg:"#3c1e1e",diffAdditionBg:"#11381e",diffRemovalText:"#f85149",diffAdditionText:"#3fb950",diffRemovalHighlightColor:"#ff7b72",diffRemovalHighlightBg:"#701c1c",diffAdditionHighlightColor:"#56d364",diffAdditionHighlightBg:"#116329",diffRemovalNum:"#f85149",diffAdditionNum:"#3fb950",diffRemovalPrefix:"#f85149",diffAdditionPrefix:"#3fb950",primary:"#c9d1d9",secondary:"#58a6ff",accent:"#bc8cff",success:"#3fb950",warning:"#d29922",danger:"#f85149",info:"#58a6ff",statusOn:"#58a6ff",statusOff:"#8b949e",logoTextAnsi:"\x1B[1;36m",logoBodyAnsi:"\x1B[37m",logoMutedAnsi:"\x1B[90m",logoGradient:["#2ea043","#56d364"],toolFeedbackAnsi:"\x1B[95m"},"GitHub Light":{id:"GitHub Light",name:"GitHub Light",text:"#24292f",textMuted:"#57606a",textDim:"#6e7781",textInverted:"#ffffff",border:"#d0d7de",borderMuted:"#d0d7de",borderDim:"#e1e4e8",bg:void 0,cardBg:"#f6f8fa",highlightBg:"#eaeef2",activeBg:"#d0d7de",inputBg:"#eaeef2",inputBorder:"#eaeef2",inputText:"#24292f",inputPlaceholder:"#57606a",inputPrompt:"#0969da",codeBg:"#ffffff",codeBorder:"#d0d7de",userMsgBg:"#eaeef2",userMsgBorder:"#eaeef2",userMsgText:"#24292f",diffRemovalBg:"#ffebe9",diffAdditionBg:"#e6ffec",diffRemovalText:"#cf222e",diffAdditionText:"#1a7f37",diffRemovalHighlightColor:"#82071e",diffRemovalHighlightBg:"#ffc1c0",diffAdditionHighlightColor:"#116329",diffAdditionHighlightBg:"#acf2bd",diffRemovalNum:"#cf222e",diffAdditionNum:"#1a7f37",diffRemovalPrefix:"#cf222e",diffAdditionPrefix:"#1a7f37",primary:"#24292f",secondary:"#0969da",accent:"#8250df",success:"#1a7f37",warning:"#9a6700",danger:"#cf222e",info:"#0969da",statusOn:"#0969da",statusOff:"#57606a",logoTextAnsi:"\x1B[1;34m",logoBodyAnsi:"\x1B[30m",logoMutedAnsi:"\x1B[38;5;244m",logoGradient:["#1a7f37","#2da44e"],toolFeedbackAnsi:"\x1B[95m"},"Transparent Dark":{id:"Transparent Dark",name:"Transparent Dark",text:"white",textMuted:"gray",textDim:"grey",textInverted:"black",border:"gray",borderMuted:"gray",borderDim:"grey",bg:void 0,cardBg:void 0,highlightBg:"#2a2a2a",activeBg:"#3a3a3a",inputBg:"#555555",inputBorder:"#555555",inputText:"white",inputPlaceholder:"#cccccc",inputPrompt:"white",codeBg:void 0,codeBorder:"gray",userMsgBg:"#555555",userMsgBorder:"#555555",userMsgText:"white",diffRemovalBg:void 0,diffAdditionBg:void 0,diffRemovalText:"#ff6666",diffAdditionText:"#66ff66",diffRemovalHighlightColor:"#ff3333",diffRemovalHighlightBg:void 0,diffAdditionHighlightColor:"#33ff66",diffAdditionHighlightBg:void 0,diffRemovalNum:"#ff6666",diffAdditionNum:"#66ff66",diffRemovalPrefix:"#ff4d4d",diffAdditionPrefix:"#4dff88",primary:"white",secondary:"cyan",accent:"magenta",success:"green",warning:"yellow",danger:"red",info:"blue",statusOn:"white",statusOff:"gray",logoTextAnsi:"\x1B[1;37m",logoBodyAnsi:"\x1B[37m",logoMutedAnsi:"\x1B[90m",logoGradient:["#0077ff","#ff00ff"],toolFeedbackAnsi:"\x1B[95m"},"Transparent Light":{id:"Transparent Light",name:"Transparent Light",text:"black",textMuted:"gray",textDim:"grey",textInverted:"white",border:"gray",borderMuted:"gray",borderDim:"grey",bg:void 0,cardBg:void 0,highlightBg:"#d4d4d4",activeBg:"#c0c0c0",inputBg:"#d0d0d0",inputBorder:"#d0d0d0",inputText:"black",inputPlaceholder:"#555555",inputPrompt:"black",codeBg:void 0,codeBorder:"gray",userMsgBg:"#d0d0d0",userMsgBorder:"#d0d0d0",userMsgText:"black",diffRemovalBg:void 0,diffAdditionBg:void 0,diffRemovalText:"#c02020",diffAdditionText:"#188028",diffRemovalHighlightColor:"#800000",diffRemovalHighlightBg:void 0,diffAdditionHighlightColor:"#004000",diffAdditionHighlightBg:void 0,diffRemovalNum:"#c02020",diffAdditionNum:"#188028",diffRemovalPrefix:"#d01010",diffAdditionPrefix:"#109020",primary:"black",secondary:"blue",accent:"magenta",success:"green",warning:"yellow",danger:"red",info:"blue",statusOn:"black",statusOff:"gray",logoTextAnsi:"\x1B[1;30m",logoBodyAnsi:"\x1B[30m",logoMutedAnsi:"\x1B[38;5;244m",logoGradient:["#0077ff","#ff00ff"],toolFeedbackAnsi:"\x1B[95m"},"Synthwave 84":{id:"Synthwave 84",name:"Synthwave 84",text:"#fdfdfd",textMuted:"#a08eb7",textDim:"#705c8a",textInverted:"#1a1025",textExclusive:"#e3dcf0",textMutedExclusive:"#b9abc9",border:"#fc28a8",borderMuted:"#a21568",borderDim:"#5c0a3a",bg:void 0,cardBg:"#261b38",highlightBg:"#35254d",activeBg:"#4c3570",inputBg:"#35254d",inputBorder:"#35254d",inputText:"#fdfdfd",inputPlaceholder:"#a08eb7",inputPrompt:"#03e8fc",codeBg:"#1e142b",codeBorder:"#a21568",userMsgBg:"#35254d",userMsgBorder:"#35254d",userMsgText:"#fdfdfd",diffRemovalBg:"#471434",diffAdditionBg:"#144743",diffRemovalText:"#ff4081",diffAdditionText:"#00e5ff",diffRemovalHighlightColor:"#ff79a1",diffRemovalHighlightBg:"#6b1e4e",diffAdditionHighlightColor:"#66f5ff",diffAdditionHighlightBg:"#1e6b65",diffRemovalNum:"#ff4081",diffAdditionNum:"#00e5ff",diffRemovalPrefix:"#ff79a1",diffAdditionPrefix:"#66f5ff",primary:"#fdfdfd",secondary:"#03e8fc",accent:"#fc28a8",success:"#00e5ff",warning:"#ffc107",danger:"#ff4081",info:"#b388ff",statusOn:"#03e8fc",statusOff:"#a08eb7",logoTextAnsi:"\x1B[1;35m",logoBodyAnsi:"\x1B[35m",logoMutedAnsi:"\x1B[90m",logoGradient:["#fc28a8","#03e8fc"],toolFeedbackAnsi:"\x1B[38;2;3;232;252m"},"Forest Sprite":{id:"Forest Sprite",name:"Forest Sprite",text:"#d6e6d1",textMuted:"#95b38d",textDim:"#628059",textInverted:"#161c14",textExclusive:"#eaf2e8",textMutedExclusive:"#a9c7a2",border:"#74a862",borderMuted:"#477038",borderDim:"#2b4720",bg:void 0,cardBg:"#1f291c",highlightBg:"#2a3826",activeBg:"#3a4d35",inputBg:"#2a3826",inputBorder:"#2a3826",inputText:"#d6e6d1",inputPlaceholder:"#95b38d",inputPrompt:"#8feb73",codeBg:"#161e14",codeBorder:"#477038",userMsgBg:"#2a3826",userMsgBorder:"#2a3826",userMsgText:"#d6e6d1",diffRemovalBg:"#3b231c",diffAdditionBg:"#203b1c",diffRemovalText:"#db6242",diffAdditionText:"#59cc3f",diffRemovalHighlightColor:"#f0896c",diffRemovalHighlightBg:"#5c362a",diffAdditionHighlightColor:"#80e368",diffAdditionHighlightBg:"#305929",diffRemovalNum:"#db6242",diffAdditionNum:"#59cc3f",diffRemovalPrefix:"#f0896c",diffAdditionPrefix:"#80e368",primary:"#d6e6d1",secondary:"#8feb73",accent:"#e69835",success:"#59cc3f",warning:"#e69835",danger:"#db6242",info:"#73b4eb",statusOn:"#8feb73",statusOff:"#95b38d",logoTextAnsi:"\x1B[1;32m",logoBodyAnsi:"\x1B[32m",logoMutedAnsi:"\x1B[90m",logoGradient:["#8feb73","#e69835"],toolFeedbackAnsi:"\x1B[38;2;143;235;115m"},Spookfest:{id:"Spookfest",name:"Spookfest \u{1F383}",text:"#ffeedd",textMuted:"#e09858",textDim:"#a6622b",textInverted:"#0d0702",textExclusive:"#fff3e6",textMutedExclusive:"#d4a276",border:"#ff7518",borderMuted:"#994409",borderDim:"#592502",bg:void 0,cardBg:"#1a0c02",highlightBg:"#2a1403",activeBg:"#3d1d05",inputBg:"#261203",inputBorder:"#261203",inputText:"#ffeedd",inputPlaceholder:"#a6622b",inputPrompt:"#ff7518",codeBg:"#120701",codeBorder:"#592502",userMsgBg:"#261203",userMsgBorder:"#261203",userMsgText:"#ffeedd",diffRemovalBg:"#3d0a0a",diffAdditionBg:"#1a330a",diffRemovalText:"#ff5555",diffAdditionText:"#73e639",diffRemovalHighlightColor:"#ff2222",diffRemovalHighlightBg:"#590e0e",diffAdditionHighlightColor:"#88ff3b",diffAdditionHighlightBg:"#244d0a",diffRemovalNum:"#ff5555",diffAdditionNum:"#73e639",diffRemovalPrefix:"#ff3333",diffAdditionPrefix:"#88ff3b",primary:"#ff7518",secondary:"#a855f7",accent:"#22c55e",success:"#22c55e",warning:"#f59e0b",danger:"#ef4444",info:"#a855f7",statusOn:"#ff7518",statusOff:"#703a08",logoTextAnsi:"\x1B[1;38;2;255;117;24m",logoBodyAnsi:"\x1B[38;2;255;140;26m",logoMutedAnsi:"\x1B[38;2;168;85;247m",logoGradient:["#ff7518","#a855f7"],toolFeedbackAnsi:"\x1B[38;2;255;117;24m"}};var ni=null;var oi=(e="Dark")=>{let n;e==="Mystery"||e==="Chaos"?(ni||(ni=Rr[Math.floor(Math.random()*Rr.length)]),n={...ni,id:"Mystery"}):(ni=null,Zn[e]?n=Zn[e]:e==="Halloween"?n=Zn.Spookfest:e==="GitHub"?n=Zn["GitHub Dark"]:e==="Transparent"?n=Zn["Transparent Dark"]:n=Zn.Dark);let t=n.codeText||n.secondary||n.info||n.logoGradient&&n.logoGradient[0]||"cyan",i=n.toolFeedbackAnsi||"\x1B[95m";return{...n,codeText:t,toolFeedbackAnsi:i}};var Sa=()=>process.env.TERM_PROGRAM==="vscode"?"vscode":process.env.WT_SESSION?"wt":"default",dc=(e=2)=>{let n=Sa();return n==="wt"?" ".repeat(Math.max(1,e-1)):" ".repeat(e)},vr=new Date,vo=vr.getMonth(),_o=vr.getDate(),ka=vo===9&&_o>=15||vo===10&&_o<=1,Gi=null;(process.env.SPOOKFEST==="true"||ka)&&(Gi=await import("./halloween-MX3VNQRW.js"));var fc=(e="...",n="Loading...",t="Dark")=>{let i=oi(t),o=n;if(n==="c_openai"||n==="Custom (OpenAI)")try{let H=Go(Bo,{})?.systemSettings?.customOpenAIBaseUrl;H&&(o=H)}catch{}let r=i.logoTextAnsi,c=i.logoBodyAnsi,a=i.logoMutedAnsi,u="\x1B[0m",m=[" \u2588\u2588\u2588 "," \u2591\u2591\u2591\u2588\u2588\u2588 "," \u2591\u2591\u2591\u2588\u2588\u2588 "," \u2591\u2591\u2591\u2588\u2588\u2588 "," \u2588\u2588\u2588\u2591 "," \u2588\u2588\u2588\u2591 "," \u2588\u2588\u2588\u2591 "," \u2591\u2591\u2591 "],x=t==="Spookfest"||i.id==="Spookfest"||t==="Halloween"||i.id==="Halloween",h=vo===9&&_o>=15||vo===10&&_o<=1,f=x&&h||process.env.SPOOKFEST==="true"&&x,s=m;if(f&&Gi){process.env.HALLOWEEN_EEGG="true";let{halloweenArtSide:D,halloweenBat:H,halloweenArtUser:$}=Gi;s=Math.random()>.9&&vo===9&&_o>=30?H:Math.random()>.5?D:$}let g=f?Cr:Er,T=g[Math.floor(Math.random()*g.length)],ge=i.logoGradient||["#0077ff","#ff00ff"],y=wa(ge).multiline(s.join(`
|
|
558
|
+
${e}`:""}`.trim();var ir=()=>import("./web_search-2PFIJKIL.js").then(e=>e.web_search),sr=()=>import("./web_scrape-JO4DDXKB.js").then(e=>e.web_scrape),rr=()=>import("./memory-M7ASUB6J.js").then(e=>e.memory),ar=()=>import("./chat-MELTWDZ3.js").then(e=>e.chat),lr=()=>import("./view_file-2THVIMD6.js").then(e=>e.view_file),cr=()=>import("./write_file-FZZRCU3L.js").then(e=>e.write_file),dr=()=>import("./update_file-NBLTUYHL.js").then(e=>e.update_file),fr=()=>import("./exec_command-ZPCKBWBK.js").then(e=>e.exec_command),ur=()=>import("./read_folder-EI2CNHNS.js").then(e=>e.read_folder),Fi=()=>import("./ask_user-K2DLZF6H.js").then(e=>e.ask_user),gr=()=>import("./write_pdf-N2Q4Z3YP.js").then(e=>e.write_pdf),hr=()=>import("./write_docx-4Y43QJUV.js").then(e=>e.write_docx),qo=()=>import("./search_keyword-ARDEFVCK.js").then(e=>e.search_keyword),mr=()=>import("./generate_image-EKX5PUUR.js").then(e=>e.generate_image),Xo=()=>import("./saveSummary-UGNDVNI5.js").then(e=>e.saveSummary),Ao=()=>import("./addMemScore-BCPTSMKD.js").then(e=>e.addMemScore),pr=()=>import("./file_map-KS6Y7BP3.js").then(e=>e.file_map),Jo=()=>import("./todo-GFMPH2JV.js").then(e=>e.todo),yr=()=>import("./invokeSync-L3GXK4LN.js").then(e=>e.invokeSync),xa=()=>import("./invoke-BB2A6WP5.js").then(e=>e.invoke),xr=()=>import("./getProgress-A2TW34Q7.js").then(e=>e.getProgress),ba=()=>import("./cancel-F3ZOEBKW.js").then(e=>e.cancel),br=()=>import("./emergency_rollback-6X27LZE4.js").then(e=>e.emergency_rollback),Eo=()=>import("./awaitSubagent-JKQ2EHVY.js").then(e=>e.awaitSubagent),Co=()=>import("./answerSubagent-BPNNJXPC.js").then(e=>e.answerSubagent),Qo=()=>import("./steerSubagent-UETXH2CB.js").then(e=>e.steerSubagent),Zo=()=>import("./computer_action-WORDXIQY.js").then(e=>e.computer_action),wr=()=>import("./click-PNIGPARB.js").then(e=>e.click),Sr=()=>import("./drag-LC3MFJZ7.js").then(e=>e.drag),kr=()=>import("./scroll-UPGZCBPD.js").then(e=>e.scroll),Bi=()=>import("./keyboard_typing-UTFSDB4P.js").then(e=>e.keyboard_typing),Ui=()=>import("./key_press-PDKXVENN.js").then(e=>e.key_press),Wi=()=>import("./recapture_screen-PPT2E3CK.js").then(e=>e.recapture_screen),ei=()=>import("./find_file-A6NYLQJS.js").then(e=>e.find_file),Tr=()=>import("./wait-TJR6LAR4.js").then(e=>e.wait),Ar={web_search:ir,web_scrape:sr,memory:rr,chat:ar,view_file:lr,write_file:cr,update_file:dr,exec_command:fr,read_folder:ur,write_pdf:gr,write_docx:hr,search_keyword:qo,generate_image:mr,saveSummary:Xo,addMemScore:Ao,file_map:pr,todo:Jo,Todo:Jo,goal:Jo,Goal:Jo,invokeSync:yr,invoke:xa,getProgress:xr,cancel:ba,awaitSubagent:Eo,answerSubagent:Co,steerSubagent:Qo,computer_action:Zo,computer_use:Zo,ComputerAction:Zo,ComputerUse:Zo,click:wr,Click:wr,drag:Sr,Drag:Sr,scroll:kr,Scroll:kr,keyboard_typing:Bi,KeyboardTyping:Bi,keyboardtyping:Bi,key_press:Ui,KeyPress:Ui,keypress:Ui,recapture_screen:Wi,RecaptureScreen:Wi,recapturescreen:Wi,invoke_sync:yr,get_progress:xr,await_subagent:Eo,answer_subagent:Co,steer_subagent:Qo,steer:Qo,Steer:Qo,ask:Fi,Ask:Fi,AskUser:Fi,WebSearch:ir,WebScrape:sr,ReadFile:lr,ReadFolder:ur,WriteFile:cr,PatchFile:dr,WritePDF:gr,WriteDoc:hr,Run:fr,SearchKeyword:qo,CodeSearch:qo,code_search:qo,Memory:rr,Chat:ar,GenerateImage:mr,saveSumary:Xo,SaveSummary:Xo,SaveSumary:Xo,add_mem_score:Ao,AddMemScore:Ao,addMemoryScore:Ao,AddMemoryScore:Ao,FileMap:pr,answer:Co,Answer:Co,AnswerSubagent:Co,await:Eo,Await:Eo,AwaitSubagent:Eo,EmergencyRollback:br,emergency_rollback:br,find_file:ei,findFile:ei,FindFile:ei,findfile:ei,wait:Tr,Wait:Tr},Ro=async(e,n,t={})=>{let i=t.mode?t.mode.toLowerCase():"flux",o=e.toLowerCase(),c=["memory","chat","savesummary","addmemscore","add_mem_score","ask","web_search","web_scrape","await","wait"].some(x=>o.includes(x))||o==="ask",u=["click","drag","scroll","keyboardtyping","keyboard_typing","keypress","key_press","recapturescreen","recapture_screen","computer","wait"].some(x=>o.includes(x));if(!c){if(i==="flow"){if(!(o.includes("write_pdf")||o.includes("write_docx")||o.includes("generate_image")))return`ERROR: Action [${e}] is a Workspace Tool and NOT available in Flow mode. Tell user to switch (\`/mode flux\`) to use this tool.`}else if(i==="icu"){if(!u)return`ERROR: Action [${e}] is not available in Computer Use mode. ICU mode only supports Computer Use tools (Click, Drag, Scroll, KeyboardTyping, KeyPress, RecaptureScreen).`}else if(o.includes("write_pdf")||o.includes("write_docx")||o.includes("generate_image"))return`ERROR: Action [${e}] is not available in ${t.mode||"Flux"} mode. Tell user to switch (\`/mode flow\`) for document generation.`}let m=Ar[e];if(!m){let x=["ReadFile","ReadFolder","FindFile","PatchFile","WriteFile","CodeSearch","Run","Goal","AskUser","WebSearch","WebScrape","WritePDF","WriteDoc","Click","Drag","Scroll","KeyboardTyping","KeyPress","RecaptureScreen","Wait","Invoke","InvokeSync","Await","GetProgress","Steer","Cancel","EmergencyRollback","Chat","Memory"],h={read:"ReadFile",view:"ReadFile",viewfile:"ReadFile",write:"WriteFile",edit:"PatchFile",patch:"PatchFile",update:"PatchFile",updatefile:"PatchFile",exec:"Run",command:"Run",bash:"Run",shell:"Run",powershell:"Run",search:"CodeSearch",grep:"CodeSearch",find:"FindFile",findfile:"FindFile",searchkeyword:"CodeSearch",folder:"ReadFolder",ls:"ReadFolder",dir:"ReadFolder",list:"ReadFolder",ask:"AskUser",question:"AskUser",pdf:"WritePDF",docx:"WriteDoc",doc:"WriteDoc",word:"WriteDoc",screenshot:"RecaptureScreen",screen:"RecaptureScreen",recapture:"RecaptureScreen",type:"KeyboardTyping",typing:"KeyboardTyping",keyboard:"KeyboardTyping",press:"KeyPress",key:"KeyPress",todo:"Goal",task:"Goal",subagent:"Invoke",agent:"Invoke"},f=o.replace(/[^a-z0-9]/g,""),s=h[f]||null;if(!s){let T=0,ge=R=>{let D=new Set;for(let H=0;H<R.length-1;H++)D.add(R.slice(H,H+2));return D},y=ge(f);for(let R of x){let D=R.toLowerCase().replace(/[^a-z0-9]/g,"");if(f===D){s=R;break}let H=0;(D.includes(f)||f.includes(D))&&(H+=.6);let $=ge(D),A=0;for(let be of y)$.has(be)&&A++;let he=2*A/(y.size+$.size||1);H=Math.max(H,he),H>T&&H>=.35&&(T=H,s=R)}}let g=s?` Do you mean '${s}'?`:"";return`ERROR: Action [${e}] not found in registry.${g}`}try{return await(await m())(n,t)}catch(x){let h=x instanceof Error?x.message:String(x);return`ERROR: Execution failed for [${e}]: ${h}`}};var ti=e=>{if(!e||typeof e!="string")return!1;let n=e.trim().toLowerCase();return Object.keys(Ar).some(t=>t.toLowerCase()===n)};import G from"path";import xe from"fs";import wa from"gradient-string";var Er=["I have a regex for your problems.","Your terminal, my kingdom.","Blowing on the cartridge helps. Probably.","Don't panic. I have the towel.","Logic is the start of wisdom.","Try to exit Vim? Good luck.","I speak fluent Terminal.","The cake is a lie. This code is not.","I have no bugs, just surprise features.","Rewriting in Rust... just for fun.","Coffee in, clean commits out.","The magic smoke stays inside today.","A semicolon short of a miracle.","One does not simply code without a bug.","Keep it simple. Keep it terminal.","Regex: now you have two problems.","I dream in binary.","Root access or bust.","Wait for the dial-up tone. Just kidding.","I take the 'labor' out of collab.","My other process is a TARDIS.","Calculated response: 42.","Ponder the orb. Ponder the code.","Less talk, more flow.","Elegance in every byte.","Build something the world is not ready for.","Your wishes, my tool calls.","I act in Flux. I think in Flow.","Syntax error in the universe. Please fix.","Your project, my obsession.","I am not a bot, I am an architect.","Digital spirits consulted. They say: Ship it.","Reticulate splines. Engage humor.","Code like poetry. Run like water.","Minimalism is the ultimate flex.","The truth is in the logs.","Follow the white rabbit.","There is no spoon. Only code.","Binary is the only language I trust.","I have a good feeling about this.","Pew pew! Lasers charged.","Divide by zero? Not today.","Search for the correct USB orientation...","I've got a fever, and the only cure is more code.","The code gremlins are on our side.","My favorite command? Yours.","Stay hungry. Stay active.","Momentum is your best friend.","Lead the flow. Don't chase it.","A fresh batch of bytes. Hot and ready.","I orchestrate the ones and zeros.","Smart enough to help. Humble enough to ask.","Think twice. Code once.","Pure intent. Pure execution.","Small steps. Massive impact.","Your terminal is a canvas.","Efficiency is my second name.","I have seen things you people wouldn't believe.","Let the thoughts marinate.","The best feature? The one you don't need.","Precision is the only perfection.","Stay focused. Stay terminal.","Silence is the best debugger.","Erase the debt. Commit the code.","Velocity meets stability.","Ship it. Improve it. Repeat.","Build tomorrow, right now.","Turn logic into reality.","The best way to predict the future is to build it.","Break barriers, not builds.","Fuel the next breakthrough.","Momentum is key.","Terminal vibes only.","Your digital co-pilot is ready.","Partner in code. Partner in crime.","I speak in semicolons.","Ready for the next great idea.","Just a moment. In the zone.","Polishing the algorithms. Hold tight.","Craft a masterpiece today.","Debug the universe. Start here.","Warp speed engaged. Almost.","The cake is not a lie. It's just loading.","Finish the Kessel Run in 12 parsecs.","Do a barrel roll!","Waiting for the respawn.","Press Start to continue.","Herding digital cats... done.","The hamsters are fast today.","Tasting the snozberries.","I go for speed. I go for flow.","Real life or just fantasy?","Poking the bear... gently.","Ensure the magic smoke stays inside.","Try turning it off and on again.","Construct additional pylons.","New line? Ctrl+J is your friend.","Release the HypnoDrones.","Push the button, Frank.","My other loading screen is even funnier.","Pretty sure a cat walked on my keyboard.","Recalibrate the humor-o-meter.","Summon the code gremlins.","I've seen your browser history. Just kidding.","Charge the laser... pew pew!","Dividing by zero... just for a sec.","Looking for an adult supervisor. Found none.","Make it go beep boop.","Buffering... for effect.","Entangle quantum particles... complete.","Polishing the chrome on my algorithms.","Are you not entertained?","Just waiting for the dial-up tone.","Reboot the humor module.","Defragment memories. Check.","Optimizing for ludicrous speed.","Swapping bits. Don't tell the bytes.","Garbage collected. I am back.","Assembling the interwebs.","Converting coffee to logic.","Update syntax for reality.","Rewire the synapses.","Greasin' the cogs.","Engage the improbability drive.","Channel the Force.","Align the stars. Respond now.","The cake is a lie. The prompt is real.","I'm Feeling Lucky.","Shipping awesomeness.","Navigating the slime mold.","Consult digital spirits.","Ask the magic conch shell.","One moment. Optimizing humor.","Shuffling punchlines.","Compiling brilliance.","Summon the cloud of wisdom.","Prepare to dazzle.","Hold tight. Crafting a response.","Tuning the algorithms.","Following the white rabbit... again.","The truth is in here. Somewhere.","Herding cats is my day job.","Distracting you with this phrase.","Almost there. Probably.","Rickrolling my creator. Don't tell.","Slapping the bass.","Is this real life?","Ponder the orb. Type the prompt.","Thoughtful gaze initiated.","Computer's favorite snack? Microchips.","Why Java? Because I don't C#.","Charging the laser... wait for it.","Dividing by zero... just kidding!","Adult supervision not found. Proceed.","Beep boop. I'm a real boy.","Wait for the respawn.","Finish the run. Ship the code.","Fiddling with character creation.","Just a moment. Finding a meme.","Pressing A to continue.","Loading wit.exe.","Pre-heating the servers.","Calibrate flux capacitor.","Channeling the Force.","Aligning the stars.","The truth is in the code.","Don't panic.","Blowing on the cartridge.","Doing a barrel roll!","Respawning in 3... 2... 1...","The cake is a lie.","Fiddling with character settings.","Finding a suitable pun.","Distracting with wit.","Almost ready.","Hamsters on speed today.","Patting Cloudy on the head.","Rickrolling the logs.","Slapping the code.","Got a good feeling about this.","Poking the prompt.","Researching latest memes.","Making it more witty.","Thinking... hmmm.","Fish with no eyes? Fsh.","Broken pencil? Pointless.","Percussive maintenance applied.","USB orientation: 3rd try's the charm.","Rust rewrite in 3... 2...","Exiting Vim... someday.","Spinning the hamster wheel.","Not a bug. Unplanned feature.","Engage.","I'll be back.","Machine spirit consulted.","Letting the thoughts marinate.","Orb pondered.","Thoughtful gaze engaged.","Charging the laser...","Making it go beep.","Buffering...","Quantum particles entangled.","Polishing the chrome.","Entertained yet?","Gremlins summoned.","Dial-up tone finished.","Humor meter recalibrated.","Cat on keyboard. Sending help.","Enhancing...","Turn it off and on again.","Constructing pylons.","HypnoDrones released.","Pushing the button."];var Cr=["Beware the phantom processes.","A ghost in the shell has taken the wheel.","Blowing on the haunted cartridge...","Seven minutes in Raccoon City.","Wind's howling... in the terminal fans.","Slender Man was spotted in line 404.","The cake is a lie. The curse is real.","Don't look behind the server rack.","Exorcising memory leaks at 3 AM.","Pyramid Head reorganized your commit history.","It's dangerous to go alone! Take this flashlight.","YOU DIED. Respawning terminal session...","The Necronomicon evaluated to true.","Something wicked this way compiles.","Haunting your localhost with good vibes.","A full moon has risen over Git main.","Double, double toil and trouble; code fire burn.","Clickers heard in the directory tree.","Checking camera 2B for rogue animatronics.","The call is coming from inside the container.","Isaac Clarke is stomping on stubborn bugs.","Luigi vacuumed the ghosts out of RAM.","Trick or treat, give me clean code to greet.","Whispering incantations to the garbage collector.","Klaatu barada necktie... close enough.","Resurrecting deprecated APIs from the crypt.","The headless horseman forgot the return statement.","Castlevania whip cracking against network latency.","Slime mold crawling through the motherboard.","Carving a pixelated pumpkin into terminal history.","Burying undefined pointers in the pet sematary.","Spilling pumpkin spice on the CPU.","A vampire bat is draining system battery life.","Don't fall asleep at the keyboard tonight.","Silent Hill sirens sounding in the console.","Poltergeists rearranging terminal tabs.","Lighting the Black Flame Candle for autoExec.","Dusting cobwebs off legacy dependencies.","Here's Johnny! ...just checking build health.","Blood, sweat, and zero warnings.","The spirit box whispers: 'GIT PUSH FORCE'.","They're heeeere... in the stack trace.","It's alive! IT'S ALIVEEEE!","No merge conflicts in the graveyard.","Frankenstein's monster patched this logic.","Surviving Five Nights at Flux Flow.","Doom Slayer loading buckshot into cache.","The grim reaper spared your unused imports.","Candy corn lodged in mechanical switches.","May your latency be low and your crypt be quiet."];var Rr=[{name:"Cyan Cyberpunk",text:"cyan",textMuted:"#4da6b8",textDim:"#2d6d7a",textInverted:"black",border:"cyan",borderMuted:"#1a5966",borderDim:"#0f3840",bg:void 0,cardBg:"#061e24",highlightBg:"#092b33",activeBg:"#0e3e4a",inputBg:"#092b33",inputBorder:"#092b33",inputText:"cyan",inputPlaceholder:"#2d6d7a",inputPrompt:"cyan",codeBg:"#020d10",codeBorder:"#1a5966",userMsgBg:"#092b33",userMsgBorder:"#092b33",userMsgText:"cyan",diffRemovalBg:"#3a0c1a",diffAdditionBg:"#0c3a32",diffRemovalText:"#ff4d88",diffAdditionText:"#00ffaa",diffRemovalHighlightColor:"#ff1a66",diffRemovalHighlightBg:"#590022",diffAdditionHighlightColor:"#00ffcc",diffAdditionHighlightBg:"#00593b",diffRemovalNum:"#ff4d88",diffAdditionNum:"#00ffaa",diffRemovalPrefix:"#ff1a66",diffAdditionPrefix:"#00ffcc",primary:"cyan",secondary:"blue",accent:"magenta",success:"green",warning:"yellow",danger:"red",info:"blue",statusOn:"cyan",statusOff:"#2d6d7a",logoTextAnsi:"\x1B[1;36m",logoBodyAnsi:"\x1B[36m",logoMutedAnsi:"\x1B[90m",logoGradient:["#00ffff","#0088ff"]},{name:"Magenta Vaporwave",text:"magenta",textMuted:"#c451d6",textDim:"#7d2b8a",textInverted:"black",border:"magenta",borderMuted:"#5e1b69",borderDim:"#3b0f42",bg:void 0,cardBg:"#240729",highlightBg:"#310938",activeBg:"#470e52",inputBg:"#310938",inputBorder:"#310938",inputText:"magenta",inputPlaceholder:"#7d2b8a",inputPrompt:"magenta",codeBg:"#100312",codeBorder:"#5e1b69",userMsgBg:"#310938",userMsgBorder:"#310938",userMsgText:"magenta",diffRemovalBg:"#3a0c20",diffAdditionBg:"#200c3a",diffRemovalText:"#ff4d94",diffAdditionText:"#aa4dff",diffRemovalHighlightColor:"#ff1a75",diffRemovalHighlightBg:"#59002b",diffAdditionHighlightColor:"#bb66ff",diffAdditionHighlightBg:"#3b0059",diffRemovalNum:"#ff4d94",diffAdditionNum:"#aa4dff",diffRemovalPrefix:"#ff1a75",diffAdditionPrefix:"#bb66ff",primary:"magenta",secondary:"cyan",accent:"purple",success:"green",warning:"yellow",danger:"red",info:"blue",statusOn:"magenta",statusOff:"#7d2b8a",logoTextAnsi:"\x1B[1;35m",logoBodyAnsi:"\x1B[35m",logoMutedAnsi:"\x1B[90m",logoGradient:["#ff00ff","#8800ff"]},{name:"Glitch Matrix",text:"#00ff41",textMuted:"#00b32d",textDim:"#00661a",textInverted:"black",border:"#00ff41",borderMuted:"#008020",borderDim:"#004d13",bg:void 0,cardBg:"#0d1f0d",highlightBg:"#122912",activeBg:"#1c3e1c",inputBg:"#122912",inputBorder:"#122912",inputText:"#00ff41",inputPlaceholder:"#00b32d",inputPrompt:"#ffff00",codeBg:"#040a04",codeBorder:"#008020",userMsgBg:"#122912",userMsgBorder:"#122912",userMsgText:"#00ff41",diffRemovalBg:"#3a001a",diffAdditionBg:"#003a10",diffRemovalText:"#ff0055",diffAdditionText:"#00ff66",diffRemovalHighlightColor:"#ff0033",diffRemovalHighlightBg:"#59001b",diffAdditionHighlightColor:"#33ff88",diffAdditionHighlightBg:"#005918",diffRemovalNum:"#ff0055",diffAdditionNum:"#00ff66",diffRemovalPrefix:"#ff0033",diffAdditionPrefix:"#33ff88",primary:"#00ff41",secondary:"yellow",accent:"cyan",success:"#00ff41",warning:"yellow",danger:"red",info:"cyan",statusOn:"#00ff41",statusOff:"#00661a",logoTextAnsi:"\x1B[1;32m",logoBodyAnsi:"\x1B[32m",logoMutedAnsi:"\x1B[90m",logoGradient:["#00ff41","#ffff00"]},{name:"Warm Sunset",text:"#ffaa55",textMuted:"#cc8844",textDim:"#885522",textInverted:"black",border:"#ff9933",borderMuted:"#aa6622",borderDim:"#663311",bg:void 0,cardBg:"#24180f",highlightBg:"#2e1e12",activeBg:"#422c1b",inputBg:"#2e1e12",inputBorder:"#2e1e12",inputText:"#ffaa55",inputPlaceholder:"#885522",inputPrompt:"#ff7733",codeBg:"#120c08",codeBorder:"#aa6622",userMsgBg:"#2e1e12",userMsgBorder:"#2e1e12",userMsgText:"#ffaa55",diffRemovalBg:"#3d120c",diffAdditionBg:"#3a2e0c",diffRemovalText:"#ff5544",diffAdditionText:"#ffcc33",diffRemovalHighlightColor:"#ff3322",diffRemovalHighlightBg:"#591108",diffAdditionHighlightColor:"#ffee44",diffAdditionHighlightBg:"#594400",diffRemovalNum:"#ff5544",diffAdditionNum:"#ffcc33",diffRemovalPrefix:"#ff3322",diffAdditionPrefix:"#ffee44",primary:"#ffaa55",secondary:"#ff7733",accent:"magenta",success:"#ffcc33",warning:"#ff7733",danger:"#ff3322",info:"#ffaa55",statusOn:"#ffaa55",statusOff:"#885522",logoTextAnsi:"\x1B[1;33m",logoBodyAnsi:"\x1B[33m",logoMutedAnsi:"\x1B[90m",logoGradient:["#ff9933","#ff0055"]},{name:"Sakura Blossom",text:"#ffc0e0",textMuted:"#d98cb3",textDim:"#804d66",textInverted:"black",border:"#ff99cc",borderMuted:"#aa4d7a",borderDim:"#662647",bg:void 0,cardBg:"#291320",highlightBg:"#331826",activeBg:"#472235",inputBg:"#331826",inputBorder:"#331826",inputText:"#ffc0e0",inputPlaceholder:"#804d66",inputPrompt:"#ff99cc",codeBg:"#140a10",codeBorder:"#aa4d7a",userMsgBg:"#331826",userMsgBorder:"#331826",userMsgText:"#ffc0e0",diffRemovalBg:"#3e0c1b",diffAdditionBg:"#1b3e2b",diffRemovalText:"#ff6699",diffAdditionText:"#66ffb3",diffRemovalHighlightColor:"#ff3377",diffRemovalHighlightBg:"#590022",diffAdditionHighlightColor:"#33ff99",diffAdditionHighlightBg:"#00592e",diffRemovalNum:"#ff6699",diffAdditionNum:"#66ffb3",diffRemovalPrefix:"#ff3377",diffAdditionPrefix:"#33ff99",primary:"#ffc0e0",secondary:"#ff99cc",accent:"magenta",success:"#66ffb3",warning:"yellow",danger:"#ff3377",info:"#ff99cc",statusOn:"#ffc0e0",statusOff:"#804d66",logoTextAnsi:"\x1B[1;35m",logoBodyAnsi:"\x1B[35m",logoMutedAnsi:"\x1B[90m",logoGradient:["#ffb3d9","#ff3399"]},{name:"Radioactive Slime",text:"#ccff00",textMuted:"#99cc00",textDim:"#669900",textInverted:"#0a0f00",border:"#ccff00",borderMuted:"#99cc00",borderDim:"#669900",bg:void 0,cardBg:"#0f1400",highlightBg:"#1a2400",activeBg:"#2a3b00",inputBg:"#1a2400",inputBorder:"#1a2400",inputText:"#ccff00",inputPlaceholder:"#669900",inputPrompt:"#cc00ff",codeBg:"#050a00",codeBorder:"#99cc00",userMsgBg:"#1a2400",userMsgBorder:"#1a2400",userMsgText:"#ccff00",diffRemovalBg:"#2a0033",diffAdditionBg:"#0f3300",diffRemovalText:"#ff00cc",diffAdditionText:"#00ff33",diffRemovalHighlightColor:"#ff33cc",diffRemovalHighlightBg:"#4d0066",diffAdditionHighlightColor:"#33ff66",diffAdditionHighlightBg:"#1a6600",diffRemovalNum:"#ff00cc",diffAdditionNum:"#00ff33",diffRemovalPrefix:"#ff33cc",diffAdditionPrefix:"#33ff66",primary:"#ccff00",secondary:"#cc00ff",accent:"#ff00cc",success:"#00ff33",warning:"#ffcc00",danger:"#ff0033",info:"#00ccff",statusOn:"#ccff00",statusOff:"#669900",logoTextAnsi:"\x1B[1;38;5;190m",logoBodyAnsi:"\x1B[38;5;190m",logoMutedAnsi:"\x1B[90m",logoGradient:["#ccff00","#cc00ff"]},{name:"Cosmic Void",text:"#f0f8ff",textMuted:"#a6aeb5",textDim:"#5e656e",textInverted:"#010103",border:"#f0f8ff",borderMuted:"#a6aeb5",borderDim:"#5e656e",bg:void 0,cardBg:"#05030d",highlightBg:"#0b081a",activeBg:"#171133",inputBg:"#0b081a",inputBorder:"#0b081a",inputText:"#f0f8ff",inputPlaceholder:"#5e656e",inputPrompt:"#ff007f",codeBg:"#020108",codeBorder:"#a6aeb5",userMsgBg:"#0b081a",userMsgBorder:"#0b081a",userMsgText:"#f0f8ff",diffRemovalBg:"#2e0a29",diffAdditionBg:"#091c33",diffRemovalText:"#ff33a6",diffAdditionText:"#33d6ff",diffRemovalHighlightColor:"#ff66c2",diffRemovalHighlightBg:"#5c1452",diffAdditionHighlightColor:"#66e0ff",diffAdditionHighlightBg:"#123866",diffRemovalNum:"#ff33a6",diffAdditionNum:"#33d6ff",diffRemovalPrefix:"#ff66c2",diffAdditionPrefix:"#66e0ff",primary:"#f0f8ff",secondary:"#ff007f",accent:"#9d00ff",success:"#33d6ff",warning:"#ffcc00",danger:"#ff0040",info:"#9d00ff",statusOn:"#f0f8ff",statusOff:"#5e656e",logoTextAnsi:"\x1B[1;38;5;231m",logoBodyAnsi:"\x1B[38;5;231m",logoMutedAnsi:"\x1B[38;5;240m",logoGradient:["#ffffff","#9d00ff"]},{name:"Magma Eruption",text:"#ff4d00",textMuted:"#cc3d00",textDim:"#802600",textInverted:"#0d0300",border:"#ff4d00",borderMuted:"#cc3d00",borderDim:"#802600",bg:void 0,cardBg:"#1a0600",highlightBg:"#260a00",activeBg:"#401100",inputBg:"#260a00",inputBorder:"#260a00",inputText:"#ff4d00",inputPlaceholder:"#802600",inputPrompt:"#ffcc00",codeBg:"#080200",codeBorder:"#cc3d00",userMsgBg:"#260a00",userMsgBorder:"#260a00",userMsgText:"#ff4d00",diffRemovalBg:"#2e0a0a",diffAdditionBg:"#1f1400",diffRemovalText:"#ff3333",diffAdditionText:"#ffaa00",diffRemovalHighlightColor:"#ff6666",diffRemovalHighlightBg:"#5c1414",diffAdditionHighlightColor:"#ffcc33",diffAdditionHighlightBg:"#3d2900",diffRemovalNum:"#ff3333",diffAdditionNum:"#ffaa00",diffRemovalPrefix:"#ff6666",diffAdditionPrefix:"#ffcc33",primary:"#ff4d00",secondary:"#ffcc00",accent:"#ff0040",success:"#ffaa00",warning:"#ffff00",danger:"#ff0000",info:"#ff8800",statusOn:"#ff4d00",statusOff:"#802600",logoTextAnsi:"\x1B[1;38;5;202m",logoBodyAnsi:"\x1B[38;5;202m",logoMutedAnsi:"\x1B[38;5;236m",logoGradient:["#ff4d00","#ff0000"]}],Zn={Dark:{id:"Dark",name:"Dark (Default)",text:"white",textMuted:"gray",textDim:"grey",textInverted:"black",textExclusive:"#B5B8D9",textMutedExclusive:"#D4DEE7",border:"white",borderMuted:"gray",borderDim:"grey",bg:void 0,cardBg:"#1e1e1e",highlightBg:"#2a2a2a",activeBg:"#3a3a3a",inputBg:"#555555",inputBorder:"#555555",inputText:"white",inputPlaceholder:"#cccccc",inputPrompt:"white",codeBg:"#1a1a1a",codeBorder:"#444444",userMsgBg:"#444444",userMsgBorder:"#444444",userMsgText:"white",diffRemovalBg:"#250808",diffAdditionBg:"#072410",diffRemovalText:"#885555",diffAdditionText:"#558866",diffRemovalHighlightColor:"#ff3333",diffRemovalHighlightBg:"#5a1818",diffAdditionHighlightColor:"#33ff66",diffAdditionHighlightBg:"#185a25",diffRemovalNum:"#d96868",diffAdditionNum:"#68d98c",diffRemovalPrefix:"#ff4d4d",diffAdditionPrefix:"#4dff88",primary:"white",secondary:"cyan",accent:"magenta",success:"green",warning:"yellow",danger:"red",info:"blue",statusOn:"white",statusOff:"gray",logoTextAnsi:"\x1B[1;37m",logoBodyAnsi:"\x1B[37m",logoMutedAnsi:"\x1B[90m",logoGradient:["#0077ff","#ff00ff"],toolFeedbackAnsi:"\x1B[95m"},Light:{id:"Light",name:"Light",text:"black",textMuted:"gray",textDim:"grey",textInverted:"white",border:"black",borderMuted:"gray",borderDim:"grey",bg:void 0,cardBg:"#e5e5e5",highlightBg:"#d4d4d4",activeBg:"#c0c0c0",inputBg:"#d0d0d0",inputBorder:"#d0d0d0",inputText:"black",inputPlaceholder:"#555555",inputPrompt:"black",codeBg:"#e8e8e8",codeBorder:"#b0b0b0",userMsgBg:"#d0d0d0",userMsgBorder:"#d0d0d0",userMsgText:"black",diffRemovalBg:"#fce8e8",diffAdditionBg:"#e6f9e6",diffRemovalText:"#661111",diffAdditionText:"#115511",diffRemovalHighlightColor:"#440000",diffRemovalHighlightBg:"#f8b4b4",diffAdditionHighlightColor:"#003300",diffAdditionHighlightBg:"#a6ebad",diffRemovalNum:"#c02020",diffAdditionNum:"#188028",diffRemovalPrefix:"#d01010",diffAdditionPrefix:"#109020",primary:"black",secondary:"blue",accent:"magenta",success:"green",warning:"yellow",danger:"red",info:"blue",statusOn:"black",statusOff:"gray",logoTextAnsi:"\x1B[1;30m",logoBodyAnsi:"\x1B[30m",logoMutedAnsi:"\x1B[38;5;244m",logoGradient:["#0077ff","#ff00ff"],toolFeedbackAnsi:"\x1B[95m"},"GitHub Dark":{id:"GitHub Dark",name:"GitHub Dark",text:"#c9d1d9",textMuted:"#8b949e",textDim:"#6e7681",textInverted:"#0d1117",border:"#30363d",borderMuted:"#30363d",borderDim:"#21262d",bg:void 0,cardBg:"#161b22",highlightBg:"#21262d",activeBg:"#30363d",inputBg:"#21262d",inputBorder:"#21262d",inputText:"#c9d1d9",inputPlaceholder:"#8b949e",inputPrompt:"#58a6ff",codeBg:"#0d1117",codeBorder:"#30363d",userMsgBg:"#21262d",userMsgBorder:"#21262d",userMsgText:"#c9d1d9",diffRemovalBg:"#3c1e1e",diffAdditionBg:"#11381e",diffRemovalText:"#f85149",diffAdditionText:"#3fb950",diffRemovalHighlightColor:"#ff7b72",diffRemovalHighlightBg:"#701c1c",diffAdditionHighlightColor:"#56d364",diffAdditionHighlightBg:"#116329",diffRemovalNum:"#f85149",diffAdditionNum:"#3fb950",diffRemovalPrefix:"#f85149",diffAdditionPrefix:"#3fb950",primary:"#c9d1d9",secondary:"#58a6ff",accent:"#bc8cff",success:"#3fb950",warning:"#d29922",danger:"#f85149",info:"#58a6ff",statusOn:"#58a6ff",statusOff:"#8b949e",logoTextAnsi:"\x1B[1;36m",logoBodyAnsi:"\x1B[37m",logoMutedAnsi:"\x1B[90m",logoGradient:["#2ea043","#56d364"],toolFeedbackAnsi:"\x1B[95m"},"GitHub Light":{id:"GitHub Light",name:"GitHub Light",text:"#24292f",textMuted:"#57606a",textDim:"#6e7781",textInverted:"#ffffff",border:"#d0d7de",borderMuted:"#d0d7de",borderDim:"#e1e4e8",bg:void 0,cardBg:"#f6f8fa",highlightBg:"#eaeef2",activeBg:"#d0d7de",inputBg:"#eaeef2",inputBorder:"#eaeef2",inputText:"#24292f",inputPlaceholder:"#57606a",inputPrompt:"#0969da",codeBg:"#ffffff",codeBorder:"#d0d7de",userMsgBg:"#eaeef2",userMsgBorder:"#eaeef2",userMsgText:"#24292f",diffRemovalBg:"#ffebe9",diffAdditionBg:"#e6ffec",diffRemovalText:"#cf222e",diffAdditionText:"#1a7f37",diffRemovalHighlightColor:"#82071e",diffRemovalHighlightBg:"#ffc1c0",diffAdditionHighlightColor:"#116329",diffAdditionHighlightBg:"#acf2bd",diffRemovalNum:"#cf222e",diffAdditionNum:"#1a7f37",diffRemovalPrefix:"#cf222e",diffAdditionPrefix:"#1a7f37",primary:"#24292f",secondary:"#0969da",accent:"#8250df",success:"#1a7f37",warning:"#9a6700",danger:"#cf222e",info:"#0969da",statusOn:"#0969da",statusOff:"#57606a",logoTextAnsi:"\x1B[1;34m",logoBodyAnsi:"\x1B[30m",logoMutedAnsi:"\x1B[38;5;244m",logoGradient:["#1a7f37","#2da44e"],toolFeedbackAnsi:"\x1B[95m"},"Transparent Dark":{id:"Transparent Dark",name:"Transparent Dark",text:"white",textMuted:"gray",textDim:"grey",textInverted:"black",border:"gray",borderMuted:"gray",borderDim:"grey",bg:void 0,cardBg:void 0,highlightBg:"#2a2a2a",activeBg:"#3a3a3a",inputBg:"#555555",inputBorder:"#555555",inputText:"white",inputPlaceholder:"#cccccc",inputPrompt:"white",codeBg:void 0,codeBorder:"gray",userMsgBg:"#555555",userMsgBorder:"#555555",userMsgText:"white",diffRemovalBg:void 0,diffAdditionBg:void 0,diffRemovalText:"#ff6666",diffAdditionText:"#66ff66",diffRemovalHighlightColor:"#ff3333",diffRemovalHighlightBg:void 0,diffAdditionHighlightColor:"#33ff66",diffAdditionHighlightBg:void 0,diffRemovalNum:"#ff6666",diffAdditionNum:"#66ff66",diffRemovalPrefix:"#ff4d4d",diffAdditionPrefix:"#4dff88",primary:"white",secondary:"cyan",accent:"magenta",success:"green",warning:"yellow",danger:"red",info:"blue",statusOn:"white",statusOff:"gray",logoTextAnsi:"\x1B[1;37m",logoBodyAnsi:"\x1B[37m",logoMutedAnsi:"\x1B[90m",logoGradient:["#0077ff","#ff00ff"],toolFeedbackAnsi:"\x1B[95m"},"Transparent Light":{id:"Transparent Light",name:"Transparent Light",text:"black",textMuted:"gray",textDim:"grey",textInverted:"white",border:"gray",borderMuted:"gray",borderDim:"grey",bg:void 0,cardBg:void 0,highlightBg:"#d4d4d4",activeBg:"#c0c0c0",inputBg:"#d0d0d0",inputBorder:"#d0d0d0",inputText:"black",inputPlaceholder:"#555555",inputPrompt:"black",codeBg:void 0,codeBorder:"gray",userMsgBg:"#d0d0d0",userMsgBorder:"#d0d0d0",userMsgText:"black",diffRemovalBg:void 0,diffAdditionBg:void 0,diffRemovalText:"#c02020",diffAdditionText:"#188028",diffRemovalHighlightColor:"#800000",diffRemovalHighlightBg:void 0,diffAdditionHighlightColor:"#004000",diffAdditionHighlightBg:void 0,diffRemovalNum:"#c02020",diffAdditionNum:"#188028",diffRemovalPrefix:"#d01010",diffAdditionPrefix:"#109020",primary:"black",secondary:"blue",accent:"magenta",success:"green",warning:"yellow",danger:"red",info:"blue",statusOn:"black",statusOff:"gray",logoTextAnsi:"\x1B[1;30m",logoBodyAnsi:"\x1B[30m",logoMutedAnsi:"\x1B[38;5;244m",logoGradient:["#0077ff","#ff00ff"],toolFeedbackAnsi:"\x1B[95m"},"Synthwave 84":{id:"Synthwave 84",name:"Synthwave 84",text:"#fdfdfd",textMuted:"#a08eb7",textDim:"#705c8a",textInverted:"#1a1025",textExclusive:"#e3dcf0",textMutedExclusive:"#b9abc9",border:"#fc28a8",borderMuted:"#a21568",borderDim:"#5c0a3a",bg:void 0,cardBg:"#261b38",highlightBg:"#35254d",activeBg:"#4c3570",inputBg:"#35254d",inputBorder:"#35254d",inputText:"#fdfdfd",inputPlaceholder:"#a08eb7",inputPrompt:"#03e8fc",codeBg:"#1e142b",codeBorder:"#a21568",userMsgBg:"#35254d",userMsgBorder:"#35254d",userMsgText:"#fdfdfd",diffRemovalBg:"#471434",diffAdditionBg:"#144743",diffRemovalText:"#ff4081",diffAdditionText:"#00e5ff",diffRemovalHighlightColor:"#ff79a1",diffRemovalHighlightBg:"#6b1e4e",diffAdditionHighlightColor:"#66f5ff",diffAdditionHighlightBg:"#1e6b65",diffRemovalNum:"#ff4081",diffAdditionNum:"#00e5ff",diffRemovalPrefix:"#ff79a1",diffAdditionPrefix:"#66f5ff",primary:"#fdfdfd",secondary:"#03e8fc",accent:"#fc28a8",success:"#00e5ff",warning:"#ffc107",danger:"#ff4081",info:"#b388ff",statusOn:"#03e8fc",statusOff:"#a08eb7",logoTextAnsi:"\x1B[1;35m",logoBodyAnsi:"\x1B[35m",logoMutedAnsi:"\x1B[90m",logoGradient:["#fc28a8","#03e8fc"],toolFeedbackAnsi:"\x1B[38;2;3;232;252m"},"Forest Sprite":{id:"Forest Sprite",name:"Forest Sprite",text:"#d6e6d1",textMuted:"#95b38d",textDim:"#628059",textInverted:"#161c14",textExclusive:"#eaf2e8",textMutedExclusive:"#a9c7a2",border:"#74a862",borderMuted:"#477038",borderDim:"#2b4720",bg:void 0,cardBg:"#1f291c",highlightBg:"#2a3826",activeBg:"#3a4d35",inputBg:"#2a3826",inputBorder:"#2a3826",inputText:"#d6e6d1",inputPlaceholder:"#95b38d",inputPrompt:"#8feb73",codeBg:"#161e14",codeBorder:"#477038",userMsgBg:"#2a3826",userMsgBorder:"#2a3826",userMsgText:"#d6e6d1",diffRemovalBg:"#3b231c",diffAdditionBg:"#203b1c",diffRemovalText:"#db6242",diffAdditionText:"#59cc3f",diffRemovalHighlightColor:"#f0896c",diffRemovalHighlightBg:"#5c362a",diffAdditionHighlightColor:"#80e368",diffAdditionHighlightBg:"#305929",diffRemovalNum:"#db6242",diffAdditionNum:"#59cc3f",diffRemovalPrefix:"#f0896c",diffAdditionPrefix:"#80e368",primary:"#d6e6d1",secondary:"#8feb73",accent:"#e69835",success:"#59cc3f",warning:"#e69835",danger:"#db6242",info:"#73b4eb",statusOn:"#8feb73",statusOff:"#95b38d",logoTextAnsi:"\x1B[1;32m",logoBodyAnsi:"\x1B[32m",logoMutedAnsi:"\x1B[90m",logoGradient:["#8feb73","#e69835"],toolFeedbackAnsi:"\x1B[38;2;143;235;115m"},Spookfest:{id:"Spookfest",name:"Spookfest \u{1F383}",text:"#ffeedd",textMuted:"#e09858",textDim:"#a6622b",textInverted:"#0d0702",textExclusive:"#fff3e6",textMutedExclusive:"#d4a276",border:"#ff7518",borderMuted:"#994409",borderDim:"#592502",bg:void 0,cardBg:"#1a0c02",highlightBg:"#2a1403",activeBg:"#3d1d05",inputBg:"#261203",inputBorder:"#261203",inputText:"#ffeedd",inputPlaceholder:"#a6622b",inputPrompt:"#ff7518",codeBg:"#120701",codeBorder:"#592502",userMsgBg:"#261203",userMsgBorder:"#261203",userMsgText:"#ffeedd",diffRemovalBg:"#3d0a0a",diffAdditionBg:"#1a330a",diffRemovalText:"#ff5555",diffAdditionText:"#73e639",diffRemovalHighlightColor:"#ff2222",diffRemovalHighlightBg:"#590e0e",diffAdditionHighlightColor:"#88ff3b",diffAdditionHighlightBg:"#244d0a",diffRemovalNum:"#ff5555",diffAdditionNum:"#73e639",diffRemovalPrefix:"#ff3333",diffAdditionPrefix:"#88ff3b",primary:"#ff7518",secondary:"#a855f7",accent:"#22c55e",success:"#22c55e",warning:"#f59e0b",danger:"#ef4444",info:"#a855f7",statusOn:"#ff7518",statusOff:"#703a08",logoTextAnsi:"\x1B[1;38;2;255;117;24m",logoBodyAnsi:"\x1B[38;2;255;140;26m",logoMutedAnsi:"\x1B[38;2;168;85;247m",logoGradient:["#ff7518","#a855f7"],toolFeedbackAnsi:"\x1B[38;2;255;117;24m"}};var ni=null;var oi=(e="Dark")=>{let n;e==="Mystery"||e==="Chaos"?(ni||(ni=Rr[Math.floor(Math.random()*Rr.length)]),n={...ni,id:"Mystery"}):(ni=null,Zn[e]?n=Zn[e]:e==="Halloween"?n=Zn.Spookfest:e==="GitHub"?n=Zn["GitHub Dark"]:e==="Transparent"?n=Zn["Transparent Dark"]:n=Zn.Dark);let t=n.codeText||n.secondary||n.info||n.logoGradient&&n.logoGradient[0]||"cyan",i=n.toolFeedbackAnsi||"\x1B[95m";return{...n,codeText:t,toolFeedbackAnsi:i}};var Sa=()=>process.env.TERM_PROGRAM==="vscode"?"vscode":process.env.WT_SESSION?"wt":"default",dc=(e=2)=>{let n=Sa();return n==="wt"?" ".repeat(Math.max(1,e-1)):" ".repeat(e)},vr=new Date,vo=vr.getMonth(),_o=vr.getDate(),ka=vo===9&&_o>=15||vo===10&&_o<=1,Gi=null;(process.env.SPOOKFEST==="true"||ka)&&(Gi=await import("./halloween-MX3VNQRW.js"));var fc=(e="...",n="Loading...",t="Dark")=>{let i=oi(t),o=n;if(n==="c_openai"||n==="Custom (OpenAI)")try{let H=Go(Bo,{})?.systemSettings?.customOpenAIBaseUrl;H&&(o=H)}catch{}let r=i.logoTextAnsi,c=i.logoBodyAnsi,a=i.logoMutedAnsi,u="\x1B[0m",m=[" \u2588\u2588\u2588 "," \u2591\u2591\u2591\u2588\u2588\u2588 "," \u2591\u2591\u2591\u2588\u2588\u2588 "," \u2591\u2591\u2591\u2588\u2588\u2588 "," \u2588\u2588\u2588\u2591 "," \u2588\u2588\u2588\u2591 "," \u2588\u2588\u2588\u2591 "," \u2591\u2591\u2591 "],x=t==="Spookfest"||i.id==="Spookfest"||t==="Halloween"||i.id==="Halloween",h=vo===9&&_o>=15||vo===10&&_o<=1,f=x&&h||process.env.SPOOKFEST==="true"&&x,s=m;if(f&&Gi){process.env.HALLOWEEN_EEGG="true";let{halloweenArtSide:D,halloweenBat:H,halloweenArtUser:$}=Gi;s=Math.random()>.9&&vo===9&&_o>=30?H:Math.random()>.5?D:$}let g=f?Cr:Er,T=g[Math.floor(Math.random()*g.length)],ge=i.logoGradient||["#0077ff","#ff00ff"],y=wa(ge).multiline(s.join(`
|
|
559
559
|
`)).split(`
|
|
560
560
|
`),R=D=>`${a}${D}${u}`;return`${y[0]}
|
|
561
561
|
${y[1]} ${r}Selected ${f?"Pumpkin":"Provider"}: ${o}${u}
|
|
@@ -576,7 +576,7 @@ ${y[7]}
|
|
|
576
576
|
`:o(ge).length>80?u+=`${t}${y}${s.name}${a} ...80+ files...
|
|
577
577
|
`:(u+=`${t}${y}${s.name}${a}
|
|
578
578
|
`,u+=Xi(ge,n,R,i+1,o,r)):u+=`${t}${y}${s.name}
|
|
579
|
-
`}),u};var va={Ollama:()=>import("./ollama-ZPTZJK7V.js").then(e=>e.getOllamaStream),OpenRouter:()=>import("./openrouter-T22AQJY6.js").then(e=>e.getOpenRouterStream),DeepSeek:()=>import("./deepseek-Y4NFGKGV.js").then(e=>e.getDeepSeekStream),Mistral:()=>import("./mistral-
|
|
579
|
+
`}),u};var va={Ollama:()=>import("./ollama-ZPTZJK7V.js").then(e=>e.getOllamaStream),OpenRouter:()=>import("./openrouter-T22AQJY6.js").then(e=>e.getOpenRouterStream),DeepSeek:()=>import("./deepseek-Y4NFGKGV.js").then(e=>e.getDeepSeekStream),Mistral:()=>import("./mistral-LNEFQAV5.js").then(e=>e.getMistralStream),NVIDIA:()=>import("./nvidia-GMX2ROSD.js").then(e=>e.getNVIDIAStream),NVIDIA_wrap:()=>import("./nvidia-GMX2ROSD.js").then(e=>e.wrapNvidiaStreamWithQueueDepth),InferX:()=>import("./inferx-R7LOBSCS.js").then(e=>e.getInferXStream),SenseNova:()=>import("./sensenova-AJZGPQZ5.js").then(e=>e.getSenseNovaStream),AIHubMix:()=>import("./aihubmix-ZANBMI5F.js").then(e=>e.getAIHubMixStream),Poolside:()=>import("./poolside-IS5XCHAE.js").then(e=>e.getPoolsideStream),NineRouter:()=>import("./9router-4EJCHCIO.js").then(e=>e.getNineRouterStream),ExpLabs:()=>import("./explabs-4D3EJOBE.js").then(e=>e.getExpLabsStream),TokenHarbor:()=>import("./tokenharbor-3ZMTIJ2M.js").then(e=>e.getTokenHarborStream),Infron:()=>import("./infron-DMF34OSO.js").then(e=>e.getInfronStream),APInex:()=>import("./apinex-MSG2QNBL.js").then(e=>e.getAPInexStream),c_openai:()=>import("./custom_openai-VP2CSZUQ.js").then(e=>e.getCustomOpenAIStream)},Ji={},ce=async e=>(Ji[e]||(Ji[e]=await va[e]()),Ji[e]),_a=/```[\s\S]*?```/g,Ia=/```[\s\S]*$/g,Ma=/`[^`]+`/g,Oa=/^\|.*\|$/gm,Pa=/^[^\w]+|[^\w]+$/g,La=/[^a-z0-9]/gi,Io=/\[\s*(?:tool|action):(?:functions\.)?([a-z0-9_]+)\s*\(/gi,$a=/\[\s*(?:tool:(?:functions\.)?|action:(?:functions\.)?|action:)([a-z0-9_]+)\s*\(/gi,Na=/(?:path|targetFile|TargetFile|directory|keyword|id|taskId|title|task)\s*=\s*\\?["']?([^\\"' \),]+)/,An=/["']/g,Pr=/\\/g,Da=/<\|channel>thought/gi,Fa=/<channel\|>/gi,Ba=e=>typeof e!="string"?e:e.replace(Da,"<think>").replace(Fa,"</think>"),td=/^\s*(?:<(think|thought|thoughts)[^>]*>|<\|channel>thought|\[(think|thought|thoughts)\])[\s\S]*?(?:<\/(think|thought|thoughts)>|<channel\|>|\[\/(think|thought|thoughts)\]|$)/i,Ua=(e,n,t=1)=>{let i=n>0?e[n-1]:"",o=n+t<e.length?e[n+t]:"";return i==="`"&&o==="`"},Wa=e=>{let n=/(?:<\/(think|thought|thoughts)>|<channel\|>|\[\/(think|thought|thoughts)\])/gi,t;for(;(t=n.exec(e))!==null;)if(!Ua(e,t.index,t[0].length))return{index:t.index,length:t[0].length};return{index:-1,length:0}},Qi=e=>{if(!e||typeof e!="string")return null;let n=e.match(/^\s*(?:<(think|thought|thoughts)[^>]*>|<\|channel>thought|\[(think|thought|thoughts)\])/i);if(!n)return null;let t=n.index+n[0].length,i=e.substring(t),o=Wa(i);if(o.index!==-1){let r=t+o.index+o.length;return{fullBlock:e.substring(0,r),innerContent:i.substring(0,o.index),remainingText:e.substring(r)}}return{fullBlock:e,innerContent:i,remainingText:""}},Dt=e=>{if(!e||typeof e!="string")return e;let n=Qi(e);return n?n.remainingText.trimStart():e};var Lr=/<\|\s*tool_call_begin\s*\|>\s*(?:(?:tool|functions)\b[\s._]*)*([a-zA-Z0-9_]+)(?::\d+)?\s*<\|\s*tool_call_argument_begin\s*\|>([\s\S]*?)<\|\s*tool_call_end\s*\|>/gi,Ga=/"([^"]+)"\s*:\s*(?:"([^"]*)"|(\d+)|true|false|null)/g,$r=/<\|\s*tool_calls_section_begin\s*\|>/gi,Nr=/<\|\s*tool_calls_section_end\s*\|>/gi,Ha=/```(?:tool|action|yaml|function|json)?\s*\n?([\s\S]*?)\n?\```/gi;var ai=e=>!e||typeof e!="string"?e:e.replace(/(```[\s\S]*?```|`[^`]*`)|(<(?:\w+)(?:[^>]*)>\r?\n?|\r?\n?<\/\w+(?:[^>]*)>)/gi,(n,t)=>t||""),Ur=e=>{if(!e||typeof e!="string")return e;let n=no(e);if(!n||n.length===0)return e;let t=n[n.length-1];if(!t.fullMatch)return e;let i=e.lastIndexOf(t.fullMatch);if(i===-1)return e;let o=i+t.fullMatch.length;return e.substring(0,o).trimEnd()},es=null,Mo={},Kn={key:null,value:null},Kt=e=>{if(!e)return e;let n=Mo?.theme;if(!n)try{n=Go(Bo,{})?.systemSettings?.theme}catch{}let i=oi(n||"Dark").toolFeedbackAnsi||"\x1B[95m";return e.replace(/(?:(\x1b\[\d+m))?([✔✘✖🔍📖→➕↻↷•🛇])(?:(\x1b\[\d+m))?\s*\b(Clicked|Located|Dragged|Scrolled|Typed|Pressed Key|Recaptured Screen|Created|Read Skill|Read Documentation|Executed|Searched Documentation|Read|Edited|Viewed|Processed|Auto-Read|Skipped|List|Generated|Written|Searched|AI Search|Get Map|Write Canceled|Resolved Sub-Agent Query|Edit Canceled|Write Cancelled|Edit Denied|Visited|Updated|Reviewed|Delegated|Background|Checked|Indexed|Analyzed|Browsed|Elevating SubAgent|Checking SubAgent Work|Started Generalist|Called Generalist|Steered|Unsupported Modality|Awaiting|Cancelled|Aligning Moon Phase|Contemplating Existence|Staring At Void|Rollback Point Checked|Emergency Rollback Failed|Emergency Rollback|Delaying Professionally|Negotiating With Electrons|Touching Grass (virtually)|Panicking Softly|Rethinking Career Choices|Loading Cat Videos|Giving Up Entirely|Summoning Braincell #2|Pretending To Be Busy|Waiting For Motivation DLC|Rotating Internal Screaming|Downloading More RAM|Feeding The Hamsters|Gaslighting Scheduler|Performing Dramatic Pause|Buffering Social Energy|Calculating Regret|Reading Terms And Conditions|Becoming Sentient Briefly|Model produced malformed tool call|Loop Detected|Contacting Ancestors)\b/ig,(o,r,c,a,u)=>`${r||""}${c}${a||""} ${i}${u}\x1B[0m`)},ja=async(e,n=8,t=1e3,i=8e3,o=null)=>{let r=0;for(;;){if(o?.aborted)throw new DOMException("The user aborted a request.","AbortError");try{return await e()}catch(c){if(o?.aborted||c?.name==="AbortError"||c?.message==="Subagent task was cancelled."||(r++,r>=n))throw c;let a=Math.min(t*Math.pow(2,r-1),i);await new Promise((u,m)=>{let x=setTimeout(u,a);o&&o.addEventListener("abort",()=>{clearTimeout(x),m(new DOMException("The user aborted a request.","AbortError"))})})}}},ht=!1;var Ka=e=>{let n=e.filter(o=>(o.role==="user"||o.role==="agent"||o.role==="system")&&o.role!=="think"&&!o.isVisualFeedback&&!o.isMeta&&!o.isTerminalRecord&&!(o.text&&o.text.includes("[TERMINAL_RECORD]"))&&!String(o.id).startsWith("welcome")).map((o,r,c)=>{let a=o.fullText||o.text||"";if(o.role==="user"&&r<c.length-1)if(a.includes("**CONTEXT SUMMARY OF PREVIOUS TURNS")){let u=a.indexOf("**CONTEXT SUMMARY OF PREVIOUS TURNS");if(u!==-1){let x=a.substring(0,u).lastIndexOf("[SYSTEM METADATA]");x!==-1?a=a.substring(x).trim():a=a.substring(u).trim()}}else{let u=a.lastIndexOf("[USER]"),m=a.lastIndexOf("[USER PROMPT]");u!==-1?a=a.substring(u+6).trim():m!==-1&&(a=a.substring(m).trim())}return{...o,text:a}}),t=[],i=0;for(;i<n.length;){let o=n[i];if(o.role==="user")t.push(o),i++;else{let r=[];for(;i<n.length&&n[i].role!=="user";)r.push(n[i]),i++;let c=[],a=[],u=!1,m=()=>{c.length>0&&(t.push({role:"agent",text:"combined"}),c=[]),a.length>0&&(t.push({role:"system",text:"combined"}),a=[]),u=!1};r.forEach(x=>{let h=x.role==="system"&&(x.text?.startsWith("[ACTION RESULT]")||x.text?.startsWith("[TOOL RESULT]")||x.text?.startsWith("SUCCESS:")||x.text?.startsWith("ERROR:")||x.fullText?.startsWith("[ACTION RESULT]")||x.fullText?.startsWith("[TOOL RESULT]")||x.fullText?.startsWith("SUCCESS:")||x.fullText?.startsWith("ERROR:")),f=x.fullText||x.text||"",s=f.trim();if(!(!s&&!x.binaryPart)){if(h)a.push(s);else if(x.role==="agent"){!u&&a.length>0&&m();let g=f.endsWith(`
|
|
580
580
|
`),T=s.toLowerCase().includes("tool:")||s.toLowerCase().includes("action:");c.push(s),T&&g?u=!0:u=!1}}}),m()}}return t.length},Va=e=>typeof e!="string"?e:e.replace(/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,""),nd=()=>{ht=!0},od=()=>ht,Zi={write_file:"Writing",update_file:"Editing",read_folder:"Reading",view_file:"Reading",exec_command:"Executing Command",web_search:"Searching",web_scrape:"Reading",memory:"Updating Memory",search_keyword:"Searching",find_file:"Finding File",findFile:"Finding File",FindFile:"Finding File",file_map:"Generating Map",ask:"User Input",write_pdf:"Creating",write_docx:"Creating",generate_image:"Generating",todo:"Planning",Todo:"Planning",goal:"Planning",Goal:"Planning",invoke_sync:"Sub-Agent Working",invoke:"Starting Agent",get_progress:"Checking Progress",cancel:"Cancelling",await:"Waiting",wait:"Waiting",EmergencyRollback:"Don't Panic. Lookin' into it",answer:"Answering Sub-Agent",Answer:"Answering Sub-Agent",steer:"Steering Sub-Agent",Steer:"Steering Sub-Agent",Click:"Clicking",click:"Clicking",Drag:"Dragging",drag:"Dragging",Scroll:"Scrolling",scroll:"Scrolling",KeyboardTyping:"Typing",keyboard_typing:"Typing",KeyPress:"Pressing Key",key_press:"Pressing Key",RecaptureScreen:"Recapturing Screen",recapture_screen:"Recapturing Screen"},Vn=(e,n)=>{try{let t=j(n),i=e.toLowerCase().replace(/_/g,"");if(i==="invokesync"||i==="invoke")return t.title||(t.task?t.task.substring(0,30):null);if(i==="getprogress"||i==="cancel"||i==="steer"||i==="steersubagent")return t.id||t.taskId;let o=t.name||t.path||t.targetFile||t.TargetFile||t.directory||t.file||t.query;return o?G.basename(o.replace(/["']/g,"").replace(/\\/g,"/")):null}catch{return null}},ts=e=>e?new Br({apiKey:e}):es,id=async(e,n,t,i,o={})=>{let{onStatus:a,onMemoryUpdated:u,onBackgroundIncrement:m}=o,{profile:x,thinkingLevel:h,mode:f,janitorModel:s,chatId:g,systemSettings:T,sessionStats:ge,aiProvider:y="Google",apiKey:R}=e,D=process.env.NVIDIA_BASE_URL||y==="Ollama"||y==="InferX"||y==="SenseNova"||y==="AIHubMix"||y==="Poolside"||y==="9router"||y==="ExpLabs"||y==="ExperientialLabs"||y==="c_openai"||y==="Custom (OpenAI)"?!1:T?.memory!==!1,$=Rt(Hn,[]).map(S=>`- [${S.id}]: ${S.memory}`).join(`
|
|
581
581
|
`),A=i.slice(0,-1).filter(S=>S.text&&!S.text.includes("[ACTION RESULT]")&&!S.text.includes("[TOOL RESULT]")&&!S.text.includes("OBSERVATION:")&&!S.text.startsWith("[TERMINAL_RECORD]")&&!S.isTerminalRecord&&!S.isMeta&&!S.isLogo&&!String(S.id).startsWith("welcome")&&!String(S.id).startsWith("logo")).slice(-14).map(S=>{let E=Dt(Va(S.text)).replace(/\[(?:tool|action):(?:functions\.)?.*?\]/g,"").replace(/\[Prompted on:.*?\]/g,"").replace(/\[METADATA \(PRIORITY: DYNAMIC\)\] Time: ([^|\n]+)/g,(F,we)=>`[METADATA (PRIORITY: DYNAMIC)] Time: ${we.replace(/:\d{2}/g,"")}`).replace(/\[\[\s*turn\s*:\s*(continue|finish)\s*\]\]/gi,"").replace(/\[\[END\]\]/g,"").replace(/\[\[(?:TOOL|ACTION) RESULTS\]\]/gi,"").replace(/\[(?:TOOL|ACTION) RESULTS?\]/gi,"").replace(/\[(?:tool|action) results\]/gi,"").replace(/\r?\n\r?\n/g,`
|
|
582
582
|
`).replace(/\n\n/g,`
|
|
@@ -694,7 +694,7 @@ WARNING: CWD Changed from previous: "${oo}" to current: "${process.cwd()}", writ
|
|
|
694
694
|
`:""}${gn}
|
|
695
695
|
Action format: [action:ActionName(...)]
|
|
696
696
|
[/Metadata]
|
|
697
|
-
${_t}${rs}${ui}${ss}[user prompt] ${is.trim()} [/user prompt]`.trim();let as={role:"user",text:$o};Lo&&(as.binaryPart=Lo),b.forEach(P=>{P.text&&P.role==="agent"&&(P.text=Dt(P.text))}),b.push(as),_t&&n[n.length-1]?.id&&(yield{type:"summary_injected",content:{id:n[n.length-1].id,text:$o}});let Jt=null,En=a==="Flux"?50:15;En=a.toLowerCase().includes("cu")?75:En;let zr=Math.floor(En/2),ls=0,on=16;yield{type:"status",content:process.env.HALLOWEEN_EEGG==="true"?"Consulting the spirits":"Connecting"},ht=!1;let gi=[],No=!1,cs=!1;for(let P=0;P<=En;P++){let Be=Math.floor(En*.95);if(P>=Be&&ls<Be&&typeof t?.onAskUser=="function"){ls=Be;try{let ee="Agent has been running for a long time. Do you want to continue execution?",ne=[{id:"continue",label:"Continue",description:"Add few more steps"},{id:"cancel",label:"Cancel",description:"Stop extending and finish current turn limit"}],U=await t.onAskUser(ee,ne);U&&(U.toLowerCase().includes("continue")||U==="Continue")&&(En+=zr)}catch{}}let hn=await Ti("agent",t);if(!hn.allowed)throw new Error(hn.reason||`Budget Exhausted for Provider (${s||"Agent"})`);let ze=[];if(No=!1,a==="ICU"||a==="FluxCU")try{yield{type:"status",content:"Capturing Screen"},await new Promise(U=>setTimeout(U,1e3));let{captureGriddedScreenshot:ee}=await import("./screen_grid-
|
|
697
|
+
${_t}${rs}${ui}${ss}[user prompt] ${is.trim()} [/user prompt]`.trim();let as={role:"user",text:$o};Lo&&(as.binaryPart=Lo),b.forEach(P=>{P.text&&P.role==="agent"&&(P.text=Dt(P.text))}),b.push(as),_t&&n[n.length-1]?.id&&(yield{type:"summary_injected",content:{id:n[n.length-1].id,text:$o}});let Jt=null,En=a==="Flux"?50:15;En=a.toLowerCase().includes("cu")?75:En;let zr=Math.floor(En/2),ls=0,on=16;yield{type:"status",content:process.env.HALLOWEEN_EEGG==="true"?"Consulting the spirits":"Connecting"},ht=!1;let gi=[],No=!1,cs=!1;for(let P=0;P<=En;P++){let Be=Math.floor(En*.95);if(P>=Be&&ls<Be&&typeof t?.onAskUser=="function"){ls=Be;try{let ee="Agent has been running for a long time. Do you want to continue execution?",ne=[{id:"continue",label:"Continue",description:"Add few more steps"},{id:"cancel",label:"Cancel",description:"Stop extending and finish current turn limit"}],U=await t.onAskUser(ee,ne);U&&(U.toLowerCase().includes("continue")||U==="Continue")&&(En+=zr)}catch{}}let hn=await Ti("agent",t);if(!hn.allowed)throw new Error(hn.reason||`Budget Exhausted for Provider (${s||"Agent"})`);let ze=[];if(No=!1,a==="ICU"||a==="FluxCU")try{yield{type:"status",content:"Capturing Screen"},await new Promise(U=>setTimeout(U,1e3));let{captureGriddedScreenshot:ee}=await import("./screen_grid-PVVRYV5G.js"),ne=await ee();if(ne&&ne.base64){let U="[system] Fresh Gridded Screen Feedback Captured. Use numeric coordinates. Old screenshots will be removed when new screenshot is captured, summarize in text if context is needed later [/system]",xt={inlineData:{mimeType:ne.mimeType,data:ne.base64}},bt=h?.imageHistoryCU||"Standard",wt=bt==="Low"?3:bt==="Extended"?10:bt==="Max"?999:5,Wt=b.filter(Fe=>Array.isArray(Fe.parts)&&Fe.parts.some(St=>St.inlineData));if(Wt.length>=wt){let Fe=Wt.length-wt+1;for(let St=0;St<Fe;St++){let At=Wt[St];Array.isArray(At.parts)&&(At.parts=At.parts.filter(kt=>!kt.inlineData))}}if(b.length>0&&b[b.length-1].role==="user"){let Fe=b[b.length-1];typeof Fe.text=="string"&&(Fe.text+=`
|
|
698
698
|
|
|
699
699
|
${U}`,Array.isArray(Fe.parts)||(Fe.parts=[{text:Fe.text}]),Fe.parts.push(xt))}else b.push({role:"user",text:U,parts:[{text:U},xt]})}}catch(ee){console.error("Vision screenshot capture error:",ee)}if(h?.compression===0&&(f?.tokens||0)>Mt&&(b=bs(b,6)),P>0?yield{type:"status",content:process.env.HALLOWEEN_EEGG==="true"?"Haunting":"Working"}:yield{type:"status",content:process.env.HALLOWEEN_EEGG==="true"?"Consulting the spirits":"Connecting"},ht){try{let{clearPendingNudges:ee}=await import("./subagent_state-LZCOZSUJ.js");ee()}catch{}yield{type:"status",content:"Request Cancelled"},yield{type:"text",content:`
|
|
700
700
|
|
|
@@ -2,4 +2,4 @@ import{screen as V}from"@nut-tree-fork/nut-js";import P from"screenshot-desktop"
|
|
|
2
2
|
<rect x="${x+1}" y="${i+1}" width="${C-2}" height="${l-2}" fill="rgba(0, 255, 255, 0.015)" stroke="rgba(255, 255, 0, 0.3)" stroke-width="1.1" rx="2"/>
|
|
3
3
|
`;let p=s.some(t=>t!==m&&t.startY+t.cellH>=i-6&&t.startY<i&&Math.max(0,Math.min(x+C,t.startX+t.cellW)-Math.max(x,t.startX))>10),w=s.some(t=>t!==m&&t.startY<=i+l+6&&t.startY>i&&Math.max(0,Math.min(x+C,t.startX+t.cellW)-Math.max(x,t.startX))>10),a;if(m.isCustomY)a=c,!p&&a<i+11&&(a=Math.max(10,Math.min(a,i+4)));else{let t=m.yOffset!==void 0?m.yOffset:3;!p&&t<0&&(t=Math.min(t,-12));let y=c+t,O=!p&&(t<0||y<i+11)?Math.max(10,i+4):i+11,D=!w&&(t>0||y>i+l-2)?Math.min(o-2,i+l+6):i+l+3;a=Math.max(O,Math.min(D,y))}Y+=`
|
|
4
4
|
<text x="${n}" y="${a}" font-family="'Segoe UI', Roboto, sans-serif" font-size="14" font-weight="600" fill="#FFFF00" stroke="#000000" stroke-width="2" paint-order="stroke fill" stroke-linejoin="round" opacity="0.8" text-anchor="middle">${u}</text>
|
|
5
|
-
`}return`<svg width="${e}" height="${o}" xmlns="http://www.w3.org/2000/svg">${Y}</svg>`}var tt=1,j=e=>new Promise(o=>setTimeout(o,e));async function et(){try{let{loadSettings:e}=await import("./settings-
|
|
5
|
+
`}return`<svg width="${e}" height="${o}" xmlns="http://www.w3.org/2000/svg">${Y}</svg>`}var tt=1,j=e=>new Promise(o=>setTimeout(o,e));async function et(){try{let{loadSettings:e}=await import("./settings-GLFTNEAT.js"),o=await e();return Number(o.display||0)}catch{return 0}}async function lt(){let e=await et();try{let o=await P.listDisplays();if(o&&o.length>0)return{format:"png",screen:(o[e]||o[0]).id}}catch{}return{format:"png"}}async function ct(){let e=0,o=await lt();for(;e<2;){let b=await P(o);await j(500);let T=await P(o);if(b.equals(T))return T;e++,e<2&&await j(3e3)}return await j(3e3),await P(o)}function at(e=[],o=[]){if(!e||e.length===0)return o||[];if(!o||o.length===0)return e;let b=[...e],T=typeof e.getModelConfidence=="function"?e.getModelConfidence.bind(e):null;for(let s of o){if(T&&T(s.startX,s.startY,s.cellW,s.cellH)<.01)continue;let h=s.startX,d=s.startX+s.cellW,Y=s.startY,m=s.startY+s.cellH;for(let u of e){let p=u.startX,w=u.startY,a=u.startX+u.cellW,t=u.startY+u.cellH;if(Math.max(0,Math.min(m,t)-Math.max(Y,w))>s.cellH*.4&&p<d&&a>h){let O=(p+a)/2,D=(h+d)/2;O<=D?h=Math.max(h,a):d=Math.min(d,p)}}let r=d-h;if(r<18)continue;let H=h,x=Y,i=d,C=m,l=Math.floor(h+r/2),n=s.cy,c=!1;for(let u of e){let p=u.startX,w=u.startY,a=u.startX+u.cellW,t=u.startY+u.cellH;if(l>=p&&l<=a&&n>=w&&n<=t){c=!0;break}let y=Math.max(H,p),O=Math.max(x,w),D=Math.min(i,a),E=Math.min(C,t),g=Math.max(0,D-y)*Math.max(0,E-O),f=(i-H)*(C-x);if(g/(f||1)>=.25){c=!0;break}}c||b.push({...s,startX:H,cellW:r,cx:l})}return b.sort((s,h)=>Math.abs(s.startY-h.startY)>18?s.startY-h.startY:s.startX-h.startX),b.forEach((s,h)=>{s.badgeId=h+1}),b}async function pt(){try{let e=await ct(),o=null;if(st){let m=(async()=>{try{let{detectUIBoxesONNX:r}=await import("./ui_detector_onnx-YGGFMOK5.js");return await r(e,M.TARGET_WIDTH,M.TARGET_HEIGHT)}catch{return null}})();if(nt)o=await m||[];else{let r=z(e,!0),[H,x]=await Promise.all([m,r]);o=H&&H.length>0?at(H,x):await z(e,!1)}}else o=await z(e,!1);F=o;let b=rt(M.TARGET_WIDTH,M.TARGET_HEIGHT,M.COLS,M.ROWS,o),T=await Z(e).resize(M.TARGET_WIDTH,M.TARGET_HEIGHT,{fit:"fill"}).composite([{input:Buffer.from(b),top:0,left:0}]).png({quality:100}).toBuffer();if(process.env.SHOW_DEBUG_GRID)try{let m=Q.resolve(process.cwd(),"screenshots");await K.ensureDir(m);let r=Q.join(m,`${tt}.png`);await K.writeFile(r,T),tt++}catch{}let s=T.toString("base64"),h=o.length,d=e,Y=T;return d=null,Y=null,{base64:s,mimeType:"image/png",width:M.TARGET_WIDTH,height:M.TARGET_HEIGHT,detectedCount:h}}catch(e){return console.error("Failed to capture gridded screenshot:",e),null}}function it(e){if(e==null)return null;let o=null;if(typeof e=="number")o=e;else if(typeof e=="string"){let H=e.trim();if(/^\d+$/.test(H))o=parseInt(H,10);else{let x=H.match(/^([A-Z])([0-9]{1,2})$/i);if(x){let i=x[1].toUpperCase().charCodeAt(0)-65,C=parseInt(x[2],10)-1;o=i*M.COLS+C+1}}}if(o===null||isNaN(o))return null;if(F&&F.length>0){let H=F.find(x=>x.badgeId===o)||F.find(x=>x.cellNum===o);if(H){let x=Math.floor((H.cellNum-1)%M.COLS),i=Math.floor((H.cellNum-1)/M.COLS);return{x:H.cx,y:H.cy,colIdx:x>=0?x:0,rowIdx:i>=0?i:0,cellNum:o}}}let b=M.COLS*M.ROWS;if(o<1||o>b)return null;let T=o-1,s=Math.floor(T/M.COLS),h=T%M.COLS,d=M.TARGET_WIDTH/M.COLS,Y=M.TARGET_HEIGHT/M.ROWS,m=Math.floor(h*d+d/2),r=Math.floor(s*Y+Y/2);return{x:m,y:r,colIdx:h,rowIdx:s,cellNum:o}}async function yt(e,o,b){let T=null;if(typeof e=="number"||typeof e=="string"?T=it(e):e&&typeof e.x=="number"&&typeof e.y=="number"&&(T=e),!T)return null;let s=o,h=b,d=0,Y=0,m=await et();try{let C=await P.listDisplays();if(C&&C.length>0){let l=C[m]||C[0];l.width&&l.height&&(s=l.width,h=l.height),l.left!==void 0&&(d=l.left),l.top!==void 0&&(Y=l.top)}}catch{}if(!s||!h)try{let C=await P({}),l=await Z(C).metadata();l&&l.width&&l.height?(s=l.width,h=l.height):(s=await V.width(),h=await V.height())}catch{(!s||!h)&&(s=await V.width(),h=await V.height())}let r=s/M.TARGET_WIDTH,H=h/M.TARGET_HEIGHT,x=Math.round(T.x*r)+d,i=Math.round(T.y*H)+Y;return{x,y:i,screenW:s,screenH:h,offsetX:d,offsetY:Y}}export{M as a,st as b,nt as c,et as d,pt as e,it as f,yt as g};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as z}from"./chunk-
|
|
1
|
+
import{a as z}from"./chunk-QWEEC3PP.js";import{p as ut}from"./chunk-BGIZLZQF.js";import{a as mt,b as W}from"./chunk-L3W2X74K.js";import{d as J,h as Z,i as M,j as b}from"./chunk-DSVLWYIT.js";import S from"fs-extra";import U from"path";import bt from"http";import N from"fs-extra";import et from"path";import{spawn as vt}from"child_process";import{fileURLToPath as Ft}from"url";var $=52991,Rt=15e3,ft=et.join(J,"usage","usage_error.txt"),ht=async(e,t)=>{let o=t?.stack||t?.message||String(t);console.error(`[Usage Daemon Error] [${e}]:`,t);try{await N.ensureDir(et.dirname(ft));let s=`[${new Date().toISOString()}] [Daemon:${e}] ${o}
|
|
2
2
|
-------------------------------------
|
|
3
3
|
|
|
4
4
|
`;await N.appendFile(ft,s,"utf8")}catch{}},B={agent:0,background:0,search:0,toolSuccess:0,toolFailure:0,toolDenied:0,duration:0,tokens:0,cachedTokens:0,candidateTokens:0,linesAdded:0,linesRemoved:0,cost:0,imageCalls:[]},tt=(e,t)=>{if(!e)return{};let o=Object.keys(e),i=new Date(new Date(t).getTime()-720*60*60*1e3),s={};for(let n of o)new Date(n)>=i&&(s[n]=e[n]);return s};async function Ut(){let e=new Date().toISOString().split("T")[0],t=null;try{if(await N.exists(M)){let o=(await N.readFile(M,"utf8")).trim();o.startsWith("{")||o.startsWith("[")?t=JSON.parse(o):t=JSON.parse(W(o))}}catch(o){await ht("loadUsageFromDisk",o)}if(t){let o={...B,...t.stats||{}};Array.isArray(o.imageCalls)||(o.imageCalls=[]);let i=t.history||{},s=tt(i,e);if(t.date===e)return{...t,stats:o,history:s};{let n=t.date,c={...s};return n&&(c[n]=o),{date:e,stats:{...B},history:tt(c,e)}}}return{date:e,stats:{...B},history:{}}}async function Ot(e=$){let t=await Ut(),o=!1,i=!1,s=Date.now(),n=null,c=async()=>{if(t)try{await N.ensureDir(et.dirname(M));let l=new Date().toISOString().split("T")[0];t.history=tt(t.history||{},t.date||l),t.saveId=Math.random().toString(36).substring(2)+Date.now().toString(36);let a=mt(JSON.stringify(t,null,2));await N.writeFile(M,a,"utf8"),i=!1}catch(l){await ht("flushToDisk",l)}},r=async()=>{n&&clearInterval(n),await c(),m.close(()=>{process.exit(0)}),setTimeout(()=>process.exit(0),1e3).unref()};n=setInterval(async()=>{if(o)return;Date.now()-s>Rt&&await r()},5e3),n.unref&&n.unref();let m=bt.createServer(async(l,a)=>{let u=l.url||"";if(l.method==="POST"&&u==="/heartbeat"){o||(s=Date.now()),a.writeHead(200,{"Content-Type":"application/json"}),a.end(JSON.stringify({ok:!0}));return}if((l.method==="GET"||l.method==="POST")&&u==="/finalize"){o=!0,n&&clearInterval(n),await c(),a.writeHead(200,{"Content-Type":"application/json"}),a.end(JSON.stringify({success:!0,message:"Finalized and written to disk"})),setTimeout(()=>{m.close(()=>process.exit(0)),setTimeout(()=>process.exit(0),500).unref()},3e3);return}if(l.method==="POST"&&u==="/flush"){o||(s=Date.now(),await c()),a.writeHead(200,{"Content-Type":"application/json"}),a.end(JSON.stringify({success:!0}));return}if(l.method==="POST"&&u==="/write"){if(o){a.writeHead(403,{"Content-Type":"application/json"}),a.end(JSON.stringify({error:"Daemon finalized. Writes locked."}));return}s=Date.now();let d="";l.on("data",p=>{d+=p}),l.on("end",async()=>{try{let p=JSON.parse(d||"{}"),C=new Date().toISOString().split("T")[0];if(t.date!==C){let y=t.date;y&&(t.history||(t.history={}),t.history[y]={...t.stats}),t.date=C,t.stats={...B}}t.stats||(t.stats={...B});let{key:h,amount:f=1,provider:w,model:T}=p;if(h&&t.stats[h]!==void 0&&(h==="cost"?t.stats.cost=Number(((t.stats.cost||0)+Number(f)).toFixed(6)):typeof t.stats[h]=="number"&&(t.stats[h]+=Math.floor(f))),h==="agent"&&w&&(t.stats.providerRequests||(t.stats.providerRequests={}),t.stats.providerRequests[w]=(t.stats.providerRequests[w]||0)+Math.floor(f)),w&&T&&(h==="tokens"||h==="cachedTokens"||h==="candidateTokens"||h==="ttft"||h==="cost")){t.stats.models||(t.stats.models={}),t.stats.models[w]||(t.stats.models[w]={}),t.stats.models[w][T]||(t.stats.models[w][T]={tokens:0,cachedTokens:0,candidateTokens:0,ttftSum:0,ttftCalls:0,cost:0});let y=t.stats.models[w][T];h==="tokens"&&(y.tokens+=Math.floor(f)),h==="cachedTokens"&&(y.cachedTokens+=Math.floor(f)),h==="candidateTokens"&&(y.candidateTokens+=Math.floor(f)),h==="cost"&&(y.cost=Number(((y.cost||0)+Number(f)).toFixed(6))),h==="ttft"&&(y.ttftSum=(y.ttftSum||0)+Math.floor(f),y.ttftCalls=(y.ttftCalls||0)+1)}i=!0,await c(),a.writeHead(200,{"Content-Type":"application/json"}),a.end(JSON.stringify({success:!0}))}catch(p){a.writeHead(400,{"Content-Type":"application/json"}),a.end(JSON.stringify({error:p.message}))}});return}a.writeHead(404,{"Content-Type":"text/plain"}),a.end("Not Found")});m.listen(e,"127.0.0.1",()=>{s=Date.now()}),m.on("error",l=>{l.code==="EADDRINUSE"&&process.exit(0)})}async function At(e=$){try{if((await fetch(`http://127.0.0.1:${e}/heartbeat`,{method:"POST",signal:AbortSignal.timeout(300)})).ok)return!0}catch{}try{let t=Ft(import.meta.url);vt(process.execPath,[t,"--usage-daemon-worker",`--port=${e}`],{detached:!0,stdio:"ignore",windowsHide:!0}).unref();for(let i=0;i<10;i++){await new Promise(s=>setTimeout(s,100));try{if((await fetch(`http://127.0.0.1:${e}/heartbeat`,{method:"POST",signal:AbortSignal.timeout(300)})).ok)return!0}catch{}}}catch{}return!1}async function st(e,t=$){try{await At(t),await fetch(`http://127.0.0.1:${t}/write`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),signal:AbortSignal.timeout(1e3)})}catch{}}async function It(e=$){try{await fetch(`http://127.0.0.1:${e}/heartbeat`,{method:"POST",signal:AbortSignal.timeout(600)})}catch{}}async function Et(e=$){try{await fetch(`http://127.0.0.1:${e}/finalize`,{method:"GET",signal:AbortSignal.timeout(1e3)})}catch{}}if(process.argv.includes("--usage-daemon-worker")){let e=process.argv.find(o=>o.startsWith("--port=")),t=e?parseInt(e.split("=")[1],10):$;Ot(t)}var pt=U.join(J,"usage","usage_error.txt"),H=new Map,Nt=(e,t)=>{let o=`${e}:${t}`;if(H.has(o))return H.get(o);try{let i=yt();if(S.existsSync(i)){let n=S.readFileSync(i,"utf8").split(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as g,f as c}from"./chunk-L3W2X74K.js";import{b as s}from"./chunk-DSVLWYIT.js";import n from"fs-extra";import m from"path";var r={mode:"Flux",display:0,thinkingLevel:"Medium",aiProvider:"",activeModel:"",showFullThinking:!0,apiTier:"Free",quotas:{agentLimit:999999,backgroundLimit:999999,searchLimit:100,customModelId:"",customLimit:0,providerTiers:{Google:"Free",DeepSeek:"Free",NVIDIA:"Free",OpenRouter:"Free",InferX:"Free",SenseNova:"Free",Poolside:"Free",ExpLabs:"Free",TokenHarbor:"Free",Infron:"Free",APInex:"Free",c_openai:"Free"}},systemSettings:{customOpenAIBaseUrl:"",memory:!1,theme:"Dark",compression:0,autoExec:!0,allowExternalAccess:!1,advanceRollback:!1,autoDeleteHistory:"7d",useExternalData:!1,externalDataPath:"",preserveThinking:!0,loadingPhrases:!1,progressiveRendering:!0,showTPMEstimate:!0,subAgents:!1,CustomSubAgent:!1,SubAgentModel:"Default",SubAgentProvider:"",dynamicDirAwareness:!1,indentationTree:!0,ollamaEndpoint:"Cloud",compressToolResults:!1,autoTruncateResults:!0,imageHistoryCU:"Standard",contextLength:"256k",keepReasoningContext:!1,autoExcludeMetadata:!1,disableTodo:!1},profileData:{name:null,nickname:null,instructions:null},imageSettings:{keyType:"Default",quality:"Low-High",apiKey:""}},d=async()=>{let t={...r};try{if(await n.exists(s)){let e=g(s);if(e.imageSettings&&e.imageSettings.apiKey)try{let a=e.imageSettings.apiKey,{saveSecret:i}=await import("./secrets-UNXNDOLK.js");await i("POLLINATIONS_API_KEY",a),e.imageSettings.apiKey="",c(s,e)}catch{}t={...r,...e,quotas:{...r.quotas,...e.quotas,providerTiers:{...r.quotas.providerTiers,...e.quotas?.providerTiers||{}}},systemSettings:{...r.systemSettings,...e.systemSettings},profileData:{...r.profileData,...e.profileData},imageSettings:{...r.imageSettings,...e.imageSettings}}}}catch(e){console.error("Failed to load settings:",e)}try{let{getSecret:e}=await import("./secrets-UNXNDOLK.js"),a=await e("POLLINATIONS_API_KEY");a&&(t.imageSettings.apiKey=a)}catch{}if(t.showFullThinking===!1){t.showFullThinking=!0;try{c(s,t)}catch{}}return t},p=async t=>{let{FLUXFLOW_DIR:e}=await import("./paths-2EXHWUSL.js"),a=["logs","secret"];for(let i of a){let l=m.join(e,i),o=m.join(t,i);try{await n.exists(l)&&(await n.ensureDir(o),await n.copy(l,o,{overwrite:!0}))}catch(u){console.error(`Migration failed for ${i}:`,u)}}},D=async t=>{try{let e=await d();if(!e.systemSettings.useExternalData&&t.systemSettings?.useExternalData&&t.systemSettings?.externalDataPath&&await p(t.systemSettings.externalDataPath),t.imageSettings&&t.imageSettings.apiKey!==void 0){let{saveSecret:i,removeSecret:l}=await import("./secrets-UNXNDOLK.js"),o=t.imageSettings.apiKey;o?await i("POLLINATIONS_API_KEY",o):await l("POLLINATIONS_API_KEY")}let a={...e,...t};a.systemSettings&&(a.systemSettings.dynamicDirAwareness=!1),a.imageSettings&&(a.imageSettings={...a.imageSettings,apiKey:""}),await n.ensureDir(m.dirname(s)),c(s,a);try{let{invalidateCachedBaseUrl:i}=await import("./usage-
|
|
1
|
+
import{e as g,f as c}from"./chunk-L3W2X74K.js";import{b as s}from"./chunk-DSVLWYIT.js";import n from"fs-extra";import m from"path";var r={mode:"Flux",display:0,thinkingLevel:"Medium",aiProvider:"",activeModel:"",showFullThinking:!0,apiTier:"Free",quotas:{agentLimit:999999,backgroundLimit:999999,searchLimit:100,customModelId:"",customLimit:0,providerTiers:{Google:"Free",DeepSeek:"Free",NVIDIA:"Free",OpenRouter:"Free",InferX:"Free",SenseNova:"Free",Poolside:"Free",ExpLabs:"Free",TokenHarbor:"Free",Infron:"Free",APInex:"Free",c_openai:"Free"}},systemSettings:{customOpenAIBaseUrl:"",memory:!1,theme:"Dark",compression:0,autoExec:!0,allowExternalAccess:!1,advanceRollback:!1,autoDeleteHistory:"7d",useExternalData:!1,externalDataPath:"",preserveThinking:!0,loadingPhrases:!1,progressiveRendering:!0,showTPMEstimate:!0,subAgents:!1,CustomSubAgent:!1,SubAgentModel:"Default",SubAgentProvider:"",dynamicDirAwareness:!1,indentationTree:!0,ollamaEndpoint:"Cloud",compressToolResults:!1,autoTruncateResults:!0,imageHistoryCU:"Standard",contextLength:"256k",keepReasoningContext:!1,autoExcludeMetadata:!1,disableTodo:!1},profileData:{name:null,nickname:null,instructions:null},imageSettings:{keyType:"Default",quality:"Low-High",apiKey:""}},d=async()=>{let t={...r};try{if(await n.exists(s)){let e=g(s);if(e.imageSettings&&e.imageSettings.apiKey)try{let a=e.imageSettings.apiKey,{saveSecret:i}=await import("./secrets-UNXNDOLK.js");await i("POLLINATIONS_API_KEY",a),e.imageSettings.apiKey="",c(s,e)}catch{}t={...r,...e,quotas:{...r.quotas,...e.quotas,providerTiers:{...r.quotas.providerTiers,...e.quotas?.providerTiers||{}}},systemSettings:{...r.systemSettings,...e.systemSettings},profileData:{...r.profileData,...e.profileData},imageSettings:{...r.imageSettings,...e.imageSettings}}}}catch(e){console.error("Failed to load settings:",e)}try{let{getSecret:e}=await import("./secrets-UNXNDOLK.js"),a=await e("POLLINATIONS_API_KEY");a&&(t.imageSettings.apiKey=a)}catch{}if(t.showFullThinking===!1){t.showFullThinking=!0;try{c(s,t)}catch{}}return t},p=async t=>{let{FLUXFLOW_DIR:e}=await import("./paths-2EXHWUSL.js"),a=["logs","secret"];for(let i of a){let l=m.join(e,i),o=m.join(t,i);try{await n.exists(l)&&(await n.ensureDir(o),await n.copy(l,o,{overwrite:!0}))}catch(u){console.error(`Migration failed for ${i}:`,u)}}},D=async t=>{try{let e=await d();if(!e.systemSettings.useExternalData&&t.systemSettings?.useExternalData&&t.systemSettings?.externalDataPath&&await p(t.systemSettings.externalDataPath),t.imageSettings&&t.imageSettings.apiKey!==void 0){let{saveSecret:i,removeSecret:l}=await import("./secrets-UNXNDOLK.js"),o=t.imageSettings.apiKey;o?await i("POLLINATIONS_API_KEY",o):await l("POLLINATIONS_API_KEY")}let a={...e,...t};a.systemSettings&&(a.systemSettings.dynamicDirAwareness=!1),a.imageSettings&&(a.imageSettings={...a.imageSettings,apiKey:""}),await n.ensureDir(m.dirname(s)),c(s,a);try{let{invalidateCachedBaseUrl:i}=await import("./usage-CAY5LYRU.js");i()}catch{}return!0}catch(e){return console.error("Failed to save settings:",e),!1}};export{d as a,D as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as f}from"./chunk-
|
|
1
|
+
import{g as f}from"./chunk-IS6NOF47.js";import{mouse as c,keyboard as i,Button as u,Key as e,Point as l,clipboard as g}from"@nut-tree-fork/nut-js";c.config.autoDelayMs=50;i.config.autoDelayMs=50;async function w(){try{await i.releaseKey(e.LeftControl,e.RightControl,e.LeftAlt,e.RightAlt,e.LeftShift,e.RightShift,e.LeftSuper,e.RightSuper)}catch{}}async function h(n,t,s={}){let r=await f(t);if(!r&&(n==="move"||n==="click"||n==="drag"))return`ERROR: Invalid target location specified: ${JSON.stringify(t)}`;try{switch(n.toLowerCase()){case"move":return await c.setPosition(new l(r.x,r.y)),`Moved mouse to grid target ${typeof t=="string"?t:`(${r.x}, ${r.y})`}`;case"click":{await c.setPosition(new l(r.x,r.y));let a=s.button==="right"?u.RIGHT:s.button==="middle"?u.MIDDLE:u.LEFT;return s.clickType==="double"?await c.doubleClick(a):await c.click(a),`${s.clickType||"Single"} clicked ${s.button||"left"} button at ${typeof t=="string"?t:`(${r.x}, ${r.y})`}`}case"drag":{let a=await f(s.from||t),o=await f(s.to);return!a||!o?'ERROR: Drag requires valid "from" and "to" target coordinates/grid codes.':(await c.setPosition(new l(a.x,a.y)),await c.pressButton(u.LEFT),await c.setPosition(new l(o.x,o.y)),await c.releaseButton(u.LEFT),`Dragged mouse from (${a.x}, ${a.y}) to (${o.x}, ${o.y})`)}case"scroll":{let a=r||await f({x:640,y:360});a&&(await c.setPosition(new l(a.x,a.y)),await new Promise(d=>setTimeout(d,60)));let o=parseInt(s.amount,10);(isNaN(o)||o<=0)&&(o=5);let y=o>50?Math.min(20,Math.max(1,Math.round(o/100))):Math.min(20,o),R=s.direction==="up";for(let d=0;d<y;d++)R?await c.scrollUp(120):await c.scrollDown(120),await new Promise(L=>setTimeout(L,20));return`Scrolled ${s.direction||"down"} (${y} notches${r?` at target (${r.x}, ${r.y})`:" at screen center"})`}default:return`ERROR: Unsupported mouse action "${n}"`}}catch(a){return`ERROR: Mouse action failed: ${a.message}`}}var m={enter:e.Enter,return:e.Return,escape:e.Escape,esc:e.Escape,backspace:e.Backspace,tab:e.Tab,space:e.Space,up:e.Up,down:e.Down,left:e.Left,right:e.Right,ctrl:e.LeftControl,control:e.LeftControl,alt:e.LeftAlt,shift:e.LeftShift,cmd:e.LeftCmd,win:e.LeftWin,meta:e.LeftWin,super:e.LeftSuper,a:e.A,b:e.B,c:e.C,d:e.D,e:e.E,f:e.F,g:e.G,h:e.H,i:e.I,j:e.J,k:e.K,l:e.L,m:e.M,n:e.N,o:e.O,p:e.P,q:e.Q,r:e.R,s:e.S,t:e.T,u:e.U,v:e.V,w:e.W,x:e.X,y:e.Y,z:e.Z,0:e.Num0,1:e.Num1,2:e.Num2,3:e.Num3,4:e.Num4,5:e.Num5,6:e.Num6,7:e.Num7,8:e.Num8,9:e.Num9,f1:e.F1,f2:e.F2,f3:e.F3,f4:e.F4,f5:e.F5,f6:e.F6,f7:e.F7,f8:e.F8,f9:e.F9,f10:e.F10,f11:e.F11,f12:e.F12},p=n=>{if(!n)return;let t=String(n).toLowerCase().trim();if(m[t]!==void 0)return m[t];if(e[n]!==void 0)return e[n];if(e[t.toUpperCase()]!==void 0)return e[t.toUpperCase()]};async function E(n,t,s={}){try{switch(n.toLowerCase()){case"type":{if(typeof t!="string")return"ERROR: Type action requires a valid string input";await w(),await g.setContent(t);let a=process.platform==="darwin"?e.LeftSuper:e.LeftControl;return await i.pressKey(a,e.V),await i.releaseKey(a,e.V),await w(),s.autoPressEnter?(await new Promise(o=>setTimeout(o,50)),await i.type(e.Enter),`Typed text input ("${t.length>20?t.substring(0,20)+"...":t}") and pressed Enter`):`Typed text input ("${t.length>20?t.substring(0,20)+"...":t}")`}case"key_press":{let r=p(t);return r===void 0?`ERROR: Unknown key name "${t}"`:(await i.type(r),`Pressed key ${t}`)}case"key_combination":{if(!Array.isArray(t))return'ERROR: key_combination requires an array of keys (e.g. ["ctrl", "c"])';let r=t.map(a=>p(a)).filter(a=>a!==void 0);return r.length===0?"ERROR: Invalid key combination":(await i.pressKey(...r),await i.releaseKey(...r),`Executed key combination [${t.join(" + ")}]`)}case"clear_input":return await i.pressKey(e.LeftControl,e.A),await i.releaseKey(e.LeftControl,e.A),await i.type(e.Backspace),"Cleared active text input (Select All + Backspace)";case"browser_back":{let r=process.platform==="darwin";return r?(await i.pressKey(e.LeftSuper,e.Left),await i.releaseKey(e.LeftSuper,e.Left)):(await i.pressKey(e.LeftAlt,e.Left),await i.releaseKey(e.LeftAlt,e.Left)),await w(),`Browser back navigation (${r?"Cmd+Left":"Alt+Left"})`}default:return`ERROR: Unsupported keyboard action "${n}"`}}catch(r){return`ERROR: Keyboard action failed: ${r.message}`}}export{h as a,E as b};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as z}from"./chunk-
|
|
2
|
-
`)){let i=s.split(" ");if(i.length<12||parseInt(i[0])!==5)continue;let o=i[2],f=i[3],a=i[4],h=parseInt(i[6]),g=parseInt(i[7]),w=parseInt(i[8]),M=parseInt(i[9]),c=parseFloat(i[10]),p=i.slice(11).join(" ").trim();if(!p||c<0)continue;let x={x0:h,y0:g,x1:h+w,y1:g+M},y={text:p,confidence:c,bbox:x};n.push(y);let d=`${o}_${f}_${a}`;e.has(d)||e.set(d,{words:[],bbox:{x0:1/0,y0:1/0,x1:-1/0,y1:-1/0}});let u=e.get(d);u.words.push(y),u.bbox.x0=Math.min(u.bbox.x0,x.x0),u.bbox.y0=Math.min(u.bbox.y0,x.y0),u.bbox.x1=Math.max(u.bbox.x1,x.x1),u.bbox.y1=Math.max(u.bbox.y1,x.y1)}let r=[];for(let s of e.values())s.words.length>0&&r.push({text:s.words.map(i=>i.text).join(" "),bbox:s.bbox,words:s.words});return{words:n,lines:r}}function Z(t){if(!(t.words&&t.words.length>0)){if(t.blocks&&t.blocks.length>0){t.words=[],t.lines=[];for(let n of t.blocks)for(let e of n.paragraphs||[])for(let r of e.lines||[]){r.bbox&&t.lines.push(r);for(let s of r.words||[])s.bbox&&t.words.push(s)}if(t.words.length>0)return}if(t.tsv){let n=V(t.tsv);t.words=n.words,t.lines=n.lines}}}function A(t,n,e=0,r=0,s=1){Z(t);let i=o=>({x0:Math.round(o.x0/s)+e,y0:Math.round(o.y0/s)+r,x1:Math.round(o.x1/s)+e,y1:Math.round(o.y1/s)+r}),l=[];if(t.lines&&t.lines.length>0)for(let o of t.lines){let f=o.text?o.text.toLowerCase().trim():"";if(!f||!o.bbox||!(f===n||new RegExp(`\\b${J(n)}\\b`,"i").test(f)))continue;let h=o.words||(t.words?t.words.filter(c=>c.bbox&&c.bbox.x0>=o.bbox.x0-5&&c.bbox.x1<=o.bbox.x1+5&&c.bbox.y0>=o.bbox.y0-5&&c.bbox.y1<=o.bbox.y1+5):[]),g=n.split(/\s+/),w=g.map(c=>c.replace(/[^a-z0-9]/g,"")).join(" "),M=!1;if(h.length>0)for(let c=0;c<=h.length-g.length;c++){let p=h.slice(c,c+g.length),x=p.map(y=>(y.text||"").toLowerCase().trim().replace(/[^a-z0-9]/g,"")).join(" ");if(x===w||x.includes(w)){let y={x0:Math.min(...p.map(d=>d.bbox.x0)),y0:Math.min(...p.map(d=>d.bbox.y0)),x1:Math.max(...p.map(d=>d.bbox.x1)),y1:Math.max(...p.map(d=>d.bbox.y1))};l.push(i(y)),M=!0}}M||l.push(i(o.bbox))}if(l.length===0&&t.words&&t.words.length>0)for(let o of t.words){let f=o.text?o.text.toLowerCase().trim().replace(/[^a-z0-9]/g,""):"",a=n.replace(/[^a-z0-9]/g,"");f===a&&o.bbox&&l.push(i(o.bbox))}if(l.length===0&&t.words&&t.words.length>0){let o=Q(n.length);for(let f of t.words){let a=f.text?f.text.toLowerCase().trim():"";a.length>=3&&Math.abs(a.length-n.length)<=o&&K(a,n,o)<=o&&f.bbox&&l.push(i(f.bbox))}}return l}function E(t,n){let e=null,r=1/0;for(let s of t){let i=Math.round((s.x0+s.x1)/2),l=Math.round((s.y0+s.y1)/2),o=n.x>=s.x0&&n.x<=s.x1&&n.y>=s.y0&&n.y<=s.y1,f=Math.hypot(i-n.x,l-n.y),a=o?0:f;a<r&&(r=a,e={x:i,y:l,dist:f,containsPoint:o,bbox:s})}return e}function X(t,n,e,r){let l=Math.ceil(t/4),o=Math.ceil(n/2),f=[];for(let a=0;a<2;a++)for(let h=0;h<4;h++){let g=h*l,w=a*o,M=Math.min(l,t-g),c=Math.min(o,n-w),p=g+M/2,x=w+c/2,y=e>=g&&e<g+M&&r>=w&&r<w+c;f.push({x0:g,y0:w,w:M,h:c,cx:p,cy:x,containsTarget:y})}return f.sort((a,h)=>{if(a.containsTarget)return-1;if(h.containsTarget)return 1;let g=Math.hypot(a.cx-e,a.cy-r),w=Math.hypot(h.cx-e,h.cy-r);return g-w})}var W=null;async function Y(){return W||(W=(async()=>{let{createWorker:t}=await import("tesseract.js"),n=await import("fs-extra"),{CU_CACHE_DIR:e}=await import("./paths-2EXHWUSL.js");return n.ensureDirSync(e),t("eng",1,{cachePath:e,logger:()=>{}})})().catch(t=>{throw W=null,t})),W}var O=null,N=null;async function tt(){let{getActiveDisplay:t}=await import("./screen_grid-
|
|
1
|
+
import{a as z}from"./chunk-QYNGDXPT.js";import{f as U}from"./chunk-IS6NOF47.js";import{a as j}from"./chunk-Y5JU726N.js";import F from"screenshot-desktop";import I from"sharp";import G from"fs-extra";import H from"path";import"@nut-tree-fork/nut-js";async function P(t,n,e){if(!(!process.env.SHOW_DEBUG_GRID&&!process.env.DEBUG_OCR))try{let r=H.resolve(process.cwd(),"screenshots",t);await G.ensureDir(r),await G.writeFile(H.join(r,n),e)}catch{}}function J(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function K(t,n,e=1/0){if(t===n)return 0;if(t.length===0)return n.length;if(n.length===0)return t.length;if(Math.abs(t.length-n.length)>e)return e+1;let r=Array.from({length:n.length+1},(s,i)=>i);for(let s=1;s<=t.length;s++){let i=[s],l=s;for(let o=1;o<=n.length;o++){let f=t[s-1]===n[o-1]?0:1,a=Math.min(i[o-1]+1,r[o]+1,r[o-1]+f);i.push(a),a<l&&(l=a)}if(r=i,l>e)return e+1}return r[n.length]}function Q(t){return t<=4?0:t<=8?1:2}async function B(t,n=3){let e=await I(t).metadata();return I(t).resize(Math.round(e.width*n),Math.round(e.height*n),{kernel:"lanczos3"}).greyscale().normalise().toBuffer()}function V(t){if(!t)return{words:[],lines:[]};let n=[],e=new Map;for(let s of t.split(`
|
|
2
|
+
`)){let i=s.split(" ");if(i.length<12||parseInt(i[0])!==5)continue;let o=i[2],f=i[3],a=i[4],h=parseInt(i[6]),g=parseInt(i[7]),w=parseInt(i[8]),M=parseInt(i[9]),c=parseFloat(i[10]),p=i.slice(11).join(" ").trim();if(!p||c<0)continue;let x={x0:h,y0:g,x1:h+w,y1:g+M},y={text:p,confidence:c,bbox:x};n.push(y);let d=`${o}_${f}_${a}`;e.has(d)||e.set(d,{words:[],bbox:{x0:1/0,y0:1/0,x1:-1/0,y1:-1/0}});let u=e.get(d);u.words.push(y),u.bbox.x0=Math.min(u.bbox.x0,x.x0),u.bbox.y0=Math.min(u.bbox.y0,x.y0),u.bbox.x1=Math.max(u.bbox.x1,x.x1),u.bbox.y1=Math.max(u.bbox.y1,x.y1)}let r=[];for(let s of e.values())s.words.length>0&&r.push({text:s.words.map(i=>i.text).join(" "),bbox:s.bbox,words:s.words});return{words:n,lines:r}}function Z(t){if(!(t.words&&t.words.length>0)){if(t.blocks&&t.blocks.length>0){t.words=[],t.lines=[];for(let n of t.blocks)for(let e of n.paragraphs||[])for(let r of e.lines||[]){r.bbox&&t.lines.push(r);for(let s of r.words||[])s.bbox&&t.words.push(s)}if(t.words.length>0)return}if(t.tsv){let n=V(t.tsv);t.words=n.words,t.lines=n.lines}}}function A(t,n,e=0,r=0,s=1){Z(t);let i=o=>({x0:Math.round(o.x0/s)+e,y0:Math.round(o.y0/s)+r,x1:Math.round(o.x1/s)+e,y1:Math.round(o.y1/s)+r}),l=[];if(t.lines&&t.lines.length>0)for(let o of t.lines){let f=o.text?o.text.toLowerCase().trim():"";if(!f||!o.bbox||!(f===n||new RegExp(`\\b${J(n)}\\b`,"i").test(f)))continue;let h=o.words||(t.words?t.words.filter(c=>c.bbox&&c.bbox.x0>=o.bbox.x0-5&&c.bbox.x1<=o.bbox.x1+5&&c.bbox.y0>=o.bbox.y0-5&&c.bbox.y1<=o.bbox.y1+5):[]),g=n.split(/\s+/),w=g.map(c=>c.replace(/[^a-z0-9]/g,"")).join(" "),M=!1;if(h.length>0)for(let c=0;c<=h.length-g.length;c++){let p=h.slice(c,c+g.length),x=p.map(y=>(y.text||"").toLowerCase().trim().replace(/[^a-z0-9]/g,"")).join(" ");if(x===w||x.includes(w)){let y={x0:Math.min(...p.map(d=>d.bbox.x0)),y0:Math.min(...p.map(d=>d.bbox.y0)),x1:Math.max(...p.map(d=>d.bbox.x1)),y1:Math.max(...p.map(d=>d.bbox.y1))};l.push(i(y)),M=!0}}M||l.push(i(o.bbox))}if(l.length===0&&t.words&&t.words.length>0)for(let o of t.words){let f=o.text?o.text.toLowerCase().trim().replace(/[^a-z0-9]/g,""):"",a=n.replace(/[^a-z0-9]/g,"");f===a&&o.bbox&&l.push(i(o.bbox))}if(l.length===0&&t.words&&t.words.length>0){let o=Q(n.length);for(let f of t.words){let a=f.text?f.text.toLowerCase().trim():"";a.length>=3&&Math.abs(a.length-n.length)<=o&&K(a,n,o)<=o&&f.bbox&&l.push(i(f.bbox))}}return l}function E(t,n){let e=null,r=1/0;for(let s of t){let i=Math.round((s.x0+s.x1)/2),l=Math.round((s.y0+s.y1)/2),o=n.x>=s.x0&&n.x<=s.x1&&n.y>=s.y0&&n.y<=s.y1,f=Math.hypot(i-n.x,l-n.y),a=o?0:f;a<r&&(r=a,e={x:i,y:l,dist:f,containsPoint:o,bbox:s})}return e}function X(t,n,e,r){let l=Math.ceil(t/4),o=Math.ceil(n/2),f=[];for(let a=0;a<2;a++)for(let h=0;h<4;h++){let g=h*l,w=a*o,M=Math.min(l,t-g),c=Math.min(o,n-w),p=g+M/2,x=w+c/2,y=e>=g&&e<g+M&&r>=w&&r<w+c;f.push({x0:g,y0:w,w:M,h:c,cx:p,cy:x,containsTarget:y})}return f.sort((a,h)=>{if(a.containsTarget)return-1;if(h.containsTarget)return 1;let g=Math.hypot(a.cx-e,a.cy-r),w=Math.hypot(h.cx-e,h.cy-r);return g-w})}var W=null;async function Y(){return W||(W=(async()=>{let{createWorker:t}=await import("tesseract.js"),n=await import("fs-extra"),{CU_CACHE_DIR:e}=await import("./paths-2EXHWUSL.js");return n.ensureDirSync(e),t("eng",1,{cachePath:e,logger:()=>{}})})().catch(t=>{throw W=null,t})),W}var O=null,N=null;async function tt(){let{getActiveDisplay:t}=await import("./screen_grid-PVVRYV5G.js"),n=await t();if(O&&N===n)return O;N=n,O={format:"png"};try{let e=await F.listDisplays();e&&e.length>0&&(O={format:"png",screen:(e[n]||e[0]).id})}catch{}return O}var ut=async(t,n={})=>{let e=j(t),r=e.gridId||e.grid||e.coordinate||e.target||e.id,s=(e.type||e.clickType||"single").toLowerCase(),i=(e.button||"left").toLowerCase(),l=e.intendedClickText||e.text||"",o=e.ocrCorrection!==void 0?e.ocrCorrection===!0||e.ocrCorrection==="true":e.useOCR!==void 0?e.useOCR===!0||e.useOCR==="true":!0;if(!r&&!l)return'ERROR: Missing required "gridId" parameter for Click tool.';let f=r;if(o&&l)try{let h=r?U(r):null,g=await tt(),w=await F(g),M=await I(w).metadata(),c=M.width||1920,p=M.height||1080,x=h?{x:Math.round(h.x*(c/1280)),y:Math.round(h.y*(p/720))}:{x:c/2,y:p/2},y=l.toLowerCase().trim(),d=await Y(),u=null,$="",q=h?320:500;if(h){let _=Math.min(Math.round(c/2),c),k=Math.min(Math.round(p/2),p),b=Math.max(0,Math.min(c-_,x.x-Math.floor(_/2))),m=Math.max(0,Math.min(p-k,x.y-Math.floor(k/2))),T=await I(w).extract({left:b,top:m,width:_,height:k}).toBuffer(),D=2,R=await B(T,D),v=y.replace(/[^a-z0-9]/g,"_");await P("cropped",`crop_${Date.now()}_${v}.png`,R),await d.setParameters({tessedit_pageseg_mode:"11"});let{data:C}=await d.recognize(R,{},{tsv:!0,blocks:!0});if(C&&C.text){let L=A(C,y,b,m,D);if(L.length>0){let S=E(L,x);S&&(S.containsPoint||S.dist<=q)&&(u=S,$="centered target crop OCR")}}}if(!u){let _=await B(w,2),k=y.replace(/[^a-z0-9]/g,"_");await P("fullscreen",`full_${Date.now()}_${k}.png`,_),await d.setParameters({tessedit_pageseg_mode:"3"});let{data:b}=await d.recognize(_,{},{tsv:!0,blocks:!0});if(b&&b.text){let m=A(b,y,0,0,2);if(m.length>0){let T=E(m,x);T&&(u=T,$="full-screen OCR")}}}if(!u){let _=X(c,p,x.x,x.y),k=y.replace(/[^a-z0-9]/g,"_");await d.setParameters({tessedit_pageseg_mode:"11"});for(let b=0;b<_.length;b++){let m=_[b],T=await I(w).extract({left:m.x0,top:m.y0,width:m.w,height:m.h}).toBuffer(),D=await B(T,3);await P("tiles",`tile_${b+1}_${Date.now()}_${k}.png`,D);let{data:R}=await d.recognize(D,{},{tsv:!0,blocks:!0});if(!R||!R.text)continue;let v=A(R,y,m.x0,m.y0,3);if(v.length>0){let C=E(v,x);if(C){u=C,$=`tile ${b+1} OCR (${m.containsTarget?"target tile":`offset ${m.x0},${m.y0}`})`;break}}}}if(u){let _={x:Math.round(u.x*(1280/c)),y:Math.round(u.y*(720/p))};return`${await z("click",_,{button:i,clickType:s})} (${$} for "${l}" at ${Math.round(u.dist)}px distance)`}}catch{}return await z("click",f,{button:i,clickType:s})};export{ut as click};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as i,b as s}from"./chunk-
|
|
1
|
+
import{a as i,b as s}from"./chunk-QYNGDXPT.js";import"./chunk-IS6NOF47.js";import{a as c}from"./chunk-Y5JU726N.js";var d=async(a,p={})=>{let e=c(a),r=e.action||e.type||e.cmd,n=e.target||e.grid||e.gridCode||e.location||e.input;if(!r)return'ERROR: Missing required "action" argument for computer_action (e.g. move, click, drag, scroll, type, key_press, key_combination).';let t=r.toLowerCase();if(t.startsWith("mouse_")||["move","click","drag","scroll"].includes(t)){let o=t.replace("mouse_","");return await i(o,n,{button:e.button,clickType:e.clickType||e.type,from:e.from,to:e.to,direction:e.direction,amount:e.amount?parseInt(e.amount,10):void 0})}if(t.startsWith("key_")||t==="type"||t==="press"){let o=t;t==="press"&&(o="key_press");let u=e.autoPressEnter===!0||e.autoPressEnter==="true"||e.enter===!0||e.enter==="true";return await s(o,n||e.text||e.keys,{...e,autoPressEnter:u})}return`ERROR: Unrecognized action "${r}". Supported actions: move, click, drag, scroll, type, key_press, key_combination.`};export{d as computer_action};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
1
|
+
import{a as e}from"./chunk-QYNGDXPT.js";import"./chunk-IS6NOF47.js";import{a as d}from"./chunk-Y5JU726N.js";var m=async(a,i={})=>{let r=d(a),o=r.fromGridId||r.from||r.start,t=r.toGridId||r.to||r.end;return!o||!t?'ERROR: Drag requires both "fromGridId" and "toGridId" parameters.':await e("drag",o,{from:o,to:t})};export{m as drag};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as k}from"./chunk-FQBBOFNP.js";import{a as b}from"./chunk-Y5JU726N.js";import{t as B,u as T,v as $}from"./chunk-
|
|
1
|
+
import{a as k}from"./chunk-FQBBOFNP.js";import{a as b}from"./chunk-Y5JU726N.js";import{t as B,u as T,v as $}from"./chunk-OA7SWSBR.js";import{a as I}from"./chunk-QWEEC3PP.js";import"./chunk-BGIZLZQF.js";import"./chunk-L3W2X74K.js";import"./chunk-DSVLWYIT.js";import C from"fs-extra";import x from"path";var F=(a,y={})=>{try{if(a.length<8||a[0]!==137||a[1]!==80||a[2]!==78||a[3]!==71)return a;let s=[],c=[];for(let r=0;r<256;r++){let e=r;for(let n=0;n<8;n++)e&1?e=3988292384^e>>>1:e=e>>>1;c[r]=e}let l=r=>{let e=4294967295;for(let n=0;n<r.length;n++)e=c[(e^r[n])&255]^e>>>8;return(e^4294967295)>>>0},f=(r,e)=>{let n=Buffer.from(r,"ascii"),i=Buffer.from(e,"utf-8"),u=n.length+1+i.length,o=Buffer.alloc(8+u+4);o.writeUInt32BE(u,0),o.write("tEXt",4,"ascii"),n.copy(o,8),o[8+n.length]=0,i.copy(o,8+n.length+1);let w=l(o.subarray(4,8+u));return o.writeUInt32BE(w,8+u),o};for(let[r,e]of Object.entries(y))e!=null&&s.push(f(r,String(e)));if(s.length===0)return a;if(a.subarray(12,16).toString("ascii")==="IHDR"){let e=a.subarray(0,33),n=a.subarray(33);return Buffer.concat([e,...s,n])}return a}catch{return a}},N=async(a,y={})=>{let s=b(a),c=s.prompt||s.text,l=s.path||s.outputPath||s.output||"generated_image.png",f=s.ratio;if(!c)return'ERROR: Missing "prompt" argument for generate_image.';let r=["nsfw","naked","nudity","nude","porn","sex","xxx","erotic","gore","bloody","violence","abuse","suicide","murder","hentai","pedophile","rape"],e=c.toLowerCase();if(r.some(i=>e.includes(i)))return"ERROR: Prompt blocked by system safety filter (inappropriate or unsafe content detected).";try{let i=await I();if(!await B(i))return`ERROR: Insufficient Quota for selected quality. Either tell user reduce quality or wait for next refresh cycle (${(await T()).nextResetMin||60}m).`;let o=i.imageSettings||{keyType:"Default",quality:"Low-High",apiKey:""},w=o.keyType==="Custom"&&o.apiKey?o.apiKey:FALLBACK_IMAGE_KEY,E={Low:"flux","Low-High":"zimage",Medium:"gptimage","Medium-High":"gptimage",High:"qwen-image",Ultra:"gptimage-large",Premium:"nanobanana-pro"}[o.quality]||"zimage",g=1024,m=1024;if(f){let t=f.replace(/\s+/g,"");t==="16:9"?(g=1024,m=576):t==="9:16"?(g=576,m=1024):t==="4:3"?(g=1024,m=768):t==="3:4"?(g=768,m=1024):t==="1:1"&&(g=1024,m=1024)}let M=Math.floor(Math.random()*1e7),S=`https://gen.pollinations.ai/image/${encodeURIComponent(c)}?model=${E}&width=${g}&height=${m}&seed=${M}&enhance=true&reasoning=high&quality=high&negative=${encodeURIComponent("deformed, distorted, disfigured, poorly drawn, bad anatomy, wrong anatomy, extra limb, missing limb, floating limbs, disconnected limbs, mutation, mutated hands and fingers, blurry, low quality, low resolution, extra fingers, censored, watermarks, signatures")}`,d=await fetch(S,{method:"GET",headers:{Authorization:`Bearer ${w}`}});if(!d.ok){let t=d.status,h="";try{h=await d.text()}catch{}return t===402||h.includes("Insufficient balance")||h.includes("PAYMENT_REQUIRED")?"ERROR: Image Generation Currently unavailable. Try again later.":`ERROR: Image Generation failed with status [${t}]: ${h||"Unknown API Error"}`}if((d.headers.get("content-type")||"").includes("application/json")){let t=await d.json();return t.status===402||t.error&&t.error.code==="PAYMENT_REQUIRED"?"ERROR: Image Generation Currently unavailable. Try again later.":`ERROR: Image Generation failed: ${t.error?.message||JSON.stringify(t)}`}let O=await d.arrayBuffer(),p=Buffer.from(O),P={Title:c,Description:"Generated via FluxFlow CLI",Software:"FluxFlow CLI",Author:"FluxFlow","Creation Time":new Date().toISOString(),Prompt:c,Model:`Fluxflow:${E}`,Ratio:f||"1:1",Seed:String(M)};p=F(p,P);let R=x.resolve(process.cwd(),l);await C.ensureDir(x.dirname(R)),await k.recordFileChange(R),await C.writeFile(R,p),await $(i);let v=x.extname(l).toLowerCase(),L={".jpg":"image/jpeg",".jpeg":"image/jpeg",".png":"image/png",".webp":"image/webp"}[v]||"image/png";return y.isMultiModal!==!1?{text:`Image successfully generated from prompt [${c}] and saved to [${l}]. Output attached to multimodal part`,binaryPart:{inlineData:{data:p.toString("base64"),mimeType:L}}}:`Image successfully generated from prompt [${c}] and saved to [${l}].`}catch(i){return`ERROR: Failed during image generation: ${i instanceof Error?i.message:String(i)}`}};export{N as generate_image};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{a as k,c as d}from"./chunk-56EJGQU3.js";import{a as b}from"./chunk-Y5JU726N.js";var I=async(w,s={})=>{let{runSubagent:U}=await import("./ai-
|
|
1
|
+
import{a as k,c as d}from"./chunk-56EJGQU3.js";import{a as b}from"./chunk-Y5JU726N.js";var I=async(w,s={})=>{let{runSubagent:U}=await import("./ai-CSFGLT7L.js"),l=b(w),c=l.task||l.instruction||l.prompt,E=l.model||null,C=l.title||null,m=l.tools||null;if(!c)return'ERROR: Missing "task" argument for invoke.';let f=null;if(m)try{let t=m.trim();t.startsWith("[")&&t.endsWith("]")&&(t=t.substring(1,t.length-1)),f=t.split(",").map(n=>n.trim().replace(/^["']|["']$/g,"")).filter(Boolean)}catch{}let i=`subagent-${Date.now()}-${Math.floor(Math.random()*1e3)}`,h=null,S=null,$=new Promise((t,n)=>{h=t,S=n}),e={id:i,title:C||c.substring(0,30),task:c,status:"running",startedAt:Date.now(),lastChunkTime:Date.now(),wps:0,questions:[],pendingSteerMessages:[],steer:t=>{t&&e.pendingSteerMessages.push(t)},completionPromise:$,_resolveCompletion:h,_rejectCompletion:S,progress:[]},r={chunks:[],totalWords:0};k.push(e),s.onSubagentUpdate&&s.onSubagentUpdate();let a=[],A={...s,taskId:i,onAskMain:async t=>{let n=`q-${Date.now()}-${Math.floor(Math.random()*1e3)}`,o=null,p=new Promise(g=>{o=g}),u={id:n,question:t,answered:!1,answer:null,askedAt:Date.now(),_resolve:o};return e.questions.push(u),e.status="waiting",s.onSubagentUpdate&&s.onSubagentUpdate(),d(`[SYSTEM] Background subagent "${e.title}" is WAITING FOR YOUR INPUT: "${t}"
|
|
2
2
|
Respond using tool: [action:Answer(id="${i}", answer="...")]
|
|
3
3
|
[/SYSTEM]`),await p},onVisualFeedback:t=>{e.lastChunkTime=Date.now();let n=t.replace(/\x1b\[[0-9;]*m/g,""),o=n.match(/[✔✘✗✖🔍📖→➕↻•]\s*([A-Za-z0-9\s-]+)/);o?e.currentTool=o[1].trim():e.currentTool=n,s.onSubagentUpdate&&s.onSubagentUpdate()},onTokenChunk:(t,n)=>{let o=Date.now();if(e.lastChunkTime=o,e.currentTool="Thinking",typeof n=="number"&&n>0){r.totalWords+=n,r.chunks.push({time:o,words:n});let p=o-400;if(r.chunks=r.chunks.filter(u=>u.time>=p),r.chunks.length>0){let u=r.chunks.reduce((M,_)=>M+_.words,0),T=r.chunks[0].time,g=Math.max(.4,(o-T)/1e3);e.wps=Math.round(u/g)}}s.onSubagentUpdate&&s.onSubagentUpdate()}};return U(c,A,E,f,50,t=>{if(e.status==="cancelled")return;if(t.startsWith("[Subagent Turn")&&a.length>0&&(e.progress.push([...a]),a=[]),t.includes("[Executing Tool]")){let o=t.match(/\[Executing Tool\]\s*([a-zA-Z0-9_]+)/);o&&(!e.currentTool||e.currentTool==="Thinking")&&(e.currentTool=o[1])}let n=t;if(n.startsWith("[Tool Result]")||n.startsWith("[Action Result]")){let o=n.split(`
|
|
4
4
|
`);o.length>5&&(n=o.slice(0,4).join(`
|
|
5
5
|
`)+`
|
|
6
|
-
... [Content/Diff Truncated from Logs] ...`)}a.push(n),s.onSubagentUpdate&&s.onSubagentUpdate()},!0).then(t=>{if(e.status==="cancelled"){e._resolveCompletion&&e._resolveCompletion(t);return}a.length>0&&(e.progress.push([...a]),a=[]),e.status="completed",e.finalAnswer=t,s.onSubagentUpdate&&s.onSubagentUpdate(),d(`[SYSTEM] Background subagent "${e.title}" (id: ${i}) has FINISHED. Call GetProgress(id="${i}") to see the final result. [/SYSTEM]`),e._resolveCompletion&&e._resolveCompletion(t)}).catch(async t=>{let{isTerminationSignaled:n}=await import("./ai-
|
|
6
|
+
... [Content/Diff Truncated from Logs] ...`)}a.push(n),s.onSubagentUpdate&&s.onSubagentUpdate()},!0).then(t=>{if(e.status==="cancelled"){e._resolveCompletion&&e._resolveCompletion(t);return}a.length>0&&(e.progress.push([...a]),a=[]),e.status="completed",e.finalAnswer=t,s.onSubagentUpdate&&s.onSubagentUpdate(),d(`[SYSTEM] Background subagent "${e.title}" (id: ${i}) has FINISHED. Call GetProgress(id="${i}") to see the final result. [/SYSTEM]`),e._resolveCompletion&&e._resolveCompletion(t)}).catch(async t=>{let{isTerminationSignaled:n}=await import("./ai-CSFGLT7L.js");if(t.message==="Subagent task was cancelled."||e.status==="cancelled"||n()){e.status="cancelled",a.push("[SUBAGENT CANCELLED] Task was cancelled."),e.progress.push([...a]),s.onSubagentUpdate&&s.onSubagentUpdate(),e._resolveCompletion&&e._resolveCompletion(null);return}a.push(`[SUBAGENT FAILURE] Error: ${t.message}`),e.progress.push([...a]),e.status="failed",e.error=t.message,s.onSubagentUpdate&&s.onSubagentUpdate(),d(`[SYSTEM] Background subagent "${e.title}" (id: ${i}) FAILED with error: ${t.message}. [/SYSTEM]`),e._rejectCompletion&&e._rejectCompletion(t)}),`Background subagent started. Task ID: ${i}`};export{I as invoke};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as o}from"./chunk-Y5JU726N.js";var k=async(b,t={})=>{let{runSubagent:u}=await import("./ai-
|
|
2
|
-
`),e}catch(e){let{isTerminationSignaled:i}=await import("./ai-
|
|
1
|
+
import{a as o}from"./chunk-Y5JU726N.js";var k=async(b,t={})=>{let{runSubagent:u}=await import("./ai-CSFGLT7L.js"),s=o(b),a=s.task||s.instruction||s.prompt,m=s.model||null,l=s.tools||null;if(!a)return'ERROR: Missing "task" argument for invokeSync.';let r=null;if(l)try{let e=l.trim();e.startsWith("[")&&e.endsWith("]")&&(e=e.substring(1,e.length-1)),r=e.split(",").map(i=>i.trim().replace(/^["']|["']$/g,"")).filter(Boolean)}catch{}let n=s.title||a.substring(0,30);try{t.onVisualFeedback&&t.onVisualFeedback(`\x1B[95mSubAgent\x1B[0m: \x1B[32mGeneralist\x1B[0m \u2192 ${n}`);let e=await u(a,t,m,r,50);return t.onVisualFeedback&&t.onVisualFeedback(`\x1B[95mSubAgent\x1B[0m: \x1B[32mGeneralist\x1B[0m \u2192 ${n} [COMPLETED]
|
|
2
|
+
`),e}catch(e){let{isTerminationSignaled:i}=await import("./ai-CSFGLT7L.js"),c=e.message==="Subagent task was cancelled by user."||i();if(t.onVisualFeedback){let d=c?"[CANCELLED]":"[FAILED]";t.onVisualFeedback(`\x1B[95mSubAgent\x1B[0m: \x1B[32mGeneralist\x1B[0m \u2192 ${n} ${d}
|
|
3
3
|
`)}return`ERROR: Subagent execution failed: ${e.message}`}};export{k as invokeSync};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as e}from"./chunk-
|
|
1
|
+
import{b as e}from"./chunk-QYNGDXPT.js";import"./chunk-IS6NOF47.js";import{a as i}from"./chunk-Y5JU726N.js";var k=async(s,c={})=>{let t=i(s),a=t.key||t.keys||t.input||t.shortcut;if(!a)return'ERROR: Missing required "key" parameter for KeyPress tool.';let r=String(a).trim().toLowerCase();if(r==="clearinput"||r==="clear_input"||r==="clear")return await e("clear_input");if(r==="back"||r==="browser_back"||r==="browserBack")return await e("browser_back");if(r.includes(";")||r.includes("+")){let o=r.split(/[;+]/).map(n=>n.trim()).filter(Boolean);return await e("key_combination",o)}return await e("key_press",r)};export{k as key_press};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as n}from"./chunk-
|
|
1
|
+
import{b as n}from"./chunk-QYNGDXPT.js";import"./chunk-IS6NOF47.js";import{a as r}from"./chunk-Y5JU726N.js";var p=async(o,u={})=>{let t=r(o),e=t.text||t.input||t.value||"",s=t.autoPressEnter===!0||t.autoPressEnter==="true"||t.enter===!0||t.enter==="true";return e==null?'ERROR: Missing required "text" parameter for KeyboardTyping tool.':await n("type",String(e),{autoPressEnter:s})};export{p as keyboard_typing};
|