Cal. Penal Code § 1370.01
(b) If the defendant is found mentally incompetent, the trial, judgment, or hearing on the alleged violation shall be suspended and the court shall, after notice to the defendant, defense counsel, and the prosecution, hold a hearing to determine whether to do one or more of the following:
(1)
(A)
(c) If the court finds the defendant ineligible or unsuitable for diversion based on the circumstances set forth in subdivision (b), (c), (d), or (g) of Section 1001.36, the court shall, after notice to the defendant, defense counsel, and the prosecution, hold a hearing to determine which one of the following actions the court will take: