From e800d801523b96a0518b0d2dbcb0b2eb4d945ae3 Mon Sep 17 00:00:00 2001 From: MT-Mint <798521692@qq.com> Date: Wed, 25 Mar 2026 17:43:55 +0800 Subject: [PATCH] =?UTF-8?q?feat(localStorage):=20=E9=9A=90=E8=97=8F?= =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E9=80=89=E6=8B=A9=E5=99=A8=E5=B9=B6=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E8=BE=93=E5=85=A5=E6=A1=86=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 注释掉 InputBox 中的 ModelSelector 组件 - 临时将 localStorage 设置置空 --- .../src/components/workspace/input-box.tsx | 35 +++++++++++++++++-- frontend/src/core/settings/hooks.ts | 3 +- 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/workspace/input-box.tsx b/frontend/src/components/workspace/input-box.tsx index b2004b93..b517019b 100644 --- a/frontend/src/components/workspace/input-box.tsx +++ b/frontend/src/components/workspace/input-box.tsx @@ -308,7 +308,7 @@ export function InputBox({ "border-0 rounded-[20px] backdrop-blur-sm", "transition-[height] duration-300 ease-out shadow-none ", !isNewThread && "h-[200px] shadow-[0_0_20px_0_rgba(0,0,0,0.10)]", - hasSubmitted&& "shadow-[0_0_20px_0_rgba(0,0,0,0.10)]!", + hasSubmitted && "shadow-[0_0_20px_0_rgba(0,0,0,0.10)]!", effectiveIsFocused ? "h-[200px]" : "h-[80px]", )} disabled={disabled} @@ -346,7 +346,7 @@ export function InputBox({ className={cn( "flex transition-all duration-300 ease-out", !effectiveIsFocused && - "pointer-events-none invisible h-[0px] translate-y-2 p-[0px] opacity-0", + "pointer-events-none invisible h-[0px] translate-y-2 p-[0px] opacity-0", )} > @@ -368,6 +368,37 @@ export function InputBox({ /> {/* 参考 kexue 版本隐藏运行模式切换按钮 */} + {/* + + + + {selectedModel?.display_name} + + + + + + + {models.map((m) => ( + handleModelSelect(m.name)} + > + {m.display_name} + {m.name === context.model_name ? ( + + ) : ( +
+ )} + + ))} + + + */} {/* 占位符 */}
diff --git a/frontend/src/core/settings/hooks.ts b/frontend/src/core/settings/hooks.ts index 07606eaf..b4e5c40b 100644 --- a/frontend/src/core/settings/hooks.ts +++ b/frontend/src/core/settings/hooks.ts @@ -36,7 +36,8 @@ export function useLocalSettings(): [ ...value, }, }; - saveLocalSettings(newState); + // localStorage 置空 + saveLocalSettings({} as LocalSettings); return newState; }); },