From 9dc6202c176165c914d05ae86729c3f96260684c Mon Sep 17 00:00:00 2001 From: Egor Date: Sun, 21 Sep 2025 02:40:58 -0700 Subject: [PATCH] fix koboldai patches for release 1.99, fix update dialog from not triggering, speed up downloads (woah) which we accidentally slowed down, update advanced command modal for 1.99 --- README.md | 2 - package.json | 2 +- src/components/App/UpdateAvailableModal.tsx | 8 +- src/components/App/index.tsx | 38 ++- src/components/screens/Download.tsx | 10 +- src/components/screens/Launch/AdvancedTab.tsx | 149 +++++----- .../Launch/CommandLineArgumentsModal.tsx | 220 +++++++++++++- src/components/settings/GeneralTab.tsx | 10 +- src/components/settings/VersionsTab.tsx | 10 +- src/constants/patches.ts | 4 - src/hooks/useKoboldVersions.ts | 276 ------------------ src/hooks/useUpdateChecker.ts | 34 ++- src/main/modules/koboldcpp.ts | 65 +++-- src/main/modules/window.ts | 6 +- src/stores/koboldVersions.ts | 182 ++++++++++++ 15 files changed, 582 insertions(+), 434 deletions(-) delete mode 100644 src/hooks/useKoboldVersions.ts create mode 100644 src/stores/koboldVersions.ts diff --git a/README.md b/README.md index f28575c..119e9e8 100644 --- a/README.md +++ b/README.md @@ -179,9 +179,7 @@ You can use the CLI mode on Windows in exactly the same way as in the Linux/macO ## Known Issues -- automatic GPU layer detection does not currently work consistently accross all backends and platforms. It's advised to set this configuration manually if you are told in the launch terminal that your VRAM could not be detected. It should work correctly on all platforms after 1.99.0 of KoboldCpp gets released except for the Windows ROCm binary which was not written well. - Windows ROCm support is... problematic and currently requires for the user to manually add the installed ROCm bin directory to the system PATH. In particular "hipInfo.exe" must be present, which is not always the case for older verions of ROCm. -- not specific to Gerbil, but the open sourced AMD GPU drivers for Linux likely won't work well for image gen. They are not throttled, unlike the proprietary AMD drivers, and are likely to result in system instability under heavy load, especially when running with the larger models. You will probably need to manually tweak your system, but dual-booting to Window is likely the easiest approach if you're experiencing crashes. User beware. ## Future Considerations diff --git a/package.json b/package.json index a078ab9..a47f900 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "gerbil", "productName": "Gerbil", - "version": "1.4.2", + "version": "1.4.3", "description": "Run Large Language Models locally", "main": "out/main/index.js", "homepage": "./", diff --git a/src/components/App/UpdateAvailableModal.tsx b/src/components/App/UpdateAvailableModal.tsx index bf3cd1f..ff0a1fa 100644 --- a/src/components/App/UpdateAvailableModal.tsx +++ b/src/components/App/UpdateAvailableModal.tsx @@ -12,7 +12,7 @@ import { Download, X, ExternalLink } from 'lucide-react'; import { useState } from 'react'; import type { DownloadItem } from '@/types/electron'; import type { BinaryUpdateInfo } from '@/hooks/useUpdateChecker'; -import { useKoboldVersions } from '@/hooks/useKoboldVersions'; +import { useKoboldVersionsStore } from '@/stores/koboldVersions'; import { getDisplayNameFromPath } from '@/utils/version'; import { GITHUB_API } from '@/constants'; import { safeExecute } from '@/utils/logger'; @@ -21,6 +21,7 @@ import { Modal } from '@/components/Modal'; interface UpdateAvailableModalProps { opened: boolean; onClose: () => void; + onSkip: () => void; updateInfo?: BinaryUpdateInfo; onUpdate: (download: DownloadItem) => Promise; } @@ -28,10 +29,11 @@ interface UpdateAvailableModalProps { export const UpdateAvailableModal = ({ opened, onClose, + onSkip, updateInfo, onUpdate, }: UpdateAvailableModalProps) => { - const { downloading, downloadProgress } = useKoboldVersions(); + const { downloading, downloadProgress } = useKoboldVersionsStore(); const currentVersion = updateInfo?.currentVersion; const availableUpdate = updateInfo?.availableUpdate; const [isUpdating, setIsUpdating] = useState(false); @@ -141,7 +143,7 @@ export const UpdateAvailableModal = ({