fluxflow-cli 4.42.0 → 4.42.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{ai-BN2T224B.js → ai-GMCDSKAC.js} +1 -1
- package/dist/chunks/{app-H54JNKMS.js → app-XA27DUTN.js} +31 -31
- package/dist/chunks/{auto_completion-D6AQ4ZA3.js → auto_completion-EJXGALEE.js} +1 -1
- package/dist/chunks/{chunk-NG2US66I.js → chunk-UTOIJOO3.js} +91 -91
- package/dist/chunks/{invoke-3KPWF6KF.js → invoke-RGWQLLU4.js} +2 -2
- package/dist/chunks/{invokeSync-CTBUY6WD.js → invokeSync-4GMOXNSA.js} +2 -2
- package/dist/cli.js +2 -2
- package/dist/package.json +1 -1
- package/package.json +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{B as u}from"./chunk-
|
|
1
|
+
import{B as u}from"./chunk-UTOIJOO3.js";import"./chunk-HFTI3R3Q.js";import"./chunk-52STSLCN.js";import"./chunk-56EJGQU3.js";import"./chunk-ZYLACK6T.js";import"./chunk-CTKW7YYV.js";import"./chunk-Z5D4VQSG.js";import"./chunk-6EYQQ7GQ.js";import"./chunk-4BLSASW6.js";import"./chunk-Y5JU726N.js";import{b as p}from"./chunk-FXRFFNRK.js";import"./chunk-XDCDANJJ.js";import{b as d}from"./chunk-Y73PU7CC.js";import{o as a}from"./chunk-KMOTPBF5.js";import"./chunk-P5HBJA23.js";import{a as l}from"./chunk-26BQ45XP.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};
|