import { Checkbox } from "@/components/ui/checkbox"; import { Label } from "@/components/ui/label"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; import { Separator } from "@/components/ui/separator"; import { useChatContext } from "@/lib/store/ChatContext"; import { ResearchOptions } from "@/lib/types"; import React from "react"; import { Input } from "@/components/ui/input"; // Make sure you have an Input component interface ResearchControlsProps { options: ResearchOptions; onOptionChange: (options: ResearchOptions) => void; } // Traditional prop-based component const ResearchControls: React.FC = ({ options, onOptionChange }) => { return (

Determines how extensively the assistant will research your query.

onOptionChange({ ...options, sources: checked as boolean })} />
onOptionChange({ ...options, citations: checked as boolean })} />
onOptionChange({ ...options, create_report: checked as boolean })} />
onOptionChange({ ...options, max_depth: parseInt(e.target.value, 10) })} className="w-full" />
onOptionChange({ ...options, num_sites_per_query: parseInt(e.target.value, 10) })} className="w-full" />
); }; // Context-based component export const ResearchControlsWithContext: React.FC = () => { const { researchOptions, setResearchOptions } = useChatContext(); return ; }; export default ResearchControls;