import { type ReactNode, useState } from 'react' import type { SystemId } from '@/lib/types' import { ChatContext } from './chatContext' import { useChat } from './useChat' /** The conversation and the box's settings (system, policy date), held ABOVE the pages: * a page unmounts when you navigate away, and its state with it (owner: the chat * disappeared on a visit to Evals). Here it lives as long as the browser tab, and an * answer still streaming keeps arriving while another page is open. */ export function ChatProvider({ children }: { children: ReactNode }) { const chat = useChat() const [system, setSystem] = useState('c') const [day, setDay] = useState(null) return {children} }