Fix fresh deployment build

This commit is contained in:
Codex
2026-05-13 00:28:05 +00:00
parent e4b636b85d
commit fa74bac92f
2 changed files with 17 additions and 1 deletions

View File

@@ -535,7 +535,7 @@ install_dependencies_with_mirrors() {
for mirror in "${MIRRORS[@]}"; do
log "尝试使用依赖镜像源:${mirror}"
pnpm config set registry "${mirror}" >/dev/null 2>&1 || true
if pnpm install --frozen-lockfile --reporter=append-only 2>&1 | log_pipe; then
if pnpm install --frozen-lockfile --prod=false --reporter=append-only 2>&1 | log_pipe; then
log "依赖安装成功,使用源:${mirror}"
return 0
fi

16
src/lib/model-display.ts Normal file
View File

@@ -0,0 +1,16 @@
import type { CustomApiKey } from '@/lib/custom-api-store';
import type { ManagedSystemApi } from '@/lib/model-config-types';
function compactLabel(parts: Array<string | null | undefined>): string {
return parts.map(part => part?.trim()).filter(Boolean).join(' / ');
}
export function getCustomApiModelLabel(key: CustomApiKey | undefined): string {
if (!key) return '自定义模型';
return compactLabel([key.note, key.supplierName || key.provider, key.modelName]) || key.modelName || '自定义模型';
}
export function getSystemApiModelLabel(api: ManagedSystemApi | undefined): string {
if (!api) return '系统模型';
return compactLabel([api.note, api.name || api.provider, api.modelName]) || api.modelName || '系统模型';
}