chore: rename to "Google Gmail MCP" to match database

This commit is contained in:
a7m-1st 2026-01-07 02:03:26 +03:00
parent c82037c799
commit b819a7c2e7
3 changed files with 21 additions and 21 deletions

View file

@ -168,7 +168,7 @@ const ToolSelect = forwardRef<
}
};
} else if (key.toLowerCase() === 'google gmail') {
} else if (key.toLowerCase() === 'google gmail mcp') {
onInstall = async () => {
try {
const response = await fetchPost("/install/tool/google_gmail");
@ -177,13 +177,13 @@ const ToolSelect = forwardRef<
const existingConfigs = await proxyFetchGet("/api/configs");
const existing = Array.isArray(existingConfigs)
? existingConfigs.find((c: any) =>
c.config_group?.toLowerCase() === "google gmail" &&
c.config_group?.toLowerCase() === "google gmail mcp" &&
c.config_name === "GOOGLE_REFRESH_TOKEN"
)
: null;
const configPayload = {
config_group: "Google Gmail",
config_group: "Google Gmail MCP", //According to backend config
config_name: "GOOGLE_REFRESH_TOKEN",
config_value: "exists",
};
@ -197,7 +197,7 @@ const ToolSelect = forwardRef<
console.log("Google Gmail installed successfully");
// After successful installation, add to selected tools
const gmailItem = {
id: 0, // Use 0 for integration items
id: 1, // Use 1 for integration items
key: key,
name: key,
description: "Google Gmail integration for managing emails and contacts",
@ -244,7 +244,7 @@ const ToolSelect = forwardRef<
? t("layout.notion-workspace-integration")
: key.toLowerCase() === 'google calendar'
? t("layout.google-calendar-integration")
: key.toLowerCase() === 'google gmail'
: key.toLowerCase() === 'google gmail mcp'
? "Google Gmail integration for managing emails and contacts"
: "",
onInstall,
@ -522,7 +522,7 @@ const ToolSelect = forwardRef<
}
// Trigger instantiation for Gmail
if (activeMcp.key === "Gmail") {
if (activeMcp.key === "Google Gmail MCP") {
console.log("[ToolSelect installMcp] Starting Gmail installation");
try {
const response = await fetchPost("/install/tool/google_gmail");
@ -533,13 +533,13 @@ const ToolSelect = forwardRef<
const existingConfigs = await proxyFetchGet("/api/configs");
const existing = Array.isArray(existingConfigs)
? existingConfigs.find((c: any) =>
c.config_group?.toLowerCase() === "gmail" &&
c.config_group?.toLowerCase() === "google gmail mcp" &&
c.config_name === "GOOGLE_REFRESH_TOKEN"
)
: null;
const configPayload = {
config_group: "Gmail",
config_group: "Google Gmail MCP",
config_name: "GOOGLE_REFRESH_TOKEN",
config_value: "exists",
};
@ -558,7 +558,7 @@ const ToolSelect = forwardRef<
key: activeMcp.key,
name: activeMcp.name,
description: "Gmail integration for managing emails, drafts, labels, and contacts",
toolkit: "google_gmail_toolkit",
toolkit: "google_gmail_native_toolkit",
isLocal: true
};
addOption(selectedItem, true);
@ -585,13 +585,13 @@ const ToolSelect = forwardRef<
const existingConfigs = await proxyFetchGet("/api/configs");
const existing = Array.isArray(existingConfigs)
? existingConfigs.find((c: any) =>
c.config_group?.toLowerCase() === "gmail" &&
c.config_group?.toLowerCase() === "google gmail mcp" &&
c.config_name === "GOOGLE_REFRESH_TOKEN"
)
: null;
const configPayload = {
config_group: "Gmail",
config_group: "Google Gmail MCP",
config_name: "GOOGLE_REFRESH_TOKEN",
config_value: "exists",
};

View file

@ -63,11 +63,11 @@ export function useIntegrationManagement(items: IntegrationItem[]) {
const map: { [key: string]: boolean } = {};
items.forEach((item) => {
if (item.key === "Google Calendar") {
if (item.key === "Google Calendar" || item.key === "Google Gmail MCP") {
// Only mark installed when refresh token is present (auth completed)
const hasRefreshToken = configs.some(
(c: any) =>
c.config_group?.toLowerCase() === "google calendar" &&
c.config_group?.toLowerCase() === item.key.toLowerCase() &&
c.config_name === "GOOGLE_REFRESH_TOKEN" &&
c.config_value && String(c.config_value).length > 0
);

View file

@ -30,13 +30,13 @@ import { SelectItem, SelectItemWithButton } from "@/components/ui/select";
import { Tag as TagComponent } from "@/components/ui/tag";
export const GMAIL_CONFIG = {
"Google Gmail": {
"Google Gmail MCP": {
"env_vars": [
"GOOGLE_CLIENT_ID",
"GOOGLE_CLIENT_SECRET",
"GOOGLE_REFRESH_TOKEN"
],
"toolkit": "google_gmail_mcp_toolkit"
"toolkit": "google_gmail_native_toolkit"
}
}
@ -327,7 +327,7 @@ export default function SettingMCP() {
);
}
}
} else if (key.toLowerCase() === 'google gmail') {
} else if (key.toLowerCase() === 'google gmail mcp') {
onInstall = async () => {
try {
const response = await fetchPost("/install/tool/google_gmail");
@ -336,13 +336,13 @@ export default function SettingMCP() {
const existingConfigs = await proxyFetchGet("/api/configs");
const existing = Array.isArray(existingConfigs)
? existingConfigs.find((c: any) =>
c.config_group?.toLowerCase() === "google gmail" &&
c.config_group?.toLowerCase() === "google gmail mcp" &&
c.config_name === "GOOGLE_REFRESH_TOKEN"
)
: null;
const configPayload = {
config_group: "Google Gmail",
config_group: "Google Gmail MCP",
config_name: "GOOGLE_REFRESH_TOKEN",
config_value: "exists",
};
@ -374,13 +374,13 @@ export default function SettingMCP() {
const configs = await proxyFetchGet("/api/configs");
const existing = Array.isArray(configs)
? configs.find((c: any) =>
c.config_group?.toLowerCase() === "google gmail" &&
c.config_group?.toLowerCase() === "google gmail mcp" &&
c.config_name === "GOOGLE_REFRESH_TOKEN"
)
: null;
const payload = {
config_group: "Google Gmail",
config_group: "Google Gmail MCP",
config_name: "GOOGLE_REFRESH_TOKEN",
config_value: "exists",
};
@ -436,7 +436,7 @@ export default function SettingMCP() {
? t("setting.notion-workspace-integration")
: key.toLowerCase() === "google calendar"
? t("setting.google-calendar-integration")
: key.toLowerCase() === 'google gmail'
: key.toLowerCase() === 'google gmail mcp'
? "Google Gmail integration for managing emails, drafts, and contacts"
: "",
onInstall,