| 12 | |
| 13 | // 获取 Cursor 配置目录 |
| 14 | function getCursorConfigPath() { |
| 15 | const platform = process.platform; |
| 16 | const homeDir = os.homedir(); |
| 17 | |
| 18 | switch (platform) { |
| 19 | case 'darwin': // macOS |
| 20 | return path.join(homeDir, '.config', 'cursor'); |
| 21 | case 'win32': // Windows |
| 22 | return path.join(homeDir, 'AppData', 'Roaming', 'Cursor', 'User'); |
| 23 | case 'linux': // Linux |
| 24 | return path.join(homeDir, '.config', 'cursor'); |
| 25 | default: |
| 26 | throw new Error(`Unsupported platform: ${platform}`); |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | // 获取包的绝对路径 |
| 31 | function getPackagePath() { |