diff --git a/ui/src/components/NewAgentDialog.tsx b/ui/src/components/NewAgentDialog.tsx index 14f3178d..6eaa0f5d 100644 --- a/ui/src/components/NewAgentDialog.tsx +++ b/ui/src/components/NewAgentDialog.tsx @@ -93,6 +93,12 @@ const ADVANCED_ADAPTER_OPTIONS: Array<{ }, ]; +// [nexus] Predefined agent templates for quick agent creation +const AGENT_TEMPLATES = [ + { id: "pm", label: "Project Manager", role: "pm" as const, adapterType: "claude_local" as const }, + { id: "engineer", label: "Engineer", role: "engineer" as const, adapterType: "claude_local" as const }, +]; + export function NewAgentDialog() { const { newAgentOpen, closeNewAgent, openNewIssue } = useDialog(); const { selectedCompanyId } = useCompany(); @@ -126,6 +132,15 @@ export function NewAgentDialog() { navigate(`/agents/new?adapterType=${encodeURIComponent(adapterType)}`); } + // [nexus] Handle template selection — navigates to creation form pre-filled with template values + function handleTemplateSelect(template: typeof AGENT_TEMPLATES[number]) { + closeNewAgent(); + setShowAdvancedCards(false); + navigate( + `/agents/new?adapterType=${encodeURIComponent(template.adapterType)}&role=${encodeURIComponent(template.role)}&name=${encodeURIComponent(template.label)}`, + ); + } + return ( + {/* [nexus] Template selector — quick-create PM or Engineer agent */} +
+

Or use a template:

+ {AGENT_TEMPLATES.map((template) => ( + + ))} +
+ {/* Advanced link */}