I haven't seen anybody argue that the court should not have a process and authority to jail a material witness who refuses to cooperate.  The issues in this case are jailing a witness who was cooperating and that she was jailed without due process.

Even if we accept that the witness apparently had great difficulty in testifying, the law allows a witness who cannot testify due to illness (which presumably includes mental illness) other options besides appearing in court.  It's very sad that none of the lawyers involved raised the suggestion on her behalf that she might, for example, be allowed to testify by deposition at this preliminary hearing.