"use client"; import { useFeature } from "@growthbook/growthbook-react"; import { useTranslation } from "react-i18next"; import Button from "@/lib/components/ui/Button"; import { useBrainContext } from "@/lib/context/BrainProvider/hooks/useBrainContext"; import { ConfigModal } from "./components/ConfigModal"; import { MicButton } from "./components/MicButton/MicButton"; import { useChatInput } from "./hooks/useChatInput"; import { MentionItem } from "../ActionsBar/components"; export const ChatInput = (): JSX.Element => { const { message, setMessage, submitQuestion, chatId, generatingAnswer } = useChatInput(); const { t } = useTranslation(["chat"]); const { currentBrain, setCurrentBrainId } = useBrainContext(); const shouldUseNewUX = useFeature("new-ux").on; return (
{ e.preventDefault(); submitQuestion(); }} className="sticky flex items-star bottom-0 bg-white dark:bg-black w-full flex justify-center gap-2 z-20" > {currentBrain !== undefined && ( setCurrentBrainId(null)} prefix="@" /> )}