"use client"; import Link from "next/link"; import { MdAutorenew, MdMic, MdMicOff, MdSettings } from "react-icons/md"; import Button from "../components/ui/Button"; import Card from "../components/ui/Card"; import PageHeading from "../components/ui/PageHeading"; import ChatMessages from "./components/ChatMessages"; import { useQuestion } from "./hooks/useQuestion"; import { useSpeech } from "./hooks/useSpeech"; export default function ChatPage() { const { history, isPending, question, askQuestion, setQuestion, resetHistory } = useQuestion(); const { isListening, speechSupported, startListening } = useSpeech(); return (
{/* Chat */}
{ e.preventDefault(); if (!isPending) askQuestion(); }} className="w-full flex items-center justify-center gap-2" >