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:
Supra4E8C
2025-12-14 00:31:05 +08:00
parent c4034c6467
commit e0584af365
14 changed files with 744 additions and 40 deletions

17
src/types/ampcode.ts Normal file
View 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;
}