fix: match shape of the calltoolresult schema (#377)

BREAKING CHANGE: makes the `content` field non-optional
This commit is contained in:
Peter L 2025-08-19 15:58:25 +09:30 • committed by GitHub
commit a47cbaac4b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -301,8 +301,7 @@ async fn test_optional_i64_field_with_null_input() -> anyhow::Result<()> {
let result_text = result
.content
.as_ref()
.and_then(|contents| contents.first())
.first()
.and_then(|content| content.raw.as_text())
.map(|text| text.text.as_str())
.expect("Expected text content");
@ -330,8 +329,7 @@ async fn test_optional_i64_field_with_null_input() -> anyhow::Result<()> {
let some_result_text = some_result
.content
.as_ref()
.and_then(|contents| contents.first())
.first()
.and_then(|content| content.raw.as_text())
.map(|text| text.text.as_str())
.expect("Expected text content");