@@ -704,25 +704,13 @@ struct ChatPanelInputArea: View {
704704 }
705705 }
706706
707- private var shouldEnableCCR : Bool {
708- guard let quotaInfo = status. quotaInfo else { return false }
709-
710- if quotaInfo. isFreeUser { return false }
711-
712- if !isCCRFFEnabled { return false }
713-
714- return true
707+ private var isFreeUser : Bool {
708+ guard let quotaInfo = status. quotaInfo else { return true }
709+
710+ return quotaInfo. isFreeUser
715711 }
716712
717713 private var ccrDisabledTooltip : String {
718- guard let quotaInfo = status. quotaInfo else {
719- return " GitHub Copilot Code Review is not available. "
720- }
721-
722- if quotaInfo. isFreeUser {
723- return " GitHub Copilot Code Review requires a paid subscription. "
724- }
725-
726714 if !isCCRFFEnabled {
727715 return " GitHub Copilot Code Review is disabled by org policy. Contact your admin. "
728716 }
@@ -737,11 +725,9 @@ struct ChatPanelInputArea: View {
737725
738726 private var codeReviewButton : some View {
739727 Group {
740- if !shouldEnableCCR {
741- codeReviewIcon
742- . foregroundColor ( Color ( nsColor: . tertiaryLabelColor) )
743- . help ( ccrDisabledTooltip)
744- } else {
728+ if isFreeUser {
729+ // Show nothing
730+ } else if isCCRFFEnabled {
745731 ZStack {
746732 stopButton
747733 . opacity ( isRequestingCodeReview ? 1 : 0 )
@@ -766,6 +752,10 @@ struct ChatPanelInputArea: View {
766752 . help ( " Code Review " )
767753 }
768754 . buttonStyle ( HoverButtonStyle ( padding: 0 ) )
755+ } else {
756+ codeReviewIcon
757+ . foregroundColor ( Color ( nsColor: . tertiaryLabelColor) )
758+ . help ( ccrDisabledTooltip)
769759 }
770760 }
771761 }
0 commit comments