feat(mcp): add option to mirror MCP config to other app
- Add syncOtherSide parameter to upsert_mcp_server_in_config command - Implement checkbox UI in McpFormModal for cross-app sync - Automatically sync enabled MCP servers to both Claude and Codex when option is checked - Add i18n support for sync option labels and hints
This commit is contained in:
@@ -135,10 +135,16 @@ const McpPanel: React.FC<McpPanelProps> = ({ onClose, onNotify, appType }) => {
|
||||
});
|
||||
};
|
||||
|
||||
const handleSave = async (id: string, server: McpServer) => {
|
||||
const handleSave = async (
|
||||
id: string,
|
||||
server: McpServer,
|
||||
options?: { syncOtherSide?: boolean },
|
||||
) => {
|
||||
try {
|
||||
const payload: McpServer = { ...server, id };
|
||||
await window.api.upsertMcpServerInConfig(appType, id, payload);
|
||||
await window.api.upsertMcpServerInConfig(appType, id, payload, {
|
||||
syncOtherSide: options?.syncOtherSide,
|
||||
});
|
||||
await reload();
|
||||
setIsFormOpen(false);
|
||||
setEditingId(null);
|
||||
|
||||
Reference in New Issue
Block a user