Skip to content

Commit 53fb317

Browse files
committed
fix(macos): clean swiftformat pass and sendable warning
1 parent eb0758e commit 53fb317

File tree

129 files changed

+505
-512
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+505
-512
lines changed

apps/macos/Sources/OpenClaw/CameraCaptureService.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ import OpenClawKit
66
import OSLog
77

88
actor CameraCaptureService {
9-
struct CameraDeviceInfo: Encodable, Sendable {
9+
struct CameraDeviceInfo: Encodable {
1010
let id: String
1111
let name: String
1212
let position: String
1313
let deviceType: String
1414
}
1515

16-
enum CameraError: LocalizedError, Sendable {
16+
enum CameraError: LocalizedError {
1717
case cameraUnavailable
1818
case microphoneUnavailable
1919
case permissionDenied(kind: String)

apps/macos/Sources/OpenClaw/ConfigStore.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import Foundation
22
import OpenClawProtocol
33

44
enum ConfigStore {
5-
struct Overrides: Sendable {
5+
struct Overrides {
66
var isRemoteMode: (@Sendable () async -> Bool)?
77
var loadLocal: (@MainActor @Sendable () -> [String: Any])?
88
var saveLocal: (@MainActor @Sendable ([String: Any]) -> Void)?

apps/macos/Sources/OpenClaw/ConnectionModeResolver.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import Foundation
22

3-
enum EffectiveConnectionModeSource: Sendable, Equatable {
3+
enum EffectiveConnectionModeSource: Equatable {
44
case configMode
55
case configRemoteURL
66
case userDefaults
77
case onboarding
88
}
99

10-
struct EffectiveConnectionMode: Sendable, Equatable {
10+
struct EffectiveConnectionMode: Equatable {
1111
let mode: AppState.ConnectionMode
1212
let source: EffectiveConnectionModeSource
1313
}

apps/macos/Sources/OpenClaw/ControlChannel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ struct ControlHeartbeatEvent: Codable {
1414
let reason: String?
1515
}
1616

17-
struct ControlAgentEvent: Codable, Sendable, Identifiable {
17+
struct ControlAgentEvent: Codable, Identifiable {
1818
var id: String {
1919
"\(self.runId)-\(self.seq)"
2020
}

apps/macos/Sources/OpenClaw/CronModels.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ struct CronJob: Identifiable, Codable, Equatable {
226226
}
227227
}
228228

229-
struct CronEvent: Codable, Sendable {
229+
struct CronEvent: Codable {
230230
let jobId: String
231231
let action: String
232232
let runAtMs: Int?
@@ -237,7 +237,7 @@ struct CronEvent: Codable, Sendable {
237237
let nextRunAtMs: Int?
238238
}
239239

240-
struct CronRunLogEntry: Codable, Identifiable, Sendable {
240+
struct CronRunLogEntry: Codable, Identifiable {
241241
var id: String {
242242
"\(self.jobId)-\(self.ts)"
243243
}

apps/macos/Sources/OpenClaw/DeviceModelCatalog.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Foundation
22

3-
struct DevicePresentation: Sendable {
3+
struct DevicePresentation {
44
let title: String
55
let symbol: String?
66
}

apps/macos/Sources/OpenClaw/DiagnosticsFileLog.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ actor DiagnosticsFileLog {
77
private let maxBytes: Int64 = 5 * 1024 * 1024
88
private let maxBackups = 5
99

10-
struct Record: Codable, Sendable {
10+
struct Record: Codable {
1111
let ts: String
1212
let pid: Int32
1313
let category: String

apps/macos/Sources/OpenClaw/ExecApprovals.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,13 @@ enum ExecAsk: String, CaseIterable, Codable, Identifiable {
8484
}
8585
}
8686

87-
enum ExecApprovalDecision: String, Codable, Sendable {
87+
enum ExecApprovalDecision: String, Codable {
8888
case allowOnce = "allow-once"
8989
case allowAlways = "allow-always"
9090
case deny
9191
}
9292

93-
enum ExecAllowlistPatternValidationReason: String, Codable, Sendable, Equatable {
93+
enum ExecAllowlistPatternValidationReason: String, Codable, Equatable {
9494
case empty
9595
case missingPathComponent
9696

@@ -104,12 +104,12 @@ enum ExecAllowlistPatternValidationReason: String, Codable, Sendable, Equatable
104104
}
105105
}
106106

107-
enum ExecAllowlistPatternValidation: Sendable, Equatable {
107+
enum ExecAllowlistPatternValidation: Equatable {
108108
case valid(String)
109109
case invalid(ExecAllowlistPatternValidationReason)
110110
}
111111

112-
struct ExecAllowlistRejectedEntry: Sendable, Equatable {
112+
struct ExecAllowlistRejectedEntry: Equatable {
113113
let id: UUID
114114
let pattern: String
115115
let reason: ExecAllowlistPatternValidationReason
@@ -753,7 +753,7 @@ enum ExecApprovalHelpers {
753753
}
754754
}
755755

756-
struct ExecEventPayload: Codable, Sendable {
756+
struct ExecEventPayload: Codable {
757757
var sessionKey: String
758758
var runId: String
759759
var host: String

apps/macos/Sources/OpenClaw/ExecApprovalsGatewayPrompter.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ final class ExecApprovalsGatewayPrompter {
1111
private let logger = Logger(subsystem: "ai.openclaw", category: "exec-approvals.gateway")
1212
private var task: Task<Void, Never>?
1313

14-
struct GatewayApprovalRequest: Codable, Sendable {
14+
struct GatewayApprovalRequest: Codable {
1515
var id: String
1616
var request: ExecApprovalPromptRequest
1717
var createdAtMs: Int

apps/macos/Sources/OpenClaw/ExecApprovalsSocket.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import Foundation
55
import OpenClawKit
66
import OSLog
77

8-
struct ExecApprovalPromptRequest: Codable, Sendable {
8+
struct ExecApprovalPromptRequest: Codable {
99
var command: String
1010
var cwd: String?
1111
var host: String?

0 commit comments

Comments
 (0)