From 07ebcb182e3d75955895dc5ecfd3cee7b5cecf7f Mon Sep 17 00:00:00 2001 From: lone-cloud Date: Fri, 29 Aug 2025 00:07:26 -0700 Subject: [PATCH] WIP: special sillytavern config changes for windows --- package.json | 1 + src/App.tsx | 27 +- src/components/DownloadCard.tsx | 4 +- src/components/screens/Download.tsx | 12 +- src/components/screens/Interface/index.tsx | 24 +- src/components/screens/Launch/AdvancedTab.tsx | 14 +- src/components/settings/VersionsTab.tsx | 25 +- src/hooks/useKoboldVersions.ts | 24 +- src/hooks/useLaunchLogic.ts | 3 +- src/main/ipc.ts | 36 +-- src/main/managers/ConfigManager.ts | 3 +- src/main/managers/KoboldCppManager.ts | 131 +++++----- src/main/managers/LogManager.ts | 14 + src/main/managers/SillyTavernManager.ts | 240 +++++++++++------- src/main/managers/WindowManager.ts | 3 +- src/utils/processUtils.ts | 100 ++++++++ yarn.lock | 220 ++++++++++++++-- 17 files changed, 607 insertions(+), 274 deletions(-) create mode 100644 src/utils/processUtils.ts 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 (