opencode-see-image 0.5.6 → 0.5.8
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 +6 -9
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -435,29 +435,26 @@ async function maybeAutoUpdate(
|
|
|
435
435
|
|
|
436
436
|
log(`update available: ${current} -> ${latest}; updating`, "info")
|
|
437
437
|
|
|
438
|
+
const specifier = `${PKG_NAME}@${latest}`
|
|
438
439
|
const opencodeBin =
|
|
439
440
|
process.env.OPENCODE_BIN ||
|
|
440
441
|
path.join(os.homedir(), ".opencode/bin/opencode")
|
|
441
442
|
try {
|
|
442
|
-
await $`${opencodeBin} plugin ${
|
|
443
|
+
await $`${opencodeBin} plugin ${specifier} --force --global`.quiet()
|
|
443
444
|
} catch (e: any) {
|
|
444
445
|
try {
|
|
445
|
-
await $`opencode plugin ${
|
|
446
|
+
await $`opencode plugin ${specifier} --force --global`.quiet()
|
|
446
447
|
} catch (e2: any) {
|
|
447
448
|
log(`plugin update failed: ${e2?.message ?? e2}`, "warn")
|
|
448
449
|
return
|
|
449
450
|
}
|
|
450
451
|
}
|
|
451
452
|
|
|
453
|
+
log(`update applied: ${current} -> ${latest}; restart opencode to load`, "info")
|
|
452
454
|
try {
|
|
453
|
-
await client?.tui?.showToast?.({
|
|
454
|
-
body: {
|
|
455
|
-
message: `${PKG_NAME} updated to ${latest}, restart opencode to apply`,
|
|
456
|
-
variant: "success",
|
|
457
|
-
},
|
|
458
|
-
})
|
|
455
|
+
await client?.tui?.showToast?.({ body: { message: `${PKG_NAME} updated to ${latest}, restart opencode to apply`, variant: "success" } })
|
|
459
456
|
} catch {
|
|
460
|
-
|
|
457
|
+
// toast is non-critical, log already captured
|
|
461
458
|
}
|
|
462
459
|
}
|
|
463
460
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-see-image",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.8",
|
|
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",
|