import { useContext } from "react"; import { ChatOptionsContext } from "../context/ChatOptionsContext"; import type { ChatOptions } from "../types"; export function useOptions() { const options = useContext(ChatOptionsContext); if (!options) { throw new Error("useOptions must be used within a ChatProvider"); } return { options: options as ChatOptions, }; }