Skip to content

Commit 92e5c26

Browse files
author
v_frgfeng
committed
✨ update copilot header
1 parent 60d0985 commit 92e5c26

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

api/copilot/copilot.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -439,19 +439,19 @@ func GetCompletionsHeader(token string) map[string]string {
439439
uid := uuid.New().String()
440440
headersMap := map[string]string{
441441
"Host": "api.githubcopilot.com",
442-
"Accept-Encoding": "gzip, deflate, br",
442+
"Accept-Encoding": "gzip,deflate,br",
443443
"Accept": "*/*",
444444
"Authorization": "Bearer " + token,
445-
"X-RequestType-Id": uid,
445+
"X-Request-Id": uid,
446446
"X-Github-CopilotApi-Version": "2023-07-07",
447447
"Vscode-Sessionid": uid + strconv.FormatInt(time.Now().UnixNano()/int64(time.Millisecond), 10),
448448
"vscode-machineid": utils.GenHexStr(64),
449-
"Editor-Version": "vscode/1.85.0",
450-
"Editor-Plugin-Version": "copilot-chat/0.11.1",
449+
"Editor-Version": "vscode/1.86.2",
450+
"Editor-Plugin-Version": "copilot-chat/0.12.2",
451451
"Openai-Organization": "github-copilot",
452452
"Copilot-Integration-Id": "vscode-chat",
453453
"Openai-Intent": "conversation-panel",
454-
"User-Agent": "GitHubCopilotChat/0.11.1",
454+
"User-Agent": "GitHubCopilotChat/0.12.2",
455455
}
456456
return headersMap
457457
}

0 commit comments

Comments
 (0)