diff --git a/package.json b/package.json index b3388a2..7f8e22d 100644 --- a/package.json +++ b/package.json @@ -83,6 +83,7 @@ "@mantine/core": "^8.2.7", "@mantine/hooks": "^8.2.7", "execa": "^9.6.0", + "fkill": "^9.0.0", "got": "^14.4.7", "lucide-react": "^0.542.0", "react": "^19.1.1", diff --git a/src/App.tsx b/src/App.tsx index f437c71..89385bc 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -98,27 +98,17 @@ export const App = () => { }; checkInstallation(); - - const cleanupInstallDirListener = - window.electronAPI.kobold.onInstallDirChanged(() => { - checkInstallation(); - }); - - const cleanupVersionsListener = window.electronAPI.kobold.onVersionsUpdated( - () => { - checkInstallation(); - } - ); - - return () => { - cleanupInstallDirListener(); - cleanupVersionsListener(); - }; - }, [checkForUpdates]); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); const handleBinaryUpdate = async (download: DownloadItem) => { try { - const success = await sharedHandleDownload('asset', download, true, true); + const success = await sharedHandleDownload({ + type: 'asset', + item: download, + isUpdate: true, + wasCurrentBinary: true, + }); if (success) { dismissUpdate(); @@ -286,6 +276,7 @@ export const App = () => { activeTab={activeInterfaceTab} onTabChange={setActiveInterfaceTab} isImageGenerationMode={isImageGenerationMode} + frontendPreference={frontendPreference} /> diff --git a/src/components/DownloadCard.tsx b/src/components/DownloadCard.tsx index 14f2584..219de60 100644 --- a/src/components/DownloadCard.tsx +++ b/src/components/DownloadCard.tsx @@ -55,7 +55,7 @@ export const DownloadCard = ({ const buttons = []; if (!isInstalled) { - buttons.push( + return (