()
| 1660 | } |
| 1661 | |
| 1662 | export function getSubscriptionType(): SubscriptionType | null { |
| 1663 | // Check for mock subscription type first (ANT-only testing) |
| 1664 | if (shouldUseMockSubscription()) { |
| 1665 | return getMockSubscriptionType() |
| 1666 | } |
| 1667 | |
| 1668 | if (!isAnthropicAuthEnabled()) { |
| 1669 | return null |
| 1670 | } |
| 1671 | const oauthTokens = getClaudeAIOAuthTokens() |
| 1672 | if (!oauthTokens) { |
| 1673 | return null |
| 1674 | } |
| 1675 | |
| 1676 | return oauthTokens.subscriptionType ?? null |
| 1677 | } |
| 1678 | |
| 1679 | export function isMaxSubscriber(): boolean { |
| 1680 | return getSubscriptionType() === 'max' |
no test coverage detected