diff --git a/src/cliproxy/auth/auth-types.ts b/src/cliproxy/auth/auth-types.ts index 3fc7336f..4bb06256 100644 --- a/src/cliproxy/auth/auth-types.ts +++ b/src/cliproxy/auth/auth-types.ts @@ -17,7 +17,7 @@ import { AccountInfo } from '../account-manager'; * - Agy: Authorization Code Flow with local callback server on port 51121 * - Qwen: Device Code Flow (polling-based, NO callback port needed) * - Kiro: Authorization Code Flow with local callback server on port 9876 - * - Copilot: Device Code Flow (polling-based, NO callback port needed) + * - GHCP: Device Code Flow (polling-based, NO callback port needed) */ export const OAUTH_CALLBACK_PORTS: Partial> = { gemini: 8085, @@ -25,7 +25,7 @@ export const OAUTH_CALLBACK_PORTS: Partial> = { // codex uses 1455 // agy uses 51121 // qwen uses Device Code Flow - no callback port needed - // copilot uses Device Code Flow - no callback port needed + // ghcp uses Device Code Flow - no callback port needed }; /** @@ -111,9 +111,9 @@ export const OAUTH_CONFIGS: Record = { scopes: ['codewhisperer:completions', 'codewhisperer:conversations'], authFlag: '--kiro-login', }, - copilot: { - provider: 'copilot', - displayName: 'GitHub Copilot', + ghcp: { + provider: 'ghcp', + displayName: 'GitHub Copilot (OAuth)', authUrl: 'https://github.com/login/device/code', scopes: ['copilot'], authFlag: '--github-copilot-login', @@ -132,7 +132,7 @@ export const PROVIDER_AUTH_PREFIXES: Record = { qwen: ['qwen-'], iflow: ['iflow-'], kiro: ['kiro-', 'aws-', 'codewhisperer-'], - copilot: ['github-copilot-', 'copilot-', 'gh-'], + ghcp: ['github-copilot-', 'copilot-', 'gh-'], }; /** @@ -146,7 +146,7 @@ export const PROVIDER_TYPE_VALUES: Record = { qwen: ['qwen'], iflow: ['iflow'], kiro: ['kiro', 'codewhisperer'], - copilot: ['github-copilot', 'copilot'], + ghcp: ['github-copilot', 'copilot'], }; /** diff --git a/src/cliproxy/auth/token-manager.ts b/src/cliproxy/auth/token-manager.ts index e16ea424..4eb4fa72 100644 --- a/src/cliproxy/auth/token-manager.ts +++ b/src/cliproxy/auth/token-manager.ts @@ -145,15 +145,7 @@ export function getAuthStatus(provider: CLIProxyProvider): AuthStatus { * Get auth status for all providers */ export function getAllAuthStatus(): AuthStatus[] { - const providers: CLIProxyProvider[] = [ - 'gemini', - 'codex', - 'agy', - 'qwen', - 'iflow', - 'kiro', - 'copilot', - ]; + const providers: CLIProxyProvider[] = ['gemini', 'codex', 'agy', 'qwen', 'iflow', 'kiro', 'ghcp']; return providers.map(getAuthStatus); }