MCPcopy Index your code
hub / github.com/AI45Lab/Code / tool_result_from_core

Function tool_result_from_core

sdk/node/src/lib.rs:900–916  ·  view source on GitHub ↗
(result: a3s_code_core::ToolCallResult)

Source from the content-addressed store, hash-verified

898}
899
900fn tool_result_from_core(result: a3s_code_core::ToolCallResult) -> ToolResult {
901 ToolResult {
902 name: result.name,
903 output: result.output,
904 exit_code: result.exit_code,
905 metadata_json: result.metadata.as_ref().map(serde_json::Value::to_string),
906 document_runtime_json: result
907 .metadata
908 .as_ref()
909 .and_then(|metadata| metadata.get("document_runtime"))
910 .map(serde_json::Value::to_string),
911 error_kind_json: result
912 .error_kind
913 .as_ref()
914 .and_then(|k| serde_json::to_string(k).ok()),
915 }
916}
917
918fn normalize_program_script_options(options: serde_json::Value) -> napi::Result<serde_json::Value> {
919 let obj = options

Callers 12

toolMethod · 0.85
taskMethod · 0.85
tasksMethod · 0.85
programMethod · 0.85
write_fileMethod · 0.85
lsMethod · 0.85
edit_fileMethod · 0.85
patch_fileMethod · 0.85
gitMethod · 0.85
git_commandMethod · 0.85

Calls 1

getMethod · 0.45