macOS: show description when subtitle missing in CommandPalette

This commit is contained in:
Lukas
2026-08-04 18:26:04 +02:00
parent bab076c1a2
commit 066a0b7c45

View File

@@ -79,6 +79,7 @@ struct CommandPaletteView: View {
let filtered = options.filter {
$0.title.matchedIndices(for: query) != nil ||
($0.subtitle?.matchedIndices(for: query) != nil) ||
($0.description?.matchedIndices(for: query) != nil) ||
colorMatchScore(for: $0.leadingColor, query: query) > 0
}
@@ -401,7 +402,7 @@ private struct CommandRow: View {
VStack(alignment: .leading, spacing: 2) {
highlightedTitle
if let subtitle = option.subtitle {
if let subtitle = option.subtitle ?? option.description {
highlightedSubtitle(subtitle)
.font(.caption)
.foregroundStyle(.secondary)