First off, heat the olive oil in an oven-safe casserole dish and brown the chicken skin down.
Remove the browned chicken thighs from the pot and saute the onion, garlic and chili.
Next add the mushrooms and leeks, and saute for another couple of minutes until the mushrooms have released their moisture and the leeks are caramelized.
Deglaze the pan with chicken stock and cream. Add the fresh thyme and replace the chicken pieces, skin side up, in the sauce.
Transfer the dish to a preheated oven and bake for another 30 minutes on 180 degrees Celsius.