feat(macos): auto-enable local gateway

This commit is contained in:
Peter Steinberger
2025-12-20 14:46:53 +00:00
parent cf96ad8ef9
commit f508fd3fa2
7 changed files with 79 additions and 154 deletions

View File

@@ -0,0 +1,16 @@
import Foundation
enum GatewayAutostartPolicy {
static func shouldStartGateway(mode: AppState.ConnectionMode, paused: Bool) -> Bool {
mode == .local && !paused
}
static func shouldEnsureLaunchAgent(
mode: AppState.ConnectionMode,
paused: Bool,
attachExistingOnly: Bool
) -> Bool {
shouldStartGateway(mode: mode, paused: paused) && !attachExistingOnly
}
}