2.4.2 #8
@@ -1526,9 +1526,6 @@ Whenever the user asks you to translate something, translate it to Norwegian Bok
|
||||
<dt><kbd>⌘,</kbd></dt>
|
||||
<dd>Open Settings</dd>
|
||||
|
||||
<dt><kbd>⌃⌘H</kbd></dt>
|
||||
<dd>Show in-app Help</dd>
|
||||
|
||||
<dt><kbd>⌘?</kbd></dt>
|
||||
<dd>Open this Help (macOS Help)</dd>
|
||||
|
||||
|
||||
@@ -213,7 +213,6 @@ private let keyboardShortcuts: [(key: String, description: String)] = [
|
||||
("\u{2318}L", "Conversations"),
|
||||
("\u{21E7}\u{2318}S", "Statistics"),
|
||||
("\u{2318},", "Settings"),
|
||||
("\u{2303}\u{2318}H", "Help"),
|
||||
]
|
||||
|
||||
// MARK: - HelpView
|
||||
|
||||
+12
-6
@@ -116,8 +116,11 @@ struct oAIApp: App {
|
||||
.disabled(chatViewModel.messages.filter { $0.role != .system }.isEmpty)
|
||||
}
|
||||
|
||||
// ── View menu ─────────────────────────────────────────────────
|
||||
CommandMenu("View") {
|
||||
// ── Chat menu ─────────────────────────────────────────────────
|
||||
// Named "Chat" (not "View") to avoid colliding with the "View" menu
|
||||
// macOS auto-adds for NavigationSplitView (Enter Full Screen, etc.) —
|
||||
// two menus both titled "View" would otherwise appear in the menu bar.
|
||||
CommandMenu("Chat") {
|
||||
Button("Select Model") { chatViewModel.showModelSelector = true }
|
||||
.keyboardShortcut("m", modifiers: .command)
|
||||
|
||||
@@ -132,9 +135,6 @@ struct oAIApp: App {
|
||||
Button("Command History") { chatViewModel.showHistory = true }
|
||||
.keyboardShortcut("h", modifiers: [.command, .shift])
|
||||
|
||||
Button("In-App Help") { chatViewModel.showHelp = true }
|
||||
.keyboardShortcut("h", modifiers: [.command, .control])
|
||||
|
||||
Button("Credits") { chatViewModel.showCredits = true }
|
||||
|
||||
Divider()
|
||||
@@ -161,7 +161,13 @@ struct oAIApp: App {
|
||||
|
||||
#if os(macOS)
|
||||
private func openHelp() {
|
||||
NSHelpManager.shared.openHelpAnchor("", inBook: Bundle.main.object(forInfoDictionaryKey: "CFBundleHelpBookName") as? String)
|
||||
// Opens the Help Book's index.html directly in the default browser rather than
|
||||
// through NSHelpManager/Help Viewer — see CLAUDE.md's macOS 27 beta note for why
|
||||
// (Apple's Tips.app replacement for Help Viewer can't resolve anchors on this beta).
|
||||
// Revisit once macOS 27 reaches RC.
|
||||
if let helpBookURL = Bundle.main.url(forResource: "oAI.help", withExtension: nil) {
|
||||
NSWorkspace.shared.open(helpBookURL.appendingPathComponent("Contents/Resources/en.lproj/index.html"))
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user