macOS: fold agent control into GatewayConnection

This commit is contained in:
Peter Steinberger
2025-12-17 17:10:30 +01:00
parent 557ffdbe35
commit 17a27fd312
19 changed files with 443 additions and 201 deletions

View File

@@ -44,9 +44,8 @@ final class VoiceWakeGlobalSettingsSync {
private func refreshFromGateway() async {
do {
let data = try await GatewayConnection.shared.request(method: "voicewake.get", params: nil, timeoutMs: 8000)
let payload = try JSONDecoder().decode(VoiceWakePayload.self, from: data)
AppStateStore.shared.applyGlobalVoiceWakeTriggers(payload.triggers)
let triggers = try await GatewayConnection.shared.voiceWakeGetTriggers()
AppStateStore.shared.applyGlobalVoiceWakeTriggers(triggers)
} catch {
// Best-effort only.
}