feat: webUI MCP 可视化配置面板 + README 更新

This commit is contained in:
luckyyzh
2026-08-02 22:27:50 +08:00
parent a70798e874
commit 5378d48095
6 changed files with 843 additions and 0 deletions
+14
View File
@@ -8,6 +8,7 @@ import { ChatWindow } from "./ChatWindow";
import { FileViewer } from "./FileViewer";
import { TabBar, type Tab } from "./TabBar";
import { ModelsConfig } from "./ModelsConfig";
import { McpConfig } from "./McpConfig";
import { SkillsConfig } from "./SkillsConfig";
import { PluginsConfig } from "./PluginsConfig";
import { ProjectTrustDialog } from "./ProjectTrustDialog";
@@ -53,6 +54,7 @@ export function AppShell() {
const [explorerRefreshKey, setExplorerRefreshKey] = useState(0);
const [modelsConfigOpen, setModelsConfigOpen] = useState(false);
const [modelsRefreshKey, setModelsRefreshKey] = useState(0);
const [mcpConfigOpen, setMcpConfigOpen] = useState(false);
const [skillsConfigOpen, setSkillsConfigOpen] = useState(false);
const [pluginsConfigOpen, setPluginsConfigOpen] = useState(false);
const [projectTrust, setProjectTrust] = useState<ProjectTrustStatus | null>(null);
@@ -578,6 +580,17 @@ export function AppShell() {
</svg>
),
},
{
label: translate("common.mcp"),
onClick: () => setMcpConfigOpen(true),
disabled: false,
icon: (
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" />
<path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" />
</svg>
),
},
{
label: translate("common.skills"),
onClick: () => setSkillsConfigOpen(true),
@@ -1514,6 +1527,7 @@ export function AppShell() {
</svg>
</button>
{modelsConfigOpen && <ModelsConfig onClose={() => { setModelsConfigOpen(false); setModelsRefreshKey((k) => k + 1); }} />}
{mcpConfigOpen && <McpConfig onClose={() => setMcpConfigOpen(false)} />}
{projectTrustDialogOpen && projectTrustCwd && (
<ProjectTrustDialog
cwd={projectTrustCwd}