chore: upgrade rmcp (#6516)
This commit is contained in:
@@ -898,6 +898,7 @@ mod tests {
|
||||
.with_tool_request(
|
||||
"tool123",
|
||||
Ok(CallToolRequestParam {
|
||||
task: None,
|
||||
name: "test_tool".into(),
|
||||
arguments: Some(object!({"param": "value"})),
|
||||
}),
|
||||
@@ -1156,6 +1157,7 @@ mod tests {
|
||||
#[test]
|
||||
fn test_message_with_tool_request() {
|
||||
let tool_call = Ok(CallToolRequestParam {
|
||||
task: None,
|
||||
name: "test_tool".into(),
|
||||
arguments: Some(object!({})),
|
||||
});
|
||||
|
||||
@@ -551,6 +551,7 @@ mod tests {
|
||||
.with_tool_request(
|
||||
"search_1",
|
||||
Ok(CallToolRequestParam {
|
||||
task: None,
|
||||
name: "web_search".into(),
|
||||
arguments: Some(object!({"query": "rust programming"})),
|
||||
}),
|
||||
@@ -614,6 +615,7 @@ mod tests {
|
||||
.with_tool_request(
|
||||
"bad_req",
|
||||
Ok(CallToolRequestParam {
|
||||
task: None,
|
||||
name: "search".into(),
|
||||
arguments: Some(object!({})),
|
||||
}),
|
||||
@@ -653,6 +655,7 @@ mod tests {
|
||||
.with_tool_request(
|
||||
"search_1",
|
||||
Ok(CallToolRequestParam {
|
||||
task: None,
|
||||
name: "search".into(),
|
||||
arguments: Some(object!({})),
|
||||
}),
|
||||
@@ -670,6 +673,7 @@ mod tests {
|
||||
Message::assistant().with_tool_request(
|
||||
"search_2",
|
||||
Ok(CallToolRequestParam {
|
||||
task: None,
|
||||
name: "search".into(),
|
||||
arguments: Some(object!({})),
|
||||
}),
|
||||
@@ -704,11 +708,11 @@ mod tests {
|
||||
|
||||
Message::assistant()
|
||||
.with_text("I'll help you run `ls` in the current directory and then perform a word count on the smallest file. Let me start by listing the directory contents.")
|
||||
.with_tool_request("toolu_bdrk_018adWbP4X26CfoJU5hkhu3i", Ok(CallToolRequestParam { name: "developer__shell".into(), arguments: Some(object!({"command": "ls -la"})) })),
|
||||
.with_tool_request("toolu_bdrk_018adWbP4X26CfoJU5hkhu3i", Ok(CallToolRequestParam { task: None, name: "developer__shell".into(), arguments: Some(object!({"command": "ls -la"})) })),
|
||||
|
||||
Message::assistant()
|
||||
.with_text("Now I'll identify the smallest file by size. Looking at the output, I can see that both `slack.yaml` and `subrecipes.yaml` have a size of 0 bytes, making them the smallest files. I'll run a word count on one of them:")
|
||||
.with_tool_request("toolu_bdrk_01KgDYHs4fAodi22NqxRzmwx", Ok(CallToolRequestParam { name: "developer__shell".into(), arguments: Some(object!({"command": "wc slack.yaml"})) })),
|
||||
.with_tool_request("toolu_bdrk_01KgDYHs4fAodi22NqxRzmwx", Ok(CallToolRequestParam { task: None, name: "developer__shell".into(), arguments: Some(object!({"command": "wc slack.yaml"})) })),
|
||||
|
||||
Message::user()
|
||||
.with_tool_response("toolu_bdrk_01KgDYHs4fAodi22NqxRzmwx", Ok(rmcp::model::CallToolResult {
|
||||
@@ -743,6 +747,7 @@ mod tests {
|
||||
.with_tool_request(
|
||||
"search_1",
|
||||
Ok(CallToolRequestParam {
|
||||
task: None,
|
||||
name: "search".into(),
|
||||
arguments: Some(object!({})),
|
||||
}),
|
||||
|
||||
@@ -43,6 +43,7 @@ impl ToolCallWithValueArguments {
|
||||
}
|
||||
};
|
||||
CallToolRequestParam {
|
||||
task: None,
|
||||
name: Cow::Owned(self.name),
|
||||
arguments,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user