Spaces:
Sleeping
Sleeping
wuyiqunLu commited on
fix: add jotai provider for different chat (#109)
Browse filesso different chat can have different context for messageId
3 unmodified lines4567898 unmodified lines1819202122232425263 unmodified linesimport { redirect } from 'next/navigation';import { revalidatePath } from 'next/cache';import TopPrompt from '@/components/chat/TopPrompt';interface ChatServerProps {chatId: string;8 unmodified linesredirect('/');}return (<div className="w-[1600px] max-w-full mx-auto flex flex-col space-y-4 items-center"><TopPrompt chat={chat} userId={userId} /><ChatInterface chat={chat} userId={userId} /></div>);}3 unmodified lines456789108 unmodified lines19202122232425262728293 unmodified linesimport { redirect } from 'next/navigation';import { revalidatePath } from 'next/cache';import TopPrompt from '@/components/chat/TopPrompt';import { Provider } from 'jotai';interface ChatServerProps {chatId: string;8 unmodified linesredirect('/');}return (<Provider><div className="w-[1600px] max-w-full mx-auto flex flex-col space-y-4 items-center"><TopPrompt chat={chat} userId={userId} /><ChatInterface chat={chat} userId={userId} /></div></Provider>);}
app/chat/[id]/server.tsx+7-4