Skip to content

The platform for continuously improving AI agents.

401 B
Raw Blame
import { createContext, useContext } from "react";

export const WorkshopSidebarContext = createContext<{
  open: boolean;
  close: () => void;
  toggle: (trigger: HTMLButtonElement) => void;
} | null>(null);

export function useWorkshopSidebar() {
  const context = useContext(WorkshopSidebarContext);
  if (!context) throw new Error("Workshop sidebar requires the app layout.");
  return context;
}