[web] Remove some unused code related to AI assist (#35533)

* Remove unused `ol-addonPrices`

* Remove unused `showAiAssistAnnualDiscount`

* Remove unused `buyAddOnUrl` and related code

GitOrigin-RevId: d4f47d8c6cd8e2b304ad5c0a2c78cbef28a6cb97
This commit is contained in:
Antoine Clausse
2026-09-17 11:29:35 +00:00
committed by Copybot
parent 04c9e583a3
commit 82f92933a2
4 changed files with 0 additions and 61 deletions
@@ -914,10 +914,6 @@ const _ProjectController = {
showAiFeaturesDisabled = false
}
// only add-on is ai based, so we only need its pricing info if ai features are usable
const addonPrices =
showAiFeatures && (await ProjectController._getAddonPrices(req, res))
let standardPlanPricing
let recommendedCurrency
if (Features.hasFeature('saas')) {
@@ -1049,7 +1045,6 @@ const _ProjectController = {
isSaas: Features.hasFeature('saas'),
shouldLoadHotjar,
customerIoEnabled: true,
addonPrices,
compileSettings: {
compileTimeout: ownerFeatures?.compileTimeout,
},
@@ -1092,37 +1087,6 @@ const _ProjectController = {
}
},
// todo: quota clean-up: these can be removed potentially?
async _getAddonPrices(req, res, addonPlans = ['assistant']) {
const plansData = {}
const locale = req.i18n.language
const { currency } = await SubscriptionController.getRecommendedCurrency(
req,
res
)
addonPlans.forEach(plan => {
const annualPrice = Settings.localizedAddOnsPricing[currency][plan].annual
const monthlyPrice =
Settings.localizedAddOnsPricing[currency][plan].monthly
const annualDividedByTwelve =
Settings.localizedAddOnsPricing[currency][plan].annualDividedByTwelve
plansData[plan] = {
annual: formatCurrency(annualPrice, currency, locale, true),
annualDividedByTwelve: formatCurrency(
annualDividedByTwelve,
currency,
locale,
true
),
monthly: formatCurrency(monthlyPrice, currency, locale, true),
}
})
return plansData
},
async _refreshFeatures(req, user) {
// If the feature refresh has failed in this session, don't retry
// it - require the user to log in again.
@@ -1490,7 +1454,6 @@ const ProjectController = {
_isInPercentageRollout: _ProjectController._isInPercentageRollout,
_refreshFeatures: _ProjectController._refreshFeatures,
_getPlanPricing: _ProjectController._getPlanPricing,
_getAddonPrices: _ProjectController._getAddonPrices,
_setWritefullTrialState: _ProjectController._setWritefullTrialState,
}