Whisk together flour, cocoa, salt, and baking powder. Beat butter and sugars with a mixer on medium speed until pale and fluffy. Beat in egg, yolk, chocolate, and vanilla. Reduce speed to low. Add flour mixture and beat until just combined. Shape into a disk, wrap in plastic, and refrigerate 1 hour.