Parcourir la source

fix: read when file is svg

Aiden Cline il y a 9 mois
Parent
commit
84a0868e66
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      packages/opencode/src/tool/read.ts

+ 1 - 1
packages/opencode/src/tool/read.ts

@@ -93,7 +93,7 @@ export const ReadTool = Tool.define("read", {
       throw new Error(`File not found: ${filepath}`)
       throw new Error(`File not found: ${filepath}`)
     }
     }
 
 
-    const isImage = file.type.startsWith("image/")
+    const isImage = file.type.startsWith("image/") && file.type !== "image/svg+xml"
     const isPdf = file.type === "application/pdf"
     const isPdf = file.type === "application/pdf"
     if (isImage || isPdf) {
     if (isImage || isPdf) {
       const mime = file.type
       const mime = file.type