fluxflow-cli 5.2.1 → 5.2.3

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.
@@ -1 +1 @@
1
- import{A as p,B as q,C as r,D as s,E as t,F as u,G as v,m as b,n as c,o as d,p as e,q as f,r as g,s as h,t as i,u as j,v as k,w as l,x as m,y as n,z as o}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"./chunk-25EUCCH5.js";import"./chunk-7CCULUZN.js";import"./chunk-XAPXZ6KO.js";import"./chunk-UMS5SEYB.js";import{l as a}from"./chunk-75OCC24T.js";import"./chunk-NTZSL2UT.js";import"./chunk-YFIWMGCS.js";export{c as RE_LEADING_THINK,b as convertChannelThinkTags,r as detectToolCalls,e as findGenuineThinkClose,t as generateSimpleContent,u as getAIStream,q as getActiveToolContext,j as getCleanGroupedLength,m as getGoogleClient,f as getLeadingThinkBlock,s as initAI,d as isInsideBacktick,a as isModelMultimodal,l as isTerminationSignaled,o as maskCodeSpans,p as maskExecutedTools,n as runJanitorTask,v as runSubagent,k as signalTermination,g as stripLeadingThinking,h as stripNakedXmlTags,i as stripTrailingFluffAfterTools};
1
+ import{A as p,B as q,C as r,D as s,E as t,F as u,G as v,m as b,n as c,o as d,p as e,q as f,r as g,s as h,t as i,u as j,v as k,w as l,x as m,y as n,z as o}from"./chunk-7Z6XMKKL.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"./chunk-25EUCCH5.js";import"./chunk-7CCULUZN.js";import"./chunk-XAPXZ6KO.js";import"./chunk-UMS5SEYB.js";import{l as a}from"./chunk-75OCC24T.js";import"./chunk-NTZSL2UT.js";import"./chunk-YFIWMGCS.js";export{c as RE_LEADING_THINK,b as convertChannelThinkTags,r as detectToolCalls,e as findGenuineThinkClose,t as generateSimpleContent,u as getAIStream,q as getActiveToolContext,j as getCleanGroupedLength,m as getGoogleClient,f as getLeadingThinkBlock,s as initAI,d as isInsideBacktick,a as isModelMultimodal,l as isTerminationSignaled,o as maskCodeSpans,p as maskExecutedTools,n as runJanitorTask,v as runSubagent,k as signalTermination,g as stripLeadingThinking,h as stripNakedXmlTags,i as stripTrailingFluffAfterTools};
@@ -1,4 +1,4 @@
1
- import{a as ga}from"./chunk-UEV335RW.js";import{b as sa,c as ia,d as la}from"./chunk-E5CFO23P.js";import{c as zl,e as Zn,f as bo,g as Jl}from"./chunk-RINQH4H4.js";import{B as ma,C as xa,D as yo,F as fa,a as Ql,b as mt,c as kt,d as Cr,e as mi,f as ea,g as An,h as rs,i as xi,j as fi,k as ss,l as ta,t as ca,v as da,z as ua}from"./chunk-BM4FWHBO.js";import{a as lo,b as Zl,c as Rl}from"./chunk-XPIXBWTZ.js";import"./chunk-BLAXTPPN.js";import{a as aa}from"./chunk-56EJGQU3.js";import"./chunk-L22YGL6T.js";import{a as Vt,b as Lt,d as Yl,e as Pt,f as jl,k as ci,l as di,m as yr,n as ui,o as ql,p as Qo}from"./chunk-KIPZOUEA.js";import"./chunk-BNKY5QOA.js";import{a as ra}from"./chunk-YX4X2ZTX.js";import{a as Sr,b as zo,c as Ln,e as is,f as gi,g as oa,h as na,i as vr}from"./chunk-QVRPR3DJ.js";import{a as Mr}from"./chunk-KOCMIEPK.js";import{a as un}from"./chunk-Y5JU726N.js";import{b as dn,c as si}from"./chunk-25EUCCH5.js";import{A as Nl,C as Fl,D as $l,E as Ul,H as _l,c as Bl,e as ti,g as El,k as kl,l as Dl,m as Il,n as Al,o as Ll,q as Pl,r as Ol,u as oi,v as ni,w as ri}from"./chunk-7CCULUZN.js";import{a as Wl,b as Xl,i as Gl,j as os,k as ns,m as Et,n as Kl,p as li,q as ai,w as Vl}from"./chunk-XAPXZ6KO.js";import{a as Hl,b as ii,c as qt}from"./chunk-UMS5SEYB.js";import{d as wl,e as ei,f as Tl,g as yl,h as Cl,i as Ml,j as Sl,l as es,n as cn,o as po,p as ts,q as Tr,r as vl}from"./chunk-75OCC24T.js";import{c as Zr,d as bl,e as Rr}from"./chunk-NTZSL2UT.js";import{a as Io,b as In,c as Fo,d as Zs,e as Rs,k as wr,y as pl}from"./chunk-YFIWMGCS.js";import Oi from"os";import e,{useState as Z,useEffect as ct,useRef as Ze,useMemo as or}from"react";import{Box as u,Text as i,useInput as au,useStdout as cu,Static as du}from"ink";import uu from"ink-spinner";import ft from"fs-extra";import Tt from"path";import{exec as Go}from"child_process";import{fileURLToPath as mu}from"url";import oo,{useState as ls,useEffect as hi,useMemo as Br,useCallback as Lc,useRef as Jo}from"react";import{Box as Pc,Text as Ao,useInput as Oc}from"ink";function Nc(t,m){return t.replace(/\t/g," ".repeat(m))}function as(t){return t==null?"":t.replace(/\r\n/g,`
1
+ import{a as ga}from"./chunk-UEV335RW.js";import{b as sa,c as ia,d as la}from"./chunk-E5CFO23P.js";import{c as zl,e as Zn,f as bo,g as Jl}from"./chunk-RINQH4H4.js";import{B as ma,C as xa,D as yo,F as fa,a as Ql,b as mt,c as kt,d as Cr,e as mi,f as ea,g as An,h as rs,i as xi,j as fi,k as ss,l as ta,t as ca,v as da,z as ua}from"./chunk-7Z6XMKKL.js";import{a as lo,b as Zl,c as Rl}from"./chunk-XPIXBWTZ.js";import"./chunk-BLAXTPPN.js";import{a as aa}from"./chunk-56EJGQU3.js";import"./chunk-L22YGL6T.js";import{a as Vt,b as Lt,d as Yl,e as Pt,f as jl,k as ci,l as di,m as yr,n as ui,o as ql,p as Qo}from"./chunk-KIPZOUEA.js";import"./chunk-BNKY5QOA.js";import{a as ra}from"./chunk-YX4X2ZTX.js";import{a as Sr,b as zo,c as Ln,e as is,f as gi,g as oa,h as na,i as vr}from"./chunk-QVRPR3DJ.js";import{a as Mr}from"./chunk-KOCMIEPK.js";import{a as un}from"./chunk-Y5JU726N.js";import{b as dn,c as si}from"./chunk-25EUCCH5.js";import{A as Nl,C as Fl,D as $l,E as Ul,H as _l,c as Bl,e as ti,g as El,k as kl,l as Dl,m as Il,n as Al,o as Ll,q as Pl,r as Ol,u as oi,v as ni,w as ri}from"./chunk-7CCULUZN.js";import{a as Wl,b as Xl,i as Gl,j as os,k as ns,m as Et,n as Kl,p as li,q as ai,w as Vl}from"./chunk-XAPXZ6KO.js";import{a as Hl,b as ii,c as qt}from"./chunk-UMS5SEYB.js";import{d as wl,e as ei,f as Tl,g as yl,h as Cl,i as Ml,j as Sl,l as es,n as cn,o as po,p as ts,q as Tr,r as vl}from"./chunk-75OCC24T.js";import{c as Zr,d as bl,e as Rr}from"./chunk-NTZSL2UT.js";import{a as Io,b as In,c as Fo,d as Zs,e as Rs,k as wr,y as pl}from"./chunk-YFIWMGCS.js";import Oi from"os";import e,{useState as Z,useEffect as ct,useRef as Ze,useMemo as or}from"react";import{Box as u,Text as i,useInput as au,useStdout as cu,Static as du}from"ink";import uu from"ink-spinner";import ft from"fs-extra";import Tt from"path";import{exec as Go}from"child_process";import{fileURLToPath as mu}from"url";import oo,{useState as ls,useEffect as hi,useMemo as Br,useCallback as Lc,useRef as Jo}from"react";import{Box as Pc,Text as Ao,useInput as Oc}from"ink";function Nc(t,m){return t.replace(/\t/g," ".repeat(m))}function as(t){return t==null?"":t.replace(/\r\n/g,`
2
2
  `).replace(/\r/g,`
3
3
  `)}function Pn(t,m,d){let v=t,y=[...m].sort((r,C)=>r.start-C.start),p=0;for(let r of y){let C=r.start-p,w=as(r.text).split(`
4
4
  `).length,M=r.text.length,P=(w>3?`[Pasted ${w} lines]`:`[Pasted ${M} chars]`).length,F=C+P;if(t<=C)break;if(t<F){v=r.end;break}else{let k=r.text.length-P;v+=k,p+=k}}return Math.min(v,d.length)}function pi(t,m,d,v,y=[]){let p=(t||"").slice(0,m),r=v(p).length,C=v(t||""),w=[...y].sort((V,H)=>H.start-V.start);for(let V of w){let H=v(t.slice(0,V.start)).length,X=v(V.text),G=H+X.length,ie=as(V.text).split(`
@@ -1,3 +1,3 @@
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(`
1
+ import{E as u}from"./chunk-7Z6XMKKL.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};