Season chicken breasts with salt and pepper. Heat olive oil in a skillet over medium heat. Cook chicken for 6-7 minutes on each side until golden brown. Remove and set aside.
In the same skillet, add sliced onion and cook for 5-7 minutes until caramelized. Add minced garlic, thyme, and rosemary, cooking for an additional minute.
Pour in beef broth, scraping the bottom of the skillet. Bring to a simmer and cook for 3-4 minutes. Stir in heavy cream and mix well.
Return chicken to the skillet, spoon sauce over it, and sprinkle with Gruyère cheese.
Cover and cook for another 5 minutes over low heat until cheese is melted and bubbly. Garnish with parsley before serving.