mac: add attach-only gateway toggle

This commit is contained in:
Peter Steinberger
2025-12-10 11:31:16 +00:00
parent c4b02645f5
commit cce65e19e1
5 changed files with 31 additions and 0 deletions

View File

@@ -112,6 +112,14 @@ final class GatewayProcessManager: ObservableObject {
if await self.attachExistingGatewayIfAvailable() {
return
}
// Respect debug toggle: only attach, never spawn, when enabled.
if AppStateStore.attachExistingGatewayOnly {
await MainActor.run {
self.status = .stopped
self.appendLog("[gateway] attach-only enabled; not spawning local gateway\n")
}
return
}
await self.spawnGateway()
}
}