fluxflow-cli 4.29.1 → 4.30.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.
@@ -1 +1 @@
1
- import{A as s,B as t,j as b,k as c,l as d,m as e,n as f,o as g,p as h,q as i,r as j,s as k,t as l,u as m,v as n,w as o,x as p,y as q,z as r}from"./chunk-6GWI4O7T.js";import"./chunk-JS5ZIGFR.js";import"./chunk-56EJGQU3.js";import"./chunk-7SFAWGE2.js";import"./chunk-U2NRX2PX.js";import"./chunk-VYTQ6J56.js";import"./chunk-RZTZPIC5.js";import"./chunk-53AFLLUU.js";import"./chunk-FQBBOFNP.js";import"./chunk-Y5JU726N.js";import"./chunk-KHCAQOSP.js";import"./chunk-NOSZCVRF.js";import"./chunk-RVCMZTHS.js";import{k as a}from"./chunk-63V6P5DU.js";import"./chunk-L3W2X74K.js";import"./chunk-DSVLWYIT.js";export{c as RE_LEADING_THINK,q as compressHistory,b as convertChannelThinkTags,r as deleteChatSummary,e as findGenuineThinkClose,p as generateSimpleContent,s 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,t as runSubagent,k as signalTermination,g as stripLeadingThinking,h as stripNakedXmlTags,i as stripTrailingFluffAfterTools};
1
+ import{A as s,B as t,j as b,k as c,l as d,m as e,n as f,o as g,p as h,q as i,r as j,s as k,t as l,u as m,v as n,w as o,x as p,y as q,z as r}from"./chunk-LGI76ZQV.js";import"./chunk-JS5ZIGFR.js";import"./chunk-56EJGQU3.js";import"./chunk-7SFAWGE2.js";import"./chunk-U2NRX2PX.js";import"./chunk-VYTQ6J56.js";import"./chunk-RZTZPIC5.js";import"./chunk-53AFLLUU.js";import"./chunk-FQBBOFNP.js";import"./chunk-Y5JU726N.js";import"./chunk-KHCAQOSP.js";import"./chunk-QJZ24WJZ.js";import"./chunk-RVCMZTHS.js";import{k as a}from"./chunk-63V6P5DU.js";import"./chunk-L3W2X74K.js";import"./chunk-DSVLWYIT.js";export{c as RE_LEADING_THINK,q as compressHistory,b as convertChannelThinkTags,r as deleteChatSummary,e as findGenuineThinkClose,p as generateSimpleContent,s 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,t as runSubagent,k as signalTermination,g as stripLeadingThinking,h as stripNakedXmlTags,i as stripTrailingFluffAfterTools};
@@ -1,4 +1,4 @@
1
- import{A as ll,a as Yi,b as Ze,c as rt,d as Cr,e as vr,f as zi,g as Ss,h as nn,i as Br,s as nl,v as rl,w as Do,y as sl,z as il}from"./chunk-6GWI4O7T.js";import{a as Yt,b as Ki,c as qi}from"./chunk-JS5ZIGFR.js";import{b as Ri,c as el,d as tl}from"./chunk-SZYN3VHU.js";import{a as ol}from"./chunk-56EJGQU3.js";import"./chunk-7SFAWGE2.js";import{c as Vi,e as En,f as Zt,g as ji}from"./chunk-QXN5B2BR.js";import"./chunk-U2NRX2PX.js";import{a as Zi}from"./chunk-A73NNVCZ.js";import{a as Wo,b as Bn,d as Er,e as Ms,f as Qi,h as Ji,i as qn}from"./chunk-VYTQ6J56.js";import"./chunk-RZTZPIC5.js";import{a as Bt,b as xt,d as Wi,e as ht,f as Xi,j as ws,k as ys,l as Vn,n as Gi,o as Io}from"./chunk-53AFLLUU.js";import{a as Kn}from"./chunk-FQBBOFNP.js";import{a as jn}from"./chunk-Y5JU726N.js";import{b as Ho,c as hs,k as Ni}from"./chunk-KHCAQOSP.js";import{b as Ts}from"./chunk-EJ2KVNJC.js";import{a as Fi,b as Ui,f as $i,g as Mr,h as Sr,j as Et,k as on,l as bs,r as _i}from"./chunk-NOSZCVRF.js";import{a as ps,b as Dt}from"./chunk-RVCMZTHS.js";import{d as Ii,e as Di,f as ki,g as Ai,h as Li,i as Oi,k as yr,m as _o,n as Jt,o as Pi}from"./chunk-63V6P5DU.js";import{c as Tr,d as Bi,e as wr}from"./chunk-L3W2X74K.js";import{e as Hi}from"./chunk-NYIPDIEQ.js";import{a as lo,b as tn,c as fo,d as fs,e as xs,k as Yn}from"./chunk-DSVLWYIT.js";import Ys from"os";import e,{useState as R,useEffect as st,useRef as Ke,useMemo as Ln}from"react";import{Box as u,Text as l,useInput as qd,useStdout as zd,Static as Qd}from"ink";import Jd from"ink-spinner";import ot from"fs-extra";import Ct from"path";import{exec as yo}from"child_process";import{fileURLToPath as Zd}from"url";import _t,{useState as Ir,useEffect as Cs,useMemo as zn,useCallback as Ta,useRef as ko}from"react";import{Box as wa,Text as ao,useInput as ya}from"ink";function Ma(t,f){return t.replace(/\t/g," ".repeat(f))}function Dr(t){return t==null?"":t.replace(/\r\n/g,`
1
+ import{A as ll,a as Yi,b as Ze,c as rt,d as Cr,e as vr,f as zi,g as Ss,h as nn,i as Br,s as nl,v as rl,w as Do,y as sl,z as il}from"./chunk-LGI76ZQV.js";import{a as Yt,b as Ki,c as qi}from"./chunk-JS5ZIGFR.js";import{b as Ri,c as el,d as tl}from"./chunk-SZYN3VHU.js";import{a as ol}from"./chunk-56EJGQU3.js";import"./chunk-7SFAWGE2.js";import{c as Vi,e as En,f as Zt,g as ji}from"./chunk-QXN5B2BR.js";import"./chunk-U2NRX2PX.js";import{a as Zi}from"./chunk-A73NNVCZ.js";import{a as Wo,b as Bn,d as Er,e as Ms,f as Qi,h as Ji,i as qn}from"./chunk-VYTQ6J56.js";import"./chunk-RZTZPIC5.js";import{a as Bt,b as xt,d as Wi,e as ht,f as Xi,j as ws,k as ys,l as Vn,n as Gi,o as Io}from"./chunk-53AFLLUU.js";import{a as Kn}from"./chunk-FQBBOFNP.js";import{a as jn}from"./chunk-Y5JU726N.js";import{b as Ho,c as hs,k as Ni}from"./chunk-KHCAQOSP.js";import{b as Ts}from"./chunk-PDIXJ5UN.js";import{a as Fi,b as Ui,f as $i,g as Mr,h as Sr,j as Et,k as on,l as bs,r as _i}from"./chunk-QJZ24WJZ.js";import{a as ps,b as Dt}from"./chunk-RVCMZTHS.js";import{d as Ii,e as Di,f as ki,g as Ai,h as Li,i as Oi,k as yr,m as _o,n as Jt,o as Pi}from"./chunk-63V6P5DU.js";import{c as Tr,d as Bi,e as wr}from"./chunk-L3W2X74K.js";import{e as Hi}from"./chunk-NYIPDIEQ.js";import{a as lo,b as tn,c as fo,d as fs,e as xs,k as Yn}from"./chunk-DSVLWYIT.js";import Ys from"os";import e,{useState as R,useEffect as st,useRef as Ke,useMemo as Ln}from"react";import{Box as u,Text as l,useInput as qd,useStdout as zd,Static as Qd}from"ink";import Jd from"ink-spinner";import ot from"fs-extra";import Ct from"path";import{exec as yo}from"child_process";import{fileURLToPath as Zd}from"url";import _t,{useState as Ir,useEffect as Cs,useMemo as zn,useCallback as Ta,useRef as ko}from"react";import{Box as wa,Text as ao,useInput as ya}from"ink";function Ma(t,f){return t.replace(/\t/g," ".repeat(f))}function Dr(t){return t==null?"":t.replace(/\r\n/g,`
2
2
  `).replace(/\r/g,`
3
3
  `)}function rn(t,f,x){let M=t,T=[...f].sort((s,v)=>s.start-v.start),b=0;for(let s of T){let v=s.start-b,m=Dr(s.text).split(`
4
4
  `).length,A=s.text.length,k=(m>3?`[Pasted ${m} lines]`:`[Pasted ${A} chars]`).length,_=v+k;if(t<=v)break;if(t<_){M=s.end;break}else{let S=s.text.length-k;M+=S,b+=S}}return Math.min(M,x.length)}function vs(t,f,x,M,T=[]){let b=(t||"").slice(0,f),s=M(b).length,v=M(t||""),m=[...T].sort(($,F)=>F.start-$.start);for(let $ of m){let F=M(t.slice(0,$.start)).length,H=M($.text),K=F+H.length,xe=Dr($.text).split(`
@@ -22,7 +22,7 @@ import{A as ll,a as Yi,b as Ze,c as rt,d as Cr,e as vr,f as zi,g as Ss,h as nn,i
22
22
  `));m.push(r.createElement(I,{key:`quote-${S}`,borderStyle:"bold",borderLeft:!0,borderRight:!1,borderTop:!1,borderBottom:!1,borderColor:b.borderMuted,paddingLeft:1,marginY:1,flexDirection:"column"},O.map(($,F)=>r.createElement(Ht,{key:F,text:$,color:b.textMuted,italic:M,theme:T})))),k=[]}};return v.forEach((S,E)=>{let O=S.trim(),$=O.startsWith("|"),F=O.startsWith(">");if($)k.length>0&&_(E),A.push(S);else if(F)A.length>0&&_(E),k.push(O.replace(/^>\s*/,""));else{if(_(E),O===""){m.push(r.createElement(I,{key:E,height:1}));return}if(O==="---"||O==="***"||O==="___"){m.push(r.createElement(I,{key:E,marginY:0,borderStyle:"single",borderTop:!0,borderBottom:!1,borderLeft:!1,borderRight:!1,width:"100%",borderColor:b.borderMuted}));return}let H=O.match(/^(#{1,6})\s+(.*)/);if(H){let Z=H[1].length,de=H[2];m.push(r.createElement(I,{key:E,marginTop:1,marginBottom:0,width:"100%"},r.createElement(re,{bold:!0,color:Z===1?"yellow":Z===2?"magenta":Z===3?b.info||"cyan":Z===4?"green":Z===5?"blue":b.text,underline:!0},de)));return}let K=/^[\*\-\+]\s/.test(O),xe=/^\d+\.\s/.test(O),ie=S.includes("\u2588")||S.includes("\u2554")||S.includes("\u255A")||S.includes("\u2550"),J="";if(ie)J=S;else if(K||xe){let Z=K?" \u2022 ":O.match(/^\d+\.\s/)[0],de=" ".repeat(Z.length),De=xt(O.replace(/^[\*\-\d+\.]+\s/,""),x-(Z.length+6));J=Z+De.split(`
23
23
  `).join(`
24
24
  `+de)}else J=xt(O,x-4);m.push(r.createElement(I,{key:E,flexDirection:"column",width:"100%"},r.createElement(Ht,{text:J,color:s,italic:M,theme:T})))}}),_("final"),r.createElement(I,{flexDirection:"column",width:x-2},m)}),xl=r.memo(({line:t,pairContent:f,parentText:x,columns:M=80,extension:T,theme:b="Dark"})=>{let s=Ze(b),v=t.includes("[UI_CONTEXT]"),m=t.replace("[UI_CONTEXT]","");if(v&&m.includes("\u2550"))return r.createElement(I,{backgroundColor:s.codeBg,paddingX:1,width:M},r.createElement(re,{color:"gray"},"\u2550".repeat(Math.max(10,M-4))));let A=ws(t);if(!A)return r.createElement(I,{backgroundColor:s.codeBg,paddingX:1,width:M},r.createElement(I,{width:3,flexShrink:0}),r.createElement(I,{width:1,flexShrink:0,marginLeft:1}),r.createElement(I,{flexGrow:1,marginLeft:1},r.createElement(re,{color:"gray"},xt(m,M-14))));let{isR:k,isA:_,num:S,content:E}=A,O=f,$=[];if(O!=null){let de=k?E:O,De=k?O:E;try{$=Ea(de,De)}catch{$=[]}}let F=$.some(de=>k&&de.removed||_&&de.added),H=!O&&(k||_),K=k?s.diffRemovalBg:_?s.diffAdditionBg:void 0,xe=k||_?k?s.diffRemovalNum:s.diffAdditionNum:s.textMuted,ie=k?s.diffRemovalPrefix:s.diffAdditionPrefix,J=k?"-":_?"+":" ",Z=()=>{if(H){let he=k?s.diffRemovalHighlightBg:s.diffAdditionHighlightBg;return r.createElement(I,{flexDirection:"column"},Ft(xt(E,M-15),T,void 0,he))}if(!(k||_)||$.length===0||!F){let he=k?s.diffRemovalText:_?s.diffAdditionText:s.textMuted;return r.createElement(I,{flexDirection:"column"},Ft(xt(E,M-15),T,he,void 0))}let de=Math.max(10,M-15),De=xt(E,de).split(`
25
- `),Ce=[];if($.forEach((he,te)=>{let ne=/^\s+$/.test(he.value);if(k){let ee=$[te-1]?.removed||$[te+1]?.removed;he.removed||ne&&ee?Ce.push({text:he.value,isHighlight:!0}):he.added||Ce.push({text:he.value,isHighlight:!1})}else if(_){let ee=$[te-1]?.added||$[te+1]?.added;he.added||ne&&ee?Ce.push({text:he.value,isHighlight:!0}):he.removed||Ce.push({text:he.value,isHighlight:!1})}}),De.length<=1)return r.createElement(re,{wrap:"wrap"},Ce.map((he,te)=>k?he.isHighlight?r.createElement(r.Fragment,{key:te},Ft(he.text,T,s.diffRemovalHighlightColor,s.diffRemovalHighlightBg)):r.createElement(r.Fragment,{key:te},Ft(he.text,T,s.diffRemovalText)):_?he.isHighlight?r.createElement(r.Fragment,{key:te},Ft(he.text,T,s.diffAdditionHighlightColor,s.diffAdditionHighlightBg)):r.createElement(r.Fragment,{key:te},Ft(he.text,T,s.diffAdditionText)):r.createElement(r.Fragment,{key:te},Ft(he.text,T,s.textMuted))));let Ue=0,ce=0,Ae=E.match(/^(\s*)/),Te=Ae?Ae[1]:"",oe=Te.substring(0,Math.min(Te.length,8)),Xe=De.map((he,te)=>{let ne=[],ee=he;te>0&&oe&&he.startsWith(oe)&&((Ce[Ue]?Ce[Ue].text.substring(ce):"").startsWith(oe)||(ne.push({text:oe,isHighlight:!1}),ee=he.substring(oe.length)));let ue=ee.length;for(;ue>0&&Ue<Ce.length;){let pe=Ce[Ue],be=pe.text.length-ce;if(be<=0){Ue++,ce=0;continue}let Le=Math.min(ue,be);ne.push({text:pe.text.substring(ce,ce+Le),isHighlight:pe.isHighlight}),ce+=Le,ue-=Le,ce>=pe.text.length&&(Ue++,ce=0)}for(;Ue<Ce.length;){let pe=Ce[Ue],be=pe.text.substring(ce);if(/^\s+$/.test(be))Ue++,ce=0;else if(be.startsWith(" ")||be.startsWith(" ")){let Le=0;for(;Le<be.length&&(be[Le]===" "||be[Le]===" ");)Le++;ce+=Le,ce>=pe.text.length&&(Ue++,ce=0);break}else break}return ne});if(Ue<Ce.length){let he=Xe[Xe.length-1];for(;Ue<Ce.length;){let te=Ce[Ue];he.push({text:te.text.substring(ce),isHighlight:te.isHighlight}),Ue++,ce=0}}return r.createElement(I,{flexDirection:"column"},Xe.map((he,te)=>r.createElement(I,{key:te},r.createElement(re,{wrap:"wrap"},he.map((ne,ee)=>k?ne.isHighlight?r.createElement(r.Fragment,{key:ee},Ft(ne.text,T,s.diffRemovalHighlightColor,s.diffRemovalHighlightBg)):r.createElement(r.Fragment,{key:ee},Ft(ne.text,T,s.diffRemovalText)):_?ne.isHighlight?r.createElement(r.Fragment,{key:ee},Ft(ne.text,T,s.diffAdditionHighlightColor,s.diffAdditionHighlightBg)):r.createElement(r.Fragment,{key:ee},Ft(ne.text,T,s.diffAdditionText)):r.createElement(r.Fragment,{key:ee},Ft(ne.text,T,s.textMuted)))))))};return r.createElement(I,{backgroundColor:s.codeBg,paddingX:1,width:M},r.createElement(I,{width:4,flexShrink:0,justifyContent:"flex-end"},r.createElement(re,{color:xe},S)),r.createElement(I,{width:1,flexShrink:0,marginLeft:1},r.createElement(re,{color:ie},J)),r.createElement(I,{marginLeft:1,backgroundColor:K,flexGrow:1},Z()))}),hd=r.memo(({text:t,columns:f=80,extension:x,theme:M="Dark"})=>{let T=Ze(M),b=t.match(/\[DIFF_START\]([\s\S]*?)(?:\[DIFF_END\]|$)/),m=(b?b[1].trim():"").split(`
25
+ `),Ce=[];if($.forEach((he,te)=>{let ne=/^\s+$/.test(he.value);if(k){let ee=$[te-1]?.removed||$[te+1]?.removed;he.removed||ne&&ee?Ce.push({text:he.value,isHighlight:!0}):he.added||Ce.push({text:he.value,isHighlight:!1})}else if(_){let ee=$[te-1]?.added||$[te+1]?.added;he.added||ne&&ee?Ce.push({text:he.value,isHighlight:!0}):he.removed||Ce.push({text:he.value,isHighlight:!1})}}),De.length<=1)return r.createElement(re,{wrap:"wrap"},Ce.map((he,te)=>k?he.isHighlight?r.createElement(r.Fragment,{key:te},Ft(he.text,T,s.diffRemovalText,s.diffRemovalHighlightBg)):r.createElement(r.Fragment,{key:te},Ft(he.text,T,s.diffRemovalText)):_?he.isHighlight?r.createElement(r.Fragment,{key:te},Ft(he.text,T,s.diffAdditionText,s.diffAdditionHighlightBg)):r.createElement(r.Fragment,{key:te},Ft(he.text,T,s.diffAdditionText)):r.createElement(r.Fragment,{key:te},Ft(he.text,T,s.textMuted))));let Ue=0,ce=0,Ae=E.match(/^(\s*)/),Te=Ae?Ae[1]:"",oe=Te.substring(0,Math.min(Te.length,8)),Xe=De.map((he,te)=>{let ne=[],ee=he;te>0&&oe&&he.startsWith(oe)&&((Ce[Ue]?Ce[Ue].text.substring(ce):"").startsWith(oe)||(ne.push({text:oe,isHighlight:!1}),ee=he.substring(oe.length)));let ue=ee.length;for(;ue>0&&Ue<Ce.length;){let pe=Ce[Ue],be=pe.text.length-ce;if(be<=0){Ue++,ce=0;continue}let Le=Math.min(ue,be);ne.push({text:pe.text.substring(ce,ce+Le),isHighlight:pe.isHighlight}),ce+=Le,ue-=Le,ce>=pe.text.length&&(Ue++,ce=0)}for(;Ue<Ce.length;){let pe=Ce[Ue],be=pe.text.substring(ce);if(/^\s+$/.test(be))Ue++,ce=0;else if(be.startsWith(" ")||be.startsWith(" ")){let Le=0;for(;Le<be.length&&(be[Le]===" "||be[Le]===" ");)Le++;ce+=Le,ce>=pe.text.length&&(Ue++,ce=0);break}else break}return ne});if(Ue<Ce.length){let he=Xe[Xe.length-1];for(;Ue<Ce.length;){let te=Ce[Ue];he.push({text:te.text.substring(ce),isHighlight:te.isHighlight}),Ue++,ce=0}}return r.createElement(I,{flexDirection:"column"},Xe.map((he,te)=>r.createElement(I,{key:te},r.createElement(re,{wrap:"wrap"},he.map((ne,ee)=>k?ne.isHighlight?r.createElement(r.Fragment,{key:ee},Ft(ne.text,T,s.diffRemovalText,s.diffRemovalHighlightBg)):r.createElement(r.Fragment,{key:ee},Ft(ne.text,T,s.diffRemovalText)):_?ne.isHighlight?r.createElement(r.Fragment,{key:ee},Ft(ne.text,T,s.diffAdditionText,s.diffAdditionHighlightBg)):r.createElement(r.Fragment,{key:ee},Ft(ne.text,T,s.diffAdditionText)):r.createElement(r.Fragment,{key:ee},Ft(ne.text,T,s.textMuted)))))))};return r.createElement(I,{backgroundColor:s.codeBg,paddingX:1,width:M},r.createElement(I,{width:4,flexShrink:0,justifyContent:"flex-end"},r.createElement(re,{color:xe},S)),r.createElement(I,{width:1,flexShrink:0,marginLeft:1},r.createElement(re,{color:ie},J)),r.createElement(I,{marginLeft:1,backgroundColor:K,flexGrow:1},Z()))}),hd=r.memo(({text:t,columns:f=80,extension:x,theme:M="Dark"})=>{let T=Ze(M),b=t.match(/\[DIFF_START\]([\s\S]*?)(?:\[DIFF_END\]|$)/),m=(b?b[1].trim():"").split(`
26
26
  `).map(k=>({line:k,parsed:ws(k),pairContent:null})),A=[];for(let k=0;k<m.length;k++){let _=m[k];_.parsed&&(_.parsed.isR||_.parsed.isA)?A.push(_):A.length>0&&(ys(A),A=[])}return A.length>0&&ys(A),r.createElement(I,{flexDirection:"column",width:f-3,marginBottom:1},r.createElement(I,{flexDirection:"column",paddingY:0,width:"100%"},r.createElement(I,{backgroundColor:T.codeBg,paddingX:1,width:"100%"},r.createElement(I,{width:3,flexShrink:0}),r.createElement(I,{width:1,flexShrink:0,marginLeft:1}),r.createElement(I,{flexGrow:1,marginLeft:1},r.createElement(re,null," "))),m.map((k,_)=>r.createElement(xl,{key:_,line:k.line,pairContent:k.pairContent,columns:f-3,extension:x,theme:M})),r.createElement(I,{backgroundColor:T.codeBg,paddingX:1,width:"100%"},r.createElement(I,{width:3,flexShrink:0}),r.createElement(I,{width:1,flexShrink:0,marginLeft:1}),r.createElement(I,{flexGrow:1,marginLeft:1},r.createElement(re,null," ")))))}),Ar=r.memo(({text:t,columns:f=80,theme:x="Dark"})=>{if(!t)return null;let M=Ze(x),T="",b=t.match(/File\s+\[(.*?)\]/i);if(b&&(T=b[1].split(".").pop().toLowerCase()),t.includes("[DIFF_START]"))return r.createElement(hd,{text:t,columns:f,extension:T,theme:x});if(t.includes("- Content Preview:")){let s=t.split("- Content Preview:"),v=s[0],m=s[1]||"",A="[SYSTEM] Check the content preview for verification [/SYSTEM]",k=m.split(A),_=k[0]?.trim()||"",S=k[1]?`${A}${k[1]}`:"",E=_.split(`
27
27
  `),O=String(E.length).length;return r.createElement(I,{flexDirection:"column",width:f-3},r.createElement(I,{flexDirection:"column",borderStyle:"single",borderLeft:!1,borderRight:!1,borderTop:!1,borderBottom:!1,borderColor:M.codeBorder,paddingLeft:2,paddingRight:0,width:"100%",marginBottom:1,backgroundColor:M.codeBg},r.createElement(I,{flexDirection:"column",width:"100%"},r.createElement(I,{width:"100%"},r.createElement(I,{width:O+2,flexShrink:0},r.createElement(re,null," ")),r.createElement(I,{flexGrow:1},r.createElement(re,null," "))),E.map(($,F)=>r.createElement(I,{key:F,width:"100%"},r.createElement(I,{width:O+2,flexShrink:0},r.createElement(re,{color:"gray",dimColor:!0},String(F+1).padStart(O," ")," ")),r.createElement(I,{flexGrow:1},Ft($,T,M.text)))),r.createElement(I,{width:"100%"},r.createElement(I,{width:O+2,flexShrink:0},r.createElement(re,null," ")),r.createElement(I,{flexGrow:1},r.createElement(re,null," "))))))}if(t.includes("```")){let s=t.split(/(```\w*\n?[\s\S]*?(?:```|$))/g);return r.createElement(I,{flexDirection:"column",width:f-3},s.map((v,m)=>{if(v.startsWith("```")){let k=v.match(/```(\w*)\n?([\s\S]*?)(?:```|$)/),_=k?k[1]:"code",S=k?k[2]:v.replace(/^```\w*\n?/,"").replace(/```$/,""),E=S.trimEnd().split(`
28
28
  `),O=String(E.length).length,$=f-7-O,H=($>5?xt(S,$):S).trimEnd().split(`