From 7b5d5c6ce1113d245f70727fadf83914c7567c1d Mon Sep 17 00:00:00 2001 From: Jason Date: Sat, 30 Aug 2025 22:09:19 +0800 Subject: [PATCH] =?UTF-8?q?refactor(codex):=20=E9=80=89=E6=8B=A9=20Codex?= =?UTF-8?q?=20=E9=A2=84=E8=AE=BE=E6=97=B6=E6=B8=85=E7=A9=BA=20API=20Key=20?= =?UTF-8?q?=E8=BE=93=E5=85=A5=EF=BC=8C=E9=81=BF=E5=85=8D=E8=AF=AF=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E5=8D=A0=E4=BD=8D=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ProviderForm.tsx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/components/ProviderForm.tsx b/src/components/ProviderForm.tsx index 09867a5..3d499cf 100644 --- a/src/components/ProviderForm.tsx +++ b/src/components/ProviderForm.tsx @@ -216,14 +216,8 @@ const ProviderForm: React.FC = ({ setSelectedCodexPreset(index); - // 同步 API Key 输入框 - try { - const auth = JSON.parse(authString); - const key = typeof auth.api_key === "string" ? auth.api_key : ""; - setCodexApiKey(key); - } catch { - setCodexApiKey(""); - } + // 清空 API Key,让用户重新输入 + setCodexApiKey(""); }; // 处理 API Key 输入并自动更新配置