mirror of
https://github.com/eigent-ai/eigent.git
synced 2026-05-29 19:15:39 +00:00
chore: remove manual gmail config
This commit is contained in:
parent
5c8918fc7d
commit
8f657c43eb
3 changed files with 1 additions and 27 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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<Record<string, string>>({});
|
||||
|
||||
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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue