Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

720 B
Raw Blame
import { type RosterAgent, rosterForAgentPicker } from './roster';

/** Keep ready-to-use choices ahead of agents that need setup. */
export function agentPickerGroups(roster: readonly RosterAgent[]) {
  const agents = rosterForAgentPicker(roster);
  return [
    {
      label: 'Built-in',
      agents: agents.filter(
        (agent) => !agent.unavailableReason && agent.share === 'system'
      ),
    },
    {
      label: 'Your agents',
      agents: agents.filter(
        (agent) => !agent.unavailableReason && agent.share !== 'system'
      ),
    },
    {
      label: 'Needs connection',
      agents: agents.filter((agent) => agent.unavailableReason),
    },
  ].filter((group) => group.agents.length > 0);
}