/** * Subagents Section - UI for viewing filesystem-based agents * * Displays agents discovered from: * - User-level: ~/.claude/agents/ * - Project-level: .claude/agents/ * * Read-only view - agents are managed by editing .md files directly. */ import { Button } from '@/components/ui/button'; import { cn } from '@/lib/utils'; import { Bot, RefreshCw, Loader2, Users, ExternalLink } from 'lucide-react'; import { useSubagents } from './hooks/use-subagents'; import { SubagentCard } from './subagent-card'; export function SubagentsSection() { const { subagentsWithScope, isLoading, hasProject, refreshFilesystemAgents } = useSubagents(); const handleRefresh = async () => { await refreshFilesystemAgents(); }; return (
{/* Header */}

Custom Subagents {subagentsWithScope.length > 0 && ( {subagentsWithScope.length} agent{subagentsWithScope.length !== 1 ? 's' : ''} )}

Specialized agents Claude delegates to automatically

{/* Content */}
{subagentsWithScope.length === 0 ? (

No agents found

Create .md files in{' '} ~/.claude/agents/ {hasProject && ( <> {' or '} .claude/agents/ )}

View Agents documentation
) : (
{subagentsWithScope.map((agent) => ( ))}
)}
); }