magi-code 0.96.1

Repository-aware CLI coding agent for terminal work
Documentation
use super::ToolRuntime;
use std::{collections::HashSet, path::PathBuf};

impl ToolRuntime {
    // Default cwd-scoped runtime for profiling workloads.
    pub fn new(cwd: impl Into<PathBuf>) -> anyhow::Result<Self> {
        Self::new_with_settings(cwd, crate::config::ToolSettings::default())
    }

    pub(super) fn settings_disabled_tool_names(
        settings: &crate::config::ToolSettings,
    ) -> HashSet<String> {
        settings
            .disabled
            .iter()
            .map(|name| name.trim())
            .filter(|name| !name.is_empty())
            .map(ToString::to_string)
            .collect()
    }
}