macOS: fold agent control into GatewayConnection
This commit is contained in:
@@ -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.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user