fluxflow-cli 4.47.0 → 4.48.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/dist/chunks/{ai-IQMYBYU6.js → ai-BIUKENP6.js} +1 -1
- package/dist/chunks/{app-IPNLGJWQ.js → app-OC5IRTIV.js} +1 -1
- package/dist/chunks/{auto_completion-HIR5DVL5.js → auto_completion-JQ37MRZ7.js} +1 -1
- package/dist/chunks/{chunk-UNOUKPFA.js → chunk-GRNJ7SA3.js} +217 -224
- package/dist/chunks/{invoke-QXYLLM2W.js → invoke-IUEAUE3X.js} +2 -2
- package/dist/chunks/{invokeSync-UYRKSUNO.js → invokeSync-4JX2JCZC.js} +2 -2
- package/dist/cli.js +2 -2
- package/dist/package.json +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as r,B as s,C as t,D as u,E as v,F as w,k as b,l as c,m as d,n as e,o as f,p as g,q as h,r as i,s as j,t as k,u as l,v as m,w as n,x as o,y as p,z as q}from"./chunk-
|
|
1
|
+
import{A as r,B as s,C as t,D as u,E as v,F as w,k as b,l as c,m as d,n as e,o as f,p as g,q as h,r as i,s as j,t as k,u as l,v as m,w as n,x as o,y as p,z as q}from"./chunk-GRNJ7SA3.js";import"./chunk-HFTI3R3Q.js";import"./chunk-52STSLCN.js";import"./chunk-56EJGQU3.js";import"./chunk-4BLSASW6.js";import"./chunk-AMFNIFF3.js";import"./chunk-UIL6OCU4.js";import"./chunk-Z5D4VQSG.js";import"./chunk-6EYQQ7GQ.js";import"./chunk-Y5JU726N.js";import"./chunk-XDY4KWTM.js";import"./chunk-U2GX6WT2.js";import"./chunk-OSSZ4LIE.js";import"./chunk-45DLFA4C.js";import{l as a}from"./chunk-HTOLY3HR.js";import"./chunk-P5HBJA23.js";import"./chunk-26BQ45XP.js";export{c as RE_LEADING_THINK,t as compressHistory,b as convertChannelThinkTags,u as deleteChatSummary,q as detectToolCalls,e as findGenuineThinkClose,s as generateSimpleContent,v as getAIStream,p as getActiveToolContext,j as getCleanGroupedLength,m as getGoogleClient,f as getLeadingThinkBlock,r as initAI,d as isInsideBacktick,a as isModelMultimodal,l as isTerminationSignaled,o as maskCodeSpans,n as runJanitorTask,w as runSubagent,k as signalTermination,g as stripLeadingThinking,h as stripNakedXmlTags,i as stripTrailingFluffAfterTools};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as xa}from"./chunk-UEV335RW.js";import{b as ea,c as ta,d as oa}from"./chunk-IHDJDAG3.js";import{c as Vl,e as jn,f as uo,g as Yl}from"./chunk-GM5VNNTU.js";import{A as fo,C as da,D as ua,E as ma,a as Kl,b as xt,c as yt,d as br,e as ii,f as zl,g as Bn,h as es,i as ts,j as Ql,r as ra,t as sa,w as ia,x as la,y as aa,z as ca}from"./chunk-
|
|
1
|
+
import{a as xa}from"./chunk-UEV335RW.js";import{b as ea,c as ta,d as oa}from"./chunk-IHDJDAG3.js";import{c as Vl,e as jn,f as uo,g as Yl}from"./chunk-GM5VNNTU.js";import{A as fo,C as da,D as ua,E as ma,a as Kl,b as xt,c as yt,d as br,e as ii,f as zl,g as Bn,h as es,i as ts,j as Ql,r as ra,t as sa,w as ia,x as la,y as aa,z as ca}from"./chunk-GRNJ7SA3.js";import{a as oo,b as jl,c as ql}from"./chunk-HFTI3R3Q.js";import"./chunk-52STSLCN.js";import{a as na}from"./chunk-56EJGQU3.js";import"./chunk-4BLSASW6.js";import{a as Wt,b as At,d as Wl,e as Lt,f as Xl,j as ri,k as si,l as pr,m as Gl,n as Go}from"./chunk-AMFNIFF3.js";import"./chunk-UIL6OCU4.js";import{a as Rl}from"./chunk-YX4X2ZTX.js";import{a as Tr,b as Ko,c as En,e as os,f as li,g as Jl,i as Zl,j as yr}from"./chunk-Z5D4VQSG.js";import{a as wr}from"./chunk-6EYQQ7GQ.js";import{a as vn}from"./chunk-Y5JU726N.js";import{b as on,c as ti}from"./chunk-XDY4KWTM.js";import{A as Al,C as Ll,D as Pl,E as Ol,H as Nl,c as Cl,e as Js,g as Ml,k as Sl,l as vl,m as Bl,n as El,o as Dl,q as Il,r as kl,u as Zs,v as Rs,w as ei}from"./chunk-U2GX6WT2.js";import{a as $l,b as Ul,i as _l,j as Zr,k as Rr,m as Et,n as Sn,o as ni,u as Hl}from"./chunk-OSSZ4LIE.js";import{a as Fl,b as oi,c as Kt}from"./chunk-45DLFA4C.js";import{d as gl,e as Qs,f as hl,g as pl,h as bl,i as wl,j as Tl,l as Jr,n as tn,o as co,p as hr,q as yl}from"./chunk-HTOLY3HR.js";import{c as zr,d as fl,e as Qr}from"./chunk-P5HBJA23.js";import{a as So,b as Mn,c as Ao,d as qs,e as zs,k as gr,y as xl}from"./chunk-26BQ45XP.js";import Bi from"os";import e,{useState as J,useEffect as gt,useRef as Ze,useMemo as Jn}from"react";import{Box as m,Text as l,useInput as su,useStdout as iu,Static as lu}from"ink";import au from"ink-spinner";import pt from"fs-extra";import Ct from"path";import{exec as Uo}from"child_process";import{fileURLToPath as cu}from"url";import Qt,{useState as ns,useEffect as ai,useMemo as Cr,useCallback as Ic,useRef as Vo}from"react";import{Box as kc,Text as vo,useInput as Ac}from"ink";function Lc(t,g){return t.replace(/\t/g," ".repeat(g))}function rs(t){return t==null?"":t.replace(/\r\n/g,`
|
|
2
2
|
`).replace(/\r/g,`
|
|
3
3
|
`)}function Dn(t,g,d){let S=t,w=[...g].sort((r,y)=>r.start-y.start),p=0;for(let r of w){let y=r.start-p,b=rs(r.text).split(`
|
|
4
4
|
`).length,C=r.text.length,L=(b>3?`[Pasted ${b} lines]`:`[Pasted ${C} chars]`).length,F=y+L;if(t<=y)break;if(t<F){S=r.end;break}else{let B=r.text.length-L;S+=B,p+=B}}return Math.min(S,d.length)}function ci(t,g,d,S,w=[]){let p=(t||"").slice(0,g),r=S(p).length,y=S(t||""),b=[...w].sort((X,_)=>_.start-X.start);for(let X of b){let _=S(t.slice(0,X.start)).length,Y=S(X.text),j=_+Y.length,le=rs(X.text).split(`
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{B as u}from"./chunk-
|
|
1
|
+
import{B as u}from"./chunk-GRNJ7SA3.js";import"./chunk-HFTI3R3Q.js";import"./chunk-52STSLCN.js";import"./chunk-56EJGQU3.js";import"./chunk-4BLSASW6.js";import"./chunk-AMFNIFF3.js";import"./chunk-UIL6OCU4.js";import"./chunk-Z5D4VQSG.js";import"./chunk-6EYQQ7GQ.js";import"./chunk-Y5JU726N.js";import{b as p}from"./chunk-XDY4KWTM.js";import"./chunk-U2GX6WT2.js";import"./chunk-OSSZ4LIE.js";import{b as d}from"./chunk-45DLFA4C.js";import{o as a}from"./chunk-HTOLY3HR.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};
|