Replace mcp_core::content types with rmcp::model types (#3500)

This commit is contained in:
Jack Amadeo
2025-07-18 17:23:25 -04:00
committed by GitHub
parent a2309d9436
commit d5291461ca
66 changed files with 867 additions and 856 deletions
@@ -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<_>>()