import React from 'react' import SystemItem from '@containers/SystemItem' import useGetSystemResources from '@hooks/useGetSystemResources' import { useAtomValue } from 'jotai' import { modelDownloadStateAtom } from '@helpers/atoms/DownloadState.atom' import { formatDownloadPercentage } from '@utils/converter' import { activeAssistantModelAtom, stateModel } from '@helpers/atoms/Model.atom' import useGetAppVersion from '@hooks/useGetAppVersion' const BottomBar = () => { const activeModel = useAtomValue(activeAssistantModelAtom) const stateModelStartStop = useAtomValue(stateModel) const { ram, cpu } = useGetSystemResources() const modelDownloadStates = useAtomValue(modelDownloadStateAtom) const appVersion = useGetAppVersion() const downloadStates: DownloadState[] = [] for (const [, value] of Object.entries(modelDownloadStates)) { downloadStates.push(value) } return (
{stateModelStartStop.state === 'start' && stateModelStartStop.loading && ( )} {stateModelStartStop.state === 'stop' && stateModelStartStop.loading && ( )} {!stateModelStartStop.loading && ( )} {downloadStates.length > 0 && ( )}

Jan v{appVersion?.version ?? ''}

) } export default BottomBar