mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-03-01 13:03:53 +08:00
feat(frontend): implement comprehensive API Settings Management Interface
Implement a complete API Management Interface for React frontend with split- panel layout, migrating all features from legacy JS frontend. New Features: - API Settings page with 5 tabs: Providers, Endpoints, Cache, Model Pools, CLI Settings - Provider Management: CRUD operations, multi-key rotation, health checks, test connection - Endpoint Management: CRUD operations, cache strategy configuration, enable/disable toggle - Cache Settings: Global configuration, statistics display, clear cache functionality - Model Pool Management: CRUD operations, auto-discovery feature, provider exclusion - CLI Settings Management: Provider-based and Direct modes, full CRUD support - Multi-Key Settings Modal: Manage API keys with rotation strategies and weights - Manage Models Modal: View and manage models per provider (LLM and Embedding) - Sync to CodexLens: Integration handler for provider configuration sync Technical Implementation: - Created 12 new React components in components/api-settings/ - Extended lib/api.ts with 460+ lines of API client functions - Created hooks/useApiSettings.ts with 772 lines of TanStack Query hooks - Added RadioGroup UI component for form selections - Implemented unified error handling with useNotifications across all operations - Complete i18n support (500+ keys in English and Chinese) - Route integration (/api-settings) and sidebar navigation Code Quality: - All acceptance criteria from plan.json verified - Code review passed with Gemini (all 7 IMPL tasks complete) - Follows existing patterns: Shadcn UI, TanStack Query, react-intl, Lucide icons
This commit is contained in:
@@ -128,7 +128,14 @@
|
||||
"modelBaseUrlHint": "Override base URL for this model",
|
||||
"basicInfo": "Basic Information",
|
||||
"endpointSettings": "Endpoint Settings",
|
||||
"apiBaseUpdated": "Base URL updated"
|
||||
"apiBaseUpdated": "Base URL updated",
|
||||
"showDisabled": "Show Disabled",
|
||||
"hideDisabled": "Hide Disabled",
|
||||
"showAll": "Show All",
|
||||
"saveError": "Failed to save provider",
|
||||
"deleteError": "Failed to delete provider",
|
||||
"toggleError": "Failed to toggle provider",
|
||||
"testError": "Failed to test provider"
|
||||
},
|
||||
"endpoints": {
|
||||
"title": "Endpoints",
|
||||
@@ -168,7 +175,13 @@
|
||||
"noEndpointsHint": "Add an endpoint to create custom API mappings with caching.",
|
||||
"providerBased": "Provider-based",
|
||||
"direct": "Direct",
|
||||
"off": "Off"
|
||||
"off": "Off",
|
||||
"showDisabled": "Show Disabled",
|
||||
"showAll": "Show All",
|
||||
"basicInfo": "Basic Information",
|
||||
"saveError": "Failed to save endpoint",
|
||||
"deleteError": "Failed to delete endpoint",
|
||||
"toggleError": "Failed to toggle endpoint"
|
||||
},
|
||||
"cache": {
|
||||
"title": "Cache",
|
||||
@@ -249,6 +262,7 @@
|
||||
"cliSettings": {
|
||||
"title": "CLI Settings",
|
||||
"description": "Configure CLI tool settings and modes",
|
||||
"modalDescription": "Configure Claude CLI wrapper settings for different endpoints",
|
||||
"stats": {
|
||||
"total": "Total Settings",
|
||||
"enabled": "Enabled"
|
||||
@@ -263,12 +277,24 @@
|
||||
"title": "No CLI Settings Found",
|
||||
"message": "Add CLI settings to configure tool-specific options."
|
||||
},
|
||||
"searchPlaceholder": "Search by name or description...",
|
||||
"mode": "Mode",
|
||||
"providerBased": "Provider-based",
|
||||
"direct": "Direct",
|
||||
"authToken": "Auth Token",
|
||||
"baseUrl": "Base URL",
|
||||
"model": "Model"
|
||||
"model": "Model",
|
||||
"namePlaceholder": "e.g., production-claude",
|
||||
"descriptionPlaceholder": "Optional description for this configuration",
|
||||
"selectProvider": "Select a provider",
|
||||
"includeCoAuthoredBy": "Include co-authored-by in commits",
|
||||
"validation": {
|
||||
"providerRequired": "Please select a provider",
|
||||
"authOrBaseUrlRequired": "Please enter auth token or base URL"
|
||||
},
|
||||
"saveError": "Failed to save CLI settings",
|
||||
"deleteError": "Failed to delete CLI settings",
|
||||
"toggleError": "Failed to toggle CLI settings"
|
||||
},
|
||||
"ccwLitellm": {
|
||||
"title": "CCW-LiteLLM Package",
|
||||
@@ -299,6 +325,7 @@
|
||||
"add": "Add",
|
||||
"close": "Close",
|
||||
"loading": "Loading...",
|
||||
"saving": "Saving...",
|
||||
"error": "Error",
|
||||
"success": "Success",
|
||||
"warning": "Warning",
|
||||
@@ -311,7 +338,12 @@
|
||||
"name": "Name",
|
||||
"description": "Description",
|
||||
"type": "Type",
|
||||
"status": "Status"
|
||||
"status": "Status",
|
||||
"provider": "Provider",
|
||||
"enableThis": "Enable this",
|
||||
"validation": {
|
||||
"nameRequired": "Name is required"
|
||||
}
|
||||
},
|
||||
"messages": {
|
||||
"settingsSaved": "Settings saved successfully",
|
||||
|
||||
@@ -60,6 +60,26 @@
|
||||
"cancelled": "Cancelled",
|
||||
"inProgress": "In Progress"
|
||||
},
|
||||
"semantic": {
|
||||
"installTitle": "Install Semantic Search",
|
||||
"installDescription": "Install FastEmbed and semantic search dependencies with GPU acceleration support.",
|
||||
"installInfo": "GPU acceleration requires compatible hardware. CPU mode works on all systems but is slower.",
|
||||
"gpu": {
|
||||
"cpu": "CPU Mode",
|
||||
"cpuDesc": "Universal compatibility, slower processing. Works on all systems.",
|
||||
"directml": "DirectML (Windows GPU)",
|
||||
"directmlDesc": "Best for Windows with AMD/Intel GPUs. Recommended for most users.",
|
||||
"cuda": "CUDA (NVIDIA GPU)",
|
||||
"cudaDesc": "Best performance with NVIDIA GPUs. Requires CUDA toolkit."
|
||||
},
|
||||
"recommended": "Recommended",
|
||||
"install": "Install",
|
||||
"installing": "Installing...",
|
||||
"installSuccess": "Installation Complete",
|
||||
"installSuccessDesc": "Semantic search installed successfully with {mode} mode",
|
||||
"installFailed": "Installation Failed",
|
||||
"unknownError": "An unknown error occurred"
|
||||
},
|
||||
"settings": {
|
||||
"currentCount": "Current Index Count",
|
||||
"currentWorkers": "Current Workers",
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
"settings": "Settings",
|
||||
"mcp": "MCP Servers",
|
||||
"codexlens": "CodexLens",
|
||||
"apiSettings": "API Settings",
|
||||
"endpoints": "CLI Endpoints",
|
||||
"installations": "Installations",
|
||||
"help": "Help",
|
||||
|
||||
@@ -128,7 +128,11 @@
|
||||
"modelBaseUrlHint": "为此模型覆盖基础 URL",
|
||||
"basicInfo": "基本信息",
|
||||
"endpointSettings": "端点设置",
|
||||
"apiBaseUpdated": "基础 URL 已更新"
|
||||
"apiBaseUpdated": "基础 URL 已更新",
|
||||
"saveError": "保存提供商失败",
|
||||
"deleteError": "删除提供商失败",
|
||||
"toggleError": "切换提供商状态失败",
|
||||
"testError": "测试提供商失败"
|
||||
},
|
||||
"endpoints": {
|
||||
"title": "端点",
|
||||
@@ -168,7 +172,10 @@
|
||||
"noEndpointsHint": "添加端点以创建带有缓存的自定义 API 映射。",
|
||||
"providerBased": "基于提供商",
|
||||
"direct": "直接",
|
||||
"off": "关闭"
|
||||
"off": "关闭",
|
||||
"saveError": "保存端点失败",
|
||||
"deleteError": "删除端点失败",
|
||||
"toggleError": "切换端点状态失败"
|
||||
},
|
||||
"cache": {
|
||||
"title": "缓存",
|
||||
@@ -249,6 +256,7 @@
|
||||
"cliSettings": {
|
||||
"title": "CLI 设置",
|
||||
"description": "配置 CLI 工具设置和模式",
|
||||
"modalDescription": "为不同的端点配置 Claude CLI 包装器设置",
|
||||
"stats": {
|
||||
"total": "总设置数",
|
||||
"enabled": "已启用"
|
||||
@@ -263,12 +271,24 @@
|
||||
"title": "未找到 CLI 设置",
|
||||
"message": "添加 CLI 设置以配置工具特定选项。"
|
||||
},
|
||||
"searchPlaceholder": "按名称或描述搜索...",
|
||||
"mode": "模式",
|
||||
"providerBased": "基于提供商",
|
||||
"direct": "直接",
|
||||
"authToken": "认证令牌",
|
||||
"baseUrl": "基础 URL",
|
||||
"model": "模型"
|
||||
"model": "模型",
|
||||
"namePlaceholder": "例如:production-claude",
|
||||
"descriptionPlaceholder": "此配置的可选描述",
|
||||
"selectProvider": "选择提供商",
|
||||
"includeCoAuthoredBy": "在提交中包含 co-authored-by",
|
||||
"validation": {
|
||||
"providerRequired": "请选择提供商",
|
||||
"authOrBaseUrlRequired": "请输入认证令牌或基础 URL"
|
||||
},
|
||||
"saveError": "保存 CLI 设置失败",
|
||||
"deleteError": "删除 CLI 设置失败",
|
||||
"toggleError": "切换 CLI 设置状态失败"
|
||||
},
|
||||
"ccwLitellm": {
|
||||
"title": "CCW-LiteLLM 包",
|
||||
@@ -299,6 +319,7 @@
|
||||
"add": "添加",
|
||||
"close": "关闭",
|
||||
"loading": "加载中...",
|
||||
"saving": "保存中...",
|
||||
"error": "错误",
|
||||
"success": "成功",
|
||||
"warning": "警告",
|
||||
@@ -311,7 +332,12 @@
|
||||
"name": "名称",
|
||||
"description": "描述",
|
||||
"type": "类型",
|
||||
"status": "状态"
|
||||
"status": "状态",
|
||||
"provider": "提供商",
|
||||
"enableThis": "启用此",
|
||||
"validation": {
|
||||
"nameRequired": "名称为必填项"
|
||||
}
|
||||
},
|
||||
"messages": {
|
||||
"settingsSaved": "设置保存成功",
|
||||
|
||||
@@ -47,6 +47,39 @@
|
||||
"lastCheck": "最后检查时间"
|
||||
}
|
||||
},
|
||||
"index": {
|
||||
"operationComplete": "索引操作完成",
|
||||
"operationFailed": "索引操作失败",
|
||||
"noProject": "未选择项目",
|
||||
"noProjectDesc": "请打开一个项目以执行索引操作。",
|
||||
"starting": "正在启动索引操作...",
|
||||
"cancelFailed": "取消操作失败",
|
||||
"unknownError": "发生未知错误",
|
||||
"complete": "完成",
|
||||
"failed": "失败",
|
||||
"cancelled": "已取消",
|
||||
"inProgress": "进行中"
|
||||
},
|
||||
"semantic": {
|
||||
"installTitle": "安装语义搜索",
|
||||
"installDescription": "安装 FastEmbed 和语义搜索依赖,支持 GPU 加速。",
|
||||
"installInfo": "GPU 加速需要兼容的硬件。CPU 模式在所有系统上都可用,但速度较慢。",
|
||||
"gpu": {
|
||||
"cpu": "CPU 模式",
|
||||
"cpuDesc": "通用兼容,处理较慢。适用于所有系统。",
|
||||
"directml": "DirectML(Windows GPU)",
|
||||
"directmlDesc": "最适合带 AMD/Intel GPU 的 Windows 系统。推荐大多数用户使用。",
|
||||
"cuda": "CUDA(NVIDIA GPU)",
|
||||
"cudaDesc": "NVIDIA GPU 性能最佳。需要 CUDA 工具包。"
|
||||
},
|
||||
"recommended": "推荐",
|
||||
"install": "安装",
|
||||
"installing": "安装中...",
|
||||
"installSuccess": "安装完成",
|
||||
"installSuccessDesc": "语义搜索已成功安装,使用 {mode} 模式",
|
||||
"installFailed": "安装失败",
|
||||
"unknownError": "发生未知错误"
|
||||
},
|
||||
"settings": {
|
||||
"currentCount": "当前索引数量",
|
||||
"currentWorkers": "当前工作线程",
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
"settings": "设置",
|
||||
"mcp": "MCP 服务器",
|
||||
"codexlens": "CodexLens",
|
||||
"apiSettings": "API 设置",
|
||||
"endpoints": "CLI 端点",
|
||||
"installations": "安装",
|
||||
"help": "帮助",
|
||||
|
||||
Reference in New Issue
Block a user