Skip to content

Commit e5f8f68

Browse files
committed
tweak: update headers and token expiry logic
1 parent 9278f2e commit e5f8f68

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

index.mjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
export async function CopilotAuthPlugin({ client }) {
55
const CLIENT_ID = "Iv1.b507a08c87ecfe98";
66
const HEADERS = {
7-
"User-Agent": "GitHubCopilotChat/0.32.4",
8-
"Editor-Version": "vscode/1.105.1",
9-
"Editor-Plugin-Version": "copilot-chat/0.32.4",
7+
"User-Agent": "GitHubCopilotChat/0.35.0",
8+
"Editor-Version": "vscode/1.107.0",
9+
"Editor-Plugin-Version": "copilot-chat/0.35.0",
1010
"Copilot-Integration-Id": "vscode-chat",
1111
};
1212
const RESPONSES_API_ALTERNATE_INPUT_TYPES = [
@@ -102,7 +102,7 @@ export async function CopilotAuthPlugin({ client }) {
102102
type: "oauth",
103103
refresh: info.refresh,
104104
access: tokenData.token,
105-
expires: tokenData.expires_at * 1000,
105+
expires: tokenData.expires_at * 1000 - 5 * 60 * 1000,
106106
...(info.enterpriseUrl && {
107107
enterpriseUrl: info.enterpriseUrl,
108108
}),

0 commit comments

Comments
 (0)