mirror of
https://github.com/router-for-me/Cli-Proxy-API-Management-Center.git
synced 2026-02-18 02:30:51 +08:00
feat: add Ampcode (Amp CLI Integration) support with configuration UI and i18n
- Add ampcodeApi service for upstream URL, API key, and model mappings management - Implement Ampcode configuration modal in AiProvidersPage - Add complete i18n translations for Ampcode features (en and zh-CN) - Enhance UsagePage with mobile-responsive chart improvements and legend display - Optimize chart rendering for smaller screens - Improve page layout styles (SystemPage, AiProvidersPage alignment)
This commit is contained in:
17
src/types/ampcode.ts
Normal file
17
src/types/ampcode.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Amp CLI Integration (ampcode) 配置
|
||||
*/
|
||||
|
||||
export interface AmpcodeModelMapping {
|
||||
from: string;
|
||||
to: string;
|
||||
}
|
||||
|
||||
export interface AmpcodeConfig {
|
||||
upstreamUrl?: string;
|
||||
upstreamApiKey?: string;
|
||||
restrictManagementToLocalhost?: boolean;
|
||||
modelMappings?: AmpcodeModelMapping[];
|
||||
forceModelMappings?: boolean;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
*/
|
||||
|
||||
import type { GeminiKeyConfig, ProviderKeyConfig, OpenAIProviderConfig } from './provider';
|
||||
import type { AmpcodeConfig } from './ampcode';
|
||||
|
||||
export interface QuotaExceededConfig {
|
||||
switchProject?: boolean;
|
||||
@@ -20,6 +21,7 @@ export interface Config {
|
||||
loggingToFile?: boolean;
|
||||
wsAuth?: boolean;
|
||||
apiKeys?: string[];
|
||||
ampcode?: AmpcodeConfig;
|
||||
geminiApiKeys?: GeminiKeyConfig[];
|
||||
codexApiKeys?: ProviderKeyConfig[];
|
||||
claudeApiKeys?: ProviderKeyConfig[];
|
||||
@@ -38,6 +40,7 @@ export type RawConfigSection =
|
||||
| 'logging-to-file'
|
||||
| 'ws-auth'
|
||||
| 'api-keys'
|
||||
| 'ampcode'
|
||||
| 'gemini-api-key'
|
||||
| 'codex-api-key'
|
||||
| 'claude-api-key'
|
||||
|
||||
@@ -7,6 +7,7 @@ export * from './api';
|
||||
export * from './config';
|
||||
export * from './auth';
|
||||
export * from './provider';
|
||||
export * from './ampcode';
|
||||
export * from './authFile';
|
||||
export * from './oauth';
|
||||
export * from './usage';
|
||||
|
||||
Reference in New Issue
Block a user