import { prisma } from "@/app/lib/prisma" import { notFound } from "next/navigation" import Link from "next/link" export default async function AgentDetailPage({ params, }: { params: Promise<{ slug: string }> }) { const { slug } = await params const agent = await prisma.agent.findUnique({ where: { slug }, include: { category: true }, }) if (!agent) { notFound() } return (
{/* 导航栏 */}
← 返回智能体列表
{agent.icon || "🤖"}

{agent.name}

{agent.category && ( {agent.category.name} )}

{agent.description}

{agent.features && (

功能特性

{agent.features.split(",").map((feature, index) => ( {feature.trim()} ))}
)}
立即使用
使用次数: {agent.usageCount}
状态: {agent.status === "active" ? "运行中" : agent.status}
) }