fluxflow-cli 4.1.3 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/chunks/{ai-5HGOLEFE.js → ai-JV4YFO7W.js} +1 -1
- package/dist/chunks/{app-AIAYUYQP.js → app-W2BOMBDT.js} +143 -143
- package/dist/chunks/{chunk-K4FITEVZ.js → chunk-3JHCQ2JD.js} +1 -1
- package/dist/chunks/{chunk-BZBAMZS4.js → chunk-6ENN7MJR.js} +1 -1
- package/dist/chunks/chunk-M7QN5C2K.js +1 -0
- package/dist/chunks/chunk-RVCFBTIL.js +814 -0
- package/dist/chunks/{screen_grid-IKEV7A6U.js → screen_grid-Y6GHBUFE.js} +1 -1
- package/dist/chunks/{secrets-D5HMTNJA.js → secrets-ITIOWL5R.js} +1 -1
- package/dist/chunks/{settings-SSPDWUKI.js → settings-REIFJELQ.js} +1 -1
- package/dist/cli.js +2 -2
- package/dist/model_config.json +67 -3
- package/dist/package.json +2 -2
- package/model_config.json +67 -3
- package/package.json +2 -2
- package/dist/chunks/ai-7J7CL56L.js +0 -1
- package/dist/chunks/ai-7LT7T34E.js +0 -1
- package/dist/chunks/ai-ACFJ2D4K.js +0 -1
- package/dist/chunks/ai-CQ6R662V.js +0 -1
- package/dist/chunks/ai-GO5NYAPZ.js +0 -1
- package/dist/chunks/ai-GUVZR6ZJ.js +0 -1
- package/dist/chunks/ai-IGHYVKEI.js +0 -1
- package/dist/chunks/ai-IOVX3WCN.js +0 -1
- package/dist/chunks/ai-LFC7GPK6.js +0 -1
- package/dist/chunks/ai-LUAK6ZNI.js +0 -1
- package/dist/chunks/ai-NDNZ4XGW.js +0 -1
- package/dist/chunks/ai-O2AHKT2Q.js +0 -1
- package/dist/chunks/ai-OLHI3UWZ.js +0 -1
- package/dist/chunks/ai-OP2H56UR.js +0 -1
- package/dist/chunks/ai-OX4W3MY2.js +0 -1
- package/dist/chunks/ai-SUNZIUAF.js +0 -1
- package/dist/chunks/ai-T2SZGY7Y.js +0 -1
- package/dist/chunks/ai-VMV4EAEQ.js +0 -1
- package/dist/chunks/app-2BDYKT26.js +0 -226
- package/dist/chunks/app-2MCTW3BU.js +0 -226
- package/dist/chunks/app-4M34YBXM.js +0 -223
- package/dist/chunks/app-4VRQVBXL.js +0 -226
- package/dist/chunks/app-5YW3SESE.js +0 -223
- package/dist/chunks/app-62A6ZFYX.js +0 -226
- package/dist/chunks/app-A6HECULK.js +0 -223
- package/dist/chunks/app-A6JFAZBR.js +0 -220
- package/dist/chunks/app-AASWJUCP.js +0 -226
- package/dist/chunks/app-AHIXABRK.js +0 -220
- package/dist/chunks/app-CK5GTF3V.js +0 -230
- package/dist/chunks/app-CTJKY73V.js +0 -223
- package/dist/chunks/app-DJWNDFPK.js +0 -223
- package/dist/chunks/app-DLGENJXK.js +0 -226
- package/dist/chunks/app-DU2VBIDN.js +0 -223
- package/dist/chunks/app-EKHVG5CH.js +0 -220
- package/dist/chunks/app-FJJPTQG7.js +0 -223
- package/dist/chunks/app-FVACY6W2.js +0 -230
- package/dist/chunks/app-GY2S4P3O.js +0 -220
- package/dist/chunks/app-HE22VKVY.js +0 -223
- package/dist/chunks/app-HW6KINDL.js +0 -226
- package/dist/chunks/app-II7PE7RS.js +0 -230
- package/dist/chunks/app-MPYGQO5K.js +0 -223
- package/dist/chunks/app-MWWVPJVZ.js +0 -223
- package/dist/chunks/app-OIIPCXZF.js +0 -226
- package/dist/chunks/app-QCQTUW4S.js +0 -223
- package/dist/chunks/app-QPPCSI4B.js +0 -223
- package/dist/chunks/app-RDSYUUGS.js +0 -228
- package/dist/chunks/app-SWVHXTUU.js +0 -223
- package/dist/chunks/app-TSUKVNLY.js +0 -223
- package/dist/chunks/app-WWNOUK7Q.js +0 -220
- package/dist/chunks/app-XTDZID37.js +0 -228
- package/dist/chunks/app-YCFZG7ZN.js +0 -223
- package/dist/chunks/app-ZUY2BADH.js +0 -226
- package/dist/chunks/chunk-2FKXQDRX.js +0 -3
- package/dist/chunks/chunk-3VSDH7DF.js +0 -3
- package/dist/chunks/chunk-4ANZCMTB.js +0 -813
- package/dist/chunks/chunk-5ORPFMKW.js +0 -3
- package/dist/chunks/chunk-6DHFEWGX.js +0 -1
- package/dist/chunks/chunk-73S5MDH5.js +0 -816
- package/dist/chunks/chunk-77P7CACS.js +0 -3
- package/dist/chunks/chunk-7WH5DREO.js +0 -1
- package/dist/chunks/chunk-A6RZ4EIR.js +0 -813
- package/dist/chunks/chunk-APOUCRQO.js +0 -803
- package/dist/chunks/chunk-BVYPWENJ.js +0 -803
- package/dist/chunks/chunk-BW2MR2YB.js +0 -3
- package/dist/chunks/chunk-D67A52ZR.js +0 -802
- package/dist/chunks/chunk-DB4BJM2R.js +0 -807
- package/dist/chunks/chunk-GYYGT2GJ.js +0 -1229
- package/dist/chunks/chunk-HU74ZBCV.js +0 -803
- package/dist/chunks/chunk-IW2KLAXM.js +0 -803
- package/dist/chunks/chunk-M3G4NWZ2.js +0 -3
- package/dist/chunks/chunk-O4A5T73D.js +0 -801
- package/dist/chunks/chunk-PHKIAKHS.js +0 -1
- package/dist/chunks/chunk-PK33OTVD.js +0 -802
- package/dist/chunks/chunk-RTGBM2SA.js +0 -27
- package/dist/chunks/chunk-SGZ2OI72.js +0 -1
- package/dist/chunks/chunk-UCFPBFHY.js +0 -811
- package/dist/chunks/chunk-UKBUOJ3P.js +0 -803
- package/dist/chunks/chunk-VBKX2PU3.js +0 -803
- package/dist/chunks/chunk-VFG7GIPV.js +0 -812
- package/dist/chunks/chunk-WJ33GNVP.js +0 -3
- package/dist/chunks/chunk-Y2EZRWRZ.js +0 -803
- package/dist/chunks/chunk-Y6SLVHK3.js +0 -1
- package/dist/chunks/chunk-ZESOEAQT.js +0 -1
- package/dist/chunks/chunk-ZGHOKGSQ.js +0 -1231
- package/dist/chunks/chunk-ZQZIEF5I.js +0 -803
- package/dist/chunks/chunk-ZRS2O6Y6.js +0 -1
- package/dist/chunks/export-JZFBZGGZ.js +0 -1
- package/dist/chunks/export-MX2VT3I7.js +0 -1
- package/dist/chunks/export-OFKMKWAS.js +0 -1
- package/dist/chunks/export-ZB2GNV3S.js +0 -1
- package/dist/chunks/paths-HYQFU6D2.js +0 -1
- package/dist/chunks/paths-KMO5IYNK.js +0 -1
- package/dist/chunks/paths-NXN6XAEU.js +0 -1
- package/dist/chunks/paths-YDCMNN4Q.js +0 -1
- package/dist/chunks/secrets-2VU4KV7B.js +0 -1
- package/dist/chunks/secrets-GN7OAYL7.js +0 -1
- package/dist/chunks/secrets-NCPPS7DR.js +0 -1
- package/dist/chunks/secrets-RZD3DYTB.js +0 -1
- package/dist/chunks/settings-57QAZRCP.js +0 -1
- package/dist/chunks/settings-DCF6DTL6.js +0 -1
- package/dist/chunks/settings-DTH5C6BO.js +0 -1
- package/dist/chunks/settings-GPKUUYFM.js +0 -1
- package/dist/chunks/settings-HOSPANO7.js +0 -1
- package/dist/chunks/settings-IY24HSRP.js +0 -1
- package/dist/chunks/settings-XPFFYYYD.js +0 -1
- package/dist/chunks/src-O2JUKI77.js +0 -1
- package/dist/chunks/subagent_state-3D5ZJCLX.js +0 -1
- package/dist/chunks/subagent_state-5IJKFMRU.js +0 -1
- package/dist/chunks/subagent_state-N77JX7MX.js +0 -1
|
@@ -2,4 +2,4 @@ import{screen as j}from"@nut-tree-fork/nut-js";import B from"screenshot-desktop"
|
|
|
2
2
|
<rect x="${w+1}" y="${m+1}" width="${v-2}" height="${y-2}" fill="rgba(0, 255, 255, 0.015)" stroke="rgba(255, 255, 0, 0.3)" stroke-width="1.1" rx="2"/>
|
|
3
3
|
`;let M;if(s.isCustomY)M=r;else{let g=r+(s.yOffset!==void 0?s.yOffset:3);M=Math.max(m+11,Math.min(m+y+3,g))}u+=`
|
|
4
4
|
<text x="${e}" y="${M}" font-family="'Segoe UI', Roboto, sans-serif" font-size="14" font-weight="600" fill="#FFFF00" stroke="#000000" stroke-width="2" paint-order="stroke fill" stroke-linejoin="round" opacity="0.8" text-anchor="middle">${G}</text>
|
|
5
|
-
`}return`<svg width="${o}" height="${t}" xmlns="http://www.w3.org/2000/svg">${u}</svg>`}var J=1,V=o=>new Promise(t=>setTimeout(t,o));async function Q(){try{let{loadSettings:o}=await import("./settings-
|
|
5
|
+
`}return`<svg width="${o}" height="${t}" xmlns="http://www.w3.org/2000/svg">${u}</svg>`}var J=1,V=o=>new Promise(t=>setTimeout(t,o));async function Q(){try{let{loadSettings:o}=await import("./settings-REIFJELQ.js"),t=await o();return Number(t.display||0)}catch{return 0}}async function st(){let o=await Q();try{let t=await B.listDisplays();if(t&&t.length>0)return{format:"png",screen:(t[o]||t[0]).id}}catch{}return{format:"png"}}async function rt(){let o=0,t=await st();for(;o<2;){let C=await B(t);await V(500);let a=await B(t);if(C.equals(a))return a;o++,o<2&&await V(3e3)}return await V(3e3),await B(t)}async function ht(){try{let o=await rt(),t=await et(o),C=ot(l.TARGET_WIDTH,l.TARGET_HEIGHT,l.COLS,l.ROWS,t),a=await K(o).resize(l.TARGET_WIDTH,l.TARGET_HEIGHT,{fit:"fill"}).composite([{input:Buffer.from(C),top:0,left:0}]).png({quality:100}).toBuffer();if(process.env.SHOW_DEBUG_GRID)try{let s=Z.resolve(process.cwd(),"screenshots");await P.ensureDir(s);let G=Z.join(s,`${J}.png`);await P.writeFile(G,a),J++}catch{}let x=a.toString("base64"),c=t.length,d=o,u=a;return d=null,u=null,{base64:x,mimeType:"image/png",width:l.TARGET_WIDTH,height:l.TARGET_HEIGHT,detectedCount:c}}catch(o){return console.error("Failed to capture gridded screenshot:",o),null}}function nt(o){if(o==null)return null;let t=null;if(typeof o=="number")t=o;else if(typeof o=="string"){let w=o.trim();if(/^\d+$/.test(w))t=parseInt(w,10);else{let m=w.match(/^([A-Z])([0-9]{1,2})$/i);if(m){let v=m[1].toUpperCase().charCodeAt(0)-65,y=parseInt(m[2],10)-1;t=v*l.COLS+y+1}}}if(t===null||isNaN(t))return null;if(U&&U.length>0){let w=U.find(m=>m.cellNum===t);if(w)return{x:w.cx,y:w.cy,colIdx:Math.floor((t-1)%l.COLS),rowIdx:Math.floor((t-1)/l.COLS),cellNum:t}}let C=l.COLS*l.ROWS;if(t<1||t>C)return null;let a=t-1,x=Math.floor(a/l.COLS),c=a%l.COLS,d=l.TARGET_WIDTH/l.COLS,u=l.TARGET_HEIGHT/l.ROWS,s=Math.floor(c*d+d/2),G=Math.floor(x*u+u/2);return{x:s,y:G,colIdx:c,rowIdx:x,cellNum:t}}async function ut(o,t,C){let a=null;if(typeof o=="number"||typeof o=="string"?a=nt(o):o&&typeof o.x=="number"&&typeof o.y=="number"&&(a=o),!a)return null;let x=t,c=C,d=0,u=0,s=await Q();try{let y=await B.listDisplays();if(y&&y.length>0){let e=y[s]||y[0];e.width&&e.height&&(x=e.width,c=e.height),e.left!==void 0&&(d=e.left),e.top!==void 0&&(u=e.top)}}catch{}if(!x||!c)try{x=await j.width(),c=await j.height()}catch{x=1920,c=1080}let G=x/l.TARGET_WIDTH,w=c/l.TARGET_HEIGHT,m=Math.round(a.x*G)+d,v=Math.round(a.y*w)+u;return{x:m,y:v,screenW:x,screenH:c,offsetX:d,offsetY:u}}export{l as a,Q as b,ht as c,nt as d,ut as e};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import{e as v,f as g}from"./chunk-SIINYZWE.js";import{a as d,b as n}from"./chunk-I27MASHH.js";import f from"fs-extra";import h from"path";import l from"fs";import p from"path";import{fileURLToPath as k}from"url";var A=k(import.meta.url),x=p.dirname(A),y="",E=[p.join(x,"../../model_config.json"),p.join(x,"../model_config.json")];for(let t of E)try{if(l.existsSync(t)){y=t;break}}catch{}var S=p.join(d,"model_config.json"),o=null;if(l.existsSync(S))try{let t=l.readFileSync(S,"utf-8"),e=JSON.parse(t);e&&e.providers&&e.fallbacks&&e.release&&(o=e)}catch{}if(!o&&y)try{let t=l.readFileSync(y,"utf-8"),e=JSON.parse(t);e&&e.providers&&e.fallbacks&&e.release&&(o=e)}catch{}o||(console.error(`
|
|
2
2
|
[Error] Unable to load model configuration. Please re-install the package from your package manager.
|
|
3
|
-
`),process.exit(1));var F=new Set,L=new Set,T=()=>{let t=new Set,e=new Set;if(o.providers)for(let r of Object.keys(o.providers)){let a=o.providers[r];if(a&&a.models){let i=["Free","Paid"];for(let s of i){let u=a.models[s];if(Array.isArray(u)){for(let m of u)if(m&&m.cmd){let w=m.cmd.trim().toLowerCase();m.multimodal===!0&&t.add(w),m.hasReasoning===!0&&e.add(w)}}}}}if(Array.isArray(o.multimodal_models))for(let r of o.multimodal_models)r&&typeof r=="string"&&t.add(r.trim().toLowerCase());F=t,L=e};T();var C=async()=>((async()=>{try{let e=await fetch("https://raw.githubusercontent.com/KushalRoyChowdhury/fluxflow-cli/main/model_config.json",{signal:AbortSignal.timeout(2e3)});if(e.ok){let r=await e.json();if(r&&r.providers&&r.fallbacks&&r.release){let a=typeof r.version=="number"&&r.version>o.version,i=typeof r.release=="number"&&r.release>o.release;if(a||i){o=r,T();try{l.existsSync(d)||l.mkdirSync(d,{recursive:!0}),l.writeFileSync(S,JSON.stringify(r,null,2),"utf-8")}catch{}}}}}catch{}})(),!0),D=!1,K=t=>{D=!!t},R=t=>{if(!t)return!1;let e=t.trim().toLowerCase();return!!(D||F.has(e)||e.startsWith("gemini-")||e.startsWith("gemma-"))},j=t=>{if(!t)return!1;let e=t.trim().toLowerCase();return L.has(e)},q=(t,e)=>{let r=o.providers[t];return r?r.models[e==="Free"?"Free":"Paid"]||[]:[]},_=(t,e)=>{let r=o.providers[t];return r?e==="Free"?r.default_free:r.default_paid:""},G=t=>o.fallbacks[t];var c={mode:"Flux",display:0,thinkingLevel:"Medium",aiProvider:"Google",activeModel:_("Google","Free")||"gemma-4-31b-it",showFullThinking:!0,apiTier:"Free",quotas:{agentLimit:999999,backgroundLimit:999999,searchLimit:100,customModelId:"",customLimit:0,providerTiers:{Google:"Free",DeepSeek:"Free",NVIDIA:"Free",OpenRouter:"Free"}},systemSettings:{memory:!1,theme:"Dark",compression:0,autoExec:!1,allowExternalAccess:!1,advanceRollback:!1,autoDeleteHistory:"7d",useExternalData:!1,externalDataPath:"",preserveThinking:!0,loadingPhrases:!1,progressiveRendering:!0,showTPMEstimate:!1,subAgents:!0,CustomSubAgent:!1,SubAgentModel:"Default",SubAgentProvider:"",dynamicDirAwareness:!1,indentationTree:!0,ollamaEndpoint:"Cloud",compressToolResults:!1,autoTruncateResults:!1},profileData:{name:null,nickname:null,instructions:null},imageSettings:{keyType:"Default",quality:"Low-High",apiKey:""}},b=async()=>{let t={...c};try{if(await f.exists(n)){let e=v(n);if(e.imageSettings&&e.imageSettings.apiKey)try{let r=e.imageSettings.apiKey,{saveSecret:a}=await import("./secrets-
|
|
3
|
+
`),process.exit(1));var F=new Set,L=new Set,T=()=>{let t=new Set,e=new Set;if(o.providers)for(let r of Object.keys(o.providers)){let a=o.providers[r];if(a&&a.models){let i=["Free","Paid"];for(let s of i){let u=a.models[s];if(Array.isArray(u)){for(let m of u)if(m&&m.cmd){let w=m.cmd.trim().toLowerCase();m.multimodal===!0&&t.add(w),m.hasReasoning===!0&&e.add(w)}}}}}if(Array.isArray(o.multimodal_models))for(let r of o.multimodal_models)r&&typeof r=="string"&&t.add(r.trim().toLowerCase());F=t,L=e};T();var C=async()=>((async()=>{try{let e=await fetch("https://raw.githubusercontent.com/KushalRoyChowdhury/fluxflow-cli/main/model_config.json",{signal:AbortSignal.timeout(2e3)});if(e.ok){let r=await e.json();if(r&&r.providers&&r.fallbacks&&r.release){let a=typeof r.version=="number"&&r.version>o.version,i=typeof r.release=="number"&&r.release>o.release;if(a||i){o=r,T();try{l.existsSync(d)||l.mkdirSync(d,{recursive:!0}),l.writeFileSync(S,JSON.stringify(r,null,2),"utf-8")}catch{}}}}}catch{}})(),!0),D=!1,K=t=>{D=!!t},R=t=>{if(!t)return!1;let e=t.trim().toLowerCase();return!!(D||F.has(e)||e.startsWith("gemini-")||e.startsWith("gemma-"))},j=t=>{if(!t)return!1;let e=t.trim().toLowerCase();return L.has(e)},q=(t,e)=>{let r=o.providers[t];return r?r.models[e==="Free"?"Free":"Paid"]||[]:[]},_=(t,e)=>{let r=o.providers[t];return r?e==="Free"?r.default_free:r.default_paid:""},G=t=>o.fallbacks[t];var c={mode:"Flux",display:0,thinkingLevel:"Medium",aiProvider:"Google",activeModel:_("Google","Free")||"gemma-4-31b-it",showFullThinking:!0,apiTier:"Free",quotas:{agentLimit:999999,backgroundLimit:999999,searchLimit:100,customModelId:"",customLimit:0,providerTiers:{Google:"Free",DeepSeek:"Free",NVIDIA:"Free",OpenRouter:"Free"}},systemSettings:{memory:!1,theme:"Dark",compression:0,autoExec:!1,allowExternalAccess:!1,advanceRollback:!1,autoDeleteHistory:"7d",useExternalData:!1,externalDataPath:"",preserveThinking:!0,loadingPhrases:!1,progressiveRendering:!0,showTPMEstimate:!1,subAgents:!0,CustomSubAgent:!1,SubAgentModel:"Default",SubAgentProvider:"",dynamicDirAwareness:!1,indentationTree:!0,ollamaEndpoint:"Cloud",compressToolResults:!1,autoTruncateResults:!1},profileData:{name:null,nickname:null,instructions:null},imageSettings:{keyType:"Default",quality:"Low-High",apiKey:""}},b=async()=>{let t={...c};try{if(await f.exists(n)){let e=v(n);if(e.imageSettings&&e.imageSettings.apiKey)try{let r=e.imageSettings.apiKey,{saveSecret:a}=await import("./secrets-ITIOWL5R.js");await a("POLLINATIONS_API_KEY",r),e.imageSettings.apiKey="",g(n,e)}catch{}t={...c,...e,quotas:{...c.quotas,...e.quotas,providerTiers:{...c.quotas.providerTiers,...e.quotas?.providerTiers||{}}},systemSettings:{...c.systemSettings,...e.systemSettings},profileData:{...c.profileData,...e.profileData},imageSettings:{...c.imageSettings,...e.imageSettings}}}}catch(e){console.error("Failed to load settings:",e)}try{let{getSecret:e}=await import("./secrets-ITIOWL5R.js"),r=await e("POLLINATIONS_API_KEY");r&&(t.imageSettings.apiKey=r)}catch{}if(t.showFullThinking===!1){t.showFullThinking=!0;try{g(n,t)}catch{}}return t},I=async t=>{let{FLUXFLOW_DIR:e}=await import("./paths-R3DD7CRF.js"),r=["logs","secret"];for(let a of r){let i=h.join(e,a),s=h.join(t,a);try{await f.exists(i)&&(await f.ensureDir(s),await f.copy(i,s,{overwrite:!0}))}catch(u){console.error(`Migration failed for ${a}:`,u)}}},X=async t=>{try{let e=await b();if(!e.systemSettings.useExternalData&&t.systemSettings?.useExternalData&&t.systemSettings?.externalDataPath&&await I(t.systemSettings.externalDataPath),t.imageSettings&&t.imageSettings.apiKey!==void 0){let{saveSecret:a,removeSecret:i}=await import("./secrets-ITIOWL5R.js"),s=t.imageSettings.apiKey;s?await a("POLLINATIONS_API_KEY",s):await i("POLLINATIONS_API_KEY")}let r={...e,...t};return r.imageSettings&&(r.imageSettings={...r.imageSettings,apiKey:""}),await f.ensureDir(h.dirname(n)),g(n,r),!0}catch(e){return console.error("Failed to save settings:",e),!1}};export{C as a,K as b,R as c,j as d,q as e,_ as f,G as g,b as h,X as i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as r,d as a}from"./chunk-SIINYZWE.js";import{e as c}from"./chunk-I27MASHH.js";import I from"fs-extra";import A from"path";var s=A.join(c,"secrets.json"),u=async()=>{try{let e=r(s,{});if(e.API_KEY)return e.API_KEY}catch{}return null},f=async e=>{try{let t=r(s,{});if(e==="Google")return t.GOOGLE_API_KEY||t.API_KEY||null;if(e==="DeepSeek")return t.DEEPSEEK_API_KEY||null;if(e==="OpenRouter")return t.OPENROUTER_API_KEY||null;if(e==="Mistral")return t.MISTRAL_API_KEY||null;if(e==="NVIDIA")return t.NVIDIA_API_KEY||null;if(e==="Ollama")return t.OLLAMA_API_KEY||"LOCAL";if(e==="CrofAI"||e==="Crof")return t.CROFAI_API_KEY||null}catch{}return null},Y=async(e,t)=>{e==="Google"?(await n("GOOGLE_API_KEY",t),await n("API_KEY",t)):e==="DeepSeek"?await n("DEEPSEEK_API_KEY",t):e==="OpenRouter"?await n("OPENROUTER_API_KEY",t):e==="Mistral"?await n("MISTRAL_API_KEY",t):e==="NVIDIA"?await n("NVIDIA_API_KEY",t):e==="Ollama"?await n("OLLAMA_API_KEY",t):(e==="CrofAI"||e==="Crof")&&await n("CROFAI_API_KEY",t)},i=async e=>{try{return r(s,{})[e]||null}catch{return null}},n=async(e,t)=>{await I.ensureDir(c);let E=r(s,{});E[e]=t,a(s,E)},O=async()=>{try{let e=r(s,{});return{key:e.GOOGLE_API_KEY||e.API_KEY,cx:e.SEARCH_ID}}catch{}return{key:null,cx:null}},y=async e=>n("API_KEY",e),S=async e=>n("GOOGLE_API_KEY",e),R=async e=>n("SEARCH_ID",e),_=async e=>{try{let t=r(s,{});delete t[e],a(s,t)}catch{}},x=async()=>_("API_KEY");export{u as a,f as b,Y as c,i as d,n as e,O as f,y as g,S as h,R as i,_ as j,x as k};
|