Skip to content

Commit dcafbe1

Browse files
committed
fix: simplify copilotBaseUrl logic and correct openai-intent header value
1 parent 0d6f7aa commit dcafbe1

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/lib/api-config.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ const USER_AGENT = `GitHubCopilotChat/${COPILOT_VERSION}`
1414
const API_VERSION = "2025-10-01"
1515

1616
export const copilotBaseUrl = (state: State) =>
17-
state.accountType === "individual" ?
18-
"https://api.githubcopilot.com"
19-
: `https://api.${state.accountType}.githubcopilot.com`
17+
`https://api.${state.accountType}.githubcopilot.com`
18+
2019
export const copilotHeaders = (state: State, vision: boolean = false) => {
2120
const headers: Record<string, string> = {
2221
Authorization: `Bearer ${state.copilotToken}`,
@@ -25,7 +24,7 @@ export const copilotHeaders = (state: State, vision: boolean = false) => {
2524
"editor-version": `vscode/${state.vsCodeVersion}`,
2625
"editor-plugin-version": EDITOR_PLUGIN_VERSION,
2726
"user-agent": USER_AGENT,
28-
"openai-intent": "conversation-panel",
27+
"openai-intent": "conversation-agent",
2928
"x-github-api-version": API_VERSION,
3029
"x-request-id": randomUUID(),
3130
"x-vscode-user-agent-library-version": "electron-fetch",

0 commit comments

Comments
 (0)