import { Suspense } from 'react'; import { lazyWithRetry } from '../../utils/lazyWithRetry'; import ErrorBoundary from '../shared/ErrorBoundary'; import { Spinner } from '../shared/Spinner'; import type { AssistantSurfaceProps } from './AssistantSurface'; /** * The chat, loaded when it is first shown: the window and the phone screen * mount this, and the chat runtime arrives in one chunk of its own (kept out * of the offline precache, the assistant needs the network anyway). */ const AssistantSurface = lazyWithRetry(() => import('./AssistantSurface')); export default function AssistantSurfaceLazy(props: AssistantSurfaceProps) { const waiting = (
); return ( // Boundary outside the Suspense, as in VideoPlayerLazy: a rejected chunk flies past Suspense. ); }