diff --git a/client/src/components/Chat/ChatView.tsx b/client/src/components/Chat/ChatView.tsx index 35d8bc371b..0f24310eb0 100644 --- a/client/src/components/Chat/ChatView.tsx +++ b/client/src/components/Chat/ChatView.tsx @@ -1,4 +1,4 @@ -import { memo, useMemo } from 'react'; +import { memo, useMemo, useRef } from 'react'; import { useAtomValue } from 'jotai'; import { useRecoilValue } from 'recoil'; import { useForm } from 'react-hook-form'; @@ -38,6 +38,7 @@ import MessagesView from './Messages/MessagesView'; import Presentation from './Presentation'; import ChatForm from './Input/ChatForm'; import { TraceSurface } from './Trace'; +import Lia from '~/components/Lia'; import Landing from './Landing'; import Header from './Header'; import { cn } from '~/utils'; @@ -88,6 +89,9 @@ function ChatView({ /** Room an open composer popover needs below the composer; see the atom. */ const composerLift = useAtomValue(composerLiftFamily(index)); + /** Lia, the welcome screen mascot, stands on the composer band's top edge. */ + const composerBandRef = useRef(null); + const methods = useForm({ defaultValues: { text: '' }, }); @@ -213,6 +217,7 @@ function ChatView({ } className={cn( 'flex flex-col', + isLandingPage && 'relative', isLandingPage ? /* The gutter is reserved once per state, wherever the centring happens. A conversation centres the composer @@ -242,6 +247,7 @@ function ChatView({ is a stacking context; keep it above positioned tool glyphs so they cannot paint through the approval preview. */}
}
+ {isLandingPage &&