pront1

You are given a task to integrate an existing React component in the codebase The codebase should support: - shadcn project structure - Tailwind CSS - Typescript If it doesn't, provide instructions on how to setup project via shadcn CLI, install Tailwind or Typescript. Determine the default path for components and styles. If default path for components is not /components/ui, provide instructions on why it's important to create this folder Copy-paste this component to /components/ui folder: ```tsx v0-ai-chat.tsx "use client"; import { useEffect, useRef, useCallback } from "react"; import { useState } from "react"; import { Textarea } from "@/components/ui/textarea"; import { cn } from "@/lib/utils"; import { ImageIcon, FileUp, Figma, MonitorIcon, CircleUserRound, ArrowUpIcon, Paperclip, PlusIcon, } from "lucide-react"; interface UseAutoResizeTextareaProps { minHeight: number; maxHeight?: number; } function useAutoResizeTextarea({ minHeight, maxHeight, }: UseAutoResizeTextareaProps) { const textareaRef = useRef(null); const adjustHeight = useCallback( (reset?: boolean) => { const textarea = textareaRef.current; if (!textarea) return; if (reset) { textarea.style.height = `${minHeight}px`; return; } // Temporarily shrink to get the right scrollHeight textarea.style.height = `${minHeight}px`; // Calculate new height const newHeight = Math.max( minHeight, Math.min( textarea.scrollHeight, maxHeight ?? Number.POSITIVE_INFINITY ) ); textarea.style.height = `${newHeight}px`; }, [minHeight, maxHeight] ); useEffect(() => { // Set initial height const textarea = textareaRef.current; if (textarea) { textarea.style.height = `${minHeight}px`; } }, [minHeight]); // Adjust height on window resize useEffect(() => { const handleResize = () => adjustHeight(); window.addEventListener("resize", handleResize); return () => window.removeEventListener("resize", handleResize); }, [adjustHeight]); return { textareaRef, adjustHeight }; } export function VercelV0Chat() { const [value, setValue] = useState(""); const { textareaRef, adjustHeight } = useAutoResizeTextarea({ minHeight: 60, maxHeight: 200, }); const handleKeyDown = (e: React.KeyboardEvent) => { if (e.key === "Enter" && !e.shiftKey) { e.preventDefault(); if (value.trim()) { setValue(""); adjustHeight(true); } } }; return (

What can I help you ship?