Replace mcp_core::content types with rmcp::model types (#3500)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
use mcp_core::{tool::ToolAnnotations, Content, Tool, ToolError};
|
||||
use mcp_core::{tool::ToolAnnotations, Tool, ToolError};
|
||||
use rmcp::model::Content;
|
||||
use serde_json::Value;
|
||||
|
||||
use crate::agents::subagent_task_config::TaskConfig;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
use serde_json::Value;
|
||||
use std::ops::Deref;
|
||||
use std::process::Stdio;
|
||||
use std::sync::Arc;
|
||||
use tokio::io::{AsyncBufReadExt, BufReader};
|
||||
@@ -80,8 +81,10 @@ async fn handle_text_instruction_task(
|
||||
// Extract the text content from the result
|
||||
let result_text = contents
|
||||
.into_iter()
|
||||
.filter_map(|content| match content {
|
||||
mcp_core::Content::Text(text) => Some(text.text),
|
||||
.filter_map(|content| match content.deref() {
|
||||
rmcp::model::RawContent::Text(raw_text_content) => {
|
||||
Some(raw_text_content.text.clone())
|
||||
}
|
||||
_ => None,
|
||||
})
|
||||
.collect::<Vec<_>>()
|
||||
|
||||
Reference in New Issue
Block a user