malvin 0.2.4

Non-interactive research and coding agent
1
2
3
4
5
6
7
8
9
10
11
use super::ReviewConfig;

pub(crate) fn parse_review_config(text: &str) -> Result<ReviewConfig, String> {
    let value: toml::Value = text.parse().map_err(|e| format!("invalid TOML: {e}"))?;
    let Some(review) = value.get("review") else {
        return Ok(ReviewConfig::default());
    };
    Ok(ReviewConfig {
        max_hypotheses: super::read_usize(review.get("max_hypotheses")),
    })
}