How to make sight in A* path finding project

I am trying to make a platformer game, now I am making the enemy ,I used A* path finding but the enemy would follow the player no matter how far he is,I would like to add sight for the enemy to when go to the player

So there is no automatic aproach