summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAiden Cline <[email protected]>2025-12-09 14:24:30 -0600
committerAiden Cline <[email protected]>2025-12-09 14:24:30 -0600
commit84a0868e66e1e315963208962d5218c39a549903 (patch)
treefd6d3ef24bfb2a113f8655c1fa33359d40998d62
parent75a9c427898aebd1aa0f1e7cd6bcb58199c7c36e (diff)
downloadopencode-84a0868e66e1e315963208962d5218c39a549903.tar.gz
opencode-84a0868e66e1e315963208962d5218c39a549903.zip
fix: read when file is svg
-rw-r--r--packages/opencode/src/tool/read.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/opencode/src/tool/read.ts b/packages/opencode/src/tool/read.ts
index e1ba84524..27426ad24 100644
--- a/packages/opencode/src/tool/read.ts
+++ b/packages/opencode/src/tool/read.ts
@@ -93,7 +93,7 @@ export const ReadTool = Tool.define("read", {
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"
if (isImage || isPdf) {
const mime = file.type