diff --git a/extensions/model-extension/src/index.ts b/extensions/model-extension/src/index.ts index 61a7db005..817794c74 100644 --- a/extensions/model-extension/src/index.ts +++ b/extensions/model-extension/src/index.ts @@ -434,20 +434,20 @@ export default class JanModelExtension extends ModelExtension { handleDesktopEvents() { if (window && window.electronAPI) { window.electronAPI.onFileDownloadUpdate( - async (_event: string, state: any | undefined) => { + async (_event: string, state: DownloadState | undefined) => { if (!state) return - state.downloadState = 'update' + state.downloadState = 'downloading' events.emit(DownloadEvent.onFileDownloadUpdate, state) } ) window.electronAPI.onFileDownloadError( - async (_event: string, state: any) => { + async (_event: string, state: DownloadState) => { state.downloadState = 'error' events.emit(DownloadEvent.onFileDownloadError, state) } ) window.electronAPI.onFileDownloadSuccess( - async (_event: string, state: any) => { + async (_event: string, state: DownloadState) => { state.downloadState = 'end' events.emit(DownloadEvent.onFileDownloadSuccess, state) } diff --git a/web/screens/Settings/Advanced/index.tsx b/web/screens/Settings/Advanced/index.tsx index 2d9f85712..43204d7c1 100644 --- a/web/screens/Settings/Advanced/index.tsx +++ b/web/screens/Settings/Advanced/index.tsx @@ -85,14 +85,14 @@ const Advanced = () => { useEffect(() => { const setUseGpuIfPossible = async () => { const settings = await readSettings() - setGpuEnabled(settings.run_mode === 'gpu') + setGpuEnabled(settings.run_mode === 'gpu' && gpuList.length > 0) setGpusInUse(settings.gpus_in_use || []) if (settings.gpus) { setGpuList(settings.gpus) } } setUseGpuIfPossible() - }, [readSettings]) + }, [readSettings, gpuList]) const clearLogs = async () => { if (await fs.existsSync(`file://logs`)) { @@ -254,7 +254,10 @@ const Advanced = () => {
-