@@ -7,11 +7,9 @@ import {
77 CodyAutoSuggestionMode ,
88 NEVER ,
99 type PickResolvedConfiguration ,
10- type UserProductSubscription ,
1110 combineLatest ,
1211 createDisposables ,
1312 currentUserProductSubscription ,
14- isFreeUser ,
1513 promiseFactoryToObservable ,
1614 skipPendingOperation ,
1715} from '@sourcegraph/cody-shared'
@@ -84,12 +82,8 @@ export function createAutoEditsProvider({
8482 promiseFactoryToObservable ( async ( ) => await currentUserProductSubscription ( ) )
8583 ) . pipe (
8684 skipPendingOperation ( ) ,
87- createDisposables ( ( [ userProductSubscription ] ) => {
88- const userEligibilityInfo = isUserEligibleForAutoeditsFeature (
89- autoeditFeatureFlagEnabled ,
90- authStatus ,
91- userProductSubscription
92- )
85+ createDisposables ( ( ) => {
86+ const userEligibilityInfo = isUserEligibleForAutoeditsFeature ( autoeditFeatureFlagEnabled )
9387 if ( ! userEligibilityInfo . isUserEligible ) {
9488 handleAutoeditsNotificationForNonEligibleUser ( userEligibilityInfo . nonEligibilityReason )
9589 return [ ]
@@ -193,23 +187,13 @@ function isSettingsEditorOpen(): boolean {
193187}
194188
195189export function isUserEligibleForAutoeditsFeature (
196- autoeditsFeatureFlagEnabled : boolean ,
197- authStatus : AuthStatus ,
198- productSubscription : UserProductSubscription | null
190+ autoeditsFeatureFlagEnabled : boolean
199191) : AutoeditsUserEligibilityInfo {
200192 // Always enable auto-edit when testing
201193 if ( process . env . CODY_TESTING === 'true' || process . env . NODE_ENV === 'test' ) {
202194 return { isUserEligible : true }
203195 }
204196
205- // Free users are not eligible for auto-edit
206- if ( isFreeUser ( authStatus , productSubscription ) ) {
207- return {
208- isUserEligible : false ,
209- nonEligibilityReason : AUTOEDITS_NON_ELIGIBILITY_MESSAGES . PRO_USER_ONLY ,
210- }
211- }
212-
213197 // Users with autoedit feature flag enabled are eligible for auto-edit
214198 return {
215199 isUserEligible : autoeditsFeatureFlagEnabled ,
0 commit comments