{#if hasAgents}
collapsed = !collapsed} >
{collapsed ? 'โธ' : 'โพ'}
Agents
{agents.length + projects.length}
{#each agents as agent (agent.id)} {@const status = getStatus(agent.id)}
{/each} {#if agents.length > 0 && projects.length > 0}
{/if} {#each projects as project (project.id)} {@const status = getStatus(project.id)}
{/each}
{#if !collapsed} {#if agents.length > 0}
Tier 1 โ Management
{#each agents as agent (agent.id)} {@const status = getStatus(agent.id)}
{ROLE_ICONS[agent.role] ?? '๐ค'}
{agent.name}
{ROLE_LABELS[agent.role] ?? agent.role}
{#if agent.model}
{agent.model}
{/if} {@const unread = getUnread(agent.id)} {#if unread > 0}
{unread}
{/if}
toggleAgent(agent)} title={status === 'stopped' ? 'Start agent' : 'Stop agent'} > {status === 'stopped' ? 'โถ' : 'โ '}
{/each}
{/if} {#if projects.length > 0}
Tier 2 โ Execution
{#each projects as project (project.id)} {@const status = getStatus(project.id)}
{project.icon}
{project.name}
Project
{@const unread = getUnread(project.id)} {#if unread > 0}
{unread}
{/if}
{/each}
{/if} {/if}
{/if}