If the function \(f\) defined on \(\left(\frac{\pi}{6}, \frac{\pi}{3}\right)\) by
\[f(x)=\left\{\begin{array}{cc} \frac{\sqrt{2} \cos x-1}{\cot x-1}, & x \neq \frac{\pi}{4} \\ k \quad, & x=\frac{\pi}{4} \end{array}\right.\]
is continuous, then k is equal to