merge: 合入总仓库 weiyuan(bfdfb339) web/ 新功能,保留 ui-optimization 的 UI 重构
来源:luoguang/monkey-ai weiyuan@bfdfb339 的 web/(经 sync/main-weiyuan-web-bfdfb339 同步)
同步基准:总仓库 a2ca13cb = 本仓库初始导入 d8f3aee2
冲突处理原则:保留 ui-optimization 的 UI(样式/结构/组件),嫁接 weiyuan 的功能逻辑。
- i18n:按键三方合并;ours 的「令牌→密钥」改名键上移植 theirs 的术语修订
- task-logs / OrgLogs:ours 已手工移植同一功能(6ad95e2),保留 ours
- 删除:OrgCreate(theirs 下线 /org/create)、旧 image 组件与 VideoRegenerateModal(theirs 体验中心重写)、
OrgAvatarSection / PricingBentoPage / CommissionConsole(ours 重构中已移除)
- 测试:users-pagination 的 i18next mock 补 t();theirs 新增文件补 license header
This commit is contained in:
@@ -121,6 +121,9 @@ const UsageBillingDetail = ({
|
||||
Number(other.cache_creation_tokens_5m || 0) +
|
||||
Number(other.cache_creation_tokens_1h || 0);
|
||||
const textTokens = inputTokens + outputTokens;
|
||||
// 有 5m/1h 分档时只展示分档,不再重复展示未分档的总量与倍率
|
||||
const hasSplitCacheCreation =
|
||||
other.cache_creation_tokens_5m > 0 || other.cache_creation_tokens_1h > 0;
|
||||
const effectiveGroupRatio =
|
||||
Number.isFinite(Number(other.user_group_ratio)) &&
|
||||
Number(other.user_group_ratio) !== -1
|
||||
@@ -134,10 +137,11 @@ const UsageBillingDetail = ({
|
||||
label: t('缓存命中'),
|
||||
value: formatCount(other.cache_tokens),
|
||||
},
|
||||
other.cache_creation_tokens > 0 && {
|
||||
label: t('缓存创建'),
|
||||
value: formatCount(other.cache_creation_tokens),
|
||||
},
|
||||
!hasSplitCacheCreation &&
|
||||
other.cache_creation_tokens > 0 && {
|
||||
label: t('缓存创建'),
|
||||
value: formatCount(other.cache_creation_tokens),
|
||||
},
|
||||
other.cache_creation_tokens_5m > 0 && {
|
||||
label: t('5m 缓存创建'),
|
||||
value: formatCount(other.cache_creation_tokens_5m),
|
||||
@@ -159,7 +163,8 @@ const UsageBillingDetail = ({
|
||||
label: t('缓存倍率'),
|
||||
value: formatRatio(other.cache_ratio),
|
||||
},
|
||||
other.cache_creation_ratio != null &&
|
||||
!hasSplitCacheCreation &&
|
||||
other.cache_creation_ratio != null &&
|
||||
other.cache_creation_tokens > 0 && {
|
||||
label: t('缓存创建倍率'),
|
||||
value: formatRatio(other.cache_creation_ratio),
|
||||
@@ -207,11 +212,17 @@ const UsageBillingDetail = ({
|
||||
},
|
||||
other.web_search && {
|
||||
label: t('联网搜索'),
|
||||
value: `${formatCount(other.web_search_call_count || 0)} ${t('次')}`,
|
||||
value: t('{{n}} 次', {
|
||||
n: formatCount(other.web_search_call_count || 0),
|
||||
count: other.web_search_call_count || 0,
|
||||
}),
|
||||
},
|
||||
other.file_search && {
|
||||
label: t('文件搜索'),
|
||||
value: `${formatCount(other.file_search_call_count || 0)} ${t('次')}`,
|
||||
value: t('{{n}} 次', {
|
||||
n: formatCount(other.file_search_call_count || 0),
|
||||
count: other.file_search_call_count || 0,
|
||||
}),
|
||||
},
|
||||
other.image_generation_call && {
|
||||
label: t('图片生成'),
|
||||
|
||||
Reference in New Issue
Block a user