mirror of
https://github.com/open-webui/desktop.git
synced 2026-07-15 04:35:40 -04:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 64c399738e |
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [0.0.18] - 2026-05-05
|
||||
|
||||
### Fixed
|
||||
|
||||
- **Downloaded Models Not Recognized by llama.cpp.** Models downloaded from Hugging Face are now stored directly under the `models/` directory instead of a nested `models/huggingface/` subdirectory, so llama-server's model scanner discovers them without manual symlinks. Existing models in the old location are automatically migrated on startup (#177).
|
||||
|
||||
## [0.0.17] - 2026-05-03
|
||||
|
||||
### Added
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "open-webui",
|
||||
"version": "0.0.17",
|
||||
"version": "0.0.18",
|
||||
"license": "AGPL-3.0",
|
||||
"description": "Open WebUI Desktop",
|
||||
"main": "./out/main/index.js",
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* Downloads files from HF repos, manages a local model cache,
|
||||
* and provides listing/deletion of cached models.
|
||||
*
|
||||
* Cache dir: <userData>/models/huggingface/<repo-slug>/<filename>
|
||||
* Cache dir: <userData>/models/<repo-slug>/<filename>
|
||||
*/
|
||||
|
||||
import * as fs from 'fs'
|
||||
@@ -33,10 +33,37 @@ export interface HfDownloadProgress {
|
||||
// ─── Paths ──────────────────────────────────────────────
|
||||
|
||||
const getHfCacheDir = (): string => {
|
||||
const dir = path.join(getInstallDir(), 'models', 'huggingface')
|
||||
const dir = path.join(getInstallDir(), 'models')
|
||||
if (!fs.existsSync(dir)) {
|
||||
fs.mkdirSync(dir, { recursive: true })
|
||||
}
|
||||
|
||||
// Migrate models from legacy models/huggingface/<slug>/ to models/<slug>/
|
||||
const legacyDir = path.join(dir, 'huggingface')
|
||||
if (fs.existsSync(legacyDir)) {
|
||||
try {
|
||||
const entries = fs.readdirSync(legacyDir, { withFileTypes: true })
|
||||
for (const entry of entries) {
|
||||
if (entry.isDirectory()) {
|
||||
const src = path.join(legacyDir, entry.name)
|
||||
const dest = path.join(dir, entry.name)
|
||||
if (!fs.existsSync(dest)) {
|
||||
fs.renameSync(src, dest)
|
||||
log.info(`[huggingface] Migrated ${entry.name} from legacy cache`)
|
||||
}
|
||||
}
|
||||
}
|
||||
// Remove legacy dir if empty (manifest.json may remain)
|
||||
const remaining = fs.readdirSync(legacyDir)
|
||||
if (remaining.length === 0) {
|
||||
fs.rmdirSync(legacyDir)
|
||||
log.info('[huggingface] Removed empty legacy huggingface/ directory')
|
||||
}
|
||||
} catch (e) {
|
||||
log.warn('[huggingface] Failed to migrate legacy cache:', e)
|
||||
}
|
||||
}
|
||||
|
||||
return dir
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user