Align GitHub Copilot quota usage with AI credits
This commit is contained in:
@@ -1362,9 +1362,7 @@ const buildCopilotWindows = (payload: Record<string, unknown>) => {
|
||||
});
|
||||
};
|
||||
|
||||
addWindow('chat', quota.chat as Record<string, unknown> | undefined);
|
||||
addWindow('completions', quota.completions as Record<string, unknown> | undefined);
|
||||
addWindow('premium', quota.premium_interactions as Record<string, unknown> | undefined);
|
||||
addWindow('premium_interactions', quota.premium_interactions as Record<string, unknown> | undefined);
|
||||
|
||||
return windows;
|
||||
};
|
||||
@@ -1462,7 +1460,9 @@ const fetchCopilotAddonQuota = async (): Promise<ProviderResult> => {
|
||||
|
||||
const payload = await response.json() as Record<string, unknown>;
|
||||
const windows = buildCopilotWindows(payload);
|
||||
const premium = windows.premium ? { premium: windows.premium } : windows;
|
||||
const premium = windows.premium_interactions
|
||||
? { premium_interactions: windows.premium_interactions }
|
||||
: windows;
|
||||
|
||||
return buildResult({
|
||||
providerId: 'github-copilot-addon',
|
||||
|
||||
Reference in New Issue
Block a user