fix: use stable ~/.codepilot/ data directory to persist across updates
Previously the database path depended on app.getPath('userData') which
varies with app name changes (CodePilot vs codepilot vs Claude GUI).
Now uses a fixed ~/.codepilot/ directory for both dev and production.
Includes automatic migration: on first launch, if the DB doesn't exist
at the new path, it checks old locations (Application Support variants
and the old dev-mode data/ folder) and copies the database over.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
d2a926b353
commit
262b295f63
2 files changed
+33
-2
No files matched your search
+1
-1
@@ -116,7 +116,7 @@ function startServer(port: number): ChildProcess {
|
||||
...userShellEnv,
|
||||
PORT: String(port),
|
||||
HOSTNAME: '127.0.0.1',
|
||||
CLAUDE_GUI_DATA_DIR: app.getPath('userData'),
|
||||
CLAUDE_GUI_DATA_DIR: path.join(home, '.codepilot'),
|
||||
ELECTRON_RUN_AS_NODE: '1',
|
||||
HOME: home,
|
||||
PATH: `${basePath}:${home}/.npm-global/bin:${home}/.local/bin:${home}/.claude/bin:${shellPath}`,
|
||||
|
||||
Reference in new issue
Block a user