opencode-see-image 0.4.2 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/index.ts +12 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -151,6 +151,11 @@ Then restart opencode. (No bun required, this uses opencode's own bun.)
|
|
|
151
151
|
"plugin": ["opencode-see-image@0.4.2"]
|
|
152
152
|
```
|
|
153
153
|
|
|
154
|
+
## Limitations
|
|
155
|
+
|
|
156
|
+
- **Clipboard pastes don't work** — when you paste an image from clipboard (Cmd+V), opencode processes it in-memory but discards it before writing to disk if the model doesn't support image input. The plugin can't access it. **Drag screenshots instead**, or save the clipboard image to a file first.
|
|
157
|
+
- **macOS only** — file search locations target macOS screenshot temp dirs. Linux/Windows users need to pass absolute paths.
|
|
158
|
+
|
|
154
159
|
## File search locations
|
|
155
160
|
|
|
156
161
|
When opencode rejects an image attachment, the model only receives a bare filename. `see_image` searches these locations in order:
|
package/index.ts
CHANGED
|
@@ -64,9 +64,19 @@ function resolveFilePath(name: string, cwd: string): string {
|
|
|
64
64
|
} catch {}
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
const
|
|
67
|
+
const nsirdCount = searchDirs.filter((d) =>
|
|
68
|
+
String(d).includes("NSIRD_screencaptureui"),
|
|
69
|
+
).length
|
|
70
|
+
const summary = [
|
|
71
|
+
`${nsirdCount} macOS screenshot temp dirs`,
|
|
72
|
+
"~/Desktop",
|
|
73
|
+
"~/Downloads",
|
|
74
|
+
cwd,
|
|
75
|
+
]
|
|
76
|
+
.filter(Boolean)
|
|
77
|
+
.join(", ")
|
|
68
78
|
throw new Error(
|
|
69
|
-
`see_image: could not find "${name}". Searched
|
|
79
|
+
`see_image: could not find "${name}". Searched ${summary}. ` +
|
|
70
80
|
`Pass an absolute filePath instead.`,
|
|
71
81
|
)
|
|
72
82
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-see-image",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "Give non-vision opencode models the ability to see images/screenshots by routing them to a vision-capable model (MiniMax M3 via opencode-go by default).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.ts",
|