peppa/apps/web/app/mcp-guide/page.tsx

25 lines
1.3 KiB
TypeScript

import { featureGateView, MCP_GUIDE } from "@peppa/core";
import { FeatureGate } from "@/components/FeatureGate";
import { LiveRefresh } from "@/components/LiveRefresh";
import { Brand } from "@/components/Brand";
import { GuideCopy } from "@/components/GuideCopy";
import { getT } from "@/lib/i18n";
export const dynamic = "force-dynamic";
/** PEP-190: public page (no sign-in) with the same guide that the MCP tool get_started returns. */
export default async function McpGuide() {
const t = await getT();
return (
<main className="mx-auto flex max-w-2xl flex-col gap-4 px-4 py-8 text-sm leading-relaxed">
<Brand />
<h1 className="m-0 text-xl font-semibold">{t("Инструкция для ИИ")}</h1>
<p className="m-0 text-muted-foreground">{t("Памятка для ИИ, подключённого к Peppa FACTORY. Вставьте её в «Инструкции» проекта ChatGPT или в системное сообщение другого ИИ.")}</p>
<LiveRefresh scope="features" indicator={false} pollMs={30_000} />
<FeatureGate view={featureGateView("mcp")} title={t("MCP временно недоступен")}>
<GuideCopy value={MCP_GUIDE} label={t("Скопировать")} done={t("Скопировано")} />
</FeatureGate>
</main>
);
}