(1) It shall be the duty of the public defender to represent all indigent felony defendants within the county he or she serves. The public defender shall represent indigent felony defendants at all critical stages of felony proceedings against them through the stage of sentencing. Sentencing shall include hearings on charges of violation of felony probation. Following the sentencing of any indigent defendant represented by him or her, the public defender may take any direct, collateral, or postconviction appeals to state or federal courts which he or she considers to be meritorious and in the interest of justice and shall file a notice of appeal and proceed with one direct appeal to either the Court of Appeals or the Supreme Court of Nebraska upon a timely request after sentencing from any such convicted felony defendant, subject to the public defender's right to apply to the court to withdraw from representation in any appeal which he or she deems to be wholly frivolous.
(2) It shall be the duty of the public defender to represent all indigent persons against whom a petition has been filed with a mental health board as provided in sections 71-945 to 71-947.
(3) It shall be the duty of the public defender to represent all indigent persons charged with misdemeanor offenses punishable by imprisonment when appointed by the court.
(4) Appointment of a public defender shall be by the court in accordance with sections 29-3902 and 29-3903. A public defender shall not represent an indigent person prior to appointment by the court, except that a public defender may represent a person under arrest for investigation or on suspicion. A public defender shall not inquire into a defendant's financial condition for purposes of indigency determination except to make an initial determination of indigency of a person under arrest for investigation or on suspicion. A public defender shall not make a determination of a defendant's indigency, except an initial determination of indigency of a person under arrest for investigation or on suspicion, nor recommend to a court that a defendant be determined or not determined as indigent.
(5) For purposes of this section, the definitions found in section 29-3901 shall be used.