refactor: improve code quality and fix linting issues
- Derive Default trait instead of manual implementation for McpRoot and ProviderManager - Remove redundant closures in codex_config.rs and config.rs - Simplify match statements to if let patterns in migration.rs and lib.rs - Remove unnecessary type conversions and borrows in lib.rs - Fix i18n key inconsistency: sequentialThinking → sequential-thinking - Format TypeScript files to match Prettier style All clippy warnings resolved, code passes all quality checks.
This commit is contained in:
@@ -2,7 +2,10 @@ import React, { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { X, Save, AlertCircle, ChevronDown, ChevronUp } from "lucide-react";
|
||||
import { McpServer, McpServerSpec } from "../../types";
|
||||
import { mcpPresets, getMcpPresetWithDescription } from "../../config/mcpPresets";
|
||||
import {
|
||||
mcpPresets,
|
||||
getMcpPresetWithDescription,
|
||||
} from "../../config/mcpPresets";
|
||||
import { buttonStyles, inputStyles } from "../../lib/styles";
|
||||
import McpWizardModal from "./McpWizardModal";
|
||||
import {
|
||||
|
||||
@@ -210,7 +210,8 @@ const McpPanel: React.FC<McpPanelProps> = ({ onClose, onNotify, appType }) => {
|
||||
{/* Info Section */}
|
||||
<div className="flex-shrink-0 px-6 pt-4 pb-2">
|
||||
<div className="text-sm text-gray-500 dark:text-gray-400">
|
||||
{t("mcp.serverCount", { count: Object.keys(servers).length })} · {t("mcp.enabledCount", { count: enabledCount })}
|
||||
{t("mcp.serverCount", { count: Object.keys(servers).length })} ·{" "}
|
||||
{t("mcp.enabledCount", { count: enabledCount })}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -375,7 +375,7 @@
|
||||
"name": "@modelcontextprotocol/server-memory",
|
||||
"description": "知识图谱记忆系统,支持存储实体、关系和观察,让 AI 记住对话中的重要信息"
|
||||
},
|
||||
"sequentialThinking": {
|
||||
"sequential-thinking": {
|
||||
"name": "@modelcontextprotocol/server-sequential-thinking",
|
||||
"description": "顺序思考工具,帮助 AI 将复杂问题分解为多个步骤,逐步深入思考"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user