import { notFound } from "next/navigation"; import { Chat } from "@/components/chat"; import type { TeacherUIMessage } from "@/src/core"; import { getChat, isTurnRunning } from "@/src/server"; export const dynamic = "force-dynamic"; export default async function ChatPage({ params, searchParams, }: { params: Promise<{ id: string }>; searchParams: Promise<{ prompt?: string }>; }) { const [{ id }, { prompt }] = await Promise.all([params, searchParams]); const chat = getChat(id); if (!chat) notFound(); return ( ); }