csharpdeeb25a2 | 1 | using CascadeIDE.Contracts; |
| 2 | |
| 3 | namespace CascadeIDE.Features.Shell.Application; |
| 4 | |
| 5 | /// <summary>Подписи строк палитры команд (вторая строка / режим c:).</summary> |
| 6 | [PresentationProjection] |
| 7 | public static class CommandPaletteSubtitleProjection |
| 8 | { |
| 9 | public static string CommandPaletteSubtitle(string commandId, string category) |
| 10 | { |
| 11 | var tail = string.IsNullOrEmpty(category) ? "" : category.Trim(); |
| 12 | return string.IsNullOrEmpty(tail) ? commandId : $"{commandId} · {tail}"; |
| 13 | } |
| 14 | |
| 15 | /// <summary>Вторая строка в режиме <c>c:</c> (мелодия уже в заголовке строки).</summary> |
| 16 | public static string MelodyPaletteSecondaryLine(string entryTitle, string commandId, string category) |
| 17 | { |
| 18 | var tail = string.IsNullOrEmpty(category) ? "" : category.Trim(); |
| 19 | if (string.IsNullOrEmpty(tail)) |
| 20 | return $"{entryTitle} · {commandId}"; |
| 21 | return $"{entryTitle} · {commandId} · {tail}"; |
| 22 | } |
| 23 | } |
| 24 | |
View only · write via MCP/CIDE