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

Method outgoing_calls

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

Source from the content-addressed store, hash-verified

742 }
743
744 pub async fn outgoing_calls(
745 &self,
746 path: &Path,
747 line: u32,
748 character: u32,
749 ) -> Result<Vec<CallHierarchyOutgoingCall>, LspError> {
750 let items = self.prepare_call_hierarchy(path, line, character).await?;
751
752 if items.is_empty() {
753 return Ok(vec![]);
754 }
755
756 let item = &items[0];
757 let params = CallHierarchyOutgoingCallsParams {
758 item: item.clone(),
759 work_done_progress_params: Default::default(),
760 partial_result_params: Default::default(),
761 };
762
763 let result = self
764 .request("callHierarchy/outgoingCalls", serde_json::to_value(params)?)
765 .await?;
766
767 if result.is_null() {
768 return Ok(vec![]);
769 }
770
771 let calls: Vec<CallHierarchyOutgoingCall> = serde_json::from_value(result)?;
772 Ok(calls)
773 }
774}
775
776#[allow(deprecated)]

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