fix: engines in settings sometime not populated properly
This commit is contained in:
parent
f5dd44c4cb
commit
0f4b35d179
@ -2,8 +2,7 @@ import React from 'react'
|
|||||||
|
|
||||||
import { InferenceEngine } from '@janhq/core'
|
import { InferenceEngine } from '@janhq/core'
|
||||||
import { ScrollArea } from '@janhq/joi'
|
import { ScrollArea } from '@janhq/joi'
|
||||||
|
import { useAtomValue } from 'jotai'
|
||||||
import { useGetEngines } from '@/hooks/useEngineManagement'
|
|
||||||
|
|
||||||
import { isLocalEngine } from '@/utils/modelEngine'
|
import { isLocalEngine } from '@/utils/modelEngine'
|
||||||
|
|
||||||
@ -11,8 +10,10 @@ import LocalEngineItems from './LocalEngineItem'
|
|||||||
import ModalAddRemoteEngine from './ModalAddRemoteEngine'
|
import ModalAddRemoteEngine from './ModalAddRemoteEngine'
|
||||||
import RemoteEngineItems from './RemoteEngineItem'
|
import RemoteEngineItems from './RemoteEngineItem'
|
||||||
|
|
||||||
|
import { installedEnginesAtom } from '@/helpers/atoms/Engines.atom'
|
||||||
|
|
||||||
const Engines = () => {
|
const Engines = () => {
|
||||||
const { engines } = useGetEngines()
|
const engines = useAtomValue(installedEnginesAtom)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ScrollArea className="h-full w-full">
|
<ScrollArea className="h-full w-full">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user