mirror of
https://gitea.com/PublicAffairs/openai-github-copilot.git
synced 2025-07-23 12:23:08 +02:00
Remove cocopilot support
This commit is contained in:
@@ -61,6 +61,7 @@ const handleOPTIONS = async () => {
|
||||
const chatVersion = "0.29.0";
|
||||
const vscodeVersion = "1.102.0";
|
||||
const apiVersion = "2025-04-01";
|
||||
const githubapihost = "api.github.com";
|
||||
const getToken = async (authKey) => {
|
||||
if (authKey.startsWith("sk-")) { // dumb attempt to hide real auth key from malicious web services
|
||||
const decoded = atob(authKey.substring(3));
|
||||
@@ -68,10 +69,6 @@ const getToken = async (authKey) => {
|
||||
authKey = decoded;
|
||||
}
|
||||
}
|
||||
let githubapihost = "api.github.com";
|
||||
if (authKey.startsWith("ccu_") || authKey.endsWith("CoCopilot")) {
|
||||
githubapihost = "api.cocopilot.org";
|
||||
}
|
||||
let response = await fetch(`https://${githubapihost}/copilot_internal/v2/token`, {
|
||||
method: "GET",
|
||||
headers: {
|
||||
|
Reference in New Issue
Block a user