import { useState } from 'react'; import { Workflow, RotateCcw, Replace } from 'lucide-react'; import { cn } from '@/lib/utils'; import { useAppStore } from '@/store/app-store'; import { Button } from '@/components/ui/button'; import { PhaseModelSelector } from './phase-model-selector'; import { BulkReplaceDialog } from './bulk-replace-dialog'; import type { PhaseModelKey } from '@automaker/types'; import { DEFAULT_PHASE_MODELS } from '@automaker/types'; interface PhaseConfig { key: PhaseModelKey; label: string; description: string; } const QUICK_TASKS: PhaseConfig[] = [ { key: 'enhancementModel', label: 'Feature Enhancement', description: 'Improves feature names and descriptions', }, { key: 'fileDescriptionModel', label: 'File Descriptions', description: 'Generates descriptions for context files', }, { key: 'imageDescriptionModel', label: 'Image Descriptions', description: 'Analyzes and describes context images', }, { key: 'commitMessageModel', label: 'Commit Messages', description: 'Generates git commit messages from diffs', }, ]; const VALIDATION_TASKS: PhaseConfig[] = [ { key: 'validationModel', label: 'GitHub Issue Validation', description: 'Validates and improves GitHub issues', }, ]; const GENERATION_TASKS: PhaseConfig[] = [ { key: 'specGenerationModel', label: 'App Specification', description: 'Generates full application specifications', }, { key: 'featureGenerationModel', label: 'Feature Generation', description: 'Creates features from specifications', }, { key: 'backlogPlanningModel', label: 'Backlog Planning', description: 'Reorganizes and prioritizes backlog', }, { key: 'projectAnalysisModel', label: 'Project Analysis', description: 'Analyzes project structure for suggestions', }, { key: 'suggestionsModel', label: 'AI Suggestions', description: 'Model for feature, refactoring, security, and performance suggestions', }, ]; const MEMORY_TASKS: PhaseConfig[] = [ { key: 'memoryExtractionModel', label: 'Memory Extraction', description: 'Extracts learnings from completed agent sessions', }, ]; function PhaseGroup({ title, subtitle, phases, }: { title: string; subtitle: string; phases: PhaseConfig[]; }) { const { phaseModels, setPhaseModel } = useAppStore(); return (
{subtitle}
Configure which AI model to use for each application task