mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
f3d01b83c7
Task 1 of OSS-582 (frontend parity). Bring the app chrome + beautiful-chat byte-identical to the langgraph-python north star: - globals.css: adopt LGP theme (@theme inline tokens + green palette) - middleware.ts: add (was missing) — sets x-pathname like LGP - layout.tsx: adopt LGP structure; keep FastAPI in title/log (identity carve-out) - beautiful-chat/page.tsx: sync stale doc comment Also fix a Dockerfile parity gap: fastapi was missing the COPY manifest.yaml that LGP has. demos/layout.tsx reads manifest.yaml at request time via generateMetadata (headers() -> dynamic), so without it every /demos/* route crashed with an RSC render error (ENOENT /app/manifest.yaml).
13 lines
401 B
TypeScript
13 lines
401 B
TypeScript
import { NextResponse } from "next/server";
|
|
import type { NextRequest } from "next/server";
|
|
|
|
export function middleware(request: NextRequest) {
|
|
const headers = new Headers(request.headers);
|
|
headers.set("x-pathname", request.nextUrl.pathname);
|
|
return NextResponse.next({ request: { headers } });
|
|
}
|
|
|
|
export const config = {
|
|
matcher: ["/((?!_next/static|_next/image|favicon.ico|.*\\..*).*)"],
|
|
};
|