import{pU as L,qU as P,rU as $,vU as Q,wU as U,xU as V,yU as j}from"./cli-0.5.4-kqh172jk.mjs";import{Zma as Z}from"./cli-0.5.4-aacw1src.mjs";function w(k,D){let G=new Date(k.timestamp).toISOString(),B=`${G.slice(0,10)} ${G.slice(11,19)}`,I=L(k.metrics);return`  #${String(D+1).padStart(3)}  ${B}  ${k.label.padEnd(28).slice(0,28)}  ${I}`}function K(k,D){return`${k.padEnd(18)}${P(D)}`}var v=20,O=async()=>{let k=V(),D=U(),G=Q();if(k.length===0)return{type:"text",value:`Cache stats
  No API requests yet this session.
  Start a turn and re-run /cache-stats to see results.`};let B=k.slice(-v),I=k.length-B.length,q=["Cache stats",""];q.push(K("Current turn:",G)),q.push(K("Session total:",D)),q.push(""),q.push(`Recent requests (${B.length}${I>0?` of ${k.length}, ${I} older omitted`:""}):`),q.push("  #     time      model                         cache");for(let[J,Y]of B.entries())q.push(w(Y,k.length-B.length+J));if(B.some((J)=>!J.metrics.supported))q.push(""),q.push("  N/A rows: provider API does not expose cache usage (GitHub Copilot, Ollama)."),q.push("  The request still ran normally — only the metric is unavailable.");return{type:"text",value:q.join(`
`)}};var A=Z(()=>{j();$()});A();export{O as call};
