macOS: fix gateway strict-concurrency issues

This commit is contained in:
Peter Steinberger
2025-12-17 17:22:44 +01:00
parent 17a27fd312
commit c1985443fd
7 changed files with 61 additions and 62 deletions

View File

@@ -454,7 +454,7 @@ struct CronSettings: View {
return "in \(days)d"
}
private func save(payload: [String: Any]) async {
private func save(payload: [String: AnyCodable]) async {
guard !self.isSaving else { return }
self.isSaving = true
self.editorError = nil
@@ -494,7 +494,7 @@ struct CronJobEditor: View {
@Binding var isSaving: Bool
@Binding var error: String?
let onCancel: () -> Void
let onSave: ([String: Any]) -> Void
let onSave: ([String: AnyCodable]) -> Void
private let labelColumnWidth: CGFloat = 160
private static let introText =
@@ -879,7 +879,7 @@ struct CronJobEditor: View {
}
}
private func buildPayload() throws -> [String: Any] {
private func buildPayload() throws -> [String: AnyCodable] {
let name = self.name.trimmingCharacters(in: .whitespacesAndNewlines)
let schedule: [String: Any]
switch self.scheduleKind {
@@ -969,7 +969,7 @@ struct CronJobEditor: View {
]
}
return root
return root.mapValues { AnyCodable($0) }
}
private func buildAgentTurnPayload() -> [String: Any] {