()
| 1728 | } |
| 1729 | |
| 1730 | export function getSubscriptionType(): SubscriptionType | null { |
| 1731 | // Check for mock subscription type first (ANT-only testing) |
| 1732 | if (shouldUseMockSubscription()) { |
| 1733 | return getMockSubscriptionType() |
| 1734 | } |
| 1735 | |
| 1736 | if (!isAnthropicAuthEnabled()) { |
| 1737 | return null |
| 1738 | } |
| 1739 | const oauthTokens = getClaudeAIOAuthTokens() |
| 1740 | if (!oauthTokens) { |
| 1741 | return null |
| 1742 | } |
| 1743 | |
| 1744 | return oauthTokens.subscriptionType ?? null |
| 1745 | } |
| 1746 | |
| 1747 | export function isMaxSubscriber(): boolean { |
| 1748 | return getSubscriptionType() === 'max' |
no test coverage detected