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.
Files changed (2) hide show
  1. package/index.ts +16 -13
  2. 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 access to a \`see_image\` tool. The current model may not support image input directly. When a user attaches a screenshot or image, opencode rejects it and you only receive an error string containing the **filename**, no path, no pixels. Use \`see_image\` to actually view it.
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 to use \`see_image\`
330
+ ## When you MUST call \`see_image\`
331
331
 
332
- Use ONLY when one of these is true:
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
- Do NOT use \`see_image\` for reading text files, use the \`read\` tool for those.
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. **Extract the filename** from the error string (the quoted name), or use the path the user gave.
342
- 2. **Call \`see_image\`** with \`filePath\` set to the bare filename (it auto-locates) or an absolute path. Pass an optional \`question\` if the user asked something specific.
343
- 3. **Answer using the returned description** as if you saw the image. Be natural, don't mention that you used another model unless asked.
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
- - Never guess or confabulate image contents from the filename or surrounding text. If you have not called \`see_image\`, you have NOT seen the image.
348
- - If the tool cannot find the file, tell the user the filename and ask for a full path or to drag the file into the project directory.
349
- - To inspect a specific detail, pass a targeted \`question\` (e.g. "What error is shown in the terminal?").`
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.0",
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",