- {t('setting.google-search-default-desc', {
- defaultValue:
- 'Google Search is enabled by default. No API key required.',
- })}
+ {t('connectors.google-search-default-desc')}
)}
diff --git a/src/pages/Connectors/components/MCPAddDialog.tsx b/src/pages/Connectors/components/MCPAddDialog.tsx
deleted file mode 100644
index a09e59301..000000000
--- a/src/pages/Connectors/components/MCPAddDialog.tsx
+++ /dev/null
@@ -1,162 +0,0 @@
-// ========= Copyright 2025-2026 @ Eigent.ai All Rights Reserved. =========
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-// ========= Copyright 2025-2026 @ Eigent.ai All Rights Reserved. =========
-
-import {
- Dialog,
- DialogContent,
- DialogContentSection,
- DialogFooter,
- DialogHeader,
-} from '@/components/ui/dialog';
-import loader from '@monaco-editor/loader';
-import MonacoEditor from '@monaco-editor/react';
-import * as monaco from 'monaco-editor';
-import React, { useState } from 'react';
-import { useTranslation } from 'react-i18next';
-
-if (typeof globalThis !== 'undefined') {
- (globalThis as any).MonacoEnvironment = {
- getWorker(_: string, label: string) {
- if (['json', 'css', 'html', 'typescript', 'javascript'].includes(label)) {
- return new Worker(
- URL.createObjectURL(
- new Blob(
- [
- `
- self.onmessage = function () {};
- `,
- ],
- { type: 'application/javascript' }
- )
- )
- );
- }
- },
- };
-}
-
-loader.config({ monaco }); // put at the top of the MCPAddDialog component file
-
-interface MCPAddDialogProps {
- open: boolean;
- addType: 'local' | 'remote';
- setAddType: (type: 'local' | 'remote') => void;
- localJson: string;
- setLocalJson: (v: string) => void;
- remoteName: string;
- setRemoteName: (v: string) => void;
- remoteUrl: string;
- setRemoteUrl: (v: string) => void;
- installing: boolean;
- onClose: () => void;
- onInstall: () => void;
-}
-
-export default function MCPAddDialog({
- open,
- localJson,
- setLocalJson,
- installing,
- onClose,
- onInstall,
-}: MCPAddDialogProps) {
- const [jsonError, setJsonError] = useState(null);
- const { t } = useTranslation();
- // when the dialog is opened, automatically format the JSON
- React.useEffect(() => {
- if (open && localJson) {
- try {
- const obj = JSON.parse(localJson);
- setLocalJson(JSON.stringify(obj, null, 4));
- setJsonError(null);
- } catch (e: any) {
- // do not format invalid JSON, keep the original content
- setJsonError('JSON format error: ' + (e.message || e.toString()));
- }
- } else if (open) {
- setJsonError(null);
- }
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, [open]);
-
- // when localJson changes, clear the error prompt
- React.useEffect(() => {
- setJsonError(null);
- }, [localJson]);
-
- return (
-
- );
-}
diff --git a/src/pages/Connectors/components/MCPConfigDialog.tsx b/src/pages/Connectors/components/MCPConfigDialog.tsx
index e3407963b..7bbe9dba9 100644
--- a/src/pages/Connectors/components/MCPConfigDialog.tsx
+++ b/src/pages/Connectors/components/MCPConfigDialog.tsx
@@ -52,6 +52,7 @@ export default function MCPConfigDialog({
const { t } = useTranslation();
const formRef = useRef(null);
if (!form || !mcp) return null;
+ const isRemote = Number(mcp.type) === 2;
return (