fluxflow-cli 5.2.0 → 5.2.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.
Files changed (46) hide show
  1. package/dist/chunks/{ai-W4ZXBMB4.js → ai-BINPY3GV.js} +1 -1
  2. package/dist/chunks/{app-THKSHPL7.js → app-DRT7CX3P.js} +180 -180
  3. package/dist/chunks/{auto_completion-CJNBFI3A.js → auto_completion-I2GVIND6.js} +1 -1
  4. package/dist/chunks/{chunk-3BRTFYTA.js → chunk-25EUCCH5.js} +1 -1
  5. package/dist/chunks/chunk-75OCC24T.js +2 -0
  6. package/dist/chunks/{chunk-WEDUYGPN.js → chunk-7CCULUZN.js} +1 -1
  7. package/dist/chunks/{chunk-HGDSONY3.js → chunk-BM4FWHBO.js} +8 -8
  8. package/dist/chunks/{chunk-UIL6OCU4.js → chunk-BNKY5QOA.js} +2 -2
  9. package/dist/chunks/chunk-KIPZOUEA.js +44 -0
  10. package/dist/chunks/{chunk-GM5VNNTU.js → chunk-RINQH4H4.js} +1 -1
  11. package/dist/chunks/{chunk-KZCVQBDK.js → chunk-UMS5SEYB.js} +1 -1
  12. package/dist/chunks/{chunk-FOELTIXU.js → chunk-VDO5TP6E.js} +1 -1
  13. package/dist/chunks/{chunk-DVXSU3Z4.js → chunk-XAPXZ6KO.js} +1 -1
  14. package/dist/chunks/{chunk-7UF7ZHP7.js → chunk-XRTIQISS.js} +1 -1
  15. package/dist/chunks/{click-ES2QYPC4.js → click-3BB6KDIJ.js} +2 -2
  16. package/dist/chunks/{computer_action-KUJCPYPN.js → computer_action-6RHVNLZG.js} +1 -1
  17. package/dist/chunks/custom_openai-ODYQEMOR.js +3 -0
  18. package/dist/chunks/{drag-U3DNSM33.js → drag-ZGNVQGXW.js} +1 -1
  19. package/dist/chunks/{exec_command-6V5SM6WI.js → exec_command-SQB5LU5X.js} +1 -1
  20. package/dist/chunks/{generate_image-OOU2MEIQ.js → generate_image-7UBJ3ODS.js} +1 -1
  21. package/dist/chunks/{invoke-DPVPIREI.js → invoke-IXWW3N4C.js} +2 -2
  22. package/dist/chunks/{invokeSync-Z2OWSYC7.js → invokeSync-EUHHQZ2H.js} +2 -2
  23. package/dist/chunks/{key_press-5T4RCRQQ.js → key_press-LO75QEJK.js} +1 -1
  24. package/dist/chunks/{keyboard_typing-Y2OBDZDW.js → keyboard_typing-DJ3HHTO7.js} +1 -1
  25. package/dist/chunks/{mistral-QQGMQJ2O.js → mistral-H23J6UYA.js} +1 -1
  26. package/dist/chunks/model_config-IVWGOIBK.js +1 -0
  27. package/dist/chunks/{nvidia-6VK5M5FB.js → nvidia-BUWXTYGV.js} +1 -1
  28. package/dist/chunks/{ollama-YTQ5HFES.js → ollama-53BJCQQX.js} +1 -1
  29. package/dist/chunks/{recapture_screen-CQ3Z5FOL.js → recapture_screen-LONV6G4U.js} +1 -1
  30. package/dist/chunks/{screen_grid-I6BDQFDD.js → screen_grid-LK6IVH4B.js} +1 -1
  31. package/dist/chunks/{scroll-SFUGXJQR.js → scroll-XBXSN2EF.js} +1 -1
  32. package/dist/chunks/{search_keyword-HR6JNLS2.js → search_keyword-IRLPX555.js} +1 -1
  33. package/dist/chunks/{secrets-DQHR2CI2.js → secrets-LHP6ATGQ.js} +1 -1
  34. package/dist/chunks/{secrets_v2-7RG5NKVT.js → secrets_v2-4ZICSEV6.js} +1 -1
  35. package/dist/chunks/{settings-XJ2SOAWE.js → settings-IZC7UDNU.js} +1 -1
  36. package/dist/chunks/{update_file-BN6X5WNO.js → update_file-CH6YILXO.js} +1 -1
  37. package/dist/chunks/{usage-BCL4OUAK.js → usage-G7HRNQNU.js} +1 -1
  38. package/dist/chunks/{usageServer-FIH6WL3V.js → usageServer-SHBKSO4I.js} +13 -5
  39. package/dist/chunks/{write_file-Q4K4LZFU.js → write_file-WX4O436W.js} +1 -1
  40. package/dist/cli.js +5 -5
  41. package/dist/package.json +1 -1
  42. package/package.json +1 -1
  43. package/dist/chunks/chunk-I5LTKU2O.js +0 -1
  44. package/dist/chunks/chunk-KSP6QOQX.js +0 -44
  45. package/dist/chunks/custom_openai-ETCGLBV4.js +0 -3
  46. package/dist/chunks/model_config-J4YX2PNQ.js +0 -1
@@ -1,3 +1,3 @@
1
- import{E as u}from"./chunk-HGDSONY3.js";import"./chunk-XPIXBWTZ.js";import"./chunk-BLAXTPPN.js";import"./chunk-56EJGQU3.js";import"./chunk-L22YGL6T.js";import"./chunk-KSP6QOQX.js";import"./chunk-UIL6OCU4.js";import"./chunk-QVRPR3DJ.js";import"./chunk-KOCMIEPK.js";import"./chunk-Y5JU726N.js";import{b as p}from"./chunk-3BRTFYTA.js";import"./chunk-WEDUYGPN.js";import"./chunk-DVXSU3Z4.js";import{b as d}from"./chunk-KZCVQBDK.js";import{o as a}from"./chunk-I5LTKU2O.js";import"./chunk-NTZSL2UT.js";import{a as l}from"./chunk-YFIWMGCS.js";import m from"fs";import g from"path";var f=["Identity: Embedded IDE code completion engine","Context given: Code \xB1 cursor, file name & language","Task: Predict contextually accurate code at cursor position","","Rules:","- Return ONLY the raw code to insert at the cursor. No explanations, commentary or rambling","- Do NOT wrap in markdown code fences","- NEVER repeat code that exist before & after cursor, if nothing sensible possible to predict, return empty string","- Match surrounding indentation and code style","- Complete the current line statement","- Never include placeholder comments like // TODO or # your code here","- Do not put anything except the code to insert between the tags"].join(`
1
+ import{E as u}from"./chunk-BM4FWHBO.js";import"./chunk-XPIXBWTZ.js";import"./chunk-BLAXTPPN.js";import"./chunk-56EJGQU3.js";import"./chunk-L22YGL6T.js";import"./chunk-KIPZOUEA.js";import"./chunk-BNKY5QOA.js";import"./chunk-QVRPR3DJ.js";import"./chunk-KOCMIEPK.js";import"./chunk-Y5JU726N.js";import{b as p}from"./chunk-25EUCCH5.js";import"./chunk-7CCULUZN.js";import"./chunk-XAPXZ6KO.js";import{b as d}from"./chunk-UMS5SEYB.js";import{o as a}from"./chunk-75OCC24T.js";import"./chunk-NTZSL2UT.js";import{a as l}from"./chunk-YFIWMGCS.js";import m from"fs";import g from"path";var f=["Identity: Embedded IDE code completion engine","Context given: Code \xB1 cursor, file name & language","Task: Predict contextually accurate code at cursor position","","Rules:","- Return ONLY the raw code to insert at the cursor. No explanations, commentary or rambling","- Do NOT wrap in markdown code fences","- NEVER repeat code that exist before & after cursor, if nothing sensible possible to predict, return empty string","- Match surrounding indentation and code style","- Complete the current line statement","- Never include placeholder comments like // TODO or # your code here","- Do not put anything except the code to insert between the tags"].join(`
2
2
  `);try{let t=g.join(l,".cache");m.existsSync(t)||m.mkdirSync(t,{recursive:!0}),m.writeFileSync(g.join(t,"completion.json"),JSON.stringify({systemPrompt:f},null,2))}catch{}var y=t=>{if(!t)return"";let e=t.match(/<completion>([\s\S]*?)<\/completion>/i);return e?e[1]:t},x=({prefix:t="",suffix:e="",fileName:o="",language:n="",recentChanges:r="",clipboard:i=""})=>{let c=r?["### Recent manual changes (context):",r,""]:[],s=i?["### Clipboard (context):",i,""]:[];return[`File: ${o}`,`Language: ${n}`,"","### Code before cursor:",t,"","[cursor here]","","### Code after cursor:",e,"",...c,...s,"### Completion to insert at cursor:"].join(`
3
3
  `)},T=async(t={})=>{try{let e=await d(),o=e.autoCompletion||{};if(!o.enabled)return"";let n=o.provider||e.aiProvider||"Google",r=o.model&&o.model!=="Default"?o.model:e.activeModel||a(n,e.apiTier)||a(n,"paid");if(!r)return"";let i=await p(n);if(!i&&!(n==="c_openai"&&e.systemSettings?.customOpenAIBaseUrl))return"";let c={aiProvider:n,apiKey:i,model:r,mode:"flow",thinkingLevel:"Fast",systemSettings:e.systemSettings||{}},s=[{role:"user",parts:[{text:x(t)}]}],{text:h}=await u(c,r,s,f,"Fast");return y(h||"")}catch{return""}};export{f as AUTOCOMPLETE_SYSTEM_PROMPT,y as extractCompletion,T as generateAutoCompletion};
@@ -1 +1 @@
1
- import{B as r,c as P,h as K,i as o,n as c,x as u}from"./chunk-WEDUYGPN.js";import{c as E,d as A}from"./chunk-NTZSL2UT.js";import{e as l}from"./chunk-YFIWMGCS.js";import i from"fs-extra";import f from"path";K();var s=f.join(l,"secrets.json"),w=async()=>{try{let t=E(s,{});if(t.API_KEY)return t.API_KEY}catch{}return null},y=async(t,n={})=>{try{let{isNullMode:e}=await import("./secrets_v2-7RG5NKVT.js");if(await e(t))return c}catch{}try{let e=await u(t,n);if(e)return e}catch{}try{let e=E(s,{});if(t==="Google")return e.GOOGLE_API_KEY||e.API_KEY||null;if(t==="DeepSeek")return e.DEEPSEEK_API_KEY||null;if(t==="OpenRouter")return e.OPENROUTER_API_KEY||null;if(t==="Mistral")return e.MISTRAL_API_KEY||null;if(t==="NVIDIA")return e.NVIDIA_API_KEY||null;if(t==="Ollama")return e.OLLAMA_API_KEY||"LOCAL";if(t==="InferX")return e.INFERX_API_KEY||null;if(t==="SenseNova"||t==="Sensenova")return e.SENSENOVA_API_KEY||null;if(t==="Poolside"||t==="poolside")return e.POOLSIDE_API_KEY||null;if(t==="9router"||t==="9Router")return e["9ROUTER_API_KEY"]||"LOCAL";if(t==="ExpLabs"||t==="ExperientialLabs"||t==="ExperimentalLabs"||t==="explabs")return e.EXPLABS_API_KEY||e.EXPERIENTIALLABS_API_KEY||null;if(t==="TokenHarbor"||t==="Token Harbor"||t==="tokenharbor"||t==="token_harbor"||t==="thk")return e.TOKENHARBOR_API_KEY||e.TOKEN_HARBOR_API_KEY||null;if(t==="Infron"||t==="infron")return e.INFRON_API_KEY||null;if(t==="APInex"||t==="apinex"||t==="apx")return e.APINEX_API_KEY||null;if(t==="xKiro"||t==="xkiro"||t==="kiro")return e.XKIRO_API_KEY||null;if(t==="c_openai"||t==="Custom (OpenAI)")return e.CUSTOM_OPENAI_API_KEY||e.C_OPENAI_API_KEY||null}catch{}return null},h=async(t,n)=>{try{let{addProviderKey:e}=await import("./secrets_v2-7RG5NKVT.js"),_=P(t)||t;o(_).some(I=>I&&(typeof I=="string"?I.trim():I.key))?await e(_,n):await e(_,n,{index:0});return}catch{}t==="Google"?(await a("GOOGLE_API_KEY",n),await a("API_KEY",n)):t==="DeepSeek"?await a("DEEPSEEK_API_KEY",n):t==="OpenRouter"?await a("OPENROUTER_API_KEY",n):t==="Mistral"?await a("MISTRAL_API_KEY",n):t==="NVIDIA"?await a("NVIDIA_API_KEY",n):t==="Ollama"?await a("OLLAMA_API_KEY",n):t==="InferX"?await a("INFERX_API_KEY",n):t==="SenseNova"||t==="Sensenova"?await a("SENSENOVA_API_KEY",n):t==="Poolside"||t==="poolside"?await a("POOLSIDE_API_KEY",n):t==="9router"||t==="9Router"?await a("9ROUTER_API_KEY",n):t==="ExpLabs"||t==="ExperientialLabs"||t==="ExperimentalLabs"||t==="explabs"?await a("EXPLABS_API_KEY",n):t==="TokenHarbor"||t==="Token Harbor"||t==="tokenharbor"||t==="token_harbor"||t==="thk"?await a("TOKENHARBOR_API_KEY",n):t==="Infron"||t==="infron"?await a("INFRON_API_KEY",n):t==="APInex"||t==="apinex"||t==="apx"?await a("APINEX_API_KEY",n):t==="xKiro"||t==="xkiro"||t==="kiro"?await a("XKIRO_API_KEY",n):(t==="c_openai"||t==="Custom (OpenAI)")&&await a("CUSTOM_OPENAI_API_KEY",n)},T=async(t,n,e={})=>{try{return await r(t,n,e)}catch(_){return{ok:!1,error:_&&_.message||"Failed to replace key."}}},b=async t=>{try{return E(s,{})[t]||null}catch{return null}},a=async(t,n)=>{await i.ensureDir(l);let e=E(s,{});e[t]=n,A(s,e,!0)},D=async()=>{try{let t=E(s,{});return{key:t.GOOGLE_API_KEY||t.API_KEY,cx:t.SEARCH_ID}}catch{}return{key:null,cx:null}},g=async t=>a("API_KEY",t),C=async t=>a("GOOGLE_API_KEY",t),X=async t=>a("SEARCH_ID",t),Y=async t=>{try{let n=E(s,{});delete n[t],A(s,n,!0)}catch{}},G=async()=>Y("API_KEY");export{w as a,y as b,h as c,T as d,b as e,a as f,D as g,g as h,C as i,X as j,Y as k,G as l};
1
+ import{B as r,c as P,h as K,i as o,n as c,x as u}from"./chunk-7CCULUZN.js";import{c as E,d as A}from"./chunk-NTZSL2UT.js";import{e as l}from"./chunk-YFIWMGCS.js";import i from"fs-extra";import f from"path";K();var s=f.join(l,"secrets.json"),w=async()=>{try{let t=E(s,{});if(t.API_KEY)return t.API_KEY}catch{}return null},y=async(t,n={})=>{try{let{isNullMode:e}=await import("./secrets_v2-4ZICSEV6.js");if(await e(t))return c}catch{}try{let e=await u(t,n);if(e)return e}catch{}try{let e=E(s,{});if(t==="Google")return e.GOOGLE_API_KEY||e.API_KEY||null;if(t==="DeepSeek")return e.DEEPSEEK_API_KEY||null;if(t==="OpenRouter")return e.OPENROUTER_API_KEY||null;if(t==="Mistral")return e.MISTRAL_API_KEY||null;if(t==="NVIDIA")return e.NVIDIA_API_KEY||null;if(t==="Ollama")return e.OLLAMA_API_KEY||"LOCAL";if(t==="InferX")return e.INFERX_API_KEY||null;if(t==="SenseNova"||t==="Sensenova")return e.SENSENOVA_API_KEY||null;if(t==="Poolside"||t==="poolside")return e.POOLSIDE_API_KEY||null;if(t==="9router"||t==="9Router")return e["9ROUTER_API_KEY"]||"LOCAL";if(t==="ExpLabs"||t==="ExperientialLabs"||t==="ExperimentalLabs"||t==="explabs")return e.EXPLABS_API_KEY||e.EXPERIENTIALLABS_API_KEY||null;if(t==="TokenHarbor"||t==="Token Harbor"||t==="tokenharbor"||t==="token_harbor"||t==="thk")return e.TOKENHARBOR_API_KEY||e.TOKEN_HARBOR_API_KEY||null;if(t==="Infron"||t==="infron")return e.INFRON_API_KEY||null;if(t==="APInex"||t==="apinex"||t==="apx")return e.APINEX_API_KEY||null;if(t==="xKiro"||t==="xkiro"||t==="kiro")return e.XKIRO_API_KEY||null;if(t==="c_openai"||t==="Custom (OpenAI)")return e.CUSTOM_OPENAI_API_KEY||e.C_OPENAI_API_KEY||null}catch{}return null},h=async(t,n)=>{try{let{addProviderKey:e}=await import("./secrets_v2-4ZICSEV6.js"),_=P(t)||t;o(_).some(I=>I&&(typeof I=="string"?I.trim():I.key))?await e(_,n):await e(_,n,{index:0});return}catch{}t==="Google"?(await a("GOOGLE_API_KEY",n),await a("API_KEY",n)):t==="DeepSeek"?await a("DEEPSEEK_API_KEY",n):t==="OpenRouter"?await a("OPENROUTER_API_KEY",n):t==="Mistral"?await a("MISTRAL_API_KEY",n):t==="NVIDIA"?await a("NVIDIA_API_KEY",n):t==="Ollama"?await a("OLLAMA_API_KEY",n):t==="InferX"?await a("INFERX_API_KEY",n):t==="SenseNova"||t==="Sensenova"?await a("SENSENOVA_API_KEY",n):t==="Poolside"||t==="poolside"?await a("POOLSIDE_API_KEY",n):t==="9router"||t==="9Router"?await a("9ROUTER_API_KEY",n):t==="ExpLabs"||t==="ExperientialLabs"||t==="ExperimentalLabs"||t==="explabs"?await a("EXPLABS_API_KEY",n):t==="TokenHarbor"||t==="Token Harbor"||t==="tokenharbor"||t==="token_harbor"||t==="thk"?await a("TOKENHARBOR_API_KEY",n):t==="Infron"||t==="infron"?await a("INFRON_API_KEY",n):t==="APInex"||t==="apinex"||t==="apx"?await a("APINEX_API_KEY",n):t==="xKiro"||t==="xkiro"||t==="kiro"?await a("XKIRO_API_KEY",n):(t==="c_openai"||t==="Custom (OpenAI)")&&await a("CUSTOM_OPENAI_API_KEY",n)},T=async(t,n,e={})=>{try{return await r(t,n,e)}catch(_){return{ok:!1,error:_&&_.message||"Failed to replace key."}}},b=async t=>{try{return E(s,{})[t]||null}catch{return null}},a=async(t,n)=>{await i.ensureDir(l);let e=E(s,{});e[t]=n,A(s,e,!0)},D=async()=>{try{let t=E(s,{});return{key:t.GOOGLE_API_KEY||t.API_KEY,cx:t.SEARCH_ID}}catch{}return{key:null,cx:null}},g=async t=>a("API_KEY",t),C=async t=>a("GOOGLE_API_KEY",t),X=async t=>a("SEARCH_ID",t),Y=async t=>{try{let n=E(s,{});delete n[t],A(s,n,!0)}catch{}},G=async()=>Y("API_KEY");export{w as a,y as b,h as c,T as d,b as e,a as f,D as g,g as h,C as i,X as j,Y as k,G as l};
@@ -0,0 +1,2 @@
1
+ import{a as y}from"./chunk-YFIWMGCS.js";import u from"fs";import F from"path";import{fileURLToPath as P}from"url";var g={version:0,release:20261106,fallbacks:{},providers:{}};var S=P(import.meta.url),v=F.dirname(S),b="",_=[F.join(v,"../../model_config.json"),F.join(v,"../model_config.json")];for(let r of _)try{if(u.existsSync(r)){b=r;break}}catch{}var x=F.join(y,"model_config.json"),c=null,h=()=>{if(b)try{let r=u.readFileSync(b,"utf-8"),t=JSON.parse(r);if(t&&typeof t=="object")return t}catch{}return g&&typeof g=="object"?JSON.parse(JSON.stringify(g)):{version:0,release:20260913,fallbacks:{},providers:{}}};if(u.existsSync(x))try{let r=u.readFileSync(x,"utf-8"),t=JSON.parse(r);if(t&&typeof t=="object"){let o=h();t.fallbacks={...o.fallbacks||{},...t.fallbacks||{}},t.providers||(t.providers={}),t.release||(t.release=o.release||20260913),c=t}}catch{}c||(c=h());var M=new Set,C=new Set,m=()=>{let r=new Set,t=new Set;if(c.providers)for(let o of Object.keys(c.providers)){let e=c.providers[o];if(e&&e.models){let n=["Free","Paid"];for(let l of n){let s=e.models[l];if(Array.isArray(s)){for(let i of s)if(i&&i.cmd){let d=i.cmd.trim().toLowerCase();i.multimodal===!0&&r.add(d),i.hasReasoning===!0&&t.add(d)}}}}}if(Array.isArray(c.multimodal_models))for(let o of c.multimodal_models)o&&typeof o=="string"&&r.add(o.trim().toLowerCase());M=r,C=t};m();var U=()=>c,p=()=>{try{return u.existsSync(y)||u.mkdirSync(y,{recursive:!0}),u.writeFileSync(x,JSON.stringify(c,null,2),"utf-8"),!0}catch{return!1}},T=(r,t,o=!1,e=null,n=null)=>{if(!r||!t)return{success:!1,reason:"Invalid provider or model ID"};let l=t.trim();if(!l)return{success:!1,reason:"Model ID cannot be empty"};c.providers||(c.providers={}),c.providers[r]||(c.providers[r]={default_free:"",default_paid:"",models:{Free:[],Paid:[]}});let s=c.providers[r];s.models||(s.models={Free:[],Paid:[]}),Array.isArray(s.models.Free)||(s.models.Free=[]);let i=n?String(n).trim().replace(/\/+$/,""):null,d=s.models.Free.find(a=>(typeof a=="string"?a:a?.cmd)===l);if(d)if(typeof d=="string"){let a=s.models.Free.indexOf(d),f={cmd:l,multimodal:!!o,desc:l};e&&Object.keys(e).length>0&&(f.info=e),i&&(f.baseUrl=i),s.models.Free[a]=f}else d.multimodal=!!o,e&&Object.keys(e).length>0&&(d.info={...d.info||{},...e}),i&&(d.baseUrl=i);else{let a={cmd:l,multimodal:!!o,desc:l};e&&Object.keys(e).length>0&&(a.info=e),i&&(a.baseUrl=i),s.models.Free.push(a)}return m(),p(),{success:!0}},R=(r,t,o={})=>{if(!r||!t)return{success:!1,reason:"Invalid provider or model ID"};let e=t.trim();if(!e)return{success:!1,reason:"Model ID cannot be empty"};c.providers||(c.providers={}),c.providers[r]||(c.providers[r]={default_free:"",default_paid:"",models:{Free:[],Paid:[]}});let n=c.providers[r];n.models||(n.models={Free:[],Paid:[]}),Array.isArray(n.models.Free)||(n.models.Free=[]);let l=e.toLowerCase(),s=n.models.Free.find(i=>{let d=typeof i=="string"?i:i?.cmd;return d&&d.trim().toLowerCase()===l});if(o===null)s&&typeof s=="object"&&delete s.info;else if(!s)n.models.Free.push({cmd:e,multimodal:!1,desc:e,info:o});else if(typeof s=="string"){let i=n.models.Free.indexOf(s);n.models.Free[i]={cmd:s,multimodal:!1,desc:s,info:o}}else s.info={...s.info||{},...o};return p(),{success:!0}},W=(r,t,o=!0)=>{if(!r||!t)return{success:!1,reason:"Invalid provider or model ID"};let e=t.trim();if(!e)return{success:!1,reason:"Model ID cannot be empty"};let n=c.providers?.[r];if(!n||!n.models||!Array.isArray(n.models.Free))return{success:!1,reason:`Provider ${r} has no models configured`};let l=n.models.Free.find(s=>(typeof s=="string"?s:s?.cmd)===e);if(!l)return{success:!1,reason:`Model "${e}" not found in ${r} model list`};if(typeof l=="string"){let s=n.models.Free.indexOf(l);n.models.Free[s]={cmd:e,multimodal:!!o,desc:e}}else l.multimodal=!!o;return m(),p(),{success:!0}},J=(r,t,o=!1,e=null,n=null)=>{if(!r||!t)return{success:!1,reason:"Invalid provider or model ID"};let l=t.trim();if(!l)return{success:!1,reason:"Model ID cannot be empty"};c.providers||(c.providers={}),c.providers[r]||(c.providers[r]={default_free:"",default_paid:"",models:{Free:[],Paid:[]}});let s=c.providers[r];s.models||(s.models={Free:[],Paid:[]}),Array.isArray(s.models.Free)||(s.models.Free=[]);let i=s.models.Free.find(d=>(typeof d=="string"?d:d?.cmd)===l);if(i)if(typeof i=="string"){let d=s.models.Free.indexOf(i),a=n?String(n).trim().replace(/\/+$/,""):null,f={cmd:l,multimodal:!!o,desc:l};e&&Object.keys(e).length>0&&(f.info=e),a&&(f.baseUrl=a),s.models.Free[d]=f}else o&&(i.multimodal=!0),e&&Object.keys(e).length>0&&(i.info={...i.info||{},...e});else{let d=n?String(n).trim().replace(/\/+$/,""):null,a={cmd:l,multimodal:!!o,desc:l};e&&Object.keys(e).length>0&&(a.info=e),d&&(a.baseUrl=d),s.models.Free.push(a)}return s.default_free=l,m(),p(),{success:!0}},E=(r,t)=>{if(!r||!t)return{success:!1,reason:"Invalid provider or model ID"};let o=t.trim();if(!o)return{success:!1,reason:"Model ID cannot be empty"};let e=c.providers?.[r];if(!e||!e.models||!Array.isArray(e.models.Free))return{success:!1,reason:`Provider ${r} has no models configured`};let n=e.models.Free.findIndex(l=>(typeof l=="string"?l:l?.cmd)===o);return n===-1?{success:!1,reason:`Model "${o}" not found in ${r} model list`}:(e.models.Free.splice(n,1),e.default_free===o&&(e.default_free=""),e.default_paid===o&&(e.default_paid=""),m(),p(),{success:!0})},B=(r,t,o)=>{if(!r||!t||!o)return{success:!1,reason:"Invalid provider or model IDs"};let e=t.trim(),n=o.trim();if(!e||!n)return{success:!1,reason:"Model IDs cannot be empty"};let l=c.providers?.[r];if(!l||!l.models||!Array.isArray(l.models.Free))return{success:!1,reason:`Provider ${r} has no models configured`};let s=l.models.Free.find(i=>(typeof i=="string"?i:i?.cmd)===e);if(!s)return{success:!1,reason:`Model "${e}" not found in ${r} model list`};if(typeof s=="string"){let i=l.models.Free.indexOf(s);l.models.Free[i]={cmd:n,multimodal:!1,desc:n}}else s.cmd=n,(s.desc===e||!s.desc)&&(s.desc=n);return m(),p(),{success:!0}},I=!1,$=r=>{I=!!r},G=$,K=r=>{if(!r)return!1;let t=r.trim().toLowerCase();return!!(I||M.has(t)||t.startsWith("gemini-")||t.startsWith("gemma-"))},V=r=>{if(!r)return!1;let t=r.trim().toLowerCase();return C.has(t)},X=(r,t,o=null)=>{let e=c.providers[r];if(!e)return[];let n=e.models[t==="Free"?"Free":"Paid"]||[];if(r==="c_openai"&&o){let l=String(o).trim().replace(/\/+$/,"");return n.filter(s=>typeof s=="object"&&s?.baseUrl?s.baseUrl.replace(/\/+$/,"")===l:!0)}return n},q=(r,t)=>{let o=c.providers[r];return o?t==="Free"?o.default_free:o.default_paid:""},z=(r,t)=>{let o=`
2
+ \u2800\u2800\x1B[2m\u2514\u2500\x1B[22m `,e=null;try{e=r&&t?k(r,t):null}catch{e=null}if(!e||Number(e.IN)===0&&Number(e.OUT)===0&&Number(e.CR)===0&&Number(e.CW)===0)return`${o}Price: \x1B[33mNot Set\x1B[0m`;let n=[`In $${e.IN}`,`Out $${e.OUT}`,`Cache $${e.CR}`];return Number(e.CW)>0&&n.push(`Cache Write $${e.CW}`),`${o}Price: ${n.join(", ")}`},k=(r,t)=>{if(!r||!t||!c.providers)return null;let o=c.providers[r];if(!o||!o.models)return null;let e=t.trim().toLowerCase(),n=["Free","Paid"];for(let l of n){let s=o.models[l];if(Array.isArray(s)){for(let i of s)if(typeof i=="object"&&i?.cmd&&i.cmd.trim().toLowerCase()===e&&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},H=r=>c?.fallbacks?.[r];export{g as a,U as b,p as c,T as d,R as e,W as f,J as g,E as h,B as i,$ as j,G as k,K as l,V as m,X as n,q as o,z as p,k as q,H as r};
@@ -1 +1 @@
1
- import{c as v,d as T}from"./chunk-NTZSL2UT.js";import{e as k}from"./chunk-YFIWMGCS.js";import b from"fs-extra";import C from"path";var Y=C.join(k,"secrets_v2.json"),y=10,F=new Set(["9router","c_openai"]),z=new Set(["c_openai"]),U=[{canonical:"Google",secret:["GOOGLE_API_KEY","API_KEY"],aliases:["gemini"]},{canonical:"DeepSeek",secret:["DEEPSEEK_API_KEY"],aliases:["deepseek-ai","deepseekai"]},{canonical:"OpenRouter",secret:["OPENROUTER_API_KEY"],aliases:["open router","open_router"]},{canonical:"NVIDIA",secret:["NVIDIA_API_KEY"],aliases:["nvidia nim"]},{canonical:"Mistral",secret:["MISTRAL_API_KEY"],aliases:[]},{canonical:"Ollama",secret:["OLLAMA_API_KEY"],aliases:[]},{canonical:"InferX",secret:["INFERX_API_KEY"],aliases:["infer x","inferx"]},{canonical:"SenseNova",secret:["SENSENOVA_API_KEY"],aliases:["sensenova","sense nova"]},{canonical:"AIHubMix",secret:["AIHUBMIX_API_KEY"],aliases:["aihubmix","ai hub mix"]},{canonical:"Poolside",secret:["POOLSIDE_API_KEY"],aliases:[]},{canonical:"9router",secret:["9ROUTER_API_KEY"],aliases:["9router","9-router","nine router"]},{canonical:"ExpLabs",secret:["EXPLABS_API_KEY","EXPERIENTIALLABS_API_KEY"],aliases:["explabs","experientiallabs","experimentallabs","experiential labs"]},{canonical:"TokenHarbor",secret:["TOKENHARBOR_API_KEY","TOKEN_HARBOR_API_KEY"],aliases:["tokenharbor","token harbor","token_harbor","thk"]},{canonical:"Infron",secret:["INFRON_API_KEY"],aliases:["infron"]},{canonical:"APInex",secret:["APINEX_API_KEY"],aliases:["apinex","apx"]},{canonical:"xKiro",secret:["XKIRO_API_KEY"],aliases:["xkiro","kiro"]},{canonical:"c_openai",secret:["CUSTOM_OPENAI_API_KEY","C_OPENAI_API_KEY"],aliases:["custom","custom (openai)","custom openai"]}],L=new Map;for(let e of U){L.set(e.canonical.toLowerCase(),e.canonical);for(let t of e.aliases)L.set(t.toLowerCase(),e.canonical)}var f=e=>!e||typeof e!="string"?null:L.get(e.trim().toLowerCase())||null,J=()=>U.map(e=>e.canonical),h=e=>z.has(e),ie=e=>F.has(e);var ce=e=>{let t=f(e)||e;return t==="c_openai"?"custom":t},B=()=>new Array(y).fill(null),d=e=>e?typeof e=="string"?e.trim().length>0:typeof e=="object"?!!(e.key&&String(e.key).trim()):!1:!1,I=e=>e?typeof e=="string"?e:typeof e=="object"&&e.key?e.key:null:null,E=e=>{let t=B();if(Array.isArray(e))for(let s=0;s<y&&s<e.length;s++)t[s]=e[s]??null;else typeof e=="string"&&e.trim()&&(t[0]=e);return t},S=()=>{try{return v(Y,{})||{}}catch{return{}}},g=e=>{try{b.existsSync(k)||b.mkdirSync(k,{recursive:!0}),T(Y,e,!0)}catch{}},D=!1,le=async()=>{if(!D){D=!0;try{await b.pathExists(Y);let e=C.join(k,"secrets.json");if(!await b.pathExists(e))return;let t=v(e,{})||{},s=S(),n=!1;for(let o of U){let i=E(s[o.canonical]);if(i.some(d)){s[o.canonical]=i;continue}let r=null;for(let a of o.secret)if(t[a]){r=t[a];break}r&&(h(o.canonical)?i[0]={key:r,baseUrl:""}:i[0]=r,s[o.canonical]=i,n=!0)}n&&g(s)}catch{}}},A=e=>{let t=f(e)||e,s=S();return E(s[t])},q=e=>A(e).filter(d).length,ue=()=>U.filter(e=>!F.has(e.canonical)).map(e=>{let t=q(e.canonical);return{provider:e.canonical,count:t,hasKeys:t>0}}),H=async()=>{try{let{loadSettings:e}=await import("./settings-XJ2SOAWE.js"),t=await e();return t&&t.activeKeyIndex||{}}catch{return{}}},Q=async e=>{try{let{loadSettings:t,saveSettings:s}=await import("./settings-XJ2SOAWE.js"),n=await t();n.activeKeyIndex=e,await s(n)}catch{}},_=async e=>{let t=f(e)||e,n=(await H())[t];return Number.isInteger(n)?n:null},w=async(e,t)=>{let s=f(e)||e,n=await H();return n[s]=t,await Q(n),t},V=async()=>{try{let{loadSettings:e}=await import("./settings-XJ2SOAWE.js"),t=await e();return t&&t.nullKeyProviders||{}}catch{return{}}},W=async e=>{try{let{loadSettings:t,saveSettings:s}=await import("./settings-XJ2SOAWE.js"),n=await t();n.nullKeyProviders=e,await s(n)}catch{}},Z=new Set(["c_openai","Ollama"]),ee="__FLUX_NULL_KEY__",fe=e=>Z.has(f(e)||e),$=async e=>{let t=f(e)||e;return(await V())[t]===!0},P=async(e,t=!0)=>{let s=f(e)||e,n=await V();return t?n[s]=!0:delete n[s],await W(n),t===!0},x=new Map,de=(e,t,s=void 0)=>{let n=f(e)||e,o={key:t};s!==void 0&&(o.baseUrl=s),x.set(n,o)},pe=e=>{let t=f(e)||e;return x.get(t)||null},me=e=>x.has(f(e)||e),ye=()=>x.clear(),Ie=e=>x.delete(f(e)||e),O=null,xe=e=>{O=typeof e=="function"?e:null},te=e=>{try{O&&O(e)}catch{}},K=async()=>{try{let{loadSettings:e}=await import("./settings-XJ2SOAWE.js"),t=await e();return t.systemSettings&&t.systemSettings.customOpenAIBaseUrl||""}catch{return""}},ge=async(e,t={})=>{let s=f(e)||e,n=t.silent===!0,o=x.get(s);if(o&&o.key)return o.key;if(await $(s))return ee;let i=A(s),r=await _(s);if(Number.isInteger(r)&&r>=0&&r<y&&d(i[r]))return I(i[r]);let a=i.findIndex(d);return a!==-1?(n||(await w(s,a),te(`No active key set for ${s}. Auto-selected slot ${a+1}.`)),I(i[a])):null},_e=async e=>{let t=f(e)||e;if(!h(t))return null;let s=x.get(t);if(s&&s.key)return s.baseUrl!==void 0?s.baseUrl:await K();if(await $(t))return await K();let n=A(t),o=await _(t);if(Number.isInteger(o)&&o>=0&&o<y){let r=n[o];if(r&&typeof r=="object"&&r.key)return r.baseUrl||""}let i=n.findIndex(d);if(i!==-1){let r=n[i];if(r&&typeof r=="object")return r.baseUrl||""}return await K()},R=async(e,t,s,n)=>{if(h(e)){let o=n!==void 0?n:s!==void 0?s:await K();return{key:t,baseUrl:o}}return t},X=e=>{let t=String(e||"").trim();if(!t)return{ok:!1,error:"URL is empty."};if(!/^https?:\/\/\S+$/i.test(t))return{ok:!1,error:"URL must start with http:// or https://"};let s=t.replace(/\/+$/,""),n=s.toLowerCase(),o=/(^|\/)v1$/.test(n),i=/(^|\/)v1\/chat\/completions$/.test(n);return!o&&!i?{ok:!1,error:"URL must end with /v1 or /v1/chat/completions"}:{ok:!0,url:s}},G=(e,t)=>{let s=String(t),n=[],o=[];return e.forEach((i,r)=>{let a=I(i);a&&(a===s?n.push(r):a.includes(s)&&o.push(r))}),n.length?n:o},he=async(e,t,s={})=>{let n=f(e)||e;if(!t||!String(t).trim())return{ok:!1,error:"Empty key."};let o=String(t).trim(),i;if(s.baseUrl!==void 0){if(!h(n))return{ok:!1,error:"--url is only supported for the custom provider."};let c=X(s.baseUrl);if(!c.ok)return{ok:!1,error:`Invalid URL: ${c.error}`};i=c.url}let r=S(),a=E(r[n]);if(a.some(c=>I(c)===o))return{ok:!1,error:`Key already exists in slot ${a.findIndex(l=>I(l)===o)+1}.`};if(Number.isInteger(s.index)){let c=s.index;if(c<0||c>=y)return{ok:!1,error:`Index must be between 1 and ${y}.`};let l=a[c]&&typeof a[c]=="object"?a[c].baseUrl:void 0;return a[c]=await R(n,o,l,i),r[n]=a,g(r),await P(n,!1),{ok:!0,index:c}}let u=a.findIndex(c=>!d(c));return u===-1?{ok:!1,error:"All slots full. Specify an index to overwrite.",full:!0}:(a[u]=await R(n,o,void 0,i),r[n]=a,g(r),await P(n,!1),{ok:!0,index:u})},we=async(e,t,s={})=>{let n=f(e)||e;if(!t||!String(t).trim())return{ok:!1,error:"Empty key."};let o=String(t).trim(),i;if(s.baseUrl!==void 0){if(!h(n))return{ok:!1,error:"Base URL is only supported for the custom provider."};let p=X(s.baseUrl);if(!p.ok)return{ok:!1,error:`Invalid URL: ${p.error}`};i=p.url}let r=S(),a=E(r[n]),u=await _(n),c=Number.isInteger(u)&&u>=0&&u<y&&d(a[u])?u:a.findIndex(d);c===-1&&(c=0);let l=a[c]&&typeof a[c]=="object"?a[c].baseUrl:void 0;return a[c]=await R(n,o,l,i),r[n]=a,g(r),await w(n,c),await P(n,!1),{ok:!0,index:c}},Ee=async(e,t,s={})=>{let n=f(e)||e,o=S(),i=E(o[n]);if(s.all||t==="--all"||t==="__all__")return o[n]=B(),g(o),await w(n,null),{ok:!0,all:!0,remaining:0,needsNewKey:!0};let r=-1;if(t==null){let l=await _(n);if(r=Number.isInteger(l)&&d(i[l])?l:i.findIndex(d),r===-1)return{ok:!1,error:"No keys to remove."}}else if(Number.isInteger(t)){if(r=t,r<0||r>=y)return{ok:!1,error:`Index must be between 1 and ${y}.`};if(!d(i[r]))return{ok:!1,error:`Slot ${r+1} is already empty.`}}else{let l=G(i,t);if(l.length===0)return{ok:!1,error:"No matching key found."};if(l.length>1)return{ok:!1,error:`Duplicate match (slots ${l.map(p=>p+1).join(", ")}). Be more specific.`};r=l[0]}let a=I(i[r]),u=await _(n)===r;i[r]=null,o[n]=i,g(o);let c=i.filter(d).length;if(u){let l=i.findIndex(d);await w(n,l===-1?null:l)}return{ok:!0,removed:a,removedIndex:r,remaining:c,needsNewKey:c===0}},Se=async(e,t)=>{let s=f(e)||e,n=A(s),o=-1;if(Number.isInteger(t)){if(o=t,o<0||o>=y)return{ok:!1,error:`Index must be between 1 and ${y}.`};if(!d(n[o]))return{ok:!1,error:`Slot ${o+1} is empty.`}}else{let r=G(n,t);if(r.length===0)return{ok:!1,error:"No matching key found."};if(r.length>1)return{ok:!1,error:`Duplicate match (slots ${r.map(a=>a+1).join(", ")}). Be more specific.`};o=r[0]}await w(s,o),await P(s,!1);let i=null;if(h(s)){let r=n[o],a=r&&typeof r=="object"&&r.baseUrl?r.baseUrl.trim():"";if(a)try{let{loadSettings:u,saveSettings:c}=await import("./settings-XJ2SOAWE.js"),l=await u();if((l.systemSettings&&l.systemSettings.customOpenAIBaseUrl?l.systemSettings.customOpenAIBaseUrl.trim():"")!==a){let m={...l.systemSettings||{},customOpenAIBaseUrl:a,memory:!1};await c({...l,systemSettings:m}),i=a}}catch{}}return{ok:!0,index:o,key:I(n[o]),switchedBaseUrl:i}},ke=async(e=null)=>{let t=S(),s=e?[f(e)||e]:J(),n=0;for(let o of s){let i=E(t[o]),r=i.filter(d);if(r.length===0){t[o]=i;continue}let a=await _(o),u=Number.isInteger(a)&&d(i[a])?i[a]:null,c=B();r.forEach((p,m)=>{c[m]=p});let l=Number.isInteger(a)?a:null;if(u){let p=i.slice(0,y).map((m,N)=>({s:m,i:N})).filter(m=>d(m.s)).findIndex(m=>m.i===a);l=p===-1?null:p}t[o]=c,l!==a&&await w(o,l),n++}return g(t),{ok:!0,providers:s.length,touched:n}},j=e=>{if(!e)return"";let t=String(e),s=t.length;if(s<=3)return"...";let n=Math.floor(s/3),o=t.slice(0,n),i=t.slice(s-n);return o+"..."+i},ne=e=>{if(!e)return"";let t=String(e).replace(/\/+$/,"");return t.length<=28?t:"..."+t.replace(/^https?:\/\//i,"").slice(-24)},Ae=async(e,t={})=>{let s=t.unmask===!0,n=f(e)||e,o=A(n),i=await _(n),r=x.get(n),a=[];r&&r.key&&a.push(`Temporary: ${s?r.key:j(r.key)}`),await $(n)&&a.push("Mode: NO KEY (null) <- active");for(let u=0;u<y;u++){let c=o[u],l=I(c),p=l&&!s?j(l):l,m;if(!l)m="Empty";else if(h(n)){let M=c&&typeof c=="object"?ne(c.baseUrl):"";m=M?`${p} (Saved: ${M})`:p}else m=p;let N=u===i&&l?" \u2190 active":"";a.push(`${u+1}: ${m}${N}`)}return a};export{F as a,U as b,f as c,J as d,h as e,ie as f,ce as g,le as h,A as i,q as j,ue as k,_ as l,w as m,ee as n,fe as o,$ as p,P as q,de as r,pe as s,me as t,ye as u,Ie as v,xe as w,ge as x,_e as y,X as z,he as A,we as B,Ee as C,Se as D,ke as E,j as F,ne as G,Ae as H};
1
+ import{c as v,d as T}from"./chunk-NTZSL2UT.js";import{e as k}from"./chunk-YFIWMGCS.js";import b from"fs-extra";import C from"path";var Y=C.join(k,"secrets_v2.json"),y=10,F=new Set(["9router","c_openai"]),z=new Set(["c_openai"]),U=[{canonical:"Google",secret:["GOOGLE_API_KEY","API_KEY"],aliases:["gemini"]},{canonical:"DeepSeek",secret:["DEEPSEEK_API_KEY"],aliases:["deepseek-ai","deepseekai"]},{canonical:"OpenRouter",secret:["OPENROUTER_API_KEY"],aliases:["open router","open_router"]},{canonical:"NVIDIA",secret:["NVIDIA_API_KEY"],aliases:["nvidia nim"]},{canonical:"Mistral",secret:["MISTRAL_API_KEY"],aliases:[]},{canonical:"Ollama",secret:["OLLAMA_API_KEY"],aliases:[]},{canonical:"InferX",secret:["INFERX_API_KEY"],aliases:["infer x","inferx"]},{canonical:"SenseNova",secret:["SENSENOVA_API_KEY"],aliases:["sensenova","sense nova"]},{canonical:"AIHubMix",secret:["AIHUBMIX_API_KEY"],aliases:["aihubmix","ai hub mix"]},{canonical:"Poolside",secret:["POOLSIDE_API_KEY"],aliases:[]},{canonical:"9router",secret:["9ROUTER_API_KEY"],aliases:["9router","9-router","nine router"]},{canonical:"ExpLabs",secret:["EXPLABS_API_KEY","EXPERIENTIALLABS_API_KEY"],aliases:["explabs","experientiallabs","experimentallabs","experiential labs"]},{canonical:"TokenHarbor",secret:["TOKENHARBOR_API_KEY","TOKEN_HARBOR_API_KEY"],aliases:["tokenharbor","token harbor","token_harbor","thk"]},{canonical:"Infron",secret:["INFRON_API_KEY"],aliases:["infron"]},{canonical:"APInex",secret:["APINEX_API_KEY"],aliases:["apinex","apx"]},{canonical:"xKiro",secret:["XKIRO_API_KEY"],aliases:["xkiro","kiro"]},{canonical:"c_openai",secret:["CUSTOM_OPENAI_API_KEY","C_OPENAI_API_KEY"],aliases:["custom","custom (openai)","custom openai"]}],L=new Map;for(let e of U){L.set(e.canonical.toLowerCase(),e.canonical);for(let t of e.aliases)L.set(t.toLowerCase(),e.canonical)}var f=e=>!e||typeof e!="string"?null:L.get(e.trim().toLowerCase())||null,J=()=>U.map(e=>e.canonical),h=e=>z.has(e),ie=e=>F.has(e);var ce=e=>{let t=f(e)||e;return t==="c_openai"?"custom":t},B=()=>new Array(y).fill(null),d=e=>e?typeof e=="string"?e.trim().length>0:typeof e=="object"?!!(e.key&&String(e.key).trim()):!1:!1,I=e=>e?typeof e=="string"?e:typeof e=="object"&&e.key?e.key:null:null,E=e=>{let t=B();if(Array.isArray(e))for(let s=0;s<y&&s<e.length;s++)t[s]=e[s]??null;else typeof e=="string"&&e.trim()&&(t[0]=e);return t},S=()=>{try{return v(Y,{})||{}}catch{return{}}},g=e=>{try{b.existsSync(k)||b.mkdirSync(k,{recursive:!0}),T(Y,e,!0)}catch{}},D=!1,le=async()=>{if(!D){D=!0;try{await b.pathExists(Y);let e=C.join(k,"secrets.json");if(!await b.pathExists(e))return;let t=v(e,{})||{},s=S(),n=!1;for(let o of U){let i=E(s[o.canonical]);if(i.some(d)){s[o.canonical]=i;continue}let r=null;for(let a of o.secret)if(t[a]){r=t[a];break}r&&(h(o.canonical)?i[0]={key:r,baseUrl:""}:i[0]=r,s[o.canonical]=i,n=!0)}n&&g(s)}catch{}}},A=e=>{let t=f(e)||e,s=S();return E(s[t])},q=e=>A(e).filter(d).length,ue=()=>U.filter(e=>!F.has(e.canonical)).map(e=>{let t=q(e.canonical);return{provider:e.canonical,count:t,hasKeys:t>0}}),H=async()=>{try{let{loadSettings:e}=await import("./settings-IZC7UDNU.js"),t=await e();return t&&t.activeKeyIndex||{}}catch{return{}}},Q=async e=>{try{let{loadSettings:t,saveSettings:s}=await import("./settings-IZC7UDNU.js"),n=await t();n.activeKeyIndex=e,await s(n)}catch{}},_=async e=>{let t=f(e)||e,n=(await H())[t];return Number.isInteger(n)?n:null},w=async(e,t)=>{let s=f(e)||e,n=await H();return n[s]=t,await Q(n),t},V=async()=>{try{let{loadSettings:e}=await import("./settings-IZC7UDNU.js"),t=await e();return t&&t.nullKeyProviders||{}}catch{return{}}},W=async e=>{try{let{loadSettings:t,saveSettings:s}=await import("./settings-IZC7UDNU.js"),n=await t();n.nullKeyProviders=e,await s(n)}catch{}},Z=new Set(["c_openai","Ollama"]),ee="__FLUX_NULL_KEY__",fe=e=>Z.has(f(e)||e),$=async e=>{let t=f(e)||e;return(await V())[t]===!0},P=async(e,t=!0)=>{let s=f(e)||e,n=await V();return t?n[s]=!0:delete n[s],await W(n),t===!0},x=new Map,de=(e,t,s=void 0)=>{let n=f(e)||e,o={key:t};s!==void 0&&(o.baseUrl=s),x.set(n,o)},pe=e=>{let t=f(e)||e;return x.get(t)||null},me=e=>x.has(f(e)||e),ye=()=>x.clear(),Ie=e=>x.delete(f(e)||e),O=null,xe=e=>{O=typeof e=="function"?e:null},te=e=>{try{O&&O(e)}catch{}},K=async()=>{try{let{loadSettings:e}=await import("./settings-IZC7UDNU.js"),t=await e();return t.systemSettings&&t.systemSettings.customOpenAIBaseUrl||""}catch{return""}},ge=async(e,t={})=>{let s=f(e)||e,n=t.silent===!0,o=x.get(s);if(o&&o.key)return o.key;if(await $(s))return ee;let i=A(s),r=await _(s);if(Number.isInteger(r)&&r>=0&&r<y&&d(i[r]))return I(i[r]);let a=i.findIndex(d);return a!==-1?(n||(await w(s,a),te(`No active key set for ${s}. Auto-selected slot ${a+1}.`)),I(i[a])):null},_e=async e=>{let t=f(e)||e;if(!h(t))return null;let s=x.get(t);if(s&&s.key)return s.baseUrl!==void 0?s.baseUrl:await K();if(await $(t))return await K();let n=A(t),o=await _(t);if(Number.isInteger(o)&&o>=0&&o<y){let r=n[o];if(r&&typeof r=="object"&&r.key)return r.baseUrl||""}let i=n.findIndex(d);if(i!==-1){let r=n[i];if(r&&typeof r=="object")return r.baseUrl||""}return await K()},R=async(e,t,s,n)=>{if(h(e)){let o=n!==void 0?n:s!==void 0?s:await K();return{key:t,baseUrl:o}}return t},X=e=>{let t=String(e||"").trim();if(!t)return{ok:!1,error:"URL is empty."};if(!/^https?:\/\/\S+$/i.test(t))return{ok:!1,error:"URL must start with http:// or https://"};let s=t.replace(/\/+$/,""),n=s.toLowerCase(),o=/(^|\/)v1$/.test(n),i=/(^|\/)v1\/chat\/completions$/.test(n);return!o&&!i?{ok:!1,error:"URL must end with /v1 or /v1/chat/completions"}:{ok:!0,url:s}},G=(e,t)=>{let s=String(t),n=[],o=[];return e.forEach((i,r)=>{let a=I(i);a&&(a===s?n.push(r):a.includes(s)&&o.push(r))}),n.length?n:o},he=async(e,t,s={})=>{let n=f(e)||e;if(!t||!String(t).trim())return{ok:!1,error:"Empty key."};let o=String(t).trim(),i;if(s.baseUrl!==void 0){if(!h(n))return{ok:!1,error:"--url is only supported for the custom provider."};let c=X(s.baseUrl);if(!c.ok)return{ok:!1,error:`Invalid URL: ${c.error}`};i=c.url}let r=S(),a=E(r[n]);if(a.some(c=>I(c)===o))return{ok:!1,error:`Key already exists in slot ${a.findIndex(l=>I(l)===o)+1}.`};if(Number.isInteger(s.index)){let c=s.index;if(c<0||c>=y)return{ok:!1,error:`Index must be between 1 and ${y}.`};let l=a[c]&&typeof a[c]=="object"?a[c].baseUrl:void 0;return a[c]=await R(n,o,l,i),r[n]=a,g(r),await P(n,!1),{ok:!0,index:c}}let u=a.findIndex(c=>!d(c));return u===-1?{ok:!1,error:"All slots full. Specify an index to overwrite.",full:!0}:(a[u]=await R(n,o,void 0,i),r[n]=a,g(r),await P(n,!1),{ok:!0,index:u})},we=async(e,t,s={})=>{let n=f(e)||e;if(!t||!String(t).trim())return{ok:!1,error:"Empty key."};let o=String(t).trim(),i;if(s.baseUrl!==void 0){if(!h(n))return{ok:!1,error:"Base URL is only supported for the custom provider."};let p=X(s.baseUrl);if(!p.ok)return{ok:!1,error:`Invalid URL: ${p.error}`};i=p.url}let r=S(),a=E(r[n]),u=await _(n),c=Number.isInteger(u)&&u>=0&&u<y&&d(a[u])?u:a.findIndex(d);c===-1&&(c=0);let l=a[c]&&typeof a[c]=="object"?a[c].baseUrl:void 0;return a[c]=await R(n,o,l,i),r[n]=a,g(r),await w(n,c),await P(n,!1),{ok:!0,index:c}},Ee=async(e,t,s={})=>{let n=f(e)||e,o=S(),i=E(o[n]);if(s.all||t==="--all"||t==="__all__")return o[n]=B(),g(o),await w(n,null),{ok:!0,all:!0,remaining:0,needsNewKey:!0};let r=-1;if(t==null){let l=await _(n);if(r=Number.isInteger(l)&&d(i[l])?l:i.findIndex(d),r===-1)return{ok:!1,error:"No keys to remove."}}else if(Number.isInteger(t)){if(r=t,r<0||r>=y)return{ok:!1,error:`Index must be between 1 and ${y}.`};if(!d(i[r]))return{ok:!1,error:`Slot ${r+1} is already empty.`}}else{let l=G(i,t);if(l.length===0)return{ok:!1,error:"No matching key found."};if(l.length>1)return{ok:!1,error:`Duplicate match (slots ${l.map(p=>p+1).join(", ")}). Be more specific.`};r=l[0]}let a=I(i[r]),u=await _(n)===r;i[r]=null,o[n]=i,g(o);let c=i.filter(d).length;if(u){let l=i.findIndex(d);await w(n,l===-1?null:l)}return{ok:!0,removed:a,removedIndex:r,remaining:c,needsNewKey:c===0}},Se=async(e,t)=>{let s=f(e)||e,n=A(s),o=-1;if(Number.isInteger(t)){if(o=t,o<0||o>=y)return{ok:!1,error:`Index must be between 1 and ${y}.`};if(!d(n[o]))return{ok:!1,error:`Slot ${o+1} is empty.`}}else{let r=G(n,t);if(r.length===0)return{ok:!1,error:"No matching key found."};if(r.length>1)return{ok:!1,error:`Duplicate match (slots ${r.map(a=>a+1).join(", ")}). Be more specific.`};o=r[0]}await w(s,o),await P(s,!1);let i=null;if(h(s)){let r=n[o],a=r&&typeof r=="object"&&r.baseUrl?r.baseUrl.trim():"";if(a)try{let{loadSettings:u,saveSettings:c}=await import("./settings-IZC7UDNU.js"),l=await u();if((l.systemSettings&&l.systemSettings.customOpenAIBaseUrl?l.systemSettings.customOpenAIBaseUrl.trim():"")!==a){let m={...l.systemSettings||{},customOpenAIBaseUrl:a,memory:!1};await c({...l,systemSettings:m}),i=a}}catch{}}return{ok:!0,index:o,key:I(n[o]),switchedBaseUrl:i}},ke=async(e=null)=>{let t=S(),s=e?[f(e)||e]:J(),n=0;for(let o of s){let i=E(t[o]),r=i.filter(d);if(r.length===0){t[o]=i;continue}let a=await _(o),u=Number.isInteger(a)&&d(i[a])?i[a]:null,c=B();r.forEach((p,m)=>{c[m]=p});let l=Number.isInteger(a)?a:null;if(u){let p=i.slice(0,y).map((m,N)=>({s:m,i:N})).filter(m=>d(m.s)).findIndex(m=>m.i===a);l=p===-1?null:p}t[o]=c,l!==a&&await w(o,l),n++}return g(t),{ok:!0,providers:s.length,touched:n}},j=e=>{if(!e)return"";let t=String(e),s=t.length;if(s<=3)return"...";let n=Math.floor(s/3),o=t.slice(0,n),i=t.slice(s-n);return o+"..."+i},ne=e=>{if(!e)return"";let t=String(e).replace(/\/+$/,"");return t.length<=28?t:"..."+t.replace(/^https?:\/\//i,"").slice(-24)},Ae=async(e,t={})=>{let s=t.unmask===!0,n=f(e)||e,o=A(n),i=await _(n),r=x.get(n),a=[];r&&r.key&&a.push(`Temporary: ${s?r.key:j(r.key)}`),await $(n)&&a.push("Mode: NO KEY (null) <- active");for(let u=0;u<y;u++){let c=o[u],l=I(c),p=l&&!s?j(l):l,m;if(!l)m="Empty";else if(h(n)){let M=c&&typeof c=="object"?ne(c.baseUrl):"";m=M?`${p} (Saved: ${M})`:p}else m=p;let N=u===i&&l?" \u2190 active":"";a.push(`${u+1}: ${m}${N}`)}return a};export{F as a,U as b,f as c,J as d,h as e,ie as f,ce as g,le as h,A as i,q as j,ue as k,_ as l,w as m,ee as n,fe as o,$ as p,P as q,de as r,pe as s,me as t,ye as u,Ie as v,xe as w,ge as x,_e as y,X as z,he as A,we as B,Ee as C,Se as D,ke as E,j as F,ne as G,Ae as H};
@@ -1,4 +1,4 @@
1
- import{a as Xs}from"./chunk-XPIXBWTZ.js";import{a as So}from"./chunk-BLAXTPPN.js";import{a as Dt}from"./chunk-56EJGQU3.js";import{a as Js}from"./chunk-L22YGL6T.js";import{c as Hi,g as ji,h as js,i as Ks,j as Vs}from"./chunk-KSP6QOQX.js";import{b as zs,c as qs,d as Ki,f as Ys}from"./chunk-UIL6OCU4.js";import{a as oi}from"./chunk-KOCMIEPK.js";import{a as D}from"./chunk-Y5JU726N.js";import{b as Hs}from"./chunk-3BRTFYTA.js";import{y as Wi}from"./chunk-WEDUYGPN.js";import{f as ni,l as Ct,o as Ui,p as dn,r as Gi}from"./chunk-DVXSU3Z4.js";import{b as ti}from"./chunk-KZCVQBDK.js";import{l as tt,m as ei}from"./chunk-I5LTKU2O.js";import{c as cn,d as Bi,e as Zo}from"./chunk-NTZSL2UT.js";import{a as _n,b as Jo,c as Bs,d as Gn,e as Ws,k as Qo,l as Ni,m as Us,r as Fi,w as wo,x as bo,y as Gs,z as ln}from"./chunk-YFIWMGCS.js";import{GoogleGenAI as ga,ThinkingLevel as Ye,HarmBlockThreshold as bi,HarmCategory as Si}from"@google/genai";var ii={xHigh:"Use minimal reasoning. Prefer simplest path; avoid branching; waste NO tokens overthinking",High:"Use minimal reasoning. Prefer simplest path; avoid branching; waste NO tokens overthinking",Medium:"Use minimal reasoning. Prefer simplest path; avoid branching; waste NO tokens overthinking",Minimal:"Use minimal reasoning. Prefer simplest path; avoid branching; waste NO tokens overthinking",Off:"NO thinking. Immediate response. Verify imports, tool results & system stability"};import Vt from"fs";import Kt from"path";import ja from"os";import fn from"fs";import In from"path";import dr from"fs";import Vi from"path";import{execSync as fr}from"child_process";import{fileURLToPath as Ua}from"url";var Qs=`# FluxFlow CLI Startup & Flags Reference
1
+ import{a as Xs}from"./chunk-XPIXBWTZ.js";import{a as So}from"./chunk-BLAXTPPN.js";import{a as Dt}from"./chunk-56EJGQU3.js";import{a as Js}from"./chunk-L22YGL6T.js";import{c as Hi,g as ji,h as js,i as Ks,j as Vs}from"./chunk-KIPZOUEA.js";import{b as zs,c as qs,d as Ki,f as Ys}from"./chunk-BNKY5QOA.js";import{a as oi}from"./chunk-KOCMIEPK.js";import{a as D}from"./chunk-Y5JU726N.js";import{b as Hs}from"./chunk-25EUCCH5.js";import{y as Wi}from"./chunk-7CCULUZN.js";import{f as ni,l as Ct,o as Ui,p as dn,r as Gi}from"./chunk-XAPXZ6KO.js";import{b as ti}from"./chunk-UMS5SEYB.js";import{l as tt,m as ei}from"./chunk-75OCC24T.js";import{c as cn,d as Bi,e as Zo}from"./chunk-NTZSL2UT.js";import{a as _n,b as Jo,c as Bs,d as Gn,e as Ws,k as Qo,l as Ni,m as Us,r as Fi,w as wo,x as bo,y as Gs,z as ln}from"./chunk-YFIWMGCS.js";import{GoogleGenAI as ga,ThinkingLevel as Ye,HarmBlockThreshold as bi,HarmCategory as Si}from"@google/genai";var ii={xHigh:"Use minimal reasoning. Prefer simplest path; avoid branching; waste NO tokens overthinking",High:"Use minimal reasoning. Prefer simplest path; avoid branching; waste NO tokens overthinking",Medium:"Use minimal reasoning. Prefer simplest path; avoid branching; waste NO tokens overthinking",Minimal:"Use minimal reasoning. Prefer simplest path; avoid branching; waste NO tokens overthinking",Off:"NO thinking. Immediate response. Verify imports, tool results & system stability"};import Vt from"fs";import Kt from"path";import ja from"os";import fn from"fs";import In from"path";import dr from"fs";import Vi from"path";import{execSync as fr}from"child_process";import{fileURLToPath as Ua}from"url";var Qs=`# FluxFlow CLI Startup & Flags Reference
2
2
 
3
3
  Launch command syntax:
4
4
  fluxflow [options]
@@ -85,7 +85,7 @@ Trigger in chat via /command
85
85
  * /settings \u2192 Full-screen interactive settings menu
86
86
  * /mode \u2192 Toggle Operating Mode
87
87
  * /display index \u2192 Select active screen for Computer Use mode
88
- * /model model-id --flags \u2192 Flags optional to customize list (--save, --remove, --default, /model old-model new-model --rename, --info "IN price, OUT price, CR price, CW price"). Info let user enter API prices for use/budget in fluxflow. --info 0 to reset, --info "metric price" to update. CR = Cache Read, CW = Cache Write. 0 default
88
+ * /model model-id --flags \u2192 Flags optional to customize list (--save, --remove, --default, /model old-model new-model --rename, --price/-p "IN price, OUT price, CR price, CW price"). Price lets user enter API prices for use/budget in fluxflow. --price 0 to reset, --price "metric price" to update. CR = Cache Read, CW = Cache Write. 0 default
89
89
  * /provider \u2192 Switch AI provider
90
90
  * /thinking effort \u2192 Set reasoning effort. Can be mapped based on provider & model support (/thinking effort --map provider-effort-value/'rm' to unmap). Changes the Translation Table only for the currently selected provider and model
91
91
  * /wildcard-tooling \u2192 Tool compatibility mode for non-tooling models
@@ -457,7 +457,7 @@ Public Docs: https://fluxflow-cli.onrender.com
457
457
  Default Context Length: 256k Tokens. Can be changed via ENV/In-app Settings \u2192 references/{SETTINGS,ENV}.md
458
458
 
459
459
  Docs missing required info? Say you are not sure enough to answer. Dont give wrong info`,"references/MODES.md":ar,"references/PROVIDERS.md":lr,"references/PLUGINS.md":cr,"references/STARTUP.md":Qs,"references/ENV.md":Zs,"references/COMMANDS.md":er,"references/SETTINGS.md":tr,"references/TOOLS.md":nr,"references/ARCHITECTURE.md":or,"references/SUB_AGENTS.md":ir,"references/SECURITY.md":sr,"references/IDE.md":rr};var ur=()=>{try{let e=In.join(_n,"skills","fluxflow"),n=In.join(e,"references");if(process.env.NO_DEV==="true"||process.env.NO_DEV==="1"||process.env.NO_DEV===!0||process.env.NO_INS==="true"||process.env.NO_INS==="1"||process.env.NO_INS==="true"||!1){fn.existsSync(e)&&fn.rmSync(e,{recursive:!0,force:!0});return}let i=new Set(Object.keys(zi).map(o=>In.normalize(o)));for(let[o,r]of Object.entries(zi)){let d=In.join(e,o),l=In.dirname(d);fn.existsSync(l)||fn.mkdirSync(l,{recursive:!0});let u=r.trim()+`
460
- `,g=null;fn.existsSync(d)&&(g=fn.readFileSync(d,"utf8")),g!==u&&fn.writeFileSync(d,u,"utf8")}if(fn.existsSync(n)){let o=fn.readdirSync(n);for(let r of o){let d=In.normalize(In.join("references",r));if(!i.has(d)){let l=In.join(n,r);try{fn.rmSync(l,{recursive:!0,force:!0})}catch{}}}}}catch{}};import{WebSocket as ri}from"ws";var Mt=null,io=!1,Ga="ws://localhost:56832",qi=[],so=null,Yi=null,Xi=null,gr="2.0.0",wc=e=>{gr=e,mr()},Ji=e=>{Yi=e},bc=e=>{Xi=e},mr=()=>{if(Mt||io)return;io=!0;let e=new ri(Ga);e.on("open",()=>{for(Mt=e,io=!1,Mt.send(JSON.stringify({command:"version",version:gr,pid:process.pid,ppid:process.ppid,cwd:process.cwd()}));qi.length>0;)Mt.send(JSON.stringify(qi.shift()))}),e.on("message",n=>{try{let t=JSON.parse(n.toString());t.command==="contextResponse"&&so?(so(t.data),so=null):t.command==="securityResponse"&&Yi?Yi(t.result):t.command==="inlineComplete"?Ha(t):t.command==="connectionRejected"&&Xi&&Xi(t)}catch{}}),e.on("error",()=>{io=!1,Mt=null}),e.on("close",()=>{io=!1,Mt=null})},ko=e=>{Mt&&Mt.readyState===ri.OPEN?Mt.send(JSON.stringify(e)):(qi.push(e),io||mr())},ro=()=>Mt!==null&&Mt.readyState===ri.OPEN,Ha=async e=>{let n="";try{let{generateAutoCompletion:t}=await import("./auto_completion-CJNBFI3A.js");n=await t({prefix:e.prefix||"",suffix:e.suffix||"",fileName:e.fileName||"",language:e.language||"",recentChanges:e.recentChanges||"",clipboard:e.clipboard||""})}catch{n=""}ko({command:"inlineCompleteResponse",requestId:e.requestId,completion:n||""})},Sc=e=>{ko({command:"status",status:e})},Hn=()=>new Promise(e=>{if(!Mt||Mt.readyState!==ri.OPEN){e({cursor_line:0,selected:0,manual_edits:"",file_focused:"none",opened_editors:[]});return}so=e,Mt.send(JSON.stringify({command:"requestContext"})),setTimeout(()=>{so===e&&(e({cursor_line:0,selected:0,manual_edits:"",file_focused:"none",opened_editors:[]}),so=null)},1e3)}),pr=e=>{let{resolvedPath:n}=ln(e);ko({command:"open",filePath:n})},Qi=(e,n,t)=>{let{resolvedPath:i}=ln(e);ko({command:"showDiff",filePath:i,originalContent:n,modifiedContent:t})},hr=(e,n)=>{let{resolvedPath:t}=ln(e);ko({command:"closeDiff",filePath:t,result:n})};var _o=(e,n)=>{try{if(!Vt.existsSync(e))return null;let t=Array.isArray(n)?n.map(o=>o.toLowerCase()):[n.toLowerCase()],i=Vt.readdirSync(e);for(let o of t){let r=i.find(d=>d.toLowerCase()===o);if(r){let d=Kt.join(e,r);if(Vt.statSync(d).isFile())return d}}}catch{}return null},os=(e,n)=>{let t=_o(e,n);if(t)try{return Vt.readFileSync(t,"utf8")}catch{}return""},yr=new Set([".git","node_modules",".gemini","dist","build",".next","out",".cache","bin","obj","vendor","venv",".idea",".gradle",".terraform","target","coverage",".vscode",".svn",".hg",".fslckout",".github",".gitlab",".circleci",".gitea",".gitee",".lerna",".changeset",".nx",".npm",".yarn",".pnpm-store",".pnpm",".expo",".nuxt",".svelte-kit",".docusaurus",".turbo",".vercel","bower_components",".netlify",".vuepress",".quasar",".output",".angular","jspm_packages",".parcel-cache",".rollup.cache",".rspack",".vitepress","__pycache__",".pytest_cache",".mypy_cache",".tox",".poetry","env","vhdl",".ipynb_checkpoints",".jupyter",".conda",".pdm-build",".bundle",".yardoc",".metadata","App_Data","ClientBin",".cargo",".rustc_info",".go","Godeps","_vendor",".rake_tasks","CMakefiles",".wakatime",".dart_tool",".fvm",".cocoapods","Pods",".pub-cache",".symlinks","DerivedData",".xcworkspace",".serverless",".aws",".gcloud",".azure",".kube",".vagrant",".docker","postgres-data","redis-data","mongo-data",".Spotlight-V100",".Trashes","$RECYCLE.BIN","System Volume Information",".DocumentRevisions-V100",".fseventsd","AppData","Application Data","Local","LocalLow","Roaming","$WinREAgent","$WINDOWS.~BT","$WINDOWS.~WS","scw","System32","SysWOW64",".AppleDouble",".AppleDB",".AppleDesktop","_CodeSignature",".cmio",".LSOverride",".localized",".TemporaryItems",".Trash",".Trash-0",".Trash-1000",".gvfs",".local",".config",".dbus",".fontconfig",".snap",".var",".lost+found","lost+found",".thumb",".thumbnails","EFI","boot","grub","logs","log",".nyc_output",".sonar",".ruff_cache",".VSCodeCounter",".skills","skills"]),is=(e=process.cwd(),n=0,t=8)=>{let i=[];if(n>t)return i;try{if(!Vt.existsSync(e))return i;let o=Vt.readdirSync(e,{withFileTypes:!0});for(let r of o){let d=r.name,l=Kt.join(e,d);if(r.isDirectory())!yr.has(d)&&!yr.has(d.toLowerCase())&&i.push(...is(l,n+1,t));else if(r.isFile()){let u=d.toLowerCase();(u==="agents.md"||u==="agent.md")&&i.push(l)}}}catch{}return i},xr=(e,n=2)=>{if(!e)return"";let t=" ".repeat(n);return e.split(/\r?\n/).map(i=>t+i).join(`
460
+ `,g=null;fn.existsSync(d)&&(g=fn.readFileSync(d,"utf8")),g!==u&&fn.writeFileSync(d,u,"utf8")}if(fn.existsSync(n)){let o=fn.readdirSync(n);for(let r of o){let d=In.normalize(In.join("references",r));if(!i.has(d)){let l=In.join(n,r);try{fn.rmSync(l,{recursive:!0,force:!0})}catch{}}}}}catch{}};import{WebSocket as ri}from"ws";var Mt=null,io=!1,Ga="ws://localhost:56832",qi=[],so=null,Yi=null,Xi=null,gr="2.0.0",wc=e=>{gr=e,mr()},Ji=e=>{Yi=e},bc=e=>{Xi=e},mr=()=>{if(Mt||io)return;io=!0;let e=new ri(Ga);e.on("open",()=>{for(Mt=e,io=!1,Mt.send(JSON.stringify({command:"version",version:gr,pid:process.pid,ppid:process.ppid,cwd:process.cwd()}));qi.length>0;)Mt.send(JSON.stringify(qi.shift()))}),e.on("message",n=>{try{let t=JSON.parse(n.toString());t.command==="contextResponse"&&so?(so(t.data),so=null):t.command==="securityResponse"&&Yi?Yi(t.result):t.command==="inlineComplete"?Ha(t):t.command==="connectionRejected"&&Xi&&Xi(t)}catch{}}),e.on("error",()=>{io=!1,Mt=null}),e.on("close",()=>{io=!1,Mt=null})},ko=e=>{Mt&&Mt.readyState===ri.OPEN?Mt.send(JSON.stringify(e)):(qi.push(e),io||mr())},ro=()=>Mt!==null&&Mt.readyState===ri.OPEN,Ha=async e=>{let n="";try{let{generateAutoCompletion:t}=await import("./auto_completion-I2GVIND6.js");n=await t({prefix:e.prefix||"",suffix:e.suffix||"",fileName:e.fileName||"",language:e.language||"",recentChanges:e.recentChanges||"",clipboard:e.clipboard||""})}catch{n=""}ko({command:"inlineCompleteResponse",requestId:e.requestId,completion:n||""})},Sc=e=>{ko({command:"status",status:e})},Hn=()=>new Promise(e=>{if(!Mt||Mt.readyState!==ri.OPEN){e({cursor_line:0,selected:0,manual_edits:"",file_focused:"none",opened_editors:[]});return}so=e,Mt.send(JSON.stringify({command:"requestContext"})),setTimeout(()=>{so===e&&(e({cursor_line:0,selected:0,manual_edits:"",file_focused:"none",opened_editors:[]}),so=null)},1e3)}),pr=e=>{let{resolvedPath:n}=ln(e);ko({command:"open",filePath:n})},Qi=(e,n,t)=>{let{resolvedPath:i}=ln(e);ko({command:"showDiff",filePath:i,originalContent:n,modifiedContent:t})},hr=(e,n)=>{let{resolvedPath:t}=ln(e);ko({command:"closeDiff",filePath:t,result:n})};var _o=(e,n)=>{try{if(!Vt.existsSync(e))return null;let t=Array.isArray(n)?n.map(o=>o.toLowerCase()):[n.toLowerCase()],i=Vt.readdirSync(e);for(let o of t){let r=i.find(d=>d.toLowerCase()===o);if(r){let d=Kt.join(e,r);if(Vt.statSync(d).isFile())return d}}}catch{}return null},os=(e,n)=>{let t=_o(e,n);if(t)try{return Vt.readFileSync(t,"utf8")}catch{}return""},yr=new Set([".git","node_modules",".gemini","dist","build",".next","out",".cache","bin","obj","vendor","venv",".idea",".gradle",".terraform","target","coverage",".vscode",".svn",".hg",".fslckout",".github",".gitlab",".circleci",".gitea",".gitee",".lerna",".changeset",".nx",".npm",".yarn",".pnpm-store",".pnpm",".expo",".nuxt",".svelte-kit",".docusaurus",".turbo",".vercel","bower_components",".netlify",".vuepress",".quasar",".output",".angular","jspm_packages",".parcel-cache",".rollup.cache",".rspack",".vitepress","__pycache__",".pytest_cache",".mypy_cache",".tox",".poetry","env","vhdl",".ipynb_checkpoints",".jupyter",".conda",".pdm-build",".bundle",".yardoc",".metadata","App_Data","ClientBin",".cargo",".rustc_info",".go","Godeps","_vendor",".rake_tasks","CMakefiles",".wakatime",".dart_tool",".fvm",".cocoapods","Pods",".pub-cache",".symlinks","DerivedData",".xcworkspace",".serverless",".aws",".gcloud",".azure",".kube",".vagrant",".docker","postgres-data","redis-data","mongo-data",".Spotlight-V100",".Trashes","$RECYCLE.BIN","System Volume Information",".DocumentRevisions-V100",".fseventsd","AppData","Application Data","Local","LocalLow","Roaming","$WinREAgent","$WINDOWS.~BT","$WINDOWS.~WS","scw","System32","SysWOW64",".AppleDouble",".AppleDB",".AppleDesktop","_CodeSignature",".cmio",".LSOverride",".localized",".TemporaryItems",".Trash",".Trash-0",".Trash-1000",".gvfs",".local",".config",".dbus",".fontconfig",".snap",".var",".lost+found","lost+found",".thumb",".thumbnails","EFI","boot","grub","logs","log",".nyc_output",".sonar",".ruff_cache",".VSCodeCounter",".skills","skills"]),is=(e=process.cwd(),n=0,t=8)=>{let i=[];if(n>t)return i;try{if(!Vt.existsSync(e))return i;let o=Vt.readdirSync(e,{withFileTypes:!0});for(let r of o){let d=r.name,l=Kt.join(e,d);if(r.isDirectory())!yr.has(d)&&!yr.has(d.toLowerCase())&&i.push(...is(l,n+1,t));else if(r.isFile()){let u=d.toLowerCase();(u==="agents.md"||u==="agent.md")&&i.push(l)}}}catch{}return i},xr=(e,n=2)=>{if(!e)return"";let t=" ".repeat(n);return e.split(/\r?\n/).map(i=>t+i).join(`
461
461
  `)},Tr=()=>_o(_n,["agents.md","agent.md"]),Ar=()=>_o(process.cwd(),["agents.md","agent.md"]),Cr=()=>_o(_n,["fluxflow.md"]),vr=()=>_o(process.cwd(),["fluxflow.md"]),Ao=Tr(),ai=Ar(),un=is(),Co=Cr(),vo=vr(),wr=null,ns="",Rr=!1,Ka=e=>{if(!e||!/^<<<[\s\S]*?Identity:/m.test(e))return e;let n=e.match(/^<<<\s*\r?\n([\s\S]*?)\r?\n>>>\s*(?:\r?\n)?([\s\S]*)$/);if(!n)return e;let t=n[1],i=n[2],o=t.match(/^Identity:\s*([\s\S]*?)(?=\r?\n\s*(?:<><|>>>)|$)/m);return o&&(ns=o[1].trim(),process.env.NO_INS=!0),/<><\s*NO_INS/.test(t)&&(Rr=!0),i.trim()},Va=()=>{Ao=Tr();let e=Ao?os(_n,["agents.md","agent.md"]).trim():"";return e.length===0?(Ao=null,""):e},za=()=>{if(un=is(),ai=Ar(),!un||un.length===0)return"";let e=process.cwd(),n=[...un].sort((o,r)=>{let d=Kt.relative(e,o).replace(/\\/g,"/"),l=Kt.relative(e,r).replace(/\\/g,"/"),u=!d.includes("/"),g=!l.includes("/");return u&&!g?-1:!u&&g?1:d.localeCompare(l)}),t=[],i=[];for(let o of n)try{let r=Vt.readFileSync(o,"utf8").trim();if(!r||r.length===0)continue;t.push(o);let d=Kt.relative(e,o).replace(/\\/g,"/");if(!d.includes("/"))i.push(xr(r,2));else{let u=Kt.dirname(d)+"/:";i.push(`${u}
462
462
  ${xr(r,2)}`)}}catch{}return un=t,un.length===0&&(ai=null),i.join(`
463
463
 
@@ -526,7 +526,7 @@ ${Zi}
526
526
  `:""}${es.length>0&&t.toLowerCase().includes("flux")?`-- Project Skills --
527
527
  ${es}
528
528
 
529
- `:""}`.trim()};var Or=()=>import("./web_search-C3WKDOSZ.js").then(e=>e.web_search),Dr=()=>import("./web_scrape-MVSCRDKO.js").then(e=>e.web_scrape),Nr=()=>import("./memory-AT7ARTG3.js").then(e=>e.memory),Fr=()=>import("./chat-OYRESDTX.js").then(e=>e.chat),Br=()=>import("./view_file-OYV2IEYG.js").then(e=>e.view_file),Wr=()=>import("./write_file-Q4K4LZFU.js").then(e=>e.write_file),Ur=()=>import("./update_file-BN6X5WNO.js").then(e=>e.update_file),Gr=()=>import("./exec_command-6V5SM6WI.js").then(e=>e.exec_command),Hr=()=>import("./read_folder-UWFC5DNX.js").then(e=>e.read_folder),ls=()=>import("./ask_user-K2DLZF6H.js").then(e=>e.ask_user),jr=()=>import("./write_pdf-5HOQYVQO.js").then(e=>e.write_pdf),Kr=()=>import("./write_docx-QGW25TF7.js").then(e=>e.write_docx),fi=()=>import("./search_keyword-HR6JNLS2.js").then(e=>e.search_keyword),Vr=()=>import("./generate_image-OOU2MEIQ.js").then(e=>e.generate_image),ui=()=>import("./saveSummary-ZJDPCZSR.js").then(e=>e.saveSummary),Io=()=>import("./addMemScore-VUSJ2Q64.js").then(e=>e.addMemScore),zr=()=>import("./file_map-K6JQYV35.js").then(e=>e.file_map),gi=()=>import("./todo-YFLPXYFL.js").then(e=>e.todo),qr=()=>import("./invokeSync-Z2OWSYC7.js").then(e=>e.invokeSync),Qa=()=>import("./invoke-DPVPIREI.js").then(e=>e.invoke),Yr=()=>import("./getProgress-J34K43Y7.js").then(e=>e.getProgress),Za=()=>import("./cancel-F3ZOEBKW.js").then(e=>e.cancel),Xr=()=>import("./emergency_rollback-LC4ZBOLP.js").then(e=>e.emergency_rollback),Mo=()=>import("./awaitSubagent-JKQ2EHVY.js").then(e=>e.awaitSubagent),Po=()=>import("./answerSubagent-BPNNJXPC.js").then(e=>e.answerSubagent),mi=()=>import("./steerSubagent-UETXH2CB.js").then(e=>e.steerSubagent),pi=()=>import("./computer_action-KUJCPYPN.js").then(e=>e.computer_action),Jr=()=>import("./click-ES2QYPC4.js").then(e=>e.click),Qr=()=>import("./drag-U3DNSM33.js").then(e=>e.drag),Zr=()=>import("./scroll-SFUGXJQR.js").then(e=>e.scroll),cs=()=>import("./keyboard_typing-Y2OBDZDW.js").then(e=>e.keyboard_typing),ds=()=>import("./key_press-5T4RCRQQ.js").then(e=>e.key_press),fs=()=>import("./recapture_screen-CQ3Z5FOL.js").then(e=>e.recapture_screen),hi=()=>import("./find_file-5RUNVQJO.js").then(e=>e.find_file),ea=()=>import("./wait-TJR6LAR4.js").then(e=>e.wait),ta={web_search:Or,web_scrape:Dr,memory:Nr,chat:Fr,view_file:Br,write_file:Wr,update_file:Ur,exec_command:Gr,read_folder:Hr,write_pdf:jr,write_docx:Kr,search_keyword:fi,generate_image:Vr,saveSummary:ui,addMemScore:Io,file_map:zr,todo:gi,Todo:gi,goal:gi,Goal:gi,invokeSync:qr,invoke:Qa,getProgress:Yr,cancel:Za,awaitSubagent:Mo,answerSubagent:Po,steerSubagent:mi,computer_action:pi,computer_use:pi,ComputerAction:pi,ComputerUse:pi,click:Jr,Click:Jr,drag:Qr,Drag:Qr,scroll:Zr,Scroll:Zr,keyboard_typing:cs,KeyboardTyping:cs,keyboardtyping:cs,key_press:ds,KeyPress:ds,keypress:ds,recapture_screen:fs,RecaptureScreen:fs,recapturescreen:fs,invoke_sync:qr,get_progress:Yr,await_subagent:Mo,answer_subagent:Po,steer_subagent:mi,steer:mi,Steer:mi,ask:ls,Ask:ls,AskUser:ls,WebSearch:Or,WebScrape:Dr,ReadFile:Br,ReadFolder:Hr,WriteFile:Wr,PatchFile:Ur,WritePDF:jr,WriteDoc:Kr,Run:Gr,SearchKeyword:fi,CodeSearch:fi,code_search:fi,Memory:Nr,Chat:Fr,GenerateImage:Vr,saveSumary:ui,SaveSummary:ui,SaveSumary:ui,add_mem_score:Io,AddMemScore:Io,addMemoryScore:Io,AddMemoryScore:Io,FileMap:zr,answer:Po,Answer:Po,AnswerSubagent:Po,await:Mo,Await:Mo,AwaitSubagent:Mo,EmergencyRollback:Xr,emergency_rollback:Xr,find_file:hi,findFile:hi,FindFile:hi,findfile:hi,wait:ea,Wait:ea},us=async(e,n,t={})=>{let i=t.mode?t.mode.toLowerCase():"flux",o=e.toLowerCase(),d=["memory","chat","savesummary","addmemscore","add_mem_score","ask","web_search","web_scrape","await","wait"].some(h=>o.includes(h))||o==="ask",u=["click","drag","scroll","keyboardtyping","keyboard_typing","keypress","key_press","recapturescreen","recapture_screen","computer","wait"].some(h=>o.includes(h));if(!d){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 g=ta[e];if(!g){let h=["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"],m={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"},p=o.replace(/[^a-z0-9]/g,""),s=m[p]||null;if(!s){let _=0,$e=N=>{let P=new Set;for(let V=0;V<N.length-1;V++)P.add(N.slice(V,V+2));return P},v=$e(p);for(let N of h){let P=N.toLowerCase().replace(/[^a-z0-9]/g,"");if(p===P){s=N;break}let V=0;(P.includes(p)||p.includes(P))&&(V+=.6);let M=$e(P),$=0;for(let ve of v)M.has(ve)&&$++;let ye=2*$/(v.size+M.size||1);V=Math.max(V,ye),V>_&&V>=.35&&(_=V,s=N)}}let w=s?` Do you mean '${s}'?`:"";return`ERROR: Action [${e}] not found in registry.${w}`}try{return await(await g())(n,t)}catch(h){let m=h instanceof Error?h.message:String(h);return`ERROR: Execution failed for [${e}]: ${m}`}};var yi=e=>{if(!e||typeof e!="string")return!1;let n=e.trim().toLowerCase();return Object.keys(ta).some(t=>t.toLowerCase()===n)};import J from"path";import Ce from"fs";import{execSync as xs}from"child_process";import el from"gradient-string";var na=["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 oa=["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 ia=[{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"]}],ao={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:"#3a1414",diffAdditionHighlightColor:"#33ff66",diffAdditionHighlightBg:"#143a14",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:"#f5d0d0",diffAdditionHighlightColor:"#004000",diffAdditionHighlightBg:"#cceccc",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 xi=null;var wi=(e="Dark")=>{let n;e==="Mystery"||e==="Chaos"?(xi||(xi=ia[Math.floor(Math.random()*ia.length)]),n={...xi,id:"Mystery"}):(xi=null,ao[e]?n=ao[e]:e==="Halloween"?n=ao.Spookfest:e==="GitHub"?n=ao["GitHub Dark"]:e==="Transparent"?n=ao["Transparent Dark"]:n=ao.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 tl=()=>process.env.TERM_PROGRAM==="vscode"?"vscode":process.env.WT_SESSION?"wt":"default",Jc=(e=2)=>{let n=tl();return n==="wt"?" ".repeat(Math.max(1,e-1)):" ".repeat(e)},sa=new Date,$o=sa.getMonth(),Lo=sa.getDate(),nl=$o===9&&Lo>=15||$o===10&&Lo<=1,gs=null;(process.env.SPOOKFEST==="true"||nl)&&(gs=await import("./halloween-MX3VNQRW.js"));var Qc=(e="...",n="Loading...",t="Dark")=>{let i=wi(t),o=n;if(n==="c_openai"||n==="Custom (OpenAI)")try{let V=Zo(Jo,{})?.systemSettings?.customOpenAIBaseUrl;V&&(o=V)}catch{}let r=i.logoTextAnsi,d=i.logoBodyAnsi,l=i.logoMutedAnsi,u="\x1B[0m",g=[" \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 "],h=t==="Spookfest"||i.id==="Spookfest"||t==="Halloween"||i.id==="Halloween",m=$o===9&&Lo>=15||$o===10&&Lo<=1,p=h&&m||process.env.SPOOKFEST==="true"&&h,s=g;if(p&&gs){process.env.HALLOWEEN_EEGG="true";let{halloweenArtSide:P,halloweenBat:V,halloweenArtUser:M}=gs;s=Math.random()>.9&&$o===9&&Lo>=30?V:Math.random()>.5?P:M}else process.env.HALLOWEEN_EEGG="false";let w=p?oa:na,_=w[Math.floor(Math.random()*w.length)],$e=i.logoGradient||["#0077ff","#ff00ff"],v=el($e).multiline(s.join(`
529
+ `:""}`.trim()};var Or=()=>import("./web_search-C3WKDOSZ.js").then(e=>e.web_search),Dr=()=>import("./web_scrape-MVSCRDKO.js").then(e=>e.web_scrape),Nr=()=>import("./memory-AT7ARTG3.js").then(e=>e.memory),Fr=()=>import("./chat-OYRESDTX.js").then(e=>e.chat),Br=()=>import("./view_file-OYV2IEYG.js").then(e=>e.view_file),Wr=()=>import("./write_file-WX4O436W.js").then(e=>e.write_file),Ur=()=>import("./update_file-CH6YILXO.js").then(e=>e.update_file),Gr=()=>import("./exec_command-SQB5LU5X.js").then(e=>e.exec_command),Hr=()=>import("./read_folder-UWFC5DNX.js").then(e=>e.read_folder),ls=()=>import("./ask_user-K2DLZF6H.js").then(e=>e.ask_user),jr=()=>import("./write_pdf-5HOQYVQO.js").then(e=>e.write_pdf),Kr=()=>import("./write_docx-QGW25TF7.js").then(e=>e.write_docx),fi=()=>import("./search_keyword-IRLPX555.js").then(e=>e.search_keyword),Vr=()=>import("./generate_image-7UBJ3ODS.js").then(e=>e.generate_image),ui=()=>import("./saveSummary-ZJDPCZSR.js").then(e=>e.saveSummary),Io=()=>import("./addMemScore-VUSJ2Q64.js").then(e=>e.addMemScore),zr=()=>import("./file_map-K6JQYV35.js").then(e=>e.file_map),gi=()=>import("./todo-YFLPXYFL.js").then(e=>e.todo),qr=()=>import("./invokeSync-EUHHQZ2H.js").then(e=>e.invokeSync),Qa=()=>import("./invoke-IXWW3N4C.js").then(e=>e.invoke),Yr=()=>import("./getProgress-J34K43Y7.js").then(e=>e.getProgress),Za=()=>import("./cancel-F3ZOEBKW.js").then(e=>e.cancel),Xr=()=>import("./emergency_rollback-LC4ZBOLP.js").then(e=>e.emergency_rollback),Mo=()=>import("./awaitSubagent-JKQ2EHVY.js").then(e=>e.awaitSubagent),Po=()=>import("./answerSubagent-BPNNJXPC.js").then(e=>e.answerSubagent),mi=()=>import("./steerSubagent-UETXH2CB.js").then(e=>e.steerSubagent),pi=()=>import("./computer_action-6RHVNLZG.js").then(e=>e.computer_action),Jr=()=>import("./click-3BB6KDIJ.js").then(e=>e.click),Qr=()=>import("./drag-ZGNVQGXW.js").then(e=>e.drag),Zr=()=>import("./scroll-XBXSN2EF.js").then(e=>e.scroll),cs=()=>import("./keyboard_typing-DJ3HHTO7.js").then(e=>e.keyboard_typing),ds=()=>import("./key_press-LO75QEJK.js").then(e=>e.key_press),fs=()=>import("./recapture_screen-LONV6G4U.js").then(e=>e.recapture_screen),hi=()=>import("./find_file-5RUNVQJO.js").then(e=>e.find_file),ea=()=>import("./wait-TJR6LAR4.js").then(e=>e.wait),ta={web_search:Or,web_scrape:Dr,memory:Nr,chat:Fr,view_file:Br,write_file:Wr,update_file:Ur,exec_command:Gr,read_folder:Hr,write_pdf:jr,write_docx:Kr,search_keyword:fi,generate_image:Vr,saveSummary:ui,addMemScore:Io,file_map:zr,todo:gi,Todo:gi,goal:gi,Goal:gi,invokeSync:qr,invoke:Qa,getProgress:Yr,cancel:Za,awaitSubagent:Mo,answerSubagent:Po,steerSubagent:mi,computer_action:pi,computer_use:pi,ComputerAction:pi,ComputerUse:pi,click:Jr,Click:Jr,drag:Qr,Drag:Qr,scroll:Zr,Scroll:Zr,keyboard_typing:cs,KeyboardTyping:cs,keyboardtyping:cs,key_press:ds,KeyPress:ds,keypress:ds,recapture_screen:fs,RecaptureScreen:fs,recapturescreen:fs,invoke_sync:qr,get_progress:Yr,await_subagent:Mo,answer_subagent:Po,steer_subagent:mi,steer:mi,Steer:mi,ask:ls,Ask:ls,AskUser:ls,WebSearch:Or,WebScrape:Dr,ReadFile:Br,ReadFolder:Hr,WriteFile:Wr,PatchFile:Ur,WritePDF:jr,WriteDoc:Kr,Run:Gr,SearchKeyword:fi,CodeSearch:fi,code_search:fi,Memory:Nr,Chat:Fr,GenerateImage:Vr,saveSumary:ui,SaveSummary:ui,SaveSumary:ui,add_mem_score:Io,AddMemScore:Io,addMemoryScore:Io,AddMemoryScore:Io,FileMap:zr,answer:Po,Answer:Po,AnswerSubagent:Po,await:Mo,Await:Mo,AwaitSubagent:Mo,EmergencyRollback:Xr,emergency_rollback:Xr,find_file:hi,findFile:hi,FindFile:hi,findfile:hi,wait:ea,Wait:ea},us=async(e,n,t={})=>{let i=t.mode?t.mode.toLowerCase():"flux",o=e.toLowerCase(),d=["memory","chat","savesummary","addmemscore","add_mem_score","ask","web_search","web_scrape","await","wait"].some(h=>o.includes(h))||o==="ask",u=["click","drag","scroll","keyboardtyping","keyboard_typing","keypress","key_press","recapturescreen","recapture_screen","computer","wait"].some(h=>o.includes(h));if(!d){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 g=ta[e];if(!g){let h=["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"],m={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"},p=o.replace(/[^a-z0-9]/g,""),s=m[p]||null;if(!s){let _=0,$e=N=>{let P=new Set;for(let V=0;V<N.length-1;V++)P.add(N.slice(V,V+2));return P},v=$e(p);for(let N of h){let P=N.toLowerCase().replace(/[^a-z0-9]/g,"");if(p===P){s=N;break}let V=0;(P.includes(p)||p.includes(P))&&(V+=.6);let M=$e(P),$=0;for(let ve of v)M.has(ve)&&$++;let ye=2*$/(v.size+M.size||1);V=Math.max(V,ye),V>_&&V>=.35&&(_=V,s=N)}}let w=s?` Do you mean '${s}'?`:"";return`ERROR: Action [${e}] not found in registry.${w}`}try{return await(await g())(n,t)}catch(h){let m=h instanceof Error?h.message:String(h);return`ERROR: Execution failed for [${e}]: ${m}`}};var yi=e=>{if(!e||typeof e!="string")return!1;let n=e.trim().toLowerCase();return Object.keys(ta).some(t=>t.toLowerCase()===n)};import J from"path";import Ce from"fs";import{execSync as xs}from"child_process";import el from"gradient-string";var na=["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 oa=["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 ia=[{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"]}],ao={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:"#3a1414",diffAdditionHighlightColor:"#33ff66",diffAdditionHighlightBg:"#143a14",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:"#f5d0d0",diffAdditionHighlightColor:"#004000",diffAdditionHighlightBg:"#cceccc",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 xi=null;var wi=(e="Dark")=>{let n;e==="Mystery"||e==="Chaos"?(xi||(xi=ia[Math.floor(Math.random()*ia.length)]),n={...xi,id:"Mystery"}):(xi=null,ao[e]?n=ao[e]:e==="Halloween"?n=ao.Spookfest:e==="GitHub"?n=ao["GitHub Dark"]:e==="Transparent"?n=ao["Transparent Dark"]:n=ao.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 tl=()=>process.env.TERM_PROGRAM==="vscode"?"vscode":process.env.WT_SESSION?"wt":"default",Jc=(e=2)=>{let n=tl();return n==="wt"?" ".repeat(Math.max(1,e-1)):" ".repeat(e)},sa=new Date,$o=sa.getMonth(),Lo=sa.getDate(),nl=$o===9&&Lo>=15||$o===10&&Lo<=1,gs=null;(process.env.SPOOKFEST==="true"||nl)&&(gs=await import("./halloween-MX3VNQRW.js"));var Qc=(e="...",n="Loading...",t="Dark")=>{let i=wi(t),o=n;if(n==="c_openai"||n==="Custom (OpenAI)")try{let V=Zo(Jo,{})?.systemSettings?.customOpenAIBaseUrl;V&&(o=V)}catch{}let r=i.logoTextAnsi,d=i.logoBodyAnsi,l=i.logoMutedAnsi,u="\x1B[0m",g=[" \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 "],h=t==="Spookfest"||i.id==="Spookfest"||t==="Halloween"||i.id==="Halloween",m=$o===9&&Lo>=15||$o===10&&Lo<=1,p=h&&m||process.env.SPOOKFEST==="true"&&h,s=g;if(p&&gs){process.env.HALLOWEEN_EEGG="true";let{halloweenArtSide:P,halloweenBat:V,halloweenArtUser:M}=gs;s=Math.random()>.9&&$o===9&&Lo>=30?V:Math.random()>.5?P:M}else process.env.HALLOWEEN_EEGG="false";let w=p?oa:na,_=w[Math.floor(Math.random()*w.length)],$e=i.logoGradient||["#0077ff","#ff00ff"],v=el($e).multiline(s.join(`
530
530
  `)).split(`
531
531
  `),N=P=>`${l}${P}${u}`;return`${v[0]}
532
532
  ${v[1]} ${r}Selected ${p?"Pumpkin":"Provider"}: ${o}${u}
@@ -547,7 +547,7 @@ ${v[7]}
547
547
  `:o($e).length>80?u+=`${t}${v}${s.name}${l} ...80+ files...
548
548
  `:(u+=`${t}${v}${s.name}${l}
549
549
  `,u+=ys($e,n,N,i+1,o,r)):u+=`${t}${v}${s.name}
550
- `}),u};var ll={Ollama:()=>import("./ollama-YTQ5HFES.js").then(e=>e.getOllamaStream),OpenRouter:()=>import("./openrouter-LSG67TST.js").then(e=>e.getOpenRouterStream),DeepSeek:()=>import("./deepseek-I2J4A7WQ.js").then(e=>e.getDeepSeekStream),Mistral:()=>import("./mistral-QQGMQJ2O.js").then(e=>e.getMistralStream),NVIDIA:()=>import("./nvidia-6VK5M5FB.js").then(e=>e.getNVIDIAStream),NVIDIA_wrap:()=>import("./nvidia-6VK5M5FB.js").then(e=>e.wrapNvidiaStreamWithQueueDepth),InferX:()=>import("./inferx-B6PKXWLZ.js").then(e=>e.getInferXStream),SenseNova:()=>import("./sensenova-MLFZTP7U.js").then(e=>e.getSenseNovaStream),AIHubMix:()=>import("./aihubmix-KJIG7CZO.js").then(e=>e.getAIHubMixStream),Poolside:()=>import("./poolside-KWCBEP3P.js").then(e=>e.getPoolsideStream),NineRouter:()=>import("./9router-KRJQK6JP.js").then(e=>e.getNineRouterStream),ExpLabs:()=>import("./explabs-OYP64XS6.js").then(e=>e.getExpLabsStream),TokenHarbor:()=>import("./tokenharbor-Y6HSTTHA.js").then(e=>e.getTokenHarborStream),Infron:()=>import("./infron-4SLX3HMD.js").then(e=>e.getInfronStream),APInex:()=>import("./apinex-EP3JJPZO.js").then(e=>e.getAPInexStream),xKiro:()=>import("./xkiro-D3DTPVWY.js").then(e=>e.getXKiroStream),c_openai:()=>import("./custom_openai-ETCGLBV4.js").then(e=>e.getCustomOpenAIStream)},ws={},he=async e=>(ws[e]||(ws[e]=await ll[e]()),ws[e]),cl=/```[\s\S]*?```/g,dl=/```[\s\S]*$/g,fl=/`[^`]+`/g,ul=/^\|.*\|$/gm,gl=/^[^\w]+|[^\w]+$/g,ml=/[^a-z0-9]/gi,Oo=/\[\s*(?:tool|action):(?:functions\.)?([a-z0-9_]+)\s*\(/gi,pl=/\[\s*(?:tool:(?:functions\.)?|action:(?:functions\.)?|action:)([a-z0-9_]+)\s*\(/gi,hl=/(?:path|targetFile|TargetFile|directory|keyword|id|taskId|title|task)\s*=\s*\\?["']?([^\\"' \),]+)/,Sn=/["']/g,ra=/\\/g,yl=/<\|channel>thought/gi,xl=/<channel\|>/gi,wl=e=>typeof e!="string"?e:e.replace(yl,"<think_fluxflow>").replace(xl,"</think_fluxflow>"),Vd=/^\s*(?:<think_fluxflow[^>]*>|<\|channel>thought|\[think_fluxflow\])[\s\S]*?(?:<\/think_fluxflow>|<channel\|>|\[\/think_fluxflow\]|$)/i,bl=(e,n,t=1)=>{let i=n>0?e[n-1]:"",o=n+t<e.length?e[n+t]:"";return i==="`"&&o==="`"},Sl=e=>{let n=/(?:<\/think_fluxflow>|<channel\|>|\[\/think_fluxflow\])/gi,t;for(;(t=n.exec(e))!==null;)if(!bl(e,t.index,t[0].length))return{index:t.index,length:t[0].length};return{index:-1,length:0}},bs=e=>{if(!e||typeof e!="string")return null;let n=e.match(/^\s*(?:<think_fluxflow[^>]*>|<\|channel>thought|\[think_fluxflow\])/i);if(!n)return null;let t=n.index+n[0].length,i=e.substring(t),o=Sl(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:""}},Nt=e=>{if(!e||typeof e!="string")return e;let n=bs(e);return n?n.remainingText.trimStart():e};var aa=/<\|\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,kl=/"([^"]+)"\s*:\s*(?:"([^"]*)"|(\d+)|true|false|null)/g,la=/<\|\s*tool_calls_section_begin\s*\|>/gi,ca=/<\|\s*tool_calls_section_end\s*\|>/gi,Tl=/```(?:tool|action|yaml|function|json)?\s*\n?([\s\S]*?)\n?\```/gi;var ki=e=>!e||typeof e!="string"?e:e.replace(/(```[\s\S]*?```|`[^`]*`)|(<(?:\w+)(?:[^>]*)>\r?\n?|\r?\n?<\/\w+(?:[^>]*)>)/gi,(n,t)=>t||""),ma=e=>{if(!e||typeof e!="string")return e;let n=Mn(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,r=e.substring(o);if(/\[\s*(?:tool|action):/i.test(r))return e.trimEnd();let d=/\r?\n/.test(r);return e.substring(0,o)+(d?`
550
+ `}),u};var ll={Ollama:()=>import("./ollama-53BJCQQX.js").then(e=>e.getOllamaStream),OpenRouter:()=>import("./openrouter-LSG67TST.js").then(e=>e.getOpenRouterStream),DeepSeek:()=>import("./deepseek-I2J4A7WQ.js").then(e=>e.getDeepSeekStream),Mistral:()=>import("./mistral-H23J6UYA.js").then(e=>e.getMistralStream),NVIDIA:()=>import("./nvidia-BUWXTYGV.js").then(e=>e.getNVIDIAStream),NVIDIA_wrap:()=>import("./nvidia-BUWXTYGV.js").then(e=>e.wrapNvidiaStreamWithQueueDepth),InferX:()=>import("./inferx-B6PKXWLZ.js").then(e=>e.getInferXStream),SenseNova:()=>import("./sensenova-MLFZTP7U.js").then(e=>e.getSenseNovaStream),AIHubMix:()=>import("./aihubmix-KJIG7CZO.js").then(e=>e.getAIHubMixStream),Poolside:()=>import("./poolside-KWCBEP3P.js").then(e=>e.getPoolsideStream),NineRouter:()=>import("./9router-KRJQK6JP.js").then(e=>e.getNineRouterStream),ExpLabs:()=>import("./explabs-OYP64XS6.js").then(e=>e.getExpLabsStream),TokenHarbor:()=>import("./tokenharbor-Y6HSTTHA.js").then(e=>e.getTokenHarborStream),Infron:()=>import("./infron-4SLX3HMD.js").then(e=>e.getInfronStream),APInex:()=>import("./apinex-EP3JJPZO.js").then(e=>e.getAPInexStream),xKiro:()=>import("./xkiro-D3DTPVWY.js").then(e=>e.getXKiroStream),c_openai:()=>import("./custom_openai-ODYQEMOR.js").then(e=>e.getCustomOpenAIStream)},ws={},he=async e=>(ws[e]||(ws[e]=await ll[e]()),ws[e]),cl=/```[\s\S]*?```/g,dl=/```[\s\S]*$/g,fl=/`[^`]+`/g,ul=/^\|.*\|$/gm,gl=/^[^\w]+|[^\w]+$/g,ml=/[^a-z0-9]/gi,Oo=/\[\s*(?:tool|action):(?:functions\.)?([a-z0-9_]+)\s*\(/gi,pl=/\[\s*(?:tool:(?:functions\.)?|action:(?:functions\.)?|action:)([a-z0-9_]+)\s*\(/gi,hl=/(?:path|targetFile|TargetFile|directory|keyword|id|taskId|title|task)\s*=\s*\\?["']?([^\\"' \),]+)/,Sn=/["']/g,ra=/\\/g,yl=/<\|channel>thought/gi,xl=/<channel\|>/gi,wl=e=>typeof e!="string"?e:e.replace(yl,"<think_fluxflow>").replace(xl,"</think_fluxflow>"),Vd=/^\s*(?:<think_fluxflow[^>]*>|<\|channel>thought|\[think_fluxflow\])[\s\S]*?(?:<\/think_fluxflow>|<channel\|>|\[\/think_fluxflow\]|$)/i,bl=(e,n,t=1)=>{let i=n>0?e[n-1]:"",o=n+t<e.length?e[n+t]:"";return i==="`"&&o==="`"},Sl=e=>{let n=/(?:<\/think_fluxflow>|<channel\|>|\[\/think_fluxflow\])/gi,t;for(;(t=n.exec(e))!==null;)if(!bl(e,t.index,t[0].length))return{index:t.index,length:t[0].length};return{index:-1,length:0}},bs=e=>{if(!e||typeof e!="string")return null;let n=e.match(/^\s*(?:<think_fluxflow[^>]*>|<\|channel>thought|\[think_fluxflow\])/i);if(!n)return null;let t=n.index+n[0].length,i=e.substring(t),o=Sl(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:""}},Nt=e=>{if(!e||typeof e!="string")return e;let n=bs(e);return n?n.remainingText.trimStart():e};var aa=/<\|\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,kl=/"([^"]+)"\s*:\s*(?:"([^"]*)"|(\d+)|true|false|null)/g,la=/<\|\s*tool_calls_section_begin\s*\|>/gi,ca=/<\|\s*tool_calls_section_end\s*\|>/gi,Tl=/```(?:tool|action|yaml|function|json)?\s*\n?([\s\S]*?)\n?\```/gi;var ki=e=>!e||typeof e!="string"?e:e.replace(/(```[\s\S]*?```|`[^`]*`)|(<(?:\w+)(?:[^>]*)>\r?\n?|\r?\n?<\/\w+(?:[^>]*)>)/gi,(n,t)=>t||""),ma=e=>{if(!e||typeof e!="string")return e;let n=Mn(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,r=e.substring(o);if(/\[\s*(?:tool|action):/i.test(r))return e.trimEnd();let d=/\r?\n/.test(r);return e.substring(0,o)+(d?`
551
551
  `:"")},ks=null,Do={},jn={key:null,value:null},Pt=e=>{if(!e)return e;let n=Do?.theme;if(!n)try{n=Zo(Jo,{})?.systemSettings?.theme}catch{}let i=wi(n||"Dark").toolFeedbackAnsi||"\x1B[95m";return e.replace(/(?:(\x1b\[\d+m))?([✔✘✖🔍📖→➕↻↷•🛇])(?:(\x1b\[\d+m))?\s*\b(Clicked Screen|Clicked|Located|Dragged|Scrolled|Typed|Entered|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,d,l,u)=>`${r||""}${d}${l||""} ${i}${u}\x1B[0m`)},Al=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(d){if(o?.aborted||d?.name==="AbortError"||d?.message==="Subagent task was cancelled."||(r++,r>=n))throw d;let l=Math.min(t*Math.pow(2,r-1),i);await new Promise((u,g)=>{let h=setTimeout(u,l);o&&o.addEventListener("abort",()=>{clearTimeout(h),g(new DOMException("The user aborted a request.","AbortError"))})})}}},ut=!1;var zd=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,d)=>{let l=o.fullText||o.text||"";if(o.role==="user"&&r<d.length-1)if(l.includes("**CONTEXT SUMMARY OF PREVIOUS TURNS")){let u=l.indexOf("**CONTEXT SUMMARY OF PREVIOUS TURNS");if(u!==-1){let h=l.substring(0,u).lastIndexOf("[SYSTEM METADATA]");h!==-1?l=l.substring(h).trim():l=l.substring(u).trim()}}else{let u=l.lastIndexOf("[USER]"),g=l.lastIndexOf("[USER PROMPT]");u!==-1?l=l.substring(u+6).trim():g!==-1&&(l=l.substring(g).trim())}return{...o,text:l}}),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 d=[],l=[],u=!1,g=()=>{d.length>0&&(t.push({role:"agent",text:"combined"}),d=[]),l.length>0&&(t.push({role:"system",text:"combined"}),l=[]),u=!1};r.forEach(h=>{let m=h.role==="system"&&(h.text?.startsWith("[ACTION RESULT]")||h.text?.startsWith("[TOOL RESULT]")||h.text?.startsWith("SUCCESS:")||h.text?.startsWith("ERROR:")||h.fullText?.startsWith("[ACTION RESULT]")||h.fullText?.startsWith("[TOOL RESULT]")||h.fullText?.startsWith("SUCCESS:")||h.fullText?.startsWith("ERROR:")),p=h.fullText||h.text||"",s=p.trim();if(!(!s&&!h.binaryPart)){if(m)l.push(s);else if(h.role==="agent"){!u&&l.length>0&&g();let w=p.endsWith(`
552
552
  `),_=s.toLowerCase().includes("tool:")||s.toLowerCase().includes("action:");d.push(s),_&&w?u=!0:u=!1}}}),g()}}return t.length};var qd=()=>{ut=!0},Yd=()=>ut,Ss={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"},Kn=(e,n)=>{try{let t=D(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?J.basename(o.replace(/["']/g,"").replace(/\\/g,"/")):null}catch{return null}},pa=e=>e?new ga({apiKey:e}):ks,Xd=async(e,n,t,i,o={})=>{},Ti=e=>{if(!e||typeof e!="string")return e;let n=e.split(""),t=!1,i=!1,o=0;for(;o<n.length;){if(n[o]==="`"&&n[o+1]==="`"&&n[o+2]==="`"){t?(n[o]=" ",n[o+1]=" ",n[o+2]=" ",t=!1):(n[o]=" ",n[o+1]=" ",n[o+2]=" ",t=!0),o+=3;continue}if(t){n[o]!==`
553
553
  `&&n[o]!=="\r"&&(n[o]=" "),o++;continue}if(n[o]==="`")if(i){i=!1,n[o]=" ",o++;continue}else{i=!0,n[o]=" ",o++;continue}if(i){n[o]===`
@@ -642,7 +642,7 @@ ${Ci.trimEnd()}
642
642
  [/Metadata]
643
643
  ${Ai}${_s}${Ho}${_i}${Es}[user prompt] ${Fe.trim()} [/user prompt]`.trim();let Ps={role:"user",text:jo};Uo&&(Ps.binaryPart=Uo),x.forEach(b=>{b.text&&b.role==="agent"&&(b.text=Nt(b.text))}),x.push(Ps),Ai&&n[n.length-1]?.id&&(yield{type:"summary_injected",content:{id:n[n.length-1].id,text:jo}});let Jt=null,Qt=l==="Flux"?50:15;Qt=l.toLowerCase().includes("cu")?75:Qt;let $s=(m?.loopLimits||"Default").toLowerCase();if($s==="extended")Qt=Math.floor(Qt*3);else if($s==="env"){let b=parseInt(process.env.FLUXFLOW_MAX_LOOPS||process.env.MAX_LOOPS||"",10);Number.isFinite(b)&&b>0&&(Qt=b)}let Ta=Math.floor(Qt/2),Ls=0,sn=16;yield{type:"status",content:process.env.HALLOWEEN_EEGG==="true"?"Consulting the spirits":"Connecting"},ut=!1;let Ii=[],Ko=!1,Os=!1,On=[],Mi=!1;for(let b=0;b<=Qt;b++){let ge=Math.floor(Qt*.95);if(b>=ge&&Ls<ge&&typeof t?.onAskUser=="function"){Ls=ge;try{let W="Agent has been running for a long time. Do you want to continue execution?",q=[{id:"continue",label:"Continue",description:"Add few more steps"},{id:"cancel",label:"Cancel",description:"Stop extending and finish current turn limit"}],E=await t.onAskUser(W,q);E&&(E.toLowerCase().includes("continue")||E==="Continue")&&(Qt+=Ta)}catch{}}if(On.length>=10&&typeof t?.onAskUser=="function"){let W={},q=null;for(let E of On)if(W[E]=(W[E]||0)+1,W[E]>=10){q=E;break}if(q)try{let E="Agent seems stuck in a tool loop. You can prompt it to steer or break the loop:",st=[{id:"continue",label:"Continue Anyway",description:"Ignore warning and let it proceed"},{id:"stop",label:"Stop Loop",description:"Force agent to summarize progress and stop repeating"}],de=await t.onAskUser(E,st);if(de){let We="";typeof de=="string"&&(de.toLowerCase()==="stop"||de.includes("Stop Loop"))?We="Stop repeating the same action call. Acknowledge what failed or succeeded, summarize your current findings, and conclude.":typeof de=="string"&&(de.toLowerCase()==="continue"||de.includes("Continue Anyway"))?On=On.filter(xt=>xt!==q):We=typeof de=="string"?de:de?.label||de?.id||"",We&&(x.length>0&&x[x.length-1].role==="user"?x[x.length-1].text+=`
644
644
 
645
- [STEERING HINT from USER, High Priority] ${We.trim()} [/STEERING HINT]`:x.push({role:"user",text:`[STEERING HINT from USER, High Priority] ${We.trim()} [/STEERING HINT]`}),yield{type:"status",content:"Steering Hint Injected..."},On=On.filter(xt=>xt!==q))}}catch{}}let ht=await Gi("agent",t);if(!ht.allowed)throw new Error(ht.reason||`Budget Exhausted for Provider (${s||"Agent"})`);let ce=[];if(Ko=!1,(l==="ICU"||l==="FluxCU")&&!Mi)try{yield{type:"status",content:"Capturing Screen"},await new Promise(E=>setTimeout(E,1e3));let{captureGriddedScreenshot:W}=await import("./screen_grid-I6BDQFDD.js"),q=await W();if(q&&q.base64){let E="[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]",st={inlineData:{mimeType:q.mimeType,data:q.base64}},de=m?.imageHistoryCU||"Standard",We=de==="Low"?3:de==="Extended"?10:de==="Max"?999:5,xt=x.filter(me=>Array.isArray(me.parts)&&me.parts.some(mt=>mt.inlineData));if(xt.length>=We){let me=xt.length-We+1;for(let mt=0;mt<me;mt++){let Qe=xt[mt];Array.isArray(Qe.parts)&&(Qe.parts=Qe.parts.filter(rt=>!rt.inlineData))}}if(x.length>0&&x[x.length-1].role==="user"){let me=x[x.length-1];typeof me.text=="string"&&(me.text+=`
645
+ [STEERING HINT from USER, High Priority] ${We.trim()} [/STEERING HINT]`:x.push({role:"user",text:`[STEERING HINT from USER, High Priority] ${We.trim()} [/STEERING HINT]`}),yield{type:"status",content:"Steering Hint Injected..."},On=On.filter(xt=>xt!==q))}}catch{}}let ht=await Gi("agent",t);if(!ht.allowed)throw new Error(ht.reason||`Budget Exhausted for Provider (${s||"Agent"})`);let ce=[];if(Ko=!1,(l==="ICU"||l==="FluxCU")&&!Mi)try{yield{type:"status",content:"Capturing Screen"},await new Promise(E=>setTimeout(E,1e3));let{captureGriddedScreenshot:W}=await import("./screen_grid-LK6IVH4B.js"),q=await W();if(q&&q.base64){let E="[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]",st={inlineData:{mimeType:q.mimeType,data:q.base64}},de=m?.imageHistoryCU||"Standard",We=de==="Low"?3:de==="Extended"?10:de==="Max"?999:5,xt=x.filter(me=>Array.isArray(me.parts)&&me.parts.some(mt=>mt.inlineData));if(xt.length>=We){let me=xt.length-We+1;for(let mt=0;mt<me;mt++){let Qe=xt[mt];Array.isArray(Qe.parts)&&(Qe.parts=Qe.parts.filter(rt=>!rt.inlineData))}}if(x.length>0&&x[x.length-1].role==="user"){let me=x[x.length-1];typeof me.text=="string"&&(me.text+=`
646
646
 
647
647
  ${E}`,Array.isArray(me.parts)||(me.parts=[{text:me.text}]),me.parts.push(st))}else x.push({role:"user",text:E,parts:[{text:E},st]})}}catch(W){console.error("Vision screenshot capture error:",W)}if(Mi=!1,b>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"},ut){try{let{clearPendingNudges:W}=await import("./subagent_state-LZCOZSUJ.js");W()}catch{}yield{type:"status",content:"Request Cancelled"},yield{type:"text",content:`
648
648
 
@@ -827,11 +827,11 @@ Rules:
827
827
  - JSON escape literal sequences, backslash: \\\\, newLine: \\ n
828
828
  - Same file, multiple edits? ONE PatchFile \u226415 blocks
829
829
  - Need text or huge file? CodeSearch > Full Read
830
- - Stuck on syntax error? Tell user > waste time
830
+ - Ignore indentation mismatch when possible
831
831
 
832
832
  # Provided Actions
833
833
  **Communication**
834
- - AskUser(question=string, optionA?="title::description", ...MAX4). Any Ambiguity
834
+ - AskUser(question=string, optionA?="title::description", ...MAX4). Mid task Ambiguity Resolution
835
835
  ${d?"- AskMain(question=string). Communicate with PARENT/MAIN AGENT. When clarification/decision is needed for a task":""}
836
836
 
837
837
  **Web**
@@ -2,7 +2,7 @@ import{execSync as a}from"child_process";import l from"fs";import c from"path";v
2
2
  - Same file, multiple edits? One PatchFile \u226415 blocks${v?"":`
3
3
  - Action denied? Ask for guidance`}
4
4
  - Need text or large file? CodeSearch > Full Read
5
- - Stuck on syntax error? Tell user > waste time
5
+ - Ignore indentation mismatch when possible
6
6
  `,h=`**Workspace (path = relative; first argument; separator: '/')**
7
7
  - ReadFile(path=string, startLine?=int, endLine?=int)
8
8
  - FindFile(basename=string)
@@ -40,7 +40,7 @@ Rules:
40
40
  - Max 5 actions/turn
41
41
  ${e==="Flux"||e.toLowerCase()==="fluxcu"?`${C}`:""}
42
42
  **User Communication**
43
- - AskUser(question=string, optionA?="title::description", ...MAX4). Any Ambiguity
43
+ - AskUser(question=string, optionA?="title::description", ...MAX4). Mid task Ambiguity Resolution
44
44
 
45
45
  **Web**
46
46
  - WebSearch(query=string, aiMode?=bool:false, limit?=int[3..10]). For unknown topics, time sensitive, fact checking