Simplest thing is to run a timer and grab the time when the button is released. If it’s below a certain amount, treat as a tap, otherwise as a hold.
The simplest timer in gen~ is [accum] aka [+=]. Send a param button to the 1st input of [+=] and it will count in samples while the button is held, and stop counting when the button is released. So now you want to do two things: a) measure the time when the button is released, and b) reset the time to zero when the button is pressed again. Both of these are edges: a) happens when button goes from 1 to 0, b) happens when button goes from 0 to 1. Send the param through [change] to detect those transitions. Change will output 1 when the input rises, -1 when the input falls, and 0 when the input stays the same. A button outputs a step function so button → change will output single-sample spike of 1 when button gets pressed, and single-sample spike of -1 when button is released. So, send output of [change] to [== 1] to 2nd inlet of the [+=] to reset the count when button is pressed, and output of [change] to [== -1] to detect when button is released. Send this spike to 2nd inlet of a [latch], send the [+=] to 1st inlet of latch, and you have what you need.