feat: use the same permission flow for enable extensions (#2302)
This commit is contained in:
@@ -60,9 +60,6 @@ pub fn format_messages(messages: &[Message]) -> Vec<Value> {
|
||||
MessageContent::ToolConfirmationRequest(_tool_confirmation_request) => {
|
||||
// Skip tool confirmation requests
|
||||
}
|
||||
MessageContent::ExtensionRequest(_extension_request) => {
|
||||
// Skip extension requests
|
||||
}
|
||||
MessageContent::Thinking(thinking) => {
|
||||
content.push(json!({
|
||||
"type": "thinking",
|
||||
|
||||
@@ -31,9 +31,6 @@ pub fn to_bedrock_message_content(content: &MessageContent) -> Result<bedrock::C
|
||||
MessageContent::ToolConfirmationRequest(_tool_confirmation_request) => {
|
||||
bedrock::ContentBlock::Text("".to_string())
|
||||
}
|
||||
MessageContent::ExtensionRequest(_extension_request) => {
|
||||
bedrock::ContentBlock::Text("".to_string())
|
||||
}
|
||||
MessageContent::Image(_) => {
|
||||
bail!("Image content is not supported by Bedrock provider yet")
|
||||
}
|
||||
|
||||
@@ -179,9 +179,6 @@ pub fn format_messages(messages: &[Message], image_format: &ImageFormat) -> Vec<
|
||||
MessageContent::ToolConfirmationRequest(_) => {
|
||||
// Skip tool confirmation requests
|
||||
}
|
||||
MessageContent::ExtensionRequest(_) => {
|
||||
// Skip enable extension requests
|
||||
}
|
||||
MessageContent::Image(image) => {
|
||||
// Handle direct image content
|
||||
content_array.push(json!({
|
||||
|
||||
@@ -147,9 +147,6 @@ pub fn format_messages(messages: &[Message], image_format: &ImageFormat) -> Vec<
|
||||
MessageContent::ToolConfirmationRequest(_) => {
|
||||
// Skip tool confirmation requests
|
||||
}
|
||||
MessageContent::ExtensionRequest(_) => {
|
||||
// Skip enable extension requests
|
||||
}
|
||||
MessageContent::Image(image) => {
|
||||
// Handle direct image content
|
||||
converted["content"] = json!([convert_image(image, image_format)]);
|
||||
|
||||
Reference in New Issue
Block a user