(
tool_registry: &opencode_tool::ToolRegistry,
mcp_tools: Vec<ToolDefinition>,
)
| 3101 | } |
| 3102 | |
| 3103 | pub async fn resolve_tools_with_mcp( |
| 3104 | tool_registry: &opencode_tool::ToolRegistry, |
| 3105 | mcp_tools: Vec<ToolDefinition>, |
| 3106 | ) -> Vec<ToolDefinition> { |
| 3107 | let base = tool_registry |
| 3108 | .list_schemas() |
| 3109 | .await |
| 3110 | .into_iter() |
| 3111 | .map(|s| ToolDefinition { |
| 3112 | name: s.name, |
| 3113 | description: Some(s.description), |
| 3114 | parameters: s.parameters, |
| 3115 | }) |
| 3116 | .collect(); |
| 3117 | |
| 3118 | merge_tool_definitions(base, mcp_tools) |
| 3119 | } |
| 3120 | |
| 3121 | pub async fn resolve_tools_with_mcp_registry( |
| 3122 | tool_registry: &opencode_tool::ToolRegistry, |
no test coverage detected