style: tidy macos swift formatting

main
Peter Steinberger 2025-12-20 12:56:57 +01:00
parent 2d8e11b78b
commit 636e4d38d5
8 changed files with 25 additions and 26 deletions

View File

@ -100,6 +100,7 @@ enum DebugActions {
// ControlChannel will surface a degraded state; also refresh health to update the menu text. // ControlChannel will surface a degraded state; also refresh health to update the menu text.
Task { await HealthStore.shared.refresh(onDemand: true) } Task { await HealthStore.shared.refresh(onDemand: true) }
} }
case .unconfigured: case .unconfigured:
await GatewayConnection.shared.shutdown() await GatewayConnection.shared.shutdown()
await ControlChannel.shared.disconnect() await ControlChannel.shared.disconnect()

View File

@ -63,11 +63,10 @@ final class DeepLinkHandler {
let explicitSessionKey = link.sessionKey? let explicitSessionKey = link.sessionKey?
.trimmingCharacters(in: .whitespacesAndNewlines) .trimmingCharacters(in: .whitespacesAndNewlines)
.nonEmpty .nonEmpty
let resolvedSessionKey: String let resolvedSessionKey: String = if let explicitSessionKey {
if let explicitSessionKey { explicitSessionKey
resolvedSessionKey = explicitSessionKey
} else { } else {
resolvedSessionKey = await GatewayConnection.shared.mainSessionKey() await GatewayConnection.shared.mainSessionKey()
} }
let invocation = GatewayAgentInvocation( let invocation = GatewayAgentInvocation(
message: messagePreview, message: messagePreview,

View File

@ -9,7 +9,7 @@ final class DockIconManager: NSObject, @unchecked Sendable {
private var windowsObservation: NSKeyValueObservation? private var windowsObservation: NSKeyValueObservation?
private let logger = Logger(subsystem: "com.steipete.clawdis", category: "DockIconManager") private let logger = Logger(subsystem: "com.steipete.clawdis", category: "DockIconManager")
private override init() { override private init() {
super.init() super.init()
self.setupObservers() self.setupObservers()
Task { @MainActor in Task { @MainActor in

View File

@ -111,4 +111,3 @@ enum GatewayLaunchAgentManager {
}.value }.value
} }
} }

View File

@ -111,11 +111,11 @@ struct MenuContent: View {
private var connectionLabel: String { private var connectionLabel: String {
switch self.state.connectionMode { switch self.state.connectionMode {
case .unconfigured: case .unconfigured:
return "Clawdis Not Configured" "Clawdis Not Configured"
case .remote: case .remote:
return "Remote Clawdis Active" "Remote Clawdis Active"
case .local: case .local:
return "Clawdis Active" "Clawdis Active"
} }
} }

View File

@ -323,7 +323,7 @@ actor MacNodeRuntime {
let params = try Self.decodeParams(ClawdisSystemNotifyParams.self, from: req.paramsJSON) let params = try Self.decodeParams(ClawdisSystemNotifyParams.self, from: req.paramsJSON)
let title = params.title.trimmingCharacters(in: .whitespacesAndNewlines) let title = params.title.trimmingCharacters(in: .whitespacesAndNewlines)
let body = params.body.trimmingCharacters(in: .whitespacesAndNewlines) let body = params.body.trimmingCharacters(in: .whitespacesAndNewlines)
if title.isEmpty && body.isEmpty { if title.isEmpty, body.isEmpty {
return Self.errorResponse(req, code: .invalidRequest, message: "INVALID_REQUEST: empty notification") return Self.errorResponse(req, code: .invalidRequest, message: "INVALID_REQUEST: empty notification")
} }

View File

@ -93,11 +93,11 @@ struct OnboardingView: View {
case .remote: case .remote:
// Remote setup doesn't need local gateway/CLI/workspace setup pages, // Remote setup doesn't need local gateway/CLI/workspace setup pages,
// and WhatsApp/Telegram setup is optional. // and WhatsApp/Telegram setup is optional.
return [0, 1, 5, 9] [0, 1, 5, 9]
case .unconfigured: case .unconfigured:
return [0, 1, 9] [0, 1, 9]
case .local: case .local:
return [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
} }
} }