From 74c8be8f9443fc2b0b453a8180ed6539498ba6d8 Mon Sep 17 00:00:00 2001 From: Rune Olsen Date: Mon, 20 Jul 2026 07:24:20 +0200 Subject: [PATCH] Fix Cmd+? opening Help Book in the default browser instead of Help Viewer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit openHelp() always found the bundled oAI.help folder, so it always took the NSWorkspace.open(index.html) branch — handing the page to the default web browser. The NSHelpManager branch, which launches the native Help Viewer (with its built-in full-text search), was unreachable dead code. Now always routes through NSHelpManager. --- oAI/oAIApp.swift | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/oAI/oAIApp.swift b/oAI/oAIApp.swift index de68282..7339c34 100644 --- a/oAI/oAIApp.swift +++ b/oAI/oAIApp.swift @@ -161,12 +161,7 @@ struct oAIApp: App { #if os(macOS) private func openHelp() { - if let helpBookURL = Bundle.main.url(forResource: "oAI.help", withExtension: nil) { - NSWorkspace.shared.open(helpBookURL.appendingPathComponent("Contents/Resources/en.lproj/index.html")) - } else { - // Fallback to Apple Help if help book not found - NSHelpManager.shared.openHelpAnchor("", inBook: Bundle.main.object(forInfoDictionaryKey: "CFBundleHelpBookName") as? String) - } + NSHelpManager.shared.openHelpAnchor("", inBook: Bundle.main.object(forInfoDictionaryKey: "CFBundleHelpBookName") as? String) } #endif }