Skip to content

Commit 8c0f88f

Browse files
authored
chore: should get hardware information on launch (#4821)
1 parent 296891e commit 8c0f88f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

web/containers/Providers/DataLoader.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { useDebouncedCallback } from 'use-debounce'
1515
import useAssistants from '@/hooks/useAssistants'
1616
import { useGetEngines } from '@/hooks/useEngineManagement'
1717
import useGetSystemResources from '@/hooks/useGetSystemResources'
18+
import { useGetHardwareInfo } from '@/hooks/useHardwareManagement'
1819
import useModels from '@/hooks/useModels'
1920
import useThreads from '@/hooks/useThreads'
2021

@@ -34,6 +35,7 @@ const DataLoader: React.FC = () => {
3435
const setJanSettingScreen = useSetAtom(janSettingScreenAtom)
3536
const { getData: loadModels } = useModels()
3637
const { mutate } = useGetEngines()
38+
const { mutate: getHardwareInfo } = useGetHardwareInfo()
3739

3840
useThreads()
3941
useAssistants()
@@ -42,6 +44,7 @@ const DataLoader: React.FC = () => {
4244
useEffect(() => {
4345
// Load data once
4446
loadModels()
47+
getHardwareInfo()
4548
// eslint-disable-next-line react-hooks/exhaustive-deps
4649
}, [])
4750
const reloadData = useDebouncedCallback(() => {

0 commit comments

Comments
 (0)