feat(app): switch to useChat hook

This commit is contained in:
ItzCrazyKns
2025-08-20 20:21:06 +05:30
parent 8fc7808654
commit 0b15bfbe32
13 changed files with 68 additions and 759 deletions

View File

@@ -15,6 +15,7 @@ import {
} from '@headlessui/react';
import { SiReddit, SiYoutube } from '@icons-pack/react-simple-icons';
import { Fragment } from 'react';
import { useChat } from '@/lib/hooks/useChat';
const focusModes = [
{
@@ -55,13 +56,9 @@ const focusModes = [
},
];
const Focus = ({
focusMode,
setFocusMode,
}: {
focusMode: string;
setFocusMode: (mode: string) => void;
}) => {
const Focus = () => {
const { focusMode, setFocusMode } = useChat();
return (
<Popover className="relative w-full max-w-[15rem] md:max-w-md lg:max-w-lg mt-[6.5px]">
<PopoverButton