MCPcopy Create free account
hub / github.com/AI45Lab/Code / git_command

Method git_command

sdk/node/src/lib.rs:3941–3950  ·  view source on GitHub ↗
(&self, args: serde_json::Value)

Source from the content-addressed store, hash-verified

3939 /// ```
3940 #[napi(js_name = "gitCommand", ts_args_type = "args: GitCommandOptions")]
3941 pub async fn git_command(&self, args: serde_json::Value) -> napi::Result<ToolResult> {
3942 let args = normalize_git_args(args)?;
3943 let session = self.inner.clone();
3944 let result = get_runtime()
3945 .spawn(async move { session.tool("git", args).await })
3946 .await
3947 .map_err(|e| napi::Error::from_reason(format!("Task join error: {e}")))?
3948 .map_err(|e| napi::Error::from_reason(format!("Tool execution failed: {e}")))?;
3949 Ok(tool_result_from_core(result))
3950 }
3951
3952 // ========================================================================
3953 // Advanced optional Queue API

Callers

nothing calls this directly

Calls 6

tool_result_from_coreFunction · 0.85
normalize_git_argsFunction · 0.70
get_runtimeFunction · 0.70
cloneMethod · 0.45
spawnMethod · 0.45
toolMethod · 0.45

Tested by

no test coverage detected