import type { LucideIcon } from "lucide-react"; import { Blocks, Database, Pencil, ShieldCheck } from "lucide-react"; import { AppShell } from "@/components/AppShell"; import { Badge } from "@/components/ui/Badge"; import { Card } from "@/components/ui/Card"; import { EmptyState } from "@/components/ui/EmptyState"; import { PageHeader } from "@/components/ui/PageHeader"; import { SectionHeader } from "@/components/ui/SectionHeader"; import { StatusNote } from "@/components/ui/StatusNote"; import type { ProjectResponse, SkillView } from "@/lib/api/types"; import { groupByScope, scopeLabel, summarizeSkills, tierLabel, } from "@/lib/skills/skills"; interface SkillsPageProps { project: ProjectResponse; skills: SkillView[]; } // 技能库(UX §7):只读注册表视图(name/scope/tier/reads/writes)。Server Component(纯读)。 export function SkillsPage({ project, skills }: SkillsPageProps) { const groups = groupByScope(skills); const summary = summarizeSkills(skills); return (
{groups.length === 0 ? ( ) : ( <> {groups.map((group) => (
    {group.skills.map((skill) => ( ))}
))} )}
); } function SkillListItem({ skill }: { skill: SkillView }) { return (
  • {skill.name} {tierLabel(skill.tier)} {skill.genre ? {skill.genre} : null}
  • ); } function TableLine({ icon: Icon, label, tables, }: { icon: LucideIcon; label: string; tables: readonly string[]; }) { return ( ); } function formatTables(tables: readonly string[]): string { return tables.length > 0 ? tables.join("、") : "—"; }