From 1ebde4dc24cfaf29e2e9242e1ae05a3a5622b316 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Thu, 8 Jan 2026 01:49:29 +0000 Subject: [PATCH] style: align voice wake text utils format --- apps/macos/Sources/Clawdbot/VoiceWakeTextUtils.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/macos/Sources/Clawdbot/VoiceWakeTextUtils.swift b/apps/macos/Sources/Clawdbot/VoiceWakeTextUtils.swift index 8decebab9..9311765ad 100644 --- a/apps/macos/Sources/Clawdbot/VoiceWakeTextUtils.swift +++ b/apps/macos/Sources/Clawdbot/VoiceWakeTextUtils.swift @@ -4,6 +4,7 @@ import SwabbleKit enum VoiceWakeTextUtils { private static let whitespaceAndPunctuation = CharacterSet.whitespacesAndNewlines .union(.punctuationCharacters) + typealias TrimWake = (String, [String]) -> String static func normalizeToken(_ token: String) -> String { token @@ -34,8 +35,8 @@ enum VoiceWakeTextUtils { transcript: String, triggers: [String], minCommandLength: Int, - trimWake: (String, [String]) -> String - ) -> String? { + trimWake: TrimWake) -> String? + { guard !transcript.isEmpty else { return nil } guard !self.normalizeToken(transcript).isEmpty else { return nil } guard WakeWordGate.matchesTextOnly(text: transcript, triggers: triggers) else { return nil }