Make import existing side-effect free (#2429)

Co-authored-by: Xvvln <3369759202@qq.com>
This commit is contained in:
ayxwi
2026-04-30 21:59:47 +08:00
committed by GitHub
parent 1c69269405
commit 7965862e66
4 changed files with 161 additions and 23 deletions
+10 -10
View File
@@ -268,8 +268,8 @@ impl McpService {
state.db.save_mcp_server(&to_save)?;
existing.insert(to_save.id.clone(), to_save.clone());
// 同步到对应应用 live 配置
Self::sync_server_to_apps(state, &to_save)?;
// 导入是读取已有配置,不应反向写回任何应用 live 配置
// 显式编辑、启用/禁用或手动同步时再执行写回。
}
}
}
@@ -306,8 +306,8 @@ impl McpService {
state.db.save_mcp_server(&to_save)?;
existing.insert(to_save.id.clone(), to_save.clone());
// 同步到对应应用 live 配置
Self::sync_server_to_apps(state, &to_save)?;
// 导入是读取已有配置,不应反向写回任何应用 live 配置
// 显式编辑、启用/禁用或手动同步时再执行写回。
}
}
}
@@ -344,8 +344,8 @@ impl McpService {
state.db.save_mcp_server(&to_save)?;
existing.insert(to_save.id.clone(), to_save.clone());
// 同步到对应应用 live 配置
Self::sync_server_to_apps(state, &to_save)?;
// 导入是读取已有配置,不应反向写回任何应用 live 配置
// 显式编辑、启用/禁用或手动同步时再执行写回。
}
}
}
@@ -382,8 +382,8 @@ impl McpService {
state.db.save_mcp_server(&to_save)?;
existing.insert(to_save.id.clone(), to_save.clone());
// 同步到对应应用 live 配置
Self::sync_server_to_apps(state, &to_save)?;
// 导入是读取已有配置,不应反向写回任何应用 live 配置
// 显式编辑、启用/禁用或手动同步时再执行写回。
}
}
}
@@ -420,8 +420,8 @@ impl McpService {
state.db.save_mcp_server(&to_save)?;
existing.insert(to_save.id.clone(), to_save.clone());
// 同步到对应应用 live 配置
Self::sync_server_to_apps(state, &to_save)?;
// 导入是读取已有配置,不应反向写回任何应用 live 配置
// 显式编辑、启用/禁用或手动同步时再执行写回。
}
}
}