refactor(navigation): simplify main tab labels

This commit is contained in:
chengma
2026-07-17 12:24:05 +08:00
parent 01697759fc
commit 4e10cce794
29 changed files with 217 additions and 217 deletions
+7 -7
View File
@@ -180,7 +180,7 @@ def analyze_product_images(
cfg = appconfig.load_config() if config is None else config
ai_cfg = appconfig.ai_config(cfg)
if _ai_backend(ai_cfg) != "cmhub":
raise AIError("商品套图AI帮写需要使用 cmhub 图片理解服务,请到⑤设置配置 cmhub。")
raise AIError("商品套图AI帮写需要使用 cmhub 图片理解服务,请到设置配置 cmhub。")
paths = _validate_cmhub_vision_images(image_paths)
runtime = _cmhub_runtime(cfg, "vision", cmhub_config_path)
@@ -878,9 +878,9 @@ def fetch_cmhub_models(base_url, api_key, connect_timeout=10, read_timeout=30, u
base_url = str(base_url or "").strip()
api_key = str(api_key or "")
if not base_url:
raise CMHubError("cmhub_not_configured", "请去⑤设置配置 cmhub Base URL")
raise CMHubError("cmhub_not_configured", "请去设置配置 cmhub Base URL")
if not api_key:
raise CMHubError("cmhub_not_configured", "请去⑤设置配置 cmhub API Key")
raise CMHubError("cmhub_not_configured", "请去设置配置 cmhub API Key")
_apply_cmhub_proxy(use_system_proxy)
data = _cmhub_call_with_retry(
"GET",
@@ -904,9 +904,9 @@ def fetch_cmhub_balance(base_url, api_key, connect_timeout=10, read_timeout=30,
base_url = str(base_url or "").strip()
api_key = str(api_key or "")
if not base_url:
raise CMHubError("cmhub_not_configured", "请去⑤设置配置 cmhub Base URL")
raise CMHubError("cmhub_not_configured", "请去设置配置 cmhub Base URL")
if not api_key:
raise CMHubError("cmhub_not_configured", "请去⑤设置配置 cmhub API Key")
raise CMHubError("cmhub_not_configured", "请去设置配置 cmhub API Key")
_apply_cmhub_proxy(use_system_proxy)
data = _cmhub_call_with_retry(
"GET",
@@ -1455,7 +1455,7 @@ def _cmhub_runtime(config, operation, cmhub_config_path):
if missing:
raise CMHubError(
"cmhub_not_configured",
"请去⑤设置配置 cmhub:缺少 " + "、".join(missing),
"请去设置配置 cmhub:缺少 " + "、".join(missing),
retryable=False,
)
use_system_proxy = bool(hub.get("use_system_proxy", False))
@@ -1765,7 +1765,7 @@ def _cmhub_retryable(code):
def _cmhub_user_message(code, message):
defaults = {
"insufficient_points": "点数不足,请先充值",
"unauthorized": "cmhub API Key 无效,请去⑤设置重填",
"unauthorized": "cmhub API Key 无效,请去设置重填",
"account_disabled": "cmhub 账号已禁用,请去网页端处理",
"bad_request": "cmhub 请求参数错误",
"model_not_allowed": "cmhub 模型别名无权限",