diff --git a/apps/macos/Sources/Clawdbot/ChannelsSettings+ChannelState.swift b/apps/macos/Sources/Clawdbot/ChannelsSettings+ChannelState.swift index e4dee9929..79dd97cf9 100644 --- a/apps/macos/Sources/Clawdbot/ChannelsSettings+ChannelState.swift +++ b/apps/macos/Sources/Clawdbot/ChannelsSettings+ChannelState.swift @@ -432,11 +432,11 @@ extension ChannelsSettings { } private func resolveChannelDetailTitle(_ id: String) -> String { - return self.store.resolveChannelDetailLabel(id) + self.store.resolveChannelDetailLabel(id) } private func resolveChannelSystemImage(_ id: String) -> String { - return self.store.resolveChannelSystemImage(id) + self.store.resolveChannelSystemImage(id) } private func channelStatusDictionary(_ id: String) -> [String: AnyCodable]? { diff --git a/apps/macos/Sources/Clawdbot/ChannelsStore.swift b/apps/macos/Sources/Clawdbot/ChannelsStore.swift index 61b4a744b..e62e737a4 100644 --- a/apps/macos/Sources/Clawdbot/ChannelsStore.swift +++ b/apps/macos/Sources/Clawdbot/ChannelsStore.swift @@ -263,7 +263,7 @@ final class ChannelsStore { func orderedChannelIds() -> [String] { if let meta = self.snapshot?.channelMeta, !meta.isEmpty { - return meta.map { $0.id } + return meta.map(\.id) } return self.snapshot?.channelOrder ?? [] } diff --git a/apps/macos/Sources/Clawdbot/GatewayEndpointStore.swift b/apps/macos/Sources/Clawdbot/GatewayEndpointStore.swift index b28f8fe3a..766511301 100644 --- a/apps/macos/Sources/Clawdbot/GatewayEndpointStore.swift +++ b/apps/macos/Sources/Clawdbot/GatewayEndpointStore.swift @@ -165,7 +165,7 @@ actor GatewayEndpointStore { } return trimmed } - + if let configToken = self.resolveConfigToken(isRemote: isRemote, root: root), !configToken.isEmpty { @@ -177,7 +177,7 @@ actor GatewayEndpointStore { { return token } - + return nil } diff --git a/apps/macos/Sources/ClawdbotIPC/IPC.swift b/apps/macos/Sources/ClawdbotIPC/IPC.swift index 5ad0afcd1..058cb0508 100644 --- a/apps/macos/Sources/ClawdbotIPC/IPC.swift +++ b/apps/macos/Sources/ClawdbotIPC/IPC.swift @@ -408,8 +408,7 @@ extension Request: Codable { } // Shared transport settings -public let controlSocketPath = - FileManager() - .homeDirectoryForCurrentUser - .appendingPathComponent("Library/Application Support/clawdbot/control.sock") - .path +public let controlSocketPath = FileManager() + .homeDirectoryForCurrentUser + .appendingPathComponent("Library/Application Support/clawdbot/control.sock") + .path diff --git a/apps/macos/Sources/ClawdbotWizardCLI/main.swift b/apps/macos/Sources/ClawdbotWizardCLI/main.swift index 81570946f..54ddac866 100644 --- a/apps/macos/Sources/ClawdbotWizardCLI/main.swift +++ b/apps/macos/Sources/ClawdbotWizardCLI/main.swift @@ -365,7 +365,8 @@ actor GatewayWizardClient { } let payload = payloadParts.joined(separator: "|") if let signature = DeviceIdentityStore.signPayload(payload, identity: identity), - let publicKey = DeviceIdentityStore.publicKeyBase64Url(identity) { + let publicKey = DeviceIdentityStore.publicKeyBase64Url(identity) + { var device: [String: ProtoAnyCodable] = [ "id": ProtoAnyCodable(identity.deviceId), "publicKey": ProtoAnyCodable(publicKey), @@ -413,7 +414,8 @@ actor GatewayWizardClient { let frame = try decodeFrame(message) if case let .event(evt) = frame, evt.event == "connect.challenge" { if let payload = evt.payload?.value as? [String: ProtoAnyCodable], - let nonce = payload["nonce"]?.value as? String { + let nonce = payload["nonce"]?.value as? String + { return nonce } }