opencode-see-image 0.6.0 → 0.6.1
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/index.ts +16 -13
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -325,28 +325,31 @@ async function seeImageViaHTTP(
|
|
|
325
325
|
|
|
326
326
|
const SYSTEM_INSTRUCTIONS = `# See Image (vision bridge), opencode-see-image plugin
|
|
327
327
|
|
|
328
|
-
You have
|
|
328
|
+
You have a \`see_image\` tool. When the user attaches an image, opencode rejects it and you receive an error string containing the **filename**. You MUST call \`see_image\` to actually view it — do NOT just tell the user about the error.
|
|
329
329
|
|
|
330
|
-
## When
|
|
330
|
+
## When you MUST call \`see_image\`
|
|
331
331
|
|
|
332
|
-
|
|
333
|
-
1. You receive an error like: \`Cannot read "Screenshot ....png" (this model does not support image input)\`
|
|
334
|
-
2. The user references an image/screenshot they expect you to see ("see this", "look at this", "can you see this", ".png"/".jpg")
|
|
335
|
-
3. The user pastes an image path they want you to inspect
|
|
332
|
+
Call \`see_image\` immediately in ALL these cases — do not inform the user, do not ask for confirmation:
|
|
336
333
|
|
|
337
|
-
|
|
334
|
+
1. You receive an error containing \`Cannot read "Screenshot ..."\` or \`Cannot read "...png"\` or \`Cannot read "...jpg"\`
|
|
335
|
+
2. The error message says \`this model does not support image input\`
|
|
336
|
+
3. The error starts with \`ERROR:\` and mentions an image file
|
|
337
|
+
4. The user references an image/screenshot ("see this", "look at this", ".png", ".jpg")
|
|
338
|
+
5. The user pastes an image path
|
|
338
339
|
|
|
339
340
|
## How to use it
|
|
340
341
|
|
|
341
|
-
1.
|
|
342
|
-
2.
|
|
343
|
-
3.
|
|
342
|
+
1. Extract the filename from the error (it's in quotes in the error message, e.g. \`Screenshot 2026-06-19 at 02.18.53.png\`)
|
|
343
|
+
2. Call \`see_image\` with \`filePath\` set to that bare filename
|
|
344
|
+
3. Optionally pass a \`question\` if the user asked something specific
|
|
345
|
+
4. Answer using the returned description as if you saw the image. Be natural.
|
|
344
346
|
|
|
345
347
|
## Important
|
|
346
348
|
|
|
347
|
-
-
|
|
348
|
-
- If
|
|
349
|
-
-
|
|
349
|
+
- NEVER just repeat the error to the user. Call the tool.
|
|
350
|
+
- If \`see_image\` cannot find the file, tell the user the filename and ask for an absolute path.
|
|
351
|
+
- Do NOT use \`see_image\` for text files (\`.ts\`, \`.md\`, \`.json\`, etc.) — use \`read\` instead.
|
|
352
|
+
- Never guess image contents. If you haven't called \`see_image\`, you haven't seen the image.`
|
|
350
353
|
|
|
351
354
|
const PKG_NAME = "opencode-see-image"
|
|
352
355
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-see-image",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
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",
|