()
| 29 | } |
| 30 | |
| 31 | async function loadProductMeta() { |
| 32 | if (productMeta) { |
| 33 | return productMeta |
| 34 | } |
| 35 | |
| 36 | try { |
| 37 | const raw = await readFile(packageJsonPath, 'utf8') |
| 38 | const pkg = JSON.parse(raw) |
| 39 | productMeta = { |
| 40 | productName: app.getName() || pkg.productName || 'claw-code', |
| 41 | version: app.getVersion() || pkg.version || '0.1.0', |
| 42 | description: |
| 43 | pkg.description || 'Desktop launcher for the local claw-code runtime.', |
| 44 | electronVersion: process.versions.electron || '', |
| 45 | nodeVersion: process.versions.node || '', |
| 46 | chromeVersion: process.versions.chrome || '', |
| 47 | platform: `${process.platform} ${process.arch}`, |
| 48 | launcherUrl: uiUrl, |
| 49 | userDataPath: app.getPath('userData'), |
| 50 | } |
| 51 | } catch { |
| 52 | productMeta = { |
| 53 | productName: app.getName() || 'claw-code', |
| 54 | version: app.getVersion() || '0.1.0', |
| 55 | description: 'Desktop launcher for the local claw-code runtime.', |
| 56 | electronVersion: process.versions.electron || '', |
| 57 | nodeVersion: process.versions.node || '', |
| 58 | chromeVersion: process.versions.chrome || '', |
| 59 | platform: `${process.platform} ${process.arch}`, |
| 60 | launcherUrl: uiUrl, |
| 61 | userDataPath: app.getPath('userData'), |
| 62 | } |
| 63 | } |
| 64 | |
| 65 | return productMeta |
| 66 | } |
| 67 | |
| 68 | function sendAppCommand(command) { |
| 69 | if (!mainWindow || mainWindow.isDestroyed()) { |
no test coverage detected