Skip to content

Open source Grok Bot alternative, Bring your own agent and subscription: message Claude Code, Codex, Gemini CLI, Cursor, Copilot and 40+ AI agents as bots on your own computer, from iPhone, Mac, Windows, Linux or terminal. Agent-agnostic and free. Also a Muse and Dots alternative. Built in Rust.

fix(desktop): recognize the running host on Windows paths

leepokai79fb3c19bc4e
diff --git a/apps/desktop/src/main/host-controller.ts b/apps/desktop/src/main/host-controller.ts
index 6d88e729..8c9765e3 100644
--- a/apps/desktop/src/main/host-controller.ts
+++ b/apps/desktop/src/main/host-controller.ts
@@ -297,7 +297,7 @@ export class HostController extends EventEmitter {
// A rebuild can change the host without changing the release version.
const bin = this.binary
if (!this.expectedHash || !bin) return false
- const matches = health.binaryHash === this.expectedHash && health.binaryPath === resolved(bin)
+ const matches = health.binaryHash === this.expectedHash && samePath(health.binaryPath, resolved(bin))
if (!matches) {
if (!this.replacedStale) {
this.replacedStale = true
@@ -328,14 +328,18 @@ async function hashFile(path: string): Promise<string | null> {
}
}
+/** The OS's own resolution, like the host's `canonicalize` (JS `realpathSync` keeps 8.3 names and the input's case). */
function resolved(path: string) {
try {
- return realpathSync(path)
+ return realpathSync.native(path)
} catch {
return path
}
}
+/** Windows paths ignore case. */
+const samePath = (a: string | undefined, b: string) => (isWindows ? a?.toLowerCase() === b.toLowerCase() : a === b)
+
/** Whether the installed service starts this binary. */
function serviceRuns(bin: string) {
const service = serviceDefinition()