feat(hermes): launch dashboard from toolbar when Web UI is offline

When the Hermes Web UI probe fails, the toolbar entry now opens an info
confirm dialog offering to run `hermes dashboard` in the user's preferred
terminal. Accepting spawns it via a temp bash/batch script; `hermes
dashboard` itself opens the browser once ready, so we do not poll.
The Memory panel and Health banner keep the existing toast behavior.

Also corrects the stale `hermes web` hint in the offline toast (the real
command is `hermes dashboard`) and reorders Linux terminal detection to
try `which` before stat'ing /usr/bin, /bin, /usr/local/bin.
This commit is contained in:
Jason
2026-04-21 21:11:15 +08:00
parent 38709c94db
commit 8e9452b7ec
9 changed files with 259 additions and 12 deletions
+5
View File
@@ -33,6 +33,11 @@ export const hermesApi = {
await invoke("open_hermes_web_ui", { path: path ?? null });
},
/** Open the preferred terminal and run `hermes dashboard` (non-blocking). */
async launchDashboard(): Promise<void> {
await invoke("launch_hermes_dashboard");
},
/**
* Read one of Hermes' memory blobs (`MEMORY.md` or `USER.md`). Returns an
* empty string when the file hasn't been created yet.