| | |
| | | |
| | | import { createContext, useContext } from 'use-context-selector' |
| | | import type { ModelAndParameter } from '../types' |
| | | import { noop } from 'lodash-es' |
| | | |
| | | export type DebugWithMultipleModelContextType = { |
| | | multipleModelConfigs: ModelAndParameter[] |
| | |
| | | } |
| | | const DebugWithMultipleModelContext = createContext<DebugWithMultipleModelContextType>({ |
| | | multipleModelConfigs: [], |
| | | onMultipleModelConfigsChange: noop, |
| | | onDebugWithMultipleModelChange: noop, |
| | | onMultipleModelConfigsChange: () => {}, |
| | | onDebugWithMultipleModelChange: () => {}, |
| | | }) |
| | | |
| | | export const useDebugWithMultipleModelContext = () => useContext(DebugWithMultipleModelContext) |