* Get the database path in the app's user data directory
()
| 13 | * Get the database path in the app's user data directory |
| 14 | */ |
| 15 | function getDatabasePath(): string { |
| 16 | const userDataPath = app.getPath("userData") |
| 17 | const dataDir = join(userDataPath, "data") |
| 18 | |
| 19 | // Ensure data directory exists |
| 20 | if (!existsSync(dataDir)) { |
| 21 | mkdirSync(dataDir, { recursive: true }) |
| 22 | } |
| 23 | |
| 24 | return join(dataDir, "agents.db") |
| 25 | } |
| 26 | |
| 27 | /** |
| 28 | * Get the migrations folder path |