Updated help modal

This commit is contained in:
2026-02-24 07:33:11 +01:00
parent 11017ee7fa
commit 914d608d35

View File

@@ -33,6 +33,7 @@ struct CommandDetail: Identifiable {
let brief: String let brief: String
let detail: String let detail: String
let examples: [String] let examples: [String]
var shortcut: String? = nil
} }
struct CommandCategory: Identifiable { struct CommandCategory: Identifiable {
@@ -50,13 +51,15 @@ private let helpCategories: [CommandCategory] = [
command: "/history", command: "/history",
brief: "View 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.", 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( CommandDetail(
command: "/clear", command: "/clear",
brief: "Clear chat history", brief: "Clear chat history",
detail: "Removes all messages from the current session and resets the conversation. This does not delete saved conversations.", 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( CommandDetail(
command: "/retry", command: "/retry",
@@ -82,7 +85,8 @@ private let helpCategories: [CommandCategory] = [
command: "/model", command: "/model",
brief: "Select AI 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.", 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( CommandDetail(
command: "/provider [name]", command: "/provider [name]",
@@ -114,13 +118,15 @@ private let helpCategories: [CommandCategory] = [
command: "/load", command: "/load",
brief: "Load saved conversation", brief: "Load saved conversation",
detail: "Opens the conversation list to browse and load a previously saved conversation. Replaces the current chat.", detail: "Opens the conversation list to browse and load a previously saved conversation. Replaces the current chat.",
examples: ["/load"] examples: ["/load"],
shortcut: "⌘L"
), ),
CommandDetail( CommandDetail(
command: "/list", command: "/list",
brief: "List saved conversations", brief: "List saved conversations",
detail: "Opens the conversation list showing all saved conversations with their dates and message counts.", detail: "Opens the conversation list showing all saved conversations with their dates and message counts.",
examples: ["/list"] examples: ["/list"],
shortcut: "⌘L"
), ),
CommandDetail( CommandDetail(
command: "/delete <name>", command: "/delete <name>",
@@ -178,7 +184,8 @@ private let helpCategories: [CommandCategory] = [
command: "/config", command: "/config",
brief: "Open settings", brief: "Open settings",
detail: "Opens the settings panel where you can configure providers, API keys, MCP permissions, appearance, and more. Also available via /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( CommandDetail(
command: "/stats", command: "/stats",
@@ -461,6 +468,15 @@ private struct CommandRow: View {
Spacer() 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") Image(systemName: "chevron.right")
.font(.caption) .font(.caption)
.foregroundStyle(.tertiary) .foregroundStyle(.tertiary)