mirror of
https://github.com/sst/opencode.git
synced 2025-09-10 06:56:21 +00:00
Update github-copilot.ts
This commit is contained in:
parent
2051e85e96
commit
2bae63007e
1 changed files with 6 additions and 5 deletions
|
@ -1,6 +1,7 @@
|
|||
import { z } from "zod"
|
||||
import { Auth } from "./index"
|
||||
import { NamedError } from "../util/error"
|
||||
import { Installation } from "../installation"
|
||||
|
||||
export namespace AuthGithubCopilot {
|
||||
const CLIENT_ID = "Iv1.b507a08c87ecfe98"
|
||||
|
@ -37,7 +38,7 @@ export namespace AuthGithubCopilot {
|
|||
headers: {
|
||||
Accept: "application/json",
|
||||
"Content-Type": "application/json",
|
||||
"User-Agent": "GitHubCopilotChat/0.26.7",
|
||||
"User-Agent": "opencode/"+Installation.VERSION,
|
||||
},
|
||||
body: JSON.stringify({
|
||||
client_id: CLIENT_ID,
|
||||
|
@ -60,7 +61,7 @@ export namespace AuthGithubCopilot {
|
|||
headers: {
|
||||
Accept: "application/json",
|
||||
"Content-Type": "application/json",
|
||||
"User-Agent": "GitHubCopilotChat/0.26.7",
|
||||
"User-Agent": "opencode/"+Installation.VERSION,
|
||||
},
|
||||
body: JSON.stringify({
|
||||
client_id: CLIENT_ID,
|
||||
|
@ -101,9 +102,9 @@ export namespace AuthGithubCopilot {
|
|||
headers: {
|
||||
Accept: "application/json",
|
||||
Authorization: `Bearer ${info.refresh}`,
|
||||
"User-Agent": "GitHubCopilotChat/0.26.7",
|
||||
"Editor-Version": "vscode/1.99.3",
|
||||
"Editor-Plugin-Version": "copilot-chat/0.26.7",
|
||||
"User-Agent": "opencode"+Installation.VERSION,
|
||||
"Editor-Version": "opencode"+Installation.VERSION,
|
||||
"Editor-Plugin-Version": "opencode"+Installation.VERSION,
|
||||
},
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue