fluxflow-cli 4.16.10 → 4.16.11

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 CHANGED
@@ -12,7 +12,7 @@
12
12
 
13
13
  📖 **[Official Documentation](https://fluxflow-cli.onrender.com/)**
14
14
 
15
- **Flux Flow** is not just another CLI—it's a high-speed, sassy, and goal-oriented CLI AI Agent powered by multi-provider frontier models (Google Gemini, DeepSeek, OpenRouter, and more). Designed for developers who demand a premium UI/UX while managing complex file-system tasks, web research, and autonomous workflows.
15
+ **Flux Flow** is not just another CLI-it's a high-speed, sassy, and goal-oriented CLI AI Agent powered by multi-provider frontier models (Google Gemini, DeepSeek, OpenRouter, and more). Designed for developers who demand a premium UI/UX while managing complex file-system tasks, web research, and autonomous workflows.
16
16
 
17
17
  ---
18
18
 
@@ -61,7 +61,7 @@ Flux Flow now pairs with a dedicated VS Code extension to bridge the gap between
61
61
  - **Live Status Heartbeat**: The VS Code Status Bar acts as a live feed, showing the agent's current task (*Thinking*, *Web Searching*, *Patching*, etc.).
62
62
  - **Clickable Terminal Links**: Jump from the terminal output straight to your code with clickable file:line links.
63
63
  - **Right-Click Integration**: "FluxFlow > Chat" is available in the editor, explorer, and tab bars, even when no files are open.
64
- - **Selection-Driven Reasoning**: Select a block of code and ask "What does this do?"—the agent receives your selection instantly.
64
+ - **Selection-Driven Reasoning**: Select a block of code and ask "What does this do?"-the agent receives your selection instantly.
65
65
  - **Universal Compatibility**: Works flawlessly with VS Code, Cursor, VSCodium, Trae, and Antigravity.
66
66
 
67
67
  ### 👁️ **Native Multimodality**
@@ -98,7 +98,7 @@ Security isn't an afterthought; it's a boundary.
98
98
  - **Human-in-the-Loop (HITL)**: Every file write and terminal command requires your high-fidelity approval.
99
99
 
100
100
  ### 🧹 **The Background Janitor**
101
- While you move at high speed, the Janitor follows behind—refining session titles, compressing data, and ensuring your context window remains at absolute peak performance.
101
+ While you move at high speed, the Janitor follows behind-refining session titles, compressing data, and ensuring your context window remains at absolute peak performance.
102
102
 
103
103
  ### 🤖 **Autonomous Subagent System**
104
104
  Delegate complex tasks to subagents. Spawns blocking subagents (`invokeSync`) or asynchronous background subagents (`invoke`) with distinct telemetry and silent background logging. Built-in transaction-safe reversion logs all subagent changes under the active turn, preserving rollback security.
@@ -149,13 +149,14 @@ Type `/settings` in-app to live-configure:
149
149
 
150
150
  ## 🔧 Configurable Environment Variables
151
151
  Set these in your shell/session to override defaults:
152
- - `SUBAGENT_MODEL` — Subagent model override (e.g., `gemini-2.5-pro`)
153
- - `SUBAGENT_PROVIDER` — Subagent provider override (e.g., `google`, `deepseek`)
154
- - `NVIDIA_BASE_URL` — Custom NVIDIA endpoint URL
155
- - `NVIDIA_API_KEY` — NVIDIA API key (used when `NVIDIA_BASE_URL` is set)
156
- - `OLLAMA_HOST` — Ollama endpoint (default: `http://127.0.0.1:11434`)
157
- - `SHELL` — Preferred shell for command execution (default: `bash`)
158
- - `HIGH_CONTEXT` — Context window override (`false` or integer `32000` to `1000000`) [Deprecated!]
152
+ - `SUBAGENT_MODEL` - Subagent model override (e.g., `gemini-2.5-pro`)
153
+ - `SUBAGENT_PROVIDER` - Subagent provider override (e.g., `google`, `deepseek`)
154
+ - `SUBAGENT_THINKING` - Thinking level overide for subagents. [Fast, Low (default), Medium, High]
155
+ - `NVIDIA_BASE_URL` - Custom NVIDIA endpoint URL
156
+ - `NVIDIA_API_KEY` - NVIDIA API key (used when `NVIDIA_BASE_URL` is set)
157
+ - `OLLAMA_HOST` - Ollama endpoint (default: `http://127.0.0.1:11434`)
158
+ - `SHELL` - Preferred shell for command execution (default: `bash`)
159
+ - `HIGH_CONTEXT` - Context window override (`false` or integer `32000` to `1000000`) [Deprecated!]
159
160
  - `SHOW_DEBUG_GRID` - true|false, default: false
160
161
  - `DEBUG_OCR` - true|false, default: false
161
162
  - `NO_DEV` - true|false, default: false
@@ -1 +1 @@
1
- import{A as p,B as q,C as r,D as s,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-X5IDPW7G.js";import"./chunk-VCF6JVQV.js";import"./chunk-56EJGQU3.js";import"./chunk-KRRJNFBF.js";import"./chunk-2N256NLX.js";import"./chunk-HNUV7OHA.js";import"./chunk-KFM2OZWJ.js";import"./chunk-72RYQ5W7.js";import"./chunk-WKHYRBBK.js";import{g as a}from"./chunk-AAPXJU65.js";import"./chunk-SIINYZWE.js";import"./chunk-SHTF7RHG.js";import"./chunk-FDNLMLIM.js";import"./chunk-Y5JU726N.js";export{c as RE_LEADING_THINK,p as compressHistory,b as convertChannelThinkTags,q as deleteChatSummary,e as findGenuineThinkClose,r as getAIStream,j as getCleanGroupedLength,m as getGoogleClient,f as getLeadingThinkBlock,o as initAI,d as isInsideBacktick,a as isModelMultimodal,l as isTerminationSignaled,n as runJanitorTask,s 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,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-7MMKXDFE.js";import"./chunk-VCF6JVQV.js";import"./chunk-56EJGQU3.js";import"./chunk-KRRJNFBF.js";import"./chunk-2N256NLX.js";import"./chunk-HNUV7OHA.js";import"./chunk-KFM2OZWJ.js";import"./chunk-72RYQ5W7.js";import"./chunk-WKHYRBBK.js";import{g as a}from"./chunk-AAPXJU65.js";import"./chunk-SIINYZWE.js";import"./chunk-SHTF7RHG.js";import"./chunk-FDNLMLIM.js";import"./chunk-Y5JU726N.js";export{c as RE_LEADING_THINK,p as compressHistory,b as convertChannelThinkTags,q as deleteChatSummary,e as findGenuineThinkClose,r as getAIStream,j as getCleanGroupedLength,m as getGoogleClient,f as getLeadingThinkBlock,o as initAI,d as isInsideBacktick,a as isModelMultimodal,l as isTerminationSignaled,n as runJanitorTask,s as runSubagent,k as signalTermination,g as stripLeadingThinking,h as stripNakedXmlTags,i as stripTrailingFluffAfterTools};
@@ -1,4 +1,4 @@
1
- import{A as tl,B as ol,C as nl,a as _i,b as Qe,c as ot,d as wr,e as Gt,f as Gi,g as Wi,h as Tr,i as Yi,j as hs,k as Qo,l as Sr,v as Ri,y as el,z as Gn}from"./chunk-X5IDPW7G.js";import"./chunk-VCF6JVQV.js";import{a as Zi}from"./chunk-56EJGQU3.js";import{b as zi,c as Qi,d as Ji}from"./chunk-UAHJEAVX.js";import{a as No,b as fn,d as yr,e as xs,f as Vi,g as ji,i as Ki,j as Mr}from"./chunk-KRRJNFBF.js";import"./chunk-2N256NLX.js";import{a as Bt,b as xt,d as Fi,e as ht,f as Ui,j as gs,k as fs,l as _n,n as $i,o as Co}from"./chunk-HNUV7OHA.js";import{a as Xn}from"./chunk-KFM2OZWJ.js";import{b as mn,c as ds,k as Ai}from"./chunk-72RYQ5W7.js";import{b as ms}from"./chunk-AZGFDR6K.js";import{a as Li,b as Pi,c as pr,d as br,f as Et,g as zo,h as us,l as Oi}from"./chunk-WKHYRBBK.js";import{a as Ci,b as vi,c as Ei,d as Bi,e as Di,f as ki,g as hr,i as Oo,j as go,k as Ii,l as cs,m as Nt}from"./chunk-AAPXJU65.js";import{c as fr,d as Si,e as xr}from"./chunk-SIINYZWE.js";import{e as Ni}from"./chunk-YNU56P2H.js";import{b as Hi,d as gn,e as qt,f as Xi}from"./chunk-4VUJ7ITH.js";import"./chunk-SHTF7RHG.js";import{a as qi}from"./chunk-A73NNVCZ.js";import{a as no,b as qo,c as mo,d as gr,e as as,j as $n}from"./chunk-FDNLMLIM.js";import{a as Hn}from"./chunk-Y5JU726N.js";import _s from"os";import e,{useState as Q,useEffect as nt,useRef as Ke,useMemo as wn}from"react";import{Box as c,Text as l,useInput as Vd,useStdout as jd,Static as Kd}from"ink";import qd from"ink-spinner";import Re from"fs-extra";import St from"path";import{exec as To}from"child_process";import{fileURLToPath as zd}from"url";import Ht,{useState as Cr,useEffect as ps,useMemo as Wn,useCallback as ha,useRef as vo}from"react";import{Box as pa,Text as ro,useInput as ba}from"ink";function wa(t,g){return t.replace(/\t/g," ".repeat(g))}function vr(t){return t==null?"":t.replace(/\r\n/g,`
1
+ import{A as tl,B as ol,C as nl,a as _i,b as Qe,c as ot,d as wr,e as Gt,f as Gi,g as Wi,h as Tr,i as Yi,j as hs,k as Qo,l as Sr,v as Ri,y as el,z as Gn}from"./chunk-7MMKXDFE.js";import"./chunk-VCF6JVQV.js";import{a as Zi}from"./chunk-56EJGQU3.js";import{b as zi,c as Qi,d as Ji}from"./chunk-UAHJEAVX.js";import{a as No,b as fn,d as yr,e as xs,f as Vi,g as ji,i as Ki,j as Mr}from"./chunk-KRRJNFBF.js";import"./chunk-2N256NLX.js";import{a as Bt,b as xt,d as Fi,e as ht,f as Ui,j as gs,k as fs,l as _n,n as $i,o as Co}from"./chunk-HNUV7OHA.js";import{a as Xn}from"./chunk-KFM2OZWJ.js";import{b as mn,c as ds,k as Ai}from"./chunk-72RYQ5W7.js";import{b as ms}from"./chunk-AZGFDR6K.js";import{a as Li,b as Pi,c as pr,d as br,f as Et,g as zo,h as us,l as Oi}from"./chunk-WKHYRBBK.js";import{a as Ci,b as vi,c as Ei,d as Bi,e as Di,f as ki,g as hr,i as Oo,j as go,k as Ii,l as cs,m as Nt}from"./chunk-AAPXJU65.js";import{c as fr,d as Si,e as xr}from"./chunk-SIINYZWE.js";import{e as Ni}from"./chunk-YNU56P2H.js";import{b as Hi,d as gn,e as qt,f as Xi}from"./chunk-4VUJ7ITH.js";import"./chunk-SHTF7RHG.js";import{a as qi}from"./chunk-A73NNVCZ.js";import{a as no,b as qo,c as mo,d as gr,e as as,j as $n}from"./chunk-FDNLMLIM.js";import{a as Hn}from"./chunk-Y5JU726N.js";import _s from"os";import e,{useState as Q,useEffect as nt,useRef as Ke,useMemo as wn}from"react";import{Box as c,Text as l,useInput as Vd,useStdout as jd,Static as Kd}from"ink";import qd from"ink-spinner";import Re from"fs-extra";import St from"path";import{exec as To}from"child_process";import{fileURLToPath as zd}from"url";import Ht,{useState as Cr,useEffect as ps,useMemo as Wn,useCallback as ha,useRef as vo}from"react";import{Box as pa,Text as ro,useInput as ba}from"ink";function wa(t,g){return t.replace(/\t/g," ".repeat(g))}function vr(t){return t==null?"":t.replace(/\r\n/g,`
2
2
  `).replace(/\r/g,`
3
3
  `)}function Jo(t,g,h){let y=t,w=[...g].sort((s,I)=>s.start-I.start),p=0;for(let s of w){let I=s.start-p,f=vr(s.text).split(`
4
4
  `).length,A=s.text.length,P=(f>3?`[Pasted ${f} lines]`:`[Pasted ${A} chars]`).length,X=I+P;if(t<=I)break;if(t<X){y=s.end;break}else{let S=s.text.length-P;y+=S,p+=S}}return Math.min(y,h.length)}function bs(t,g,h,y,w=[]){let p=(t||"").slice(0,g),s=y(p).length,I=y(t||""),f=[...w].sort((N,D)=>D.start-N.start);for(let N of f){let D=y(t.slice(0,N.start)).length,$=y(N.text),ee=D+$.length,me=vr(N.text).split(`
@@ -279,7 +279,7 @@ ${je}`,color:"cyan",isSteeringHint:!0,hintType:Be?"QUESTION":"STEERING HINT",hin
279
279
  ${n.instructions.length>0?`\u2800\u2800\x1B[2m\u2514\u2500\x1B[22m ${n.instructions.substring(0,30)}${n.instructions.length>30?"...":""}`:"\u2800\u2800\x1B[2m\u2514\u2500\x1B[22m No Instructions Provided."}
280
280
  \u2800`,isMeta:!0}]),z("chat")},onCancel:()=>z("chat"),theme:fe.theme});case"resolution":return e.createElement(c,{width:"100%",alignItems:"center",justifyContent:"center"},e.createElement(oc,{data:aa,theme:fe.theme,onResolve:n=>{ss(null),z("chat"),setTimeout(()=>{Ti(n,!0)},500)},onEdit:n=>{ss(null),z("chat"),f(n)}}));case"approval":return e.createElement(c,{flexDirection:"column",borderStyle:"round",borderColor:"white",paddingX:2,paddingY:1,width:"100%"},e.createElement(l,{color:"white",bold:!0,underline:!0},"FILE WRITE PERMISSION"),e.createElement(l,{marginTop:1},"The agent is attempting to modify: ",e.createElement(l,{color:"cyan"},Hn(ko?.args||"{}").path||"Unknown File")),Qo()?e.createElement(c,{marginTop:1,paddingX:1},e.createElement(l,{color:"cyan",italic:!0},"FluxFlow Companion is active. Review the changes in your editor.")):e.createElement(c,{marginTop:1,borderStyle:"single",borderColor:"#333",paddingX:1,flexDirection:"column"},e.createElement(l,{color:"gray"},"--- PROPOSED CONTENT ---"),(()=>{let n=Hn(ko?.args||"{}"),o=[],d=new Set;if(Object.keys(n).forEach(M=>{let u=M.match(/^(searchContent|replaceContent|newContent|content_to_replace|content_to_add|TargetContent|ReplacementContent|replacementContent)(\d+)?$/);if(u){let a=u[2]?parseInt(u[2]):1;d.add(a)}}),Array.from(d).sort((M,u)=>M-u).forEach(M=>{let u,a;M===1?(u=n.searchContent1??n.searchContent??n.replaceContent1??n.content_to_replace1??n.replaceContent??n.content_to_replace??n.TargetContent??null,a=n.newContent1??n.content_to_add1??n.newContent??n.content_to_add??n.ReplacementContent??n.replacementContent??null):(u=n[`searchContent${M}`]??n[`replaceContent${M}`]??n[`content_to_replace${M}`]??null,a=n[`newContent${M}`]??n[`content_to_add${M}`]??null),(u!==null||a!==null)&&o.push({replace:u,new:a})}),o.length>0)return e.createElement(c,{flexDirection:"column",marginTop:1},o.map((M,u)=>{let a=M.replace!==null,b=M.new!==null;return e.createElement(c,{key:u,flexDirection:"column",marginTop:u>0?1:0},o.length>1&&e.createElement(l,{color:"gray"},"Block ",u+1,":"),a&&e.createElement(c,null,e.createElement(l,{color:"red",wrap:"anywhere",bold:!0},"- ",M.replace)),b&&e.createElement(c,{marginTop:0},e.createElement(l,{color:"green",wrap:"anywhere",bold:!0},"+ ",M.new.replace(/\[\/n\]?/g,"\\n"))))}));let m=n.content||n.ReplacementContent||n.content_to_add||n.replacementContent||n.newContent||null;return e.createElement(l,{color:"white",wrap:"anywhere"},(m?m.replace(/\[\/n\]?/g,"\\n"):null)||"Updating file content...")})()),e.createElement(c,{marginTop:1},e.createElement(bt,{title:"Action Required",items:[{label:"Accept this time",value:"allow"},{label:"Accept for this session",value:"always"},{label:"Don't accept",value:"deny"}],onSelect:n=>{n.value==="always"&&ta(!0);let o=n.value==="deny"?"deny":"allow";ko.resolve(o),dn(null),z("chat")},theme:fe.theme})));case"mode":return e.createElement(bt,{title:"SELECT EXECUTION MODE",items:[{label:`Flux (Dev Toolset Mode) ${v==="Flux"?"\u25CF":""}`,value:"Flux"},{label:`Flow (Chat / Conversation Mode) ${v==="Flow"?"\u25CF":""}`,value:"Flow"},{label:`ICU (Interactive Computer Use) ${v==="ICU"?"\u25CF":""}`,value:"ICU"},{label:`FluxCU (Autonomous Flux Computer Use) ${v==="FluxCU"?"\u25CF":""}`,value:"FluxCU"},{label:"Back",value:"chat"}],theme:fe.theme,onSelect:n=>{if(n.value==="chat"||n.value==="Back"){z("chat");return}let o=n.value;L(o),Ce(o==="Flow"?"Fast":"High"),O(d=>(H(d.length+1),[...d,{id:Date.now(),role:"system",text:`\u2726 Mode switched to ${Fs(o)}
281
281
  \u2800`,isMeta:!0}])),z("chat")},onClose:()=>z("chat")});case"display":return e.createElement(bt,{title:"SELECT ACTIVE DISPLAY FOR COMPUTER USE",items:[{label:`Primary Display (Display 1) ${N===0?"\u25CF":""}`,value:0},{label:`Secondary Display (Display 2) ${N===1?"\u25CF":""}`,value:1},{label:"Back",value:"chat"}],theme:fe.theme,onSelect:n=>{if(n.value==="chat"||n.value==="Back"){z("chat");return}let o=Number(n.value);D(o),Nt({display:o}).catch(()=>{});let d=o===0?"Primary (Display 1)":"Secondary (Display 2)";O(x=>(H(x.length+1),[...x,{id:Date.now(),role:"system",text:`\u2726 Active Computer Use display set to: ${d}`,isMeta:!0}])),z("chat")},onClose:()=>z("chat")});case"updateManager":return e.createElement(bt,{title:"Select Preferred Update Manager",subtitle:"NOTE: If you are unsure about these, go with NPM",items:[{label:"NPM (Standard)",value:"npm"},{label:"PNPM (Recommended)",value:"pnpm"},{label:"BUN (Ultra Fast)",value:"bun"},{label:"YARN (Classic)",value:"yarn"},{label:"Custom Command",value:"custom"},{label:"Back",value:"settings"}],onSelect:n=>{if(n.value==="settings"||n.value==="Back"){z("settings");return}n.value==="custom"?($t({label:"Enter Custom Update Command (Global install recommended):",key:"customUpdateCommand",value:fe.customUpdateCommand,next:o=>(Lt(d=>({...d,updateManager:"custom",customUpdateCommand:o})),null)}),z("input")):(Lt(o=>({...o,updateManager:n.value})),z("settings"))},theme:fe.theme});case"update":return e.createElement(yl,{latest:Vt,current:lo,settings:fe,onClose:()=>z("chat"),onSuccess:()=>{O(n=>(H(n.length+1),[...n,{id:"update-success-"+Date.now(),role:"system",text:`**[UPDATE COMPLETED]** Flux Flow successfully updated to v${Vt}.
282
- **Restart to see changes.**`,isMeta:!0}])),z("chat")},onUpdateSettings:n=>{z("updateManager")}});case"terminalApproval":return e.createElement(c,{flexDirection:"column",borderStyle:"round",borderColor:"white",paddingX:2,paddingY:1,width:"100%"},e.createElement(l,{color:"white",bold:!0,underline:!0},"TERMINAL COMMAND OVERSIGHT"),e.createElement(c,{marginTop:1},e.createElement(l,null,"Agent requested to run: ",e.createElement(l,{color:"yellow",bold:!0},Hn(ko?.args||"{}").command||"Unknown Command"))),e.createElement(c,{marginTop:1},e.createElement(bt,{title:"Risk Assessment Required",items:[{label:"Run",value:"allow"},{label:"Deny",value:"deny"}],onSelect:n=>{ko.resolve(n.value),dn(null),z("chat")},theme:fe.theme})));default:return e.createElement(c,{flexDirection:"column",marginTop:1,flexShrink:0,width:"100%"},gi&&mi&&e.createElement(c,{flexDirection:"column",borderStyle:"round",borderColor:i.borderMuted,paddingX:2,paddingY:1,width:"100%",marginBottom:1},e.createElement(c,{justifyContent:"space-between",width:"100%"},e.createElement(l,{color:i.text,bold:!0,underline:!0},"INQUIRY RESPONSE"),e.createElement(l,{color:i.textMuted},"[ ESC to Close ]")),e.createElement(c,{marginTop:1,width:"100%"},e.createElement(Br,{text:mi,columns:$.columns-6,theme:fe.theme}))),Kr.filter(n=>n.status==="running").length>0&&e.createElement(c,{flexDirection:"column",borderStyle:"round",borderColor:i.borderMuted,paddingX:2,paddingY:0,width:"100%",marginBottom:1},e.createElement(c,{justifyContent:"space-between",width:"100%"},e.createElement(l,{color:i.text,bold:!0},"ACTIVE SUBAGENTS")),e.createElement(c,{flexDirection:"column",marginTop:1,width:"100%"},Kr.filter(n=>n.status==="running").map(n=>e.createElement(sc,{key:n.id,sa:n,showTPMEstimate:fe.showTPMEstimate})))),Un&&e.createElement(c,{flexDirection:"column",borderStyle:"round",borderColor:i.borderMuted,paddingX:2,paddingY:0,width:"100%",marginBottom:0},e.createElement(c,{justifyContent:"space-between",width:"100%"},e.createElement(c,{flexDirection:"row",gap:1},e.createElement(l,{color:i.warning||"yellow",bold:!0},"\u2726 ",Un.startsWith("/btw")?"Question Queued":"Steering Hint Queued"))),e.createElement(c,{marginTop:0,paddingLeft:2},e.createElement(l,{color:i.text,bold:!0},"\u2514\u2500 ",Un.startsWith("/btw")?Un.replace(/^\/btw\s*/,""):Un))),e.createElement(c,{paddingX:1,marginBottom:0,justifyContent:"space-between",width:"100%"},e.createElement(c,null,Pn?e.createElement(c,{gap:1},e.createElement(qd,null),e.createElement(Qn,{text:Pn.trimEnd(),baseColor:i.textExclusive||i.text,glintColor:i.textMutedExclusive||i.textMuted,speed:60,italic:!0,glintWidth:2,typeSpeed:10}),e.createElement(l,{color:i.textMuted},li>0?`(${li.toFixed(0)}s)`:"")):e.createElement(l,{color:i.textMuted,italic:!0},I.length>0&&ci?"Press ESC again to clear input":oa?"Press CTRL + O to expand":"Waiting for input...")),e.createElement(c,null,(()=>{let n=Pn?.toLowerCase()??"";return cn&&Date.now()-Ws>15e3&&Kr.length===0&&(n.includes("connecting")||n.includes("working")||n.includes("queue"))?e.createElement(c,null,e.createElement(Qn,{text:"Waiting for API",baseColor:i.text,glintColor:i.textMuted,glintWidth:4,speed:80}),e.createElement(l,{color:i.textMuted,dimColor:!0}," \u2503 ")):ts?e.createElement(c,null,e.createElement(Qn,{text:ts,baseColor:i.text,glintColor:i.textMuted,italic:!0,speed:80,typeSpeed:15}),e.createElement(l,{color:i.textMuted,dimColor:!0}," \u2503 ")):null})(),e.createElement(Qn,{text:St.basename(He)||(He.length>1?He:"Use '/model model-id' to select model"),baseColor:i.text,glintColor:i.textMuted,glintWidth:3}),e.createElement(l,{color:i.textMuted}," ",He.length>0?ae.toLocaleLowerCase().includes("xhigh")?"":`(${ae})`:""),Tr>0&&e.createElement(l,{color:i.textMuted}," [",Tr," ",Tr===1?"file":"files","]"))),e.createElement(c,{flexDirection:"column",width:"100%"},e.createElement(c,{width:"100%",height:1,overflow:"hidden"},e.createElement(l,{color:i.inputBorder},"\u2500".repeat(Math.max(1,$.columns)))),e.createElement(c,{paddingX:1,paddingY:0,width:"100%",flexDirection:"column"},e.createElement(c,{flexDirection:"column",width:"100%"},e.createElement(c,{flexDirection:"row",width:"100%",paddingY:0},e.createElement(c,{flexShrink:0,width:4},e.createElement(l,{color:i.inputPrompt,bold:!0},cn||ar?"\u2726 ":" \u276F ")),e.createElement(c,{flexGrow:1},e.createElement(c,{flexGrow:1,position:"relative"},I===""&&e.createElement(c,{position:"absolute",paddingLeft:0},oo&&!Ln?e.createElement(l,{color:"yellow"},ma?" Terminal is waiting for user input. Press TAB to interact":" Press TAB to interact with terminal..."):oo&&Ln?e.createElement(l,{color:"yellow",bold:!0}," [ TERMINAL FOCUSED ] Type to interact, press TAB to exit..."):ci===1?e.createElement(l,{color:i.inputPrompt,bold:!0}," Press ESC again to ",I.length>0?"clear input":"revert codebase to checkpoint","..."):e.createElement(l,{color:i.inputPlaceholder},sa?" Press ESC again to cancel the request.":ar?" Compacting session history, please wait...":cn?" Enter a prompt to steer the agent.":` Send message, @file or /cmd (${Rl.shortcut} for newline)`)),e.createElement(rl,{key:`input-${A}`,onPasteStateChange:na,focus:!Ln&&!ar,showCursor:lt&&!ar,cursorColor:i.inputText,lastFocusEventTime:Ge.current,value:I,textStyle:{bold:!0,color:i.inputText},columns:$.columns,onChange:n=>{let o=n.replace(/\r\n/g,`
282
+ **Restart to see changes.**`,isMeta:!0}])),z("chat")},onUpdateSettings:n=>{z("updateManager")}});case"terminalApproval":return e.createElement(c,{flexDirection:"column",borderStyle:"round",borderColor:"white",paddingX:2,paddingY:1,width:"100%"},e.createElement(l,{color:"white",bold:!0,underline:!0},"TERMINAL COMMAND OVERSIGHT"),e.createElement(c,{marginTop:1},e.createElement(l,null,"Agent requested to run: ",e.createElement(l,{color:"yellow",bold:!0},Hn(ko?.args||"{}").command||"Unknown Command"))),e.createElement(c,{marginTop:1},e.createElement(bt,{title:"Risk Assessment Required",items:[{label:"Run",value:"allow"},{label:"Deny",value:"deny"}],onSelect:n=>{ko.resolve(n.value),dn(null),z("chat")},theme:fe.theme})));default:return e.createElement(c,{flexDirection:"column",marginTop:1,flexShrink:0,width:"100%"},gi&&mi&&e.createElement(c,{flexDirection:"column",borderStyle:"round",borderColor:i.borderMuted,paddingX:2,paddingY:1,width:"100%",marginBottom:1},e.createElement(c,{justifyContent:"space-between",width:"100%"},e.createElement(l,{color:i.text,bold:!0,underline:!0},"INQUIRY RESPONSE"),e.createElement(l,{color:i.textMuted},"[ ESC to Close ]")),e.createElement(c,{marginTop:1,width:"100%"},e.createElement(Br,{text:mi,columns:$.columns-6,theme:fe.theme}))),Kr.filter(n=>n.status==="running").length>0&&e.createElement(c,{flexDirection:"column",borderStyle:"round",borderColor:i.borderMuted,paddingX:2,paddingY:0,width:"100%",marginBottom:1},e.createElement(c,{justifyContent:"space-between",width:"100%"},e.createElement(l,{color:i.text,bold:!0},"ACTIVE SUBAGENTS")),e.createElement(c,{flexDirection:"column",marginTop:1,width:"100%"},Kr.filter(n=>n.status==="running").map(n=>e.createElement(sc,{key:n.id,sa:n,showTPMEstimate:fe.showTPMEstimate})))),Un&&e.createElement(c,{flexDirection:"column",borderStyle:"round",borderColor:i.borderMuted,paddingX:2,paddingY:0,width:"100%",marginBottom:0},e.createElement(c,{justifyContent:"space-between",width:"100%"},e.createElement(c,{flexDirection:"row",gap:1},e.createElement(l,{color:i.warning||"yellow",bold:!0},"\u2726 ",Un.startsWith("/btw")?"Question Queued":"Steering Hint Queued"))),e.createElement(c,{marginTop:0,paddingLeft:2},e.createElement(l,{color:i.text,bold:!0},"\u2514\u2500 ",Un.startsWith("/btw")?Un.replace(/^\/btw\s*/,""):Un))),e.createElement(c,{paddingX:1,marginBottom:0,justifyContent:"space-between",width:"100%"},e.createElement(c,null,Pn?e.createElement(c,{gap:1},e.createElement(qd,null),e.createElement(Qn,{text:Pn.trimEnd(),baseColor:i.textExclusive||i.text,glintColor:i.textMutedExclusive||i.textMuted,speed:60,italic:!0,glintWidth:2,typeSpeed:10}),e.createElement(l,{color:i.textMuted},li>0?`(${li.toFixed(0)}s)`:"")):e.createElement(l,{color:i.textMuted,italic:!0},I.length>0&&ci?"Press ESC again to clear input":oa?"Press CTRL + O to expand":"Waiting for input...")),e.createElement(c,null,(()=>{let n=Pn?.toLowerCase()??"";return cn&&Date.now()-Ws>15e3&&Kr.length===0&&(n.includes("connecting")||n.includes("working")||n.includes("queue"))?e.createElement(c,null,e.createElement(Qn,{text:"Waiting for API",baseColor:i.text,glintColor:i.textMuted,glintWidth:4,speed:80}),e.createElement(l,{color:i.textMuted,dimColor:!0}," \u2503 ")):ts?e.createElement(c,null,e.createElement(Qn,{text:ts,baseColor:i.text,glintColor:i.textMuted,italic:!0,speed:80,typeSpeed:15}),e.createElement(l,{color:i.textMuted,dimColor:!0}," \u2503 ")):null})(),e.createElement(Qn,{text:St.basename(He)||(He.length>1?He:"Use '/model model-id' to select model"),baseColor:i.text,glintColor:i.textMuted,glintWidth:3}),e.createElement(l,{color:i.textMuted}," ",He.length>0?ae.toLocaleLowerCase().includes("xhigh")?"":`(${ae})`:""),Tr>0&&e.createElement(l,{color:i.textMuted}," [",Tr," ",Tr===1?"file":"files","]"))),e.createElement(c,{flexDirection:"column",width:"100%"},e.createElement(c,{width:"100%",height:1,overflow:"hidden"},e.createElement(l,{color:i.inputBorder},"\u2500".repeat(Math.max(1,$.columns)))),e.createElement(c,{paddingX:1,paddingY:0,width:"100%",flexDirection:"column"},e.createElement(c,{flexDirection:"column",width:"100%"},e.createElement(c,{flexDirection:"row",width:"100%",paddingY:0},e.createElement(c,{flexShrink:0,width:4},e.createElement(l,{color:i.inputPrompt,bold:!0},cn||ar?"\u2726 ":" \u276F ")),e.createElement(c,{flexGrow:1},e.createElement(c,{flexGrow:1,position:"relative"},I===""&&e.createElement(c,{position:"absolute",paddingLeft:0},oo&&!Ln?e.createElement(l,{color:"yellow"},ma?" Terminal is waiting for user input. Press TAB to interact":" Press TAB to interact with terminal..."):oo&&Ln?e.createElement(l,{color:"yellow",bold:!0}," [ TERMINAL FOCUSED ] Type to interact, press TAB to exit..."):ci===1?e.createElement(l,{color:i.inputPrompt,bold:!0}," Press ESC again to ",I.length>0?"clear input":"revert codebase to checkpoint","..."):e.createElement(l,{color:i.inputPlaceholder},sa?" Press ESC again to cancel the request.":ar?" Compacting session history, please wait...":cn?" Enter a prompt to steer the agent.":wt.filter(n=>n.role==="user").length===0?` Send message, @file or /cmd (${Rl.shortcut} for newline)`:" Ask Follow-ups")),e.createElement(rl,{key:`input-${A}`,onPasteStateChange:na,focus:!Ln&&!ar,showCursor:lt&&!ar,cursorColor:i.inputText,lastFocusEventTime:Ge.current,value:I,textStyle:{bold:!0,color:i.inputText},columns:$.columns,onChange:n=>{let o=n.replace(/\r\n/g,`
283
283
  `).replace(/\r/g,`
284
284
  `).replace(/\\\s*\n/g,`
285
285
  `);f(o),se(!1)},onSubmit:Ti,rows:1,maxRows:10,keyBindings:{submit:n=>n.return&&!n.shift&&!n.ctrl,newline:n=>n.return&&n.shift||n.return&&n.ctrl}})))))),e.createElement(c,{width:"100%",height:1,overflow:"hidden"},e.createElement(l,{color:i.inputBorder},"\u2500".repeat(Math.max(1,$.columns))))))}};return e.createElement(c,{flexDirection:"column",width:"100%"},we?null:pe?e.createElement(Rd,{width:s?.columns||80,height:s?.rows||24,selectedIndex:ve,aiProvider:k,theme:fe.theme}):e.createElement(e.Fragment,null,e.createElement(c,{paddingX:1,flexDirection:"column",width:"100%"},e.createElement(Kd,{key:`static-${Ko}-${dt}-${$.columns}-${fe.theme}`,items:pi.completed},n=>e.createElement(Dr,{key:n.key,block:n,columns:(s?.columns||80)-2,showFullThinking:Ro,aiProvider:k,version:lo,theme:fe.theme}))),e.createElement(c,{flexDirection:"column",paddingX:1,paddingBottom:0,width:"100%"},(mt==="chat"||["ask","approval","terminalApproval"].includes(mt))&&e.createElement(c,{flexDirection:"column",width:"100%"},pi.active.map(n=>e.createElement(Dr,{key:n.key,block:n,columns:Math.max(20,(s?.columns||80)-2),showFullThinking:Ro,aiProvider:k,version:lo,theme:fe.theme})),oo&&e.createElement(c,{marginTop:1},e.createElement(Er,{command:oo,output:ln,isFocused:Ln,isPty:gn,terminalHeight:$.rows,columns:$.columns}))),we?e.createElement(c,{borderStyle:"double",borderColor:"grey",padding:1,flexShrink:0},e.createElement(l,{color:"white"},"Starting Flux Flow...")):It?ga():e.createElement(c,{borderStyle:"round",borderColor:"white",padding:0,flexDirection:"column",flexShrink:0,width:"100%"},e.createElement(c,{paddingX:1,marginBottom:1},e.createElement(l,{color:"gray",bold:!0},"API KEY REQUIRED")),e.createElement(c,{paddingX:1,flexDirection:"column"},qe===0?e.createElement(e.Fragment,null,e.createElement(l,{color:"white"},"Select your Preferred Provider:"),e.createElement(c,{marginTop:1},e.createElement(bt,{searchable:!0,items:[{label:"Google",value:"Google"},{label:"Nvidia",value:"NVIDIA"},{label:"DeepSeek",value:"DeepSeek"},{label:"InferX",value:"InferX"},{label:"SenseNova",value:"SenseNova"},{label:"CrofAI",value:"CrofAI"},{label:"Poolside",value:"Poolside"},{label:"Experiential Labs",value:"ExpLabs"},{label:"Token Harbor",value:"TokenHarbor"},{label:"APInex",value:"APInex"},...process.env.ENABLE_9ROUTER==="true"||process.env.ENABLE_9ROUTER===!0?[{label:"9router",value:"9router"}]:[],{label:"Ollama",value:"Ollama"},{label:"AIHubMix [EXPERIMENTAL]",value:"AIHubMix"},{label:"Mistral [EXPERIMENTAL]",value:"Mistral"},{label:"OpenRouter [EXPERIMENTAL]",value:"OpenRouter"}],onSelect:n=>{Ue(n.value),Ct(1)}}))):e.createElement(e.Fragment,null,e.createElement(l,{color:"white"},k==="Ollama"?"Enter Ollama API Key (or type LOCAL to use local host):":`Enter your ${k} API Key:`),e.createElement(c,{marginTop:1},e.createElement(l,{color:"gray",bold:!0}," ",">"," "),e.createElement(Pr,{value:eo,onChange:ao,onSubmit:bi,mask:"*"})))),e.createElement(c,{paddingX:1,marginTop:1},e.createElement(l,{color:"gray",italic:!0},qe===0?"(Use arrows to select and Enter to confirm, ESC to go back)":"(Press Enter to confirm and initialize, ESC to go back)"))),h&&e.createElement(c,{borderStyle:"round",borderColor:i.borderMuted,paddingX:1,marginY:0,width:"100%"},e.createElement(l,null,e.createElement(l,{color:"red",bold:!0},"\u{1F534} EXIT: "),e.createElement(l,{color:i.text},"Press "),e.createElement(l,{color:i.text,bold:!0},"CTRL+C"),e.createElement(l,{color:i.text}," again to exit (",w,"s) \u2022 Press "),e.createElement(l,{color:i.textMuted,bold:!0},"ESC"),e.createElement(l,{color:i.text}," to cancel"))),Ve.length>0&&(()=>{let o=ie.current,d=0;for(;d<Ve.length;){let F=Ve[d],q=F?.cmd||F||"";if(typeof q=="string"&&q.trimStart().startsWith("---"))d++;else break}me<=d?o=0:me<o?o=me:me>=o+5&&(o=me-5+1),o=Math.max(0,Math.min(o,Math.max(0,Ve.length-5))),ie.current=o;let x=Ve.slice(o,o+5),m=Ve.length-(o+x.length),M=Ve[0]?.cmd?.startsWith("@")||Ve[0]?.cmd?.startsWith("\\@"),u=I.startsWith("/model"),a=I.startsWith("/thinking"),b=Ve.length,B=Math.min(b,me+1);return e.createElement(c,{flexDirection:"column",width:"100%",marginBottom:1,marginTop:0},e.createElement(c,{paddingX:1,marginBottom:0,justifyContent:"space-between",width:"100%"},e.createElement(c,{flexDirection:"row"},e.createElement(l,{color:i.primary||i.text,bold:!0},M?"FILES":u?"SAVED MODELS":a?"THINKING LEVELS":"COMMANDS"),e.createElement(l,{color:i.textMuted}," (",b,")")),e.createElement(c,{flexDirection:"row"},M?e.createElement(l,{color:i.textMuted,italic:!0},"Use #Lstart-Lend for line range \u2022 Tab to select"):e.createElement(l,{color:i.textMuted,italic:!0},"\u2191/\u2193 navigate \u2022 Tab / Enter select \u2022 Esc dismiss"))),e.createElement(c,{width:"100%",height:1,overflow:"hidden"},e.createElement(l,{color:i.borderDim||i.inputBorder||i.textDim},"\u2500".repeat(Math.max(1,$.columns)))),x.slice(0,ur).map((F,q)=>{let Y=o+q===me,V=typeof F.cmd=="string"&&F.cmd.trimStart().startsWith("---"),K=F.cmd===go("Google","Free")&&at!=="Free",G=F.display||(F.cmd&&(F.cmd.startsWith("@[")||F.cmd.startsWith("\\@["))&&F.cmd.endsWith("]")?(()=>{let _e=(F.cmd.startsWith("\\@[")?F.cmd.slice(3,-1):F.cmd.slice(2,-1)).split(/[\/\\]/);return _e[_e.length-1]})():F.cmd&&F.cmd.includes("/")?F.cmd.split("/").pop():F.cmd);if(u){let _e=F.multimodal===!0||hr(F.cmd||F)?"Multimodal":"Text Only";return e.createElement(c,{key:F.cmd||q,flexDirection:"row",backgroundColor:Y?i.highlightBg:void 0,paddingX:1,height:1,alignItems:"center",justifyContent:"space-between"},e.createElement(c,{flexDirection:"row",alignItems:"center",flexGrow:1,overflow:"hidden"},e.createElement(c,{width:3,flexShrink:0},e.createElement(l,{color:Y?i.primary||i.text:i.textMuted,bold:Y},Y?"\u276F ":" ")),e.createElement(l,{color:V?i.textDim:K?i.textMuted:Y&&i.inputText||i.text,bold:Y},G)),e.createElement(c,{flexShrink:0,marginLeft:2},e.createElement(l,{color:Y?i.text:i.textMuted,italic:!Y},_e)))}return e.createElement(c,{key:F.cmd||q,flexDirection:"row",backgroundColor:Y?i.highlightBg:void 0,paddingX:1,height:1,alignItems:"center"},e.createElement(c,{width:3,flexShrink:0},e.createElement(l,{color:Y?i.primary||i.text:i.textMuted,bold:Y},Y?"\u276F ":" ")),e.createElement(c,{width:26,flexShrink:0},e.createElement(l,{color:V?i.textDim:K?i.textMuted:Y&&i.inputText||i.text,bold:Y},G)),e.createElement(c,{flexGrow:1,overflow:"hidden"},e.createElement(l,{color:Y?i.text:i.textMuted,italic:!Y},F.desc)))}),Ve.length>5&&e.createElement(c,{paddingX:1,height:1,justifyContent:"space-between",width:"100%"},e.createElement(l,{color:i.textMuted,dimColor:!0,italic:!0},m>0?`... ${m} more available`:"(End of list)"),e.createElement(l,{color:i.textMuted,dimColor:!0},`${B}/${b}`)))})(),e.createElement(c,{flexShrink:0,width:"100%"},e.createElement(fl,{mode:v,thinkingLevel:ae,tokens:co.tokens,tokensTotal:Xl,cachedTokens:Gl,promptTokens:Wl,chatId:dt,isMemoryEnabled:fe.memory,apiTier:at,aiProvider:k,activeModel:He,isProcessing:cn,lastChunkTime:Ws,theme:fe.theme,wps:Wr.current.wps,showTPMEstimate:fe.showTPMEstimate})),mt==="exit"&&(()=>{let n=Date.now()-Us,o=Et.toolSuccess+Et.toolFailure,d=o>0?(Et.toolSuccess/o*100).toFixed(1):"0.0",x=tr+or,m=x>0?(tr/x*100).toFixed(1):"0.0",M=x>0?(or/x*100).toFixed(1):"0.0";return e.createElement(c,{flexDirection:"column",borderStyle:"round",paddingX:3,paddingY:1,borderColor:i.borderMuted,width:Math.min(100,(s?.columns||100)-2),marginTop:0,marginBottom:0},e.createElement(c,{marginBottom:1},e.createElement(l,{bold:!0},Qd(i.logoGradient||["blue","purple"])("Agent powering down. Goodbye!"))),e.createElement(c,{flexDirection:"column"},e.createElement(l,{color:i.text,bold:!0,underline:!0},"Interaction Summary"),e.createElement(c,{marginTop:1},e.createElement(c,{width:20},e.createElement(l,{color:i.secondary},"Session ID:")),e.createElement(l,{color:i.text},dt)),e.createElement(c,null,e.createElement(c,{width:20},e.createElement(l,{color:i.secondary},"Tool Calls:")),e.createElement(l,{color:i.text},Et.toolSuccess+Et.toolFailure+Et.toolDenied," ( ",e.createElement(l,{color:"green"},"\u2714 ",Et.toolSuccess)," ",e.createElement(l,{color:"yellow"},"\u{1F6C7} ",Et.toolDenied)," ",e.createElement(l,{color:"red"},"\u2718 ",Et.toolFailure)," )")),e.createElement(c,null,e.createElement(c,{width:20},e.createElement(l,{color:i.secondary},"Success Rate:")),e.createElement(l,{color:i.text},d,"%")),e.createElement(c,null,e.createElement(c,{width:20},e.createElement(l,{color:i.secondary},"Code Changes:")),e.createElement(l,{color:i.text},e.createElement(l,{color:"green"},"+",Et.linesAdded)," ",e.createElement(l,{color:"red"},"-",Et.linesRemoved))),Qt>0&&e.createElement(e.Fragment,null,e.createElement(c,null,e.createElement(c,{width:20},e.createElement(l,{color:i.secondary},"Tokens Consumed:")),e.createElement(l,{color:i.text},ht(Qt))),e.createElement(c,{marginLeft:2},e.createElement(c,{width:18},e.createElement(l,{color:i.textMuted},"\xBB Input Tokens:")),e.createElement(l,{color:i.text},ht(Qt-rn))),uo>0&&e.createElement(c,{marginLeft:4},e.createElement(c,{width:16},e.createElement(l,{color:i.textMuted},"\xBB Cached:")),e.createElement(l,{color:i.text},ht(uo))),rn>0&&e.createElement(c,{marginLeft:2},e.createElement(c,{width:18},e.createElement(l,{color:i.textMuted},"\xBB Output Tokens:")),e.createElement(l,{color:i.text},ht(rn)))),nr>0&&e.createElement(e.Fragment,null,e.createElement(c,null,e.createElement(c,{width:20},e.createElement(l,{color:i.secondary},"Images Made:")),e.createElement(l,{color:i.text},nr)),e.createElement(c,null,e.createElement(c,{width:20},e.createElement(l,{color:i.secondary},"Image Credits:")),e.createElement(l,{color:i.text},Number(((Zs||0)*1e3).toFixed(0))," credits")))),e.createElement(c,{flexDirection:"column",marginTop:1},e.createElement(l,{color:i.text,bold:!0,underline:!0},"Performance"),e.createElement(c,{marginTop:1},e.createElement(c,{width:20},e.createElement(l,{color:i.secondary},"Wall Time:")),e.createElement(l,{color:i.text},Yo(n))),e.createElement(c,null,e.createElement(c,{width:20},e.createElement(l,{color:i.secondary},"Agent Active:")),e.createElement(l,{color:i.text},Yo(x))),e.createElement(c,{marginLeft:2},e.createElement(c,{width:18},e.createElement(l,{color:i.textMuted},"\xBB API Time:")),e.createElement(l,{color:i.text},Yo(tr)," (",m,"%)")),e.createElement(c,{marginLeft:2},e.createElement(c,{width:18},e.createElement(l,{color:i.textMuted},"\xBB Tool Time:")),e.createElement(l,{color:i.text},Yo(or)," (",M,"%)"))))})())))}export{Ns as check9RouterReachable,ic as default};