use agent_workspace_contract::FileVisibilityOptions;
pub fn is_visible_name(name: &str, options: FileVisibilityOptions) -> bool {
if !options.include_ignored && is_ignored_dir(name) {
return false;
}
if !options.include_hidden && name.starts_with('.') {
return false;
}
true
}
fn is_ignored_dir(name: &str) -> bool {
matches!(
name,
"target" | "node_modules" | ".git" | "__pycache__" | ".venv" | "venv"
)
}