feat: align project discovery with opencode-antigravity-auth reference
- Store project IDs in composite refresh token format (refreshToken|projectId|managedProjectId) - Add parseRefreshParts() and formatRefreshParts() for token handling - Extract and persist subscription tier during project discovery - Fetch subscription in blocking mode when missing from cached accounts - Fix conditional duetProject setting to match reference implementation - Export parseTierId() for reuse across modules Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -128,7 +128,7 @@ export async function getModelQuotas(token, projectId = null) {
|
||||
* @param {string} tierId - The tier ID from the API
|
||||
* @returns {'free' | 'pro' | 'ultra' | 'unknown'} The subscription tier
|
||||
*/
|
||||
function parseTierId(tierId) {
|
||||
export function parseTierId(tierId) {
|
||||
if (!tierId) return 'unknown';
|
||||
const lower = tierId.toLowerCase();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user