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

33 lines
1.5 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";
import { pageTitle } from "@/lib/title";
export const dynamic = "force-dynamic";
// PEP-274: the browser tab says which page it is.
export async function generateMetadata() {
const t = await getT();
return pageTitle(t, t("Инструкция для ИИ"));
}
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("Памятка для ИИ, подключённого к FORGE. Вставьте её в «Инструкции» проекта ChatGPT или в системное сообщение другого ИИ.")}</p>
<LiveRefresh scope="features" indicator={false} />
<FeatureGate view={featureGateView("mcp")} title={t("MCP временно недоступен")}>
<GuideCopy value={MCP_GUIDE} label={t("Скопировать")} done={t("Скопировано")} />
</FeatureGate>
</main>
);
}
/** PEP-190: public page (no sign-in) with the same guide that the MCP tool get_started returns. */