feat(agents): add frontend types and validation for category fields
Frontend changes to support new AgentType category and display fields: Types (agentTypes.ts): - Add AgentTypeCategory union type with 8 categories - Add CATEGORY_METADATA constant with labels, descriptions, colors - Update all interfaces with new fields (category, icon, color, etc.) - Add AgentTypeGroupedResponse type Validation (agentType.ts): - Add AGENT_TYPE_CATEGORIES constant with metadata - Add AVAILABLE_ICONS constant for icon picker - Add COLOR_PALETTE constant for color selection - Update agentTypeFormSchema with new field validators - Update defaultAgentTypeValues with new fields Form updates: - Transform function now maps category and display fields from API Test updates: - Add new fields to mock AgentTypeResponse objects 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -21,6 +21,13 @@ Your approach is:
|
||||
mcp_servers: ['gitea', 'knowledge', 'filesystem'],
|
||||
tool_permissions: {},
|
||||
is_active: true,
|
||||
// Category and display fields
|
||||
category: 'development',
|
||||
icon: 'git-branch',
|
||||
color: '#3B82F6',
|
||||
sort_order: 40,
|
||||
typical_tasks: ['Design system architecture', 'Create ADRs'],
|
||||
collaboration_hints: ['backend-engineer', 'frontend-engineer'],
|
||||
created_at: '2025-01-10T00:00:00Z',
|
||||
updated_at: '2025-01-18T00:00:00Z',
|
||||
instance_count: 2,
|
||||
|
||||
@@ -16,6 +16,13 @@ const mockAgentType: AgentTypeResponse = {
|
||||
mcp_servers: ['gitea'],
|
||||
tool_permissions: {},
|
||||
is_active: true,
|
||||
// Category and display fields
|
||||
category: 'development',
|
||||
icon: 'git-branch',
|
||||
color: '#3B82F6',
|
||||
sort_order: 40,
|
||||
typical_tasks: ['Design system architecture'],
|
||||
collaboration_hints: ['backend-engineer'],
|
||||
created_at: '2025-01-10T00:00:00Z',
|
||||
updated_at: '2025-01-18T00:00:00Z',
|
||||
instance_count: 2,
|
||||
|
||||
@@ -17,6 +17,13 @@ const mockAgentTypes: AgentTypeResponse[] = [
|
||||
mcp_servers: ['gitea', 'knowledge'],
|
||||
tool_permissions: {},
|
||||
is_active: true,
|
||||
// Category and display fields
|
||||
category: 'development',
|
||||
icon: 'clipboard-check',
|
||||
color: '#3B82F6',
|
||||
sort_order: 10,
|
||||
typical_tasks: ['Manage backlog', 'Write user stories'],
|
||||
collaboration_hints: ['business-analyst', 'scrum-master'],
|
||||
created_at: '2025-01-15T00:00:00Z',
|
||||
updated_at: '2025-01-20T00:00:00Z',
|
||||
instance_count: 3,
|
||||
@@ -34,6 +41,13 @@ const mockAgentTypes: AgentTypeResponse[] = [
|
||||
mcp_servers: ['gitea'],
|
||||
tool_permissions: {},
|
||||
is_active: false,
|
||||
// Category and display fields
|
||||
category: 'development',
|
||||
icon: 'git-branch',
|
||||
color: '#3B82F6',
|
||||
sort_order: 40,
|
||||
typical_tasks: ['Design architecture', 'Create ADRs'],
|
||||
collaboration_hints: ['backend-engineer', 'devops-engineer'],
|
||||
created_at: '2025-01-10T00:00:00Z',
|
||||
updated_at: '2025-01-18T00:00:00Z',
|
||||
instance_count: 0,
|
||||
|
||||
Reference in New Issue
Block a user