acp: Update to agent-client-protocol rust sdk v0.9.0 (#44373)

Release Notes:

- N/A
This commit is contained in:
Ben Brandt
2025-12-08 11:11:05 +00:00
committed by GitHub
parent 9364d39487
commit 03cf7ddb53
13 changed files with 81 additions and 90 deletions
+6 -10
View File
@@ -417,13 +417,12 @@ impl MessageEditor {
))
}
}
Mention::Image(mention_image) => {
let mut image = acp::ImageContent::new(
Mention::Image(mention_image) => acp::ContentBlock::Image(
acp::ImageContent::new(
mention_image.data.clone(),
mention_image.format.mime_type(),
);
if let Some(uri) = match uri {
)
.uri(match uri {
MentionUri::File { .. } => Some(uri.to_uri().to_string()),
MentionUri::PastedImage => None,
other => {
@@ -433,11 +432,8 @@ impl MessageEditor {
);
None
}
} {
image = image.uri(uri)
};
acp::ContentBlock::Image(image)
}
}),
),
Mention::Link => acp::ContentBlock::ResourceLink(
acp::ResourceLink::new(uri.name(), uri.to_uri().to_string()),
),
+2 -2
View File
@@ -100,7 +100,7 @@ impl ThreadError {
{
Self::ModelRequestLimitReached(error.plan)
} else if let Some(acp_error) = error.downcast_ref::<acp::Error>()
&& acp_error.code == acp::ErrorCode::AUTH_REQUIRED.code
&& acp_error.code == acp::ErrorCode::AuthRequired
{
Self::AuthenticationRequired(acp_error.message.clone().into())
} else {
@@ -6243,7 +6243,7 @@ pub(crate) mod tests {
StubAgentConnection::new().with_permission_requests(HashMap::from_iter([(
tool_call_id,
vec![acp::PermissionOption::new(
"1".into(),
"1",
"Allow",
acp::PermissionOptionKind::AllowOnce,
)],