Add hint for focus mode when used on file paths for analyze tool (#5069)

This commit is contained in:
tlongwell-block
2025-10-08 12:06:03 -04:00
committed by GitHub
parent b040cfc5ab
commit b0edaf77f2
@@ -318,6 +318,14 @@ impl CodeAnalyzer {
outgoing_chains: &outgoing_chains,
};
Ok(Formatter::format_focused_output(&focus_data))
let mut output = Formatter::format_focused_output(&focus_data);
if path.is_file() {
let hint = "NOTE: Focus mode works best with directory paths. \
Use a parent directory in the path for cross-file analysis.\n\n";
output = format!("{}{}", hint, output);
}
Ok(output)
}
}