chore: add #[non_exhaustive] and mutation methods to improve compatibility (#715)
* chore: add #[non_exhaustive] to reduce backwards-incompatible changes going forward * fix: remove ProtocolVersion import * fix: add a few more with_ mutator methods --------- Co-authored-by: Alex Hancock <alexhancock@block.xyz>
This commit is contained in:
parent
79834b6211
commit
f63718d202
1 changed files with 1568 additions and 1110 deletions
|
|
@ -41,13 +41,11 @@ impl RigTool for McpToolAdaptor {
|
|||
let server = self.server.clone();
|
||||
Box::pin(async move {
|
||||
let call_mcp_tool_result = server
|
||||
.call_tool(CallToolRequestParams {
|
||||
meta: None,
|
||||
name: self.tool.name.clone(),
|
||||
arguments: serde_json::from_str(&args)
|
||||
.map_err(rig::tool::ToolError::JsonError)?,
|
||||
task: None,
|
||||
})
|
||||
.call_tool(
|
||||
CallToolRequestParams::new(self.tool.name.clone()).with_arguments(
|
||||
serde_json::from_str(&args).map_err(rig::tool::ToolError::JsonError)?,
|
||||
),
|
||||
)
|
||||
.await
|
||||
.inspect(|result| tracing::info!(?result))
|
||||
.inspect_err(|error| tracing::error!(%error))
|
||||
|
|
|
|||
Loading…
Reference in a new issue