/* eslint-disable */ "use client"; import Button from "@/lib/components/ui/Button"; import { useChat } from "@/app/chat/[chatId]/hooks/useChat"; import { useState } from "react"; import { ConfigButton } from "./components/ConfigButton"; import { MicButton } from "./components/MicButton"; export const ChatInput = (): JSX.Element => { const [message, setMessage] = useState(""); // for optimistic updates const { addQuestion, generatingAnswer } = useChat(); const submitQuestion = () => { if (message.length === 0) return; if (!generatingAnswer) { addQuestion(message, () => setMessage("")); } }; return (
{ e.preventDefault(); submitQuestion(); }} className="sticky bottom-0 p-5 bg-white dark:bg-black rounded-t-md border border-black/10 dark:border-white/25 border-b-0 w-full max-w-3xl flex items-center justify-center gap-2 z-20" >