From 4587d6690c0e24ec211d1e5d31813cbdb827c725 Mon Sep 17 00:00:00 2001 From: Bobo Date: Sat, 13 Jun 2026 03:37:01 +0800 Subject: [PATCH] fix(bridge): detect hermes chat with global flags in status check Fixes #1915 The `isHermesChatRunning()` function in bridge.cts uses pgrep with a fixed string pattern that fails when global flags are placed before the subcommand. Changed to a regex pattern that matches both `hermes chat` and `hermes --flags chat`. --- apps/memos-local-plugin/bridge.cts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/memos-local-plugin/bridge.cts b/apps/memos-local-plugin/bridge.cts index 81848acf7..67a27fd01 100644 --- a/apps/memos-local-plugin/bridge.cts +++ b/apps/memos-local-plugin/bridge.cts @@ -681,7 +681,7 @@ function createBridgeStatusTracker(statusFile: string, daemon: boolean): { function isHermesChatRunning(): boolean { try { - const out = childProcess.execFileSync("pgrep", ["-f", "hermes chat"], { + const out = childProcess.execFileSync("pgrep", ["-f", "hermes\\s.*chat\\b"], { encoding: "utf8", timeout: 1000, });