import{n as e}from"./rolldown-runtime-DkW27tQK.js";import{C as t,_ as n,b as r,m as i,w as a,y as o}from"./control-ui-core-pH6nakZ-.js";import{Ht as s,qt as c}from"./control-ui-core-Br5DB0Zj.js";import{Tc as l}from"./control-ui-boot-Cdpgu1Gm.js";function u(e){if(!e)return c(`common.na`);let t=i(e,{weekday:`short`});return t===c(`common.na`)?t:`${t}, ${o(e)} (${r(e)})`}function d(e){if(e.totalTokens==null)return c(`common.na`);let t=e.totalTokens??0,n=e.contextTokens??0;return n?`${t} / ${n}`:String(t)}function f(e){if(e==null)return``;try{return JSON.stringify(e,null,2)}catch{return t(e)}}function p(e){let t=e.state??{},n=t.nextRunAtMs?o(t.nextRunAtMs):c(`common.na`),r=t.lastRunAtMs?o(t.lastRunAtMs):c(`common.na`);return`${l(e)} · next ${n} · last ${r}`}function m(e){let t=e.schedule;if(t.kind===`at`){let e=Date.parse(t.at);return Number.isFinite(e)?`At ${o(e)}`:`At ${t.at}`}return t.kind===`every`?`Every ${n(t.everyMs)}`:t.kind===`on-exit`?`On exit: ${t.command}${t.cwd?` (cwd: ${t.cwd})`:``}`:t.kind===`stream`?`Stream: ${t.command.join(` `)}${t.cwd?` (cwd: ${t.cwd})`:``}`:`Cron ${t.expr}${t.tz?` (${t.tz})`:``}`}function h(e){let t=e.payload;if(t.kind===`systemEvent`)return`System: ${t.text}`;if(t.kind===`command`)return`Command: ${t.argv.join(` `)}`;if(t.kind===`script`)return`Script: ${t.script}`;if(t.kind===`heartbeat`)return`Heartbeat monitor`;if(t.kind===`skillCollectionReview`)return`Skill collection review`;let n=`Agent: ${t.message}`,r=e.delivery;if(r&&r.mode!==`none`){let e=r.mode===`webhook`?r.to?` (${r.to})`:``:r.channel||r.to?` (${r.channel??`last`}${r.to?` -> ${r.to}`:``})`:``;return`${n} · ${r.mode}${e}`}return n}function g(){return(g=e((()=>{s(),a()})))()}export{u as a,f as i,m as n,d as o,p as r,g as s,h as t};
//# sourceMappingURL=presenter-CKFufLDk.js.map