Skip to main content

lean_ctx/tools/
ctx_callers.rs

1pub fn handle(symbol: &str, file: Option<&str>, project_root: &str) -> String {
2    let result = crate::tools::ctx_callgraph::handle(symbol, file, project_root, "callers");
3    format!("[DEPRECATED] Use ctx_callgraph with direction='callers'.\n{result}")
4}
5
6#[cfg(test)]
7mod tests {
8    use super::handle;
9
10    #[test]
11    fn shows_deprecation_note() {
12        let output = handle("non_existent_symbol", None, "/tmp");
13        assert!(output.contains("[DEPRECATED]"));
14        assert!(output.contains("ctx_callgraph"));
15    }
16}