claude-code/commands/review/ultrareviewEnabled.ts
kuberwastaken ec53fcbe95 init
2026-03-31 16:25:52 +05:30

14 lines
526 B
TypeScript

import { getFeatureValue_CACHED_MAY_BE_STALE } from '../../services/analytics/growthbook.js'
/**
* Runtime gate for /ultrareview. GB config's `enabled` field controls
* visibility — isEnabled() on the command filters it from getCommands()
* when false, so ungated users don't see the command at all.
*/
export function isUltrareviewEnabled(): boolean {
const cfg = getFeatureValue_CACHED_MAY_BE_STALE<Record<
string,
unknown
> | null>('tengu_review_bughunter_config', null)
return cfg?.enabled === true
}