From 7820026ee963844ed30532e0e8957d91f582773f Mon Sep 17 00:00:00 2001 From: duanyongcheng <1171998654@qq.com> Date: Wed, 14 Jan 2026 10:10:45 +0800 Subject: [PATCH] =?UTF-8?q?refactor(ui):=20=E4=BC=98=E5=8C=96=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E5=BC=B9=E7=AA=97=E5=B8=83=E5=B1=80=E4=B8=8E=E6=9A=97?= =?UTF-8?q?=E8=89=B2=E6=A8=A1=E5=BC=8F=E6=A0=B7=E5=BC=8F=20Optimize=20conf?= =?UTF-8?q?ig=20dialog=20layout=20and=20dark=20mode=20styles?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 改进高级配置弹窗的布局结构,使内容区域支持独立滚动 Improve layout of advanced config dialog to support independent content scrolling 恢复 Escape 键关闭弹窗的功能以提升交互体验 Restore Escape key functionality for closing dialogs to improve UX 优化配置卡片边框并为提示信息添加暗色模式适配 Optimize card borders and add dark mode support for tip messages --- src/components/ToolAdvancedConfigDialog.tsx | 7 +++---- src/components/ToolConfigManager.tsx | 17 +++++++---------- .../config-managers/ClaudeConfigManager.tsx | 4 ++-- .../config-managers/CodexConfigManager.tsx | 2 +- .../config-managers/GeminiConfigManager.tsx | 2 +- src/components/tool-config/Fields.tsx | 6 +++--- 6 files changed, 17 insertions(+), 21 deletions(-) diff --git a/src/components/ToolAdvancedConfigDialog.tsx b/src/components/ToolAdvancedConfigDialog.tsx index 1407033..26bf5e1 100644 --- a/src/components/ToolAdvancedConfigDialog.tsx +++ b/src/components/ToolAdvancedConfigDialog.tsx @@ -29,17 +29,16 @@ export function ToolAdvancedConfigDialog({ return ( e.preventDefault()} - onEscapeKeyDown={(e) => e.preventDefault()} > - + {toolName} {toolName} 高级配置 -
+
{toolId === 'claude-code' && } {toolId === 'codex' && } {toolId === 'gemini-cli' && } diff --git a/src/components/ToolConfigManager.tsx b/src/components/ToolConfigManager.tsx index 788c99e..5852cb8 100644 --- a/src/components/ToolConfigManager.tsx +++ b/src/components/ToolConfigManager.tsx @@ -278,7 +278,7 @@ export function ToolConfigManager({ const isCompound = isCompoundField(schema, currentValue); return ( - + {isCompound ? ( <> @@ -361,7 +361,7 @@ export function ToolConfigManager({ }; return ( - +
@@ -391,7 +391,7 @@ export function ToolConfigManager({
-
+
每个配置选项下方都会展示 JSON Schema 提供的描述信息,若显示「未提供描述」表示该子选项未在 schema 中定义或为自定义子选项。
@@ -495,15 +495,12 @@ export function ToolConfigManager({
{diffEntries.length === 0 && ( -
+
没有检测到差异
)} {diffEntries.map((diff) => ( -
+
{diff.path} @@ -513,13 +510,13 @@ export function ToolConfigManager({

之前

-
+                    
                       {formatJson(diff.before)}
                     

之后

-
+                    
                       {formatJson(diff.after)}
                     
diff --git a/src/components/config-managers/ClaudeConfigManager.tsx b/src/components/config-managers/ClaudeConfigManager.tsx index ddba831..3cc2767 100644 --- a/src/components/config-managers/ClaudeConfigManager.tsx +++ b/src/components/config-managers/ClaudeConfigManager.tsx @@ -200,7 +200,7 @@ export function ClaudeConfigManager({ refreshSignal }: ClaudeConfigManagerProps) computeExternalDiffs={computeExtraDiffs} /> - + 附属配置:config.json 可选文件,存在时将与 settings.json 一同保存。 @@ -235,7 +235,7 @@ export function ClaudeConfigManager({ refreshSignal }: ClaudeConfigManagerProps) {extraEntries.map((entry, idx) => (
diff --git a/src/components/config-managers/CodexConfigManager.tsx b/src/components/config-managers/CodexConfigManager.tsx index 22460df..265df72 100644 --- a/src/components/config-managers/CodexConfigManager.tsx +++ b/src/components/config-managers/CodexConfigManager.tsx @@ -84,7 +84,7 @@ export function CodexConfigManager({ refreshSignal }: CodexConfigManagerProps) { computeExternalDiffs={computeAuthDiffs} /> - + Codex API Key 读取并编辑 auth.json,用于 Codex CLI 请求。 diff --git a/src/components/config-managers/GeminiConfigManager.tsx b/src/components/config-managers/GeminiConfigManager.tsx index 4333156..2c17a36 100644 --- a/src/components/config-managers/GeminiConfigManager.tsx +++ b/src/components/config-managers/GeminiConfigManager.tsx @@ -106,7 +106,7 @@ export function GeminiConfigManager({ refreshSignal }: GeminiConfigManagerProps) computeExternalDiffs={computeEnvDiffs} /> - + Gemini .env 读取并编辑 .env,管理 Base URL、API Key 与默认模型。 diff --git a/src/components/tool-config/Fields.tsx b/src/components/tool-config/Fields.tsx index 435937f..2fdef8b 100644 --- a/src/components/tool-config/Fields.tsx +++ b/src/components/tool-config/Fields.tsx @@ -465,7 +465,7 @@ function SortableArrayItem({
@@ -579,7 +579,7 @@ function ObjectField({ return (

{description}

-
+
{keys.length === 0 && (
尚未设置任何子选项 @@ -592,7 +592,7 @@ function ObjectField({ const childIsCompound = isCompoundField(resolvedChildSchema, objectValue[key]); return ( -
+
{key}