'use client' import { SessionProvider } from 'next-auth/react' import type { Session } from 'next-auth' import { AppShell } from '@/components/app-shell' import { Assistant } from '@/components/assistant' // Nested provider seeded with the server session: useSession() in AppShell // has data during SSR, so the signed-in shell is server-rendered. export function AppShellWrapper({ session, children }: { session: Session; children: React.ReactNode }) { return ( {children} {/* Ephemeral assistant drawer: mounted once per signed-in shell so the conversation survives in-app navigation. */} ) }