import{Xc as _,Zc as v}from"./cli-0.5.4-y471nstq.mjs";import{De as Z,Ee as P}from"./cli-0.5.4-nf79eb6z.mjs";import{Ut as Y,Yt as A,wt as X,yt as K}from"./cli-0.5.4-k5fz4zd3.mjs";import{JU as V,MU as C}from"./cli-0.5.4-vv4jbgkc.mjs";import{PY as H,RY as Q}from"./cli-0.5.4-mn22gk7g.mjs";import{SY as W}from"./cli-0.5.4-5t3jj85n.mjs";import{Nca as L,Oca as U}from"./cli-0.5.4-7grzwf6q.mjs";import{Vma as B,Zma as M}from"./cli-0.5.4-aacw1src.mjs";function x({children:q}){let{bindings:D}=X(),F=J.useRef(null),E=J.useRef(new Map),G=J.useRef(new Set).current;return H(V,{bindings:D,pendingChordRef:F,pendingChord:null,setPendingChord:()=>{},activeContexts:G,registerActiveContext:()=>{},unregisterActiveContext:()=>{},handlerRegistryRef:E,children:q})}function y(q){if(!("message"in q))return 1;let D=q.message.content;return Array.isArray(D)?D.length:1}async function b(q,D,F,{columns:E,verbose:G=!1,chunkSize:I=40,onProgress:$}={}){let T=(w)=>_(H(Y,{children:H(x,{children:H(Z,{messages:q,tools:D,commands:[],verbose:G,toolJSX:null,toolUseConfirmQueue:[],inProgressToolUseIDs:new Set,isMessageSelectorVisible:!1,conversationId:"export",screen:"prompt",streamingToolUses:[],showAllInTranscript:!0,isLoading:!1,renderRange:w})})}),E),N=I;for(let w of q)N+=y(w);for(let w=0;w<N;w+=I){let O=await T([w,w+I]);if(L(O).trim()==="")break;await F(O),$?.(w+I)}}async function l(q,D=[],F){let E=[];return await b(q,D,(G)=>void E.push(L(G)),{columns:F}),E.join("")}var J;var j=M(()=>{U();P();C();K();A();v();Q();J=B(W(),1)});
export{l as Cb,j as Db};
