Generalized electronic susceptibility and charge-density waves in 1T-TaS2 and 1T-TaSe2