diff --git a/package.json b/package.json
index 6ead29f..02ce090 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "gerbil",
"productName": "Gerbil",
- "version": "1.6.8",
+ "version": "1.6.9",
"description": "Run Large Language Models locally",
"main": "out/main/index.js",
"homepage": "./",
@@ -39,7 +39,7 @@
"license": "AGPL-3.0-or-later",
"devDependencies": {
"@eslint/js": "^9.37.0",
- "@types/node": "^24.7.1",
+ "@types/node": "^24.7.2",
"@types/react": "^19.2.2",
"@types/react-dom": "^19.2.1",
"@typescript-eslint/eslint-plugin": "^8.46.0",
diff --git a/src/components/App/StatusBar.tsx b/src/components/App/StatusBar.tsx
index 96034a6..40e93ae 100644
--- a/src/components/App/StatusBar.tsx
+++ b/src/components/App/StatusBar.tsx
@@ -128,7 +128,7 @@ export const StatusBar = ({ maxDataPoints = 60 }: StatusBarProps) => {
))}
>
) : (
-
+
)}
diff --git a/src/components/App/index.tsx b/src/components/App/index.tsx
index 6e981c7..07be638 100644
--- a/src/components/App/index.tsx
+++ b/src/components/App/index.tsx
@@ -165,10 +165,7 @@ export const App = () => {
determineScreen(currentVersion, true);
};
- const handleDownloadComplete = () => {
- setTimeout(() => setCurrentScreen('launch'), 500);
- };
-
+ const handleDownloadComplete = () => setCurrentScreen('launch');
const handleLaunch = () => {
setActiveInterfaceTab('terminal');
setCurrentScreen('interface');
diff --git a/src/components/settings/VersionsTab.tsx b/src/components/settings/VersionsTab.tsx
index b1362c0..72efc26 100644
--- a/src/components/settings/VersionsTab.tsx
+++ b/src/components/settings/VersionsTab.tsx
@@ -30,6 +30,7 @@ export const VersionsTab = () => {
downloading,
handleDownload: handleDownloadFromStore,
getLatestReleaseWithDownloadStatus,
+ initialize,
} = useKoboldVersionsStore();
const [installedVersions, setInstalledVersions] = useState<
@@ -66,11 +67,21 @@ export const VersionsTab = () => {
}, [getLatestReleaseWithDownloadStatus]);
useEffect(() => {
- /* eslint-disable react-hooks/set-state-in-effect */
+ if (availableDownloads.length === 0 && !loadingRemote && !loadingPlatform) {
+ initialize();
+ }
+
+ // eslint-disable-next-line react-hooks/set-state-in-effect
loadInstalledVersions();
loadLatestRelease();
- /* eslint-enable react-hooks/set-state-in-effect */
- }, [loadInstalledVersions, loadLatestRelease]);
+ }, [
+ loadInstalledVersions,
+ loadLatestRelease,
+ availableDownloads.length,
+ loadingRemote,
+ loadingPlatform,
+ initialize,
+ ]);
const allVersions = useMemo((): VersionInfo[] => {
const versions: VersionInfo[] = [];
diff --git a/src/utils/node/fs.ts b/src/utils/node/fs.ts
index e97edd4..ce8a2ea 100644
--- a/src/utils/node/fs.ts
+++ b/src/utils/node/fs.ts
@@ -1,4 +1,4 @@
-import { readFile, writeFile, access, mkdir, rename } from 'fs/promises';
+import { readFile, writeFile, access, mkdir } from 'fs/promises';
import { constants } from 'fs';
import { dirname } from 'path';
@@ -26,9 +26,7 @@ export const writeJsonFile = async (path: string, data: unknown) => {
await ensureDir(dir);
const content = JSON.stringify(data, null, 2);
- const tempPath = `${path}.tmp`;
- await writeFile(tempPath, content, 'utf-8');
- await rename(tempPath, path);
+ await writeFile(path, content, 'utf-8');
};
export const ensureDir = async (path: string) => {
diff --git a/yarn.lock b/yarn.lock
index d3a7a51..73c03ce 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1431,12 +1431,12 @@ __metadata:
languageName: node
linkType: hard
-"@types/node@npm:*, @types/node@npm:^24.7.1":
- version: 24.7.1
- resolution: "@types/node@npm:24.7.1"
+"@types/node@npm:*, @types/node@npm:^24.7.2":
+ version: 24.7.2
+ resolution: "@types/node@npm:24.7.2"
dependencies:
undici-types: "npm:~7.14.0"
- checksum: 10c0/2525f2aa865d78b1c75faaf8c6bf2af51c930962d8078306620d9a76eafcbbea035142cf2cdc2fcf1b4010cd3958a1c6c59b67aba1ac205dc1e5f895ef6af673
+ checksum: 10c0/03f662f10e4b89bc97016e067101cbabe55025b54c24afb581fb50992d5eeaaf417bdae34bbc668ae8759d3cdbbbadf35fc8b9b29d26f52ede2525d48e919e49
languageName: node
linkType: hard
@@ -3862,7 +3862,7 @@ __metadata:
"@fontsource/inter": "npm:^5.2.8"
"@mantine/core": "npm:^8.3.4"
"@mantine/hooks": "npm:^8.3.4"
- "@types/node": "npm:^24.7.1"
+ "@types/node": "npm:^24.7.2"
"@types/react": "npm:^19.2.2"
"@types/react-dom": "npm:^19.2.1"
"@types/yauzl": "npm:^2.10.3"