mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-09 08:21:50 +00:00
fix(desktop): About panel shows live Hermes version, not stale package.json
The native macOS About panel showed the Electron package.json version (e.g. 0.15.1) while the status bar showed the real Hermes version (0.16.0). setAboutPanelOptions() set applicationName + copyright but omitted applicationVersion, so macOS fell back to app.getVersion() = package.json, which drifts (release.py's desktop lockstep bump didn't land for 0.16.0). resolveHermesVersion() already reads the live version from hermes_cli/__init__.py and was built 'so the desktop About panel shows the real Hermes version' per its own comment, but was never wired in. - Seed applicationVersion: resolveHermesVersion() at module load. - Replace the macOS About menu item's role:'about' with a click handler (showAboutPanelFresh) that re-resolves the version on every open, so an in-place `hermes update` is reflected without an app restart.
This commit is contained in:
parent
338c074336
commit
16beab421f
1 changed files with 19 additions and 1 deletions
|
|
@ -408,8 +408,13 @@ function previewFileMetadata(filePath, mimeType) {
|
|||
}
|
||||
|
||||
app.setName(APP_NAME)
|
||||
// Seed the native About panel with the live Hermes version. This is refreshed
|
||||
// on every open via the explicit "About" menu handler (refreshAboutPanel), so
|
||||
// an in-place `hermes update` mid-session is reflected without an app restart;
|
||||
// the seed here just covers the first open and any non-menu invocation path.
|
||||
app.setAboutPanelOptions({
|
||||
applicationName: APP_NAME,
|
||||
applicationVersion: resolveHermesVersion(),
|
||||
copyright: 'Copyright © 2026 Nous Research'
|
||||
})
|
||||
|
||||
|
|
@ -2981,7 +2986,7 @@ function buildApplicationMenu() {
|
|||
template.push({
|
||||
label: APP_NAME,
|
||||
submenu: [
|
||||
{ role: 'about', label: `About ${APP_NAME}` },
|
||||
{ label: `About ${APP_NAME}`, click: () => showAboutPanelFresh() },
|
||||
checkForUpdatesItem,
|
||||
{ type: 'separator' },
|
||||
{ role: 'services' },
|
||||
|
|
@ -5373,6 +5378,19 @@ function resolveHermesVersion() {
|
|||
return app.getVersion()
|
||||
}
|
||||
|
||||
// Re-resolve the live Hermes version and push it into the native About panel
|
||||
// just before showing it, so an in-place `hermes update` is reflected without
|
||||
// an app restart. macOS only — `showAboutPanel()` is a no-op elsewhere, and the
|
||||
// other platforms don't use this menu item.
|
||||
function showAboutPanelFresh() {
|
||||
app.setAboutPanelOptions({
|
||||
applicationName: APP_NAME,
|
||||
applicationVersion: resolveHermesVersion(),
|
||||
copyright: 'Copyright © 2026 Nous Research'
|
||||
})
|
||||
app.showAboutPanel()
|
||||
}
|
||||
|
||||
ipcMain.handle('hermes:version', async () => ({
|
||||
appVersion: resolveHermesVersion(),
|
||||
electronVersion: process.versions.electron,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue