namespace AxCopilot.Services.Agent; internal sealed record PermissionModePresentation( string Mode, string Icon, string Title, string Description, string ColorHex); internal static class PermissionModePresentationCatalog { public static readonly IReadOnlyList Ordered = new[] { new PermissionModePresentation( PermissionModeCatalog.Default, "\uE8D7", "권한 요청", "변경하기 전에 항상 확인합니다.", "#2563EB"), new PermissionModePresentation( PermissionModeCatalog.AcceptEdits, "\uE73E", "편집 자동 승인", "모든 파일 편집을 자동 승인합니다.", "#107C10"), new PermissionModePresentation( PermissionModeCatalog.Plan, "\uE7C3", "계획 모드", "변경하기 전에 계획을 먼저 만듭니다.", "#4338CA"), new PermissionModePresentation( PermissionModeCatalog.BypassPermissions, "\uE814", "권한 건너뛰기", "파일 편집과 명령 실행까지 모두 자동 허용합니다.", "#B45309"), }; public static PermissionModePresentation Resolve(string? mode) { var normalized = PermissionModeCatalog.NormalizeGlobalMode(mode); return Ordered.FirstOrDefault(item => string.Equals(item.Mode, normalized, StringComparison.OrdinalIgnoreCase)) ?? Ordered[0]; } }