);
}
interface Category {
label: string;
icon: React.ComponentType<{ className?: string }>;
items: { title: string; prompt: string }[];
}
const categories: Category[] = [
{
label: "Build",
icon: CodeBracketIcon,
items: [
{ title: "Implement a new feature", prompt: "Implement a new feature that adds user authentication with OAuth2, including login, logout, and session management." },
{ title: "Create an API endpoint", prompt: "Create a new REST API endpoint with request validation, error handling, and proper HTTP status codes." },
{ title: "Set up a CI/CD pipeline", prompt: "Set up a CI/CD pipeline with build, test, lint, and deploy stages for the main branch." },
{ title: "Add database migrations", prompt: "Add database migrations to create the new tables and indexes needed for the upcoming feature." },
],
},
{
label: "Review",
icon: MagnifyingGlassIcon,
items: [
{ title: "Review a pull request", prompt: "Review the latest pull request for bugs, security vulnerabilities, and code style issues. Summarize findings and suggest fixes." },
{ title: "Audit dependencies", prompt: "Audit all project dependencies for known vulnerabilities, outdated versions, and unused packages." },
{ title: "Analyze test coverage", prompt: "Analyze the current test coverage, identify untested code paths, and recommend which areas need tests most." },
{ title: "Check for security issues", prompt: "Scan the codebase for common security vulnerabilities including injection, XSS, and authentication flaws." },
],
},
{
label: "Fix",
icon: BugAntIcon,
items: [
{ title: "Debug a failing test", prompt: "Debug the failing test suite, identify the root cause of each failure, and apply fixes." },
{ title: "Fix a production bug", prompt: "Investigate and fix the reported production bug, including root cause analysis and a regression test." },
{ title: "Resolve merge conflicts", prompt: "Resolve the merge conflicts in the current branch, preserving the intended changes from both sides." },
{ title: "Fix type errors", prompt: "Fix all TypeScript type errors in the project, ensuring strict type safety without using any type assertions." },
],
},
];
function CategoryPanel({
category,
onClose,
onSelect,
}: {
category: Category;
onClose: () => void;
onSelect: (prompt: string) => void;
}) {
return (