import { createContext, useContext } from 'react'; import useToolCallsMap from '~/hooks/Plugins/useToolCallsMap'; type ToolCallsMapContextType = ReturnType; export const ToolCallsMapContext = createContext( {} as ToolCallsMapContextType, ); export const useToolCallsMapContext = () => useContext(ToolCallsMapContext); interface ToolCallsMapProviderProps { children: React.ReactNode; conversationId: string; } export function ToolCallsMapProvider({ children, conversationId }: ToolCallsMapProviderProps) { const toolCallsMap = useToolCallsMap({ conversationId }); return ( {children} ); }