Mix the butter and sugar together in a bowl using a wooden spoon until soft and fluffy. Gradually beat in the eggs and vanilla extract.
Sift in the flour and cocoa powder and add the cranberries and chocolate. Mix the dough together with your hands. Knead lightly, then wrap in clingfilm and chill for at least 30 minutes.
Cover 2 baking sheets with nonstick baking paper. Roll the mixture into 8 balls and arrange, well spaced apart, on the paper. Flatten each one with the heel of your hand and top with a walnut or pecan half.
Bake in a preheated oven, 180°C (350°F), Gas Mark 4, for 15 minutes until just firm. Leave on the tray for 5 minutes to firm up slightly and serve while warm. Alternatively, cool on a wire rack, then store in an airtight container.