mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-09 00:01:17 +00:00
fix(github-copilot): send IDE auth headers on runtime requests (#60755)
* Fix Copilot IDE auth headers * fix(github-copilot): align tests and changelog * fix(changelog): scope copilot replacement entry --------- Co-authored-by: VACInc <3279061+VACInc@users.noreply.github.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import path from "node:path";
|
||||
import { resolveStateDir } from "../config/paths.js";
|
||||
import { loadJsonFile, saveJsonFile } from "../infra/json-file.js";
|
||||
import { buildCopilotIdeHeaders } from "./copilot-dynamic-headers.js";
|
||||
import { resolveProviderEndpoint } from "./provider-attribution.js";
|
||||
|
||||
const COPILOT_TOKEN_URL = "https://api.github.com/copilot_internal/v2/token";
|
||||
@@ -135,6 +136,7 @@ export async function resolveCopilotApiToken(params: {
|
||||
headers: {
|
||||
Accept: "application/json",
|
||||
Authorization: `Bearer ${params.githubToken}`,
|
||||
...buildCopilotIdeHeaders({ includeApiVersion: true }),
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user