We enumerate height-restricted path diagrams associated with q-tangent and q-secant numbers by considering convergents of continued fractions, leading to expressions involving basic hypergeometric functions. Our work generalises some results by M. Josuat-Vergés for unrestricted path diagrams [European Journal of Combinatorics 31 (2010) 1892].