feat: allow for users on both free plans and premium plans to use the freemium ai assist (#26350)

GitOrigin-RevId: cef1051800abac3d4f7039ade2d79c75d5c15c8f
This commit is contained in:
Jimmy Domagala-Tang
2025-06-11 17:17:23 +02:00
committed by Copybot
parent 24caafa6f0
commit 50268ba998
@@ -659,13 +659,9 @@ const _ProjectController = {
const hasPaidSubscription = isPaidSubscription(subscription)
const hasManuallyCollectedSubscription =
subscription?.collectionMethod === 'manual'
const canPurchaseAddons = !(
hasPaidSubscription || hasManuallyCollectedSubscription
)
const assistantDisabled = user.aiErrorAssistant?.enabled === false // the assistant has been manually disabled by the user
const canUseErrorAssistant =
(user.features?.aiErrorAssistant || canPurchaseAddons) &&
!assistantDisabled
!hasManuallyCollectedSubscription && !assistantDisabled
let featureUsage = {}