// Who's signed in (if anyone) and whether platform AI is even wired up on this // deployment. The UI decides from this what to show next to the AI toggle. import { NextResponse } from "next/server"; import type { NextRequest } from "next/server"; import { readSession, platformAiEnabled } from "@/lib/session"; export const dynamic = "force-dynamic"; export async function GET(req: NextRequest) { const s = readSession(req); return NextResponse.json( { platformAi: platformAiEnabled(), user: s ? { email: s.email, name: s.name ?? null } : null, }, { headers: { "cache-control": "no-store" } }, ); }