module.exports=[93695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},31983,(a,b,c)=>{b.exports=a.r(18622)},62807,a=>{a.n(a.i(90605))},73121,a=>{a.n(a.i(30983))},84194,a=>{a.n(a.i(31198))},59018,a=>{a.n(a.i(22631))},27767,a=>{a.n(a.i(18330))},8672,a=>{a.n(a.i(76614))},82302,a=>{a.n(a.i(97555))},44174,a=>{a.n(a.i(5810))},63098,a=>{a.n(a.i(95492))},8619,a=>{a.n(a.i(64063))},80988,a=>{a.n(a.i(19999))},44523,a=>{a.n(a.i(9545))},53312,a=>{a.n(a.i(9469))},83834,a=>{a.n(a.i(90386))},84278,a=>{a.n(a.i(94334))},90442,a=>{a.n(a.i(780))},68246,a=>{a.n(a.i(34497))},6330,a=>{a.n(a.i(12977))},41405,a=>{a.n(a.i(7213))},25052,a=>{a.n(a.i(87429))},13557,a=>{a.n(a.i(96077))},56043,a=>{a.n(a.i(18035))},2246,a=>{a.n(a.i(69986))},44791,a=>{a.n(a.i(90453))},61714,a=>{a.n(a.i(26058))},60946,a=>{a.n(a.i(17335))},29644,a=>{a.n(a.i(34171))},85422,a=>{a.n(a.i(76773))},1654,a=>{a.n(a.i(80778))},66146,a=>{a.n(a.i(92823))},24457,a=>{a.n(a.i(84393))},5662,a=>{a.n(a.i(83962))},10921,a=>{a.n(a.i(31803))},85860,a=>{a.n(a.i(85533))},72848,a=>{"use strict";var b=a.i(2157),c=a.i(60526),d=a.i(50227),e=a.i(19078),f=a.i(18245);let g=process.env.OPENCLAW_HOME??(0,d.join)((0,c.homedir)(),".openclaw"),h="cron:";async function i(a,c,i){let j=new Map;if(0===i.length)return j;let k=new Set,l=[];for(let a of i)if(!a.pending)if(a.label.startsWith(h)){let b=a.label.split(":")[1];b&&k.add(b)}else l.push(a.label);let m=new Map;if(l.length>0)for(let b of(0,e.listTasksByAgent)(a))b.thread_id&&m.set(b.thread_id,{display_id:b.display_id,title:b.title});let n=new Map;if(k.size>0)for(let a of(await (0,f.listCronsForProject)(c)).groups)for(let b of a.crons)n.set(b.id,b.short_name||b.name);for(let c of i){if(c.pending)continue;if(c.label.startsWith(h)){let a=c.label.split(":")[1]??"",b=n.get(a);j.set(c.label,{kind:"cron",cron_name:b??`cron \xb7 ${a.slice(0,8)}`});continue}let e=m.get(c.label);if(e){j.set(c.label,{kind:"task",display_id:e.display_id,title:e.title});continue}j.set(c.label,{kind:"chat",preview:function(a,c){let e,f,h=(0,d.join)(g,"agents",a,"sessions",`${c}.jsonl`);if(!(0,b.existsSync)(h))return"";try{e=(0,b.openSync)(h,"r")}catch{return""}try{let a=(0,b.statSync)(h).size,c=Math.min(a,32768),d=Buffer.alloc(c);(0,b.readSync)(e,d,0,c,0),f=d.toString("utf8")}catch{return""}finally{try{(0,b.closeSync)(e)}catch{}}for(let a of f.split("\n")){let b,c=a.trim();if(!c)continue;try{b=JSON.parse(c)}catch{continue}if("message"!==b.type)continue;let d=b.message;if(!d||"user"!==d.role)continue;let e=function(a){if("string"==typeof a)return a;if(!Array.isArray(a))return"";let b=[];for(let c of a)"string"==typeof c?b.push(c):c&&"object"==typeof c&&"text"===c.type&&"string"==typeof c.text&&b.push(c.text);return b.join(" ")}(d.content);if(e)return function(a){let b=a.replace(/\s+/g," ").trim();return b.length<=40?b:b.slice(0,39)+"…"}(e.replace(/^\[[A-Z][a-z]{2} \d{4}-\d{2}-\d{2} \d{2}:\d{2} [A-Z]{2,5}\] ?/,""))}return""}(a,c.sessionId)})}return j}a.s(["classifySessions",0,i,"pickLatestChatSession",0,function(a,b){return a.find(a=>{var c;return c=a.label,!(c.startsWith(h)||b.has(c))})}])},5405,a=>{"use strict";a.i(32268);var b=a.i(42378),c=a.i(75170),d=a.i(29855),e=a.i(22486),f=a.i(72848),g=a.i(19078),h=a.i(42032);async function i({params:a}){let{agent:j,project:k}=await a,l=(0,c.getProject)(k);(!l||l.archived_at)&&(0,b.notFound)();let m=await (0,d.resolveAgentBySlug)(l.slug,j);m||(0,b.notFound)();let n=new Set;for(let a of(0,g.listTasksByAgent)(m.agent_id))a.thread_id&&n.add(a.thread_id);let o=(0,e.listSessionsForAgent)(m.agent_id),p=(0,f.pickLatestChatSession)(o,n),q=p?.sessionId??(0,e.newSessionId)();(0,b.redirect)((0,h.projectHref)(k,`/agents/${j}/chat/${q}`))}a.s(["default",0,i])},88507,a=>{a.n(a.i(5405))}];

//# sourceMappingURL=%5Broot-of-the-server%5D__0_d0~jc._.js.map