import { Fragment, useCallback, useMemo } from 'react' import { Button, Modal, ModalClose } from '@janhq/joi' import { atom, useAtom, useAtomValue } from 'jotai' import { activeModelsAtom } from '@/helpers/atoms/Model.atom' export const showWarningMultipleModelModalAtom = atom(false) const WarningMultipleModelModal: React.FC = () => { const [showWarningMultipleModelModal, setShowWarningMultipleModelModal] = useAtom(showWarningMultipleModelModalAtom) const activeModels = useAtomValue(activeModelsAtom) const onClose = useCallback(() => { setShowWarningMultipleModelModal(false) }, [setShowWarningMultipleModelModal]) const title = useMemo( () => `${activeModels.length} models running`, [activeModels] ) return (

This may affect performance. Please review them via System Monitor in the lower right conner of Jan app.

} /> ) } export default WarningMultipleModelModal