From 7b1038ccfe133b19a36bf43bbb1d6ef105f71b58 Mon Sep 17 00:00:00 2001 From: jiangwel Date: Tue, 19 Aug 2025 21:32:06 +0800 Subject: [PATCH] =?UTF-8?q?fix(ui):=20=E4=BF=AE=E5=A4=8D=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E6=A3=80=E6=9F=A5=E5=A4=B1=E8=B4=A5=E6=97=B6=E7=9A=84=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E4=BF=A1=E6=81=AF=E6=98=BE=E7=A4=BA=E5=B9=B6=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0model=5Ftype=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 移除调试用的console.log语句,在模型检查失败时显示具体错误信息 在更新模型时添加缺失的model_type字段 --- ui/ModelModal/package.json | 2 +- ui/ModelModal/src/ModelModal.tsx | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ui/ModelModal/package.json b/ui/ModelModal/package.json index e2c0b9f..e03bd04 100644 --- a/ui/ModelModal/package.json +++ b/ui/ModelModal/package.json @@ -1,6 +1,6 @@ { "name": "@yokowu/modelkit-ui", - "version": "0.4.1", + "version": "0.4.2", "description": "A reusable AI model configuration modal component for React applications", "private": false, "type": "module", diff --git a/ui/ModelModal/src/ModelModal.tsx b/ui/ModelModal/src/ModelModal.tsx index e49ca67..476454d 100644 --- a/ui/ModelModal/src/ModelModal.tsx +++ b/ui/ModelModal/src/ModelModal.tsx @@ -176,13 +176,13 @@ export const ModelModal: React.FC = ({ } ) .then((res) => { - console.log("res is: ",res); if (res.error) { - messageHandler.error("模型检查失败"); + messageHandler.error("模型检查失败 " + res.error); setLoading(false); } else if (data) { modelService.updateModel({ api_key: value.api_key, + model_type, base_url: value.base_url, model_name: value.model_name, api_header: value.api_header || header, @@ -293,7 +293,6 @@ export const ModelModal: React.FC = ({ useEffect(() => { if (open) { if (data) { - console.log(data); resetCurData(data); } else { reset({