Files
ChatLab/apps/desktop/package.json
T
digua ba851f4ae9 fix(electron): fix data migration path mismatch after package extraction
The extraction of Electron code to apps/desktop/ changed the package name
from "ChatLab" to "@openchatlab/desktop", which caused app.getPath('userData')
to return a wrong path in dev mode. This made the migration system unable to
find existing databases, resulting in a fresh-app experience for upgrading users.

- Add productName "ChatLab" to desktop package.json to ensure correct userData path
- Add verifyDataPath() safety net: auto-correct config.toml when configured dir
  has no databases but old Electron path does
2026-05-19 20:39:25 +08:00

32 lines
1005 B
JSON

{
"name": "@openchatlab/desktop",
"version": "0.19.0",
"productName": "ChatLab",
"private": true,
"description": "ChatLab Desktop — Electron 桌面客户端",
"main": "./out/main/index.js",
"scripts": {
"dev": "electron-vite dev",
"preview": "electron-vite preview",
"build": "electron-vite build",
"build:mac": "pnpm run build && electron-builder --mac --config electron-builder.yml -p never",
"build:win": "pnpm run build && electron-builder --win --config electron-builder.yml -p never"
},
"dependencies": {
"@aptabase/electron": "^0.3.1",
"@electron-toolkit/preload": "^3.0.1",
"@electron-toolkit/utils": "^4.0.0",
"@node-rs/jieba": "^2.0.1",
"better-sqlite3": "^12.4.6",
"electron-updater": "^6.6.2",
"i18next": "^25.8.5"
},
"devDependencies": {
"@electron-toolkit/tsconfig": "^1.0.1",
"@types/better-sqlite3": "^7.6.13",
"electron": "35.7.5",
"electron-builder": "^26.0.12",
"electron-vite": "^5.0.0"
}
}