sync: 同步 monkey-ai@weiyuan(ddc5b9443) 的 web/ 到 ui-optimization
- 合入 weiyuan 新功能前端:分佣 V2 / 伙伴工作台、智能路由、企业资金与分析、官网设置与预约演示等, semi-ui 已全部迁移到 antd 6 / @/components/ui,不重新引入 Semi - 分佣二级菜单与页头去重、伙伴入口探测(企业伙伴走企业中心「企业分佣」)、超管侧栏入口恢复 - 适配层 DatePicker / TimePicker 统一 onChange(Date|Date[]|null, 文本) 契约;生产构建剔除调试日志 - 图片链接刷新:同任务请求复用、后台刷新不弹全局错误、离页停止批量请求 - 恢复 bun.lock(与 package-lock.json 共存);docs 规范与 CHANGELOG 更新 - 停止跟踪 .env.playwright.local(本地登录凭据,已加入 .gitignore)
This commit is contained in:
@@ -77,8 +77,10 @@ import {
|
||||
Package,
|
||||
Activity,
|
||||
PieChart,
|
||||
HandCoins,
|
||||
Building2,
|
||||
Handshake,
|
||||
Route,
|
||||
Globe,
|
||||
CalendarDays,
|
||||
} from 'lucide-react';
|
||||
@@ -125,8 +127,12 @@ export function getLucideIcon(key, selected = false) {
|
||||
return <Package {...commonProps} color={iconColor} />;
|
||||
case 'monitor':
|
||||
return <Activity {...commonProps} color={iconColor} />;
|
||||
case 'commission':
|
||||
return <HandCoins {...commonProps} color={iconColor} />;
|
||||
case 'analytics':
|
||||
return <PieChart {...commonProps} color={iconColor} />;
|
||||
case 'smart-router':
|
||||
return <Route {...commonProps} color={iconColor} />;
|
||||
case 'organizations':
|
||||
return <Building2 {...commonProps} color={iconColor} />;
|
||||
case 'partner':
|
||||
@@ -985,6 +991,8 @@ function renderPriceSimpleCore({
|
||||
cacheCreationRatio5m = 1.0,
|
||||
cacheCreationTokens1h = 0,
|
||||
cacheCreationRatio1h = 1.0,
|
||||
cacheCreationTokensUnlabeled = 0,
|
||||
cacheCreationRatioUnlabeled = 1.0,
|
||||
image = false,
|
||||
imageRatio = 1.0,
|
||||
isSystemPromptOverride = false,
|
||||
@@ -1016,6 +1024,10 @@ function renderPriceSimpleCore({
|
||||
hasSplitCacheCreation && cacheCreationTokens5m > 0;
|
||||
const shouldShowCacheCreation1h =
|
||||
hasSplitCacheCreation && cacheCreationTokens1h > 0;
|
||||
// 上游给了总量却没给分档的那部分按「默认档位」计价,倍率可能既不等于 5m 也不等于 1h。
|
||||
// 与分档并存时它是独立的一项,漏掉这一项用户就对不出总价。
|
||||
const shouldShowCacheCreationUnlabeled =
|
||||
hasSplitCacheCreation && cacheCreationTokensUnlabeled > 0;
|
||||
|
||||
const parts = [];
|
||||
// base: model ratio
|
||||
@@ -1047,6 +1059,13 @@ function renderPriceSimpleCore({
|
||||
}),
|
||||
);
|
||||
}
|
||||
if (shouldShowCacheCreationUnlabeled) {
|
||||
parts.push(
|
||||
i18next.t('未分档缓存创建: {{cacheCreationRatioUnlabeled}}', {
|
||||
cacheCreationRatioUnlabeled,
|
||||
}),
|
||||
);
|
||||
}
|
||||
} else if (shouldShowLegacyCacheCreation) {
|
||||
parts.push(
|
||||
i18next.t('缓存创建: {{cacheCreationRatio}}', { cacheCreationRatio }),
|
||||
@@ -1451,6 +1470,8 @@ export function renderModelPriceSimple(
|
||||
cacheCreationRatio5m = 1.0,
|
||||
cacheCreationTokens1h = 0,
|
||||
cacheCreationRatio1h = 1.0,
|
||||
cacheCreationTokensUnlabeled = 0,
|
||||
cacheCreationRatioUnlabeled = 1.0,
|
||||
image = false,
|
||||
imageRatio = 1.0,
|
||||
isSystemPromptOverride = false,
|
||||
@@ -1469,6 +1490,8 @@ export function renderModelPriceSimple(
|
||||
cacheCreationRatio5m,
|
||||
cacheCreationTokens1h,
|
||||
cacheCreationRatio1h,
|
||||
cacheCreationTokensUnlabeled,
|
||||
cacheCreationRatioUnlabeled,
|
||||
image,
|
||||
imageRatio,
|
||||
isSystemPromptOverride,
|
||||
|
||||
Reference in New Issue
Block a user