Files
archived-gitea-ai-assistant/frontend/src/components/RepositoryTableColumns.tsx
jeffusion d5deb75231 feat(repo): add project-level review prompt with UI redesign
- Add database migration and repository for project review prompts
- Add API endpoint for setting project-level prompts
- Integrate project prompts into Agent and Codex review flows
- Redesign repository management UI with dialog-based prompt editor
- Replace flat buttons with Switch for webhook toggle and dedicated prompt button
- Add Dialog and DropdownMenu UI components from Radix UI
- Add comprehensive tests for wiring and interactions
2026-03-26 13:35:05 +08:00

36 lines
955 B
TypeScript

"use client"
import type { ColumnDef } from "@tanstack/react-table"
import type { Repository } from "@/services/repositoryService"
import { RepositoryConfigCell } from "@/components/RepositoryConfigCell"
import { WebhookToggleCell } from "@/components/WebhookToggleCell"
export const columns: ColumnDef<Repository>[] = [
{
accessorKey: "name",
header: "仓库名称",
cell: ({ row }) => (
<div className="font-medium text-foreground text-sm">
{row.getValue("name")}
</div>
),
},
{
accessorKey: "webhook_status",
header: "Webhook",
cell: ({ row }) => {
const repo = row.original
return <WebhookToggleCell repo={repo} />
},
},
{
id: "actions",
header: () => <div className="text-right text-muted-foreground text-xs"></div>,
cell: ({ row }) => (
<div className="text-right">
<RepositoryConfigCell repo={row.original} />
</div>
),
},
]