@@ -73,7 +73,7 @@ export function UsageSummaryCards({ days }: UsageSummaryCardsProps) {
),
},
{
- title: t("usage.cacheTokens", "缓存 Token"),
+ title: t("usage.cacheTokens"),
value: totalCacheTokens.toLocaleString(),
icon: Database,
color: "text-orange-500",
@@ -81,13 +81,13 @@ export function UsageSummaryCards({ days }: UsageSummaryCardsProps) {
subValue: (
- {t("usage.cacheWrite", { defaultValue: "Write" })}
+ {t("usage.cacheWrite")}
{(cacheWriteTokens / 1000).toFixed(1)}k
- {t("usage.cacheRead", { defaultValue: "Read" })}
+ {t("usage.cacheRead")}
{(cacheReadTokens / 1000).toFixed(1)}k
diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json
index 322d42282..321f0861f 100644
--- a/src/i18n/locales/en.json
+++ b/src/i18n/locales/en.json
@@ -32,7 +32,11 @@
"back": "Back",
"refresh": "Refresh",
"refreshing": "Refreshing...",
- "notInstalled": "Not installed"
+ "all": "All",
+ "search": "Search",
+ "reset": "Reset",
+ "actions": "Actions",
+ "deleting": "Deleting..."
},
"apiKeyInput": {
"placeholder": "Enter API Key",
@@ -142,6 +146,34 @@
"general": "General",
"tabGeneral": "General",
"tabAdvanced": "Advanced",
+ "advanced": {
+ "configDir": {
+ "title": "Configuration Directory",
+ "description": "Manage storage paths for Claude, Codex and Gemini configurations"
+ },
+ "proxy": {
+ "title": "Local Proxy",
+ "description": "Control proxy service toggle, view status and port info",
+ "running": "Running",
+ "stopped": "Stopped"
+ },
+ "modelTest": {
+ "title": "Model Test Config",
+ "description": "Configure default models and prompts for model testing"
+ },
+ "failover": {
+ "title": "Auto Failover",
+ "description": "Configure failover queue and circuit breaker strategy"
+ },
+ "pricing": {
+ "title": "Cost Pricing",
+ "description": "Manage token pricing rules for each model"
+ },
+ "data": {
+ "title": "Data Management",
+ "description": "Import/export configurations and backup/restore"
+ }
+ },
"language": "Language",
"languageHint": "Preview interface language immediately after switching, takes effect permanently after saving.",
"theme": "Theme",
@@ -365,6 +397,50 @@
"hint": "You can continue to adjust the fields below after selecting a preset."
},
"usage": {
+ "title": "Usage Statistics",
+ "subtitle": "View AI model usage and cost statistics",
+ "today": "24 Hours",
+ "last7days": "7 Days",
+ "last30days": "30 Days",
+ "totalRequests": "Total Requests",
+ "totalCost": "Total Cost",
+ "cost": "Cost",
+ "perMillion": "(per million)",
+ "trends": "Usage Trends",
+ "rangeToday": "Today (hourly)",
+ "rangeLast7Days": "Last 7 days",
+ "rangeLast30Days": "Last 30 days",
+ "totalTokens": "Total Tokens",
+ "cacheTokens": "Cache Tokens",
+ "requestLogs": "Request Logs",
+ "providerStats": "Provider Stats",
+ "modelStats": "Model Stats",
+ "time": "Time",
+ "provider": "Provider",
+ "billingModel": "Billing Model",
+ "inputTokens": "Input",
+ "outputTokens": "Output",
+ "cacheReadTokens": "Cache Read",
+ "cacheCreationTokens": "Cache Write",
+ "timingInfo": "Duration/TTFT",
+ "status": "Status",
+ "noData": "No data",
+ "unknownProvider": "Unknown Provider",
+ "stream": "Stream",
+ "nonStream": "Non-stream",
+ "totalRecords": "{{total}} records total",
+ "modelPricing": "Model Pricing",
+ "loadPricingError": "Failed to load pricing data",
+ "modelPricingDesc": "Configure token costs for each model",
+ "noPricingData": "No pricing data. Click \"Add\" to add model pricing configuration.",
+ "model": "Model",
+ "displayName": "Display Name",
+ "inputCost": "Input Cost",
+ "outputCost": "Output Cost",
+ "cacheReadCost": "Cache Read",
+ "cacheWriteCost": "Cache Write",
+ "deleteConfirmTitle": "Confirm Delete",
+ "deleteConfirmDesc": "Are you sure you want to delete this model pricing? This action cannot be undone.",
"queryFailed": "Query failed",
"refreshUsage": "Refresh usage",
"planUsage": "Plan usage",
@@ -944,5 +1020,17 @@
"errorRateLabel": "Error Rate Threshold",
"errorRateExplain": "Open circuit breaker when error rate exceeds this value, even if failure threshold not reached"
}
+ },
+ "streamCheck": {
+ "configSaved": "Health check config saved",
+ "configSaveFailed": "Save failed",
+ "testModels": "Test Models",
+ "claudeModel": "Claude Model",
+ "codexModel": "Codex Model",
+ "geminiModel": "Gemini Model",
+ "checkParams": "Check Parameters",
+ "timeout": "Timeout (seconds)",
+ "maxRetries": "Max Retries",
+ "degradedThreshold": "Degraded Threshold (ms)"
}
}
diff --git a/src/i18n/locales/ja.json b/src/i18n/locales/ja.json
index 6a3f9ba9d..e12829d4c 100644
--- a/src/i18n/locales/ja.json
+++ b/src/i18n/locales/ja.json
@@ -32,7 +32,11 @@
"back": "戻る",
"refresh": "更新",
"refreshing": "更新中...",
- "notInstalled": "未インストール"
+ "all": "すべて",
+ "search": "検索",
+ "reset": "リセット",
+ "actions": "操作",
+ "deleting": "削除中..."
},
"apiKeyInput": {
"placeholder": "API Key を入力",
@@ -142,6 +146,34 @@
"general": "一般",
"tabGeneral": "一般",
"tabAdvanced": "詳細",
+ "advanced": {
+ "configDir": {
+ "title": "設定ディレクトリ",
+ "description": "Claude、Codex、Gemini の設定保存パスを管理"
+ },
+ "proxy": {
+ "title": "ローカルプロキシ",
+ "description": "プロキシサービスの切り替え、ステータスとポート情報を表示",
+ "running": "実行中",
+ "stopped": "停止中"
+ },
+ "modelTest": {
+ "title": "モデルテスト設定",
+ "description": "モデルテストで使用するデフォルトモデルとプロンプトを設定"
+ },
+ "failover": {
+ "title": "自動フェイルオーバー",
+ "description": "フェイルオーバーキューとサーキットブレーカー戦略を設定"
+ },
+ "pricing": {
+ "title": "コスト計算",
+ "description": "各モデルのトークン料金ルールを管理"
+ },
+ "data": {
+ "title": "データ管理",
+ "description": "設定のインポート/エクスポートとバックアップ/復元"
+ }
+ },
"language": "言語",
"languageHint": "切り替えるとすぐにプレビューされ、保存後に永続化されます。",
"theme": "テーマ",
@@ -365,6 +397,50 @@
"hint": "プリセットを選んだ後でも、下のフィールドで調整できます。"
},
"usage": {
+ "title": "利用統計",
+ "subtitle": "AI モデルの利用状況とコスト統計を表示",
+ "today": "24時間",
+ "last7days": "7日間",
+ "last30days": "30日間",
+ "totalRequests": "総リクエスト数",
+ "totalCost": "総コスト",
+ "cost": "コスト",
+ "perMillion": "(100万あたり)",
+ "trends": "利用トレンド",
+ "rangeToday": "今日 (時間別)",
+ "rangeLast7Days": "過去7日間",
+ "rangeLast30Days": "過去30日間",
+ "totalTokens": "総トークン数",
+ "cacheTokens": "キャッシュトークン",
+ "requestLogs": "リクエストログ",
+ "providerStats": "プロバイダー統計",
+ "modelStats": "モデル統計",
+ "time": "時間",
+ "provider": "プロバイダー",
+ "billingModel": "課金モデル",
+ "inputTokens": "入力",
+ "outputTokens": "出力",
+ "cacheReadTokens": "キャッシュ読取",
+ "cacheCreationTokens": "キャッシュ書込",
+ "timingInfo": "応答時間/TTFT",
+ "status": "ステータス",
+ "noData": "データなし",
+ "unknownProvider": "不明なプロバイダー",
+ "stream": "ストリーム",
+ "nonStream": "非ストリーム",
+ "totalRecords": "全 {{total}} 件",
+ "modelPricing": "モデル料金",
+ "loadPricingError": "料金データの読み込みに失敗しました",
+ "modelPricingDesc": "各モデルのトークンコストを設定",
+ "noPricingData": "料金データがありません。「追加」をクリックしてモデル料金を設定してください。",
+ "model": "モデル",
+ "displayName": "表示名",
+ "inputCost": "入力コスト",
+ "outputCost": "出力コスト",
+ "cacheReadCost": "キャッシュ読取",
+ "cacheWriteCost": "キャッシュ書込",
+ "deleteConfirmTitle": "削除の確認",
+ "deleteConfirmDesc": "このモデル料金を削除しますか?この操作は元に戻せません。",
"queryFailed": "照会に失敗しました",
"refreshUsage": "利用状況を更新",
"planUsage": "プラン利用状況",
@@ -944,5 +1020,17 @@
"errorRateLabel": "エラー率しきい値",
"errorRateExplain": "失敗しきい値に達していなくても、エラー率がこの値を超えるとサーキットブレーカーが開きます"
}
+ },
+ "streamCheck": {
+ "configSaved": "ヘルスチェック設定を保存しました",
+ "configSaveFailed": "保存に失敗しました",
+ "testModels": "テストモデル",
+ "claudeModel": "Claude モデル",
+ "codexModel": "Codex モデル",
+ "geminiModel": "Gemini モデル",
+ "checkParams": "チェックパラメーター",
+ "timeout": "タイムアウト(秒)",
+ "maxRetries": "最大リトライ回数",
+ "degradedThreshold": "劣化しきい値(ミリ秒)"
}
}
diff --git a/src/i18n/locales/zh.json b/src/i18n/locales/zh.json
index 9126ce13c..7ddabe595 100644
--- a/src/i18n/locales/zh.json
+++ b/src/i18n/locales/zh.json
@@ -32,7 +32,11 @@
"back": "返回",
"refresh": "刷新",
"refreshing": "刷新中...",
- "notInstalled": "未安装"
+ "all": "全部",
+ "search": "查询",
+ "reset": "重置",
+ "actions": "操作",
+ "deleting": "删除中..."
},
"apiKeyInput": {
"placeholder": "请输入API Key",
@@ -142,6 +146,34 @@
"general": "通用",
"tabGeneral": "通用",
"tabAdvanced": "高级",
+ "advanced": {
+ "configDir": {
+ "title": "配置文件目录",
+ "description": "管理 Claude、Codex 和 Gemini 的配置存储路径"
+ },
+ "proxy": {
+ "title": "本地代理",
+ "description": "控制代理服务开关、查看状态与端口信息",
+ "running": "运行中",
+ "stopped": "已停止"
+ },
+ "modelTest": {
+ "title": "模型测试配置",
+ "description": "配置模型测试使用的默认模型和提示词"
+ },
+ "failover": {
+ "title": "自动故障转移",
+ "description": "配置故障转移队列和熔断策略"
+ },
+ "pricing": {
+ "title": "成本定价",
+ "description": "管理各模型 Token 计费规则"
+ },
+ "data": {
+ "title": "数据管理",
+ "description": "导入导出配置与备份恢复"
+ }
+ },
"language": "界面语言",
"languageHint": "切换后立即预览界面语言,保存后永久生效。",
"theme": "外观主题",
@@ -365,6 +397,50 @@
"hint": "选择预设后可继续调整下方字段。"
},
"usage": {
+ "title": "使用统计",
+ "subtitle": "查看 AI 模型的使用情况和成本统计",
+ "today": "24小时",
+ "last7days": "7天",
+ "last30days": "30天",
+ "totalRequests": "总请求数",
+ "totalCost": "总成本",
+ "cost": "成本",
+ "perMillion": "(每百万)",
+ "trends": "使用趋势",
+ "rangeToday": "今天 (按小时)",
+ "rangeLast7Days": "过去 7 天",
+ "rangeLast30Days": "过去 30 天",
+ "totalTokens": "总 Token 数",
+ "cacheTokens": "缓存 Token",
+ "requestLogs": "请求日志",
+ "providerStats": "Provider 统计",
+ "modelStats": "模型统计",
+ "time": "时间",
+ "provider": "供应商",
+ "billingModel": "计费模型",
+ "inputTokens": "输入",
+ "outputTokens": "输出",
+ "cacheReadTokens": "缓存读取",
+ "cacheCreationTokens": "缓存写入",
+ "timingInfo": "用时/首字",
+ "status": "状态",
+ "noData": "暂无数据",
+ "unknownProvider": "未知供应商",
+ "stream": "流",
+ "nonStream": "非流",
+ "totalRecords": "共 {{total}} 条记录",
+ "modelPricing": "模型定价",
+ "loadPricingError": "加载定价数据失败",
+ "modelPricingDesc": "配置各模型的 Token 成本",
+ "noPricingData": "暂无定价数据。点击\"新增\"添加模型定价配置。",
+ "model": "模型",
+ "displayName": "显示名称",
+ "inputCost": "输入成本",
+ "outputCost": "输出成本",
+ "cacheReadCost": "缓存读取",
+ "cacheWriteCost": "缓存写入",
+ "deleteConfirmTitle": "确认删除",
+ "deleteConfirmDesc": "确定要删除此模型定价配置吗?此操作无法撤销。",
"queryFailed": "查询失败",
"refreshUsage": "刷新用量",
"planUsage": "套餐用量",
@@ -944,5 +1020,17 @@
"errorRateLabel": "错误率阈值",
"errorRateExplain": "错误率超过此值时,即使未达到失败阈值也会打开熔断器"
}
+ },
+ "streamCheck": {
+ "configSaved": "健康检查配置已保存",
+ "configSaveFailed": "保存失败",
+ "testModels": "测试模型",
+ "claudeModel": "Claude 模型",
+ "codexModel": "Codex 模型",
+ "geminiModel": "Gemini 模型",
+ "checkParams": "检查参数",
+ "timeout": "超时时间(秒)",
+ "maxRetries": "最大重试次数",
+ "degradedThreshold": "降级阈值(毫秒)"
}
}