MCPcopy Create free account
hub / github.com/CodeBendKit/codeseek / get_call_chain

Method get_call_chain

rust-core/src/codegraph/graph.rs:111–122  ·  view source on GitHub ↗

获取调用链(递归)

(&self, function_id: &Uuid, max_depth: usize)

Source from the content-addressed store, hash-verified

109
110 /// 获取调用链(递归)
111 pub fn get_call_chain(&self, function_id: &Uuid, max_depth: usize) -> Vec<Vec<Uuid>> {
112 let mut chains = Vec::new();
113 let mut visited = HashSet::new();
114 self._get_call_chain_recursive(function_id, &mut chains, &mut visited, 0, max_depth);
115
116 // 如果没有找到任何调用链,至少返回包含函数本身的链
117 if chains.is_empty() {
118 chains.push(vec![*function_id]);
119 }
120
121 chains
122 }
123
124 fn _get_call_chain_recursive(
125 &self,

Callers 1

find_call_chainsMethod · 0.45

Calls 1

Tested by

no test coverage detected