'use client'; import { useRouter } from 'next/navigation'; import { useRef } from 'react'; import Composer, { ComposerRef } from '@/components/chat/Composer'; import { dbPostCreateChat } from '@/lib/db/functions'; import { nanoid } from '@/lib/utils'; import Chip from '@/components/ui/Chip'; import { IconArrowUpRight } from '@/components/ui/Icons'; import { EXAMPLES } from '@/lib/constants'; export default function Page() { const router = useRouter(); const composerRef = useRef(null); return (

Vision Agent BETA

Generate code to solve your vision problem with simple prompts.

{ const newId = nanoid(); const resp = await dbPostCreateChat({ id: newId, title: `conversation-${newId}`, mediaUrl, message: { prompt: input, mediaUrl, }, }); if (resp) { router.push(`/chat/${newId}`); } }} />
{EXAMPLES.map((example, index) => { return ( { composerRef.current?.setInput(example.prompt); composerRef.current?.setMediaUrl(example.mediaUrl); }} >

{example.title}

); })}
); }