File size: 320 Bytes
1a9c884
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
import { useContext } from "react";
import { VLMContext } from "./VLMContext";
import type { VLMContextValue } from "../types/vlm";

export function useVLMContext(): VLMContextValue {
  const ctx = useContext(VLMContext);
  if (!ctx) throw new Error("useVLMContext must be inside VLMProvider");
  return ctx;
}