MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / incoming_calls

Method incoming_calls

crates/opencode-lsp/src/lib.rs:713–742  ·  view source on GitHub ↗
(
        &self,
        path: &Path,
        line: u32,
        character: u32,
    )

Source from the content-addressed store, hash-verified

711 }
712
713 pub async fn incoming_calls(
714 &self,
715 path: &Path,
716 line: u32,
717 character: u32,
718 ) -> Result<Vec<CallHierarchyIncomingCall>, LspError> {
719 let items = self.prepare_call_hierarchy(path, line, character).await?;
720
721 if items.is_empty() {
722 return Ok(vec![]);
723 }
724
725 let item = &items[0];
726 let params = CallHierarchyIncomingCallsParams {
727 item: item.clone(),
728 work_done_progress_params: Default::default(),
729 partial_result_params: Default::default(),
730 };
731
732 let result = self
733 .request("callHierarchy/incomingCalls", serde_json::to_value(params)?)
734 .await?;
735
736 if result.is_null() {
737 return Ok(vec![]);
738 }
739
740 let calls: Vec<CallHierarchyIncomingCall> = serde_json::from_value(result)?;
741 Ok(calls)
742 }
743
744 pub async fn outgoing_calls(
745 &self,

Callers 1

execute_with_lspFunction · 0.80

Calls 4

is_emptyMethod · 0.80
requestMethod · 0.80
cloneMethod · 0.45

Tested by

no test coverage detected