import{n as e}from"./chunk-DR8-3Aex.js";import{Ct as t,cn as n}from"./state-sIHsFpDu.js";import{f as r,l as i}from"./teammate-CbskW5G9.js";import{Ar as a,Fr as o,Ob as s,Tb as c,vi as l}from"./loadAgentsDir-C_wFhytF.js";async function u(e,n,i){if(r())return e(`Cannot set color: This session is a swarm teammate. Teammate colors are assigned by the team leader.`,{display:`system`}),null;if(!i||i.trim()===``)return e(`Please provide a color. Available colors: ${c.join(`, `)}, default`,{display:`system`}),null;let o=i.trim().toLowerCase();return d.includes(o)?(await l(t(),`default`,a()),n.setAppState(e=>({...e,standaloneAgentContext:{...e.standaloneAgentContext,name:e.standaloneAgentContext?.name??``,color:void 0}})),e(`Session color reset to default`,{display:`system`}),null):c.includes(o)?(await l(t(),o,a()),n.setAppState(e=>({...e,standaloneAgentContext:{...e.standaloneAgentContext,name:e.standaloneAgentContext?.name??``,color:o}})),e(`Session color set to: ${o}`,{display:`system`}),null):(e(`Invalid color "${o}". Available colors: ${c.join(`, `)}, default`,{display:`system`}),null)}var d;e((()=>{n(),s(),o(),i(),d=[`default`,`reset`,`none`,`gray`,`grey`]}))();export{u as call};