import { useState } from 'react'; import type { HarnessAgent } from '../../types'; interface DelegateTaskModalProps { agents: HarnessAgent[]; onClose: () => void; onDelegate: (agentId: string, title: string, description: string) => void; } export default function DelegateTaskModal({ agents, onClose, onDelegate, }: DelegateTaskModalProps) { const [agentId, setAgentId] = useState(agents[0]?.id ?? ''); const [title, setTitle] = useState(''); const [description, setDescription] = useState(''); const handleSubmit = (e: React.FormEvent) => { e.preventDefault(); if (!title.trim()) return; onDelegate(agentId, title.trim(), description.trim()); }; return (
{ if (e.key === 'Escape') onClose(); }} role="button" tabIndex={-1} aria-label="Close modal" />

에이전트에 태스크 위임

setTitle(e.target.value)} placeholder="예: (주)그린에너지 2026-Q2 데이터 검증" className="w-full border border-border-default bg-paper-white px-3 py-2 text-sm text-ink-black placeholder:text-ink-light focus:outline-none focus:border-accent-teal" />