diff --git a/apps/macos/Sources/Clawdis/ConfigSettings.swift b/apps/macos/Sources/Clawdis/ConfigSettings.swift index e7567ad39..903bf1610 100644 --- a/apps/macos/Sources/Clawdis/ConfigSettings.swift +++ b/apps/macos/Sources/Clawdis/ConfigSettings.swift @@ -334,7 +334,7 @@ struct ConfigSettings: View { .frame(maxWidth: .infinity) .disabled(self.hasEnvApiKey) .onChange(of: self.talkApiKey) { _, _ in self.autosaveConfig() } - if !self.hasEnvApiKey && !self.talkApiKey.isEmpty { + if !self.hasEnvApiKey, !self.talkApiKey.isEmpty { Button("Clear") { self.talkApiKey = "" self.autosaveConfig() @@ -346,8 +346,8 @@ struct ConfigSettings: View { Text("Using ELEVENLABS_API_KEY from the environment.") .font(.footnote) .foregroundStyle(.secondary) - } else if self.gatewayApiKeyFound - && self.talkApiKey.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty + } else if self.gatewayApiKeyFound, + self.talkApiKey.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty { Text("Using API key from the gateway profile.") .font(.footnote) @@ -468,8 +468,7 @@ struct ConfigSettings: View { browserAttachOnly: browserAttachOnly, talkVoiceId: talkVoiceId, talkApiKey: talkApiKey, - talkInterruptOnSpeech: talkInterruptOnSpeech - ) + talkInterruptOnSpeech: talkInterruptOnSpeech) let errorMessage = await ConfigSettings.buildAndSaveConfig(draft) @@ -527,7 +526,7 @@ struct ConfigSettings: View { do { try await ConfigStore.save(root) return nil - } catch let error { + } catch { return error.localizedDescription } } diff --git a/apps/macos/Sources/Clawdis/ConnectionsSettings.swift b/apps/macos/Sources/Clawdis/ConnectionsSettings.swift index 4ab3d0617..60efdd53b 100644 --- a/apps/macos/Sources/Clawdis/ConnectionsSettings.swift +++ b/apps/macos/Sources/Clawdis/ConnectionsSettings.swift @@ -13,11 +13,11 @@ struct ConnectionsSettings: View { var sortOrder: Int { switch self { - case .whatsapp: return 0 - case .telegram: return 1 - case .discord: return 2 - case .signal: return 3 - case .imessage: return 4 + case .whatsapp: 0 + case .telegram: 1 + case .discord: 2 + case .signal: 3 + case .imessage: 4 } } } diff --git a/apps/macos/Tests/ClawdisIPCTests/ConnectionsSettingsSmokeTests.swift b/apps/macos/Tests/ClawdisIPCTests/ConnectionsSettingsSmokeTests.swift index dd1151d2a..46993196b 100644 --- a/apps/macos/Tests/ClawdisIPCTests/ConnectionsSettingsSmokeTests.swift +++ b/apps/macos/Tests/ClawdisIPCTests/ConnectionsSettingsSmokeTests.swift @@ -42,7 +42,9 @@ struct ConnectionsSettingsSmokeTests { error: nil, elapsedMs: 120, bot: ProvidersStatusSnapshot.TelegramBot(id: 123, username: "clawdisbot"), - webhook: ProvidersStatusSnapshot.TelegramWebhook(url: "https://example.com/hook", hasCustomCert: false)), + webhook: ProvidersStatusSnapshot.TelegramWebhook( + url: "https://example.com/hook", + hasCustomCert: false)), lastProbeAt: 1_700_000_050_000), discord: nil, signal: ProvidersStatusSnapshot.SignalStatus(