From 17aeec59a3cffd375e1821d54248b92d351e435e Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sun, 7 Dec 2025 05:46:05 +0100 Subject: [PATCH] fix: raise voice wake forward timeout to 30s --- apps/macos/Sources/Clawdis/Constants.swift | 3 ++- .../Sources/Clawdis/GeneralSettings.swift | 19 ++++++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/apps/macos/Sources/Clawdis/Constants.swift b/apps/macos/Sources/Clawdis/Constants.swift index 558c9638a..f177b00c0 100644 --- a/apps/macos/Sources/Clawdis/Constants.swift +++ b/apps/macos/Sources/Clawdis/Constants.swift @@ -26,4 +26,5 @@ let voiceWakeSupported: Bool = ProcessInfo.processInfo.operatingSystemVersion.ma let cliHelperSearchPaths = ["/usr/local/bin", "/opt/homebrew/bin"] let defaultVoiceWakeForwardCommand = "clawdis-mac agent --message \"${text}\" --thinking low" let defaultVoiceWakeForwardPort = 22 -let defaultVoiceWakeForwardTimeout: TimeInterval = 6 +// Allow enough time for remote agent responses (LLM replies often take >10s). +let defaultVoiceWakeForwardTimeout: TimeInterval = 30 diff --git a/apps/macos/Sources/Clawdis/GeneralSettings.swift b/apps/macos/Sources/Clawdis/GeneralSettings.swift index 8c8ac2115..37d1713cf 100644 --- a/apps/macos/Sources/Clawdis/GeneralSettings.swift +++ b/apps/macos/Sources/Clawdis/GeneralSettings.swift @@ -200,7 +200,7 @@ struct GeneralSettings: View { .disabled(self.healthStore.isRefreshing) Button { - NSWorkspace.shared.selectFile("/tmp/clawdis/clawdis.log", inFileViewerRootedAtPath: "/tmp/clawdis/") + self.revealLogs() } label: { Label("Reveal Logs", systemImage: "doc.text.magnifyingglass") } @@ -212,6 +212,23 @@ struct GeneralSettings: View { } } +private extension GeneralSettings { + func revealLogs() { + let path = URL(fileURLWithPath: "/tmp/clawdis/clawdis.log") + if FileManager.default.fileExists(atPath: path.path) { + NSWorkspace.shared.selectFile(path.path, inFileViewerRootedAtPath: path.deletingLastPathComponent().path) + return + } + + let alert = NSAlert() + alert.messageText = "Log file not found" + alert.informativeText = "Expected log at \(path.path). Run a health check or generate activity first." + alert.alertStyle = .informational + alert.addButton(withTitle: "OK") + alert.runModal() + } +} + private func healthAgeString(_ ms: Double?) -> String { guard let ms else { return "unknown" } return msToAge(ms)