diff --git a/src/components/AddWorker/ToolSelect.tsx b/src/components/AddWorker/ToolSelect.tsx index d0f3a553..fa49d771 100644 --- a/src/components/AddWorker/ToolSelect.tsx +++ b/src/components/AddWorker/ToolSelect.tsx @@ -18,7 +18,6 @@ import { getProxyBaseURL } from "@/lib"; import { capitalizeFirstLetter } from "@/lib"; import { useAuthStore } from "@/store/authStore"; import { useTranslation } from "react-i18next"; -import { GMAIL_CONFIG } from "@/pages/Setting/MCP"; interface McpItem { id: number; name: string; @@ -59,10 +58,6 @@ const ToolSelect = forwardRef< proxyFetchGet("/api/config/info").then((res) => { if (res && typeof res === "object" && !res.error) { const baseURL = getProxyBaseURL(); - if (typeof res === "object" && res !== null) { - Object.assign(res, GMAIL_CONFIG); - console.log("Modified config info with Gmail:", res); - } const list = Object.entries(res) .filter(([key]) => { if (!keyword) return true; diff --git a/src/pages/Setting/API.tsx b/src/pages/Setting/API.tsx index 30c7e39d..b881b822 100644 --- a/src/pages/Setting/API.tsx +++ b/src/pages/Setting/API.tsx @@ -3,7 +3,6 @@ import { Input } from "@/components/ui/input"; import { Circle } from "lucide-react"; import { useEffect, useState } from "react"; import { proxyFetchGet, proxyFetchPost } from "@/api/http"; -import { GMAIL_CONFIG } from "./MCP"; import { useTranslation } from "react-i18next"; interface ConfigItem { @@ -19,11 +18,7 @@ export default function SettingAPI() { const [errors, setErrors] = useState>({}); useEffect(() => { - proxyFetchGet("/api/config/info").then((res) => { - if (typeof res === "object" && res !== null) { - Object.assign(res, GMAIL_CONFIG); - console.log("Modified config info with Gmail:", res); - } + proxyFetchGet("/api/config/info").then((res) => { const configs = Object.entries(res || {}) .map(([name, v]: [string, any]) => ({ name, env_vars: v.env_vars })) .filter((item) => Array.isArray(item.env_vars) && item.env_vars.length > 0); diff --git a/src/pages/Setting/MCP.tsx b/src/pages/Setting/MCP.tsx index cd46e484..725b3efa 100644 --- a/src/pages/Setting/MCP.tsx +++ b/src/pages/Setting/MCP.tsx @@ -29,17 +29,6 @@ import { ConfigFile } from "electron/main/utils/mcpConfig"; import { SelectItem, SelectItemWithButton } from "@/components/ui/select"; import { Tag as TagComponent } from "@/components/ui/tag"; -export const GMAIL_CONFIG = { - "Google Gmail MCP": { - "env_vars": [ - "GOOGLE_CLIENT_ID", - "GOOGLE_CLIENT_SECRET", - "GOOGLE_REFRESH_TOKEN" - ], - "toolkit": "google_gmail_native_toolkit" - } -} - export default function SettingMCP() { const navigate = useNavigate(); const { checkAgentTool } = useAuthStore(); @@ -148,11 +137,6 @@ export default function SettingMCP() { useEffect(() => { proxyFetchGet("/api/config/info").then((res) => { if (res && typeof res === "object") { - if (typeof res === "object" && res !== null) { - Object.assign(res, GMAIL_CONFIG); - console.log("Modified config info with Gmail:", res); - } - const baseURL = getProxyBaseURL(); const list = Object.entries(res).map(([key, value]: [string, any]) => { let onInstall = null;