feat(macos): auto-enable local gateway
This commit is contained in:
16
apps/macos/Sources/Clawdis/GatewayAutostartPolicy.swift
Normal file
16
apps/macos/Sources/Clawdis/GatewayAutostartPolicy.swift
Normal 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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user