* feat: local engine management * chore: move remote engine into engine page instead extension page * chore: set default engine from extension * chore: update endpoint update engine * chore: update event onEngineUpdate * chore: filter out engine download * chore: update version env * chore: select default engine variant base on user device specs * chore: symlink engine variants * chore: rolldown.config in mjs format * chore: binary codesign * fix: download state in footer bar and variant status * chore: update yarn.lock * fix: rimraf failure * fix: setup-node@v3 for built-in cache * fix: cov pipeline * fix: build syntax * chore: fix build step * fix: create engines folder on launch * chore: update ui delete engine variant with modal confirmation * chore: fix linter * chore: add installing progress for Local Engine download * chore: wording --------- Co-authored-by: Louis <louis@jan.ai>
50 lines
1.3 KiB
TypeScript
50 lines
1.3 KiB
TypeScript
import { InferenceEngine } from '@janhq/core'
|
|
import { useAtomValue } from 'jotai'
|
|
|
|
import Advanced from '@/screens/Settings/Advanced'
|
|
import AppearanceOptions from '@/screens/Settings/Appearance'
|
|
import ExtensionCatalog from '@/screens/Settings/CoreExtensions'
|
|
import Engines from '@/screens/Settings/Engines'
|
|
import EngineSettings from '@/screens/Settings/Engines/Settings'
|
|
import ExtensionSetting from '@/screens/Settings/ExtensionSetting'
|
|
import Hotkeys from '@/screens/Settings/Hotkeys'
|
|
import MyModels from '@/screens/Settings/MyModels'
|
|
import Privacy from '@/screens/Settings/Privacy'
|
|
|
|
import { selectedSettingAtom } from '@/helpers/atoms/Setting.atom'
|
|
|
|
const SettingDetail = () => {
|
|
const selectedSetting = useAtomValue(selectedSettingAtom)
|
|
|
|
switch (selectedSetting) {
|
|
case 'Engines':
|
|
return <Engines />
|
|
|
|
case 'Extensions':
|
|
return <ExtensionCatalog />
|
|
|
|
case 'Preferences':
|
|
return <AppearanceOptions />
|
|
|
|
case 'Keyboard Shortcuts':
|
|
return <Hotkeys />
|
|
|
|
case 'Privacy':
|
|
return <Privacy />
|
|
|
|
case 'Advanced Settings':
|
|
return <Advanced />
|
|
|
|
case 'My Models':
|
|
return <MyModels />
|
|
|
|
case InferenceEngine.cortex_llamacpp:
|
|
return <EngineSettings engine={selectedSetting} />
|
|
|
|
default:
|
|
return <ExtensionSetting />
|
|
}
|
|
}
|
|
|
|
export default SettingDetail
|