New version v2.3.6

This commit is contained in:
2026-03-04 10:19:16 +01:00
parent 65a35cd508
commit 49f842f119
52 changed files with 14034 additions and 358 deletions

View File

@@ -271,7 +271,7 @@ struct CommandSuggestionsView: View {
let selectedIndex: Int
let onSelect: (String) -> Void
static let builtInCommands: [(command: String, description: String)] = [
static let builtInCommands: [(command: String, description: LocalizedStringKey)] = [
("/help", "Show help and available commands"),
("/history", "View command history"),
("/model", "Select AI model"),
@@ -302,19 +302,19 @@ struct CommandSuggestionsView: View {
("/mcp write off", "Disable MCP write permissions"),
]
static func allCommands() -> [(command: String, description: String)] {
static func allCommands() -> [(command: String, description: LocalizedStringKey)] {
let shortcuts = SettingsService.shared.userShortcuts.map { s in
(s.command, "\(s.description)")
(s.command, LocalizedStringKey("\(s.description)"))
}
return builtInCommands + shortcuts
}
static func filteredCommands(for searchText: String) -> [(command: String, description: String)] {
static func filteredCommands(for searchText: String) -> [(command: String, description: LocalizedStringKey)] {
let search = searchText.lowercased()
return allCommands().filter { $0.command.contains(search) || search == "/" }
}
private var suggestions: [(command: String, description: String)] {
private var suggestions: [(command: String, description: LocalizedStringKey)] {
Self.filteredCommands(for: searchText)
}