#[tauri::command]
pub async fn read_text_file(
    path: String,
) -> Result<String, String> {
    std::fs::read_to_string(&path)
        .map_err(|error| {
            format!(
                "failed to read {}: {}",
                path, error,
            )
        })
}