import { useStore } from '@nanostores/react'; import { TooltipProvider } from '@radix-ui/react-tooltip'; import WithTooltip from '~/components/ui/Tooltip'; import { useEditChatTitle } from '~/lib/hooks/useEditChatDescription'; import { chatStore } from '~/lib/stores/chat'; export function ChatDescription() { const currentChat = useStore(chatStore.currentChat); const initialTitle = currentChat?.title; const { editing, handleChange, handleBlur, handleSubmit, handleKeyDown, currentTitle, toggleEditMode } = useEditChatTitle({ initialTitle, }); if (!initialTitle) { // doing this to prevent showing edit button until chat description is set return null; } return (