mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-13 22:15:33 +00:00
fix(cliproxy): preserve kiro paste-callback start route
This commit is contained in:
1 parent
fa027022a8
commit
86ca18003a
3 files changed
+33
-11
No files matched your search
@@ -1,22 +1,30 @@
|
||||
import { describe, expect, it } from 'bun:test';
|
||||
import {
|
||||
getManagementAuthUrlPath,
|
||||
getPasteCallbackStartPath,
|
||||
getManagementOAuthCallbackPath,
|
||||
} from '../../../src/cliproxy/auth/auth-types';
|
||||
|
||||
describe('auth-types management auth-url path', () => {
|
||||
describe('auth-types paste-callback start path', () => {
|
||||
it('maps providers to CLIProxyAPI management auth-url routes', () => {
|
||||
expect(getManagementAuthUrlPath('gemini')).toBe(
|
||||
expect(getPasteCallbackStartPath('gemini')).toBe(
|
||||
'/v0/management/gemini-cli-auth-url?is_webui=true'
|
||||
);
|
||||
expect(getManagementAuthUrlPath('codex')).toBe('/v0/management/codex-auth-url?is_webui=true');
|
||||
expect(getManagementAuthUrlPath('agy')).toBe(
|
||||
expect(getPasteCallbackStartPath('codex')).toBe('/v0/management/codex-auth-url?is_webui=true');
|
||||
expect(getPasteCallbackStartPath('agy')).toBe(
|
||||
'/v0/management/antigravity-auth-url?is_webui=true'
|
||||
);
|
||||
expect(getManagementAuthUrlPath('claude')).toBe(
|
||||
expect(getPasteCallbackStartPath('claude')).toBe(
|
||||
'/v0/management/anthropic-auth-url?is_webui=true'
|
||||
);
|
||||
expect(getManagementAuthUrlPath('ghcp')).toBe('/v0/management/github-auth-url?is_webui=true');
|
||||
expect(getPasteCallbackStartPath('ghcp')).toBe('/v0/management/github-auth-url?is_webui=true');
|
||||
});
|
||||
|
||||
it('keeps Kiro on the legacy start route for paste-callback mode', () => {
|
||||
expect(getPasteCallbackStartPath('kiro')).toBe('/oauth/kiro/start');
|
||||
});
|
||||
|
||||
it('still exposes the generic management auth-url helper', () => {
|
||||
expect(getManagementAuthUrlPath('kiro')).toBe('/v0/management/kiro-auth-url?is_webui=true');
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user