Align GitHub Copilot quota usage with AI credits

This commit is contained in:
Jakub Syty
2026-08-14 15:59:33 +02:00
parent fe1f6130d6
commit dcf02f13a1
17 changed files with 97 additions and 20 deletions
+4 -4
View File
@@ -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',