mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
fix access_mcp_resource fails to handle images correctly (#5254)
This commit is contained in:
parent
1cb69d2dc6
commit
19cd001f8d
1 changed files with 5 additions and 1 deletions
|
|
@ -73,7 +73,11 @@ export async function accessMcpResourceTool(
|
|||
|
||||
resourceResult?.contents.forEach((item) => {
|
||||
if (item.mimeType?.startsWith("image") && item.blob) {
|
||||
images.push(item.blob)
|
||||
if (item.blob.startsWith("data:")) {
|
||||
images.push(item.blob)
|
||||
} else {
|
||||
images.push(`data:${item.mimeType};base64,` + item.blob)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue