Revert "fix: improve GitHub Copilot integration"

This reverts commit 21a9b3b66f.
This commit is contained in:
Peter Steinberger
2026-01-23 07:12:01 +00:00
parent bc75d58e9e
commit f1afc722da
16 changed files with 153 additions and 277 deletions

View File

@@ -128,6 +128,13 @@ export async function compactEmbeddedPiSession(params: {
`No API key resolved for provider "${model.provider}" (auth mode: ${apiKeyInfo.mode}).`,
);
}
} else if (model.provider === "github-copilot") {
const { resolveCopilotApiToken } =
await import("../../providers/github-copilot-token.js");
const copilotToken = await resolveCopilotApiToken({
githubToken: apiKeyInfo.apiKey,
});
authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
} else {
authStorage.setRuntimeApiKey(model.provider, apiKeyInfo.apiKey);
}