diff --git a/oAI/Views/Screens/HelpView.swift b/oAI/Views/Screens/HelpView.swift index 2cc1114..eece51a 100644 --- a/oAI/Views/Screens/HelpView.swift +++ b/oAI/Views/Screens/HelpView.swift @@ -33,6 +33,7 @@ struct CommandDetail: Identifiable { let brief: String let detail: String let examples: [String] + var shortcut: String? = nil } struct CommandCategory: Identifiable { @@ -50,13 +51,15 @@ private let helpCategories: [CommandCategory] = [ command: "/history", brief: "View command history", detail: "Opens a searchable modal showing all your previous messages with timestamps in European format (dd.MM.yyyy HH:mm:ss). Search by text content or date to find specific messages. Click any entry to reuse it.", - examples: ["/history"] + examples: ["/history"], + shortcut: "⌘H" ), CommandDetail( command: "/clear", brief: "Clear chat history", detail: "Removes all messages from the current session and resets the conversation. This does not delete saved conversations.", - examples: ["/clear"] + examples: ["/clear"], + shortcut: "⌘K" ), CommandDetail( command: "/retry", @@ -82,7 +85,8 @@ private let helpCategories: [CommandCategory] = [ command: "/model", brief: "Select AI model", detail: "Opens the model selector to browse and choose from available models. The list depends on your active provider and API key.", - examples: ["/model"] + examples: ["/model"], + shortcut: "⌘M" ), CommandDetail( command: "/provider [name]", @@ -114,13 +118,15 @@ private let helpCategories: [CommandCategory] = [ command: "/load", brief: "Load saved conversation", detail: "Opens the conversation list to browse and load a previously saved conversation. Replaces the current chat.", - examples: ["/load"] + examples: ["/load"], + shortcut: "⌘L" ), CommandDetail( command: "/list", brief: "List saved conversations", detail: "Opens the conversation list showing all saved conversations with their dates and message counts.", - examples: ["/list"] + examples: ["/list"], + shortcut: "⌘L" ), CommandDetail( command: "/delete ", @@ -178,7 +184,8 @@ private let helpCategories: [CommandCategory] = [ command: "/config", brief: "Open settings", detail: "Opens the settings panel where you can configure providers, API keys, MCP permissions, appearance, and more. Also available via /settings.", - examples: ["/config", "/settings"] + examples: ["/config", "/settings"], + shortcut: "⌘," ), CommandDetail( command: "/stats", @@ -461,6 +468,15 @@ private struct CommandRow: View { Spacer() + if let shortcut = command.shortcut { + Text(shortcut) + .font(.system(size: 11, weight: .medium)) + .foregroundStyle(.secondary) + .padding(.horizontal, 6) + .padding(.vertical, 2) + .background(.quaternary, in: RoundedRectangle(cornerRadius: 5)) + } + Image(systemName: "chevron.right") .font(.caption) .foregroundStyle(.tertiary)