fix(mcp): include threadId in both content and structuredContent in CallToolResult (#9338)

This commit is contained in:
Michael Bolin
2026-01-15 18:33:11 -08:00
committed by GitHub
parent a6324ab34b
commit 99f47d6e9a
5 changed files with 86 additions and 23 deletions

View File

@@ -162,6 +162,7 @@ async fn shell_command_approval_triggers_elicitation() -> anyhow::Result<()> {
],
"structuredContent": {
"threadId": params.thread_id,
"content": "File created!"
}
}),
},
@@ -323,6 +324,7 @@ async fn patch_approval_triggers_elicitation() -> anyhow::Result<()> {
],
"structuredContent": {
"threadId": params.thread_id,
"content": "Patch has been applied successfully!"
}
}),
},
@@ -394,6 +396,7 @@ async fn codex_tool_passes_base_instructions() -> anyhow::Result<()> {
.and_then(|v| v.get("threadId"))
.and_then(serde_json::Value::as_str)
.expect("codex tool response should include structuredContent.threadId"),
"content": "Enjoy!"
}
})
);