style(macos): swiftformat

This commit is contained in:
Peter Steinberger
2025-12-14 05:09:48 +00:00
parent b48a556de5
commit 26bbddde8f
2 changed files with 7 additions and 8 deletions

View File

@@ -137,15 +137,14 @@ enum PiOAuthStore {
static func saveAnthropicOAuth(_ creds: AnthropicOAuthCredentials) throws { static func saveAnthropicOAuth(_ creds: AnthropicOAuthCredentials) throws {
let url = self.oauthURL() let url = self.oauthURL()
let existing: [String: Any] let existing: [String: Any] = if FileManager.default.fileExists(atPath: url.path),
if FileManager.default.fileExists(atPath: url.path), let data = try? Data(contentsOf: url),
let data = try? Data(contentsOf: url), let json = try? JSONSerialization.jsonObject(with: data, options: []),
let json = try? JSONSerialization.jsonObject(with: data, options: []), let dict = json as? [String: Any]
let dict = json as? [String: Any]
{ {
existing = dict dict
} else { } else {
existing = [:] [:]
} }
var updated = existing var updated = existing

View File

@@ -333,7 +333,7 @@ final class AppState {
_ = try await GatewayConnection.shared.request( _ = try await GatewayConnection.shared.request(
method: "voicewake.set", method: "voicewake.set",
params: ["triggers": AnyCodable(sanitized)], params: ["triggers": AnyCodable(sanitized)],
timeoutMs: 10_000) timeoutMs: 10000)
} catch { } catch {
// Best-effort only. // Best-effort only.
} }