use super::ToolRuntime;
use std::{collections::HashSet, path::PathBuf};
impl ToolRuntime {
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()
}
}